/* 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; }
.swipecard.demo { animation: demo 1.7s ease-in-out 0.6s 1; }
.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; }
.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 { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: start; background: var(--surface); border: 1.5px solid var(--line); border-radius: 20px; padding: 16px; margin: 4px 0 12px; }
.intro .mascot { width: 76px; }
.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(70px) rotate(5deg); }
    50% { transform: translateX(0) rotate(0); }
    75% { transform: translateX(-70px) rotate(-5deg); }
  }
}

@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: #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; }
  #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 { justify-self: start; margin-bottom: 0; }

.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) {
  #swipe-hint { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
}
@media (max-height: 720px) and (orientation: portrait) {
  .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 { margin: 2px 0 0; font-size: 0.875rem; 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; }
  /* Ideas: equal-height cards, actions pinned to the bottom */
  #list { align-items: stretch; }
  #list > .idea { display: flex; flex-direction: column; }
  #list > .idea > .ideabody { flex: 1; display: flex; flex-direction: column; }
  #list > .idea > .ideabody > .subacts { margin-top: auto; padding-top: 6px; }
  /* 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 > .actions { margin-top: auto; padding-top: 14px; }
  #list > .idea > .ideabody > .subacts { margin-top: 0; padding-top: 0; }
}
