/* ===== Tokens ===== */
:root {
  --bg: #0c0a10;
  --bg-2: #14111b;
  --panel: #1a1622;
  --panel-2: #221c2c;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f4efe8;
  --muted: #b3aabb;
  --faint: #8a8195;
  --orange: #ff7a1a;
  --orange-2: #ff9a3d;
  --gold: #ffc94a;
  --grad: linear-gradient(135deg, #ff5f1f 0%, #ff8a1f 45%, #ffc94a 100%);
  --ok: #3ddc84;
  --wip: #ffb020;
  --plan: #7c8cff;
  --test: #38bdf8;
  --bad: #ff5a5f;
  --heart: #ef4f58;
  --skill: #2fbf71;
  --body: #3b8fe0;
  --bravery: #f2b82c;
  --wisdom: #a05ae0;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --head: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1560px;
  --gutter: clamp(16px, 3.2vw, 56px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* reduced motion: everything stops; the marquee strips switch to a swipe row themselves (.is-static) and only move again if the viewer presses Play */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *:not(.marquee-track), *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 122, 26, 0.12), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(160, 90, 224, 0.08), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--orange-2); text-decoration: none; }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--head); font-weight: 800; letter-spacing: 0.01em; line-height: 1.1; margin: 0 0 0.4em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.wrap { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
html, body { overflow-x: clip; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 10, 16, 0.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--head); font-weight: 800; font-size: 1.25rem; letter-spacing: 0.02em; white-space: nowrap; }
.brand img { height: 40px; width: 40px; border-radius: 10px; box-shadow: 0 0 0 1px rgba(255,255,255,0.12); }
.brand:hover { color: var(--text); }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a {
  color: var(--muted); font-weight: 600; font-size: 0.95rem; padding: 8px 12px; border-radius: 999px;
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav a[aria-current="page"] { color: #1a0d00; background: var(--grad); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-2); color: var(--text); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.nav-toggle svg { display: block; }
@media (max-width: 1020px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; gap: 2px; padding: 10px 16px 16px;
    background: rgba(12, 10, 16, 0.97); border-bottom: 1px solid var(--line); display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 1.05rem; }
}

/* ===== Buttons, chips, badges ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font: 700 1rem/1 var(--sans); padding: 13px 20px; border-radius: 12px; border: 1px solid transparent;
  cursor: pointer; transition: transform .12s, box-shadow .15s, background .15s; text-decoration: none; min-height: 46px;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #1a0d00; box-shadow: 0 8px 24px rgba(255, 122, 26, 0.3); }
.btn-primary:hover { color: #1a0d00; box-shadow: 0 10px 30px rgba(255, 122, 26, 0.45); }
.btn-ghost { background: rgba(255, 255, 255, 0.05); color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03); color: var(--muted); font: 600 0.88rem/1 var(--sans); cursor: pointer; min-height: 36px;
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.28); }
.chip[aria-pressed="true"] { color: #1a0d00; background: var(--gold); border-color: var(--gold); }
.chip img { width: 18px; height: 18px; }
.badge { display: inline-flex; align-items: center; gap: 5px; font: 700 0.72rem/1 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-ok { color: var(--ok); background: rgba(61, 220, 132, 0.12); }
.b-wip { color: var(--wip); background: rgba(255, 176, 32, 0.12); }
.b-plan { color: #a9b3ff; background: rgba(124, 140, 255, 0.14); }
.b-off { color: #a39cab; background: rgba(255, 255, 255, 0.07); }
.b-bad { color: var(--bad); background: rgba(255, 90, 95, 0.12); }

/* ===== Sections / cards ===== */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head p { margin: 0; max-width: 640px; }
.eyebrow { font: 700 0.78rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--orange-2); margin-bottom: 10px; display: block; }
.card { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); }
.page-hero { padding: 44px 0 20px; }
.page-hero p { color: var(--muted); max-width: 720px; font-size: 1.05rem; }

/* ===== Home hero ===== */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(700px 420px at 72% 40%, rgba(255, 138, 31, 0.28), transparent 65%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; align-items: center; min-height: 560px; }
.hero-copy { padding: 48px 0; z-index: 2; }
.hero-logo { width: min(460px, 90%); height: auto; filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.6)); margin: 0 0 18px -8px; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
.hero p.lead { font-size: 1.12rem; color: var(--muted); max-width: 560px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.status-pill { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-2); font-weight: 600; font-size: 0.92rem; margin-bottom: 18px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6); animation: pulse 2s infinite; }
.status-pill[data-state="maintenance"] .status-dot { background: var(--wip); animation: none; }
.status-pill[data-state="offline"] .status-dot { background: var(--bad); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.55); } 70% { box-shadow: 0 0 0 10px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }
.hero-art { position: relative; align-self: end; height: 100%; min-height: 560px; }
.hero-art img { position: absolute; bottom: 0; right: -20px; height: 108%; width: auto; max-width: none; object-fit: cover;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 28%, #000 80%, transparent 100%), linear-gradient(0deg, transparent 0%, #000 18%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  mask-image: linear-gradient(90deg, transparent 0%, #000 28%, #000 80%, transparent 100%), linear-gradient(0deg, transparent 0%, #000 18%);
}
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; }
  .hero-art { position: absolute; inset: 0; min-height: 0; opacity: 0.28; pointer-events: none; }
  .hero-art img { right: -60px; height: 100%; }
  .hero-copy { padding: 36px 0 44px; }
}

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: -40px; position: relative; z-index: 3; }
.stat { padding: 18px 18px 16px; }
.stat b { display: block; font-family: var(--head); font-size: 2.3rem; line-height: 1; font-weight: 800; }
.stat span { color: var(--muted); font-size: 0.9rem; }
.stat small { display: block; color: var(--faint); font-size: 0.78rem; margin-top: 4px; }

/* Mode tiles */
.modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.mode { overflow: hidden; display: flex; flex-direction: column; color: var(--text); transition: transform .15s, border-color .15s; }
.mode:hover { transform: translateY(-2px); border-color: rgba(255, 201, 74, 0.35); color: var(--text); }
.mode-img { aspect-ratio: 512 / 150; background: #000 center / cover no-repeat; border-bottom: 1px solid var(--line); }
.mode-img img { width: 100%; height: 100%; object-fit: cover; }
.mode-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.mode-body h3 { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mode-body p { margin: 0; color: var(--muted); font-size: 0.93rem; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; counter-reset: step; }
.step { padding: 20px; position: relative; }
.step::before { counter-increment: step; content: counter(step); font-family: var(--head); font-weight: 800; font-size: 1.3rem; color: #1a0d00; background: var(--grad); width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 12px; }
.step h3 { font-size: 1.2rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.note { padding: 14px 16px; border-radius: var(--radius-sm); background: rgba(255, 201, 74, 0.07); border: 1px dashed rgba(255, 201, 74, 0.35); color: #f3e2b8; font-size: 0.93rem; }


/* News list (home + news page) */
.news-list { display: grid; gap: 14px; }
.news-item { padding: 20px; display: grid; grid-template-columns: 110px 1fr; gap: 18px; }
.news-date { font-family: var(--head); font-weight: 800; color: var(--gold); font-size: 1.05rem; line-height: 1.15; }
.news-date span { display: block; color: var(--faint); font-family: var(--sans); font-weight: 600; font-size: 0.78rem; margin-top: 3px; }
.news-item h3 { margin-bottom: 8px; }
.news-item ul { margin: 0; padding-left: 18px; color: var(--muted); }
.news-item li { margin: 4px 0; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tag { font: 700 0.7rem/1 var(--sans); text-transform: uppercase; letter-spacing: 0.06em; padding: 5px 8px; border-radius: 6px; background: rgba(255, 122, 26, 0.12); color: var(--orange-2); }
@media (max-width: 600px) { .news-item { grid-template-columns: 1fr; gap: 6px; } }
/* News post bodies (scripts/build-news.py renders the Markdown) and the one-post pages in /news/ */
.news-item h2 a { color: inherit; text-decoration: none; }
.news-item h2 a:hover { color: var(--orange-2); }
.news-body { color: var(--muted); }
.news-body p { margin: 0 0 10px; }
.news-body ul, .news-body ol { margin: 0 0 10px; padding-left: 18px; }
.news-body li { margin: 4px 0; }
.news-body h2, .news-body h3 { color: var(--text); margin: 16px 0 8px; }
.news-body img, .post-banner { display: block; max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: 10px 0; }
.news-body .hl { color: var(--bad); }
.news-body a { color: var(--orange-2); }
.news-post { padding: 24px; margin-bottom: 18px; max-width: 820px; }

/* ===== Toolbar (roster / missions) ===== */
.toolbar { position: sticky; top: 64px; z-index: 20; background: rgba(12, 10, 16, 0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 12px 0; }
.toolbar .wrap { display: grid; gap: 10px; }
.tool-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.search { position: relative; flex: 1 1 260px; }
.search input {
  width: 100%; height: 44px; padding: 0 14px 0 40px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--panel); color: var(--text); font: 500 1rem var(--sans);
}
.search input::placeholder { color: var(--faint); }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.select { height: 44px; padding: 0 34px 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23b3aabb' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center; color: var(--text); font: 600 0.92rem var(--sans); appearance: none; -webkit-appearance: none; cursor: pointer; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips-label { font-size: 0.78rem; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; margin-right: 4px; }
.result-count { color: var(--muted); font-size: 0.9rem; margin-left: auto; }
.filters-toggle { display: none; }
@media (max-width: 700px) {
  .filters-toggle { display: inline-flex; }
  .filters[data-collapsed="true"] { display: none; }
}

/* ===== Roster grid ===== */
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 16px 0 6px; font-size: 0.88rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 16px 0 60px; }
@media (max-width: 480px) { .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; } }
.unit {
  position: relative; display: flex; flex-direction: column; align-items: stretch; text-align: left; padding: 0; overflow: hidden;
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: 12px; color: var(--text);
  cursor: pointer; font: inherit; content-visibility: auto; contain-intrinsic-size: 150px 230px; transition: transform .12s, border-color .15s, box-shadow .15s;
}
.unit:hover { transform: translateY(-2px); border-color: var(--el, var(--line-2)); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4); }
.unit-art { position: relative; aspect-ratio: 1; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--el, #444) 45%, transparent), transparent 70%), #110e16; }
.unit-art::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 -3px 0 var(--el, transparent); }
.unit-art img.icon { width: 100%; height: 100%; object-fit: cover; }
.unit[data-s="unavailable"] .unit-art img.icon { filter: grayscale(0.85) brightness(0.7); }
.unit-el { position: absolute; top: 6px; left: 6px; width: 26px; height: 26px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
.unit-stars { position: absolute; bottom: 7px; left: 0; right: 0; display: flex; justify-content: center; gap: 0; }
.unit-stars img { width: 17px; height: 17px; margin: 0 -1px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8)); }
.unit-info { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 3px; min-height: 86px; }
.unit-name { font-weight: 700; font-size: 0.9rem; line-height: 1.2; }
.unit-title { font-size: 0.78rem; color: var(--muted); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.unit-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 4px; padding-top: 4px; }
.unit .badge { font-size: 0.62rem; padding: 4px 7px; }
.unit-pct { font: 700 0.75rem var(--sans); color: var(--muted); }
.dots { display: flex; gap: 3px; margin-top: 6px; }
.d { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); }
.d-original { background: var(--ok); }
.d-standin { background: var(--wip); }
.d-missing { background: var(--bad); opacity: 0.75; }
.d-na { background: rgba(255, 255, 255, 0.08); }
.legend-dots { display: inline-flex; gap: 3px; }
.legend-dots .d { width: 14px; flex: none; }
@media (max-width: 480px) {
  .unit-info { padding: 6px 7px 8px; min-height: 76px; }
  .unit-name { font-size: 0.8rem; }
  .unit-title { font-size: 0.7rem; }
  .unit-el { width: 20px; height: 20px; }
  .unit-stars img { width: 13px; height: 13px; }
}
.noicon { width: 100%; height: 100%; display: grid; place-items: center; color: var(--faint); font: 800 1.8rem var(--head); }
.empty { text-align: center; padding: 60px 16px; color: var(--muted); }
.more { display: flex; justify-content: center; padding-bottom: 60px; }

/* ===== Modal (character detail) ===== */
dialog.modal { padding: 0; border: 1px solid var(--line-2); border-radius: 20px; background: var(--bg-2); color: var(--text);
  width: min(1280px, calc(100vw - 32px)); height: min(920px, calc(100dvh - 32px)); max-width: none; max-height: none; box-shadow: var(--shadow); overflow: hidden; }
dialog.modal::backdrop { background: rgba(5, 3, 8, 0.78); backdrop-filter: blur(4px); }
body.modal-open { overflow: hidden; }
.modal-inner { display: grid; grid-template-columns: minmax(280px, 34%) 1fr; height: 100%; min-height: 0; }
.modal-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 28px 22px; min-height: 0;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--el, #444) 45%, transparent), transparent 72%), #0e0b12; border-right: 1px solid var(--line); }
.modal-card img.card-art { width: 100%; max-width: 420px; height: auto; max-height: calc(100% - 70px); object-fit: contain; filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.6)); }
.modal-body { padding: 26px 30px 30px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; -webkit-overflow-scrolling: touch; }
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 5; background: rgba(0, 0, 0, 0.6); border: 1px solid var(--line-2); color: var(--text); width: 44px; height: 44px; border-radius: 12px; cursor: pointer; font-size: 1.4rem; line-height: 1; }
.modal-close:hover { background: rgba(255, 255, 255, 0.12); }
.modal h2 { margin-bottom: 2px; font-size: clamp(1.7rem, 2.6vw, 2.3rem); padding-right: 50px; }
.modal .subtitle { color: var(--gold); font-weight: 600; margin-bottom: 10px; }
.modal-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; align-items: start; }
@media (max-width: 1150px) { .modal-cols { grid-template-columns: 1fr; } }
.meta-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.meta-row .stars img { width: 20px; height: 20px; display: inline-block; margin-right: -2px; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 0.82rem; font-weight: 600; }
.pill img { width: 18px; height: 18px; }
.statbars { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-bottom: 12px; }
.statbox { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.statbox small { color: var(--faint); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.statbox b { display: block; font-family: var(--head); font-size: 1.45rem; line-height: 1.1; }
.statbox span { font-size: 0.75rem; color: var(--muted); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; max-width: 100%; }
table.stat-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 380px; }
table.stat-table th, table.stat-table td { padding: 9px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
table.stat-table th:first-child, table.stat-table td:first-child { text-align: left; white-space: normal; }
table.stat-table thead th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); background: var(--panel); }
table.stat-table tbody tr:last-child td { border-bottom: 0; }
table.stat-table tr.ult td { color: var(--gold); font-weight: 700; background: rgba(255, 201, 74, 0.06); }
table.stat-table td small { display: block; color: var(--faint); font-weight: 400; font-size: 0.74rem; }
.stat-notes { color: var(--faint); font-size: 0.78rem; margin: 4px 0 0; }
.skill { border-left: 3px solid var(--el, var(--orange)); background: var(--panel); border-radius: 0 10px 10px 0; padding: 10px 12px; margin-bottom: 10px; }
.skill small { display: flex; justify-content: space-between; gap: 8px; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.skill b { display: block; margin: 2px 0 3px; }
.skill p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.abil { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.abil li { background: var(--panel); border-radius: 8px; padding: 8px 10px; font-size: 0.88rem; }
.abil li b { display: block; }
.abil li span { color: var(--muted); }
.abil li em { display: block; font-style: normal; color: var(--faint); font-size: 0.75rem; margin-top: 2px; }
.modal h4 { font: 700 0.78rem/1 var(--sans); text-transform: uppercase; letter-spacing: 0.12em; color: var(--orange-2); margin: 20px 0 10px; }
.status-box { border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; font-size: 0.9rem; }
.status-box.ok { background: rgba(61, 220, 132, 0.08); border: 1px solid rgba(61, 220, 132, 0.25); }
.status-box.wip { background: rgba(255, 176, 32, 0.08); border: 1px solid rgba(255, 176, 32, 0.25); }
.status-box.off { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-2); }
.evo-links { display: flex; gap: 8px; flex-wrap: wrap; }
.evo-links button { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line-2); color: var(--text); border-radius: 10px; padding: 5px 10px 5px 5px; cursor: pointer; font: 600 0.85rem var(--sans); min-height: 44px; }
.evo-links button:hover { border-color: var(--gold); }
.evo-links img { width: 34px; height: 34px; border-radius: 7px; }
.modal-nav { display: flex; justify-content: space-between; gap: 8px; width: 100%; max-width: 420px; }
.modal-nav .btn { flex: 1; }
@media (max-width: 760px) {
  dialog.modal { width: 100vw; height: 100dvh; border-radius: 0; border: 0; margin: 0; }
  .modal-inner { display: block; height: 100%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .modal-card { border-right: 0; padding: 64px 16px 10px; }
  .modal-card img.card-art { max-height: 44vh; width: auto; max-width: 100%; }
  .modal-body { overflow: visible; padding: 12px 16px 36px; }
}

/* ===== Roadmap ===== */
.rm-summary { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; margin-bottom: 26px; }
.rm-overall { padding: 22px; display: flex; gap: 22px; align-items: center; }
.ring { --p: 0; width: 120px; height: 120px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--orange) calc(var(--p) * 1%), rgba(255, 255, 255, 0.07) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 11px; background: var(--panel); border-radius: 50%; }
.ring b { position: relative; font-family: var(--head); font-size: 2rem; }
.rm-counts { padding: 18px 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: center; }
.rm-counts div { text-align: center; }
.rm-counts b { display: block; font-family: var(--head); font-size: 2rem; line-height: 1; }
.rm-counts .c-ok { color: var(--ok); } .rm-counts .c-wip { color: var(--wip); } .rm-counts .c-plan { color: #a9b3ff; }
.rm-counts span { color: var(--muted); font-size: 0.85rem; }
@media (max-width: 760px) { .rm-summary { grid-template-columns: 1fr; } .rm-overall { padding: 18px; } .ring { width: 96px; height: 96px; } }
.phase { margin-bottom: 18px; }
.phase > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); background: linear-gradient(90deg, rgba(255, 122, 26, 0.12), rgba(255, 255, 255, 0.02)); border: 1px solid var(--line); }
.phase > summary::-webkit-details-marker { display: none; }
.phase-num { font-family: var(--head); font-weight: 800; font-size: 1.1rem; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #1a0d00; }
.phase-title h2 { font-size: 1.6rem; margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.phase-title p { margin: 2px 0 0; color: var(--muted); font-size: 0.92rem; }
.phase-pct { text-align: right; font-family: var(--head); font-weight: 800; font-size: 1.6rem; display: flex; align-items: center; gap: 10px; }
.phase-pct svg { transition: transform .2s; color: var(--muted); }
.phase[open] .phase-pct svg { transform: rotate(180deg); }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; padding: 14px 0 6px; }
@media (max-width: 420px) { .features { grid-template-columns: 1fr; } .phase-pct { font-size: 1.25rem; } .phase-title h2 { font-size: 1.3rem; } }
.feature { padding: 18px; }
.feature-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.feature-head h3 { margin: 0; font-size: 1.3rem; }
.feature-head b { font-family: var(--head); font-size: 1.5rem; }
.feature > p { color: var(--muted); font-size: 0.9rem; margin: 2px 0 10px; }
.bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; display: flex; margin-bottom: 14px; }
.bar i { display: block; height: 100%; }
.bar .ok { background: linear-gradient(90deg, #22b863, var(--ok)); }
.bar .wip { background: repeating-linear-gradient(45deg, var(--wip) 0 6px, #e69800 6px 12px); }
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.items li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 0.92rem; line-height: 1.4; }
.items li[hidden] { display: none; }
.ico { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; margin-top: 1px; }
.ico svg { width: 13px; height: 13px; }
.i-ok { background: rgba(61, 220, 132, 0.15); color: var(--ok); }
.i-wip { background: rgba(255, 176, 32, 0.15); color: var(--wip); }
.i-plan { background: rgba(124, 140, 255, 0.15); color: #a9b3ff; }
.items li.s-done { color: var(--text); }
.item-d { display: block; color: var(--faint); font-size: 0.82rem; margin-top: 2px; line-height: 1.4; }
.items li.s-planned { color: var(--muted); }
.issues { display: grid; gap: 10px; }
.issue { padding: 14px 16px; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.issue p { margin: 0; }
.issue small { color: var(--muted); display: block; margin-top: 3px; }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.col { padding: 16px; }
.col h3 { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; }
.col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.col li { font-size: 0.9rem; }
.col li small { display: block; color: var(--faint); font-size: 0.75rem; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }
.view-switch { display: inline-flex; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; padding: 4px; gap: 4px; }
.view-switch button { background: none; border: 0; color: var(--muted); font: 700 0.9rem var(--sans); padding: 8px 14px; border-radius: 9px; cursor: pointer; min-height: 38px; }
.view-switch button[aria-pressed="true"] { background: var(--grad); color: #1a0d00; }

/* ===== Missions ===== */
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-2); color: var(--muted); font: 700 0.92rem var(--sans); padding: 9px 14px; border-radius: 999px; cursor: pointer; min-height: 40px; }
.tab[aria-selected="true"] { background: var(--grad); color: #1a0d00; border-color: transparent; }
.tab .n { opacity: 0.7; font-weight: 600; margin-left: 4px; }
.m-section { padding: 26px 0 10px; scroll-margin-top: 150px; }
.m-section > header { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.m-section > header p { margin: 0; color: var(--muted); max-width: 720px; }
.m-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
@media (max-width: 400px) { .m-grid { grid-template-columns: 1fr; } }
.stage { overflow: hidden; display: flex; flex-direction: column; }
.stage-img { aspect-ratio: 512 / 130; background: #0e0b12; position: relative; overflow: hidden; }
.stage-img.story { aspect-ratio: 16 / 9; }
.stage-img img { width: 100%; height: 100%; object-fit: cover; }
.stage-img .badge { position: absolute; top: 8px; right: 8px; backdrop-filter: blur(6px); background: rgba(10, 8, 14, 0.75); }
.stage-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.stage-body h3 { font-size: 1.15rem; margin: 0; }
.stage-meta { display: flex; gap: 6px; flex-wrap: wrap; font-size: 0.8rem; color: var(--muted); }
.stage-meta span { background: rgba(255, 255, 255, 0.05); padding: 3px 8px; border-radius: 6px; }
.stage details { margin-top: 4px; }
.stage summary { cursor: pointer; color: var(--orange-2); font-weight: 600; font-size: 0.88rem; }
.stage ol { margin: 8px 0 0; padding-left: 22px; color: var(--muted); font-size: 0.87rem; }
.stage ol li { margin: 2px 0; }
.stage.closed { opacity: 0.62; }
.stage.closed .stage-img { display: grid; place-items: center; color: var(--faint); font: 800 1.1rem var(--head); letter-spacing: 0.05em; }
.stage.current { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 10px 30px rgba(255, 201, 74, 0.15); }
.nr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.nr { padding: 12px; text-align: center; }
.nr b { display: block; font-family: var(--head); font-size: 1.4rem; }
.nr span { color: var(--muted); font-size: 0.8rem; }
.nr.current { border-color: var(--gold); background: linear-gradient(180deg, rgba(255, 201, 74, 0.14), var(--panel)); }
.info-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.info { padding: 18px; }
.info h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.info ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 0.92rem; }
.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }

/* ===== Support ===== */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.tier { padding: 22px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.tier.featured { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 16px 40px rgba(255, 201, 74, 0.12); }
.tier h3 { font-size: 1.6rem; margin: 0; }
.tier .price { font-family: var(--head); font-size: 2.4rem; font-weight: 800; }
.tier .price small { font-size: 1rem; color: var(--muted); font-family: var(--sans); font-weight: 500; }
.tier ul { margin: 0; padding-left: 18px; color: var(--muted); flex: 1; }
.todo { display: inline-block; font: 800 0.7rem/1 var(--sans); background: #ff5a5f; color: #fff; padding: 4px 7px; border-radius: 6px; letter-spacing: 0.06em; vertical-align: middle; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--line); background: #09070c; padding: 34px 0 40px; margin-top: 40px; color: var(--faint); font-size: 0.88rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1fr auto; gap: 24px; }
.site-footer nav { display: flex; gap: 14px; flex-wrap: wrap; }
.site-footer nav a { color: var(--muted); }
.disclaimer { max-width: 720px; }
.disclaimer strong { color: var(--muted); }
@media (max-width: 700px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* Fade in */
.fade { animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* star rows */
.stars { display: inline-flex; align-items: center; }
.stars img { display: inline-block; }

/* keep banner boxes at their aspect ratio whatever the picture's own shape */
.mode-img, .stage-img { position: relative; overflow: hidden; }
.mode-img img, .stage-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.legend > span:first-child:not(:has(.badge)) { display: block; width: 100%; }
@media (max-width: 480px) {
  .unit-pct { display: none; }
  .unit-foot { padding-top: 2px; }
}

/* mode tiles: banner art at 588:150, Village-menu island art centred, co-op card trio */
.mode-img { aspect-ratio: 588 / 150; }
.mode-img.has-island { background: radial-gradient(circle at 50% 60%, rgba(255, 138, 31, 0.22), transparent 70%), #120f18; }
.mode-img img.island { object-fit: contain; padding: 6px; }
.mode-cards { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); background: #120f18; }
.mode-cards img { position: static; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.m-banner { width: 100%; max-width: 588px; aspect-ratio: 588 / 150; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 14px; }
.m-banner.trial { aspect-ratio: 690 / 352; max-width: 360px; }
.art-note { position: absolute; left: 8px; bottom: 8px; font: 700 0.66rem/1 var(--sans); letter-spacing: 0.05em; text-transform: uppercase; padding: 4px 7px; border-radius: 6px; background: rgba(10, 8, 14, 0.8); color: var(--muted); }

.btn-discord { background: #5865f2; color: #fff; box-shadow: 0 8px 24px rgba(88, 101, 242, 0.3); }
.btn-discord:hover { color: #fff; background: #4752c4; }
.btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }
.widget { width: 100%; height: 500px; border: 0; border-radius: 14px; }
.mode-img { aspect-ratio: 588 / 200; background: radial-gradient(circle at 50% 55%, rgba(255, 138, 31, 0.18), transparent 70%), #120f18; }
.mode-img img { object-fit: contain; }
.mode-img img.island { padding: 8px; }

/* touch devices / phones: 44px targets */
@media (pointer: coarse), (max-width: 760px) {
  .chip, .tab, .select, .view-switch button, .btn { min-height: 44px; }
  .nav a { min-height: 44px; display: flex; align-items: center; }
  .linkish { min-height: 32px; }
  .stage summary { padding: 10px 0; }
}
@media (max-width: 430px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat b { font-size: 1.9rem; }
  .hero-cta .btn { flex: 1 1 100%; }
  .rm-counts b { font-size: 1.6rem; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .hero .wrap { grid-template-columns: 1fr 0.8fr; }
}
@media (min-width: 1800px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
  .m-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
}
.status-box p { margin: 0; color: var(--muted); }
.status-box .bar { margin: 8px 0; height: 6px; }
.sb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ck { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; background: var(--panel); border-radius: 9px; padding: 8px 10px; font-size: 0.9rem; }
.ck b { display: block; font-weight: 600; }
.ck small { display: block; color: var(--faint); font-size: 0.76rem; line-height: 1.3; }
.ck-ico { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.07); }
.ck-original .ck-ico { background: rgba(61, 220, 132, 0.15); }
.ck-standin .ck-ico { background: rgba(255, 176, 32, 0.15); }
.ck-missing .ck-ico { background: rgba(255, 90, 95, 0.14); }
.linkish { background: none; border: 0; padding: 0; color: var(--orange-2); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linkish:hover { color: var(--gold); }
.ck-na { opacity: 0.6; }
.ck-ico svg { width: 12px; height: 12px; }
.ck-original .ck-ico { color: var(--ok); } .ck-standin .ck-ico { color: var(--wip); } .ck-missing .ck-ico { color: var(--bad); } .ck-shared .ck-ico { color: var(--muted); }

/* roadmap: "testing" status + category groups */
.b-test { color: #7dd3fc; background: rgba(56, 189, 248, 0.14); }
.i-test { background: rgba(56, 189, 248, 0.15); color: var(--test); }
.bar .test { background: linear-gradient(90deg, #0ea5e9, var(--test)); }
.rm-counts { grid-template-columns: repeat(4, 1fr); }
.rm-counts .c-test { color: var(--test); }
.st-label { font: 700 0.62rem/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 6px; border-radius: 5px; vertical-align: 2px; margin-left: 4px; }
.st-done { color: var(--ok); background: rgba(61, 220, 132, 0.1); }
.st-testing { color: #7dd3fc; background: rgba(56, 189, 248, 0.12); }
.st-progress { color: var(--wip); background: rgba(255, 176, 32, 0.12); }
.st-planned { color: #a9b3ff; background: rgba(124, 140, 255, 0.14); }
.mini-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.mini { font: 700 0.7rem/1 var(--sans); padding: 4px 7px; border-radius: 6px; }
.phase-title .bar { margin: 6px 0 0; height: 6px; max-width: 520px; }
.phase > summary { align-items: start; }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cols-4 { grid-template-columns: 1fr; } .rm-counts { grid-template-columns: repeat(2, 1fr); row-gap: 14px; } }
.features { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }

.b-issue { color: #ff9ca0; background: rgba(255, 90, 95, 0.14); }
.i-issue { background: rgba(255, 90, 95, 0.14); color: var(--bad); }
.st-issue { color: #ff9ca0; background: rgba(255, 90, 95, 0.12); }
.rm-counts { grid-template-columns: repeat(5, 1fr); }
.rm-counts .c-done { color: var(--ok); } .rm-counts .c-testing { color: var(--test); } .rm-counts .c-progress { color: var(--wip); }
.rm-counts .c-issue { color: var(--bad); } .rm-counts .c-planned { color: #a9b3ff; }
.cols-4 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1300px) { .cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .cols-4 { grid-template-columns: 1fr; } .rm-counts { grid-template-columns: repeat(3, 1fr); } }
.rm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rm-legend .ico { display: inline-grid; }
.rm-summary { grid-template-columns: 1fr 1.4fr; }
@media (max-width: 900px) { .rm-summary { grid-template-columns: 1fr; } }

.features.single { grid-template-columns: 1fr; }
.feature.bare .items { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 12px 28px; }
.rm-legend > span:first-child { display: inline-flex; width: auto; }
table.stat-table { min-width: 560px; }
table.stat-table td:first-child { min-width: 200px; }
@media (max-width: 760px) { table.stat-table td small { max-width: 240px; } }

/* ===== Download + Discord pages ===== */
svg.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i-fill { flex: none; fill: currentColor; }
.btn-lg { min-height: 54px; padding: 14px 22px; font-size: 1.02rem; border-radius: 14px; }
.btn-xl { min-height: 66px; padding: 12px 28px 12px 22px; font-size: 1.1rem; border-radius: 16px; gap: 12px; }
.btn-xl svg.i { width: 26px; height: 26px; stroke-width: 2.4; }
.btn-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; line-height: 1; }
.btn-stack b { font-size: 1.18rem; font-weight: 800; letter-spacing: 0.01em; }
.btn-stack small { font-size: 0.8rem; font-weight: 600; opacity: 0.78; }
.btn.is-hot { animation: hot 2.2s ease-out infinite; }
@keyframes hot { 0% { box-shadow: 0 8px 24px rgba(255, 122, 26, 0.35), 0 0 0 0 rgba(255, 170, 60, 0.6); } 70% { box-shadow: 0 8px 24px rgba(255, 122, 26, 0.35), 0 0 0 16px rgba(255, 170, 60, 0); } 100% { box-shadow: 0 8px 24px rgba(255, 122, 26, 0.35), 0 0 0 0 rgba(255, 170, 60, 0); } }
.btn.is-muted { filter: saturate(0.35) brightness(0.8); box-shadow: none; }
.btn.btn-discord.is-soon { opacity: 1; background: linear-gradient(135deg, rgba(88, 101, 242, 0.34), rgba(88, 101, 242, 0.16)); color: #d4d7ff; border: 1px dashed rgba(150, 160, 255, 0.6); box-shadow: none; cursor: default; }

.xhero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.xhero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(640px 460px at 76% 48%, rgba(255, 138, 31, 0.3), transparent 68%), radial-gradient(520px 380px at 10% 110%, rgba(160, 90, 224, 0.14), transparent 70%); }
.xhero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 75%); mask-image: linear-gradient(90deg, transparent 30%, #000 75%); }
.dc-hero .xhero-grid { min-height: 560px; }
.xhero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 32px; align-items: center; min-height: 600px; padding-top: 48px; padding-bottom: 72px; }
.xhero h1 { font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1.02; margin-bottom: 16px; }
.xhero .lead { font-size: 1.13rem; color: var(--muted); max-width: 580px; margin-bottom: 22px; }
.dl-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-sub { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: 0.92rem; margin: 16px 0 0; max-width: 520px; }
.hero-sub svg.i { width: 18px; height: 18px; margin-top: 2px; color: #a3aaff; }

.platform-note { display: flex; gap: 12px; align-items: flex-start; max-width: 580px; padding: 12px 16px; margin: 0 0 18px; border-radius: 12px;
  background: rgba(255, 90, 95, 0.1); border: 1px solid rgba(255, 90, 95, 0.35); color: #ffd9da; font-size: 0.93rem; line-height: 1.45; }
.platform-note svg.i { color: var(--bad); margin-top: 1px; }
.platform-note.ok { background: rgba(61, 220, 132, 0.09); border-color: rgba(61, 220, 132, 0.35); color: #cdf5de; }
.platform-note.ok svg.i { color: var(--ok); }
.platform-note.soft { background: rgba(255, 255, 255, 0.04); border-color: var(--line-2); color: var(--muted); }
.platform-note.soft svg.i { color: var(--orange-2); }
.platform-note b { color: var(--text); }

.dl-facts { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 12px 34px; margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--line); max-width: 600px; }
.dl-facts dt { font: 700 0.7rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 7px; }
.dl-facts dd { margin: 0; font: 800 1.4rem/1.05 var(--head); letter-spacing: 0.01em; white-space: nowrap; }

/* hero art: fanned character cards */
.xhero-art { position: relative; height: 580px; }
.art-glow { position: absolute; left: 50%; top: 46%; width: 78%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 170, 60, 0.35), rgba(255, 90, 30, 0.12) 45%, transparent 70%); filter: blur(10px); }
.cardart { position: absolute; height: auto; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.6)); }
.ca-c { width: min(66%, 420px); left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 3; animation: float 6s ease-in-out infinite; }
.ca-l { width: min(46%, 300px); left: 0; top: 8%; transform: rotate(-9deg); z-index: 2; opacity: 0.92; }
.ca-r { width: min(46%, 300px); right: 0; top: 12%; transform: rotate(8deg); z-index: 2; opacity: 0.92; }
.art-logo { position: absolute; z-index: 4; height: auto; width: min(52%, 330px); left: 50%; bottom: 6px; transform: translateX(-50%); filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.75)); }
@keyframes float { 0%, 100% { transform: translate(-50%, -50%); } 50% { transform: translate(-50%, calc(-50% - 10px)); } }

/* requirements strip, overlapping the hero */
.req-strip { position: relative; z-index: 3; margin-top: -40px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); box-shadow: var(--shadow); }
.req { display: flex; gap: 14px; align-items: flex-start; padding: 22px; }
.req + .req { border-left: 1px solid var(--line); }
.req h3 { font-size: 1.2rem; margin: 2px 0 4px; }
.req p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.req-ico { width: 46px; height: 46px; flex: none; border-radius: 13px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); border: 1px solid color-mix(in srgb, var(--c) 32%, transparent); }
.ic-orange { --c: var(--orange-2); } .ic-blue { --c: #5aa7ee; } .ic-green { --c: var(--ok); } .ic-purple { --c: #b77ff0; } .ic-red { --c: #ff6b72; } .ic-gold { --c: var(--gold); }

/* install steps */
.isteps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.istep { padding: 20px 20px 22px; position: relative; transition: border-color .15s, transform .15s; }
.istep:hover { border-color: rgba(255, 201, 74, 0.3); transform: translateY(-2px); }
.istep-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.istep-n { font: 800 3rem/0.9 var(--head); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.istep-ico { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--orange-2); background: rgba(255, 122, 26, 0.12); border: 1px solid rgba(255, 122, 26, 0.3); }
.istep h3 { font-size: 1.25rem; margin: 0 0 6px; }
.istep p, .istep ul { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.istep ul { padding-left: 18px; margin-top: 8px; }
.istep li + li { margin-top: 4px; }
.istep-hl { border-color: rgba(255, 201, 74, 0.45); background: linear-gradient(180deg, rgba(255, 201, 74, 0.1), var(--bg-2) 70%); }
.istep-hl .istep-ico { color: #1a0d00; background: var(--grad); border-color: transparent; }
.callout { display: flex; gap: 16px; align-items: center; margin-top: 16px; padding: 18px 22px; border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(255, 201, 74, 0.13), rgba(255, 122, 26, 0.04)); border: 1px solid rgba(255, 201, 74, 0.4); }
.callout-ico { width: 52px; height: 52px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #1a0d00; }
.callout-ico svg.i { width: 26px; height: 26px; }
.callout b { font: 800 1.35rem/1.1 var(--head); display: block; margin-bottom: 4px; }
.callout p { margin: 0; color: #eadcc0; font-size: 0.95rem; }

/* updates / new phone */
.keep { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.keep-card { padding: 22px; }
.keep-card .req-ico { margin-bottom: 14px; }
.keep-card h3 { font-size: 1.3rem; margin-bottom: 6px; }
.keep-card p { color: var(--muted); font-size: 0.93rem; margin: 0; }
.mini-steps { list-style: none; counter-reset: ms; margin: 12px 0; padding: 0; display: grid; gap: 10px; }
.mini-steps li { counter-increment: ms; position: relative; padding-left: 38px; min-height: 26px; font-size: 0.93rem; color: var(--text); line-height: 1.5; }
.mini-steps li::before { content: counter(ms); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--grad); color: #1a0d00; font: 800 0.95rem var(--head); }
.keep-card p.fine { color: var(--faint); font-size: 0.84rem; }
.safe-note { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0 0; padding: 14px 18px; border-radius: var(--radius-sm); border: 1px dashed var(--line-2); color: var(--muted); font-size: 0.9rem; }
.safe-note svg.i { color: var(--ok); margin-top: 1px; }

/* troubleshooting */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.acc details { margin-bottom: 10px; transition: border-color .15s; }
.acc details[open] { border-color: rgba(255, 122, 26, 0.4); }
.acc summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 58px; padding: 14px 18px; cursor: pointer; font-weight: 600; font-size: 1rem; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary:hover { color: var(--gold); }
.chev { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.acc details[open] .chev { transform: rotate(180deg); stroke: var(--orange-2); }
.acc-body { padding: 0 18px 16px; color: var(--muted); font-size: 0.94rem; }
.acc-body p { margin: 0 0 8px; } .acc-body p:last-child { margin: 0; }
.acc-body ul { margin: 0 0 8px; padding-left: 18px; }
.help-card { position: sticky; top: 84px; overflow: hidden; margin-top: 76px; }
.help-art { width: 100%; height: 210px; object-fit: cover; object-position: 50% 30%; background: radial-gradient(circle at 50% 60%, rgba(255, 138, 31, 0.3), transparent 70%), #120f18;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.help-body { padding: 0 22px 22px; display: flex; flex-direction: column; gap: 10px; margin-top: -18px; position: relative; }
.help-body .eyebrow { margin: 0; }
.help-body h3 { font-size: 1.6rem; margin: 0; }
.help-body p { color: var(--muted); font-size: 0.93rem; margin: 0 0 4px; }
.help-body .btn { width: 100%; }

/* Discord page */
.dc-hero::before { background: radial-gradient(680px 480px at 74% 46%, rgba(88, 101, 242, 0.38), transparent 68%), radial-gradient(520px 380px at 8% 110%, rgba(255, 122, 26, 0.14), transparent 70%); }
.dc-text { background: linear-gradient(135deg, #7b86ff, #b9bfff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dc-hero .eyebrow { color: #a3aaff; }
.dc-art { display: grid; place-items: center; }
.dc-c1 { width: min(52%, 320px); left: -2%; top: 4%; transform: rotate(-10deg); opacity: 0.9; }
.dc-c2 { width: min(52%, 320px); right: -2%; bottom: 2%; transform: rotate(9deg); opacity: 0.9; }
.invite { position: relative; z-index: 3; width: min(390px, 86%); border-radius: 18px; overflow: hidden; background: #2b2d31; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06); animation: float2 6s ease-in-out infinite; }
@keyframes float2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.invite-banner { height: 150px; overflow: hidden; background: #1e1f22; }
.invite-banner img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; }
.invite-body { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 22px 22px; gap: 4px; }
.invite-icon { width: 80px; height: 80px; border-radius: 22px; border: 5px solid #2b2d31; margin-top: -40px; background: #2b2d31; }
.invite-body small { color: #b5bac1; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 6px; }
.invite-body b { font: 800 1.6rem/1.1 var(--head); color: #f2f3f5; }
.invite-tag { color: #b5bac1; font-size: 0.86rem; }
.invite-btn { display: block; width: 100%; margin-top: 14px; padding: 12px; border-radius: 8px; background: #4e5058; color: #dbdee1; font-weight: 700; font-size: 0.95rem; }
.invite-btn.on { background: #248046; color: #fff; }
.uses2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.use { display: flex; gap: 16px; align-items: flex-start; padding: 20px; transition: border-color .15s, transform .15s; }
.use:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c, #fff) 40%, transparent); }
.use:has(.ic-orange) { --c: var(--orange-2); } .use:has(.ic-gold) { --c: var(--gold); } .use:has(.ic-blue) { --c: #5aa7ee; }
.use:has(.ic-red) { --c: #ff6b72; } .use:has(.ic-green) { --c: var(--ok); } .use:has(.ic-purple) { --c: #b77ff0; }
.use h3 { font-size: 1.25rem; margin: 2px 0 4px; }
.use p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.dc-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.rules-card, .bug-card { padding: 26px 28px; }
.rules-card h2, .bug-card h2 { margin-bottom: 10px; }
.rules { list-style: none; counter-reset: r; margin: 0; padding: 0; }
.rules li { counter-increment: r; position: relative; padding: 16px 0 16px 64px; border-top: 1px solid var(--line); min-height: 72px; }
.rules li:first-child { border-top: 0; }
.rules li::before { content: counter(r, decimal-leading-zero); position: absolute; left: 0; top: 12px; font: 800 2.3rem/1 var(--head); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rules h3 { font-size: 1.22rem; margin: 0 0 3px; }
.rules p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.checks { list-style: none; margin: 8px 0 16px; padding: 0; }
.checks li { position: relative; padding: 11px 0 11px 38px; border-top: 1px solid var(--line); font-size: 0.96rem; }
.checks li:first-child { border-top: 0; }
.checks li::before { content: ""; position: absolute; left: 0; top: 10px; width: 24px; height: 24px; border-radius: 7px; background: rgba(61, 220, 132, 0.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233ddc84' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 14px no-repeat; border: 1px solid rgba(61, 220, 132, 0.3); }
.checks span { color: var(--muted); }
.warn-note { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: 12px; background: rgba(255, 90, 95, 0.1); border: 1px solid rgba(255, 90, 95, 0.32); color: #ffd4d6; font-size: 0.92rem; font-weight: 600; }
.warn-note svg.i { color: var(--bad); width: 20px; height: 20px; }
.cta-band { margin-top: 40px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 26px; align-items: center; padding: 22px 30px; overflow: hidden;
  background: linear-gradient(90deg, rgba(255, 122, 26, 0.16), rgba(88, 101, 242, 0.12)), var(--panel); }
.cta-logo { width: 190px; height: auto; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.6)); }
.cta-band h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 0 0 4px; }
.cta-band p { margin: 0; }

@media (max-width: 1180px) {
  .req-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .req:nth-child(3) { border-left: 0; }
  .req:nth-child(n+3) { border-top: 1px solid var(--line); }
  .keep { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .keep-wide { grid-column: 1 / -1; grid-row: 1; }
  .uses2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .faq-wrap { grid-template-columns: 1fr; }
  .help-card { position: static; margin-top: 4px; display: grid; grid-template-columns: 220px 1fr; align-items: center; }
  .help-art { height: 100%; min-height: 220px; -webkit-mask-image: linear-gradient(90deg, #000 60%, transparent); mask-image: linear-gradient(90deg, #000 60%, transparent); }
  .help-body { margin-top: 0; padding: 22px; }
  .dc-cols { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .xhero-grid { grid-template-columns: 1fr; min-height: 0; gap: 8px; padding-top: 18px; padding-bottom: 64px; }
  .xhero-art { order: -1; height: clamp(290px, 84vw, 440px); }
  .ca-c { width: min(62%, 320px); top: 40%; }
  .ca-l, .ca-r { width: min(44%, 240px); }
  .art-logo { width: min(50%, 260px); bottom: 0; }
  .dc-art { height: clamp(350px, 94vw, 460px); }
  .invite { width: min(320px, 78%); }
  .invite-banner { height: 118px; }
}
@media (max-width: 640px) {
  .cta-band { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 24px 20px; gap: 14px; }
  .cta-band .btn { width: 100%; }
  .cta-logo { width: 170px; }
  .keep { grid-template-columns: 1fr; }
  .keep-wide { grid-row: auto; }
  .uses2 { grid-template-columns: 1fr; }
  .help-card { display: block; }
  .help-art { height: 190px; min-height: 0; -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
  .help-body { margin-top: -18px; padding: 0 20px 20px; }
}
@media (max-width: 560px) {
  .req-strip { grid-template-columns: 1fr; margin-top: -36px; }
  .req + .req { border-left: 0; border-top: 1px solid var(--line); }
  .req { padding: 16px 18px; }
  .dl-actions .btn { flex: 1 1 100%; }
  .btn-xl { justify-content: center; }
  .dl-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
  .dl-facts dd { white-space: normal; font-size: 1.25rem; }
  .rules-card, .bug-card { padding: 22px 18px; }
  .rules li { padding-left: 54px; }
  .rules li::before { font-size: 2rem; }
  .callout { align-items: flex-start; padding: 16px; }
  .callout-ico { width: 44px; height: 44px; }
  .isteps { gap: 10px; }
  .xhero .lead { font-size: 1.02rem; }
}
/* ===== Mission detail ===== */
.crumb { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.mh-grid { display: grid; grid-template-columns: minmax(0, 512px) 1fr; gap: 28px; align-items: center; margin-top: 6px; }
.mh-banner img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.mh-banner small { display: block; margin-top: 4px; font-size: 0.72rem; }
.mh-banner:empty { display: none; }
.mh-grid:has(.mh-banner:empty) { grid-template-columns: 1fr; }
@media (max-width: 860px) { .mh-grid { grid-template-columns: 1fr; gap: 14px; } }
.m-sec { padding: 18px 0 8px; }
.m-sec h2 { font-size: 1.7rem; }
.m-sec h3 { font-size: 1.2rem; margin-top: 14px; }
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.sec-head h2 { margin: 0; }
.mission { margin-bottom: 10px; padding: 0; overflow: hidden; }
.mission > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 12px 16px; min-height: 56px; }
.mission > summary::-webkit-details-marker { display: none; }
.mission[open] > summary { border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.m-no { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--panel-2); font: 800 1rem var(--head); color: var(--gold); }
.m-name { font-weight: 700; }
.m-name small { display: block; font-weight: 500; font-size: 0.78rem; }
.rank { font: 800 0.72rem/1 var(--sans); padding: 3px 6px; border-radius: 5px; background: rgba(255, 201, 74, 0.14); color: var(--gold); margin-left: 6px; vertical-align: 2px; }
.m-quick { color: var(--muted); font-weight: 700; white-space: nowrap; }
.m-quick small { font-weight: 500; color: var(--faint); }
.m-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 14px 16px 0; }
.m-stats > div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.m-stats small { display: block; color: var(--faint); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.m-stats b { font-family: var(--head); font-size: 1.3rem; }
.diff { display: block; font-size: 0.74rem; color: var(--wip); }
@media (max-width: 640px) { .m-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sides { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; padding: 14px 16px 16px; }
@media (max-width: 1000px) { .sides { grid-template-columns: 1fr; } }
.side { min-width: 0; }
.side h4 { margin: 0 0 8px; font: 700 0.8rem/1 var(--sans); text-transform: uppercase; letter-spacing: 0.12em; }
.side.srv h4 { color: var(--ok); }
.side.wik { border-left: 1px dashed var(--line-2); padding-left: 16px; }
.side.wik h4 { color: #a9b3ff; }
@media (max-width: 1000px) { .side.wik { border-left: 0; padding-left: 0; border-top: 1px dashed var(--line-2); padding-top: 12px; } }
.side h5 { margin: 12px 0 6px; font-size: 0.9rem; color: var(--text); }
.it-row { display: flex; flex-wrap: wrap; gap: 6px; }
.it { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px 4px 4px; color: var(--text); min-height: 44px; max-width: 100%; }
a.it:hover { border-color: var(--gold); color: var(--text); }
.it img { width: 36px; height: 36px; border-radius: 7px; flex: none; }
.cur { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 800 0.72rem var(--sans); background: var(--panel-2); color: var(--muted); flex: none; }
.it-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; font-size: 0.86rem; line-height: 1.25; min-width: 0; }
.it-name { overflow-wrap: anywhere; }
.it-q { font-weight: 800; color: var(--gold); }
.it-rate { font-weight: 700; color: var(--ok); font-size: 0.8rem; }
.it-extra { width: 100%; color: var(--faint); font-size: 0.72rem; }
.conds { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.conds li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; background: rgba(255, 255, 255, 0.02); border-radius: 8px; padding: 4px 6px 4px 10px; font-size: 0.9rem; }
@media (max-width: 520px) { .conds li { grid-template-columns: 1fr; } }
.note-s { color: var(--faint); font-size: 0.78rem; margin: 6px 0 0; }
.maps { margin-top: 12px; }
.maps > summary { cursor: pointer; font-weight: 700; color: var(--orange-2); padding: 10px 0; min-height: 44px; }
.map h5 { margin: 12px 0 6px; }
.set-w { font-size: 0.8rem; color: var(--muted); margin: 6px 0; }
table.enemies { min-width: 520px; font-size: 0.85rem; }
table.enemies td:first-child { min-width: 150px; }
.el-mini { width: 18px; height: 18px; display: inline-block; vertical-align: -4px; }
.el-row { display: flex; gap: 10px; align-items: center; }
.bul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 0.9rem; }
.bul li { margin: 3px 0; }
.wiki-credit { color: var(--faint); font-size: 0.82rem; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 24px; }
.stage-link { color: inherit; display: flex; flex-direction: column; height: 100%; }
.stage-link:hover { color: inherit; }
a.card.stage:hover, .card.stage:has(a.stage-link:hover) { border-color: rgba(255, 201, 74, 0.45); }
a.nr { color: var(--text); display: block; }
a.nr:hover { border-color: rgba(255, 201, 74, 0.45); color: var(--text); }
.archive-list { columns: 2 320px; column-gap: 24px; margin: 0; padding: 0; list-style: none; }
.archive-list li { break-inside: avoid; padding: 8px 0; border-bottom: 1px solid var(--line); }
.archive-list a { display: flex; justify-content: space-between; gap: 10px; min-height: 28px; }
.archive-list small { color: var(--faint); white-space: nowrap; }
.more-link { color: var(--orange-2) !important; background: none !important; font-weight: 700; }
a.card.stage { color: var(--text); }

/* ===== Marquee strips (Blazing.marquee in common.js) ===== */
.marquee { position: relative; --mq-gap: 10px; }
.mq-viewport { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.marquee-track { display: flex; width: max-content; animation: mq-slide 60s linear infinite; will-change: transform; }
.marquee-track > *, .mq-dup > * { flex: none; margin-right: var(--mq-gap); }
.mq-dup { display: contents; }
.marquee.is-reverse .marquee-track { animation-direction: reverse; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track, .marquee.is-offscreen .marquee-track { animation-play-state: paused; }
@keyframes mq-slide { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
.marquee.is-static .mq-viewport { overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin; padding-bottom: 6px; }
.marquee.is-static .marquee-track { animation: none; transform: none; }
.marquee.is-static .mq-dup { display: none; }
.marquee.is-static .marquee-track > * { scroll-snap-align: start; }
.mq-toggle { position: absolute; right: 6px; bottom: 6px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(12, 10, 16, 0.78); color: var(--text); display: grid; place-items: center; cursor: pointer; opacity: 0.55; transition: opacity .15s; }
.mq-toggle svg { width: 14px; height: 14px; }
.marquee:hover .mq-toggle, .mq-toggle:focus-visible, .marquee.is-static .mq-toggle { opacity: 1; }
@media (pointer: coarse) { .mq-toggle { width: 44px; height: 44px; opacity: 0.85; } }
.mq-ic img { width: 72px; height: 72px; border-radius: 12px; background: var(--panel-2); display: block; }
.mq-ic { border-radius: 12px; transition: transform .15s; }
.mq-ic:hover, .mq-card:hover, .mq-banner:hover { transform: translateY(-3px); }
.mq-card { display: block; width: 132px; height: 172px; border-radius: 14px; overflow: hidden; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--el, #444) 40%, transparent), transparent 75%), var(--panel); border: 1px solid var(--line); transition: transform .15s, border-color .15s; }
.mq-card img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.mq-card:hover { border-color: var(--el, var(--gold)); }
.mq-banner { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); transition: transform .15s, border-color .15s; background: var(--panel); }
.mq-banner img { height: 96px; width: auto; aspect-ratio: 512 / 130; display: block; }
.mq-banner:hover { border-color: rgba(255, 201, 74, 0.5); }
.mq-summon img { height: 170px; aspect-ratio: 750 / 400; }
.marquee + .marquee { margin-top: 12px; }
.mq-row-label { font: 700 0.78rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin: 18px 0 10px; }
.marquee-subtle { margin-top: 10px; opacity: 0.8; --mq-gap: 8px; }
.marquee-subtle .mq-ic img { width: 52px; height: 52px; border-radius: 10px; }
@media (max-width: 600px) {
  .mq-ic img { width: 60px; height: 60px; }
  .mq-card { width: 104px; height: 136px; }
  .mq-banner img { height: 72px; }
  .mq-summon img { height: 120px; }
}

/* character detail: left column = art, Prev/Next, status + asset checklist (own scroll), aligned to the top */
.modal-card { justify-content: flex-start; overflow-y: auto; overscroll-behavior: contain; padding: 22px 18px 20px; gap: 12px; }
.modal-card img.card-art { flex: none; width: auto; max-width: min(100%, 340px); max-height: min(46vh, 420px); }
.card-assets { width: 100%; max-width: 420px; }
.card-assets h4 { margin: 14px 0 8px; }
.card-assets .status-box { margin-bottom: 4px; }
.card-assets .checklist { gap: 4px; }
.card-assets .ck { padding: 6px 8px; font-size: 0.84rem; gap: 8px; grid-template-columns: 20px 1fr auto; background: rgba(255, 255, 255, 0.04); }
.card-assets .ck small { font-size: 0.72rem; }
.card-assets .ck .badge { font-size: 0.6rem; padding: 3px 6px; }
.card-assets .ck:not(.ck-standin):not(.ck-missing) small { display: none; }
@media (max-width: 760px) {
  .modal-card { overflow: visible; padding: 64px 16px 8px; }
  .modal-card img.card-art { max-height: 44vh; }
  .card-assets .ck:not(.ck-standin):not(.ck-missing) small { display: block; }
}

.cur-img { width: 36px; height: 36px; object-fit: contain; flex: none; }
.lbl-ico { width: 16px; height: 16px; object-fit: contain; display: inline-block; vertical-align: -3px; margin-right: 5px; }

/* roadmap testing scale: fully tested (green) -> partly tested (teal) -> needs testing (amber) */
:root { --partial: #2dd4bf; --needs: #fbbf24; }
.b-partial { color: #5eead4; background: rgba(45, 212, 191, 0.14); }
.i-partial { background: rgba(45, 212, 191, 0.15); color: var(--partial); }
.i-test { background: rgba(251, 191, 36, 0.15) !important; color: var(--needs) !important; }
.b-test { color: #fcd34d !important; background: rgba(251, 191, 36, 0.14) !important; }
.st-partial { color: #5eead4; background: rgba(45, 212, 191, 0.12); }
.st-needs { color: #fcd34d; background: rgba(251, 191, 36, 0.12); }
.bar .partial { background: linear-gradient(90deg, #14b8a6, var(--partial)); }
.bar .test { background: linear-gradient(90deg, #f59e0b, var(--needs)) !important; }
.bar .issue { background: repeating-linear-gradient(45deg, #ff5a5f 0 5px, #c53036 5px 10px); }
.rm-counts { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.rm-counts .c-partial { color: var(--partial); } .rm-counts .c-needs { color: var(--needs); }
.cols-4 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1400px) { .cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .cols-4 { grid-template-columns: 1fr; } .rm-counts { grid-template-columns: repeat(3, 1fr); } }
.item-t { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 3px; padding-left: 8px; border-left: 2px solid rgba(45, 212, 191, 0.4); }
.item-t b { color: #5eead4; font-weight: 700; }

/* mission page: luck, wiki links, Lucky Drop chart */
.it-luck { font: 700 0.72rem/1 var(--sans); color: #fcd34d; background: rgba(251, 191, 36, 0.12); padding: 3px 6px; border-radius: 5px; }
.wk { color: #a9b3ff; font-weight: 600; }
.pool-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.pick { font-size: 0.78rem; }
.lc-label { font: 700 0.72rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin: 10px 0 6px; }
.lucky-chart { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(34px, 1fr); gap: 4px; align-items: end; height: 130px; padding: 6px 8px 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
.lc-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 34px; }
.lc-bar { width: 70%; background: linear-gradient(180deg, var(--gold), var(--orange)); border-radius: 4px 4px 0 0; max-height: 80px; }
.lc-v { font: 700 0.66rem/1 var(--sans); color: var(--text); margin-bottom: 3px; white-space: nowrap; }
.lc-k { font: 600 0.68rem/1 var(--sans); color: var(--faint); padding: 4px 0 6px; }
.it-row.small .it { min-height: 36px; }
.it-row.small .it img { width: 28px; height: 28px; }

.drop-cell { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.drop-cell .wk { font-size: 0.78rem; min-height: 32px; display: inline-flex; align-items: center; }
