html {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --mail-paper: linear-gradient(165deg, #faf3e1, #f0e4c6);
  --mail-ink: #22355c;
  --mail-ink-2: rgba(52,72,96,.78);
  --mail-gold: #b27c20;
  --mail-stamp: #fffdf6;
  --mail-ring: 2px solid rgba(52,72,96,.45);

  /* Dark palette: one gold, the near-whites, and the muted text / border
     blues as rgb triplets, so every alpha step of a family is one token. */
  --gold: #ffc76a;
  --rgb-gold: 255, 199, 106;
  --ink-hi: #f5fbff;
  --ink: #f3f9ff;
  --ink-title: #f1f8ff;
  --ink-btn: #ecf7ff;
  --ink-alt: #eaf7ff;
  --ink-dim: #dcefff;
  --ink-body: #cfe6ff;
  --rgb-muted: 193, 224, 250;
  --rgb-mist: 198, 226, 250;
  --rgb-line: 157, 211, 255;

  /* Layer scale. Local stacking inside a component (0-4) stays literal;
     these tokens are the app-level layers, low to high. */
  --z-screen: 10;
  --z-sheet: 11;
  --z-float: 12;
  --z-stamp: 13;
  --z-toast: 50;
  --z-picker: 80;
  --z-nav: 95;
  --z-boot: 100;
  --z-modal: 105;
  --z-confirm: 110;
  --z-error: 200;

  /* Type scale: the working ladder. Display sizes above it (the h1 clamp,
     the results score clamp, big numerals) stay literal by design. */
  --fs-micro: 10px;
  --fs-caption: 11px;
  --fs-small: 12px;
  --fs-body: 13px;
  --fs-base: 15px;
  --fs-title: 17px;
  --fs-head: 21px;
  --fs-display: 25px;
}

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  position: fixed;
  inset: 0;
  color: var(--ink-body);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
}

#globe {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  outline: none;
  opacity: 0;
  transition: opacity 1.4s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: grab;
}

#globe.ready {
  opacity: 1;
}

#globe.dragging {
  cursor: grabbing;
}

#hud {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 26px);
  text-align: center;
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.09em;
  color: rgba(196, 226, 255, 0.62);
  text-shadow: 0 0 12px rgba(90, 180, 255, 0.45);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 1.2s ease 0.6s, transform 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.6s, color 0.8s ease;
}

button { font: inherit; }
.screen { position: fixed; inset: 0; z-index: var(--z-screen); }
.screen[hidden] { display: none; }
.glass { background: rgba(5, 12, 29, .82); border: 1px solid rgba(var(--rgb-line), .22); box-shadow: 0 18px 60px rgba(0, 0, 0, .35), inset 0 1px rgba(255,255,255,.06); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }

/* Shared confirmation layer: sized from the 390px layout, with full-width touch targets. */
.confirm-modal { position: fixed; z-index: var(--z-confirm); inset: 0; display: flex; align-items: center; justify-content: center; box-sizing: border-box; padding: calc(env(safe-area-inset-top, 0px) + 20px) 16px calc(env(safe-area-inset-bottom, 0px) + 20px); background: rgba(2, 4, 9, .7); }
.confirm-modal[hidden] { display: none; }
.confirm-modal__card { box-sizing: border-box; width: min(100%, 390px); padding: 24px 18px 18px; border-radius: 22px; text-align: center; }
.confirm-modal__title { margin: 0; color: var(--ink-hi); font-size: var(--fs-head); line-height: 1.2; letter-spacing: -.02em; }
.confirm-modal__message { margin: 12px 0 0; color: rgba(224, 240, 255, .82); font-size: var(--fs-base); line-height: 1.5; }
.confirm-modal__actions { display: flex; flex-direction: column-reverse; gap: 10px; margin-top: 22px; }
.confirm-modal__confirm { width: 100%; min-height: 48px; padding: 0 18px; border: 0; border-radius: 14px; background: #e5484d; color: #fff; font-size: var(--fs-base); font-weight: 800; box-shadow: 0 6px 18px rgba(229, 72, 77, .28); cursor: pointer; touch-action: manipulation; }
.confirm-modal__cancel { width: 100%; min-height: 48px; padding: 0 18px; border: 1px solid rgba(var(--rgb-line), .22); border-radius: 14px; background: rgba(var(--rgb-line), .08); color: var(--ink-dim); font-size: var(--fs-base); font-weight: 800; cursor: pointer; touch-action: manipulation; }
.confirm-modal__confirm:active, .confirm-modal__cancel:active { transform: scale(.98); }
.confirm-modal__confirm:focus-visible, .confirm-modal__cancel:focus-visible { outline: 2px solid rgba(127, 210, 244, .8); outline-offset: 2px; }

/* Postcard detail is sized from the 390px mobile layout first. */
.ppd { --ppd-screen-gutter: 12px; --ppd-control-inset: 6px; z-index: var(--z-sheet); box-sizing: border-box; display: flex; overflow: auto; padding: calc(env(safe-area-inset-top, 0px) + 20px) var(--ppd-screen-gutter, 12px) calc(env(safe-area-inset-bottom, 0px) + 20px); pointer-events: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
@media (min-width: 391px) {
  .ppd { --ppd-screen-gutter: 16px; }
}

/* The one close button: a ghost x with a full 44px tap target. The base is
   the fixed home X (home buttons also carry the .home-nav behaviour hook);
   card contexts pin it absolute, and .icon-close--badge is the postcard
   detail's filled-circle variant. */
.icon-close { position: fixed; z-index: var(--z-nav); top: calc(env(safe-area-inset-top, 0px) + 6px); right: 6px; width: 44px; height: 44px; padding: 0; margin: 0; border: 0; border-radius: 50%; background: none; color: rgba(var(--rgb-mist),.7); font-size: 28px; line-height: 1; cursor: pointer; touch-action: manipulation; pointer-events: auto; }
.icon-close:active { transform: scale(.9); background-color: rgba(var(--rgb-line),.12); }
.icon-close:focus-visible { outline: 2px solid rgba(127,210,244,.65); outline-offset: -5px; }
.settings-card .icon-close, .stats-card .icon-close, .pp-card .icon-close { position: absolute; top: 6px; right: 6px; }
.icon-close--badge { position: absolute; z-index: 4; top: -48px; right: -6px; }
.icon-close--badge::before { content: '×'; display: grid; place-items: center; width: 32px; height: 32px; margin: auto; border-radius: 50%; background: rgba(44,74,124,.85); color: #fffdf6; font-size: 22px; line-height: 1; }
.icon-close--badge:active { background-color: transparent; }
.icon-close--badge:focus-visible { outline: none; }
.icon-close--badge:focus-visible::before { box-shadow: 0 0 0 2px #67e8ff; }

/* Settings: gear entry top-right on the home screen opens a modal over the start card */
.settings-entry { position: fixed; z-index: var(--z-nav); top: calc(env(safe-area-inset-top, 0px) + 12px); right: 12px; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; margin: 0; border: 1px solid rgba(var(--rgb-line), .22); border-radius: 50%; background-color: rgba(5, 12, 29, .78); box-shadow: 0 6px 18px rgba(0,0,0,.32), inset 0 1px rgba(255,255,255,.05); color: var(--ink-body); font-size: 20px; line-height: 1; cursor: pointer; pointer-events: auto; touch-action: manipulation; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.settings-entry svg { display: block; }
.settings-entry:active { transform: scale(.92); background-color: rgba(5, 12, 29, .92); }
.settings-entry:focus-visible { box-shadow: 0 6px 18px rgba(0,0,0,.32), 0 0 0 2px rgba(127,210,244,.5); }
.settings-screen { box-sizing: border-box; overflow: auto; padding: calc(env(safe-area-inset-top, 0px) + 18px) 14px calc(env(safe-area-inset-bottom, 0px) + 18px); background: rgba(2,4,9,.68); pointer-events: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.settings-card { position: relative; box-sizing: border-box; width: 100%; max-width: 440px; min-height: 100%; margin: auto; padding: 26px 18px 20px; border-radius: 24px; }
.settings-card h2 { margin: 0; color: var(--ink-hi); font-size: var(--fs-head); text-align: center; letter-spacing: -.02em; }
.settings-main { display: flex; flex-direction: column; gap: 22px; margin-top: 22px; }
.settings-main[hidden] { display: none; }
.settings-group { margin: 0; padding: 0; border: 0; }
.settings-group legend { margin-bottom: 10px; color: var(--ink-hi); font-size: var(--fs-base); font-weight: 800; }
.settings-segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border: 1px solid rgba(var(--rgb-line),.18); border-radius: 14px; background: rgba(5,12,29,.52); }
.settings-segmented button { min-height: 42px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: rgba(220,239,255,.68); font-size: 14px; font-weight: 800; cursor: pointer; touch-action: manipulation; }
.settings-segmented button[aria-pressed="true"] { background: rgba(119,202,255,.2); color: var(--ink-hi); box-shadow: inset 0 0 0 1px rgba(var(--rgb-line),.2), 0 4px 12px rgba(0,0,0,.2); }
.settings-segmented button:active { transform: scale(.98); }
.settings-segmented button:focus-visible { outline: 2px solid rgba(127,210,244,.8); outline-offset: 1px; }
.settings-credits { color: rgba(220,239,255,.75); font-size: var(--fs-body); text-align: center; }
/* Stats relocated from the Passport header pill into a settings row (Sean,
   2026-10-22): same text-link treatment as .settings-credits, not the pill
   it wears everywhere else (base .stats-entry rule, src/meta/stats.js). */
.settings-main .stats-entry { display: block; width: 100%; min-height: 44px; margin: 0; padding: 0; border: 0; background: none; color: rgba(220,239,255,.75); font-size: var(--fs-body); font-weight: 400; text-align: center; }
.settings-main .stats-entry:active { transform: none; }
.settings-account { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 54px; padding: 12px 14px; border: 1px solid rgba(var(--rgb-line),.18); border-radius: 14px; background: rgba(5,12,29,.52); color: var(--ink-hi); }
.settings-account strong { display: block; }
.settings-account small { display: block; margin-top: 3px; color: rgba(220,239,255,.62); font-size: var(--fs-small); }
.settings-account-action { min-width: 82px; min-height: 40px; padding: 0 14px; border: 1px solid rgba(var(--rgb-line),.25); border-radius: 999px; background: rgba(119,202,255,.16); color: var(--ink-alt); font-weight: 800; }
.account-sheet { z-index: var(--z-modal); display: flex; box-sizing: border-box; overflow: auto; align-items: flex-end; padding: 54px 14px calc(env(safe-area-inset-bottom, 0px) + 14px); background: rgba(2,4,9,.78); pointer-events: auto; scrollbar-color: rgba(var(--rgb-gold),.55) transparent; }
.account-sheet[hidden] { display: none; }
.account-panel.settings-card { min-height: 0; max-width: 440px; padding: 30px 20px 24px; overflow: hidden; text-align: center; }
.account-panel[data-view="account"], .account-panel[data-view="profile"], .account-panel[data-view="cabinet"], .account-panel[data-view="customize"] { --mail-paper: linear-gradient(165deg, #101a30, #0a0f1e); --mail-ink: #f5fbff; --mail-ink-2: rgba(207,230,255,.78); --mail-gold: #ffc76a; --mail-stamp: #16233f; --mail-ring: 2px solid rgba(157,211,255,.35); position: relative; border-color: rgba(var(--rgb-line),.28); background: var(--mail-paper); box-shadow: 0 18px 60px rgba(0,0,0,.52), inset 0 0 0 1px rgba(var(--rgb-line),.1); color: var(--mail-ink); backdrop-filter: none; -webkit-backdrop-filter: none; }
.account-panel[data-view]:not([data-view="auth"]) .icon-close { color: var(--mail-ink); }
.account-panel h2 { margin-top: 4px; font-size: 26px; }
.account-panel[data-view="account"] .eyebrow { color: rgba(52,72,96,.62); }
.account-panel[data-view="account"] #account-title { color: #1e4e9c; font-family: 'Luckiest Guy', 'Arial Black', sans-serif; letter-spacing: .02em; }
.account-panel[data-view="account"] .account-copy { color: var(--mail-ink-2); }
.account-open-profile { width: 100%; min-height: 48px; margin-bottom: 18px; }
.account-friend-profile { min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 800; text-align: left; cursor: pointer; text-underline-offset: 3px; }
.profile-loader { padding: 16px 0 4px; text-align: left; }
.profile-loader-head { display: flex; align-items: center; gap: 16px; min-height: 92px; padding: 16px 18px; overflow: hidden; border: 1px solid rgba(var(--rgb-line),.18); border-radius: 6px; background: rgba(var(--rgb-line),.08); box-shadow: 0 7px 18px rgba(0,0,0,.28); }
.profile-loader-seal { display: grid; flex: none; place-items: center; width: 84px; height: 84px; }
.profile-loader-identity { display: grid; flex: 1; gap: 10px; }
.profile-loader-identity i, .profile-loader-identity b, .profile-loader-rows i { display: block; border-radius: 999px; background: linear-gradient(90deg, rgba(var(--rgb-line),.12), rgba(var(--rgb-line),.28), rgba(var(--rgb-line),.12)); background-size: 200% 100%; animation: profile-loader-shimmer 1.3s ease-in-out infinite; }
.profile-loader-identity i { width: min(180px, 76%); height: 20px; }
.profile-loader-identity b { width: min(120px, 54%); height: 12px; }
.profile-loader-stage { min-height: 20px; margin: 18px 0 12px; color: rgba(var(--rgb-muted),.82); font-size: 14px; font-weight: 600; text-align: center; }
.profile-loader-rows { display: grid; gap: 10px; padding: 14px 0; border-block: 1px solid rgba(var(--rgb-line),.18); }
.profile-loader-rows i { height: 14px; }
.profile-loader-rows i:nth-child(2) { width: 82%; }
.profile-loader-rows i:nth-child(3) { width: 64%; }
@keyframes profile-loader-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .profile-loader-identity i, .profile-loader-identity b, .profile-loader-rows i { animation: none; } }
.traveler-profile { color: #173e68; text-align: left; }
.traveler-card { position: relative; display: flex; align-items: center; gap: 16px; margin: -8px -4px 18px; padding: 20px 18px; overflow: hidden; border-radius: 6px; background: #1e4e9c; color: #f6edd8; box-shadow: 0 7px 18px rgba(23,62,104,.28); }
.traveler-profile.own > .traveler-card { margin-bottom: 30px; overflow: visible; }
.traveler-card[data-card="open-field"], .banner-swatch[data-card="open-field"] { background-color: #1f4d3a; }
.traveler-card[data-card="low-tide"], .banner-swatch[data-card="low-tide"] { background-color: #1e4e9c; background-image: linear-gradient(to bottom, transparent 0 80%, #7a2230 80% 100%); }
.traveler-card[data-card="true-navy"], .banner-swatch[data-card="true-navy"] { background-color: #1e4e9c; }
.traveler-card[data-card="return-ticket"], .banner-swatch[data-card="return-ticket"] { background-color: #173e68; }
.traveler-card[data-card="regular-route"], .banner-swatch[data-card="regular-route"] { background-color: #1e4e9c; background-image: linear-gradient(to bottom, transparent 0 84%, #ffc76a 84% 100%); }
.traveler-card[data-card="seasoned-traveler"], .banner-swatch[data-card="seasoned-traveler"] { background-color: #1f4d3a; background-image: linear-gradient(to bottom, transparent 0 86%, #f6edd8 86% 100%); }
.traveler-card[data-card="right-on-the-map"], .banner-swatch[data-card="right-on-the-map"] { background-color: #7a2230; background-image: linear-gradient(to bottom, transparent 0 84%, #ffc76a 84% 100%); }
.traveler-card[data-card="five-star-landing"], .banner-swatch[data-card="five-star-landing"] { background-color: #173e68; background-image: linear-gradient(to bottom, #ffc76a 0 20%, transparent 20% 100%); }
.traveler-card[data-card="high-flyer"], .banner-swatch[data-card="high-flyer"] { background-color: #1e4e9c; background-image: linear-gradient(to bottom, transparent 0 86%, #f6edd8 86% 100%); }
.traveler-card[data-card="worldly"], .banner-swatch[data-card="worldly"] { background-color: #7a2230; }
.traveler-card[data-card="around-the-world"], .banner-swatch[data-card="around-the-world"] { background-color: #2b2f36; background-image: linear-gradient(to bottom, transparent 0 84%, #ffc76a 84% 100%); }
.traveler-card[data-card="harvest"], .banner-swatch[data-card="harvest"] { background-color: #9a4d18; background-image: linear-gradient(to bottom, transparent 0 82%, #5d2c12 82% 100%); }
.traveler-card[data-card="winter-post"], .banner-swatch[data-card="winter-post"] { background-color: #172b55; background-image: linear-gradient(to bottom, transparent 0 84%, #d6e9ff 84% 100%); }
.banner-swatch { display: block; width: 100%; height: 34px; margin: -9px -6px 8px; border-radius: 4px 4px 0 0; }
.traveler-identity { position: relative; z-index: 1; flex: 1; min-width: 0; }
.traveler-card h2 { margin: 1px 0 0; overflow: hidden; color: #f6edd8; font-family: 'Luckiest Guy', 'Arial Black', sans-serif; font-size: 30px; letter-spacing: .02em; line-height: 1; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.traveler-card p { margin: 4px 0 0; }
.traveler-card .traveler-level { color: #ffcb05; font-size: var(--fs-caption); font-weight: 900; letter-spacing: .13em; }
.traveler-title { color: rgba(246,237,216,.86); font-size: var(--fs-body); font-weight: 750; }
.traveler-card .account-customize { position: absolute; z-index: 2; right: 14px; bottom: -14px; min-height: 28px; padding: 5px 11px; border: 1px solid rgba(23,62,104,.42); border-radius: 999px; background: #ffcb05; color: #173e68; font: inherit; font-size: var(--fs-small); font-weight: 850; line-height: 1; cursor: pointer; box-shadow: 0 3px 7px rgba(5,12,29,.28); touch-action: manipulation; }
.traveler-card .account-customize:active { transform: scale(.96); }
.traveler-card .traveler-xp { margin-top: 5px; color: rgba(246,237,216,.78); font-size: var(--fs-caption); text-align: left; }
.traveler-progress { height: 5px; margin-top: 12px; overflow: hidden; border-radius: 3px; background: rgba(246,237,216,.22); }
.traveler-progress span { display: block; height: 100%; border-radius: inherit; background: #ffcb05; }
.paper-atlas-avatar { position: relative; z-index: 1; display: inline-block; flex: none; border-radius: 50%; filter: drop-shadow(0 3px 5px rgba(5,12,29,.35)); }
.paper-atlas-avatar svg { display: block; width: 100%; height: 100%; }
.traveler-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 22px; border-block: 1px solid rgba(30,78,156,.2); }
.traveler-stats div { min-width: 0; padding: 11px 7px; text-align: center; }
.traveler-stats div + div { border-left: 1px solid rgba(30,78,156,.16); }
.traveler-stats div:nth-child(4) { border-left: 0; }
.traveler-stats div:nth-child(n+4) { border-top: 1px solid rgba(30,78,156,.16); }
.traveler-stats strong,.traveler-stats span { display: block; }
.traveler-stats strong { color: #1e4e9c; font-size: 18px; font-variant-numeric: tabular-nums; }
.traveler-stats span { margin-top: 2px; color: rgba(23,62,104,.76); font-size: 10px; line-height: 1.2; }
.traveler-stats div:last-child { grid-column: span 3; }
.traveler-section-head, .cabinet-group-head { display: flex; justify-content: space-between; align-items: baseline; }
.traveler-section-head h3,.cabinet h3 { margin: 0; text-transform: capitalize; }
.traveler-section-head > span, .cabinet-group-head > span { color: #1e4e9c; font-size: var(--fs-caption); font-weight: 850; font-variant-numeric: tabular-nums; }
.traveler-achievements { margin: 7px 0 0; padding: 0; border-bottom: 1px solid rgba(30,78,156,.16); list-style: none; }
.traveler-achievements li, .cabinet-item { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid rgba(30,78,156,.16); }
.traveler-achievements i, .cabinet-item i { position: relative; display: grid; place-items: center; width: 30px; height: 30px; border: 1px dashed rgba(30,78,156,.38); border-radius: 50%; }
.traveler-achievements .earned i, .cabinet-item.earned i { border-style: solid; border-color: #b27c20; background: #ffcb05; }
.traveler-achievements .earned i::after, .cabinet-item.earned i::after { width: 11px; height: 8px; background: #173e68; clip-path: polygon(0 35%, 38% 68%, 100% 0, 100% 30%, 38% 100%, 0 65%); content: ''; }
.traveler-achievements strong,.traveler-achievements span { display: block; }
.traveler-achievements span { margin-top: 2px; color: rgba(23,62,104,.72); font-size: 12px; line-height: 1.35; }
.traveler-actions { display: grid; grid-template-columns: 1fr 1.3fr; gap: 8px; margin-top: 14px; }
.account-open-cabinet { min-height: 46px; margin: 0; border: 1px solid rgba(30,78,156,.32); border-radius: 999px; color: #1e4e9c; font-weight: 800; }
.cabinet h2, .customizer h2 { margin: 0 42px 20px 0; color: #1e4e9c; font-family: 'Luckiest Guy', 'Arial Black', sans-serif; letter-spacing: .02em; }
.cabinet-group { margin-top: 24px; }
.cabinet-group-head { padding-bottom: 7px; border-bottom: 2px solid #1e4e9c; }
.cabinet-item { margin: 0; }
.cabinet-item > div { display: grid; gap: 3px; }
.cabinet-item strong { color: #173e68; }
.cabinet-item span,.cabinet-item small { color: rgba(23,62,104,.74); font-size: 11px; line-height: 1.35; }
.cabinet-item small { color: #875f18; font-weight: 750; }
.cabinet-item.locked { opacity: .62; }
.customize-kind-tabs { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 16px; border-bottom: 1px solid rgba(30,78,156,.25); }
.customize-kind-tabs button { min-height: 44px; padding: 0 4px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: rgba(23,62,104,.7); font: inherit; font-size: var(--fs-small); font-weight: 800; }
.customize-kind-tabs button[aria-pressed="true"] { border-color: #1e4e9c; color: #1e4e9c; }
.seal-builder { display: grid; gap: 14px; }
.customize-preview { display: grid; place-items: center; min-height: 182px; margin: 0 -20px 4px; background: repeating-linear-gradient(135deg, rgba(30,78,156,.06) 0 12px, transparent 12px 24px); }
.customize-preview .paper-atlas-avatar { filter: drop-shadow(0 7px 9px rgba(23,62,104,.24)); }
.seal-initials { display: grid; gap: 5px; color: #173e68; font-size: var(--fs-small); font-weight: 800; }
.seal-initials input { width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid rgba(30,78,156,.3); border-radius: 5px; background: rgba(255,253,246,.72); color: #173e68; font: inherit; font-size: 18px; font-weight: 800; text-transform: uppercase; }
.seal-section { display: grid; gap: 8px; color: #173e68; font-size: var(--fs-small); }
.seal-swatches { display: flex; gap: 10px; }
.seal-swatches button { width: 38px; height: 38px; padding: 0; border: 3px solid transparent; border-radius: 50%; background: var(--seal-disc); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.seal-swatches button.selected { border-color: #ffc76a; box-shadow: 0 0 0 2px #8a5a16; }
.seal-motifs { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
.seal-motifs button { min-height: 64px; padding: 8px 6px; border: 1px solid rgba(30,78,156,.22); border-radius: 5px; background: rgba(255,253,246,.72); color: #173e68; font: inherit; }
.seal-motifs button.selected { border-color: #b27c20; box-shadow: inset 0 -4px #ffcb05; }
.seal-motifs button:disabled { opacity: .5; }
.seal-motifs span,.seal-motifs small { display: block; }
.seal-motifs span { font-size: var(--fs-small); font-weight: 800; }
.seal-motifs small { margin-top: 4px; color: rgba(23,62,104,.65); font-size: 9px; line-height: 1.2; }
.avatar-parts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
.avatar-parts button { position: relative; min-height: 70px; padding: 9px 6px; border: 1px solid rgba(30,78,156,.22); border-radius: 5px; background: rgba(255,253,246,.72); color: #173e68; font: inherit; }
.avatar-parts button.selected { border-color: #b27c20; box-shadow: inset 0 -4px #ffcb05; }
.avatar-parts button:disabled { opacity: .5; }
.avatar-parts span,.avatar-parts small { display: block; }
.avatar-parts span { font-size: var(--fs-small); font-weight: 800; }
.avatar-parts small { margin-top: 4px; color: rgba(23,62,104,.65); font-size: 9px; line-height: 1.2; }
.identity-parts { grid-template-columns: repeat(2, minmax(0,1fr)); }
.identity-parts button { min-height: 86px; }
.identity-preview-title { display: block; width: 100%; box-sizing: border-box; min-height: 34px; margin: -9px -6px 8px; padding: 8px 9px; overflow: hidden; border-radius: 4px 4px 0 0; background: #1e4e9c; color: #f6edd8; font-family: 'Luckiest Guy', 'Arial Black', sans-serif; font-size: 16px; letter-spacing: .02em; line-height: 1; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.account-panel[data-view="customize"] { display: flex; max-height: calc(100dvh - env(safe-area-inset-bottom, 0px) - 68px); }
.customizer { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.customizer .identity-parts, .customizer .seal-builder { min-height: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.account-save-avatar { position: sticky; bottom: 0; z-index: 1; width: 100%; min-height: 48px; margin-top: 12px; padding-block: 10px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(157,211,255,.22); background: var(--mail-paper); box-shadow: 0 -8px 14px rgba(10,15,30,.18); }
.account-panel[data-view="account"] .account-friends { border-color: rgba(30,78,156,.18); }
.account-panel[data-view="account"] .account-friends h3, .account-panel[data-view="account"] .account-name-form label, .account-panel[data-view="account"] .account-share-row strong { color: var(--mail-ink); }
.account-panel[data-view="account"] .account-inline-edit input { border-color: rgba(30,78,156,.26); background: rgba(255,253,246,.72); color: var(--mail-ink); }
.account-panel[data-view="account"] .account-inline-edit .text-button, .account-panel[data-view="account"] .account-friend { color: #1e4e9c; }
.account-panel[data-view="account"] .account-friends-list, .account-panel[data-view="account"] .account-friend { border-color: rgba(30,78,156,.16); }
.account-panel[data-view="account"] .account-share-row { border-color: rgba(30,78,156,.2); border-radius: 6px; background: rgba(30,78,156,.06); }
.account-panel[data-view="account"] .account-share-row small, .account-panel[data-view="account"] .account-small-print { color: var(--mail-ink-2); }
.account-panel[data-view="account"] .account-signout { color: rgba(52,72,96,.68); }
.account-panel[data-view="account"] .account-status { color: #1e4e9c; }
.account-copy { margin: 14px auto 22px; max-width: 310px; color: rgba(224,240,255,.76); font-size: var(--fs-base); line-height: 1.5; }
.account-done { width: 100%; min-height: 50px; }
.account-form .primary { width: 100%; }
.account-google { width: 100%; min-height: 50px; border: 0; border-radius: 999px; background: #fff; color: #1f1f1f; font-size: var(--fs-base); font-weight: 800; cursor: pointer; touch-action: manipulation; }
.account-google:active { transform: scale(.98); }
.account-google:disabled { border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: rgba(255,255,255,.46); cursor: default; }
.account-panel .account-form .primary { border: 1px solid rgba(255,255,255,.28); background: transparent; color: var(--ink-hi); box-shadow: none; }
.account-signout { margin-top: 14px; padding: 6px 10px; border: 0; background: none; color: rgba(220,239,255,.55); font: inherit; font-size: var(--fs-small); text-decoration: underline; cursor: pointer; }
.account-panel[data-email="off"] .account-divider, .account-panel[data-email="off"] .account-form { display: none; }
.account-email-note { display: none; }
.account-panel[data-email="off"] .account-email-note { display: block; margin: 18px 0 0; color: rgba(220,239,255,.55); font-size: var(--fs-small); }
.account-google-note { margin: 8px 0 0; color: rgba(220,239,255,.55); font-size: var(--fs-small); }
.account-divider { display: flex; align-items: center; gap: 10px; margin: 20px 0; color: rgba(220,239,255,.45); font-size: var(--fs-small); }
.account-divider::before, .account-divider::after { content: ''; flex: 1; height: 1px; background: rgba(var(--rgb-line),.16); }
.account-form { display: flex; flex-direction: column; gap: 16px; text-align: left; }
.account-form label { color: var(--ink-hi); font-size: var(--fs-body); font-weight: 800; }
.account-form input { box-sizing: border-box; width: 100%; min-height: 50px; margin-top: 8px; padding: 0 15px; border: 1px solid rgba(var(--rgb-line),.24); border-radius: 13px; outline: 0; background: rgba(2,8,20,.7); color: var(--ink-hi); font: inherit; }
.account-form input:focus { border-color: rgba(119,202,255,.7); box-shadow: 0 0 0 3px rgba(119,202,255,.12); }
.account-status { min-height: 18px; margin: 14px 0 0; color: #9edcff; font-size: var(--fs-body); }
.account-status.is-error { color: #ffaaa9; }
.account-friends { padding-top: 20px; border-top: 1px solid rgba(var(--rgb-line),.16); text-align: left; }
.account-friends h3 { margin: 0 0 16px; color: var(--ink-hi); font-size: 20px; text-align: center; }
.account-name-form label { color: var(--ink-hi); font-size: var(--fs-body); font-weight: 800; }
.account-inline-edit { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.account-inline-edit input { box-sizing: border-box; flex: 1; min-width: 0; min-height: 44px; padding: 0 13px; border: 1px solid rgba(var(--rgb-line),.24); border-radius: 12px; outline: 0; background: rgba(2,8,20,.7); color: var(--ink-hi); font: inherit; }
.account-inline-edit input:focus { border-color: rgba(119,202,255,.7); box-shadow: 0 0 0 3px rgba(119,202,255,.12); }
.account-inline-edit .text-button { flex: none; min-height: 44px; margin: 0; color: var(--ink-alt); font-weight: 800; }
.account-invite { width: 100%; min-height: 48px; margin-top: 16px; }
.account-invite-link { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding: 12px; border: 1px solid rgba(var(--rgb-line),.18); border-radius: 14px; background: rgba(5,12,29,.52); }
.account-invite-link[hidden] { display: none; }
.account-invite-link-input { box-sizing: border-box; width: 100%; min-height: 44px; padding: 0 13px; border: 1px solid rgba(var(--rgb-line),.24); border-radius: 12px; background: rgba(2,8,20,.7); color: var(--ink-hi); font: inherit; font-size: var(--fs-small); }
.account-invite-link-input:focus { border-color: rgba(119,202,255,.7); box-shadow: 0 0 0 3px rgba(119,202,255,.12); }
.account-invite-link-actions { display: flex; gap: 10px; }
.account-invite-copy, .account-invite-share { flex: 1; min-height: 40px; padding: 0 14px; border: 1px solid rgba(var(--rgb-line),.25); border-radius: 999px; background: rgba(119,202,255,.16); color: var(--ink-alt); font: inherit; font-weight: 800; cursor: pointer; touch-action: manipulation; }
.account-invite-share[hidden] { display: none; }
.account-invite-copy.cta-glow, .account-invite-share.cta-glow { border-color: rgba(119,202,255,.95); background: rgba(119,202,255,.34); color: var(--ink-hi); animation: invite-cta-pulse 1.5s ease-in-out infinite; }
@keyframes invite-cta-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(119,202,255,.45); } 50% { box-shadow: 0 0 0 7px rgba(119,202,255,0); } }
@media (prefers-reduced-motion: reduce) { .account-invite-copy.cta-glow, .account-invite-share.cta-glow { animation: none; box-shadow: 0 0 0 3px rgba(119,202,255,.35); } }
.account-small-print { margin: 7px 0 0; color: rgba(220,239,255,.55); font-size: var(--fs-small); text-align: center; }
.account-friends .account-status { text-align: center; }
.account-friends-list { margin: 16px 0; padding: 0; border-top: 1px solid rgba(var(--rgb-line),.13); list-style: none; }
.account-friend { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; border-bottom: 1px solid rgba(var(--rgb-line),.13); color: var(--ink-hi); }
.account-friend .text-button { flex: none; margin: 0; }
.traveler-friends { margin: 0 0 22px; }
.account-add-friend { width: 100%; min-height: 48px; margin-top: 16px; }
.account-modal { position: fixed; z-index: var(--z-modal); inset: 0; display: flex; align-items: flex-end; justify-content: center; box-sizing: border-box; overflow: auto; padding: 54px 14px calc(env(safe-area-inset-bottom, 0px) + 14px); background: rgba(2,4,9,.78); }
.account-modal[hidden] { display: none; }
.account-modal-panel { position: relative; box-sizing: border-box; width: 100%; max-width: 440px; margin: auto; padding: 24px 20px 20px; border-radius: 22px; text-align: left; }
.account-modal-panel h3 { margin: 0 0 12px; color: var(--ink-hi); }
.account-modal-panel .account-name-form label { color: var(--ink-hi); }
.account-modal-panel .account-inline-edit input { border-color: rgba(var(--rgb-line),.3); background: #0d1526; color: var(--ink-hi); }
.account-modal-panel .account-inline-edit .text-button { color: var(--gold); }
.account-modal-panel .account-status { text-align: center; }
.friends-page-list { display: grid; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.friend-page-item { display: flex; min-height: 0; border: 0; }
.friend-remove-zone { align-items: center; gap: 10px; flex-wrap: wrap; }
.friend-page-row.traveler-card { flex: 1; min-height: 50px; margin: 0; padding: 7px 10px; border: 0; border-radius: 13px; color: #f6edd8; }
.friend-page-row .friend-page-seal { position: relative; z-index: 1; flex: none; }
.friend-page-row .traveler-identity { display: grid; gap: 3px; }
.friend-page-row .traveler-identity strong { overflow: hidden; font-size: var(--fs-base); text-overflow: ellipsis; white-space: nowrap; }
.friend-page-row .traveler-identity span { color: rgba(246,237,216,.86); font-size: var(--fs-small); }
.friend-page-row b { position: relative; z-index: 1; flex: none; align-self: flex-start; padding: 5px 7px; border-radius: 999px; background: rgba(5,12,29,.38); color: #ffcb05; font-size: var(--fs-caption); white-space: nowrap; }
.friend-page-item > .account-remove { align-self: center; color: rgba(var(--rgb-muted),.88); }
.account-friends-empty { padding: 16px 4px; color: rgba(220,239,255,.62); font-size: var(--fs-body); line-height: 1.45; text-align: center; }
.account-remove-copy { color: rgba(224,240,255,.82); font-size: var(--fs-small); line-height: 1.4; }
.account-remove-actions { display: flex; flex: none; }
.account-remove-confirm { color: #ffaaa9; }
.account-share-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid rgba(var(--rgb-line),.18); border-radius: 14px; background: rgba(5,12,29,.52); cursor: pointer; }
.account-share-row > span:first-child { min-width: 0; }
.account-share-row strong { display: block; color: var(--ink-hi); font-size: var(--fs-body); }
.account-share-row small { display: block; margin-top: 4px; color: rgba(220,239,255,.58); font-size: var(--fs-small); line-height: 1.35; }
.account-share-input { position: absolute; opacity: 0; pointer-events: none; }
.account-toggle { position: relative; flex: none; width: 46px; height: 26px; border: 1px solid rgba(var(--rgb-line),.25); border-radius: 999px; background: rgba(220,239,255,.16); transition: background .15s; }
.account-toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: rgba(220,239,255,.76); transition: transform .15s; }
.account-share-input:checked + .account-toggle { background: rgba(119,202,255,.45); }
.account-share-input:checked + .account-toggle::after { transform: translateX(20px); background: #fff; }
.account-share-input:focus-visible + .account-toggle { outline: 2px solid rgba(127,210,244,.8); outline-offset: 2px; }
.account-invite-actions { display: flex; flex-direction: column; gap: 8px; }
.account-invite-actions .primary, .account-panel > .account-done { width: 100%; }
.account-invite-actions .text-button { align-self: center; }
.account-panel > .account-done { margin-top: 18px; }
.account-invite-name { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; text-align: left; }
.account-invite-name label { color: var(--ink-hi); font-size: var(--fs-body); font-weight: 800; }
.account-invite-name input { box-sizing: border-box; width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid rgba(var(--rgb-line),.24); border-radius: 13px; outline: 0; background: rgba(2,8,20,.7); color: var(--ink-hi); font: inherit; }
.settings-confirm { margin-top: 22px; }
.settings-confirm p { margin: 0; color: rgba(224,240,255,.82); font-size: 14px; line-height: 1.5; text-align: center; }
.settings-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
/* One danger button: "Reset all data" in the settings list and "Erase
   everything" in its confirm step are two labels on this one class. */
.settings-danger { width: 100%; min-height: 48px; padding: 0 18px; border: 0; border-radius: 14px; background: #e5484d; color: #fff; font-size: var(--fs-base); font-weight: 800; box-shadow: 0 6px 18px rgba(229,72,77,.28); cursor: pointer; touch-action: manipulation; }
.settings-danger:active, .settings-cancel:active { transform: scale(.98); }
.settings-cancel { width: 100%; min-height: 48px; padding: 0 18px; border: 1px solid rgba(var(--rgb-line), .22); border-radius: 14px; background: rgba(var(--rgb-line),.08); color: var(--ink-dim); font-size: var(--fs-base); font-weight: 800; cursor: pointer; touch-action: manipulation; }
body.game-settings #hud { opacity: 0; }
.start-screen { display: flex; box-sizing: border-box; flex-direction: column; align-items: center; justify-content: safe center; overflow-y: auto; padding: calc(env(safe-area-inset-top, 0px) + 16px) 28px calc(env(safe-area-inset-bottom, 0px) + 28px); text-align: center; background: linear-gradient(180deg, rgba(2,4,9,.12), rgba(2,4,9,.56)); }
.eyebrow { margin: 0 0 10px; color: #77caff; font-size: var(--fs-caption); font-weight: 750; letter-spacing: .18em; text-transform: uppercase; }
h1 { max-width: 360px; margin: 0; text-transform: uppercase; font-family: 'Luckiest Guy', 'Arial Black', sans-serif; color: #F6EDD8; font-size: clamp(50px, 16.5vw, 72px); line-height: .95; letter-spacing: .01em; -webkit-text-stroke: 2px #1E4E9C; text-shadow: 0 3px 0 #1E4E9C, 0 6px 14px rgba(0,0,0,.45); }
.start-screen h1 { margin-top: -14px; }
@media (max-width: 600px) {
  .start-screen h1 { font-size: clamp(44px, 14vw, 60px); transform: translateX(-12px); }
}
.how-to { max-width: 100%; margin: 18px 0 22px; color: rgba(218,237,255,.78); font-size: 15px; line-height: 1.4; white-space: nowrap; }
.primary { min-width: 172px; min-height: 52px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--ink-btn); color: #071426; font-weight: 800; cursor: pointer; box-shadow: 0 8px 28px rgba(89,185,255,.28); touch-action: manipulation; }
.primary:active { transform: scale(.98); }
/* The gold primary: Survival results, the Daily play pill's ink on the lock
   button. An explicit variant, so the base skin stays the one white pill. */
.primary--gold { background: linear-gradient(135deg, var(--gold), #ff9f6a); color: #21152f; }
.streak { min-height: 20px; margin: 18px 0 0; color: var(--gold); font-size: var(--fs-body); font-weight: 700; }
/* Returning players: the passport card replaces the how-to and carries the streak. */
.start-screen.has-passport .how-to, .start-screen.has-passport .streak { display: none; }
.round-screen { pointer-events: none; }
.round-header { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 12px); left: 12px; right: 12px; box-sizing: border-box; min-height: 56px; padding: 7px 52px 8px 12px; border-radius: 18px; text-align: left; }
/* Home sits in the card's top-right corner; the transparent outer area preserves a 44px target. */
.round-header .icon-close { position: absolute; top: 6px; right: 5px; left: auto; z-index: auto; display: block; }
.round-header .icon-close:active { transform: scale(.94); background-color: rgba(var(--rgb-line),.16); }
.round-meta { display: flex; align-items: center; gap: 8px; min-height: 18px; color: rgba(var(--rgb-muted),.67); font-size: var(--fs-caption); font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.round-meta #round-weight { color: var(--gold); }
.round-meta .mute-toggle { order: 1; margin: -9px -6px -9px auto; }
/* Daily: the date shares the meta row and takes its auto left margin, so the
   mute toggle (which also uses one) stops claiming half the free space. */
body.daily .round-meta .mute-toggle { margin-left: 0; }
.daily-date { margin: 0 0 0 auto; color: rgba(var(--rgb-muted),.5); font-size: var(--fs-caption); font-weight: 650; letter-spacing: .02em; text-transform: none; }
.daily-date[hidden] { display: none; }
.round-header .survival-streak { margin: 2px 0 0; font-size: var(--fs-base); }
.round-header h2 { margin: 3px 0 1px; color: var(--ink); font-size: 19px; line-height: 1.2; letter-spacing: -.02em; }
#guess-hint { margin: 0; color: rgba(var(--rgb-muted),.58); font-size: var(--fs-small); }
#guess-hint:empty { display: none; }
.reveal-card { position: absolute; left: 14px; right: 14px; bottom: calc(env(safe-area-inset-bottom, 0px) + 14px); box-sizing: border-box; padding: 17px; border-radius: 20px; pointer-events: auto; }
.score-line { display: flex; align-items: center; justify-content: space-between; }
.score-line div { color: #fff; font-size: 22px; font-weight: 800; }
.score-line small { display: block; color: rgba(var(--rgb-muted),.56); font-size: var(--fs-micro); font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.score-line strong { color: var(--gold); font-size: 28px; }
.score-math { display: flex; align-items: baseline; gap: 9px; }
.score-math .base { color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap; }
.score-math .base b { font-size: 22px; font-weight: 800; }
.reveal-card .primary { width: 100%; }

/* Reveal: the clue header collapses to the place name, a score pill floats
   under it while the map plays alone, then the bottom sheet peeks up. */
.reveal-name { display: none; margin: 0; overflow: hidden; color: var(--ink); font-size: 16px; font-weight: 750; letter-spacing: -.01em; line-height: 22px; text-overflow: ellipsis; white-space: nowrap; }
.reveal-name .reveal-repeat { display: block; overflow: hidden; color: rgba(var(--rgb-muted),.62); font-size: var(--fs-caption); font-weight: 650; letter-spacing: .01em; line-height: 14px; text-overflow: ellipsis; }
body.game-reveal .round-header { display: flex; align-items: center; justify-content: center; min-height: 0; height: 52px; padding: 0 56px; overflow: hidden; text-align: center; }
body.game-reveal .round-header > :not(.reveal-name):not(.icon-close) { display: none; }
body.game-reveal .round-header .icon-close { top: 4px; right: 4px; }
body.game-reveal .reveal-name { display: block; }
.reveal-pill { position: absolute; z-index: 1; top: calc(env(safe-area-inset-top, 0px) + 74px); left: 50%; margin: 0; padding: 6px 14px 5px; border: 1px solid rgba(var(--rgb-gold),.38); border-radius: 999px; background: rgba(5,12,29,.74); color: var(--gold); font-size: var(--fs-base); font-weight: 850; letter-spacing: -.01em; white-space: nowrap; transform: translateX(-50%); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.reveal-pill[hidden] { display: none; }
.reveal-pill.safe { border-color: rgba(120,230,170,.4); color: #8ef0b8; }
.reveal-pill.miss { border-color: rgba(255,120,150,.4); color: #ff9db4; }

.reveal-sheet { position: absolute; left: 0; right: 0; bottom: 0; box-sizing: border-box; padding-bottom: env(safe-area-inset-bottom, 0px); border-width: 1px 0 0; border-radius: 20px 20px 0 0; pointer-events: auto; touch-action: none; }
.reveal-sheet[hidden] { display: none; }
/* The reveal sheet leads with the place photo as a band, the same shape as
   the review recap card: name over the photo, then one score line. */
.reveal-band { position: relative; height: 168px; overflow: hidden; border-radius: 20px 20px 0 0; }
.reveal-band .thumb-slot { position: absolute; inset: 0; }
.reveal-band #place-thumb { position: absolute; inset: 0; display: block; width: 100%; height: 100%; margin: 0; border: 0; border-radius: 0; object-fit: cover; object-position: center 20%; }
.reveal-band #place-thumb[hidden] { display: none; }
.reveal-band .peek-slot { display: none; }
.reveal-band-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,8,20,.76), rgba(3,8,20,.20) 46%, rgba(3,8,20,.80)); pointer-events: none; }
.reveal-band-head { position: absolute; top: 12px; left: 14px; right: 14px; display: flex; flex-direction: column; gap: 2px; pointer-events: none; }
.reveal-band-tag { color: rgba(220,238,255,.85); font-size: var(--fs-caption); font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.reveal-band-tag:empty { display: none; }
.reveal-band .peek-name { overflow: visible; color: var(--ink); font-size: 18px; font-weight: 750; line-height: 1.2; letter-spacing: -.02em; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; text-shadow: 0 1px 8px rgba(0,0,0,.45); }
.reveal-band-stats { position: absolute; right: 14px; bottom: 10px; left: 14px; display: flex; align-items: center; gap: 12px; pointer-events: auto; }
.reveal-band-stats .peek-stats { min-width: 0; }
.reveal-band-stats .peek-score, .reveal-band-stats .peek-distance { flex: none; }
.reveal-band-stats .peek-next { flex: none; min-width: 0; min-height: 44px; margin-left: auto; padding: 0 18px; font-size: var(--fs-base); }
.peek-bar { position: relative; display: flex; align-items: center; gap: 12px; box-sizing: border-box; min-height: 28px; padding: 6px 14px; cursor: pointer; outline: none; }
/* The bar's layout is identical in both states (Sean, 2026-11-06): it used
   to grow its padding, enlarge the name and hide the thumb on expand, and
   each change landed in one frame while the sheet content eased open, so
   expanding felt like a snap. Only the name's wrapping changes now. */
.peek-bar[aria-expanded="true"] { height: auto; }
.peek-bar:focus-visible { box-shadow: inset 0 0 0 2px rgba(127,210,244,.5); border-radius: 20px 20px 0 0; }
.peek-grip { position: absolute; top: 50%; left: 50%; width: 36px; height: 4px; margin: -2px 0 0 -18px; border-radius: 2px; background: rgba(var(--rgb-muted),.32); transition: background .2s; }
.reveal-sheet.expanded .peek-grip { background: rgba(var(--rgb-muted),.55); }
.peek-slot { position: relative; flex: none; width: 52px; height: 52px; }
.peek-slot[hidden] { display: none; }
#peek-thumb { display: block; box-sizing: border-box; width: 52px; height: 52px; border: 3px solid #fffdf6; border-radius: 3px; object-fit: cover; object-position: center 20%; box-shadow: 0 0 0 1px rgba(101,78,38,.35), 0 2px 5px rgba(0,0,0,.4); }
.peek-slot:has(#peek-thumb.prox-postcard)::after { position: absolute; z-index: 2; right: -8px; bottom: -8px; display: grid; place-items: center; width: 21px; height: 21px; border: 1.6px solid rgba(178,124,32,.9); border-radius: 50%; background: rgba(250,243,225,.92); color: #22355c; font-size: var(--fs-micro); line-height: 1; transform: rotate(-11deg); pointer-events: none; }
.peek-slot:has(#peek-thumb.prox-bullseye)::after { content: '🎯'; position: absolute; z-index: 2; right: -8px; bottom: -8px; display: grid; place-items: center; width: 21px; height: 21px; border: 1.6px solid rgba(178,124,32,.9); border-radius: 50%; background: rgba(250,243,225,.92); color: #22355c; font-size: var(--fs-micro); line-height: 1; transform: rotate(-11deg); pointer-events: none; }
.peek-slot:has(#peek-thumb.prox-pinpoint)::after { content: '📍'; position: absolute; z-index: 2; right: -8px; bottom: -8px; display: grid; place-items: center; width: 21px; height: 21px; border: 1.6px solid rgba(178,124,32,.9); border-radius: 50%; background: rgba(250,243,225,.92); color: #22355c; font-size: var(--fs-micro); line-height: 1; transform: rotate(-11deg); pointer-events: none; }
.peek-slot.mystery::before { content: ""; position: absolute; inset: 0; box-sizing: border-box; border: 1.5px dashed rgba(var(--rgb-muted),.55); border-radius: 10px; background: rgba(var(--rgb-muted),.05); }
.peek-slot.mystery #peek-thumb { visibility: hidden; }
#peek-thumb.seen-no-postcard, #place-thumb.seen-no-postcard { filter: grayscale(1); opacity: 0.7; }
#peek-thumb.prox-postcard, #peek-thumb.prox-bullseye, #peek-thumb.prox-pinpoint,
#place-thumb.prox-postcard, #place-thumb.prox-bullseye, #place-thumb.prox-pinpoint { filter: none; opacity: 1; }
.peek-name { overflow: hidden; color: var(--ink); font-size: var(--fs-title); font-weight: 750; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.peek-stats { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.peek-score { color: var(--gold); font-size: var(--fs-display); font-weight: 850; letter-spacing: -.03em; line-height: 1; }
.peek-score:empty { display: none; }
body.survival .peek-score { color: #8ef0b8; }
body.survival-miss .peek-score { color: #ff9db4; }
.peek-distance { color: rgba(var(--rgb-muted),.7); font-size: var(--fs-body); font-weight: 650; }
.reveal-survival-streak { display: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #f6edff; font-size: var(--fs-body); font-weight: 850; letter-spacing: .01em; text-shadow: 0 0 12px rgba(170,120,255,.48); }
body.survival .reveal-survival-streak:not(:empty) { display: inline; }
.sheet-content { display: grid; grid-template-rows: 0fr; overflow: hidden; transition: grid-template-rows .38s cubic-bezier(.2,.9,.25,1); }
.reveal-sheet.expanded .sheet-content { grid-template-rows: 1fr; }
.sheet-inner { min-height: 0; overflow: hidden; padding: 0 14px 14px; }

#fact { margin: 10px 0 0; color: rgba(224,240,255,.8); font-size: var(--fs-body); line-height: 1.45; }

/* Layer --z-screen: after the .screen sections in the DOM, so above the reveal sheet; below the postcard detail (--z-sheet) and the flying postcard (--z-stamp). */
.line-distance { position: fixed; z-index: var(--z-screen); left: 0; top: 0; padding: 4px 10px 3px; border: 1px solid rgba(185,247,255,.5); border-radius: 999px; background: rgba(4,12,28,.8); color: #f4fdff; font-size: 14px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; pointer-events: none; will-change: transform; box-shadow: 0 0 16px rgba(70,205,255,.2); }
.line-distance[hidden] { display: none; }
.results-screen { box-sizing: border-box; overflow: auto; padding: calc(env(safe-area-inset-top, 0px) + 18px) 14px calc(env(safe-area-inset-bottom, 0px) + 18px); background: rgba(2,4,9,.42); pointer-events: auto; }
.results-card { position: relative; box-sizing: border-box; width: 100%; max-width: 440px; min-height: 100%; margin: auto; padding: 20px 14px 18px; border-radius: 24px; text-align: left; }
.results-card .icon-close, .survival-results-card .icon-close { position: absolute; top: 5px; right: 5px; }
.postcard-summary-header { position: relative; padding: 3px 48px 15px 2px; }
.postcard-summary-header .eyebrow { margin-bottom: 6px; }
.postcard-summary-header h2 { margin: 0; color: var(--ink-hi); font-size: 29px; line-height: 1.05; letter-spacing: -.045em; }
.postcard-summary-lede { min-height: 18px; margin: 7px 0 0; color: rgba(var(--rgb-mist),.57); font-size: var(--fs-body); line-height: 1.4; }
.postcard-summary-list { position: relative; display: grid; gap: 0; margin: 4px 3px; padding: 14px 15px 88px; overflow: hidden; border-radius: 8px; background: var(--mail-paper); box-shadow: 0 3px 10px rgba(0,0,0,.45), inset 0 0 0 1px rgba(101,78,38,.18); }
.postcard-summary-entry.pp-post { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px 10px; padding: 7px 10px 7px 2px; border: 0; border-bottom: 1px solid rgba(101,78,38,.18); border-radius: 0; background: none; box-shadow: none; color: #22355c; }
.postcard-summary-entry .pp-photo { display: none; }
.postcard-summary-entry .pp-name { min-width: 0; margin: 0; color: #22355c; }
.postcard-summary-entry .pp-meta { grid-column: 1; min-height: 0; margin: 0; color: rgba(52,72,96,.8); font-size: var(--fs-caption); }
.postcard-summary-score { grid-column: 2; grid-row: 1 / span 2; color: #22355c; font-size: var(--fs-body); font-weight: 800; font-variant-numeric: tabular-nums; }
.postcard-summary-counts { position: absolute; right: 15px; bottom: 16px; z-index: 1; margin: 0; padding: 7px 9px; border: 1.5px dashed #b27c20; border-radius: 3px; background: #fffdf6; color: #b27c20; font-size: var(--fs-caption); transform: rotate(-3deg); }
.postcard-summary-counts b { color: #b27c20; font-size: 14px; }
.postcard-summary-separator { color: rgba(178,124,32,.6); }
.postcard-summary-postmark { position: absolute; left: 15px; bottom: 12px; display: grid; place-items: center; width: 58px; height: 58px; border: 2px solid rgba(52,72,96,.45); border-radius: 50%; color: rgba(52,72,96,.68); font-size: 8px; font-weight: 800; letter-spacing: .05em; line-height: 1.2; text-align: center; transform: rotate(-11deg); }
.postcard-summary-continue { display: block; width: min(100%, 300px); margin: 0 auto; }
.filing-card { position: fixed; z-index: var(--z-stamp); width: 120px; padding: 5px 5px 7px; border-radius: 4px; background: #fffdf6; box-shadow: 0 10px 28px rgba(0,0,0,.5); pointer-events: none; will-change: transform, opacity; }
.filing-card img { display: block; width: 100%; height: 62px; object-fit: cover; object-position: center 20%; border-radius: 2px; }
.filing-card span { display: block; margin-top: 4px; overflow: hidden; color: #22355c; font-size: var(--fs-caption); font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.result-score { margin: 0 0 10px; color: rgba(var(--rgb-mist),.58); font-size: var(--fs-small); font-weight: 700; text-align: center; }
.result-score b { font-family: 'Luckiest Guy', 'Arial Black', sans-serif; color: #F6EDD8; font-size: 38px; line-height: 1; -webkit-text-stroke: 1.3px #1E4E9C; text-shadow: 0 2px 0 #1E4E9C, 0 4px 10px rgba(0,0,0,.45); }
.result-score span { font-size: var(--fs-caption); }
.results-card .streak { margin: 0 0 10px; text-align: center; }
.results-card > .traveler-xp { width: fit-content; margin: 0 auto 12px; padding: 6px 11px; border: 1px solid rgba(var(--rgb-gold),.32); border-radius: 999px; background: rgba(var(--rgb-gold),.08); color: var(--gold); font-size: var(--fs-caption); font-weight: 800; letter-spacing: .02em; text-align: center; font-variant-numeric: tabular-nums; }
.xp-bar { display: flex; align-items: center; gap: 9px; color: var(--ink-hi); text-align: left; }
.xp-bar-copy { flex: 1; min-width: 0; }
.xp-bar-seal { display: grid; flex: none; place-items: center; width: 30px; height: 30px; }
.xp-bar-top, .xp-bar-bottom { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; line-height: 1.3; }
.xp-bar-top b { color: var(--gold); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.xp-bar-top span, .xp-bar-bottom { color: var(--ink-body); }
.xp-bar-track { position: relative; height: 7px; margin: 5px 0; overflow: hidden; border: 1px solid rgba(var(--rgb-line),.45); border-radius: 999px; background: #111a30; }
.xp-bar-fill, .xp-bar-earned { position: absolute; top: 0; bottom: 0; display: block; }
.xp-bar-fill { left: 0; background: #b27c20; transition: width .65s ease; }
.xp-bar-earned { background: #ffc76a; animation: xp-earned .65s ease both; }
.xp-bar-bottom { font-size: 9px; }
.xp-bar-compact { margin: 8px 14px 0; padding: 7px 0; border-block: 1px solid rgba(var(--rgb-line),.2); }
.xp-bar-compact .xp-bar-top span { font-size: 9px; }
.profile-xp { margin: -8px 0 18px; padding: 11px 12px; border: 1px solid rgba(var(--rgb-line),.26); border-radius: 8px; background: #111a30; }
.profile-xp > p { margin: 8px 0 0; color: var(--ink-body); font-size: 11px; }
.profile-xp > .profile-xp-explainer { color: rgba(var(--rgb-mist),.57); line-height: 1.35; }
.level-strip { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.level-strip i { position: relative; display: grid; place-items: center; width: 19px; height: 19px; border: 1px solid rgba(var(--rgb-line),.55); border-radius: 50%; color: var(--ink-body); font-size: 8px; font-style: normal; }
.level-strip i:not(:last-child)::after { position: absolute; left: 18px; width: calc((100vw - 170px) / 9); max-width: 25px; height: 2px; background: rgba(var(--rgb-line),.42); content: ''; }
.level-strip i.complete { border-color: #1e4e9c; background: #1e4e9c; color: #fff; }
.level-strip i.complete:not(:last-child)::after { background: #1e4e9c; }
.level-strip i.current { border: 2px solid var(--gold); color: var(--gold); box-shadow: 0 0 0 2px rgba(255,199,106,.16); }
.level-strip i.silver { border-color: #e8ecf0; }.level-strip i.gold { border-color: #ffc76a; }
.xp-award { box-sizing: border-box; width: 100% !important; max-width: 370px; padding: 0 !important; border: 0 !important; border-radius: 10px !important; background: none !important; text-align: left !important; }
.xp-award-toggle { display: grid; grid-template-columns: auto minmax(66px, 1fr) auto auto; align-items: center; gap: 8px; width: 100%; min-height: 42px; padding: 5px 9px; border: 1px solid rgba(var(--rgb-gold),.32); border-radius: 10px; background: rgba(var(--rgb-gold),.08); color: var(--ink-hi); cursor: pointer; font-variant-numeric: tabular-nums; text-align: left; touch-action: manipulation; }
.xp-award-toggle > strong { color: #ffc76a; font-size: 15px; white-space: nowrap; }
.xp-award-toggle .xp-bar { min-width: 0; gap: 5px; }
.xp-award-toggle .xp-bar-seal { width: 27px; height: 27px; }
.xp-award-toggle .xp-bar-seal svg { width: 27px; height: 27px; }
.xp-award-toggle .xp-bar-top { display: none; }
.xp-award-toggle .xp-bar-track { margin: 0; }
.xp-award-next { color: var(--ink-body); font-size: 10px; font-weight: 700; white-space: nowrap; }
.xp-award-chevron { color: #ffc76a; font-size: 17px; line-height: 1; transition: transform .2s ease; }
.xp-award-toggle.is-expanded .xp-award-chevron { transform: rotate(180deg); }
.xp-award-toggle:focus-visible { outline: 2px solid rgba(127,210,244,.8); outline-offset: 2px; }
.xp-award-breakdown { display: grid; gap: 3px; margin: 7px 9px 2px; color: var(--ink-body); font-size: 11px; }
.xp-award-breakdown[hidden] { display: none; }
.xp-award-breakdown span { display: flex; justify-content: space-between; }.xp-award-breakdown b { color: var(--ink-hi); }
.level-up-overlay { position: fixed; z-index: var(--z-modal); inset: 0; display: grid; place-items: end center; padding: 18px 14px calc(env(safe-area-inset-bottom, 0px) + 18px); }
.level-up-scrim { position: absolute; inset: 0; border: 0; background: rgba(2,4,9,.72); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); cursor: pointer; }
.level-up-card { position: relative; display: flex; gap: 11px; width: min(100%, 370px); box-sizing: border-box; padding: 16px; border: 1px solid rgba(var(--rgb-line),.28); border-radius: 16px; background: #111a30; box-shadow: 0 18px 60px rgba(0,0,0,.52), inset 0 1px rgba(255,255,255,.06); }
.level-up-card > div:last-child { display: grid; gap: 3px; }.level-up-card b { color: #ffc76a; letter-spacing: .12em; }.level-up-card strong { color: var(--ink-hi); }.level-up-card span { color: var(--ink-body); font-weight: 500; }.level-up-card .text-button { justify-self: start; color: #ffc76a; }
@keyframes xp-earned { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); transform-origin: left; } }
.round-breakdown { margin: 16px 0 10px; }
.round-breakdown h2, .survival-results-card .round-breakdown h2 { margin: 0 0 6px; color: rgba(var(--rgb-mist),.58); font-size: var(--fs-caption); font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
#results-breakdown, .pvp-breakdown, #run-results-breakdown { margin: 0; padding: 0; list-style: none; }
.pvp-breakdown li, #run-results-breakdown li { display: flex; align-items: center; min-width: 0; gap: 7px; padding: 9px 0; border-bottom: 1px solid rgba(173,216,255,.11); font-size: var(--fs-base); }
.pvp-breakdown li > b, #run-results-breakdown li > b { flex: 0 0 18px; color: rgba(var(--rgb-mist),.58); font-size: var(--fs-small); }
.pvp-breakdown .place, #run-results-breakdown .place { min-width: 0; overflow: hidden; color: rgba(225,240,255,.92); text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pvp-breakdown .result-metrics, #run-results-breakdown .result-metrics { display: inline-flex; flex: 0 0 auto; align-items: baseline; gap: 6px; margin-left: auto; white-space: nowrap; }
.pvp-breakdown .points, #run-results-breakdown .points { color: var(--gold); font-size: 14px; font-weight: 800; }
.pvp-breakdown .distance, #run-results-breakdown .distance { color: rgba(var(--rgb-muted),.62); font-size: var(--fs-small); font-weight: 600; }
.results-actions { position: relative; }
.results-card .results-actions { margin-top: 10px; }
.results-actions .primary { width: 100%; }
.text-button { background: none; border: none; color: rgba(var(--rgb-muted),.55); font: 13px/1.4 system-ui, sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 8px; margin-top: 4px; }
#share-status { min-height: 16px; margin: 8px 0 0; color: #8bd9ff; font-size: var(--fs-caption); }
body.game-start #hud, body.game-results #hud, body.game-reveal #hud { opacity: 0; }

@media (max-height: 700px) {
  .round-header { padding: 6px 52px 7px 12px; }
  .round-header h2 { font-size: 18px; }
  .reveal-card { padding: 13px 16px; }
  .peek-bar { min-height: 28px; padding-top: 6px; padding-bottom: 6px; }
  .peek-slot, #peek-thumb { width: 46px; height: 46px; }
  #fact { margin: 8px 0 0; }
  .results-card { padding-top: 18px; }
  .postcard-summary-counts { margin: 11px 0 9px; }
}

#hud.ready {
  opacity: 1;
  transform: none;
}

#hud.dim {
  color: rgba(196, 226, 255, 0.38);
}

#travel-distance {
  position: fixed;
  z-index: var(--z-float);
  left: 50%;
  bottom: 24px;
  min-width: 120px;
  padding: 8px 16px 7px;
  border: 1px solid rgba(103, 232, 255, .28);
  border-radius: 14px;
  background: rgba(4, 12, 28, .68);
  box-shadow: 0 0 24px rgba(70, 205, 255, .16);
  color: #f4fdff;
  text-align: center;
  pointer-events: none;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
#travel-distance[hidden] { display: none; }
#travel-distance span { display: block; font-size: clamp(24px, 7vw, 36px); font-weight: 850; letter-spacing: -.04em; }
#travel-distance small { display: block; color: rgba(193, 235, 250, .66); font-size: var(--fs-micro); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

/* Hold-to-confirm: target ticks at the press point, loupe floating above the thumb */

/* Lock in: fixed in the thumb zone, clear of the pin, so the finger never hides
   the placement. Fades in un-tappable for a beat (LOCK_ARM_MS) so a double tap
   on the globe can't confirm by accident. */
.lock-button { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); min-width: 220px; min-height: 54px; color: #1b1230; font-size: var(--fs-title); letter-spacing: -.01em; box-shadow: 0 8px 28px rgba(255,159,106,.35), 0 2px 8px rgba(0,0,0,.4); pointer-events: auto; transform: translateX(-50%); animation: lock-in .35s ease-out both; }
.lock-button[hidden] { display: none; }
.lock-button:active { transform: translateX(-50%) scale(.96); }
@keyframes lock-in { from { opacity: 0; transform: translateX(-50%) translateY(12px); } to { opacity: 1; transform: translateX(-50%); } }
body.has-guess #hud { opacity: 0; }

/* Shared "stays completely secret until visited" tile: Collections thumbs and
   cards, and the passport dex grid's mystery slots, all use this one class.
   No image is ever mounted beneath it. --q-size sets the '?' glyph size. */
.mystery-photo {
  position: relative;
  background: radial-gradient(circle at 50% 38%, #172033, #080b12 72%);
}

.mystery-photo::after {
  content: '?';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(214, 220, 232, .42);
  font-weight: 850;
  font-size: var(--q-size, 28px);
}

.collection-thumb.mystery-photo { --q-size: 12px; }
.collection-card.mystery { border-color: rgba(214, 220, 232, .09); background: #0d121d; }
.collection-card.mystery .collection-card-name { color: rgba(214, 220, 232, .42); letter-spacing: .12em; }

/* Visited but unearned: show photo in black and white */
.collection-card.unearned .photo img { filter: grayscale(1) contrast(.92) brightness(.82); }

/* Loading: full boot screen until the land fill is on the globe, then a slim
   pill on the start screen for the rest (coast, lakes, rivers, locations). */
.load-bar { position: relative; overflow: hidden; height: 6px; border-radius: 999px; background: rgba(127, 210, 244, .14); box-shadow: inset 0 0 0 1px rgba(var(--rgb-line), .08); }
.load-fill { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, #3f9fe0, #7fd2f4); box-shadow: 0 0 12px rgba(127, 210, 244, .55); transform: scaleX(0); transform-origin: left center; transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
#boot.pending .load-fill { width: 34%; transform: none; animation: load-slide 1.3s ease-in-out infinite; }
@keyframes load-slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

#boot { transition: opacity .5s ease; }
#boot.done { opacity: 0; pointer-events: none; }
.boot-orb { position: relative; width: 72px; height: 72px; margin: 0 0 22px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, #1d3f73 0%, #0b1a3a 52%, #050a19 100%); box-shadow: 0 0 0 1px rgba(127, 210, 244, .35), 0 0 34px rgba(77, 176, 255, .32), inset -8px -10px 18px rgba(0, 0, 0, .5); animation: boot-breathe 2.4s ease-in-out infinite; }
.boot-orb::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid transparent; border-top-color: rgba(127, 210, 244, .75); animation: boot-spin 1.1s linear infinite; }
@keyframes boot-spin { to { transform: rotate(360deg); } }
@keyframes boot-breathe { 50% { box-shadow: 0 0 0 1px rgba(127, 210, 244, .5), 0 0 46px rgba(77, 176, 255, .45), inset -8px -10px 18px rgba(0, 0, 0, .5); } }
#boot .boot-title { margin: 0; text-transform: uppercase; font-family: 'Luckiest Guy', 'Arial Black', sans-serif; color: #F6EDD8; font-size: 34px; line-height: 1; letter-spacing: .01em; -webkit-text-stroke: 1.6px #1E4E9C; text-shadow: 0 3px 0 #1E4E9C, 0 6px 14px rgba(0,0,0,.45); }
#boot .boot-stage { min-height: 20px; margin: 18px 0 12px; color: rgba(218, 237, 255, .82); font-size: 14px; font-weight: 600; }
#boot .load-bar { width: min(240px, calc(100vw - 80px)); }
#boot .boot-meta { display: flex; justify-content: space-between; width: min(240px, calc(100vw - 80px)); min-height: 16px; margin: 8px 0 0; color: rgba(var(--rgb-muted), .55); font-size: var(--fs-small); font-weight: 600; font-variant-numeric: tabular-nums; }

.load-pill { position: fixed; z-index: var(--z-sheet); left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 46px); box-sizing: border-box; width: min(280px, calc(100vw - 48px)); padding: 8px 14px 10px; border: 1px solid rgba(var(--rgb-line), .18); border-radius: 14px; background: rgba(5, 12, 29, .72); box-shadow: 0 8px 28px rgba(0, 0, 0, .3); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); pointer-events: none; opacity: 0; visibility: hidden; transform: translate(-50%, 6px); transition: opacity .4s ease, transform .4s ease, visibility 0s linear .4s; }
/* delayed fade-in: a load that finishes within ~0.4 s never shows the pill */
.load-pill.on { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .5s ease .4s, transform .5s cubic-bezier(.22, 1, .36, 1) .4s, visibility 0s; }
body:not(.game-start) .load-pill.on { opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s; }
.load-pill-row { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 7px; color: rgba(218, 237, 255, .8); font-size: var(--fs-small); font-weight: 600; white-space: nowrap; }
.load-pill-row .load-mb { color: rgba(var(--rgb-muted), .5); font-variant-numeric: tabular-nums; }
.load-pill .load-bar { height: 4px; }
.load-pill.done .load-fill { background: linear-gradient(90deg, #4fcf8a, #8ee6b4); box-shadow: 0 0 12px rgba(79, 207, 138, .5); }
@media (max-height: 620px) {
  .load-pill { bottom: calc(env(safe-area-inset-bottom, 0px) + 36px); }
}
@media (prefers-reduced-motion: reduce) {
  .boot-orb, .boot-orb::after, #boot.pending .load-fill { animation: none; }
}

/* Satellite imagery: fallback toast (imagery attribution lives on credits.html) */
.sat-toast { position: fixed; z-index: var(--z-toast); left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 112px); max-width: 90vw; box-sizing: border-box; padding: 10px 16px; border-radius: 999px; background: rgba(20,28,52,.92); border: 1px solid rgba(var(--rgb-line),.25); box-shadow: 0 8px 32px rgba(0,0,0,.5); color: var(--ink); font-size: 14px; font-weight: 600; pointer-events: none; opacity: 0; transform: translateX(-50%) translateY(20px); transition: opacity .3s, transform .3s; }
.sat-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Main UI styles, moved from the inline <style> block in index.html. */
.mode-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 354px);
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  margin: 20px auto 0;
}
.mode-buttons > button {
  width: 100%;
  min-width: 0;
  min-height: 62px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid rgba(196,168,255,.45);
  border-radius: 999px;
  background: rgba(150,110,255,.14);
  color: #e9e0ff;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  line-height: 1.15;
}
.mode-buttons .mode-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mode-buttons .mode-desc {
  display: -webkit-box;
  max-width: 100%;
  font-size: var(--fs-caption);
  font-weight: 650;
  line-height: 1.1;
  opacity: .72;
  overflow: hidden;
  text-overflow: clip;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.mode-buttons > button:active { transform: scale(.98); }
.mode-buttons > button[hidden] { display: none; }
/* A not-yet-ready entry keeps its grid cell but stays invisible, so the row
   does not shift when it appears (the Expeditions slot during load). */
.mode-buttons > button.entry-pending { visibility: hidden; }
.mode-buttons > button:disabled { opacity: .45; cursor: progress; }
.mode-buttons > button:disabled:active { transform: none; }
/* Daily takes the full first row so Survival and Challenge pair below it. */
#play-button { grid-column: 1 / -1; }
/* The gold primary treatment is state-driven, never on two buttons at once:
   syncPackButton moves .is-gold between the Daily (unplayed) and Packs
   (Daily played and a pack can be opened or resumed). */
.mode-buttons > button.is-gold { background: linear-gradient(135deg, var(--gold), #ff9f6a); border: 0; color: #21152f; font-weight: 800; }
/* A played Daily shrinks to a slim, quiet single row; it still opens the
   day's results. */
#play-button.daily-done { min-height: 40px; flex-direction: row; gap: 6px; }
/* Postcard Packs: a full-width row under the Daily, sharing the one
   dark-glass treatment with Expeditions and Practice; the title stays gold. */
#pack-button { position: relative; grid-column: 1 / -1; color: #ffe2a0; }
/* On gold the pack button's own text flips to ink, like the Daily's; the
   token pill keeps its gold-on-dark chrome via .pack-token-pill. */
#pack-button.is-gold { color: #21152f; }
/* Skip-token pill pinned to the pack button's right edge; the pill chrome
   itself is the shared .pack-skip-balance rule. The pill keeps its own gold
   text so it stays readable when the button itself goes gold. */
.pack-token-pill { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); font-size: var(--fs-caption); color: #ffe2a0; }
/* Slim refill bar along the pack button's bottom edge, clipped by the pill
   radius; the fill uses the same 12h fraction as the pack screen bar. */
.pack-home-bar { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: rgba(var(--rgb-gold),.18); pointer-events: none; }
.pack-home-bar i { display: block; height: 100%; background: var(--gold); }
#pack-button.is-gold .pack-home-bar { background: rgba(33,21,47,.18); }
#pack-button.is-gold .pack-home-bar i { background: #21152f; }

/* Home panels (2026-11-08, Sean's picks from the home mockups): the three
   mode buttons are tall portrait panels over one continuous globe image,
   names and status overlaid at the bottom. Practice deliberately gets no
   pack imagery, since Practice earns no postcards; the pack panel instead
   floats the sealed pack itself over the middle slice. */
.home-panels { display: flex; position: relative; --pg: 8px; gap: var(--pg); }
/* One globe image, one slice per panel (Sean's triptych, 2026-11-08): each
   button clips its own full-row-width copy of the image, offset by its
   column, so the three slices line up as one continuous picture inside
   the columns while the gaps between them and everything around the row
   stay clear. Atlantic-centered crop. */
.home-panels .panel-slice { position: absolute; top: 0; left: 0; width: calc(300% + 2 * var(--pg)); max-width: none; height: 100%; object-fit: cover; object-position: 40% 50%; pointer-events: none; }
.home-panels #pack-button .panel-slice { left: calc(-100% - var(--pg)); }
.home-panels #survival-hub-button .panel-slice { left: calc(-200% - 2 * var(--pg)); }
.home-panels .extent-test-entry { display: flex; flex: 0 1 132px; height: auto; min-height: 0; padding: 14px 12px; border: 1px solid rgba(157,211,255,.42); background: rgba(5,15,31,.78); color: var(--ink-hi); text-align: left; }
.extent-test-entry .mode-name { display: block; font-size: var(--fs-base); font-weight: 800; }
.extent-test-entry .mode-desc { display: block; margin: 4px 0 12px; font-size: var(--fs-caption); }
.extent-test-entry > span:last-child { margin-top: auto; color: var(--gold); font-size: var(--fs-small); font-weight: 800; }
.extent-test-results #extent-test-home { width: 100%; min-height: 52px; }
.extent-test-quit { position: absolute; top: 10px; right: 10px; padding: 5px 9px; border: 1px solid rgba(157,211,255,.35); border-radius: 999px; background: rgba(5,15,31,.78); color: var(--ink-hi); font: inherit; font-size: var(--fs-caption); font-weight: 800; cursor: pointer; }
.home-panels > button { position: relative; flex: 1 1 0; height: 225px; min-height: 0; padding: 0; border-radius: 18px; overflow: hidden; background: transparent; color: var(--ink-hi); white-space: normal; text-overflow: clip; }
.home-panels > button.is-gold { background: none; color: var(--ink-hi); }
/* The pack is an object floating over the middle slice, not a photo: the
   sealed pack art (static variant, no tear light, WORLD CAPITALS title),
   sized so its baked title clears the panel label below. */
.home-panels .panel-packobj { position: absolute; left: 50%; top: 10px; transform: translateX(-50%) rotate(-3deg); height: 140px; width: auto; border-radius: 6px; filter: drop-shadow(0 10px 16px rgba(0,0,0,.7)); pointer-events: none; }
.home-panels .panel-info { position: absolute; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; gap: 2px; padding: 28px 10px 12px; background: linear-gradient(180deg, transparent, rgba(2,5,12,.88) 55%); text-align: left; pointer-events: none; }
.home-panels #play-button .panel-info { background: linear-gradient(180deg, transparent, rgba(24,10,2,.85) 55%); }
/* One voice for all panel text (2026-11-21 cleanup): the system sans at two
   sizes, a one-word name over at most two short status lines, same ink on
   every panel. Luckiest Guy stays on the logotype and the pack art. */
.home-panels .mode-name { overflow: visible; font-size: var(--fs-title); font-weight: 750; letter-spacing: -.01em; line-height: 1.15; white-space: nowrap; text-overflow: clip; }
/* Every status reserves two lines, so the three names share one baseline
   whatever state the pack panel is in. */
.home-panels .mode-desc { min-height: 2.6em; font-size: var(--fs-small); font-weight: 600; line-height: 1.3; opacity: .78; font-variant-numeric: tabular-nums; white-space: pre-line; }
.home-panels .pack-token-pill { top: 8px; right: 8px; z-index: 2; transform: none; }
.home-panels #play-button.daily-done { min-height: 0; flex-direction: column; }
/* A played Daily dims its own slice of the globe. */
.home-panels #play-button.daily-done .panel-slice { filter: brightness(.58) saturate(.82); }
/* On the panel the gold state must stay light text: the base #pack-button
   .is-gold ink color (for the old gold-gradient button) outranks the generic
   panel rule and made the pack name and status unreadable over the art. */
.home-panels #pack-button, .home-panels #pack-button.is-gold { color: var(--ink-hi); }
.home-panels #pack-button.is-gold .pack-home-bar { background: rgba(var(--rgb-gold),.18); }
.home-panels #pack-button.is-gold .pack-home-bar i { background: var(--gold); }
/* The pack art carries its own baked-in title, so the pack panel gets a
   deeper scrim than the others to keep the overlaid name and status clear. */
.home-panels #pack-button .panel-info { background: linear-gradient(180deg, transparent, rgba(3,6,14,.93) 48%); }

/* The Passport summary card joins the site's dark glass treatment (Sean,
   2026-11-08: the cream mail-paper card clashed with the rest of the home
   screen). The cream paper stays inside the Passport screen itself, where
   it is the book's own material. */
.start-screen .passport { border-radius: 18px; background: linear-gradient(165deg, rgba(17,28,56,.92), rgba(7,12,26,.95)); box-shadow: 0 10px 24px rgba(0,0,0,.45), inset 0 0 0 1px rgba(150,175,255,.16); }
.start-screen .passport-count { color: rgba(205,218,245,.78); }
.start-screen .passport-count b { color: #fff; }
.start-screen .passport-earned, .start-screen .passport-streak { color: #f0b64a; }
.start-screen .passport-stamps img { background: #0d1730; border-color: rgba(180,198,240,.35); }
.start-screen .passport-stamps img[data-tier="gold"] { border-color: #e9b558; }
.start-screen .passport-stamps img[data-tier="cyan"] { border-color: rgba(125,211,252,.55); }
/* Home card, quieted (2026-11-21 cleanup): left-aligned on the panels' type
   scale, no text cues; one chevron per tap target (the card opens the
   Passport, the level row opens the profile). */
.start-screen .passport { padding: 0 0 14px; text-align: left; }
.start-screen .passport-count { margin: 14px 40px 0 16px; font-size: var(--fs-base); font-weight: 600; }
.start-screen .passport-count b { font-size: var(--fs-display); }
.start-screen .passport-stamps { margin: 10px 16px 0; }
.start-screen .passport-stamps:empty { display: none; }
.start-screen .passport-xp { margin: 12px 16px 0; padding-top: 12px; border-top-color: rgba(var(--rgb-line),.14); }
.start-screen .passport-xp .xp-bar-top, .start-screen .passport-xp .xp-bar-top span { font-size: var(--fs-small); }
.start-screen .passport-xp .xp-bar-top b { font-size: var(--fs-small); letter-spacing: 0; text-transform: none; }
.start-screen .passport-chevron, .start-screen .passport-xp-chevron { color: rgba(205,218,245,.5); font-size: 22px; font-weight: 600; line-height: 1; }
.start-screen .passport-chevron { position: absolute; top: 18px; right: 16px; }

/* The pack screen alone uses a dark studio stage. */
.pack-screen { display: grid; place-items: center; box-sizing: border-box; padding: 24px 10px; overflow: auto; background: radial-gradient(circle at 50% 43%, #19365c 0, #0b1930 36%, #040914 76%); pointer-events: auto; }
.pack-screen::after { position: fixed; right: 12%; bottom: 8%; left: 12%; height: 15%; border-radius: 50%; background: radial-gradient(ellipse, rgba(0,0,0,.62), transparent 68%); filter: blur(10px); content: ''; pointer-events: none; }
.pack-screen.sealed-on { touch-action: none; }
.pack-screen[hidden] { display: none; }
.expedition-panel.pack-panel { --pack-w: min(387px, 96vw); z-index: 1; max-height: none; overflow: visible; padding: 24px 4px 32px; border: 0; background: transparent; box-shadow: none; text-align: center; }
/* The sealed pack at full --pack-w still fits a 390x844 screen with no
   scroll (the heading wraps to two lines at 390). */
.pack-panel h2 { padding: 0 34px; color: #fff5d4; font-size: var(--fs-display); line-height: 1.1; text-shadow: 0 2px 14px rgba(0,0,0,.8); }
.pack-panel > .pack-line { margin: 6px 0 12px; }
.pack-panel .pack-back { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 6px); right: 6px; }
.pack-select { margin-top: 30px; }
.pack-subline { margin: 5px 0 10px; color: rgba(224,238,252,.76); font-size: var(--fs-body); }
.pack-stamina { min-height: 24px; margin-bottom: 34px; color: #fff5d4; font-size: var(--fs-body); font-weight: 750; }
.pack-stamina-line { display: flex; align-items: center; justify-content: center; gap: 8px; }
.pack-skip-balance { display: inline-flex; align-items: center; gap: 3px; padding: 3px 7px; border: 1px solid rgba(var(--rgb-gold),.42); border-radius: 999px; background: rgba(5,15,31,.58); }
.pack-skip-actions { display: flex; justify-content: center; gap: 7px; margin-top: 8px; }
.pack-skip-actions button, .pp-place-skip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 9px; border: 1px solid rgba(var(--rgb-gold),.48); border-radius: 8px; background: rgba(5,15,31,.72); color: #fff5d4; font: inherit; cursor: pointer; }
.pack-icons { display: inline-flex; gap: 4px; align-items: center; }
.pack-icons .pk { display: block; }
.pack-icons .pk-full { filter: drop-shadow(0 0 4px rgba(var(--rgb-gold),.55)); }
.pack-icons .pk-empty { opacity: .55; }
.hg { display: block; }
.pack-refill { display: flex; align-items: center; gap: 8px; width: min(330px, 92%); margin: 9px auto 0; }
.pack-refill-track { flex: 1; height: 4px; border-radius: 999px; background: rgba(var(--rgb-gold),.16); overflow: hidden; }
.pack-refill-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e8a84b, var(--gold)); box-shadow: 0 0 6px rgba(var(--rgb-gold),.55); }
.pack-refill-count { font-size: var(--fs-caption); font-weight: 650; color: rgba(255,245,212,.78); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pack-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; width: min(452px, 100%); margin-inline: auto; }
/* Bare pack art on the studio stage: no container, no name label (the art
   carries the name); the art itself is the tap target. */
.pack-choice { display: grid; grid-template-rows: auto minmax(14px, auto); gap: 6px; align-content: start; min-width: 0; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #fff5d4; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pack-choice img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: contain; filter: drop-shadow(0 5px 7px rgba(0,0,0,.55)); }
.pack-choice small { color: #9dd3ff; font-size: var(--fs-micro); }
.pack-choice:focus-visible { outline: 2px solid #67e8ff; outline-offset: 2px; }
.pack-choice:active { transform: scale(.97); }
.pack-choice:disabled { opacity: .38; cursor: default; }
.pack-choice:disabled:active { transform: none; }
.pack-complete-stamina { margin: 8px 0 0; color: var(--gold); font-size: var(--fs-small); font-weight: 750; }
.pack-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; text-align: left; }
.pack-slots .pp-slot-score { white-space: nowrap; }
.pack-slot-note { margin: 3px 1px 0; font-size: var(--fs-caption); font-weight: 750; }
.pack-slot-note.is-new { color: var(--gold); }
.pack-slot-note.is-upgrade { color: #9dd3ff; }
.pack-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .72fr); gap: 8px; width: 100%; margin-top: 18px; }
.pack-actions[hidden] { display: none; }
.pack-actions .primary { width: 100%; min-width: 0; padding: 0 14px; }
.pack-passport { min-width: 0; min-height: 52px; padding: 0 14px; border: 1px solid rgba(var(--rgb-line),.22); border-radius: 999px; background: rgba(var(--rgb-line),.08); color: var(--ink-dim); font: inherit; font-weight: 800; cursor: pointer; touch-action: manipulation; }
.pack-passport:active { transform: scale(.98); }
.pack-slots[hidden] { display: none; }

/* The pack opening ritual (2026-10-18): sealed pack, clue flip, stamp-in. */
/* The sealed pack: the Globe Hero packet art, full-bleed. --line is the tear
   line as a fraction of the pack height and --tear (0..1) the cut's progress
   along it, both set by pack.js. body and strip are the same art split at the
   line; on the tear the strip flies off and the body keeps a torn edge. */
.pack-sealed { --art: url('../../assets/pack-world-capitals-static.webp'); position: relative; box-sizing: border-box; width: var(--pack-w); aspect-ratio: 2 / 3; margin: 8px auto 18px; filter: drop-shadow(0 13px 22px rgba(0,0,0,.68)); cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; }
.pack-sealed[hidden] { display: none; }
.pack-sealed:focus-visible { outline: 2px solid #67e8ff; outline-offset: 2px; }
.pack-sealed-body { position: absolute; inset: 0; background: var(--art) center / 100% 100% no-repeat; clip-path: inset(calc(var(--line) * 100%) 0 0 0); pointer-events: none; }
.pack-sealed-strip { position: absolute; z-index: 1; inset: 0; background: var(--art) center / 100% 100% no-repeat; clip-path: inset(0 0 calc((1 - var(--line)) * 100% - 1px) 0); transform-origin: 100% calc(var(--line) * 100%); pointer-events: none; }
.pack-sealed-flap { position: absolute; z-index: 2; inset: calc(var(--line) * 100% - 5px) 12.1% auto 13.5%; height: 6px; background: linear-gradient(180deg, transparent 0 60%, #c9d1dc 60% 75%, #1b2c5a 75%), linear-gradient(90deg, #c99a3e, #f6e7c1, #ddb25a, #fff3d6, #d4a54b, #f6e7c1, #c99a3e); -webkit-mask: conic-gradient(from 135deg at 50% 0, #000 90deg, #0000 0) 0 0 / 7px 100% repeat-x; mask: conic-gradient(from 135deg at 50% 0, #000 90deg, #0000 0) 0 0 / 7px 100% repeat-x; opacity: 0; pointer-events: none; }
.pack-sealed-sheen { position: absolute; z-index: 2; inset: 0; background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.16) 50%, transparent 58%) 100% 0 / 300% 100% no-repeat; -webkit-mask: var(--art) center / 100% 100% no-repeat; mask: var(--art) center / 100% 100% no-repeat; animation: pack-sheen 5s ease-in-out infinite; pointer-events: none; }
@keyframes pack-sheen { 0%, 30% { background-position: 100% 0; } 70%, 100% { background-position: 0 0; } }
/* The cut: a dark split opening along the line behind a bright flare head.
   Traced right to left, the whole layer mirrors so it runs from the right. */
.pack-sealed-cut { position: absolute; z-index: 3; inset: calc(var(--line) * 100% - 2px) 12.1% auto 13.5%; height: 4px; pointer-events: none; }
.pack-sealed.tear-rtl .pack-sealed-cut { transform: scaleX(-1); }
.pack-sealed-cut::before { position: absolute; inset: 0 auto 0 0; width: calc(var(--tear, 0) * 100%); border-radius: 2px; background: linear-gradient(180deg, #fff8d6, #0b1430 45% 55%, #d9f4ff); box-shadow: 0 0 6px rgba(255,236,170,.6); content: ''; }
/* The tear guide: a glowing blue line rests on the tear line before any
   tearing, so the player can see where to trace (Sean, 2026-11-08). It
   lives only on this opening surface; the static pack art itself carries
   no light. Inset to the pack's own width inside the art frame. */
.pack-sealed-cut::after { position: absolute; top: 1px; right: 7.5%; left: 7.5%; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(103,232,255,0), rgba(103,232,255,.95) 14% 86%, rgba(103,232,255,0)); box-shadow: 0 0 8px 2px rgba(103,232,255,.55); content: ''; animation: pack-tear-guide 1.7s ease-in-out infinite; }
@keyframes pack-tear-guide { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.pack-sealed-glint { position: absolute; top: 50%; left: calc(var(--tear, 0) * 100%); width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle, #fff 0 14%, rgba(255,240,180,.9) 26%, rgba(255,200,120,.35) 50%, transparent 70%); transform: translate(-50%, -50%); opacity: min(1, calc(var(--tear, 0) * 40)); }
.pack-sealed.teach .pack-sealed-glint { animation: pack-glint-teach .9s ease-in-out; }
@keyframes pack-glint-teach { 0% { left: 0; opacity: 0; } 12%, 88% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
/* The tear-off (tearOpen's 500ms): the strip lifts, tips and flies off past
   the top; the body keeps a jagged gold-to-cream foil edge over the pouch's
   silver lining and navy inside. */
.pack-sealed.torn .pack-sealed-strip { animation: pack-strip-off .5s cubic-bezier(.3,.1,.6,1) forwards; }
@keyframes pack-strip-off { 0% { transform: none; opacity: 1; } 35% { transform: translateY(-3%) rotate(-3deg); opacity: 1; } 100% { transform: translate(-4%, -34%) rotate(-7deg); opacity: 0; } }
.pack-sealed.torn .pack-sealed-flap { transition: opacity .15s; opacity: 1; }
.pack-sealed.torn .pack-sealed-cut, .pack-sealed.torn .pack-sealed-sheen { transition: opacity .2s; opacity: 0; }
/* While the stack rises out of it, the torn wrapper lies over the stack's
   footprint (left and top set by pack.js) until it drops away. It layers above
   the stack (z-index 1), so its body below the tear line hides the cards
   still inside. */
.pack-sealed.opening { position: absolute; z-index: 2; margin: 0; }
.pack-sealed-hint { position: absolute; top: calc(100% + 6px); right: 0; left: 0; margin: 0; color: rgba(var(--rgb-muted),.7); font-size: var(--fs-caption); font-weight: 600; text-align: center; white-space: nowrap; pointer-events: none; }
.pack-sealed.torn .pack-sealed-hint { visibility: hidden; }

/* The postcard's mail side and caption type, shared by the earned postcard
   (Passport detail) and the dealt pack card so both read as one object. A
   dealt back fills none of it: no fact, no date in the postmark (is-blank),
   no stamp photo, no name or registry number; only the pack name. */
.pc-back { display: grid; grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; padding: 12px 12px 0; background: var(--mail-paper); color: var(--mail-ink); }
.pc-fact { grid-column: 1; grid-row: 1; margin: 0; padding-right: 10px; overflow: hidden; color: var(--mail-ink); font-size: 11.5px; line-height: 1.5; }
.pc-fact[hidden] { display: none; }
.pc-divider { grid-column: 2; grid-row: 1; background: rgba(34,53,92,.22); }
.pc-right { grid-column: 3; grid-row: 1; display: flex; flex-direction: column; min-width: 0; padding-left: 10px; }
.pc-stamp-row { position: relative; display: flex; justify-content: flex-end; height: 62px; flex: none; }
.pc-stamp { position: relative; box-sizing: border-box; width: 52px; height: 52px; margin: 3px 3px 0 0; padding: 4px; background: linear-gradient(135deg, #1b2c5a, #3b2a6e) content-box, var(--mail-stamp); box-shadow: 0 2px 5px rgba(0,0,0,.28); }
.pc-stamp img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.pc-stamp::before { content: ''; position: absolute; z-index: 1; inset: -3.5px 0; background: var(--perf) 0 0 / 7px 7px repeat-x, var(--perf) 0 100% / 7px 7px repeat-x; pointer-events: none; --perf: radial-gradient(circle, #f4ebd3 2.3px, transparent 2.6px); }
.pc-stamp::after { content: ''; position: absolute; z-index: 1; inset: 0 -3.5px; background: var(--perf) 0 0 / 7px 7px repeat-y, var(--perf) 100% 0 / 7px 7px repeat-y; pointer-events: none; --perf: radial-gradient(circle, #f4ebd3 2.3px, transparent 2.6px); }
/* The game's rotated postmark badge, dated with the first earn. */
.pc-postmark { position: absolute; z-index: 2; top: 22px; right: 30px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 52px; height: 52px; border: 1.8px solid rgba(52,72,96,.85); border-radius: 50%; outline: 1.4px solid rgba(52,72,96,.85); outline-offset: 2.5px; color: rgba(40,58,80,.95); font-size: 7.5px; font-weight: 850; line-height: 1.15; letter-spacing: .04em; text-align: center; font-variant-numeric: tabular-nums; transform: rotate(-11deg); }
.pc-postmark::after { content: ''; position: absolute; inset: 4px; border: 1px dashed rgba(52,72,96,.6); border-radius: 50%; pointer-events: none; }
.pc-postmark[data-tier="gold"] { border-color: var(--mail-gold); outline-color: var(--mail-gold); color: var(--mail-gold); }
.pc-postmark[data-tier="gold"]::after { border-color: rgba(178,124,32,.55); }
.pc-postmark.is-blank { opacity: .45; }
.pc-postmark[hidden] { display: none; }
.pc-addr { margin-top: 4px; }
.pc-addr p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-addr-name { color: var(--mail-ink); font-size: var(--fs-small); font-weight: 800; line-height: 1.3; }
.pc-addr-country { color: var(--mail-ink-2); font-size: var(--fs-micro); font-weight: 700; line-height: 1.3; }
.pc-addr-country[hidden] { display: none; }
.pc-addr-pack { color: var(--mail-ink-2); font-size: var(--fs-micro); font-weight: 700; letter-spacing: .05em; line-height: 1.3; font-variant-numeric: tabular-nums; }
.pc-addr-pack[hidden] { display: none; }
.pc-addr-rule { height: 8px; margin-bottom: 4px; border-bottom: 1px solid rgba(34,53,92,.3); }
.pc-caption-name { color: var(--mail-ink); font-size: var(--fs-body); font-weight: 800; line-height: 1.2; letter-spacing: .02em; }
.pc-caption-sub { color: var(--mail-ink-2); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }

.pack-flip-slot { perspective: 900px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pack-flip-slot:focus-visible { outline: 2px solid #67e8ff; outline-offset: 2px; border-radius: 10px; }
/* The dealt objects are landscape postcards, not square playing cards. */
.pack-flip { position: relative; width: 100%; aspect-ratio: 3 / 2; transform-style: preserve-3d; transition: transform .33s ease; }
.pack-flip-slot.flipped .pack-flip { transform: rotateY(180deg); }
.pack-flip-face { position: absolute; inset: 0; box-sizing: border-box; overflow: hidden; border: 1px solid rgba(101,78,38,.28); border-radius: 7px; background: var(--mail-paper); box-shadow: inset 0 0 24px rgba(91,65,25,.08); color: var(--mail-ink); backface-visibility: hidden; -webkit-backface-visibility: hidden; text-align: left; transition: visibility 0s linear .16s; }
/* The clue face is the address side filled in: the flag in the stamp box,
   the place written on the address line in mail ink, country and pack on the
   line below, and the last rule fills over the hold before the round starts. */
.pack-flip-front { display: flex; flex-direction: column; padding: 12px 14px 14px; transform: rotateY(180deg); visibility: hidden; }
.pack-flip-slot.flipped .pack-flip-front { visibility: visible; }
/* The dealt back carries the pack's airmail mark: a gold and cream chevron
   border along its top edge. */
.pack-flip-back::before { position: absolute; top: 0; right: 0; left: 0; height: 5px; background: repeating-linear-gradient(-45deg, var(--mail-gold) 0 5px, #fff8e8 5px 10px); content: ''; }
.pack-flip-slot.flipped .pack-flip-back { visibility: hidden; }
.pack-clue-stamp { display: grid; place-items: center; }
.pack-clue-stamp span { font-size: 26px; line-height: 1; }
.pack-clue-addr { margin-top: auto; }
.pack-clue-addr .pack-clue-name { display: -webkit-box; margin: 0; padding-bottom: 2px; border-bottom: 1px solid rgba(34,53,92,.3); font-size: 20px; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.pack-clue-addr .pack-clue-text { margin: 6px 0 0; padding-bottom: 3px; border-bottom: 1px solid rgba(34,53,92,.3); }
.pack-clue-progress { position: relative; margin-bottom: 0; }
.pack-clue-progress i { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--mail-ink); transform: scaleX(0); transform-origin: 0 50%; }

/* The stack (2026-10-29): the unplayed cards as one pile of postcard backs in
   the sealed pack's own footprint, next card on top. --depth (set by
   pack.js) fans the cards under it; only the top card takes the tap. */
.pack-slots.is-stack { position: relative; z-index: 1; display: grid; grid-template-columns: none; place-items: center; width: min(372px, 95vw); aspect-ratio: 3 / 2; margin: 30px auto 22px; }
/* While the pack opens the stack drops its stacking context, so each card
   layers against the wrapper on its own: under it while inside, above it
   once clear (pack.js sets the per-card z-index). */
.pack-slots.is-stack.is-opening { z-index: auto; }
.pack-slots.is-stack > .pack-slot { grid-area: 1 / 1; width: min(372px, 95vw); translate: calc(var(--depth) * 7px) calc(var(--depth) * -8px); rotate: calc(var(--depth) * 2deg); }
.pack-slots.is-stack .pack-flip-face { box-shadow: 0 10px 22px rgba(0,0,0,.45); }
.pack-slots.is-stack .pack-clue-name { font-size: 24px; }
/* The card-to-round handoff (pack.js startCard): the place name flies into
   the round header while the round fades in over the pack screen. */
html.pack-vt::view-transition-group(pack-place) { animation-duration: .3s; animation-timing-function: cubic-bezier(.3,.7,.3,1); }
html.pack-vt::view-transition-old(root), html.pack-vt::view-transition-new(root) { animation-duration: .3s; }

@media (max-height: 700px) {
  .expedition-panel.pack-panel { --pack-w: min(262px, 67vw); padding-top: 12px; padding-bottom: 16px; }
  .pack-panel h2 { font-size: 22px; }
  .pack-panel > .pack-line { margin-bottom: 5px; }
  .pack-sealed { margin-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .pack-flip { transition: none; }
  .pack-flip-face { transition: none; }
  .pack-sealed-sheen { animation: none; }
  .pack-sealed-cut::after { animation: none; }
}

/* Survival and More modes hub rows: the shared picker row without the emoji column. */
#survival-hub .expedition-choice { grid-template-columns: 1fr auto; }
#survival-hub .expedition-choice:disabled { opacity: .45; cursor: progress; }
#survival-hub .expedition-choice small:empty { display: none; }
#hub-main-list[hidden], #hub-survival-view[hidden] { display: none; }
.hub-back { display: block; margin: 0 0 10px; padding: 6px 2px; border: 0; background: none; color: #9dd3ff; font: inherit; font-size: var(--fs-small); font-weight: 700; cursor: pointer; }

/* Expedition routes are letters kept in the dark picker, with postmarks for stops. */
.expedition-picker:has(#expedition-heading) .expedition-choice { position: relative; border: 0; border-radius: 7px; background: var(--mail-paper); box-shadow: 0 3px 10px rgba(0,0,0,.3), inset 0 0 0 1px rgba(101,78,38,.18); color: var(--mail-ink); }
.expedition-picker:has(#expedition-heading) .expedition-choice strong { color: var(--mail-ink); }
.expedition-picker:has(#expedition-heading) .expedition-choice small { color: var(--mail-ink-2); }
.expedition-picker:has(#expedition-heading) .expedition-choice .badge { color: var(--mail-gold); }
.expedition-picker:has(#expedition-heading) .expedition-choice .emoji { align-self: start; }
.expedition-picker:has(#expedition-heading) .weekly-eyebrow { color: #7a5f36; }
.expedition-picker:has(#expedition-heading) .expedition-list { gap: 14px; }
.expedition-marks { display: flex; gap: 5px; margin-top: 10px; flex-wrap: nowrap; }
.expedition-marks span, .expedition-picker:has(#expedition-heading) .weekly-dot { display: grid; place-items: center; width: 26px; height: 26px; border: 1.5px dashed rgba(101,78,38,.35); border-radius: 50%; background: transparent; color: rgba(101,78,38,.52); font-size: 8px; font-weight: 800; line-height: 1; }
.expedition-marks span[data-state="played"], .expedition-picker:has(#expedition-heading) .weekly-dot[data-state="played"] { border-style: solid; border-color: #34486a; background: #34486a; color: #faf3e1; }
.expedition-picker:has(#expedition-heading) .weekly-dot[data-state="open"] { border-color: #c8433c; color: #c8433c; }
.expedition-picker:has(#expedition-heading) .weekly-dot[data-today] { box-shadow: 0 0 0 2px rgba(200,67,60,.18); }
.expedition-complete-mark { display: grid; place-items: center; width: 42px; height: 42px; border: var(--mail-ring); border-radius: 50%; color: var(--mail-ink-2); font-size: 6px; font-weight: 800; line-height: 1.15; text-align: center; transform: rotate(-11deg); }

.survival-streak {
  display: none;
  margin: 10px 0 0;
  color: #f6edff;
  font-size: var(--fs-title);
  font-weight: 850;
  letter-spacing: .01em;
  text-shadow: 0 0 20px rgba(170, 120, 255, .48);
}
body.survival .survival-streak { display: block; }
body.survival .round-header,
body.survival #reveal-card,
body.endless .round-header,
body.endless #reveal-card {
  border-color: rgba(196, 168, 255, .52);
  background: rgba(22, 10, 42, .88);
}
body.survival .round-meta span:first-child,
body.endless .round-meta span:first-child { color: #d7c4ff; }
body.survival #reveal-card .score-math,
body.endless #reveal-card .score-math { display: none; }
body.survival #next-button {
  background: linear-gradient(135deg, #8057e8, #a06cff);
}
body.survival.survival-miss #next-button {
  background: linear-gradient(135deg, #bd496d, #8b3158);
}

.survival-results-card {
  position: relative;
  width: min(100%, 354px);
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  margin: 0 auto;
  padding: 26px 22px 22px;
  text-align: center;
}
.survival-results-card .eyebrow { margin: 0 0 8px; color: #cdb6ff; }
.survival-results-card h2 { margin: 0; color: #fff; font-size: 36px; line-height: 1.08; }
body.blackout-complete .survival-results-card h2 { color: var(--gold); }
#run-breakdown { margin: 0 0 22px; text-align: left; }
.survival-results-card .survival-summary { margin: 9px 0 22px; color: rgba(226, 218, 246, .76); }
.survival-best-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 22px;
}
.survival-best-card div {
  padding: 14px 8px;
  border: 1px solid rgba(196, 168, 255, .22);
  border-radius: 15px;
  background: rgba(151, 105, 255, .09);
}
.survival-best-card strong { display: block; color: #fff; font-size: 28px; line-height: 1; }
.survival-best-card span { display: block; margin-top: 5px; color: rgba(218, 205, 245, .65); font-size: var(--fs-caption); font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.survival-result-actions { display: grid; gap: 10px; }
.survival-result-actions button { width: 100%; margin: 0; min-height: 52px; border-radius: 999px; font: inherit; font-size: var(--fs-base); font-weight: 800; cursor: pointer; touch-action: manipulation; }

@media (max-width: 360px) {
  .mode-buttons { gap: 6px; }
  .mode-buttons > button { padding-inline: 7px; font-size: var(--fs-body); }
  .mode-buttons .mode-desc { font-size: var(--fs-micro); }
  .home-panels .mode-name { font-size: var(--fs-base); }
  .home-panels .panel-info { padding-inline: 8px; }
}

/* Recommended home variant: ?home=recs. Every surface sits on the default
   .mode-buttons grid and its 62px rows; nothing here sets its own size. */
.home-recs #pack-button { display: none; }
/* The pack marker is a ticket stub on the Daily pill: same ink, same
   .mode-name/.mode-desc type, a perforation instead of a badge. The Daily
   label centers in what is left of the pill while the stub shows. */
.home-recs #play-button { --pack-stub: 88px; position: relative; }
.home-recs #play-button:has(> .pack-marker:not([hidden])) { padding-right: var(--pack-stub); }
.home-recs #play-button .pack-marker {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--pack-stub);
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px dashed rgba(33,21,47,.35);
  background: none;
  color: inherit;
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  line-height: 1.15;
  cursor: pointer;
  touch-action: manipulation;
}
.home-recs #play-button .pack-marker:active { background: rgba(33,21,47,.08); }
.home-recs #play-button .pack-marker[hidden] { display: none; }

/* Expeditions and More ways to play take full rows, like Daily. */
.home-recs #expeditions-button { grid-column: 1 / -1; display: none; }
.home-recs #recs-more-ways-button { grid-column: 1 / -1; }
.home-recs #expeditions-button.recs-visible { display: flex; }

/* The strip is the last item in the stack. The default streak row contributes
   20px plus an 18px top margin only for fresh players, so hide it in both recs
   states and put that shared 38px spacing on the always-visible strip. The
   bottom reservation then keeps both recs titles aligned with the default. */
.home-recs .start-screen { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 116px); }
.home-recs .mode-buttons { margin-bottom: 0; }
.home-recs .start-screen > .streak { display: none; }
.home-recs .start-screen > .passport { margin-top: 38px; }

/* Hide original survival-hub-button and pvp-button in variant */
.home-recs #survival-hub-button { display: none; }
.home-recs #pvp-button { display: none; }

/* ---------------------------------------------------------------------------
   Stats (was injected by src/meta/stats.js).
   --------------------------------------------------------------------------- */
.stats-entry { min-height: 44px; margin-top: 10px; padding: 0 20px; border: 1px solid rgba(var(--rgb-gold),.4); border-radius: 999px; background: rgba(var(--rgb-gold),.1); color: #ffe0ae; font-size: var(--fs-body); font-weight: 750; cursor: pointer; touch-action: manipulation; }
.stats-entry:active { transform: scale(.98); }
.stats-screen { box-sizing: border-box; overflow: auto; padding: calc(env(safe-area-inset-top, 0px) + 18px) 14px calc(env(safe-area-inset-bottom, 0px) + 18px); background: rgba(2,4,9,.68); pointer-events: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.stats-card { position: relative; box-sizing: border-box; width: 100%; max-width: 440px; min-height: 100%; margin: auto; padding: 26px 18px 20px; border-radius: 24px; }
.stats-card h2 { margin: 0; color: var(--ink-hi); font-size: var(--fs-head); text-align: center; letter-spacing: -.02em; }
.stats-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.stat { box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 92px; padding: 14px 10px; border: 1px solid rgba(var(--rgb-line),.16); border-radius: 16px; background: rgba(var(--rgb-line),.06); text-align: center; }
.stat b { display: block; font-size: 30px; line-height: 1.05; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--gold); text-shadow: 0 0 22px rgba(var(--rgb-gold),.28); }
.stat span { display: block; margin-top: 5px; color: rgba(var(--rgb-muted),.62); font-size: var(--fs-micro); font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.stat.cool b { color: #67e8ff; text-shadow: 0 0 22px rgba(103,232,255,.28); }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.stats-grid .stat b { font-size: var(--fs-display); }
.stat small { display: block; margin-top: 4px; color: rgba(var(--rgb-muted),.42); font-size: var(--fs-micro); letter-spacing: .06em; text-transform: none; }
.stats-head { margin: 24px 0 10px; color: #77caff; font-size: var(--fs-caption); font-weight: 750; letter-spacing: .18em; text-transform: uppercase; }
.stats-hist-bars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; margin: 0; padding: 0; list-style: none; }
.stats-hist-bars li { display: grid; grid-template-rows: 96px 16px; min-width: 0; text-align: center; }
.stats-hist-count { position: absolute; right: 0; left: 0; color: var(--ink-hi); font-size: var(--fs-micro); font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }
.stats-hist-bar { position: relative; display: block; margin: 0 1px; border-bottom: 1px solid rgba(var(--rgb-line),.3); }
.stats-hist-bar::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 2px; background: rgba(var(--rgb-line),.5); content: ''; }
.stats-hist-fill { position: absolute; right: 0; bottom: 0; left: 0; min-height: 0; border-radius: 5px 5px 0 0; background: rgba(103,232,255,.55); transition: height .35s ease-out; }
.stats-hist-label { padding-top: 4px; color: rgba(var(--rgb-muted),.58); font-size: var(--fs-micro); font-variant-numeric: tabular-nums; }
.stats-best { margin: 16px 0 0; padding: 12px 14px; border: 1px solid rgba(var(--rgb-gold),.26); border-radius: 14px; background: rgba(var(--rgb-gold),.08); color: rgba(240,248,255,.86); font-size: var(--fs-body); line-height: 1.45; }
.stats-best b { color: var(--gold); }
.stats-note { margin: 16px 0 0; color: rgba(var(--rgb-muted),.42); font-size: var(--fs-caption); line-height: 1.5; text-align: center; }
body.game-stats #hud { opacity: 0; }
@media (max-height: 700px) {
  .stats-card { padding-top: 20px; }
  .stat b { font-size: 26px; }
  .stats-head { margin-top: 18px; }
}

/* ---------------------------------------------------------------------------
   Postcard component (was injected by src/meta/postcard-card.js).
   --------------------------------------------------------------------------- */
.pp-post { position: relative; min-width: 0; padding: 5px 5px 8px; border: 2px solid rgba(214,220,232,.16); border-radius: 4px; background: #1a1f2e; box-shadow: 0 8px 22px rgba(0,0,0,.45), 0 1px 0 rgba(255,255,255,.12) inset; transition: transform .16s ease-out, filter .16s ease-out; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.pp-post:active { transform: scale(.965); filter: brightness(.95); }
.pp-post:focus-visible { outline: 2px solid #67e8ff; outline-offset: 3px; }
.pp-post.pp-lifted { visibility: hidden; }
.pp-photo { position: relative; aspect-ratio: 4 / 3; border-radius: 2px; overflow: hidden; background: linear-gradient(135deg, #1b2c5a, #3b2a6e); }
.pp-photo::after { content: '🌍'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; opacity: .45; }
.pp-photo img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.pp-post[data-earn="seen"] { background: #151923; }
.pp-post[data-earn="seen"] .pp-photo img { filter: grayscale(1) contrast(.92) brightness(.82); }
.pp-post[data-earn="seen"] .pp-name { color: #8992a8; }
.pp-name { margin: 7px 2px 0; overflow: hidden; color: #eef2ff; font-size: var(--fs-body); font-weight: 800; line-height: 1.2; letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }
.pp-meta { min-height: 12px; margin: 4px 2px 0; color: #a8b0c3; font-size: var(--fs-micro); font-weight: 700; font-variant-numeric: tabular-nums; }
.pp-meta span { white-space: nowrap; }
/* Passport shelf cards retain the compact component but use the mailed-paper face. */
.pp-dex .pp-slot { overflow: hidden; padding: 0 0 6px; border-radius: 4px; background: var(--mail-paper); box-shadow: 0 2px 6px rgba(0,0,0,.4), inset 0 0 0 1px rgba(101,78,38,.18); }
.pp-dex .pp-slot.is-mystery::before { content: ''; display: block; height: 6px; background: repeating-linear-gradient(45deg, #a89e8c 0 9px, #e9e2d0 9px 18px, #8b93a3 18px 27px, #e9e2d0 27px 36px); opacity: .55; }
.pp-dex .pp-slot-photo { margin: 5px 5px 0; overflow: visible; border: 3px solid #fffdf6; border-radius: 0; background: #d9cdb2; box-shadow: 0 0 0 1px rgba(101,78,38,.22), 0 1px 3px rgba(101,78,38,.25), inset 0 0 8px rgba(90,70,30,.16); }
.pp-dex .pp-slot-name { margin: 6px 7px 0; color: var(--mail-ink); }
.pp-dex .pp-slot[data-earn="seen"] .pp-slot-name { color: #526071; }
.pp-dex .pp-slot.is-mystery .pp-slot-photo { border-color: #fffdf6; }
.pp-dex .pp-slot.is-mystery .pp-slot-name { color: rgba(34,53,92,.55); }
/* Tier frames (thumbnail tier review, 2026-11-03; pinpoint revised 2026-11-04): the stamp's 7px number cannot carry the tier at dex size, so the frame does. Near keeps the plain paper-white border; bullseye frames the photo in the pack's satin gold foil; pinpoint (Option B, Sean, 2026-11-04) turns the whole tile pale gold with a thicker foil frame, so it reads at a glance in the grid. Collected slots show no km stamp; the stamp remains only on seen, not-yet-collected slots. */
.pp-dex .pp-slot[data-earn="bullseye"] .pp-slot-photo, .pp-dex .pp-slot[data-earn="pinpoint"] .pp-slot-photo { border-image: linear-gradient(155deg, #efd38a, #b27c20 38%, #f4e2ac 62%, #96690f) 1; }
.pp-dex .pp-slot[data-earn="bullseye"] .pp-slot-photo { box-shadow: 0 0 0 1px rgba(146,102,32,.5), 0 1px 3px rgba(101,78,38,.25), inset 0 0 8px rgba(90,70,30,.16); }
.pp-dex .pp-slot[data-earn="pinpoint"] { background: linear-gradient(165deg, #f9ecc4, #eed086 75%); box-shadow: 0 2px 8px rgba(178,124,32,.45), inset 0 0 0 1px rgba(146,102,32,.5); }
.pp-dex .pp-slot[data-earn="pinpoint"] .pp-slot-photo { border-width: 4px; box-shadow: 0 0 0 1px rgba(146,102,32,.6), 0 1px 3px rgba(101,78,38,.3), inset 0 0 8px rgba(90,70,30,.16); }
.pp-dex .pp-slot[data-earn="pinpoint"] .pp-slot-name { color: #6b4d12; font-weight: 800; }
.pp-dex .pps-flag { inset: 4px; border: 1.5px dashed rgba(101,78,38,.4); background: rgba(44,74,124,.05); filter: drop-shadow(0 2px 4px rgba(0,0,0,.18)); }

/* ---------------------------------------------------------------------------
   Passport: home card, dex page, collections, postcard detail
   (was injected by src/meta/passport.js, four sheets in their original order).
   --------------------------------------------------------------------------- */
/* A plain scrim, not backdrop-filter: a blurred panel over the live WebGL canvas
   starves the software compositor (the stats overlay needed a frozen loop for the
   same reason) and the dots show through the tint anyway. */
.passport[hidden] { display: none; }
.pp-chunk[hidden] { display: none; }
.passport { position: relative; overflow: hidden; box-sizing: border-box; width: min(100%, 354px); max-width: calc(100vw - 32px); margin: 20px auto 0; padding: 0 0 11px; border: 0; border-radius: 19px; background: var(--mail-paper); box-shadow: 0 3px 10px rgba(0,0,0,.45), inset 0 0 0 1px rgba(101,78,38,.18); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.passport:active { transform: scale(.99); }
.passport:focus-visible { outline: 2px solid #67e8ff; outline-offset: 2px; }
.passport-count { margin: 11px 14px 0; color: rgba(52,72,96,.78); font-size: var(--fs-body); font-weight: 700; }
.passport-earned, .passport-streak { color: #b27c20; }
.passport-count b { color: #22355c; font-size: 27px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; text-shadow: none; }
.passport-stamps { display: flex; justify-content: flex-start; gap: 7px; margin: 11px 14px 0; }
.passport-stamps img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #fffdf6; border: 2px solid rgba(52,72,96,.35); }
.passport-stamps img[data-tier="gold"] { border-color: #b27c20; box-shadow: none; }
.passport-stamps img[data-tier="cyan"] { border-color: #34486a; }
.passport-stamps img[data-tier="dim"] { filter: saturate(.65) brightness(.7); }
.passport-xp[hidden] { display: none; }
.passport-xp { display: flex; box-sizing: border-box; align-items: center; min-height: 76px; gap: 8px; margin: 11px 14px 26px; padding: 7px 0 8px; border-top: 1px solid rgba(var(--rgb-line),.2); cursor: pointer; }
.passport-xp:focus-visible { outline: 2px solid #67e8ff; outline-offset: 2px; }
.passport-xp [data-passport="xp-bar"] { flex: 1; min-width: 0; }
.passport-xp .xp-bar-compact { margin: 0; padding: 0; border: 0; }
.passport-xp .xp-bar-seal { width: 60px; height: 60px; }
.passport-xp-chevron { flex: none; color: rgba(52,72,96,.8); font-size: 22px; font-weight: 800; line-height: 1; }

/* Recommended home variant: the card as a one-line strip at the mode grid's
   width, with the default card's padding and type. */
.home-recs .passport { box-sizing: border-box; width: min(100%, 354px); max-width: calc(100vw - 32px); }
.home-recs .passport-count { overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.home-recs .passport-stamps, .home-recs .passport-streak { display: none; }
@media (max-height: 700px) {
  .passport { margin-bottom: 18px; }
  .passport-count b { font-size: 23px; }
  .passport-stamps img { width: 34px; height: 34px; }
}

/* In the recs variant, hide the intro sentence (.how-to) since the passport
   strip replaces it at the bottom of the stack. */
.home-recs .start-screen .how-to { display: none; }

.pp-card [hidden] { display: none !important; }
.passport-entry { min-height: 44px; padding: 0 14px; border: 1px solid rgba(103,232,255,.4); border-radius: 999px; background: rgba(103,232,255,.09); color: #c9f6ff; font-size: var(--fs-body); font-weight: 750; cursor: pointer; touch-action: manipulation; }
.passport-entry:active { transform: scale(.98); }
.passport-entry:disabled { opacity: .4; }
.pp-card { --pp-toolbar-h: 44px; --pp-toolbar-top: 0px; --pp-header-h: 40px; position: relative; box-sizing: border-box; width: 100%; max-width: 440px; min-height: 100%; margin: auto; padding: 14px 14px 20px; border-radius: 24px; overflow-x: clip; } /* Keep clip: overflow:hidden breaks sticky descendants. */
[data-pp="shelf-view"] { --pp-toolbar-h: 52px; }
.pp-card h2 { margin: 0; color: var(--ink-hi); font-size: var(--fs-head); text-align: center; letter-spacing: -.02em; }
.pp-audit-banner { position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; flex-wrap: wrap; margin: 0 0 8px; padding: 5px 8px; border: 1px solid rgba(var(--rgb-gold),.45); border-radius: 999px; background: rgba(var(--rgb-gold),.1); color: var(--gold); font-size: var(--fs-micro); font-weight: 850; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.pp-audit-flags-button { min-height: 24px; padding: 1px 8px; border: 1px solid rgba(var(--rgb-gold),.55); border-radius: 999px; background: rgba(8,14,32,.45); color: #ffe29a; font: inherit; font-size: var(--fs-micro); font-weight: 850; cursor: pointer; text-transform: none; }
.pp-audit-flags-panel { flex: 1 0 100%; max-height: 220px; overflow: auto; padding: 8px 4px 2px; border-top: 1px solid rgba(var(--rgb-gold),.2); color: rgba(255,244,207,.8); font-size: var(--fs-caption); letter-spacing: normal; text-align: left; text-transform: none; }
.pp-audit-flags-panel ul { margin: 0; padding-left: 18px; }
.pp-audit-flags-panel li { margin: 3px 0; }
.pp-audit-flags-actions { display: flex; justify-content: flex-end; margin-bottom: 4px; }
.pp-audit-flags-actions button { padding: 3px 8px; border: 1px solid rgba(var(--rgb-gold),.4); border-radius: 999px; background: transparent; color: #ffe29a; font: inherit; font-size: var(--fs-micro); font-weight: 800; cursor: pointer; }
.pp-audit-flags-status { min-height: 1.2em; margin: 4px 0 0; color: rgba(255,244,207,.62); font-size: var(--fs-micro); text-align: center; }
/* Slim single-row header (Sean, 2026-10-22): title and counts share one line,
   the close × is absolutely positioned (.icon-close) so it never needs its
   own flex slot, and no Stats/Share pill lives here any more. */
.pp-header-row { position: sticky; top: var(--pp-toolbar-top); z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 8px; box-sizing: border-box; height: var(--pp-header-h); margin: 0 -14px; padding: 6px 54px 6px 14px; background: #0b1120; }
.pp-header-row.is-stuck { box-shadow: 0 1px rgba(var(--rgb-line),.14), 0 8px 18px rgba(0,0,0,.22); }
.pp-header-row.is-stuck::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: calc(env(safe-area-inset-top, 0px) + 18px); background: #0b1120; }
.pp-header-row h2 { flex: none; text-align: left !important; font-size: 19px !important; }
.pp-header-actions { display: flex; flex-shrink: 0; gap: 8px; }
.pp-share-icon { flex-shrink: 0; width: 44px; height: 44px; border: 1px solid rgba(var(--rgb-gold),.55); border-radius: 50%; background: linear-gradient(135deg, rgba(77,54,145,.95), rgba(25,47,101,.95)); color: #fff7dc; font-size: 18px; font-weight: 800; cursor: pointer; }
.pp-progress { margin: 8px 2px 0; }
.pp-count { flex: 1 1 auto; min-width: 0; margin: 0; color: rgba(234,246,255,.92); font-size: var(--fs-body); font-weight: 650; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pp-count-sub { color: rgba(var(--rgb-muted),.6); font-weight: 500; }
/* Two layers: visited as a pale track, earned as the bright gradient over it. */
.pp-bar { position: relative; height: 4px; border-radius: 8px; background: rgba(var(--rgb-line),.1); overflow: hidden; }
.pp-bar i { position: absolute; left: 0; top: 0; height: 100%; border-radius: 8px; transition: width .4s ease-out; }
.pp-bar .pp-bar-seen { background: rgba(var(--rgb-muted),.22); }
.pp-bar .pp-bar-earned { background: linear-gradient(90deg, #67e8ff, #c4a8ff 55%, var(--gold)); box-shadow: 0 0 12px rgba(var(--rgb-gold),.35); }
.pp-stick-sentinel { height: 1px; margin-top: 7px; }
.pp-toolbar { position: sticky; top: calc(var(--pp-toolbar-top) + var(--pp-header-h)); z-index: 3; display: flex; align-items: center; gap: 6px; box-sizing: border-box; height: var(--pp-toolbar-h); margin: -1px -14px 0; padding: 4px 14px; background: #0b1120; }
.pp-toolbar.is-stuck { box-shadow: 0 1px rgba(var(--rgb-line),.14), 0 8px 18px rgba(0,0,0,.22); }
.pp-filters-btn { flex: none; min-height: 36px; padding: 0 10px; border: 1px solid rgba(196,168,255,.22); border-radius: 999px; background: rgba(150,110,255,.07); color: rgba(var(--rgb-muted),.7); font: inherit; font-size: var(--fs-caption); font-weight: 800; cursor: pointer; touch-action: manipulation; white-space: nowrap; }
.pp-filters-btn[aria-expanded="true"], .pp-filters-btn.has-active { border-color: #67e8ff; background: rgba(103,232,255,.14); color: #c9f6ff; }
.pp-filters-pill { display: grid; flex: 1 1 auto; align-content: center; justify-items: start; gap: 1px; min-width: 0; min-height: 44px; padding: 0 12px; border-color: rgba(var(--rgb-line),.16); border-radius: 12px; background: rgba(var(--rgb-line),.04); color: rgba(234,246,255,.85); font-size: var(--fs-body); font-weight: 650; text-align: left; }
.pp-filters-summary { display: block; max-width: 100%; min-width: 0; overflow: hidden; color: rgba(var(--rgb-muted),.55); font-size: var(--fs-caption); font-weight: 500; text-overflow: ellipsis; }
.pp-filters-summary::after { content: ' ▾'; }
.pp-toolbar:not(.is-stuck) .pp-filters-pill ~ .pp-toolbar-close { display: none; }
.pp-badge { margin-left: 3px; color: var(--gold); font-size: var(--fs-caption); }
.pp-toolbar-close { display: grid; flex: none; place-items: center; width: 32px; height: 32px; margin-left: auto; padding: 0; border: 0; border-radius: 50%; background: rgba(var(--rgb-line),.08); color: #e8f3ff; font: inherit; font-size: 20px; line-height: 1; opacity: 0; pointer-events: none; transition: opacity .15s ease-out; }
.pp-toolbar.is-stuck .pp-toolbar-close { opacity: 1; pointer-events: auto; }
.pp-filter-label { color: rgba(var(--rgb-muted),.5); font-size: var(--fs-micro); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.pp-status { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.pp-status.pp-kind { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pp-status button { min-height: 40px; padding: 0 2px; border: 1px solid rgba(196,168,255,.22); border-radius: 999px; background: rgba(150,110,255,.07); color: rgba(var(--rgb-muted),.7); font: inherit; font-size: var(--fs-caption); font-weight: 750; cursor: pointer; touch-action: manipulation; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-status button[aria-pressed="true"] { border-color: #67e8ff; background: rgba(103,232,255,.14); color: #c9f6ff; }
.pp-filters { position: absolute; z-index: 4; top: 100%; left: 14px; right: 14px; display: grid; gap: 7px; padding: 12px 12px 14px; border: 1px solid rgba(var(--rgb-line),.18); border-radius: 14px; background: #111a30; box-shadow: 0 14px 32px rgba(0,0,0,.48); opacity: 0; visibility: hidden; transform: translateY(-6px); pointer-events: none; transition: opacity .12s ease-out, transform .12s ease-out, visibility 0s linear .12s; }
.pp-filters.is-open { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; transition-duration: .16s; transition-delay: 0s; }
.pp-filters select { appearance: none; -webkit-appearance: none; min-height: 40px; width: 100%; padding: 0 30px 0 12px; border: 1px solid rgba(196,168,255,.35); border-radius: 10px; background: rgba(150,110,255,.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23d9ccff' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 10px center; background-position: right 12px center; color: #ece4ff; font: inherit; font-size: var(--fs-small); font-weight: 700; cursor: pointer; }
.pp-filters select option { background: #0b1430; color: #ece4ff; }
.pp-shown { margin: 3px 0 0; color: rgba(var(--rgb-muted),.45); font-size: var(--fs-caption); text-align: center; }
.pp-empty { margin: 18px 0; color: rgba(var(--rgb-muted),.55); font-size: var(--fs-small); text-align: center; }
/* Dex grid: every slot renders once per open; filters toggle [hidden] instead
   of rebuilding, so only a sort change rebuilds the DOM (see renderPassportDex). */
.pp-dex-wrap { margin-top: 0; }
.pp-group { content-visibility: auto; contain-intrinsic-size: auto 900px; scroll-margin-top: var(--pp-toolbar-h); }
.pp-group-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; margin: 0; padding: 7px 4px; background: #0b1120; color: rgba(var(--rgb-muted),.6); font-size: var(--fs-caption); font-weight: 800; letter-spacing: .04em; cursor: pointer; touch-action: manipulation; }
[data-pp="shelf-view"] .pp-group-head { min-height: 48px; box-sizing: border-box; }
.pp-group-head:focus-visible { outline: 2px solid #67e8ff; outline-offset: 2px; }
.pp-group-head-text { display: flex; flex: 1 1 auto; align-items: baseline; gap: 6px; min-width: 0; }
.pp-group-head-text::after { content: ''; flex: none; align-self: center; width: 6px; height: 6px; margin-left: 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .15s ease-out; }
.pp-group-head[aria-expanded="true"] .pp-group-head-text::after { transform: rotate(225deg); }
/* Slim single-line accordion row: name left, "n of N collected" + chevron
   right, hairline progress bar wraps full-width under the row (mockup C).
   Shared by every grouping (continent/country). */
.pp-group-head.is-accordion { margin: 18px 0 0; padding: 0 0 8px; border: 0; border-radius: 0; background: transparent; color: rgba(var(--rgb-muted),.7); font-size: var(--fs-small); font-weight: 600; letter-spacing: normal; }
.pp-group-head.is-accordion .pp-group-head-text b { margin-right: auto; color: #eef2ff; font-size: var(--fs-base); font-weight: 800; }
.pp-group-sub { flex: none; color: rgba(var(--rgb-muted),.6); font-weight: 500; }
.pp-group-bar { flex: 0 0 100%; width: auto; height: 2px; margin-top: 8px; }
.pp-group-flag { flex: none; width: 20px; font-size: var(--fs-base); line-height: 1; text-align: center; }
/* Collapsed rows are short: skip content-visibility's 900px placeholder. */
.pp-group:has(> .is-accordion[aria-expanded="false"]) { content-visibility: visible; contain-intrinsic-size: none; }
.pp-chunk { content-visibility: auto; contain-intrinsic-size: auto 900px; }
.pp-dex { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px 5px; margin: 0; padding: 4px 3px; list-style: none; }
.pp-slot { position: relative; min-width: 0; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.pp-slot-photo { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 2px solid rgba(214,220,232,.16); background: linear-gradient(135deg, #1b2c5a, #3b2a6e); }
.pp-slot-photo img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.pp-audit-flag { position: absolute; z-index: 4; left: 3px; top: 3px; display: grid; place-items: center; width: 27px; height: 27px; padding: 0; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; background: rgba(8,14,32,.84); font-size: 14px; line-height: 1; cursor: pointer; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.pp-audit-flag:active { transform: scale(.92); }
.pp-audit-flag-dot { position: absolute; right: -2px; bottom: -2px; display: grid; place-items: center; width: 13px; height: 13px; border: 1px solid rgba(8,14,32,.9); border-radius: 50%; background: transparent; font-size: 9px; line-height: 1; }
.pp-audit-flag[data-flag="image"] .pp-audit-flag-dot { background: #ef4444; }
.pp-audit-flag[data-flag="city"] .pp-audit-flag-dot { background: #facc15; }
.pp-slot-score { position: absolute; z-index: 2; top: 5px; right: 5px; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 3px 6px; border: 1px solid transparent; border-radius: 999px; background: rgba(8,14,32,.82); color: #e6f0ff; font-size: 9px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.pp-slot-score[data-tier="bullseye"] { border: 1.5px solid var(--gold); background: rgba(8,14,32,.88); color: var(--gold); }
.pp-slot-score[data-tier="pinpoint"] { background: #e9b23c; color: #2b1d00; }
.pp-slot-name { margin: 4px 1px 0; overflow: hidden; color: #eef2ff; font-size: 8.5px; font-weight: 750; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.pp-slot[data-earn="seen"] .pp-slot-photo img { filter: grayscale(1) contrast(.92) brightness(.82); }
.pp-slot[data-earn="seen"] .pp-slot-name { color: #8992a8; }
/* Mystery cards keep the same neutral frame used by visited cards. */
.pp-slot.is-mystery { cursor: default; }
.pp-slot.is-mystery .pp-slot-photo { border-color: rgba(214,220,232,.16); }
.pp-slot.is-mystery .pp-slot-name { color: rgba(214,220,232,.4); letter-spacing: .1em; text-align: center; }
.pp-pack-progress { margin: 7px 40px 12px 0; color: rgba(var(--rgb-muted),.68); font-size: var(--fs-small); font-weight: 700; font-variant-numeric: tabular-nums; }
.pp-pack-section { margin-top: 8px; border: 1px solid rgba(var(--rgb-line),.12); border-radius: 12px; overflow: hidden; background: rgba(var(--rgb-line),.025); }
@font-face { font-family: 'Oswald'; src: url('../../assets/oswald-bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Luckiest Guy'; src: url('../../assets/luckiest-guy.woff2') format('woff2'); font-weight: 400; font-display: swap; }
.logotype { text-transform: uppercase; font-family: 'Luckiest Guy', 'Arial Black', sans-serif; color: #F6EDD8; letter-spacing: .01em; -webkit-text-stroke: 1.6px #1E4E9C; text-shadow: 0 2px 0 #1E4E9C, 0 4px 10px rgba(0,0,0,.45); }
#pack-heading.logotype, #pp-title.logotype, #survival-result-title.logotype { color: #F6EDD8; }
#pack-heading.logotype { font-size: 32px; }
#pp-title.logotype { font-size: 24px !important; -webkit-text-stroke-width: 1.1px; text-shadow: 0 2px 0 #1E4E9C, 0 3px 8px rgba(0,0,0,.45); }
.pp-pack-head { display: grid; grid-template-columns: 4px minmax(0,1fr) auto 12px; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 7px 10px 10px 0; border: 0; background: var(--mail-paper); color: #22355c; font: inherit; text-align: left; cursor: pointer; touch-action: manipulation; position: relative; }
.pp-pack-head-mail { grid-template-columns: minmax(0,1fr) auto 12px; padding-left: 14px; }
.pp-pack-bar { width: 4px; align-self: stretch; }
.pp-pack-track { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(52,72,96,.12); }
.pp-pack-fill { display: block; height: 100%; }
.pp-pack-title { overflow: hidden; font-family: 'Luckiest Guy', 'Arial Black', sans-serif; font-size: 17px; font-weight: 400; letter-spacing: .02em; text-overflow: ellipsis; white-space: nowrap; }
.pp-pack-count { color: rgba(52,72,96,.72); font-size: var(--fs-small); font-weight: 750; font-variant-numeric: tabular-nums; }
.pp-pack-chevron { width: 7px; height: 7px; margin-top: -4px; border-right: 2px solid rgba(52,72,96,.6); border-bottom: 2px solid rgba(52,72,96,.6); transform: rotate(45deg); transition: transform .15s ease-out; }
.pp-pack-head[aria-expanded="true"] .pp-pack-chevron { margin-top: 4px; transform: rotate(225deg); }
.pp-pack-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; padding: 12px 9px 14px; }
.pp-pack-grid .pp-slot-photo { aspect-ratio: 3 / 2; }
/* Pack placement (src/meta/pack-placement.js): a fixed layer over the dex
   takes every tap. The flying card is the dex slot itself, in a list that
   carries the dex classes, placed by viewport transforms from its top-left.
   The Skip button shares the pack's gold-on-dark button rule. */
.pp-place-layer { position: fixed; inset: 0; z-index: var(--z-modal); touch-action: none; cursor: pointer; }
.pp-place-flight { position: absolute; inset: 0; display: block; margin: 0; padding: 0; pointer-events: none; }
.pp-place-flight .pp-place-card { position: absolute; top: 0; left: 0; margin: 0; transform-origin: 0 0; box-shadow: 0 14px 30px rgba(0,0,0,.55), 0 0 0 1px rgba(var(--rgb-gold),.5), inset 0 0 0 1px rgba(101,78,38,.18); opacity: 0; will-change: transform; }
.pp-dex .pp-place-target { box-sizing: border-box; outline: 2px solid rgba(var(--rgb-gold),.9); outline-offset: 2px; }
.pp-place-glint { position: absolute; inset: 0; z-index: 3; background: linear-gradient(105deg, transparent 30%, rgba(255,240,196,.75) 48%, rgba(255,255,255,.9) 50%, rgba(255,240,196,.75) 52%, transparent 70%); mix-blend-mode: screen; pointer-events: none; transform: translateX(-110%); }
.pp-place-skip { position: absolute; right: 14px; bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); padding: 9px 16px; border-radius: 999px; font-size: var(--fs-body); font-weight: 800; touch-action: manipulation; }
.pp-unvisited { cursor: pointer; }
.pp-unvisited .pp-slot-photo { display: grid; place-items: center; border: 1px dashed rgba(101,78,38,.4); background: repeating-linear-gradient(135deg, rgba(116,104,84,.09) 0 7px, rgba(145,132,106,.07) 7px 14px), #f3ead7; }
.pp-unvisited-number { color: rgba(52,72,96,.48); font-size: var(--fs-head); font-weight: 800; letter-spacing: .05em; font-variant-numeric: tabular-nums; }
.pp-unvisited-note { display: none; margin: 6px 1px 0; color: rgba(52,72,96,.66); font-size: 8.5px; font-weight: 700; line-height: 1.25; text-align: center; }
.pp-unvisited.is-revealed { margin: -4px; padding: 4px; border-radius: 8px; background: rgba(101,78,38,.14); }
.pp-unvisited.is-revealed .pp-unvisited-note { display: block; }
body.game-passport #hud { opacity: 0; }
@media (max-width: 560px) {
  .passport-screen { width: 100dvw; height: 100dvh; overflow-y: auto; padding: 0; background: #0b1120; }
  .passport-screen .pp-card { --pp-toolbar-top: env(safe-area-inset-top, 0px); }
  .passport-screen .pp-card .icon-close { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 6px); right: 6px; }
  .passport-screen .pp-card { width: 100dvw; max-width: none; min-height: 100dvh; margin: 0; padding: calc(env(safe-area-inset-top, 0px) + 14px) 14px calc(env(safe-area-inset-bottom, 0px) + 20px); border: 0; border-radius: 0; background: #0b1120; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (max-width: 360px) {
  .pp-dex { gap: 9px 5px; }
}
@media (prefers-reduced-motion: reduce) { .pp-filters { transform: none; } }

.collections-screen { box-sizing: border-box; overflow: auto; padding: calc(env(safe-area-inset-top, 0px) + 18px) 14px calc(env(safe-area-inset-bottom, 0px) + 30px); background: #03060f; color: #e6e8ee; pointer-events: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.collections-shell { width: 100%; max-width: 390px; margin: auto; }
.collections-nav { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-bottom: 10px; }
.collections-back { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; border: 0; background: none; color: rgba(214,220,232,.68); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.collections-sort { color: rgba(214,220,232,.42); font-size: var(--fs-caption); font-weight: 650; }
.collections-sort-control { position: relative; display: inline-flex; align-items: center; gap: 3px; }
.collections-sort-control::after { content: ''; width: 5px; height: 5px; margin: -3px 2px 0 1px; border-right: 1px solid rgba(214,220,232,.48); border-bottom: 1px solid rgba(214,220,232,.48); transform: rotate(45deg); pointer-events: none; }
.collections-sort-select { max-width: 112px; margin: 0; padding: 7px 0; border: 0; outline: 0; appearance: none; -webkit-appearance: none; background: transparent; color: rgba(214,220,232,.62); font: inherit; font-weight: 700; text-overflow: ellipsis; cursor: pointer; }
.collections-sort-select:focus-visible { border-radius: 5px; box-shadow: 0 0 0 2px rgba(210,174,98,.45); }
.collections-sort-select option { background: #111726; color: #d6dce8; }
.collections-eyebrow { margin: 0 0 6px; color: rgba(214,220,232,.55); font-size: var(--fs-caption); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.collections-screen h2 { margin: 0; color: #f4f5f8; font-size: 27px; line-height: 1.15; letter-spacing: -.025em; }
.collections-lede { margin: 8px 0 18px; color: rgba(214,220,232,.55); font-size: 14px; line-height: 1.5; }
.collections-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-bottom: 18px; }
.collections-stat { padding: 11px 9px 10px; border: 1px solid rgba(214,220,232,.08); border-radius: 12px; background: #0c111c; }
.collections-stat b { display: block; color: #e6e8ee; font-size: 19px; line-height: 1; font-variant-numeric: tabular-nums; }
.collections-stat.gold b { color: #d2ae62; text-shadow: 0 0 12px rgba(210,174,98,.35); }
.collections-stat span { display: block; margin-top: 4px; color: rgba(214,220,232,.62); font-size: var(--fs-micro); font-weight: 750; letter-spacing: .03em; text-transform: uppercase; }
.collection-sets { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.collection-set { position: relative; display: flex; min-width: 0; flex-direction: column; padding: 12px; border: 1px solid rgba(214,220,232,.08); border-radius: 14px; background: linear-gradient(180deg,#111726,#0b0f19); color: inherit; text-align: left; cursor: pointer; touch-action: manipulation; }
.collection-set:active { transform: scale(.97); }
.collection-set.done { border-color: rgba(210,174,98,.45); background: linear-gradient(180deg,#1a1810,#0e1018 70%); box-shadow: 0 0 18px rgba(210,174,98,.12); }
.collection-set-top { display: flex; align-items: center; justify-content: space-between; }
.collection-icon { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(214,220,232,.1); border-radius: 10px; background: #151b2a; font-size: 18px; }
.collection-count { color: rgba(214,220,232,.55); font-size: var(--fs-small); font-weight: 800; }
.collection-set.done .collection-count { color: #d2ae62; }
.collection-name { min-height: 2.4em; margin-top: 10px; color: #e6e8ee; font-size: 14px; font-weight: 750; line-height: 1.2; }
.collection-sub { margin-top: 2px; color: rgba(214,220,232,.32); font-size: var(--fs-caption); font-weight: 650; }
.collection-bar { height: 3px; margin: 10px 0; border-radius: 3px; overflow: hidden; background: rgba(214,220,232,.08); }
.collection-bar i { display: block; height: 100%; border-radius: inherit; background: rgba(214,220,232,.55); }
.collection-set.done .collection-bar i { background: #d2ae62; box-shadow: 0 0 8px rgba(210,174,98,.6); }
.collection-thumbs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 5px; margin-top: auto; }
.collection-thumb { position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid rgba(214,220,232,.14); border-radius: 6px; background: #0a0e17; }
.collection-thumb img { width: 100%; height: 100%; object-fit: cover; }
.collection-detail-head { display: flex; align-items: center; gap: 12px; }
.collection-detail-head .collection-icon { flex: none; width: 48px; height: 48px; border-radius: 14px; font-size: var(--fs-display); }
.collection-detail-head p { margin: 4px 0 0; color: rgba(214,220,232,.55); font-size: var(--fs-body); }
.collection-progress { margin: 18px 0; padding: 14px; border: 1px solid rgba(214,220,232,.08); border-radius: 14px; background: #0c111c; }
.collection-progress-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.collection-progress-top b { font-size: 22px; font-variant-numeric: tabular-nums; }
.collection-progress-top span { color: rgba(214,220,232,.4); font-size: var(--fs-small); font-weight: 650; }
.collection-segments { display: flex; gap: 3px; }
.collection-segments i { flex: 1; height: 6px; border-radius: 3px; background: rgba(214,220,232,.08); }
.collection-segments i.earned { background: #d2ae62; box-shadow: 0 0 5px rgba(210,174,98,.45); }
.collection-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px 10px; margin: 0; padding: 0; list-style: none; }
.collection-card { position: relative; min-width: 0; padding: 5px 5px 7px; border: 2px solid rgba(214,220,232,.16); border-radius: 9px; background: #1a1f2e; }
.collection-card .photo { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 5px; background: #0d111b; }
.collection-card img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.collection-card-name { min-height: 2.3em; margin: 6px 1px 0; display: grid; place-items: center; color: #e6e8ee; font-size: var(--fs-micro); font-weight: 750; line-height: 1.15; text-align: center; }
.collection-card.unearned .collection-card-name { color: rgba(214,220,232,.4); }
.collection-card-meta { margin: 3px 0 0; color: rgba(214,220,232,.62); font-size: var(--fs-micro); font-weight: 750; text-align: center; text-transform: uppercase; }
.collection-complete { margin: 18px 0; padding: 14px; border: 1px solid rgba(210,174,98,.5); border-radius: 14px; background: linear-gradient(135deg,#241f12,#0e111a); color: #d2ae62; font-size: var(--fs-body); font-weight: 800; text-align: center; box-shadow: 0 0 20px rgba(210,174,98,.12); }
body.game-collections #hud { opacity: 0; }
@media (max-width:360px) { .collection-sets { gap: 8px; } .collection-set { padding: 10px; } .collection-grid { gap: 12px 8px; } }

.ppd-scrim { position: fixed; inset: 0; background: rgba(2,4,9,.74); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.ppd-card { position: relative; touch-action: pan-y; box-sizing: border-box; width: 100%; max-width: 380px; margin: auto; color: var(--mail-ink); transform-origin: 0 0; }
/* The postcard itself: landscape 3:2, photo print on the front, divided mail back. */
.ppd-stage { position: relative; }
.ppd-flip { position: relative; display: block; width: 100%; aspect-ratio: 3 / 2; -webkit-perspective: 1200px; perspective: 1200px; cursor: pointer; outline: none; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.ppd-flip-inner { position: absolute; inset: 0; -webkit-transform-style: preserve-3d; transform-style: preserve-3d; transition: -webkit-transform .6s cubic-bezier(.4,.2,.2,1), transform .6s cubic-bezier(.4,.2,.2,1); }
.ppd-flip.is-flipped .ppd-flip-inner { -webkit-transform: rotateY(180deg); transform: rotateY(180deg); }
.ppd-face { position: absolute; inset: 0; overflow: hidden; border-radius: 6px; -webkit-backface-visibility: hidden; backface-visibility: hidden; box-shadow: 0 24px 70px rgba(0,0,0,.72); transition: visibility 0s linear .191s; }
.ppd-face-front { visibility: visible; -webkit-transform: rotateY(0deg); transform: rotateY(0deg); }
.ppd-flip.is-flipped .ppd-face-front { visibility: hidden; }
.ppd-flip.is-flipped .ppd-face-back { visibility: visible; }
.ppd-flip:focus-visible .ppd-face { outline: 2px solid #67e8ff; outline-offset: 3px; }
.ppd-face-front .pp-photo { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.ppd-face-front .pp-photo::after { font-size: 44px; }
/* Tier frames on the postcard front (Option A, Sean, 2026-11-04): the detail
   front speaks the same language as the dex thumbnails. Bullseye frames the
   photo in the satin gold foil; pinpoint mats the photo on the pale gold card
   stock with the thicker foil frame, and the caption and flip hint move in
   with the photo. Near and seen stay plain. */
.ppd-card[data-earn="bullseye"] .ppd-face-front .pp-photo { box-sizing: border-box; border: 5px solid transparent; border-image: linear-gradient(155deg, #efd38a, #b27c20 38%, #f4e2ac 62%, #96690f) 1; }
.ppd-card[data-earn="pinpoint"] .ppd-face-front { background: linear-gradient(165deg, #f9ecc4, #eed086 75%); }
.ppd-card[data-earn="pinpoint"] .ppd-face-front .pp-photo { inset: 11px; box-sizing: border-box; border: 4px solid transparent; border-image: linear-gradient(155deg, #efd38a, #b27c20 38%, #f4e2ac 62%, #96690f) 1; box-shadow: 0 0 0 1px rgba(146,102,32,.6), inset 0 0 8px rgba(90,70,30,.16); }
.ppd-card[data-earn="pinpoint"] .ppd-caption { right: 19px; bottom: 19px; }
.ppd-card[data-earn="pinpoint"] .ppd-flip-hint { top: 19px; left: 19px; }
.ppd-card[data-earn="seen"] .pp-photo img, .ppd-card[data-earn="seen"] .pc-stamp img { filter: grayscale(1) contrast(.92) brightness(.82); }
.ppd-caption { position: absolute; z-index: 2; right: 8px; bottom: 8px; max-width: calc(100% - 16px); box-sizing: border-box; padding: 4px 9px 5px; border-radius: 2px; background: rgba(250,243,225,.92); box-shadow: 0 1px 4px rgba(0,0,0,.3); text-align: right; }
.ppd-caption h3, .ppd-caption p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ppd-caption p { margin-top: 1px; }
.ppd-caption p[hidden] { display: none; }
.ppd-face-back { visibility: hidden; -webkit-transform: rotateY(180deg); transform: rotateY(180deg); }
.ppd-stats { grid-column: 1 / span 3; grid-row: 2; display: flex; justify-content: center; gap: 8px; margin: 0; padding: 7px 2px 9px; border-top: 1px dashed rgba(34,53,92,.3); color: var(--mail-ink-2); font-size: var(--fs-micro); font-weight: 700; }
.ppd-flip-hint { position: absolute; z-index: 2; top: 8px; left: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(2,4,9,.5); color: rgba(255,253,246,.88); font-size: var(--fs-micro); font-weight: 750; letter-spacing: .02em; pointer-events: none; }
.ppd-history { display: grid; gap: 3px; margin-top: auto; padding: 6px 0 8px; color: rgba(101,78,38,.85); font-size: 8.5px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.ppd-history-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.ppd-history-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ppd-history-row strong { flex: none; color: var(--mail-ink); font-weight: 750; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.ppd-history[hidden] { display: none; }
.ppd-stats { align-items: baseline; }
.ppd-closest-label { color: rgba(101,78,38,.85); font-size: 8.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.ppd-closest-num { font-family: 'Oswald', 'Arial Narrow', sans-serif; font-size: 19px; font-weight: 700; letter-spacing: .02em; color: var(--mail-ink); font-variant-numeric: tabular-nums; }
.ppd-stats[data-tier="bullseye"] .ppd-closest-num, .ppd-stats[data-tier="pinpoint"] .ppd-closest-num { color: #b27c20; }
.ppd-stats b { color: var(--mail-ink); font-weight: 800; }
.ppd-stat-num { font-variant-numeric: tabular-nums; }
.ppd-uncollected { color: var(--mail-ink-2); font-size: var(--fs-micro); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
@media (prefers-reduced-motion: reduce) {
  .ppd-flip-inner { transition: none; }
  .ppd-flip.is-flipped .ppd-flip-inner { -webkit-transform: none; transform: none; }
  .ppd-face { transition: none; }
  .ppd-face-back { -webkit-transform: none; transform: none; opacity: 0; }
  .ppd-flip.is-flipped .ppd-face-back { opacity: 1; }
  .ppd-flip.is-flipped .ppd-face-front { opacity: 0; }
}
.ppd-nav::before { content: '×'; display: grid; place-items: center; width: 32px; height: 32px; margin: auto; border-radius: 50%; background: rgba(44,74,124,.85); color: #fffdf6; font-size: 22px; line-height: 1; }
/* Previous and next: the close button's circle, quieter, centred on the postcard edges. */
.ppd-nav { position: absolute; z-index: 3; top: 50%; width: 44px; height: 44px; margin-top: -22px; padding: 0; border: 0; background: none; cursor: pointer; opacity: .55; touch-action: manipulation; }
.ppd-nav[data-dir="-1"] { left: 0; }
.ppd-nav[data-dir="1"] { right: 0; }
.ppd-nav[data-dir="-1"]::before { content: '‹'; padding-bottom: 3px; box-sizing: border-box; }
.ppd-nav[data-dir="1"]::before { content: '›'; padding-bottom: 3px; box-sizing: border-box; }
.ppd-nav.is-end { opacity: .2; }
.ppd-nav[hidden] { display: none; }
.ppd-pos { position: absolute; top: 100%; left: 0; right: 0; margin: 0; padding-top: 7px; color: #7a5f36; font-size: var(--fs-micro); font-weight: 800; letter-spacing: .17em; text-transform: uppercase; font-variant-numeric: tabular-nums; text-align: center; }
.ppd-pos[hidden] { display: none; }
.ppd-hint { position: relative; margin: 12px 0 0; color: rgba(255,253,246,.72); font-size: var(--fs-small); font-weight: 700; text-align: center; }
.ppd-hint[hidden] { display: none; }
.ppd-share { position: relative; display: block; width: 100%; min-height: 45px; margin: 13px 0 0; padding: 0 16px; border: 1px solid #2c4a7c; border-radius: 4px; background: #fffdf6; color: #22355c; font-size: var(--fs-caption); font-weight: 900; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; touch-action: manipulation; }
.ppd-share:active { transform: scale(.98); }
.ppd-share:focus-visible { outline: 2px solid #67e8ff; outline-offset: 2px; }
.ppd-share[hidden] { display: none; }

/* ---------------------------------------------------------------------------
   Results review (was injected by src/modes/daily-game.js).
   --------------------------------------------------------------------------- */
.results-title { margin: 2px 48px 5px; font-family: 'Luckiest Guy', 'Arial Black', sans-serif; color: #F6EDD8; font-size: 17px; letter-spacing: .05em; text-align: center; text-transform: uppercase; -webkit-text-stroke: 1px #1E4E9C; text-shadow: 0 2px 0 #1E4E9C, 0 3px 8px rgba(0,0,0,.45); }
.results-card .result-score { display: flex; align-items: baseline; justify-content: center; gap: 5px; margin: 0 0 4px; }
.results-card .result-score b { font-family: 'Luckiest Guy', 'Arial Black', sans-serif; color: #F6EDD8; font-size: clamp(42px, 14vw, 58px); line-height: 1; letter-spacing: .01em; -webkit-text-stroke: 1.6px #1E4E9C; text-shadow: 0 3px 0 #1E4E9C, 0 6px 14px rgba(0,0,0,.45); }
.results-card .result-score span { color: rgba(var(--rgb-mist),.58); font-size: 14px; font-weight: 700; }
.results-card .round-breakdown { margin-top: 10px; }
.results-card .round-breakdown h2 { display: none; }
#results-breakdown li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; min-width: 0; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(173,216,255,.11); font-size: var(--fs-base); }
#results-breakdown li > b { color: rgba(var(--rgb-mist),.58); font-size: var(--fs-body); }
#results-breakdown .place { min-width: 0; overflow: visible; color: rgba(225,240,255,.92); font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; white-space: normal; }
#results-breakdown .result-metrics { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; min-width: 62px; white-space: nowrap; }
#results-breakdown .points { color: var(--gold); font-size: var(--fs-base); font-weight: 850; line-height: 1.1; }
#results-breakdown .distance { color: rgba(var(--rgb-muted),.58); font-size: var(--fs-caption); font-weight: 600; }
.results-globe { display: block; margin: 0 auto; }
.review-screen { pointer-events: none; }
.review-bar { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 14px); left: 14px; right: 14px; box-sizing: border-box; display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 16px; border-radius: 18px; pointer-events: auto; }
.review-bar .review-title { flex: 1; min-width: 0; }
.review-bar .eyebrow { margin: 0 0 3px; }
.review-hint { margin: 0; overflow: hidden; color: rgba(var(--rgb-muted),.62); font-size: var(--fs-small); text-overflow: ellipsis; white-space: nowrap; }
.review-pill { min-height: 40px; padding: 0 14px; border: 1px solid rgba(var(--rgb-line),.28); border-radius: 999px; background: rgba(236,247,255,.08); color: var(--ink-btn); font-size: var(--fs-body); font-weight: 700; white-space: nowrap; cursor: pointer; touch-action: manipulation; }
/* The recap card leads with the round's photo as a header band carrying the
   round tag, the place name and the round navigation; the score shows once
   (no x/1000 base, a holdover from the removed multipliers). */
.recap-card { padding: 0 14px 13px; overflow: hidden; }
.recap-band { position: relative; height: 110px; margin: 0 -14px 10px; transition: height .32s cubic-bezier(.2,.9,.25,1); }
.recap-card.expanded .recap-band { height: 254px; }
.recap-band .score-line { position: absolute; left: 14px; right: 14px; bottom: 10px; }
.recap-band .score-line div { text-shadow: 0 1px 8px rgba(0,0,0,.55); }
.recap-band .score-line small { color: rgba(220,238,255,.82); }
.recap-band .score-line strong { text-shadow: 0 1px 8px rgba(0,0,0,.55); }
/* The expand affordance is a slim grip centered on the band's bottom edge;
   the band itself is tappable too. The corner next to the score is the
   score's alone (Sean, 2026-11-09). */
.recap-expand { position: absolute; left: 50%; bottom: 1px; transform: translateX(-50%); z-index: 2; display: grid; place-items: center; width: 56px; height: 17px; padding: 0; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
.recap-grip-bar { display: block; width: 34px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.5); transition: background .2s; }
.recap-card.expanded .recap-grip-bar { background: rgba(255,255,255,.9); }
.recap-card.expanded .recap-fact { display: block; -webkit-line-clamp: unset; }
.recap-thumb { position: absolute; inset: 0; display: block; width: 100%; height: 100%; margin: 0; object-fit: cover; object-position: center 20%; }
.recap-thumb[hidden] { display: none; }
.recap-band-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,8,20,.08), rgba(3,8,20,.70)); pointer-events: none; }
.recap-head { position: absolute; left: 14px; right: 14px; bottom: 52px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.recap-tag { margin: 0 0 4px; color: rgba(220,238,255,.85); font-size: var(--fs-caption); font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.recap-head h3 { margin: 0; color: var(--ink); font-size: 18px; line-height: 1.2; letter-spacing: -.02em; text-shadow: 0 1px 8px rgba(0,0,0,.45); }
.recap-nav { display: flex; align-items: center; gap: 6px; flex: none; }
.recap-nav .pager-arrow { width: 32px; height: 32px; font-size: 18px; background: rgba(3,8,20,.45); border-color: rgba(255,255,255,.25); color: #fff; }
.recap-nav .pager-arrow:disabled { display: none; }
.recap-nav .icon-close { position: relative; top: auto; right: auto; width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.25); background: rgba(3,8,20,.45); color: #fff; font-size: 20px; }
.recap-fact { display: -webkit-box; margin: 9px 0 2px; overflow: hidden; color: rgba(224,240,255,.8); font-size: var(--fs-body); line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pager-arrow { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid rgba(var(--rgb-line),.28); border-radius: 50%; background: rgba(236,247,255,.08); color: var(--ink-btn); font-size: 20px; line-height: 1; cursor: pointer; touch-action: manipulation; }
.pager-arrow:disabled { opacity: .35; cursor: default; }
body.game-review #hud { opacity: 0; }
/* Friends on the Daily: one compact row of friends' pins on the reveal sheet
   (under the peek bar's score line) and on the recap card. Chips are the
   shared review pill, sized down for the row. */
.friends-strip { position: relative; padding: 0 14px 12px; animation: friends-in .28s ease-out; }
.recap-card .friends-strip { padding: 10px 0 0; }
.friends-board { margin-top: 12px; border-top: 1px solid rgba(173,216,255,.12); padding-top: 10px; }
.friends-board-title { margin: 0 0 6px; color: rgba(var(--rgb-mist),.58); font-size: var(--fs-caption); font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.friend-board-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: var(--fs-base); }
.friend-board-row .ft-av { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(127,210,244,.25); color: #dceeff; font-size: var(--fs-caption); font-weight: 800; flex: none; }
.friend-board-row.you .ft-av { background: var(--gold); color: #22355c; }
.friend-board-row .ft-name { color: rgba(225,240,255,.92); font-weight: 600; }
.friend-board-row .ft-km { margin-left: auto; color: rgba(var(--rgb-muted),.75); font-size: var(--fs-small); font-weight: 650; }
.friend-board-row .ft-score { color: var(--gold); font-weight: 800; min-width: 44px; text-align: right; }
.friends-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.friends-strip .review-pill { min-height: 34px; padding: 0 12px; font-size: var(--fs-small); font-weight: 650; color: rgba(var(--rgb-muted),.85); }
.friends-strip .review-pill b { color: #f3e7d3; font-weight: 800; }
.friends-empty, .friends-note { margin: 0; color: rgba(var(--rgb-muted),.55); font-size: var(--fs-small); }
.friends-note { margin-bottom: 6px; color: rgba(var(--rgb-gold),.8); }
.friend-nudge { display: block; min-width: 0; margin-top: 6px; color: rgba(var(--rgb-muted),.55); font-size: var(--fs-small); line-height: 1.4; }
.friend-nudge .text-button { display: inline; padding: 2px 0; margin: 0; color: rgba(var(--rgb-muted),.72); font-size: inherit; white-space: nowrap; }
.friend-nudge-dismiss { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-left: 2px; padding: 0; border: 0; border-radius: 50%; background: none; color: rgba(var(--rgb-muted),.58); font: 20px/1 system-ui, sans-serif; vertical-align: -7px; cursor: pointer; touch-action: manipulation; }
.friend-nudge-dismiss:active { background: rgba(var(--rgb-line),.12); transform: scale(.9); }
.friend-nudge-results { margin: 8px 0 0; }
.friends-today { margin-top: 12px; padding: 11px 12px 9px; border: 1px solid rgba(var(--rgb-gold),.45); border-radius: 16px; background: rgba(var(--rgb-gold),.08); animation: friends-in .28s ease-out; }
.friends-today[hidden] { display: none; }
.friends-today-signedout { margin: 0; color: rgba(var(--rgb-muted),.78); font-size: var(--fs-small); line-height: 1.45; }
.friends-today-signedout[hidden] { display: none; }
.friends-today-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 5px; color: var(--gold); font-size: var(--fs-small); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.friends-today-head[hidden] { display: none; }
.friends-today-count { color: rgba(var(--rgb-muted),.68); font-weight: 600; letter-spacing: 0; text-transform: none; }
.friends-today-list { list-style: none; margin: 0; padding: 0; max-height: 145px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.friend-total-row { display: flex; align-items: center; gap: 7px; min-height: 28px; padding: 2px 0; font-size: var(--fs-body); }
.friend-total-row.you { margin: 0 -6px; padding: 2.5px 6px; border-radius: 10px; background: rgba(var(--rgb-gold),.14); }
.friend-total-row .ft-rank { min-width: 20px; flex: none; color: rgba(var(--rgb-muted),.8); font-size: var(--fs-small); font-weight: 750; text-align: right; }
.friend-total-row.you .ft-rank { color: var(--gold); }
.ft-av { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 50%; background: #f3e7d3; color: #231a05; font-size: 11px; font-weight: 800; }
.results-globe[hidden] { display: none; }
.friend-total-row.you .ft-av { background: var(--gold); }
.ft-identity { display: flex; min-width: 0; flex: 1; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }.ft-identity-copy { display: grid; min-width: 0; }.ft-name { overflow: hidden; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }.ft-title { overflow: hidden; color: rgba(var(--rgb-muted),.62); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.ft-level { flex: none; color: rgba(var(--rgb-muted),.82); font-size: 11px; font-weight: 750; white-space: nowrap; }
.ft-delta { margin-left: auto; color: rgba(var(--rgb-muted),.62); font-size: var(--fs-small); }
.ft-score { min-width: 52px; text-align: right; color: var(--gold); font-size: var(--fs-title); font-weight: 850; }
@media (max-width: 370px) { .ft-title { display: none; } }
.friends-today-link { display: block; margin: 7px auto 0; padding: 4px 6px; color: rgba(var(--rgb-gold),.92); font-size: var(--fs-small); font-weight: 700; }
.friends-today-link[hidden] { display: none; }
.friend-pop { position: absolute; left: 50%; bottom: calc(100% + 6px); z-index: 1; margin: 0; padding: 6px 12px; border: 1px solid rgba(var(--rgb-line),.28); border-radius: 999px; background: rgba(5,12,29,.94); color: var(--ink-hi); font-size: var(--fs-small); font-weight: 700; white-space: nowrap; transform: translateX(-50%); pointer-events: none; }
.friend-pop[hidden] { display: none; }
@keyframes friends-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-height: 700px) {
  .recap-band { height: 100px; }
  .recap-fact { margin: 8px 0 0; }
}

/* ---------------------------------------------------------------------------
   Expeditions picker (was injected by src/main.js).
   --------------------------------------------------------------------------- */
.expedition-picker { position: fixed; inset: 0; z-index: var(--z-picker); display: grid; place-items: center; padding: 18px; background: rgba(2,4,9,.78); backdrop-filter: blur(12px); }
.expedition-picker[hidden] { display: none; }
.expedition-panel { position: relative; width: min(100%, 390px); max-height: calc(100vh - 36px); overflow: auto; box-sizing: border-box; padding: 18px; border: 1px solid rgba(103,232,255,.25); border-radius: 24px; background: rgba(8,16,34,.96); color: var(--ink); }
.expedition-panel .icon-close { position: absolute; top: 5px; right: 5px; }
.expedition-panel h2 { margin: 0; font-size: 27px; }
.expedition-panel > p { margin: 6px 0 18px; color: rgba(var(--rgb-muted),.68); }
.expedition-list { display: grid; gap: 10px; }
.expedition-choice { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border: 1px solid rgba(var(--rgb-line),.18); border-radius: 16px; background: rgba(var(--rgb-line),.07); color: inherit; text-align: left; cursor: pointer; }
.expedition-choice .emoji { font-size: 27px; }
.expedition-choice strong { display: block; }
.expedition-choice small { display: block; margin-top: 3px; color: rgba(var(--rgb-muted),.62); }
.expedition-choice .badge { color: var(--gold); font-size: 20px; }
.expedition-section { margin: 18px 0 8px; color: rgba(var(--rgb-muted),.68); font-size: var(--fs-body); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.expedition-weekly-card { grid-template-columns: 1fr auto; border-color: rgba(var(--rgb-gold),.45); background: rgba(var(--rgb-gold),.08); }
.expedition-weekly-card:disabled { cursor: default; }
.expedition-choice .weekly-eyebrow { margin: 0 0 3px; color: var(--gold); font-size: var(--fs-small); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.weekly-dots { display: flex; gap: 6px; margin-top: 10px; }
.weekly-dot { display: grid; place-items: center; width: 28px; height: 28px; box-sizing: border-box; border: 1.5px dashed rgba(var(--rgb-line),.28); border-radius: 50%; color: rgba(var(--rgb-muted),.38); font-size: var(--fs-caption); font-weight: 800; }
.weekly-dot[data-state="played"] { border: 1.5px solid var(--gold); background: var(--gold); color: #1f1708; }
.weekly-dot[data-state="open"] { border: 1.5px solid #67e8ff; color: #67e8ff; }
.weekly-dot[data-today] { box-shadow: 0 0 0 2px rgba(103,232,255,.35); }
.expedition-archive summary { cursor: pointer; }
.expedition-archive-row { box-sizing: border-box; grid-template-columns: 1fr auto; cursor: default; }
body.expedition-mode .round-header, body.expedition-mode #reveal-card { border-color: rgba(var(--rgb-gold),.45); background: rgba(31,23,8,.88); }
body.expedition-mode #reveal-card .score-math { display: none; }
body.expedition-mode .round-meta span:first-child { color: var(--gold); }

/* ---------------------------------------------------------------------------
   Earn toast (was injected per toast by src/game/round.js).
   --------------------------------------------------------------------------- */
.earn-toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 112px); transform: translateX(-50%) translateY(20px); z-index: var(--z-toast); display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 999px; background: rgba(20,28,52,.92); border: 1px solid rgba(var(--rgb-gold),.4); box-shadow: 0 8px 32px rgba(0,0,0,.5); opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none; max-width: 90vw; }
.earn-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.earn-toast img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: center 20%; flex: none; }
.earn-toast .earn-toast-text { color: var(--ink); font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.earn-toast .earn-toast-text small { display: block; color: var(--gold); font-size: var(--fs-caption); font-weight: 600; }
.earn-toast.seen { border-color: rgba(var(--rgb-muted),.32); }
.earn-toast.seen img { filter: grayscale(1) contrast(.92) brightness(.82); }
.earn-toast.seen .earn-toast-text small { color: rgba(var(--rgb-muted),.72); }

/* ---------------------------------------------------------------------------
   Desktop layer (woe-desktop-audit, 2026-11-10): one min-width: 900px layer,
   no changes below it. Bounds the full-width sheets and modals to a centered
   column instead of stretching edge to edge (D2, D3's modal void, D4), scales
   the home triptych and the pack-select packs up for the extra space (D1,
   D5, D6), and gives the Passport's expanded pack grid more columns (D4).
   --------------------------------------------------------------------------- */
@media (min-width: 900px) {
  :root { --desktop-sheet-w: min(820px, 86vw); }

  .reveal-sheet {
    left: 50%;
    right: auto;
    width: var(--desktop-sheet-w);
    transform: translateX(-50%);
  }
  .reveal-card {
    left: 50%;
    right: auto;
    width: var(--desktop-sheet-w);
    transform: translateX(-50%);
  }
  .results-card, .pp-card {
    max-width: var(--desktop-sheet-w);
  }

  .pp-pack-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .mode-buttons.home-panels {
    width: min(100%, 800px);
  }
  .home-panels > button {
    height: 387px;
  }
  .home-panels .panel-packobj {
    height: 237px;
  }
  .home-panels .mode-name {
    font-size: 23px;
  }
  .home-panels .mode-desc {
    font-size: 17px;
  }

  .pack-panel {
    width: min(100%, 740px);
  }
  .pack-choices {
    width: min(678px, 100%);
    grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  }
}

/* Account progression surfaces use the app's dark system while preserving
   the calling card and seal artwork as their navy and gold anchors. */
.account-panel[data-view="account"] .eyebrow { color: rgba(var(--rgb-muted),.74); }
.account-panel[data-view="account"] #account-title, .account-panel[data-view="cabinet"] .cabinet h2, .account-panel[data-view="customize"] .customizer h2 { color: var(--ink-hi); }
.account-panel[data-view="account"] .account-friends, .account-panel[data-view="account"] .account-friends-list, .account-panel[data-view="account"] .account-friend { border-color: rgba(var(--rgb-line),.18); }
.account-panel[data-view="account"] .account-friends h3, .account-panel[data-view="account"] .account-name-form label, .account-panel[data-view="account"] .account-share-row strong { color: var(--ink-hi); }
.account-panel[data-view="account"] .account-inline-edit input { border-color: rgba(var(--rgb-line),.3); background: #0d1526; color: var(--ink-hi); }
.account-panel[data-view="account"] .account-inline-edit .text-button, .account-panel[data-view="account"] .account-friend, .account-panel[data-view="account"] .account-status { color: var(--ink-body); }
.account-panel[data-view="account"] .account-share-row { border-color: rgba(var(--rgb-line),.24); background: rgba(var(--rgb-line),.08); }
.account-panel[data-view="account"] .account-share-row small, .account-panel[data-view="account"] .account-small-print, .account-panel[data-view="account"] .account-signout { color: var(--mail-ink-2); }
.account-panel[data-view="account"] .primary, .account-panel[data-view="profile"] .primary, .account-panel[data-view="customize"] .primary, .account-panel[data-view="account"] .account-done { border: 1px solid rgba(var(--rgb-line),.36); background: #16233f; color: var(--ink-btn); box-shadow: 0 8px 22px rgba(0,0,0,.25); }
.account-panel[data-view="profile"] .traveler-profile, .account-panel[data-view="cabinet"] .traveler-profile, .account-panel[data-view="customize"] .traveler-profile { color: var(--ink-body); }
.account-panel[data-view="profile"] .traveler-stats { border-color: rgba(var(--rgb-line),.25); }
.account-panel[data-view="profile"] .traveler-stats div + div, .account-panel[data-view="profile"] .traveler-stats div:nth-child(n+4), .account-panel[data-view="profile"] .traveler-achievements, .account-panel[data-view="profile"] .traveler-achievements li { border-color: rgba(var(--rgb-line),.18); }
.account-panel[data-view="profile"] .traveler-stats strong { color: var(--ink-hi); }
.account-panel[data-view="profile"] .traveler-stats span, .account-panel[data-view="profile"] .traveler-achievements span { color: rgba(var(--rgb-muted),.78); }
.account-panel[data-view="profile"] .traveler-section-head > span, .account-panel[data-view="cabinet"] .cabinet-group-head > span { color: var(--gold); }
.account-panel[data-view="profile"] .traveler-achievements i, .account-panel[data-view="cabinet"] .cabinet-item i { border-color: rgba(var(--rgb-line),.48); }
.account-panel[data-view="profile"] .traveler-achievements .earned i, .account-panel[data-view="cabinet"] .cabinet-item.earned i { border-color: var(--mail-gold); }
.account-panel[data-view="profile"] .traveler-actions .account-open-cabinet.text-button { border: 1px solid rgba(var(--rgb-line),.36); background: #16233f; color: var(--ink-btn); text-decoration: none; }
.account-panel[data-view="profile"] .account-profile-back.icon-close, .account-panel[data-view="cabinet"] .account-cabinet-back.icon-close, .account-panel[data-view="customize"] .account-customize-back.icon-close { color: var(--ink-hi); }
.account-panel[data-view="cabinet"] .cabinet-group-head { border-color: rgba(var(--rgb-line),.5); }
.account-panel[data-view="cabinet"] .cabinet-item { border-color: rgba(var(--rgb-line),.18); }
.account-panel[data-view="cabinet"] .cabinet-item strong { color: var(--ink-hi); }
.account-panel[data-view="cabinet"] .cabinet-item span, .account-panel[data-view="cabinet"] .cabinet-item small { color: rgba(var(--rgb-muted),.78); }
.account-panel[data-view="customize"] .customize-kind-tabs { border-color: rgba(var(--rgb-line),.28); }
.account-panel[data-view="customize"] .customize-kind-tabs button { color: rgba(var(--rgb-muted),.78); }
.account-panel[data-view="customize"] .customize-kind-tabs button[aria-pressed="true"] { border-color: var(--gold); color: var(--ink-hi); }
.account-panel[data-view="customize"] .customize-preview { background: repeating-linear-gradient(135deg, rgba(var(--rgb-line),.1) 0 12px, transparent 12px 24px); }
.account-panel[data-view="customize"] .customize-preview .paper-atlas-avatar { filter: drop-shadow(0 7px 9px rgba(0,0,0,.42)); }
.account-panel[data-view="customize"] .seal-initials, .account-panel[data-view="customize"] .seal-section { color: var(--ink-body); }
.account-panel[data-view="customize"] .seal-initials input { border-color: rgba(var(--rgb-line),.38); background: #0d1526; color: var(--ink-hi); }
.account-panel[data-view="customize"] .seal-initials input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(var(--rgb-gold),.16); }
.account-panel[data-view="customize"] .seal-motifs button, .account-panel[data-view="customize"] .avatar-parts button { border-color: rgba(var(--rgb-line),.25); background: #0d1526; color: var(--ink-hi); }
.account-panel[data-view="customize"] .seal-motifs button.selected, .account-panel[data-view="customize"] .avatar-parts button.selected { border-color: var(--gold); box-shadow: inset 0 -4px var(--gold); }
.account-panel[data-view="customize"] .seal-motifs small, .account-panel[data-view="customize"] .avatar-parts small { color: rgba(var(--rgb-muted),.72); }
