/* VegTrip interface. Calm grouped surfaces, one accent colour, three button levels:
   .primary (filled) > .btn (tinted) > .btn.plain / .chip (neutral). Text links are the quietest level. */
:root {
  --bg: #f2f2f7; --surface: #fff; --raised: #fff; --fill: rgba(118, 118, 128, .12); --fill-2: rgba(118, 118, 128, .2);
  --ink: #1c1c1e; --ink-2: rgba(60, 60, 67, .68); --ink-3: rgba(60, 60, 67, .36); --sep: rgba(60, 60, 67, .16);
  --tint: #1c7a53; --on-tint: #fff; --tint-soft: rgba(28, 122, 83, .12);
  --strict: #0b6b50; --vegan: #1a8249; --lacto: #4f8f1a; --vegetarian: #7a8a12; --vegan_options: #b06500; --veg_options: #c0501a; --unclear: #7c7c84; --nearveg: #2f6db5;
  --ok: #1a8249; --ask: #b06500; --bad: #d1242f;
  --bar: rgba(249, 249, 251, .78); --shadow: 0 10px 40px rgba(0, 0, 0, .14); --shadow-s: 0 1px 2px rgba(0, 0, 0, .06), 0 2px 8px rgba(0, 0, 0, .04);
  --side-bg: #e9e9ee; --side-hover: rgba(118, 118, 128, .12); --side-on: rgba(118, 118, 128, .2);
  --r-s: 10px; --r: 14px; --r-l: 18px; --r-xl: 26px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "PingFang TC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  color-scheme: light dark;
}
html[data-theme="light"] { color-scheme: light; } html[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #000; --surface: #1c1c1e; --raised: #2c2c2e; --fill: rgba(118, 118, 128, .24); --fill-2: rgba(118, 118, 128, .36);
    --ink: #f5f5f7; --ink-2: rgba(235, 235, 245, .64); --ink-3: rgba(235, 235, 245, .32); --sep: rgba(84, 84, 88, .6);
    --tint: #3fcf8e; --on-tint: #04130b; --tint-soft: rgba(63, 207, 142, .16);
    --strict: #2fd0a8; --vegan: #3fcf8e; --lacto: #8fd45a; --vegetarian: #c9cf55; --vegan_options: #ffb340; --veg_options: #ff9a62; --unclear: #a1a1a8; --nearveg: #6aa8f0;
    --ok: #3fcf8e; --ask: #ffb340; --bad: #ff6961;
    --side-bg: #121214; --side-hover: rgba(255, 255, 255, .06); --side-on: rgba(255, 255, 255, .11);
    --bar: rgba(22, 22, 24, .74); --shadow: 0 10px 40px rgba(0, 0, 0, .6); --shadow-s: none;
  }
}
html[data-theme="dark"] {
  --bg: #000; --surface: #1c1c1e; --raised: #2c2c2e; --fill: rgba(118, 118, 128, .24); --fill-2: rgba(118, 118, 128, .36);
  --ink: #f5f5f7; --ink-2: rgba(235, 235, 245, .64); --ink-3: rgba(235, 235, 245, .32); --sep: rgba(84, 84, 88, .6);
  --tint: #3fcf8e; --on-tint: #04130b; --tint-soft: rgba(63, 207, 142, .16);
  --strict: #2fd0a8; --vegan: #3fcf8e; --lacto: #8fd45a; --vegetarian: #c9cf55; --vegan_options: #ffb340; --veg_options: #ff9a62; --unclear: #a1a1a8; --nearveg: #6aa8f0;
  --ok: #3fcf8e; --ask: #ffb340; --bad: #ff6961;
  --side-bg: #121214; --side-hover: rgba(255, 255, 255, .06); --side-on: rgba(255, 255, 255, .11);
  --bar: rgba(22, 22, 24, .74); --shadow: 0 10px 40px rgba(0, 0, 0, .6); --shadow-s: none;
}
@media (prefers-color-scheme: dark) {
  /* sheets sit one level above the page, and their cards one level above that */
  html:not([data-theme="light"]) .panel { background: #1c1c1e; --surface: #2c2c2e; --raised: #3a3a3c; }
}
/* sheets sit one level above the page, and their cards one level above that */
html[data-theme="dark"] .panel { background: #1c1c1e; --surface: #2c2c2e; --raised: #3a3a3c; }
@media (prefers-color-scheme: dark) and (max-width: 899px) {
  html:not([data-theme="light"]) #results { background: #1c1c1e; --surface: #2c2c2e; --raised: #3a3a3c; }
}
@media (max-width: 899px) {
  html[data-theme="dark"] #results { background: #1c1c1e; --surface: #2c2c2e; --raised: #3a3a3c; }
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 17px/1.45 var(--font); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { color: var(--tint); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 2rem; font-weight: 700; letter-spacing: -.022em; line-height: 1.15; margin: .25rem 0 .35rem; }
h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; margin: 1.6rem 0 .6rem; }
h3 { font-size: 1.06rem; font-weight: 650; margin: 1.6rem 0 .25rem; }
p { margin: .5rem 0; }
[hidden] { display: none !important; }
.ic { display: inline-flex; flex: none; }
.muted { color: var(--ink-2); } .small { font-size: .82rem; line-height: 1.4; } .lead, .sub { color: var(--ink-2); margin: 0 0 1.1rem; }
.sub { margin: .1rem 0 0; font-size: .94rem; }
.label { font-size: .82rem; font-weight: 600; color: var(--ink-2); margin: 1.1rem 0 .45rem; }
.foot { text-align: center; margin-top: 1rem; }
:focus-visible { outline: 2px solid var(--tint); outline-offset: 2px; }

/* ---------- shell: sidebar + main column ---------- */
#app { display: flex; height: 100dvh; overflow: hidden; }
#col { flex: 1; min-width: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); }
#top { display: flex; align-items: center; gap: .45rem; padding: .5rem .8rem; padding-top: max(.5rem, env(safe-area-inset-top)); background: var(--bar);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: .5px solid var(--sep); position: relative; z-index: 6; }
#top .spacer { flex: 1; }
.brand { display: flex; align-items: center; gap: .45rem; color: var(--ink); font-size: 1.04rem; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; } .wordmark, .wordmark img { display: block; } .wordmark img { width: auto; } .brand span { color: var(--ink-3); font-size: .86rem; font-weight: 500; }
.iconbtn { width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; color: var(--ink-2); display: inline-grid; place-items: center; flex: none; padding: 0; transition: background .15s, color .15s; }
.iconbtn:hover { background: var(--fill); color: var(--ink); }
#locBtn { display: inline-flex; align-items: center; gap: .3rem; border: 0; background: var(--fill); border-radius: 999px; height: 34px; padding: 0 .75rem; font-size: .9rem; font-weight: 550; max-width: 46vw; transition: background .15s; }
#locBtn:hover { background: var(--fill-2); }
#locBtn > svg:first-child { color: var(--tint); flex: none; } #locBtn .dn { color: var(--ink-3); flex: none; }
#locBtn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
main { position: relative; overflow: hidden; min-height: 0; }
#chat, #page { height: 100%; }
#page { overflow-y: auto; }

/* sidebar: off-canvas drawer on phones, collapsible column on wide screens */
#side { position: fixed; inset: 0 auto 0 0; width: min(84vw, 300px); z-index: 30; background: var(--side-bg); display: flex; flex-direction: column;
  padding: max(.6rem, env(safe-area-inset-top)) .6rem max(.6rem, env(safe-area-inset-bottom)); transform: translateX(-102%); transition: transform .32s cubic-bezier(.32, .72, 0, 1);
  box-shadow: none; border-right: .5px solid var(--sep); }
body.side-open #side { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .18); }
#scrim { position: fixed; inset: 0; z-index: 29; background: rgba(0, 0, 0, .32); opacity: 0; pointer-events: none; transition: opacity .25s; }
body.side-open #scrim { opacity: 1; pointer-events: auto; }
.sidehead { display: flex; align-items: center; gap: .4rem; padding: .1rem .2rem .6rem .4rem; }
.sidehead .brand { flex: 1; }
.sideadd { width: 100%; min-height: 42px; margin: 0 0 .5rem; border-radius: 12px; font-size: .95rem; justify-content: flex-start; padding: 0 .8rem; }
.sidescroll { flex: 1; overflow-y: auto; margin: 0 -.6rem; padding: 0 .6rem; scrollbar-width: thin; }
.sidelabel { display: flex; align-items: baseline; justify-content: space-between; font-size: 1rem; font-weight: 700; color: var(--tint); letter-spacing: -.005em; margin: 1.1rem .55rem .35rem; }
.sidelabel a { text-transform: none; letter-spacing: 0; font-weight: 550; font-size: .8rem; }
.sitem { display: flex; align-items: center; gap: .65rem; width: 100%; min-height: 38px; padding: 0 .55rem; border: 0; border-radius: 10px; background: none; color: var(--ink); font-size: .93rem; text-align: left; text-decoration: none; transition: background .12s; }
.sitem:hover { background: var(--side-hover); text-decoration: none; }
.sitem.on { background: var(--side-on); font-weight: 600; }
.sitem .ic { color: var(--ink-2); flex: none; display: grid; } .sitem.on .ic { color: var(--tint); }
.sitem .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sitem.two { align-items: center; padding-top: .4rem; padding-bottom: .4rem; }
.sitem.two .nm { white-space: normal; line-height: 1.35; } .sitem .sub { font-size: .76rem; color: var(--ink-2); font-weight: 450; margin-left: .15rem; }
.sitem .sdot { width: 9px; height: 9px; border-radius: 50%; background: var(--lv); flex: none; margin: 0 .3rem 0 .25rem; }
.sidenote { font-size: .82rem; color: var(--ink-3); padding: .2rem .55rem; margin: 0; line-height: 1.4; }
.sidefoot { border-top: .5px solid var(--sep); padding-top: .5rem; margin-top: .4rem; }
.sidefoot .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--tint-soft); color: var(--tint); display: grid; place-items: center; flex: none; font-weight: 700; font-size: .8rem; margin-left: -.15rem; }

/* ---------- conversation ---------- */
#chat { display: flex; flex-direction: column; }
#msgs { flex: 1; overflow-y: auto; padding: 1.1rem .9rem .5rem; display: flex; flex-direction: column; gap: .5rem; scroll-behavior: smooth; }
.msg { max-width: 84%; padding: .6rem .9rem; border-radius: 20px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.42; animation: rise .22s ease both; }
.msg.user { align-self: flex-end; background: var(--tint); color: var(--on-tint); border-bottom-right-radius: 6px; }
.msg.assistant { align-self: flex-start; background: var(--surface); border-bottom-left-radius: 6px; box-shadow: var(--shadow-s); }
.msg.error { color: var(--bad); }
.msg.typing::after { content: ""; display: inline-block; width: 26px; height: 8px; margin-left: .15rem; vertical-align: middle;
  background: radial-gradient(circle 3px at 4px 4px, var(--ink-3) 98%, transparent) 0 0 / 9px 8px repeat-x; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
#dock { position: relative; margin: .5rem .9rem .8rem; margin-bottom: max(.8rem, env(safe-area-inset-bottom)); }
#composer { display: flex; align-items: flex-end; gap: .35rem; padding: 5px; background: var(--surface); border-radius: 24px; box-shadow: 0 0 0 .5px var(--sep), var(--shadow-s); transition: box-shadow .15s; }
#composer:focus-within { box-shadow: 0 0 0 1.5px var(--tint); }
#composer textarea { flex: 1; width: auto; margin: 0; resize: none; border: 0; border-radius: 0; outline: 0; background: none; box-shadow: none !important; padding: .42rem 0; min-height: 36px; max-height: 120px; line-height: 1.35; }
#composer textarea::placeholder, input::placeholder, textarea::placeholder { color: var(--ink-3); }
#composer #sendBtn, #composer #plusBtn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--tint); color: var(--on-tint); display: grid; place-items: center; flex: none; transition: transform .12s, opacity .15s; }
#composer button:active { transform: scale(.92); } #composer #sendBtn:disabled { opacity: .35; }
#composer #plusBtn { background: var(--fill); color: var(--ink-2); } #composer #plusBtn:hover { color: var(--ink); } #composer #plusBtn[aria-expanded="true"] { background: var(--tint-soft); color: var(--tint); }
#composer #plusBtn .ic { transition: transform .2s; } #composer #plusBtn[aria-expanded="true"] .ic { transform: rotate(45deg); }
#composer textarea { padding-left: .3rem !important; }
#plusMenu { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 8; min-width: 260px; background: var(--raised); border-radius: 16px; padding: 6px; box-shadow: 0 10px 34px rgba(0, 0, 0, .16), 0 0 0 .5px var(--sep); animation: pop .16s ease both; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.mitem { display: flex; align-items: center; gap: .75rem; width: 100%; border: 0; background: none; border-radius: 11px; padding: .55rem .6rem; text-align: left; color: var(--ink); }
.mitem:hover { background: var(--fill); }
.mitem .mi { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--tint-soft); color: var(--tint); flex: none; }
.mitem .mt { display: flex; flex-direction: column; gap: 1px; min-width: 0; } .mitem .mt b { font-size: .95rem; font-weight: 600; } .mitem .mt span { font-size: .8rem; color: var(--ink-2); }

/* ---------- place cards inside the chat ---------- */
.cardsblock { align-self: stretch; display: flex; flex-direction: column; gap: .5rem; animation: rise .25s ease both; }
.cardsblock .ch { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; padding: 0 .25rem; }
.cardsblock .ch strong { font-size: 1.02rem; letter-spacing: -.01em; } .cardsblock .ch span { color: var(--ink-2); font-size: .86rem; }
.cardsblock .place { margin: 0; align-items: stretch; padding: .75rem .75rem .75rem .95rem; }
.cardsblock .place .pbody { align-self: center; }
.mapthumb { position: relative; width: 84px; height: 84px; flex: none; border-radius: 14px; overflow: hidden; background: var(--fill); box-shadow: inset 0 0 0 .5px rgba(0,0,0,.12); }
.mapthumb img { position: absolute; width: 256px; height: 256px; max-width: none; user-select: none; -webkit-user-drag: none; }
.mapthumb .pin { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-width: 2px; pointer-events: none; }
.cardsblock .more { align-self: stretch; }
.toolrow { display: flex; align-items: center; gap: .9rem; width: 100%; text-align: left; border: 0; background: none; padding: .85rem .95rem; color: var(--ink); text-decoration: none; }
.toolrow + .toolrow { border-top: .5px solid var(--sep); }
.toolrow:hover { text-decoration: none; background: color-mix(in srgb, var(--surface) 94%, var(--ink)); }
.toolrow .ti { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--tint-soft); color: var(--tint); flex: none; }
.toolrow .tt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .toolrow .tt b { font-size: 1.02rem; font-weight: 600; } .toolrow .tt span { font-size: .86rem; color: var(--ink-2); line-height: 1.35; }
.toolrow .chev { color: var(--ink-3); }
.group > .toolrow:first-child { border-radius: var(--r-l) var(--r-l) 0 0; } .group > .toolrow:last-child { border-radius: 0 0 var(--r-l) var(--r-l); }

/* ---------- buttons ---------- */
.primary, .btn, .inline > button, .tile, .chip { border: 0; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font-weight: 600; text-decoration: none; transition: transform .12s, filter .15s, background .15s; -webkit-user-select: none; user-select: none; }
.primary:hover, .btn:hover, .chip:hover, .tile:hover { text-decoration: none; filter: brightness(.96); }
.primary:active, .btn:active, .chip:active, .tile:active, .place:active { transform: scale(.975); }
.primary, .inline > button[type=submit], .inline > button { background: var(--tint); color: var(--on-tint); border-radius: var(--r); min-height: 44px; padding: 0 1.15rem; font-size: 1rem; }
.btn { background: var(--tint-soft); color: var(--tint); border-radius: var(--r); min-height: 44px; padding: 0 1.05rem; font-size: .96rem; }
.btn.plain { background: var(--fill); color: var(--ink); }
.btn.danger { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.wide { width: 100%; min-height: 50px; font-size: 1.06rem; margin: .8rem 0 .2rem; }
button:disabled { opacity: .45; cursor: default; transform: none !important; }
.chips { display: flex; gap: .45rem; flex-wrap: wrap; }
.chip { flex: none; background: var(--fill); color: var(--ink); border-radius: 999px; min-height: 34px; padding: 0 .9rem; font-size: .9rem; font-weight: 550; white-space: nowrap; }
.chip.on { background: var(--tint); color: var(--on-tint); }
.chip.good { background: color-mix(in srgb, var(--ok) 13%, transparent); color: var(--ok); }
.chip.bad { background: color-mix(in srgb, var(--bad) 11%, transparent); color: var(--bad); }
.chip.inline { align-self: flex-start; background: var(--tint-soft); color: var(--tint); margin: 0; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: .9rem 0; }
.x { border: 0; background: var(--fill); color: var(--ink-2); width: 28px; height: 28px; border-radius: 50%; padding: 0; display: inline-grid; place-items: center; flex: none; }

/* ---------- map page ---------- */
/* full-bleed map; a glass header on top and a swipeable strip of place cards at the bottom */
#results { position: absolute; inset: 0; background: var(--bg); display: none; z-index: 2; }
body[data-route="map"] #results { display: block; }
#resultHead { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 4; display: flex; align-items: stretch; gap: 8px; pointer-events: none; }
.fcard { pointer-events: auto; position: relative; display: flex; align-items: center; gap: .3rem; min-height: 46px; padding: 0 .75rem 0 .3rem; border-radius: 16px; background: var(--bar);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); box-shadow: var(--shadow-s), 0 0 0 .5px var(--sep); min-width: 0; }
.fcard .rtitle { margin: 0; min-width: 0; } .fcard .rtitle strong { font-size: 1.08rem; }
.fcard .iconbtn { width: 34px; height: 34px; }
.catcard { flex: none; padding: 0 .35rem 0 .8rem; gap: .45rem; }
.catlabel { font-size: .86rem; color: var(--ink-2); white-space: nowrap; }
.catbtn { display: inline-flex; align-items: center; gap: .3rem; border: 0; border-radius: 11px; min-height: 34px; padding: 0 .6rem 0 .75rem; background: var(--fill); color: var(--ink); font-size: .9rem; font-weight: 600; white-space: nowrap; }
.catbtn .ic { color: var(--ink-3); } .catbtn:hover { background: var(--fill-2); }
.catdot { width: 7px; height: 7px; border-radius: 50%; background: var(--tint); }
.catmenu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 200px; z-index: 9; background: var(--raised); border-radius: 14px; padding: 6px; box-shadow: 0 10px 34px rgba(0,0,0,.18), 0 0 0 .5px var(--sep); animation: pop .16s ease both; }
.catopt { justify-content: space-between; padding: .55rem .7rem; font-size: .94rem; } .catopt.on { color: var(--tint); font-weight: 600; } .catopt .ic { color: var(--tint); }
.msep { display: block; height: .5px; background: var(--sep); margin: 4px 8px; }
.grab { display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--ink-3); margin: 0 auto; }
.rtitle { display: flex; align-items: baseline; gap: .5rem; margin: 0 0 .6rem; }
.rtitle strong { font-size: 1.25rem; font-weight: 700; letter-spacing: -.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rtitle span { color: var(--ink-2); font-size: .9rem; white-space: nowrap; }
.filters { display: flex; gap: .5rem; align-items: center; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filters::-webkit-scrollbar { display: none; }
.seg { display: flex; flex: none; background: var(--fill); border-radius: 10px; padding: 2px; }
.seg button { border: 0; background: none; border-radius: 8px; min-height: 30px; padding: 0 .85rem; font-size: .86rem; font-weight: 550; color: var(--ink); white-space: nowrap; transition: background .2s, box-shadow .2s; }
.seg button.on { background: var(--raised); box-shadow: 0 1px 3px rgba(0, 0, 0, .14), 0 0 0 .5px rgba(0, 0, 0, .04); font-weight: 650; }
.chip.toggle { min-height: 34px; font-size: .86rem; gap: .25rem; }
.risks { display: flex; gap: .4rem; align-items: flex-start; font-size: .8rem; line-height: 1.4; color: var(--ink-2); margin: .65rem 0 0; }
.risks .ic { margin-top: 1px; color: var(--ask); } .risks b { color: var(--ink); font-weight: 600; }
#mapwrap { position: absolute; inset: 0; }
#results.nomap #mapwrap { display: none; }
#picked { display: none !important; }
#carousel { position: absolute; left: 0; right: 0; bottom: max(30px, calc(env(safe-area-inset-bottom) + 18px)); z-index: 4; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 6px max(16px, calc(50% - 190px)); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
#carousel::-webkit-scrollbar { display: none; }
#carousel .place { flex: 0 0 min(calc(100vw - 48px), 380px); scroll-snap-align: center; margin: 0; box-shadow: var(--shadow); transition: transform .2s, opacity .2s; }
#carousel .place:not(.sel) { opacity: .82; transform: scale(.96); }
#carousel .cnum { position: absolute; }
#results:has(#map.off) #carousel, #results.nomap #carousel { display: none; }
#map.focusing .pin:not(.sel) { opacity: .45; transform: scale(.72); filter: saturate(.35); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.pin.sel { transform: scale(1.5); box-shadow: 0 0 0 5px color-mix(in srgb, var(--tint) 30%, transparent), 0 3px 10px rgba(0,0,0,.4); }
.pin { transition: transform .2s, opacity .2s, filter .2s; }
.place.sel { box-shadow: 0 0 0 2px var(--tint), var(--shadow-s); }
.emptymap { text-align: center; color: var(--ink-2); padding: 2.5rem 1rem; } .emptymap .actions { justify-content: center; }
#map { height: 100%; background: var(--fill); overflow: hidden; }
#mapwrap:has(#map.off) { display: none !important; }
#areaBtn { position: absolute; top: calc(var(--headh, 112px) + 20px); z-index: 3; left: 50%; transform: translateX(-50%); border: 0; border-radius: 999px; min-height: 34px; padding: 0 1rem; background: var(--bar); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow); font-size: .88rem; font-weight: 600; color: var(--tint); }
/* without a map (offline, or the map library cannot load) fall back to a plain list under the header */
#list { display: none; }
#results:has(#map.off) #list, #results.nomap #list { display: block; position: absolute; inset: 0; overflow-y: auto; padding: calc(var(--headh, 112px) + 22px) .9rem 1.2rem; }
.pin { width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid #fff; background: var(--unclear); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); padding: 0; transition: transform .15s; }
.pin:hover { transform: scale(1.25); }
.pin.strict { background: var(--strict); } .pin.lacto { background: var(--lacto); } .pin.vegan { background: var(--vegan); } .pin.vegetarian { background: var(--vegetarian); } .pin.vegan_options { background: var(--vegan_options); } .pin.veg_options { background: var(--veg_options); } .pin.nearveg { background: var(--nearveg); }

/* place row */
.place { display: flex; align-items: center; gap: .8rem; width: 100%; text-align: left; background: var(--surface); border: 0; border-radius: var(--r-l); padding: .7rem .6rem .7rem .7rem; margin-top: .55rem; box-shadow: var(--shadow-s); transition: transform .12s, background .15s; }
.place:hover { background: color-mix(in srgb, var(--surface) 94%, var(--ink)); }
.thumb, .glyph { width: 60px; height: 60px; border-radius: 13px; flex: none; }
.thumb { object-fit: cover; background: var(--fill); }
.glyph { display: grid; place-items: center; color: var(--lv); background: color-mix(in srgb, var(--lv) 13%, transparent); }
.pbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .12rem; }
.ptitle { display: flex; align-items: center; gap: .35rem; }
.ptitle strong { font-weight: 650; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.savedmark { color: var(--bad); display: inline-flex; flex: none; } .savedmark svg { fill: currentColor; }
.meta { color: var(--ink-2); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptags { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-top: .2rem; }
.chev { color: var(--ink-3); flex: none; display: inline-flex; }
.strict { --lv: var(--strict); } .lacto { --lv: var(--lacto); } .vegan { --lv: var(--vegan); } .vegetarian { --lv: var(--vegetarian); } .vegan_options { --lv: var(--vegan_options); } .veg_options { --lv: var(--veg_options); } .unclear { --lv: var(--unclear); } .nearveg { --lv: var(--nearveg); }
.badge { font-size: .74rem; font-weight: 650; line-height: 1; padding: .3rem .55rem; border-radius: 999px; white-space: nowrap; color: var(--lv, var(--unclear)); background: color-mix(in srgb, var(--lv, var(--unclear)) 14%, transparent); }
.badge.big { font-size: .86rem; padding: .4rem .75rem; }
.confn { font-size: .78rem; color: var(--ink-2); white-space: nowrap; }
.tag { font-size: .72rem; font-weight: 600; line-height: 1; border-radius: 6px; padding: .26rem .4rem; color: var(--ink-2); background: var(--fill); white-space: nowrap; }
.tag.ask { color: var(--ask); background: color-mix(in srgb, var(--ask) 13%, transparent); }
.tag.warn { color: var(--bad); background: color-mix(in srgb, var(--bad) 11%, transparent); }
.tag.own { color: var(--tint); background: var(--tint-soft); } .tag.good { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); }
.empty { color: var(--ink-2); text-align: center; padding: 2.2rem 1.2rem; }
.attrib { font-size: .72rem; color: var(--ink-3); text-align: center; margin-top: 1.2rem; } .attrib a { color: inherit; text-decoration: underline; }

/* ---------- pages ---------- */
#page { overflow-y: auto; }
.pagebody { max-width: 640px; margin: 0 auto; padding: 1.2rem .9rem 2.5rem; animation: rise .25s ease both; }
.box { background: var(--surface); border-radius: var(--r-l); padding: .95rem 1rem; margin: .7rem 0; box-shadow: var(--shadow-s); }
.box > h2:first-child, .box > b:first-child { display: block; font-size: 1.06rem; font-weight: 650; letter-spacing: -.01em; margin: 0 0 .5rem; }
.box > p:last-child, .box > :last-child { margin-bottom: 0; } .box > .field:first-child { margin-top: 0; } .box p.muted { font-size: .9rem; line-height: 1.45; }
details.box > summary, .grow > summary, details.small > summary { cursor: pointer; font-weight: 600; color: var(--tint); list-style: none; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
details > summary::-webkit-details-marker { display: none; }
details.box[open] > summary { margin-bottom: .6rem; } details.small { margin: .6rem 0; } details.small > summary { font-size: .86rem; font-weight: 550; }
.note { background: var(--fill); border-radius: var(--r-s); padding: .6rem .8rem; font-size: .88rem; line-height: 1.4; }
.warnbox { background: color-mix(in srgb, var(--ask) 12%, transparent); color: var(--ink); }
.field, label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-2); margin: .9rem 0 0; }
.field > input, .field > select, .field > textarea { display: block; width: 100%; margin-top: .4rem; }
input, select, textarea { border: 0; border-radius: 12px; padding: .6rem .8rem; background: var(--fill); min-height: 44px; max-width: 100%; font-size: 1rem; font-weight: 400; color: var(--ink); transition: box-shadow .15s; }
.box input, .box select, .box textarea, .panel input, .panel select, .panel textarea { background: var(--fill); }
input:focus, select:focus, textarea:focus { outline: 0; box-shadow: 0 0 0 2px var(--tint); }
select { appearance: none; -webkit-appearance: none; padding-right: 2.2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; }
textarea { display: block; width: 100%; resize: vertical; line-height: 1.4; margin: .5rem 0; }
input[type=checkbox], input[type=radio] { min-height: 0; width: 20px; height: 20px; padding: 0; accent-color: var(--tint); box-shadow: none; }
.inline { display: flex; gap: .5rem; margin: .7rem 0; } .inline > input, .inline > select { flex: 1; min-width: 0; }
.searchbar { display: flex; align-items: center; gap: .5rem; background: var(--fill); border-radius: 12px; padding: 0 .8rem; margin: .9rem 0 0; color: var(--ink-2); }
.searchbar:focus-within { box-shadow: 0 0 0 2px var(--tint); }
.searchbar input { flex: 1; background: none !important; padding-left: 0; box-shadow: none !important; }
.qrow, .srow { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; }
.qrow + .qrow { border-top: .5px solid var(--sep); } .qrow > span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.srow { flex-wrap: wrap; gap: 0 .5rem; padding: 0 .7rem .6rem 0; margin-top: .55rem; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-s); }
.srow .place { flex: 1 1 100%; min-width: 0; margin: 0; box-shadow: none; background: none; } .srow select.day { margin-left: auto; }
.srow select.day { width: auto; flex: none; font-size: .84rem; min-height: 36px; padding: .3rem 1.9rem .3rem .7rem; background-position: right .6rem center; }
.trip .row { display: flex; align-items: center; gap: .6rem; } .trip .row .muted { margin-right: auto; font-size: .88rem; }
.trip .chip { background: var(--tint-soft); color: var(--tint); } .trip ol { margin: .6rem 0 0; padding-left: 1.4rem; color: var(--ink-2); } .trip li { padding: .12rem 0; }
.plan { display: flex; align-items: center; gap: .7rem; padding: .7rem 0; border-top: .5px solid var(--sep); } .plan b { flex: 1; font-weight: 550; } .plan > span:nth-child(2) { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.plan .primary { min-height: 34px; padding: 0 .9rem; font-size: .9rem; border-radius: 999px; }
.row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.comm { display: block; } .comm b { display: block; margin: .45rem 0 .1rem; font-weight: 650; } .comm p { margin: .15rem 0 .35rem; color: var(--ink-2); font-size: .92rem; } .comm a { font-size: .88rem; font-weight: 550; }
.back { display: inline-flex; align-items: center; gap: .1rem; margin: 0 0 .4rem -.3rem; font-weight: 550; }
.pagebody dl { display: grid; grid-template-columns: auto 1fr; gap: .25rem .9rem; margin: .6rem 0; font-size: .9rem; } .pagebody dt { color: var(--ink-2); } .pagebody dd { margin: 0; overflow-wrap: anywhere; }

/* communication card */
.vcard { background: #fff; color: #111; border-radius: var(--r-xl); padding: 1.4rem 1.4rem 1.2rem; font-size: 1.14rem; line-height: 1.6; margin: .9rem 0; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .08), 0 12px 32px rgba(0, 0, 0, .1); position: relative; overflow: hidden; }
.vcard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: linear-gradient(90deg, #1c7a53, #6fbf73); }
.vcard p { margin: .55rem 0; } .vcard .main { font-weight: 700; font-size: 1.24em; line-height: 1.45; letter-spacing: -.01em; } .vcard .extra { border-top: 1px dashed #c7c7cc; padding-top: .6rem; margin-top: .8rem; }
.vcard { cursor: zoom-in; }
/* full-screen card for staff: always white, above everything, centred when it fits and scrollable from the top when not */
.cardfull { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  background: #fff; color: #111; color-scheme: light; cursor: zoom-out;
  padding: calc(env(safe-area-inset-top) + 3.6rem) calc(env(safe-area-inset-right) + 1.4rem) calc(env(safe-area-inset-bottom) + 1.2rem) calc(env(safe-area-inset-left) + 1.4rem);
  border-top: 6px solid #1c7a53; animation: cardin .18s ease both; }
.cardfull-in { margin: auto 0; line-height: 1.5; }   /* auto margins centre it, and unlike justify-content never push text off the top */
.cardfull-in p { margin: 0 0 .7em; } .cardfull-in .main { font-weight: 700; font-size: 1.22em; line-height: 1.38; letter-spacing: -.01em; }
.cardfull-in .extra { border-top: 1px dashed #c7c7cc; padding-top: .6em; }
.cardfull-x { position: fixed; top: calc(env(safe-area-inset-top) + .8rem); right: calc(env(safe-area-inset-right) + .8rem); width: 40px; height: 40px; border: 0; border-radius: 50%;
  display: grid; place-items: center; color: #3c3c43; background: rgba(118, 118, 128, .14); cursor: pointer; }
.cardfull-hint { margin: 1rem 0 0; text-align: center; font-size: .8rem; color: #8e8e93; }
html.cardopen, html.cardopen body { overflow: hidden; }
@keyframes cardin { from { opacity: 0; } }

/* scanner */
.preview { max-width: 100%; max-height: 260px; border-radius: var(--r-l); display: block; margin: .6rem 0; box-shadow: var(--shadow-s); }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--ink-2); margin: 1rem 0 .4rem; }
.dot::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .35rem; background: var(--unclear); }
.dot.green::before, .item.green::before { background: var(--ok); } .dot.yellow::before, .item.yellow::before { background: var(--ask); } .dot.red::before, .item.red::before { background: var(--bad); }
.item { position: relative; background: var(--surface); border-radius: var(--r); padding: .7rem .9rem .7rem 1.25rem; margin: .5rem 0; box-shadow: var(--shadow-s); }
.item::before { content: ""; position: absolute; left: .5rem; top: .8rem; bottom: .8rem; width: 4px; border-radius: 2px; background: var(--unclear); }
.item b { font-weight: 650; } .item small { display: block; color: var(--ink-2); font-size: .84rem; } .item p { margin: .25rem 0 .4rem; font-size: .9rem; color: var(--ink-2); }
.item .chip { background: var(--tint-soft); color: var(--tint); min-height: 30px; font-size: .84rem; }

/* community content */
.gallery { display: flex; gap: .4rem; overflow-x: auto; margin: .5rem 0; scrollbar-width: none; } .gallery::-webkit-scrollbar { display: none; }
.gallery img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; display: block; background: var(--fill); }
.gallery.big { margin: .6rem -1.1rem; padding: 0 1.1rem; } .gallery.big img { width: 168px; height: 168px; border-radius: var(--r); }
.feed { margin: 1.6rem 0 0; } .feed h3 { margin-top: 0; }
.post { border-top: .5px solid var(--sep); padding: .75rem 0; } .post p { margin: .3rem 0; overflow-wrap: anywhere; } .post .small a { color: var(--ink-2); }
.author { font-weight: 650; color: var(--ink); }
.thumbs { display: flex; gap: .55rem; flex-wrap: wrap; margin: .6rem 0; }
.pick { position: relative; } .pick img { width: 78px; height: 78px; object-fit: cover; border-radius: 12px; display: block; }
.pick .x { position: absolute; top: -7px; right: -7px; width: 24px; height: 24px; background: var(--ink); color: var(--bg); }
.addphoto { width: 78px; height: 78px; border: 1.5px dashed var(--ink-3); border-radius: 12px; background: none; color: var(--ink-2); font-size: 1.5rem; font-weight: 300; line-height: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.addphoto small { font-size: .68rem; font-weight: 550; }
.rights { display: flex; gap: .55rem; align-items: flex-start; font-weight: 400; margin: 1rem 0 .2rem; } .rights input { flex: none; margin-top: 1px; }

/* ---------- sheets ---------- */
#sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .38); animation: fade .25s ease both; }
@keyframes fade { from { opacity: 0; } }
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
.panel { position: relative; background: var(--bg); width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; border-radius: var(--r-xl) var(--r-xl) 0 0; padding: .5rem 1.1rem max(1.4rem, env(safe-area-inset-bottom)); box-shadow: var(--shadow); animation: sheet .34s cubic-bezier(.32, .72, 0, 1) both; }
.panel > .grab { margin-bottom: .9rem; }
.panel h2 { font-size: 1.55rem; letter-spacing: -.02em; margin: .2rem 2.4rem .15rem 0; }
.close { position: absolute; top: 1.1rem; right: 1rem; border: 0; background: var(--fill); color: var(--ink-2); border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; z-index: 2; }
.hero { display: block; width: calc(100% + 2.2rem); margin: -.1rem -1.1rem 1rem; aspect-ratio: 16 / 9; object-fit: cover; background: var(--fill); }
.detail:has(.hero) { margin-top: -1.9rem; } .panel:has(.hero) > .grab { position: relative; z-index: 2; background: rgba(255, 255, 255, .8); } .panel:has(.hero) > .close { background: rgba(30, 30, 30, .5); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.panel:has(.hero) { padding-top: .5rem; } .hero { border-radius: var(--r-xl) var(--r-xl) 0 0; }
.detail .ptags { margin: .7rem 0 .2rem; }
.callout { border-radius: var(--r); padding: .7rem .9rem; margin: .7rem 0; font-size: .94rem; line-height: 1.4; background: var(--fill); }
.callout.ok { background: color-mix(in srgb, var(--ok) 11%, transparent); color: var(--ok); font-weight: 600; }
.callout.ask { background: color-mix(in srgb, var(--ask) 12%, transparent); color: var(--ask); font-weight: 600; }
.callout.no { background: color-mix(in srgb, var(--bad) 10%, transparent); color: var(--bad); font-weight: 600; }
.callout.info { color: var(--ink-2); } .callout.info b { color: var(--ink); }
ul.callout { list-style: none; padding-left: .9rem; font-weight: 500 !important; } ul.callout li + li { margin-top: .3rem; }
.descr { font-size: 1rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: .5rem; margin: .5rem 0 1rem; }
.tile { flex-direction: column; gap: .25rem; background: var(--surface); color: var(--tint); border-radius: var(--r); padding: .65rem .3rem .55rem; font-size: .76rem; font-weight: 600; box-shadow: var(--shadow-s); min-width: 0; }
.tile span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tile.on { color: var(--bad); } .tile.on svg { fill: currentColor; }
.group { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-s); margin: .7rem 0; overflow: hidden; }
.irow { display: flex; gap: 1rem; justify-content: space-between; padding: .7rem .95rem; font-size: .94rem; }
.irow + .irow, .irow + .grow, .grow:not(:first-child) { border-top: .5px solid var(--sep); }
.irow .k { color: var(--ink-2); flex: none; } .irow .v { text-align: right; overflow-wrap: anywhere; min-width: 0; }
.grow { padding: .7rem .95rem; font-size: .92rem; } .grow > summary { font-size: .94rem; } .grow[open] > summary .ic { transform: rotate(180deg); }
.grow ul { margin: .6rem 0 .3rem; padding-left: 1.15rem; } .grow li { padding: .1rem 0; } .grow p { margin: .35rem 0 0; font-size: .84rem; }
.onb { text-align: center; padding-top: .4rem; } .onb .logo { display: flex; justify-content: center; margin: .3rem 0 .9rem; } .onb h2 { margin: 0 0 .2rem; } .onb .label, .onb .field { text-align: left; }
.diets { display: grid; margin: 0; background: var(--surface); border-radius: var(--r-l); overflow: hidden; box-shadow: var(--shadow-s); text-align: left; }
.diet { display: flex; gap: .7rem; align-items: center; padding: .7rem .95rem; margin: 0; color: var(--ink); cursor: pointer; font-size: 1rem; font-weight: 400; transition: background .15s; }
.diet + .diet { border-top: .5px solid var(--sep); } .diet:hover { background: var(--fill); }
.diet input { position: absolute; opacity: 0; pointer-events: none; } .diet > span:nth-child(2) { flex: 1; min-width: 0; }
.diet b { font-weight: 600; display: block; } .diet small { display: block; color: var(--ink-2); font-size: .82rem; margin-top: 1px; }
.diet .check { color: var(--tint); opacity: 0; transform: scale(.6); transition: opacity .15s, transform .2s; } .diet:has(input:checked) .check { opacity: 1; transform: none; }
.diet:has(input:focus-visible) { outline: 2px solid var(--tint); outline-offset: -2px; }

#toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 16px) scale(.96); background: rgba(40, 40, 42, .92); color: #fff; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); padding: .65rem 1.1rem; border-radius: 999px; font-size: .9rem; font-weight: 550;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .3s cubic-bezier(.32, .72, 0, 1); z-index: 200; max-width: min(90vw, 460px); text-align: center; box-shadow: var(--shadow); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#offlineBar { display: none; position: fixed; top: max(6px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); margin: 0; background: var(--ask); color: #fff; font-size: .72rem; font-weight: 600; padding: .15rem .7rem; border-radius: 999px; z-index: 300; }
body.offline #offlineBar { display: block; }

/* ---------- wide screens ---------- */
@media (min-width: 900px) {
  #side { position: relative; inset: auto; transform: none; width: 272px; flex: none; z-index: 7; transition: margin-left .3s cubic-bezier(.32, .72, 0, 1); padding-top: .6rem; }
  body.side-off #side { margin-left: -273px; }
  body.side-open #side { box-shadow: none; }
  #scrim { display: none; }
  body:not(.side-off) #top .brand, body:not(.side-off) #sideBtn { display: none; }
  #top { padding: .55rem 1rem; }
  main { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr); }
  #chat, #page, #results { grid-column: 1; grid-row: 1; min-height: 0; min-width: 0; }
  #chat { width: 100%; max-width: 820px; margin: 0 auto; overflow: hidden; }
  #msgs { padding: 1.4rem 1.2rem .5rem; } #dock { margin: .5rem 1.2rem 1.1rem; }
  body[data-route="map"] #chat { display: none; }
  body[data-route="map"] #results { position: relative; animation: fade .25s ease both; }
  #resultHead { top: 14px; left: 14px; right: auto; }
  #carousel { bottom: 34px; }
  #sheet { align-items: center; padding: 2rem; } .panel { border-radius: var(--r-xl); max-height: min(86dvh, 860px); padding-bottom: 1.4rem; } .panel > .grab { visibility: hidden; margin-bottom: .2rem; }
  .pagebody { padding: 1.6rem 1.4rem 3rem; }
  #toast { bottom: 36px; }
}
@media print {
  #top, #side, #scrim, #results, #chat, .actions, #toast { display: none !important; }
  #app, #col, main, #page { display: block; height: auto; overflow: visible; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
.cardsblock .attrib.mini { margin: .1rem .25rem 0; text-align: left; font-size: .72rem; }
.wideseg { display: inline-flex; margin: 0 0 .4rem; } .wideseg button { min-width: 96px; }
.label .cnt { color: var(--ink-3); font-weight: 500; }
/* ---------- photo library, viewer, editor, drafts ---------- */
.sitem .sidecount { color: var(--ink-3); font-size: .82rem; font-variant-numeric: tabular-nums; }
.badge.count { background: var(--tint); color: var(--on-tint); border-radius: 999px; min-width: 20px; height: 20px; padding: 0 6px; font-size: .74rem; font-weight: 700; display: inline-grid; place-items: center; }
.libadd .actions { margin: .5rem 0 0; }
.libfilter { margin: 1rem 0 .4rem; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; } .libfilter::-webkit-scrollbar { display: none; }
.chip .cnt { opacity: .6; font-weight: 500; }
.libgroupbar { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: .6rem 0 .2rem; } .libgroupbar b { font-size: 1.1rem; }
.masonry { columns: 2; column-gap: .6rem; margin-top: .7rem; }
@media (min-width: 900px) { .pagebody .masonry { columns: 3; } }
.mtile { position: relative; display: block; width: 100%; break-inside: avoid; margin: 0 0 .6rem; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: var(--fill); box-shadow: var(--shadow-s); transition: transform .12s; }
.mtile:active { transform: scale(.98); }
.mtile img { display: block; width: 100%; height: auto; }
.mtile .mcap { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem .6rem .45rem; font-size: .76rem; font-weight: 600; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.55)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtile.on { box-shadow: 0 0 0 3px var(--tint); } .mtile .mcheck { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--tint); color: var(--on-tint); display: grid; place-items: center; }
.pickgrid { max-height: 60dvh; overflow-y: auto; }
.emptylib { text-align: center; color: var(--ink-2); padding: 2.4rem 1rem; } .emptylib .ei { display: inline-grid; place-items: center; width: 68px; height: 68px; border-radius: 20px; background: var(--fill); color: var(--ink-3); margin-bottom: .6rem; }
.emptylib .btn { margin-top: .4rem; }
.viewer { position: fixed; inset: 0; z-index: 60; background: #000; color: #fff; display: flex; flex-direction: column; animation: fade .2s ease both; }
@keyframes fade { from { opacity: 0; } }
.vtop { display: flex; align-items: center; gap: .6rem; padding: max(.6rem, env(safe-area-inset-top)) .8rem .6rem; }
.vclose { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; flex: none; }
.vcap { display: flex; flex-direction: column; min-width: 0; } .vcap b { font-size: .98rem; } .vcap span { font-size: .78rem; opacity: .65; }
.vstage { flex: 1; min-height: 0; overflow: hidden; display: grid; place-items: center; touch-action: pan-y; }
.vstage .vimg { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; user-select: none; -webkit-user-drag: none; }
.vstage.zoom { overflow: auto; display: block; touch-action: auto; } .vstage.zoom .vimg { max-width: none; max-height: none; width: 250%; cursor: zoom-out; }
.vnav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; }
.vnav.l { left: 12px; } .vnav.r { right: 12px; }
@media (hover: none) { .vnav { display: none; } }
.vbar { display: flex; justify-content: center; gap: .3rem; padding: .5rem .6rem max(.8rem, env(safe-area-inset-bottom)); }
.vact { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 72px; padding: .45rem .5rem; border: 0; border-radius: 12px; background: none; color: #fff; font-size: .74rem; }
.vact:hover { background: rgba(255,255,255,.1); } .vact.danger { color: #ff6961; }
.estage { flex: 1; min-height: 0; display: grid; place-items: center; padding: .4rem 1rem; }
.ewrap { position: relative; touch-action: none; } .ecanvas { display: block; }
.erect { position: absolute; box-shadow: 0 0 0 9999px rgba(0,0,0,.55); outline: 1.5px solid #fff; cursor: move; touch-action: none;
  background-image: linear-gradient(rgba(255,255,255,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px); background-size: 33.34% 33.34%; background-position: -1px -1px; }
.eh { position: absolute; right: 3px; bottom: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); cursor: nwse-resize; }
.ewrap { overflow: hidden; }
.ebar { padding: .4rem .9rem max(.9rem, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: .55rem; }
.erow { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.editor .seg { background: rgba(255,255,255,.14); } .editor .seg button { color: #fff; } .editor .seg button.on { background: rgba(255,255,255,.9); color: #000; }
.editor .btn.plain { background: rgba(255,255,255,.14); color: #fff; }
.draft { display: flex; align-items: center; gap: .5rem; } .draft .place { flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.draftbar { display: flex; align-items: center; gap: .8rem; margin: .4rem 0 .6rem; flex-wrap: wrap; }
@media (max-width: 899px) { #map .maplibregl-ctrl-top-right { display: none; } }

/* clean-and-tidy rating (stays) */
.rating { display: flex; align-items: center; gap: .1rem; }
.rating .star { border: 0; background: none; padding: .2rem; color: var(--ink-3); cursor: pointer; transition: transform .12s; }
.rating .star:active { transform: scale(.88); }
.rating .star.on { color: #f2b01e; }
.rating .star.on svg { fill: currentColor; }
.rating .rword { margin-left: .5rem; font-size: .88rem; color: var(--ink-2); }
.tag.clean { color: #9a6a00; background: color-mix(in srgb, #f2b01e 16%, transparent); }
.tag.clean svg { fill: currentColor; vertical-align: -1px; }

/* place page as a homepage: photo carousel, highlights, category feature blocks */
.hero { position: relative; display: block; width: calc(100% + 2.2rem); margin: -.1rem -1.1rem 1rem; aspect-ratio: 16 / 10; background: var(--fill); border-radius: var(--r-xl) var(--r-xl) 0 0; overflow: hidden; }
.herostrip { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.herostrip::-webkit-scrollbar { display: none; }
.herostrip img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.herocount { position: absolute; right: .8rem; bottom: .8rem; font-size: .75rem; font-weight: 600; color: #fff; background: rgba(0, 0, 0, .45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: .25rem .6rem; border-radius: 999px; }
.cover { position: relative; display: grid; place-items: center; width: calc(100% + 2.2rem); margin: -.1rem -1.1rem 1rem; aspect-ratio: 16 / 7; border-radius: var(--r-xl) var(--r-xl) 0 0; color: var(--lv); background: color-mix(in srgb, var(--lv) 13%, var(--surface)); }
.detail:has(.cover) { margin-top: -1.9rem; } .panel:has(.cover) { padding-top: .5rem; } .panel:has(.cover) > .grab { position: relative; z-index: 2; }
.coverglyph { opacity: .9; }
.coverbtn { position: absolute; right: .8rem; bottom: .8rem; display: inline-flex; align-items: center; gap: .35rem; border: 0; border-radius: 999px; padding: .45rem .8rem; font-size: .8rem; font-weight: 600; color: var(--ink); background: var(--surface); box-shadow: var(--shadow-s); cursor: pointer; }
.hl { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin: .7rem 0 .2rem; }
.hlitem { display: inline-flex; align-items: center; gap: .3rem; font-size: .9rem; color: var(--ink-2); }
.hlitem .ic { color: var(--tint); }
.tagline { margin: .9rem 0; padding-left: .85rem; border-left: 3px solid var(--tint-soft); font-size: 1rem; line-height: 1.55; color: var(--ink); }
.feature { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-s); padding: .95rem 1rem; margin: .7rem 0; }
.feature h3 { margin: 0 0 .65rem; font-size: .95rem; }
.dishes { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .5rem; }
.dish { display: flex; flex-direction: column; justify-content: space-between; gap: .5rem; min-height: 86px; padding: .75rem .7rem; border-radius: var(--r); }
.dish.d0 { background: color-mix(in srgb, #e3a12f 17%, transparent); } .dish.d1 { background: color-mix(in srgb, var(--vegan) 14%, transparent); } .dish.d2 { background: color-mix(in srgb, #d8673a 14%, transparent); }
.dish b { font-size: .92rem; line-height: 1.3; } .dglyph { color: var(--tint); }
.featrow + .featrow, .dishes + .featrow { margin-top: .9rem; }
.feattags { display: flex; flex-wrap: wrap; gap: .4rem; }
.feattag { font-size: .85rem; font-weight: 600; padding: .35rem .75rem; border-radius: 999px; color: var(--tint); background: var(--tint-soft); }
.spot { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; font-size: .92rem; } .spot + .spot { border-top: .5px solid var(--sep); }
.spot .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .spot .muted { font-size: .82rem; }
.sdotv { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--vegan); }
.cleanbox { display: flex; align-items: center; gap: 1rem; }
.cleanbig b { font-size: 2.1rem; font-weight: 700; letter-spacing: -.02em; } .cleanbig span { margin-left: .15rem; color: var(--ink-2); }
.cleanstars { display: flex; gap: .1rem; color: var(--ink-3); } .cleanstars .on { color: #f2b01e; } .cleanstars .on svg { fill: currentColor; }
.cleanbox p { margin: .25rem 0 0; }
.invite { display: flex; align-items: center; gap: .8rem; width: 100%; margin: .7rem 0; padding: .85rem 1rem; text-align: left; color: var(--tint); background: none; border: 1.5px dashed color-mix(in srgb, var(--tint) 35%, transparent); border-radius: var(--r-l); cursor: pointer; }
.invite span { display: flex; flex-direction: column; gap: .15rem; } .invite b { font-size: .95rem; } .invite small { font-size: .82rem; color: var(--ink-2); }
.attrs-edit .attrrow { margin: .65rem 0; }
.attrk { display: block; margin-bottom: .35rem; font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.dishin { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }

/* voice input: mic replaces send while the box is empty; hold to talk */
#micBtn[hidden] { display: none !important; }
#composer #micBtn { width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center; flex: none; background: var(--fill); color: var(--ink-2); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .15s, background .15s, color .15s; }
#composer.voice #sendBtn { display: none; }
#composer:not(.voice) #micBtn { display: none; }
#composer #micBtn.rec { background: var(--tint); color: var(--on-tint); transform: scale(1.18); }
body.recording { user-select: none; -webkit-user-select: none; }
#voice { position: absolute; left: 0; right: 0; bottom: calc(100% + 10px); z-index: 9; display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 1rem 1.1rem .85rem; border-radius: 20px; background: var(--raised); box-shadow: 0 10px 34px rgba(0, 0, 0, .16), 0 0 0 .5px var(--sep); animation: pop .16s ease both; text-align: center; pointer-events: none; }
#voice .vbars { display: flex; align-items: center; gap: 4px; height: 26px; }
#voice .vbars i { width: 4px; height: 100%; border-radius: 2px; background: var(--tint); animation: vbar .9s ease-in-out infinite; }
#voice .vbars i:nth-child(2) { animation-delay: .12s; } #voice .vbars i:nth-child(3) { animation-delay: .24s; } #voice .vbars i:nth-child(4) { animation-delay: .36s; } #voice .vbars i:nth-child(5) { animation-delay: .48s; }
@keyframes vbar { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
#voice .vtext { margin: 0; max-height: 6.5em; overflow: hidden; font-size: 1rem; line-height: 1.4; color: var(--ink); }
#voice .vhint { margin: 0; font-size: .8rem; color: var(--ink-2); }
#voice.cancel { background: color-mix(in srgb, var(--bad) 10%, var(--raised)); }
#voice.cancel .vbars i { background: var(--bad); animation-play-state: paused; }
#voice.cancel .vhint { color: var(--bad); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { #voice .vbars i { animation: none; transform: scaleY(.6); } }

/* duotone icon tiles in the sidebar */
:root { --hue-green: #2f8a57; --hue-brown: #a0612f; --hue-olive: #6f8a1e; --hue-teal: #1f8a8a; --hue-blue: #2f6db5; --hue-pink: #c2457e;
  --hue-amber: #c27a12; --hue-violet: #7a55c7; --hue-red: #d0443e; --hue-gray: #6e6e76; --hue-indigo: #4a55c2; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) { --hue-green: #5fcf8f; --hue-brown: #d99a66; --hue-olive: #b5cf55; --hue-teal: #5cc8c8; --hue-blue: #7aaef0;
  --hue-pink: #f07fb2; --hue-amber: #f2b552; --hue-violet: #b49af0; --hue-red: #f27a74; --hue-gray: #a8a8b0; --hue-indigo: #959df0; }
}
html[data-theme="dark"] { --hue-green: #5fcf8f; --hue-brown: #d99a66; --hue-olive: #b5cf55; --hue-teal: #5cc8c8; --hue-blue: #7aaef0;
--hue-pink: #f07fb2; --hue-amber: #f2b552; --hue-violet: #b49af0; --hue-red: #f27a74; --hue-gray: #a8a8b0; --hue-indigo: #959df0; }
.sic { --c: var(--hue-gray); flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, transparent); box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--c) 22%, transparent); }
.sic .ic svg { display: block; }
.h-green { --c: var(--hue-green); } .h-brown { --c: var(--hue-brown); } .h-olive { --c: var(--hue-olive); } .h-teal { --c: var(--hue-teal); }
.h-blue { --c: var(--hue-blue); } .h-pink { --c: var(--hue-pink); } .h-amber { --c: var(--hue-amber); } .h-violet { --c: var(--hue-violet); }
.h-red { --c: var(--hue-red); } .h-gray { --c: var(--hue-gray); } .h-indigo { --c: var(--hue-indigo); }
.sitem:hover .sic, .sitem.on .sic { background: color-mix(in srgb, var(--c) 20%, transparent); }

/* top bar: sidebar toggle and clear chat */
.topbtn { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 12px; cursor: pointer;
  color: var(--tint); background: color-mix(in srgb, var(--tint) 11%, transparent); box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--tint) 22%, transparent);
  transition: background .15s, transform .12s; }
.topbtn:hover { background: color-mix(in srgb, var(--tint) 18%, transparent); }
.topbtn:active, .clearbtn:active { transform: scale(.94); }
.clearbtn { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 12px; cursor: pointer;
  color: var(--ink-2); background: var(--fill); box-shadow: inset 0 0 0 .5px var(--sep); transition: background .18s, color .18s, transform .12s; }
.clearbtn:hover { color: var(--ink); background: var(--fill-2); }
.clearbtn.confirm { color: #fff; background: var(--bad); box-shadow: none; }
.sitem .sic .ic, .sitem.on .sic .ic { color: inherit; }
.sitem { gap: .7rem; } .sitem.two { min-height: 46px; }

/* wordmark: light and dark artwork follow the chosen appearance */
.wordmark .wm-dark { display: none; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .wordmark .wm-light { display: none; } html:not([data-theme="light"]) .wordmark .wm-dark { display: block; } }
html[data-theme="dark"] .wordmark .wm-light { display: none; } html[data-theme="dark"] .wordmark .wm-dark { display: block; }
.field > .seg { margin-top: .4rem; } .field > .seg button { flex: 1; }
.codeform .codein { font-size: 1.6rem; font-weight: 600; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; padding: .6rem .5rem; }
.codeform .primary.wide { margin-top: .8rem; }
/* segmented control: iOS dark uses a lighter grey thumb so the choice stays visible */
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .seg button.on { background: #636366; } }
html[data-theme="dark"] .seg button.on { background: #636366; }

/* "Been here?" feedback: kind of kitchen + tags */
.fbbox .label { margin: .9rem 0 .45rem; }
.fbbox .chips { flex-wrap: wrap; }
.chip.good.on { background: var(--ok); color: #fff; } .chip.bad.on { background: var(--bad); color: #fff; }
.chip.dis { opacity: .38; }
.fbdef { margin: .45rem 0 0; }
.fbsend { margin-top: .9rem; }
.vtags { display: flex; flex-wrap: wrap; gap: .35rem; margin: .55rem 0 .1rem; }
.tag.warn { color: var(--ask); background: color-mix(in srgb, var(--ask) 13%, transparent); }
.cardhint { display: flex; align-items: center; justify-content: flex-start; gap: .7rem; width: 100%; margin: .7rem 0; padding: .75rem .9rem; text-align: left; border-radius: var(--r); }
.cardhint span { display: flex; flex-direction: column; gap: .1rem; } .cardhint small { font-weight: 450; font-size: .8rem; color: var(--ink-2); line-height: 1.35; }
