/* Wayfarer Passport — night edition.
   Layout: one column (max 620px) over a dotted night field, floating dock at the bottom,
   full-bleed hero canvases, tilted lime marquee bands between sections. Single dark theme by design. */

:root {
  --void: #01021F;
  --night: #060833;
  --ultra: #0A0A86;
  --ultra-2: #1616B0;
  --lime: #D4F53C;
  --lime-ink: #0A0B3A;
  --pink: #FF4FCF;
  --peri: #8F9DFF;
  --peri-2: #5A66C9;
  --white: #F4F6FF;
  --line: rgba(143, 157, 255, 0.24);
  --danger: #FF7A7A;
  --surface: var(--void);

  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-body: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --f-ar: "Noto Naskh Arabic", "Geeza Pro", Tahoma, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dock-h: 64px;
  --dock-gap: 12px;
  --top-h: 60px;
  --cut: 13px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; overflow-x: clip; }
body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--void);
  background-image: radial-gradient(rgba(143, 157, 255, 0.14) 1px, transparent 1.4px);
  background-size: 22px 22px;
  background-attachment: fixed;
  color: var(--white);
  font: 400 15px/1.5 var(--f-body);
  font-stretch: 112%;
  padding-bottom: calc(var(--dock-h) + var(--dock-gap) * 2 + env(safe-area-inset-bottom, 0px));
  overflow-x: clip;
}
body.no-passport { padding-bottom: 0; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
a { color: var(--lime); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--pink); color: var(--void); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--f-mono); letter-spacing: 0.02em; }
.ar { font-family: var(--f-ar); font-weight: 600; letter-spacing: 0; }
.muted { color: var(--peri); }

/* ---------- type ---------- */
.kicker {
  margin: 0;
  font: 600 10.5px/1.2 var(--f-body);
  font-stretch: 125%;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--peri);
}
.display {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.98;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.outline { color: transparent; -webkit-text-stroke: 1.3px var(--white); }
.outline.lime { -webkit-text-stroke-color: var(--lime); }
.solid { color: var(--white); -webkit-text-stroke: 0; }
.lede {
  margin: 0;
  font: 500 clamp(18px, 4.6vw, 22px)/1.28 var(--f-body);
  font-stretch: 125%;
  letter-spacing: -0.005em;
  text-wrap: balance;
  max-width: 30ch;
}
.body-peri { margin: 0; color: var(--peri); font-size: 14.5px; line-height: 1.55; max-width: 46ch; }
.serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }

/* ---------- page frame ---------- */
#view {
  max-width: 620px;
  margin: 0 auto;
  padding-block: calc(env(safe-area-inset-top, 0px) + var(--top-h)) 40px;
  padding-left: max(18px, env(safe-area-inset-left, 0px));
  padding-right: max(18px, env(safe-area-inset-right, 0px));
  display: flex;
  flex-direction: column;
  gap: 30px;
  outline: none;
}
body.no-passport #view { padding-top: 0; max-width: none; padding-left: 0; padding-right: 0; gap: 0; }
.bleed { margin-left: calc(-1 * max(18px, env(safe-area-inset-left, 0px))); margin-right: calc(-1 * max(18px, env(safe-area-inset-right, 0px))); }

/* top bar */
.topbar {
  position: fixed;
  z-index: 700;
  top: 0; left: 0; right: 0;
  height: calc(var(--top-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: max(18px, env(safe-area-inset-left, 0px));
  padding-right: max(18px, env(safe-area-inset-right, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  transition: background-color 0.3s;
}
.topbar > * { pointer-events: auto; }
.topbar.scrolled { background: linear-gradient(rgba(1, 2, 31, 0.92), rgba(1, 2, 31, 0)); }
.mark { display: block; width: 34px; height: 34px; }
.mark svg { width: 100%; height: 100%; }
.mark rect { fill: var(--lime); }
.mark path { fill: none; stroke: var(--ultra); stroke-width: 3.2; stroke-linejoin: miter; stroke-linecap: square; }
.topbar-right { display: flex; gap: 8px; align-items: center; }

/* chips (outlined pills, like spec tags on a photo) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(244, 246, 255, 0.7);
  background: rgba(1, 2, 31, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font: 600 9.5px/1 var(--f-body);
  font-stretch: 125%;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  white-space: nowrap;
}
.chip.lime { border-color: var(--lime); color: var(--lime); }
.chip.pink { border-color: var(--pink); color: var(--pink); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--peri-2); }
.chip.good .dot { background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.chip.weak .dot { background: #FFC85A; }
.chip.off .dot { background: var(--danger); }

/* pink ellipse label */
.tag {
  position: relative;
  display: inline-grid;
  place-items: center;
  align-self: flex-start;
  padding: 12px 24px;
  font: 600 10px/1 var(--f-body);
  font-stretch: 125%;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white);
}
.tag svg { position: absolute; inset: -2px -6px; width: calc(100% + 12px); height: calc(100% + 4px); overflow: visible; }
.tag ellipse { fill: none; stroke: var(--pink); stroke-width: 1.4; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s var(--ease) 0.15s; }
.motion .tag[data-reveal]:not(.in) ellipse { stroke-dashoffset: 1; }

/* crosshair marker */
.xh { position: relative; width: 14px; height: 14px; flex: none; }
.xh::before, .xh::after { content: ""; position: absolute; background: var(--peri-2); }
.xh::before { left: 6.5px; top: 0; width: 1px; height: 14px; }
.xh::after { top: 6.5px; left: 0; height: 1px; width: 14px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------- buttons (pill with one chamfered corner) ---------- */
.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px 0 999px 999px;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  background: var(--peri);
  color: var(--white);
  font: 600 11.5px/1 var(--f-body);
  font-stretch: 125%;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.15s var(--ease), background-color 0.2s;
  white-space: nowrap;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 1.4px;
  z-index: -1;
  border-radius: inherit;
  clip-path: polygon(0 0, calc(100% - var(--cut) + 0.6px) 0, 100% calc(var(--cut) - 0.6px), 100% 100%, 0 100%);
  background: var(--surface);
  transition: background-color 0.2s;
}
.btn:hover::before { background: color-mix(in srgb, var(--surface) 80%, var(--peri)); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-lime { background: var(--lime); color: var(--lime-ink); }
.btn-lime::before { display: none; }
.btn-lime:hover { background: #E2FF63; }
.btn-pink { background: var(--pink); color: var(--void); }
.btn-pink::before { display: none; }
.btn-danger { background: var(--danger); color: var(--danger); }
.btn-lg { min-height: 56px; font-size: 12.5px; padding: 0 28px; --cut: 16px; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 10.5px; --cut: 10px; }
.btn-block { width: 100%; }
.btn .arr { font-family: var(--f-body); font-size: 15px; letter-spacing: 0; }
.link-btn { background: none; border: 0; color: var(--peri); font: 600 11px/1 var(--f-body); font-stretch: 125%; letter-spacing: 0.12em; text-transform: uppercase; padding: 14px 6px; cursor: pointer; }
.back { align-self: flex-start; }

/* ---------- tilted marquee band ---------- */
.band-wrap { overflow: hidden; padding-block: 26px; margin-block: -6px; }
.band {
  transform: rotate(-3deg);
  margin: 0 -30px;
  background: var(--lime);
  color: var(--lime-ink);
  overflow: hidden;
  white-space: nowrap;
  padding-block: 9px 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.band.pink { background: var(--pink); transform: rotate(2.4deg); }
.band.ultra { background: var(--ultra); color: var(--lime); }
.band-track { display: inline-flex; align-items: center; gap: 22px; padding-right: 22px; will-change: transform; }
.band-item {
  font: 800 clamp(18px, 5vw, 24px)/1 var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: transparent;
  -webkit-text-stroke: 1.2px currentColor;
}
.band .band-item { -webkit-text-stroke-color: var(--lime-ink); }
.band.ultra .band-item { -webkit-text-stroke-color: var(--lime); }
.band.pink .band-item { -webkit-text-stroke-color: var(--void); }
.band-ico { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--lime-ink); stroke-width: 1.8; }
.band.ultra .band-ico { stroke: var(--lime); }
.band.pink .band-ico { stroke: var(--void); }

/* ---------- reveal motion ---------- */
.motion [data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity 0.9s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0ms); }
.motion [data-reveal].in { opacity: 1; transform: none; }
.motion [data-reveal="clip"] { opacity: 1; transform: none; }
.motion [data-reveal="clip"]::after { content: ""; position: absolute; inset: -1px; z-index: 3; background: var(--void); transform-origin: 50% 0; transition: transform 1.15s var(--ease); transition-delay: var(--d, 0ms); pointer-events: none; }
.motion [data-reveal="clip"].in::after { transform: scaleY(0); }
.motion [data-reveal="lines"] { opacity: 1; transform: none; }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.w > span { display: inline-block; }
.motion [data-reveal="lines"] .w > span { transform: translateY(108%); transition: transform 1s var(--ease); transition-delay: calc(var(--wi, 0) * 22ms + var(--d, 0ms)); }
.motion [data-reveal="lines"].in .w > span { transform: none; }

/* ---------- intro loader ---------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: var(--ultra);
  display: grid;
  place-items: center;
  padding: 24px;
  cursor: pointer;
}
.intro-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.intro-word { display: flex; overflow: hidden; font: 800 clamp(34px, 10.8vw, 88px)/1 var(--f-display); color: var(--lime); letter-spacing: -0.01em; padding-bottom: 0.06em; }
.intro-word span { display: inline-block; transform: translateY(105%); }
.intro.go .intro-word span { animation: rise 0.9s var(--ease) forwards; animation-delay: calc(var(--i) * 55ms); }
.intro-tag { margin: 0; font: 600 10.5px/1 var(--f-body); font-stretch: 125%; letter-spacing: 0.28em; text-transform: uppercase; color: var(--white); opacity: 0; }
.intro.go .intro-tag { animation: fade 0.7s ease 0.55s forwards; }
.intro-bar { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 48px); width: 120px; height: 2px; transform: translateX(-50%); background: rgba(212, 245, 60, 0.2); overflow: hidden; }
.intro-bar span { position: absolute; inset: 0; background: var(--lime); transform: scaleX(0); transform-origin: left; }
.intro.go .intro-bar span { animation: grow 1.2s var(--ease) forwards; }
@keyframes rise { to { transform: none; } }
@keyframes fade { to { opacity: 1; } }
@keyframes grow { to { transform: scaleX(1); } }

.wipe {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: var(--ultra);
  transform: translateY(100%);
  pointer-events: none;
}
.wipe::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--lime); }

/* ---------- hero (globe) ---------- */
.hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  padding-block: calc(env(safe-area-inset-top, 0px) + var(--top-h)) 26px;
  padding-left: max(18px, env(safe-area-inset-left, 0px));
  padding-right: max(18px, env(safe-area-inset-right, 0px));
  overflow: hidden;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-canvas.top { height: 78%; top: 2%; }
.hero > :not(canvas) { position: relative; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(transparent, var(--void)); pointer-events: none; z-index: 0; }
.hero > * { z-index: 1; }
.hero .display { font-size: clamp(38px, 12.4vw, 76px); }
.hero .display .ar { display: block; font-size: 0.42em; margin-top: 8px; -webkit-text-stroke: 0; color: var(--peri); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.scroll-cue { display: flex; flex-direction: column; align-items: center; gap: 6px; align-self: center; font: 600 9px/1 var(--f-body); font-stretch: 125%; letter-spacing: 0.2em; text-transform: uppercase; color: var(--white); }
.scroll-cue svg { width: 14px; height: 26px; stroke: var(--lime); fill: none; stroke-width: 1.5; animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(5px); } }

/* ---------- cover (no passport) ---------- */
.cover-hero { min-height: 100dvh; padding-top: calc(env(safe-area-inset-top, 0px) + 20px); justify-content: space-between; }
.cover-top { display: flex; align-items: center; justify-content: space-between; }
.cover-word { font: 800 13px/1 var(--f-display); letter-spacing: 0.14em; color: var(--lime); }
.cover-hero .display { font-size: clamp(40px, 13vw, 92px); }
.cover-body {
  max-width: 620px;
  margin: 0 auto;
  padding-block: 24px 60px;
  padding-left: max(18px, env(safe-area-inset-left, 0px));
  padding-right: max(18px, env(safe-area-inset-right, 0px));
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: baseline; padding: 18px 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps .n { font: 800 22px/1 var(--f-display); color: transparent; -webkit-text-stroke: 1px var(--lime); }
.steps h3 { margin: 0 0 4px; font: 800 15px/1.15 var(--f-display); text-transform: uppercase; letter-spacing: 0.02em; }
.steps p { margin: 0; color: var(--peri); font-size: 14px; }
.cover-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.fineprint { margin: 0; font-size: 11.5px; color: var(--peri-2); text-align: center; }
.fineprint.src { text-align: left; margin-top: -4px; }

/* ---------- album cards ---------- */
.list-section { display: flex; flex-direction: column; gap: 18px; }
.cards { display: flex; flex-direction: column; gap: 26px; }
.card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--white); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; width: 100%; }
.card-art {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 30% 10%, rgba(30, 30, 200, 0.55), transparent 60%),
    radial-gradient(rgba(143, 157, 255, 0.18) 1px, transparent 1.4px) 0 0 / 16px 16px,
    var(--night);
  border: 1px solid var(--line);
}
.card-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.card-art .chips { position: absolute; left: 12px; top: 12px; right: 12px; }
.card-art .done-flag { position: absolute; right: 12px; bottom: 12px; }
.card-title { margin: 0; font: 800 clamp(19px, 5.4vw, 24px)/1.05 var(--f-display); text-transform: uppercase; letter-spacing: 0.01em; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card-title .ar { font-size: 0.72em; color: var(--peri); }
.card-meta { margin: 0; color: var(--peri); font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meter { display: flex; align-items: center; gap: 12px; }
.meter .bar { flex: 1; }
.meter .num { font: 600 12px/1 var(--f-mono); color: var(--white); font-variant-numeric: tabular-nums; }
.bar { --p: 0%; display: block; height: 3px; background: rgba(143, 157, 255, 0.22); border-radius: 3px; overflow: hidden; }
.bar > span { display: block; height: 100%; width: var(--p); background: var(--lime); box-shadow: 0 0 10px var(--lime); transition: width 1s var(--ease); }
.card.is-complete .card-art { border-color: var(--lime); }
.done-flag { display: inline-grid; place-items: center; height: 26px; padding: 0 12px; background: var(--lime); color: var(--lime-ink); font: 800 10px/1 var(--f-display); letter-spacing: 0.08em; text-transform: uppercase; border-radius: 999px 0 999px 999px; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%); }
.empty { margin: 0; color: var(--peri-2); font-size: 14px; }
.note { margin: 0; color: var(--peri); font-size: 13.5px; max-width: 52ch; }

/* ---------- album page ---------- */
.album-hero { display: flex; flex-direction: column; gap: 14px; }
.hero.bleed { margin-top: calc(-1 * (env(safe-area-inset-top, 0px) + var(--top-h))); }
.album-hero .art-wide { position: relative; aspect-ratio: 4 / 3; max-width: 100%; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(120% 90% at 30% 10%, rgba(30, 30, 200, 0.6), transparent 60%), radial-gradient(rgba(143, 157, 255, 0.18) 1px, transparent 1.4px) 0 0 / 16px 16px, var(--night); }
.album-hero .art-wide canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.album-hero .art-wide .chips { position: absolute; left: 14px; top: 14px; right: 14px; }
.album-title { font-size: clamp(34px, 11vw, 64px); margin-top: -0.55em; position: relative; z-index: 1; padding-inline: 4px; }
.album-sub { display: flex; flex-direction: column; gap: 6px; }
.score { display: flex; align-items: baseline; gap: 10px; }
.score b { font: 800 clamp(44px, 14vw, 72px)/0.9 var(--f-display); color: var(--lime); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.score span { font: 800 clamp(22px, 7vw, 34px)/1 var(--f-display); color: transparent; -webkit-text-stroke: 1px var(--white); }
.score small { margin-left: auto; text-align: right; color: var(--peri); font-size: 12px; max-width: 16ch; }
.complete-line { margin: 0; font: 800 13px/1 var(--f-display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--lime); }

.seg {
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(6, 8, 51, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + var(--top-h) - 4px);
  z-index: 50;
}
.seg a {
  flex: 1 1 auto;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  border-radius: 999px 0 999px 999px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  text-decoration: none;
  color: var(--peri);
  font: 600 9.5px/1 var(--f-body);
  font-stretch: 112%;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.seg a.on { background: var(--lime); color: var(--lime-ink); }
.seg .ct { font-family: var(--f-mono); letter-spacing: 0; opacity: 0.85; }

.slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .slots { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 10, 134, 0.28), rgba(6, 8, 51, 0.6));
  cursor: pointer;
  text-align: center;
  min-width: 0;
  color: var(--white);
}
.slot::before, .slot::after { content: ""; position: absolute; width: 9px; height: 9px; border-color: var(--peri-2); border-style: solid; }
.slot::before { left: 8px; top: 8px; border-width: 1px 0 0 1px; }
.slot::after { right: 8px; bottom: 8px; border-width: 0 1px 1px 0; }
.slot-stamp, .slot-blank { width: 100%; max-width: 132px; aspect-ratio: 1; display: grid; place-items: center; }
.slot-stamp canvas { width: 100% !important; height: auto !important; filter: drop-shadow(0 0 10px rgba(212, 245, 60, 0.18)); }
.slot-blank > span {
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px dashed rgba(143, 157, 255, 0.45);
  display: grid;
  place-items: center;
  font: 800 28px/1 var(--f-display);
  color: rgba(143, 157, 255, 0.5);
}
.slot-gem .slot-blank > span, .slot-blank.slot-gem > span { border-color: rgba(255, 79, 207, 0.5); color: rgba(255, 79, 207, 0.65); border-radius: 42% / 34%; }
.slot-community .slot-blank > span, .slot-blank.slot-community > span { border-radius: 12px; }
.slot-name { font: 600 12.5px/1.25 var(--f-body); font-stretch: 112%; text-wrap: balance; overflow-wrap: anywhere; }
.slot-sub { font: 500 10.5px/1.3 var(--f-mono); color: var(--peri); }
.slot.is-claimable { border-color: var(--lime); box-shadow: 0 0 0 1px var(--lime), 0 0 28px rgba(212, 245, 60, 0.25); }
.slot.is-claimable .slot-sub { color: var(--lime); }
.slot.is-claimable .slot-blank > span { border-style: solid; border-color: var(--lime); animation: pulse 1.5s ease-in-out infinite; }
.slot-stamp.big, .slot-blank.big { max-width: 210px; width: 210px; margin: 0 auto; }
/* A locked landmark: its own silhouette, dashed, waiting to be issued. */
.slot-sil svg { width: 94%; height: auto; overflow: visible; }
.sil .sil-edge { fill: none; stroke: rgba(143, 157, 255, 0.72); stroke-width: 2.6; stroke-linejoin: round; stroke-dasharray: 3.2 2.2; }
.sil .sil-fill { fill: #111767; }
.sil .sil-line { fill: none; stroke: rgba(143, 157, 255, 0.4); stroke-width: 1; stroke-linecap: round; }
.slot.is-claimable .sil .sil-edge { stroke: var(--lime); stroke-dasharray: none; }
.slot.is-claimable .slot-sil svg { animation: pulse 1.5s ease-in-out infinite; }
.slot-stamp canvas.shaped { filter: drop-shadow(0 0 12px rgba(212, 245, 60, 0.16)); }

.panel { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: rgba(6, 8, 51, 0.7); }
.panel-title { margin: 0; font: 800 14px/1.2 var(--f-display); text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- ranks ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 8px; align-items: end; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: 16px; border: 1px solid var(--line); background: rgba(6, 8, 51, 0.7); text-align: center; min-width: 0; }
.pod .rkbig { font: 800 clamp(44px, 14vw, 70px)/0.9 var(--f-display); color: transparent; -webkit-text-stroke: 1.3px var(--white); }
.pod.p1 { padding-block: 22px; border-color: var(--lime); background: linear-gradient(180deg, rgba(212, 245, 60, 0.14), rgba(6, 8, 51, 0.7)); }
.pod.p1 .rkbig { -webkit-text-stroke-color: var(--lime); }
.pod .nm { font: 600 12.5px/1.2 var(--f-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pod .vl { font: 500 10.5px/1.2 var(--f-mono); color: var(--peri); }
.board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.board li { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: 14px 4px; border-top: 1px solid var(--line); }
.board li:last-child { border-bottom: 1px solid var(--line); }
.board .rk { font: 800 18px/1 var(--f-display); color: transparent; -webkit-text-stroke: 1px var(--peri); font-variant-numeric: tabular-nums; }
.board .nm { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.board .nm-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .nm-sub { font-size: 12px; color: var(--peri); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .vl { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-variant-numeric: tabular-nums; }
.board .vl b { font: 800 18px/1 var(--f-display); }
.board .vl small { font: 500 10.5px/1 var(--f-mono); color: var(--peri); }
li.me { background: rgba(212, 245, 60, 0.08); border-radius: 12px; }
li.me .rk { -webkit-text-stroke-color: var(--lime); }
.select {
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--night);
  color: var(--white);
  padding: 0 18px;
  font: 600 13px/1 var(--f-body);
  font-stretch: 112%;
}

/* ---------- passport bio page ---------- */
.bio {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  padding: 16px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(160deg, var(--bio-a, #1414A0), var(--bio-b, var(--ultra)) 45%, var(--bio-c, #06065A));
  border: 1px solid rgba(212, 245, 60, 0.35);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}
.bio-rosette { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bio > *:not(.bio-rosette) { position: relative; }
.bio-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid rgba(212, 245, 60, 0.35); font: 800 11px/1 var(--f-display); letter-spacing: 0.2em; color: var(--lime); }
.bio-top .ar { font-size: 14px; letter-spacing: 0; }
.bio-grid { display: grid; grid-template-columns: 104px 1fr; gap: 14px; align-items: start; }
.bio-photo {
  position: relative;
  width: 104px;
  aspect-ratio: 4 / 5;
  border: 0;
  border-radius: 8px;
  background: rgba(1, 2, 31, 0.5);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--peri);
  font: 600 10px/1.2 var(--f-body);
  font-stretch: 125%;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.bio-photo img { width: 100%; height: 100%; object-fit: cover; }
.bio-photo::after { content: ""; position: absolute; inset: 5px; border: 1px solid transparent; border-image: linear-gradient(var(--lime), var(--lime)) 1; clip-path: polygon(0 0, 22% 0, 22% 2px, 2px 2px, 2px 22%, 0 22%, 0 78%, 2px 78%, 2px calc(100% - 2px), 22% calc(100% - 2px), 22% 100%, 78% 100%, 78% calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) 78%, 100% 78%, 100% 22%, calc(100% - 2px) 22%, calc(100% - 2px) 2px, 78% 2px, 78% 0, 100% 0, 100% 100%, 0 100%); }
.bio-fields { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px; min-width: 0; }
.bio-fields div { min-width: 0; }
.bio-fields .wide { grid-column: 1 / -1; }
.bio-fields dt { font: 600 8.5px/1.2 var(--f-body); font-stretch: 125%; letter-spacing: 0.14em; text-transform: uppercase; color: var(--peri); }
.bio-fields dd { margin: 3px 0 0; font: 600 14.5px/1.2 var(--f-body); font-stretch: 112%; overflow-wrap: anywhere; }
.bio-stats { display: grid; grid-template-columns: repeat(3, 1fr); padding-top: 12px; border-top: 1px solid rgba(212, 245, 60, 0.35); }
.bio-stats div { display: flex; flex-direction: column; gap: 4px; }
.bio-stats b { font: 800 26px/1 var(--f-display); color: var(--lime); font-variant-numeric: tabular-nums; }
.bio-stats span { font: 600 9px/1.2 var(--f-body); font-stretch: 125%; letter-spacing: 0.12em; text-transform: uppercase; color: var(--peri); }
.mrz { margin: 0 -16px; padding: 12px 16px 14px; background: rgba(1, 2, 31, 0.55); font: 500 clamp(9px, 2.55vw, 13.5px)/1.6 var(--f-mono); letter-spacing: 0.06em; white-space: pre; overflow-x: auto; color: var(--white); }

.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.row:last-child { border-bottom: 1px solid var(--line); }
.row > div { min-width: 0; }
.row-title { margin: 0; font: 800 12.5px/1.2 var(--f-display); text-transform: uppercase; letter-spacing: 0.04em; }
.row-sub { margin: 4px 0 0; font-size: 13px; color: var(--peri); }
.switch { appearance: none; flex: none; width: 50px; height: 30px; border-radius: 999px; background: rgba(143, 157, 255, 0.25); position: relative; cursor: pointer; transition: background-color 0.2s; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--white); transition: transform 0.25s var(--ease); }
.switch:checked { background: var(--pink); }
.switch:checked::after { transform: translateX(20px); }
label.row { cursor: pointer; }

/* ---------- suggestions ---------- */
.suggestions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.suggestions li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
.sg-main { flex: 1; min-width: 0; }
.sg-name { margin: 0; font-weight: 600; overflow-wrap: anywhere; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sg-note { margin: 6px 0 0; font: 400 17px/1.35 var(--f-serif); font-style: italic; }
.sg-by { margin: 6px 0 0; font-size: 12px; color: var(--peri); }
.vote { flex: none; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 50px; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--night); cursor: pointer; font: 600 13px/1 var(--f-mono); }
.vote svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.vote.on { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.vote.on svg { fill: currentColor; }
.vote:disabled { opacity: 0.45; cursor: default; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend { font: 600 10px/1.2 var(--f-body); font-stretch: 125%; letter-spacing: 0.14em; text-transform: uppercase; color: var(--peri); }
.field em { font-style: normal; color: var(--peri-2); }
.field input, .field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(1, 2, 31, 0.55);
  color: var(--white);
  font: 500 16px/1.3 var(--f-body);
  font-stretch: 112%;
}
.field input::placeholder, .field textarea::placeholder { color: var(--peri-2); }
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--lime); outline-offset: 0; border-color: transparent; }
.choice { display: flex; gap: 8px; flex-wrap: wrap; }
.choice label { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); cursor: pointer; font-weight: 600; }
.choice label:has(input:checked) { border-color: var(--lime); background: rgba(212, 245, 60, 0.1); }
.choice input { accent-color: var(--lime); }
.form-note { margin: 0; font-size: 13px; color: var(--peri); }
.code-box { margin: 0; padding: 14px; border-radius: 14px; background: rgba(1, 2, 31, 0.6); word-break: break-all; font-size: 13px; user-select: all; }

/* ---------- sheet ---------- */
.sheet {
  --surface: var(--ultra);
  border: 0;
  padding: 0;
  margin: auto auto 0;
  width: 100%;
  max-width: 620px;
  max-height: 94dvh;
  border-radius: 26px 26px 0 0;
  background:
    radial-gradient(rgba(143, 157, 255, 0.12) 1px, transparent 1.4px) 0 0 / 22px 22px,
    var(--ultra);
  color: var(--white);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sheet::backdrop { background: rgba(1, 2, 31, 0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet[open] { animation: sheet-in 0.5s var(--ease); }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: flex-end; padding: 14px 18px 0; }
.close-x { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--white); font: 600 10px/1 var(--f-body); font-stretch: 125%; letter-spacing: 0.16em; text-transform: uppercase; padding: 8px 2px; cursor: pointer; }
.close-x span { font-size: 18px; letter-spacing: 0; }
.sheet-body {
  padding-block: 6px calc(30px + env(safe-area-inset-bottom, 0px));
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sheet-title { margin: 0; font: 800 clamp(24px, 7vw, 32px)/1.02 var(--f-display); text-transform: uppercase; letter-spacing: 0.01em; text-wrap: balance; overflow-wrap: anywhere; }
.sheet-lead { margin: 0; color: var(--peri); }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.sheet-actions .btn-lg { flex: 1 1 100%; }
.place-visual { padding: 4px 0 8px; display: grid; place-items: center; }
.fact { margin: 0; font: 400 clamp(21px, 5.8vw, 26px)/1.25 var(--f-serif); font-style: italic; max-width: 32ch; }
.elev { margin: 0; font: 600 13px/1.3 var(--f-mono); color: var(--lime); }
.status { margin: 0; font: 500 12.5px/1.45 var(--f-mono); color: var(--peri); }
.status.ok { color: var(--lime); }
.title-ar { margin: 0; font: 700 20px/1.4 var(--f-ar); color: var(--peri); }

/* claim moment */
.sheet.claim-mode { max-height: 100dvh; height: 100dvh; border-radius: 0; background: var(--void); }
.claim { position: relative; display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; padding-top: 8px; }
.claim-bands { position: absolute; inset: 20px -40px auto; height: 300px; display: flex; flex-direction: column; justify-content: center; gap: 110px; pointer-events: none; opacity: 0.85; z-index: 0; }
.claim-stage { position: relative; z-index: 1; width: 100%; display: grid; place-items: center; padding: 12px 0; }
.claim-stage::before { content: ""; position: absolute; left: 50%; top: 50%; width: 270px; height: 270px; max-width: 80vw; max-height: 80vw; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, var(--void) 58%, rgba(1, 2, 31, 0) 71%); }
.claim > :not(.claim-bands) { position: relative; z-index: 1; }
.claim-stamp { width: 240px; max-width: 72vw; position: relative; z-index: 1; }
.claim-stamp.thunk { animation: thunk 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
.claim .kicker { color: var(--lime); }
.claim .sheet-actions { justify-content: center; width: 100%; }
.flash { position: fixed; inset: 0; background: var(--lime); z-index: 4500; pointer-events: none; opacity: 0; }
.flash.go { animation: flash 0.55s ease-out; }
@keyframes flash { 0% { opacity: 0.85; } 100% { opacity: 0; } }
.composer { display: flex; flex-direction: column; gap: 14px; }
.composer img { width: 100%; border-radius: 16px; background: var(--night); min-height: 120px; object-fit: contain; max-height: 62dvh; }

/* ---------- radar ---------- */
#radar-wrap { position: fixed; inset: 0; z-index: 1; }
#radar { position: absolute; inset: 0; background: var(--void); }
.leaflet-container { font: inherit; background: var(--void); }
.leaflet-tile-pane { filter: grayscale(1) invert(1) sepia(1) hue-rotate(195deg) saturate(2.6) brightness(0.6) contrast(1.2); }
.leaflet-control-attribution { font-size: 9.5px; background: rgba(1, 2, 31, 0.7) !important; color: var(--peri) !important; }
.leaflet-control-attribution a { color: var(--white) !important; }
.leaflet-bar a { background: var(--night); color: var(--white); border-color: var(--line); }
.radar-top { position: absolute; z-index: 500; top: calc(env(safe-area-inset-top, 0px) + var(--top-h)); left: max(14px, env(safe-area-inset-left, 0px)); right: max(14px, env(safe-area-inset-right, 0px)); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; pointer-events: none; }
.radar-top > * { pointer-events: auto; }
.practice-banner { width: 100%; padding: 10px 14px; border-radius: 12px; background: var(--pink); color: var(--void); font: 700 10.5px/1.3 var(--f-body); font-stretch: 125%; letter-spacing: 0.08em; text-transform: uppercase; }
.round-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--night); display: grid; place-items: center; cursor: pointer; }
.round-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--lime); stroke-width: 2; }
.leaflet-top.leaflet-right { top: calc(env(safe-area-inset-top, 0px) + var(--top-h) + 52px); }
.radar-sheet {
  position: absolute;
  z-index: 500;
  left: max(10px, env(safe-area-inset-left, 0px));
  right: max(10px, env(safe-area-inset-right, 0px));
  bottom: calc(var(--dock-h) + var(--dock-gap) * 2 + env(safe-area-inset-bottom, 0px));
  margin: 0 auto;
  max-width: 600px;
  border-radius: 22px;
  background: rgba(10, 10, 134, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  padding: 14px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  --surface: var(--ultra);
}
.radar-title { margin: 0 4px; font: 800 11px/1.2 var(--f-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--lime); }
.nearest { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.nearest button { width: 100%; display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px; padding: 9px 4px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; cursor: pointer; color: var(--white); }
.nearest li:first-child button { border-top: 0; }
.nearest button.is-claimable .nr-dist { color: var(--lime); }
.arrow { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); position: relative; }
.arrow::after { content: ""; position: absolute; left: 50%; top: 50%; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 12px solid var(--lime); transform: translate(-50%, -60%) rotate(var(--b)); transform-origin: 50% 60%; }
.nr-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nr-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nr-sub { font-size: 11.5px; color: var(--peri); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nr-dist { font: 600 12px/1 var(--f-mono); color: var(--white); white-space: nowrap; }

.pin span { display: block; width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid var(--lime); background: var(--void); box-shadow: 0 0 12px rgba(212, 245, 60, 0.45); }
.pin-gem span { border-color: var(--pink); border-radius: 42% / 34%; box-shadow: 0 0 12px rgba(255, 79, 207, 0.45); }
.pin-community span { border-color: var(--peri); border-radius: 7px; box-shadow: none; }
.pin.is-stamped span { background: var(--lime); }
.pin-gem.is-stamped span { background: var(--pink); }
.pin-community.is-stamped span { background: var(--peri); }
.pin.is-claimable span { animation: pulse 1.3s ease-in-out infinite; background: var(--white); border-color: var(--white); }
.unlock-ring { stroke: var(--lime); stroke-width: 1.4; stroke-dasharray: 4 5; fill: var(--lime); fill-opacity: 0.07; }
.ring-gem { stroke: var(--pink); fill: var(--pink); }
.ring-community { stroke: var(--peri); fill: var(--peri); }
.unlock-ring.is-claimable { stroke-dasharray: none; fill-opacity: 0.18; }
.gem-search { stroke: var(--pink); stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; fill: var(--pink); fill-opacity: 0.1; }
.acc-circle { stroke: #FFFFFF; stroke-width: 1; fill: #FFFFFF; fill-opacity: 0.08; }
.user-dot span { display: block; width: 20px; height: 20px; border-radius: 50%; background: var(--white); border: 3px solid var(--ultra); box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.22), 0 0 18px rgba(255, 255, 255, 0.6); }

/* ---------- stamp button ---------- */
.fab {
  position: fixed;
  z-index: 900;
  left: 50%;
  bottom: calc(var(--dock-h) + var(--dock-gap) * 2 + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  max-width: calc(100vw - 36px);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 26px 0 12px;
  border: 0;
  border-radius: 999px 0 999px 999px;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
  background: var(--lime);
  color: var(--lime-ink);
  font: 800 12.5px/1.1 var(--f-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 0 40px rgba(212, 245, 60, 0.45);
  cursor: pointer;
  animation: fab-in 0.5s var(--ease);
}
.fab > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fab.practice { background: var(--pink); color: var(--void); box-shadow: 0 0 40px rgba(255, 79, 207, 0.45); }
.fab-ink { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 2.5px solid currentColor; position: relative; animation: spin 6s linear infinite; }
.fab-ink::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 1.5px dashed currentColor; }
body.on-radar .fab { bottom: calc(var(--dock-h) + var(--dock-gap) * 2 + env(safe-area-inset-bottom, 0px) + 210px); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- dock ---------- */
.dock {
  position: fixed;
  z-index: 800;
  left: max(12px, env(safe-area-inset-left, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: calc(var(--dock-gap) + env(safe-area-inset-bottom, 0px));
  max-width: 520px;
  margin: 0 auto;
  height: var(--dock-h);
  display: flex;
  justify-content: space-between;
  gap: 4px;
  padding: 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(6, 8, 51, 0.82);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.dock a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 999px 0 999px 999px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  text-decoration: none;
  color: var(--peri);
  font: 600 8.5px/1 var(--f-body);
  font-stretch: 125%;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background-color 0.25s, color 0.25s;
}
.dock svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.dock svg .fill { fill: currentColor; stroke: none; }
.dock a.on { background: var(--lime); color: var(--lime-ink); }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 6000; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 12px); transform: translateX(-50%); width: min(92vw, 460px); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { padding: 14px 16px 14px 18px; border-radius: 16px; background: var(--ultra); border: 1px solid var(--line); color: var(--white); font-size: 14px; box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45); opacity: 0; transform: translateY(-10px); transition: opacity 0.25s, transform 0.4s var(--ease); position: relative; overflow: hidden; }
.toast::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--peri); }
.toast.in { opacity: 1; transform: none; }
.toast-ok::before { background: var(--lime); }
.toast-error::before { background: var(--danger); }

/* ---------- motion keyframes ---------- */
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes sheet-in { from { transform: translateY(60px); opacity: 0.3; } to { transform: none; opacity: 1; } }
@keyframes fab-in { from { transform: translate(-50%, 20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes thunk {
  0% { transform: scale(2.2) rotate(-8deg); opacity: 0; filter: blur(3px); }
  55% { transform: scale(0.92); opacity: 1; filter: none; }
  75% { transform: scale(1.04); }
  100% { transform: scale(1); }
}
.shake { animation: shake 0.4s ease-out; }
@keyframes shake { 20% { transform: translate(-4px, 2px); } 40% { transform: translate(4px, -2px); } 60% { transform: translate(-2px, 1px); } 80% { transform: translate(2px, 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* World cities: a compact index under the nearby city cards. */
.city-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .city-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.city-row { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(6, 8, 51, 0.7); color: var(--white); text-decoration: none; min-width: 0; }
.city-row:hover { border-color: var(--peri); }
.city-row-name { font: 700 12.5px/1.2 var(--f-display); letter-spacing: 0.02em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.city-row-meta { grid-row: 2; font: 500 10.5px/1.4 var(--f-mono); color: var(--peri); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.city-row-count { grid-row: 1 / span 2; grid-column: 2; align-self: center; font: 600 11px/1 var(--f-mono); color: var(--lime); }
.city-row.is-complete { border-color: var(--lime); }

/* Lifetime stats on the passport page. */
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(6, 8, 51, 0.7); min-width: 0; }
.stat b { font: 800 26px/1 var(--f-display); color: var(--lime); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.stat span { font: 600 10.5px/1.3 var(--f-mono); color: var(--white); text-transform: uppercase; letter-spacing: 0.06em; }
.stat em { font: 500 10.5px/1.35 var(--f-mono); font-style: normal; color: var(--peri); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rarest { margin-top: 8px; }
.rarest .row-sub b { color: var(--lime); font-weight: 700; }

/* Passport card share sheet. */
.card-preview { display: grid; place-items: center; min-height: 240px; margin: 14px 0; }
.card-img { display: block; border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5); max-width: 100%; height: auto; }
.card-post { width: min(100%, 300px); }
.card-story { width: min(100%, 230px); }
.card-wide { width: 100%; }
.stat-long b { font-size: 17px; line-height: 1.15; }

/* Segmented control inside sheets (card sizes): buttons, not links, and no sticky offset. */
.sheet .seg { position: static; margin-top: 12px; }
.seg button { flex: 1 1 auto; padding: 0 10px; display: flex; align-items: center; justify-content: center; min-height: 40px; border: 0; background: none; border-radius: 999px 0 999px 999px; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); color: var(--peri); font: 600 9.5px/1 var(--f-body); font-stretch: 112%; letter-spacing: 0.07em; text-transform: uppercase; white-space: nowrap; cursor: pointer; }
.seg button.on { background: var(--lime); color: var(--lime-ink); }

.btn-ghost { background: transparent; color: var(--peri); }
.btn-ghost::before { display: none; }
.btn-ghost:hover { color: var(--white); }

/* Before Wayfarer: country picker. */
.been-search { width: 100%; min-height: 48px; margin: 12px 0 4px; padding: 10px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(1, 2, 31, 0.55); color: var(--white); font: 500 16px/1.3 var(--f-body); }
.been-search::placeholder { color: var(--peri-2); }
.been-search:focus { outline: 2px solid var(--lime); outline-offset: 0; border-color: transparent; }
.been-groups { display: flex; flex-direction: column; gap: 18px; margin: 14px 0 6px; }
.been-group[hidden], .pick[hidden] { display: none; }
.been-head { margin: 0 0 8px; font: 600 10px/1.2 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--peri); }
.picks { display: flex; flex-wrap: wrap; gap: 6px; }
.pick { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px dashed var(--line); background: rgba(6, 8, 51, 0.7); color: var(--white); font: 500 13px/1 var(--f-body); cursor: pointer; touch-action: manipulation; }
.pick.on { border: 1px dashed #C9D0FF; background: rgba(201, 208, 255, 0.16); }
.pick.stamped { border: 1px solid var(--lime); background: rgba(212, 245, 60, 0.12); color: var(--lime); cursor: default; }
.pick:disabled { opacity: 1; }

/* Trips on the passport page and the recap nudge on home. */
.row-tag { margin-left: 8px; font: 500 10px/1 var(--f-mono); color: var(--peri); letter-spacing: 0.04em; text-transform: none; }
.trip-nudge { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 16px 18px; border: 1px solid var(--lime); border-radius: 18px; background: rgba(212, 245, 60, 0.07); }
.trip-nudge-title { margin: 6px 0 0; font: 800 15px/1.2 var(--f-display); text-transform: uppercase; letter-spacing: 0.02em; }
.trip-nudge-actions { display: flex; gap: 8px; align-items: center; }
#trip-nudge:empty { display: none; }

/* Friends: board, comparison sheet, album line. */
.friend-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.friends-board li[data-act] { cursor: pointer; }
.friends-board li[data-act]:hover .nm-name { color: var(--lime); }
.row-sub a { color: var(--lime); }
.vs { display: flex; flex-direction: column; margin: 14px 0 6px; }
.vs-head, .vs-row { display: grid; grid-template-columns: 1fr 64px 64px; gap: 8px; align-items: baseline; }
.vs-head { padding: 0 0 8px; font: 600 10px/1.2 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--peri); }
.vs-head span:not(:first-child), .vs-row b { text-align: right; }
.vs-row { padding: 12px 0; border-top: 1px solid var(--line); color: var(--white); text-decoration: none; font-size: 14px; }
.vs-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-row b { font: 700 15px/1 var(--f-mono); color: var(--peri); }
.vs-row b small { font-size: 10px; color: var(--peri-2); }
.vs-row b.lead { color: var(--lime); }
.friends-here { margin: 4px 0 0; font: 500 12px/1.4 var(--f-mono); color: var(--lime); }
.friends-here[hidden] { display: none; }

/* Style: earned inks and covers. */
.style-preview { display: grid; place-items: center; height: 190px; margin: 14px 0 18px; border-radius: 18px; border: 1px solid var(--line); }
.swatches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
@media (min-width: 520px) { .swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.swatch { display: grid; grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(6, 8, 51, 0.7); color: var(--white); text-align: left; cursor: pointer; touch-action: manipulation; min-width: 0; }
.swatch .sw { grid-row: 1 / span 2; width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.85); }
.swatch .sw-name { font: 700 11.5px/1.2 var(--f-display); text-transform: uppercase; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatch .sw-how { font: 500 10.5px/1.3 var(--f-mono); color: var(--peri); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.swatch.on { border-color: var(--lime); box-shadow: inset 0 0 0 1px var(--lime); }
.swatch.on .sw-how { color: var(--lime); }
.swatch.locked { opacity: 0.55; }
.swatch.locked .sw { filter: grayscale(0.85); border-style: dashed; }
