/* Sofa Escape 1k. Always light. Stone ground, raspberry actions, butter-yellow selection, ink text. Bricolage Grotesque headings, Hanken Grotesk body. No red buttons. */
@font-face { font-family: "Bricolage Grotesque"; font-weight: 200 800; font-style: normal; font-display: swap; src: url("fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 100 900; font-style: normal; font-display: swap; src: url("fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2"); }

:root {
  --ground: #f2efea;       /* page: stone */
  --surface: #ffffff;
  --ink: #1e1a24;
  --muted: #514b5a;
  --line: #ddd6cc;         /* card edges, dividers */
  --edge: #857e92;         /* control edges */
  --tag: #e8e2d8;
  --tag-ink: #3a3340;
  --sun: #f5c542;          /* selected, yes, highlights */
  --sun-ink: #1e1a24;
  --go: #a12c66;           /* primary actions */
  --go-ink: #ffffff;
  --heart: #e0709b;        /* saved heart */
  --badge: #a12c66;
  --badge-ink: #ffffff;
  --cele: #a12c66;         /* success banner */
  --link: #a12c66;
  --focus: #a12c66;
  --warn-bg: #ffe9a8;
  --warn-ink: #5c4400;
  --near-bg: #f9dce8;
  --near-ink: #7a1f4b;
  --display: "Bricolage Grotesque", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --nav-h: 70px;
  color-scheme: light;
}
.g-food { --g: #b83227; }
.g-shows { --g: #7c3aed; }
.g-culture { --g: #0f766e; }
.g-outdoors { --g: #2f7d0b; }
.g-games { --g: #2563eb; }
.g-making { --g: #b45309; }
.g-days { --g: #be185d; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 1rem/1.5 var(--body); color: var(--ink); background: var(--ground);
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.01em; line-height: 1.12; margin: 0; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }
p { margin: 6px 0; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--ground); padding: 8px 12px; z-index: 30; }
.skip:focus { left: 8px; top: 8px; }
.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hint { color: var(--muted); font-size: 0.9375rem; margin: 6px 0; }
.hint.center { text-align: center; min-height: 1.4em; }
.fine { color: var(--muted); font-size: 0.9rem; text-align: center; }
.card { background: var(--surface); border: 1.5px solid var(--line); border-radius: 20px; padding: 16px; }
.sub-h { margin: 22px 0 8px; font-size: 1.125rem; }

/* Buttons */
.btn {
  min-height: 52px; padding: 10px 20px; font-family: var(--body); font-weight: 700; font-size: 1rem;
  color: var(--go-ink); background: var(--go); border: 1.5px solid var(--go); border-radius: 14px;
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn.ghost { color: var(--ink); background: var(--surface); border-color: var(--edge); }
.btn.small { min-height: 46px; padding: 8px 16px; font-size: 0.9375rem; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.filebtn { margin: 0; }
.linkbtn { min-height: 44px; padding: 0 8px; font: inherit; font-weight: 700; color: var(--link); background: none; border: 0; text-decoration: underline; cursor: pointer; display: inline-flex; align-items: center; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

select, input[type="date"] {
  width: 100%; min-height: 48px; padding: 8px 12px; font: inherit; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--edge); border-radius: 14px;
}
label { display: block; font-weight: 700; margin: 10px 0 6px; }

/* First run */
.onboard { position: relative; min-height: 100vh; min-height: 100svh; max-width: 480px; margin: 0 auto; padding: calc(24px + env(safe-area-inset-top)) 24px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; overflow: hidden; }
.onboard > #ob-start, .onboard > #ob-intro { flex: 1; display: flex; flex-direction: column; }
.ob-brand { display: flex; align-items: center; gap: 10px; }
.ob-brand .logo { width: 36px; height: 36px; }
.ob-brand p { margin: 0; font-weight: 800; font-size: 1.0625rem; }
.onboard h1 { margin: 30px 0 0; font-size: clamp(2.75rem, 14.4vw, 3.5rem); font-weight: 800; line-height: 0.94; letter-spacing: -0.035em; }
.lede { font-size: 1rem; line-height: 1.5; color: var(--muted); max-width: 300px; margin: 14px 0 0; }
.hero { width: min(290px, 78%); margin: 16px -40px 0 auto; transform: rotate(-3deg); }
.mascot { display: block; width: 100%; height: auto; }
.ob-form { margin-top: 22px; }
.ob-form label { font-size: 0.9375rem; margin: 0 0 8px; }
.ob-form select { min-height: 56px; }
.ob-form .btn { margin-top: 10px; min-height: 56px; font-size: 1.0625rem; }
.onboard .fine { margin: 14px 0 0; }
.ob-links { margin-top: auto; padding-top: 16px; display: flex; align-items: center; justify-content: center; gap: 24px; font-weight: 600; font-size: 0.9375rem; }
.ob-links .linkbtn { display: inline-flex; margin: 0; padding: 0; }
.ob-links a { display: inline-flex; align-items: center; min-height: 44px; }
.hints { display: flex; gap: 10px; margin: 18px 0 0; flex-wrap: wrap; }
.hintchip { padding: 8px 16px; border: 1.5px solid var(--edge); border-radius: 999px; background: var(--surface); font-weight: 700; }
.hintchip.yes { background: var(--sun); border-color: var(--sun); }
#ob-intro .btn { margin-top: 26px; min-height: 56px; font-size: 1.0625rem; }
#ob-intro .hero { margin-bottom: 18px; }

/* App shell */
#app { max-width: 560px; margin: 0 auto; }
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--ground);
}
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.logo { width: 32px; height: 32px; display: block; flex: none; }
.wordmark { margin: 0; font-family: var(--display); font-weight: 800; font-size: 1.125rem; white-space: nowrap; }
.where { position: relative; flex: none; }
.where select {
  appearance: none; -webkit-appearance: none; width: auto; max-width: 190px; min-height: 44px; padding: 8px 36px 8px 16px;
  border-radius: 999px; font-weight: 700; font-family: var(--display); text-overflow: ellipsis;
}
.where .chev { position: absolute; right: 10px; top: 50%; margin-top: -12px; pointer-events: none; }
main { padding: 4px 16px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); }
.tab[hidden] { display: none; }

/* Bottom navigation */
.tabbar {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 560px; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
}
.tablink {
  position: relative; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-weight: 700; font-size: 0.75rem; border-radius: 14px;
}
.tablink[aria-current="page"] { color: var(--sun-ink); background: var(--sun); }
.badge-n {
  position: absolute; top: 2px; left: 50%; margin-left: 8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--badge); color: var(--badge-ink); font-size: 0.75rem; line-height: 20px; text-align: center; border: 2px solid var(--surface); box-sizing: content-box;
}

/* Swipe */
.progress { display: flex; align-items: center; gap: 10px; margin: 8px 0 10px; }
.progress-text { font-size: 0.875rem; color: var(--muted); white-space: nowrap; min-width: 6.2em; }
.bar { flex: 1; height: 12px; background: var(--surface); border: 1.5px solid var(--edge); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; background: var(--go); border-radius: 999px; }
.savedpill {
  min-height: 44px; min-width: 64px; padding: 4px 14px 4px 10px; font-family: var(--display); font-weight: 700; font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--edge); border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.savedpill .ic { width: 20px; height: 20px; color: var(--heart); fill: var(--heart); }
.deckwrap { position: relative; height: clamp(250px, calc(100vh - 440px), 440px); height: clamp(250px, calc(100svh - 440px), 440px); }
.swipecard {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; overflow: hidden;
  padding: 20px 20px 22px; border-radius: 28px; color: #fff; background: var(--g, #2563eb); box-shadow: 0 14px 28px rgba(30, 26, 36, 0.22);
  touch-action: none; -webkit-user-select: none; user-select: none; cursor: grab;
}
.swipecard.dragging { cursor: grabbing; }
.swipecard.next { transform: scale(0.94) translateY(14px); pointer-events: none; box-shadow: none; }
.cardart { flex: 1 1 0; min-height: 0; display: flex; justify-content: flex-end; align-items: flex-start; pointer-events: none; }
.cardart svg { display: block; height: 100%; width: auto; max-width: 62%; }
.swipecard h3 { position: relative; font-size: 1.75rem; line-height: 1.1; }
.swipecard .catline { position: relative; font-size: 1rem; margin: 0; max-width: 28ch; }
.swipecard .catcount { position: relative; align-self: flex-start; margin: 4px 0 0; padding: 5px 14px; border-radius: 999px; background: rgba(0, 0, 0, 0.3); font-size: 0.875rem; font-weight: 700; }
.stamp {
  position: absolute; top: 18px; padding: 4px 14px; border: 3px solid #fff; border-radius: 12px; font-family: var(--display);
  font-weight: 700; font-size: 1.125rem; opacity: 0; pointer-events: none; z-index: 2; background: rgba(0, 0, 0, 0.18);
}
.stamp-yes { right: 16px; transform: rotate(8deg); }
.stamp-no { left: 16px; transform: rotate(-8deg); }
.emptydeck { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 4px; }
.emptydeck .mascot { width: 140px; }
.emptydeck .actions { justify-content: center; }
.swipebtns { display: flex; justify-content: center; align-items: flex-start; gap: 28px; margin-top: 16px; }
.sb { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 0.8125rem; font-weight: 700; color: var(--ink); }
.round {
  width: 64px; height: 64px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--ink); background: var(--surface); border: 1.5px solid var(--edge);
}
.round .ic { width: 28px; height: 28px; }
.round.yes { width: 72px; height: 72px; margin-top: -4px; background: var(--sun); color: var(--sun-ink); }
.round.small { width: 48px; height: 48px; margin-top: 8px; }
.round:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.chip {
  min-height: 44px; padding: 6px 14px 6px 12px; font: inherit; font-weight: 700; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--edge); border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.chip::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--g, #2563eb); flex: none; }
#picks .hint { margin-top: 22px; }

/* Banner cards: feedback, celebration, nudge */
#banner { padding: 0 16px; }
.fb, .cele, .nudge { border-radius: 24px; padding: 16px; margin: 6px 0 12px; }
.nudge { border: 1.5px solid var(--line); }
.fb { background: var(--sun); color: #1e1a24; }
.fb h3 { font-size: 1.125rem; }
.fb .note { color: #3a3010; font-size: 0.875rem; }
.fbbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.fb .btn { color: #ffffff; background: #1e1a24; }
.fb .btn.ghost { color: #1e1a24; background: #ffffff; }
.cele { background: var(--cele); color: #fff; display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; }
.cele .mascot { width: 96px; }
.cele h3 { font-size: 1.25rem; }
.cele .actions { grid-column: 1 / -1; margin-top: 4px; }
.cele .btn.ghost { color: #1e1a24; }
.nudge { background: var(--surface); display: grid; grid-template-columns: 84px 1fr; gap: 4px 12px; align-items: center; }
.nudge .mascot { width: 84px; }
.nudge .actions, .nudge .plan { grid-column: 1 / -1; }
.nudge strong { font-family: var(--display); }

/* Idea and plan cards */
#list, #planned, #done { display: grid; gap: 14px; }
#more { margin-top: 24px; }
.idea { background: var(--surface); border: 1.5px solid var(--line); border-radius: 20px; overflow: hidden; }
.ideahead { display: flex; align-items: stretch; justify-content: space-between; gap: 12px; padding: 14px 8px 14px 16px; background: var(--g, #2563eb); color: #fff; }
.ideahead > div:first-child { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.ideahead h3 { margin: 0; font-size: 1.25rem; line-height: 1.15; }
.ideahead .catname { margin: 0; font-size: 0.8125rem; font-weight: 700; }
.ideahead .where { display: flex; align-items: center; gap: 5px; margin: 0; font-size: 0.875rem; font-weight: 600; }
.ideahead .where .ic { width: 16px; height: 16px; flex: none; }
.ideahead .cardart { flex: none; width: 64px; height: 64px; align-self: center; }
.ideahead .cardart svg { max-width: none; height: 100%; width: 100%; }
.ideabody { padding: 14px 16px 6px; }
.ideabody p { margin: 0; }
.ideabody .what { font-size: 1rem; }
.ideabody .note { margin-top: 4px; }
.note { color: var(--muted); font-size: 0.875rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.tags li { background: var(--tag); color: var(--tag-ink); border-radius: 999px; padding: 3px 11px; font-size: 0.8125rem; font-weight: 600; }
.tags li.warn { background: var(--warn-bg); color: var(--warn-ink); }
.tags li.near { background: var(--near-bg); color: var(--near-ink); }
.ideabody .actions { margin-top: 14px; gap: 8px; }
.ideabody .actions .btn { flex: 1 1 0; white-space: nowrap; }
.btn .ic { width: 18px; height: 18px; margin-right: 6px; }
a.btn { text-decoration: none; }
.subacts { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 2px -8px 0; }
.sublink { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font: inherit; font-size: 0.9375rem; font-weight: 700; color: var(--link); background: none; border: 0; text-decoration: underline; cursor: pointer; }
.intro { position: relative; display: grid; grid-template-columns: 60px 1fr; gap: 12px; align-items: start; background: #fdf4d6; border: 1.5px dashed var(--edge); border-radius: 20px; padding: 14px 52px 14px 14px; margin: 4px 0 12px; }
.intro .mascot { width: 60px; }
.intro .tiplabel { margin: 0 0 2px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.tipx { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; }
.tipx .ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }
.tipx:hover { background: rgba(30, 26, 36, 0.08); }
.tipx:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.intro h3 { margin: 0 0 6px; }
.intro ol { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 4px; font-size: 0.9375rem; }
#list .idea .plan { margin: 14px 0 0; padding: 14px 0 12px; }
.plan label { margin: 0 0 6px; }
.plan input[type="date"] { width: 100%; max-width: 15rem; }
.plan .actions { margin-top: 12px; }
.maplink { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; }
.maplink .ic { width: 20px; height: 20px; }
.plan { margin-top: 12px; padding-top: 12px; border-top: 1.5px solid var(--line); }
.planned-card { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: start; background: var(--surface); border: 1.5px solid var(--edge); border-radius: 20px; padding: 14px; }
.tile { width: 64px; padding: 8px 0; border-radius: 16px; text-align: center; color: #fff; background: var(--g, #2563eb); font-family: var(--display); }
.tile b { display: block; font-size: 1.5rem; line-height: 1.05; font-weight: 700; }
.tile span { font-size: 0.8125rem; font-weight: 600; }
.planned-card h3 { margin-top: 2px; }
.empty { text-align: center; padding: 22px 16px; }
.empty .mascot { width: 150px; margin: 0 auto 6px; }
.empty .actions { justify-content: center; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0 4px; }
#listcount { margin: 6px 0 12px; }
.pill { position: relative; flex: none; }
.pill select { width: auto; min-height: 44px; padding: 8px 14px; border-radius: 999px; font-weight: 700; background: var(--surface); }
.pill.toggle { display: inline-flex; margin: 0; }
.pill.toggle input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pill.toggle span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1.5px solid var(--edge); border-radius: 999px; font-weight: 700; background: var(--surface); }
.pill.toggle input:checked + span { background: var(--sun); color: var(--sun-ink); }
.pill.toggle input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.data { margin-top: 26px; }
.data h3 { margin-bottom: 4px; }

.toast {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); max-width: 536px; margin: 0 auto; z-index: 40;
  background: var(--ink); color: var(--ground); padding: 12px 16px; border-radius: 14px; font-weight: 600; font-size: 0.9375rem;
}


@media (prefers-reduced-motion: no-preference) {
  .swipecard:not(.dragging):not(.next):not(.demo) { transition: transform 0.2s ease; }
  .btn:active, .round:active, .savedpill:active { transform: translateY(1px); }
  .hero.hop .mascot, .cele .mascot, .nudge .mascot { animation: hop 0.7s ease-out; }
  .savedpill.bump { animation: bump 0.45s ease-out; }
  @keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
  @keyframes hop { 0% { transform: translateY(16px); } 40% { transform: translateY(-12px); } 70% { transform: translateY(1px); } 100% { transform: translateY(0); } }
  @keyframes demo {
    0%, 100% { transform: translateX(0) rotate(0); }
    25% { transform: translateX(28px) rotate(6deg); }
    50% { transform: translateX(0) rotate(0); }
    75% { transform: translateX(-28px) rotate(-6deg); }
  }
}

@media (max-width: 380px) { .where select { max-width: 150px; } .wordmark { font-size: 1.0625rem; } }

/* Pointer devices: hover feedback */
@media (hover: hover) and (pointer: fine) {
  .btn:not(:disabled):hover { filter: brightness(1.08); }
  .btn.ghost:not(:disabled):hover, .chip:hover, .savedpill:hover, .round:not(:disabled):hover { background: #fff1c2; }
  .tablink:hover:not([aria-current="page"]) { background: var(--tag); color: var(--ink); }
  .idea:hover { border-color: var(--edge); }
  select:hover { background-color: #faf7f2; }
}

/* Tablet: wider column, two-up lists */
@media (min-width: 640px) {
  #app { max-width: 880px; }
  .topbar { padding-left: 24px; padding-right: 24px; }
  main { padding-left: 24px; padding-right: 24px; }
  #banner { padding: 0 24px; }
  .tabbar { max-width: 880px; }
  h2 { font-size: 1.75rem; }
  #tab-swipe > .hint, #tab-swipe > h2, #tab-swipe > .progress, #deck, .swipebtns, #swipe-status, #picks, #nudge { max-width: 560px; margin-left: auto; margin-right: auto; }
  #tab-swipe > h2 { margin-top: 6px; }
  .deckwrap { height: clamp(320px, calc(100svh - 400px), 520px); }
  #list, #planned, #done { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  #list .empty, #planned .empty { grid-column: 1 / -1; }
  /* Ideas: every card the same height, actions pinned to the bottom */
  #list:not(.isdetail) { align-items: stretch; }
  #list > .idea { display: flex; flex-direction: column; }
  #list > .idea > .ideabody { flex: 1; display: flex; flex-direction: column; }
  #list > .idea > .ideabody > .actions { margin-top: auto; padding-top: 14px; }
  #more { max-width: 560px; margin-left: auto; margin-right: auto; display: block; }
  .data { max-width: 560px; }
  .data { margin-top: 32px; }
  .toast { max-width: 560px; }
  .fb, .cele, .nudge { max-width: 560px; margin-left: auto; margin-right: auto; }
  .cardart svg { max-width: 54%; }
  .swipecard h3 { font-size: 2rem; }
  .swipecard .catline { font-size: 1.0625rem; }
}

/* Desktop: navigation moves to the top bar, wider lists */
@media (min-width: 960px) {
  #app { max-width: 1080px; }
  .tabbar {
    top: 10px; bottom: auto; left: 50%; width: auto; max-width: none; padding: 4px; gap: 4px; z-index: 20;
    grid-template-columns: repeat(4, auto); border: 1.5px solid var(--edge); border-radius: 999px;
  }
  .tablink { flex-direction: row; gap: 8px; min-height: 44px; padding: 0 18px; font-size: 0.9375rem; border-radius: 999px; }
  .badge-n { position: static; margin: 0 -4px 0 0; border: 0; box-sizing: border-box; }
  .topbar { padding-top: 16px; padding-bottom: 14px; }
  main { padding-bottom: 56px; }
  #list, #planned, #done { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .toast { bottom: 24px; }
  .deckwrap { height: clamp(360px, calc(100svh - 360px), 560px); }
  .swipecard { padding: 28px 28px 30px; }
  .swipecard h3 { font-size: 2.25rem; }
}

/* Short landscape phones */
@media (orientation: landscape) and (max-height: 520px) {
  .hero { width: 150px; }
  .onboard h1 { font-size: 2rem; margin-top: 14px; }
    #tab-swipe { display: grid; grid-template-columns: minmax(0, 1fr) 132px; column-gap: 16px; align-items: start; }
  #tab-swipe > h2, #tab-swipe > .hint, #tab-swipe > .progress, #tab-swipe > #deck, #tab-swipe > .swipebtns, #tab-swipe > #swipe-status, #tab-swipe > #picks, #tab-swipe > #nudge { max-width: none; margin-left: 0; margin-right: 0; }
  .sb span { display: none; }
  .round { width: 54px; height: 54px; }
  .round.yes { width: 60px; height: 60px; margin-top: 0; }
  .round.small { width: 44px; height: 44px; margin-top: 0; }
  #tab-swipe > h2, #tab-swipe > .hint, #tab-swipe > #nudge, #tab-swipe > .progress, #tab-swipe > #swipe-status, #tab-swipe > #picks { grid-column: 1 / -1; }
  #tab-swipe > h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #tab-swipe > .hint:not(#swipe-status) { display: none; }
  #tab-swipe > .swipebtns { grid-column: 2; flex-direction: column; align-items: center; align-self: center; gap: 8px; margin-top: 0; }
  .deckwrap { height: clamp(170px, calc(100svh - 190px), 300px); }
  .swipecard .cardart { display: none; }
  .progress { margin: 2px 0 8px; }
  main { padding-bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); }
}

/* Information pages (privacy) */
.page { max-width: 720px; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top)) 16px 48px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.page-head a.brandlink { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 700; }
.page h1 { font-size: 2rem; margin: 14px 0 2px; }
.page .sub { color: var(--muted); margin: 0 0 16px; }
.page .card { margin: 0 0 14px; }
.page .card h2 { font-size: 1.25rem; margin-bottom: 4px; }

@media (forced-colors: active) {
  .btn, .round, .chip, .pill select, .card, .idea, .swipecard { border: 2px solid CanvasText; }
  .tablink[aria-current="page"] { outline: 2px solid Highlight; }
}
@media print {
  .tabbar, .topbar, .swipebtns, .toast, .skip { display: none !important; }
  body { background: #fff; }
}
.ctr { text-align: center; }

.backbtn { margin: 0 0 6px -8px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 14px 0 0; font-size: 0.9375rem; }
.facts dt { font-weight: 700; color: var(--muted); }
.facts dd { margin: 0; }
.detail .ideahead h3 { font-size: 1.5rem; }

.backbtn { margin: 0 0 6px -8px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 14px 0 0; font-size: 0.9375rem; }
.facts dt { font-weight: 700; color: var(--muted); }
.facts dd { margin: 0; }
.detail .ideahead h3 { font-size: 1.5rem; }
.subacts { flex-wrap: wrap; }
.detail .subacts { justify-content: space-between; }
.sublink .out { width: 16px; height: 16px; margin-left: 4px; flex: none; }
.sublink { text-decoration: none; }
.rows { list-style: none; margin: 16px -16px -6px; padding: 0; }
.rows li + li .row, .rows li:first-child .row { border-top: 1.5px solid var(--line); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 8px 16px; font: inherit; color: var(--ink); background: none; border: 0; text-align: left; text-decoration: none; cursor: pointer; }
.row span { display: flex; flex-direction: column; gap: 2px; }
.row b { font-weight: 700; }
.row small { color: var(--muted); font-size: 0.8125rem; }
.row .out { width: 20px; height: 20px; flex: none; color: var(--link); }
.row.quiet b { color: var(--muted); font-weight: 600; }
.row:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
@media (hover: hover) { .row:hover { background: var(--tag); } }
.btn.backbtn { margin: 0 0 12px; min-height: 44px; padding: 6px 16px 6px 12px; }
#list .backbtn, #swipe-detail .backbtn, #planned .backbtn { justify-self: start; margin-bottom: 0; }
/* Details opened from the five-picks panel replace the swipe screen until Back */
#tab-swipe.showdetail > :not(#swipe-detail) { display: none; }
#swipe-detail { display: grid; gap: 14px; max-width: 880px; margin: 0 auto; width: 100%; }
#swipe-detail[hidden] { display: none; }
#swipe-detail .idea .plan { margin: 14px 0 0; padding: 14px 0 12px; }
#swipe-detail .idea.detail { overflow: hidden; }

.ideabody .actions .btn.iconbtn { flex: 0 0 auto; min-width: 46px; padding: 8px 12px; }
.row > .ic { width: 20px; height: 20px; flex: none; color: var(--link); }

.cm { display: grid; gap: 8px; margin-top: 16px; }
.cm label { font-weight: 700; margin-top: 6px; }
.cm input, .cm select, .cm textarea { width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--card, #fff); border: 1.5px solid var(--line); border-radius: 12px; }
.cm textarea { min-height: 120px; resize: vertical; }
.cm input:focus-visible, .cm select:focus-visible, .cm textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.segbtn { flex: 1 1 auto; min-height: 46px; padding: 8px 12px; font: inherit; font-weight: 600; color: var(--ink); background: none; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; }
.segbtn[aria-checked="true"] { background: var(--sun); color: var(--sun-ink); border-color: var(--sun); }
.segbtn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Borough picker: a location control, clearly different from the white filter pills */
.where select { background: var(--near-bg); color: var(--near-ink); border: 1px solid #e6b6cd; padding-left: 34px; min-height: 40px; font-size: 0.9375rem; font-weight: 600; }
.where .pin { position: absolute; left: 11px; top: 50%; margin-top: -8px; width: 16px; height: 16px; color: var(--go); pointer-events: none; z-index: 1; }
.where select:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (hover: hover) { .where select:hover { background: #f4c9dc; } }
@media (max-width: 380px) { .where select { max-width: 160px; } }
@media (forced-colors: active) { .where select { border-color: CanvasText; } }

/* Audit fixes */
.filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.filters .pill select { width: 100%; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.segbtn { padding: 8px 6px; font-size: 0.9375rem; }
.cm { gap: 6px; }
.cm .hint { margin: 4px 0 8px; }
.cm .actions { margin-top: 8px; }
#tab-community > .hint { margin: 6px 0 4px; max-width: 60ch; }
@media (min-width: 720px) {
  .filters { display: flex; }
  .filters .pill select { width: auto; }
  #tab-community .cm { max-width: 640px; }
}

.donebox { margin-top: 10px; padding-top: 10px; border-top: 1.5px solid var(--line); }
.donebox .actions { margin-top: 6px; }
.planned-card .actions + .actions { margin-top: 8px; }
.idea.detail .dleft > .note { margin: 6px 0 0; }

.btn.iconbtn .ic { margin: 0; width: 22px; height: 22px; }
.sharepanel { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(30, 26, 36, 0.45); }
.sharebox { width: 100%; max-width: 520px; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); background: var(--surface); border-radius: 20px 20px 0 0; border: 1.5px solid var(--edge); }
.sharebox h3 { margin: 0 0 10px; }
.sharebox textarea { width: 100%; min-height: 84px; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--ground); border: 1.5px solid var(--edge); border-radius: 12px; resize: none; }
.sharebox .actions { margin-top: 12px; }
@media (min-width: 720px) { .sharepanel { align-items: center; } .sharebox { border-radius: 20px; } }

/* Short screens: keep the main action above the fold */
@media (max-height: 620px) and (orientation: portrait) {
  .onboard h1 { margin-top: 18px; font-size: clamp(2.25rem, 12vw, 2.75rem); }
  #ob-intro .hero, #ob-start .hero { width: min(200px, 56%); margin-top: 8px; }
  #ob-intro .btn { margin-top: 18px; }
  .deckwrap { height: clamp(150px, calc(100svh - 400px), 250px); }
}
@media (max-height: 460px) and (orientation: landscape) {
  .onboard { padding-top: calc(12px + env(safe-area-inset-top)); padding-bottom: 12px; }
  .onboard h1 { margin-top: 10px; font-size: 2rem; }
  .lede { margin-top: 6px; }
  #ob-intro .hero, #ob-start .hero { width: 120px; margin: 0 -10px 0 auto; }
  .hints { margin-top: 10px; }
  #ob-intro .btn { margin-top: 12px; min-height: 48px; }
}
@media (max-width: 340px) { .where select { max-width: 126px; } .wordmark { font-size: 1rem; } .brand { gap: 6px; } }
#ob-intro .hero { margin-bottom: 4px; }

/* In-app browsers and short phones leave about 600px: keep the first screen's main button visible */
@media (max-height: 720px) and (orientation: portrait) {
  .onboard { padding-top: calc(14px + env(safe-area-inset-top)); }
  .onboard h1 { margin-top: 14px; font-size: clamp(2.25rem, 11.5vw, 2.875rem); }
  .lede { font-size: 0.9375rem; line-height: 1.45; margin-top: 10px; }
  #ob-start .hero, #ob-intro .hero { width: min(200px, 54%); margin-top: 6px; }
  .ob-form { margin-top: 10px; }
  .ob-form select, .ob-form .btn { min-height: 50px; }
  .ob-form label { margin-bottom: 6px; }
  #ob-intro .btn { margin-top: 16px; }
}

/* Category cards: say what it is, then name examples */
.swipecard .catline { max-width: 34ch; font-size: 1rem; line-height: 1.3; font-weight: 600; }
.swipecard .catx { position: relative; margin: 0; max-width: 34ch; font-size: 0.875rem; line-height: 1.35; }

/* One rhythm for every page: heading, 12px, content. A sub-line sits 6px under its heading. */
.tab > h2 { margin: 6px 0 12px; }
.tab > h2 + .hint { margin: -6px 0 12px; }
@media (max-height: 720px) and (orientation: portrait) {
  /* the swipe hint stays visible; the card gives up the room it needs */
  .deckwrap { height: clamp(150px, calc(100svh - 355px), 330px); }
  .swipecard { padding: 16px 18px 18px; gap: 6px; }
  .swipecard h3 { font-size: 1.5rem; }
  .swipecard .catline { font-size: 0.9375rem; }
  .swipecard .catx { font-size: 0.8125rem; }
}
@media (max-height: 640px) and (orientation: portrait) {
  .swipecard h3 { font-size: 1.375rem; }
  .swipecard .catcount { display: none; }
}

/* Suggestions: three choices and the reason for each */
.why { font-weight: 600; color: var(--go); }
.nudge .npicks { grid-column: 1 / -1; list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.npick { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--ground); }
.npick .ntxt { display: grid; gap: 1px; min-width: 0; }
.npick strong { font-size: 1rem; line-height: 1.2; }
.npick .why { margin: 0; font-size: 0.8125rem; }
.npick .nw { font-size: 0.8125rem; color: var(--muted); line-height: 1.3; }
.npick .btn { flex: none; }
@media (max-height: 720px) and (orientation: portrait) { .nudge { grid-template-columns: 1fr; } .nudge .mascot { display: none; } .npick .nw { display: none; } }
.nudge .actions { flex-wrap: nowrap; gap: 8px; } .nudge .actions .btn { padding-left: 12px; padding-right: 12px; white-space: nowrap; }

/* Page opened from a shared link */
.sharedpage { max-width: 560px; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom)); }
.sh-brand { display: flex; align-items: center; gap: 10px; }
.sh-brand p { margin: 0; font-family: var(--display); font-weight: 800; font-size: 1.125rem; }
.sh-tag { margin: 18px 0 12px; font-weight: 700; color: var(--go); }
.sh-about { margin-top: 14px; display: grid; gap: 8px; }
.sh-about p { margin: 0; color: var(--muted); }
.sh-about .btn { margin-top: 6px; }
.sh-links { text-align: center; margin-top: 14px; }
.sharedpage .ideabody .hint { margin-top: 12px; }
.sharedpage .ideabody .note { margin-top: 12px; }

/* Desktop */
.kbd { display: none; }
.dcols { display: block; }
@media (min-width: 900px) {
  /* First screen: words on the left, the couch on the right */
  .onboard { max-width: 1080px; padding-left: 40px; padding-right: 40px; justify-content: center; }
  .onboard > #ob-start, .onboard > #ob-intro { flex: 0 1 auto; display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); column-gap: 72px; align-content: center; }
  .onboard > #ob-start[hidden], .onboard > #ob-intro[hidden] { display: none; }
  #ob-start > *, #ob-intro > * { grid-column: 1; }
  #ob-start > .hero, #ob-intro > .hero { grid-column: 2; grid-row: 1 / span 6; align-self: center; width: min(520px, 100%); margin: 0 auto; transform: rotate(-3deg); }
  #ob-start > .ob-links { grid-column: 1 / -1; margin-top: 48px; justify-content: flex-start; }
  .onboard h1 { font-size: clamp(3.5rem, 6.4vw, 5.25rem); margin-top: 28px; }
  .lede { font-size: 1.1875rem; max-width: 420px; }
  .ob-brand p { font-size: 1.25rem; }
  .ob-brand .logo { width: 44px; height: 44px; }
  .ob-form { margin-top: 28px; }
  #ob-intro .btn { margin-top: 28px; max-width: 360px; }
  .hints { margin-top: 24px; }
}
@media (min-width: 960px) {
  main { padding-top: 12px; }
  /* Swipe: bigger card, keyboard tip */
  #tab-swipe > .hint, #tab-swipe > h2, #tab-swipe > .progress, #deck, .swipebtns, #swipe-status, #picks, #nudge { max-width: 600px; }
  .deckwrap { height: clamp(380px, calc(100svh - 330px), 600px); }
  .swipebtns .round { width: 68px; height: 68px; }
  .kbd { display: block; text-align: center; margin: 10px 0 0; font-size: 0.875rem; color: var(--muted); }
  kbd { display: inline-block; min-width: 26px; padding: 1px 7px; border: 1.5px solid var(--edge); border-bottom-width: 3px; border-radius: 8px; background: var(--surface); font: inherit; font-weight: 700; color: var(--ink); text-align: center; }
  /* Place details: facts on the left, actions on the right */
  #list.isdetail, #planned.isdetail { grid-template-columns: minmax(0, 1fr); max-width: 880px; margin: 0 auto; width: 100%; }
  #list .idea.detail { overflow: hidden; }
  .dcols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; column-gap: 32px; align-items: start; padding-top: 6px; }
  .dright .actions { margin-top: 8px; }
  .dright .rows { margin: 14px 0 0; border: 1.5px solid var(--line); border-radius: 16px; overflow: hidden; }
  .dright .rows li:first-child .row { border-top: 0; }
  .idea.detail .dleft .what { font-size: 1.125rem; line-height: 1.5; }
  .idea.detail .ideabody { padding-bottom: 20px; }
  /* Plans */
  #planned > .empty, #done > .empty { max-width: 560px; margin: 0 auto; grid-column: 1 / -1; width: 100%; }
  .data { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; align-items: center; }
  .data > h3, .data > .hint { grid-column: 1; }
  .data > .actions { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
  /* Community: form and invite side by side */
  #tab-community { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 360px); column-gap: 32px; align-items: start; }
  #tab-community[hidden] { display: none; }
  #tab-community > h2, #tab-community > .hint { grid-column: 1 / -1; }
  #tab-community > div.cm:first-of-type { grid-column: 1; grid-row: 3; }
  #tab-community > div.cm:last-of-type { grid-column: 2; grid-row: 3; position: sticky; top: 84px; }
  /* Shared place page */
  .sharedpage { max-width: 960px; padding-top: 28px; }
  #shared-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; column-gap: 28px; align-items: start; }
  #shared-body > .sh-brand, #shared-body > .sh-tag, #shared-body > .sh-links { grid-column: 1 / -1; }
  #shared-body > .idea { grid-column: 1; }
  #shared-body > .sh-about { grid-column: 2; margin-top: 0; position: sticky; top: 24px; }
}
@media (min-width: 960px) {
  .deckwrap { height: clamp(360px, calc(100svh - 420px), 600px); }
  #tab-swipe > h2, #tab-swipe > .hint { text-align: center; }
  #tab-swipe > .progress { margin-top: 12px; }
}
@media (min-width: 960px) { .deckwrap { height: clamp(330px, calc(100svh - 440px), 600px); } }
@media (min-width: 960px) {
  #list > .idea > .ideabody > .subacts { margin-top: 0; padding-top: 0; }
}

/* Teaching the swipe (v1k update 25)
   Until the first swipe of each visit the card is split into two labelled halves. On the very first
   visit an arrow badge moves side to side on top. The two buttons sit on the card's bottom edge. */
.halves { position: absolute; inset: 0; display: flex; pointer-events: none; z-index: 1; }
.half { flex: 1; display: flex; align-items: flex-start; padding-top: 18px; }
.half > span { padding: 6px 12px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 700; font-size: 0.875rem; white-space: nowrap; }
.half.no { justify-content: flex-start; padding-left: 12px; background: rgba(30, 26, 36, 0.22); }
.half.yes { justify-content: flex-end; padding-right: 12px; background: rgba(245, 197, 66, 0.30); }
.half.yes > span { background: var(--sun); }
.hand { position: absolute; left: 50%; top: 12px; z-index: 2; width: 44px; height: 44px; margin-left: -22px; border-radius: 50%; background: #fff; color: var(--ink);
  display: grid; place-items: center; pointer-events: none; box-shadow: 0 4px 12px rgba(30, 26, 36, 0.25); }
.hand svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: no-preference) {
  .hand { animation: handswing 2.2s ease-in-out infinite; }
  @keyframes handswing { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-14px); } 75% { transform: translateX(14px); } }
}
.swipecard { padding-bottom: 52px; }
.swipebtns { position: relative; z-index: 3; margin-top: -40px; gap: 44px; }
.round { border: 2px solid var(--ink); box-shadow: 0 6px 14px rgba(30, 26, 36, 0.18); }
.round.yes { margin-top: -4px; }
.sb span { margin-top: 2px; }
.progress-text .undo { min-height: 0; padding: 0 2px; color: var(--link); }
.progress { flex-wrap: wrap; row-gap: 6px; }
.progress-text { white-space: normal; min-width: 0; flex: 1 0 100%; line-height: 1.3; }
.progress .bar { min-width: 48px; }

/* Five picks in: a one-line bar that opens to the three picks */
.nudge { display: block; padding: 8px 10px 8px 12px; margin: 0 0 8px; border: 1.5px solid var(--go); border-radius: 16px; background: var(--surface); }
.nbar { display: flex; align-items: center; gap: 8px; }
.nbar .spark { width: 18px; height: 18px; color: var(--go); fill: var(--go); flex: none; }
.nbar h3 { flex: 1; margin: 0; font-size: 1rem; line-height: 1.25; }
.nbar .btn { flex: none; }
.nudge.open .npicks { margin: 10px 0 0; }
.nudge.open .actions { margin-top: 10px; }

/* Ideas: the way back to swiping */
#list > .tipstrip { grid-column: 1 / -1; }
.tipstrip { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px dashed var(--edge); border-radius: 16px; background: #fdf4d6; }
.tipstrip p { margin: 0; flex: 1; font-weight: 600; }
.tipstrip .btn { flex: none; }
.badge-n.soft { background: var(--sun); color: var(--sun-ink); }
@media (orientation: landscape) and (max-height: 520px) {
  .swipebtns { margin-top: 0; gap: 8px; }
  .swipecard { padding-bottom: 22px; }
}
/* While the five-picks bar shows, the card gives up its height so the buttons stay above the tab bar */
#tab-swipe.hasnudge .deckwrap { height: clamp(200px, calc(100svh - 450px), 400px); }
@media (max-height: 720px) and (orientation: portrait) {
  #tab-swipe.hasnudge .deckwrap { height: clamp(150px, calc(100svh - 425px), 330px); }
}
@media (min-width: 960px) {
  #tab-swipe.hasnudge .deckwrap { height: clamp(300px, calc(100svh - 500px), 520px); }
}

/* ---------- First-run guide (v1k update 26) ---------- */
.guide { min-height: 100vh; min-height: 100svh; background: var(--ground); padding: calc(16px + env(safe-area-inset-top)) 16px 28px; }
.guidein { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; min-height: calc(100svh - 44px); }
.guide h1 { font-size: clamp(1.75rem, 7vw, 2.25rem); line-height: 1.1; margin: 8px 0 8px; }
.guide h1.gh { font-size: 1.5rem; margin: 4px 0 6px; }
.guide .lede { margin: 0 0 8px; }
.gdots { display: flex; gap: 6px; justify-content: center; margin: auto 0 14px; padding-top: 16px; }
.gdots span { width: 8px; height: 8px; border-radius: 999px; background: var(--line); }
.gdots span.on { width: 22px; background: var(--go); }
.gnav { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.gnav .btn { min-width: 150px; }
.gskipline { display: block; margin: 12px auto 0; }
.steps { display: flex; gap: 6px; list-style: none; margin: 0 0 10px; padding: 0; }
.steps li { flex: 1; text-align: center; font-size: 0.8125rem; font-weight: 700; padding: 5px 0; border-radius: 999px; background: var(--tag); color: var(--tag-ink); }
.steps li.on { background: var(--go); color: var(--go-ink); }
.steps li.dn { background: var(--sun); color: var(--sun-ink); }
.coach { margin: 0 0 10px; padding: 9px 12px; border: 2px solid var(--ink); border-radius: 14px; background: var(--surface); font-weight: 700; line-height: 1.35; }
.greward { text-align: center; margin: auto 0 8px; }
.greward .mascot { width: 150px; margin: 0 auto; display: block; }
.greward .btn { margin-top: 14px; }
.gpicks { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 12px; }
.gpicks .why { font-weight: 600; color: var(--go); font-size: 0.875rem; margin-top: 4px; }
.gtour { list-style: none; margin: 8px 0 14px; padding: 0; display: grid; gap: 8px; }
.gtour li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); }
.gtour .ic { width: 22px; height: 22px; flex: none; }
.guide .idea { margin-bottom: 8px; }
/* guided swipe: only the card, the buttons and the coach */
body.guided .tabbar, body.guided #nudge, body.guided #picks, body.guided #saved-pill, body.guided .kbd, body.guided #banner, body.guided #swipe-h { display: none !important; }
body.guided main { padding-bottom: 24px; }
#guidebar:empty { display: none; }
/* quick-pick days in every plan box */
.quickdays { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.qd { min-height: 40px; padding: 6px 12px; font: inherit; font-weight: 700; font-size: 0.875rem; color: var(--ink); background: var(--surface); border: 1.5px solid var(--edge); border-radius: 12px; cursor: pointer; }
.qd[aria-pressed="true"] { background: var(--sun); border-color: var(--sun); }

/* Intro page demos: copies of the real screens */
.gdemo { margin: 4px 0 14px; }
.gx { position: relative; height: 250px; border-radius: 20px; background: var(--tag); overflow: hidden; }
.gx b { font-family: var(--display); }
.gx1 .gxc { position: absolute; left: 50%; top: 20px; width: 170px; height: 170px; margin-left: -85px; border-radius: 20px; background: var(--g); color: #fff; padding: 12px; display: flex; align-items: flex-end; font-size: 1.125rem; }
.gxs { position: absolute; top: 12px; padding: 2px 8px; border: 2px solid #fff; border-radius: 8px; font-size: 0.75rem; font-weight: 700; opacity: 0; }
.gxs.yes { right: 10px; transform: rotate(8deg); } .gxs.no { left: 10px; transform: rotate(-8deg); }
.gxb { position: absolute; bottom: 14px; width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; background: #fff; }
.gxb.no { left: 50%; margin-left: -58px; } .gxb.yes { left: 50%; margin-left: 12px; background: var(--sun); }
.gxb .ic { width: 22px; height: 22px; }
.gx2 .gxsw, .gx2 .gxid { position: absolute; inset: 0 0 40px 0; padding: 12px; }
.gxsc { display: block; height: 150px; margin-top: 10px; border-radius: 16px; background: var(--g); }
.gxf { display: flex; gap: 6px; margin: 8px 0; } .gxf i { font-style: normal; flex: 1; font-size: 0.75rem; padding: 4px 8px; border: 1.5px solid var(--edge); border-radius: 999px; background: #fff; }
.gxi { background: #fff; border-radius: 14px; overflow: hidden; margin-bottom: 8px; border: 1px solid var(--line); }
.gxh { background: var(--g); color: #fff; padding: 7px 10px; display: grid; } .gxh small { font-size: 0.6875rem; } .gxh b { font-size: 0.9375rem; }
.gxbd { padding: 7px 10px; font-size: 0.75rem; display: grid; gap: 6px; } .gxbd em { font-style: normal; color: var(--go); font-weight: 700; }
.gxbd span { display: flex; gap: 6px; } .gxbd span i, .gxform > i { font-style: normal; flex: 1; text-align: center; padding: 4px 0; border: 1.5px solid var(--edge); border-radius: 999px; }
.gxbd i.a, .gxform > i.a { background: var(--go); border-color: var(--go); color: #fff; }
.gxtabs { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: space-around; align-items: center; font-size: 0.75rem; }
.gxtabs i { font-style: normal; padding: 3px 9px; border-radius: 9px; position: relative; } .gxtabs u { text-decoration: none; position: absolute; top: -8px; right: -10px; background: var(--go); color: #fff; border-radius: 9px; padding: 0 5px; font-size: 0.625rem; }
.gxtap { position: absolute; width: 26px; height: 26px; border-radius: 50%; background: rgba(161, 44, 102, 0.35); border: 2px solid var(--go); opacity: 0; }
.gx3 .gxi { margin: 14px; }
.gxform, .gxdone { display: grid; gap: 6px; } .gxq { display: flex; gap: 6px; } .gxq i { font-style: normal; flex: 1; text-align: center; padding: 5px 0; border: 1.5px solid var(--edge); border-radius: 9px; }
.gx3 .gxbd { position: relative; height: 92px; }
.gx3 .gxform, .gx3 .gxdone { position: absolute; inset: 7px 10px; }
.gx3 .gxdone { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .gx1 .c1 { animation: gxa1 6s ease-in-out infinite; } .gx1 .c1 .gxs { animation: gxsy 6s ease-in-out infinite; }
  .gx1 .c2 { animation: gxa2 6s ease-in-out infinite; } .gx1 .c2 .gxs { animation: gxsn 6s ease-in-out infinite; }
  .gx1 .c3 { animation: gxa3 6s ease-in-out infinite; }
  @keyframes gxa1 { 0%, 15% { transform: none; opacity: 1; } 30%, 100% { transform: translateX(190px) rotate(16deg); opacity: 0; } }
  @keyframes gxsy { 0%, 8% { opacity: 0; } 15%, 28% { opacity: 1; } 30%, 100% { opacity: 0; } }
  @keyframes gxa2 { 0%, 30% { transform: scale(0.94) translateY(8px); } 38%, 55% { transform: none; opacity: 1; } 70%, 100% { transform: translateX(-190px) rotate(-16deg); opacity: 0; } }
  @keyframes gxsn { 0%, 48% { opacity: 0; } 56%, 68% { opacity: 1; } 70%, 100% { opacity: 0; } }
  @keyframes gxa3 { 0%, 70% { transform: scale(0.94) translateY(8px); } 80%, 100% { transform: none; } }
  .gx2 .gxsw { animation: gxswv 8s steps(1) infinite; } .gx2 .gxid { opacity: 0; animation: gxidv 8s ease infinite; }
  .gx2 .gxl { animation: gxscroll 8s ease-in-out infinite; }
  .gx2 .t1 { animation: gxt1 8s steps(1) infinite; } .gx2 .t2 { animation: gxt2 8s steps(1) infinite; }
  .gx2 .tap1 { left: calc(37.5% - 13px); bottom: 7px; animation: gxtap1 8s ease infinite; }
  @keyframes gxswv { 0% { opacity: 1; } 28%, 100% { opacity: 0; } }
  @keyframes gxidv { 0%, 27% { opacity: 0; } 31%, 94% { opacity: 1; } 100% { opacity: 0; } }
  @keyframes gxscroll { 0%, 50% { transform: none; } 78%, 100% { transform: translateY(-130px); } }
  @keyframes gxt1 { 0% { background: var(--sun); } 28%, 100% { background: transparent; } }
  @keyframes gxt2 { 0% { background: transparent; } 28%, 100% { background: var(--sun); } }
  @keyframes gxtap1 { 0%, 14% { opacity: 0; transform: scale(1.6); } 20%, 26% { opacity: 1; transform: scale(1); } 30%, 100% { opacity: 0; } }
  .gx3 .q1 { animation: gxq 7s ease infinite; }
  .gx3 .gxform { animation: gxformh 7s ease infinite; } .gx3 .gxdone { animation: gxdone 7s ease infinite; }
  .gx3 .tap2 { left: 32px; top: 108px; animation: gxtap2 7s ease infinite; }
  .gx3 .tap3 { left: 50%; margin-left: -13px; top: 146px; animation: gxtap3 7s ease infinite; }
  @keyframes gxq { 0%, 22% { background: #fff; } 28%, 100% { background: var(--sun); border-color: var(--sun); } }
  @keyframes gxformh { 0%, 54% { opacity: 1; } 58%, 100% { opacity: 0; } }
  @keyframes gxdone { 0%, 56% { opacity: 0; } 62%, 100% { opacity: 1; } }
  @keyframes gxtap2 { 0%, 14% { opacity: 0; transform: scale(1.6); } 20%, 26% { opacity: 1; transform: scale(1); } 32%, 100% { opacity: 0; } }
  @keyframes gxtap3 { 0%, 38% { opacity: 0; transform: scale(1.6); } 44%, 50% { opacity: 1; transform: scale(1); } 56%, 100% { opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) {
  .gx2 .gxsw { display: none; } .gx3 .gxform { opacity: 0; } .gx3 .gxdone { opacity: 1; }
  .gx1 .c2, .gx1 .c3 { display: none; }
}
.gx2 .gxid > b, .gx2 .gxf { position: relative; z-index: 1; background: var(--tag); }
.gx2 .gxid > b { display: block; }
.gx2 .gxf { margin: 0; padding: 8px 0; }
.gx2 .gxid { padding-top: 0; }
.gx2 .gxid > b { padding-top: 12px; }
#guidebar { position: relative; }
.guidein > .greward:last-child { margin: auto 0; }
@media (min-width: 720px) { .guide { padding-top: 48px; } .guidein { min-height: min(calc(100svh - 96px), 660px); } }
/* Small screens: keep the guide's buttons on screen and the card labels clear of the arrow badge */
@media (max-width: 360px) {
  .half > span { padding: 5px 9px; font-size: 0.8125rem; }
  .half.no { padding-left: 8px; } .half.yes { padding-right: 8px; }
  .hand { width: 36px; height: 36px; margin-left: -18px; top: 16px; }
  .hand svg { width: 20px; height: 20px; }
}
@media (max-height: 620px) {
  .gx { height: 200px; }
  .gdemo { margin-bottom: 10px; }
  .gdots { padding-top: 8px; margin-bottom: 10px; }
  .gskipline { margin-top: 6px; }
  .guide .gplanc .what { display: none; }
  .guide .coach { padding: 7px 10px; font-size: 0.875rem; }
}

/* Guide layout (v1k update 27): top row, content, actions pinned to the bottom. Same on every screen. */
.guidein { gap: 0; }
.gtop { display: flex; justify-content: space-between; align-items: center; min-height: 44px; margin: 0 0 8px; }
.gcount { font-size: 0.875rem; font-weight: 700; color: var(--muted); }
.gtop .linkbtn { padding: 0 4px; }
.guidein > .steps { margin: 6px 0 14px; }
.gbody { flex: 1 0 auto; }
.gbody > h1 { margin: 4px 0 8px; }
.gbody > .lede { margin: 0; }
.gbody > .coach { margin: 0 0 14px; }
.gcenter { text-align: center; padding-top: 8px; }
.gcenter .mascot { width: 140px; margin: 0 auto 4px; display: block; }
.gcenter .lede { margin: 0 auto 6px; max-width: 34ch; }
.gacts { display: grid; gap: 10px; justify-items: stretch; padding-top: 18px; }
.gacts > .linkbtn { justify-self: center; }
.gacts .gdots { margin: 0 0 4px; padding: 0; }
.gnav { display: flex; gap: 10px; }
.gnav .btn { flex: 1; min-width: 0; }
.gpicks { margin: 0; }
.gtour { margin: 18px 0 0; }
.guide .gplanc { margin: 0; }
.guide .gplanc .plan { margin-top: 10px; padding-top: 12px; }
@media (min-width: 720px) {
  .guidein { min-height: min(calc(100svh - 96px), 700px); }
  .gacts { max-width: 420px; width: 100%; margin: 0 auto; }
}
/* screen changes: a short fade and slide */
@media (prefers-reduced-motion: no-preference) {
  .enter { animation: genter 0.32s ease-out backwards; }
  .enter-r { animation: gright 0.3s ease-out backwards; }
  .enter-l { animation: gleft 0.3s ease-out backwards; }
  @keyframes genter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  @keyframes gright { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
  @keyframes gleft { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
}
/* the Ideas demo shows exactly one whole card before and after its scroll, so it keeps its full height */
@media (max-height: 620px) { .gx.gx2 { height: 250px; } }
.gx3 { display: flex; align-items: center; } .gx3 .gxi { flex: 1; }
.gsteprow { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.gsteprow .steps { flex: 1; margin: 0; }
.gsteprow .linkbtn { min-height: 36px; padding: 0 2px; }
.guide { padding-top: calc(10px + env(safe-area-inset-top)); }
.gbrand { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin: 0 0 14px; }
.gbrand .linkbtn { padding: 0 2px; }
.guidein > .steps { margin: 0 0 14px; }
@media (min-width: 720px) { .guide { padding-top: 48px; } }
.gbody.mid { display: flex; flex-direction: column; justify-content: center; }
@media (max-height: 620px) {
  .gacts { padding-top: 10px; gap: 8px; }
  .gbrand { margin-bottom: 10px; }
  .guidein > .steps { margin-bottom: 10px; }
  .gbody > .coach { margin-bottom: 10px; }
  .gbody > .gplanh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
  .gdone .mascot { display: none; }
  .gdone { padding-top: 0; }
  .gtour { margin-top: 12px; gap: 6px; }
  .gtour li { padding: 9px 12px; }
}
@media (min-width: 720px) { .gtour { max-width: 420px; margin-left: auto; margin-right: auto; } }

/* v1k update 28: Back link on guide steps, Details inside the guide */
.gsteprow .gbk { gap: 2px; margin-left: -4px; text-decoration: none; }
.gbk .ic { width: 18px; height: 18px; }
.idea.gdet { margin: 0; }
.idea.gdet .rows { margin: 10px 0 0; }
/* Guided swipe hides the heading, tab bar and picks, so on short screens the card takes that space */
@media (max-height: 720px) and (orientation: portrait) {
  body.guided .deckwrap { height: clamp(200px, calc(100svh - 320px), 330px); }
}

/* v1k update 29: calm idea cards everywhere (Ideas, guide, details, Plans, shared links). White header; the category colour shows in the name and a tinted icon tile. Swipe cards keep full colour. */
.ideahead { background: var(--surface); color: var(--ink); border-bottom: 1.5px solid var(--line); }
.ideahead .catname { color: var(--g); }
.ideahead .where { color: var(--muted); }
.ideahead .cardart { width: 52px; height: 52px; padding: 7px; border-radius: 14px; background: var(--tag); background: color-mix(in srgb, var(--g) 12%, #fff); }
/* The icon's white shapes take the category colour; yellow accents stay */
.ideahead .cardart [fill="#fff"] { fill: var(--g); }
.ideahead .cardart [stroke="#fff"] { stroke: var(--g); }

/* v1k update 30: every type swiped, so no round buttons under the end card */
#tab-swipe.deckdone .swipebtns, #tab-swipe.deckdone .kbd { display: none; }
#tab-swipe.deckdone .deckwrap { height: auto; }
.emptydeck .mascot { flex: none; width: 110px; }

/* v1k update 30: our own dropdown arrow, inset from the rounded edge (the browser's arrow sat on the curve) */
select, .pill select, .cm select, .ob-form select {
  -webkit-appearance: none; appearance: none; padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%231e1a24' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 18px 18px;
}
.where select { background-image: none; padding-right: 36px; }
/* Phone filters: the type list gets more room than the vibe list, and the arrow sits a little tighter */
.filters { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.filters .pill select { padding-left: 14px; padding-right: 36px; background-position: right 12px center; background-size: 16px 16px; }
@media (max-width: 360px) { .filters .pill select { font-size: 0.9375rem; padding-left: 12px; } }
@media (max-width: 340px) { .where select { padding-right: 28px; } .where .chev { right: 6px; } }

/* v1k update 29: city step on the first screen */
.ob-q { font-size: 0.9375rem; font-weight: 700; margin: 0 0 8px; }
.ob-cities { display: grid; gap: 10px; }
.obcity { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 0 18px; font: inherit; font-weight: 700; font-size: 1.0625rem; color: var(--ink); background: var(--surface); border: 2px solid var(--edge); border-radius: 16px; cursor: pointer; text-align: left; }
.obcity small { font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.obcity:hover { border-color: var(--go); }
.obcity:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ob-back { min-height: 44px; margin: -10px 0 2px -6px; gap: 2px; text-decoration: none; }

/* Opening hours box in Details (it.oh) */
.oh { margin: 14px 0 0; padding: 10px 14px; border-radius: 14px; background: var(--ground); border: 1.5px solid var(--line); }
.oh.isopen { background: #e3f3ea; border-color: #9fd1b4; }
.ohnow { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
.ohdot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); align-self: center; }
.oh.isopen .ohdot { background: #1d7a4a; }
.ohnext { flex-basis: 100%; padding-left: 16px; color: var(--muted); font-size: 0.9375rem; }
.oh details { margin-top: 4px; }
.oh summary { min-height: 32px; display: inline-flex; align-items: center; cursor: pointer; color: var(--link); font-weight: 700; font-size: 0.9375rem; }
.ohweek { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 4px 0 0; font-size: 0.9375rem; }
.ohweek dt { color: var(--muted); font-weight: 600; }
.ohweek dd { margin: 0; }
.ohweek .now { font-weight: 800; color: var(--ink); }
.ohnote { margin: 6px 0 0; color: var(--muted); font-size: 0.8125rem; }
/* Add to calendar choice (reuses the share sheet) */
.calbox h3 { margin-bottom: 2px; }
.calbox .note { margin: 0 0 10px; }
.calbox .rows { margin: 0 -16px; }

/* v1k update 29: star rating and note in How was it */
.stars { display: flex; gap: 2px; margin: 8px 0 0 -6px; }
.star { width: 48px; height: 48px; display: grid; place-items: center; padding: 0; background: none; border: 0; border-radius: 12px; cursor: pointer; color: var(--edge); }
.star .ic { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.star.on { color: var(--go); }
.star.on .ic { fill: currentColor; }
.star:focus-visible { outline: 3px solid var(--focus); outline-offset: 0; }
.fb .star { color: #1e1a24; }
.fb .star.on { color: var(--go); }
.starlabel { margin: 2px 0 8px; }
.fbnote { display: block; width: 100%; min-height: 84px; padding: 10px 12px; font: inherit; color: var(--ink); background: #ffffff; border: 1.5px solid var(--edge); border-radius: 12px; resize: vertical; }
.fbnote:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.fbcap { margin: 6px 0 10px; }
.yournote { white-space: pre-line; }
@media (prefers-reduced-motion: no-preference) { .star { transition: transform 0.12s ease-out; } .star:active { transform: scale(0.9); } }

/* Anonymous counts: notice on the first screen, switch on the privacy page */
.countnote { margin: 4px 0 0; font-size: 0.8125rem; text-align: center; }
.countnote a, .sh-links a { display: inline-block; padding: 4px 2px; }
.countswitch label { display: flex; align-items: center; gap: 12px; min-height: 48px; font-weight: 700; cursor: pointer; }
.countswitch input { width: 24px; height: 24px; flex: none; accent-color: var(--go); }
.countswitch .note { margin: 0; min-height: 1.4em; }
@media (max-height: 620px) { #onboard .ob-links { margin-top: 0; } #onboard .countnote { margin-top: -6px; } }
