/* ConSSS Wars — in-game Chainoa UI + environments */
:root {
  --bg-deep: #0a0f1a;
  --bg-panel: rgba(4, 7, 12, 0.92);
  --text: #e8edf7;
  --text-muted: #9aa8c4;
  --gold: #e8d89a;
  --gold-dim: #a67c2e;
  --mercury: #7ec8e8;
  --mercury-bright: #b8e8ff;
  --mercury-glow: rgba(126, 200, 232, 0.25);
  --btn-text: var(--mercury);
  --btn-text-hover: var(--mercury-bright);
  --border: rgba(212, 168, 75, 0.22);
  --font-sans: "Noto Sans TC", system-ui, sans-serif;
  --font-serif: "Source Serif 4", "Noto Serif TC", Georgia, serif;
  --header-h: 4rem;
  /* 512px panel art — slice 96 / 56 matches Godot FantasyUI patch margins */
  --panel-slice: 96;
  --panel-slice-thin: 56;
  --panel-border: 36px;
  --panel-border-thin: 24px;
  --card-ratio: 228 / 308;
  --kb-fade-ms: 2200ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-deep);
  overflow-x: hidden;
  -webkit-tap-highlight-color: rgba(126, 200, 232, 0.2);
}

body.nav-open {
  overflow: hidden;
}

/* Fixed Ken Burns backdrop — does not scroll with page */
.ken-burns {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.ken-burns__layer {
  position: absolute;
  inset: -14%;
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity var(--kb-fade-ms) ease-in-out;
  will-change: opacity, transform;
}

.ken-burns__layer.is-visible {
  opacity: 1;
}

.ken-burns__layer:not(.is-visible) {
  animation-play-state: paused;
}

.kb-drift-a {
  animation: kb-drift-a 26s ease-in-out infinite alternate;
}

.kb-drift-b {
  animation: kb-drift-b 28s ease-in-out infinite alternate;
}

.kb-drift-c {
  animation: kb-drift-c 24s ease-in-out infinite alternate;
}

.kb-drift-d {
  animation: kb-drift-d 30s ease-in-out infinite alternate;
}

@keyframes kb-drift-a {
  from {
    transform: scale(1.05) translate(0, 0);
  }
  to {
    transform: scale(1.12) translate(-1.2%, -0.6%);
  }
}

@keyframes kb-drift-b {
  from {
    transform: scale(1.08) translate(0.5%, 0);
  }
  to {
    transform: scale(1.14) translate(-0.8%, 1%);
  }
}

@keyframes kb-drift-c {
  from {
    transform: scale(1.06) translate(-0.5%, 0.3%);
  }
  to {
    transform: scale(1.13) translate(1%, -0.5%);
  }
}

@keyframes kb-drift-d {
  from {
    transform: scale(1.07) translate(0, -0.4%);
  }
  to {
    transform: scale(1.15) translate(-1.5%, 0.8%);
  }
}

.ken-burns-veil {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 60% at 50% 20%, rgba(10, 15, 26, 0.35), rgba(10, 15, 26, 0.88)),
    linear-gradient(180deg, rgba(10, 15, 26, 0.55) 0%, rgba(10, 15, 26, 0.92) 100%);
}

#main,
.site-footer {
  position: relative;
  z-index: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--mercury);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/*
 * Ornate 9-patch frames (512×512). Do NOT use slice "fill" — that stretches the
 * decorative center across wide panels. Border only + solid inner fill, edges tiled.
 */
.chainoa-panel {
  --slice: var(--panel-slice);
  --border-w: var(--panel-border);
  border: var(--border-w) solid transparent;
  border-image-source: url("assets/ui/panel_9.png");
  border-image-slice: var(--slice);
  border-image-width: var(--border-w);
  border-image-outset: 0;
  border-image-repeat: round;
  background-color: var(--bg-panel);
  background-clip: padding-box;
}

.chainoa-panel--thin {
  --slice: var(--panel-slice-thin);
  --border-w: var(--panel-border-thin);
  border-image-source: url("assets/ui/panel_thin_9.png");
}

.chainoa-panel--card {
  --slice: var(--panel-slice-thin);
  --border-w: var(--panel-border-thin);
  border-image-source: url("assets/ui/panel_thin_9.png");
  border-image-repeat: stretch;
  padding: 0;
  background-color: rgba(4, 7, 12, 0.96);
  overflow: hidden;
}

.chainoa-panel--promo {
  padding: clamp(0.75rem, 2vw, 1.25rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chainoa-panel--hero {
  padding: clamp(1.35rem, 3.5vw, 2.25rem) clamp(1.5rem, 4vw, 2.5rem);
  max-width: 620px;
}

.chainoa-panel--footer {
  max-width: 720px;
  margin: 0 auto 2rem;
  padding: 1.25rem 1.5rem;
  text-align: center;
}

.chainoa-panel--header {
  --border-w: 18px;
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0;
  padding: 0.55rem clamp(1rem, 4vw, 2.5rem);
  padding-left: max(0.75rem, env(safe-area-inset-left));
  padding-right: max(0.75rem, env(safe-area-inset-right));
  background-color: rgba(4, 7, 12, 0.94);
  box-sizing: border-box;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--gold);
  color: var(--bg-deep);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* In-game button texture (slice fill shows the art, not a flat fill) */
.chainoa-btn {
  display: inline-block;
  box-sizing: border-box;
  border: 12px solid transparent;
  border-image-source: url("assets/ui/button_normal.png");
  border-image-slice: 28 fill;
  border-image-width: 12px;
  border-image-repeat: stretch;
  background: none;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  color: var(--btn-text);
  text-shadow: 0 1px 3px rgba(3, 5, 10, 0.9);
  cursor: pointer;
  transition:
    filter 0.15s,
    transform 0.15s,
    border-image-source 0.12s,
    color 0.12s;
}

@media (hover: hover) {
  .chainoa-btn:hover {
    border-image-source: url("assets/ui/button_hover.png");
    filter: brightness(1.08);
    transform: translateY(-1px);
    color: var(--btn-text-hover);
  }

  .chainoa-btn--lg:hover {
    transform: translateY(-2px);
  }

  .brand:hover .brand-mark {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5)) brightness(1.06);
  }

  a:hover {
    color: var(--gold);
  }
}

.chainoa-btn:active {
  border-image-source: url("assets/ui/button_hover.png");
  color: var(--btn-text-hover);
  transform: scale(0.98);
}

.chainoa-btn:focus-visible {
  outline: 2px solid var(--mercury);
  outline-offset: 2px;
}

.chainoa-btn--lg {
  padding: 0.55rem 1.85rem;
  min-width: 11rem;
  border-width: 16px;
  border-image-slice: 28 fill;
  border-image-width: 16px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.chainoa-btn--nav {
  padding: 0.3rem 0.7rem;
  border-width: 11px;
  border-image-slice: 24 fill;
  border-image-width: 11px;
  font-size: 0.8rem;
  min-width: 0;
  white-space: nowrap;
}

.chainoa-btn--emphasis {
  font-weight: 700;
}

.chainoa-btn[aria-disabled="true"] {
  opacity: 0.9;
  pointer-events: none;
  cursor: default;
}

/* Header — full-width bar across the top */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  padding: 0;
  padding-top: env(safe-area-inset-top);
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  width: 100%;
}

.nav-toggle {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 0;
}

.brand-mark {
  width: auto;
  height: 2rem;
  max-width: min(220px, 48vw);
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.site-nav {
  display: flex;
  gap: 0.4rem;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}

.lang-switch {
  display: flex;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}

.lang-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.lang-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  position: relative;
  min-width: 5.75rem;
  padding: 3px;
  border-width: 9px;
  border-image-width: 9px;
  border-radius: 999px;
  line-height: 1;
  cursor: pointer;
}

.lang-toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 4px);
  height: calc(100% - 6px);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(126, 200, 232, 0.4), rgba(126, 200, 232, 0.12));
  border: 1px solid rgba(126, 200, 232, 0.5);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
  pointer-events: none;
}

.lang-toggle[data-lang="zh-TW"] .lang-toggle__thumb {
  transform: translateX(calc(100% + 2px));
}

.lang-toggle__label {
  position: relative;
  z-index: 1;
  padding: 0.32rem 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  transition: color 0.15s;
  pointer-events: none;
  user-select: none;
}

.lang-toggle[data-lang="en"] .lang-toggle__label--en,
.lang-toggle[data-lang="zh-TW"] .lang-toggle__label--zh {
  color: var(--btn-text-hover);
  text-shadow: 0 1px 2px rgba(3, 5, 10, 0.85);
}

.lang-toggle:hover .lang-toggle__thumb,
.lang-toggle:focus-visible .lang-toggle__thumb {
  filter: brightness(1.08);
}

/* Hero — title card centered, copy below */
.hero {
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
}

.hero-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(1.25rem, 3vw, 2rem);
  width: 100%;
  margin: 0 auto;
}

.hero-title-card {
  width: 100%;
  max-width: 520px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mercury);
}

.hero-copy .tagline {
  margin: 0;
  max-width: 44ch;
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.hero-actions {
  margin-top: 1.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-note {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-art {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.45));
}

/* Sections */
.section {
  padding: clamp(3rem, 8vw, 5rem) clamp(1rem, 4vw, 2.5rem);
}

.section-inner {
  max-width: 1040px;
  margin: 0 auto;
}

.section-title,
.chainoa-panel h2 {
  margin: 0 0 1.25rem;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  color: var(--gold);
}

.section-lead {
  margin: 0 0 2rem;
  max-width: 52ch;
}

.chainoa-panel h2 {
  margin-top: 0;
}

.about .chainoa-panel {
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1.5rem, 4vw, 2.25rem);
}

.lead {
  font-size: 1.12rem;
  color: var(--text);
}

.about .lead {
  margin-bottom: 1rem;
}

.chapter-badge {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(126, 200, 232, 0.08);
  font-size: 0.95rem;
  color: var(--mercury);
}

/* Hero roster cards (matches in-game hero select ~228×308) */
.hero-roster {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero-card {
  width: min(100%, 228px);
  aspect-ratio: var(--card-ratio);
  display: flex;
  flex-direction: column;
}

.hero-card__portrait {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #0e1525 0%, #1a2a3d 55%, #0a1018 100%);
}

.hero-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
  /* Menu portraits ship on white — same treatment as game bust feather */
  mix-blend-mode: multiply;
  filter: contrast(1.06) saturate(1.05);
}

.hero-card__caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.35rem 0.5rem 0.65rem;
  margin-top: -3.5rem;
  position: relative;
  z-index: 2;
  text-align: center;
  text-shadow:
    0 0 3px rgba(3, 5, 10, 0.96),
    0 1px 2px rgba(3, 5, 10, 0.96),
    0 2px 8px rgba(3, 5, 10, 0.85);
}

.hero-card__name-zh {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.2;
}

.hero-card__name-en {
  font-size: 0.9rem;
  color: var(--gold);
  opacity: 0.95;
}

.hero-card__role {
  font-size: 0.82rem;
  color: rgba(225, 235, 250, 0.92);
}

html[lang="zh-Hant"] .hero-card__name-en {
  font-size: 0.8rem;
  opacity: 0.85;
}

/* Screenshots */
.screenshot-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.35rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.screenshot-card {
  padding: 0.65rem;
  overflow: hidden;
}

.screenshot-card figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.screenshot-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center 40%;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(212, 168, 75, 0.12);
}

.screenshot-card figcaption {
  margin: 0.65rem 0.15rem 0.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gold);
  text-align: center;
  line-height: 1.35;
}

/* Talents */
.talent-grid {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .talent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .talent-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .talent-grid > :nth-child(4),
  .talent-grid > :nth-child(5) {
    grid-column: span 1;
  }
}

.talent-axis {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
}

.talent-axis__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.talent-axis__text {
  min-width: 0;
}

.talent-axis__meta {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gold);
}

.talent-axis__name {
  color: var(--mercury);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 700;
}

.talent-axis__text > p:last-child {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.talents .chainoa-panel > p:not(.lead) {
  margin-top: 0.75rem;
}

/* Features */
.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

@media (min-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.feature-card {
  padding: 1.1rem 1.2rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feature-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.feature-card h3 {
  margin: 0;
  font-size: 1.08rem;
  color: var(--mercury);
}

.feature-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Team */
.team-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.team-card {
  padding: 1.35rem 1.4rem;
}

.team-card h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--gold);
}

.team-card .role {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.9rem;
  color: var(--mercury);
}

.team-card > p:not(.role) {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.team-social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.team-social .fa-brands {
  font-family: "Font Awesome 6 Brands";
  font-weight: 400;
}

.team-social__svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

.team-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(126, 200, 232, 0.08);
  color: var(--mercury);
  text-decoration: none;
  font-size: 1.2rem;
  transition:
    color 0.15s,
    border-color 0.15s,
    background 0.15s,
    transform 0.15s;
}

@media (hover: hover) {
  .team-social a:hover {
    color: var(--mercury-bright);
    border-color: rgba(212, 168, 75, 0.45);
    background: rgba(126, 200, 232, 0.16);
    transform: translateY(-2px);
  }
}

.team-social a:active {
  transform: scale(0.96);
}

.team-social a:focus-visible {
  outline: 2px solid var(--mercury);
  outline-offset: 2px;
}

/* Footer */
.site-footer {
  padding-left: max(clamp(1rem, 4vw, 2rem), env(safe-area-inset-left));
  padding-right: max(clamp(1rem, 4vw, 2rem), env(safe-area-inset-right));
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.footer-tagline {
  margin: 0;
  font-family: var(--font-serif);
  color: var(--gold);
}

.footer-rights {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

html[lang="zh-Hant"] body {
  letter-spacing: 0.02em;
}

/* ——— Mobile & narrow screens ——— */
@media (max-width: 720px) {
  :root {
    --panel-border: 22px;
    --panel-border-thin: 14px;
    --header-h: 3.5rem;
  }

  body {
    font-size: 1rem;
  }

  .chainoa-panel--header {
    --border-w: 14px;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
  }

  .site-header__bar {
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-areas:
      "brand menu lang"
      "nav nav nav";
    align-items: center;
    gap: 0.5rem 0.4rem;
  }

  .brand {
    grid-area: brand;
    min-width: 0;
  }

  .brand-mark {
    height: 1.65rem;
    max-width: min(180px, 52vw);
  }

  .nav-toggle {
    display: inline-block;
    grid-area: menu;
    min-height: 2.75rem;
    min-width: 2.75rem;
    padding: 0.4rem 0.65rem;
  }

  .lang-switch {
    grid-area: lang;
    margin-left: 0;
    gap: 0.25rem;
  }

  .lang-toggle {
    min-width: 5.25rem;
  }

  .lang-toggle {
    border-width: 8px;
    border-image-width: 8px;
  }

  .lang-toggle__label {
    font-size: 0.72rem;
    padding: 0.3rem 0.4rem;
  }

  .site-nav {
    grid-area: nav;
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.35rem;
    padding-top: 0.25rem;
    max-height: min(70dvh, 420px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav .chainoa-btn--nav {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.88rem;
    white-space: normal;
    border-width: 10px;
    border-image-width: 10px;
  }

  .hero {
    min-height: auto;
    padding: 1.25rem 0.85rem 2rem;
    padding-left: max(0.85rem, env(safe-area-inset-left));
    padding-right: max(0.85rem, env(safe-area-inset-right));
  }

  .chainoa-panel--hero {
    padding: 1rem 0.85rem 1.15rem;
    max-width: 100%;
  }

  .hero-copy .tagline {
    max-width: none;
    font-size: 1rem;
    padding: 0 0.15rem;
  }

  .eyebrow {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
  }

  .chainoa-btn--lg {
    width: 100%;
    max-width: 18rem;
    min-height: 3rem;
  }

  .section {
    padding: 2.25rem 0.85rem;
    padding-left: max(0.85rem, env(safe-area-inset-left));
    padding-right: max(0.85rem, env(safe-area-inset-right));
  }

  .section-lead {
    max-width: none;
    margin-bottom: 1.35rem;
    font-size: 1.02rem;
  }

  .about .chainoa-panel {
    padding: 1rem 0.85rem;
  }

  .chapter-badge {
    font-size: 0.88rem;
    line-height: 1.4;
  }

  .screenshot-grid,
  .talent-grid,
  .feature-grid,
  .team-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .hero-roster {
    gap: 1rem;
  }

  .hero-card {
    width: min(100%, 200px);
  }

  .chainoa-panel--footer {
    margin-bottom: max(1rem, env(safe-area-inset-bottom));
    padding: 1rem 0.85rem;
  }

  .ken-burns__layer {
    inset: -8%;
  }
}

@media (max-width: 380px) {
  .nav-toggle {
    padding: 0.35rem 0.5rem;
    font-size: 0.72rem;
  }
}

@media (min-width: 721px) {
  .nav-toggle {
    display: none !important;
  }

  .site-nav {
    display: flex !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .ken-burns__layer {
    animation: none !important;
    transition: none;
  }

  .ken-burns__layer:not(.is-visible) {
    display: none;
  }
}
