:root {
  --bg: #faf8f5;
  --card: #ffffff;
  --ink: #1f1d1a;
  --muted: #6f6a63;
  --line: #e7e2da;
  --accent: #c2410c;
  --accent-soft: #fdeee6;
  --chip: #f1ede7;
  --radius: 12px;
  --restaurant: #c2410c;
  --brunch: #a16207;
  --bar: #7c3aed;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171614; --card: #211f1c; --ink: #f2efea; --muted: #a39d94; --line: #34312c;
    --accent: #fb923c; --accent-soft: #3a2518; --chip: #2c2925;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 6px 12px; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.ghost, summary.ghost { background: transparent; }
button.link { border: 0; background: none; color: var(--accent); padding: 0; }
button.danger { color: #b91c1c; border-color: #f3c4c4; background: transparent; }
.danger-text { color: #b91c1c; }
.spacer { flex: 1; }
.hint { color: var(--muted); font-size: 13px; font-weight: 400; }

.top { display: flex; align-items: center; gap: 12px; padding: 14px 16px 6px; max-width: 1200px; margin: 0 auto; }
.top h1 { font-size: 22px; margin: 0; letter-spacing: -0.02em; }
.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.menu { position: relative; }
.menu summary { list-style: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: 110%; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px; display: grid; gap: 4px; min-width: 240px; z-index: 1000; box-shadow: 0 8px 24px rgb(0 0 0 / .12); }
.menu-pop button, .menu-pop .as-button { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.menu-pop button:hover, .menu-pop .as-button:hover { background: var(--chip); }

.tabs { display: flex; gap: 4px; padding: 6px 16px; max-width: 1200px; margin: 0 auto; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 8px 12px; border-radius: 999px; white-space: nowrap; color: var(--muted); font-weight: 500; }
.tabs button.on { background: var(--ink); color: var(--bg); }
.tabs .n { opacity: .6; font-size: 12px; margin-left: 4px; }

.controls { max-width: 1200px; margin: 0 auto; padding: 4px 16px 0; display: grid; gap: 10px; }
#search { width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.result-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 14px; padding-bottom: 8px; }
.result-bar select { padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }

/* multi-select dropdown */
.ms { position: relative; }
.ms > summary { list-style: none; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 14px; white-space: nowrap; }
.ms > summary::-webkit-details-marker { display: none; }
.ms > summary::after { content: " ▾"; color: var(--muted); }
.ms.active > summary { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.ms-pop { position: absolute; z-index: 1000; top: 115%; left: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-width: 220px; max-height: 340px; overflow: auto; box-shadow: 0 8px 24px rgb(0 0 0 / .12); }
.ms-pop label { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.ms-pop label:hover { background: var(--chip); }
.ms-pop .n { margin-left: auto; color: var(--muted); font-size: 12px; }
.ms-pop .group { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 6px 2px; }

.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--chip); border: 1px solid transparent; border-radius: 999px; padding: 3px 10px; font-size: 13px; white-space: nowrap; cursor: pointer; }
.chip.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 600; }
.chip .n { opacity: .55; font-size: 11px; }

main { max-width: 1200px; margin: 0 auto; padding: 0 16px 60px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px; border-left: 4px solid var(--cat, var(--line)); }
.card[data-cat="restaurant"] { --cat: var(--restaurant); }
.card[data-cat="brunch"] { --cat: var(--brunch); }
.card[data-cat="bar"] { --cat: var(--bar); }
.card-head { display: flex; gap: 8px; align-items: flex-start; }
.card h3 { margin: 0; font-size: 16px; line-height: 1.3; flex: 1; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.meta { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.meta .hood { cursor: pointer; }
.meta .hood:hover { color: var(--accent); }
.note { font-size: 14px; margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tags .chip { font-size: 12px; padding: 2px 8px; }
.card-foot { display: flex; gap: 8px; align-items: center; margin-top: auto; padding-top: 4px; }
.card-foot button { font-size: 13px; padding: 4px 10px; }
.card-foot a { font-size: 13px; color: var(--accent); text-decoration: none; }
.badge { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.badge.want { background: #e0f2fe; color: #075985; }
.badge.review { background: #fef3c7; color: #92400e; cursor: help; }
.badge.occ { background: var(--chip); color: var(--muted); font-weight: 600; }
.rating { font-weight: 800; font-size: 14px; min-width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: #fff; }
.r-S { background: #b45309; } .r-A { background: #15803d; } .r-B { background: #2563eb; } .r-C { background: #6b7280; } .r-X { background: #991b1b; }
.dist { font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; grid-column: 1 / -1; }
.card.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: none; } }

#map { height: calc(100vh - 260px); min-height: 420px; border-radius: var(--radius); border: 1px solid var(--line); }
.pin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgb(0 0 0 / .4); }
.leaflet-popup-content { font: 14px/1.4 system-ui, sans-serif; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.seg button { border: 0; border-radius: 0; padding: 5px 10px; background: var(--card); color: var(--muted); font-size: 13px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--ink); color: var(--bg); }

dialog { border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(560px, 96vw); background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgb(0 0 0 / .4); }
dialog form { padding: 18px; display: grid; gap: 12px; max-height: 88vh; overflow: auto; }
dialog h2 { margin: 0; font-size: 18px; }
dialog label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
dialog input, dialog textarea { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-weight: 400; }
dialog fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 4px; }
dialog legend { font-size: 13px; font-weight: 600; padding: 0 0 4px; }
.checks { display: flex !important; gap: 14px; flex-wrap: wrap; }
.checks label { display: flex; align-items: center; gap: 6px; font-weight: 400; font-size: 14px; }
.checks legend { width: 100%; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dialog-actions { display: flex; gap: 8px; padding-top: 6px; }
#lookup { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 6px; }
#lookup input { background: var(--card); }
.lookup-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 220px; overflow: auto; }
.lookup-results li { padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.lookup-results li:hover, .lookup-results li:focus { background: var(--chip); }
.lookup-results small { color: var(--muted); display: block; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(80px); background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; transition: transform .25s; display: flex; gap: 12px; align-items: center; z-index: 2000; }
#toast.show { transform: translateX(-50%); }
#toast button { background: none; border: 0; color: var(--accent); font-weight: 700; padding: 0; }

@media (max-width: 640px) {
  .top { flex-wrap: wrap; }
  .top-actions { width: 100%; }
  #btn-add { margin-left: auto; }
  .two { grid-template-columns: 1fr; }
  #map { height: 70vh; }
}

/* ---------- v2: spires, been / to try, view-only ---------- */
:root { --spire-bg: #7f1d1d; --spire-gold: #f2c14e; --try: #0369a1; --try-soft: #e0f2fe; }
@media (prefers-color-scheme: dark) { :root { --try: #7dd3fc; --try-soft: #0c2a3d; } }
body:not(.can-edit) .edit-only { display: none !important; }
body { padding-bottom: env(safe-area-inset-bottom); }
.logo { width: 26px; height: 26px; vertical-align: -5px; border-radius: 6px; }
.menu-item { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.menu-item:hover { background: var(--chip); }

.spires { display: inline-flex; align-items: flex-end; gap: 1px; background: var(--spire-bg); border-radius: 6px; padding: 3px 6px 2px; flex: none; }
.spires .spire { width: 9px; height: 19px; fill: var(--spire-gold); }
.spires.s3 .spire:nth-child(2) { height: 22px; width: 10px; }
.spires.big { padding: 5px 9px 4px; }
.spires.big .spire { width: 12px; height: 25px; }
.spires.big.s3 .spire:nth-child(2) { height: 29px; width: 13px; }
.spires.not-again { background: #6b7280; color: #fff; font-size: 11px; font-weight: 700; padding: 4px 7px; align-items: center; }
.ms-pop .spires { transform: scale(.8); transform-origin: left center; }

.status-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.status-seg button { border-radius: 999px; padding: 5px 12px; font-size: 14px; color: var(--muted); }
.status-seg button .n { opacity: .6; font-size: 12px; }
.status-seg button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.status-seg button.st-want.on { background: var(--try); border-color: var(--try); color: #fff; }

.card { position: relative; }
.card.to-try { border-style: dashed; border-left-style: solid; background: linear-gradient(var(--try-soft), var(--try-soft)) top / 100% 3px no-repeat, var(--card); }
.ribbon { position: absolute; top: -9px; right: 12px; background: var(--try); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; }
.to-try-word { color: var(--try); }
.rec { font-size: 13px; color: var(--try); }
.been-ask { font-size: 12px; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; }
.been-ask button { font-size: 12px; padding: 2px 8px; }

.guide-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.guide-list li { display: flex; gap: 12px; align-items: center; }
.guide-list li > .spires { min-width: 64px; justify-content: center; }
.guide-link { margin: 8px 6px 2px; font-size: 13px; }
.rating-seg button { display: inline-flex; align-items: center; min-height: 34px; }
.rating-seg button.on { background: var(--accent-soft); outline: 2px solid var(--accent); outline-offset: -2px; color: var(--ink); }

.empty-db { text-align: center; padding: 30px 0; }
.pin { background: var(--c); }
.pin-try { background: #fff; border: 3px solid var(--c); }
.leaflet-popup-content .spires { vertical-align: middle; transform: scale(.8); }

@media (max-width: 640px) {
  .top { flex-wrap: nowrap; padding-top: 10px; }
  .top-actions { width: auto; }
  .hide-sm { display: none; }
  .ms-pop { max-width: calc(100vw - 16px); } /* sideways position is set in app.js so it stays on screen */
  .cards { grid-template-columns: 1fr; }
  .result-bar { gap: 8px; }
}
.card-foot { flex-wrap: wrap; row-gap: 6px; }
#import-summary h3 { font-size: 14px; margin: 10px 0 4px; }
.plan-list { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 2px; }
.card[data-cat="cafe"] { --cat: #78553a; }
.card[data-cat="bakery"] { --cat: #db2777; }

/* ---------- v3: pickers + phone-friendly editor ---------- */
dialog select.picker { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-weight: 400; width: 100%; }
.other-input { margin-top: 6px; }
.tag-picker { display: flex; flex-wrap: wrap; gap: 6px; max-height: 168px; overflow-y: auto; padding: 2px; }
.tag-picker .chip { font-size: 13px; padding: 5px 10px; }
.new-tag { display: flex; gap: 6px; margin-top: 8px; }
.new-tag input { flex: 1; }
dialog input, dialog textarea, dialog select { min-width: 0; }

@media (max-width: 640px) {
  /* iPhones zoom the page when a text field is under 16px: keep them at 16px. */
  input, select, textarea { font-size: 16px !important; }
  #editor { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  #editor form { max-height: none; height: 100%; padding: 14px 14px 0; overflow-y: auto; overscroll-behavior: contain; }
  #editor .dialog-actions { position: sticky; bottom: 0; background: var(--card); margin: 0 -14px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
  #editor .seg { display: flex; }
  #editor .seg button { flex: 1 1 auto; padding: 8px 10px; }
  .tag-picker { max-height: none; }
}

/* ---------- v4: Save the relationship picker + hot new openings ---------- */
.save-us { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 14px; border: 0; border-radius: 12px; color: #fff; font-weight: 800; font-size: 16px; background: linear-gradient(135deg, #be123c, #7f1d1d); box-shadow: 0 2px 8px rgb(127 29 29 / .25); }
.save-us .sub { font-weight: 500; font-size: 12px; opacity: .85; }
.save-us:active { transform: scale(.99); }

.badge.hot { background: #fff1e6; color: #c2410c; border: 1px solid #fdba74; }
.status-seg .hot-chip { color: #c2410c; border-color: #fdba74; }
.status-seg .hot-chip.on { background: #c2410c; border-color: #c2410c; color: #fff; }
.hot-field { border: 1px solid var(--line); border-radius: 10px; padding: 10px; gap: 8px; }
.switch { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.switch input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.hot-month input { max-width: 220px; }

#picker { width: min(620px, 96vw); }
#picker form { gap: 0; padding-bottom: 0; }
#picker h2 { margin-bottom: 4px; }
#picker section { padding: 10px 0; border-bottom: 1px solid var(--line); }
#picker section:last-of-type { border-bottom: 0; }
#picker h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
#picker .chips { display: flex; flex-wrap: wrap; gap: 6px; }
#picker .chips + .chips { margin-top: 8px; }
#picker .chip { font-size: 14px; padding: 6px 12px; }
#picker .chip .n { font-size: 11px; }
#picker .switch { margin: 4px 0 8px; font-weight: 500; }
.sticky-actions { position: sticky; bottom: 0; background: var(--card); padding: 12px 0; border-top: 1px solid var(--line); margin-top: 6px; }
a.button { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 8px; text-decoration: none; border: 1px solid var(--line); }
a.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
#pk-go:disabled { opacity: .5; cursor: default; }

.pick-card { border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin: 10px 0 16px; display: grid; gap: 10px; justify-items: start; background: var(--card); }
.pick-card.to-try { border-style: dashed; }
.pick-card h2 { font-size: 26px; line-height: 1.2; margin: 0; }
.pick-card .meta { margin: 0; font-size: 15px; }
.pick-card .note { font-size: 15px; }
.pick-badges { display: flex; gap: 6px; }
.ribbon.static { position: static; }

@media (max-width: 640px) {
  #picker { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  #picker form { max-height: none; height: 100%; padding: 14px 14px 0; overflow-y: auto; overscroll-behavior: contain; }
  #picker .sticky-actions { margin: 6px -14px 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  .pick-card h2 { font-size: 24px; }
}

/* Close button that stays in the corner of a full-screen sheet */
dialog.sheet { position: fixed; }
.sheet-close { position: absolute; top: 10px; right: 10px; z-index: 5; width: 40px; height: 40px; padding: 0; border-radius: 50%; font-size: 18px; line-height: 1; background: var(--card); box-shadow: 0 1px 6px rgb(0 0 0 / .15); }
#picker h2, #picker #pk-count { padding-right: 48px; }

/* ---------- v5: suggestions from visitors + owner inbox ---------- */
body.can-edit .visitor-only { display: none !important; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.count-badge:not(:empty) { display: inline-block; min-width: 20px; padding: 1px 6px; margin-left: 4px; border-radius: 999px; background: #be123c; color: #fff; font-size: 12px; font-weight: 700; text-align: center; }
.inbox-top { color: #be123c; border-color: #fecdd3; font-weight: 700; }
.friends { display: grid; gap: 4px; padding: 8px 10px; border-radius: 8px; background: var(--chip); font-size: 13px; }
.friend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.friend .spires { transform: scale(.8); transform-origin: left center; }

#suggest, #inbox { width: min(560px, 96vw); }
#suggest form { gap: 12px; }
.lookup-box { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 6px; }
.inbox-wrap { padding: 18px; display: grid; gap: 10px; max-height: 88vh; overflow-y: auto; }
.inbox-wrap h2 { margin: 0; padding-right: 48px; }
.inbox-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 8px; justify-items: start; }
.inbox-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.inbox-head .kind { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #a16207; }
.inbox-head .kind.new { color: #15803d; }
.inbox-item .note, .inbox-item .meta { margin: 0; }
.inbox-actions { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; align-items: center; }
.inbox-actions button.done { color: #15803d; border-color: #bbf7d0; }
.takes-field { border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.take-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; padding: 4px 0; }
.take-row .link { margin-left: auto; }

@media (max-width: 640px) {
  #suggest, #inbox { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  #suggest form { max-height: none; height: 100%; padding: 14px 14px 0; overflow-y: auto; }
  #suggest .sticky-actions { margin: 6px -14px 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  .inbox-wrap { max-height: 100dvh; height: 100%; padding: 14px; }
}

/* ---------- v6: personal wish lists ---------- */
.heart { border: 0; background: none; padding: 0 2px; font-size: 22px; line-height: 1; color: #be123c; cursor: pointer; flex: none; }
.heart:not(.on) { color: var(--muted); }
.heart.on { animation: pop .25s ease; }
@keyframes pop { 50% { transform: scale(1.3); } }
.status-seg .mine-chip { color: #be123c; border-color: #fecdd3; }
.status-seg .mine-chip.on { background: #be123c; border-color: #be123c; color: #fff; }
.menu-item .hint { display: block; font-size: 12px; }

/* ---------- v7: Google photos, contact details, map popups ---------- */
.photo { margin: -14px -14px 2px; height: 140px; border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; overflow: hidden; position: relative; background: linear-gradient(90deg, var(--chip), var(--line), var(--chip)) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
.photo.loaded { animation: none; background: var(--chip); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .credit { position: absolute; right: 6px; bottom: 4px; font-size: 10px; color: #fff; text-shadow: 0 1px 2px rgb(0 0 0 / .7); }
.photo .credit a { color: #fff; }
@keyframes shimmer { to { background-position: -200% 0; } }
.card.to-try .photo { margin-top: -14px; }
.contact { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; padding-top: 2px; }
.contact a { color: var(--accent); text-decoration: none; font-weight: 600; }
.lookup-results li.powered { cursor: default; font-size: 11px; color: var(--muted); text-align: right; padding: 4px 10px; }
.gm-pop { font: 14px/1.4 system-ui, sans-serif; color: #1f1d1a; max-width: 240px; }
.gm-pop .spires { transform: scale(.8); vertical-align: middle; }
.photo-slot .photo { margin: -14px -14px 6px; }
.pick-photo .photo { margin: 0 0 6px; border-radius: 10px; height: 180px; }
.gm-pop .photo { margin: 0 0 6px; height: 120px; border-radius: 8px; }

/* =====================================================================
   v8 polish: one palette (Spires burgundy + gold), Fraunces + Inter,
   slimmer top on phones, name-led cards, quieter tags, press/hover.
   ===================================================================== */
:root {
  --bg: #f7f3ee; --card: #fffdfa; --ink: #1d1a17; --muted: #6e665d; --line: #e8e0d6;
  --accent: #8b1e2d; --accent-ink: #fff; --accent-soft: #f6e8e9; --gold: #a07a12; --gold-soft: #fbf3dc;
  --chip: #f1ebe3; --try: #2f5d7c; --try-soft: #e7eff5;
  --restaurant: #8b1e2d; --brunch: #b07a19; --bar: #5b3d7a;
  --spire-bg: #7a1c2a; --spire-gold: #f2c14e;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(40 20 10 / .05), 0 2px 8px rgb(40 20 10 / .04);
  --shadow-lift: 0 2px 4px rgb(40 20 10 / .06), 0 10px 24px rgb(40 20 10 / .08);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141210; --card: #1d1a17; --ink: #f3eee7; --muted: #a59d93; --line: #302b26;
    --accent: #d9707c; --accent-ink: #1d1a17; --accent-soft: #3a1f23; --gold: #e0b84a; --gold-soft: #33290f;
    --chip: #27231f; --try: #8cb8d8; --try-soft: #1b2a35;
    --shadow: 0 1px 2px rgb(0 0 0 / .3); --shadow-lift: 0 8px 24px rgb(0 0 0 / .4);
  }
}
body { font: 15px/1.5 var(--sans); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: var(--sans); }
button { border-radius: 10px; transition: transform .12s ease, background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease; }
button:active:not(:disabled) { transform: scale(.97); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.primary:hover { filter: brightness(1.08); }
button.link, .card-foot a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Header + tabs: the tabs stay pinned while you scroll */
.top { padding: 14px 16px 4px; }
.top h1 { font-family: var(--serif); font-weight: 700; font-size: 24px; letter-spacing: -.01em; }
.logo { border-radius: 7px; }
.tabs { position: sticky; top: 0; z-index: 500; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); padding: 8px 16px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { padding: 7px 13px; font-size: 14px; }
.tabs button:hover:not(.on) { color: var(--ink); background: var(--chip); }

/* Controls */
#search { padding: 11px 14px; border-radius: 12px; background: var(--card); box-shadow: var(--shadow); }
#search:focus { outline: none; border-color: var(--accent); }
.save-us { flex-direction: row; justify-content: center; flex-wrap: wrap; gap: 4px 10px; padding: 11px 16px; border-radius: 12px; font-size: 15px; background: linear-gradient(135deg, #9b2335, #6d1622); box-shadow: 0 2px 10px rgb(109 22 34 / .25); }
.save-us .sub { font-size: 13px; }
.save-us:hover { filter: brightness(1.06); }
.status-row { display: flex; align-items: center; gap: 8px; }
.status-row .status-seg { flex: 1; }
.status-seg button { padding: 5px 12px; background: var(--card); }
.status-seg button.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.status-seg .hot-chip { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.status-seg .hot-chip.on { background: var(--gold); border-color: var(--gold); color: #fff; }
.filters-toggle { display: none; }
.filter-panel { display: grid; gap: 10px; }
.ms > summary { background: var(--card); padding: 6px 13px; }
.ms.active > summary { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.chip { background: var(--chip); }
.chip.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.tag-row { scrollbar-width: none; }
.tag-row::-webkit-scrollbar { display: none; }
.result-bar { padding: 2px 0 10px; }
.result-bar select { border-radius: 10px; }

/* Cards: the name leads */
.cards { gap: 14px; }
.card { border: 1px solid var(--line); border-left: 1px solid var(--line); box-shadow: var(--shadow); padding: 16px; gap: 9px; transition: transform .18s ease, box-shadow .18s ease; overflow: hidden; }
.card::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--cat, var(--line)); opacity: .75; }
.card[data-cat="cafe"] { --cat: #7a5a3c; }
.card[data-cat="bakery"] { --cat: #b85c78; }
.card.to-try { border-style: dashed; border-left-style: dashed; background: var(--card); }
.card h3 { font-family: var(--serif); font-weight: 600; font-size: 19px; line-height: 1.25; letter-spacing: -.005em; }
.card .meta { font-size: 13px; gap: 2px 0; }
.card .meta > span + span::before { content: "·"; margin: 0 6px; color: var(--muted); opacity: .6; }
.card .note { color: color-mix(in srgb, var(--ink) 88%, var(--muted)); line-height: 1.5; }
.card .rec { font-size: 13px; color: var(--try); }
.tags .chip { background: transparent; border-color: var(--line); color: var(--muted); font-size: 12px; padding: 1px 8px; }
.tags .chip:hover { border-color: var(--accent); color: var(--accent); }
.badge { border-radius: 999px; padding: 2px 9px; font-size: 11px; letter-spacing: .02em; }
.badge.want { background: var(--try-soft); color: var(--try); }
.badge.hot { background: var(--gold-soft); color: var(--gold); border: 0; }
.ribbon { display: none; }
.card-foot { gap: 6px; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); margin-top: auto; }
.card-foot button { background: transparent; border-color: var(--line); color: var(--ink); font-size: 13px; padding: 5px 11px; border-radius: 999px; }
.card-foot button:hover { border-color: var(--accent); color: var(--accent); }
.card-foot a { font-weight: 600; padding: 5px 4px; }
.friends { background: var(--gold-soft); color: var(--ink); }
.photo-slot .photo { margin: -16px -16px 8px; }
@media (hover: hover) {
  .card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
}

/* Sheets and dialogs */
dialog { border-radius: 16px; box-shadow: 0 20px 60px rgb(0 0 0 / .25); }
dialog h2, .pick-card h2, .inbox-wrap h2 { font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; }
dialog[open] { animation: sheet-in .22s ease-out; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(12px); } }
dialog::backdrop { background: rgb(20 10 8 / .45); }
.pick-card { box-shadow: var(--shadow); }
.pick-card h2 { font-size: 28px; }
#picker .chip, #pick-tags .chip { background: var(--card); border-color: var(--line); }
#picker .chip.on, #pick-tags .chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
#toast { border-radius: 12px; box-shadow: var(--shadow-lift); }

/* Phones: less in front of the first place */
@media (max-width: 640px) {
  .top { padding: 10px 14px 0; }
  .top h1 { font-size: 22px; }
  .tabs { padding: 6px 14px; }
  .controls { padding: 4px 14px 0; gap: 8px; }
  main { padding: 0 14px 60px; }
  .save-us { padding: 10px 14px; font-size: 15px; }
  .save-us .sub { display: none; }
  .status-seg { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .status-seg::-webkit-scrollbar { display: none; }
  .status-seg button { flex: none; }
  .filters-toggle { display: inline-flex; align-items: center; gap: 6px; flex: none; border-radius: 999px; padding: 5px 12px; font-size: 14px; background: var(--card); }
  .filters-n:not(:empty) { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 6px; font-size: 12px; font-weight: 700; }
  body:not(.show-filters) .filter-panel { display: none; }
  body.show-filters .filters-toggle { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  .card { padding: 14px; }
  .photo-slot .photo { margin: -14px -14px 8px; }
  .card h3 { font-size: 18px; }
}
@media (max-width: 640px) {
  /* The status chips scroll sideways: fade the edge so it reads as more, not cut off */
  .status-seg { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); padding-right: 24px; }
}

/* ---------- Near me: floating button + sheet ---------- */
.fab { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 900; width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font-size: 24px; line-height: 1; display: grid; place-items: center; box-shadow: 0 4px 14px rgb(109 22 34 / .35), 0 1px 3px rgb(0 0 0 / .2); }
.fab:hover { filter: brightness(1.08); }
main { padding-bottom: 96px; }
#near { width: min(640px, 96vw); }
.near-wrap { padding: 18px; display: grid; gap: 12px; max-height: 88vh; overflow-y: auto; }
.near-wrap h2 { margin: 0; padding-right: 48px; }
.near-tabs { display: flex; gap: 6px; }
.near-tabs button { flex: 1; min-height: 42px; border-radius: 999px; font-weight: 600; background: var(--card); }
.near-tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
#near-status { margin: 0; }
.near-map { height: 42vh; min-height: 260px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.near-list { list-style: none; margin: 0; padding: 0; }
.near-item { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.near-item:first-child { border-top: 1px solid var(--line); }
.near-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; }
.near-name { font-family: var(--serif); font-weight: 600; font-size: 17px; line-height: 1.25; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.near-name .spires { transform: scale(.8); transform-origin: left center; }
.near-meta { color: var(--muted); font-size: 13px; }
.near-go { display: grid; justify-items: center; min-width: 64px; padding: 6px 10px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; color: var(--accent); line-height: 1.2; }
.near-go b { font-size: 15px; }
.near-go span { font-size: 11px; color: var(--muted); }
.near-go:hover { border-color: var(--accent); }
@media (max-width: 640px) {
  #near { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .near-wrap { max-height: none; height: 100%; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); }
  .near-map { height: 38vh; }
}
.near-walk { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.near-walk button { min-width: 42px; min-height: 36px; padding: 0 10px; border-radius: 999px; background: var(--card); font-weight: 600; font-size: 14px; }
.near-walk button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.near-open { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 30%, transparent); text-underline-offset: 3px; }
.near-open:hover { color: var(--accent); }
.near-back { justify-self: start; margin-bottom: 8px; font-weight: 600; }
#near-detail { display: grid; }
#near-card .card { box-shadow: none; }
.near-item { grid-template-columns: 28px 1fr auto auto; }
.near-bolt { display: grid; justify-items: center; min-width: 52px; padding: 6px 8px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); line-height: 1.2; font-size: 16px; }
.near-bolt span { font-size: 11px; color: #2a9d5c; font-weight: 700; }
.near-bolt:hover { border-color: #2a9d5c; }
.card-foot a.wolt { color: #009de0; font-weight: 700; padding: 5px 4px; }
.card-foot a.wolt:hover { text-decoration: underline; }
.card-foot a.bolt { color: #2a9d5c; font-weight: 700; padding: 5px 4px; }
.card-foot a.bolt:hover { text-decoration: underline; }
.near-rides { display: grid; gap: 4px; }
.near-ride { display: flex; align-items: center; gap: 4px; justify-content: center; min-width: 64px; min-height: 30px; padding: 2px 8px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 14px; }
.near-ride span { font-size: 12px; font-weight: 700; }
.near-ride .bolt-t { color: #2a9d5c; }
.near-ride:hover { border-color: currentColor; }
.card-foot a.wolt { color: var(--muted); font-weight: 600; }
.card-foot a.wolt--known { background: #009de0; color: #fff; border-radius: 999px; padding: 4px 11px; font-weight: 700; }
.card-foot a.wolt--known:hover { text-decoration: none; filter: brightness(1.08); }

/* ---------- Cards v9: clear header, quieter tags, one row of icon actions ---------- */
.card { gap: 10px; padding: 16px 16px 10px; }
.card-head { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start; }
.card-title { min-width: 0; display: grid; gap: 3px; }
.card-side { display: flex; align-items: center; gap: 6px; padding-top: 2px; }
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 18px; }
.eyebrow .kind { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cat, var(--muted)); }
.eyebrow .kind:empty { display: none; }
.eyebrow .badge { font-size: 10.5px; padding: 1px 8px; letter-spacing: .03em; text-transform: uppercase; }
.card h3 { font-size: 20px; line-height: 1.2; }
.card .meta { font-size: 13.5px; }
.card .meta .dist { font-weight: 600; color: var(--ink); }
.card .note { font-size: 14.5px; margin: 0; }
.card .rec { font-size: 13px; }
.card .tags { gap: 2px 10px; }
.card .tags .chip { border: 0; background: none; padding: 0; font-size: 12.5px; color: var(--muted); }
.card .tags .chip:hover { color: var(--accent); }
.card .been-ask { font-size: 13px; }
.card.to-try { border-style: dashed; }

.actions { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 2px; margin: auto -8px 0; padding-top: 6px; border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.act { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px 5px; border: 0; border-radius: 10px; background: none; color: var(--muted); font-size: 11.5px; font-weight: 600; line-height: 1.1; text-decoration: none; white-space: nowrap; min-width: 0; }
.act svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.act:hover { background: var(--chip); color: var(--ink); text-decoration: none; }
.act:disabled { opacity: .5; }
.act-wolt.known { color: #0089c4; }
.act-bolt { color: #1f9a5a; }
.act-wolt.known:hover { color: #0089c4; } .act-bolt:hover { color: #1f9a5a; }
@media (prefers-color-scheme: dark) { .act-wolt.known, .act-wolt.known:hover { color: #4cc3f5; } .act-bolt, .act-bolt:hover { color: #4fcf8a; } }
.card .contact { padding: 2px 0 6px; }
.photo-slot .photo { margin-bottom: 4px; }

/* ---------- Card thumbnails (Google photo, or the place's initial on a tinted tile) ---------- */
.card-head { grid-template-columns: auto 1fr auto; }
.thumb { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--cat, var(--muted)) 12%, var(--card)); color: var(--cat, var(--muted)); font-family: var(--serif); font-size: 28px; font-weight: 600; margin-top: 2px; }
.thumb[data-thumb] { cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; animation: thumb-in .25s ease; }
@keyframes thumb-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 640px) { .thumb { width: 58px; height: 58px; font-size: 25px; } }
.near-name .heart { font-size: 20px; margin-left: auto; }
.ms[data-key="rating"] .ms-pop { min-width: 280px; } /* room for the spire names on one or two lines */
.controls { grid-template-columns: minmax(0, 1fr); } /* never wider than the screen, even when a chip row is long */

/* ---------- Guide awards (Michelin, Gault&Millau): our own simple badges, not the guides' logos ---------- */
.award { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; line-height: 1; padding: 3px 7px; border-radius: 999px; text-decoration: none; white-space: nowrap; }
a.award:hover { text-decoration: none; filter: brightness(1.05); }
.award.mich { color: #b3122b; background: #fbe9ec; }
.award.mich-star1, .award.mich-star2 { background: #b3122b; color: #fff; }
.award.mich-selected { background: transparent; box-shadow: inset 0 0 0 1px #e3a3ad; }
.award.gm { color: #1d1a17; background: #f1e7cf; }
.award .toques { display: inline-flex; gap: 0; }
.award .toque { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-color-scheme: dark) {
  .award.mich { color: #ff8a9b; background: #3a1a20; }
  .award.mich-star1, .award.mich-star2 { background: #c8233c; color: #fff; }
  .award.mich-selected { background: transparent; box-shadow: inset 0 0 0 1px #7a3540; }
  .award.gm { color: #f3e3bd; background: #3a3220; }
}
.guide-sub { font-size: 15px; margin: 14px 0 4px; }
.guide-awards li { align-items: center; }
.award-ex { min-width: 104px; }

/* Near me: Open now */
.near-walk .near-open-now { margin-left: auto; }
.near-walk .near-open-now[aria-pressed="true"] { background: #1f9a5a; border-color: #1f9a5a; color: #fff; }
.open-tag { display: block; color: #1f9a5a; font-weight: 700; }
@media (prefers-color-scheme: dark) { .open-tag { color: #4fcf8a; } }
/* Suggest form: place or site idea */
.sg-mode { display: flex; margin: 2px 0 8px; }
.sg-mode button { flex: 1; padding: 8px 10px; font-size: 14px; }
.inbox-head .kind.idea { color: #a16207; }
/* Temporarily closed (tag) */
.badge.paused { background: #e7e5e4; color: #44403c; }
.card.paused h3, .card.paused .thumb { opacity: .6; }
@media (prefers-color-scheme: dark) { .badge.paused { background: #3a3633; color: #d6d3d1; } }

/* ---------- Footer ---------- */
.site-foot { max-width: 1200px; margin: 8px auto 0; padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; line-height: 1.5; text-align: center; }
.site-foot p { margin: 0 0 6px; }
.site-foot a, .site-foot button.link { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; font-size: inherit; }
.site-foot a:hover, .site-foot button.link:hover { color: var(--accent); }
.site-foot .foot-links { font-size: 13.5px; color: var(--ink); }
/* Near me: keep the ♡ in a fixed spot at the right of the name, so a long name never pushes it onto its own line */
.near-main { position: relative; min-width: 0; }
.near-main:has(.heart) { padding-right: 30px; }
.near-name .heart { position: absolute; top: -2px; right: 0; margin: 0; }

/* ---------- Filter area v2 ---------- */
/* Been / To try is one switch (a segmented control); Hot new and My list are separate on/off toggles */
.status-row { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.status-row .status-seg { flex: none; }
.status-seg { display: inline-flex; flex-wrap: nowrap; gap: 2px; padding: 3px; background: var(--chip); border: 1px solid var(--line); border-radius: 999px; }
.status-seg button { border: 0; background: transparent; border-radius: 999px; padding: 5px 15px; font-size: 14px; color: var(--muted); font-weight: 500; }
.status-seg button:hover { color: var(--ink); }
.status-seg button.on, .status-seg button.st-want.on { background: var(--card); color: var(--ink); border: 0; font-weight: 650; box-shadow: 0 1px 3px rgb(0 0 0 / .14), 0 0 0 1px var(--line); }
.status-seg button.st-want.on { color: var(--try); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.quick:empty { display: none; }
.quick button { border-radius: 999px; padding: 5px 12px; font-size: 14px; background: var(--card); }
.quick button .n { opacity: .6; font-size: 12px; }
.quick .hot-chip { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.quick .hot-chip.on { background: var(--gold); border-color: var(--gold); color: #fff; }
.quick .mine-chip { color: #be123c; border-color: #fecdd3; }
.quick .mine-chip.on { background: #be123c; border-color: #be123c; color: #fff; }
.quick button.on .n { opacity: .85; }

/* What's filtering the list right now, each removable, plus Clear all */
.active-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.active-chips { display: contents; }
.active-chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 9px 4px 12px; font-size: 13px; font-weight: 600; background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.active-chip span { font-size: 11px; opacity: .75; }
.active-chip:hover { border-color: var(--accent); }
.clear-all { border-radius: 999px; padding: 4px 13px; font-size: 13px; font-weight: 650; background: var(--ink); color: var(--bg); border: 1px solid var(--ink); }
.clear-all:hover { filter: brightness(1.2); }
.empty .clear-all { margin-top: 12px; font-size: 14px; padding: 7px 16px; }
#count { color: var(--ink); font-weight: 650; }

@media (max-width: 640px) {
  .status-row .status-seg { flex: 1 1 100%; -webkit-mask-image: none; mask-image: none; padding: 3px; overflow: visible; }
  .status-seg button { flex: 1 1 0; padding: 6px 8px; }
  .filters-toggle { margin-left: auto; }
}

/* ---------- Slim sticky filter bar (under the sticky tabs) ---------- */
.mini-bar { position: fixed; left: 0; right: 0; top: var(--tabs-h, 48px); z-index: 499; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); box-shadow: 0 6px 14px -10px rgb(0 0 0 / .25); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: transform .18s ease, opacity .18s ease; }
.mini-bar.show { transform: none; opacity: 1; pointer-events: auto; }
.mini-in { max-width: 1200px; margin: 0 auto; padding: 6px 16px; display: flex; align-items: center; gap: 10px; }
.mini-seg { padding: 2px; }
.mini-bar .mini-seg button { flex: none; white-space: nowrap; padding: 4px 12px; font-size: 13px; }
.mini-count { color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.mini-filters { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; background: var(--card); white-space: nowrap; }
.mini-filters .filters-n:not(:empty) { background: var(--accent); color: var(--accent-ink, #fff); border-radius: 999px; padding: 0 6px; font-size: 11px; font-weight: 700; }
.mini-clear { width: 30px; height: 30px; padding: 0; border-radius: 50%; background: var(--ink); color: var(--bg); border-color: var(--ink); font-size: 13px; font-weight: 700; flex: none; }
@media (max-width: 640px) {
  .mini-in { padding: 6px 14px; gap: 8px; }
  .mini-bar .mini-seg button { flex: none; padding: 4px 10px; }
}
@media (max-width: 420px) { .mini-count { display: none; } }

/* ---------- Search + "Save the relationship" share one row on phones ---------- */
.search-row { display: grid; gap: 10px; min-width: 0; }
.save-us .short { display: none; }
@media (max-width: 640px) {
  .search-row { display: flex; gap: 8px; align-items: stretch; }
  .search-row .search-box { flex: 1; min-width: 0; }
  .search-row .save-us { width: auto; flex: none; padding: 0 13px; font-size: 14px; font-weight: 700; gap: 5px; flex-wrap: nowrap; white-space: nowrap; border-radius: 12px; }
  .save-us .long, .save-us .sub { display: none; }
  .save-us .short { display: inline; }
}

/* Search box with its own clear button */
.search-box { position: relative; min-width: 0; }
.search-box #search { padding-right: 42px; }
#search::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-clear { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: var(--chip); color: var(--muted); font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.search-clear:hover { color: var(--ink); }

/* Tags: one line of the most used + "more"; opened, all of them wrapped in two groups */
.tag-row { flex-wrap: wrap; overflow: visible; gap: 6px; padding: 2px 0; }
.tag-group { flex: 0 0 100%; margin: 4px 0 0; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tag-group:first-child { margin-top: 0; }
.tag-more { border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 650; background: var(--card); color: var(--accent); border: 1px dashed color-mix(in srgb, var(--accent) 55%, var(--line)); white-space: nowrap; }
.tag-more:hover { border-style: solid; }
.tag-row .chip { font-size: 13px; padding: 4px 11px; }
