/* Shore to deep: cream paper above the waterline, then the water darkens section by section to the app's navy.
 * The colour is all here in CSS; the 3D sea (src/lib/sea-world.ts) is one canvas between it and the text. */
@import url("./tokens.css");
@import url("./base.css");

/* Chrome */
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body { touch-action: manipulation; }
.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-3xl)); z-index: var(--z-toast); padding: var(--space-xs) var(--space-md); border-radius: var(--radius-control); background: var(--color-accent); color: var(--color-accent-ink); }
.skip:focus-visible { top: var(--space-md); }
img { -webkit-user-drag: none; }

/* One backdrop behind every page, as in the lobby */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: url("/img/ui-backdrop.webp") center / cover no-repeat; }

/* Buttons are the game's own (plate-*.webp in client/assets/lobby): the art's pointed caps are the side borders, its middle stretches */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); box-sizing: border-box; height: 56px; padding: 0 var(--space-xs); border: solid transparent; border-width: 0 28px; border-image: url("/img/btn-gold.webp") 0 80 fill / 0 46px; color: #120b02; font: 700 var(--text-md)/1 var(--font-body); letter-spacing: 0.01em; white-space: nowrap; text-decoration: none; cursor: pointer; transition: filter var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.btn svg { flex: none; fill: currentColor; }
.btn:active { border-image-source: url("/img/btn-gold-pressed.webp"); color: var(--color-on-ink); transform: translateY(2px); }
.btn:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; border-radius: var(--radius-pill); }
.btn--quiet { border-image-source: url("/img/btn-blue.webp"); color: var(--color-on-ink); }
.btn--quiet:active { border-image-source: url("/img/btn-blue-pressed.webp"); }
.btn--sm { height: 44px; border-width: 0 22px; border-image-width: 0 36px; padding-inline: var(--space-2xs); font-size: var(--text-sm); }
@media (hover: hover) and (pointer: fine) { .btn:hover { filter: brightness(1.12); } }

.nav { position: sticky; top: 0; z-index: var(--z-sticky-nav); background: color-mix(in oklch, var(--color-night) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding-top: env(safe-area-inset-top); border-bottom: 1px solid var(--color-line); }
.nav-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); min-height: 72px; }
.brand { display: block; flex-shrink: 0; border-radius: var(--radius-control); }
/* The art has its own margin round it */
.brand img { width: auto; height: 60px; margin-left: -5px; }
.nav ul { display: flex; align-items: center; gap: var(--space-2xs); margin: 0; padding: 0; list-style: none; }
.nav a:not(.brand, .btn) { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-md); border-radius: var(--radius-control); color: var(--color-on-ink); font-weight: 500; text-decoration: none; white-space: nowrap; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.nav a:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 0; }
.nav a:active:not(.brand, .btn) { background: var(--color-night-2); }
@media (hover: hover) and (pointer: fine) { .nav a:hover:not(.brand, .btn) { background: var(--color-night-2); color: var(--color-accent); } }
.nav { transition: background-color var(--dur-long) var(--ease-out), border-color var(--dur-long) var(--ease-out); }
.nav--shore { background: var(--shore-paper); border-color: var(--shore-rule); }
.nav--shore a:not(.brand, .btn) { color: var(--shore-ink); }
.nav--shore a:focus-visible { outline-color: var(--shore-coral); }
.nav--shore a:active:not(.brand, .btn) { background: var(--shore-rule); }
@media (hover: hover) and (pointer: fine) { .nav--shore a:hover:not(.brand, .btn) { background: var(--shore-rule); color: var(--shore-ink); } }

/* Sections share one head block and one rhythm */
section { padding-block: var(--section-gap); }
.head { display: grid; gap: var(--space-md); margin-bottom: var(--space-2xl); }
.head--center { justify-items: center; text-align: center; }
.head .lead, .lead { color: var(--color-muted); }

/* The world: water behind (-3), what stands in it (-2), the canvas (-1), the text */
.world { position: relative; isolation: isolate; overflow: clip; }
/* Over an animal the pointer says it can be pressed */
.on-animal { cursor: pointer; }
canvas.sea { position: fixed; inset: 0; z-index: -1; width: 100vw; height: 100lvh; padding: 0; background: none; pointer-events: none; }
/* By touch the page scrolls ahead of the drawing, so there the canvas lies in the page, half a screen taller than the screen */
canvas.sea--flow { position: absolute; inset: 0 auto auto 0; height: 150lvh; will-change: transform; }
/* Panels are the section's own water with light in it */
.sea { position: relative; --surface: color-mix(in oklab, var(--deep) 84%, #8fd2ff); --color-panel: var(--surface); --color-night-2: var(--surface); }
.sea::before { content: ""; position: absolute; inset: -1px 0; z-index: -3; background: var(--deep); }
.sea .lead, .sea .head .lead { color: oklch(93% 0.03 220); }

/* One card off the sheet. Where a 3D card rests, the picture only holds its place */
.face { display: block; aspect-ratio: 408 / 592; border-radius: 5.6% / 3.9%; background: url("/img/cards.webp") no-repeat; box-shadow: 0 var(--space-xs) var(--space-lg) var(--color-shadow); }
.gl .face[data-card], .gl .cc { visibility: hidden; }

/* Hero: paper, sun and the deck, with the sea along its foot */
.shore { --color-focus: var(--shore-coral); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60' viewBox='0 0 120 60' fill='none' stroke='%23e9c98c' stroke-opacity='.28' stroke-width='2'%3E%3Cg id='a'%3E%3Ccircle cx='60' cy='60' r='58'/%3E%3Ccircle cx='60' cy='60' r='44'/%3E%3Ccircle cx='60' cy='60' r='30'/%3E%3Ccircle cx='60' cy='60' r='16'/%3E%3C/g%3E%3Cg fill='%23f4ecdb' fill-opacity='0'%3E%3Ccircle cx='0' cy='90' r='58'/%3E%3Ccircle cx='120' cy='90' r='58'/%3E%3C/g%3E%3C/svg%3E") 50% 0 / 120px 60px, var(--shore-paper); color: var(--shore-ink); }
.hero { position: relative; display: grid; align-items: start; padding-block: var(--space-2xl) 0; overflow: clip; background: none; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -3; background: inherit; }
.hero.shore { background: none; }
.hero.shore::before { background: radial-gradient(45% 60% at 72% 40%, oklch(99% 0.02 85), transparent), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60' viewBox='0 0 120 60' fill='none' stroke='%23e2b566' stroke-opacity='.3' stroke-width='1.5'%3E%3Cpath d='M2 60a58 58 0 0 1 116 0M16 60a44 44 0 0 1 88 0M30 60a30 30 0 0 1 60 0M44 60a16 16 0 0 1 32 0'/%3E%3C/svg%3E") 50% 0 / 120px 60px, var(--shore-paper); }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap-columns); align-items: center; min-height: min(calc(100svh - 72px - 330px), 640px); }
.hero-sun { position: absolute; z-index: -2; left: 23%; bottom: 120px; width: clamp(220px, 21vw, 320px); height: auto; overflow: visible; }
.hero-sun circle { fill: var(--shore-sun); }
.hero-sun path { stroke: var(--shore-sun); stroke-width: 3; stroke-linecap: round; }
.hero-coral { position: absolute; z-index: -2; top: 0; right: 0; width: clamp(140px, 18vw, 280px); scale: -1 1; }
.pitch { display: grid; justify-items: start; gap: var(--space-lg); max-width: 34rem; }
.pitch h1 { max-width: 12ch; font-size: clamp(2.5rem, 4.6vw + 0.75rem, 5.25rem); font-weight: 900; line-height: 1; }
.shore .lead, .shore .free-note { color: var(--shore-ink-2); }
.shore .store { color: var(--shore-ink); }
.shore a.store:hover { color: var(--shore-coral); }
.hero-cards { position: relative; align-self: stretch; min-height: 460px; }
.hc { position: absolute; width: min(35%, 270px); }
.hc--j { left: 21%; top: 11%; } .hc--q { left: 41%; top: 4%; } .hc--k { left: 61%; top: 11%; }
.hero-deck { position: absolute; left: 0; bottom: -4%; width: min(20%, 140px); aspect-ratio: 408 / 592; }
.waterline { position: relative; height: 220px; margin-top: var(--space-3xl); }
/* Still waves until the 3D ones come */
.waterline::before { content: ""; position: absolute; inset: auto 0 50%; height: 110px; background: linear-gradient(transparent 50%, #0f6b7f), radial-gradient(circle at 50% 100%, #0f6b7f 0 22%, #f2c04f 22% 24%, #0f6b7f 24% 40%, #f2c04f 40% 42%, #0f6b7f 42% 58%, #f2c04f 58% 60%, #0f6b7f 60% 68%, transparent 68%) 50% 100% / 160px 110px repeat-x; }
.gl .waterline::before { content: none; }
.gl .waterline { margin-bottom: clamp(40px, 6vw, 90px); }
.waterline::after { content: ""; position: absolute; inset: 50% 0 -100px; z-index: -3; background: #0f6b7f; }
.free-note { color: var(--color-ink-2); font-size: var(--text-sm); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-md); margin-top: var(--space-xs); }
.stores { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-lg); }
.store { display: grid; place-items: center; width: 44px; height: 44px; color: var(--color-ink); fill: currentColor; transition: color var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.store svg { fill: currentColor; }
a.store:hover { color: var(--color-accent); transform: translateY(-2px); }
.store--soon { opacity: 0.4; cursor: default; }

[data-game="thaas"] { --c: var(--game-thaas); }
[data-game="dihaeh"] { --c: var(--game-dihaeh); }
[data-game="digu"] { --c: var(--game-digu); }
[data-game="bondi"] { --c: var(--game-bondi); }
[data-game="ranga-bondi"] { --c: var(--game-ranga-bondi); }

/* Games: five characters, each in front of a Sea card */
/* Room under the shelf for the manta */
.games { padding-block: var(--section-gap-s) clamp(180px, 22vw, 340px); }
/* Eased, and each section starts on the colour the last one ended on, so no seam shows */
.sea::before { --to: var(--deep-to, var(--deep)); background: linear-gradient(var(--deep) var(--hold, 0px), color-mix(in oklab, var(--deep) 84%, var(--to)) 25%, color-mix(in oklab, var(--deep), var(--to)) 50%, color-mix(in oklab, var(--deep) 16%, var(--to)) 75%, var(--to)); }
/* The last waves are drawn in the flat colour */
.games, .rules { --hold: 220px; }
.games { --deep-to: #0b5c7b; }
.head--center h2 { max-width: 22ch; }
.pods { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-md); margin: var(--space-2xl) 0 0; padding: 0; list-style: none; }
.pods a { display: grid; justify-items: center; gap: var(--space-2xs); padding-bottom: var(--space-sm); border-radius: var(--radius-card); color: var(--color-on-ink); text-align: center; text-decoration: none; }
.pod-art { position: relative; width: 100%; aspect-ratio: 4 / 5; }
.pod-card { position: absolute; top: 0; left: 15%; width: 70%; }
.pod-char { position: absolute; left: 50%; bottom: 0; translate: -50% 0; width: auto; max-width: none; height: 106%; mask-image: linear-gradient(black 84%, transparent); filter: drop-shadow(0 var(--space-xs) var(--space-md) oklch(20% 0.06 230 / 0.5)); transition: transform 320ms var(--ease-out); }
.pods h3 { max-width: none; font-size: var(--text-xl); transition: color var(--dur-short) var(--ease-out); }
.pod-sub { color: oklch(93% 0.03 220); font-size: var(--text-sm); }
.pods a:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 4px; }
.pods a:active .pod-char { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .pods a:hover .pod-char { transform: translateY(calc(-1 * var(--space-sm))) scale(1.03); } .pods a:hover h3 { color: var(--color-accent); } }
.tile-char { width: auto; max-width: none; height: 100%; }
.tile-card { scale: var(--s, 1); position: absolute; inset: 0; left: var(--tx, 0); width: 100%; height: 100%; max-width: none; transform-origin: var(--o); transition: translate 360ms var(--ease-out), rotate 360ms var(--ease-out); }
@keyframes card-float { 50% { transform: translateY(calc(-1 * var(--space-xs))) rotate(-2deg); } }

/* Game pages: cream shore with the game's own sun, then that game's water */
.gp { --sun: color-mix(in oklab, var(--water), white 10%); }
.gp-hero { padding-top: var(--space-lg); }
.gp-grid { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--gap-columns); align-items: center; }
.gp-copy { display: grid; justify-items: start; gap: var(--space-md); padding-bottom: var(--space-xl); }
.crumbs { color: var(--shore-ink-2); font-size: var(--text-sm); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--shore-ink); border-radius: var(--radius-control); }
.crumbs a:focus-visible { outline: 3px solid var(--color-focus); outline-offset: var(--space-2xs); }
.gp-copy h1 { color: var(--water); font-size: clamp(3.25rem, 7.4vw, 7.5rem); font-weight: 900; line-height: 0.92; }
.gp-sub { color: var(--shore-ink); font: var(--display-weight) var(--text-2xl)/1.1 var(--font-display); }
.gp-facts { display: flex; flex-wrap: wrap; gap: var(--space-2xs) 0; margin: var(--space-2xs) 0; padding: 0; list-style: none; color: var(--shore-ink); font-weight: 500; }
.gp-facts li { display: inline-flex; align-items: center; }
.gp-facts li:not(:last-child)::after { content: ""; width: 8px; height: 8px; margin-inline: var(--space-md); rotate: 45deg; background: var(--sun); }
.gp-stage { position: relative; width: min(100%, 620px); aspect-ratio: 1; margin-inline: auto; }
.gp-sun { position: absolute; z-index: -2; left: 50%; top: 52%; width: 92%; height: auto; translate: -50% -50%; overflow: visible; }
.gp-sun circle { fill: var(--sun); }
.gp-sun path { stroke: var(--sun); stroke-width: 2.6; stroke-linecap: round; }
.gp-card { position: absolute; translate: -50% 0; }
.gp-deck { position: absolute; left: -9%; bottom: -3%; width: 17%; aspect-ratio: 408 / 592; }
.gp .waterline { margin-top: calc(-1 * var(--space-2xl)); }
.gp .waterline::after { background: var(--water); }
.gp .waterline::before { --w: var(--water); background: linear-gradient(transparent 50%, var(--w)), radial-gradient(circle at 50% 100%, var(--w) 0 22%, #f2c04f 22% 24%, var(--w) 24% 40%, #f2c04f 40% 42%, var(--w) 42% 58%, #f2c04f 58% 60%, var(--w) 60% 68%, transparent 68%) 50% 100% / 160px 110px repeat-x; }
.gh-fig { position: absolute; left: 50%; bottom: -4%; height: 104%; translate: calc(-50% + var(--fx, 0px)) 0; filter: drop-shadow(0 var(--space-sm) var(--space-lg) oklch(25% 0.05 60 / 0.4)); mask-image: linear-gradient(black 88%, transparent); }
.gh-fig--top { filter: none; mask-image: none; inset: 0; translate: none; }
.gh-fig .tile-char { width: auto; max-width: none; height: 100%; }
.gh-fig .tile-card { position: absolute; inset: 0; left: var(--tx, 0); width: 100%; height: 100%; max-width: none; transform-origin: var(--o); rotate: var(--rot); animation: card-float 2.4s var(--ease-in-out) infinite; animation-delay: var(--d); }

/* The rules: text on one side, the cards it talks about on the other, swapping as you go down */
.rules { --deep-to: #0b1f55; padding-block: var(--section-gap-s) var(--section-gap); }
.rules .head { max-width: 46rem; margin-bottom: clamp(150px, 16vw, 240px); }
.steps { display: grid; gap: clamp(88px, 9vw, 150px); margin: 0; padding: 0; list-style: none; }
.steps > li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-2xl); align-items: center; }
.steps > li:nth-child(even) .step-text { order: 2; }
.steps > li:nth-child(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.step-text { display: grid; justify-items: start; gap: var(--space-sm); }
/* The ring arch of the Sea cards, round the number */
.step-n { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 4px, color-mix(in oklch, var(--color-accent), transparent 20%) 4px 6px); color: var(--color-on-ink); font: 900 var(--text-2xl)/1 var(--font-display); }
.step-n { background: radial-gradient(circle, var(--water) 0 24px, transparent 24px), repeating-radial-gradient(circle, transparent 0 5px, var(--color-accent) 5px 7px); }
.step-text h3 { font-size: clamp(1.75rem, 2.4vw, 2.5rem); line-height: 1.08; }
.step-text p { max-width: 46ch; color: oklch(95% 0.02 250); font-size: var(--text-lg); line-height: 1.5; }
.step-show { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-lg) var(--space-xl); }
.step-show figure, .try-trick { display: grid; justify-items: center; gap: var(--space-lg); margin: 0; text-align: center; }
.step-show figcaption, .try-trick figcaption { max-width: 24ch; color: oklch(95% 0.02 250); font-weight: 500; }
.deal { --dw: 132px; display: flex; justify-content: center; }
.deal--mid { --dw: 118px; } .deal--many { --dw: 112px; }
.dc { position: relative; width: var(--dw); flex: none; }
.dc + .dc { margin-left: calc(var(--dw) * -0.34); }
.deal--many .dc + .dc { margin-left: calc(var(--dw) * -0.54); }
.deal--backs .dc + .dc { margin-left: calc(var(--dw) * -0.66); }
.step-show--3 { gap: var(--space-md); } .step-show--3 .deal { --dw: 112px; } .step-show--3 .step-arrow { width: 48px; }
.step-arrow { width: 72px; height: auto; fill: var(--color-accent); }
.step-or { width: 1px; height: 150px; background: color-mix(in oklch, var(--color-accent), transparent 45%); }
.step-score { color: var(--color-accent); font: 900 clamp(4rem, 8vw, 8rem)/0.9 var(--font-display); }
.step--hi { padding: var(--space-2xl) var(--space-xl); border-radius: var(--radius-card); background: color-mix(in oklch, var(--water), transparent 55%); outline: 1px solid color-mix(in oklch, var(--color-accent), transparent 60%); }
.seats { position: relative; display: block; width: min(440px, 78vw); padding: 46px 40px 40px; }
.seats .art { width: 100%; }
/* Partners share a colour: gold across from gold, white from white */
.seat { position: absolute; width: 58px; height: 58px; border: 4px solid var(--color-on-ink); border-radius: 50%; background: radial-gradient(circle, transparent 0 8px, currentColor 8px 10px, transparent 10px 15px, currentColor 15px 17px, transparent 17px), #0b1f55; box-shadow: 0 var(--space-xs) var(--space-md) oklch(10% 0.05 268 / 0.5); color: var(--color-on-ink); }
.seat--a { border-color: var(--color-accent); color: var(--color-accent); }
.seat:nth-of-type(1) { left: calc(50% - 29px); top: 8px; } .seat:nth-of-type(3) { left: calc(50% - 29px); bottom: 34px; } .seat:nth-of-type(2) { left: 14px; top: 40%; } .seat:nth-of-type(4) { right: 14px; top: 40%; }

/* Try it */
.try { --deep-to: #0b1846; padding-block: var(--section-gap) var(--space-2xl); }
.try .head { margin-bottom: var(--space-xl); }
.try-table { display: grid; justify-items: center; gap: var(--space-2xl); }
.try-hand { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-lg) var(--space-md); padding-top: var(--space-xl); }
.try-card { --tw: 148px; width: var(--tw); padding: 0; border: 0; border-radius: 5.6% / 3.9%; background: none; cursor: pointer; transition: transform var(--dur-short) var(--ease-out); }
.try-hand--many .try-card { --tw: 104px; }
.try-card:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 8px; }
html:not(.gl) .try-card[data-up="yes"] { transform: translateY(calc(var(--tw) * -0.3)); }
html:not(.gl) .try-card[data-up="no"] { animation: try-no 360ms var(--ease-out); }
@keyframes try-no { 25% { transform: translateX(-7px); } 60% { transform: translateX(6px); } }
.try-say { min-height: 3.2em; max-width: 60ch; margin: var(--space-xl) auto 0; color: var(--color-on-ink); font-size: var(--text-lg); font-weight: 500; text-align: center; text-wrap: balance; }
.try-say--yes { color: var(--color-accent); }

.others { --deep-to: #0a1440; padding-block: var(--section-gap-s) var(--space-xl); }
.pods--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 1120px; margin-inline: auto; }
.gp .close-copy { gap: var(--space-xl); }

/* Ranks: the emblem in front of a hand that gains a card at every rank */
.ranks { --deep-to: #0a4a72; padding-block: var(--section-gap-s) var(--section-gap); }
.ladder { --step: 40px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; max-width: 1312px; margin: 0 auto; padding: 0; list-style: none; }
.ladder li { position: relative; display: grid; justify-items: center; margin-bottom: calc(var(--i) * var(--step)); text-align: center; }
.ladder li:nth-child(1) { --r: var(--rank-loai); } .ladder li:nth-child(2) { --r: var(--rank-rihi); } .ladder li:nth-child(3) { --r: var(--color-accent); } .ladder li:nth-child(4) { --r: var(--rank-alimas); } .ladder li:nth-child(5) { --r: var(--rank-hudanbaru); }
/* Sized in em, so a phone only changes the font size */
.rk-art { position: relative; width: 0; height: 14.4em; font-size: 16px; }
.rk-art::before { content: ""; position: absolute; z-index: -2; left: -10em; top: -1.5em; width: 20em; height: 17em; background: radial-gradient(closest-side, color-mix(in oklch, var(--r) 55%, transparent), transparent); }
.rk-card { position: absolute; width: 6.4em; margin-left: -3.2em; }
.rk-icon { position: absolute; bottom: 0; left: 0; width: auto; max-width: none; height: 9.6em; translate: -50% 0; filter: drop-shadow(0 0.4em 0.7em oklch(12% 0.06 260 / 0.75)); }
.ladder li:last-child .rk-art { height: 15.6em; }
.ladder li:last-child .rk-icon { height: 11.2em; }
/* The top rank's emblem floats; hovering another rank hands the float to it */
@keyframes rk-float { 50% { translate: -50% calc(-1 * var(--space-sm)); } }
.ladder li:last-child .rk-icon, .ladder li:hover .rk-icon { animation: rk-float 2.4s var(--ease-in-out) infinite; }
.ladder:has(li:hover) li:last-child:not(:hover) .rk-icon { animation: none; }
.rk-step { position: relative; display: grid; justify-items: center; gap: var(--space-2xs); margin-top: var(--space-md); }
.rk-step b { font: var(--display-weight) var(--text-xl)/1.2 var(--font-display); }
.rk-step > span:not(.rk-div) { color: oklch(93% 0.03 220); font-size: var(--text-sm); }
.rk-div { display: flex; gap: var(--space-xs); margin-top: var(--space-2xs); }
.rk-div i { width: 8px; height: 8px; rotate: 45deg; background: color-mix(in oklch, var(--r), white 35%); }
.js [data-reveal] { opacity: 0; transform: translateY(var(--space-xs)); transition: opacity var(--dur-long) var(--ease-out), transform var(--dur-long) var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Modes: four ways to play, a card dealt to each */
.modes { --deep-to: #0a3a66; }
.modes-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap-columns); margin: 0; padding: 0; list-style: none; }
.modes-row li { display: grid; align-content: start; gap: var(--space-xs); }
.mode-art { position: relative; display: grid; justify-items: center; align-items: end; margin-bottom: var(--space-lg); }
.mode-card { grid-area: 1 / 1; width: min(78%, 220px); }
.mode-icon { position: absolute; bottom: -26px; width: auto; max-height: 104px; filter: drop-shadow(0 var(--space-xs) var(--space-sm) oklch(10% 0.05 268 / 0.7)); transition: translate var(--dur-short) var(--ease-out); }
.modes-row p { color: oklch(93% 0.03 220); }
@media (hover: hover) and (pointer: fine) { .modes-row li:hover .mode-icon { translate: 0 calc(-1 * var(--space-xs)); } }

/* Leagues and tournaments */
/* Room under the prizes for the whale shark */
.compete { --deep-to: #0a2c5a; padding-block: var(--section-gap-s) clamp(220px, 26vw, 420px); }
.lg-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap-columns); align-items: center; }
.lg-copy { display: grid; justify-items: start; gap: var(--space-sm); }
.lg-soon { padding: var(--space-2xs) var(--space-md); border: 1px solid var(--color-accent); border-radius: var(--radius-pill); color: var(--color-accent); font-size: var(--text-sm); font-weight: 500; }
.lg-copy h2 { max-width: 14ch; font-size: var(--text-display-s); line-height: 1; overflow-wrap: break-word; min-width: 0; }
.lg-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); margin-top: var(--space-md); justify-self: stretch; }
.lg-card, .bonus li, .prog article { --arch: rgb(242 192 79 / 0.34); position: relative; overflow: hidden; border-radius: var(--radius-card); background: linear-gradient(var(--surface), color-mix(in oklab, var(--surface) 55%, var(--deep))); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.2), 0 24px 40px -24px rgb(2 8 36 / 0.7); }
/* The waterline's arches along the foot, fading to one side */
:is(.lg-card, .bonus li, .prog article)::after { content: ""; position: absolute; inset: auto 0 0; height: 28px; background: radial-gradient(circle at 50% 100%, transparent 8px, var(--arch) 8.5px 9.5px, transparent 10px 17px, var(--arch) 17.5px 18.5px, transparent 19px 26px, var(--arch) 26.5px 27.5px, transparent 28px) 0 0 / 56px 28px repeat-x; mask-image: linear-gradient(to left, black, transparent 70%); pointer-events: none; }
.lg-card, .bonus li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--space-lg); align-items: center; padding: var(--space-lg) var(--space-lg) calc(var(--space-lg) + 12px); }
.lg-card img, .bonus img { width: 72px; height: auto; filter: drop-shadow(0 var(--space-2xs) var(--space-sm) var(--color-shadow)); }
.lg-card > div, .bonus li > div { display: grid; gap: var(--space-2xs); }
.lg-card h3 { color: var(--color-accent); font-size: var(--text-lg); }
.comp-big { font: var(--display-weight) var(--text-lg)/1.1 var(--font-display); }
.lg-card p:not(.comp-big), .sea .bonus span, .sea .comp-note, .sea .prog p { color: oklch(93% 0.03 220); }
/* The knockout: four, two, and the belt */
.bracket { display: grid; justify-items: center; gap: var(--space-xl); }
.bracket-row { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-sm); width: 100%; max-width: 420px; }
.av { justify-self: center; width: 94%; aspect-ratio: 1; border: 3px solid transparent; border-radius: 50%; background: url("/img/avatars.webp") calc(var(--c) * 50%) calc(var(--r) * 100%) / 300% 200% padding-box, linear-gradient(#ffe9a8, #f2c04f 45%, #9a6618) border-box; box-shadow: 0 12px 24px -8px rgb(2 8 36 / 0.7); }
.bracket-row--2 { grid-template-columns: repeat(2, 1fr); }
.bracket-row--2 .av { width: 58%; }
.bracket-row::before, .bracket-row--4::after { content: ""; position: absolute; top: calc(-1 * var(--space-lg)); height: 16px; border: solid var(--color-accent); border-width: 2px 2px 0; }
.bracket-row--2::before { left: 25%; right: 25%; }
.bracket-row--4::before { left: 12.5%; width: 25%; } .bracket-row--4::after { right: 12.5%; width: 25%; }
.lg-belt { width: min(100%, 460px); height: auto; filter: drop-shadow(0 0 var(--space-2xl) var(--color-glow)); }
.lg-sub { max-width: none; margin: var(--space-xl) 0 var(--space-md); padding-top: var(--space-xl); font-size: var(--text-xl); }
.bonus { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-md); margin: 0; padding: 0; list-style: none; }
.bonus img { justify-self: center; max-height: 84px; object-fit: contain; }
.bonus b { font: var(--display-weight) var(--text-lg)/1.1 var(--font-display); }
.bonus span { color: var(--color-muted); }
.comp-note { margin-top: var(--space-md); color: var(--color-muted); font-size: var(--text-sm); text-align: center; }

/* Skins: pick a table, see it under the cards */
.skins { padding: 0; }
.skin-band { --deep-to: #0a1e4c; padding-block: var(--section-gap); }
.skin-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap-columns); align-items: center; }
.skin-main { display: grid; gap: var(--space-lg); }
.skin-main .head { margin: 0; }
/* One sheet holds every table, as cards.webp holds every card, so none sits on the site as a file of its own */
.art { display: block; background: url("/img/skins.webp") no-repeat; }
.art--table { aspect-ratio: 840 / 472; background-size: 200% auto; background-position: calc(var(--c) * 100%) calc(var(--r) * 100%); }
.art--card { box-shadow: 0 2px var(--space-xs) var(--color-shadow); }
.stage { position: relative; aspect-ratio: 16 / 12; margin: 0; }
.stage-table { position: absolute; z-index: -2; left: 0; top: 25%; width: 100%; opacity: 0; filter: drop-shadow(0 var(--space-lg) var(--space-lg) var(--color-shadow)); transition: opacity var(--dur-long) var(--ease-out); }
.stage-table[data-t="royal-blue"],
.skins:has(#t-stone-heritage:checked) .stage-table[data-t="stone-heritage"],
.skins:has(#t-royal:checked) .stage-table[data-t="royal"],
.skins:has(#t-wood:checked) .stage-table[data-t="wood"] { opacity: 1; }
.skins:has(.picker--tables input:checked:not(#t-royal-blue)) .stage-table[data-t="royal-blue"] { opacity: 0; }
/* Backs and fronts fan out as one hand above the table */
.stage-hand { position: absolute; inset: 0 8% auto; height: 58%; }
.sc { position: absolute; top: 12%; width: 24%; }
.sc:nth-child(1) { left: 2%; top: 21%; } .sc:nth-child(2) { left: 74%; top: 21%; } .sc:nth-child(3) { left: 20%; top: 11%; } .sc:nth-child(4) { left: 38%; top: 8%; } .sc:nth-child(5) { left: 56%; top: 11%; }
.stage-name { display: grid; justify-items: center; gap: var(--space-xs); margin: calc(-1 * var(--space-xl)) 0 0; }
.stage-name b { display: none; font: var(--display-weight) var(--text-2xl)/1.1 var(--font-display); }
.stage-name b[data-t="royal-blue"], .skins:has(#t-stone-heritage:checked) .stage-name b[data-t="stone-heritage"], .skins:has(#t-royal:checked) .stage-name b[data-t="royal"], .skins:has(#t-wood:checked) .stage-name b[data-t="wood"] { display: block; }
.skins:has(.picker--tables input:checked:not(#t-royal-blue)) .stage-name b[data-t="royal-blue"] { display: none; }
.stage-name span { padding: var(--space-2xs) var(--space-md); border: 1px solid var(--color-accent); border-radius: var(--radius-pill); color: var(--color-accent); font-size: var(--text-sm); font-weight: 500; }
.skin-panel { display: grid; gap: var(--space-lg); padding: var(--space-xl); border-radius: var(--radius-card); background: linear-gradient(var(--surface), color-mix(in oklab, var(--surface) 55%, var(--deep))); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.2), 0 24px 40px -24px rgb(2 8 36 / 0.7); --color-night-2: color-mix(in oklab, var(--deep) 70%, transparent); }
.skin-tabs { display: flex; gap: var(--space-lg); border-bottom: 1px solid var(--color-rule-on-ink); }
.skin-tabs input, .picker input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.skin-tabs label { padding: var(--space-sm) var(--space-2xs); border-bottom: 3px solid transparent; margin-bottom: -1px; color: var(--color-muted); font-weight: 500; cursor: pointer; transition: color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out); }
.skin-tabs input:checked + label { border-color: var(--color-accent); color: var(--color-accent); }
.skin-tabs input:focus-visible + label { outline: 3px solid var(--color-focus); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .skin-tabs label:hover { color: var(--color-on-ink); } }
.picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm); margin: 0; padding: 0; border: 0; }
.picker--backs, .picker--fronts, .skins:has(:is(#tab-backs, #tab-fronts):checked) .picker--tables { display: none; }
.skins:has(#tab-backs:checked) .picker--backs, .skins:has(#tab-fronts:checked) .picker--fronts { display: grid; }
.picker--fronts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fan { display: flex; justify-content: center; padding-block: var(--space-xs); }
.fan .face { width: 34%; filter: drop-shadow(0 2px var(--space-xs) var(--color-shadow)); }
.fan .face + .face { margin-left: -14%; }
.fan .face:first-child { rotate: -10deg; } .fan .face:last-child { rotate: 10deg; translate: 0 var(--space-2xs); }
.picker label { position: relative; display: grid; gap: var(--space-xs); padding: var(--space-sm); border: 2px solid var(--color-rule-on-ink); border-radius: var(--radius-control); background: var(--color-night-2); font-weight: 500; cursor: pointer; transition: border-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.picker--backs .face { width: 40%; justify-self: center; border-radius: var(--space-2xs); }
.picker label:active { transform: scale(0.97); }
.picker input:checked + label { border-color: var(--color-accent); }
.picker input:checked + label::after { content: "✓"; position: absolute; top: var(--space-xs); right: var(--space-xs); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--color-accent); color: var(--color-accent-ink); font-size: var(--text-sm); font-weight: 700; }
.picker input:focus-visible + label { outline: 3px solid var(--color-focus); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .picker label:hover { border-color: var(--color-accent-lo); } }
.skin-facts { display: grid; margin: 0; border-top: 1px solid var(--color-rule-on-ink); }
.skin-facts div { display: grid; grid-template-columns: 7rem auto minmax(0, 1fr); gap: var(--space-md); align-items: center; padding-block: var(--space-sm); border-bottom: 1px solid var(--color-rule-on-ink); }
.skin-facts dt { font-weight: 500; }
.skin-facts dd { margin: 0; color: var(--color-muted); font-size: var(--text-sm); }
.skin-thumbs { display: flex; gap: var(--space-xs); }
.skin-thumbs .face { width: 32px; border-radius: 3px; }

/* Throwables: a big stage for the picked one, the picker beside it */
.throws-band { --deep-to: #0a1a48; padding-block: var(--section-gap); }
.throws-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-2xl); align-items: center; }
/* The canvas plays the app's own landing for each throwable; its edges fade out so nothing ends on a hard line */
.throw-show { position: relative; aspect-ratio: 4 / 3; margin: 0; }
.throw-show canvas { position: absolute; inset: 0; width: 100%; height: 100%; -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent); mask-image: radial-gradient(closest-side, #000 72%, transparent); }
/* One sheet holds every throwable; --i picks the cell */
.throw-art { display: block; width: 64px; aspect-ratio: 1; background: url("/img/throwables.webp") calc(var(--i, 0) * 25%) 0 / 500% 100%; }
/* Without scripts the stage shows the faivan, still */
.throw-show .throw-art { position: absolute; inset: 0; width: auto; height: 64%; margin: auto; }
.js .throw-show .throw-art { display: none; }
.throw-side { display: grid; gap: var(--space-lg); min-width: 0; }
.throw-pick { display: grid; gap: var(--space-xs); min-width: 0; margin: 0; padding: 0; border: 0; }
.throw-pick legend { margin-bottom: var(--space-sm); padding: 0; font: var(--display-weight) var(--text-xl)/1.15 var(--font-display); }
.throw-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.throw-pick label { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: var(--space-md); align-items: center; padding: var(--space-sm) var(--space-md); border: 2px solid var(--color-rule); border-radius: var(--radius-control); background: var(--color-panel); cursor: pointer; transition: border-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.throw-pick .throw-art { grid-row: span 2; }
.throw-pick b { align-self: end; font-size: var(--text-lg); line-height: 1.2; }
.throw-pick label span { align-self: start; color: var(--color-muted); font-size: var(--text-sm); }
.throw-pick label:active { transform: translateY(2px); }
.throw-pick input:checked + label { border-color: var(--color-accent); background: color-mix(in oklab, var(--color-accent) 10%, var(--color-panel)); box-shadow: 0 var(--space-2xs) 0 var(--color-accent-lo); }
.throw-pick input:focus-visible + label { outline: 3px solid var(--color-focus); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .throw-pick label:hover { border-color: var(--color-accent-lo); } }
.emoji-band { --deep-to: #0b1846; padding-bottom: var(--section-gap); }
.emoji-row { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: var(--space-lg); }
/* One animated strip holds all ten; --i picks the cell */
.emoji-row i { aspect-ratio: 1; background: url("/img/emoji.webp") calc(var(--i) * 100% / 9) 0 / 1000% 100%; }
@media (prefers-reduced-motion: reduce) { .emoji-row i { background-image: url("/img/emoji-still.webp"); } }
.emote-band { --deep-to: #0b1745; padding-bottom: var(--section-gap); }
.emote-band .container { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-2xl); align-items: center; }
.emote-band .head { margin: 0; }
/* One clip plays all three taking turns; the art fills half its frame, which leaves room for the overlap */
.emote-pile { display: grid; justify-items: center; }
.emote-pile img, .emote-pile video { width: min(100%, 420px); height: auto; }
/* They pop up one after another, then keep taking turns to hop */
@media (prefers-reduced-motion: no-preference) {
  .js .emoji-row.is-in i { animation: emoji-pop 480ms var(--ease-out) calc(var(--i) * 160ms) backwards, emoji-hop 5s ease-in-out calc(var(--i) * 500ms + 2400ms) infinite; }
}
@keyframes emoji-pop { 0% { opacity: 0; scale: 0; } 60% { opacity: 1; scale: 1.2; } 100% { scale: 1; } }
@keyframes emoji-hop { 0%, 12%, 100% { translate: 0 0; scale: 1; } 6% { translate: 0 -18%; scale: 1.15; } }

/* Progress */
.progress h2 { margin-bottom: var(--space-2xl); }
.prog { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-columns); }
.prog article { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: var(--space-xs) var(--space-lg); align-items: center; padding: var(--space-xl); }
.prog img { grid-row: span 2; width: 100%; height: 180px; object-fit: contain; }
.prog h3 { align-self: end; }
.prog p { align-self: start; color: var(--color-ink-2); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.clans { --deep-to: #0a2350; --emblem: #FFC21A; --emblem-art: url("/img/clan-emblem-1.svg"); padding-block: var(--section-gap-s); }
.clans-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-2xl); align-items: center; }
.clan-feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg) var(--gap-columns); margin: 0 0 var(--space-lg); padding: 0; list-style: none; }
.clan-feats li { display: grid; align-content: start; gap: var(--space-xs); padding-top: var(--space-md); border-top: 3px solid var(--color-accent); }
.clan-feats b { font: var(--display-weight) var(--text-lg)/1.2 var(--font-display); }
.clan-feats p { color: var(--color-ink-2); font-size: var(--text-sm); }
.clan-card { display: grid; justify-items: center; gap: var(--space-md); }
.clan-flag { display: grid; place-items: center; position: relative; width: min(100%, 520px); }
/* The glow lies behind the canvas, or it would tint the cloth */
.clan-flag::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(closest-side, color-mix(in oklch, var(--emblem) 38%, transparent), transparent); }
.clan-cloth { position: relative; display: grid; width: min(84%, 420px); }
.clan-cloth img { width: 100%; height: auto; }
/* On the cloth: under the rod, above the point */
.clan-emblem { position: absolute; left: 27%; top: 23%; width: 46%; aspect-ratio: 1; background: var(--emblem); -webkit-mask: var(--emblem-art) center / contain no-repeat; mask: var(--emblem-art) center / contain no-repeat; transition: background-color var(--dur-long) var(--ease-out); }
.gl .clan-cloth { cursor: pointer; }
.gl .clan-cloth > * { opacity: 0; }
.clan-color { margin: 0; font: var(--display-weight) var(--text-xl)/1.1 var(--font-display); }
.clan-color b { display: none; }
.clan-emblems { display: flex; justify-content: center; gap: var(--space-sm); margin: 0; padding: 0; border: 0; }
.clan-emblems input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.clan-emblems label { display: grid; place-items: center; width: 60px; height: 60px; border: 2px solid var(--color-rule-on-ink); border-radius: var(--radius-control); background: var(--color-night-2); cursor: pointer; transition: border-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.clan-emblems label::before { content: ""; width: 40px; height: 40px; background: var(--emblem); -webkit-mask: var(--art) center / contain no-repeat; mask: var(--art) center / contain no-repeat; }
.clan-emblems label:active { transform: scale(0.94); }
.clan-emblems input:checked + label { border-color: var(--color-accent); }
.clan-emblems input:focus-visible + label { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.clan-swatches { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-xs); margin: 0; padding: 0; border: 0; }
.clan-swatches legend { width: 100%; margin-bottom: var(--space-sm); padding: 0; color: var(--color-muted); font-size: var(--text-sm); text-align: center; }
.clan-swatches input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.clan-swatches label { width: 44px; height: 44px; border: 3px solid var(--color-night); border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--color-rule); cursor: pointer; transition: box-shadow var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.clan-swatches label:active { transform: scale(0.94); }
.clan-swatches input:checked + label { box-shadow: 0 0 0 3px var(--color-accent); }
.clan-swatches input:focus-visible + label { outline: 3px solid var(--color-focus); outline-offset: 4px; }
.clans .comp-note { text-align: left; }

/* Close: the whole deck opens over the sea floor */
.progress { --deep-to: #0a1440; }
.close { --deep-to: #060b27; padding-bottom: clamp(220px, 26vw, 420px); overflow: clip; }
.close::after { content: ""; position: absolute; inset: auto 0 0; z-index: -3; height: clamp(200px, 30vw, 480px); background: url("/img/sea/seabed.webp") 50% 100% / max(1344px, 100%) auto no-repeat; mask-image: linear-gradient(transparent, black 45%); }
.reef { position: absolute; bottom: 0; z-index: -2; width: clamp(170px, 24vw, 400px); }
.reef--left { left: 0; } .reef--right { right: 0; }
.close-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--space-3xl); align-items: center; }
.close-copy { display: grid; justify-items: start; gap: var(--space-lg); }
.close-art .logo-intro { position: absolute; inset: 0; width: 31%; margin: auto; }
html:not(.gl) .close-art .logo-intro { inset: auto 0 0; }
.close-copy p { color: var(--color-muted); font-size: var(--text-lead); max-width: 34ch; }
.gl .close-art { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.gl .close-art:active { cursor: grabbing; }
.close-art .logo-intro { pointer-events: none; transition: opacity var(--dur-long) var(--ease-out); }
.close-art.is-drawn .logo-intro { opacity: 0; }
.close-art { order: 2; position: relative; width: min(100%, 560px); aspect-ratio: 1; margin: 0 auto; }
.cc { position: absolute; top: 22%; width: 36%; }
.cc:nth-child(1) { left: 8%; } .cc:nth-child(2) { left: 32%; top: 18%; } .cc:nth-child(3) { left: 56%; }

/* The app's logo intros (LogoIntro.astro) */
.logo-intro { display: block; height: auto; }
.logo-intro:not([src]) { visibility: hidden; }
/* The art is white: on the cream it turns to ink, and its red stays red */
.get .logo-intro, .nav--shore .logo-intro { filter: url(#ink); }

/* Footer: one statement, then the links */
.foot { position: relative; background: #060b27; padding-block: var(--space-3xl) var(--space-xl); border-top: 1px solid var(--color-rule); }
.foot-line { font: var(--display-weight) var(--text-section)/1.05 var(--font-display); max-width: 22ch; text-wrap: balance; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-md); margin-top: var(--space-2xl); padding-top: var(--space-lg); border-top: 1px solid var(--color-rule); color: var(--color-muted); font-size: var(--text-sm); }
.foot nav { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-lg); }
.credits { margin-top: var(--space-md); color: var(--color-muted); font-size: var(--text-xs); }
.foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--color-on-ink); white-space: nowrap; }
.foot a:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .foot a:hover { color: var(--color-accent); } }

/* Account deletion page */
.doc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gap-columns); align-items: start; max-width: 72rem; margin-inline: auto; padding: var(--space-xl) var(--gutter) var(--space-2xl); }
.doc > :not(.card), .doc > .card:last-of-type { grid-column: 1 / -1; }
.doc > a { justify-self: start; }
.doc > a img { width: 160px; }
.doc h1 { margin-top: var(--space-lg); font-size: var(--text-section); }
.doc > p { margin-top: var(--space-sm); color: var(--color-muted); font-size: var(--text-lead); }
.doc .card { display: grid; gap: var(--space-md); margin-top: var(--space-xl); padding: var(--space-xl); border: 1px solid var(--color-line); border-radius: var(--radius-card); background: var(--color-panel); }
.doc .card h2 { font-size: var(--text-2xl); }
.doc .card h2:not(:first-child) { margin-top: var(--space-md); }
.doc ol, .doc ul { display: grid; gap: var(--space-xs); margin: 0; padding-left: var(--space-lg); }
.doc a:not(.btn) { color: var(--color-ink); text-decoration-color: var(--color-accent-lo); }
.doc a:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.doc footer { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-lg); margin-top: var(--space-xl); padding-top: var(--space-lg); border-top: 1px solid var(--color-rule); font-size: var(--text-sm); }

/* The download link: phones are sent on to their store, everyone else picks one here */
.get { display: grid; place-content: center; justify-items: center; gap: var(--space-lg); min-height: 100svh; padding: var(--space-xl) var(--gutter); text-align: center; }
.get .logo-intro { width: min(64vw, 340px); }
.get h1 { font-size: var(--text-section); }
.get .stores { justify-content: center; }
.get > a:last-child { color: var(--shore-ink-2); }
.get p { color: var(--shore-ink-2); }

/* Small screens */
@media (max-width: 60rem) {
  .hero { padding-top: var(--space-lg); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-cards { order: -1; min-height: 0; width: min(100%, 520px); aspect-ratio: 5 / 4; margin-inline: auto; }
  .hero-sun { left: auto; right: 4%; bottom: 70px; width: 200px; }
  .waterline { height: 160px; }
  .gp-stage { order: -1; width: min(88%, 520px); }
  .gp .waterline { margin-top: 0; }
  .steps > li, .steps > li:nth-child(even) { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
  .steps > li:nth-child(even) .step-text { order: 0; }
  .step-show { justify-content: flex-start; }
  .modes-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-2xl); }
  .bracket { order: -1; }
  .gp-grid, .close-grid, .skin-grid, .throws-grid, .clans-grid, .prog, .lg-top, .lg-cards, .bonus { grid-template-columns: minmax(0, 1fr); }
  .pods { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .pods li { grid-column: span 2; } .pods li:nth-child(4) { grid-column: 2 / span 2; }
  .pods--4 li, .pods--4 li:nth-child(4) { grid-column: span 3; } .pods--4 { max-width: 620px; }
  .ladder { --step: 28px; }
  .rk-art { font-size: 1.28vw; }
  .rk-step b { font-size: var(--text-lg); }
  .throws-grid { row-gap: var(--space-xl); }
  .emoji-row { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-md); }
  .emote-band .container { grid-template-columns: minmax(0, 1fr); }
  .close-art { order: 0; }
  .doc { grid-template-columns: minmax(0, 1fr); }
  .doc > .card { grid-column: 1 / -1; }
}
@media (max-width: 40rem) {
  .clan-feats { grid-template-columns: minmax(0, 1fr); }
  .pods { gap: var(--space-md); }
  .pods li, .pods li:nth-child(4) { grid-column: span 3; }
  .pods:not(.pods--4) li:last-child { grid-column: 1 / -1; width: 50%; justify-self: center; }
  .nav .btn { margin-left: var(--space-xs); }
  .nav ul { gap: 0; }
  .nav li:has(> a[href^="/#"]):not(:first-child) { display: none; }
  .brand img { height: 46px; }
  .nav-bar { gap: var(--space-xs); }
  .modes-row { gap: var(--space-2xl) var(--space-md); }
  .mode-icon { max-height: 72px; }
  .modes-row p { font-size: var(--text-sm); }
  .skin-panel { padding: var(--space-lg); }
  .skin-facts div { grid-template-columns: 6rem minmax(0, 1fr); }
  .skin-facts dd:last-child { grid-column: 2; }
  .prog article { grid-template-columns: minmax(0, 1fr); padding: var(--space-lg) var(--space-lg) calc(var(--space-lg) + 16px); }
  .prog img { grid-row: auto; height: 140px; justify-self: start; width: auto; }
  .ladder { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
  .ladder li { grid-template-columns: 180px minmax(0, 1fr); align-items: center; justify-items: center; margin-bottom: 0; }
  .ladder li:last-child { order: -5; } .ladder li:nth-child(4) { order: -4; } .ladder li:nth-child(3) { order: -3; } .ladder li:nth-child(2) { order: -2; }
  .ladder li .rk-art { grid-area: 1 / 1; justify-self: center; height: 14.4em; font-size: 10px; }
  .ladder li .rk-icon, .ladder li:last-child .rk-icon { height: 9.6em; }
  .rk-step { justify-items: start; justify-self: start; grid-column: 2; margin: 0; }
  .sc { width: 27%; }
  .deal, .step-show--3 .deal { --dw: 92px; } .step-show--3 { flex-wrap: nowrap; align-items: start; gap: var(--space-xs); } .step-show--3 figure { max-width: 84px; } .step-show--3 .deal { --dw: 70px; } .step-show--3 .step-arrow { flex: 0 1 22px; width: 22px; margin-top: 44px; }
  .deal--mid { --dw: 84px; } .deal--many { --dw: 76px; } .deal--many .dc + .dc { margin-left: calc(var(--dw) * -0.62); }
  .step-arrow { width: 44px; } .step-show { gap: var(--space-md); } .step-or { width: 100%; height: 1px; } .step--hi { padding: var(--space-lg); }
  .try-card { --tw: 84px; } .try-hand--many .try-card { --tw: 62px; } .try-hand { gap: var(--space-lg) var(--space-sm); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pods a:hover .pod-char, .pods a:active .pod-char, .btn:active { transform: none; }
  .gh-fig .tile-card { animation: none; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .stage-back { transition: none; }
}
