/* Kool Kafe Klub: dark theme only. */
:root {
  --bg: #0f1116;
  --panel: #151821;
  --raised: #1c2030;
  --raised-2: #242a3d;
  --line: #2a3045;
  --text: #e9ebf2;
  --muted: #99a1b8;
  --accent: #f2b84b;
  --accent-ink: #1a1304;
  --danger: #ff6b6b;
  --ok: #58d39b;
  --me: #4da3ff;
  --cafe: #f2b84b;
  --bar: #b592ff;
  --food: #ff8168;
  --sweet: #ff8fc6;
  --other: #56cfc0;
  --radius: 12px;
  --panel-w: 380px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ── layout ─────────────────────────────────────────────────────────── */
#app { display: grid; grid-template-columns: var(--panel-w) 1fr; height: 100dvh; }
#panel {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--panel); border-right: 1px solid var(--line); z-index: 500;
}
/* isolation keeps the map's internal z-indexes below the panel and dialogs */
#map { min-height: 0; background: #0b0d11; isolation: isolate; z-index: 0; }
#sheetHandle { display: none; }

.top { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px; }
.list-switch {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  background: none; border: 0; padding: 6px 8px; margin-left: -8px; border-radius: 10px;
  font-size: 19px; font-weight: 650; letter-spacing: -0.01em; cursor: pointer; text-align: left;
}
.list-switch:hover { background: var(--raised); }
#listName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px;
}
.avatar {
  width: 34px; height: 34px; flex: none; border-radius: 50%; border: 1px solid var(--line);
  background: var(--raised) center/cover no-repeat; cursor: pointer;
  display: grid; place-items: center; font-weight: 650; font-size: 14px; color: var(--muted);
}
.avatar:hover { border-color: var(--muted); }

/* ── buttons & inputs ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--raised); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; cursor: pointer; white-space: nowrap; text-decoration: none; color: var(--text);
}
.btn:hover { background: var(--raised-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 650; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); }
.btn.quiet { background: none; border-color: transparent; color: var(--muted); }
.btn.quiet:hover { background: var(--raised); color: var(--text); }
.btn.big { padding: 12px 18px; font-size: 16px; }
.btn.sm { padding: 5px 9px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: 0.5; cursor: default; }
input[type="text"], input[type="search"], input[type="email"], input[type="password"], textarea, select {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px;
  width: 100%; min-width: 0;
}
input::placeholder, textarea::placeholder { color: #6f7790; }
select { width: auto; padding: 6px 8px; }
textarea { resize: vertical; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ── search ─────────────────────────────────────────────────────────── */
.search { position: relative; padding: 0 14px 10px; }
.search-row { display: flex; gap: 8px; }
#suggest {
  position: absolute; left: 14px; right: 14px; top: calc(100% - 6px); z-index: 20;
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55); overflow: hidden; max-height: 60vh; overflow-y: auto;
}
.sg-head { padding: 8px 12px 4px; font-size: 11px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.sg-item { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; cursor: pointer; }
.sg-item:hover, .sg-item.active { background: var(--raised-2); }
.sg-item b { font-weight: 600; }
.sg-item span { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-empty { padding: 12px; color: var(--muted); font-size: 14px; }

/* ── filters: tabs for the main labels, status switch, more labels ───── */
#filters { padding: 0 14px 4px; }
.tabs { display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); gap: 5px; }
.tab {
  --c: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0;
  background: none; border: 1px solid var(--line); border-radius: 12px; padding: 7px 2px 5px; cursor: pointer;
}
.tab svg { color: var(--c); }
.tab b { font-size: 11.5px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab small { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tab:hover { border-color: var(--muted); }
.tab.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; scrollbar-width: none; margin-top: 8px; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
  flex: 1 0 auto; background: none; border: 0; border-left: 1px solid var(--line); padding: 6px 10px;
  font-size: 12.5px; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.seg button:first-child { border-left: 0; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--raised-2); color: var(--text); font-weight: 650; }
.more-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.more-btn i { font-style: normal; background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 11px; font-weight: 700; padding: 0 6px; }
.active { display: inline-flex; gap: 6px; align-items: center; background: var(--raised-2); border: 0; border-radius: 999px; padding: 3px 9px; font-size: 12.5px; cursor: pointer; }
.active u { text-decoration: none; opacity: 0.6; }
.active:hover u { opacity: 1; }
.more-panel { margin-top: 8px; border: 1px solid var(--line); background: var(--raised); border-radius: 12px; padding: 10px 12px; max-height: 38vh; overflow-y: auto; }
.filter-label { font-size: 10.5px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.checks + .filter-label { margin-top: 10px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.check { display: grid; grid-template-columns: 16px 1fr auto; gap: 8px; align-items: center; background: none; border: 0; padding: 4px 0; font-size: 13px; text-align: left; cursor: pointer; min-width: 0; }
.check span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check small { color: var(--muted); font-size: 11px; }
.box { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--muted); position: relative; }
.check.on .box { background: var(--accent); border-color: var(--accent); }
.check.on .box::after { content: ""; position: absolute; left: 3.5px; top: 0.5px; width: 3.5px; height: 7px; border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.chip {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: transparent;
  border-radius: 999px; padding: 3px 10px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.chip:hover { border-color: var(--muted); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.chip.tag.on { background: var(--me); border-color: var(--me); color: #04162b; }
.chip.static { cursor: default; }
.chip .x { border: 0; background: none; padding: 0 0 0 2px; cursor: pointer; color: inherit; opacity: 0.6; font-size: 15px; line-height: 1; }
.chip .x:hover { opacity: 1; }
.mainchip {
  --c: var(--muted);
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 3px 10px 3px 8px; font-size: 13px; white-space: nowrap;
}
button.mainchip { cursor: pointer; }
button.mainchip:hover { border-color: var(--c); }
.mainchip svg { color: var(--c); }
.mainchip.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--text); font-weight: 600; }
.linkish { background: none; border: 0; padding: 2px 4px; color: var(--muted); cursor: pointer; font-size: 13px; text-decoration: underline; }
.linkish:hover { color: var(--text); }

/* ── nearest + list ─────────────────────────────────────────────────── */
.near { padding: 0 14px 12px; }
.near .btn { width: 100%; padding: 10px 12px; }
#nearMsg { margin-top: 8px; font-size: 12.5px; line-height: 1.4; color: #c3c8d8; background: var(--raised); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
#nearMsg .linkish { display: block; padding: 4px 0 0; color: var(--accent); }
.listhead {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; margin-top: 8px;
}
.sort { display: flex; align-items: center; gap: 6px; }
.sort select { padding: 3px 6px; font-size: 13px; border-radius: 8px; }
#places { flex: 1; min-height: 0; overflow-y: auto; padding: 0 8px 20px; overscroll-behavior: contain; }
/* group folders */
.group {
  --c: var(--muted);
  display: grid; grid-template-columns: 24px 1fr auto 16px; gap: 8px; align-items: center; width: 100%;
  background: none; border: 0; border-top: 1px solid var(--line); padding: 10px 6px; cursor: pointer; text-align: left;
  position: sticky; top: 0; z-index: 2; background: var(--panel);
}
.group:first-child { border-top: 0; }
.group:hover { background: var(--raised); }
.gicon { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.group b { font-size: 14px; font-weight: 650; }
.group small { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.chev { color: var(--muted); display: grid; transition: transform 0.15s ease; }
.group.open .chev { transform: rotate(90deg); }
/* two-line rows */
.row2 {
  display: grid; grid-template-columns: 3px minmax(0, 1fr) auto; gap: 0 10px; align-items: center;
  padding: 8px 6px 8px 8px; border-radius: 10px; cursor: pointer;
}
.row2:hover { background: var(--raised); }
.row2.top3 { background: var(--raised); margin: 3px 0; }
.edge { align-self: stretch; border-radius: 3px; min-height: 30px; }
.mid { min-width: 0; }
.row2 h3 { margin: 0; font-size: 14.5px; font-weight: 620; line-height: 1.3; display: flex; flex-wrap: wrap; gap: 3px 7px; align-items: center; }
.nm { overflow-wrap: anywhere; }
.rank { width: 19px; height: 19px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 11.5px; font-weight: 750; display: inline-grid; place-items: center; flex: none; }
.status-mark { display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.status-mark.been { color: var(--ok); }
.status-mark.done { color: var(--muted); font-weight: 500; }
.score { font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; border-radius: 6px; padding: 0 6px; background: rgba(242, 184, 75, 0.16); color: var(--accent); white-space: nowrap; }
.score.low { background: var(--raised-2); color: var(--muted); }
.score-filter { padding: 4px 6px; font-size: 13px; border-radius: 8px; }
.scorebox { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; }
.scorebox input[type="range"] { width: 100%; accent-color: var(--accent); padding: 0; border: 0; background: none; }
.score-readout { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; min-width: 78px; text-align: right; }
.score-readout.empty { color: var(--muted); font-weight: 500; font-size: 13px; }
.row2.is-done .nm { color: var(--muted); }
.row2.is-done .edge { opacity: 0.45; }
.minitag.done { background: var(--raised-2); color: var(--muted); }
.sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 1px; }
.sub .note { color: #b9bfd1; }
.sub .plus { opacity: 0.8; }
.end { display: flex; align-items: center; gap: 8px; }
.dist { font-weight: 650; font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.arrow { width: 28px; height: 28px; border-radius: 9px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--accent); flex: none; }
.arrow:hover { background: var(--raised-2); border-color: var(--muted); }
.arrow.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.minitag { font-size: 11px; font-weight: 500; border-radius: 999px; padding: 1px 7px; background: var(--raised-2); color: #c9cee0; }
.minitag.been { background: rgba(88, 211, 155, 0.16); color: var(--ok); }
.minitag.again { background: rgba(242, 184, 75, 0.16); color: var(--accent); }
.section-title { padding: 12px 8px 4px; font-size: 11px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.outside-note { padding: 14px 8px 4px; font-size: 13px; color: var(--muted); }
.empty { padding: 26px 14px; color: var(--muted); text-align: center; }
.empty b { color: var(--text); display: block; margin-bottom: 6px; font-size: 16px; }

/* ── map pins, clusters, names ──────────────────────────────────────── */
/* Pins must stay position:absolute (the map library moves them with a transform).
   Making them relative stacks them down the page and they drift off their spot. */
.maplibregl-marker.pin-wrap { position: absolute; }
.pin-wrap { width: 30px; height: 37px; cursor: pointer; }
.pin {
  width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  border: 2px solid #0b0d11; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
  display: grid; place-items: center; color: #0b0d11;
}
.pin-in { transform: rotate(45deg); display: grid; place-items: center; }
.pin b { font: 750 13px/1 system-ui, sans-serif; color: #0b0d11; }
.pin.is-faded { opacity: 0.5; }
.pin.is-ranked { opacity: 1; border-color: #fff; }
.pin.is-draft { animation: bob 0.9s ease-in-out infinite alternate; }
@keyframes bob { to { translate: 0 -5px; } }
/* extra main labels (Veg friendly, Brunch…) as corner dots */
.pin-extra { position: absolute; top: -3px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #0b0d11; }
.pin-extra-0 { right: -3px; }
.pin-extra-1 { left: -3px; }
.pin-name {
  display: none; position: absolute; left: 34px; top: 4px; font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap;
  max-width: 170px; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
  text-shadow: 0 0 3px #0b0d11, 0 0 3px #0b0d11, 0 0 6px #0b0d11, 0 0 8px #0b0d11;
}
.pin-wrap.show-name .pin-name { display: block; }
.cluster {
  border-radius: 50%; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.65);
}
.cluster span {
  width: calc(100% - 10px); height: calc(100% - 10px); border-radius: 50%; background: #12151d; color: var(--text);
  display: grid; place-items: center; font: 700 13px/1 system-ui, sans-serif;
}
.cluster:hover span { background: var(--raised-2); }
.me-dot {
  width: 18px; height: 18px; border-radius: 50%; background: var(--me); border: 2.5px solid #fff;
  box-shadow: 0 0 0 9px rgba(77, 163, 255, 0.2), 0 2px 8px rgba(0, 0, 0, 0.6); pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { .pin.is-draft { animation: none; } .chev { transition: none; } }

/* MapLibre chrome, restyled for dark */
.maplibregl-map { font: inherit; }
.maplibregl-popup { z-index: 30; }
.maplibregl-popup-content {
  background: var(--raised); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 14px; box-shadow: 0 10px 34px rgba(0, 0, 0, 0.6); line-height: 1.4;
}
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--line); }
.maplibregl-popup-anchor-top .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--line); }
.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--line); }
.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--line); }
.maplibregl-popup-close-button { color: var(--muted); font-size: 20px; padding: 2px 8px; border-radius: 0 var(--radius) 0 8px; }
.maplibregl-popup-close-button:hover { background: var(--raised-2); color: var(--text); }
.maplibregl-ctrl-group { background: var(--raised); border: 1px solid var(--line); box-shadow: none; }
.maplibregl-ctrl-group button + button { border-top-color: var(--line); }
.maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1); }
.maplibregl-ctrl-group button:not(:disabled):hover { background: var(--raised-2); }
.maplibregl-ctrl-attrib { background: rgba(15, 17, 22, 0.8) !important; color: #7d859c; }
.maplibregl-ctrl-attrib-inner, .maplibregl-ctrl-attrib a { color: #a6adc2 !important; }
.maplibregl-ctrl-attrib-button { filter: invert(1); }
.pop h3 { margin: 0 22px 2px 0; font-size: 16px; }
.pop .mains { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0 4px; }
.pop .mainchip { font-size: 12px; padding: 2px 8px 2px 6px; }
.pop .cats, .pop .addr { color: var(--muted); font-size: 13px; }
.pop .note { margin: 7px 0 0; font-size: 14px; }
.pop .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.pop .meta { margin-top: 7px; font-size: 13px; }
.pop .actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.pop .actions .btn { padding: 6px 10px; font-size: 13px; }
.pop .actions a.btn.primary { color: var(--accent-ink); }
.pop .actions a.btn { color: var(--text); }

/* ── dialogs ────────────────────────────────────────────────────────── */
dialog {
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 16px;
  padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 32px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}
dialog::backdrop { background: rgba(5, 6, 9, 0.62); }
dialog.wide { width: min(680px, calc(100vw - 24px)); }
.dlg { display: flex; flex-direction: column; max-height: calc(100dvh - 34px); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 6px; }
.dlg-head h2 { margin: 0; font-size: 18px; }
.dlg-body { padding: 8px 18px 14px; overflow-y: auto; }
.dlg-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); }
.dlg-foot .spacer { flex: 1; }
.field { margin-top: 14px; }
.field > label, .field > .label { display: flex; justify-content: space-between; font-size: 12px; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lgroup { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 7px; }
.lgroup-title { font-size: 12px; color: var(--muted); min-width: 62px; }
.chips input { width: 130px; padding: 4px 10px; border-radius: 999px; font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; }
.row + .row { margin-top: 8px; }
.row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.current .grow { font-weight: 650; }
h4 { margin: 20px 0 8px; font-size: 12px; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.callout { background: var(--raised); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: #c3c8d8; }

/* import review */
.imp-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 2px 10px; padding: 10px 0; border-top: 1px solid var(--line); align-items: start; }
.imp-row:first-child { border-top: 0; }
.imp-row input[type="checkbox"] { width: 17px; height: 17px; margin-top: 3px; accent-color: var(--accent); }
.imp-row .t { font-weight: 600; overflow-wrap: anywhere; }
.imp-row .s { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.imp-row select { width: 100%; margin-top: 4px; font-size: 13px; }
.cands { margin-top: 4px; display: grid; gap: 3px; }
.cand { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; font-size: 13px; color: #c3c8d8; cursor: pointer; }
.cand input[type="checkbox"] { width: 15px; height: 15px; margin-top: 2px; }
.cand input:disabled + span { color: var(--muted); }
.status { font-size: 11px; font-weight: 650; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.status.matched { background: rgba(88, 211, 155, 0.16); color: var(--ok); }
.status.check { background: rgba(242, 184, 75, 0.16); color: var(--accent); }
.status.notfound { background: rgba(255, 107, 107, 0.14); color: var(--danger); }
.status.saved, .status.pending { background: var(--raised-2); color: var(--muted); }

/* ── sign-in, boot, toast ───────────────────────────────────────────── */
#signin, #boot { position: fixed; inset: 0; z-index: 3000; background: var(--bg); display: grid; place-items: center; padding: 20px; }
#boot { color: var(--muted); z-index: 2900; }
.signin-card { max-width: 360px; text-align: center; }
.signin-card h1 { margin: 14px 0 6px; font-size: 28px; letter-spacing: -0.02em; }
.signin-card p { color: var(--muted); margin: 0 0 22px; }
.logo { width: 54px; height: 54px; margin: 0 auto; border-radius: 50% 50% 50% 0; rotate: -45deg; background: var(--accent); position: relative; }
.logo::after { content: ""; position: absolute; inset: 17px; border-radius: 50%; background: var(--bg); }
#toast {
  position: fixed; left: 50%; bottom: 22px; translate: -50% 0; z-index: 4000; max-width: min(520px, calc(100vw - 24px));
  background: #f1f2f6; color: #14161d; border-radius: 12px; padding: 10px 14px; font-size: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}
#toast.error { background: #ffd9d9; }

/* ── phones: map on top, list as a bottom sheet ─────────────────────── */
@media (max-width: 760px) {
  #app { display: block; position: relative; }
  #map { position: absolute; inset: 0; }
  #panel {
    position: absolute; left: 0; right: 0; bottom: 0; height: 62dvh; border-right: 0;
    border-top: 1px solid var(--line); border-radius: 18px 18px 0 0;
    transform: translateY(calc(62dvh - 196px)); transition: transform 0.22s ease;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5); padding-bottom: env(safe-area-inset-bottom);
  }
  body.sheet-open #panel { transform: none; }
  #sheetHandle { display: block; width: 100%; height: 20px; background: none; border: 0; cursor: pointer; flex: none; }
  #sheetHandle span { display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 8px auto 0; }
  .top { padding-top: 2px; }
  body:not(.sheet-open) #filters, body:not(.sheet-open) .listhead, body:not(.sheet-open) #places { visibility: hidden; }
  .tab b { font-size: 11px; }
  .maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left { bottom: 196px; }
  body.sheet-open .maplibregl-ctrl-bottom-right, body.sheet-open .maplibregl-ctrl-bottom-left { visibility: hidden; }
  .maplibregl-ctrl-group { display: none; } /* pinch to zoom on phones */
  #toast { bottom: auto; top: 14px; }
  @media (prefers-reduced-motion: reduce) { #panel { transition: none; } }
}
