/* tabisteps.com (boards 71 and 72). Colours follow lib/ui/theme/tokens.dart:
   Night Flight (dark) and Paper (light), the Ember accent, the home mint and
   the tier inks (FpTier). Small text keeps at least 4.5:1 in both themes.
   Fonts are served from this site. Written phone first. */
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-display: swap; src: url("../fonts/SpaceGrotesk-Bold.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/Inter-Regular.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 600 800; font-display: swap; src: url("../fonts/Inter-SemiBold.ttf") format("truetype"); }

:root {
  color-scheme: light;
  --bg: #FBF8F2;
  --bg2: #F4EFE6;
  --card: #FFFFFF;
  --card2: #F6F1E8;
  --line: #E2DCD0;
  --line2: #D8D1C3;
  --ink: #14161D;
  --soft: #3A3F4D;
  --muted: #625C50;
  --faint: #736D61;
  --dot: #D6CFC1;
  --glow1: #F6DCCB;
  --glow2: #EDE6FA;
  --glow3: #FBE1D3;
  --teal: #17725F;
  --accent: #E8552A;
  --accent-ink: #B83A12;
  --on-accent: #0A0B10;
  --accent-soft: rgba(232, 85, 42, .10);
  --accent-line: rgba(232, 85, 42, .40);
  --shadow: 0 24px 50px rgba(60, 40, 20, .14);
  --map-off: #CBC3B2;
  --map-on: #E8552A;
  --t0: #736D61; --t1: #9A5A2E; --t2: #646B78; --t3: #8A6A00; --t4: #2A7F7B; --t5: #4B4FC4; --t6: #C2410C;
  --sunken: #ECE7DD;
  --stamp-off: #B5B1A7;
  --lv-leaf: 1; --lv-seal: 2.5; --lv-rim: #12133F; --lv-sun: #3A2A60;
  --wrap: 72rem;
  --gutter: 1rem;
  --radius: 1.5rem;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #05060A; --bg2: #0A0B10; --card: #14161D; --card2: #0F1117; --line: #262A35; --line2: #1C1F28;
  --ink: #F4F1EA; --soft: #C9CCD5; --muted: #9BA0AE; --faint: #8A8FA0; --dot: #22263A;
  --glow1: #1C1440; --glow2: #151032; --glow3: #2A1408; --teal: #5CE1C6;
  --accent: #FF6B3D; --accent-ink: #FF6B3D; --accent-soft: rgba(255, 107, 61, .12); --accent-line: rgba(255, 107, 61, .38);
  --shadow: 0 30px 60px rgba(0, 0, 0, .5); --map-off: #2B2F3B; --map-on: #FF6B3D;
  --t0: #8A8FA0; --t1: #E3A27A; --t2: #C9CED8; --t3: #E3B341; --t4: #9FE3E0; --t5: #A78BFA; --t6: #FFC72C;
  --sunken: #101218; --stamp-off: #4A4F5E; --lv-leaf: .6; --lv-seal: 1.5; --lv-rim: #8B8FF5; --lv-sun: transparent;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #05060A; --bg2: #0A0B10; --card: #14161D; --card2: #0F1117; --line: #262A35; --line2: #1C1F28;
    --ink: #F4F1EA; --soft: #C9CCD5; --muted: #9BA0AE; --faint: #8A8FA0; --dot: #22263A;
    --glow1: #1C1440; --glow2: #151032; --glow3: #2A1408; --teal: #5CE1C6;
    --accent: #FF6B3D; --accent-ink: #FF6B3D; --accent-soft: rgba(255, 107, 61, .12); --accent-line: rgba(255, 107, 61, .38);
    --shadow: 0 30px 60px rgba(0, 0, 0, .5); --map-off: #2B2F3B; --map-on: #FF6B3D;
    --t0: #8A8FA0; --t1: #E3A27A; --t2: #C9CED8; --t3: #E3B341; --t4: #9FE3E0; --t5: #A78BFA; --t6: #FFC72C;
  --sunken: #101218; --stamp-off: #4A4F5E; --lv-leaf: .6; --lv-seal: 1.5; --lv-rim: #8B8FF5; --lv-sun: transparent;
  }
}
@media (min-width: 40rem) { :root { --gutter: 2rem; } }
@media (min-width: 64rem) { :root { --gutter: 3.5rem; } }

/* Images drawn for each theme: show the one that matches. */
.only-dark { display: none !important; }
:root[data-theme="dark"] .only-dark { display: block !important; }
:root[data-theme="dark"] .only-light { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-dark { display: block !important; }
  :root:not([data-theme="light"]) .only-light { display: none !important; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 4.75rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.55 "Inter", system-ui, -apple-system, "Segoe UI", "Noto Sans", sans-serif;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
button { font: inherit; color: inherit; cursor: pointer; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 50; background: var(--accent); color: var(--on-accent); padding: .6rem 1rem; border-radius: .8rem; font-weight: 700; text-decoration: none; }
.skip:focus { top: 1rem; }

h1, h2, h3, .g, .h3 { font-family: "Space Grotesk", "Inter", system-ui, sans-serif; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: clamp(1.9rem, 5.2vw, 2.75rem); line-height: 1.05; margin: .4rem 0 .9rem; max-width: 22ch; }
h3, .h3 { font-size: 1.25rem; line-height: 1.2; margin: 0 0 .35rem; }
p { margin: 0 0 1rem; }
em { font-style: normal; color: var(--accent-ink); }
.kicker { font-size: .75rem; font-weight: 800; letter-spacing: .12em; color: var(--teal); margin: 0; text-transform: uppercase; }
.kicker.accent { color: var(--accent-ink); }
.lead { font-size: 1.125rem; color: var(--soft); max-width: 36rem; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .875rem; color: var(--muted); }
.tiny { font-size: .78rem; margin: 0; }
.strong { font-weight: 800; }
.center { text-align: center; }
.accent { color: var(--accent-ink); }
.teal { color: var(--teal); }
.measure { max-width: 48rem; }
section { padding: clamp(3rem, 8vw, 4.5rem) 0; }
.band2 { background: var(--bg2); }
.t0 { color: var(--t0); } .t1 { color: var(--t1); } .t2 { color: var(--t2); } .t3 { color: var(--t3); }
.t4 { color: var(--t4); } .t5 { color: var(--t5); } .t6 { color: var(--t6); }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding: 0 1.4rem; border-radius: 1rem; border: 0;
  background: var(--accent); color: var(--on-accent); font-weight: 800; text-decoration: none; font-size: 1rem;
}
.button:hover { filter: brightness(1.06); }
.button.big { min-height: 3.6rem; font-size: 1.06rem; border-radius: 1.1rem; padding: 0 1.6rem; }
.button.small { line-height: 1.1; text-align: center; min-height: 2.5rem; font-size: .9rem; padding: 0 1rem; border-radius: .8rem; }
.button.block { display: flex; width: 100%; }
.button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line2); }
[dir="rtl"] .arrow { display: inline-block; transform: scaleX(-1); }
.linklike { background: none; border: 0; padding: .4rem 0; color: var(--accent-ink); font-weight: 700; text-decoration: underline; text-underline-offset: .18em; }

/* Header */
header.site { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
header.site .wrap { display: flex; align-items: center; gap: .75rem; min-height: 4rem; }
header.site.compact { position: static; background: none; border: 0; backdrop-filter: none; }
.brand { display: inline-flex; align-items: center; gap: .45rem; color: var(--ink); text-decoration: none; font: 700 1.35rem/1 "Space Grotesk", sans-serif; letter-spacing: -.02em; margin-inline-end: auto; }
.brand svg { width: 2rem; height: 2rem; }
header.site .brand, header.site .menu { flex-shrink: 0; }
.mark .older { fill: var(--ink); }
.mark .newer { fill: var(--accent); }
nav.site { display: none; gap: 1.25rem; }
nav.site a, .navmenu nav a { color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 600; white-space: nowrap; }
nav.site a:hover, .navmenu nav a:hover { color: var(--ink); }
@media (min-width: 68rem) { nav.site { display: flex; } .navmenu { display: none; } }
.navmenu summary svg { width: 1.35rem; height: 1.35rem; stroke-width: 2; stroke-linecap: round; }
.menu:not([open]) > :not(summary) { display: none; }
.navmenu { position: static; }
.navmenu nav { position: absolute; inset-inline: var(--gutter); top: calc(100% + .2rem); z-index: 30; padding: .4rem; background: var(--card); border: 1px solid var(--line); border-radius: 1rem; box-shadow: var(--shadow); min-width: 13rem; display: flex; flex-direction: column; }
.navmenu nav a { padding: .7rem .8rem; border-radius: .6rem; color: var(--ink); font-size: 1rem; }
.navmenu nav a:hover { background: var(--bg2); }

.menu { position: relative; }
.menu summary { list-style: none; display: flex; align-items: center; gap: .35rem; min-height: 2.5rem; padding: 0 .6rem; border-radius: .7rem; color: var(--muted); font-size: .9rem; font-weight: 600; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover { color: var(--ink); background: var(--card); }
.menu summary svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.6; }
@media (max-width: 34rem) { .menu summary span { display: none; } }
.menu ul { position: absolute; inset-inline-end: 0; top: calc(100% + .4rem); z-index: 30; margin: 0; padding: .4rem; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 1rem; box-shadow: var(--shadow); width: min(30rem, calc(100vw - 2rem)); max-height: 70vh; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); }
@media (max-width: 37.49rem) {
  /* Phones: the languages open as a panel across the screen, 16px from
     each side, under the header (never off an edge, also right to left). */
  .menu.lang { position: static; }
  .menu.lang ul { position: fixed; inset-inline: 16px; top: 4.4rem; width: auto; max-height: 70vh; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.menu ul a { display: block; padding: .5rem .7rem; border-radius: .6rem; color: var(--ink); text-decoration: none; font-size: .9rem; }
.menu ul a:hover { background: var(--bg2); }
.menu ul a[aria-current] { color: var(--accent-ink); font-weight: 700; }

/* Hero: a slideshow of five scenes (board 75), words on the start side,
   the scene on the end side, one button row that never moves. */
.hero.slideshow { position: relative; overflow: hidden; padding: clamp(1.5rem, 5vw, 3.5rem) 0 1.5rem; background: var(--bg); }
.hglows { position: absolute; inset: 0; }
.hg { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; }
.hg.on { opacity: 1; }
/* Each glow fades to nothing inside the hero: no edge is ever seen. */
.hg.s0 { background: radial-gradient(ellipse 30% 46% at 72% 50%, rgba(255, 128, 64, .22), transparent); }
.hg.s1 { background: radial-gradient(ellipse 32% 44% at 68% 52%, rgba(108, 92, 255, .22), transparent); }
.hg.s2 { background: radial-gradient(ellipse 30% 46% at 72% 50%, rgba(227, 179, 65, .14), transparent); }
.hg.s3 { background: radial-gradient(ellipse 30% 46% at 72% 52%, rgba(255, 92, 154, .16), transparent), radial-gradient(ellipse 22% 30% at 86% 30%, rgba(167, 139, 250, .12), transparent); }
.hg.s4 { background: radial-gradient(ellipse 32% 44% at 70% 50%, rgba(92, 225, 198, .16), transparent); }
[dir="rtl"] .hg { transform: scaleX(-1); }
@media (max-width: 51.99rem) {
  /* On phones the scene sits under the words: the glow goes with it. */
  .hg.s0 { background: radial-gradient(ellipse 60% 26% at 50% 74%, rgba(255, 128, 64, .22), transparent); }
  .hg.s1 { background: radial-gradient(ellipse 60% 24% at 50% 74%, rgba(108, 92, 255, .22), transparent); }
  .hg.s2 { background: radial-gradient(ellipse 60% 26% at 50% 74%, rgba(227, 179, 65, .14), transparent); }
  .hg.s3 { background: radial-gradient(ellipse 60% 26% at 50% 74%, rgba(255, 92, 154, .16), transparent); }
  .hg.s4 { background: radial-gradient(ellipse 60% 26% at 50% 74%, rgba(92, 225, 198, .16), transparent); }
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "words" "cta" "scene"; gap: 1.25rem; }
@media (min-width: 52rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "words scene" "cta scene"; grid-template-rows: auto auto; align-content: center; column-gap: clamp(2rem, 5vw, 4rem); row-gap: 1.75rem; min-height: 30rem; }
}
.hwords { grid-area: words; display: grid; position: relative; z-index: 2; align-self: end; }
.hw { grid-area: 1 / 1; display: flex; flex-direction: column; gap: .9rem; opacity: 0; transform: translateY(10px); transition: opacity .6s ease, transform .6s ease; pointer-events: none; }
.hw.on { opacity: 1; transform: none; pointer-events: auto; }
.hw .kicker { color: var(--accent-ink); }
.hw.s1 .kicker { color: var(--t3); } .hw.s3 .kicker, .hw.s4 .kicker { color: var(--teal); }
.headline { font-family: "Space Grotesk", "Inter", sans-serif; font-weight: 700; font-size: clamp(2.3rem, 5.4vw, 4.1rem); line-height: 1.02; letter-spacing: -.035em; margin: 0; text-wrap: balance; }
.headline em { color: var(--accent); }
.hw.s4 .headline em { color: var(--teal); }
.sub { font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--soft); max-width: 34rem; line-height: 1.5; margin: 0; text-wrap: pretty; }
.hcta { grid-area: cta; position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: .75rem; align-self: start; }
.hcta .button { box-shadow: 0 10px 26px -8px color-mix(in srgb, var(--accent) 60%, transparent); }
.hcta .second { display: grid; box-shadow: none; background: color-mix(in srgb, var(--card) 70%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-color: var(--line); }
.hcta .second .lbl { grid-area: 1 / 1; text-align: center; opacity: 0; transition: opacity .5s ease; }
.hcta .second .lbl.on { opacity: 1; }
@media (max-width: 30rem) { .hcta .button.big { flex: 1 1 auto; padding: 0 1rem; font-size: .98rem; } }
.hscene { grid-area: scene; display: grid; width: 100%; max-width: 32rem; justify-self: center; align-self: center; }
@media (max-width: 51.99rem) { .hscene { max-width: 22rem; margin-top: .5rem; } }
.hs { grid-area: 1 / 1; position: relative; container-type: inline-size; aspect-ratio: 100 / 86; opacity: 0; transition: opacity .7s ease; }
.hs.on { opacity: 1; }
.hs .art { width: 100%; height: 100%; }
.hbars { position: relative; display: flex; justify-content: center; gap: .4rem; margin-top: 1.5rem; }
.hbar { width: 3rem; height: 1.5rem; padding: 0; border: 0; background: none; display: grid; align-items: center; }
.hbar i { position: relative; display: block; height: 3px; border-radius: 3px; overflow: hidden; background: color-mix(in srgb, var(--ink) 16%, transparent); }
.hbar i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; }
[dir="rtl"] .hbar i::after { transform-origin: right; }
.hbar.done i::after, .hero.still .hbar.on i::after, .hero.stopped .hbar.on i::after { transform: scaleX(1); }
.hero.slideshow:not(.still):not(.stopped) .hbar.on i::after { animation: hfill 7s linear forwards; }
.hero.held .hbar.on i::after { animation-play-state: paused !important; }
@keyframes hfill { to { transform: scaleX(1); } }
.no-js .hbars { display: none; }

/* 1 · passport */
.passport { position: absolute; inset: 3% 4% 5%; border-radius: 4cqw; background: repeating-linear-gradient(135deg, rgba(0, 0, 0, .03) 0 1.6cqw, transparent 1.6cqw 3.2cqw), #EFE6D2; box-shadow: 0 6cqw 12cqw -3cqw rgba(0, 0, 0, .45); transform: rotate(-3deg);
  --lv-leaf: 1; --lv-seal: 2.5; --lv-rim: #12133F; --lv-sun: #3A2A60; --ink: #14161D; }
.passport::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: rgba(0, 0, 0, .08); }
.pp-label { position: absolute; left: 4.5cqw; top: 3.5cqw; font-size: 2cqw; font-weight: 800; letter-spacing: .4cqw; color: rgba(40, 30, 15, .45); }
.drop { position: absolute; left: var(--x); top: var(--y); width: var(--w); aspect-ratio: 1; transform: rotate(var(--r)); }
.hero.slideshow:not(.still) .hs.on .drop { animation: stampin .45s cubic-bezier(.2, .9, .3, 1.25) both; animation-delay: calc(var(--i) * .5s + .3s); }
@keyframes stampin { from { opacity: 0; transform: translateY(-25%) scale(1.6) rotate(var(--r)); } to { opacity: 1; transform: rotate(var(--r)); } }

/* 2 · living map */
.hmap { position: absolute; inset-inline: 0; top: 14%; }
.hmap .dotmap { width: 100%; height: auto; }
@media (min-width: 52rem) {
  .hmap { inset-inline-start: -45%; inset-inline-end: -6%; top: 8%; }
  /* The map fades out under the words (a mask, so the glow behind shows through). */
  .hmap { -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, .15) 22%, #000 46%); mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, .15) 22%, #000 46%); }
  [dir="rtl"] .hmap { -webkit-mask-image: linear-gradient(to left, transparent 0%, rgba(0, 0, 0, .15) 22%, #000 46%); mask-image: linear-gradient(to left, transparent 0%, rgba(0, 0, 0, .15) 22%, #000 46%); }
}
.hmap .lit { filter: drop-shadow(0 0 .6px var(--accent)); }
.hmap .arc { stroke-dasharray: 1; stroke-dashoffset: 0; }
.hmap .arc.a1 { stroke: var(--accent); } .hmap .arc.a2 { stroke: var(--teal); } .hmap .arc.a3 { stroke: #E3B341; }
.hero.slideshow:not(.still) .hs.on .lit { animation: litin .5s ease both; animation-delay: calc(var(--i) * .2s + .2s); }
.hero.slideshow:not(.still) .hs.on .arc { animation: draw 1.6s ease-out both; animation-delay: calc(var(--i) * .7s + .5s); }
@keyframes litin { from { opacity: 0; } }
@keyframes draw { from { stroke-dashoffset: 1; } }

/* 3 · your level */
.morph { position: absolute; inset: 0; }
.lvm { position: absolute; left: 50%; top: 46%; width: 50cqw; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2.5cqw; opacity: 0; }
.lvm .lv { position: relative; width: 100%; height: auto; aspect-ratio: 1; }
.lvm b { position: relative; font-size: 5.2cqw; white-space: nowrap; }
/* The badge's own soft glow in its tier's colour, fading to nothing. */
.lglow { position: absolute; left: 50%; top: 25cqw; width: 58cqw; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle closest-side, var(--glow), transparent); }
.lvm.t3 { opacity: 1; }
.hero.slideshow:not(.still) .hs.on .lvm { animation: cyc 3s ease-in-out both; animation-delay: calc(var(--i) * 2.3s); }
.hero.slideshow:not(.still) .hs.on .lvm.t6 { animation-name: cyclast; }
.hero.slideshow:not(.still) .hs .lvm:not(.t3) { opacity: 0; }
.hero.slideshow:not(.still) .hs.on .lvm.t3 { opacity: 0; }
@keyframes cyc { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.94); } 24%, 77% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.03); } }
@keyframes cyclast { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.94); } 24%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

/* 4 · phone and stickers */
.hphone { position: absolute; left: 28%; top: 2%; width: 44%; height: 94%; border-radius: 7cqw; border: 1.6cqw solid #22252F; background: #0A0B10; color: #F4F1EA; transform: perspective(1200px) rotateY(-14deg) rotateX(4deg); box-shadow: -6cqw 8cqw 16cqw -4cqw rgba(0, 0, 0, .5); padding: 7cqw 3cqw 3cqw; display: flex; flex-direction: column; gap: 2.2cqw; overflow: hidden; text-align: left;
  --map-off: #2B2F3B; --map-on: #FF6B3D; --card: #14161D; --muted: #9BA0AE; --ink: #F4F1EA; --accent: #FF6B3D; }
.hphone .brandline { font-size: 2.8cqw; color: #FF6B3D; }
.hp-count { display: flex; align-items: flex-end; gap: 1.2cqw; }
.hp-count b { font-size: 13cqw; line-height: .85; color: #FF6B3D; }
.hp-count span { font-size: 3.2cqw; }
.hp-map { display: block; padding: 2cqw 1cqw; border-radius: 3cqw; background: #14161D; }
.hp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4cqw; }
.hp-stats > span { padding: 1.8cqw; border-radius: 2.2cqw; background: #14161D; display: flex; flex-direction: column; }
.hp-stats b { font-size: 3.4cqw; } .hp-stats small { font-size: 2cqw; color: #9BA0AE; }
.hphone .found { font-size: 2cqw; padding: 1.6cqw; gap: 1.4cqw; border-radius: 2.4cqw; }
.hphone .found svg { width: 6cqw; height: 6cqw; }
.float { position: absolute; left: var(--x); top: var(--y); width: var(--w); aspect-ratio: 1; transform: rotate(var(--r)); filter: drop-shadow(0 2.4cqw 3.6cqw rgba(0, 0, 0, .32)); }
.hero.slideshow:not(.still) .float { animation: bob var(--d) ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(var(--r)); } 50% { transform: translateY(-2.4cqw) rotate(var(--r)); } }

/* 5 · memory against photos */
.mem { position: absolute; inset: 2% 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 3cqw; align-content: start; }
.mtile { padding: 4cqw; border-radius: 5cqw; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: .6cqw; color: var(--muted); }
.mtile small { font-size: 2.6cqw; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.mtile b { font-size: 15cqw; line-height: 1; }
.mtile span { font-size: 2.8cqw; }
.mtile.mfound { background: linear-gradient(160deg, var(--accent-soft), var(--card)); border-color: var(--accent-line); color: var(--accent-ink); box-shadow: 0 4cqw 10cqw -5cqw color-mix(in srgb, var(--accent) 50%, transparent); }
.mtile.mfound b { color: var(--accent); } .mtile.mfound span { color: var(--soft); }
.forgot { grid-column: 1 / -1; padding: 3.4cqw 4cqw; border-radius: 5cqw; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; }
.forgot .fk { font-size: 2.9cqw; font-weight: 800; color: var(--teal); margin-bottom: 1cqw; }
.fg { display: flex; align-items: center; gap: 2.6cqw; padding: 1.7cqw 0; border-top: 1px solid var(--line); }
.fg .fl { font-size: 5.5cqw; line-height: 1; }
.fg b { display: block; font-size: 3.2cqw; } .fg small { font-size: 2.6cqw; color: var(--muted); }
.hero.slideshow:not(.still) .hs.on .fg { animation: popin .45s ease-out both; animation-delay: calc(var(--i) * .6s + 1s); }
@keyframes popin { from { opacity: 0; transform: translateY(1.6cqw); } }

@media (prefers-reduced-motion: reduce) {
  .hw, .hs, .hg, .hcta .second .lbl { transition: none; }
  .hw { transform: none; }
}

/* The game */
.play-grid { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 60rem) { .play-grid { grid-template-columns: 1fr 22rem; gap: 2.5rem; } }
.play-main h2 { max-width: none; }
.search { position: relative; margin: 1rem 0; }
.search svg { position: absolute; inset-inline-start: .9rem; top: 50%; width: 1.1rem; height: 1.1rem; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search input { width: 100%; min-height: 3rem; border-radius: .9rem; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; padding: 0 1rem 0 2.6rem; }
[dir="rtl"] .search input { padding: 0 2.6rem 0 1rem; }
.search input::placeholder { color: var(--faint); }
.search input:focus-visible { outline-offset: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.no-js .chips .more, .chips li[hidden] { display: none; }
.chip { display: flex; align-items: center; gap: .4rem; min-height: 2.75rem; padding: 0 .8rem; border-radius: .9rem; border: 2px solid var(--line); background: var(--card); color: var(--ink); font-size: .875rem; font-weight: 600; transition: transform .12s; }
.chip .flag { font-size: 1.3rem; line-height: 1; }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.chip[aria-pressed="true"]::after { content: "✓"; color: var(--accent-ink); font-weight: 800; }
.chip:active { transform: scale(.96); }
.no-match { margin: .75rem 0 0; color: var(--muted); }
.chip-actions { display: flex; gap: 1.25rem; flex-wrap: wrap; margin: .5rem 0; }
.no-js .chip-actions { display: none; }

.live { position: relative; border-radius: 1.5rem; background: linear-gradient(160deg, var(--card), var(--card2)); border: 1px solid var(--line); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .7rem; box-shadow: var(--shadow); }
.live { width: 100%; max-width: 24rem; justify-self: center; }
@media (min-width: 60rem) { .live { position: sticky; top: 5.5rem; max-width: none; } }
.live p { margin: 0; }
.live-top { display: flex; align-items: center; gap: 1rem; }
.badge-slot { width: 5.5rem; height: 5.5rem; flex: none; }
.badge-slot svg { width: 100%; height: 100%; display: block; }
.badge-slot.pop { animation: pop .4s ease-out; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.level { font: 700 1.35rem/1.1 "Space Grotesk", sans-serif; }
.count { display: flex; align-items: flex-end; gap: .6rem; flex-wrap: wrap; margin: 0; }
.count .num { font: 700 4.5rem/.85 "Space Grotesk", sans-serif; color: var(--accent); letter-spacing: -.04em; }
.count .unit { font: 700 1.3rem/1.2 "Space Grotesk", sans-serif; margin-bottom: .2rem; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.tiles > div { padding: .55rem .7rem; border-radius: .85rem; background: var(--bg2); display: flex; flex-direction: column; }
.tiles .g { font-size: 1.2rem; }
.memory { padding: .7rem .8rem; border-radius: 1rem; background: var(--accent-soft); border: 1px solid var(--accent-line); display: flex; flex-direction: column; gap: .35rem; font-size: .875rem; color: var(--soft); line-height: 1.45; }
.memory .strong { color: var(--ink); font-size: .95rem; }
.mini-bar { position: fixed; inset-inline: .75rem; bottom: .75rem; z-index: 15; display: flex; align-items: center; gap: .6rem; padding: .55rem .9rem; border-radius: 1rem; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: .85rem; font-weight: 700; transform: translateY(150%); transition: transform .25s ease; }
.mini-bar .num { font: 700 1.6rem/1 "Space Grotesk", sans-serif; color: var(--accent-ink); }
.mini-bar #mini-next { margin-inline-start: auto; font-weight: 600; }
.mini-bar { width: auto; text-align: start; color: var(--ink); font: inherit; font-size: .85rem; font-weight: 700; visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
.mini-bar.on { transform: none; visibility: visible; transition: transform .25s ease, visibility 0s; }
@media (min-width: 60rem) { .mini-bar { display: none; } }
@media (prefers-reduced-motion: reduce) { .mini-bar { transition: none; } }

/* The reveal */
/* Section glows fade to nothing well inside their section: no edge shows. */
.reveal { background: radial-gradient(ellipse 40% 46% at 30% 50%, var(--glow2), transparent), var(--bg); }
.reveal-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 52rem) { .reveal-grid { grid-template-columns: 19rem 1fr; gap: 3rem; } }
.phone { position: relative; margin: 0 auto; width: min(19rem, 100%); aspect-ratio: 300 / 620; border-radius: 2.75rem; border: 8px solid var(--line2); background: var(--bg2); box-shadow: var(--shadow); overflow: hidden; }
.phone .screen { position: absolute; inset: 0; padding: 2.5rem 1.1rem; display: flex; flex-direction: column; gap: .75rem; }
.phone .bar { display: block; height: 6px; border-radius: 6px; background: var(--line); }
.phone .bar span { display: block; height: 6px; width: 72%; border-radius: 6px; background: var(--accent); }
.rcount { display: flex; align-items: flex-end; gap: .5rem; margin-top: .6rem; }
.rcount .num { font: 700 5rem/.85 "Space Grotesk", sans-serif; color: var(--accent); letter-spacing: -.04em; }
.rcount .unit { font: 700 1.2rem/1.2 "Space Grotesk", sans-serif; }
.mini-map { display: block; padding: .6rem .4rem; border-radius: 1rem; background: var(--card); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.stats > span { padding: .6rem; border-radius: .75rem; background: var(--card); display: flex; flex-direction: column; }
.stats b { font-size: 1.1rem; }
.stats small { font-size: .7rem; color: var(--muted); }
.found { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border-radius: .9rem; background: linear-gradient(135deg, rgba(255, 92, 154, .2), rgba(92, 225, 198, .2), rgba(255, 199, 44, .2)); font-size: .72rem; font-weight: 800; letter-spacing: .04em; }
.found svg { width: 2.6rem; height: 2.6rem; flex: none; transform: rotate(-8deg); }
.pills { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.pills li { display: flex; align-items: center; gap: .4rem; min-height: 2.4rem; padding: 0 .9rem; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; }
.small-pills li { min-height: 2rem; font-size: .8rem; }

/* The app's pictures (js/art.js) and its dot map (tools/parts.js) */
.art { display: block; overflow: visible; }
.dotmap { display: block; width: 100%; height: auto; }
.dotmap .off { stroke: var(--map-off); }
.dotmap .on { stroke: var(--map-on); }
.dotmap .ring { stroke: var(--teal); }
.dotmap .route { stroke: var(--accent); }
.dotmap .home { fill: var(--teal); }
.dotmap .stop { fill: var(--accent); }
.g { font-variant-numeric: tabular-nums; }

/* Step 2's phone reading the photos (site.js adds .play in view). */
.phone.play .bar span { animation: barfill 1.4s cubic-bezier(.3, .7, .2, 1) both; }
.phone.play #rev-extra { animation: fadein .4s ease both 1.5s; }
.phone.play .mini-map .lit { animation: litin .25s ease both; animation-delay: calc(var(--i) * 70ms + .4s); }
.phone.play .found { animation: foundin .5s cubic-bezier(.2, .9, .3, 1.3) both 2.1s; }
@keyframes barfill { from { width: 0; } }
@keyframes fadein { from { opacity: 0; } }
@keyframes foundin { from { opacity: 0; transform: scale(.85); } }

/* Questions: flip cards, each answered by a small piece of the app */
.flips { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; align-items: stretch; gap: .9rem; grid-template-columns: 1fr; }
@media (min-width: 34rem) { .flips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .flips { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.flip {
  position: relative; width: 100%; height: 100%; text-align: start; border-radius: 1.5rem; border: 1px solid var(--line); padding: 1rem; display: flex; flex-direction: column; gap: .75rem; cursor: pointer;
  /* Raised like the app's tappable cards: a lighter surface, a faint top highlight, a soft shadow. */
  background: linear-gradient(180deg, color-mix(in srgb, var(--card) 94%, #fff), var(--card));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 10px 24px -12px rgba(20, 16, 10, .28);
  transition: transform .42s cubic-bezier(.2, .8, .2, 1), border-color .42s cubic-bezier(.2, .8, .2, 1), box-shadow .42s cubic-bezier(.2, .8, .2, 1), background .2s;
}
:root[data-theme="dark"] .flip { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 12px 28px -12px rgba(0, 0, 0, .7); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .flip { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 12px 28px -12px rgba(0, 0, 0, .7); } }
/* Both faces share one grid cell, so a card is always as tall as its taller face and turning it never moves anything. */
.flip .faces { display: grid; flex: 1; }
.flip .front, .flip .back { grid-area: 1 / 1; display: flex; flex-direction: column; gap: .5rem; }
.flip .q { font: 700 1.15rem/1.25 "Space Grotesk", sans-serif; }
.flip .tap { margin-top: auto; align-self: flex-end; display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem .3rem .55rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: .78rem; font-weight: 700; }
.flip .tap svg { width: .95rem; height: .95rem; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .42s cubic-bezier(.2, .8, .2, 1); }
.flip .a { font-size: .9rem; font-weight: 700; line-height: 1.35; }
.js .flip[aria-pressed="false"] .back, .js .flip[aria-pressed="true"] .front { visibility: hidden; }
.no-js .flip .back { grid-area: 2 / 1; }
.flip[aria-pressed="true"] { background: linear-gradient(160deg, var(--card), var(--card2)); border-color: var(--accent-line); }
.no-js .flip .tap { display: none; }
@media (hover: hover) {
  .flip:hover { transform: translateY(-4px); border-color: var(--accent); }
  .flip:hover .tap svg { transform: rotate(-40deg); }
}
@media (prefers-reduced-motion: reduce) { .flip, .flip .tap svg { transition: none; } .flip:hover { transform: none; } }
.viz { min-width: 0; display: flex; align-items: center; justify-content: center; height: 8.4rem; border-radius: 1rem; background: var(--sunken); border: 1px solid var(--line); overflow: hidden; }
.flip[aria-pressed="false"] .mini { transform: scale(.8); opacity: .9; }
.mini { display: flex; align-items: center; justify-content: center; gap: .6rem; width: 15rem; flex: none; transition: transform .25s ease; }
@media (prefers-reduced-motion: reduce) { .viz, .mini { transition: none; } }
.mini small { display: block; font-size: .7rem; color: var(--muted); font-weight: 600; }
.mini b.g { font-size: 1.35rem; line-height: 1.1; }
.m-trips .stamp { width: 5.2rem; height: 5.2rem; transform: rotate(-6deg); }
.tiles2 { display: grid; gap: .4rem; }
.tiles2 .tile { padding: .4rem .7rem; border-radius: .75rem; background: var(--card); border: 1px solid var(--line); min-width: 5.5rem; }
.m-rows { flex-direction: column; gap: .4rem; max-width: calc(100% - 1rem); }
.m-rows .row { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .45rem .6rem; border-radius: .8rem; background: var(--card); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; }
.m-rows .fl { font-size: 1.4rem; line-height: 1; }
.m-rows .nm { flex: 1; }
.m-rows .pill { padding: .15rem .55rem; border-radius: 999px; background: var(--bg2); color: var(--muted); font-size: .72rem; white-space: nowrap; }
.m-rows .top .pill { background: var(--accent-soft); color: var(--accent-ink); }
.m-stickers .sticker { width: 4.6rem; height: 4.6rem; margin-inline: -.5rem; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .18)); }
.m-stickers .s1 { transform: rotate(-6deg); } .m-stickers .s2 { transform: rotate(5deg) translateY(-6px); } .m-stickers .s3 { transform: rotate(-3deg); }
.m-level .lv { width: 6rem; height: 6rem; }
.m-level b.g { display: block; }
.m-vs { gap: .4rem; }
.m-vs .side { display: flex; flex-direction: column; align-items: center; gap: .1rem; }
.m-vs .lv { width: 3.9rem; height: 3.9rem; }
.m-vs .score { font-size: 1.25rem; white-space: nowrap; }
.m-vs .score .muted { font-size: .85rem; }
.bars { display: flex; align-items: flex-end; gap: .35rem; height: 6.6rem; width: 100%; }
.bars .b { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .15rem; }
.bars .col { width: 100%; border-radius: .35rem .35rem .15rem .15rem; background: var(--map-off); }
.bars .best .col { background: var(--accent); }
.bars .v { font: 700 .8rem/1 "Space Grotesk", sans-serif; color: var(--accent-ink); min-height: .8rem; }
.bars .y { font-size: .58rem; color: var(--muted); min-height: .7rem; line-height: 1; }
.m-bars { width: 13rem; }
.m-secret { flex-direction: column; gap: .35rem; }
.m-secret .sticker { width: 4.6rem; height: 4.6rem; transform: rotate(-8deg); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .2)); }
.m-secret .found { padding: .3rem .7rem; font-size: .65rem; }
.m-route { position: relative; width: 15rem; }
.m-route .km { position: absolute; inset-inline-end: .4rem; bottom: .2rem; font-size: 1.3rem; color: var(--accent-ink); background: color-mix(in srgb, var(--sunken) 85%, transparent); padding: 0 .3rem; border-radius: .4rem; }

/* Levels */
.ladder { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 40rem) { .ladder { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 64rem) { .ladder { grid-template-columns: repeat(6, 1fr); } }
.ladder li { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 1.1rem .5rem; border-radius: 1.4rem; background: linear-gradient(170deg, var(--card), var(--card2)); border: 1px solid var(--line); text-align: center; }
.ladder .name { font: 700 1.15rem/1.2 "Space Grotesk", sans-serif; }
.ladder .hint { font-size: .75rem; color: var(--muted); line-height: 1.35; }

/* The ladder comes alive: cards rise in once, each badge has its own
   quiet loop, and a card lifts with its tier's glow when pointed at or
   tapped. Transforms and opacity only; nothing moves with reduced motion. */
.ladder li { --tg: rgba(227, 162, 122, .45); --ease: cubic-bezier(.2, .8, .2, 1); position: relative; transition: transform .42s var(--ease), box-shadow .42s var(--ease), border-color .42s var(--ease); }
.ladder li.t2 { --tg: rgba(201, 206, 216, .5); } .ladder li.t3 { --tg: rgba(227, 179, 65, .5); } .ladder li.t4 { --tg: rgba(185, 198, 255, .55); }
.ladder li.t5 { --tg: rgba(139, 143, 245, .5); } .ladder li.t6 { --tg: rgba(255, 199, 44, .45); }
.lvw { position: relative; display: block; width: 6.5rem; height: 6.5rem; transition: transform .42s var(--ease); }
.lvw::before { content: ""; position: absolute; inset: -22%; border-radius: 50%; background: radial-gradient(circle closest-side, var(--tg), transparent); opacity: 0; transition: opacity .42s var(--ease); pointer-events: none; }
.lvw .lv { position: relative; width: 100%; height: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .ladder.pre li { opacity: 0; }
  .ladder.rise li { animation: rise .6s cubic-bezier(.2, .8, .3, 1) backwards; animation-delay: calc(var(--k) * 100ms); }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } }
  @media (hover: hover) { .ladder li:hover { transform: translateY(-4px); border-color: var(--line2); box-shadow: 0 14px 30px -16px rgba(0, 0, 0, .35); } .ladder li:hover .lvw { transform: rotate(-4deg); } .ladder li:hover .lvw::before { opacity: 1; } }
  .ladder li.tapped { transform: translateY(-4px); box-shadow: 0 14px 30px -16px rgba(0, 0, 0, .35); } .ladder li.tapped .lvw { transform: rotate(-4deg); } .ladder li.tapped .lvw::before { opacity: 1; }
  /* Bronze, Silver, Gold: a glint across the coin, out of step. */
  .ladder .t1 .lvw::after, .ladder .t2 .lvw::after, .ladder .t3 .lvw::after, .ladder .t4 .lvw::after {
    content: ""; position: absolute; inset: 0; clip-path: circle(23% at 50% 50%); pointer-events: none; mix-blend-mode: screen;
    background: linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, .55) 50%, transparent 58%) no-repeat; background-size: 300% 100%; background-position: 130% 0;
    animation: glint 5.5s ease-in-out infinite; animation-delay: calc(var(--k) * 1.7s + 1s);
  }
  /* Platinum: a slower sheen across the seal; its star twinkles. */
  .ladder .t4 .lvw::after { clip-path: circle(30% at 50% 50%); animation-duration: 7s; }
  .ladder .t4 .lv > path:nth-of-type(1) { transform-box: fill-box; transform-origin: center; }
  .ladder .t4 .lvw .twinkle { position: absolute; left: 50%; top: 9%; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle closest-side, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0)); animation: twinkle 3.2s ease-in-out infinite; pointer-events: none; }
  /* Legend: stars twinkle, and now and then a line runs between them. */
  .ladder .t5 .lv circle[fill="#fff"]:nth-of-type(3n) { animation: twinkle 2.8s ease-in-out infinite; }
  .ladder .t5 .lv circle[fill="#fff"]:nth-of-type(5n+1) { animation: twinkle 3.6s ease-in-out infinite .9s; }
  .ladder .t5 .lv .trace { stroke-dasharray: 6 600; animation: trace 9s linear infinite 1.5s; }
  /* GOAT: the rays turn very slowly and the colours shimmer. */
  /* GOAT, wherever it moves (ladder, hero, live card): the rays turn
     slowly round the disc and the colours shimmer. */
  .ladder .goat .rays, .hero.slideshow:not(.still) .goat .rays, .badge-slot .goat .rays { transform-box: view-box; transform-origin: 50px 50px; animation: spin 60s linear infinite; }
  .ladder .goat, .hero.slideshow:not(.still) .goat, .badge-slot .goat { animation: shimmer 4.5s ease-in-out infinite alternate; }
}
@keyframes glint { 0%, 70% { background-position: 130% 0; } 100% { background-position: -30% 0; } }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes trace { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -606; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { filter: hue-rotate(-12deg); } to { filter: hue-rotate(34deg) saturate(1.25); } }

/* Badges */
.badge-row { list-style: none; padding: 0; margin: 1.75rem 0; display: grid; gap: 1rem .75rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 34rem) { .badge-row { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 64rem) { .badge-row { grid-template-columns: repeat(8, 1fr); } }
.badge-row li { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; }
.badge-row .bdg { width: 6.4rem; height: 6.4rem; }
.badge-row li.got:nth-child(4n+1) .bdg { transform: rotate(-7deg); }
.badge-row li.got:nth-child(4n+2) .bdg { transform: rotate(5deg); }
.badge-row li.got:nth-child(4n+3) .bdg { transform: rotate(-3deg); }
.badge-row li.got:nth-child(4n+4) .bdg { transform: rotate(8deg); }
.badge-row .name { font-size: .78rem; font-weight: 700; }
.badge-row .not .name { color: var(--muted); }
.badge-row .meta { font-size: .7rem; color: var(--muted); }
.badge-row .bar { width: 4rem; height: 4px; border-radius: 4px; background: var(--line); }
.badge-row .bar span { display: block; height: 4px; border-radius: 4px; background: var(--fam); }
.fam { width: 9px; height: 9px; border-radius: 9px; background: var(--fam); }
.milestone { --fam: var(--accent); } .explorer { --fam: var(--teal); } .daring { --fam: #6D4AFF; } .distance { --fam: #9E7000; } .friends { --fam: #C2306E; }
:root[data-theme="dark"] .daring { --fam: #A98BFF; } :root[data-theme="dark"] .distance { --fam: #FFC629; } :root[data-theme="dark"] .friends { --fam: #FF5C9A; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .daring { --fam: #A98BFF; } :root:not([data-theme="light"]) .distance { --fam: #FFC629; } :root:not([data-theme="light"]) .friends { --fam: #FF5C9A; }
}
.secret-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 1.1rem; border-radius: 1.4rem; background: linear-gradient(135deg, rgba(255, 92, 154, .14), rgba(92, 225, 198, .14), rgba(255, 199, 44, .14)); border: 1px solid var(--line); }
.secret-strip > div:last-child { flex: 1 1 14rem; }
.secret-strip p { margin: 0; }
.stickers { display: flex; align-items: center; gap: .75rem; }
.stickers .sticker { width: 4.75rem; height: 4.75rem; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .2)); }
.stickers > span:first-child .sticker { transform: rotate(-8deg); }
.stickers > span:nth-child(2) .sticker { transform: rotate(6deg); }
.unknown { position: relative; width: 4.75rem; height: 4.75rem; border-radius: 50%; color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 1.75rem; flex: none; }
/* The dashes on their own layer, so they can turn without the "?". */
.unknown::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px dashed var(--muted); }

/* Badges come alive: earned stamps press down one after another, the
   others fade in and their bars fill, the stickers catch the light, the
   "?" turns; a lift, tilt and family glow on hover or tap. Transforms and
   opacity only, nothing with reduced motion. */
.badge-row li { --ease: cubic-bezier(.2, .8, .2, 1); }
.bw { position: relative; display: block; transition: transform .42s var(--ease); }
.bw::before { content: ""; position: absolute; inset: -18%; border-radius: 50%; background: radial-gradient(circle closest-side, color-mix(in srgb, var(--fam) 40%, transparent), transparent); opacity: 0; transition: opacity .42s var(--ease); pointer-events: none; }
.bw .bdg { position: relative; display: block; }
.badge-row .not .bw::before { display: none; } /* no glow before a badge is earned */
.badge-row .bar span { transform-origin: left; }
[dir="rtl"] .badge-row .bar span { transform-origin: right; }
.stickers > span[role="img"]:not(.unknown) { position: relative; display: block; }
@media (prefers-reduced-motion: no-preference) {
  .badge-row.pre .bw { opacity: 0; }
  .badge-row.pre .bar span { transform: scaleX(0); }
  .badge-row.in .got .bw { animation: stampdown .55s cubic-bezier(.3, .7, .3, 1) backwards; animation-delay: calc(var(--k) * 120ms); }
  .badge-row.in .not .bw { animation: fadein .5s ease backwards; animation-delay: calc(4 * 120ms + (var(--k) - 4) * 80ms + .2s); }
  .badge-row.in .bar span { animation: barin .9s var(--ease) backwards; animation-delay: calc(4 * 120ms + (var(--k) - 4) * 80ms + .4s); }
  @media (hover: hover) { .badge-row li:hover .bw { transform: translateY(-4px) rotate(-3deg); } .badge-row li:hover .bw::before { opacity: 1; } }
  .badge-row li.tapped .bw { transform: translateY(-4px) rotate(-3deg); } .badge-row li.tapped .bw::before { opacity: 1; }
  .stickers > span[role="img"]:not(.unknown)::after { content: ""; position: absolute; inset: 0; clip-path: circle(43% at 50% 50%); mix-blend-mode: screen; pointer-events: none;
    background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .7) 50%, transparent 60%) no-repeat; background-size: 300% 100%; background-position: 130% 0;
    animation: glint 6s ease-in-out infinite; }
  .stickers > span[role="img"]:not(.unknown):nth-child(2)::after { animation-delay: 3s; }
  .unknown::before { animation: spin 40s linear infinite; }
}
@keyframes stampdown { 0% { opacity: 0; transform: translateY(-10px) scale(1.25); } 55% { opacity: 1; transform: translateY(0) scale(.96); } 78% { transform: scale(1.02); } 100% { transform: none; } }
@keyframes barin { from { transform: scaleX(0); } }

/* Share cards (lib/ui/share/share_card.dart, 360 x 640): sized in cqw,
   so they keep the app's proportions at any width; their own colours. */
.sc {
  --sc-bg: #0F1117; --sc-ink: #F4F1EA; --sc-muted: rgba(244, 241, 234, .66); --sc-accent: #FF6B3D; --sc-num: #FF6B3D; --sc-dot: #2B2F3B; --sc-line: #262A35; --sc-back: rgba(255, 255, 255, .12);
  --lv-leaf: .6; --lv-seal: 1.5; --lv-rim: #8B8FF5; --lv-sun: transparent; --map-off: var(--sc-dot); --map-on: var(--sc-accent); --accent: var(--sc-accent); --teal: #5CE1C6; --ink: var(--sc-ink);
  aspect-ratio: 9 / 16; width: 100%; overflow: hidden; border-radius: 6cqw;
  background: var(--sc-bg); color: var(--sc-ink); padding: 8.9cqw 6.7cqw 6.7cqw; display: flex; flex-direction: column; text-align: start; line-height: 1.2;
}
/* The card's frame is the container its cqw sizes read. */
.card-shot, .story-card { container-type: inline-size; }
.sc.colour { --sc-bg: #FF6B3D; --sc-ink: #0A0B10; --sc-muted: rgba(10, 11, 16, .68); --sc-accent: #0A0B10; --sc-num: #0A0B10; --sc-dot: rgba(10, 11, 16, .22); --sc-line: rgba(10, 11, 16, .2); --sc-back: rgba(255, 255, 255, .45); --lv-leaf: 1; --lv-seal: 2.5; --lv-rim: #12133F; --lv-sun: #3A2A60; --teal: #0A0B10; }
.sc.paper { --sc-bg: #F4F1EA; --sc-ink: #14161D; --sc-muted: #5B5F6B; --sc-accent: #C2410C; --sc-num: #14161D; --sc-dot: #D6D0C2; --sc-line: #DDD6C8; --sc-back: rgba(255, 255, 255, .45); --lv-leaf: 1; --lv-seal: 2.5; --lv-rim: #12133F; --lv-sun: #3A2A60; --teal: #0F8F78; }
.sc.navy { --sc-bg: #14163A; --sc-dot: #2A2D5A; --sc-line: #2A2D5A; }
.sc.mint { --sc-bg: #5CE1C6; --sc-ink: #0A0B10; --sc-muted: rgba(10, 11, 16, .68); --sc-accent: #0A0B10; --sc-dot: rgba(10, 11, 16, .2); --sc-line: rgba(10, 11, 16, .2); --lv-leaf: 1; --teal: #0A0B10; }
.sc.violet { --sc-bg: #A78BFA; --sc-ink: #0A0B10; --sc-muted: rgba(10, 11, 16, .7); --sc-accent: #0A0B10; --sc-dot: rgba(10, 11, 16, .2); --sc-line: rgba(10, 11, 16, .22); --sc-back: rgba(255, 255, 255, .45); --lv-leaf: 1; --lv-seal: 2.5; --lv-rim: #12133F; --lv-sun: #3A2A60; }
.sc > * { flex: none; }
.sc .top { display: flex; align-items: center; gap: 2cqw; }
.sc .wm { display: inline-flex; align-items: center; gap: 1.2cqw; font: 700 5.6cqw/1 "Space Grotesk", sans-serif; letter-spacing: -.02em; margin-inline-end: auto; }
.sc .wm svg { width: 7.5cqw; height: 7.5cqw; }
.sc .wm .older { fill: var(--sc-ink); } .sc .wm .newer { fill: var(--sc-accent); }
.sc.colour .wm .newer { fill: #F4F1EA; }
.sc .top .kick { margin-inline-end: auto; }
.sc .top .wm:not(:first-child) { margin-inline-end: 0; }
.sc .per { font: 700 5.6cqw/1 "Space Grotesk", sans-serif; }
.sc .kick { font-size: 3.9cqw; font-weight: 600; color: var(--sc-muted); }
.sc > .kick { margin-top: 2.2cqw; }
.sc .hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 2cqw; margin-top: 6.7cqw; }
.sc .intro { display: block; font-size: 3.9cqw; font-weight: 600; color: var(--sc-muted); }
.sc .big { display: block; font: 700 36cqw/.95 "Space Grotesk", sans-serif; letter-spacing: -.04em; color: var(--sc-num); }
.sc .tl { display: block; width: 32.2cqw; height: 32.2cqw; padding: 1.7cqw; border-radius: 50%; background: var(--sc-back); flex: none; }
.sc .tl.c { width: 27.8cqw; height: 27.8cqw; }
.sc .tl .lv { width: 100%; height: 100%; }
.sc .ttl { font: 700 8.3cqw/1.1 "Space Grotesk", sans-serif; margin-bottom: 3.3cqw; }
.sc .flags { display: block; font-size: 4.6cqw; line-height: 1.35; letter-spacing: .6cqw; margin-top: 3.3cqw; max-height: 20cqw; overflow: hidden; }
.sc .grow { flex: 1 1 0; min-height: 2cqw; }
.sc .sts { display: flex; padding-top: 3.3cqw; border-top: 1px solid var(--sc-line); }
.sc .st { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sc .st b { font: 700 6.1cqw/1.15 "Space Grotesk", sans-serif; white-space: nowrap; }
.sc .st small { font-size: 3.05cqw; color: var(--sc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc .foot { display: flex; align-items: center; gap: 2cqw; margin-top: 3.3cqw; padding-top: 3.3cqw; border-top: 1px solid var(--sc-line); min-height: 11cqw; }
.sc .pile { display: flex; margin-inline-end: auto; }
.sc .pile .stamp { width: 9cqw; height: 9cqw; margin-inline-end: -2.8cqw; }
.sc .lvt { font-size: 3.4cqw; font-weight: 700; white-space: nowrap; margin-inline-start: auto; }
.sc .ft { font-size: 3.1cqw; color: var(--sc-muted); flex: 1; }
.sc .bigflag { font-size: 22cqw; line-height: 1; }
.sc .name { font: 700 10.6cqw/1.05 "Space Grotesk", sans-serif; margin-top: 2.2cqw; }
.sc .order { font-size: 3.6cqw; font-weight: 700; color: var(--sc-accent); margin: 1.1cqw 0 3.9cqw; }
.sc .spot { border-radius: 3.9cqw; background: color-mix(in srgb, var(--sc-dot) 30%, transparent); }
.sc .dates { font-size: 3.3cqw; color: var(--sc-muted); margin-top: 2.8cqw; }
.sc.secret .glow { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4.4cqw; background: radial-gradient(circle closest-side, rgba(92, 225, 198, .33), transparent 60%); text-align: center; }
.sc.secret .sticker { width: 39cqw; height: 39cqw; transform: rotate(-8deg); }
.sc.secret .name { font-size: 8.3cqw; margin: 0; }
.sc.trip .bigflag { letter-spacing: 2cqw; font-size: 18cqw; }
.sc.trip .name { font-size: 8.3cqw; }
.sc.secret .detail { font-size: 3.9cqw; color: var(--sc-muted); max-width: 80%; line-height: 1.3; }
.sc.friends .vs { display: flex; align-items: flex-start; margin-top: 4.4cqw; }
.sc.friends .side { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .6cqw; text-align: center; }
.sc.friends .side .lv { width: 24cqw; height: 24cqw; }
.sc.friends .side b { font: 700 4.6cqw/1.1 "Space Grotesk", sans-serif; margin-top: 1.2cqw; }
.sc.friends .side small { font-size: 3.1cqw; color: var(--sc-muted); }
.sc.friends .v { font: 700 4.6cqw/1 "Space Grotesk", sans-serif; color: var(--sc-muted); margin-top: 10cqw; }
.sc.friends .rows { display: flex; flex-direction: column; margin-top: 4cqw; }
.sc.friends .r { display: flex; align-items: center; padding: 1.7cqw 0; border-top: 1px solid var(--sc-line); }
.sc.friends .r b { flex: 1; font: 700 5cqw/1 "Space Grotesk", sans-serif; color: var(--sc-muted); white-space: nowrap; }
.sc.friends .r b.hi { color: var(--sc-accent); }
.sc.friends .r b:last-child { text-align: end; }
.sc.friends .r small { flex: 2.2; text-align: center; font-size: 3cqw; color: var(--sc-muted); line-height: 1.15; }
.sc.friends .both { display: block; margin-top: 2.8cqw; padding-top: 2.4cqw; border-top: 1px solid var(--sc-line); }
.sc.friends .both small { font-size: 3.1cqw; font-weight: 700; color: var(--teal); }
.sc.friends .both .flags { margin-top: 1.2cqw; font-size: 4.4cqw; }

/* Show it off: a story and a chat */
.show-grid { display: grid; gap: 2.5rem; align-items: center; justify-items: center; }
.show-text { justify-self: stretch; }
@media (min-width: 60rem) { .show-grid { grid-template-columns: minmax(0, 1fr) auto minmax(16rem, 22rem); gap: 2.5rem; } }
.story { position: relative; width: 15.6rem; aspect-ratio: 9 / 16; border-radius: 1.6rem; background: linear-gradient(180deg, #FF6B3D, #C2410C); overflow: hidden; box-shadow: var(--shadow); padding: 3.2rem 1rem 3.9rem; flex: none; }
.story-card { width: 11.6rem; margin: 0 auto; display: grid; }
.st-item { grid-area: 1 / 1; opacity: 0; transform: translateX(6%) scale(.98); transition: opacity .45s ease, transform .45s ease; }
.st-item.on { opacity: 1; transform: none; }
.st-item.was { transform: translateX(-6%) scale(.98); }
.story-card .sc { border-radius: 1rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.story { cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.story:focus-visible { outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .st-item { transition: none; transform: none; } }
.story .progress { position: absolute; inset-inline: .6rem; top: .6rem; display: flex; gap: .25rem; }
.story .seg { position: relative; flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .4); overflow: hidden; }
.story .seg i { position: absolute; inset: 0; background: rgba(255, 255, 255, .95); transform: scaleX(0); transform-origin: left; }
[dir="rtl"] .story .seg i { transform-origin: right; }
.story .seg.done i, .story.still .seg.on i { transform: scaleX(1); }
.story:not(.still) .seg.on i { animation: segfill 5s linear forwards; }
.story.held .seg.on i { animation-play-state: paused; }
@keyframes segfill { to { transform: scaleX(1); } }
.story .who { position: absolute; inset-inline-start: .9rem; top: 1.3rem; display: flex; align-items: center; gap: .4rem; font-size: .7rem; font-weight: 700; color: #fff; }
.story .avatar { width: 1.5rem; height: 1.5rem; border-radius: 50%; background: linear-gradient(135deg, #FFC72C, #FF5C9A); border: 2px solid #fff; }
.story .send { position: absolute; inset-inline: .9rem; bottom: .9rem; height: 2.25rem; border-radius: 1.2rem; border: 1px solid rgba(255, 255, 255, .7); display: flex; align-items: center; justify-content: space-between; padding: 0 .75rem; font-size: .72rem; color: #fff; }
.story .send svg { width: 1rem; height: 1rem; fill: none; stroke: #fff; stroke-width: 2; stroke-linejoin: round; }
.chat { width: 100%; max-width: 25rem; display: flex; flex-direction: column; gap: 10px; }
.bubble { margin: 0; padding: .7rem .9rem; font-size: .85rem; line-height: 1.4; }
.bubble.me { align-self: flex-end; width: 85%; border-radius: 22px 22px 4px 22px; background: #25D366; color: #0A0B10; }
.bubble.me .link { text-decoration: none; }
.bubble.preview { align-self: flex-end; width: 85%; padding: 0; border-radius: 18px; background: #0F1117; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .45); }
.bubble.preview .pv { height: 6rem; color: #F4F1EA; display: flex; align-items: center; justify-content: center; gap: .6rem; font-size: .72rem; line-height: 1.3; --lv-leaf: .6; }
.bubble.preview .pv b { font-size: 2.8rem; color: #FF6B3D; }
.bubble.preview .pv .lv { width: 3.2rem; height: 3.2rem; }
.bubble.preview .pvt { padding: .55rem .8rem; background: #1C1F28; color: #9BA0AE; font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bubble.them { align-self: flex-start; width: fit-content; max-width: 85%; border-radius: 22px 22px 22px 4px; background: var(--card); border: 1px solid var(--line); }
[dir="rtl"] .bubble.me { border-radius: 22px 22px 22px 4px; }
[dir="rtl"] .bubble.them { border-radius: 22px 22px 4px 22px; }

/* The share sheet: round buttons in each network's colour. */
.sheet { list-style: none; padding: 0; margin: 1.4rem 0 0; display: flex; flex-wrap: wrap; gap: 1rem 1.1rem; }
.sheet .sh { display: flex; flex-direction: column; align-items: center; gap: .4rem; width: 4.6rem; padding: 0; border: 0; background: none; color: var(--muted); font-size: .72rem; font-weight: 600; line-height: 1.2; text-align: center; }
.sheet .ic { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; transition: transform .2s ease; }
.sheet .ic svg { width: 1.7rem; height: 1.7rem; }
.sheet .ig .ic { background: radial-gradient(circle at 30% 107%, #FDF497 0%, #FD5949 45%, #D6249F 60%, #285AEB 90%); }
.sheet .wa .ic { background: #25D366; }
.sheet .x .ic { background: #0A0B10; color: #fff; }
:root[data-theme="dark"] .sheet .x .ic { background: #F4F1EA; color: #0A0B10; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sheet .x .ic { background: #F4F1EA; color: #0A0B10; } }
.sheet .fb .ic { background: #1877F2; }
.sheet .link .ic { background: var(--card); border: 1px solid var(--line); color: var(--ink); }
@media (hover: hover) { .sheet .sh:hover .ic { transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .sheet .ic { transition: none; } }

/* Marquee of share cards */
.marquee { padding: 2.5rem 0; overflow: hidden; }
.marquee .track { overflow: hidden; }
.marquee ul { list-style: none; margin: 0; padding: 0; display: flex; width: max-content; animation: drift 60s linear infinite; }
.marquee li { flex: none; width: 11.25rem; margin-inline-end: 1rem; }
.marquee .card-shot { border-radius: 1.1rem; box-shadow: 0 12px 28px rgba(0, 0, 0, .22); }
.marquee .sc { border-radius: 1.1rem; }
@keyframes drift { to { transform: translateX(-50%); } }
[dir="rtl"] .marquee ul { animation-name: drift-rtl; }
@keyframes drift-rtl { to { transform: translateX(50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee .track { overflow-x: auto; padding-bottom: .5rem; }
  .marquee ul { animation: none; padding-inline-start: var(--gutter); }
  .marquee li[aria-hidden="true"] { display: none; }
}

/* Privacy band, features, secret teaser */
.privacy-band { padding: 1.6rem 1.8rem; border-radius: 1.5rem; background: linear-gradient(160deg, var(--card), var(--card2)); border: 1px solid var(--line); display: grid; gap: 1.5rem; }
@media (min-width: 52rem) { .privacy-band { grid-template-columns: 15rem repeat(3, 1fr); align-items: start; } .privacy-band h2 { align-self: center; } }
.privacy-band h2 { font-size: 1.6rem; margin: 0; }
.privacy-band h3 { font-family: "Inter", sans-serif; font-size: .95rem; font-weight: 700; letter-spacing: 0; margin: .6rem 0 .25rem; }
.privacy-band p { margin: 0; font-size: .85rem; line-height: 1.45; }
/* The app's IconTile: a rounded square tinted with its colour. */
.itile { --tc: var(--teal); display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: .75rem; background: color-mix(in srgb, var(--tc) 14%, transparent); color: var(--tc); }
.itile svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.itile.pi1 { --tc: var(--accent-ink); } .itile.pi2 { --tc: var(--t5); }
/* Step 2's list of what the app finds */
.finds { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
@media (min-width: 40rem) { .finds { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.finds li { display: flex; align-items: center; gap: .7rem; padding: .7rem .75rem; border-radius: 1rem; background: var(--card); border: 1px solid var(--line); min-width: 0; }
.finds li > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.finds b { font-size: .9rem; line-height: 1.25; }
.finds small { font-size: .76rem; color: var(--muted); line-height: 1.3; }
.finds .itile { flex: none; }
.itile.ri0 { --tc: var(--accent-ink); } .itile.ri1 { --tc: var(--teal); } .itile.ri2 { --tc: var(--t5); }
.itile.ri3, .itile.ri4 { background: color-mix(in srgb, var(--t3) 14%, transparent); padding: .15rem; }
.itile.ri4 { background: linear-gradient(135deg, rgba(255, 92, 154, .16), rgba(92, 225, 198, .16), rgba(255, 199, 44, .16)); }
.itile .lv, .itile .sticker { width: 100%; height: 100%; }
.itile.ri5 { --tc: #8B7BFF; position: relative; }
.itile .av { position: absolute; width: 1.3rem; height: 1.3rem; border-radius: 50%; display: grid; place-items: center; font-size: .62rem; font-weight: 800; color: #0A0B10; border: 2px solid var(--card); }
.itile .av.a1 { background: #8B7BFF; inset-inline-start: .25rem; top: .3rem; }
.itile .av.a2 { background: var(--accent); inset-inline-end: .25rem; bottom: .3rem; }
#privacy, #stamps { padding: 1.5rem 0; }
#features { padding: clamp(2.5rem, 6vw, 3.5rem) 0 1.5rem; }
#features .features { margin-top: 1.5rem; }
#privacy { padding-top: clamp(3rem, 8vw, 4.5rem); }
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
.features > li { min-width: 0; }
.lvrow { max-width: 100%; }
@media (min-width: 40rem) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .features { grid-template-columns: repeat(3, 1fr); } }
.card { border-radius: 1.4rem; background: var(--card); padding: 1.25rem; border: 1px solid var(--line); }
.features .card { display: flex; flex-direction: column; gap: .6rem; padding: .9rem .9rem 1.2rem; }
.features h3 { margin: .3rem .3rem 0; }
.features p { margin: 0 .3rem; font-size: .875rem; line-height: 1.45; }
.art-box { height: 8.5rem; border-radius: 1rem; background: var(--sunken); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; padding: .6rem; }
.art-box .dotmap { max-height: 100%; width: auto; max-width: 100%; }
.art-box .bars { height: 100%; }
.lvrow { display: flex; align-items: center; gap: .15rem; }
.lvrow .lv { width: 2.3rem; height: 2.3rem; flex: 0 1 auto; min-width: 0; opacity: .55; }
.lvrow .lv.me { width: 5.4rem; height: 5.4rem; opacity: 1; margin-inline: .2rem; }
.frs { display: flex; flex-direction: column; gap: .25rem; width: 100%; max-width: 15rem; }
.fr { display: flex; align-items: center; gap: .55rem; padding: .1rem .5rem; border-radius: .7rem; background: var(--card); border: 1px solid var(--line); font-size: .82rem; font-weight: 600; }
.fr .av { width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #8B7BFF; color: #0A0B10; display: grid; place-items: center; font-size: .7rem; font-weight: 800; }
.fr:nth-child(2) .av { background: var(--accent); }
.fr:nth-child(3) .av { background: var(--teal); }
.fr .nm { flex: 1; }
.fr .lv { width: 1.9rem; height: 1.9rem; }
.teaser { padding: 1.8rem; border-radius: 1.5rem; background: linear-gradient(135deg, rgba(255, 92, 154, .18), rgba(92, 225, 198, .18), rgba(255, 199, 44, .18)); display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.teaser .spark .sticker { width: 4.8rem; height: 4.8rem; transform: rotate(-8deg); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .2)); }
.teaser > div { flex: 1 1 14rem; }
.teaser h2 { margin: 0 0 .3rem; font-size: 1.6rem; max-width: none; }
.teaser p { margin: 0; }
.teaser .unknown { width: 5.6rem; height: 5.6rem; font-size: 2.1rem; }

/* FAQ */
.faq { display: grid; gap: .6rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 52rem) { .faq { grid-template-columns: 1fr 1fr; } }
details:not(.menu) { background: var(--card); border: 1px solid var(--line); border-radius: 1rem; padding: 0; }
details:not(.menu) > summary { cursor: pointer; font-weight: 600; padding: .9rem 1rem; display: flex; align-items: center; gap: 1rem; list-style: none; }
details:not(.menu) > summary::-webkit-details-marker { display: none; }
details:not(.menu) > summary::after { content: "+"; margin-inline-start: auto; color: var(--muted); font-size: 1.2rem; line-height: 1; }
details:not(.menu)[open] > summary::after { content: "–"; }
details:not(.menu) > :not(summary) { margin: 0 1rem 1rem; color: var(--soft); }
details:not(.menu) > ul, details:not(.menu) > ol { padding-inline-start: 2.25rem; }

/* The FAQ: the home page's shortlist and the FAQ page's groups */
.faq-all { margin: 1rem 0 0; font-weight: 700; }
.faq-all a { text-decoration: none; }
.faq-page .faq-group { padding: 1rem 0 .5rem; }
.faq-page .faq-group h2 { border-top: 0; padding-top: 0; margin: 1.25rem 0 .75rem; font-size: 1.35rem; }
.faq.one { grid-template-columns: 1fr; }
.faq-page details[open] > summary { color: var(--accent-ink); }
.faq-page details:target { border-color: var(--accent-line); }

/* Final call to action */
.final { background: radial-gradient(ellipse 55% 44% at 50% 50%, var(--glow3), transparent), var(--bg); padding: clamp(3.5rem, 9vw, 5rem) 0; }
.final .center { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.big-title { font-size: clamp(2.1rem, 6.5vw, 3.4rem); max-width: 20ch; margin: 0 auto; text-wrap: balance; }
.big-title em { color: var(--accent); }
.final p { margin: 0; }
.share-line .linklike { font-size: inherit; padding: 0 .1rem; }
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.store { display: inline-flex; align-items: center; gap: .55rem; min-height: 3.6rem; padding: 0 1.3rem; border-radius: 1rem; background: var(--ink); color: var(--bg); font-weight: 800; text-decoration: none; font-size: .95rem; }
.store svg { width: 1.3rem; height: 1.3rem; fill: currentColor; }
.store.soon { background: transparent; color: var(--muted); border: 1px dashed var(--line2); }
a.store:hover { filter: brightness(1.15); }

/* Footer, theme switch, cookie banner */
footer.site { border-top: 1px solid var(--line2); padding: 1.5rem 0 5.5rem; color: var(--muted); font-size: .85rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
footer.site .links { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.25rem; margin: 0; }
footer.site a, footer.site .linklike { color: var(--muted); font-weight: 400; font-size: .85rem; }
footer.site a:hover, footer.site .linklike:hover { color: var(--ink); }
@media (min-width: 60rem) { footer.site { padding-bottom: 1.5rem; } }
.theme-switch { display: flex; align-items: center; gap: .25rem; }
.theme-switch > span { margin-inline-end: .35rem; }
.theme-switch button { min-height: 2.2rem; padding: 0 .75rem; border-radius: .6rem; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: .8rem; font-weight: 700; }
.theme-switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.no-js .theme-switch { display: none; }
.cookie { position: fixed; z-index: 40; inset-inline: .75rem; bottom: .75rem; padding: 1rem; border-radius: 1.1rem; background: var(--card); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); display: flex; flex-direction: column; gap: .6rem; max-width: 26rem; }
.cookie[hidden] { display: none; }
@media (min-width: 40rem) { .cookie { inset-inline: auto 1.5rem; bottom: 1.5rem; } }
.cookie h2 { font: 700 .95rem/1.3 "Inter", sans-serif; letter-spacing: 0; margin: 0; }
.cookie p { font-size: .82rem; color: var(--muted); line-height: 1.45; margin: 0; }
.cookie .row { display: flex; gap: .5rem; }
.cookie .button { flex: 1; min-height: 2.6rem; font-size: .9rem; border-radius: .8rem; }

/* Documents: privacy, terms, support */
.doc { max-width: 48rem; padding-top: 2rem; padding-bottom: 3rem; }
.doc h1 { font-size: clamp(2.2rem, 7vw, 3.2rem); line-height: 1.05; margin: 1rem 0; }
.doc h2 { font-size: 1.5rem; max-width: none; border-top: 1px solid var(--line); padding-top: 1.75rem; margin-top: 2.5rem; }
.doc h3 { margin-top: 1.5rem; }
.doc li { margin-bottom: .4rem; }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 1rem; font-size: .92rem; }
.doc th, .doc td { text-align: start; vertical-align: top; padding: .55rem .5rem; border-bottom: 1px solid var(--line); }
.doc th { color: var(--muted); font-weight: 600; }
.doc .lead { max-width: none; }
.table-wrap { overflow-x: auto; }
code { font-size: .88em; overflow-wrap: anywhere; }
.promise { border-inline-start: 4px solid var(--teal); padding: .25rem 0; padding-inline-start: 1rem; margin: 2rem 0; }
.promise strong { font-family: "Space Grotesk", sans-serif; font-size: 1.35rem; display: block; line-height: 1.25; margin-bottom: .35rem; }
.doc details { margin-bottom: .75rem; }

/* The compare page (c/) */
.friend { max-width: 34rem; padding-bottom: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.friend #friend { min-height: 4rem; }
.friend #shown { display: flex; flex-direction: column; gap: .9rem; }
.friend #shown[hidden] { display: none; }
.friend .who { display: flex; align-items: center; gap: .9rem; }
.friend .who h1 { font-size: 1.6rem; line-height: 1.15; margin: 0; }
.friend .who p { margin: 0; font-weight: 600; }
.friend .who p.t0 { color: var(--muted); }
.avatar.g { width: 3.5rem; height: 3.5rem; border-radius: 50%; background: #8B7BFF; color: #0A0B10; display: grid; place-items: center; font-size: 1.4rem; flex: none; }
.friend .count .num { font-size: clamp(4rem, 18vw, 5rem); }
.friend #facts { margin: 0; }
.friend #map { width: 100%; height: auto; border-radius: 1.1rem; background: var(--card); display: block; }
.friend .flags { font-size: 1.4rem; line-height: 1.5; margin: 0; word-spacing: .1rem; }
.friend .flags .more { font-size: .85rem; }
.countries { list-style: none; padding: 0; margin: 0; columns: 2 12rem; column-gap: 1.5rem; }
.countries li { break-inside: avoid; margin-bottom: .3rem; font-size: .92rem; }
.ask { display: flex; flex-direction: column; gap: .6rem; }
.ask h2 { font: 700 1rem/1.3 "Inter", sans-serif; letter-spacing: 0; margin: 0; max-width: none; }
.ask p { margin: 0; font-size: .85rem; }
@media (max-width: 30rem) {
  header.site .wrap { gap: .25rem; }
  header.site .button.small { padding: 0 .75rem; font-size: .85rem; }
  .menu summary { padding: 0 .45rem; }
}

/* The 404 page (board 76): one page for every language. Shared parts
   first; then one block per idea, so dropping an idea is deleting its
   section in tools/templates/404.html and its block here. Phone: the art
   on top, the words below; wider: the words on the start side, the art on
   the end side. Every motion is gentle and stops with reduced motion. */
.nf { position: relative; overflow: hidden; padding: clamp(1.5rem, 5vw, 4rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.nf + .nf { border-top: 1px solid var(--line); }
.nf-grid { position: relative; display: grid; gap: 1.25rem; }
.nf-art { order: -1; direction: ltr; position: relative; min-width: 0; }
.nf-words { position: relative; z-index: 1; display: flex; flex-direction: column; gap: .8rem; min-width: 0; }
.nf-words h1 { margin: 0; max-width: none; line-height: 1.04; letter-spacing: -.03em; overflow-wrap: break-word; }
.nf-body { margin: 0; font-size: clamp(.9375rem, .82rem + .35vw, 1.0625rem); line-height: 1.5; color: var(--soft); max-width: 30rem; }
.nf-btns { display: flex; flex-direction: column; gap: .625rem; margin-top: .35rem; }
.nf-btns .button { min-height: 3rem; border-radius: .95rem; font-size: .9375rem; padding: 0 1.4rem; }
.nf-btns .button.ghost { font-weight: 700; }
@media (min-width: 56rem) {
  .nf-grid { grid-template-columns: minmax(0, 27rem) minmax(0, 1fr); align-items: center; gap: 2rem; }
  .nf-art { order: 0; }
  .nf-words { gap: 1rem; }
  .nf-btns { flex-direction: row; flex-wrap: wrap; }
  .nf-btns .button { min-height: 3.25rem; }
}

/* 404: no location. A camera roll of abstract colour photos (never
   real ones) popping in, a scan line reading them, and one dashed tile in
   the middle with no location; wider screens add its photo info. */
.nf-d { background: radial-gradient(ellipse at 72% 45%, var(--accent-soft), transparent 60%); }
.nf-d h1 { font-size: clamp(1.875rem, .5rem + 4.2vw, 3.375rem); }
.nf-d .nf-art { --t: 5.75rem; --gap: .5rem; padding-top: .5rem; }
.nf-roll { position: relative; display: grid; grid-template-columns: repeat(3, var(--t)); gap: var(--gap); width: max-content; margin: 0 auto; }
.nf-tile { position: relative; width: var(--t); height: var(--t); border-radius: calc(var(--t) * .1); overflow: hidden; }
.nf-tile i { position: absolute; left: calc(var(--t) * .07); bottom: calc(var(--t) * .07); font-size: calc(var(--t) * .17); font-style: normal; line-height: 1; }
.nf-tile.p1 { background: linear-gradient(160deg, #FFB36B, #E8552A 60%, #5B2A6E); }
.nf-tile.p2 { background: linear-gradient(170deg, #7CC6F2, #2F6FB0); }
.nf-tile.p3 { background: linear-gradient(150deg, #9FE3B4, #2C7A55); }
.nf-tile.p4 { background: linear-gradient(160deg, #F7D774, #C98A2B); }
.nf-tile.p6 { background: linear-gradient(170deg, #1C2340, #5B5FD9 70%, #FFC72C); }
.nf-tile.p7 { background: linear-gradient(150deg, #FF9AB8, #B0457A); }
.nf-tile.p8 { background: linear-gradient(165deg, #86E0E6, #1F8A9A); }
.nf-tile.p9 { background: linear-gradient(155deg, #D9C3A0, #7A5A3A); }
.nf-none { border: 2px dashed var(--accent); background: var(--sunken); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--accent); }
.nf-none svg { width: calc(var(--t) * .3); height: calc(var(--t) * .3); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nf-none b { font-size: calc(var(--t) * .2); line-height: 1; }
.nf-scan { display: none; position: absolute; inset: 0 -6px; pointer-events: none; }
.nf-scan::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 18px var(--accent); }
.nf-info { display: none; }
@media (min-width: 56rem) {
  .nf-d .nf-art { --t: 7rem; --gap: .625rem; }
  .nf-info { display: block; width: calc(3 * var(--t) + 2 * var(--gap)); margin: 1.375rem auto 0; padding: .875rem 1.125rem .25rem; border-radius: 1.125rem; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
  .nf-info p { display: flex; align-items: center; gap: .625rem; margin: 0; padding: .625rem 0; border-top: 1px solid var(--line); font-size: .875rem; }
  .nf-info p > span:first-child { font-size: 1rem; }
  .nf-info p > span + span { flex: 1; color: var(--muted); }
  .nf-info p b { font-weight: 700; text-align: end; }
  .nf-info .nf-info-title { padding: 0 0 .5rem; font-size: .6875rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
}
@media (prefers-reduced-motion: no-preference) {
  .nf-tile { animation: nf-tile .5s both; }
  .nf-tile:nth-child(2) { animation-delay: .12s; } .nf-tile:nth-child(3) { animation-delay: .24s; }
  .nf-tile:nth-child(4) { animation-delay: .36s; } .nf-tile:nth-child(6) { animation-delay: .6s; }
  .nf-tile:nth-child(7) { animation-delay: .72s; } .nf-tile:nth-child(8) { animation-delay: .84s; }
  .nf-tile:nth-child(9) { animation-delay: .96s; }
  .nf-tile.nf-none { animation: nf-tile .5s .48s both, nf-nudge 3.5s 2s ease-in-out infinite; }
  .nf-scan { display: block; animation: nf-scan 3.5s ease-in-out infinite; }
}
@keyframes nf-tile { 0% { opacity: 0; transform: scale(.85); } 100% { opacity: 1; transform: none; } }
@keyframes nf-nudge { 0%, 86%, 100% { transform: none; } 90% { transform: translateX(-3px); } 94% { transform: translateX(3px); } }
@keyframes nf-scan { 0% { transform: translateY(-4px); opacity: 0; } 10%, 80% { opacity: .8; } 100% { transform: translateY(100%); opacity: 0; } }

/* The challenge invite page (/j, board 98): the challenge's ring of one arc
   per member, none lit, its icon in the middle. */
.join #challenge { min-height: 4rem; }
.join #shown { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.join #shown[hidden] { display: none; }
.join h1 { font-size: 1.8rem; line-height: 1.15; margin: 0; }
.join #shown p { margin: 0; }
.join .ring { position: relative; width: 7rem; height: 7rem; margin-bottom: .5rem; }
.join .ring svg { width: 100%; height: 100%; display: block; }
.join .ring path { fill: none; stroke: var(--line2); stroke-width: 6; stroke-linecap: round; }
.join .ring span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2.4rem; line-height: 1; }
.join > p { margin: 0; }
