/* Layout: the map fills the screen. Phone: a draggable bottom sheet (peek / half / full) holds the answer and the list.
   Wide screens: the sheet becomes a floating panel on the left. A graphite top bar carries the sloth logo («בטוח? פתוח!») on a light tile. */
:root {
  --bg: #eef1f4;
  --surface: #ffffff;
  --surface-2: #f5f7f9;
  --ink: #10171c;
  --muted: #5d6a73;
  --line: #e2e7eb;
  --brand: #0a78b0;
  --brand-ink: #ffffff;
  --header: #0e141a;
  --header-ink: #e8f6fc;
  --glow: #3cc4f2;
  --open: #12955a;
  --open-bg: #e2f5ea;
  --soon: #b46a00;
  --soon-bg: #fff0d4;
  --closed: #b0453c;
  --closed-bg: #f8e5e2;
  --unknown: #6b7780;
  --unknown-bg: #edf0f2;
  --food: #12955a;
  --bakery: #c07a1c;
  --pharmacy: #d1435b;
  --fuel: #3a6fd8;
  --shadow: 0 8px 28px rgb(10 20 30 / 0.16);
  --font: "Rubik", "Segoe UI", "Arial Hebrew", system-ui, sans-serif;
  --sheet-peek: 210px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1014; --surface: #121a20; --surface-2: #18222a; --ink: #e7eef2; --muted: #95a4ad; --line: #22303a;
    --brand: #3cc4f2; --brand-ink: #04141d; --header: #0a0f13; --header-ink: #e8f6fc;
    --open: #47d38a; --open-bg: #12301f; --soon: #f0b44c; --soon-bg: #382a0e;
    --closed: #ef8a80; --closed-bg: #381c19; --unknown: #a0adb5; --unknown-bg: #1e2830;
    --food: #47d38a; --bakery: #e8a54a; --pharmacy: #f07b8e; --fuel: #78a3ff;
    --shadow: 0 8px 28px rgb(0 0 0 / 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1014; --surface: #121a20; --surface-2: #18222a; --ink: #e7eef2; --muted: #95a4ad; --line: #22303a;
  --brand: #3cc4f2; --brand-ink: #04141d; --header: #0a0f13; --header-ink: #e8f6fc;
  --open: #47d38a; --open-bg: #12301f; --soon: #f0b44c; --soon-bg: #382a0e;
  --closed: #ef8a80; --closed-bg: #381c19; --unknown: #a0adb5; --unknown-bg: #1e2830;
  --food: #47d38a; --bakery: #e8a54a; --pharmacy: #f07b8e; --fuel: #78a3ff;
  --shadow: 0 8px 28px rgb(0 0 0 / 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden; background: var(--bg); color: var(--ink);
  font: 15px/1.4 var(--font); -webkit-text-size-adjust: 100%;
}
[hidden] { display: none !important; }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

#map { position: fixed; inset: 0; background: var(--bg); z-index: 0; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; z-index: 1000; top: calc(8px + env(safe-area-inset-top, 0px));
  left: max(10px, env(safe-area-inset-left, 0px)); right: max(10px, env(safe-area-inset-right, 0px));
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 8px 6px 10px; border-radius: 16px;
  background: color-mix(in srgb, var(--header) 92%, transparent); color: var(--header-ink);
  box-shadow: var(--shadow); border: 1px solid rgb(60 196 242 / 0.22);
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wordmark {
  flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 9px; border-radius: 10px;
  font-weight: 800; font-size: 1.05rem; letter-spacing: 0.01em; color: var(--glow);
  background: rgb(60 196 242 / 0.1); border: 1px solid rgb(60 196 242 / 0.35); white-space: nowrap;
}
.wordmark .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 0 3px rgb(60 196 242 / 0.25), 0 0 10px var(--glow); }
@media (max-width: 420px) { .wordmark { font-size: 0.92rem; padding: 4px 8px; } .appname { font-size: 0.95rem; } .langs button { padding: 4px 7px; } }
.appname { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.langs { display: flex; gap: 2px; background: rgb(255 255 255 / 0.08); border-radius: 999px; padding: 3px; flex: none; }
.langs button { border: 0; background: transparent; color: inherit; padding: 4px 9px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; cursor: pointer; }
.langs button[aria-pressed="true"] { background: var(--glow); color: #04141d; }

/* ---------- locate button ---------- */
.mapctl { display: flex; flex-direction: column; gap: 10px; position: fixed; z-index: 900; right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(var(--sheet-peek) + 14px); transition: bottom 0.25s ease; }
[dir="rtl"] .mapctl { right: auto; left: max(12px, env(safe-area-inset-left, 0px)); }
.fab {
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--surface); color: var(--brand); box-shadow: var(--shadow);
  display: grid; place-items: center;
}
.fab svg { width: 24px; height: 24px; }
.fab[aria-busy="true"] svg { animation: pulse 1s infinite ease-in-out; }
.fab.on { background: var(--brand); color: var(--brand-ink); }
@keyframes pulse { 50% { opacity: 0.35; } }

/* ---------- sheet ---------- */
.sheet {
  position: fixed; z-index: 950; left: 0; right: 0; bottom: 0;
  height: calc(100% - 64px - env(safe-area-inset-top, 0px));
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: 0 -6px 30px rgb(10 20 30 / 0.18);
  transform: translateY(var(--sheet-offset, 50%)); transition: transform 0.28s cubic-bezier(.2,.8,.2,1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.sheet.dragging { transition: none; }
.grab { flex: none; border: 0; background: transparent; padding: 10px 0 4px; cursor: grab; touch-action: none; display: grid; place-items: center; }
.grab span { width: 44px; height: 5px; border-radius: 3px; background: var(--line); }
.hero {
  flex: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  padding: 2px max(18px, env(safe-area-inset-right, 0px)) 10px max(18px, env(safe-area-inset-left, 0px));
  touch-action: none;
}
.hero-main { min-width: 0; flex: 1; }
.sheet, .scroller, .list { min-width: 0; max-width: 100%; }
.meta > span:not(.pill):not(.tag) { min-width: 0; overflow-wrap: anywhere; }
.kicker { margin: 0; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.bignum { margin: 0; line-height: 1; display: flex; align-items: baseline; gap: 8px; }
#openCount { font-size: 2.6rem; font-weight: 800; color: var(--open); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.bigunit { font-size: 1.05rem; font-weight: 600; }
.where { margin: 4px 0 0; color: var(--muted); font-size: 0.85rem; }
#city {
  flex: none; max-width: 46%; min-height: 40px; padding: 0 10px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2); font-size: 0.88rem;
}

.chips {
  flex: none; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding: 0 max(18px, env(safe-area-inset-right, 0px)) 10px max(18px, env(safe-area-inset-left, 0px));
}
.chips::-webkit-scrollbar { display: none; }
/* On touch screens the chip row scrolls; fade the far edge so it's clear there is more. */
@media (max-width: 859px) { .chips { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  [dir="rtl"] .chips { -webkit-mask-image: linear-gradient(270deg, #000 85%, transparent); mask-image: linear-gradient(270deg, #000 85%, transparent); } }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 6px 12px 6px 8px; cursor: pointer; font-weight: 500; font-size: 0.88rem;
}
.chip .n { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chip[aria-pressed="true"] .n { color: inherit; opacity: 0.75; }
.chip .ico { width: 22px; height: 22px; }

.routebox {
  flex: none; display: flex; align-items: center; gap: 10px; margin: 0 max(14px, env(safe-area-inset-right, 0px)) 10px max(14px, env(safe-area-inset-left, 0px));
  padding: 10px 10px 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent);
}
.route-main { flex: 1; min-width: 0; }
.route-title { margin: 0; font-weight: 700; font-size: 1rem; }
.route-sub { margin: 2px 0 0; font-size: 0.82rem; color: var(--muted); }
.shadebtn { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 0.82rem; cursor: pointer; }
.shadebtn[aria-pressed="true"] { background: #f2b33d; color: #2a1c00; border-color: #f2b33d; }
.xbtn { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--surface); font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--muted); }
.actions button.walk { padding: 9px 14px; border-radius: 10px; font-weight: 700; font-size: 0.88rem; border: 0; background: var(--brand); color: var(--brand-ink); cursor: pointer; }
.ring-label { font: 700 11px/1 var(--font); color: #1f6fd6; background: rgb(255 255 255 / 0.85); padding: 2px 5px; border-radius: 6px; border: 0; box-shadow: none; }
.addbox {
  flex: none; display: flex; flex-direction: column; gap: 8px; margin: 0 max(14px, env(safe-area-inset-right, 0px)) 10px max(14px, env(safe-area-inset-left, 0px));
  padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--brand);
}
.addbox p { margin: 0; }
.add-title { font-weight: 700; }
.add-hint, .add-note { font-size: 0.82rem; color: var(--muted); }
#addFields { display: flex; flex-direction: column; gap: 8px; }
#addFields[hidden] { display: none !important; }
.addbox input, .addbox select { width: 100%; min-height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.add-hours { display: flex; flex-wrap: wrap; gap: 6px; }
.add-hours button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 0.85rem; cursor: pointer; }
.add-hours button[aria-checked="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.add-actions { display: flex; gap: 8px; }
.addcta { display: block; width: 100%; margin: 14px 0 0; padding: 12px; border-radius: 12px; border: 1px dashed var(--brand); background: transparent; color: var(--brand); font-weight: 700; cursor: pointer; }
.tag.user { color: var(--soon); border-color: color-mix(in srgb, var(--soon) 40%, transparent); }
.add-pin { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 0 0 6px rgb(10 120 176 / 0.25); }
#notices { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 0 18px 8px; }
#notices:empty { display: none; }
.notice { margin: 0; padding: 7px 12px; border-radius: 10px; font-size: 0.84rem; background: var(--soon-bg); }
.notice.info { background: var(--surface-2); }
.notice.err { background: var(--closed-bg); }

.scroller {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 2px max(12px, env(safe-area-inset-right, 0px)) 20px max(12px, env(safe-area-inset-left, 0px));
  border-top: 1px solid var(--line);
}

/* ---------- shop rows ---------- */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.shop {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 2px 12px; align-items: start;
  padding: 12px 6px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 12px;
}
.shop:hover { background: var(--surface-2); }
.shop.sel { background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--brand); }
.ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; grid-row: span 2;
  background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c);
}
.ico svg { width: 60%; height: 60%; }
.chip .ico { border-radius: 50%; grid-row: auto; }
.c-food { --c: var(--food); } .c-bakery { --c: var(--bakery); } .c-pharmacy { --c: var(--pharmacy); } .c-fuel { --c: var(--fuel); } .c-atm { --c: #8b5cf6; } .c-eat { --c: #e8673a; } .c-all { --c: var(--brand); }
.shop .name { font-weight: 600; font-size: 1rem; min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
.shop .dist { text-align: end; font-variant-numeric: tabular-nums; font-size: 0.85rem; color: var(--muted); white-space: nowrap; line-height: 1.3; }
.shop .dist b { display: block; color: var(--ink); font-weight: 600; font-size: 0.92rem; }
.shop .meta { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 0.84rem; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-weight: 600; font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.open, .pill.open24 { background: var(--open-bg); color: var(--open); }
.pill.soon { background: var(--soon-bg); color: var(--soon); }
.pill.closed { background: var(--closed-bg); color: var(--closed); }
.pill.unknown { background: var(--unknown-bg); color: var(--unknown); }
.tag { font-size: 0.74rem; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.tag.shab { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.more { grid-column: 1 / -1; display: none; flex-direction: column; gap: 10px; padding: 10px 2px 2px; }
.shop.sel .more { display: flex; }
.week { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; font-size: 0.86rem; font-variant-numeric: tabular-nums; margin: 0; }
.week dt { color: var(--muted); }
.week dd { margin: 0; }
.week .today { font-weight: 700; color: var(--ink); }
.raw { font-size: 0.76rem; color: var(--muted); overflow-wrap: anywhere; margin: 0; direction: ltr; text-align: start; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions a { text-decoration: none; padding: 9px 14px; border-radius: 10px; font-weight: 600; font-size: 0.88rem; border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.actions a.go { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }

.fold { margin-top: 10px; }
.fold summary { cursor: pointer; color: var(--muted); font-weight: 600; padding: 10px 6px; list-style-position: inside; }
.foldnote { margin: 0 6px 6px; font-size: 0.8rem; color: var(--muted); }
#closedBox .shop { opacity: 0.72; }
.empty { padding: 22px 12px; text-align: center; color: var(--muted); }
.empty button { margin-top: 10px; }
.ghost { border: 1px solid var(--brand); color: var(--brand); background: transparent; border-radius: 10px; padding: 8px 14px; font-weight: 600; cursor: pointer; }
.source { font-size: 0.75rem; color: var(--muted); margin: 14px 6px 0; }
.source a { color: inherit; }
.madeby { margin: 6px 6px 0; font-size: 0.78rem; color: var(--muted); letter-spacing: 0.02em; }
.madeby b { color: var(--glow); font-weight: 700; }
.skeleton { height: 64px; margin: 8px 0; border-radius: 12px; background: linear-gradient(90deg, var(--line), var(--surface-2), var(--line)); background-size: 200% 100%; animation: sh 1.2s infinite linear; }
@keyframes sh { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton, .fab[aria-busy="true"] svg { animation: none; } .sheet { transition: none; } }

/* map markers */
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #2a7fff; border: 3px solid #fff; box-shadow: 0 0 0 7px rgb(42 127 255 / 0.22); }
.pin { width: 30px; height: 30px; margin: 2px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 2px 6px rgb(0 0 0 / 0.3); background: var(--pc); cursor: pointer; }
.pin svg { width: 16px; height: 16px; transform: rotate(45deg); color: #fff; }
.pin.sel { outline: 3px solid var(--brand); outline-offset: 1px; }

/* ---------- wide screens: floating side panel ---------- */
@media (min-width: 860px) {
  .sheet {
    left: max(12px, env(safe-area-inset-left, 0px)); right: auto; bottom: 12px; top: calc(76px + env(safe-area-inset-top, 0px));
    width: 410px; height: auto; border-radius: 20px; transform: none !important; box-shadow: var(--shadow);
  }
  [dir="rtl"] .sheet { left: auto; right: max(12px, env(safe-area-inset-right, 0px)); }
  .grab { display: none; }
  .hero { padding-top: 16px; }
  .chips { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .mapctl { bottom: 28px; }
  .topbar { right: auto; width: 410px; }
  [dir="rtl"] .topbar { left: auto; right: max(10px, env(safe-area-inset-right, 0px)); }
}

/* parking */
.fab.park { font: 800 1.25rem/1 var(--font); color: #2563eb; }
.fab.park[aria-pressed="true"] { background: #2563eb; color: #fff; }
.p-pin { width: 22px; height: 22px; border-radius: 6px; background: #2563eb; color: #fff; display: grid; place-items: center; font: 800 13px/1 var(--font); border: 2px solid #fff; box-shadow: 0 1px 4px rgb(0 0 0 / 0.3); }
.p-pin.near { outline: 3px solid #f2b33d; }
.parkline { display: flex; align-items: center; gap: 8px; font-size: 0.86rem; }
.parkline button { border: 0; background: none; color: #2563eb; font-weight: 700; cursor: pointer; padding: 0; text-decoration: underline; }
.parkline .pbadge { width: 20px; height: 20px; border-radius: 5px; background: #2563eb; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 12px; }

/* "it's open" check-ins */
.ci-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 0.86rem; color: var(--muted); }
.ci-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 0.85rem; cursor: pointer; }
.ci-btn.ok { color: var(--open); border-color: color-mix(in srgb, var(--open) 45%, transparent); }
.ci-btn.bad { color: var(--closed); border-color: color-mix(in srgb, var(--closed) 45%, transparent); }
.ci-btn:hover { background: var(--surface-2); }
.tag.ci-ok { color: var(--open); border-color: color-mix(in srgb, var(--open) 40%, transparent); background: var(--open-bg); }
.tag.ci-bad { color: var(--closed); border-color: color-mix(in srgb, var(--closed) 40%, transparent); background: var(--closed-bg); }
.pill.ciopen { background: var(--open-bg); color: var(--open); }

/* parking reports */
.p-pin.pk-free { background: #16a34a; } .p-pin.pk-busy { background: #d99a06; } .p-pin.pk-full { background: #dc2626; }
.p-pin.pk-gone { background: #6b7280; text-decoration: line-through; opacity: 0.8; }
.pk-pop { font: 14px/1.35 var(--font); min-width: 200px; }
.pk-pop p { margin: 4px 0; }
.pk-now { font-weight: 600; }
.pk-ask { color: #5d6a73; font-size: 0.85rem; }
.pk-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pk-btn { border: 1px solid #d5dde3; background: #fff; color: #10171c; border-radius: 10px; padding: 7px 8px; font: 600 0.82rem var(--font); cursor: pointer; text-align: start; }
.pk-btn:hover { background: #f2f5f7; }

/* layers menu */
.layers-pop { position: absolute; right: 64px; bottom: 0; min-width: 220px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
[dir="rtl"] .layers-pop { right: auto; left: 64px; }
.layers-pop label { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.layers-pop input { width: 20px; height: 20px; accent-color: var(--brand); }
.lp-title { margin: 0; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.mapctl { position: fixed; }
#layersBtn[aria-expanded="true"] { background: var(--brand); color: var(--brand-ink); }

/* user's sloth logo: transparent, with a thin white "sticker" outline so the black sloth reads on the dark bar */
.logo-tile { flex: none; display: block; line-height: 0; margin: -10px 0 -12px; }
.logo-tile img { display: block; height: 66px; width: auto;
  filter: drop-shadow(1.2px 0 0 #fff) drop-shadow(-1.2px 0 0 #fff) drop-shadow(0 1.2px 0 #fff) drop-shadow(0 -1.2px 0 #fff) drop-shadow(0 2px 6px rgb(0 0 0 / 0.45)); }
@media (max-width: 420px) { .logo-tile img { height: 54px; } .logo-tile { margin: -8px 0 -10px; } }

/* shade layer + time bar */
.shadebar { position: fixed; z-index: 1000; top: calc(124px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%);
  width: min(420px, calc(100% - 24px)); display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.shadebar input[type=range] { flex: 1; accent-color: #f2a93b; min-width: 0; }
.sb-sun { font-size: 1.1rem; }
.sb-time { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: center; }
.sb-now { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 4px 10px; font-weight: 600; font-size: 0.8rem; cursor: pointer; }
.sb-note { font-size: 0.78rem; color: var(--muted); }
@media (min-width: 860px) { .shadebar { left: calc(50% + 215px); } }

/* theme switch (auto / light / dark) and night map */
.themebtn { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: rgb(255 255 255 / 0.08); color: var(--header-ink); font-size: 1rem; line-height: 1; }
.themebtn:hover { background: rgb(255 255 255 / 0.16); }
.brand { flex: 1; }
/* Night map: invert the light base map and rotate hues back, so streets stay readable and water stays blue-ish. */
/* Night map: inverted light map pulled toward deep blue, so warm street lights and open shops stand out. */
/* The vector map gets a real night palette in app.js; only the plain-image fallback map is inverted. */

.sb-time.live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--open); margin-inline-end: 6px; vertical-align: middle; box-shadow: 0 0 0 3px color-mix(in srgb, var(--open) 25%, transparent); }

/* hours fix + account */
.fix-open { align-self: flex-start; border: 0; background: none; color: var(--brand); font-weight: 600; cursor: pointer; padding: 0; text-decoration: underline; font-size: 0.86rem; }
.fix-form { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--brand); }
.fix-form p { margin: 0; font-weight: 600; }
.fix-quick, .fix-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fix-quick button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-weight: 600; cursor: pointer; }
.fix-form input { min-height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.accpop { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; width: min(320px, calc(100vw - 24px)); padding: 14px; border-radius: 14px;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; z-index: 1100; }
.accpop p { margin: 0; }
.acc-title { font-weight: 700; }
.acc-why, .acc-msg { font-size: 0.84rem; color: var(--muted); }
.accpop form { display: flex; flex-direction: column; gap: 8px; }
.accpop input { min-height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); }

/* what the place is and whose */
.kind { font-weight: 600; color: var(--ink); opacity: 0.8; }
.tag.warn { background: color-mix(in srgb, #f2a93b 22%, transparent); color: inherit; }

/* trust of the shown hours */
.pill.approx { outline: 1.5px dashed color-mix(in srgb, currentColor 45%, transparent); outline-offset: 1px; }
.pill.doubt { background: color-mix(in srgb, #f2a93b 30%, transparent) !important; color: inherit; }
.src { margin: 0; font-size: 0.8rem; color: var(--muted); }
.src-chain::before { content: '✓ '; color: var(--open); font-weight: 700; }
.src-osm::before { content: '≈ '; font-weight: 700; }
.src-user::before { content: '👤 '; }

/* ---------- MapLibre map ---------- */
.maplibregl-map { font: inherit; }
.maplibregl-ctrl-top-right { top: calc(124px + env(safe-area-inset-top, 0px)); }
.maplibregl-ctrl-attrib { font-size: 10px; }
.maplibregl-popup-content { font: inherit; border-radius: 14px; padding: 12px 14px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.maplibregl-popup-tip { border-top-color: var(--surface) !important; border-bottom-color: var(--surface) !important; }
.maplibregl-popup-close-button { font-size: 18px; padding: 2px 8px; color: var(--muted); }
.mk { display: grid; place-items: center; }
html.night-map #map { background: #0e1726; }
/* brand badge inside a pin, upright */
.pin.branded { width: 34px; height: 34px; }
.pin .blogo { transform: rotate(45deg); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  font: 800 7.5px/1 var(--font); letter-spacing: -0.02em; text-align: center; white-space: nowrap; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08); }
.ico.brand { font: 800 8.5px/1.05 var(--font); text-align: center; overflow: hidden; padding: 2px; letter-spacing: -0.02em; }

/* ---------- glance bar (design B): the answer in one line + 3D ---------- */
.glance { position: fixed; z-index: 990; top: calc(70px + env(safe-area-inset-top, 0px)); left: max(10px, env(safe-area-inset-left, 0px)); right: max(10px, env(safe-area-inset-right, 0px));
  display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; pointer-events: none; }
.glance > * { pointer-events: auto; }
.answer, .tiltbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font: 600 0.9rem/1 var(--font); cursor: pointer; min-width: 0; }
.answer { flex: 0 1 auto; overflow: hidden; }
.answer b { color: var(--open); font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.answer span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.answer svg, .tiltbtn svg { flex: none; width: 18px; height: 18px; color: var(--muted); }
.tiltbtn { flex: none; font-weight: 800; padding: 0 14px; }
.tiltbtn svg { color: var(--brand); }
.tiltbtn[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.tiltbtn[aria-pressed="true"] svg { color: currentColor; }

/* ---------- cards carousel + ad slots ---------- */
.cards { flex: none; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 14px 14px; overscroll-behavior-x: contain; }
.cards::-webkit-scrollbar { display: none; }
.pcard { position: relative; flex: none; width: min(280px, 78vw); scroll-snap-align: center; display: flex; flex-direction: column; gap: 12px; padding: 14px;
  border-radius: 20px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); box-shadow: 0 -6px 30px rgb(10 20 30 / 0.18); cursor: pointer; }
.pcard.sel { outline: 2.5px solid var(--brand); }
.pc-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pc-top .ico { width: 44px; height: 44px; border-radius: 12px; flex: none; }
.pc-name { display: flex; flex-direction: column; min-width: 0; }
.pc-name > b { font-size: 1.05rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-name small { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.pc-name small b { color: var(--ink); }
.pc-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gobtn { flex: none; border: 0; border-radius: 12px; padding: 9px 20px; background: var(--brand); color: var(--brand-ink); font: 700 0.9rem/1 var(--font); cursor: pointer; text-decoration: none; }
.pcard.ad { background: var(--surface-2); border-color: color-mix(in srgb, var(--brand) 25%, transparent); cursor: default; }
.adico { background: var(--surface); color: var(--brand); font-size: 1.2rem; border: 1px solid var(--line); }
.pcard.none { justify-content: center; align-items: flex-start; cursor: default; }
.pcard.none p { margin: 0; font-weight: 600; }
.adtag { position: absolute; top: 8px; inset-inline-end: 10px; font: 700 9px/1 var(--font); letter-spacing: 0.04em; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; }
.adbanner { position: relative; flex: none; margin: 0 14px 8px; min-height: 50px; max-width: 420px; align-self: center; width: calc(100% - 28px); display: flex; align-items: center; justify-content: center;
  padding: 8px 34px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; font-weight: 500; text-align: center; }
.adbanner .adtag { inset-inline-end: auto; inset-inline-start: 8px; top: 50%; transform: translateY(-50%); }
.adbanner .adtext { min-width: 0; }
.adbanner a { color: var(--brand); font-weight: 700; }
.adx { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.1rem; cursor: pointer; }

/* phone: glance mode = the sheet's peek. Chips, ad banner and cards float over the map; pull up for the full list. */
@media (max-width: 859px) {
  .sheet[data-state="peek"] { background: transparent; box-shadow: none; pointer-events: none; }
  .sheet[data-state="peek"] > * { pointer-events: auto; }
  .sheet[data-state="peek"] .hero, .sheet[data-state="peek"] .scroller, .sheet[data-state="peek"] .addbox:not([hidden]) ~ .scroller { display: none; }
  .sheet[data-state="peek"] .grab span { background: color-mix(in srgb, var(--ink) 35%, transparent); }
  .sheet[data-state="peek"] .chips { -webkit-mask-image: none; mask-image: none; }
  .sheet[data-state="peek"] .chip { box-shadow: 0 2px 10px rgb(10 20 30 / 0.12); }
  .sheet[data-state="peek"] #notices { display: none; }
  .sheet[data-state="peek"] .adbanner { min-height: 40px; padding: 6px 34px 6px 44px; }
  .sheet[data-state="peek"] .adbanner .adtext { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sheet:not([data-state="peek"]) .cards { display: none; }
  .sheet { height: calc(100% - 128px - env(safe-area-inset-top, 0px)); }
}
@media (min-width: 860px) {
  .answer, .cards { display: none; }
  .glance { justify-content: flex-end; top: calc(74px + env(safe-area-inset-top, 0px)); }
  .maplibregl-ctrl-top-right { top: calc(126px + env(safe-area-inset-top, 0px)); }
}

/* is the place really there: sources */
.vsrc { margin: 0; font-size: 0.8rem; line-height: 1.35; }
.vsrc.ok { color: var(--open); font-weight: 600; }
.vsrc.one { color: var(--soon); }
.src-est::before { content: '≈ '; font-weight: 700; }
