@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/BarlowCondensed-Bold.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/Barlow-SemiBold.ttf") format("truetype"); }

* {
  box-sizing: border-box;
}

:root {
  --mark-a: #173E35; --mark-b: #DC7045;   /* the logo: spruce + canyon orange */
  --sup-a: #5B8794; --sup-a-ink: #ffffff; --sup-b: #DC7045; --sup-b-ink: #ffffff; --sup-b-halo: rgba(220,112,69,.35);   /* supporter badges (Chad: option A, stars for both): alpine-blue star, canyon-orange star */
  /* ONE token set (PRD v3 look pass). Roles, not paint names:
     paper/card/line = surfaces · ink/ink-2/muted/label = text · action = the one tappable colour (coral) ·
     link = tappable text · select = "on" state · meter = data bars · badge = rank badges only (gold).
     The brand green lives in the logo only. Dark values: the block under "Dark" below. */
  --paper: #f6f4ee;
  --paper-deep: #ebe7dd;
  --card: #ffffff;
  --card-soft: rgba(255, 255, 255, 0.72);
  --line: #e2ddd3;
  --ink: #141a16;
  --ink-2: #3d4742;
  --muted: #58655f;
  --label: #55615b;
  --action: #f2634f;
  --action-deep: #d84a36;
  --on-action: #2a0d06;   /* dark text on coral: white was 3.2:1, under the 4.5 floor */
  --link: #b23a27;
  --seg-on: #ffffff;
  --select: #141a16;
  --on-select: #f6f4ee;
  --meter: #2f3a34;
  --badge: #f0be3c;
  --badge-ink: #8a6a12;
  --on-badge: #1a1a0f;
  --danger: #a8402a;
  --photo: #dcd8cd;
  --scrim: rgba(20, 26, 22, 0.45);
  --toast-bg: #1c211e;
  --toast-ink: #f6f4ee;
  --shadow: 0 10px 30px rgba(21, 29, 24, 0.10);
  --tab-h: 62px;
  --page-pad: clamp(10px, 2.5vw, 24px);
  --content-max: 1120px;
  --radius: 14px;
  color-scheme: light;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

html,
body,
#root {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--paper);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(27, 81, 54, 0.4);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  width: 100%;
  max-width: var(--content-max);
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  padding: max(var(--page-pad), env(safe-area-inset-top)) var(--page-pad) max(var(--page-pad), env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.top-bar {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  min-height: 40px;
  padding: 0 2px 10px;
}

.brand {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(20px, 4.6vw, 24px);
  font-weight: 700;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  line-height: 1;
  text-align: left;
}
.brand .brand-logo { width: 26px; height: 26px; display: block; }

.brand svg {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.progress-wrap {
  flex: 1 1 auto;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-track {
  flex: 1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(27, 81, 54, 0.14);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--action);
  transition: width 240ms ease;
}

.progress-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.top-note {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.screen-frame {
  flex: 1;
  min-height: 0;
}

.screen {
  height: 100%;
  min-height: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(30px, 6.4vw, 46px);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  text-wrap: balance;
}

p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.45;
}

/* ——— Start screen ——— */


.l-duel-zone {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}

.l-duel {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.park-card.l-won {
  box-shadow: 0 0 0 3px var(--action-deep), 0 12px 30px rgba(20, 32, 26, 0.2);
}

.park-card.l-lost {
  opacity: 0.55;
}

@keyframes lCardIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.l-duel.fresh .park-card {
  animation: lCardIn 360ms ease both;
}

.l-duel.fresh .park-card:nth-of-type(2) {
  animation-delay: 70ms;
}

/* Reveal chips sit at the duel seam and borrow the VS badge's spot while visible —
   they must never cover the park-name captions. */
.l-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 8;
  transform: translate(-50%, calc(-50% + 8px));
  width: max-content;
  max-width: min(92%, 460px);
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}

.l-chip.show {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.l-chip b,
.g-chip b {
  color: var(--ink);
}

.l-chip .l-verdict,
.g-chip .l-verdict {
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}

.duel-vs {
  transition: opacity 180ms ease;
}

.l-duel-zone:has(.l-chip.show) .duel-vs,
.duel:has(.g-chip) .duel-vs {
  opacity: 0;
}

/* In-game crowd reveal: self-fading, never delays the next pair. Removed from the
   DOM on animationend so the VS badge comes back between picks. */
.g-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 8;
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: min(92%, 460px);
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  animation: gChip 1600ms ease both;
}

@keyframes gChip {
  0% { opacity: 0; transform: translate(-50%, calc(-50% + 6px)); }
  12%, 76% { opacity: 1; transform: translate(-50%, -50%); }
  100% { opacity: 0; transform: translate(-50%, -50%); }
}

@media (prefers-reduced-motion: reduce) {
  .g-chip {
    animation: gChipStill 1600ms step-end both;
  }
  @keyframes gChipStill {
    0%, 76% { opacity: 1; transform: translate(-50%, -50%); }
    100% { opacity: 0; transform: translate(-50%, -50%); }
  }
}

/* Pitch: after 3 teaser picks the duel dims and the door to the real flow pops over the
   seam — the reveal chip's motif, one size up. The duel stays visible underneath. */
.l-duel-zone.pitched .l-duel {
  opacity: 0.4;
  filter: saturate(0.7);
  pointer-events: none;
}

.l-duel-zone.pitched .duel-vs {
  opacity: 0;
}

.l-pitch {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 9;
  transform: translate(-50%, -50%);
  width: min(92%, 520px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: center;
  animation: lPitchIn 360ms ease both;
}

@keyframes lPitchIn {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 10px)) scale(0.985); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

.l-pitch h2 {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(22px, 3.4vw, 32px);
  line-height: 1.1;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-wrap: balance;
  max-width: 22ch;
}

.l-pitch p {
  max-width: 46ch;
  font-size: 14px;
}

.l-pitch .primary-btn {
  margin-top: 6px;
}

@media (prefers-reduced-motion: reduce) {
  .l-pitch {
    animation: none;
  }
}


.start-status {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

@keyframes lCtaPulse {
  0% { box-shadow: 0 0 0 0 rgba(202, 165, 60, 0.65); }
  100% { box-shadow: 0 0 0 16px rgba(202, 165, 60, 0); }
}


@media (min-width: 700px) {
  

  .l-duel {
    grid-template-rows: minmax(0, 1fr);
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  

  
}

@media (max-width: 699px) {
  /* Label gets its own line so the rail is wide enough to show a second chip peeking —
     a real swipe affordance instead of a 2px sliver. */
  

  

  

  

  

  
}


/* ——— Buttons ——— */

.primary-btn {
  min-height: 48px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 12px;
  background: var(--action);
  color: var(--on-action);
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(202, 165, 60, 0.3);
}

.primary-btn:disabled {
  background: var(--paper-deep);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
}

.primary-btn.pine {
  background: var(--action);
  color: var(--on-action);
  box-shadow: 0 12px 26px rgba(23, 68, 42, 0.24);
}


.primary-btn.full {
  width: 100%;
}

.secondary-action {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.secondary-action.full {
  width: 100%;
}

.text-action {
  min-height: 38px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
}

.text-action:hover {
  color: var(--link);
}

.standings-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--link);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.standings-link:hover {
  color: var(--link);
}

/* ——— Setup (visited selection) ——— */

.setup-screen,
.results-screen {
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.setup-screen {
  max-width: 980px;
}

.section-heading {
  padding: 4px 2px 0;
}

.back-link {
  margin: 0 0 4px -4px;
  padding: 2px 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.back-link:hover {
  color: var(--link);
}

.section-heading .count-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.visited-tools {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 12px 0 10px;
}

.park-search {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font-size: 14.5px;
}

.park-search::placeholder {
  color: var(--muted);
}

.tool-btn {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.visited-list {
  flex: 1;
  min-height: 0;
  padding: 1px 2px 8px;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.visited-list.tiles {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 3px 3px 10px;
}

.visited-list.tiles .quick-tile {
  min-height: 92px;
}

.qname small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 10.5px;
  font-weight: 600;
}

.visited-empty {
  padding: 20px 4px;
  color: var(--muted);
  font-size: 14px;
}

.rank-item strong {
  display: block;
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.15;
  font-weight: 700;
}

.rank-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 400;
}

.rank-item small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.setup-footer,
.results-footer {
  flex: 0 0 auto;
  padding-top: 10px;
}

/* ——— Ranking (the duel) ——— */

.ranking-screen {
  width: min(100%, 560px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.duel {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.duel-vs {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 18px rgba(20, 32, 26, 0.28);
  pointer-events: none;
}

.option-wrap {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 38px;
  gap: 6px;
}

.park-card {
  position: relative;
  min-height: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: var(--photo);
  box-shadow: 0 12px 30px rgba(20, 32, 26, 0.2);
  transform: translateZ(0);
  text-align: left;
}

.park-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 17, 12, 0.06), rgba(11, 17, 12, 0.04) 42%, rgba(11, 17, 12, 0.78));
}

.park-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease, filter 220ms ease;
}

.park-info {
  position: absolute;
  z-index: 2;
  left: 15px;
  right: 15px;
  bottom: 13px;
  color: white;
}

.park-info strong {
  display: block;
  color: white;
  font-size: clamp(21px, 6.4vw, 29px);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.park-info small {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12.5px;
  font-weight: 500;
}

.notvisited-btn {
  margin: 0 auto;
  min-height: 34px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.notvisited-btn:hover {
  color: var(--link);
  border-color: var(--link);
  background: var(--card);
}

.duel-foot {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  color: var(--muted);
  font-size: 12px;
}

.duel-foot .foot-left {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.duel-foot .kbd-hint {
  display: none;
}

.duel-foot kbd {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0 5px;
  font-size: 11px;
}

.skip-btn {
  min-height: 38px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 700;
}

.skip-btn:hover {
  color: var(--link);
}

/* ——— Results ——— */

.results-screen {
  max-width: 940px;
  gap: 10px;
}

.results-header {
  flex: 0 0 auto;
  padding: 2px 2px 0;
}

.results-header h1 {
  font-size: clamp(28px, 5.5vw, 44px);
}

.results-header p {
  margin-top: 6px;
}

.crowd-compare {
  flex: 0 0 auto;
  margin-top: 4px;
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-deep);
  color: var(--ink);
  font-size: 14px;
}

.crowd-compare strong {
  font-weight: 800;
}

.crowd-compare a {
  color: var(--link);
  font-weight: 700;
  text-decoration: none;
}

.crowd-compare a:hover {
  color: var(--link);
}

.rank-list {
  flex: 1;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1px 2px;
  scrollbar-width: thin;
}

.rank-item {
  min-height: 72px;
  display: grid;
  grid-template-columns: 32px 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.rank-num {
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.rank-image {
  width: 56px;
  height: 56px;
  border-radius: 9px;
  object-fit: cover;
  background: var(--photo);
}

.crowd-pos {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--paper-deep);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}


.interest-chips {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-height: 108px;
  overflow-y: auto;
  scrollbar-width: thin;
  padding: 1px;
}

.interest-chip {
  min-height: 38px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.interest-chip.selected {
  border-color: var(--select);
  background: var(--select);
  color: var(--on-select);
}

.results-footer {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}


.results-footer .foot-links {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.share-state,
.global-state {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
}

.global-state.error {
  color: var(--danger);
}

/* ——— Tag sheet ——— */

.sheet-backdrop {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--scrim);
  backdrop-filter: blur(2px);
}

@keyframes sheetUp {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: none; opacity: 1; }
}


.interest-chips.tall {
  max-height: none;
}

@media (min-width: 700px) {
  .sheet-backdrop {
    align-items: center;
    padding: 20px;
  }

  
}

/* ——— Toast ——— */

.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: min(92vw, 440px);
  padding: 11px 16px;
  border-radius: 12px;
  background: var(--toast-bg);
  color: var(--toast-ink);
  font-size: 13.5px;
  box-shadow: 0 16px 38px rgba(16, 40, 26, 0.4);
}

.toast button {
  border: 0;
  background: transparent;
  color: var(--action);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

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

/* ——— Motion ——— */

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes vsPop {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.duel.fresh > .option-wrap:nth-of-type(1) {
  animation: cardIn 300ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.duel.fresh > .option-wrap:nth-of-type(2) {
  animation: cardIn 300ms cubic-bezier(0.2, 0.7, 0.3, 1) 70ms both;
}

.duel.fresh .duel-vs {
  animation: vsPop 260ms cubic-bezier(0.2, 0.7, 0.3, 1) 150ms both;
}

.park-card.win {
  transform: scale(1.03);
  box-shadow: 0 0 0 3px var(--action), 0 18px 44px rgba(20, 32, 26, 0.3);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.park-card.lose {
  opacity: 0.28;
  transform: scale(0.97);
  transition: opacity 200ms ease, transform 200ms ease;
}

.park-card.swiping {
  transition: none;
}

.park-card.snapback {
  transition: transform 220ms ease;
}

.park-card.flyoff {
  transition: transform 240ms ease, opacity 240ms ease;
  opacity: 0;
}

.swipe-label {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--action);
  color: var(--on-action);
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
}

@keyframes rankIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.rank-list.reveal .rank-item {
  animation: rankIn 360ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
  animation-delay: min(calc(var(--i) * 55ms), 900ms);
}

.rank-item.top-1 {
  border-color: color-mix(in srgb, var(--badge) 60%, var(--line));
  background: color-mix(in srgb, var(--badge) 9%, var(--card));
}

.rank-item.top-1 .rank-num {
  color: var(--badge-ink);
}

@keyframes crownPop {
  0% { transform: scale(0) rotate(-20deg); }
  70% { transform: scale(1.2) rotate(6deg); }
  100% { transform: scale(1) rotate(0); }
}

.crown {
  display: inline-block;
  margin-left: 5px;
  animation: crownPop 500ms 400ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

@keyframes popIn {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.global-state.done {
  animation: popIn 320ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
  font-size: 13.5px;
}

/* ——— Quick-start tiles ——— */


.quick-tile {
  position: relative;
  min-height: 78px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: var(--photo);
  box-shadow: 0 6px 16px rgba(20, 32, 26, 0.14);
}

.quick-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quick-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 17, 12, 0.04), rgba(11, 17, 12, 0.62));
}

.quick-tile .qname {
  position: absolute;
  z-index: 2;
  left: 8px;
  right: 8px;
  bottom: 7px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.12;
  text-align: left;
}

.quick-tile .qcheck {
  position: absolute;
  z-index: 2;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: transparent;
  font-size: 13px;
  font-weight: 900;
}

.quick-tile.on {
  box-shadow: 0 0 0 3px var(--action), 0 6px 16px rgba(20, 32, 26, 0.2);
}

.quick-tile.on .qcheck {
  background: var(--action);
  color: var(--on-action);
}

.shared-note {
  flex: 0 0 auto;
  margin-top: 4px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--muted);
  font-size: 13px;
}

/* ——— Wide screens ——— */

@media (min-width: 700px) {
  body {
    background: var(--paper-deep);
  }

  .app-shell {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .visited-list.tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  

  .results-footer {
    width: min(100%, 560px);
    margin: 0 auto;
  }

  .ranking-screen {
    width: min(100%, 1140px);
    justify-content: center;
  }

  .duel {
    flex: 0 1 auto;
    height: min(66vh, 620px);
    grid-template-rows: minmax(0, 1fr);
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .duel-foot .kbd-hint {
    display: inline;
  }

  .park-info strong {
    font-size: clamp(24px, 2.6vw, 34px);
  }
}

@media (min-width: 1024px) {
  .visited-list.tiles {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1600px) {
  :root {
    --content-max: 1360px;
    --page-pad: 32px;
  }

  .setup-screen {
    max-width: 1200px;
  }

  .results-screen {
    max-width: 1040px;
  }

  .visited-list.tiles {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .ranking-screen {
    width: min(100%, 1400px);
  }

  .duel {
    height: min(70vh, 780px);
    gap: 18px;
  }

  .park-info strong {
    font-size: clamp(24px, 2vw, 40px);
  }
}

@media (min-width: 2200px) {
  :root {
    --content-max: 1560px;
  }

  .setup-screen {
    max-width: 1380px;
  }

  .visited-list.tiles {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .ranking-screen {
    width: min(100%, 1600px);
  }

  .duel {
    height: min(72vh, 860px);
  }
}

@media (max-width: 699px) {
  .duel-vs {
    display: none;
  }
}

@media (max-width: 419px) {
  .top-bar.with-progress .top-note {
    display: none;
  }
}

@media (max-width: 374px) {
  :root {
    --page-pad: 8px;
  }

  .brand {
    font-size: 17px;
  }

  
}

@media (max-height: 760px) {
  .app-shell {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .interest-chips {
    max-height: 76px;
  }

  .top-bar {
    min-height: 32px;
    padding-bottom: 6px;
  }

  .option-wrap {
    grid-template-rows: minmax(0, 1fr) 36px;
    gap: 4px;
  }

  .park-info strong {
    font-size: clamp(19px, 6vw, 26px);
  }
}

@media (max-height: 680px) {
  .top-bar {
    min-height: 28px;
    padding-bottom: 4px;
  }

  .brand {
    font-size: 17px;
  }

  .duel {
    gap: 7px;
  }

  .option-wrap {
    grid-template-rows: minmax(0, 1fr) 34px;
    gap: 3px;
  }

  .park-info {
    left: 12px;
    right: 12px;
    bottom: 10px;
  }

  .park-info strong {
    font-size: clamp(18px, 5.6vw, 24px);
  }

  .park-info small {
    margin-top: 3px;
    font-size: 11px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .primary-btn,
  .tool-btn,
  .secondary-action,
  .text-action,
  .interest-chip,
  .quick-tile,
  .park-card {
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease, background 160ms ease;
  }

  .primary-btn:hover:not(:disabled),
  .tool-btn:hover,
  .secondary-action:hover,
  .interest-chip:hover,
  .quick-tile:hover,
  .park-card:hover {
    transform: translateY(-1px);
  }

  .park-card:hover {
    box-shadow: 0 18px 40px rgba(20, 32, 26, 0.28);
  }

  .park-card:hover .park-card-image {
    transform: scale(1.02);
    filter: saturate(1.06) contrast(1.02);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* ============ Dark (direction A: neutral charcoal, coral actions; PRD v3 sign-off item 3) ============
   app/boot.js (and a one-line script in each page head) always resolves the theme to data-theme="light|dark",
   so this is the only dark block. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --mark-a: #5E9C86; --mark-b: #E57A4E;   /* logo lifted for a dark ground */
  --sup-a: #8DB6C2; --sup-a-ink: #0f2a33; --sup-b: #E57A4E; --sup-b-ink: #1a0f0a; --sup-b-halo: rgba(229,122,78,.45);
  --paper: #121315; --paper-deep: #191a1d; --card: #1d1e22; --card-soft: rgba(29, 30, 34, 0.86); --line: #2e3035;
  --ink: #f2f2f0; --ink-2: #d2d3d6; --muted: #9a9da4; --label: #a6a9af;
  --action: #ff7a52; --action-deep: #ff9474; --on-action: #1a0f0a; --link: #ff9474;
  --seg-on: #34363c; --select: #f2f2f0; --on-select: #121315; --meter: #c9cbd0;
  --badge: #f2c748; --badge-ink: #f2c748; --on-badge: #1a1a0f; --danger: #ff8f78; --photo: #24262b; --scrim: rgba(0, 0, 0, 0.6);
  --toast-bg: #f2f2f0; --toast-ink: #121315; --shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
}
.primary-btn { color: var(--on-action); }
.primary-btn:disabled { background: var(--paper-deep); color: var(--muted); box-shadow: none; }
.swipe-label { color: var(--on-action); }
.interest-chip { background: var(--card); }
.interest-chip.selected { color: var(--paper); }
.notvisited-btn { background: var(--card-soft); }
.notvisited-btn:hover { background: var(--card); }

/* ============ Tab bar ============ */
.app-shell.tabbed { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px)); }
.tab-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: space-around; align-items: stretch;
  padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tab-bar-top { display: none; }
.tab {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 52px; padding: 4px 2px; border: 0; background: transparent; color: var(--muted);
  font-size: 11px; font-weight: 600; letter-spacing: 0.01em; position: relative; border-radius: 10px;
}
.tab .tab-ico { display: block; width: 26px; height: 26px; }
.tab .tab-ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab.on { color: var(--ink); }
.tab.on .tab-ico svg { stroke-width: 2.3; }
.tab.on::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 18px; height: 3px; border-radius: 2px; background: var(--action); transform: translateX(-50%); }
.tab:focus-visible { outline: 2px solid var(--action); outline-offset: -2px; }
@media (min-width: 700px) {
  .app-shell.tabbed { padding-bottom: 0; }
  .tab-bar-bottom { display: none; }
  .tab-bar-top {
    position: static; display: flex; gap: 2px; padding: 0; margin-left: auto; margin-right: 12px;
    background: transparent; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .tab-bar-top .tab { flex: 0 0 auto; flex-direction: row; gap: 7px; min-height: 36px; padding: 0 12px; font-size: 13.5px; }
  .tab-bar-top .tab .tab-ico, .tab-bar-top .tab .tab-ico svg { width: 20px; height: 20px; }
  .tab-bar-top .tab.on { background: var(--paper-deep); }
  .tab-bar-top .tab.on::after { display: none; }
}

/* ============ Tab screens (Crowd Picks / For You / Me) ============ */
.tab-screen { display: flex; flex-direction: column; gap: 12px; height: 100%; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 2px 2px 28px; max-width: 760px; }
.tab-head h1 { font-size: clamp(26px, 5vw, 36px); }

.chip-rail { display: flex; gap: 8px; overflow-x: auto; flex: 0 0 auto; padding: 2px 2px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chip-rail::-webkit-scrollbar { display: none; }
.chip-rail .interest-chip { flex: 0 0 auto; white-space: nowrap; }
@media (min-width: 700px) { .chip-rail { flex-wrap: wrap; overflow: visible; } }
.pr-note { color: var(--muted); font-size: 13px; }
.pr-foot { color: var(--muted); font-size: 12px; padding-top: 6px; }
.pr-list { display: flex; flex-direction: column; gap: 8px; }


.pr-row { display: grid; grid-template-columns: 40px 56px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px 8px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.pr-row.top { border-color: color-mix(in srgb, var(--action) 55%, var(--line)); }
.pr-rank { font-size: 15px; font-weight: 800; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.pr-row.top .pr-rank { color: var(--action-deep); }
.pr-thumb { width: 56px; height: 56px; border-radius: 9px; object-fit: cover; background: var(--photo); }
.pr-body { display: grid; gap: 2px; min-width: 0; }
.pr-body strong { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-body small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.pr-score { color: var(--ink); }
.pr-mine { color: var(--action-deep); }
.pr-bar { display: block; height: 4px; margin-top: 3px; border-radius: 2px; background: color-mix(in srgb, var(--meter) 14%, transparent); overflow: hidden; }
.pr-bar span { display: block; height: 100%; background: var(--meter); border-radius: inherit; }
.pr-empty { display: grid; gap: 8px; justify-items: start; padding: 18px 16px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 13.5px; }
.pr-empty strong { color: var(--ink); font-size: 15px; }
.pr-empty .primary-btn { margin-top: 4px; }
.pr-empty.quiet { border-style: solid; background: var(--card); }


/* ---- Me ---- */
.me-card { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.me-card.danger { background: transparent; border-style: dashed; }
.me-label { color: var(--label); font-size: 13px; font-weight: 700; letter-spacing: 0; }


.me-actions { display: flex; gap: 12px; align-items: center; }
.me-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 4px 0; border: 0; background: transparent; color: var(--ink); text-align: left; font-size: 15px; }
.me-row-label { flex: 1; font-weight: 600; }
.me-row-value { color: var(--muted); font-size: 13.5px; }
.me-row-chev { color: var(--muted); font-size: 20px; line-height: 1; }
.me-setting { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--paper-deep); border: 1px solid var(--line); }
.seg-btn { min-height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; }
.seg-btn.on { background: var(--seg-on); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14); }
.switch { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 14px; background: var(--line); position: relative; transition: background 160ms ease; margin: 0; cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 4px rgba(0,0,0,0.25); transition: transform 160ms ease; }
.switch:checked { background: var(--action); }
.switch:checked::after { transform: translateX(18px); }
.me-disc-body { display: grid; gap: 8px; padding: 2px 0 10px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.me-disc-body p { max-width: 62ch; }
.me-disc-body a { color: var(--link); font-weight: 700; }
.credits { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 12.5px; }
.credits a { color: var(--ink); font-weight: 700; text-decoration: none; }
.me-version { color: var(--muted); font-size: 12px; padding-top: 4px; }
.text-action.danger { color: var(--danger); }
.me-card.danger small { color: var(--muted); font-size: 12px; }

/* ============ Juice ============ */
.park-card.past { box-shadow: 0 0 0 3px var(--action), 0 18px 44px rgba(20, 32, 26, 0.3); }
.park-card.dimmed { opacity: 0.55; transform: scale(0.98); transition: opacity 120ms ease, transform 120ms ease; }
.park-card.win { animation: winPulse 380ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes winPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 var(--action), 0 12px 30px rgba(20, 32, 26, 0.2); }
  45% { transform: scale(1.045); box-shadow: 0 0 0 4px var(--action), 0 20px 48px rgba(20, 32, 26, 0.32); }
  100% { transform: scale(1.02); box-shadow: 0 0 0 3px var(--action), 0 18px 44px rgba(20, 32, 26, 0.3); }
}
.park-card.flyoff { transition: transform 220ms cubic-bezier(0.3, 0.7, 0.4, 1), opacity 220ms ease; }
.progress-wrap.home-stretch .progress-fill { background: var(--action-deep); animation: stretchPulse 900ms ease-in-out infinite alternate; }
@keyframes stretchPulse { from { filter: brightness(1); } to { filter: brightness(1.25); } }
@media (prefers-reduced-motion: reduce) {
  .park-card.win { animation: none; transform: scale(1.02); }
  .progress-wrap.home-stretch .progress-fill { animation: none; }
}

/* ---- Park sheet ---- */
.park-sheet { position: relative; width: min(100%, 560px); max-height: 88dvh; overflow-y: auto; border-radius: 18px 18px 0 0; background: var(--card); box-shadow: 0 -12px 40px rgba(0,0,0,0.25); padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 700px) { .park-sheet { border-radius: 18px; } }
.ps-photo { position: relative; height: 220px; background: var(--photo); }
.ps-img { width: 100%; height: 100%; object-fit: cover; }
.ps-close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(20,32,26,0.55); color: #fff; font-size: 22px; line-height: 1; }
.ps-body { display: grid; gap: 10px; padding: 14px 16px 6px; }
.ps-body h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.015em; line-height: 1; }
.ps-loc { color: var(--muted); font-size: 13.5px; }
.ps-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ps-stat { display: grid; gap: 2px; padding: 10px; border-radius: 12px; background: var(--paper-deep); text-align: center; }
.ps-stat strong { font-size: 20px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.ps-stat small { color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.ps-credit { color: var(--muted); font-size: 11.5px; }
.ps-credit a { color: var(--muted); }
.secondary-action.on { border-color: var(--ink); color: var(--ink); }
.pr-body.tap { cursor: pointer; }
.rank-item.tap { cursor: pointer; }
/* For You rows: name may wrap, button stays compact */
.pr-body strong { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.15; }

.seg.small .seg-btn { min-height: 28px; padding: 0 9px; font-size: 12px; }
.visited-tools .seg { margin-left: auto; }
/* dark-mode leftovers */

/* picker tools: search keeps its width; the sort control drops to its own row on phones */
.visited-tools { flex-wrap: wrap; }
.visited-tools .park-search { flex: 1 1 160px; min-width: 140px; }
.visited-tools .seg { margin-left: 0; flex: 0 0 auto; }
@media (min-width: 700px) { .visited-tools .seg { margin-left: auto; } }
.seg-btn { white-space: nowrap; }

/* ============ Today's Pick ============ */

.tp-card { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.tp-head { display: grid; gap: 4px; }
/* Section labels: sentence case, quiet. (The tracked ALL-CAPS eyebrow was on every card.) */
.tp-kicker { color: var(--label); font-size: 13px; font-weight: 700; letter-spacing: 0; }
.tp-q { font-size: clamp(22px, 5.6vw, 30px); line-height: 1.08; font-weight: 800; letter-spacing: -0.015em; text-wrap: balance; }
.tp-q.small { font-size: 18px; }
.tp-sub { color: var(--muted); font-size: 13px; }
.tp-duel { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; height: 200px; }
.tp-duel.small { height: 150px; }
.tp-duel .duel-vs { width: 34px; height: 34px; font-size: 11px; }
.daily-card .park-info strong { font-size: clamp(16px, 4.4vw, 22px); }
.daily-card .park-info small { font-size: 11px; }
.daily-card.l-won { box-shadow: 0 0 0 3px var(--action), 0 18px 44px rgba(20,32,26,0.3); }
.daily-card.l-lost { opacity: 0.45; }
.tp-duel.answered .daily-card { transition: opacity 320ms ease, box-shadow 320ms ease; }
@media (min-width: 700px) { .tp-duel { height: 260px; } .tp-duel.small { height: 190px; } }
.tp-reveal { display: grid; gap: 10px; }
.tp-reveal.fresh { animation: revealIn 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes revealIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.split { display: flex; height: 44px; border-radius: 12px; overflow: hidden; background: var(--paper-deep); font-size: 12.5px; }
.split span { display: flex; align-items: center; gap: 6px; padding: 0 10px; min-width: 0; width: 50%; color: var(--ink); transition: width 900ms cubic-bezier(0.2, 0.8, 0.2, 1); overflow: hidden; white-space: nowrap; }
.split.go span, .split:not(.animate) span { width: var(--w); }
.split-a { background: color-mix(in srgb, var(--meter) 16%, var(--paper-deep)); justify-content: flex-start; }
.split-b { background: color-mix(in srgb, var(--meter) 7%, var(--paper-deep)); justify-content: flex-end; flex-direction: row-reverse; }
/* Your side is the action colour; the other side stays neutral. */
.split span.mine { background: var(--action); color: var(--on-action); }
.split b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.split i { font-style: normal; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.tp-verdict { display: flex; align-items: baseline; gap: 10px; }
.tp-verdict .v { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.tp-verdict .v.contrarian { color: var(--action-deep); }
.tp-count { color: var(--muted); font-size: 12.5px; }
.tp-streak { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.tp-streak small { color: var(--muted); font-weight: 600; }
.flame { width: 20px; height: 20px; color: var(--action-deep); }
.flame svg { width: 20px; height: 20px; fill: currentColor; }
.tp-reveal.fresh .flame { animation: flameIn 600ms cubic-bezier(0.2, 0.8, 0.2, 1) 300ms both; }
@keyframes flameIn { 0% { transform: scale(0.4) rotate(-10deg); opacity: 0; } 60% { transform: scale(1.25) rotate(4deg); opacity: 1; } 100% { transform: none; } }
.tp-both { padding: 8px 10px; border-radius: 10px; background: var(--paper-deep); font-size: 13px; font-weight: 600; }
.tp-bonus { display: grid; gap: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.tp-thanks { color: var(--muted); font-size: 12.5px; padding-top: 6px; border-top: 1px dashed var(--line); }
.tp-yday { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted); }
.tp-yday strong { color: var(--ink); }
.tp-next { color: var(--muted); font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .tp-reveal.fresh, .tp-reveal.fresh .flame { animation: none; } .split span { transition: none; } }

/* ============ Best For / Trends / Streaks / Compare ============ */
.bf-grid { display: grid; gap: 8px; }
@media (min-width: 700px) { .bf-grid { grid-template-columns: 1fr 1fr; } }
.bf-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 10px 8px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.bf-img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--photo); }
.bf-body { display: grid; gap: 2px; min-width: 0; }
.bf-body strong { font-size: 17px; font-weight: 800; }
.bf-runners { color: var(--muted); font-size: 12px; }
.tr-section { display: grid; gap: 6px; }
.tr-row { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 13px; }
.tr-row strong { font-size: 14.5px; }
.tr-row span { color: var(--muted); }
.lb-list { display: grid; gap: 6px; }
.lb-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 44px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 14px; }
.lb-row.me { border-color: var(--action); background: color-mix(in srgb, var(--action) 10%, var(--card)); }
.lb-rank { font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.lb-row.me .lb-rank { color: var(--ink); }
.lb-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-val { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }

.cmp-input { display: flex; gap: 8px; }
.cmp-input .park-search { flex: 1; }
.cmp-result { display: grid; gap: 10px; }
.cmp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ============ For You blocks ============ */
.fy-block { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.fy-block .pr-row { background: var(--paper); }

/* ============ Profile sheet, reminder sheet, avatar ============ */
/* The bottom pad must clear the home indicator: this rule overrides .park-sheet's safe-area padding (Chad 2026-10-04: tips sat under the bar). */
.profile-sheet, .reminder-sheet, .support-sheet, .supporter-sheet { padding: 16px 16px calc(14px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 10px; }
.profile-sheet h2, .reminder-sheet h2, .support-sheet h2, .supporter-sheet h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.015em; line-height: 1.05; }
.sheet-sub { color: var(--muted); font-size: 13.5px; }
.ps-dots { display: flex; gap: 6px; }
.ps-dots span { width: 22px; height: 4px; border-radius: 2px; background: var(--line); }
.ps-dots span.on { background: var(--ink); }
.sheet-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 6px; }
.sheet-actions .primary-btn { min-width: 120px; }
.chip-n { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; border-radius: 50%; background: var(--action); color: var(--on-action); font-size: 11px; font-weight: 800; }
.sheet-tiles { max-height: 46dvh; overflow-y: auto; }
.id-row { display: flex; align-items: center; gap: 12px; }
.avatar-btn { width: 64px; height: 64px; border-radius: 50%; border: 2px dashed var(--line); background: var(--paper-deep); overflow: hidden; padding: 0; display: grid; place-items: center; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.avatar-init { font-size: 24px; font-weight: 800; color: var(--ink-2); }
.id-name { display: grid; gap: 2px; }
.id-name strong { font-size: 18px; font-weight: 800; }
.time-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; font-weight: 600; }
.time-input { font: inherit; font-size: 16px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); }
.me-profile { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.me-profile .avatar-btn { width: 56px; height: 56px; border-style: solid; }
.me-profile strong { font-size: 17px; font-weight: 800; display: block; }
.me-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.me-tags span { padding: 2px 8px; border-radius: 999px; background: var(--paper-deep); color: var(--muted); font-size: 11px; font-weight: 700; }

.me-hint { display: block; color: var(--muted); font-size: 11.5px; font-weight: 500; }

/* ============ Calm pass: one title, home cards, bubbles, rank start ============ */
.tab-head h1 { font-size: clamp(30px, 7vw, 40px); margin: 2px 0 0; }
.tab-head { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.brand-head .brand-mark svg { width: 34px; height: 34px; border-radius: 9px; display: block; }

/* Phones: tab screens carry their own title, so the brand bar hides. Wide screens keep the bar: it holds the tabs. */
@media (max-width: 699px) { .top-bar.hidden-on-tab { display: none; } }
@media (min-width: 700px) { .home-screen .brand-head, .rank-intro.welcome .brand-head { display: none; } }
.hcard { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); text-align: left; }
.hcard.stack { display: grid; grid-template-columns: 1fr; gap: 10px; }


.hcard-ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--paper-deep); color: var(--ink-2); }
.hcard-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.hcard-ico.flame { color: var(--action-deep); }
.hcard-ico.flame svg { fill: currentColor; stroke: none; }
.hcard-body { display: grid; gap: 2px; min-width: 0; }
.hcard-body strong { font-size: 15.5px; font-weight: 700; }
.hcard-body small { color: var(--muted); font-size: 12.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hcard-chev { color: var(--muted); font-size: 22px; line-height: 1; }
.home-cards { display: grid; gap: 8px; }
@media (min-width: 700px) { .home-cards { grid-template-columns: 1fr 1fr; } .hcard.stack { grid-column: 1 / -1; } }
.bubble-rail { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.bubble-rail::-webkit-scrollbar { display: none; }
.bubble-rail.wrap { flex-wrap: nowrap; }
.bubble { flex: 0 0 auto; width: 76px; display: grid; justify-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: var(--ink); }
.bubble.big { width: 92px; }
.bubble-img { position: relative; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--paper-deep); box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--line); }
.bubble.big .bubble-img { width: 78px; height: 78px; }
.bubble-img img { width: 100%; height: 100%; object-fit: cover; }
.bubble-badge { position: absolute; right: -2px; bottom: -2px; padding: 1px 6px; border-radius: 999px; background: var(--action); color: var(--on-action); font-size: 10.5px; font-weight: 800; }
.bubble-label { font-size: 11.5px; font-weight: 700; text-align: center; line-height: 1.1; max-width: 76px; }
.bubble-sub { font-size: 10.5px; color: var(--muted); text-align: center; line-height: 1.1; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble-empty { display: block; width: 100%; height: 100%; }


.more-head { display: flex; align-items: center; gap: 12px; }
.more-head h2 { font-size: 22px; font-weight: 800; }
.rank-intro { display: grid; gap: 14px; padding-top: 4px; }
.rank-intro-title { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: clamp(34px, 9vw, 54px); line-height: 0.95; text-transform: uppercase; color: var(--ink); }


.center { text-align: center; }
.text-action.center { justify-self: center; }
.me-card.warn { border-color: color-mix(in srgb, var(--action-deep) 60%, var(--line)); }
.me-text { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
/* accent discipline: gold = primary action + streak only */
.pr-row.top { border-color: var(--line); }
.pr-row.top .pr-rank { color: var(--ink); }
.pr-mine { color: var(--ink); }
.rank-item.top-1 { border-color: var(--line); }

/* flex children of a scrolling tab screen must never shrink (the bubble rail was squeezed to a sliver) */
.tab-screen > * { flex: 0 0 auto; }
.brand-head .brand-mark { width: 38px; height: 38px; border-radius: 0; display: block; }
/* badge sits on the bubble, not inside the clipped circle */
.bubble { position: relative; }
.bubble-img { overflow: hidden; }
.bubble-badge { position: absolute; right: 4px; top: 50px; z-index: 2; }
.bubble.big .bubble-badge { top: 62px; }
.bubble-badge { bottom: auto; left: auto; width: max-content; height: auto; align-self: start; justify-self: end; }

/* ---- round 3 ---- */
.rank-intro-duel { height: 300px; position: relative; }
.rank-intro-duel .l-duel { height: 100%; }
.rank-intro .duel-foot { min-height: 0; }
.cmp-yours { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.cmp-qr { width: 160px; height: 160px; border-radius: 10px; overflow: hidden; background: #fff; }
.cmp-qr svg { display: block; width: 100%; height: 100%; }
.cmp-yours-body { display: grid; gap: 8px; min-width: 0; }

.cmp-theirs { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
@media (max-width: 420px) { .cmp-yours { grid-template-columns: 120px minmax(0, 1fr); } .cmp-qr { width: 120px; height: 120px; } }
img[data-src] { background: var(--paper-deep); }

/* palette B roles: ember = action + streak + verdict; gold = rank badges only */
.bubble-badge { background: var(--badge); color: var(--on-badge); }
.tp-verdict .v.contrarian { color: var(--action-deep); }
.chip-n { background: var(--badge); color: var(--on-badge); }
.primary-btn { box-shadow: 0 10px 24px rgba(242, 99, 79, 0.28); }
.bubble-sub { max-width: 80px; }

/* ---- round 4 ---- */
.fy-block > * { min-width: 0; }
.chip-rail { max-width: 100%; }
.tab-screen { overflow-x: hidden; }
.sample-list { display: grid; gap: 6px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 12px; background: var(--card); }
.sample-ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.sample-ol li { display: grid; grid-template-columns: 22px 34px minmax(0, 1fr); align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.sample-ol li.on { color: var(--ink); font-weight: 700; }
.sample-n { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--paper-deep); font-size: 12px; font-weight: 800; color: var(--muted); }
.sample-ol li.on .sample-n { background: var(--select); color: var(--paper); }
.sample-img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; background: var(--paper-deep); display: block; }
.sample-img.empty { border: 1px dashed var(--line); background: transparent; }
.bubble.on .bubble-img { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--action); }
.bubble.on .bubble-label { color: var(--ink); }

.scan-sheet { padding: 16px; display: grid; gap: 10px; }
.scan-frame { position: relative; width: 100%; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #000; }
.scan-video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame::after { content: ""; position: absolute; inset: 12%; border: 3px solid var(--action); border-radius: 14px; pointer-events: none; }
.cmp-bigcode { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 34px; letter-spacing: 0.12em; color: var(--ink); line-height: 1; }
.crowd-compare { background: var(--paper-deep); border-color: var(--line); }
.rank-item.top-1 { background: var(--card); }

/* ---- round 5 ---- */


.cmp-yours.compact { grid-template-columns: 120px minmax(0, 1fr); }
.cmp-yours.compact .cmp-qr { width: 120px; height: 120px; }
.lb-row.friend { grid-template-columns: 40px minmax(0, 1fr) auto; text-align: left; }
.lb-row.friend .lb-name { display: grid; gap: 1px; white-space: normal; }
.lb-row.friend .lb-name small { color: var(--muted); font-weight: 500; font-size: 12px; }
.avatar-init.small { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--paper-deep); color: var(--ink-2); font-size: 17px; font-weight: 800; }
.hide-visited { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--muted); min-height: 36px; }
.switch.small { width: 40px; height: 24px; }
.switch.small::after { width: 18px; height: 18px; }
.switch.small:checked::after { transform: translateX(16px); }
/* results: the whole screen scrolls; only the Count button sticks, and only until it's pressed */
.results-screen { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.results-screen .rank-list { flex: 0 0 auto; overflow: visible; }

.count-bar { position: sticky; bottom: 0; z-index: 3; padding: 8px 0 6px; background: linear-gradient(180deg, transparent, var(--paper) 30%); }
.results-actions { display: grid; gap: 8px; padding: 6px 0 28px; flex: 0 0 auto; }
.list-head { display: flex; justify-content: space-between; align-items: center; min-height: 28px; }
.add-panel { display: grid; gap: 8px; }


/* ---- share + store banner ---- */
.store-banner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.store-banner .hcard-ico { width: 32px; height: 32px; color: var(--ink-2); }
.store-banner .hcard-body { display: grid; gap: 1px; min-width: 0; }
.store-banner .hcard-body small { color: var(--muted); font-size: 12px; }
.store-banner .secondary-action { padding: 8px 12px; min-height: 0; }
.store-banner .text-action { font-size: 20px; line-height: 1; padding: 4px 6px; }

/* ---- streak window ---- */
.lb-gap { height: 1px; margin: 4px 14px; background: var(--line); }
.lb-row.medal .lb-rank { font-size: 20px; line-height: 1; }
.lb-row.m1 { border-color: color-mix(in srgb, var(--badge) 55%, var(--line)); background: color-mix(in srgb, var(--badge) 10%, var(--card)); }
.lb-row.m2 { border-color: color-mix(in srgb, #9aa3ad 55%, var(--line)); background: color-mix(in srgb, #9aa3ad 10%, var(--card)); }
.lb-row.m3 { border-color: color-mix(in srgb, #b8733a 55%, var(--line)); background: color-mix(in srgb, #b8733a 10%, var(--card)); }
.lb-row.me.medal { border-color: var(--action); }


/* ============ Focus pass (PRD v3, 2026-10-03): welcome, Home strip + next step, My Parks, Crowd views ============ */
.app-shell.first-open .tab-bar { display: none; }
.app-shell.first-open.tabbed { padding-bottom: env(safe-area-inset-bottom, 0px); }
.welcome-promise { display: grid; gap: 2px; margin: -4px 0 0; color: var(--muted); font-size: 16px; line-height: 1.35; }
.welcome-promise strong { color: var(--ink); font-size: clamp(17px, 4.9vw, 21px); font-weight: 800; line-height: 1.2; }
.rank-intro.welcome { gap: 12px; }
.rank-intro.welcome .rank-intro-duel { height: min(300px, 36vh); }
.seg.wide { display: flex; width: 100%; }
.seg.wide .seg-btn { flex: 1 1 0; min-height: 38px; padding: 0 6px; font-size: 13.5px; }
.hcard.cta { border-color: var(--action); }
.hcard.cta .hcard-ico { background: var(--action); color: var(--on-action); }
.hcard.list-strip { grid-template-columns: auto minmax(0, 1fr) auto; }
.strip-thumbs { display: flex; align-items: center; padding-left: 8px; }
.strip-thumb { width: 38px; height: 38px; margin-left: -8px; border-radius: 50%; border: 2px solid var(--card); object-fit: cover; background: var(--paper-deep); }
.results-header h1 { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; text-transform: uppercase; }

/* ============ Live layer on screen (PRD v3 §6): message, challenge, friends feed, support form ============ */
.msg-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); flex: 0 0 auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
.msg-card.with-photo { grid-template-columns: 92px minmax(0, 1fr); }
.msg-img { width: 100%; height: 100%; min-height: 92px; object-fit: cover; background: var(--photo); }
.msg-body { display: grid; gap: 4px; align-content: center; padding: 12px 44px 12px 14px; }
.msg-body strong { font-size: 16px; font-weight: 800; line-height: 1.25; }
.msg-body p { color: var(--muted); font-size: 14px; line-height: 1.4; }
.msg-body .secondary-action { justify-self: start; min-height: 38px; margin-top: 6px; }
.msg-close { position: absolute; top: 0; right: 0; width: 44px; height: 44px; border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; }
.ch-card { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.ch-card strong { font-size: 16px; font-weight: 800; line-height: 1.25; }
.ch-card small { color: var(--muted); font-size: 13px; }
.ch-meter { height: 8px; margin-top: 8px; border-radius: 4px; background: var(--paper-deep); overflow: hidden; }
.ch-meter span { display: block; height: 100%; border-radius: 4px; background: var(--action); transition: width 500ms ease; }
.ch-card.done .ch-meter span { background: var(--badge); }
.ch-count { font-variant-numeric: tabular-nums; }
.feed-list { display: grid; gap: 10px; }
.feed-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; line-height: 1.35; }
.feed-img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--photo); }
.feed-row small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.support-text { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-size: 16px; line-height: 1.4; resize: none; }
.support-sheet .park-search { width: 100%; }
.fy-block.focus { outline: 2px solid var(--action); outline-offset: 3px; border-radius: 14px; }
@media (prefers-reduced-motion: reduce) { .ch-meter span { transition: none; } }

/* Friend compare: the agreement number is the hero; each list shows the photo beside the name. */
.cmp-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 4px 0 10px; }
.cmp-hero strong { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 68px; line-height: 0.9; color: var(--action-deep); }
.cmp-hero span { color: var(--muted); font-size: 14.5px; line-height: 1.35; }
.cmp-list { margin: 0; padding: 0; display: grid; gap: 6px; }
.cmp-list li { display: grid; grid-template-columns: 16px 30px minmax(0, 1fr); gap: 7px; align-items: center; list-style: none; font-size: 13.5px; font-weight: 600; }
.cmp-n { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }
.cmp-thumb { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; background: var(--photo); }
.cmp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The tab bar must stay one line tall: a wrapped label made it taller than --tab-h and it covered the picker's button. */
.tab-label { white-space: nowrap; }
@media (max-width: 374px) { .tab { font-size: 10px; } }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.list-head .text-action { flex: 0 0 auto; }
/* Today's Pick: a swiped winner slides back in from the side it left by (build 3). */
.daily-card.landed.from-left { animation: landLeft 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.daily-card.landed.from-right { animation: landRight 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes landLeft { from { transform: translateX(-60%) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes landRight { from { transform: translateX(60%) rotate(6deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .daily-card.landed { animation: none; } }
/* No double-tap zoom anywhere (taps register instantly); pinch zoom stays on the website. */
html { touch-action: manipulation; }

/* ---------- Build 3: My Parks — save line, new parks, trip-style tags, reorder ---------- */
.save-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); padding: 2px 2px 0; }
.save-line.saved span { color: var(--ink-2); }
.save-line.offline span, .save-line.legacy span { color: var(--ink-2); }
.save-line .text-action { padding: 4px 0; }
.place-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--action); box-shadow: var(--shadow); }
.place-thumbs { display: flex; }
.place-thumb { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--card); background: var(--photo); }
.place-thumb + .place-thumb { margin-left: -12px; }
.place-text { display: grid; gap: 2px; min-width: 0; }
.place-text strong { font-size: 15px; }
.place-text small { color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.order-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
.order-head .pr-note { font-size: 12.5px; }
.order-head .text-action.on { font-weight: 700; color: var(--link); }
.tag-card { display: grid; gap: 3px; text-align: left; width: 100%; padding: 12px 14px; border-radius: var(--radius); border: 1px dashed var(--line); background: var(--card-soft); color: var(--ink); cursor: pointer; }
.tag-card small { color: var(--muted); font-size: 12.5px; }
.tag-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.tag-chip { font-size: 12px; padding: 4px 9px; border-radius: 999px; background: var(--paper-deep); color: var(--ink-2); }
.rank-list .rank-item { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.rank-list .rank-item img { -webkit-user-drag: none; pointer-events: none; }
.rank-list.reordering { overscroll-behavior: contain; }
.rank-list.reordering .rank-item:not(.lifted) { transition: transform 160ms ease; }
.rank-item.lifted { position: relative; z-index: 5; transition: none; box-shadow: 0 14px 34px rgba(20, 32, 26, 0.28); border-color: var(--action); }
.rank-list.editing .rank-item { grid-template-columns: 32px 56px minmax(0, 1fr) auto; cursor: default; }
.order-arrows { display: flex; gap: 6px; }
.order-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.order-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.order-btn[disabled] { opacity: 0.3; }
@media (prefers-reduced-motion: reduce) { .rank-list.reordering .rank-item:not(.lifted) { transition: none; } }

/* ---------- Build 3: Crowd Picks — top 10 + Show more, Coin flips / Underdogs / Climbing ---------- */
.show-more { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0 4px; background: none; border: 0; color: var(--link); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.show-more::before, .show-more::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.trends-block { display: grid; gap: 18px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.tr-title { display: flex; align-items: baseline; gap: 8px; }
.tr-title h2 { margin: 0; font-size: 22px; }
.tr-title small { color: var(--muted); font-size: 12.5px; }
.tr-head { display: grid; gap: 1px; }
.tr-head h3 { margin: 0; font-size: 17px; }
.tr-head small { color: var(--muted); font-size: 12.5px; }
.tr-strip { display: grid; grid-auto-flow: column; grid-auto-columns: min(82%, 320px); gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--page-pad); padding: 4px 2px 16px; margin: 0 calc(-1 * var(--page-pad)); padding-inline: var(--page-pad); scrollbar-width: none; overscroll-behavior-x: contain; }
.tr-strip::-webkit-scrollbar { display: none; }
.tr-card { scroll-snap-align: start; display: grid; gap: 8px; padding: 10px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); align-content: start; color: var(--ink); }
.tr-card[role="button"] { cursor: pointer; }
.my-side { justify-self: start; font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--action); color: var(--on-action); }
.my-side.soft { background: var(--paper-deep); color: var(--ink-2); font-weight: 600; }
/* Coin flip */
.coin-photos { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; height: 128px; border-radius: 10px; overflow: hidden; }
.coin-half { position: relative; display: block; padding: 0; border: 0; background: var(--photo); color: #fff; text-align: left; overflow: hidden; }
.coin-half.pickable { cursor: pointer; outline: 3px solid transparent; outline-offset: -3px; }
.coin-half.pickable:active, .coin-half.pickable:focus-visible { outline-color: var(--action); }
.coin-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.coin-half::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.62)); }
.coin-name { position: absolute; left: 8px; right: 8px; bottom: 26px; z-index: 1; font-size: 13px; font-weight: 700; line-height: 1.15; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.coin-pct { position: absolute; left: 8px; bottom: 5px; z-index: 1; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.coin-half.b .coin-name, .coin-half.b .coin-pct { left: auto; right: 8px; text-align: right; }
.coin-vs { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 2; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--card); color: var(--ink); font-size: 10px; font-weight: 800; box-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.coin-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--paper-deep); }
.coin-bar .a { background: var(--action); }
.coin-bar .b { background: var(--meter); }
.coin-sub, .coin-ask { margin: 0; font-size: 12px; color: var(--muted); }
.coin-ask { color: var(--ink); font-weight: 700; }
.settle-btn { justify-self: start; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--action); background: none; color: var(--link); font: inherit; font-size: 13px; font-weight: 700; }
.coin-card.open { border-color: var(--action); }
/* Underdogs: same two-photo frame as a Coin flip; winner bright + outlined, favourite muted at the same size */
.ud-photos { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; height: 128px; }
.ud-half { position: relative; display: block; border-radius: 10px; overflow: hidden; background: var(--photo); color: #fff; }
.ud-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ud-half::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.6)); }
.ud-half:not(.won) .ud-img { filter: grayscale(0.7) brightness(0.92); }
.ud-half.won::before { content: ""; position: absolute; inset: 0; border-radius: 10px; box-shadow: 0 0 0 3px var(--action) inset; z-index: 2; }
.ud-rank { position: absolute; top: 7px; left: 7px; z-index: 3; font-size: 15px; font-weight: 800; padding: 2px 7px; border-radius: 7px; background: var(--action); color: var(--on-action); font-variant-numeric: tabular-nums; }
.ud-half:not(.won) .ud-rank { background: rgba(255,255,255,0.9); color: #59625d; text-decoration: line-through; text-decoration-thickness: 2px; }
.ud-name { position: absolute; left: 8px; right: 8px; bottom: 7px; z-index: 3; font-size: 13px; font-weight: 700; line-height: 1.15; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.ud-tag { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; padding: 4px 9px; border-radius: 999px; background: var(--card); color: var(--ink); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; box-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.ud-line { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.ud-line strong { color: var(--ink); }
/* Climbing */
.tr-strip:has(.climb-card) { grid-auto-columns: min(46%, 180px); }
.climb-card { position: relative; }
.climb-img { width: 100%; height: 96px; object-fit: cover; border-radius: 10px; background: var(--photo); }
.climb-up { position: absolute; top: 16px; left: 16px; padding: 3px 8px; border-radius: 8px; background: var(--action); color: var(--on-action); font-weight: 800; font-size: 14px; }
.climb-card strong { font-size: 14px; }
.climb-card small { color: var(--muted); font-size: 12px; margin-top: -4px; }
.results-header .save-line { padding: 0; margin-top: 2px; }

/* ---------- Build 3 review fixes ---------- */
/* Cards own the sideways drag; vertical scrolling still passes through (a real finger swipe was cancelled without this). */
.park-card, .daily-card, .l-card { touch-action: pan-y; }
/* The crowd chip after a pick never blocks the "Haven't been" button under it. */
.g-chip { pointer-events: none; }
.placing-head { margin: 0 0 6px; text-align: center; font-weight: 700; font-size: 16px; color: var(--ink); }
.rank-item.just-placed { border-color: var(--action); box-shadow: 0 0 0 2px var(--action); animation: placedGlow 1.6s ease-out 1; }
@keyframes placedGlow { 0% { box-shadow: 0 0 0 6px var(--action); } 100% { box-shadow: 0 0 0 2px var(--action); } }
.tp-hint { text-align: center; font-size: 12.5px; margin: 6px 0 0; }
@media (prefers-reduced-motion: reduce) { .rank-item.just-placed { animation: none; } }

/* ---------- Add a park after a trip (Chad 2026-10-04) ---------- */
.trip-strip { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 40px; padding: 8px 14px; border: 0; border-radius: 10px; background: var(--action); color: var(--on-action); font: inherit; font-size: 14px; cursor: pointer; }
.trip-strip strong { font-weight: 800; }
.addpark-screen { display: grid; gap: 12px; align-content: start; padding-bottom: 96px; }
.ap-find { display: grid; gap: 8px; }
.ap-results, .ap-added { display: grid; gap: 8px; }
.ap-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ap-row.added { border-color: var(--action); cursor: default; }
.ap-img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--photo); }
.ap-text { display: grid; gap: 2px; min-width: 0; }
.ap-text small { color: var(--muted); font-size: 12.5px; }
.ap-plus { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--paper-deep); font-size: 22px; font-weight: 700; color: var(--ink); }
.ap-remove { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--paper-deep); color: var(--ink); font-size: 20px; cursor: pointer; }
.ap-another { justify-self: start; padding: 8px 0; border: 0; background: none; color: var(--link); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }

/* Logo is inline SVG (fills from --mark-a / --mark-b) */
.brand-logo, .brand-head .brand-mark { display: block; }
.brand .brand-logo { width: 36px; height: 23px; }
.brand-head .brand-mark { width: 53px; height: 34px; }
.brand-logo svg, .brand-mark svg { width: 100%; height: 100%; display: block; border-radius: 0; }

/* ---------- Support the community (iPhone app only) ---------- */
.support-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 14px; border: 0; border-radius: 12px; background: var(--action); color: var(--on-action); font: inherit; text-align: left; cursor: pointer; }
.support-strip-text { display: grid; gap: 1px; min-width: 0; }
.support-strip strong { font-size: 15px; }
.support-strip small { font-size: 12.5px; opacity: 0.85; }
.tip-options { display: grid; gap: 10px; margin: 6px 0 4px; }
.tip-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.tip-option:active { border-color: var(--action); }
.tip-text { display: grid; gap: 2px; min-width: 0; }
.tip-text small { color: var(--muted); font-size: 13px; }
.tip-price { flex: none; padding: 6px 14px; border-radius: 999px; background: var(--action); color: var(--on-action); font-weight: 800; font-variant-numeric: tabular-nums; }
/* Supporter badge: vector, sized per place via --b, sits on the photo's edge outside the round crop (never clipped) */
.avatar-wrap { position: relative; display: inline-block; flex: none; }
.sup-badge { display: inline-grid; place-items: center; width: var(--b, 22px); height: var(--b, 22px); border-radius: 50%; flex: none; box-shadow: 0 0 0 2px var(--card); }
.sup-badge svg { width: 62%; height: 62%; display: block; }
.sup-badge.supporter { background: var(--sup-a); color: var(--sup-a-ink); }
.sup-badge.deluxe { background: var(--sup-b); color: var(--sup-b-ink); }
.avatar-wrap .sup-badge { position: absolute; right: -4px; bottom: -4px; }
.tip-option { gap: 12px; }
.tip-option.owned { opacity: 0.75; cursor: default; }
.tip-option .tip-text { flex: 1; }
/* Badge name on tap / hover / focus: sits above the badge, never clipped by the photo crop */
.sup-badge { position: relative; cursor: default; }
.sup-badge::after { content: attr(data-label); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translate(-50%, 4px); padding: 4px 9px; border-radius: 8px; background: var(--toast-bg); color: var(--toast-ink); font-size: 12px; font-weight: 700; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 160ms ease, transform 160ms ease; z-index: 20; }
.sup-badge.tip-on::after, .sup-badge:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
@media (hover: hover) { .sup-badge:hover::after { opacity: 1; transform: translate(-50%, 0); } }
/* on the profile photo the badge sits at the card's left edge: open the label to the RIGHT, over empty space */
.avatar-wrap .sup-badge::after { left: calc(100% + 6px); bottom: 50%; transform: translate(-4px, 50%); }
.avatar-wrap .sup-badge.tip-on::after, .avatar-wrap .sup-badge:focus-visible::after { transform: translate(0, 50%); }
@media (hover: hover) { .avatar-wrap .sup-badge:hover::after { transform: translate(0, 50%); } }
@media (prefers-reduced-motion: reduce) { .sup-badge::after { transition: none; } }
/* star after a name on boards: the TEXT truncates, the star and its label never clip */
.lb-row .lb-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: visible; }
.lb-name-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-badge.inline { box-shadow: none; flex: none; }

/* Supporter badge banner (Chad 2026-10-04): the Me banner becomes the supporter's badge, in their tier colour */
.supporter-badge-banner { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border: 0; border-radius: 12px; font: inherit; text-align: left; cursor: pointer; color: #fff; }
.supporter-badge-banner.supporter { background: var(--sup-a); color: var(--sup-a-ink); }
.supporter-badge-banner.deluxe { background: var(--sup-b); color: var(--sup-b-ink); }
.sbb-star { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,0.22); box-shadow: inset 0 0 0 2px rgba(255,255,255,0.55); }
.sbb-star svg { width: 60%; height: 60%; }
.sbb-text { display: grid; gap: 1px; flex: 1; min-width: 0; }
.sbb-text strong { font-size: 15.5px; }
.sbb-text small { font-size: 12.5px; opacity: 0.9; }
.sbb-hero { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; }
.sbb-hero.supporter { background: var(--sup-a); color: var(--sup-a-ink); }
.sbb-hero.deluxe { background: var(--sup-b); color: var(--sup-b-ink); }
.sbb-hero h2 { margin: 0; font-size: 21px; color: inherit; }
.sbb-star.big { width: 48px; height: 48px; }
.sbb-idea { display: grid; gap: 8px; }
.sbb-sent { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--paper-deep); font-weight: 600; }
.text-action.subtle { font-weight: 600; color: var(--muted); font-size: 13.5px; }
/* supporter titles stay on one line (Chad): no wrap; shrink a touch on the narrowest phones */
.sbb-text strong, .sbb-hero h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sbb-text strong { font-size: clamp(11.5px, 3.75vw, 15.5px); }
.sbb-hero h2 { font-size: clamp(16px, 5vw, 21px); }

/* Tip again (Chad 2026-10-04, option B): a quiet row on the thank-you sheet opens its own screen */
.sbb-again-b { border-top: 1px solid var(--line); border-radius: 0; padding-left: 2px; padding-right: 2px; }

/* Game Center link on the Me profile card (Chad 2026-10-04): label left, a quiet Link button like Edit right */
.me-gc-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--line); }
.me-gc-link .me-row-label { display: grid; gap: 2px; min-width: 0; }
.gc-link-btn { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.gc-link-icon { display: inline-flex; opacity: 0.75; }

/* Story share (Chad 2026-10-04): the card pops up over the screen, big; round share icons underneath */
.share-overlay { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: auto auto auto auto auto; justify-items: center; align-content: center; gap: 14px;
  padding: max(14px, env(safe-area-inset-top)) 18px calc(16px + env(safe-area-inset-bottom, 0px)); background: rgba(10, 11, 12, 0.86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #f2f2f0; }
.share-x { position: absolute; top: max(10px, env(safe-area-inset-top)); right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,0.14); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.share-overlay .share-seg { background: rgba(255,255,255,0.12); border-color: transparent; }
.share-overlay .share-seg .seg-btn { color: #d9dbde; }
.share-overlay .share-seg .seg-btn.on { background: #fff; color: #121315; }
.share-card { display: grid; place-items: center; }
.share-card img, .share-card-wait { height: min(62vh, 86vw * 16 / 9); width: auto; max-width: 86vw; aspect-ratio: 9 / 16; border-radius: 18px; box-shadow: 0 18px 50px rgba(0,0,0,0.55); background: #121315; display: block; object-fit: contain; }
.share-card-wait { display: grid; place-items: center; width: min(62vh * 9 / 16, 86vw); color: #a6a9af; font-size: 14px; }
.share-chs { display: flex; justify-content: center; gap: 18px; }
.share-ch { display: grid; justify-items: center; align-content: start; gap: 6px; padding: 0; border: 0; background: none; color: #f2f2f0; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.share-ch:disabled { opacity: 0.5; }
.share-ch-ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; color: #fff; }
.share-ch-ico svg { width: 26px; height: 26px; }
.share-ch-ico.messages { background: #34c759; }
.share-ch-ico.instagram { background: linear-gradient(135deg, #f9a03f, #d62976 55%, #7b3fe4); }
.share-ch-ico.facebook { background: #1877f2; }
.share-ch-ico.more { background: #5c6562; }
.share-note { max-width: 34ch; text-align: center; font-size: 13.5px; line-height: 1.35; color: #c3c6ca; }
.share-copy { border: 0; background: none; color: #fff; font: inherit; font-weight: 700; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Friend link on an iPhone without the app, after release (Chad Q1 B) */
.friend-landing { display: grid; gap: 16px; align-content: start; padding: max(22px, env(safe-area-inset-top)) 22px calc(24px + env(safe-area-inset-bottom, 0px)); max-width: 520px; margin: 0 auto; }
.fl-brand { display: flex; align-items: center; gap: 8px; font: 800 20px/1 var(--display, "Barlow Condensed"), sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.fl-brand .brand-logo svg { width: 40px; height: auto; }
.friend-landing h1 { font: 800 40px/0.95 "Barlow Condensed", "Arial Narrow", sans-serif; text-transform: uppercase; text-wrap: balance; }
.fl-top { position: relative; height: 150px; border-radius: 16px; overflow: hidden; background: #121315 center / cover no-repeat; display: grid; align-content: end; padding: 12px 14px; color: #fff; }
.fl-top::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.72), rgba(0,0,0,0) 70%); }
.fl-top > * { position: relative; }
.fl-top-k { font: 700 13px "Barlow Condensed", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #ff9a78; }
.fl-top strong { font: 800 30px/1 "Barlow Condensed", sans-serif; text-transform: uppercase; }
.fl-sub { color: var(--ink-2); font-size: 16px; line-height: 1.4; }
.fl-badge { justify-self: start; padding: 0; border: 0; background: none; cursor: pointer; }
.fl-badge img { display: block; height: 60px; width: auto; }
.fl-web { justify-self: start; }
