/* Spirit Road site — navy glossy panels with gold trim, retro online-game feel.
   Tokens mirror lib/ui/sr_theme.dart (SrColors). One font (Pretendard, loaded from jsDelivr as the
   privacy policy says); the retro look comes from heavy weights, hard shadows and pixel sprites. */

:root {
  --bg: #0A1233;
  --panel: #1B2B6B;
  --panel-high: #3553B8;
  --panel-low: #0E1945;
  --ink: #050A1F;
  --gold: #F5C842;
  --gold-dark: #A8781A;
  --gold-light: #FFF0A6;
  --gold-ink: #3A2405;
  --sky: #7FD8FF;
  --text: #F4F6FF;
  --muted: #A7B4E0;
  --soft: #D4DAF2;
  --danger: #E5483B;
  --success: #6FD36F;

  --fire: #FF7A3D;
  --earth: #D7A762;
  --wind: #9BE36A;
  --water: #5FB8FF;

  --font: "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --radius: 12px;
  --wrap: 1200px;
  --header-h: 64px;
  --hard-shadow: 0 4px 0 rgba(0, 0, 0, 0.5);
  --gloss: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  --trim: 0 0 0 1.5px var(--ink);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  background: var(--bg);
}

html.lb-open {
  overflow: hidden;
  padding-right: var(--sbw, 0px);
}

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

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

body > main {
  flex: 1 0 auto;
}

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

svg {
  display: block;
}

.pixel {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

a {
  color: var(--sky);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font: inherit;
  color: inherit;
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 800;
  border-radius: 8px;
}

.skip-link:focus {
  top: 12px;
}

/* Language toggle: html[data-lang] hides the other language. */
html[data-lang="ko"] [data-l="en"],
html[data-lang="en"] [data-l="ko"] {
  display: none !important;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 18, 51, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1.5px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}

.site-header.is-scrolled,
.site-header.nav-open {
  background: rgba(10, 18, 51, 0.96);
  border-bottom-color: rgba(168, 120, 26, 0.6);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: 1.08rem;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1.5px solid var(--gold-dark);
  box-shadow: var(--trim);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links {
  display: flex;
  gap: 2px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--soft);
  font-weight: 700;
  font-size: 0.93rem;
  border-radius: 8px;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--gold-light);
  text-decoration: none;
  background: rgba(53, 83, 184, 0.38);
}

.lang-toggle {
  display: inline-flex;
  border: 1.5px solid var(--gold-dark);
  border-radius: 9px;
  overflow: hidden;
  box-shadow: var(--trim);
}

.lang-toggle button {
  min-height: 44px;
  min-width: 44px;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0 10px;
  color: var(--soft);
  background: var(--panel-low);
  border: 0;
  cursor: pointer;
}

.lang-toggle button:hover {
  color: var(--gold-light);
}

.lang-toggle button[aria-pressed="true"] {
  color: var(--gold-ink);
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
}

.lang-toggle button:focus-visible {
  outline-offset: -3px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--gold-dark);
  border-radius: 9px;
  background: var(--panel-low);
  cursor: pointer;
  position: relative;
  box-shadow: var(--trim);
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  margin-left: -9px;
  background: var(--gold-light);
  border-radius: 2px;
  transition: transform 0.2s, background 0.2s;
}

.nav-toggle-bar {
  top: 50%;
  margin-top: -1px;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  left: 0;
  margin-left: 0;
}

.nav-toggle-bar::before {
  top: -6px;
}

.nav-toggle-bar::after {
  top: 6px;
}

.nav-open .nav-toggle-bar {
  background: transparent;
}

.nav-open .nav-toggle-bar::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-open .nav-toggle-bar::after {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 980px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 2px;
    padding: 8px 16px 16px;
    background: rgba(10, 18, 51, 0.98);
    border-bottom: 1.5px solid var(--gold-dark);
    display: none;
  }

  .site-header.nav-open .nav-links {
    display: flex;
  }

  .nav-links a {
    padding: 0 12px;
    font-size: 1rem;
  }

  .page-legal .nav-toggle {
    display: none;
  }

  .page-legal .nav-links {
    position: static;
    display: flex;
    flex-direction: row;
    padding: 0;
    background: none;
    border: 0;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 22px;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.01em;
  border-radius: 10px;
  border: 1.5px solid var(--gold-dark);
  box-shadow: var(--trim), var(--gloss), var(--hard-shadow);
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s, filter 0.15s;
  text-align: center;
}

.btn:hover {
  text-decoration: none;
  filter: brightness(1.08);
}

.btn:active {
  transform: translateY(3px);
  box-shadow: var(--trim), var(--gloss), 0 1px 0 rgba(0, 0, 0, 0.5);
}

.btn-primary {
  color: var(--gold-ink);
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 50%, #E0AC2A 51%, var(--gold-dark) 100%);
}

.btn-ghost {
  color: var(--text);
  background: linear-gradient(180deg, var(--panel-high) 0%, var(--panel) 50%, #16245C 51%, var(--panel-low) 100%);
}

.btn-sm {
  min-height: 44px;
  padding: 6px 16px;
  font-size: 0.92rem;
}

.btn[aria-disabled="true"] {
  cursor: default;
  filter: saturate(0.7) brightness(0.92);
}

.btn[aria-disabled="true"]:active {
  transform: none;
  box-shadow: var(--trim), var(--gloss), var(--hard-shadow);
}

/* Store badges: our own glyphs and wording, not the official badge artwork. */
.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store-row[hidden] {
  display: none;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  min-width: 196px;
  padding: 8px 20px 8px 16px;
  color: var(--text);
  line-height: 1.15;
  background: linear-gradient(180deg, #121A3E 0%, var(--ink) 100%);
  border: 1.5px solid rgba(244, 246, 255, 0.7);
  border-radius: 12px;
  box-shadow: var(--trim), var(--gloss), var(--hard-shadow);
  transition: border-color 0.15s, transform 0.08s, box-shadow 0.08s;
}

.store-badge:hover {
  text-decoration: none;
  border-color: var(--gold);
}

.store-badge:active {
  transform: translateY(3px);
  box-shadow: var(--trim), var(--gloss), 0 1px 0 rgba(0, 0, 0, 0.5);
}

.store-glyph {
  flex: none;
  width: 30px;
  height: 30px;
  color: var(--gold);
}

.store-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.store-kicker {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--soft);
}

.store-name {
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.store-badge[aria-disabled="true"] {
  cursor: not-allowed;
  background: rgba(5, 10, 31, 0.55);
  border-style: dashed;
  border-color: rgba(167, 180, 224, 0.6);
  box-shadow: var(--trim);
}

.store-badge[aria-disabled="true"]:hover {
  border-color: rgba(167, 180, 224, 0.6);
}

.store-badge[aria-disabled="true"]:active {
  transform: none;
}

.store-badge[aria-disabled="true"] .store-glyph {
  color: var(--muted);
  opacity: 0.75;
}

.store-badge[aria-disabled="true"] .store-kicker {
  color: var(--gold-light);
}

.store-badge[aria-disabled="true"] .store-name {
  color: var(--soft);
}

.store-avail {
  margin-top: 12px;
  font-size: 0.92rem;
  color: var(--muted);
}

.store-avail[hidden] {
  display: none;
}

/* ---------- Panels, labels, sections ---------- */

.panel {
  position: relative;
  background: linear-gradient(180deg, #2A4096 0%, var(--panel) 38%, var(--panel-low) 100%);
  border: 1.5px solid var(--gold-dark);
  border-radius: var(--radius);
  box-shadow: var(--trim), var(--gloss), var(--hard-shadow);
}

.ribbon {
  display: inline-block;
  padding: 3px 14px;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-ink);
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 60%, #D9A12A 100%);
  border: 1.5px solid var(--gold-dark);
  border-radius: 7px;
  box-shadow: var(--trim), 0 3px 0 rgba(0, 0, 0, 0.45);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sky);
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--gold);
  box-shadow: 0 0 0 2px var(--ink);
  transform: rotate(45deg);
}

.caption {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--sky);
  text-transform: uppercase;
}

.section {
  padding: 84px 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(14, 25, 69, 0) 0%, rgba(14, 25, 69, 0.9) 10%, rgba(14, 25, 69, 0.9) 90%, rgba(14, 25, 69, 0) 100%);
}

.section-head {
  max-width: 760px;
  margin: 0 auto 44px;
  text-align: center;
}

.section-title {
  margin-top: 16px;
  font-size: clamp(1.75rem, 3.8vw, 2.6rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.035em;
  color: var(--text);
  text-shadow: 0 3px 0 var(--ink);
  text-wrap: balance;
}

.section-title .hl {
  color: var(--gold);
}

.section-lead {
  margin: 14px auto 0;
  max-width: 40em;
  text-wrap: pretty;
  color: var(--soft);
  font-size: 1.06rem;
}

.note {
  margin-top: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.note strong {
  color: var(--gold-light);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin-top: calc(var(--header-h) * -1);
  padding: calc(var(--header-h) + 64px) 0 40px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-color: var(--bg);
  background-image: url("../img/hero-bg.jpg");
  background-image: image-set(url("../img/hero-bg.webp") type("image/webp"), url("../img/hero-bg.jpg") type("image/jpeg"));
  background-position: center 30%;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 55% at 72% 46%, rgba(127, 216, 255, 0.14), rgba(127, 216, 255, 0) 70%),
    linear-gradient(90deg, rgba(10, 18, 51, 0.95) 0%, rgba(10, 18, 51, 0.8) 40%, rgba(10, 18, 51, 0.55) 100%),
    linear-gradient(180deg, rgba(10, 18, 51, 0.2) 0%, rgba(10, 18, 51, 0) 50%, var(--bg) 100%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: center;
}

.hero-icon {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  border: 2px solid var(--gold-dark);
  box-shadow: 0 0 0 2px var(--ink), 0 6px 0 rgba(0, 0, 0, 0.5);
}

.hero-copy .eyebrow {
  margin-top: 22px;
}

.hero h1 {
  margin-top: 10px;
  font-size: clamp(3rem, 6.4vw, 5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--gold);
  text-shadow: 0 2px 0 var(--gold-dark), 0 4px 0 var(--gold-dark), 0 8px 0 var(--ink), 0 14px 24px rgba(0, 0, 0, 0.45);
}

.hero-en {
  display: block;
  margin-top: 12px;
  font-size: 0.26em;
  letter-spacing: 0.24em;
  color: var(--sky);
  text-shadow: 0 2px 0 var(--ink);
}

.hero-pitch {
  margin-top: 22px;
  max-width: 30em;
  font-size: clamp(1.08rem, 1.7vw, 1.24rem);
  line-height: 1.6;
  color: var(--text);
}

.hero-pitch strong {
  color: var(--gold-light);
  font-weight: 800;
}

.hero-cta {
  margin-top: 30px;
}

.hero-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: 10px;
  color: var(--gold-light);
  font-weight: 800;
}

.trust-list {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.trust-list li {
  padding: 4px 12px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--gold-light);
  background: rgba(14, 25, 69, 0.85);
  border: 1px solid rgba(168, 120, 26, 0.85);
  border-radius: 999px;
}

.hero-visual {
  position: relative;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 8% -4% 14%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(245, 200, 66, 0.22), rgba(245, 200, 66, 0) 68%);
  filter: blur(8px);
}

.hero-party {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  margin: 22px auto 0;
  position: relative;
}

.hero-party::before {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: -6px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(5, 10, 31, 0.75), rgba(5, 10, 31, 0) 70%);
}

.hero-party img {
  position: relative;
  height: 76px;
  width: auto;
  filter: drop-shadow(0 3px 0 rgba(5, 10, 31, 0.7));
}

/* Landscape phone, pure CSS bezel. */
.device {
  position: relative;
  padding: 2.3% 3.4%;
  border-radius: 7% / 15%;
  background: linear-gradient(160deg, #353E66 0%, #151B3A 30%, #090C1C 100%);
  box-shadow:
    0 0 0 1.5px var(--gold-dark),
    0 0 0 4px var(--ink),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 30px 60px -20px rgba(0, 0, 0, 0.9);
}

.device::before {
  content: "";
  position: absolute;
  left: 1.25%;
  top: 50%;
  width: 1.1%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translateY(-50%);
  background: #1D2445;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.device::after {
  content: "";
  position: absolute;
  top: -5px;
  right: 16%;
  width: 16%;
  height: 4px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, #2A3256 0 42%, transparent 42% 58%, #2A3256 58% 100%);
}

.device-screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1280 / 606;
  border-radius: 3% / 6.4%;
  background: #000;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.8);
}

.device-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.device-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 28%, rgba(255, 255, 255, 0) 40%);
}

@media (prefers-reduced-motion: no-preference) {
  .hero .device {
    animation: float 7s ease-in-out infinite;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* ---------- Screenshot gallery ---------- */

.gallery {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.g-item {
  position: relative;
  min-width: 0;
}

.g-item.is-feature {
  grid-column: span 2;
  grid-row: span 2;
}

.g-open {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1280 / 606;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1.5px solid var(--gold-dark);
  box-shadow: var(--trim), var(--hard-shadow);
  background: var(--panel-low);
  color: var(--text);
}

.g-item.is-feature .g-open {
  aspect-ratio: auto;
  min-height: 100%;
}

.g-open img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.g-open:hover {
  text-decoration: none;
  border-color: var(--gold);
}

.g-open:hover img {
  transform: scale(1.03);
}

.g-open:focus-visible {
  outline-offset: 4px;
}

.g-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px 16px 12px;
  background: linear-gradient(180deg, rgba(5, 10, 31, 0) 0%, rgba(5, 10, 31, 0.88) 55%, rgba(5, 10, 31, 0.95) 100%);
  pointer-events: none;
  text-align: left;
  line-height: 1.35;
}

.g-title {
  display: block;
  font-weight: 900;
  font-size: 0.98rem;
  color: var(--gold-light);
}

.g-desc {
  display: none;
  margin-top: 2px;
  font-size: 0.9rem;
  color: var(--soft);
}

.g-item.is-feature .g-title {
  font-size: 1.15rem;
}

.g-item.is-feature .g-desc {
  display: block;
}

.g-zoom {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--gold-ink);
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  box-shadow: var(--trim), 0 2px 0 rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.2s, transform 0.2s;
}

.g-open:hover .g-zoom,
.g-open:focus-visible .g-zoom {
  opacity: 1;
  transform: none;
}

.g-dots {
  display: none;
}

@media (hover: none) {
  .g-zoom {
    opacity: 1;
    transform: none;
    width: 32px;
    height: 32px;
  }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--text);
  background: rgba(3, 6, 20, 0.95);
  overscroll-behavior: contain;
}

.lightbox::backdrop {
  background: rgba(3, 6, 20, 0.6);
}

.lb-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 88px 40px;
}

.lb-figure {
  width: min(100%, calc((100dvh - 190px) * 2.112), 1280px);
  touch-action: pan-y;
}

.lb-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 1280 / 606;
  border-radius: var(--radius);
  border: 1.5px solid var(--gold-dark);
  box-shadow: var(--trim), 0 24px 60px rgba(0, 0, 0, 0.6);
  background: #000;
  user-select: none;
  -webkit-user-drag: none;
}

.lb-cap {
  margin-top: 16px;
  text-align: center;
  line-height: 1.4;
}

.lb-cap .g-title {
  font-size: 1.15rem;
}

.lb-cap .g-desc {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
}

.lb-count {
  position: absolute;
  top: 22px;
  left: 24px;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.lb-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-dark);
  color: var(--gold-light);
  background: linear-gradient(180deg, var(--panel-high), var(--panel-low));
  box-shadow: var(--trim), var(--gloss), 0 3px 0 rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.lb-btn:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.lb-btn svg {
  width: 22px;
  height: 22px;
}

.lb-close {
  top: 14px;
  right: 16px;
  width: 48px;
  height: 48px;
}

.lb-prev,
.lb-next {
  top: 50%;
  transform: translateY(-50%);
}

.lb-prev {
  left: 20px;
}

.lb-next {
  right: 20px;
}

@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] .lb-figure {
    animation: lb-in 0.22s ease-out;
  }
}

@keyframes lb-in {
  from {
    transform: scale(0.97);
  }
  to {
    transform: none;
  }
}

/* ---------- Heroes ---------- */

.char-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.char-card {
  flex: 1 1 190px;
  max-width: 226px;
  padding: 16px 16px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  --el: var(--soft);
}

.char-card.el-fire { --el: var(--fire); }
.char-card.el-earth { --el: var(--earth); }
.char-card.el-wind { --el: var(--wind); }
.char-card.el-water { --el: var(--water); }

.char-stage {
  position: relative;
  width: 100%;
  height: 164px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 10px;
  border-radius: 9px;
  background:
    radial-gradient(ellipse 70% 26% at 50% 92%, rgba(5, 10, 31, 0.7), rgba(5, 10, 31, 0) 70%),
    radial-gradient(ellipse at 50% 70%, color-mix(in srgb, var(--el) 30%, transparent), rgba(14, 25, 69, 0) 68%),
    rgba(5, 10, 31, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 14px;
}

.char-stage img {
  height: 140px;
  width: auto;
  filter: drop-shadow(0 3px 0 rgba(5, 10, 31, 0.6));
}

.char-name {
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1.2;
  color: var(--gold-light);
}

.el-chip {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 10px;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  border-radius: 999px;
  color: var(--ink);
  background: var(--el, var(--soft));
}

.char-blurb {
  margin-top: 10px;
  font-weight: 800;
  color: var(--text);
}

.char-detail {
  margin-top: 6px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- Dungeons ---------- */

.dungeon-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.dungeon-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  --el: var(--soft);
}

.dungeon-volcaroad { --el: var(--fire); }
.dungeon-groundroad { --el: var(--earth); }
.dungeon-windroad { --el: var(--wind); }
.dungeon-frostroad { --el: var(--water); }

.dungeon-art {
  position: relative;
  height: 200px;
  background-size: 128px 128px;
  background-repeat: repeat;
  image-rendering: pixelated;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-bottom: 1.5px solid var(--gold-dark);
}

.dungeon-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 10, 31, 0.1), rgba(5, 10, 31, 0.6));
}

.dungeon-art img {
  position: relative;
  max-height: 180px;
  max-width: 88%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 0 rgba(5, 10, 31, 0.6));
}

.tag {
  position: absolute;
  top: 10px;
  z-index: 1;
  padding: 2px 9px;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}

.tag-boss {
  left: 10px;
  color: #fff;
  background: #C8372B;
}

.tag-today {
  right: 10px;
  color: var(--gold-ink);
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
}

.tag-today[hidden] {
  display: none;
}

.dungeon-volcaroad .dungeon-art { background-image: url("../img/tile/volcaroad.jpg"); }
.dungeon-groundroad .dungeon-art { background-image: url("../img/tile/groundroad.jpg"); }
.dungeon-windroad .dungeon-art { background-image: url("../img/tile/windroad.jpg"); }
.dungeon-frostroad .dungeon-art { background-image: url("../img/tile/frostroad.jpg"); }

.dungeon-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 18px 18px;
}

.dungeon-el {
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--el);
}

.dungeon-name {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1.25;
}

.dungeon-meta {
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--muted);
  flex: 1;
}

.dungeon-boss {
  margin-top: 12px;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--soft);
}

.dungeon-boss b {
  color: var(--gold-light);
}

.stage-pips {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.stage-pips span {
  width: 22px;
  height: 8px;
  border-radius: 3px;
  background: var(--panel-high);
  box-shadow: var(--trim);
}

.stage-pips span:last-child {
  width: 32px;
  background: var(--danger);
}

/* ---------- Combat ---------- */

.combat-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px;
  align-items: center;
}

.combat-shot {
  position: relative;
}

.marker {
  position: absolute;
  z-index: 2;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  display: grid;
  place-items: center;
  font-size: 0.92rem;
  font-weight: 900;
  color: var(--gold-ink);
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 60%, #D9A12A);
  box-shadow: 0 0 0 2px var(--ink), 0 3px 0 rgba(0, 0, 0, 0.5);
}

@media (prefers-reduced-motion: no-preference) {
  .marker::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    animation: ping 2.4s ease-out infinite;
  }
}

@keyframes ping {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  70%,
  100% {
    transform: scale(1.9);
    opacity: 0;
  }
}

.control-list {
  list-style: none;
  display: grid;
  gap: 12px;
}

.control-list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 18px;
}

.control-num {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 0.92rem;
  color: var(--gold-ink);
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 60%, #D9A12A);
  box-shadow: 0 0 0 2px var(--ink);
}

.control-num.is-plus {
  color: var(--text);
  background: linear-gradient(180deg, var(--panel-high), var(--panel));
  box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 1.5px var(--gold-dark);
}

.control-list strong {
  display: block;
  color: var(--gold-light);
  font-weight: 900;
  font-size: 1.04rem;
  line-height: 1.35;
}

.control-list p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Gear ---------- */

.family-grid {
  display: grid;
  grid-template-columns: 4fr 4fr 3fr;
  gap: 18px;
}

.family {
  padding: 22px 22px 24px;
}

.family h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--gold-light);
}

.family h3 small {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.card-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 76px));
  gap: 10px;
  margin: 16px 0 14px;
  list-style: none;
}

.card-row li {
  min-width: 0;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--soft);
}

.card-tile {
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 6px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(180deg, #1D1A14 0%, #0C0B08 100%);
  border: 1.5px solid #5C4A22;
  box-shadow: var(--trim);
}

.card-tile img {
  width: 84%;
  height: auto;
}

.family p {
  color: var(--muted);
  font-size: 0.95rem;
}

.enhance {
  margin-top: 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 22px 26px;
}

.spirit-row {
  display: flex;
  gap: 4px;
}

.spirit-row img {
  width: 56px;
  height: 56px;
}

.enhance h3 {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--gold-light);
}

.enhance p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.95rem;
}

.tier-row {
  display: flex;
  gap: 8px;
}

.tier {
  padding: 6px 14px;
  font-weight: 900;
  font-size: 0.9rem;
  border-radius: 8px;
  box-shadow: var(--trim);
}

.tier-black {
  color: var(--text);
  background: #14110C;
  border: 1.5px solid #6E6A60;
}

.tier-gold {
  color: var(--gold-ink);
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  border: 1.5px solid var(--gold-dark);
}

.lv-9 {
  font-weight: 900;
  color: var(--gold-light);
}

/* ---------- Rewards ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature {
  padding: 24px 24px 26px;
}

.feature.is-wide {
  grid-column: span 2;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 28px;
  align-items: center;
}

.feature h3 {
  font-size: 1.18rem;
  font-weight: 900;
  color: var(--gold-light);
  margin-bottom: 8px;
  line-height: 1.35;
}

.feature p {
  color: var(--muted);
  font-size: 0.97rem;
}

.feature p strong {
  color: var(--text);
}

.feature-badge {
  display: inline-grid;
  place-items: center;
  min-width: 52px;
  height: 52px;
  padding: 0 12px;
  margin-bottom: 16px;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--gold-ink);
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 60%, #D9A12A);
  border: 1.5px solid var(--gold-dark);
  border-radius: 11px;
  box-shadow: var(--trim), 0 3px 0 rgba(0, 0, 0, 0.45);
}

.feature-badge.is-jackpot {
  color: #fff;
  font-size: 1.05rem;
  font-style: italic;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #FF9C8F, var(--danger) 55%, #8E2219);
  border-color: #5A140E;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}

.feature-badge.is-coin {
  width: 52px;
  padding: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFF8D0, var(--gold) 45%, var(--gold-dark));
}

.feature-badge.is-keep {
  color: var(--text);
  background: linear-gradient(180deg, var(--panel-high), var(--panel));
}

.feature-badge svg {
  width: 26px;
  height: 26px;
}

.grade-row {
  display: flex;
  gap: 8px;
}

.grade {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.35rem;
  border-radius: 9px;
  box-shadow: var(--trim), 0 3px 0 rgba(0, 0, 0, 0.45);
  border: 1.5px solid var(--gold-dark);
}

.grade-s { color: var(--gold-ink); background: linear-gradient(180deg, var(--gold-light), var(--gold)); }
.grade-a { color: var(--ink); background: linear-gradient(180deg, #CFF1FF, var(--sky)); }
.grade-b { color: var(--text); background: linear-gradient(180deg, var(--panel-high), var(--panel)); }
.grade-c { color: var(--soft); background: var(--panel-low); }

.feature .stars {
  margin-top: 10px;
  color: var(--gold);
  letter-spacing: 3px;
  font-size: 1.5rem;
  line-height: 1;
  text-shadow: 0 2px 0 var(--ink);
}

.feature .stars .off {
  color: var(--panel-high);
}

.today-name {
  color: var(--gold-light);
  font-weight: 800;
}

.today-line[hidden] {
  display: none;
}

/* ---------- Promise ---------- */

.promise {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 32px;
  align-items: center;
  padding: 36px;
}

.promise h2 {
  text-wrap: balance;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin: 14px 0 10px;
}

.promise p {
  color: var(--soft);
}

.promise-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 8px;
  font-weight: 800;
}

.check-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.check-list li {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 14px 8px 40px;
  line-height: 1.35;
  font-weight: 800;
  font-size: 0.95rem;
  background: rgba(5, 10, 31, 0.45);
  border: 1px solid rgba(127, 216, 255, 0.25);
  border-radius: 9px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 50%;
  width: 13px;
  height: 7px;
  margin-top: -6px;
  border-left: 3px solid var(--success);
  border-bottom: 3px solid var(--success);
  transform: rotate(-45deg);
}

.lang-strip {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding-top: 22px;
  border-top: 1px solid rgba(168, 120, 26, 0.45);
}

.lang-strip strong {
  margin-right: 6px;
  color: var(--gold-light);
  font-weight: 900;
}

.lang-strip span.chip {
  padding: 3px 12px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--soft);
  background: rgba(5, 10, 31, 0.45);
  border: 1px solid rgba(167, 180, 224, 0.35);
  border-radius: 999px;
}

/* ---------- Final CTA ---------- */

.final-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
}

.final-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 48% 42% at 50% 52%, rgba(245, 200, 66, 0.13), rgba(245, 200, 66, 0) 100%);
}

.final-cta .hero-icon {
  margin: 0 auto 20px;
}

.final-cta h2 {
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 2px 0 var(--gold-dark), 0 4px 0 var(--gold-dark), 0 7px 0 var(--ink);
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.final-cta p.lead {
  margin: 14px auto 0;
  max-width: 34em;
  color: var(--soft);
  font-size: 1.06rem;
}

.final-cta .store-row {
  margin-top: 28px;
  justify-content: center;
}

.final-party {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  margin-top: 40px;
}

.final-party img {
  height: 64px;
  width: auto;
  filter: drop-shadow(0 3px 0 rgba(5, 10, 31, 0.7));
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 32px 0 40px;
  border-top: 1.5px solid rgba(168, 120, 26, 0.6);
  background: var(--panel-low);
  font-size: 0.92rem;
  color: var(--muted);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--soft);
  font-weight: 700;
}

.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--gold-dark);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 6px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: var(--text);
  font-weight: 700;
  border-radius: 8px;
}

.footer-links a:hover {
  color: var(--gold-light);
}

.footer-note {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #95A2D0;
}

/* ---------- Reveal (transform only: nothing is ever hidden or dimmed) ---------- */

.reveal-on .reveal {
  transform: translateY(18px);
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 60ms);
}

.reveal-on .reveal.is-in {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal-on .reveal {
    transform: none;
    transition: none;
  }
}

/* ---------- Legal pages ---------- */

.page-legal .site-header {
  background: rgba(10, 18, 51, 0.96);
  border-bottom-color: rgba(168, 120, 26, 0.55);
}

.legal-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px 56px;
}

.legal-header h1 {
  margin-top: 8px;
  font-size: clamp(1.9rem, 4.5vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--gold);
  line-height: 1.2;
  text-shadow: 0 2px 0 var(--gold-dark), 0 5px 0 var(--ink);
}

.legal-meta {
  margin-top: 18px;
  padding: 16px 18px;
  font-size: 0.95rem;
  color: var(--soft);
}

.legal-meta strong {
  color: var(--text);
}

.legal-langs {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-weight: 700;
}

.legal-langs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.legal-summary {
  margin-top: 22px;
  padding: 18px 20px;
  border-left: 4px solid var(--success);
  background: rgba(111, 211, 111, 0.08);
  border-radius: 0 8px 8px 0;
  color: var(--text);
}

.legal-part {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1.5px solid rgba(168, 120, 26, 0.5);
}

.legal-part > h2 {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gold-light);
}

.legal-section {
  margin-top: 28px;
}

.legal-section h3 {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.legal-section p,
.legal-section li {
  color: var(--soft);
  line-height: 1.75;
}

.legal-section p + p,
.legal-section ul + p,
.legal-section .table-scroll + p {
  margin-top: 10px;
}

.legal-section ul,
.legal-section ol {
  margin: 8px 0 0 1.3em;
}

.legal-section li + li {
  margin-top: 4px;
}

.table-scroll {
  margin-top: 10px;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.data-table th,
.data-table td {
  text-align: left;
  vertical-align: top;
  padding: 9px 12px;
  border: 1px solid rgba(167, 180, 224, 0.25);
}

.data-table th {
  background: var(--panel-low);
  color: var(--gold-light);
  font-weight: 800;
}

.data-table td {
  color: var(--soft);
}

.back-top {
  margin-top: 36px;
  font-weight: 700;
}

.back-top a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ---------- Error / redirect ---------- */

.page-center {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 64px 24px;
}

.page-center h1 {
  margin: 10px 0 12px;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 2px 0 var(--gold-dark), 0 5px 0 var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.page-center p {
  color: var(--soft);
  max-width: 34em;
  margin: 0 auto 24px;
}

.page-center .store-row {
  justify-content: center;
}

.page-center .hero-icon {
  margin: 0 auto 18px;
}

.page-center .lost-sprite {
  height: 128px;
  width: auto;
  margin: 0 auto 10px;
  filter: drop-shadow(0 4px 0 rgba(5, 10, 31, 0.7));
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .dungeon-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .family-grid {
    grid-template-columns: 1fr 1fr;
  }

  .family.is-magic {
    grid-column: 1 / -1;
  }

  .enhance {
    grid-template-columns: auto 1fr;
  }

  .enhance .tier-row {
    grid-column: 2;
  }
}

@media (max-width: 980px) {
  .hero {
    padding: calc(var(--header-h) + 40px) 0 56px;
  }

  .hero::after {
    background:
      radial-gradient(ellipse 80% 40% at 50% 78%, rgba(127, 216, 255, 0.12), rgba(127, 216, 255, 0) 70%),
      linear-gradient(180deg, rgba(10, 18, 51, 0.7) 0%, rgba(10, 18, 51, 0.86) 50%, var(--bg) 100%);
  }

  .hero-bg {
    background-image: url("../img/hero-bg-768.jpg");
    background-image: image-set(url("../img/hero-bg-768.webp") type("image/webp"), url("../img/hero-bg-768.jpg") type("image/jpeg"));
  }

  /* Phones/tablets: title, pitch and CTAs first, then the game, then the chips. */
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero-copy {
    display: contents;
  }

  .hero-copy > * {
    max-width: 640px;
  }

  .hero-visual {
    order: 1;
    margin-top: 36px;
  }

  .hero-copy > .trust-list {
    order: 2;
    margin-top: 28px;
  }

  .combat-grid,
  .promise {
    grid-template-columns: 1fr;
  }

  .combat-grid {
    gap: 28px;
  }

  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feature.is-wide {
    grid-column: 1 / -1;
  }

  .section {
    padding: 72px 0;
  }
}

@media (max-width: 720px) {
  .wrap {
    padding: 0 16px;
  }

  /* Gallery becomes a swipe carousel with a peek of the next shot. */
  .gallery {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 86%;
    gap: 12px;
    margin: 0 -16px;
    padding: 4px 16px 6px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 16px;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .gallery::-webkit-scrollbar {
    display: none;
  }

  .g-item {
    scroll-snap-align: start;
  }

  .g-item.is-feature {
    grid-column: auto;
    grid-row: auto;
  }

  .g-item.is-feature .g-open {
    aspect-ratio: 1280 / 606;
    min-height: 0;
  }

  .g-open {
    height: auto;
  }

  .g-cap {
    position: static;
    padding: 12px 2px 0;
    background: none;
  }

  .g-desc,
  .g-item.is-feature .g-desc {
    display: block;
  }

  .g-item.is-feature .g-title {
    font-size: 0.98rem;
  }

  .g-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
  }

  .g-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--panel-high);
    box-shadow: var(--trim);
    transition: width 0.2s, background 0.2s;
  }

  .g-dots span.is-on {
    width: 22px;
    border-radius: 4px;
    background: var(--gold);
  }

  .lb-stage {
    padding: 72px 12px 104px;
  }

  .lb-figure {
    width: 100%;
  }

  .lb-prev,
  .lb-next {
    top: auto;
    bottom: 28px;
    transform: none;
  }

  .lb-prev {
    left: calc(50% - 72px);
  }

  .lb-next {
    right: calc(50% - 72px);
  }

  .lb-count {
    top: 26px;
    left: 18px;
  }
}

@media (max-width: 560px) {
  .section {
    padding: 60px 0;
  }

  .section-head {
    margin-bottom: 32px;
  }

  .hero-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
  }

  .hero .hero-icon {
    display: none;
  }

  .hero-copy .eyebrow {
    margin-top: 0;
    letter-spacing: 0.1em;
  }

  .card-row {
    gap: 8px;
  }

  .card-row li {
    font-size: 0.76rem;
  }

  .hero-party img {
    height: 54px;
  }

  .hero-party {
    gap: 2px;
  }

  .store-row {
    gap: 10px;
  }

  .store-badge {
    flex: 1 1 150px;
    min-width: 0;
    padding: 8px 12px;
    gap: 10px;
  }

  .store-glyph {
    width: 26px;
    height: 26px;
  }

  .store-name {
    font-size: 1.08rem;
  }

  .char-grid {
    gap: 12px;
  }

  .char-card {
    flex: 1 1 140px;
    max-width: none;
    padding: 12px 12px 16px;
  }

  .char-card:last-child {
    flex-basis: 100%;
    max-width: calc(50% - 6px);
  }

  .char-stage {
    height: 136px;
  }

  .char-stage img {
    height: 112px;
  }

  .dungeon-grid,
  .feature-grid,
  .family-grid {
    grid-template-columns: 1fr;
  }

  .feature.is-wide {
    grid-template-columns: 1fr;
  }

  .enhance {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px;
  }

  .enhance .tier-row {
    grid-column: auto;
  }

  .spirit-row img {
    width: 48px;
    height: 48px;
  }

  .marker {
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    font-size: 0.78rem;
  }

  .control-list li {
    padding: 12px 14px;
  }

  .promise {
    padding: 24px 18px;
  }

  .check-list {
    grid-template-columns: 1fr;
  }

  .legal-wrap {
    padding: 32px 16px 40px;
  }

  .nav-links a {
    padding: 0 8px;
  }

  .final-party img {
    height: 48px;
  }
}

@media (max-width: 380px) {
  .brand > span {
    font-size: 1rem;
  }

  .lang-toggle button {
    padding: 0 8px;
  }
}

a.footer-brand:hover {
  text-decoration: none;
  color: var(--gold-light);
}

.page-center .store-badge {
  text-align: left;
}
