/* Trailmates — app shell styles (map/card internals live in map.css).
   Map-first: dark frosted glass over full-bleed satellite. Journal / Passport / Settings follow the
   system light/dark scheme. iPhone-first: safe areas, 44px targets, system fonts. */

:root {
  /* safe areas (overridable for testing) */
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --tabbar-h: calc(54px + var(--sab));

  /* glass (map UI) */
  --glass: rgba(16, 20, 24, 0.72);
  --glass-strong: rgba(16, 20, 24, 0.8);
  --glass-hair: rgba(255, 255, 255, 0.12);
  --text: #f4f6f5;
  --muted: rgba(235, 240, 238, 0.66);
  --gold: #f5c451;
  --gold-deep: #d99a2b;
  --radius: 22px;
  --radius-lg: 28px;
  --danger: #ff6b5b;

  --font: -apple-system, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-display: -apple-system, "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --font-serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* page theme (light) */
  --p-bg: #f2f2f7;
  --p-card: #ffffff;
  --p-text: #111418;
  --p-muted: rgba(60, 60, 67, 0.66);
  --p-sep: rgba(60, 60, 67, 0.13);
  --p-input: #ffffff;
  --p-accent: #1d6b52;
  --p-accent-soft: rgba(29, 107, 82, 0.12);
  --p-warn: #b45309;
  --p-danger: #d92d20;
  --paper: #f6efdf;
  --paper-ink: #3b2f22;
  --paper-muted: #8a7458;

  --focus: rgba(245, 196, 81, 0.95);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --p-bg: #0d1114;
    --p-card: #1a1f24;
    --p-text: #f2f4f5;
    --p-muted: rgba(235, 235, 245, 0.62);
    --p-sep: rgba(255, 255, 255, 0.1);
    --p-input: #11161a;
    --p-accent: #45d39b;
    --p-accent-soft: rgba(69, 211, 155, 0.14);
    --p-warn: #ffb35c;
    --p-danger: #ff6b5b;
    --paper: #e8dfca;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html {
  background: #101418;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  font: 400 16px/1.4 var(--font);
  color: var(--text);
  background: #101418;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html.has-modal, html.has-modal body { overflow: hidden; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.tm-num { font-variant-numeric: tabular-nums; }

:focus { outline: none; }
.msheet__panel:focus-visible, .pc-modal:focus-visible, .asheet__panel:focus-visible { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 12px; }
.page :focus-visible, .theme-page :focus-visible { --focus: var(--p-accent); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.icon { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.icon svg { width: 22px; height: 22px; display: block; }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.28), inset 0 0 0 0.5px var(--glass-hair);
  color: var(--text);
}
.glass-strong {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  color: var(--text);
}

.avatar {
  --s: 32px;
  width: var(--s);
  height: var(--s);
  flex: none;
  border-radius: 50%;
  background: var(--c, #888);
  color: #fff;
  display: inline-grid;
  place-items: center;
  font: 700 calc(var(--s) * 0.44) / 1 var(--font-round);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.28), 0 2px 6px rgba(0, 0, 0, 0.18);
}

.spinner {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.25);
  border-top-color: currentColor;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: 25px;
  font: 650 16px/1.15 var(--font);
  text-decoration: none;
  text-align: center;
  transition: transform 0.12s, opacity 0.2s, background 0.2s, box-shadow 0.2s;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn--wide { width: 100%; }
.btn--sm { min-height: 40px; padding: 0 14px; border-radius: 20px; font-size: 14.5px; }
.btn--sm::before { content: ""; position: absolute; inset: -3px 0; }
.btn--sm .icon svg { width: 18px; height: 18px; }
.btn--gold {
  background: linear-gradient(180deg, #ffd977, #f0b53a);
  color: #2a1f05;
  box-shadow: 0 10px 24px rgba(245, 196, 81, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn--glass { background: rgba(255, 255, 255, 0.12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.btn--accent { background: var(--p-accent); color: #fff; }
@media (prefers-color-scheme: dark) { .btn--accent { color: #06281c; } }
.btn--soft { background: var(--p-accent-soft); color: var(--p-accent); }
.btn.is-busy { color: transparent !important; pointer-events: none; }
.btn.is-busy > * { visibility: hidden; }
.btn.is-busy::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 20px; height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  border: 2.5px solid rgba(127, 127, 127, 0.35);
  border-top-color: #888;
  animation: spin 0.8s linear infinite;
}
.icon-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(127, 127, 127, 0.2);
  color: inherit;
}
.icon-btn::before { content: ""; position: absolute; inset: -6px; }
.icon-btn .icon svg { width: 18px; height: 18px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  font: 600 12.5px/1 var(--font);
  white-space: nowrap;
}
.chip .icon svg { width: 15px; height: 15px; opacity: 0.85; }
.chip--diff.is-easy { color: #86e3ae; }
.chip--diff.is-moderate { color: var(--gold); }
.chip--diff.is-hard { color: #ffa27a; }
.chip--diff.is-epic { color: #d0abff; }

.empty { text-align: center; padding: 26px 18px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty__icon { font-size: 34px; }
.empty__title { font: 650 16px/1.3 var(--font); }
.empty__sub { font: 400 14px/1.4 var(--font); color: var(--p-muted); max-width: 30ch; }
.empty .btn { margin-top: 10px; }
.trail .empty__sub, .picker .empty__sub { color: var(--muted); }
.skeleton-block {
  min-height: 120px;
  background: linear-gradient(90deg, rgba(127,127,127,.08), rgba(127,127,127,.16), rgba(127,127,127,.08)) 0 0 / 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- boot */
.boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  background: radial-gradient(90% 60% at 50% 35%, #1b3a44, #101418 70%);
  transition: opacity 0.45s;
}
.boot.is-done { opacity: 0; pointer-events: none; }
.boot__logo { width: 84px; height: 84px; border-radius: 20px; box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45); animation: boot-breathe 2.2s ease-in-out infinite; }
.boot__name { font: 700 14px/1 var(--font); letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); }
@keyframes boot-breathe { 50% { transform: scale(1.04); } }
.boot-error {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px;
  text-align: center;
  background: radial-gradient(90% 60% at 50% 35%, #1b3a44, #101418 70%);
}
.boot-error h1 { font: 700 24px/1.2 var(--font-display); margin-top: 8px; }
.boot-error p { color: var(--muted); max-width: 32ch; }
.boot-error__logo { border-radius: 18px; }

/* ---------------------------------------------------------------- shell */
.shell { position: fixed; inset: 0; }
.shell__main { position: absolute; inset: 0; }
.tab { position: absolute; inset: 0; }
.tab:not([hidden]) { animation: tab-in 0.22s var(--ease-out); }
@keyframes tab-in { from { opacity: 0.4; } }

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  height: var(--tabbar-h);
  padding: 0 calc(var(--sar) + 4px) var(--sab) calc(var(--sal) + 4px);
  display: flex;
  --tb-bg: rgba(14, 18, 22, 0.8);
  --tb-border: rgba(255, 255, 255, 0.1);
  --tb-inactive: rgba(235, 240, 238, 0.56);
  --tb-active: var(--gold);
  background: var(--tb-bg);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  border-top: 0.5px solid var(--tb-border);
  transition: background 0.25s;
}
body:not([data-tab="trail"]) .tabbar {
  --tb-bg: rgba(249, 249, 251, 0.86);
  --tb-border: rgba(0, 0, 0, 0.14);
  --tb-inactive: #7d7d84;
  --tb-active: var(--p-accent);
}
@media (prefers-color-scheme: dark) {
  body:not([data-tab="trail"]) .tabbar {
    --tb-bg: rgba(20, 24, 28, 0.86);
    --tb-border: rgba(255, 255, 255, 0.1);
    --tb-inactive: rgba(235, 235, 245, 0.5);
    --tb-active: var(--gold);
  }
}
.tabbar__item {
  flex: 1;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding-top: 3px;
  color: var(--tb-inactive);
  text-decoration: none;
  font: 600 10.5px/1.1 var(--font);
  letter-spacing: 0.01em;
  transition: color 0.2s;
  border-radius: 14px;
}
.tabbar__item[aria-current="page"] { color: var(--tb-active); }
.tabbar__icon svg { width: 27px; height: 27px; transition: transform 0.25s var(--ease-out); }
.tabbar__item:active .tabbar__icon svg { transform: scale(0.88); }
.tabbar__item:not([aria-current="page"]) .tabbar__icon svg [opacity] { opacity: 0; }

.statusbar-scrim {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--sat);
  z-index: 19;
  pointer-events: none;
  background: rgba(13, 30, 38, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: opacity 0.25s;
}
body:not([data-tab="trail"]):not(.is-scrolled) .statusbar-scrim { opacity: 0; }
body[data-tab="trail"] .statusbar-scrim { background: linear-gradient(rgba(0, 0, 0, 0.32), transparent); -webkit-backdrop-filter: none; backdrop-filter: none; }
body.has-install .page { padding-bottom: calc(var(--tabbar-h) + 120px); }

.offline-pill {
  position: fixed;
  top: calc(var(--sat) + 6px);
  left: 50%;
  z-index: 30;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px 0 10px;
  border-radius: 14px;
  background: rgba(40, 30, 10, 0.86);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  color: #ffe2a0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3), inset 0 0 0 0.5px rgba(255, 210, 120, 0.4);
  font: 600 12.5px/1 var(--font);
  white-space: nowrap;
  animation: drop-in 0.3s var(--ease-out);
  pointer-events: none; /* informational: never block the sheet handle (it sits over it at "full") */
}
.offline-pill .icon svg { width: 15px; height: 15px; }
body.is-offline { --offline-shift: 34px; }
body.is-offline .trail__top { top: calc(var(--sat) + 8px + var(--offline-shift)); }
@keyframes drop-in { from { transform: translate(-50%, -12px); opacity: 0; } }

/* ---------------------------------------------------------------- install hint */
.install {
  position: fixed;
  left: calc(var(--sal) + 12px);
  right: calc(var(--sar) + 12px);
  bottom: calc(var(--tabbar-h) + 12px);
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px 12px 12px;
  border-radius: 22px;
  animation: rise-in 0.45s var(--ease-sheet);
  transition: opacity 0.25s, transform 0.25s;
  max-width: 520px;
  margin: 0 auto;
}
/* The PIN screen shows its own one-line tip instead of the floating banner. */
body.is-login .install { display: none; }
/* On the map the bottom belongs to the sheet: sit under the title pill instead. */
body[data-tab="trail"]:not(.is-login):not(.is-picker) .install { bottom: auto; top: calc(var(--sat) + 70px + var(--offline-shift, 0px)); right: calc(var(--sar) + 76px); padding: 10px 8px 10px 10px; animation-name: drop-in-y; }
body[data-tab="trail"]:not(.is-login):not(.is-picker) .install__icon { width: 36px; height: 36px; border-radius: 9px; }
body[data-tab="trail"]:not(.is-login):not(.is-picker) .install__text { font-size: 13px; }
body[data-tab="trail"][data-sheet="full"] .install,
body[data-tab="trail"].is-replaying .install { opacity: 0; pointer-events: none; }
@keyframes drop-in-y { from { transform: translateY(-16px); opacity: 0; } }
.install.is-out { opacity: 0; transform: translateY(16px); }
.install__icon { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.install__text { display: flex; flex-direction: column; gap: 2px; font: 400 13.5px/1.35 var(--font); color: var(--muted); }
.install__text b { color: var(--text); font-weight: 650; font-size: 14.5px; }
.install__close { flex: none; width: 36px; height: 36px; }
.inline-icon { display: inline-flex; vertical-align: -4px; color: #3ea6ff; }
.inline-icon .icon svg { width: 19px; height: 19px; }
@keyframes rise-in { from { transform: translateY(30px); opacity: 0; } }

/* ---------------------------------------------------------------- login */
.login {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  color: #fff;
  background: linear-gradient(180deg, #0b1626 0%, #13304a 38%, #2f5d6a 62%, #d9955a 100%);
  opacity: 0;
  transition: opacity 0.35s, transform 0.35s;
}
.login.is-in { opacity: 1; }
.login.is-out { opacity: 0; transform: scale(1.03); }
.login__scenery { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.login__sun {
  position: absolute;
  right: 6%;
  top: calc(var(--sat) + 4%);
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe9a8 0 34%, rgba(245, 196, 81, 0.5) 37%, rgba(245, 196, 81, 0) 70%);
  opacity: 0.8;
}
.login__ridge { position: absolute; left: -2%; right: -2%; bottom: 0; }
.login__ridge--3 { height: 42%; background: #2a5f63; clip-path: polygon(0 38%, 12% 22%, 24% 34%, 38% 8%, 52% 30%, 64% 18%, 78% 36%, 90% 20%, 100% 30%, 100% 100%, 0 100%); opacity: 0.85; }
.login__ridge--2 { height: 34%; background: #183f40; clip-path: polygon(0 30%, 10% 44%, 22% 20%, 34% 40%, 46% 14%, 60% 42%, 72% 24%, 86% 46%, 100% 28%, 100% 100%, 0 100%); }
.login__ridge--1 { height: 22%; background: #0c2223; clip-path: polygon(0 40%, 14% 22%, 30% 46%, 44% 30%, 58% 52%, 74% 26%, 88% 44%, 100% 30%, 100% 100%, 0 100%); }
.login__stage {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--sat) + 28px) calc(var(--sar) + 22px) calc(var(--sab) + 28px) calc(var(--sal) + 22px);
}
.login__panel {
  width: min(100%, 360px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: rise-in 0.5s var(--ease-sheet);
}
.login__brand { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.login__logo { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4); }
.login__wordmark { font: 700 13px/1 var(--font); letter-spacing: 0.24em; text-transform: uppercase; color: rgba(255, 255, 255, 0.78); }
.login__title { margin-top: 26px; font: 800 34px/1.1 var(--font-display); letter-spacing: -0.02em; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3); }
.login__sub { margin-top: 6px; font: 400 16px/1.4 var(--font); color: rgba(255, 255, 255, 0.76); }
/* Portrait: one centered column (the groups don't box anything); the tip goes last. */
.login__head, .login__keys { display: contents; }
.login__hint { order: 2; }
.login__panel .login__brand + .login__sub { margin-top: 26px; font-weight: 600; color: rgba(255, 255, 255, 0.88); }
.pin__dots.is-long { gap: 12px; }
.pin__key--blank { visibility: hidden; }
.login__mode {
  position: relative;
  min-height: 44px;
  margin-top: 10px;
  padding: 0 14px;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font: 600 14.5px/1 var(--font);
}
.login__mode:active { background: rgba(255, 255, 255, 0.1); }
.login__hint { margin-top: 4px; font: 400 13px/1.4 var(--font); color: rgba(255, 255, 255, 0.66); }
.login__hint .inline-icon { color: #9fd3ff; }
.login__hello { display: flex; flex-direction: column; align-items: center; animation: rise-in 0.45s var(--ease-sheet); }
.login__hello .avatar { font-size: 36px; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.92), 0 14px 34px color-mix(in srgb, var(--c) 50%, transparent); }
.login__hello .login__title { margin-top: 20px; color: color-mix(in srgb, var(--c) 78%, #fff); }
.pin__dots { display: flex; gap: 16px; justify-content: center; margin-top: 24px; min-height: 16px; }
.pin__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  transition: background 0.15s, transform 0.15s, border-color 0.2s;
}
.pin__dot.is-on { background: #fff; transform: scale(1.08); }
.pin__dots.is-error { animation: shake 0.45s; }
.pin__dots.is-error .pin__dot { border-color: #ffb4a8; }
.pin__status { min-height: 22px; margin-top: 12px; font: 600 14.5px/1.4 var(--font); color: #ffc8bd; }
.pin__pad {
  display: grid;
  grid-template-columns: repeat(3, 78px);
  gap: 14px 26px;
  justify-content: center;
  margin-top: 14px;
}
.pin__key {
  position: relative;
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.25);
  transition: background 0.12s, transform 0.12s;
}
.pin__key:active:not(:disabled) { background: rgba(255, 255, 255, 0.4); transform: scale(0.96); }
.pin__digit { font: 400 34px/1 var(--font-display); }
.pin__letters { font: 700 9.5px/1 var(--font); letter-spacing: 0.2em; opacity: 0.75; min-height: 10px; }
.pin__key--fn { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.pin__key--fn .icon svg { width: 30px; height: 30px; }
.pin__key--go { background: var(--gold); color: #2a1f05; box-shadow: 0 8px 20px rgba(245, 196, 81, 0.35); }
.pin__key--go:disabled { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.35); box-shadow: none; cursor: default; }
.pin__key--go .icon svg { width: 30px; height: 30px; }
.login.is-busy .pin__pad { opacity: 0.6; pointer-events: none; }
/* Short phones (iPhone SE): a smaller keypad so everything fits without scrolling. */
@media (max-height: 740px) {
  .login__stage { padding-top: calc(var(--sat) + 16px); padding-bottom: calc(var(--sab) + 12px); }
  .login__logo { width: 52px; height: 52px; border-radius: 12px; }
  .login__panel .login__brand + .login__sub { margin-top: 16px; }
  .pin__dots { margin-top: 16px; }
  .pin__status { margin-top: 8px; }
  .pin__pad { grid-template-columns: repeat(3, 70px); gap: 12px 24px; margin-top: 8px; }
  .pin__key { width: 70px; height: 70px; }
  .pin__digit { font-size: 30px; }
  .login__mode { margin-top: 6px; }
}
/* Landscape phone: logo + dots on the left, keypad on the right. */
@media (orientation: landscape) and (max-height: 500px) {
  .login__stage { padding: calc(var(--sat) + 12px) calc(var(--sar) + 24px) calc(var(--sab) + 12px) calc(var(--sal) + 24px); }
  .login__panel { width: min(100%, 720px); flex-direction: row; justify-content: center; gap: 56px; }
  .login__head, .login__keys { display: flex; flex-direction: column; align-items: center; }
  .login__head { flex: 1; min-width: 0; }
  .login__logo { width: 52px; height: 52px; border-radius: 12px; }
  .login__panel .login__brand + .login__sub { margin-top: 18px; }
  .pin__pad { grid-template-columns: repeat(3, 62px); gap: 10px 22px; margin-top: 0; }
  .pin__key { width: 62px; height: 62px; }
  .pin__digit { font-size: 27px; }
  .pin__letters { font-size: 8.5px; }
  .login__mode { margin-top: 4px; }
  .login__sun { right: auto; left: calc(var(--sal) + 5%); }
}
@keyframes shake {
  15%, 55% { transform: translateX(-9px); }
  35%, 75% { transform: translateX(9px); }
  90% { transform: translateX(-3px); }
}

/* ---------------------------------------------------------------- trail */
.tab--trail { overflow: hidden; background: #26332d; }
/* .tab--trail prefix: MapLibre's own `.maplibregl-map { position: relative }` loads later. */
/* z-index 0 makes the map its own stacking context, so MapLibre's markers (team marker z 4) and controls
   can never paint over the sheet, the title pill or the floating buttons. */
.tab--trail .trail__map { position: absolute; inset: 0; z-index: 0; --tm-map-ctrl-top: calc(116px + var(--offline-shift, 0px)); }
.trail__top {
  position: absolute;
  z-index: 2;
  top: calc(var(--sat) + 8px);
  left: calc(var(--sal) + 12px);
  right: calc(var(--sar) + 12px);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
  transition: opacity 0.3s, top 0.3s;
}
.trail__top > * { pointer-events: auto; }
.trail__title {
  min-width: 0;
  max-width: calc(100% - 64px);
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 10px;
  border: 0;
  border-radius: 26px;
  text-align: left;
  transition: transform 0.15s;
}
.trail__title:active { transform: scale(0.97); }
.trail__flag {
  width: 36px; height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  font-size: 21px;
  font-family: "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Emoji", sans-serif;
}
.trail__title-text { display: flex; flex-direction: column; min-width: 0; }
.trail__name, .trail__leg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trail__name { font: 680 15.5px/1.2 var(--font); letter-spacing: -0.01em; }
.trail__leg { font: 500 12.5px/1.3 var(--font); color: var(--muted); }
.trail__controls { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; flex: none; }
.ctrl-btn {
  width: 50px;
  height: 50px;
  border: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--text);
  transition: background 0.15s;
}
.ctrl-btn:active { background: rgba(255, 255, 255, 0.14); }
.ctrl-btn.is-busy { opacity: 0.5; }
.ctrl-btn:focus-visible { outline-offset: -3px; }
.ctrl-sep { height: 0.5px; margin: 0 10px; background: rgba(255, 255, 255, 0.16); }

.trail__sheet-host {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--tabbar-h);
  pointer-events: none;
  overflow: hidden;
}
.sheet {
  position: absolute;
  left: calc(var(--sal));
  right: calc(var(--sar));
  bottom: 0;
  pointer-events: none;
  will-change: transform;
}
.sheet.is-animating { transition: transform 0.52s var(--ease-sheet); }
.sheet__surface {
  pointer-events: auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -10px 34px rgba(0, 0, 0, 0.28), inset 0 0.5px 0 rgba(255, 255, 255, 0.16);
  touch-action: none;
  transition: background-color 0.35s;
}
/* Fully open the sheet is a reading surface: less map showing through. */
.sheet[data-detent="full"] .sheet__surface { background-color: rgba(16, 20, 24, 0.9); }
.sheet__handle {
  position: relative;
  flex: none;
  width: 100%;
  height: 26px;
  border: 0;
  padding: 0;
  background: none;
  display: grid;
  place-items: center;
  cursor: grab;
}
.sheet__handle::before { content: ""; position: absolute; inset: -4px 0 -14px; }
.sheet__handle:focus-visible { outline-offset: -4px; }
.sheet__grabber { width: 38px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.36); }
.sheet.is-dragging .sheet__handle { cursor: grabbing; }
.sheet__content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 12px 28px;
  overscroll-behavior: contain;
  touch-action: none;
}
.sheet__content.is-scrollable { overflow-y: auto; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
.sheet__content.is-scrolled { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18px); mask-image: linear-gradient(to bottom, transparent 0, #000 18px); }
.sheet__content > * { flex: none; }
.sheet__fabs {
  position: absolute;
  left: 12px;
  right: 12px;
  top: -60px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.3s var(--ease-out);
}
.sheet__fabs > * { pointer-events: auto; }
.sheet[data-detent="full"] .sheet__fabs { opacity: 0; transform: translateY(12px); pointer-events: none; }
.sheet[data-detent="full"] .sheet__fabs > * { pointer-events: none; }
.fab {
  position: relative;
  height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px 0 14px;
  border: 0;
  border-radius: 23px;
  font: 650 15px/1 var(--font);
  transition: transform 0.15s, background 0.2s;
}
.fab:active { transform: scale(0.96); }
.fab .icon svg { width: 20px; height: 20px; }
.fab--replay .icon { color: var(--gold); }
.fab--replay.is-active { background: rgba(245, 196, 81, 0.92); color: #2a1f05; }
.fab--replay.is-active .icon { color: #2a1f05; }
.tab--trail.is-replaying .trail__top { opacity: 0; pointer-events: none; }
.tab--trail.is-replaying .sheet__fabs .fab:not(.fab--replay) { opacity: 0; pointer-events: none; }

.sheet__credits { display: flex; flex-direction: column; gap: 3px; padding: 4px 8px 0; font: 400 11px/1.4 var(--font); color: var(--muted); }

.trail__error {
  position: absolute;
  z-index: 4;
  left: 16px;
  right: 16px;
  top: calc(var(--sat) + 72px);
  padding: 16px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  font: 500 14.5px/1.4 var(--font);
}
/* display:none (not visibility) for the map: an invisible WebGL map would otherwise mount and keep
   rendering 3D terrain behind the picker, burning battery, and the backlog stalls the switch back. */
.tab--trail.is-picker .trail__map { display: none; }
.tab--trail.is-picker .trail__top,
.tab--trail.is-picker .trail__sheet-host { visibility: hidden; }

/* cards inside the sheet */
.card {
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 255, 255, 0.065);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.08);
  color: var(--text);
}
.card:empty { display: none; }
.card--progress { background: none; box-shadow: none; padding: 2px 6px 0; display: flex; flex-direction: column; gap: 22px; }
.card .tm-card-eyebrow { font-family: var(--font); }

.progress__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.progress__headline { font: 700 30px/1.08 var(--font-round); letter-spacing: -0.02em; white-space: nowrap; }
.progress__headline b { font-weight: 800; }
.progress__of { font-size: 19px; font-weight: 650; color: var(--muted); letter-spacing: -0.01em; }
.progress__pct { font: 750 19px/1 var(--font-round); color: var(--gold); }
.pbar { position: relative; height: 12px; margin-top: 12px; border-radius: 6px; background: rgba(255, 255, 255, 0.13); }
.pbar__fill { display: flex; height: 100%; border-radius: 6px; overflow: hidden; }
.pbar__seg {
  height: 100%;
  background: var(--c);
  box-shadow: inset -1.5px 0 0 rgba(10, 12, 14, 0.35);
  transition: width 1s var(--ease-out);
}
.pbar__seg:last-child { box-shadow: none; }
.pbar__seg--carry { background: #efe2b8; }
.pbar__ticks { position: absolute; inset: 0; pointer-events: none; }
.pbar__tick {
  position: absolute;
  top: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
}
.pbar__tick.is-on { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; background: #fff7dc; box-shadow: 0 0 0 1.5px rgba(245, 196, 81, 0.9); }

.walkers { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.walker {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  padding: 12px 12px 12px 12px;
  border-radius: 20px;
  background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%),
    rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.08);
  min-width: 0;
}
.walker .avatar { grid-row: 1; }
.walker__text { min-width: 0; }
.walker__name { font: 650 14.5px/1.2 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.walker__sub { font: 500 11.5px/1.3 var(--font); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.walker__today { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 5px; margin-top: 8px; }
.walker__today b { font: 800 26px/1 var(--font-round); letter-spacing: -0.02em; }
.walker__today span { font: 600 12px/1 var(--font); color: var(--muted); }

.pstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pstat { padding: 11px 10px 10px; border-radius: 18px; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.08); min-width: 0; }
.pstat__label { font: 600 11px/1.25 var(--font); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pstat__value {
  margin-top: 5px;
  font: 750 15.5px/1.2 var(--font-round);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.pstat__sub { margin-top: 2px; font: 500 11px/1.3 var(--font); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.done { display: flex; align-items: center; gap: 14px; }
.done__stamp { flex: none; width: 96px; height: 96px; border-radius: 18px; background: var(--paper); display: grid; place-items: center; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3); }
.done__stamp svg { width: 88px; height: 88px; }
.done__sub { margin-top: 4px; font: 500 13.5px/1.4 var(--font); color: var(--muted); }

/* next stop */
.next__photo {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #35554a, #1a2a25);
}
.next__photo[data-kind="waterfall"], .next__photo[data-kind="lake"], .next__photo[data-kind="beach"] { background: linear-gradient(145deg, #2f5568, #142630); }
.next__photo[data-kind="summit"], .next__photo[data-kind="pass"], .next__photo[data-kind="viewpoint"] { background: linear-gradient(145deg, #59607a, #232838); }
.next__emoji { font-size: 40px; opacity: 0.6; font-family: "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.next__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s; }
.next__photo.is-loaded img { opacity: 1; }
.next__photo.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.08), rgba(255,255,255,0)) 0 0 / 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
.next__name { margin-top: 12px; font: 750 21px/1.2 var(--font-display); letter-spacing: -0.01em; }
.next__meta { margin-top: 3px; font: 500 13px/1.35 var(--font); color: var(--muted); }
.next__blurb {
  margin-top: 8px;
  font: 400 14.5px/1.5 var(--font);
  color: rgba(244, 246, 245, 0.88);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.next__actions { display: flex; gap: 8px; margin-top: 12px; }
.next__actions:empty { display: none; }
.next__credit { display: block; margin-top: 10px; font: 400 11px/1.35 var(--font); color: var(--muted); text-decoration: none; }
.next__last {
  width: 100%;
  margin-top: 14px;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  text-align: left;
}
.next__last-stamp { font-size: 22px; }
.next__last-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.next__last-label { font: 600 11px/1.2 var(--font); color: var(--gold); letter-spacing: 0.05em; text-transform: uppercase; }
.next__last-name { font: 650 15px/1.3 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next__last-date { font: 500 12px/1 var(--font); color: var(--muted); white-space: nowrap; }
.next__last .icon svg { width: 16px; height: 16px; opacity: 0.6; }

/* trip fund jar */
.fund { display: flex; align-items: center; gap: 16px; }
.jar { flex: none; width: 92px; height: 115px; --fill: 0; }
.jar svg { width: 100%; height: 100%; overflow: visible; }
.jar__liquid { transform: translateY(calc(140px - var(--fill) * 100px)); transition: transform 1.8s var(--ease-out); }
.jar__wave { animation: jar-wave 3s linear infinite; }
.jar__coin { animation: jar-bob 3.4s ease-in-out infinite; transform-box: fill-box; }
.jar__coin--2 { animation-delay: -1.6s; }
@keyframes jar-wave { to { transform: translateX(80px); } }
@keyframes jar-bob { 50% { transform: translateY(-6px); } }
.fund__text { flex: 1; min-width: 0; }
.fund__total { font: 800 36px/1 var(--font-round); letter-spacing: -0.02em; color: var(--gold); }
.fund__sub { margin-top: 6px; font: 500 13px/1.4 var(--font); color: var(--muted); }
.fund__goal { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.fund__goal-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.fund__goal-bar span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #f0b53a, #ffe08a); transition: width 1.4s var(--ease-out); }
.fund__goal-text { font: 600 12px/1 var(--font); color: var(--muted); }

/* milestone preview sheet */
.preview { display: flex; flex-direction: column; gap: 14px; }
.preview__head { display: flex; align-items: center; gap: 14px; }
.preview__badge {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1.5px rgba(205, 212, 216, 0.4);
  font-size: 27px;
  font-family: "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}
.preview__badge span { filter: grayscale(0.7); opacity: 0.8; } /* locked, like its map pin */
.preview__text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.preview__meta { font: 500 14px/1.3 var(--font); color: var(--muted); }
.preview__lock { display: flex; align-items: center; gap: 6px; font: 650 14.5px/1.3 var(--font); color: var(--gold); }
.preview__lock .icon svg { width: 17px; height: 17px; }
.preview__blurb { font: 400 15px/1.5 var(--font); color: rgba(244, 246, 245, 0.86); }

/* Landscape phone: the sheet becomes a left-hand panel (like Maps), the title moves over the map
   beside it, and the tab bar goes compact. trail.js pads the camera to match (see updatePadding). */
@media (orientation: landscape) and (max-height: 500px) {
  :root { --tabbar-h: calc(44px + var(--sab)); --side-sheet-w: min(400px, 50vw); }
  .tabbar__item { flex-direction: row; gap: 7px; min-height: 44px; padding-top: 0; font-size: 12.5px; }
  .tabbar__icon svg { width: 23px; height: 23px; }
  .sheet { left: calc(var(--sal) + 10px); right: auto; width: var(--side-sheet-w); }
  .trail__top { left: calc(var(--sal) + 10px + var(--side-sheet-w) + 12px); }
  .tab--trail .trail__map { --tm-map-ctrl-top: calc(116px + var(--offline-shift, 0px)); }
  body[data-tab="trail"]:not(.is-login):not(.is-picker) .install { left: calc(var(--sal) + 10px + var(--side-sheet-w) + 12px); }
}

/* ---------------------------------------------------------------- picker */
.picker { color: var(--text); }
.picker--tab {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: calc(var(--sat) + 22px) calc(var(--sar) + 16px) calc(var(--tabbar-h) + 28px) calc(var(--sal) + 16px);
  background:
    radial-gradient(120% 50% at 80% 0%, rgba(245, 196, 81, 0.16), transparent 60%),
    radial-gradient(100% 60% at 0% 20%, rgba(52, 120, 110, 0.35), transparent 60%),
    linear-gradient(180deg, #0f1c22, #0c1215 60%);
}
.picker--page { padding: 8px 16px calc(var(--sab) + 24px); }
.picker__head { padding: 6px 4px 22px; max-width: 560px; margin: 0 auto; }
.picker__kicker { font: 700 12px/1 var(--font); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.picker__title { margin-top: 10px; font: 800 32px/1.1 var(--font-display); letter-spacing: -0.02em; }
.picker__sub { margin-top: 8px; font: 400 15.5px/1.45 var(--font); color: var(--muted); }
.picker__list { display: flex; flex-direction: column; gap: 18px; max-width: 560px; margin: 0 auto; }
.xcard {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 26px;
  overflow: hidden;
  text-align: left;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35), inset 0 0 0 0.5px rgba(255, 255, 255, 0.1);
  transition: transform 0.18s var(--ease-out);
}
.xcard:active { transform: scale(0.98); }
.xcard { position: relative; }
.xcard.is-featured::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1.5px rgba(245, 196, 81, 0.6);
  pointer-events: none;
}
.xcard--skeleton { height: 330px; background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.1), rgba(255,255,255,.05)) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
.xcard__hero {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    radial-gradient(90% 80% at 80% 10%, rgba(255, 255, 255, 0.16), transparent 60%),
    linear-gradient(150deg, var(--stamp, #1d5e57), color-mix(in srgb, var(--stamp, #1d5e57) 40%, #081013));
}
.xcard__hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s; }
.xcard__hero.is-loaded img { opacity: 1; }
.xcard__hero.is-loaded .xcard__motif { opacity: 0; }
.xcard__motif { position: absolute; right: -8px; top: 0; opacity: 1; transition: opacity 0.4s; }
.xcard__motif svg { width: 190px; height: 190px; }
.xcard__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, transparent 32%, transparent 45%, rgba(0, 0, 0, 0.72) 100%); }
.xcard__title { position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; align-items: flex-end; gap: 12px; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45); }
.xcard__flag { font-size: 34px; line-height: 1; font-family: "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.xcard__name { font: 780 23px/1.15 var(--font-display); letter-spacing: -0.015em; color: #fff; }
.xcard__region { margin-top: 2px; font: 500 13.5px/1.3 var(--font); color: rgba(255, 255, 255, 0.85); }
.xcard__ribbon {
  position: absolute;
  top: 18px;
  left: -38px;
  width: 150px;
  padding: 6px 0;
  transform: rotate(-38deg);
  text-align: center;
  background: linear-gradient(180deg, #ffd977, #f0b53a);
  color: #2a1f05;
  font: 800 11px/1 var(--font);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.xcard__done {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px 0 7px;
  border-radius: 14px;
  background: rgba(16, 20, 24, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--gold);
  font: 700 12px/1 var(--font);
}
.xcard__done .icon svg { width: 15px; height: 15px; }
.xcard__body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.xcard__tagline { font: 600 15.5px/1.4 var(--font); }
.xcard__season {
  font: 400 12.5px/1.45 var(--font);
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* start sheet */
.start { display: flex; flex-direction: column; gap: 14px; }
.start__hero {
  position: relative;
  margin: 0 -2px;
  aspect-ratio: 16 / 8;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(150deg, var(--stamp, #1d5e57), #081013);
}
.start__hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s; }
.start__hero.is-loaded img { opacity: 1; }
.start__title { display: flex; align-items: center; gap: 12px; }
.start__flag { font-size: 34px; font-family: "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.start__name { font: 780 24px/1.15 var(--font-display); letter-spacing: -0.015em; }
.start__region { font: 500 14px/1.3 var(--font); color: var(--muted); }
.start__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.start__stat { padding: 10px 8px; border-radius: 16px; background: rgba(255, 255, 255, 0.07); text-align: center; display: flex; flex-direction: column; gap: 3px; }
.start__stat b { font: 780 19px/1.1 var(--font-round); }
.start__stat span { font: 500 11.5px/1.2 var(--font); color: var(--muted); }
.start__desc { font: 500 15.5px/1.45 var(--font); }
.start__desc--long { font-weight: 400; font-size: 14.5px; color: rgba(244, 246, 245, 0.84); }
.start__season, .start__note { font: 400 13.5px/1.45 var(--font); color: var(--muted); }
.start__season b { color: var(--text); font-weight: 650; }
.start__note { color: var(--gold); }
.start__when { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.start__date { display: flex; flex-direction: column; gap: 6px; }
.legs { list-style: none; display: flex; flex-direction: column; gap: 2px; border-radius: 18px; background: rgba(255, 255, 255, 0.05); padding: 6px 12px; }
.legs__loading { padding: 10px 0; color: var(--muted); font-size: 14px; }
.legs__item { display: flex; gap: 12px; padding: 9px 0; border-bottom: 0.5px solid rgba(255, 255, 255, 0.1); }
.legs__item:last-child { border-bottom: 0; }
.legs__num { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(245, 196, 81, 0.18); color: var(--gold); font: 750 12.5px/1 var(--font-round); }
.legs__text { flex: 1; min-width: 0; }
.legs__name { display: flex; justify-content: space-between; gap: 8px; font: 650 15px/1.3 var(--font); }
.legs__mi { color: var(--muted); font-weight: 600; }
.legs__ends { font: 400 12.5px/1.35 var(--font); color: var(--muted); }
.legs__hop { margin-top: 4px; font: 500 12.5px/1.35 var(--font); color: #9fd3ff; }

.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 14px; background: rgba(127, 127, 127, 0.18); }
.seg__btn { min-height: 40px; border: 0; border-radius: 11px; background: transparent; font: 600 14.5px/1 var(--font); color: inherit; transition: background 0.2s, box-shadow 0.2s; }
.seg__btn.is-on { background: rgba(255, 255, 255, 0.92); color: #111; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }

/* ---------------------------------------------------------------- forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.field--narrow { flex: 0 0 120px; }
.field-row { display: flex; gap: 12px; }
.field__label { font: 600 13px/1.2 var(--font); color: var(--p-muted); }
.theme-glass .field__label, .start .field__label { color: var(--muted); }
.field__input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--p-sep);
  background: var(--p-input);
  color: var(--p-text);
  font: 500 17px/1.2 var(--font);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field__input:focus { outline: none; border-color: var(--p-accent); box-shadow: 0 0 0 3px var(--p-accent-soft); }
.theme-glass .field__input, .start .field__input {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--text);
  color-scheme: dark;
}
.theme-glass .field__input:focus, .start .field__input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245, 196, 81, 0.25); }
.field__hint { font: 400 12.5px/1.45 var(--font); color: var(--p-muted); }
.start .field__hint, .theme-glass .field__hint { color: var(--muted); }
.form__error { min-height: 0; font: 600 13.5px/1.35 var(--font); color: var(--p-danger); }
.start .form__error { color: var(--danger); }
.form__error:empty { display: none; }
.form__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------------------------------------------------------------- modal sheets */
#overlays { position: relative; z-index: 50; }
.msheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.msheet__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); opacity: 0; transition: opacity 0.35s; }
.msheet.is-open .msheet__backdrop { opacity: 1; }
.msheet__panel {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: calc(100% - var(--sat) - 12px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 0 calc(var(--sar) + 18px) calc(var(--sab) + 20px) calc(var(--sal) + 18px);
  transform: translateY(105%);
  transition: transform 0.48s var(--ease-sheet);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35);
}
.msheet.is-open .msheet__panel { transform: none; }
.msheet__panel.is-dragging { transition: none; }
.msheet__panel.theme-glass {
  background: rgba(24, 29, 34, 0.94);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  backdrop-filter: blur(30px) saturate(170%);
  color: var(--text);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35), inset 0 0.5px 0 rgba(255, 255, 255, 0.14);
}
.msheet__panel.theme-page { background: var(--p-bg); color: var(--p-text); }
.msheet__grabber { width: 38px; height: 5px; border-radius: 3px; margin: 8px auto 4px; background: rgba(127, 127, 127, 0.45); }
.msheet__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 12px;
}
.msheet__titles { min-width: 0; }
.msheet__title { font: 750 21px/1.2 var(--font-display); letter-spacing: -0.01em; }
.msheet__subtitle { margin-top: 2px; font: 500 14px/1.3 var(--font); color: var(--muted); }
.theme-page .msheet__subtitle { color: var(--p-muted); }
.msheet__close { margin-left: auto; flex: none; }
.msheet__body { padding-bottom: 4px; }
.msheet--start .msheet__head, .msheet--picker .msheet__head { position: absolute; top: 10px; right: calc(var(--sar) + 14px); padding: 0; }
.msheet--start .msheet__close, .msheet--picker .msheet__close { background: rgba(16, 20, 24, 0.6); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.msheet--start .msheet__body { padding-top: 6px; }
.msheet--picker .msheet__panel { height: calc(100% - var(--sat) - 10px); padding: 0; background: #0e171b; }
.msheet--picker .msheet__grabber { position: absolute; left: 50%; margin-left: -19px; top: 0; z-index: 3; }
.msheet--picker .picker { padding-top: 26px; }

/* action sheet */
.asheet { position: fixed; inset: 0; z-index: 65; display: flex; align-items: flex-end; justify-content: center; }
.asheet__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); opacity: 0; transition: opacity 0.3s; }
.asheet.is-open .asheet__backdrop { opacity: 1; }
.asheet__panel {
  position: relative;
  width: min(100% - 16px, 520px);
  margin-bottom: calc(var(--sab) + 8px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(110%);
  transition: transform 0.42s var(--ease-sheet);
}
.asheet.is-open .asheet__panel { transform: none; }
.asheet__group, .asheet__cancel {
  border-radius: 16px;
  overflow: hidden;
  background: rgba(30, 35, 40, 0.92);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  backdrop-filter: blur(30px) saturate(170%);
  color: var(--text);
}
.asheet__header { padding: 14px 16px 12px; text-align: center; border-bottom: 0.5px solid rgba(255, 255, 255, 0.12); }
.asheet__title { font: 650 13.5px/1.3 var(--font); color: var(--muted); }
.asheet__message { margin-top: 2px; font: 400 13px/1.35 var(--font); color: var(--muted); }
.asheet__btn {
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 18px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  text-align: left;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
}
.asheet__btn:last-child { border-bottom: 0; }
.asheet__btn:active { background: rgba(255, 255, 255, 0.08); }
.asheet__icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, 0.1); color: #9fd3ff; }
.asheet__icon svg { width: 20px; height: 20px; }
.asheet__label { display: flex; flex-direction: column; font: 600 17px/1.2 var(--font); }
.asheet__label small { font: 400 13px/1.3 var(--font); color: var(--muted); margin-top: 2px; }
.asheet__btn.is-destructive { color: var(--danger); }
.asheet__cancel { min-height: 57px; border: 0; font: 650 17px/1 var(--font); color: #9fd3ff; }

/* alert */
.alert { position: fixed; inset: 0; z-index: 66; display: grid; place-items: center; padding: 24px; background: rgba(0, 0, 0, 0.42); opacity: 0; transition: opacity 0.2s; }
.alert.is-open { opacity: 1; }
.alert__box {
  width: min(100%, 290px);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(36, 40, 46, 0.94);
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
  color: var(--text);
  text-align: center;
  transform: scale(1.08);
  transition: transform 0.25s var(--ease-out);
}
.alert.is-open .alert__box { transform: none; }
.alert__text { padding: 20px 18px 16px; }
.alert__title { font: 650 17px/1.3 var(--font); }
.alert__message { margin-top: 6px; font: 400 13.5px/1.4 var(--font); color: rgba(244, 246, 245, 0.8); }
.alert__btns { display: grid; grid-template-columns: 1fr 1fr; border-top: 0.5px solid rgba(255, 255, 255, 0.14); }
.alert__btn { min-height: 48px; border: 0; background: transparent; color: #9fd3ff; font: 500 17px/1 var(--font); }
.alert__btn + .alert__btn { border-left: 0.5px solid rgba(255, 255, 255, 0.14); }
.alert__btn.is-primary { font-weight: 650; }
.alert__btn.is-destructive { color: var(--danger); }

/* toasts */
.toasts {
  position: fixed;
  z-index: 80;
  top: calc(var(--sat) + 10px);
  left: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 10px 10px 16px;
  border-radius: 22px;
  background: rgba(24, 28, 33, 0.92);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  color: var(--text);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 0 0 0.5px rgba(255, 255, 255, 0.14);
  font: 550 14.5px/1.35 var(--font);
  transform: translateY(-16px) scale(0.96);
  opacity: 0;
  transition: transform 0.35s var(--ease-sheet), opacity 0.25s;
}
.toast.is-in { transform: none; opacity: 1; }
.toast::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #9fd3ff; }
.toast--success::before { background: #5fd68f; }
.toast--warn::before { background: var(--gold); }
.toast--error::before { background: var(--danger); }
.toast__text { padding-right: 6px; }
.toast__action { flex: none; min-height: 34px; padding: 0 14px; border: 0; border-radius: 17px; background: var(--gold); color: #2a1f05; font: 700 14px/1 var(--font); }

/* ---------------------------------------------------------------- postcards */
.pc-modal { position: fixed; inset: 0; z-index: 58; opacity: 0; transition: opacity 0.3s; }
.pc-modal.is-open { opacity: 1; }
.pc-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(100% 70% at 50% 30%, rgba(40, 52, 58, 0.55), rgba(8, 10, 12, 0.82));
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
}
.pc-backdrop--navy { background: radial-gradient(120% 80% at 50% 0%, #1d3a75, #0a1530 70%); -webkit-backdrop-filter: none; backdrop-filter: none; }
.pc-scroll {
  position: relative;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(var(--sat) + 24px) calc(var(--sar) + 18px) calc(var(--sab) + 24px) calc(var(--sal) + 18px);
}
.pc-scroll > :first-child { margin-top: auto; }
.pc-scroll > :last-child { margin-bottom: auto; }
.postcard { width: min(100%, 380px); transform: rotate(-1.2deg); }
.pc-modal.is-open .postcard { animation: pc-in 0.75s cubic-bezier(0.2, 0.9, 0.25, 1.12) both; }
@keyframes pc-in {
  from { transform: translateY(70px) rotate(-7deg) scale(0.88); opacity: 0; }
  to { transform: rotate(-1.2deg); opacity: 1; }
}
.postcard__paper {
  --ink: #3b2f22;
  position: relative;
  padding: 12px 12px 16px;
  border-radius: 7px;
  color: var(--ink);
  background:
    radial-gradient(60% 40% at 15% 8%, rgba(255, 255, 255, 0.65), transparent 70%),
    radial-gradient(70% 50% at 95% 100%, rgba(176, 140, 84, 0.22), transparent 70%),
    radial-gradient(40% 30% at 85% 30%, rgba(176, 140, 84, 0.08), transparent 70%),
    repeating-linear-gradient(115deg, rgba(120, 90, 50, 0.025) 0 2px, transparent 2px 5px),
    linear-gradient(180deg, #f9f2e2, #efe3c8);
  box-shadow: 0 34px 70px rgba(0, 0, 0, 0.5), 0 3px 8px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(120, 90, 50, 0.12);
}
.pc-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 8px solid #fffdf8;
  background: linear-gradient(145deg, #5a7a6a, #2b3f36);
  box-shadow: 0 2px 6px rgba(60, 40, 10, 0.22);
}
.pc-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s; filter: saturate(1.05) contrast(1.02) sepia(0.08); }
.pc-photo.is-loaded img { opacity: 1; }
.pc-photo.is-loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.12), rgba(255,255,255,0)) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
.pc-photo__fallback { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(160deg, #e9b77a 0%, #a6876a 35%, #4f6f63 70%, #2b3f36 100%); }
.pc-photo__fallback[data-kind="waterfall"], .pc-photo__fallback[data-kind="lake"], .pc-photo__fallback[data-kind="beach"] { background: linear-gradient(160deg, #f1c98b, #7fa7b5 45%, #2e5566); }
.pc-photo__emoji { font-size: 64px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3)); font-family: "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.postcard__body { position: relative; padding: 16px 6px 0; }
.pc-stamps { position: absolute; top: -46px; right: -2px; width: 150px; height: 116px; pointer-events: none; }
.pc-stamp { position: absolute; right: 0; top: 0; transform: rotate(5deg); filter: drop-shadow(0 2px 3px rgba(60, 40, 10, 0.3)); }
.pc-modal.is-open .pc-stamp { animation: stamp-in 0.5s 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
.pc-postmark { position: absolute; right: 40px; top: -4px; color: rgba(45, 32, 28, 0.62); transform: rotate(-14deg); mix-blend-mode: multiply; }
.pc-modal.is-open .pc-postmark { animation: postmark-in 0.35s 1.05s ease-out both; }
@keyframes stamp-in { from { transform: rotate(-10deg) scale(1.9); opacity: 0; } to { transform: rotate(5deg) scale(1); opacity: 1; } }
@keyframes postmark-in { from { transform: rotate(-14deg) scale(1.25); opacity: 0; } to { transform: rotate(-14deg) scale(1); opacity: 1; } }
.pc-greeting { max-width: calc(100% - 118px); font: italic 600 12.5px/1.2 var(--font-serif); letter-spacing: 0.14em; text-transform: uppercase; color: #95703f; }
.pc-name { max-width: calc(100% - 96px); margin-top: 4px; font: italic 700 31px/1.04 var(--font-serif); letter-spacing: -0.01em; color: #2b2118; }
.pc-meta { margin-top: 8px; font: 650 12.5px/1.35 var(--font); color: #7a6650; }
.pc-blurb { margin-top: 12px; font: 400 16px/1.5 var(--font-serif); color: var(--ink); }
.pc-fact { margin-top: 14px; padding: 10px 12px 11px; border-left: 3px solid var(--stamp); border-radius: 0 12px 12px 0; background: rgba(255, 255, 255, 0.5); }
.pc-fact__label { font: 800 10.5px/1.2 var(--font); letter-spacing: 0.14em; text-transform: uppercase; color: var(--stamp); }
.pc-fact p { margin-top: 4px; font: italic 400 15px/1.45 var(--font-serif); color: var(--ink); }
.pc-sign { margin-top: 14px; font: italic 400 14.5px/1.4 var(--font-serif); color: #6b5843; }
.pc-sign__who { font-weight: 700; color: color-mix(in srgb, var(--c) 70%, #2b2118); }
.pc-credit { display: block; margin-top: 10px; font: 400 10.5px/1.35 var(--font); color: #9a8669; text-decoration: none; }
/* The buttons follow the card (a sticky bar hid the signature line under them); on a long card you
   scroll a little, and tapping outside the card also closes it. */
.pc-actions {
  position: relative;
  bottom: 0;
  z-index: 2;
  width: min(100%, 380px);
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
/* A soft shade under the floating buttons so they read over the card; it falls on the dark backdrop once
   the card has scrolled past. */
.pc-actions::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -18px;
  right: -18px;
  top: -30px;
  bottom: calc(-1 * (var(--sab) + 24px));
  background: none;
  pointer-events: none;
}
.pc-actions .pc-btn { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38); }
.pc-actions .pc-btn--ghost { background: rgba(28, 33, 38, 0.78); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38), inset 0 0 0 0.5px rgba(255, 255, 255, 0.2); }
.pc-btn {
  flex: 1;
  min-height: 52px;
  padding: 0 16px;
  border: 0;
  border-radius: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 650 16px/1.1 var(--font);
  transition: transform 0.12s;
}
.pc-btn:active { transform: scale(0.97); }
.pc-btn .icon svg { width: 20px; height: 20px; }
.pc-btn--primary { background: #fff; color: #111; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3); }
.pc-btn--ghost { background: rgba(255, 255, 255, 0.14); color: #fff; box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.2); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.pc-btn--gold { background: linear-gradient(180deg, #ffd977, #f0b53a); color: #2a1f05; box-shadow: 0 10px 26px rgba(245, 196, 81, 0.3); }

/* Landscape phone: a real postcard layout, photo left and message right. */
@media (orientation: landscape) and (max-height: 500px) {
  .pc-scroll { padding: calc(var(--sat) + 14px) calc(var(--sar) + 18px) calc(var(--sab) + 12px) calc(var(--sal) + 18px); }
  .postcard { width: min(100%, 760px); }
  .postcard__paper { display: grid; grid-template-columns: 44% minmax(0, 1fr); column-gap: 16px; align-items: start; }
  .postcard__body { padding: 4px 2px 0; }
  .pc-stamps { top: -4px; right: -4px; transform: scale(0.82); transform-origin: top right; }
  .pc-greeting, .pc-name, .pc-meta { max-width: calc(100% - 124px); }
  .pc-name { font-size: 27px; }
  .pc-blurb { font-size: 15px; }
  .pc-actions { position: static; width: min(100%, 760px); margin-top: 14px; }
  .pc-actions::before { display: none; }
}
.pc-close {
  position: absolute;
  z-index: 3;
  top: calc(var(--sat) + 8px);
  right: calc(var(--sar) + 12px);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.confetti { position: fixed; inset: 0; z-index: 70; width: 100vw; height: 100vh; pointer-events: none; }

/* finish ceremony */
.finish__page { width: min(100%, 400px); text-align: center; color: #fff; }
.finish__kicker { font: 700 12.5px/1 var(--font); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.finish__title { margin-top: 10px; font: italic 700 32px/1.1 var(--font-serif); letter-spacing: -0.01em; }
.finish__stamp-wrap {
  width: 248px;
  height: 248px;
  margin: 22px auto 18px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background:
    repeating-linear-gradient(0deg, rgba(120, 90, 50, 0.05) 0 1px, transparent 1px 7px),
    radial-gradient(70% 60% at 30% 20%, rgba(255, 255, 255, 0.6), transparent 70%),
    linear-gradient(180deg, #f8f1e1, #ecdfc2);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(120, 90, 50, 0.15);
}
.finish__stamp { opacity: 0; transform: scale(2.2) rotate(-24deg); }
.pc-modal--finish.is-stamped .finish__stamp { animation: thump 0.5s cubic-bezier(0.3, 1.35, 0.5, 1) both; }
.pc-modal--finish.is-stamped .finish__stamp-wrap { animation: shake-soft 0.35s 0.32s both; }
@keyframes thump { from { opacity: 0; transform: scale(2.2) rotate(-24deg); } 70% { opacity: 1; } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes shake-soft { 30% { transform: translate(2px, 3px); } 60% { transform: translate(-2px, -1px); } }
.finish__summary { font: 500 17px/1.45 var(--font); color: rgba(255, 255, 255, 0.86); }
.finish__split { display: flex; gap: 3px; height: 10px; margin: 16px auto 0; max-width: 300px; border-radius: 5px; overflow: hidden; }
.finish__bar { background: var(--c); }
.finish__legend { list-style: none; display: flex; justify-content: center; gap: 18px; margin-top: 10px; font: 500 14px/1.3 var(--font); color: rgba(255, 255, 255, 0.82); }
.finish__legend li { display: flex; align-items: center; gap: 6px; }
.finish__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.finish__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.finish .datenight { margin-top: 24px; }

.datenight {
  text-align: left;
  border-radius: 22px;
  padding: 16px 16px 6px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.12);
  color: var(--text);
}
.datenight__kicker { font: 700 11px/1 var(--font); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.datenight__title { margin-top: 6px; font: italic 700 24px/1.1 var(--font-serif); }
.datenight__list { list-style: none; margin-top: 10px; }
.datenight__item { display: flex; gap: 12px; padding: 10px 0; border-top: 0.5px solid rgba(255, 255, 255, 0.1); }
.datenight__emoji { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); font-size: 19px; font-family: "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.datenight__label { font: 700 12px/1.3 var(--font); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.datenight__text { margin-top: 2px; font: 400 14.5px/1.45 var(--font); }

/* ---------------------------------------------------------------- pages (Journal / Passport / Settings) */
.page {
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--p-bg);
  color: var(--p-text);
  color-scheme: light;
  padding-bottom: calc(var(--tabbar-h) + 32px);
}
@media (prefers-color-scheme: dark) { .page { color-scheme: dark; } }
.page__hero {
  position: relative;
  padding: calc(var(--sat) + 22px) calc(var(--sar) + 20px) 26px calc(var(--sal) + 20px);
  color: #fff;
  border-radius: 0 0 30px 30px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='160' viewBox='0 0 240 160'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.07' stroke-width='1.2'%3E%3Cpath d='M-10 120c40-30 70-10 100-30s50-50 90-40 60 40 80 30'/%3E%3Cpath d='M-10 100c40-30 70-10 100-30s50-50 90-40 60 40 80 30'/%3E%3Cpath d='M-10 140c40-30 70-10 100-30s50-50 90-40 60 40 80 30'/%3E%3Cpath d='M-10 80c40-30 70-10 100-30s50-50 90-40 60 40 80 30'/%3E%3Cpath d='M-10 60c40-30 70-10 100-30s50-50 90-40 60 40 80 30'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 240px 160px,
    radial-gradient(120% 90% at 100% 0%, rgba(245, 196, 81, 0.22), transparent 55%),
    linear-gradient(160deg, #184449 0%, #10262f 60%, #0d1b24 100%);
  box-shadow: 0 10px 30px rgba(10, 20, 24, 0.18);
}
.page__hero-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page__title { font: 800 34px/1.1 var(--font-display); letter-spacing: -0.025em; }
.page__sub { margin-top: 6px; font: 500 15.5px/1.35 var(--font); color: rgba(255, 255, 255, 0.76); }
.page__action {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.25);
}
.page__action:focus-visible { --focus: #fff; }
.page__body { max-width: 640px; margin: 0 auto; padding: 6px calc(var(--sar) + 16px) 0 calc(var(--sal) + 16px); }
.page__body > :first-child { margin-top: 18px; }
.psection { margin-top: 28px; }
.psection__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 4px 10px; }
.psection__title { font: 750 21px/1.2 var(--font-display); letter-spacing: -0.015em; }
.psection__meta { font: 500 13.5px/1.2 var(--font); color: var(--p-muted); }
.pcard {
  border-radius: var(--radius);
  padding: 16px;
  background: var(--p-card);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
}
@media (prefers-color-scheme: dark) { .pcard { box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.06); } }
.pcard--flush { padding: 0; overflow: hidden; }
.pcard__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.pcard__title { font: 700 17px/1.2 var(--font); }
.pcard__meta { font: 600 13.5px/1 var(--font); color: var(--p-muted); }
.pcard .empty__sub { color: var(--p-muted); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; font: 500 12.5px/1.2 var(--font); color: var(--p-muted); }
.legend__item { display: inline-flex; align-items: center; gap: 6px; }
.legend__item i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.legend__item--gold i { background: var(--gold); box-shadow: 0 0 0 1.5px rgba(217, 154, 43, 0.5); }

/* journal: mini postcards */
.pc-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  margin: 0 -16px;
  padding: 6px 16px 18px;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.pc-row::-webkit-scrollbar { display: none; }
.mini-pc {
  flex: none;
  width: 150px;
  padding: 7px 7px 10px;
  border: 0;
  border-radius: 5px;
  scroll-snap-align: start;
  text-align: left;
  color: var(--paper-ink);
  background:
    radial-gradient(60% 40% at 20% 10%, rgba(255, 255, 255, 0.6), transparent 70%),
    linear-gradient(180deg, #f9f2e2, #efe3c8);
  box-shadow: 0 8px 18px rgba(30, 20, 5, 0.16), 0 1px 3px rgba(30, 20, 5, 0.12);
  transform: rotate(-1.2deg);
  transition: transform 0.2s var(--ease-out);
}
.mini-pc:nth-child(even) { transform: rotate(1.3deg); }
.mini-pc:active { transform: scale(0.96); }
.mini-pc__photo {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 4px solid #fffdf8;
  font-size: 30px;
  background: linear-gradient(160deg, #e9b77a 0%, #a6876a 40%, #4f6f63 100%);
  font-family: "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}
.mini-pc__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s; }
.mini-pc__photo.is-loaded img { opacity: 1; }
.mini-pc__name {
  margin-top: 8px;
  min-height: 2.4em; /* two lines, so a row of cards lines up */
  font: italic 700 15px/1.2 var(--font-serif);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mini-pc__date { display: block; margin-top: 2px; font: 600 11.5px/1.2 var(--font); color: var(--paper-muted); }

/* journal: daily log */
.daylog { list-style: none; }
.day { padding: 14px 16px; border-bottom: 0.5px solid var(--p-sep); }
.day:last-child { border-bottom: 0; }
.day__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.day__date { font: 680 15.5px/1.2 var(--font); }
.day__total { font: 750 15.5px/1.2 var(--font-round); }
.day__bar { display: flex; gap: 2px; height: 6px; min-width: 6px; margin: 9px 0 8px; border-radius: 3px; overflow: hidden; }
.day__bar span { background: var(--c); }
.day__people { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.day__person { display: grid; grid-template-columns: 26px auto 1fr 28px; align-items: center; gap: 10px; min-height: 32px; font: 400 14px/1.3 var(--font); }
.day__person .avatar { --s: 26px; }
.day__name { font-weight: 600; }
.day__nums { justify-self: end; color: var(--p-muted); white-space: nowrap; }
.day__nums b { color: var(--p-text); font-weight: 700; }
.day__none { justify-self: end; color: var(--p-muted); font-size: 13px; }
.day__person.is-empty { opacity: 0.6; }
.day__person.is-empty .day__none { grid-column: 3 / 5; }
.day__src { justify-self: end; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.day__src .icon svg { width: 15px; height: 15px; }
.day__src--shortcut { background: linear-gradient(135deg, #3f6cf3, #c446d9); }
.day__src--hae { background: linear-gradient(135deg, #ff5f6d, #ff2d55); }
.day__src--manual { background: rgba(127, 127, 127, 0.25); color: var(--p-text); }

/* passport */
.page--passport .passport__cover + .page__body > :first-child { margin-top: 8px; }
.passport__cover {
  position: relative;
  overflow: hidden;
  padding: calc(var(--sat) + 22px) 24px 26px;
  text-align: center;
  color: #e9c46a;
  border-radius: 0 0 32px 32px;
  background:
    repeating-radial-gradient(circle at 50% 120%, rgba(233, 196, 106, 0.05) 0 1px, transparent 1px 9px),
    radial-gradient(120% 80% at 50% 0%, #22427f, #0f1d42 70%);
  box-shadow: 0 14px 34px rgba(12, 22, 52, 0.28), inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}
.passport__cover::after { /* stitched edge */
  content: "";
  position: absolute;
  inset: 8px 8px 8px;
  border: 1.5px dashed rgba(233, 196, 106, 0.22);
  border-top: 0;
  border-radius: 0 0 26px 26px;
  pointer-events: none;
}
.passport__country { font: 650 10.5px/1.2 var(--font); letter-spacing: 0.24em; text-transform: uppercase; color: rgba(233, 196, 106, 0.8); }
.passport__emblem { width: 96px; height: 96px; margin: 16px auto 8px; color: #e9c46a; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.5)) drop-shadow(0 0 14px rgba(233, 196, 106, 0.25)); }
.passport__emblem svg { width: 100%; height: 100%; }
.passport__title {
  font: 700 30px/1 Georgia, var(--font-serif);
  letter-spacing: 0.36em;
  margin-right: -0.36em;
  background: linear-gradient(180deg, #fff1bf 0%, #e9c46a 55%, #b8862d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.45));
}
.passport__holders { margin-top: 10px; font: italic 500 17px/1.3 var(--font-serif); color: rgba(255, 255, 255, 0.84); }
.passport__stats { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.passport__stat { min-width: 86px; padding: 9px 10px; border-radius: 16px; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(233, 196, 106, 0.22); display: flex; flex-direction: column; gap: 4px; }
.passport__stat b { font: 750 20px/1 var(--font-round); color: #fbe7a6; }
.passport__stat span { font: 600 10.5px/1 var(--font); letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.62); }
.passport-page {
  border-radius: var(--radius);
  padding: 20px 10px 16px;
  color: var(--paper-ink);
  background:
    repeating-linear-gradient(0deg, rgba(120, 90, 50, 0.045) 0 1px, transparent 1px 8px),
    radial-gradient(80% 60% at 20% 10%, rgba(255, 255, 255, 0.55), transparent 70%),
    linear-gradient(180deg, #f8f1e1, #efe3c8);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 10px 26px rgba(60, 40, 10, 0.1), inset 0 0 0 1px rgba(120, 90, 50, 0.12);
}
@media (prefers-color-scheme: dark) { .passport-page { filter: brightness(0.93); } }
.stamp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 6px; }
.stamp-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.stamp-tile svg { width: 132px; height: 132px; max-width: 100%; }
.stamp-tile figcaption { display: flex; flex-direction: column; gap: 1px; padding: 0 4px; }
.stamp-tile figcaption b { font: 680 13.5px/1.25 var(--font); color: var(--paper-ink); }
.stamp-tile figcaption span { font: 500 11.5px/1.3 var(--font); color: var(--paper-muted); }
.stamp-tile.is-locked { color: #b6a585; }
.stamp-tile.is-progress { color: #8a7458; }
.stamp-tile.is-progress figcaption span { color: #9a6a12; font-weight: 650; }

.guide-grid { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.guide {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-bottom: 12px;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--p-card);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 22px rgba(0, 0, 0, 0.05);
}
@media (prefers-color-scheme: dark) { .guide { box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.06); } }
.guide__photo {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  font-size: 36px;
  background: linear-gradient(145deg, #c9dccb, #8fb39a);
  font-family: "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}
@media (prefers-color-scheme: dark) { .guide__photo { background: linear-gradient(145deg, #2d4a35, #18271c); } }
.guide__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s; }
.guide__photo.is-loaded img { opacity: 1; }
.guide__name { padding: 10px 12px 0; font: 680 14.5px/1.25 var(--font); }
.guide__sci { padding: 1px 12px 0; font: italic 400 13px/1.3 var(--font-serif); color: var(--p-muted); }
.guide__meta { display: flex; align-items: center; gap: 6px; margin-top: auto; padding: 8px 12px 0; font: 500 11.5px/1.2 var(--font); color: var(--p-muted); }
.guide__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

.xlist { list-style: none; }
.xlist li + li .xlist__row { border-top: 0.5px solid var(--p-sep); }
.xlist__row {
  width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: var(--p-text);
  text-align: left;
}
.xlist__row:active { background: var(--p-sep); }
.xlist__flag { font-size: 28px; font-family: "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.xlist__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.xlist__name { font: 650 15.5px/1.25 var(--font); }
.xlist__badge { display: inline-block; margin-left: 6px; padding: 2px 6px; border-radius: 6px; vertical-align: 1px; background: rgba(245, 196, 81, 0.28); color: #8a5a00; font: 800 9.5px/1.2 var(--font); letter-spacing: 0.08em; text-transform: uppercase; }
@media (prefers-color-scheme: dark) { .xlist__badge { color: var(--gold); background: rgba(245, 196, 81, 0.16); } }
.xlist__meta { font: 400 12.5px/1.35 var(--font); color: var(--p-muted); }
.nowrap { white-space: nowrap; }
.xlist__status { flex: none; display: inline-flex; align-items: center; gap: 3px; font: 650 13px/1 var(--font); color: var(--p-accent); }
.xlist__status.is-current { color: #9a6a12; }
@media (prefers-color-scheme: dark) { .xlist__status.is-current { color: var(--gold); } }
.xlist__status.is-done { color: var(--p-muted); }
.xlist__status .icon svg { width: 15px; height: 15px; }
.xlist__chev svg { width: 16px; height: 16px; color: var(--p-muted); }

/* settings */
.settings__profile { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.settings__name { font: 700 18px/1.2 var(--font); }
.settings__sub { font: 500 13.5px/1.3 var(--font); color: rgba(255, 255, 255, 0.72); }
.btn--run { margin-bottom: 4px; }
.btn--run .icon svg { width: 20px; height: 20px; }
.sync__status { margin-top: 8px; text-align: center; font: 500 13px/1.3 var(--font); color: var(--p-muted); }
.steps { list-style: none; counter-reset: step; margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.steps li { counter-increment: step; position: relative; padding-left: 34px; font: 400 14.5px/1.45 var(--font); }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--p-accent-soft);
  color: var(--p-accent);
  font: 750 12.5px/1 var(--font-round);
}
.steps__more { margin-top: 14px; font: 400 13px/1.4 var(--font); color: var(--p-muted); }
.recipe { margin-top: 16px; border-top: 0.5px solid var(--p-sep); }
.recipe__summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
  list-style: none;
  cursor: pointer;
  font: 600 15px/1.3 var(--font);
  color: var(--p-accent);
}
.recipe__summary::-webkit-details-marker { display: none; }
.recipe__chev svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease-out); }
.recipe[open] .recipe__chev svg { transform: rotate(180deg); }
.recipe__note { font: 400 13px/1.45 var(--font); color: var(--p-muted); }
.recipe__list { list-style: none; counter-reset: act; margin-top: 10px; display: flex; flex-direction: column; }
.recipe__list li {
  counter-increment: act;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 9px 0 9px 34px;
  border-top: 0.5px solid var(--p-sep);
  font: 400 13.5px/1.4 var(--font);
  color: var(--p-muted);
}
.recipe__list li::before {
  content: counter(act);
  position: absolute;
  left: 0;
  top: 10px;
  width: 24px;
  height: 20px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--p-sep);
  color: var(--p-text);
  font: 700 11.5px/1 var(--font-round);
  font-variant-numeric: tabular-nums;
}
.recipe__list b { font-weight: 650; color: var(--p-text); }
code { font: 500 12.5px/1 var(--font-mono); padding: 2px 6px; border-radius: 6px; background: var(--p-sep); color: var(--p-text); }
.pcard + .pcard { margin-top: 12px; }
.kv { display: flex; align-items: center; gap: 8px; min-height: 64px; padding: 10px 12px 10px 16px; border-bottom: 0.5px solid var(--p-sep); }
.kv__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.kv__label { font: 600 12.5px/1.2 var(--font); color: var(--p-muted); }
.kv__value { font: 500 14.5px/1.3 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* URLs and tokens wrap rather than truncate: the end of the URL (/api/sync vs /api/hae) is the part that matters. */
.kv__value--mono { font: 500 13px/1.35 var(--font-mono); white-space: normal; overflow-wrap: anywhere; }
.kv__btn {
  position: relative;
  flex: none;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  border: 0;
  border-radius: 18px;
  background: var(--p-accent-soft);
  color: var(--p-accent);
  font: 650 13.5px/1 var(--font);
}
.kv__btn::before { content: ""; position: absolute; inset: -4px -2px; }
.kv__btn .icon svg { width: 16px; height: 16px; }
.kv__btn--plain { background: transparent; padding: 0 8px; }
.kv__btn.is-done { color: #fff; background: #2f9e6e; }
.kv__btn:disabled { opacity: 0.5; }
.list__row { padding: 0 6px; border-bottom: 0.5px solid var(--p-sep); }
.list__row:last-child { border-bottom: 0; }
.pcard:not(.pcard--flush) .list__row { padding: 0; border: 0; }
.list__row--switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 12px !important; }
.list__title { font: 600 16px/1.3 var(--font); }
.list__sub { margin-top: 2px; font: 400 13px/1.35 var(--font); color: var(--p-muted); }
.list__btn {
  position: relative;
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--p-accent);
  font: 500 16px/1.2 var(--font);
  text-align: left;
}
.list__btn .icon svg { width: 21px; height: 21px; }
.list__btn--warn { color: var(--p-warn); }
.list__btn--danger { color: var(--p-danger); }
.list__btn.is-busy { opacity: 0.5; }
.notif__text { font: 400 14.5px/1.45 var(--font); }
.switch {
  position: relative;
  flex: none;
  width: 51px;
  height: 31px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: rgba(120, 120, 128, 0.32);
  transition: background 0.25s;
}
.switch::before { content: ""; position: absolute; inset: -7px -4px; }
.switch__knob { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18), 0 1px 1px rgba(0, 0, 0, 0.12); transition: transform 0.25s var(--ease-out); }
.switch.is-on { background: #34c759; }
.switch.is-on .switch__knob { transform: translateX(20px); }
.switch:disabled { opacity: 0.45; }
.switch.is-busy { opacity: 0.6; }
.fund__now { font: 600 13.5px/1.2 var(--font); color: var(--p-muted); }
.settings__about { margin: 30px 8px 0; text-align: center; font: 400 12px/1.5 var(--font); color: var(--p-muted); }

/* ---------------------------------------------------------------- motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .postcard { transform: none; }
  .finish__stamp { opacity: 1; transform: none; }
  .jar__wave, .jar__coin { animation: none !important; }
}
