:root {
  --space: #06102e;
  --ink: #ffffff;
  --muted: #b9d3ee;
  --tab-ink: #04222f;
  --tab-edge: #9fdde8;
  --glow: #2aa7ff;
  --line: rgba(120, 204, 232, 0.4);
  --card: #1f3751;
  --gold: #ffd634;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 16px; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--space);
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("../img/space.webp") center top / cover no-repeat;
}

img { max-width: 100%; height: auto; }

a { color: #8fe3f4; }

h1, h2, h3 { line-height: 1.2; font-weight: 800; margin: 0 0 12px; }

h1, h2 { text-shadow: 0 0 6px var(--glow), 0 0 14px var(--glow), 0 2px 0 #000; }

h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }

h2 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }

h3 { font-size: 1.12rem; font-style: italic; }

.mg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.mg-skip { position: absolute; left: 8px; top: -60px; z-index: 50; padding: 8px 14px; background: var(--gold); color: #231600; border-radius: 8px; }

.mg-skip:focus { top: 8px; }

main:focus { outline: none; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.mg-wrap { width: min(1000px, 100% - 32px); margin-inline: auto; }

.mg-narrow { width: min(820px, 100% - 32px); }

.mg-center { text-align: center; }

.mg-muted { color: var(--muted); }

.mg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 39px;
  padding: 0;
  border-style: solid;
  border-color: transparent;
  border-width: 0 20px;
  border-image: url("../img/btn-play.png") 0 20 fill / 0 20px stretch;
  background: none;
  color: #fff;
  font: italic 800 15px/1 "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  cursor: pointer;
}

.mg-btn:hover { border-image-source: url("../img/btn-play-on.png"); }

.mg-btn--ok { height: 34px; border-image-source: url("../img/btn-ok.png"); font-size: 14px; }

.mg-btn--ok:hover { border-image-source: url("../img/btn-ok-on.png"); }

.mg-btn--green { height: 44px; border-width: 0 13px; border-image: url("../img/btn-green.png") 0 19 fill / 0 13px stretch; font-style: normal; padding-bottom: 3px; }

.mg-btn--green:hover { border-image-source: url("../img/btn-green-on.png"); }

.mg-btn--big { height: 52px; border-width: 0 27px; border-image-width: 0 27px; font-size: 20px; }

.mg-btn--green.mg-btn--big { height: 56px; border-width: 0 16px; border-image-width: 0 16px; }

.mg-btn--wide { display: flex; width: 100%; margin-top: 16px; }

.mg-header { background: rgba(3, 8, 26, 0.92); border-bottom: 3px solid var(--tab-edge); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45); }

.mg-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; width: min(1000px, 100% - 24px); margin-inline: auto; padding: 8px 0; }

.mg-brand { display: flex; }

.mg-brand img { width: 127px; height: 52px; object-fit: contain; }

.mg-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }

.mg-tabs { display: flex; justify-content: center; gap: 3px; width: min(1000px, 100%); margin-inline: auto; padding: 0 8px; overflow-x: auto; scrollbar-width: none; }

.mg-tabs::-webkit-scrollbar { display: none; }

.mg-tabs a { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 6px; min-width: 150px; height: 35px; border-style: solid; border-color: transparent; border-width: 0 22px; border-image: url("../img/tab.png") 0 22 fill / 0 22px stretch; color: var(--tab-ink); font-style: italic; font-weight: 800; font-size: 14px; text-decoration: none; white-space: nowrap; }

.mg-tabs a:hover, .mg-tabs a[aria-current="page"] { border-image-source: url("../img/tab-on.png"); }

.mg-tabs a:focus-visible { outline-offset: -3px; }

.mg-tabs img { width: 22px; height: 22px; object-fit: contain; }

.mg-hud { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }

.mg-hud li { display: flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px 0 5px; background: #0c1c33; border: 2px solid #000; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); font-weight: 800; font-size: 0.95rem; }

.mg-hud img { width: 22px; height: 22px; object-fit: contain; }

.mg-menu { position: relative; }

.mg-menu summary { list-style: none; }

.mg-menu summary::-webkit-details-marker { display: none; }

.mg-menu summary img.mg-arrow { width: 15px; height: 15px; }

.mg-menu summary img.mg-avatar { width: 24px; height: 24px; border: 1px solid #000; border-radius: 4px; }

.mg-who { max-width: 11ch; overflow: hidden; text-overflow: ellipsis; }

.mg-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 230px; padding: 6px; background: var(--card); border: 3px solid #000; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line), 0 12px 30px rgba(0, 0, 0, 0.55); }

.mg-pop a, .mg-pop button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }

.mg-pop img { width: 20px; height: 20px; object-fit: contain; }

.mg-pop a:hover, .mg-pop button:hover, .mg-pop a[aria-current="true"] { background: rgba(143, 227, 244, 0.18); }

.mg-pop form { margin: 4px 0 0; border-top: 1px solid var(--line); padding-top: 4px; }

.mg-lang .mg-pop { min-width: 160px; }

.mg-panelbox { margin-bottom: 18px; padding: 22px; background: #0c1636 url("../img/panel.webp") center top / cover; border: 3px solid #000; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line), 0 10px 26px rgba(0, 0, 0, 0.35); }

.mg-panelbox > :last-child { margin-bottom: 0; }

.mg-section { padding: 18px 0; }

.mg-section > .mg-wrap > h2 { text-align: center; }

.mg-hero { padding: 22px 0 4px; text-align: center; }

.mg-lead { font-size: 1.1rem; color: #e2f1ff; }

.mg-install { position: relative; width: min(760px, 100%); margin: 6px auto 12px; }

.mg-install > img { display: block; width: 100%; filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.55)); }

.mg-install__box { position: absolute; left: 20.4%; top: 83.1%; width: 59.2%; height: 13.9%; display: flex; align-items: center; justify-content: center; }

.mg-free { color: var(--gold); font-weight: 800; }

.mg-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.mg-about { display: grid; grid-template-columns: minmax(0, 1fr) 245px 245px; gap: 16px; align-items: center; }

.mg-about .mg-panelbox { margin: 0; }

.mg-comics { display: contents; }

.mg-comics img { width: 245px; }

.mg-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 18px; padding: 0; list-style: none; }

.mg-card { padding: 12px; background: var(--card); border: 3px solid #000; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }

.mg-card h3 { margin-bottom: 4px; color: #8fe3f4; }

.mg-card p { margin: 0; color: #e2f1ff; }

.mg-card__art { display: flex; align-items: center; justify-content: center; height: 140px; margin-bottom: 10px; overflow: hidden; border: 2px solid #000; border-radius: 10px; background: url("../img/forest.webp") center 70% / cover; }

.mg-card__art img { max-height: 124px; width: auto; filter: drop-shadow(0 6px 4px rgba(0, 0, 0, 0.45)); }

.mg-card__art--place img { width: 100%; height: 100%; max-height: none; object-fit: cover; filter: none; }

.mg-card__art--item { background: #0c1636 url("../img/panel.webp") center / cover; }

.mg-card__art--item img { height: 96px; }

.mg-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }

.mg-gallery li { position: relative; aspect-ratio: 173 / 228; background: url("../img/item-frame.png") center / 100% 100% no-repeat; }

.mg-gallery img { position: absolute; left: 9%; top: 10%; width: 82%; height: 66%; object-fit: contain; }

.mg-gallery span { position: absolute; left: 6%; right: 6%; bottom: 7%; overflow: hidden; color: var(--tab-ink); font-style: italic; font-weight: 800; text-align: center; text-overflow: ellipsis; white-space: nowrap; }

.mg-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: step; }

.mg-steps li { counter-increment: step; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px; background: #eafbfe; color: var(--tab-ink); border: 3px solid #000; border-radius: 22px; }

.mg-steps li::before { content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid #000; border-radius: 50%; background: #2fc4d4; color: #fff; font-weight: 800; text-shadow: 0 1px 2px #000; }

.mg-faq { margin-bottom: 10px; padding: 12px 16px; background: var(--card); border: 3px solid #000; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }

.mg-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; cursor: pointer; font-weight: 800; }

.mg-faq summary::-webkit-details-marker { display: none; }

.mg-faq summary::after { content: ""; flex: none; width: 15px; height: 15px; background: url("../img/arrow-down.png") center / contain no-repeat; }

.mg-faq[open] summary::after { transform: rotate(180deg); }

.mg-faq p { margin: 8px 0 0; color: #e2f1ff; }

.mg-notice { display: flex; flex-direction: column; justify-content: center; min-height: 97px; margin: 18px auto; padding: 12px 20px 8px 310px; background: url("../img/notice.webp") center / 100% 100% no-repeat; color: #123008; text-align: left; }

.mg-notice b { font-size: 1.05rem; font-style: italic; }

.mg-notice p { margin: 2px 0 0; }

.mg-final { text-align: center; }

.mg-final img { width: 150px; }

.mg-doc { padding: 22px 0; }

.mg-pagehead { margin-bottom: 18px; text-align: center; }

.mg-pagehead h1 { display: flex; align-items: center; justify-content: center; gap: 12px; }

.mg-pagehead h1 img { width: 52px; height: 52px; object-fit: contain; }

.mg-news-art { display: block; margin: 0 auto 10px; width: 90px; border: 3px solid #000; border-radius: 12px; }

.mg-toc { margin-bottom: 18px; padding: 14px 18px; background: var(--card); border: 3px solid #000; border-radius: 14px; }

.mg-toc ul { columns: 2; margin: 8px 0 0; padding-left: 18px; }

.mg-topic { display: flow-root; }

.mg-topic__art { float: right; width: 120px; max-height: 130px; margin: 0 0 8px 16px; object-fit: contain; }

.mg-topic__art--place { width: 170px; border: 2px solid #000; border-radius: 10px; }
.mg-topic__art--surprise { width: 130px; max-height: none; border: 2px solid #000; border-radius: 10px; }

.mg-topic__art--item { width: 76px; }

.mg-topic__art--screen { width: 270px; max-height: none; border: 3px solid #000; border-radius: 10px; }

.mg-signs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }

.mg-signs li { padding: 7px; text-align: center; background: var(--card); border: 2px solid #000; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); }

.mg-rules { margin: 0; padding: 0; list-style: none; }

.mg-rules h2 { font-size: 1.1rem; margin-bottom: 4px; }

.mg-rules p { margin: 0; }

.mg-tag { display: inline-block; padding: 1px 9px; background: #2fc4d4; color: #022; border: 1px solid #000; border-radius: 999px; font-size: 0.82rem; font-weight: 800; text-shadow: none; vertical-align: middle; }

.mg-tag--warn { background: var(--gold); }

.mg-date { color: var(--muted); margin-top: -6px; }

.mg-scroll { overflow-x: auto; }

.mg-table { width: 100%; border-collapse: collapse; background: #08142b; }

.mg-table th, .mg-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #1d3c5e; }

.mg-table thead th { background: #2b7e98; color: #fff; font-size: 0.9rem; font-style: italic; }

.mg-table tbody tr:nth-child(odd) { background: #10264a; }

.mg-table:not(.mg-table--plain) tbody tr:first-child td, .mg-table:not(.mg-table--plain) tbody tr:first-child th { color: var(--gold); }

.mg-auth { display: flex; justify-content: center; width: min(960px, 100% - 32px); margin: 28px auto; overflow: hidden; border: 3px solid #000; border-radius: 18px; box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5); background: #001635; }

.mg-auth__art { flex: 1 1 0; min-width: 0; margin: 0; }

.mg-auth__art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.mg-auth__panel { flex: 0 0 360px; margin: 12px; padding: 18px 20px; background: var(--card); border: 2px solid #000; border-radius: 10px; }

.mg-auth--single { width: min(460px, 100% - 32px); }

.mg-auth--single .mg-auth__panel { flex: 1; }

.mg-auth h1 { font-size: 1.6rem; }

.mg-form label { display: block; margin: 12px 0 4px; font-weight: 800; }

.mg-form small { display: block; margin-top: 3px; color: var(--muted); }

.mg-form input:not([type="hidden"]) { width: 100%; max-width: 420px; padding: 9px 12px; border: 3px solid var(--tab-edge); border-radius: 10px; background: #fff; color: #08143a; font: inherit; font-size: 16px; }

.mg-form form { margin-bottom: 12px; }

.mg-form form .mg-btn:not(.mg-btn--wide) { display: flex; width: fit-content; margin-top: 14px; }

.mg-error { padding: 10px 12px; background: #5c1020; border: 2px solid #ff8080; border-radius: 10px; }

.mg-flash { width: min(820px, 100% - 32px); }

.mg-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 16px; }

.mg-facts dt { color: var(--muted); }

.mg-facts dd { margin: 0; }

.mg-team { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; }

.mg-team li { position: relative; width: 132px; aspect-ratio: 173 / 228; background: url("../img/item-frame.png") center / 100% 100% no-repeat; color: var(--tab-ink); text-align: center; }

.mg-team img { position: absolute; left: 10%; top: 10%; width: 80%; height: 54%; object-fit: contain; }

.mg-team b, .mg-team span { position: absolute; left: 6%; right: 6%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mg-team b { bottom: 18%; font-style: italic; }

.mg-team span { bottom: 6%; font-size: 0.85rem; }

.mg-sessions { margin: 0 0 14px; padding: 0; list-style: none; }

.mg-sessions li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }

.mg-sessions div { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }

.mg-sessions div span.mg-muted { flex-basis: 100%; overflow-wrap: anywhere; }

#sessions > form { display: inline-block; margin: 0 10px 8px 0; }

.mg-form select, .mg-form textarea { display: block; width: 100%; max-width: 560px; padding: 9px 12px; border: 3px solid var(--tab-edge); border-radius: 10px; background: #fff; color: #08143a; font: inherit; font-size: 16px; }

.mg-form textarea { max-width: 100%; resize: vertical; min-height: 120px; }

.mg-form input[type="file"] { max-width: 100%; padding: 6px 8px; color: #08143a; }

.mg-form input[type="file"]::file-selector-button { height: 30px; margin-right: 10px; padding: 0; border-style: solid; border-color: transparent; border-width: 0 16px; border-image: url("../img/btn-ok.png") 0 20 fill / 0 16px stretch; background: none; color: #fff; font: italic 800 13px "Trebuchet MS", "Segoe UI", system-ui, sans-serif; cursor: pointer; }

.mg-form input[type="file"]:hover::file-selector-button { border-image-source: url("../img/btn-ok-on.png"); }

.mg-form select { -webkit-appearance: none; appearance: none; padding-right: 36px; background: #fff url("../img/arrow-down.png") right 11px center / 15px 15px no-repeat; }

#mg-new-ticket input:not([type="hidden"]), #mg-new-ticket select, #mg-reply input:not([type="hidden"]) { max-width: 100%; }

.mg-tickets { margin: 0; padding: 0; list-style: none; }

.mg-tickets li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }

.mg-tickets li span.mg-muted { flex-basis: 100%; }

.mg-tag--closed, .mg-tag--resolved { background: #b9d3ee; }

.mg-tag--pending { background: var(--gold); }

.mg-thread { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }

.mg-msg { align-self: flex-start; width: min(100%, 640px); padding: 12px 16px; background: #eafbfe; color: var(--tab-ink); border: 3px solid #000; border-radius: 18px 18px 18px 4px; }

.mg-msg--staff { align-self: flex-end; background: var(--card); color: var(--ink); border-radius: 18px 18px 4px 18px; box-shadow: inset 0 0 0 1px var(--line); }

.mg-msg p { margin: 0; }

.mg-msg__head { margin-bottom: 4px; font-size: 0.9rem; }

.mg-msg:not(.mg-msg--staff) .mg-muted { color: #2d4f6b; }

.mg-msg__body { white-space: pre-wrap; overflow-wrap: anywhere; }

.mg-files { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }

.mg-files img { display: block; max-width: 160px; max-height: 140px; object-fit: contain; background: #000; border: 2px solid #000; border-radius: 8px; }

.mg-teamnotices { width: min(820px, 100% - 32px); margin: 14px auto 0; }

.mg-teamnotices .mg-panelbox { margin-bottom: 10px; padding: 14px 18px; }

.mg-teamnotices h2 { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; }

.mg-teamnotices h2 img { width: 30px; height: 30px; object-fit: contain; }

.mg-teamnotices p { white-space: pre-wrap; overflow-wrap: anywhere; }

.mg-count { display: inline-block; min-width: 18px; padding: 0 5px; background: var(--gold); color: #231600; border: 1px solid #000; border-radius: 999px; font-size: 0.75rem; font-weight: 800; line-height: 16px; text-align: center; text-shadow: none; }

.mg-errorpage { padding: 50px 0; }

.mg-footer { margin-top: 30px; padding: 26px 0 110px; background: rgba(3, 8, 26, 0.94); border-top: 3px solid var(--tab-edge); font-size: 0.92rem; }

.mg-foot { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; }

.mg-foot__about p { color: var(--muted); }

.mg-foot nav { display: flex; flex-direction: column; gap: 6px; }

.mg-foot__langs { grid-column: 1 / -1; display: flex; gap: 16px; margin: 0; }

.mg-foot__langs a[aria-current="true"] { color: var(--gold); }

.mg-discord { position: fixed; right: 16px; bottom: 16px; z-index: 15; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; width: min(290px, 100% - 32px); padding: 14px 16px; background: var(--card); border: 3px solid #000; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line), 0 14px 34px rgba(0, 0, 0, 0.55); font-size: 0.92rem; }

.mg-discord[hidden] { display: none; }

.mg-discord p { margin: 0; padding-right: 26px; }

.mg-discord__ico { width: 40px; height: 34px; object-fit: contain; }

.mg-discord__close { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: url("../img/btn-close.png") 0 0 / 26px 52px no-repeat; cursor: pointer; }

.mg-discord__close:hover { background-position: 0 -26px; }

.mg-page--register .mg-discord, .mg-page--login .mg-discord { position: relative; right: auto; bottom: auto; width: min(460px, 100% - 32px); margin: 0 auto 18px; }

.mg-explore__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }

.mg-explore__list a { display: flex; align-items: center; gap: 12px; height: 100%; padding: 12px; background: var(--card); border: 3px solid #000; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; }

.mg-explore__list a:hover b { text-decoration: underline; }

.mg-explore__art { display: flex; flex: 0 0 64px; justify-content: center; }

.mg-explore__art img { max-width: 64px; max-height: 64px; width: auto; }

.mg-explore__list b { display: block; color: #8fe3f4; font-style: italic; }

.mg-explore__list span span { color: #e2f1ff; font-size: 0.92rem; }

.mg-toc--wide ul { columns: 4; }

.mg-dexgroup h2 { margin-bottom: 2px; }

.mg-dex { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }

.mg-dex li { display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 10px; background: var(--card); border: 2px solid #000; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }

.mg-dex img { flex: 0 0 60px; width: 60px; height: 60px; object-fit: contain; }

.mg-dex div { display: flex; flex-direction: column; min-width: 0; font-size: 0.86rem; line-height: 1.35; overflow-wrap: anywhere; }

.mg-dex b { font-size: 1rem; font-style: italic; }

.mg-dex__tags { color: var(--gold); }

.mg-dex li:target, .mg-signcards li:target { outline: 3px solid var(--gold); }

.mg-chart th, .mg-chart td { position: relative; padding: 6px 4px; text-align: center; white-space: nowrap; }

.mg-chart tbody th { text-align: left; }

.mg-chart abbr { text-decoration: none; }

.mg-chart thead th:first-child { text-align: left; }

.mg-lv--vstrong { color: #8dff7a; font-weight: 800; }

.mg-lv--strong { color: #c9f46a; }

.mg-lv--even { color: var(--muted); }

.mg-lv--weak { color: #ffb86b; }

.mg-lv--vweak { color: #ff7f7f; font-weight: 800; }

.mg-key { display: inline-block; margin-right: 12px; white-space: nowrap; }

.mg-signcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin: 0 0 18px; padding: 0; list-style: none; }

.mg-signcards .mg-panelbox { margin: 0; padding: 16px; }

.mg-signcards p { margin: 0 0 6px; }

.mg-starters { display: flex; justify-content: space-between; gap: 6px; margin: 0; padding: 0; list-style: none; }

.mg-starters li { flex: 1 1 0; min-width: 0; text-align: center; }

.mg-starters a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 0.82rem; overflow-wrap: anywhere; }

.mg-answer { text-align: center; }

.mg-answer img { width: 130px; height: 130px; object-fit: contain; }

@media (max-width: 1359px), (max-height: 599px) {
  .mg-discord { position: relative; right: auto; bottom: auto; width: min(460px, 100% - 20px); margin: 18px auto 0; }
  .mg-footer { padding-bottom: 26px; }
}

@media (max-width: 960px) and (min-width: 861px) {
  .mg-about { grid-template-columns: minmax(0, 1fr) 200px 200px; }
}

@media (max-width: 860px) {
  .mg-about, .mg-foot { grid-template-columns: minmax(0, 1fr); }
  .mg-comics { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
  .mg-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mg-steps { grid-template-columns: minmax(0, 1fr); }
  .mg-auth { flex-direction: column; width: min(460px, 100% - 32px); }
  .mg-auth__art { flex: none; height: 190px; overflow: hidden; }
  .mg-auth__art img { width: 112%; max-width: none; object-position: left 22%; }
  .mg-auth__panel { flex: none; }
  .mg-tabs { flex-wrap: wrap; justify-content: center; row-gap: 2px; overflow: visible; }
  .mg-tabs a { min-width: 0; border-width: 0 16px; border-image-width: 0 16px; }
  .mg-notice { padding-left: 20px; background: #c9f46a; border: 3px solid #000; border-radius: 14px; }
}

@media (max-width: 560px) {
  .mg-brand img { width: 105px; height: 43px; }
  .mg-tabs { gap: 2px; }
  .mg-tabs a { gap: 4px; border-width: 0 12px; border-image-width: 0 12px; font-size: 13px; }
  .mg-tabs img { width: 16px; height: 16px; }
  .mg-top { position: relative; }
  .mg-menu { position: static; }
  .mg-pop { top: calc(100% - 4px); }
  .mg-table { font-size: 0.8rem; }
  .mg-table th, .mg-table td { padding: 7px 2px; }
  .mg-table thead th { font-size: 0.66rem; vertical-align: bottom; }
  .mg-table tbody th { overflow-wrap: anywhere; }
  .mg-page--ranking .mg-wrap.mg-doc { width: calc(100% - 12px); }
  .mg-panelbox:has(.mg-table) { padding: 6px; }
  .mg-cards { grid-template-columns: minmax(0, 1fr); }
  .mg-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mg-comics img { width: min(245px, 100%); }
  .mg-toc ul { columns: 1; }
  .mg-toc--wide ul { columns: 2; }
  .mg-dex, .mg-signcards { grid-template-columns: minmax(0, 1fr); }
  .mg-chart th, .mg-chart td { padding: 5px 3px; font-size: 0.72rem; }
  .mg-topic__art, .mg-topic__art--place, .mg-topic__art--screen, .mg-topic__art--surprise { float: none; display: block; margin: 0 auto 10px; max-width: 100%; }
  .mg-facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .mg-facts dd { margin-bottom: 8px; }
  .mg-install__box { top: 80.5%; height: 19%; }
  .mg-install__box .mg-btn { height: 34px; font-size: 13px; border-width: 0 16px; border-image-width: 0 16px; }
  .mg-discord { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 12px; font-size: 0.85rem; }
  .mg-discord__ico { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
