/* =========================================================================
   Curb – design tokens
   ========================================================================= */
@font-face { font-family: "Rubik"; font-weight: 300 900; font-display: swap;
  src: url("/static/fonts/rubik-hebrew.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Rubik"; font-weight: 300 900; font-display: swap;
  src: url("/static/fonts/rubik-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Rubik"; font-weight: 300 900; font-display: swap;
  src: url("/static/fonts/rubik-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --surface-3: #e3e8f0;
  --text: #0e1726;
  --text-2: #344054;
  --muted: #667085;
  --line: #e4e8ef;
  --brand: #2459e0;
  --brand-2: #2f7bff;
  --brand-soft: #e8efff;
  --on-brand: #ffffff;
  --good: #079455;   --good-bg: #e6f6ee;
  --warn: #c4620a;   --warn-bg: #fff3e0;
  --bad: #d92d20;    --bad-bg: #fdecea;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-2: 0 12px 32px -8px rgba(16, 24, 40, .18), 0 4px 8px -4px rgba(16, 24, 40, .08);
  --shadow-sheet: 0 -10px 30px -12px rgba(16, 24, 40, .22);
  --glass: rgba(255, 255, 255, .9);
  --radius: 18px;
  --radius-sm: 12px;
  --tabbar-h: 64px;
  --font: "Rubik", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1120; --surface: #121a2b; --surface-2: #1a2438; --surface-3: #24304a;
    --text: #e8eef8; --text-2: #c5cfe0; --muted: #93a0b8; --line: #22304a;
    --brand: #5b8cff; --brand-2: #7aa3ff; --brand-soft: #1b2a4d; --on-brand: #06112b;
    --good: #4ad395; --good-bg: #0f2e22; --warn: #ffb35c; --warn-bg: #33240d; --bad: #ff7a70; --bad-bg: #3a1513;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 16px 40px -12px rgba(0, 0, 0, .6);
    --shadow-sheet: 0 -12px 30px -10px rgba(0, 0, 0, .55); --glass: rgba(18, 26, 43, .92);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1120; --surface: #121a2b; --surface-2: #1a2438; --surface-3: #24304a;
  --text: #e8eef8; --text-2: #c5cfe0; --muted: #93a0b8; --line: #22304a;
  --brand: #5b8cff; --brand-2: #7aa3ff; --brand-soft: #1b2a4d; --on-brand: #06112b;
  --good: #4ad395; --good-bg: #0f2e22; --warn: #ffb35c; --warn-bg: #33240d; --bad: #ff7a70; --bad-bg: #3a1513;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 16px 40px -12px rgba(0, 0, 0, .6);
  --shadow-sheet: 0 -12px 30px -10px rgba(0, 0, 0, .55); --glass: rgba(18, 26, 43, .92);
  color-scheme: dark;
}

/* =========================================================================
   base
   ========================================================================= */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.err { color: var(--bad); }
.ltr-text { direction: ltr; unicode-bidi: plaintext; text-align: right; }
code { direction: ltr; unicode-bidi: embed; font-size: 12px; word-break: break-all; background: var(--surface-2); padding: 1px 5px; border-radius: 6px; }
[data-icon] { display: inline-flex; }
svg.i { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* buttons */
.btn {
  appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: 500 15px/1 var(--font); padding: 11px 16px; border-radius: 12px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  transition: transform .12s ease, background .2s ease, box-shadow .2s ease;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: var(--on-brand); border-color: transparent; box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.lg { padding: 15px 18px; font-size: 16px; border-radius: 14px; }
.btn.sm { padding: 8px 12px; font-size: 14px; }
.btn:disabled { opacity: .45; pointer-events: none; }

/* =========================================================================
   login
   ========================================================================= */
.login {
  min-height: 100%; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(1200px 600px at 50% -10%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%), var(--bg);
}
.login-card {
  width: 100%; max-width: 380px; background: var(--surface); border-radius: 24px; padding: 32px 24px 24px;
  box-shadow: var(--shadow-2); text-align: center; border: 1px solid var(--line);
}
.login-logo { width: 76px; height: 76px; border-radius: 20px; box-shadow: var(--shadow-2); }
.login-card h1 { font-size: 30px; margin-top: 14px; font-weight: 700; }
.login-card p { margin: 6px 0 22px; }
.login-card form { display: grid; gap: 10px; }
input[type=password], input[type=time] {
  font: 400 16px var(--font); padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); width: 100%; outline: none;
}
input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }

/* =========================================================================
   top bar + tabs
   ========================================================================= */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand {
  display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: 6px 12px 6px 6px; border-radius: 999px; box-shadow: var(--shadow-1);
}
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.chip-status {
  appearance: none; border: 0; font: 500 13px var(--font); color: var(--text-2); cursor: pointer;
  display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow-1);
}
.chip-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.chip-status.on .dot { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 25%, transparent); }

main { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); max-width: 640px; margin: 0 auto; }
.tab { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid var(--line);
}
.tabbtn {
  appearance: none; border: 0; background: none; color: var(--muted); font: 500 12px var(--font);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer;
}
.tabbtn.active { color: var(--brand); }
.tabbtn.active svg.i { stroke-width: 2.4; }

/* =========================================================================
   map + sheet
   ========================================================================= */
.map-wrap { position: relative; height: 46vh; min-height: 300px; max-height: 520px; background: var(--surface-2); }
.map-wrap.short { height: 34vh; min-height: 240px; }
.map { position: absolute; inset: 0; }
.fab {
  position: absolute; left: 16px; bottom: 40px; z-index: 5; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--surface); color: var(--text); box-shadow: var(--shadow-2); cursor: pointer;
  display: grid; place-items: center;
}
.sheet {
  position: relative; z-index: 10; margin-top: -26px; background: var(--bg);
  border-radius: 26px 26px 0 0; padding: 10px 16px 24px; box-shadow: var(--shadow-sheet); min-height: 50vh;
}
.grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 0 auto 14px; }

/* car marker on the map */
/* no "position" here: MapLibre positions the marker element absolutely */
.car-marker { width: 46px; height: 46px; }
.car-marker .halo { position: absolute; inset: -10px; border-radius: 50%; background: var(--mk, var(--brand)); opacity: .22; animation: pulse 2.2s ease-out infinite; }
.car-marker .core {
  position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--mk, var(--brand)) 80%, #fff), var(--mk, var(--brand)));
  border: 3px solid #fff; box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .45);
}
.car-marker .core svg.i { width: 22px; height: 22px; stroke-width: 2.2; }
@keyframes pulse { 0% { transform: scale(.6); opacity: .35; } 100% { transform: scale(1.6); opacity: 0; } }
.maplibregl-ctrl-attrib { font-size: 10px; }
.maplibregl-ctrl-bottom-left, .maplibregl-ctrl-bottom-right { bottom: 26px; }

/* =========================================================================
   car sheet
   ========================================================================= */
.place h2 { font-size: 23px; font-weight: 700; line-height: 1.25; }
.between { color: var(--text-2); font-size: 15px; margin-top: 2px; }
.meta { color: var(--muted); font-size: 13px; margin-top: 6px; }

.hero {
  margin: 16px 0 6px; padding: 16px 18px 14px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-1); border: 1px solid var(--line);
  --tone: var(--brand); --tone-bg: var(--brand-soft);
}
.hero.good { --tone: var(--good); --tone-bg: var(--good-bg); }
.hero.warn { --tone: var(--warn); --tone-bg: var(--warn-bg); }
.hero.bad  { --tone: var(--bad);  --tone-bg: var(--bad-bg); }
.hero-top { display: flex; justify-content: space-between; align-items: center; }
.hero-label { color: var(--muted); font-size: 13px; font-weight: 500; }
.hero-badge { font-size: 12px; font-weight: 600; color: var(--tone); background: var(--tone-bg); padding: 4px 10px; border-radius: 999px; }
.hero-big { font-size: 30px; font-weight: 700; margin-top: 4px; line-height: 1.15; color: var(--text); }
.hero-sub { color: var(--tone); font-weight: 600; margin-top: 4px; font-size: 15px; }
.progress { height: 6px; border-radius: 3px; background: var(--surface-2); margin-top: 12px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--tone); transition: width .6s ease; }
.hero-skipped { margin-top: 10px; font-size: 13px; color: var(--good); background: var(--good-bg); padding: 7px 10px; border-radius: 10px; }

.section-title { font-size: 15px; font-weight: 600; margin: 22px 2px 10px; color: var(--text); }
.section-title .sub { color: var(--muted); font-weight: 400; font-size: 13px; }

.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.side {
  appearance: none; text-align: right; font-family: var(--font); color: var(--text); cursor: pointer;
  border: 2px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 12px 14px;
  display: grid; gap: 6px; position: relative; transition: border-color .2s, box-shadow .2s, transform .12s;
}
.side:active { transform: scale(.98); }
.side .side-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; }
.side .compass { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.side .compass svg.i { width: 16px; height: 16px; fill: currentColor; stroke-width: 1.5; }
.side .side-rule { font-size: 13px; color: var(--text-2); line-height: 1.35; }
.side .side-rule.none { color: var(--good); font-weight: 500; }
.side .side-rule.unknown { color: var(--muted); }
.side .tag { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.side.guess { border-style: dashed; border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.side.selected { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.side.selected .compass { background: var(--brand); color: var(--on-brand); }
.side.selected .tag { background: var(--brand); color: var(--on-brand); }
.hint { color: var(--muted); font-size: 13px; margin: 8px 2px 0; }
.hint.pulse { animation: hintPulse 1.2s ease 3; }
@keyframes hintPulse { 50% { color: var(--brand); } }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 7px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); }
.pill svg.i { width: 15px; height: 15px; color: var(--brand); }

.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0 16px; }
.action {
  appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 500 13px var(--font);
  border-radius: var(--radius-sm); padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; text-decoration: none; text-align: center; box-shadow: var(--shadow-1);
}
.action svg.i { color: var(--brand); }
.action:active { transform: scale(.97); }

.empty { text-align: center; padding: 18px 8px 22px; }
.empty-art { width: 76px; height: 76px; border-radius: 24px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.empty-art svg.i { width: 38px; height: 38px; }
.empty h2 { font-size: 20px; }
.empty p { margin: 6px 0 0; }

.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day { border-radius: 14px; padding: 9px 2px 8px; text-align: center; background: var(--surface); border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.day b { display: block; font-size: 13px; color: var(--text); font-weight: 600; }
.day .d { display: block; font-size: 11px; }
.day .ic { display: block; font-size: 17px; margin-top: 4px; line-height: 1.2; }
.day.on { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.day.susp { background: var(--good-bg); border-color: transparent; }
.day.susp b { color: var(--good); }
.day.today { box-shadow: inset 0 0 0 2px var(--brand); }

/* =========================================================================
   history
   ========================================================================= */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; text-align: center; box-shadow: var(--shadow-1); }
.stat b { display: block; font-size: 22px; font-weight: 700; }
.stat span { font-size: 12px; color: var(--muted); }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); padding: 4px; border-radius: 12px; margin: 16px 0 6px; }
.segmented.mini { margin: 0; }
.seg { appearance: none; border: 0; background: none; font: 500 14px var(--font); color: var(--muted); padding: 8px 10px; border-radius: 9px; cursor: pointer; }
.segmented.mini .seg { font-size: 13px; padding: 6px 9px; }
.seg.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }

.list-day { font-size: 13px; font-weight: 600; color: var(--muted); margin: 16px 4px 8px; }
.item {
  appearance: none; width: 100%; text-align: right; font-family: var(--font); color: var(--text);
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 12px; margin-bottom: 8px; cursor: pointer;
}
.item.selected { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.item-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; background: var(--brand-soft); color: var(--brand); }
.item-ic.live { background: var(--brand); color: var(--on-brand); }
.item-title { font-weight: 600; font-size: 15px; }
.item-sub { font-size: 13px; color: var(--muted); margin-top: 1px; }
.item-end { text-align: left; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.item-end span { display: block; color: var(--muted); font-size: 12px; }
.note { grid-template-columns: auto 1fr; cursor: default; }
.note .item-sub { white-space: pre-line; color: var(--text-2); }
.note time { font-size: 12px; color: var(--muted); }
.list-empty { text-align: center; color: var(--muted); padding: 30px 10px; }

/* =========================================================================
   settings
   ========================================================================= */
.settings { padding: calc(env(safe-area-inset-top) + 64px) 16px 24px; }
.page-title { font-size: 28px; font-weight: 700; margin: 4px 4px 12px; }
.group-title { font-size: 13px; font-weight: 600; color: var(--muted); margin: 18px 8px 8px; }
.group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); margin-bottom: 10px; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-top: 1px solid var(--line); width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; font-family: var(--font); color: var(--text); text-align: right; font-size: 15px; }
.row:first-child { border-top: 0; }
.row.buttons { gap: 8px; flex-wrap: wrap; }
.row.buttons .btn { flex: 1; }
.row.danger { color: var(--bad); cursor: pointer; }
.row.danger .row-icon { background: var(--bad-bg); color: var(--bad); }
.row-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.row-icon svg.i { width: 18px; height: 18px; }
.row-main { flex: 1; display: grid; min-width: 0; }
.row-main span { font-size: 13px; }
.row.details { display: block; font-size: 13px; color: var(--text-2); }
.row.details summary { cursor: pointer; color: var(--muted); }
.row.details div { margin-top: 6px; }
.badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--good-bg); color: var(--good); }
.badge.no { background: var(--bad-bg); color: var(--bad); }
.banner { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; margin-bottom: 8px; }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.banner code { white-space: nowrap; display: inline-block; margin: 2px 0; }
.footer { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }

/* double parking question */
.dp-card {
  margin: 14px 0 4px; padding: 16px; border-radius: var(--radius); background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); animation: fade .3s ease;
}
.dp-title { font-weight: 700; font-size: 18px; }
.dp-text { margin: 6px 0 12px; color: var(--text-2); font-size: 14px; }
.dp-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dp-buttons .btn.primary { grid-column: 1 / -1; }

/* settings controls */
.row.column { display: grid; gap: 12px; }
.row-top { display: flex; align-items: center; gap: 12px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  appearance: none; font: 500 14px var(--font); color: var(--text-2); cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2); padding: 8px 12px; border-radius: 999px;
  transition: background .15s, color .15s, border-color .15s;
}
.choice.on { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.select {
  font: 500 14px var(--font); color: var(--text); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 7px 8px; direction: ltr;
}
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3); transition: background .2s; }
.switch span::after {
  content: ""; position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s;
}
.switch input:checked + span { background: var(--good); }
.switch input:checked + span::after { transform: translateX(-20px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 25%, transparent); }

/* =========================================================================
   dialog + toast
   ========================================================================= */
.dialog {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: min(640px, 100vw); max-height: 88vh; overflow-x: hidden;
  background: var(--surface); color: var(--text); border-radius: 26px 26px 0 0; box-shadow: var(--shadow-2);
}
.dialog[open] { animation: up .28s cubic-bezier(.2, .9, .3, 1); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.dialog::backdrop { background: rgba(8, 12, 22, .45); backdrop-filter: blur(2px); }
.dialog-body { padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 10px; }
.dialog-body h2 { font-size: 21px; }
.dialog-body p { margin: 0; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.dialog-actions .btn.primary { grid-column: 1 / -1; }
.rule-row { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 10px; background: var(--bg); }
.daypick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.daypick label { position: relative; }
.daypick input { position: absolute; opacity: 0; inset: 0; }
.daypick span { display: block; text-align: center; padding: 8px 0; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 500; cursor: pointer; }
.daypick input:checked + span { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.times { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.times input { padding: 9px 8px; min-width: 0; width: 100%; }
.icon-btn { appearance: none; border: 0; background: var(--bad-bg); color: var(--bad); width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; }
.icon-btn svg.i { width: 18px; height: 18px; }

.toast {
  position: fixed; z-index: 60; left: 16px; right: 16px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px);
  max-width: 480px; margin: 0 auto; padding: 12px 16px; border-radius: 14px; background: var(--text); color: var(--bg);
  font-size: 14px; box-shadow: var(--shadow-2); animation: up .25s ease;
}

@media (min-width: 700px) {
  .map-wrap { border-radius: 0 0 26px 26px; overflow: hidden; }
}
@media (max-width: 360px) {
  .hero-big { font-size: 25px; }
  .actions { grid-template-columns: 1fr 1fr 1fr; }
  .action { font-size: 12px; }
}
