/* DISCADE website. Colours, radii, spacing and durations come from tokens.css,
   generated from the app's lib/design_system/tokens.dart: never type a colour
   here. Only logical properties (inline/block), so Arabic mirrors by itself.
   See DESIGN.md. */

/* ── Base ─────────────────────────────────────────────────────────────── */

:root {
  --font-body: 'Nunito', system-ui, sans-serif;
  --font-display: 'Baloo 2', 'Nunito', system-ui, sans-serif;
  --leading: 1.6;
  --stroke: 0.14em;
  --wrap: 1120px;
  --gutter: 16px;
  --panel-frame: 10px;
  color-scheme: light;
}

/* Each language references only its own fonts, so nobody downloads a script
   they do not read. Baloo 2 has no Cyrillic: Russian titles use Nunito. */
:root:lang(ar) {
  --font-body: 'Noto Sans Arabic', 'Nunito', system-ui, sans-serif;
  --font-display: 'Noto Sans Arabic', 'Nunito', system-ui, sans-serif;
  --leading: 1.85;
  --stroke: 0.09em;
}
:root:lang(hi) {
  --font-body: 'Nunito', 'Noto Sans Devanagari', system-ui, sans-serif;
  --font-display: 'Baloo 2', 'Nunito', 'Noto Sans Devanagari', system-ui, sans-serif;
  --leading: 1.75;
  --stroke: 0.1em;
}
:root:lang(ja) {
  --font-body: 'Nunito', 'Noto Sans JP', system-ui, sans-serif;
  --font-display: 'Baloo 2', 'Nunito', 'Noto Sans JP', system-ui, sans-serif;
  --leading: 1.75;
  --stroke: 0.09em;
}
:root:lang(ko) {
  --font-body: 'Nunito', 'Noto Sans KR', system-ui, sans-serif;
  --font-display: 'Baloo 2', 'Nunito', 'Noto Sans KR', system-ui, sans-serif;
  --leading: 1.75;
  --stroke: 0.09em;
}
:root:lang(zh-Hans) {
  --font-body: 'Nunito', 'Noto Sans SC', system-ui, sans-serif;
  --font-display: 'Baloo 2', 'Nunito', 'Noto Sans SC', system-ui, sans-serif;
  --leading: 1.75;
  --stroke: 0.09em;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-block-start: var(--space-lg);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: var(--leading);
  color: var(--ceramic);
  /* Polished wood planks. */
  background-color: var(--wood-dark);
  background-image:
    repeating-linear-gradient(
      180deg,
      transparent 0 118px,
      color-mix(in srgb, var(--outline) 45%, transparent) 118px 120px
    ),
    repeating-linear-gradient(
      100deg,
      transparent 0 34px,
      color-mix(in srgb, var(--wood-deep) 18%, transparent) 34px 36px,
      transparent 36px 90px
    ),
    linear-gradient(180deg, var(--wood-dark), var(--wood-deep));
  overflow-wrap: break-word;
}

main {
  flex: 1;
}

img,
svg {
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 var(--space-sm);
}

p {
  margin: 0 0 var(--space-md);
}

bdi {
  unicode-bidi: isolate;
}

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--outline);
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap.narrow {
  max-width: 780px;
}

.skip {
  position: absolute;
  inset-inline-start: var(--space-sm);
  inset-block-start: -100px;
  z-index: 10;
  padding: var(--space-xs) var(--space-md);
  background: var(--cream-panel);
  color: var(--text-dark);
  font-weight: 800;
  border: 3px solid var(--outline);
  border-radius: var(--radius-sm);
}

.skip:focus {
  inset-block-start: var(--space-sm);
}

.small {
  font-size: 14px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.icon {
  width: 22px;
  height: 22px;
  flex: none;
}

/* Outlined game title: amber fill, dark contour, soft drop shadow (GameText). */
.display,
.section-title {
  color: var(--amber);
  -webkit-text-stroke: var(--stroke) var(--outline);
  paint-order: stroke fill;
  text-shadow: 0 4px 0 var(--text-shadow);
  letter-spacing: 0.01em;
}

.display strong {
  color: var(--ceramic);
  font-weight: inherit;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 var(--space-sm);
  padding: 2px var(--space-sm);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--outline);
  background: var(--gold);
  border: 2px solid var(--outline);
  border-radius: var(--radius-pill);
}

:root:lang(ar) .eyebrow,
:root:lang(hi) .eyebrow,
:root:lang(ja) .eyebrow,
:root:lang(ko) .eyebrow,
:root:lang(zh-Hans) .eyebrow {
  letter-spacing: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

/* Japanese has no spaces between words: break titles at phrase boundaries
   (where supported), and keep CJK titles a size smaller. */
:root:lang(ja) :is(h1, h2, h3, .chip) {
  word-break: auto-phrase;
}

:root:is(:lang(ja), :lang(ko), :lang(zh-Hans)) .hero h1 {
  font-size: clamp(34px, 7vw, 52px);
}

/* ── Panels and buttons ───────────────────────────────────────────────── */

.panel {
  position: relative;
  color: var(--text-dark);
  background: var(--cream-panel);
  border: var(--panel-frame) solid var(--wood-mid);
  border-radius: var(--radius-lg);
  box-shadow:
    0 0 0 2px var(--outline),
    inset 0 0 0 2px var(--wood-light),
    0 10px 18px var(--shadow-strong);
  padding: var(--space-lg);
}

.panel a {
  color: var(--coral-text);
  font-weight: 700;
}

.btn {
  --face: var(--neutral-face);
  --label: var(--outline);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 52px;
  padding: var(--space-xs) var(--space-lg);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  line-height: 1.1;
  text-decoration: none;
  color: var(--label);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--white) 38%, transparent) 0 14px, transparent 14px),
    var(--face);
  border: 3px solid var(--outline);
  border-radius: var(--radius-md);
  box-shadow:
    0 6px 0 color-mix(in srgb, var(--face) 70%, var(--black)),
    0 6px 0 3px var(--outline),
    0 12px 10px var(--shadow);
  margin-block-end: 9px;
  transition: transform var(--duration-press) ease-out, box-shadow var(--duration-press) ease-out;
}

.panel .btn {
  color: var(--label);
}

.btn:hover {
  filter: brightness(1.04);
}

.btn:active {
  transform: translateY(5px);
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--face) 70%, var(--black)),
    0 1px 0 3px var(--outline),
    0 4px 6px var(--shadow);
}

.btn-primary {
  --face: var(--success);
}

.btn-secondary {
  --face: var(--amber);
}

.ribbon {
  display: inline-block;
  margin: 0 0 var(--space-xs);
  padding: var(--space-xs) var(--space-lg);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.25;
  color: var(--outline);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--white) 35%, transparent) 0 10px, transparent 10px),
    var(--gold);
  border: 3px solid var(--outline);
  border-radius: var(--radius-sm);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--gold) 65%, var(--black)), 0 5px 0 3px var(--outline);
}

/* ── Header ───────────────────────────────────────────────────────────── */

.site-header {
  background: var(--wood-deep);
  border-block-end: 3px solid var(--outline);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--outline) 40%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
}

.brand img {
  display: block;
  width: 116px;
  height: auto;
}

.main-nav {
  margin-inline-start: auto;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding-inline: var(--space-sm);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.main-nav a:hover,
.main-nav a[aria-current] {
  color: var(--amber);
}

/* ── Language picker ──────────────────────────────────────────────────── */

.lang-picker {
  position: relative;
}

.lang-picker summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 4px var(--space-sm);
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  color: var(--ceramic);
  background: var(--badge-pill);
  border: 2px solid var(--badge-pill-border);
  border-radius: var(--radius-pill);
}

.lang-picker summary::-webkit-details-marker {
  display: none;
}

.lang-picker .lang-name {
  max-width: 9em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chevron {
  width: 18px;
  height: 18px;
  transition: transform var(--duration-fast);
}

details[open] > summary .chevron {
  transform: rotate(180deg);
}

.lang-list {
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: calc(100% + 8px);
  z-index: 5;
  width: max-content;
  max-width: calc(100vw - 2 * var(--gutter));
  max-height: 70vh;
  overflow: auto;
  margin: 0;
  padding: var(--space-xs);
  list-style: none;
  background: var(--cream-panel);
  border: 3px solid var(--outline);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 18px var(--shadow-strong);
}

.up .lang-list {
  inset-block-start: auto;
  inset-block-end: calc(100% + 8px);
}

/* Language names are shown in a system font: a page only loads its own language's fonts. */
.lang-list a,
.chooser-list a {
  font-family: system-ui, sans-serif;
}

.lang-list a {
  display: block;
  padding: 10px var(--space-md);
  min-height: 44px;
  color: var(--text-dark);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.lang-list a:hover,
.lang-list a[aria-current] {
  background: var(--neutral-face);
}

.lang-list a[aria-current]::after {
  content: ' ✓';
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding-block: var(--space-xl) var(--space-xxl);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: var(--space-lg);
  align-items: center;
}

.hero h1 {
  font-size: clamp(40px, 9vw, 64px);
  margin-block-end: var(--space-md);
}

.lead {
  font-size: 19px;
  max-width: 34em;
}

.hero-visual {
  display: flex;
  justify-content: center;
  /* Warm light behind the board only, never behind text (it would lower the text contrast). */
  background: radial-gradient(closest-side, var(--board-halo), transparent);
}

.hero-board {
  width: 100%;
  max-width: 560px;
  height: auto;
  overflow: visible;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin-block: var(--space-md);
}

.store-badge {
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  border-radius: var(--radius-sm);
}

.store-badge img {
  display: block;
  height: 54px;
  width: auto;
}

/* Google's badge carries its own transparent margin. */
.store-badge.play img {
  height: 80px;
  margin-block: -13px;
  margin-inline: -12px;
}

html[data-platform='ios'] .store-badge.play,
html[data-platform='android'] .store-badge.app-store {
  display: none;
}

.stores-soon {
  margin-block: var(--space-md);
}

.stores-soon .small {
  opacity: 0.9;
}

/* ── Board drawing (hero and 404) ─────────────────────────────────────── */

.tile-a {
  fill: var(--wood-light);
}

.tile-b {
  fill: color-mix(in srgb, var(--wood-light) 62%, var(--wood-mid));
}

.tile-a,
.tile-b {
  stroke: color-mix(in srgb, var(--outline) 35%, transparent);
  stroke-width: 1;
}

.board-left {
  fill: var(--wood-mid);
}

.board-right {
  fill: color-mix(in srgb, var(--wood-mid) 70%, var(--wood-dark));
}

.board-left,
.board-right {
  stroke: var(--outline);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.board-shadow {
  fill: var(--shadow);
}

.disc-side {
  fill: var(--ceramic-shadow);
}

.disc-face {
  fill: var(--ceramic);
}

.disc-side,
.disc-face {
  stroke: var(--outline);
  stroke-width: 2.2;
  stroke-linejoin: round;
}

.disc-ring {
  fill: none;
  stroke: var(--ceramic-shadow);
  stroke-width: 2;
}

.amber .disc-face {
  fill: var(--amber);
}

.amber .disc-side {
  fill: color-mix(in srgb, var(--amber) 70%, var(--outline));
}

.amber .disc-ring {
  stroke: color-mix(in srgb, var(--amber) 70%, var(--outline));
}

.pedestal {
  fill: var(--gold);
  stroke: var(--outline);
  stroke-width: 2.2;
}

.pedestal-glow {
  fill: color-mix(in srgb, var(--amber) 45%, transparent);
  stroke: var(--amber);
  stroke-width: 5;
  opacity: 0;
}

.pedestal-dot {
  fill: var(--outline);
}

.ready-ring {
  fill: none;
  stroke: var(--amber);
  stroke-width: 4;
}

.arrow path {
  fill: var(--ceramic);
  stroke: var(--outline);
  stroke-width: 3;
  stroke-linejoin: round;
}

/* The chain, 9 s per loop (DESIGN.md "Hero"). Each disc moves by whole
   squares: one square down the row is (44, 22), one disc level is 10. */
@media (prefers-reduced-motion: no-preference) {
  .hero-board .disc {
    animation: 9s linear infinite both;
  }

  .hero-board .d-a1 { animation-name: disc-a1; }
  .hero-board .d-a2 { animation-name: disc-a2; }
  .hero-board .d-a3 { animation-name: disc-a3; }
  .hero-board .d-b1 { animation-name: disc-b1; }
  .hero-board .d-b2 { animation-name: disc-b2; }
  .hero-board .d-b3 { animation-name: disc-b3; }
  .hero-board .d-b4 { animation-name: disc-b4; }

  .hero-board .arrow {
    animation: arrow 9s linear infinite both;
  }

  .hero-board .ready-ring {
    animation: ready 9s linear infinite both;
  }

  .hero-board .pedestal-glow {
    animation: pedestal 9s linear infinite both;
  }
}

@keyframes disc-a1 {
  0%, 13.33% { transform: translate(0, 0); opacity: 1; animation-timing-function: ease-out; }
  16.67% { transform: translate(22px, -29px); animation-timing-function: ease-in; }
  20%, 88.89% { transform: translate(44px, 22px); opacity: 1; }
  93.33% { transform: translate(44px, 22px); opacity: 0; }
  93.34% { transform: translate(0, 0); opacity: 0; }
  100% { transform: translate(0, 0); opacity: 1; }
}

@keyframes disc-a2 {
  0%, 15% { transform: translate(0, 0); opacity: 1; animation-timing-function: ease-out; }
  18.33% { transform: translate(44px, -23px); animation-timing-function: ease-in; }
  21.67%, 88.89% { transform: translate(88px, 54px); opacity: 1; }
  93.33% { transform: translate(88px, 54px); opacity: 0; }
  93.34% { transform: translate(0, 0); opacity: 0; }
  100% { transform: translate(0, 0); opacity: 1; }
}

@keyframes disc-a3 {
  0%, 16.67% { transform: translate(0, 0); opacity: 1; animation-timing-function: ease-out; }
  20% { transform: translate(66px, -37px); animation-timing-function: ease-in; }
  23.33%, 33.33% { transform: translate(132px, 46px); opacity: 1; animation-timing-function: ease-out; }
  36.67% { transform: translate(242px, 81px); animation-timing-function: ease-in; }
  40% { transform: translate(352px, 196px); opacity: 1; animation-timing-function: ease-in; }
  45%, 93.34% { transform: translate(352px, 316px); opacity: 0; }
  93.35% { transform: translate(0, 0); opacity: 0; }
  100% { transform: translate(0, 0); opacity: 1; }
}

@keyframes disc-b1 {
  0%, 26.67% { transform: translate(0, 0); opacity: 1; animation-timing-function: ease-out; }
  30% { transform: translate(22px, -19px); animation-timing-function: ease-in; }
  33.33%, 88.89% { transform: translate(44px, 22px); opacity: 1; }
  93.33% { transform: translate(44px, 22px); opacity: 0; }
  93.34% { transform: translate(0, 0); opacity: 0; }
  100% { transform: translate(0, 0); opacity: 1; }
}

@keyframes disc-b2 {
  0%, 28.33% { transform: translate(0, 0); opacity: 1; animation-timing-function: ease-out; }
  31.67% { transform: translate(44px, 7px); animation-timing-function: ease-in; }
  35% { transform: translate(88px, 54px); opacity: 1; animation-timing-function: ease-in; }
  40%, 93.34% { transform: translate(88px, 174px); opacity: 0; }
  93.35% { transform: translate(0, 0); opacity: 0; }
  100% { transform: translate(0, 0); opacity: 1; }
}

@keyframes disc-b3 {
  0%, 30% { transform: translate(0, 0); opacity: 1; animation-timing-function: ease-out; }
  33.33% { transform: translate(66px, 3px); animation-timing-function: ease-in; }
  36.67% { transform: translate(132px, 86px); opacity: 1; animation-timing-function: ease-in; }
  41.67%, 93.34% { transform: translate(132px, 206px); opacity: 0; }
  93.35% { transform: translate(0, 0); opacity: 0; }
  100% { transform: translate(0, 0); opacity: 1; }
}

@keyframes disc-b4 {
  0%, 31.67% { transform: translate(0, 0); opacity: 1; animation-timing-function: ease-out; }
  35% { transform: translate(88px, 19px); animation-timing-function: ease-in; }
  38.33% { transform: translate(176px, 118px); opacity: 1; animation-timing-function: ease-in; }
  43.33%, 93.34% { transform: translate(176px, 238px); opacity: 0; }
  93.35% { transform: translate(0, 0); opacity: 0; }
  100% { transform: translate(0, 0); opacity: 1; }
}

@keyframes arrow {
  0% { opacity: 0; }
  4.4%, 12.2% { opacity: 1; }
  13.33%, 100% { opacity: 0; }
}

@keyframes ready {
  0% { opacity: 0.3; }
  6%, 14%, 22% { opacity: 1; }
  10%, 18% { opacity: 0.35; }
  26.67%, 93.34% { opacity: 0; }
  100% { opacity: 0.3; }
}

@keyframes pedestal {
  0%, 33% { opacity: 0; }
  35%, 88.89% { opacity: 1; }
  93.33%, 100% { opacity: 0; }
}

/* ── Sections ─────────────────────────────────────────────────────────── */

.section {
  padding-block: var(--space-xl);
}

.section-title {
  font-size: clamp(30px, 6vw, 40px);
}

.section-intro {
  font-size: 18px;
  max-width: 40em;
  margin-block-end: var(--space-lg);
}

.steps {
  display: grid;
  gap: var(--space-lg);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.step {
  padding-block-start: var(--space-xl);
  margin-block-start: var(--space-md);
}

.step h3 {
  font-size: 22px;
  color: var(--text-dark);
}

.step p {
  margin: 0;
}

.medallion {
  position: absolute;
  inset-block-start: -30px;
  inset-inline-start: var(--space-md);
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  font-family: 'Baloo 2', 'Nunito', system-ui, sans-serif;
  font-weight: 800;
  font-size: 28px;
  color: var(--ceramic);
  -webkit-text-stroke: 5px var(--outline);
  paint-order: stroke fill;
  background:
    radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--white) 45%, transparent), transparent 45%),
    var(--amber);
  border: 3px solid var(--outline);
  border-radius: 50%;
  box-shadow: 0 4px 0 var(--outline);
}

/* Worlds: a swipeable row on phones, a grid on wide screens. */
.worlds {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 62%);
  gap: var(--space-md);
  margin: 0;
  padding: var(--space-xs) 2px var(--space-md);
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}

.world {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--cream-panel);
  border: 3px solid var(--outline);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 0 var(--outline), 0 12px 14px var(--shadow);
}

.world img {
  display: block;
  width: 100%;
  aspect-ratio: 390 / 420;
  object-fit: cover;
  object-position: top;
  border-block-end: 3px solid var(--outline);
}

.world-band {
  flex: 1;
  padding: var(--space-sm) var(--space-md) var(--space-md);
  color: var(--text-dark);
  border-block-start: 8px solid var(--world-color, var(--wood-mid));
}

.world-number {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.world h3 {
  font-size: 20px;
  margin-block: 2px var(--space-xs);
}

.world p {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.world-1 { --world-color: var(--world-1-primary); }
.world-2 { --world-color: var(--world-2-primary); }
.world-3 { --world-color: var(--world-3-primary); }
.world-4 { --world-color: var(--world-4-primary); }
.world-5 { --world-color: var(--world-5-primary); }
.world-6 { --world-color: var(--world-6-primary); }
.world-7 { --world-color: var(--world-7-primary); }
.world-8 { --world-color: var(--world-8-primary); }
.world-9 { --world-color: var(--world-9-primary); }
.world-10 { --world-color: var(--world-10-primary); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  padding: var(--space-xs) var(--space-md);
  font-weight: 700;
  color: var(--text-dark);
  background: var(--neutral-face);
  border: 3px solid var(--outline);
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 0 var(--outline);
}

.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 62%);
  gap: var(--space-md);
  margin: 0;
  padding: var(--space-xs) 2px var(--space-md);
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}

.shots li {
  scroll-snap-align: start;
}

.shots img {
  display: block;
  width: 100%;
  border: 3px solid var(--outline);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 0 var(--outline), 0 12px 14px var(--shadow);
}

.worlds:focus-visible,
.shots:focus-visible,
.table-wrap:focus-visible {
  box-shadow: none;
}

.get-panel {
  text-align: center;
}

.get-panel .section-title {
  margin-block-end: var(--space-md);
}

.get-panel .stores {
  justify-content: center;
}

.get-panel .stores-soon .small {
  opacity: 1;
}

/* ── Inner pages ──────────────────────────────────────────────────────── */

.page-hero {
  padding-block: var(--space-xl) var(--space-lg);
}

.page-hero h1 {
  font-size: clamp(34px, 7vw, 52px);
}

.intro,
.updated {
  font-size: 18px;
}

.support-layout,
.legal-layout {
  display: grid;
  gap: var(--space-lg);
  align-items: start;
  padding-block-end: var(--space-xxl);
}

.faq {
  padding: 0;
  margin-block-end: var(--space-md);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: 56px;
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  list-style: none;
}

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

.faq summary h3 {
  margin: 0;
  font-size: 20px;
  color: var(--text-dark);
}

.faq summary .chevron {
  width: 26px;
  height: 26px;
  color: var(--outline);
}

.faq-body {
  padding: 0 var(--space-lg) var(--space-sm);
}

.faq-body ul {
  padding-inline-start: 1.2em;
}

.faq-body li {
  margin-block-end: var(--space-xs);
}

.contact-panel {
  text-align: center;
}

.contact-panel h2 {
  font-size: 26px;
  color: var(--text-dark);
}

.contact-icon {
  width: 44px;
  height: 44px;
  color: var(--wood-mid);
  margin-block-end: var(--space-xs);
}

.toc h2 {
  font-size: 20px;
  color: var(--text-dark);
}

.toc ol {
  margin: 0;
  padding-inline-start: 1.3em;
}

.toc li {
  margin-block-end: 6px;
}

.legal {
  padding: var(--space-lg) var(--space-md);
}

.legal h2 {
  font-size: 24px;
  color: var(--text-dark);
  margin-block-start: var(--space-lg);
}

.legal section:first-of-type h2 {
  margin-block-start: var(--space-sm);
}

.legal h3 {
  font-size: 19px;
}

.legal ul,
.legal ol {
  padding-inline-start: 1.3em;
}

.legal li {
  margin-block-end: var(--space-xs);
}

.translation-note,
.note {
  padding: var(--space-sm) var(--space-md);
  background: var(--neutral-face);
  border: 2px solid var(--wood-light);
  border-radius: var(--radius-sm);
  font-size: 15px;
}

.table-wrap {
  overflow-x: auto;
  margin-block: var(--space-sm) var(--space-md);
  border: 2px solid var(--wood-light);
  border-radius: var(--radius-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}

th,
td {
  padding: 10px var(--space-sm);
  text-align: start;
  vertical-align: top;
  border-block-end: 1px solid var(--wood-light);
}

thead th {
  font-family: var(--font-display);
  font-weight: 800;
  background: var(--neutral-face);
}

tbody th {
  font-weight: 700;
}

tbody tr:last-child > * {
  border-block-end: 0;
}

/* Long package names and links wrap instead of widening the table. */
.legal td a,
.legal th span {
  word-break: break-word;
}

/* ── 404, Play Store page and language chooser ────────────────────────── */

.not-found {
  padding-block: var(--space-xl) var(--space-xxl);
  text-align: center;
}

.not-found h1 {
  font-size: clamp(34px, 7vw, 52px);
}

.toppled {
  width: 320px;
  height: auto;
  margin-block-end: var(--space-md);
}

.app-icon {
  border-radius: 22px;
  border: 3px solid var(--outline);
  margin-block-end: var(--space-md);
}

.chooser-main {
  padding-block: var(--space-xxl);
  text-align: center;
}

.chooser-main img {
  width: 240px;
  margin-block-end: var(--space-lg);
}

.chooser-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}

.chooser-list a {
  display: block;
  padding: var(--space-sm);
  font-weight: 700;
  color: var(--text-dark);
  text-decoration: none;
  background: var(--cream-panel);
  border: 3px solid var(--outline);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 0 var(--outline);
}

.chooser-list a:hover {
  background: var(--neutral-face);
}

/* ── Footer ───────────────────────────────────────────────────────────── */

.site-footer {
  margin-block-start: auto;
  padding-block: var(--space-xl) var(--space-md);
  background: var(--wood-deep);
  border-block-start: 3px solid var(--outline);
  font-size: 15px;
}

.footer-grid {
  display: grid;
  gap: var(--space-lg);
}

.site-footer h2 {
  font-size: 18px;
  color: var(--gold);
  margin-block-end: var(--space-xs);
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li a,
.footer-contact a {
  display: inline-block;
  padding-block: 6px;
}

.site-footer address {
  font-style: normal;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-block-start: var(--space-lg);
  padding-block-start: var(--space-md);
  border-block-start: 1px solid color-mix(in srgb, var(--ceramic) 25%, transparent);
}

/* ── Wider screens ────────────────────────────────────────────────────── */

/* On the narrowest phones the language pill shows only its globe. */
@media (max-width: 419px) {
  .site-header .lang-picker .lang-name {
    display: none;
  }

  .main-nav a {
    padding-inline: var(--space-xs);
  }
}

@media (min-width: 560px) {
  .worlds,
  .shots {
    grid-auto-columns: minmax(200px, 40%);
  }

  .brand img {
    width: 150px;
  }
}

@media (min-width: 760px) {
  :root {
    --gutter: 24px;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .shots {
    grid-auto-columns: minmax(200px, 30%);
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
  }

  .legal {
    padding: var(--space-xl);
  }
}

@media (min-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr 1.1fr;
  }

  .steps {
    grid-template-columns: repeat(4, 1fr);
  }

  .worlds {
    grid-auto-flow: row;
    grid-template-columns: repeat(5, 1fr);
    overflow: visible;
  }

  .shots {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, 1fr);
    overflow: visible;
  }

  .support-layout {
    grid-template-columns: 1fr 320px;
  }

  .contact-panel {
    position: sticky;
    inset-block-start: var(--space-lg);
  }

  .legal-layout {
    grid-template-columns: 260px 1fr;
  }

  .toc {
    position: sticky;
    inset-block-start: var(--space-lg);
    max-height: calc(100vh - 2 * var(--space-lg));
    overflow: auto;
  }
}

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

  .btn,
  .chevron {
    transition: none;
  }
}
