/* Genshillion Dark Abyssal Pixel RPG Theme · Pixelify Sans SIL OFL 1.1 */
@font-face {
  font-family: 'Pixelify Sans';
  src: url('/_a/pixelify-sans-latin.0f2216c1b7.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #091322;
  --panel: #0e1e36;
  --panel-hi: #162c4d;
  --line: #34527a;
  --ink: #eef4ff;
  --ink-dim: #b4c7e0;
  --gold: #f8d58c;
  --gold-hi: #ffebb8;
  --gold-ink: #0a1526;
  --mint: #4ade80;
  --sky: #7dd3fc;
  --violet: #c4b5fd;
  --rose: #fb7185;
  --amber: #fbbf24;
  --font-px: 'Pixelify Sans', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; max-width: 100%; overflow-x: clip; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
}
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-hi); }
button { font-family: var(--font-px); }
input, textarea { font-family: var(--font-body); }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 999;
  background: var(--gold); color: var(--gold-ink); padding: 8px 14px;
  border: 2px solid var(--gold-ink); font-family: var(--font-px); font-weight: 700;
}
.skip-link:focus { left: 8px; }

/* Masthead for inner doc/legal pages */
.masthead {
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.masthead-inner {
  max-width: 1120px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.wordmark, .wordmark-pill {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-family: var(--font-px); font-size: 16px; font-weight: 700; color: var(--ink);
}
.wordmark-pill {
  padding: 6px 12px; background: rgba(9, 19, 34, 0.88);
  border: 2px solid var(--line); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
}
.wordmark .mark, .wordmark-pill .mark {
  width: 11px; height: 11px; display: inline-block; background: var(--gold);
  border: 2px solid var(--bg); outline: 1px solid var(--line);
}
.domain { color: var(--ink-dim); font-size: 13px; }
.main-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.main-nav a {
  color: var(--ink); text-decoration: none; font-family: var(--font-px); font-size: 14px;
  padding: 5px 10px; border: 1px solid transparent;
}
.main-nav a:hover, .main-nav a[aria-current="page"] {
  background: var(--panel-hi); border-color: var(--line); color: var(--gold);
}

/* Full-bleed 100vh Playable Pixel World Stage (scoped cleanly to top viewport!) */
.dive-viewport {
  position: relative; width: 100%;
  min-height: 100vh;
  overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 76px 16px 36px;
  border-bottom: 2px solid var(--line);
  background: var(--bg);
}
.pixel-world { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.pixel-world-art {
  position: absolute; left: 0; top: 0; width: 100%; height: 700%;
  display: flex; flex-direction: column;
  transition: transform 0.95s cubic-bezier(0.22, 0.88, 0.32, 1);
  will-change: transform;
}
.nation-scene {
  position: relative; width: 100%; height: calc(100% / 7); flex-shrink: 0;
  background-size: cover; background-position: center; overflow: hidden;
}
.nation-seam-top, .nation-seam-bot { position: absolute; left: 0; right: 0; height: 80px; pointer-events: none; z-index: 2; }
.nation-seam-top { top: 0; }
.nation-seam-bot { bottom: 0; }
.pixel-world-vignette {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, rgba(9,19,34,0.34) 0%, rgba(9,19,34,0.12) 40%, rgba(9,19,34,0.58) 100%);
}
.ambient-scene-particles { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.ambient-particle { position: absolute; background-repeat: no-repeat; background-size: contain; opacity: 0.9; will-change: transform; }
.ambient-particle.is-drift { animation: pxDrift linear infinite; }
.ambient-particle.is-sway { animation: pxSway ease-in-out infinite alternate; }
@keyframes pxDrift {
  0% { transform: translate(0, 0); opacity: 0; }
  12% { opacity: 0.95; }
  88% { opacity: 0.9; }
  100% { transform: translate(var(--tx, 80px), var(--ty, -160px)); opacity: 0; }
}
@keyframes pxSway { 0% { transform: translate(0, 0); } 100% { transform: translate(var(--tx, 48px), var(--ty, -24px)); } }
.venti-hotspot { position: absolute; left: 12%; bottom: 16%; width: 90px; height: 90px; background: transparent; border: 0; cursor: pointer; pointer-events: auto; z-index: 5; }
.lyre-note { position: fixed; z-index: 90; pointer-events: none; font-size: 20px; font-weight: 700; color: var(--gold-hi); text-shadow: 2px 2px 0 var(--bg); animation: noteFloat 1.1s ease-out forwards; }
@keyframes noteFloat { 0% { transform: translate(0, 0); opacity: 1; } 100% { transform: translate(18px, -68px); opacity: 0; } }

/* Single Floating Top Bar Inside the 100vh Sky (matches live genshillion.app!) */
.stage-topbar {
  position: absolute; top: 14px; left: 16px; right: 16px; z-index: 25;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  pointer-events: none;
}
.stage-topbar > * { pointer-events: auto; }
.topbar-left, .topbar-nav, .topbar-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-pill {
  padding: 6px 11px; background: rgba(9, 19, 34, 0.86); color: var(--ink);
  border: 2px solid var(--line); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
  text-decoration: none; font-family: var(--font-px); font-size: 14px; font-weight: 700;
}
.nav-pill:hover, .nav-pill.is-current { background: var(--panel-hi); border-color: var(--gold); color: var(--gold); }
.universe-switch { display: inline-flex; border: 2px solid var(--line); background: rgba(9, 19, 34, 0.88); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45); }
.uni-btn { border: 0; background: transparent; color: var(--ink-dim); font-size: 13px; font-weight: 700; padding: 6px 10px; cursor: pointer; }
.uni-btn.is-active { background: var(--gold); color: var(--gold-ink); }
.hud-plaque {
  padding: 6px 10px; background: rgba(9, 19, 34, 0.88); border: 2px solid var(--line);
  color: var(--gold); font-family: var(--font-px); font-size: 13px; font-weight: 700;
}
.hud-fever {
  padding: 6px 10px; background: var(--gold); color: var(--gold-ink);
  border: 2px solid var(--bg); font-family: var(--font-px); font-size: 12px; font-weight: 700;
}
.hud-icon-btn {
  min-width: 34px; height: 34px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(9, 19, 34, 0.88); color: var(--ink); border: 2px solid var(--line);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45); font-size: 14px; font-weight: 700; cursor: pointer;
}
.hud-icon-btn:hover { background: var(--panel-hi); border-color: var(--gold); color: var(--gold); }

/* Left Depth Gauge & Side Ads — cleanly scoped INSIDE .dive-viewport (never chase down page!) */
.depth-gauge {
  position: absolute; left: 16px; top: 54%; transform: translateY(-50%); z-index: 20;
  display: flex; flex-direction: column; gap: 5px; padding: 8px 6px;
  background: rgba(9, 19, 34, 0.82); border: 2px solid var(--line);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.gauge-node {
  display: flex; align-items: center; gap: 6px; padding: 4px 8px;
  background: transparent; border: 1px solid transparent;
  color: var(--ink-dim); cursor: pointer; font-size: 12px; font-weight: 700; text-align: left;
}
.gauge-node:hover { background: rgba(255, 255, 255, 0.08); color: var(--ink); }
.gauge-node.is-active { background: var(--panel-hi); color: var(--gold); border-color: var(--gold); }
.gauge-dot { width: 8px; height: 8px; flex: 0 0 8px; background: var(--dot, var(--mint)); border: 1px solid var(--bg); }
.gauge-label { white-space: nowrap; }
.gauge-depth { font-size: 12px; opacity: 0.75; margin-left: auto; }

.side-ad {
  display: none; position: absolute; top: 82px; z-index: 18;
  background: rgba(9, 19, 34, 0.74); border: 1px solid var(--line); padding: 6px; text-align: center;
}
.side-ad p { margin: 0 0 4px; font-size: 12px; color: var(--ink-dim); font-family: var(--font-px); }
.side-ad iframe { display: block; border: 0; background: transparent; }
.side-ad-left { left: 16px; }
.side-ad-right { right: 16px; }
@media (min-width: 1380px) { .side-ad { display: block; } .depth-gauge { left: 196px; } }
@media (min-width: 1240px) and (max-width: 1379px) { .side-ad-right { display: block; } }

/* Center Stage & Dark-Navy RPG Console Card (matches live genshillion.app!) */
.stage-shell { position: relative; z-index: 15; width: 100%; max-width: 640px; margin: 0 auto; }
.stage-card {
  background: rgba(14, 30, 54, 0.94); border: 2px solid var(--line);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  padding: 22px 24px; color: var(--ink);
}
.stage-card.is-hero {
  background: transparent; border: 0; box-shadow: none; padding: 0;
  max-width: 520px; margin: 0 auto;
}
.stage-boot { text-align: center; }
.hero-wordmark {
  margin: 0 0 18px; font-family: var(--font-px);
  font-size: clamp(44px, 7vw, 68px); line-height: 1; font-weight: 700;
  color: var(--gold); letter-spacing: 0.02em;
  text-shadow: 4px 4px 0 var(--bg), -3px -3px 0 var(--bg), 3px -3px 0 var(--bg), -3px 3px 0 var(--bg), 0 6px 0 var(--bg);
}
.hero-wordmark.is-sr { color: var(--sky); }
.hero-console {
  background: rgba(11, 24, 43, 0.92); border: 2px solid var(--line);
  padding: 24px 24px 22px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
}
.boot-kicker {
  margin: 0 0 6px; font-family: var(--font-px); font-size: 13px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim);
}
.hero-date { margin: 0 0 12px; font-size: 14px; color: var(--ink-dim); }
.hero-prompt-lead {
  margin: 0 0 6px; font-family: var(--font-px); font-size: clamp(22px, 3.2vw, 28px);
  font-weight: 700; color: var(--ink); line-height: 1.2;
}
.boot-sub { margin: 0 auto 18px; max-width: 440px; color: var(--ink-dim); font-size: 14px; }
.hero-stat-strip {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 8px; background: rgba(11, 24, 43, 0.90); border: 2px solid var(--line);
}
.hero-stat-cell {
  padding: 10px 6px; text-align: center; border-right: 1px solid var(--line);
}
.hero-stat-cell:last-child { border-right: 0; }
.hero-stat-cell span { display: block; font-size: 12px; color: var(--ink-dim); }
.hero-stat-cell strong { display: block; font-family: var(--font-px); font-size: 17px; color: var(--ink); margin-top: 2px; }

.mode-tabs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 0 0 14px; }
.mode-tab {
  background: var(--bg); color: var(--ink-dim); border: 1px solid var(--line);
  padding: 5px 11px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.mode-tab:hover { color: var(--ink); border-color: var(--gold); }
.mode-tab.is-active { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }

.px-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 20px; font-size: 16px; font-weight: 700; cursor: pointer;
  border: 2px solid var(--gold); background: var(--gold); color: var(--gold-ink);
  text-decoration: none; transition: background 0.12s;
}
.px-btn:hover { background: var(--gold-hi); }
.px-btn.is-full { width: 100%; }
.px-btn.is-secondary { background: var(--panel-hi); color: var(--ink); border-color: var(--line); }
.px-btn.is-secondary:hover { border-color: var(--gold); color: var(--gold); }
.px-btn.is-teal { background: var(--mint); border-color: var(--mint); color: var(--gold-ink); }
.px-btn.is-violet { background: var(--violet); border-color: var(--violet); color: var(--gold-ink); }
.px-btn-sm { padding: 7px 13px; font-size: 13px; }
.px-btn-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }
.hero-meta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 10px 0 14px; }
.meta-pill { padding: 4px 10px; font-size: 13px; font-weight: 700; background: var(--bg); border: 1px solid var(--line); color: var(--ink); font-family: var(--font-px); }
.clash-banner {
  margin: 0 0 14px; padding: 12px 14px; background: var(--panel-hi); border: 2px solid var(--violet);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; text-align: left;
}
.clash-banner strong { font-size: 14px; color: var(--gold); }


/* Active Dive Playfield */
.dive-top-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.step-pills { display: flex; gap: 5px; flex-wrap: wrap; }
.step-pill {
  width: 28px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-px); font-size: 13px; font-weight: 700;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink-dim);
}
.step-pill.is-now { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.step-pill.is-done { background: var(--mint); color: var(--gold-ink); border-color: var(--mint); }
.step-pill.is-miss { background: var(--rose); color: var(--gold-ink); border-color: var(--rose); }
.timer-box {
  font-family: var(--font-px); font-size: 16px; font-weight: 700;
  padding: 4px 10px; border: 1px solid var(--line); background: var(--bg); color: var(--gold);
}
.timer-box.is-urgent { background: var(--rose); color: var(--gold-ink); border-color: var(--rose); }
.prompt-cat {
  display: inline-block; font-family: var(--font-px); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; padding: 3px 9px;
  background: var(--bg); border: 1px solid var(--line); color: var(--gold); margin-bottom: 10px;
}
.prompt-text { margin: 0 0 6px; font-family: var(--font-px); font-size: clamp(22px, 3vw, 28px); line-height: 1.25; color: var(--ink); }
.prompt-hint { margin: 0 0 16px; font-size: 14px; color: var(--ink-dim); }

.answer-form { display: flex; gap: 8px; flex-wrap: wrap; position: relative; }
.answer-input-wrap { flex: 1 1 260px; position: relative; }
.answer-input {
  width: 100%; padding: 12px 14px; font-size: 16px; font-weight: 600;
  border: 2px solid var(--line); background: var(--bg); color: var(--ink);
}
.answer-input:focus { outline: none; border-color: var(--gold); }
.answer-input.is-shake { animation: pxShake 0.28s; border-color: var(--rose); }
@keyframes pxShake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.feedback-msg { min-height: 22px; margin: 8px 0 0; font-size: 14px; font-weight: 600; color: var(--rose); }

.suggest-list {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 40;
  background: var(--panel); border: 2px solid var(--gold); border-top: 0;
  max-height: 210px; overflow-y: auto;
}
.suggest-item {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; text-align: left;
}
.suggest-item:hover { background: var(--panel-hi); color: var(--gold); }

/* 2-Box Reveal & Rarity Badges */
.reveal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.reveal-box { padding: 14px; border: 1px solid var(--line); background: var(--bg); }
.reveal-box.is-win { border-color: var(--mint); }
.reveal-box.is-crown { border-color: var(--gold); background: var(--panel-hi); }
.reveal-box.is-miss { border-color: var(--rose); }
.reveal-kicker { font-family: var(--font-px); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-dim); }
.reveal-main { font-family: var(--font-px); font-size: 21px; font-weight: 700; margin: 4px 0; color: var(--ink); }
.reveal-sub { font-size: 13px; color: var(--ink-dim); }
.pick-pct-pill { display: inline-block; margin-top: 8px; padding: 3px 8px; font-size: 12px; font-weight: 700; background: var(--panel-hi); border: 1px solid var(--line); color: var(--sky); }

.tier-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; font-family: var(--font-px); font-size: 12px; font-weight: 700; color: var(--gold-ink); }
.tier-0 { background: var(--mint); }
.tier-1 { background: var(--sky); }
.tier-2 { background: var(--violet); }
.tier-3 { background: var(--rose); }
.tier-4 { background: var(--amber); }
.tier-5 { background: var(--gold); }

/* Summary, Compendium & Clash Duel */
.summary-hero { text-align: center; padding: 16px; margin-bottom: 14px; background: var(--bg); border: 1px solid var(--line); }
.summary-score { font-family: var(--font-px); font-size: clamp(30px, 5vw, 42px); color: var(--gold); margin: 4px 0; }
.summary-title-badge { display: inline-block; padding: 4px 12px; background: var(--panel-hi); border: 1px solid var(--gold); color: var(--gold); font-family: var(--font-px); font-size: 13px; margin-top: 6px; }
.compendium-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; text-align: left; }
.comp-item { border: 1px solid var(--line); background: var(--bg); }
.comp-item summary { padding: 10px 12px; cursor: pointer; font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; list-style: none; color: var(--ink); }
.comp-item summary::-webkit-details-marker { display: none; }
.comp-body { padding: 10px 12px 12px; border-top: 1px solid var(--line); background: var(--panel); }
.answer-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.answer-chip { font-family: var(--font-px); font-size: 12px; font-weight: 700; padding: 3px 8px; color: var(--gold-ink); }
.answer-chip.is-picked { outline: 2px solid var(--ink); outline-offset: 2px; }

.clash-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.clash-card { padding: 12px; border: 1px solid var(--line); background: var(--bg); text-align: center; }
.clash-card.is-winner { border-color: var(--gold); background: var(--panel-hi); }
.clash-row-badge { display: inline-block; padding: 2px 7px; font-family: var(--font-px); font-size: 12px; font-weight: 700; background: var(--rose); color: var(--gold-ink); }

/* Archive, Character Reveal, Lore Timeline & Wiki Speedrun */
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.archive-tile { padding: 10px; border: 1px solid var(--line); background: var(--bg); text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 3px; color: var(--ink); }
.archive-tile:hover { border-color: var(--gold); background: var(--panel-hi); }
.archive-tile.is-cleared { border-color: var(--mint); }
.archive-day { font-size: 12px; color: var(--ink-dim); }
.archive-title { font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.3; }

.reveal-table { width: 100%; display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.reveal-row { display: grid; grid-template-columns: 1.4fr repeat(5, minmax(0, 1fr)); gap: 5px; }
.reveal-cell { padding: 7px 5px; text-align: center; font-size: 12px; font-weight: 700; border: 1px solid var(--line); background: var(--bg); color: var(--ink); display: flex; align-items: center; justify-content: center; min-height: 44px; word-break: break-word; }
.reveal-head { background: var(--panel-hi); color: var(--gold); min-height: 30px; font-family: var(--font-px); text-transform: uppercase; }
.reveal-cell.is-hit { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.reveal-cell.is-miss { background: var(--bg); color: var(--ink-dim); text-decoration: line-through; opacity: 0.72; }
.reveal-cell.is-hint { background: var(--amber); color: var(--gold-ink); border-color: var(--amber); }

.timeline-list { display: flex; flex-direction: column; gap: 7px; margin: 12px 0; text-align: left; }
.tl-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); cursor: grab; user-select: none; }
.tl-card.is-selected { border-color: var(--gold); background: var(--panel-hi); }
.tl-card.is-locked { border-color: var(--mint); cursor: default; }
.tl-num { width: 26px; height: 26px; flex: 0 0 26px; display: inline-flex; align-items: center; justify-content: center; background: var(--panel-hi); border: 1px solid var(--line); color: var(--gold); font-family: var(--font-px); font-size: 13px; font-weight: 700; }
.tl-body { flex: 1; min-width: 0; }
.tl-title { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.tl-clue { font-size: 12px; color: var(--ink-dim); margin-top: 2px; }
.tl-moves { display: flex; flex-direction: column; gap: 3px; }
.tl-move-btn { width: 26px; height: 22px; border: 1px solid var(--line); background: var(--panel-hi); color: var(--ink); font-size: 12px; cursor: pointer; padding: 0; }
.tl-move-btn:hover { border-color: var(--gold); color: var(--gold); }

.wiki-hud { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); margin-bottom: 12px; }
.wiki-route { font-family: var(--font-px); font-size: 15px; font-weight: 700; color: var(--gold); }
.wiki-metrics { display: flex; gap: 10px; font-family: var(--font-px); font-size: 13px; color: var(--ink); }
.wiki-article { padding: 16px; background: var(--bg); border: 1px solid var(--line); text-align: left; }
.wiki-article h2 { margin: 0 0 4px; font-family: var(--font-px); font-size: 24px; color: var(--ink); }
.wiki-summary { margin: 0 0 12px; font-size: 14px; color: var(--ink-dim); font-style: italic; }
.wiki-body { margin: 0; font-size: 15px; line-height: 1.75; color: var(--ink); }
.wiki-link { display: inline; padding: 1px 6px; margin: 0 1px; background: var(--panel-hi); color: var(--gold); border: 1px solid var(--gold); font-size: 14px; font-weight: 700; cursor: pointer; }
.wiki-link:hover { background: var(--gold); color: var(--gold-ink); }
.wiki-trail { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 10px 0 0; font-size: 12px; color: var(--ink-dim); }
.wiki-crumb { padding: 2px 7px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); font-weight: 600; }

/* Modals */
.modal-root { position: fixed; inset: 0; z-index: 120; background: rgba(5, 11, 20, 0.82); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-root[hidden] { display: none; }
.modal-card { width: 100%; max-width: 560px; max-height: 86vh; overflow-y: auto; background: var(--panel); border: 2px solid var(--line); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65); padding: 20px 22px; color: var(--ink); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-family: var(--font-px); font-size: 20px; color: var(--gold); }
.modal-close { width: 32px; height: 32px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 16px; cursor: pointer; }
.board-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.board-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; background: var(--bg); border: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.board-row.is-me { border-color: var(--gold); background: var(--panel-hi); color: var(--gold); }
.codex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.codex-badge { padding: 9px; border: 1px solid var(--line); background: var(--bg); font-size: 12px; color: var(--ink); }
.codex-badge.is-locked { opacity: 0.45; }

/* Dark Abyssal Editorial Bottom — 1:1 Faithful to Live genshillion.app! */
.content-shell { max-width: 980px; margin: 0 auto; padding: 28px 20px 64px; }
.home-ad {
  margin: 0 auto 24px; padding: 8px 12px; text-align: center;
  background: var(--panel); border: 1px solid var(--line);
}
.home-ad .ad-label { margin: 0; font-family: var(--font-px); font-size: 12px; color: var(--ink-dim); }
.home-ad iframe { width: 100%; border: 0; display: block; background: transparent; }

.game-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 14px 0 18px; margin-bottom: 36px; border-bottom: 1px solid var(--line);
}
.play-links { display: flex; flex-wrap: wrap; gap: 16px; }
.action-chip {
  font-family: var(--font-px); font-size: 14px; color: var(--ink-dim);
  text-decoration: underline; text-underline-offset: 4px;
}
.action-chip:hover { color: var(--gold); }
.action-buttons { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.px-btn-minor {
  padding: 7px 14px; font-size: 14px; font-weight: 700; cursor: pointer;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line);
}
.px-btn-minor:hover, .px-btn-minor[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.action-message { font-size: 13px; color: var(--mint); }

.parchment-panel {
  padding: 36px 0; border-bottom: 1px solid var(--line); color: var(--ink);
}
.parchment-panel:last-child { border-bottom: 0; }
.parchment-panel h2 {
  margin: 0 0 14px; font-family: var(--font-px); font-size: 28px; line-height: 1.25; color: var(--ink);
}
.guide-grid {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: start;
}
.guide-kicker {
  display: flex; flex-direction: column; gap: 4px; padding-top: 8px;
  font-family: var(--font-px); font-size: 13px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-dim);
}
.guide-copy h2 { font-family: var(--font-px); font-size: 28px; margin: 0 0 14px; color: var(--ink); }
.guide-copy h3 { font-family: var(--font-px); font-size: 20px; margin: 24px 0 10px; color: var(--ink); }
.guide-copy p, .guide-copy li, .section-lead { font-size: 15px; line-height: 1.75; color: var(--ink-dim); }
.guide-copy strong { color: var(--ink); }
.guide-copy table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.guide-copy th, .guide-copy td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.guide-copy th { background: var(--panel); color: var(--gold); font-family: var(--font-px); }

.rarity-list {
  list-style: none; padding: 0; margin: 16px 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px;
}
.rarity-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--line);
  background: var(--panel); font-family: var(--font-px); font-size: 15px;
}
.rarity-list li strong { color: var(--gold); }
.rarity-list li[data-tier="10"] { border-left-color: var(--mint); }
.rarity-list li[data-tier="15"], .rarity-list li[data-tier="20"] { border-left-color: var(--sky); }
.rarity-list li[data-tier="30"], .rarity-list li[data-tier="40"] { border-left-color: var(--violet); }
.rarity-list li[data-tier="60"] { border-left-color: var(--rose); }
.rarity-list li[data-tier="85"], .rarity-list li[data-tier="80"] { border-left-color: var(--amber); }
.rarity-list li[data-tier="100"] { border-left-color: var(--gold); }

.faq details { border: 1px solid var(--line); background: var(--panel); margin-bottom: 10px; }
.faq summary { padding: 13px 16px; font-family: var(--font-px); font-size: 16px; font-weight: 700; cursor: pointer; color: var(--ink); }
.faq details p { margin: 0; padding: 0 16px 14px; font-size: 15px; color: var(--ink-dim); line-height: 1.7; }

.discussion label { display: block; font-family: var(--font-px); font-size: 14px; margin-bottom: 10px; color: var(--ink); }
.discussion textarea, .discussion input {
  width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font-size: 14px;
}
.discussion .form-actions { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.discussion .form-actions label { flex: 1 1 200px; margin-bottom: 0; }
.reply-banner { display: none; margin-bottom: 8px; padding: 8px 12px; background: var(--panel-hi); border: 1px solid var(--gold); }
.reply-banner.is-open { display: flex; justify-content: space-between; align-items: center; }
.comments { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.comment { padding: 14px; background: var(--panel); border: 1px solid var(--line); }
.comment header { display: flex; gap: 8px; align-items: center; font-size: 13px; margin-bottom: 6px; color: var(--ink-dim); flex-wrap: wrap; }
.comment strong { color: var(--gold); }
.comment p { margin: 0 0 8px; font-size: 14px; color: var(--ink); }
.text-button { background: transparent; border: 0; color: var(--gold); font-size: 13px; cursor: pointer; padding: 0; }

/* Inner Doc / Legal Pages */
.doc-hero {
  background: linear-gradient(180deg, rgba(9,19,34,0.68), rgba(9,19,34,0.94)), url('/_a/mondstadt-clean.fdb7b13566.webp') center/cover no-repeat;
  padding: 40px 20px; border-bottom: 1px solid var(--line);
}
.doc-hero-inner { max-width: 940px; margin: 0 auto; }
.doc-play-link {
  display: inline-block; margin-bottom: 12px; padding: 7px 14px;
  background: var(--gold); color: var(--gold-ink); font-family: var(--font-px); font-weight: 700; text-decoration: none;
}
.doc-hero h1 { margin: 0 0 8px; font-family: var(--font-px); font-size: clamp(28px, 4vw, 38px); color: var(--ink); }
.doc-lead { margin: 0; max-width: 680px; color: var(--ink-dim); font-size: 15px; }
.doc-nav { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }

.site-footer { background: var(--bg); border-top: 1px solid var(--line); color: var(--ink-dim); padding: 24px 20px; }
.footer-inner { max-width: 980px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.footer-brand { font-family: var(--font-px); font-size: 15px; color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-links a { color: var(--ink-dim); text-decoration: none; font-family: var(--font-px); font-size: 14px; }
.footer-links a:hover { color: var(--gold); }

@media (max-width: 980px) {
  .depth-gauge { display: none; }
  .guide-grid { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 640px) {
  .dive-viewport { padding: 112px 10px 24px; min-height: 100vh; }
  .stage-topbar { top: 8px; left: 8px; right: 8px; }
  .topbar-nav { display: none; }
  .stage-card { padding: 16px 14px; }
  .reveal-grid, .clash-summary-grid { grid-template-columns: 1fr; }
  .reveal-row { grid-template-columns: 1.2fr repeat(5, minmax(0, 1fr)); gap: 3px; }
  .reveal-cell { font-size: 12px; padding: 4px 2px; min-height: 38px; }
}
