﻿@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }

/* ==========================================================================
   SOS Truck Rescue design system
   Light, quiet surfaces; one red for emergencies and primary intent.
   ========================================================================== */
:root {
  --gray-0: #ffffff; --gray-25: #fbfbfa; --gray-50: #f7f7f5; --gray-100: #f1f1ef; --gray-150: #ebebe8;
  --gray-200: #e3e3df; --gray-300: #d3d3ce; --gray-400: #a8a8a2; --gray-500: #6b6b65; --gray-600: #5f5f5a;
  --gray-700: #45453f; --gray-800: #2f2f2b; --gray-900: #1d1d1b;
  --brand: #c4361c; --brand-hover: #a92c15; --brand-active: #8f2411; --brand-tint: #fbefec;
  --purple-text: #6340a8; --purple-tint: #f3effb; --purple-dot: #8a63d2;
  --blue-text: #1f5fa8;   --blue-tint: #ebf3fc;   --blue-dot: #3b82d6;
  --green-text: #2c6e44;  --green-tint: #ebf6ee;  --green-dot: #3fa564;
  --amber-text: #8a5300;  --amber-tint: #fdf4e3;  --amber-dot: #e09a1f;
  --red-text: #b42318;    --red-tint: #fdeeec;    --red-dot: #e0483a;
  --gray-text: #55554f;   --gray-tint: #f1f1ef;   --gray-dot: #a8a8a2;
  --bg: var(--gray-0); --surface: var(--gray-0); --surface-muted: var(--gray-50); --sidebar-bg: var(--gray-50);
  --text: var(--gray-900); --text-2: var(--gray-600); --text-3: var(--gray-500);
  --border: var(--gray-200); --border-strong: var(--gray-300);
  --hover: rgba(55, 53, 47, .06); --active: rgba(55, 53, 47, .1);
  --focus: 0 0 0 2px #fff, 0 0 0 4px #2f6fdb;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Condensed", "IBM Plex Sans", system-ui, sans-serif;
  --fs-xs: .75rem; --fs-sm: .8125rem; --fs-base: .9375rem; --fs-md: 1rem; --fs-lg: 1.125rem;
  --fs-xl: 1.375rem; --fs-2xl: 1.75rem; --fs-3xl: 2.25rem; --fs-4xl: 3rem;
  --lh-tight: 1.2; --lh: 1.55;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px; --s20: 80px;
  --r-sm: 6px; --r: 8px; --r-lg: 12px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15, 15, 15, .05);
  --shadow: 0 1px 3px rgba(15, 15, 15, .06), 0 4px 12px rgba(15, 15, 15, .05);
  --shadow-lg: 0 0 0 1px rgba(15, 15, 15, .05), 0 8px 24px rgba(15, 15, 15, .12), 0 24px 48px rgba(15, 15, 15, .08);
  --sidebar-w: 248px; --rail-w: 72px; --appbar-h: 56px; --tabbar-h: 64px;
  --content-w: 1120px; --wide-w: 1280px; --narrow-w: 560px; --prose-w: 70ch;
  --z-sticky: 20; --z-sidebar: 30; --z-tabbar: 40; --z-menu: 50; --z-toast: 70; --z-skip: 90;
  --ease: cubic-bezier(.2, 0, 0, 1);
  color-scheme: light;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--fs-base)/var(--lh) var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
svg.icon { flex: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: var(--lh-tight); letter-spacing: -.01em; color: var(--text); }
h1 { font-size: var(--fs-2xl); letter-spacing: -.02em; }
h2 { font-size: var(--fs-lg); }
h3, .h3 { font-size: var(--fs-md); }
p { margin: 0; }
a { color: inherit; text-underline-offset: 2px; }
p a, li a, dd a, .link { color: var(--blue-text); text-decoration: underline; text-decoration-color: rgba(31, 95, 168, .35); }
p a:hover, li a:hover, dd a:hover, .link:hover { text-decoration-color: currentColor; }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
::selection { background: rgba(47, 111, 219, .18); }
strong { font-weight: 600; }
small, .small { font-size: var(--fs-sm); }
.muted { color: var(--text-2); }
.center { text-align: center; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.skip { position: fixed; left: var(--s3); top: var(--s3); z-index: var(--z-skip); display: inline-flex; align-items: center; min-height: 44px; padding: var(--s2) var(--s4); background: var(--gray-900); color: #fff; border-radius: var(--r); text-decoration: none; transform: translateY(-200%); }
.skip:focus { transform: none; }
.icon { width: 20px; height: 20px; }
mark.placeholder { background: var(--amber-tint); color: var(--amber-text); border: 1px dashed var(--amber-dot); border-radius: 4px; padding: 0 4px; font-weight: 500; }

/* Layout primitives */
.stack { display: flex; flex-direction: column; gap: var(--s4); }
.stack-lg { display: flex; flex-direction: column; gap: var(--s6); }
.button-row, .form-actions, .action-row, .empty-actions, .hero-actions { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.form-footer { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; padding-top: var(--s2); }
.grid-2, .grid-3 { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
.grid-2.tight, .grid-3.tight { gap: var(--s3); }
@media (min-width: 560px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.grid-main { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .grid-main { grid-template-columns: minmax(0, 1fr) 360px; } }
.container { width: 100%; max-width: var(--content-w); margin: 0 auto; padding: 0 var(--s5); }
.container-narrow, .container.narrow { max-width: var(--narrow-w); }
.divider { display: flex; align-items: center; gap: var(--s3); margin: var(--s1) 0; color: var(--text-3); font-size: var(--fs-sm); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Buttons */
.btn { --btn-h: 44px; display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: var(--btn-h); padding: 0 var(--s4); border: 1px solid transparent; border-radius: var(--r); background: transparent; font-size: var(--fs-base); font-weight: 500; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; user-select: none; transition: background-color .12s var(--ease), border-color .12s var(--ease), color .12s var(--ease), box-shadow .12s var(--ease); position: relative; }
.btn .icon { width: 18px; height: 18px; }
.btn:focus-visible { box-shadow: var(--focus); border-radius: var(--r); }
.btn-primary { background: var(--gray-900); color: #fff; }
.btn-primary:hover { background: var(--gray-700); }
.btn-primary:active { background: #000; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-400); }
.btn-secondary:active { background: var(--gray-100); }
.btn-ghost { color: var(--text); }
.btn-ghost:hover { background: var(--hover); }
.btn-ghost:active { background: var(--active); }
.btn-emergency, .btn-danger { background: var(--brand); color: #fff; }
.btn-emergency:hover, .btn-danger:hover { background: var(--brand-hover); }
.btn-emergency:active, .btn-danger:active { background: var(--brand-active); }
.btn-emergency { font-weight: 600; }
.btn-danger-soft { background: var(--red-tint); color: var(--red-text); }
.btn-danger-soft:hover { background: #fbe0dc; }
.btn-danger-soft:active { background: #f7cfc9; }
.btn-sm { --btn-h: 32px; padding: 0 var(--s3); font-size: var(--fs-sm); }
.btn-lg { --btn-h: 44px; padding: 0 var(--s5); font-size: var(--fs-md); }
.btn-xl { --btn-h: 56px; padding: 0 var(--s6); font-size: var(--fs-lg); border-radius: var(--r-lg); }
.btn-block { width: 100%; }
.btn-icon-sm { --btn-h: 32px; width: 32px; padding: 0; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading > * { visibility: hidden; }
.btn.is-loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%; border: 2px solid; border-color: rgba(255, 255, 255, .9) rgba(255, 255, 255, .9) rgba(255, 255, 255, .25) rgba(255, 255, 255, .25); animation: spin .7s linear infinite; }
.btn-secondary.is-loading::after, .btn-ghost.is-loading::after, .btn-danger-soft.is-loading::after { border-color: var(--gray-700) var(--gray-700) var(--gray-300) var(--gray-300); }
@keyframes spin { to { transform: rotate(360deg); } }
.link-action { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue-text); font-size: var(--fs-sm); font-weight: 500; text-decoration: none; }
.link-action:hover { text-decoration: underline; }
.back-link { display: inline-flex; align-items: center; gap: var(--s1); min-height: 44px; margin-left: -8px; padding: 0 8px; border-radius: var(--r-sm); color: var(--text-2); font-size: var(--fs-sm); text-decoration: none; align-self: flex-start; }
.back-link:hover { background: var(--hover); color: var(--text); }
.back-link .icon { width: 16px; height: 16px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label-strong { font-size: var(--fs-sm); font-weight: 500; color: var(--gray-800); }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.label-row { align-items: center; }
.label-row a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; margin-right: -6px; font-size: var(--fs-sm); }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--r); background-color: var(--surface); color: var(--text); font-size: 16px; line-height: 1.4; box-shadow: var(--shadow-sm); transition: border-color .12s, box-shadow .12s; appearance: none; }
@media (min-width: 768px) { input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]), select, textarea { font-size: var(--fs-base); } }
textarea { min-height: 104px; resize: vertical; }
select { padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237c7c76' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
input:hover, select:hover, textarea:hover { border-color: var(--gray-400); }
input:focus, select:focus, textarea:focus { border-color: #2f6fdb !important; box-shadow: 0 0 0 3px rgba(47, 111, 219, .2) !important; border-radius: var(--r); outline: none; }
::placeholder { color: var(--gray-400); }
[aria-invalid="true"] { border-color: var(--red-dot) !important; }
.hint { color: var(--text-2); font-size: var(--fs-sm); }
.field-error { display: flex; gap: 6px; align-items: flex-start; color: var(--red-text); font-size: var(--fs-sm); font-weight: 500; }
.field-error::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: .5em; border-radius: 50%; background: var(--red-dot); }
fieldset { margin: 0; min-width: 0; border: 1px solid var(--border); }
fieldset.card { display: flex; flex-direction: column; gap: var(--s4); }
legend { float: left; width: 100%; padding: 0; margin-bottom: var(--s1); font-size: var(--fs-md); font-weight: 600; color: var(--text); }
legend + * { clear: both; }
input[type=radio] { width: 24px; height: 24px; margin: 0; accent-color: var(--gray-900); flex: none; }
input[type=checkbox] {
  appearance: none; position: relative; flex: none;
  width: 44px; height: 44px; margin: -10px 0 -10px -10px;
  background: transparent; border: 0; border-radius: var(--r); cursor: pointer;
}
input[type=checkbox]::before {
  content: ""; position: absolute; left: 11px; top: 11px;
  width: 22px; height: 22px; border-radius: 5px;
  border: 1.5px solid var(--gray-400); background: var(--surface);
  transition: background-color .12s, border-color .12s;
}
input[type=checkbox]:checked::before { background: var(--gray-900); border-color: var(--gray-900); }
input[type=checkbox]:checked::after {
  content: ""; position: absolute; left: 18px; top: 14px;
  width: 7px; height: 12px; border: solid #fff; border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
input[type=checkbox]:focus-visible { box-shadow: var(--focus); outline: none; }
.check { display: flex; align-items: center; gap: var(--s2); min-height: 44px; cursor: pointer; }
.check input { margin-top: 0; }
.check a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 4px; }
.check-grid { display: grid; gap: var(--s2); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.check-tile { position: relative; display: flex; align-items: center; gap: var(--s3); min-height: 44px; padding: 0 var(--s3); border: 1px solid var(--border); border-radius: var(--r); cursor: pointer; transition: background-color .12s, border-color .12s; }
.check-tile:hover { background: var(--gray-50); }
.check-tile:has(input:checked) { border-color: var(--gray-900); background: var(--gray-50); }
.check-tile:has(input:focus-visible) { box-shadow: var(--focus); }
.input-group { display: flex; gap: var(--s2); }
.input-group input { flex: 1; min-width: 0; }
.file-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s2); min-height: 112px; padding: var(--s5); border: 1px dashed var(--border-strong); border-radius: var(--r-lg); background: var(--gray-25); color: var(--text-2); text-align: center; cursor: pointer; }
.file-drop:hover { background: var(--gray-50); border-color: var(--gray-400); }
.file-drop:focus-within { box-shadow: var(--focus); }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.hours-grid { display: grid; grid-template-columns: minmax(80px, auto) 1fr 1fr; gap: var(--s2) var(--s3); align-items: center; }
.part-rows { display: flex; flex-direction: column; gap: var(--s3); }
.part-row { padding: var(--s4); border: 1px solid var(--border); border-radius: var(--r); display: flex; flex-direction: column; gap: var(--s3); }
.part-row.is-new { border-style: dashed; background: var(--gray-25); }
.grid-part { display: grid; gap: var(--s3); grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-part { grid-template-columns: 2fr 1.2fr 1fr; } }
.segmented { display: flex; padding: 3px; gap: 2px; background: var(--gray-100); border-radius: var(--r); }
.segmented a { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 var(--s3); border-radius: 6px; color: var(--text-2); font-weight: 500; text-decoration: none; text-align: center; }
.segmented a:hover { color: var(--text); }
.segmented a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(15, 15, 15, .1); }
.role-pick { display: grid; gap: var(--s2); grid-template-columns: 1fr; border: 0; padding: 0; }
@media (min-width: 480px) { .role-pick { grid-template-columns: 1fr 1fr; } }
.role-option { position: relative; }
.role-option input { position: absolute; left: var(--s4); top: 50%; transform: translateY(-50%); width: 24px; height: 24px; margin: 0; accent-color: var(--gray-900); cursor: pointer; }
.role-option > label { display: grid; grid-template-columns: auto 1fr; gap: 2px var(--s3); align-items: center; height: 100%; min-height: 56px; padding: var(--s3) var(--s4) var(--s3) calc(var(--s4) + 34px); border: 1px solid var(--border); border-radius: var(--r); cursor: pointer; font-weight: 400; }
.role-option > label .icon { grid-row: span 2; color: var(--text-2); }
.role-option em { font-style: normal; color: var(--text-2); font-size: var(--fs-sm); }
.role-option:hover > label { background: var(--gray-50); }
.role-option input:checked + label { border-color: var(--gray-900); background: var(--gray-50); box-shadow: inset 0 0 0 1px var(--gray-900); }
.role-option input:checked + label .icon { color: var(--brand); }
.role-option input:focus-visible + label { box-shadow: var(--focus); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); min-width: 0; }
.card-pad { padding: var(--s5); }
@media (min-width: 768px) { .card-pad { padding: var(--s6); } }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; padding: var(--s4) var(--s5); border-bottom: 1px solid var(--border); }
.card-title { font-size: var(--fs-md); }
.card-body { padding: var(--s5); }
.card-accent { border-top: 3px solid var(--blue-dot); }
.card-danger { border-color: #f4cdc8; }
.card h2.h3, .card > h2 { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-md); }
.card h2.h3 .icon { color: var(--text-2); }
.disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 44px; cursor: pointer; list-style: none; font-weight: 500; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid var(--text-3); border-bottom: 1.5px solid var(--text-3); transform: rotate(45deg); transition: transform .15s; flex: none; margin-right: 4px; }
.disclosure[open] > summary::after { transform: rotate(-135deg); }
.disclosure[open] > summary { margin-bottom: var(--s4); }
.facts { display: grid; gap: var(--s3); margin: 0; }
.facts > div { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: var(--s3); padding-bottom: var(--s3); border-bottom: 1px solid var(--gray-100); }
.facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { color: var(--text-2); font-size: var(--fs-sm); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.facts-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--s4); }
.facts-grid > div { display: flex; flex-direction: column; gap: 2px; border: 0; padding: 0; }
.kv { display: grid; gap: var(--s4); margin: 0; }
.kv > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px var(--s3); padding-bottom: var(--s4); border-bottom: 1px solid var(--gray-150); }
.kv > div:last-child { padding-bottom: 0; border-bottom: 0; }
.kv dt { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: var(--fs-sm); }
.kv dt .icon { width: 16px; height: 16px; color: var(--text-3); }
.kv dd { margin: 0; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.kv dd .muted { font-weight: 400; }
.icon-tile, .tile-icon { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r); background: var(--gray-100); color: var(--gray-800); }
.icon-tile .icon, .tile-icon .icon { width: 20px; height: 20px; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 22px; padding: 1px 8px 1px 7px; border-radius: var(--r-pill); background: var(--gray-tint); color: var(--gray-text); font-size: var(--fs-xs); font-weight: 500; line-height: 1.4; white-space: nowrap; vertical-align: middle; }
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gray-dot); flex: none; }
.pill-purple { background: var(--purple-tint); color: var(--purple-text); } .pill-purple .pill-dot { background: var(--purple-dot); }
.pill-blue { background: var(--blue-tint); color: var(--blue-text); } .pill-blue .pill-dot { background: var(--blue-dot); }
.pill-green { background: var(--green-tint); color: var(--green-text); } .pill-green .pill-dot { background: var(--green-dot); }
.pill-amber { background: var(--amber-tint); color: var(--amber-text); } .pill-amber .pill-dot { background: var(--amber-dot); }
.pill-red { background: var(--red-tint); color: var(--red-text); } .pill-red .pill-dot { background: var(--red-dot); }
.count, .tab-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--gray-100); color: var(--text-2); font-size: var(--fs-xs); font-weight: 500; }
.verified { display: flex; align-items: center; gap: var(--s2); color: var(--green-text); font-size: var(--fs-sm); font-weight: 500; }
.verified .icon { width: 18px; height: 18px; }

/* Alerts */
.alert { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--gray-50); color: var(--gray-800); }
.alert > .icon { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.alert p { min-width: 0; }
.alert-info { background: var(--blue-tint); color: #1a4d87; }
.alert-success { background: var(--green-tint); color: var(--green-text); }
.alert-warning { background: var(--amber-tint); color: #6e4300; }
.alert-danger { background: var(--red-tint); color: #922016; }
.alert-neutral { background: var(--gray-100); color: var(--gray-700); }
.alert a { color: inherit; font-weight: 600; }
.alert-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }

/* Tables */
.table-wrap { position: relative; border: 1px solid var(--border); border-radius: var(--r-lg); overflow-x: auto; background: var(--surface); }
.table .truncate { max-width: 32ch; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px var(--s4); text-align: left; vertical-align: middle; border-bottom: 1px solid var(--gray-150); }
.table thead th { background: var(--gray-25); color: var(--text-2); font-size: var(--fs-xs); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody tr:hover { background: var(--gray-25); }
.table tbody th { font-weight: 500; }
.cell-main { display: block; font-weight: 500; }
.table time { white-space: nowrap; }
.cell-action { text-align: right; white-space: nowrap; width: 1%; }
.row-link { display: flex; align-items: center; gap: var(--s3); min-height: 32px; min-width: 0; color: var(--text); font-weight: 500; text-decoration: none; }
.row-link:hover { text-decoration: underline; }
.row-icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-sm); background: var(--gray-100); color: var(--text-2); }
.row-icon .icon { width: 16px; height: 16px; }
.table-empty { padding: var(--s6); text-align: center; color: var(--text-2); }
@media (max-width: 1120px) {
  .table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack th, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--gray-150); }
  .table-stack tbody tr:last-child { border-bottom: 0; }
  .table-stack th, .table-stack td { padding: 4px 0; border: 0; text-align: left; }
  .table-stack td[data-label] { display: grid; grid-template-columns: minmax(96px, 34%) minmax(0, 1fr); gap: var(--s3); align-items: center; }
  .table-stack td[data-label]::before { content: attr(data-label); color: var(--text-2); font-size: var(--fs-sm); }
  .table-stack tr > :first-child { padding-bottom: var(--s2); }
  .table-stack .cell-action { width: 100%; text-align: left; padding-top: var(--s2); }
  .table-stack .cell-action .btn { width: 100%; min-height: 44px; }
  .prose-table td[data-label] { display: block; }
  .prose-table td[data-label]::before { display: block; margin-bottom: 2px; font-weight: 500; }
}

/* Tabs */
.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--border); margin-bottom: var(--s4); overflow-x: auto; scrollbar-width: none; }
.tab { display: inline-flex; align-items: center; gap: var(--s2); min-height: 40px; padding: 0 var(--s3); margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--text-2); font-weight: 500; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--gray-900); }
.tab:focus-visible { border-radius: var(--r-sm) var(--r-sm) 0 0; }

/* Menus */
.menu-wrap { position: relative; }
.menu { position: absolute; z-index: var(--z-menu); top: calc(100% + 6px); right: 0; min-width: 232px; max-width: min(320px, calc(100vw - 24px)); padding: 6px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); animation: pop .12s var(--ease); }
.menu-up .menu { top: auto; bottom: calc(100% + 6px); left: 0; right: 0; }
.action-row .menu-wrap .menu, .kcard-actions .menu { right: auto; left: 0; }
.menu [role=menuitem] { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 36px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--text); font-size: var(--fs-base); text-align: left; text-decoration: none; }
.menu [role=menuitem] .icon { width: 18px; height: 18px; color: var(--text-2); }
.menu [role=menuitem]:hover, .menu [role=menuitem]:focus-visible { background: var(--hover); box-shadow: none; }
.menu-header { display: flex; flex-direction: column; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--gray-150); min-width: 0; }
.menu-header span { color: var(--text-2); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; }
.menu-meta { margin-left: auto; color: var(--text-3); font-size: var(--fs-sm); }
.menu-sep { height: 1px; margin: 4px 0; background: var(--gray-150); }
.menu-form, .menu form { margin: 0; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.account-button { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 44px; padding: 6px 8px; border: 0; border-radius: var(--r); background: none; text-align: left; }
.account-button:hover, .account-button[aria-expanded="true"] { background: var(--hover); }
.account-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.account-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-text span { color: var(--text-2); font-size: var(--fs-xs); }
.account-caret { width: 16px !important; height: 16px !important; color: var(--text-3); }
.avatar { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-sm); background: var(--gray-800); color: #fff; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em; }
.avatar-lg { width: 56px; height: 56px; border-radius: var(--r-lg); font-size: var(--fs-lg); }
.menu-compact .account-button { width: auto; min-height: 44px; min-width: 44px; padding: 6px; justify-content: center; }
.menu-compact .account-text, .menu-compact .account-caret { display: none; }
.menu-compact .avatar { width: 32px; height: 32px; }

/* Dialog */
.dialog { width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); overflow: auto; }
.dialog[open] { animation: pop .15s var(--ease); }
.dialog::backdrop { background: rgba(15, 15, 15, .4); }
.dialog-body { display: flex; gap: var(--s4); padding: var(--s6) var(--s6) var(--s4); }
.dialog-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--red-tint); color: var(--red-text); }
.dialog-title { font-size: var(--fs-lg); margin-bottom: var(--s1); overflow-wrap: anywhere; }
.dialog-text { color: var(--text-2); }
.dialog-fields { padding: 0 var(--s6) var(--s4); }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--s2); padding: var(--s4) var(--s6); background: var(--gray-25); border-top: 1px solid var(--gray-150); }
.dialog form.stack { gap: 0; }
@media (max-width: 479px) { .dialog-actions .btn { flex: 1; min-height: 44px; } .dialog-body { padding: var(--s5) var(--s5) var(--s3); } .dialog-fields { padding: 0 var(--s5) var(--s3); } }

/* Toasts */
.toasts { position: fixed; z-index: var(--z-toast); right: var(--s5); bottom: var(--s5); display: flex; flex-direction: column; gap: var(--s2); width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s3) var(--s3) var(--s3) var(--s4); border-radius: var(--r-lg); background: var(--gray-900); color: #fff; box-shadow: var(--shadow-lg); animation: toast-in .2s var(--ease); }
.toast p { flex: 1; min-width: 0; padding-top: 2px; }
.toast-icon { width: 18px; height: 18px; margin-top: 3px; flex: none; }
.toast-success .toast-icon { color: #7ad69a; }
.toast-error .toast-icon { color: #ff9a8e; }
.toast-close { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: var(--r-sm); background: transparent; color: rgba(255, 255, 255, .75); }
.toast-close:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.toast-close .icon { width: 16px; height: 16px; }
.toast.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 767px) { .toasts { left: 16px; right: 16px; width: auto; bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); } body.public .toasts { bottom: 16px; } }

/* Skeletons, empty states */
.skeleton { background: linear-gradient(90deg, var(--gray-100) 0, var(--gray-50) 40%, var(--gray-100) 80%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--r); }
@keyframes shimmer { to { background-position: -150% 0; } }
.empty { display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding: var(--s10) var(--s5); border: 1px dashed var(--border-strong); border-radius: var(--r-lg); text-align: center; color: var(--text-2); }
.empty-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: var(--s1); border-radius: var(--r-lg); background: var(--gray-100); color: var(--text-2); }
.empty-title { font-size: var(--fs-md); color: var(--text); }
.empty p { max-width: 42ch; }
.empty-actions { margin-top: var(--s2); justify-content: center; }

/* Page header */
.page-head { display: flex; flex-direction: column; gap: var(--s3); margin-bottom: var(--s6); }
.page-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s4); }
.page-head-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 280px; }
.page-head h1 { font-size: var(--fs-2xl); overflow-wrap: anywhere; }
@media (min-width: 1024px) { .page-head h1 { font-size: 2rem; } .page-head { margin-bottom: var(--s8); } }
.kicker { color: var(--text-2); font-size: var(--fs-sm); font-weight: 500; }
.eyebrow { color: var(--brand); text-transform: uppercase; letter-spacing: .06em; font-size: var(--fs-xs); font-weight: 600; }
.lead { color: var(--text-2); font-size: var(--fs-md); max-width: 62ch; }
.page-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.section-block { display: flex; flex-direction: column; gap: var(--s4); margin-top: var(--s8); }
.section-block:first-child { margin-top: 0; }
.section-head { display: flex; align-items: center; gap: var(--s3); }
.section-head h2 { font-size: var(--fs-md); display: flex; align-items: center; gap: var(--s2); }
.section-head > a, .section-head > .btn { margin-left: auto; }
.progress { display: flex; flex-direction: column; gap: var(--s2); max-width: 420px; }
.progress-label { color: var(--text-2); font-size: var(--fs-sm); }
.progress-label strong { color: var(--text); }
.progress-bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; list-style: none; }
.progress-bar li { height: 4px; border-radius: 2px; background: var(--gray-150); }
.progress-bar li[data-state="done"] { background: var(--gray-800); }
.progress-bar li[data-state="now"] { background: var(--brand); }

/* Stats */
.stats { display: grid; gap: var(--s3); grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: var(--s6); }
@media (min-width: 1024px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); } }
.stat { display: flex; flex-direction: column; gap: 4px; padding: var(--s4); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); min-width: 0; }
.stat-label { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: var(--fs-sm); font-weight: 500; }
.stat-label .icon { width: 16px; height: 16px; color: var(--text-3); }
.stat-value { font-size: 1.75rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-value-sm { font-size: var(--fs-lg); }
.stat-value .pill { font-size: var(--fs-sm); min-height: 26px; padding: 2px 10px; letter-spacing: 0; }
.stat-note { color: var(--text-3); font-size: var(--fs-xs); }
.stat-accent { border-color: #e6dcf7; background: var(--purple-tint); }
.stat-accent .stat-label, .stat-accent .stat-label .icon { color: var(--purple-text); }
.stat-warn { border-color: #f5e2bd; background: var(--amber-tint); }
.stat-warn .stat-label, .stat-warn .stat-label .icon { color: var(--amber-text); }

/* App shell: phone = appbar + tabbar, tablet = icon rail, laptop = sidebar */
.shell { min-height: 100vh; }
.sidebar { display: none; }
.appbar { position: sticky; top: 0; z-index: var(--z-sticky); display: flex; align-items: center; justify-content: space-between; gap: var(--s3); height: var(--appbar-h); padding: 0 var(--s4); background: rgba(255, 255, 255, .94); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text); text-decoration: none; font-weight: 600; min-width: 0; }
.brand-mark { display: block; width: 32px; height: 32px; flex: none; border-radius: 7px; shape-rendering: geometricPrecision; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06); }
.brand:focus-visible { border-radius: var(--r-md); }
.brand-text { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; letter-spacing: .01em; text-transform: uppercase; white-space: nowrap; }
.main { display: block; outline: none; }
.page { width: 100%; max-width: var(--content-w); margin: 0 auto; padding: var(--s6) var(--s4) var(--s10); }
.app .page { padding-bottom: calc(var(--tabbar-h) + var(--s10)); }
.stopbar { border-bottom: 1px solid var(--border); background: var(--gray-25); }
.stopbar-inner { display: flex; align-items: center; gap: var(--s2); max-width: var(--content-w); margin: 0 auto; min-height: 40px; padding: 4px var(--s4); font-size: var(--fs-sm); }
.stopbar-inner p { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stopbar-icon { width: 16px; height: 16px; color: var(--brand); }
.stopbar-label { color: var(--text-2); }
.stopbar-action { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s3); border-radius: var(--r-sm); color: var(--blue-text); font-weight: 500; text-decoration: none; }
.stopbar-action:hover { background: var(--hover); }
.tabbar { position: fixed; z-index: var(--z-tabbar); left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; align-items: stretch; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 0 4px env(safe-area-inset-bottom); background: rgba(255, 255, 255, .97); backdrop-filter: saturate(180%) blur(12px); border-top: 1px solid var(--border); }
.tabbar a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; min-height: 48px; color: var(--text-2); font-size: 11px; font-weight: 500; text-decoration: none; }
.tabbar a .icon { width: 22px; height: 22px; }
.tabbar a .nav-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.tabbar a[aria-current="page"] { color: var(--text); }
.tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; border-radius: 0 0 2px 2px; background: var(--text); }
.tabbar a:focus-visible { border-radius: var(--r); }
.tabbar .tab-sos { color: var(--brand); }
.tabbar .tab-sos .icon { width: 44px; height: 44px; padding: 11px; margin-top: -16px; border-radius: 50%; background: var(--brand); color: #fff; box-shadow: 0 0 0 4px #fff, 0 2px 8px rgba(196, 54, 28, .35); }
.nav-dot { position: absolute; top: 8px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px #fff; }
.app-footer { display: none; }
@media (min-width: 768px) {
  .shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); }
  .sidebar { position: sticky; top: 0; z-index: var(--z-sidebar); display: flex; flex-direction: column; gap: var(--s2); height: 100vh; padding: var(--s3) var(--s2); background: var(--sidebar-bg); border-right: 1px solid var(--border); }
  .appbar, .tabbar, body.home .tabbar { display: none; }
  .app .page { padding: var(--s8) var(--s6) var(--s12); }
  .app-footer { display: block; }
  .sidebar-head { padding: 4px 0; }
  .sidebar .brand-text, .sidebar .nav-label, .sidebar .side-label, .sidebar .account-text, .sidebar .account-caret { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sidebar .brand { justify-content: center; width: 100%; }
  .side-nav { display: flex; flex-direction: column; gap: 2px; }
  .side-nav a { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: var(--r); color: var(--gray-700); font-weight: 500; text-decoration: none; }
  .side-nav a .icon { width: 20px; height: 20px; color: var(--gray-500); }
  .side-nav a:hover { background: var(--hover); color: var(--text); }
  .side-nav a[aria-current="page"] { background: var(--active); color: var(--text); }
  .side-nav a[aria-current="page"] .icon { color: var(--text); }
  .side-nav .nav-dot { top: 8px; right: 12px; }
  .side-label { margin: var(--s4) 10px 4px; color: var(--text-3); font-size: var(--fs-xs); font-weight: 500; }
  .sidebar-sos { min-height: 44px; padding: 0; margin: var(--s1) 0 var(--s2); }
  .sidebar-foot { margin-top: auto; }
  .sidebar .account-button { justify-content: center; }
  .sidebar .menu { left: 0; right: auto; width: 248px; }
}
@media (min-width: 1024px) {
  .shell { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .sidebar { padding: var(--s3); }
  .sidebar .brand-text, .sidebar .nav-label, .sidebar .side-label, .sidebar .account-text, .sidebar .account-caret { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .sidebar .account-text { overflow: hidden; }
  .sidebar .brand { justify-content: flex-start; padding: 0 6px; }
  .side-nav a { justify-content: flex-start; min-height: 34px; }
  .side-nav .nav-dot { position: static; margin-left: auto; box-shadow: none; }
  .sidebar-sos { padding: 0 var(--s4); min-height: 40px; }
  .sidebar .account-button { justify-content: flex-start; }
  .sidebar .menu { width: auto; right: 0; }
  .stopbar-inner { padding-left: var(--s10); padding-right: var(--s10); }
  .app .page { padding: var(--s10) var(--s10) var(--s16); }
}
@media (min-width: 1600px) { .app .page, .stopbar-inner { max-width: var(--wide-w); } }

/* Public chrome */
.topbar { position: sticky; top: 0; z-index: var(--z-sticky); background: rgba(255, 255, 255, .94); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; gap: var(--s4); max-width: var(--wide-w); height: 60px; margin: 0 auto; padding: 0 var(--s4); }
.topbar-nav { display: none; gap: var(--s1); }
.topbar-nav a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--s3); border-radius: var(--r); color: var(--text-2); font-weight: 500; text-decoration: none; }
.topbar-nav a:hover { background: var(--hover); color: var(--text); }
.topbar-actions { display: flex; align-items: center; gap: var(--s1); margin-left: auto; }
@media (min-width: 900px) { .topbar-nav { display: flex; } .topbar-inner { padding: 0 var(--s6); } }
@media (max-width: 479px) { .hide-xs { display: none !important; } .topbar .brand-text { font-size: 1.125rem; } .topbar-actions .btn { padding: 0 10px; } .topbar-inner { gap: var(--s2); } }
@media (min-width: 480px) { .show-xs { display: none !important; } }
.public-main { display: block; min-height: 60vh; }
.section { padding: var(--s12) 0; }
@media (min-width: 768px) { .section { padding: var(--s16) 0; } }
.public-main > .container.section { padding-top: var(--s10); }
.container.section { padding-left: var(--s5); padding-right: var(--s5); }
.section-muted { background: var(--gray-50); border-top: 1px solid var(--gray-150); border-bottom: 1px solid var(--gray-150); }
.section-intro { display: flex; flex-direction: column; gap: var(--s2); max-width: 640px; margin-bottom: var(--s8); }
.section-intro h2, .audience h2, .cta h2, #lang-title { font-size: var(--fs-2xl); letter-spacing: -.02em; }

/* Landing */
.hero { padding: var(--s12) 0; border-bottom: 1px solid var(--gray-150); }
.hero-inner { display: grid; gap: var(--s10); align-items: center; max-width: var(--wide-w); }
@media (min-width: 960px) { .hero { padding: var(--s20) 0; } .hero-inner { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--s16); } }
.hero-copy { display: flex; flex-direction: column; gap: var(--s5); }
.hero h1 { font-size: clamp(2.125rem, 5vw, 3.5rem); line-height: 1.05; letter-spacing: -.035em; max-width: 16ch; }
.hero-lead { color: var(--text-2); font-size: var(--fs-lg); max-width: 52ch; }
.hero-actions { margin-top: var(--s2); }
@media (max-width: 479px) { .hero-actions .btn { width: 100%; } }
.hero-signin { color: var(--text-2); font-size: var(--fs-sm); }
.hero-panel { padding: var(--s6); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--gray-25); }
.hero-panel-title { margin-bottom: var(--s5); color: var(--text-2); font-size: var(--fs-sm); font-weight: 500; }
.flow { display: flex; flex-direction: column; gap: var(--s5); list-style: none; }
.flow li { display: flex; gap: var(--s4); }
.flow-num { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border-strong); font-size: var(--fs-sm); font-weight: 600; }
.flow p { color: var(--text-2); margin-top: 2px; }
.hero-safety { display: flex; gap: var(--s2); margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--border); color: var(--text-2); font-size: var(--fs-sm); }
.hero-safety .icon { width: 16px; height: 16px; margin-top: 3px; color: var(--amber-dot); }
.feature-grid::after { content: ""; background: var(--surface); grid-column: auto / -1; }
.feature-grid { display: grid; gap: 1px; grid-template-columns: 1fr; list-style: none; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
.feature { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s6); background: var(--surface); }
.feature .tile-icon { margin-bottom: var(--s2); }
.feature p { color: var(--text-2); }
.split { display: grid; gap: var(--s10); }
@media (min-width: 768px) { .split { grid-template-columns: 1fr 1fr; gap: var(--s12); } }
.audience { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s4); scroll-margin-top: 80px; }
.ticks { display: flex; flex-direction: column; gap: var(--s3); list-style: none; }
.ticks li { display: flex; gap: var(--s3); align-items: flex-start; }
.ticks .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--green-dot); }
.trust { display: grid; gap: var(--s8); }
@media (min-width: 768px) { .trust { grid-template-columns: repeat(3, 1fr); } }
.trust-item { display: flex; flex-direction: column; gap: var(--s2); }
.trust-item .icon { width: 22px; height: 22px; margin-bottom: var(--s2); color: var(--text-2); }
.trust-item p { color: var(--text-2); }
.container-narrow.center { display: flex; flex-direction: column; align-items: center; gap: var(--s3); }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s6); }
.cta-inner > div:first-child { display: flex; flex-direction: column; gap: var(--s2); max-width: 560px; }
@media (max-width: 479px) { .cta .button-row .btn { width: 100%; } }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: var(--fs-sm); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s6); max-width: var(--wide-w); margin: 0 auto; padding: var(--s6) var(--s5); }
.app-footer .footer-inner { max-width: var(--content-w); padding: var(--s5) var(--s6); }
@media (min-width: 1024px) { .app-footer .footer-inner { padding: var(--s5) var(--s10); } }
.footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); min-width: 0; }
.footer-brand .brand { flex: none; }
.footer-brand p { color: var(--text-2); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); list-style: none; }
.footer-links a { display: inline-flex; align-items: center; min-height: 24px; color: var(--text-2); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.footer-legal { flex-basis: 100%; color: var(--text-3); font-size: var(--fs-xs); }
.footer-emergency { display: flex; align-items: center; gap: var(--s2); color: var(--text-2); }
.footer-emergency .icon { width: 16px; height: 16px; color: var(--brand); }
@media (min-width: 900px) { .footer-legal { flex-basis: auto; margin-left: auto; } }

/* Auth */
.auth { display: grid; gap: var(--s8); max-width: 1040px; margin: 0 auto; padding: var(--s8) var(--s4) var(--s12); align-items: start; }
@media (min-width: 960px) { .auth { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: var(--s12); padding: var(--s10) var(--s6); } }
.auth-aside { display: none; flex-direction: column; gap: var(--s4); padding-top: var(--s4); }
@media (min-width: 960px) { .auth-aside { display: flex; } }
.auth-aside h2 { font-size: var(--fs-3xl); letter-spacing: -.03em; line-height: 1.1; }
.auth-card { width: 100%; max-width: 440px; margin: 0 auto; padding: var(--s6); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
@media (max-width: 479px) { .auth-card { padding: var(--s2) 0; border: 0; box-shadow: none; } }
.auth-body { display: flex; flex-direction: column; gap: var(--s4); margin-top: var(--s5); }
.auth-body h1, .auth-body h2:first-child { font-size: var(--fs-xl); }
.auth-card form { display: flex; flex-direction: column; gap: var(--s4); }

/* Driver home */
.dash-top { display: grid; gap: var(--s4); margin-bottom: var(--s6); }
@media (min-width: 1024px) { .dash-top { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.sos-card { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s4); padding: var(--s6); border: 1px solid #f3d6d0; border-radius: var(--r-lg); background: var(--brand-tint); }
.sos-card h2 { font-size: var(--fs-xl); letter-spacing: -.015em; }
.sos-copy { display: flex; flex-direction: column; gap: var(--s2); }
.sos-note { display: flex; gap: var(--s2); color: #7d2a1a; font-size: var(--fs-sm); }
.sos-note .icon { width: 16px; height: 16px; margin-top: 3px; }
@media (max-width: 479px) { .sos-card .btn-xl { width: 100%; } }
.summary-card { padding: var(--s5); }
.summary-card h2 { font-size: var(--fs-sm); color: var(--text-2); font-weight: 500; margin-bottom: var(--s4); }
.live-panel .card-body { display: flex; flex-direction: column; gap: var(--s4); }
.live-name { font-size: var(--fs-lg); font-weight: 600; }
.service-grid { display: grid; gap: var(--s2); grid-template-columns: 1fr; list-style: none; }
@media (min-width: 560px) { .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.service-tile { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 64px; padding: var(--s3) var(--s4); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); color: var(--text); text-align: left; text-decoration: none; transition: border-color .12s, background-color .12s, box-shadow .12s; }
.service-tile:hover { border-color: var(--border-strong); background: var(--gray-25); box-shadow: var(--shadow-sm); }
.service-tile:active { background: var(--gray-50); }
.tile-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.tile-text span, .tile-text small { color: var(--text-2); font-size: var(--fs-sm); }
.tile-text strong { color: var(--text); font-size: var(--fs-base); }
.tile-chevron { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.dash-bottom { display: grid; gap: var(--s6); margin-top: var(--s8); }
@media (min-width: 1100px) { .dash-bottom { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.dash-bottom .section-block { margin-top: 0; }

/* Timeline */
.timeline { display: flex; flex-direction: column; list-style: none; }
.timeline li { position: relative; display: flex; align-items: flex-start; gap: var(--s3); padding-bottom: var(--s4); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--gray-150); }
.timeline li:last-child::before { display: none; }
.tl-dot { position: relative; flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--gray-300); background: var(--surface); }
.timeline li[data-state="done"] .tl-dot { border-color: var(--green-dot); background: var(--green-dot); }
.timeline li[data-state="done"]::before { background: var(--green-dot); }
.timeline li[data-state="now"] .tl-dot { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
.tl-label { color: var(--text-2); }
.timeline li[data-state="now"] .tl-label, .timeline li[data-state="done"] .tl-label { color: var(--text); font-weight: 500; }

/* Live indicator */
.live-indicator { display: inline-flex; align-items: center; gap: var(--s2); color: var(--text-2); font-size: var(--fs-sm); }
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--green-dot); flex: none; }
.live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--green-dot); opacity: 0; animation: ping 2s var(--ease) infinite; }
.live-indicator.is-stale .live-dot { background: var(--amber-dot); }
.live-indicator.is-stale .live-dot::after { display: none; }
@keyframes ping { 0% { transform: scale(.6); opacity: .6; } 80%, 100% { transform: scale(1.4); opacity: 0; } }

/* Shop desk board */
.board { display: grid; gap: var(--s4); margin-top: var(--s4); align-items: start; }
@media (min-width: 900px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.board-col { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s3); border-radius: var(--r-lg); background: var(--gray-50); min-width: 0; }
.board-head { display: flex; align-items: center; gap: var(--s2); padding: 2px 4px; }
.board-head h2 { font-size: var(--fs-base); display: flex; align-items: center; gap: var(--s2); }
.board-list { display: flex; flex-direction: column; gap: var(--s2); list-style: none; }
.board-empty { padding: var(--s6) var(--s3); text-align: center; color: var(--text-2); font-size: var(--fs-sm); }
.kcard { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s4); border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-sm); min-width: 0; }
.kcard.is-new { box-shadow: inset 3px 0 0 var(--purple-dot), var(--shadow-sm); }
.kcard-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; }
.kcard-title { display: flex; align-items: center; gap: 6px; font-size: var(--fs-base); font-weight: 600; overflow-wrap: anywhere; }
.kcard-title .icon { width: 16px; height: 16px; color: var(--text-3); }
.kcard-text { color: var(--text-2); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.kcard-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.thumbs { display: flex; flex-wrap: wrap; gap: var(--s2); }
.thumb { width: 56px; height: 56px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--border); }

/* Track & chat */
.chat { display: flex; flex-direction: column; overflow: hidden; }
.chat-title { padding: var(--s4) var(--s5); border-bottom: 1px solid var(--border); }
.chat-log { display: flex; flex-direction: column; gap: var(--s2); max-height: 380px; min-height: 120px; overflow-y: auto; padding: var(--s4) var(--s5); background: var(--gray-25); }
.chat-empty { margin: auto; color: var(--text-2); font-size: var(--fs-sm); }
.bubble { align-self: flex-start; max-width: 85%; padding: 8px 12px; border-radius: 12px 12px 12px 4px; background: var(--surface); border: 1px solid var(--border); overflow-wrap: anywhere; }
.bubble strong { display: block; font-size: var(--fs-xs); color: var(--text-2); font-weight: 500; }
.bubble.is-mine { align-self: flex-end; border-radius: 12px 12px 4px 12px; background: var(--gray-900); border-color: var(--gray-900); color: #fff; }
.bubble.is-mine strong { color: rgba(255, 255, 255, .75); }
.chat form { display: flex; gap: var(--s2); padding: var(--s3) var(--s4); border-top: 1px solid var(--border); }
.chat form input:not([type=hidden]) { flex: 1; min-width: 0; }
.chat form .field { flex: 1; }
.media-row { display: flex; flex-wrap: wrap; gap: var(--s2); }
.media-thumb { width: 88px; height: 88px; object-fit: cover; border-radius: var(--r); border: 1px solid var(--border); }
.media-row audio { width: 100%; max-width: 360px; }
.rating-row { display: flex; flex-wrap: wrap; gap: var(--s2); }
.rate-btn { display: inline-flex; align-items: center; gap: 4px; min-width: 52px; min-height: 44px; padding: 0 var(--s3); border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface); }
.rate-btn .icon { width: 18px; height: 18px; color: var(--amber-dot); }
.rate-btn:hover { background: var(--amber-tint); border-color: var(--amber-dot); }

/* Lists & crews */
.list-cards { display: grid; gap: var(--s2); list-style: none; }
.crew-card { display: flex; align-items: center; gap: var(--s4); padding: var(--s4); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .12s, background-color .12s, box-shadow .12s; }
.crew-card:hover { border-color: var(--border-strong); background: var(--gray-25); box-shadow: var(--shadow-sm); }
.crew-eta { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: var(--r); background: var(--gray-100); }
.crew-eta strong { font-family: var(--font-display); font-size: 1.625rem; line-height: 1; }
.crew-eta span { color: var(--text-2); font-size: var(--fs-xs); }
.crew-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.crew-body h2, .crew-body h3 { font-size: var(--fs-md); }
.crew-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); color: var(--text-2); font-size: var(--fs-sm); }
.rating { display: inline-flex; align-items: center; gap: 4px; }
.rating .icon { width: 14px; height: 14px; color: var(--amber-dot); }
.rows { list-style: none; overflow: hidden; }
.row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--gray-150); }
.row:last-child { border-bottom: 0; }
.row > div { display: flex; flex-direction: column; min-width: 0; }
.choice-list { display: flex; flex-direction: column; gap: var(--s2); list-style: none; }
.choice { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 48px; padding: var(--s2) var(--s4); border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); text-align: left; }
.choice:hover { background: var(--gray-25); border-color: var(--border-strong); }
.choice span { flex: 1; min-width: 0; }
.choice .icon { color: var(--text-3); }
.summary-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); color: var(--text-2); }
.summary-line strong { color: var(--text); }
.price { font-weight: 600; font-variant-numeric: tabular-nums; }
.price-lg { font-size: var(--fs-2xl); letter-spacing: -.02em; }
.fee { color: var(--text-2); }
.line-total { font-size: var(--fs-md); }

/* Parts */
.part-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s3); }
.part-card { display: flex; gap: var(--s3); height: 100%; padding: var(--s4); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .12s, box-shadow .12s, background-color .12s; }
.part-card:hover { border-color: var(--border-strong); background: var(--gray-25); box-shadow: var(--shadow-sm); }
.part-card > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.part-card h2 { font-size: var(--fs-md); overflow-wrap: anywhere; }
.part-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r); background: var(--gray-100); color: var(--text-2); }
.part-hero { display: flex; align-items: center; gap: var(--s4); }
.part-hero > .icon { width: 30px; height: 30px; color: var(--text-2); }
.part-hero > div { display: flex; flex-direction: column; }

/* Account */
.profile-card { display: flex; align-items: center; gap: var(--s4); padding: var(--s5); margin-bottom: var(--s6); }
.profile-text { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.profile-name { font-size: var(--fs-lg); font-weight: 600; overflow-wrap: anywhere; }
.settings { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.settings-row { display: grid; gap: var(--s4); padding: var(--s6) 0; border-bottom: 1px solid var(--border); scroll-margin-top: 80px; }
@media (min-width: 900px) { .settings-row { grid-template-columns: 240px minmax(0, 1fr); gap: var(--s10); } }
.settings-intro { display: flex; flex-direction: column; gap: 4px; }
.settings-intro h2 { font-size: var(--fs-md); }
.settings-intro p { color: var(--text-2); font-size: var(--fs-sm); }
.settings-danger .settings-intro h2 { color: var(--red-text); }
.check-list { display: flex; flex-direction: column; gap: var(--s3); list-style: none; }
.check-list li { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding-bottom: var(--s3); border-bottom: 1px solid var(--gray-150); }
.check-list li > .icon { width: 18px; height: 18px; color: var(--text-3); }
.check-list li > div { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; }
.check-list li > div strong { overflow-wrap: anywhere; }
.check-list li > div span { color: var(--text-2); font-size: var(--fs-sm); }
.language-card { display: flex; flex-direction: column; gap: var(--s4); }
.language-grid { display: grid; gap: var(--s2); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); width: 100%; }
.language-choice { display: flex; align-items: center; min-height: 44px; padding: 0 var(--s4); border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); font-weight: 500; text-align: left; transition: background-color .12s, border-color .12s; }
.language-choice:hover { background: var(--gray-50); border-color: var(--border-strong); }
.language-choice.is-selected, .language-choice[aria-pressed="true"] { border-color: var(--gray-900); box-shadow: inset 0 0 0 1px var(--gray-900); background: var(--gray-50); }

/* Map */
.map { position: relative; height: 320px; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--gray-50); z-index: 0; }
@media (min-width: 1024px) { .map { height: 380px; } }
.map-skeleton { position: absolute; inset: 0; z-index: 500; border-radius: 0; pointer-events: none; transition: opacity .3s; }
.map:not(.is-loading) .map-skeleton { opacity: 0; visibility: hidden; }
.leaflet-container { font: inherit; }
/* Zoom +/- meet 44px WCAG 2.2 AA on touch and phone, with a visible focus ring. */
.leaflet-container .leaflet-bar a,
.leaflet-container.leaflet-touch .leaflet-bar a,
.leaflet-container .leaflet-control-zoom a,
.leaflet-touch .leaflet-bar a,
.leaflet-control-zoom a,
.leaflet-bar a {
  width: 44px;
  height: 44px;
  line-height: 44px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.leaflet-bar { overflow: visible; }
.leaflet-bar a:focus-visible,
.leaflet-control-zoom a:focus-visible {
  outline: 3px solid #2f6fdb;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 5px #2f6fdb;
  z-index: 2;
  position: relative;
  border-radius: 4px;
}

/* Documents */
.doc { max-width: 1040px; }
.policy { display: grid; gap: var(--s8); align-items: start; }
@media (min-width: 1100px) { .policy { grid-template-columns: 220px minmax(0, 1fr); gap: var(--s12); } }
.toc { padding: var(--s4); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--gray-25); }
@media (min-width: 1100px) { .toc { position: sticky; top: 84px; padding: 0; border: 0; background: none; } .app .toc { top: var(--s8); } }
.toc-title { margin-bottom: var(--s2); color: var(--text-2); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.toc ol { list-style: none; display: grid; gap: 2px; }
@media (min-width: 560px) and (max-width: 1099px) { .toc ol { grid-template-columns: 1fr 1fr; column-gap: var(--s4); } }
.toc a { display: flex; align-items: center; min-height: 44px; padding: 0 var(--s2); margin-left: calc(-1 * var(--s2)); border-radius: var(--r-sm); color: var(--text-2); font-size: var(--fs-sm); text-decoration: none; }
.toc a:hover { background: var(--hover); color: var(--text); }
.prose { max-width: var(--prose-w); font-size: var(--fs-md); line-height: 1.7; color: var(--gray-800); min-width: 0; }
.prose > .lead { font-size: var(--fs-lg); line-height: 1.6; color: var(--text-2); margin-bottom: var(--s8); }
.prose section { margin-bottom: var(--s8); scroll-margin-top: 84px; }
.prose h2 { display: flex; gap: var(--s2); margin-bottom: var(--s3); font-size: var(--fs-xl); letter-spacing: -.015em; color: var(--text); }
.prose-num { color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: var(--s3); }
.prose ul { padding-left: 1.25em; display: grid; gap: var(--s2); }
.prose li::marker { color: var(--text-3); }
.prose .table-wrap { margin-top: var(--s4); font-size: var(--fs-base); line-height: 1.55; }
.prose .table td, .prose .table th { vertical-align: top; padding: var(--s3) var(--s4); }
.prose .table tbody th { min-width: 120px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .skeleton { animation: none; }
}
@media print { .sidebar, .appbar, .tabbar, .topbar, .site-footer, .toasts, .stopbar { display: none !important; } .shell { display: block; } }

/* Small fixes */
.summary > div { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.summary .price { font-size: var(--fs-xl); }
p > .icon, .hint > .icon { display: inline-block; vertical-align: -3px; margin-right: 2px; }
.summary { display: flex; flex-direction: column; gap: var(--s3); }

.map-error { position: absolute; left: var(--s3); right: var(--s3); bottom: var(--s3); z-index: 600; margin: 0; padding: var(--s2) var(--s3); border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface); color: var(--text); font-size: var(--fs-sm); box-shadow: var(--shadow-md); }
.role-pick[aria-invalid="true"] { border-color: var(--red-dot); border-radius: var(--r); padding: var(--s2); }
.sidebar-install { margin-bottom: var(--s2); }
.footer-install { margin-top: var(--s2); }

/* ==========================================================================
   Simple driver experience (batch 6): big pictures, one job per screen.
   Map-first home, bottom sheet, round service buttons, full-screen ☰ sheet.
   ========================================================================== */
.emoji { display: inline-flex; align-items: center; justify-content: center; flex: none; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 1.5rem; line-height: 1; font-style: normal; }
.emoji-sm { font-size: 1.25rem; }
.emoji-md { font-size: 1.75rem; }
.emoji-lg { font-size: 2.25rem; }
.emoji-xl { font-size: 2.75rem; }
.btn-big { --btn-h: 56px; padding: 0 var(--s5); font-size: var(--fs-lg); font-weight: 600; border-radius: var(--r-lg); }
.btn-xl .emoji, .btn-big .emoji { margin-right: 2px; }
.btn-listen { --btn-h: 48px; align-self: flex-start; margin-top: var(--s2); padding: 0 var(--s4); border: 1px solid var(--border-strong); border-radius: var(--r-pill); background: var(--surface); color: var(--text); font-weight: 600; }
.btn-listen:hover { background: var(--gray-50); }

/* ☰ menu: full-screen sheet with ✕ */
.hmenu { position: relative; }
.hmenu > summary { list-style: none; }
.hmenu > summary::-webkit-details-marker { display: none; }
.hmenu-button { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: var(--r-lg); background: var(--gray-900); color: #fff; cursor: pointer; box-shadow: var(--shadow); }
.hmenu-button:hover { background: var(--gray-800); }
.hmenu-bars { font-size: 1.6rem; line-height: 1; }
.hmenu-panel { position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column; gap: var(--s3); overflow-y: auto; padding: max(var(--s4), env(safe-area-inset-top)) var(--s5) max(var(--s6), env(safe-area-inset-bottom)); background: var(--surface); color: var(--text); }
.hmenu:not([open]) .hmenu-panel { display: none; }
.menu-open, .menu-open body { overflow: hidden; }
.hmenu-top { display: flex; justify-content: flex-end; }
.hmenu-x { display: none; font-size: 1.5rem; line-height: 1; }
.hmenu[open] > .hmenu-button { position: fixed; top: max(var(--s4), env(safe-area-inset-top)); right: var(--s5); z-index: 96; border-radius: 50%; background: var(--gray-100); color: var(--text); box-shadow: none; }
.hmenu[open] > .hmenu-button:hover { background: var(--gray-150); }
.hmenu[open] > .hmenu-button .hmenu-bars { display: none; }
.hmenu[open] > .hmenu-button .hmenu-x { display: inline; }
.hmenu-button:focus-visible { outline: 3px solid #2f6fdb; outline-offset: 2px; }
.hmenu-top { min-height: 52px; padding-right: 64px; }
.hmenu-hello { display: flex; align-items: center; gap: var(--s4); }
.hmenu-avatar { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-active); font-size: 2rem; font-weight: 700; flex: none; }
.hmenu-greet { font-size: var(--fs-2xl); font-weight: 600; line-height: 1.2; margin-bottom: var(--s2); }
.pill-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s5); border-radius: var(--r-pill); background: var(--gray-900); color: #fff; font-weight: 600; text-decoration: none; }
.pill-link:hover { background: var(--gray-800); }
.hmenu-list { list-style: none; display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.hmenu-list > li { border-bottom: 1px solid var(--border); }
.hmenu-item { display: flex; align-items: center; gap: var(--s4); width: 100%; min-height: 56px; padding: var(--s2) var(--s1); border: 0; background: none; color: var(--text); font: inherit; font-size: var(--fs-lg); font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.hmenu-item:hover { background: var(--hover); }
.hmenu-label { flex: 1; }
.hmenu-item .menu-meta { color: var(--text-2); font-size: var(--fs-base); }
.hmenu-form { margin: 0; }
.hmenu-foot { display: flex; flex-wrap: wrap; gap: var(--s4); margin-top: auto; padding-top: var(--s4); color: var(--text-3); font-size: var(--fs-sm); }
.hmenu-foot a { color: var(--text-2); }
@media (min-width: 720px) { .hmenu-panel { inset: 0 auto 0 0; width: 420px; box-shadow: var(--shadow-lg); } .hmenu[open] > .hmenu-button { right: auto; left: calc(420px - var(--s5) - 52px); } }

/* Public and guest top bar: logo and ☰ only */
.topbar .hmenu-button { width: 48px; height: 48px; }
.is-guest .topbar-inner { max-width: var(--content-w); }
.guest-main { min-height: 60vh; }
.guest-main .page { max-width: var(--content-w); margin: 0 auto; padding: var(--s6) var(--s4) var(--s12); }
@media (min-width: 768px) { .guest-main .page { padding: var(--s8) var(--s6) var(--s16); } }
.is-guest .stopbar-inner .emoji { font-size: 1.15rem; }

/* Map-first home.
   On a phone the map is a short band at the top of the page and the sheet is
   ordinary content underneath. The page scrolls normally. The sheet is not a
   draggable overlay, so a swipe never moves it over the map or leaves a strip
   of map under it. Desktop (>=900px) keeps the left panel and full-right map.
   --fab-sos-space reserves room so the fixed Get help bar does not cover the
   service labels or the emergency line. */
.maphome { min-height: 100vh; min-height: 100dvh; background: var(--surface); overscroll-behavior-y: none; --fab-sos-space: calc(60px + env(safe-area-inset-bottom, 0px)); }
html:has(body.maphome) { overscroll-behavior-y: none; }
.maphome-map.map { position: relative; inset: auto; width: 100%; height: 34vh; height: 34dvh; min-height: 200px; border: 0; border-radius: 0; z-index: 0; }
.maphome .leaflet-top.leaflet-right { top: 76px; }
@media (max-width: 899px) { .maphome .leaflet-bottom { bottom: 18px; } }
@media (max-width: 411px) {
  .maphome-map.map { height: 18vh; height: 18dvh; min-height: 128px; max-height: 132px; }
  .maphome .sheet { min-height: calc(100vh - 20vh + 16px); min-height: calc(100dvh - 20dvh + 16px); gap: var(--s3); padding-top: var(--s3); padding-bottom: calc(var(--fab-sos-space, 60px) + var(--s4)); }
  .maphome .need-circle { width: 72px; height: 72px; }
  .maphome .need-grid { gap: var(--s3) var(--s2); }
  .maphome .need-grid + .emergency-line { margin-top: var(--s2); }
  .maphome .sheet-head { margin-bottom: var(--s2); }
  .maphome .emergency-line { padding: 6px 10px; gap: 4px 8px; }
}
.map-top { position: fixed; top: max(var(--s3), env(safe-area-inset-top)); left: var(--s3); right: var(--s3); z-index: 40; display: flex; align-items: center; gap: var(--s3); pointer-events: none; }
.map-top > * { pointer-events: auto; }
.map-brand .brand { padding: 6px var(--s3) 6px 6px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .94); box-shadow: var(--shadow); }
@media (max-width: 380px) { .map-brand .brand-text { display: none; } .map-brand .brand { padding: 6px; } }
.live-chip { position: fixed; top: calc(max(var(--s3), env(safe-area-inset-top)) + 64px); left: var(--s3); right: var(--s3); z-index: 20; display: flex; align-items: center; gap: var(--s3); max-width: 520px; min-height: 60px; padding: var(--s2) var(--s4); border-radius: var(--r-lg); background: var(--gray-900); color: #fff; text-decoration: none; box-shadow: var(--shadow-lg); }
.live-chip span { flex: 1; min-width: 0; }
.fab-sos { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: var(--s2); width: auto; height: auto; min-height: 56px; padding: var(--s3) var(--s5) calc(var(--s3) + env(safe-area-inset-bottom, 0px)); border-radius: 0; background: var(--brand); color: #fff; font-weight: 700; font-size: var(--fs-md); text-decoration: none; box-shadow: 0 -4px 20px rgba(196, 54, 28, .28); }
.fab-sos:hover { background: var(--brand-hover); }
.fab-sos:active { background: var(--brand-active); }
.sheet { position: relative; z-index: 10; margin-top: -16px; min-height: calc(100vh - 34vh + 16px); min-height: calc(100dvh - 34dvh + 16px); padding: var(--s4) var(--s4) calc(var(--fab-sos-space, 60px) + var(--s4)); border-radius: 24px 24px 0 0; background: var(--surface); box-shadow: 0 -8px 24px rgba(15, 15, 15, .12); display: flex; flex-direction: column; gap: var(--s4); touch-action: pan-y; overscroll-behavior: none; }
.sheet:focus { outline: none; }
.sheet-handle { display: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.sheet-head h1 { font-size: var(--fs-2xl); line-height: 1.15; }
.sheet-head .btn-listen { margin-top: 0; }
.sheet-place { display: flex; align-items: center; gap: var(--s2); min-height: 52px; padding: 0 var(--s3); border-radius: var(--r-lg); background: var(--gray-50); font-weight: 500; }
.sheet-place .truncate { flex: 1; }
.sheet-place a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s2); color: var(--blue-text); font-weight: 600; }
.sheet-locate { display: flex; flex-direction: column; gap: var(--s2); }
.btn-locate { --btn-h: 64px; width: 100%; border-radius: var(--r-lg); background: var(--blue-text); color: #fff; font-size: var(--fs-lg); font-weight: 700; }
.btn-locate:hover { background: #184d8a; }
.sheet-signin { color: var(--text-2); text-align: center; }
.sheet-signin a { font-weight: 600; }
@media (min-width: 900px) {
  .maphome { background: var(--surface); overscroll-behavior-y: auto; }
  .map-top { top: 0; left: 0; right: auto; width: 420px; padding: var(--s3) var(--s5); background: var(--surface); border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); }
  .map-brand .brand { padding: 4px 0; background: transparent; box-shadow: none; border-radius: var(--r-md); }
  .maphome-map.map { position: fixed; inset: 0; left: 420px; width: auto; height: auto; min-height: 0; }
  .maphome .leaflet-top.leaflet-right { top: var(--s3); right: var(--s3); }
  .live-chip { top: var(--s4); left: 440px; right: auto; max-width: 420px; }
  .sheet { position: relative; z-index: 15; width: 420px; min-height: 100vh; margin: 0; padding: 92px var(--s5) var(--s8); border-radius: 0; border-right: 1px solid var(--border); box-shadow: 4px 0 24px rgba(15, 15, 15, .08); touch-action: auto; overscroll-behavior: auto; }
  .fab-sos { position: fixed; left: 440px; right: auto; bottom: var(--s5); width: auto; height: 60px; min-height: 0; padding: 0 var(--s5); border-radius: var(--r-pill); flex-direction: row; gap: var(--s2); font-size: var(--fs-md); box-shadow: 0 6px 20px rgba(196, 54, 28, .45); }
  .fab-sos .emoji-lg { font-size: 1.5rem; }
}

/* 3-column grid of big round picture buttons, one word each */
.need-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4) var(--s2); list-style: none; }
.need-btn { display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding: var(--s1); border-radius: var(--r-lg); color: var(--text); text-decoration: none; text-align: center; }
.need-circle { display: inline-flex; align-items: center; justify-content: center; width: 84px; height: 84px; border-radius: 50%; background: var(--gray-100); border: 2px solid transparent; transition: transform .1s var(--ease), border-color .12s; }
.need-btn:hover .need-circle { border-color: var(--border-strong); }
.need-btn:active .need-circle { transform: scale(.96); }
.need-word { font-size: var(--fs-md); font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.need-tyre .need-circle { background: #ebf3fc; }
.need-mechanical .need-circle { background: #fdf4e3; }
.need-towing .need-circle { background: #fdeeec; }
.need-battery .need-circle { background: #ebf6ee; }
.need-fuel .need-circle { background: #f3effb; }
.need-other .need-circle { background: var(--gray-100); }
@media (max-width: 359px) { .need-circle { width: 72px; height: 72px; } }

.emergency-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); padding: var(--s3) var(--s4); border-radius: var(--r-lg); background: var(--amber-tint); color: #6e4300; font-weight: 500; }
.emergency-line a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s2); color: #6e4300; font-weight: 700; font-size: var(--fs-lg); }
.site-footer .emergency-line { margin-bottom: var(--s3); }
.footer-links-inline { display: flex; flex-wrap: wrap; gap: var(--s4); font-size: var(--fs-sm); }
.footer-links-inline a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 4px; }

/* Big step pictures */
.steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--s2); max-width: 420px; list-style: none; }
.steps li { display: flex; align-items: center; justify-content: center; height: 52px; border-radius: var(--r-lg); background: var(--gray-50); border: 2px solid var(--gray-150); opacity: .55; }
.steps li[data-state="done"] { opacity: 1; background: var(--green-tint); border-color: var(--green-tint); }
.steps li[data-state="now"] { opacity: 1; background: var(--brand-tint); border-color: var(--brand); }
.step-pic { font-size: 1.6rem; }
.progress { max-width: 420px; }
.progress-label { font-size: var(--fs-md); }

/* Picture choices (truck, urgency) */
.pic-choices { border: 0; padding: 0; margin: 0; min-width: 0; }
.pic-choices legend { margin-bottom: var(--s2); }
.pic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: var(--s2); }
.pic-choice { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s2); min-height: 104px; padding: var(--s3) var(--s2); border: 2px solid var(--border); border-radius: var(--r-lg); background: var(--surface); text-align: center; font-weight: 600; cursor: pointer; }
.pic-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pic-choice:hover { border-color: var(--border-strong); }
.pic-choice:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.pic-choice:has(input:focus-visible) { box-shadow: var(--focus); }
.check-big { align-items: center; min-height: 72px; padding: var(--s3) var(--s4); border: 2px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.check-big input { margin: 0 -4px; }
.check-big input:checked::before { background: var(--brand); border-color: var(--brand); }
.check-big > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.check-big:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.more-details > summary { min-height: 48px; font-size: var(--fs-md); }
.more-details > summary .emoji { margin-right: var(--s2); }
#job-form h2 .emoji, .save-card h2 .emoji { margin-right: var(--s2); }
#job-form input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]) { min-height: 52px; font-size: var(--fs-lg); }

/* Shop cards with 📞 Call and ✅ Choose */
.shop-cards { display: flex; flex-direction: column; gap: var(--s3); list-style: none; margin-top: var(--s4); }
.shop-card { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s4); }
.shop-card h2 { font-size: var(--fs-xl); line-height: 1.2; }
.shop-facts { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-top: var(--s2); font-size: var(--fs-md); font-weight: 500; }
.shop-facts > span { display: inline-flex; align-items: center; gap: 6px; }
.shop-open { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s2); }
.shop-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.shop-card-actions .btn:only-child { grid-column: 1 / -1; }
@media (min-width: 720px) { .shop-card { flex-direction: row; align-items: center; justify-content: space-between; } .shop-card-actions { min-width: 300px; } }
.nearby-map .map { height: 240px; }

.help-steps { list-style: none; display: flex; flex-direction: column; gap: var(--s3); }
.help-steps li { display: flex; gap: var(--s4); align-items: flex-start; }
.auth-optional { display: flex; gap: var(--s3); align-items: center; font-size: var(--fs-lg); }
.auth-aside { display: flex; flex-direction: column; gap: var(--s4); }

.menu-open .fab-sos, .menu-open .live-chip { visibility: hidden; }

/* App mark (favicon) in the menu sheet, footer and map header */
.hmenu-top { justify-content: space-between; align-items: center; }
.hmenu-brand .brand-mark { width: 40px; height: 40px; border-radius: 9px; }
.map-brand .brand-mark { width: 36px; height: 36px; border-radius: 8px; }
.footer-brand { margin-bottom: var(--s3); }
.footer-brand .brand-mark { width: 36px; height: 36px; }
.sidebar .brand-mark { width: 36px; height: 36px; }
@media (prefers-color-scheme: dark) { .brand-mark { box-shadow: 0 0 0 1px rgba(255, 255, 255, .22); } }
/* On a phone, Get help is a sticky bar at the bottom so it never covers the header. */
@media (max-width: 899px) {
  #need { scroll-margin-top: 84px; }
}
.need-grid + .emergency-line { margin-top: var(--s4); }

/* Polish: part category emoji tile, shop job location line, summary stop line */
.part-icon { width: 48px; height: 48px; border-radius: var(--r-lg); }
.kcard-place { display: flex; align-items: center; gap: 6px; }
.summary .summary-line { margin-bottom: var(--s1); }

.part-card .price { white-space: nowrap; flex: none; margin-left: auto; }

/* Mobile 44px minimum tap targets & Leaflet attribution contrast >= 4.5:1 */
@media (max-width: 899px) {
  .btn-sm { --btn-h: 44px; padding: 0 var(--s4); }
  .btn-icon-sm { --btn-h: 44px; width: 44px; }
  .shop-open a, .sheet-signin a, .emergency-line a, .hmenu-foot a { display: inline-flex; align-items: center; min-height: 44px; }
}
.leaflet-container .leaflet-control-attribution {
  background: rgba(255, 255, 255, .96);
  color: var(--gray-800);
  padding: 2px 6px;
}
.leaflet-container .leaflet-control-attribution a {
  color: #14437a;
  text-decoration: underline;
}
.listen-note { margin-top: var(--s2); }
.nearby-extra-note { margin-top: var(--s3); }

/* Batch 10: chosen service bar, place ideas, support line, help questions */
.chosen-service { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 0 0 var(--s4); padding: var(--s2) var(--s3); border-radius: var(--r); background: var(--gray-50); border: 1px solid var(--border); font-size: var(--fs-base); }
.chosen-service a { display: inline-flex; align-items: center; min-height: 44px; margin-left: auto; padding: 0 var(--s2); font-weight: 600; }
.label-strong { display: flex; align-items: center; gap: var(--s2); font-weight: 600; font-size: var(--fs-lg); }
.place-ideas .hint { margin-bottom: var(--s1); }
.idea-list { list-style: none; display: grid; gap: var(--s1); padding: 0; margin: 0; color: var(--text-2); font-size: var(--fs-sm); }
.idea-list li { display: flex; align-items: flex-start; gap: var(--s2); }
.support-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); margin: 0; }
.support-line a { display: inline-flex; align-items: center; gap: var(--s1); min-height: 44px; }
.faq > details > summary { display: flex; align-items: center; gap: var(--s2); min-height: 44px; font-weight: 600; cursor: pointer; }
.faq > details > p { margin-top: var(--s2); }
#gps-state.is-error { color: #922016; font-weight: 600; }
.sheet-signin a, .emergency-line a, .support-line a, .chosen-service a { display: inline-flex; align-items: center; min-height: 44px; }
/* Three emergency numbers (10111, 10177, 112) stay on one line on small phones */
@media (max-width: 411px) {
  .maphome .emergency-line { flex-wrap: nowrap; gap: 2px; font-size: var(--fs-sm); }
  .maphome .emergency-line > span:not(.emoji) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .maphome .emergency-line a { padding: 0 5px; font-size: var(--fs-base); flex: none; min-width: 44px; justify-content: center; }
}

/* Batch 10 C and D: prices, reports, legal drafts, offline calls */
.price-card .price-agreed { font-size: 1.05rem; }
.price-card .price-agreed strong { font-size: 1.35rem; margin-right: var(--s2); }
.price-offer { flex-direction: column; }
.price-offer .button-row { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s2); }
.price-offer .button-row form { flex: 1 1 140px; }
.price-offer .button-row .btn { width: 100%; }
.accept-form { gap: var(--s3); }
.accept-form input[name="quote_max"] { max-width: 14rem; font-size: 1.1rem; }
.report-box fieldset { border: 0; padding: 0; margin: 0; }
.report-box legend { font-weight: 600; margin-bottom: var(--s2); }
.report-box .check { min-height: 44px; align-items: center; }
.legal-draft { margin-bottom: var(--s4); border: 1px solid var(--amber-dot); }
.legal-draft p { margin: 0; }
.entity-block { margin-bottom: var(--s4); }
.entity-block .facts { display: grid; gap: var(--s2); margin: 0; }
.entity-block .facts div { display: grid; grid-template-columns: minmax(8rem, 14rem) 1fr; gap: var(--s3); }
.entity-block dt { color: var(--gray-600); font-weight: 500; }
.entity-block dd { margin: 0; overflow-wrap: anywhere; }
.plain-summary { margin-bottom: var(--s4); background: var(--surface-muted); }
.plain-summary ul { margin: 0; padding-left: 0; list-style: none; display: grid; gap: var(--s2); }
.plain-summary li { line-height: 1.5; }
.sos-calls { display: grid; grid-template-columns: 1fr; gap: var(--s3); }
@media (min-width: 720px) { .sos-calls { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sos-calls .btn { justify-content: center; min-height: 56px; font-size: 1.1rem; white-space: normal; text-align: center; }
@media (max-width: 520px) {
  .entity-block .facts div { grid-template-columns: 1fr; gap: 0; }
}
a.small { display: inline-flex; align-items: center; min-height: 44px; }
.hint.is-error { color: #922016; font-weight: 600; }
.menu.menu-static { position: static; box-shadow: none; border: 1px solid var(--border); animation: none; min-width: 0; max-width: none; }
@media (max-width: 899px) { .menu [role=menuitem] { min-height: 44px; } }

/* ==========================================================================
   Batch 11 design layer: one SVG icon set, a friendly secondary colour,
   light and dark mode, a taller map with the sheet sliding over it.
   ========================================================================== */
:root {
  --accent: #0b6b8f; --accent-hover: #095875; --accent-tint: #e5f2f7; --accent-dot: #1d9bc9;
  --solid: var(--gray-900); --solid-hover: var(--gray-800); --on-solid: #fff;
  --glass: rgba(255, 255, 255, .94);
  color-scheme: light dark;
}
svg.ico { flex: none; stroke: currentColor; }
svg.ico:not([width]) { width: 1em; height: 1em; }
.ico-sm { font-size: 1.25rem; } .ico-md { font-size: 1.5rem; } .ico-lg { font-size: 2rem; } .ico-xl { font-size: 2.5rem; }
.emoji { font-family: inherit; color: currentColor; }
.hmenu-bars { display: inline-flex; font-size: 1.6rem; }
.hmenu-x { display: none; font-size: 1.6rem; }
.hmenu[open] > .hmenu-button .hmenu-bars { display: none; }
.hmenu[open] > .hmenu-button .hmenu-x { display: inline-flex; }
.hmenu-avatar svg.ico { font-size: 2rem; }

/* Service colours: the icon takes the colour, the circle a soft tint of it. */
.need-circle .ico { font-size: 2.5rem; }
.need-tyre .need-circle { background: var(--blue-tint); color: var(--blue-text); }
.need-mechanical .need-circle { background: var(--amber-tint); color: var(--amber-text); }
.need-towing .need-circle { background: var(--red-tint); color: var(--red-text); }
.need-battery .need-circle { background: var(--green-tint); color: var(--green-text); }
.need-fuel .need-circle { background: var(--purple-tint); color: var(--purple-text); }
.need-other .need-circle { background: var(--accent-tint); color: var(--accent); }

/* Dark buttons and chips use tokens so they flip correctly in dark mode. */
.btn-primary, .hmenu-button, .pill-link, .live-chip, .toast, .bubble.is-mine, .skip { background: var(--solid); color: var(--on-solid); }
.btn-primary:hover, .hmenu-button:hover, .pill-link:hover { background: var(--solid-hover); }
.bubble.is-mine { border-color: var(--solid); }
.btn-locate { background: var(--accent); }
.btn-locate:hover { background: var(--accent-hover); }
.topbar, .map-brand .brand { background: var(--glass); }
.sheet-place a, p a, li a, dd a, .link { color: var(--accent); }

/* Phone home: a taller map, the sheet slides up over its lower edge, the pin pulses. */
@media (max-width: 899px) and (min-height: 640px) {
  .maphome-map.map, .maphome-map.map[class] { height: 38vh; height: 38dvh; min-height: 220px; max-height: 360px; }
  .maphome .sheet { margin-top: -24px; min-height: calc(100dvh - 38dvh + 24px); }
}
.sheet-handle { display: block; width: 40px; height: 5px; margin: 0 auto var(--s2); border-radius: 3px; background: var(--border-strong); }
@media (min-width: 900px) { .sheet-handle { display: none; } }
@media (prefers-reduced-motion: no-preference) {
  .maphome .sheet { animation: sheet-up .38s var(--ease) both; }
  @keyframes sheet-up { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
  .pin-pulse::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; background: var(--accent-dot); opacity: .35; animation: pin-pulse 1.8s ease-out infinite; }
  @keyframes pin-pulse { from { transform: scale(.4); opacity: .5; } to { transform: scale(1.6); opacity: 0; } }
}
.pin-me { display: block; box-sizing: border-box; position: relative; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-dot); border: 3px solid #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .35); }
.pin-shop { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: var(--brand); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); color: #fff; }
.pin-shop svg { transform: rotate(45deg); font-size: 18px; }

/* Shop cards (Waze style): name, open state, then distance, time, fee and rating as chips. */
.shop-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.shop-facts > span { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 10px; border-radius: var(--r-pill); background: var(--surface-muted); font-weight: 500; font-size: var(--fs-sm); }
.shop-facts > span .ico { font-size: 1rem; color: var(--text-2); }

/* Status timeline on the tracking page */
.timeline .tl-dot svg { width: 14px; height: 14px; }

/* Dark mode: same layout, quiet dark surfaces, brand red kept for actions. */
@media (prefers-color-scheme: dark) {
  :root {
    --gray-0: #141413; --gray-25: #191918; --gray-50: #1e1e1c; --gray-100: #262624; --gray-150: #2d2d2a;
    --gray-200: #353532; --gray-300: #45453f; --gray-400: #6b6b65; --gray-500: #a3a39c; --gray-600: #b9b9b2;
    --gray-700: #cfcfc8; --gray-800: #e3e3df; --gray-900: #f4f4f1;
    --brand-tint: #3a1d17; --brand-active: #ff9a85;
    --purple-text: #c4adf2; --purple-tint: #2b2340;
    --blue-text: #8fc0f5;   --blue-tint: #18283b;
    --green-text: #8fd6a6;  --green-tint: #17301f;
    --amber-text: #f2c477;  --amber-tint: #33270f;
    --red-text: #ff9d92;    --red-tint: #3b1915;
    --gray-text: #cfcfc8;   --gray-tint: #262624;
    --accent: #5cc3e6; --accent-hover: #7fd0ec; --accent-tint: #12303b; --accent-dot: #3fb4dd;
    --solid: #f4f4f1; --solid-hover: #e3e3df; --on-solid: #141413;
    --glass: rgba(20, 20, 19, .9);
    --hover: rgba(255, 255, 255, .06); --active: rgba(255, 255, 255, .1);
    --focus: 0 0 0 2px #141413, 0 0 0 4px #6ea8ff;
    --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 4px 12px rgba(0, 0, 0, .3);
    --shadow-lg: 0 0 0 1px rgba(255, 255, 255, .06), 0 8px 24px rgba(0, 0, 0, .5);
  }
  .btn-locate { color: #0b1d24; }
  .leaflet-tile-pane { filter: brightness(.72) invert(1) contrast(.86) hue-rotate(195deg) saturate(.35); }
  .leaflet-container { background: #1b1f22; }
  .leaflet-bar a, .leaflet-bar a:hover { background: #262624; color: #f4f4f1; border-bottom-color: #45453f; }
  .leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #262624; color: #f4f4f1; }
  .leaflet-control-attribution { background: rgba(20, 20, 19, .8) !important; color: #b9b9b2; }
  .leaflet-control-attribution a { color: #8fc0f5; }
  .need-circle { border-color: transparent; }
  mark.placeholder { background: var(--amber-tint); color: var(--amber-text); }
}
/* Auth pages: the form only, centred, with the emergency numbers underneath. */
.auth, .auth[class] { grid-template-columns: minmax(0, 440px); justify-content: center; gap: var(--s5); }
.auth-after { width: 100%; max-width: 440px; margin: 0 auto; }
/* List or map toggle on the shops step */
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--gray-100); margin-bottom: var(--s4); }
.seg-item { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--s4); border-radius: var(--r-pill); font-weight: 600; text-decoration: none; color: var(--text-2); }
.seg-item[aria-current] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.nearby-map-big .map { height: 55vh; height: 55dvh; min-height: 280px; }
.contact-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--s2); }
.contact-row .btn { width: 100%; }
/* Part types as chips */
.chip-row { display: flex; gap: var(--s2); overflow-x: auto; padding-bottom: var(--s2); margin-bottom: var(--s4); scrollbar-width: thin; }
.chip { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 44px; padding: 0 var(--s4); border: 1px solid var(--border-strong); border-radius: var(--r-pill); background: var(--surface); color: var(--text); font-weight: 500; text-decoration: none; white-space: nowrap; }
.chip[aria-current] { background: var(--solid); border-color: var(--solid); color: var(--on-solid); }
.part-icon { display: grid; place-items: center; background: var(--accent-tint); color: var(--accent); }
.not-provided { color: var(--text-3); font-style: italic; }

/* Batch 11: amber notices keep their contrast in dark mode (they used a fixed dark brown). */
@media (prefers-color-scheme: dark) {
  .emergency-line, .emergency-line a, .alert-warning, .alert-warning p, .alert-warning a { color: var(--amber-text); }
}
@media (prefers-color-scheme: dark) {
  .avatar { background: var(--gray-200); color: var(--gray-900); }
}
@media (prefers-color-scheme: dark) {
  .appbar, .topbar, .map-brand .brand { background: var(--glass); }
  .tabbar { background: rgba(20, 20, 19, .97); }
  .leaflet-container .leaflet-control-attribution { background: rgba(20, 20, 19, .9); color: var(--gray-700); }
  .leaflet-container .leaflet-control-attribution a { color: var(--accent); }
  .leaflet-touch .leaflet-bar a, .leaflet-container .leaflet-bar a, .leaflet-container .leaflet-bar a:hover { background: #262624; color: #f4f4f1; border-bottom-color: #45453f; }
}
@media (prefers-color-scheme: dark) { .map.leaflet-container { background: #1b1f22; } }

/* Batch 12: a field or button that gets focus or is jumped to never ends up under the bottom tab bar. */
@media (max-width: 767px) {
  html:has(body.app) { scroll-padding-bottom: calc(var(--tabbar-h) + 64px + env(safe-area-inset-bottom, 0px)); }
  body.app .place-now .map,
  body.app .nearby-map .map,
  body.app .nearby-map-big .map { height: 180px; }
  /* Attribution is a wide link along the bottom of the map; move it to the top so the raised Help tab cannot cover it. */
  body.app .map .leaflet-bottom { top: 0; bottom: auto; }
  /* After the GPS form, leave a clear gap above the tab bar so the map is not sliced on the first screen. */
  body.app #gps-form { padding-bottom: calc(var(--tabbar-h) + 140px + env(safe-area-inset-bottom, 0px)); }
}
a.account-button { color: inherit; text-decoration: none; }
/* The active-job chip sat on top of the map zoom buttons on phones, so they could not be tapped. */
@media (max-width: 899px) { .maphome:has(.live-chip) .leaflet-top.leaflet-right { top: 152px; } }

/* ==========================================================================
   Batch 14: Waze-like visual pass
   Map first, one red primary, one accent for links, flat surfaces,
   soft shadow only on floating UI, one type family at two weights,
   short chrome, simple list rows. No emoji, no pastel grid, no glass bar.
   ========================================================================== */

:root {
  --font-display: var(--font);
  --accent: #0f6e8c;
  --accent-hover: #0c5a73;
  --accent-tint: #e7f3f6;
  --r-sheet: 20px;
  --r-btn: 16px;
  --shadow-float: 0 2px 8px rgba(20, 20, 18, .14);
  --shadow-sheet: 0 -6px 24px rgba(20, 20, 18, .12);
}

/* One type family, two weights. Headings stay in IBM Plex, not a poster font. */
h1, h2, h3, .sheet-head h1, .page-head h1, .shop-card h2, .brand-text {
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.brand-text {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* One bold primary: brand red. Secondary stays a quiet outline. */
.btn { border-radius: var(--r-btn); font-weight: 600; }
.btn-xl, .btn-big { border-radius: var(--r-btn); }
.btn-primary,
.btn-locate {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
  box-shadow: none;
}
.btn-primary:hover,
.btn-locate:hover { background: var(--brand-hover); color: #fff; }
.btn-primary:active,
.btn-locate:active { background: var(--brand-active); color: #fff; }
.btn-secondary {
  background: var(--gray-50);
  color: var(--text);
  border-color: transparent;
  box-shadow: none;
}
.btn-secondary:hover { background: var(--gray-100); border-color: transparent; }
.sheet-locate .btn-locate {
  --btn-h: 56px;
  border-radius: var(--r-btn);
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: 0;
  box-shadow: var(--shadow-float);
}
.sheet-locate .btn-secondary {
  --btn-h: 52px;
  background: var(--gray-50);
  color: var(--text);
  font-weight: 500;
  justify-content: flex-start;
  padding-left: var(--s5);
}

/* Quiet Listen control: no fat outline pill. */
.btn-listen {
  --btn-h: 44px;
  padding: 0 var(--s3);
  border: 0;
  border-radius: var(--r-btn);
  background: transparent;
  color: var(--text-2);
  font-weight: 500;
  box-shadow: none;
}
.btn-listen:hover { background: var(--hover); color: var(--text); }

/* Flat cards. Shadows only belong on floating elements. */
.card {
  border: 0;
  box-shadow: none;
  background: var(--surface);
}
.card.card-pad { padding: var(--s4) 0; }
.auth-card.card, .language-card.card, .save-card.card {
  padding: var(--s5);
  border-radius: var(--r-sheet);
  background: var(--surface);
}

/* Pills become a small dot plus text, not a rainbow of tinted chips. */
.pill {
  background: transparent;
  color: var(--text-2);
  padding: 0;
  min-height: 0;
  font-weight: 500;
  font-size: var(--fs-sm);
}
.pill-purple, .pill-blue, .pill-green, .pill-amber, .pill-red {
  background: transparent;
  color: var(--text);
}
.pill-green { color: var(--green-text); }
.pill-red, .pill-amber { color: var(--red-text); }
.pill-blue { color: var(--accent); }

/* Header: solid, not glassy. */
.topbar, .appbar, .map-brand .brand {
  background: var(--surface);
  backdrop-filter: none;
}
.map-brand .brand {
  padding: 6px 12px 6px 6px;
  border-radius: 22px;
  box-shadow: var(--shadow-float);
}
.hmenu-button {
  background: var(--gray-900);
  color: #fff;
  box-shadow: var(--shadow-float);
  border-radius: 50%;
  width: 48px;
  height: 48px;
}

/* Tab bar: solid, no blur. The SOS control stays a round red button. */
.tabbar {
  background: var(--surface);
  backdrop-filter: none;
  border-top: 1px solid var(--gray-150);
}
.tabbar .tab-sos .icon {
  box-shadow: var(--shadow-float);
}

/* Map zoom: separate round floating buttons, 44px. */
.leaflet-bar {
  border: 0 !important;
  background: transparent;
  box-shadow: none;
}
.leaflet-container .leaflet-bar a,
.leaflet-container.leaflet-touch .leaflet-bar a,
.leaflet-touch .leaflet-bar a,
.leaflet-control-zoom a,
.leaflet-bar a {
  width: 44px;
  height: 44px;
  margin: 0 0 8px;
  border: 0 !important;
  border-radius: 50% !important;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-float);
}
.leaflet-bar a:last-child { margin-bottom: 0; }
.leaflet-bar a:focus-visible,
.leaflet-control-zoom a:focus-visible {
  border-radius: 50%;
}

/* Home: taller map, visible grab handle, sheet floats over the map edge. */
.sheet-handle {
  display: block;
  width: 40px;
  height: 5px;
  margin: 2px auto 10px;
  border-radius: 3px;
  background: var(--gray-300);
}
@media (min-width: 900px) { .sheet-handle { display: none; } }

@media (max-width: 899px) {
  .maphome-map.map,
  .maphome-map.map[class] {
    height: 46vh;
    height: 46dvh;
    min-height: 260px;
    max-height: none;
  }
  .maphome .sheet {
    margin-top: -28px;
    min-height: calc(100dvh - 46dvh + 28px);
    padding-top: var(--s3);
    border-radius: var(--r-sheet) var(--r-sheet) 0 0;
    box-shadow: var(--shadow-sheet);
    gap: var(--s3);
  }
  .fab-sos {
    left: 16px;
    right: 16px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    width: auto;
    min-height: 52px;
    padding: 0 var(--s5);
    padding-bottom: 0;
    border-radius: 26px;
    box-shadow: 0 4px 16px rgba(196, 54, 28, .35);
  }
  .maphome { --fab-sos-space: calc(72px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 411px) {
  .maphome-map.map,
  .maphome-map.map[class] {
    height: 42vh;
    height: 42dvh;
    min-height: 230px;
    max-height: none;
  }
  .maphome .sheet {
    min-height: calc(100dvh - 42dvh + 28px);
    gap: var(--s3);
  }
  .maphome .need-circle { width: 72px; height: 72px; }
}

/* Service tiles: one ink colour, one quiet circle. No pastel rainbow. */
.need-circle,
.need-tyre .need-circle,
.need-mechanical .need-circle,
.need-towing .need-circle,
.need-battery .need-circle,
.need-fuel .need-circle,
.need-other .need-circle {
  background: var(--gray-100);
  color: var(--gray-900);
  border: 0;
}
.need-btn:hover .need-circle { background: var(--gray-150); border-color: transparent; }
.need-word { font-weight: 600; font-size: var(--fs-sm); }

/* Emergency line: small and quiet, not a yellow banner. */
.emergency-line {
  background: transparent;
  color: var(--text-3);
  font-weight: 400;
  font-size: var(--fs-sm);
  padding: 4px 0;
  border-radius: 0;
  gap: var(--s2);
}
.emergency-line a {
  color: var(--text);
  font-weight: 600;
  font-size: var(--fs-sm);
  min-height: 44px;
}
.maphome .need-grid + .emergency-line { margin-top: var(--s2); }

/* Flow pages: less stacked chrome. */
.page-head { gap: var(--s2); margin-bottom: var(--s4); }
.page-head h1 { font-size: 1.5rem; letter-spacing: -0.03em; }
.page-head .lead { font-size: var(--fs-sm); max-width: 40ch; }
.stopbar { background: var(--surface); border-bottom: 1px solid var(--gray-150); }
.stopbar-action { color: var(--accent); }

.chosen-service {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: var(--fs-sm);
  min-height: 44px;
}
.chosen-service a { color: var(--accent); }

/* Stepper: no mint boxes. Current step is red, done is ink. */
.steps { gap: 0; max-width: 280px; }
.steps li {
  height: 40px;
  background: transparent;
  border: 0;
  opacity: .35;
  border-radius: 0;
}
.steps li[data-state="done"] {
  opacity: 1;
  background: transparent;
  border: 0;
  color: var(--text);
}
.steps li[data-state="now"] {
  opacity: 1;
  background: transparent;
  border: 0;
  color: var(--brand);
}
.progress-label { font-size: var(--fs-sm); }

/* Location and shops maps: larger, no card frame. */
.place-now {
  padding: 0;
  background: transparent;
}
.place-now .map,
.nearby-map .map,
.nearby-map-big .map {
  height: 220px;
  border: 0;
  border-radius: var(--r-sheet);
  box-shadow: none;
}
@media (min-width: 900px) {
  .place-now .map,
  .nearby-map .map,
  .nearby-map-big .map { height: 420px; }
}

/* Shop list: rows with big numbers, not heavy cards or fact pills. */
.shop-cards { gap: 0; margin-top: var(--s2); }
.shop-card.card,
.shop-card {
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s4) 0;
  border: 0;
  border-bottom: 1px solid var(--gray-150);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.shop-card h2 { font-size: 1.25rem; letter-spacing: -0.02em; }
.shop-facts { gap: var(--s5); margin: 4px 0; }
.shop-facts > span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 1.125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--text);
}
.shop-facts > span .ico { font-size: 1rem; color: var(--text-3); }
.shop-open { margin-top: 0; }
.shop-card-actions { margin-top: var(--s2); }
@media (min-width: 720px) {
  .shop-card { flex-direction: row; align-items: center; }
}

/* Tracking timeline: a clean rail, current step in red, no halo. */
.timeline li[data-state="now"] .tl-dot {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: none;
}
.timeline li[data-state="done"] .tl-dot,
.timeline li[data-state="done"]::before {
  border-color: var(--text);
  background: var(--text);
}
.kicker .pill { font-size: var(--fs-sm); }

/* Segmented list/map toggle: quiet, not a floating pill bar. */
.seg-item { font-weight: 500; box-shadow: none; }
.seg-item[aria-current] {
  background: var(--gray-100);
  color: var(--text);
  box-shadow: none;
}

/* Forms, help, legal, admin, shop desk: same flat language. */
.field input, .field select, .field textarea, input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="search"] {
  border-radius: 12px;
  border-color: var(--gray-200);
  box-shadow: none;
}
.disclosure, .disclosure.card, details.card {
  border: 0;
  border-top: 1px solid var(--gray-150);
  border-radius: 0;
  background: transparent;
}
.stat, .kcard, article.kcard, .row, .rows > .row {
  box-shadow: none;
}
.sheet-place {
  background: var(--gray-50);
  border-radius: 14px;
  box-shadow: none;
}
.sheet-signin { text-align: left; }

/* Dark mode: same rules, no pastel or amber banners, no cyan primary. */
@media (prefers-color-scheme: dark) {
  :root {
    --shadow-float: 0 2px 10px rgba(0, 0, 0, .5);
    --shadow-sheet: 0 -8px 24px rgba(0, 0, 0, .45);
  }
  .need-circle,
  .need-tyre .need-circle,
  .need-mechanical .need-circle,
  .need-towing .need-circle,
  .need-battery .need-circle,
  .need-fuel .need-circle,
  .need-other .need-circle {
    background: var(--gray-200);
    color: var(--gray-900);
  }
  .btn-primary, .btn-locate { background: var(--brand); color: #fff; }
  .btn-primary:hover, .btn-locate:hover { background: var(--brand-hover); color: #fff; }
  .btn-secondary { background: var(--gray-150); color: var(--text); }
  .emergency-line, .emergency-line a { color: var(--text-2); }
  .emergency-line a { color: var(--text); }
  .topbar, .appbar, .map-brand .brand, .tabbar { background: var(--gray-0); backdrop-filter: none; }
  .leaflet-container .leaflet-bar a,
  .leaflet-touch .leaflet-bar a,
  .leaflet-container .leaflet-bar a:hover {
    background: var(--gray-100);
    color: var(--text);
    border: 0;
  }
  .shop-card { border-bottom-color: var(--gray-200); }
  .steps li[data-state="done"] { color: var(--text); }
  .fab-sos { box-shadow: 0 4px 18px rgba(0, 0, 0, .45); }
}

/* Home already has the sheet of actions; a second full-width Get help bar
   sat on the service labels and the emergency numbers. On a phone the sheet
   is the control. The floating SOS pill stays on desktop, over the map. */
@media (max-width: 899px) {
  .maphome .fab-sos { display: none; }
  .maphome { --fab-sos-space: 16px; }
  .maphome .sheet { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}

/* Price and warning notes: a line of text, not a yellow banner. */
.alert-warning,
.price-offer {
  background: transparent;
  color: var(--text);
  border: 0;
  border-radius: 0;
  padding-left: 0;
  box-shadow: none;
}
.alert-warning p, .price-offer p, .alert-warning strong { color: var(--text); }
@media (prefers-color-scheme: dark) {
  .alert-warning, .alert-warning p, .alert-warning a, .price-offer, .price-offer p { color: var(--text); }
}
.app .page { padding-bottom: calc(var(--tabbar-h) + 40px + env(safe-area-inset-bottom, 0px)); }
.price-offer { margin-bottom: var(--s8); }
/* Get help stays visible as a compact floating pill, so it never covers the
   service labels or the emergency numbers. */
@media (max-width: 899px) {
  .maphome .fab-sos {
    display: inline-flex;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: auto;
    min-width: 168px;
    min-height: 52px;
    padding: 0 28px;
    padding-bottom: 0;
    border-radius: 26px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 4px 16px rgba(196, 54, 28, .35);
  }
  .maphome { --fab-sos-space: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .maphome .sheet { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}
/* First screen must fit the map, the six services, the emergency numbers and
   the Get help pill without covering labels. */
@media (max-width: 899px) {
  .maphome-map.map,
  .maphome-map.map[class] {
    height: 36vh;
    height: 36dvh;
    min-height: 220px;
    max-height: 300px;
  }
  .maphome .sheet {
    margin-top: -24px;
    min-height: calc(100dvh - 36dvh + 24px);
    gap: 8px;
    padding-top: 8px;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
  .maphome .need-circle { width: 72px; height: 72px; }
  .maphome .need-grid { gap: 8px 8px; }
  .maphome .sheet-locate .btn-locate { --btn-h: 52px; }
  .maphome .sheet-locate .btn-secondary { --btn-h: 48px; }
  .maphome .sheet-head h1 { font-size: 1.5rem; }
  .maphome .emergency-line { margin-top: 4px; }
}
@media (max-width: 411px) {
  .maphome-map.map,
  .maphome-map.map[class] {
    height: 34vh;
    height: 34dvh;
    min-height: 200px;
    max-height: 260px;
  }
}
@media (max-width: 899px) {
  .maphome .sheet-signin { margin-bottom: 8px; }
  .maphome .sheet { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 899px) {
  .maphome-map.map,
  .maphome-map.map[class] {
    height: 32vh;
    height: 32dvh;
    min-height: 200px;
    max-height: 250px;
  }
}
@media (max-width: 411px) {
  .maphome-map.map,
  .maphome-map.map[class] {
    height: 30vh;
    height: 30dvh;
    min-height: 190px;
    max-height: 230px;
  }
}
/* Emergency numbers must stay at least 44px wide (the short 112 link). */
.emergency-line a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 0 6px;
}
/* Tracking: tighter timeline so the price line sits above the tab bar. */
@media (max-width: 899px) {
  .page:has(.timeline) .page-head { margin-bottom: var(--s3); gap: 4px; }
  .page:has(.timeline) .btn-listen { margin-block: 0; }
  .page:has(.timeline) .timeline li { padding-bottom: 10px; }
  .page:has(.timeline) .price-offer { margin-top: var(--s3); margin-bottom: var(--s8); }
}
/* Dark mode keeps the lighter teal so links meet WCAG contrast. */
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #5cc3e6;
    --accent-hover: #7fd0ec;
    --accent-tint: #12303b;
  }
}
/* Live job chip leaves a right gutter so map zoom stays tappable. */
@media (max-width: 899px) {
  .live-chip {
    right: 72px;
    max-width: calc(100vw - 96px);
  }
  .maphome:has(.live-chip) .leaflet-top.leaflet-right {
    top: 76px;
  }
}
/* Location and shops maps must end above the tab bar, including Leaflet credit. */
@media (max-width: 767px) {
  .place-now .map,
  .nearby-map .map,
  .nearby-map-big .map {
    height: 180px;
    margin-bottom: var(--s5);
  }
}

/* ==========================================================================
   Batch 14b: premium navigation
   Solid header and tab bar, filled active icons, raised centre Help,
   short wrapping labels, 44px targets, tap feedback, quiet menus.
   ========================================================================== */

:root { --tabbar-h: 72px; --appbar-h: 56px; }

/* Quiet, solid headers. No glass. */
.appbar,
.topbar {
  background: var(--surface);
  backdrop-filter: none;
  border-bottom: 1px solid var(--gray-150);
  box-shadow: none;
}
.appbar {
  height: var(--appbar-h);
  padding: 0 12px 0 16px;
}
.topbar-inner { height: var(--appbar-h); }
.brand { gap: 8px; }
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(20, 20, 18, .08);
}
.brand-text {
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
}
.map-brand .brand {
  height: 48px;
  padding: 4px 14px 4px 4px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-float);
  backdrop-filter: none;
}
.map-brand .brand-mark { width: 40px; height: 40px; border-radius: 20px; }
.map-top .hmenu-button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gray-900);
  color: #fff;
  box-shadow: var(--shadow-float);
}
.topbar .hmenu-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}
.menu-compact .account-button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 50%;
  background: var(--gray-900);
  color: #fff;
}
.menu-compact .account-button:hover,
.menu-compact .account-button[aria-expanded="true"] { background: var(--gray-800); }
.menu-compact .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}
.appbar .brand:focus-visible,
.topbar .brand:focus-visible,
.hmenu-button:focus-visible,
.account-button:focus-visible {
  outline: 3px solid #2f6fdb;
  outline-offset: 2px;
}

/* Tab bar: solid surface, hairline, safe area, room for two-line labels. */
.tabbar {
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding: 0 2px env(safe-area-inset-bottom, 0px);
  background: var(--surface);
  backdrop-filter: none;
  border-top: 1px solid var(--gray-150);
  box-shadow: 0 -2px 10px rgba(20, 20, 18, .06);
  align-items: stretch;
}
.tabbar a {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 48px;
  height: var(--tabbar-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  padding: 0 2px 10px;
  color: var(--text-2);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  overflow: visible;
  transition: transform .12s ease, color .12s ease, background-color .12s ease;
}
.tabbar a .nav-ico {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-bottom: 2px;
  flex: none;
}
.tabbar a .icon,
.tabbar a .ico {
  width: 24px;
  height: 24px;
  padding: 0;
  margin: 0;
  background: none;
  box-shadow: none;
  border-radius: 0;
}
.tabbar a .ico-fill { display: none; }
.tabbar a .ico-line { display: block; }
.tabbar a .nav-label {
  display: block;
  max-width: 100%;
  padding: 0 1px;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}
.tabbar a[aria-current="page"] {
  color: var(--brand);
  font-weight: 600;
}
.tabbar a[aria-current="page"] .ico-line { display: none; }
.tabbar a[aria-current="page"] .ico-fill { display: block; }
.tabbar a[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 14px;
  height: 3px;
  margin-left: -7px;
  border-radius: 2px;
  background: var(--brand);
}
.tabbar a:focus-visible {
  outline: 3px solid #2f6fdb;
  outline-offset: -4px;
  border-radius: 12px;
}
.tabbar a:active { transform: scale(0.96); }

/* Raised centre Help: a round red button sitting on the bar, not a blob. */
.tabbar .tab-sos {
  color: var(--text-2);
  z-index: 1;
  overflow: visible;
}
.tabbar .tab-sos .tab-sos-fab {
  position: absolute;
  top: -18px;
  left: 50%;
  width: 56px;
  height: 56px;
  margin: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 0 0 4px var(--surface), 0 4px 14px rgba(196, 54, 28, .38);
  transform: translateX(-50%);
  transition: transform .12s ease, background-color .12s ease;
}
.tabbar .tab-sos .tab-sos-fab .icon,
.tabbar .tab-sos .tab-sos-fab .ico {
  width: 26px;
  height: 26px;
  color: #fff;
  padding: 0;
  margin: 0;
  background: none;
  box-shadow: none;
  border-radius: 0;
}
.tabbar .tab-sos .tab-sos-fab .ico-line { display: block; }
.tabbar .tab-sos .tab-sos-fab .ico-fill { display: none; }
.tabbar .tab-sos .nav-label { position: relative; z-index: 1; }
.tabbar .tab-sos[aria-current="page"] { color: var(--brand); font-weight: 600; }
.tabbar .tab-sos[aria-current="page"]::before { display: none; }
.tabbar .tab-sos[aria-current="page"] .nav-label { font-weight: 600; }
.tabbar .tab-sos:active { transform: none; }
.tabbar .tab-sos:active .tab-sos-fab { transform: translateX(-50%) scale(0.94); background: var(--brand-active); }
.tabbar .tab-sos:focus-visible .tab-sos-fab {
  outline: 3px solid #2f6fdb;
  outline-offset: 3px;
}

.nav-dot {
  top: 22px;
  right: calc(50% - 18px);
  width: 8px;
  height: 8px;
  background: var(--brand);
  box-shadow: 0 0 0 2px var(--surface);
}

@media (prefers-reduced-motion: reduce) {
  .tabbar a,
  .tabbar .tab-sos-fab,
  .hmenu-item,
  .account-button,
  .menu [role=menuitem] { transition: none; }
  .tabbar a:active,
  .tabbar .tab-sos:active .tab-sos-fab { transform: none; }
  .tabbar .tab-sos:active .tab-sos-fab { transform: translateX(-50%); background: var(--brand-active); }
  .tabbar a:active { background: var(--hover); }
}

/* Slide-out menu: quieter rows, consistent 24px icons, press state. */
.hmenu-panel { gap: var(--s4); }
.hmenu-hello { gap: var(--s3); }
.hmenu-greet { font-size: 1.5rem; letter-spacing: -0.03em; margin-bottom: var(--s2); }
.hmenu-avatar {
  width: 56px;
  height: 56px;
  background: var(--gray-100);
  color: var(--text);
  font-size: 1.25rem;
}
.pill-link {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  background: var(--gray-900);
  color: #fff;
  box-shadow: none;
}
.hmenu-list { border-top: 0; gap: 2px; }
.hmenu-list > li { border-bottom: 0; }
.hmenu-item {
  min-height: 56px;
  padding: 0 12px;
  border-radius: 14px;
  gap: 14px;
  font-size: 1.0625rem;
  font-weight: 500;
  transition: background-color .12s ease;
}
.hmenu-item .ico,
.hmenu-item .icon,
.hmenu-item .emoji {
  width: 24px;
  height: 24px;
  font-size: 24px;
  color: var(--text);
}
.hmenu-item:hover,
.hmenu-item:active { background: var(--gray-100); }
.hmenu-item:focus-visible {
  outline: 3px solid #2f6fdb;
  outline-offset: 0;
}
.hmenu-foot { border-top: 1px solid var(--gray-150); }
.hmenu-button[open],
.hmenu[open] > .hmenu-button {
  width: 44px;
  height: 44px;
}

/* Account menu */
.menu {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(20, 20, 18, .16);
  padding: 8px;
  background: var(--surface);
}
.menu-header { padding: 8px 10px 10px; }
.menu [role=menuitem],
.menu button[role=menuitem] {
  min-height: 44px;
  border-radius: 10px;
  gap: 10px;
  padding: 0 10px;
}
.menu [role=menuitem] .ico { width: 20px; height: 20px; }
.menu [role=menuitem]:focus-visible,
.menu button[role=menuitem]:focus-visible {
  outline: 3px solid #2f6fdb;
  outline-offset: 0;
}

/* Desktop: icon rail, then a labelled side column. Never a stretched phone tab bar. */
@media (min-width: 768px) {
  .tabbar { display: none; }
  .side-nav a {
    min-height: 48px;
    border-radius: 14px;
    color: var(--text-2);
  }
  .side-nav a .nav-ico { width: 24px; height: 24px; display: grid; place-items: center; flex: none; }
  .side-nav a .icon, .side-nav a .ico { width: 24px; height: 24px; }
  .side-nav a .ico-fill { display: none; }
  .side-nav a .ico-line { display: block; }
  .side-nav a[aria-current="page"] {
    background: var(--brand-tint);
    color: var(--brand);
  }
  .side-nav a[aria-current="page"] .icon,
  .side-nav a[aria-current="page"] .ico { color: var(--brand); }
  .side-nav a[aria-current="page"] .ico-line { display: none; }
  .side-nav a[aria-current="page"] .ico-fill { display: block; }
  .side-nav a:focus-visible { outline: 3px solid #2f6fdb; outline-offset: 0; }
  .sidebar-sos {
    min-height: 48px;
    border-radius: 16px;
    justify-content: center;
  }
  .sidebar .account-button { min-height: 48px; border-radius: 14px; }
}
@media (min-width: 1024px) {
  .side-nav a { min-height: 44px; justify-content: flex-start; }
  .sidebar-sos { min-height: 44px; justify-content: flex-start; padding: 0 14px; }
}

@media (prefers-color-scheme: dark) {
  .appbar, .topbar { border-bottom-color: var(--gray-150); }
  .tabbar {
    border-top-color: var(--gray-150);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, .35);
  }
  .tabbar .tab-sos .tab-sos-fab {
    box-shadow: 0 0 0 4px var(--surface), 0 4px 16px rgba(0, 0, 0, .45);
  }
  .nav-dot { box-shadow: 0 0 0 2px var(--surface); }
  .menu-compact .account-button,
  .map-top .hmenu-button { background: var(--gray-150); color: var(--text); }
  .menu-compact .account-button:hover,
  .menu-compact .account-button[aria-expanded="true"] { background: var(--gray-200, var(--gray-150)); }
  .hmenu-avatar { background: var(--gray-150); color: var(--text); }
  .hmenu-item:hover, .hmenu-item:active { background: var(--gray-150); }
  .side-nav a[aria-current="page"] { background: var(--brand-tint); color: var(--accent); }
  .brand-mark { box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); }
}
/* Indicator sits under the label, inside the bar, not in the page content. */
.tabbar a[aria-current="page"]::before {
  top: auto;
  bottom: 5px;
  width: 12px;
  height: 3px;
  margin-left: -6px;
}
@media (prefers-color-scheme: dark) {
  .side-nav a[aria-current="page"] { color: var(--brand); }
}
/* Dark mode: a lighter red for active labels so small type meets contrast. */
@media (prefers-color-scheme: dark) {
  .tabbar a[aria-current="page"],
  .tabbar .tab-sos[aria-current="page"],
  .side-nav a[aria-current="page"],
  .side-nav a[aria-current="page"] .ico,
  .side-nav a[aria-current="page"] .icon {
    color: #ff8a70;
  }
  .tabbar a[aria-current="page"]::before { background: #ff8a70; }
}

/* ==========================================================================
   Batch 14b header, pass 2
   Light floating 44px controls on a 16px edge grid, same as map zoom.
   No capsule, no all-caps wordmark. Map home shows the mark only.
   Solid compact header on other pages, title case at medium weight.
   ========================================================================== */

:root { --nav-edge: 16px; }

.brand-text,
.brand-text[class] {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: none;
  line-height: 1.2;
  color: var(--text);
}
.brand-mark,
.brand-mark[class] {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: none;
}
.brand { gap: 8px; }

/* Closed menu and account: the same language as the zoom buttons. */
.hmenu:not([open]) > .hmenu-button,
.topbar .hmenu:not([open]) > .hmenu-button,
.map-top .hmenu:not([open]) > .hmenu-button,
.appbar .hmenu:not([open]) > .hmenu-button,
.menu-compact .account-button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-float);
}
.hmenu:not([open]) > .hmenu-button:hover,
.menu-compact .account-button:hover,
.menu-compact .account-button[aria-expanded="true"] {
  background: var(--gray-50);
  color: var(--text);
}
.menu-compact .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Map home: 16px grid. Mark only, in a 44px floating control. */
.map-top {
  top: calc(env(safe-area-inset-top, 0px) + var(--nav-edge));
  left: var(--nav-edge);
  right: var(--nav-edge);
  gap: 8px;
  align-items: center;
}
.map-brand .brand,
.map-brand .brand[class] {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-float);
  justify-content: center;
  backdrop-filter: none;
}
.map-brand .brand-text { display: none; }
.map-brand .brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: none;
}

@media (max-width: 899px) {
  .maphome .leaflet-top.leaflet-right,
  .maphome .leaflet-top.leaflet-right[class],
  .maphome:has(.live-chip) .leaflet-top.leaflet-right {
    top: calc(env(safe-area-inset-top, 0px) + var(--nav-edge));
    right: var(--nav-edge);
  }
  .live-chip {
    top: calc(env(safe-area-inset-top, 0px) + var(--nav-edge) + 44px + 8px);
    left: var(--nav-edge);
    right: var(--nav-edge);
    max-width: none;
  }
}

/* Non-map pages: solid, compact, 16px edges, title-case wordmark. */
.appbar,
.topbar-inner {
  height: var(--appbar-h);
  padding-left: var(--nav-edge);
  padding-right: var(--nav-edge);
}
.appbar { padding: 0 var(--nav-edge); }
.topbar .hmenu-button { width: 44px; height: 44px; }

/* Desktop map uses a solid left column, so the wordmark can return. */
@media (min-width: 900px) {
  .map-top {
    top: 0;
    left: 0;
    right: auto;
    width: 420px;
    padding: var(--nav-edge);
    gap: 8px;
    background: var(--surface);
    border-bottom: 1px solid var(--gray-150);
    border-right: 1px solid var(--border);
  }
  .map-brand .brand,
  .map-brand .brand[class] {
    width: auto;
    height: 44px;
    padding: 0 8px 0 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    justify-content: flex-start;
  }
  .map-brand .brand-text { display: inline; }
  .maphome .leaflet-top.leaflet-right {
    top: var(--nav-edge);
    right: var(--nav-edge);
  }
  .hmenu[open] > .hmenu-button { left: calc(420px - var(--nav-edge) - 44px); right: auto; }
}

@media (prefers-color-scheme: dark) {
  .hmenu:not([open]) > .hmenu-button,
  .topbar .hmenu:not([open]) > .hmenu-button,
  .map-top .hmenu:not([open]) > .hmenu-button,
  .menu-compact .account-button,
  .menu-compact .account-button:hover,
  .menu-compact .account-button[aria-expanded="true"],
  .map-brand .brand,
  .map-brand .brand[class] {
    background: #2c2c2a;
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
  }
  @media (min-width: 900px) {
    .map-brand .brand,
    .map-brand .brand[class] {
      background: transparent;
      box-shadow: none;
    }
  }
}

/* ==========================================================================
   Batch 14b header, pass 3
   One floating rounded top bar on the map: menu, mark, title-case wordmark,
   optional account. Zoom sits under it on the 16px grid.
   Menu profile block: Welcome plus Sign in, or name plus Account.
   ========================================================================== */

/* A single bar, not loose circles. */
@media (max-width: 899px) {
  .map-top {
    top: calc(env(safe-area-inset-top, 0px) + var(--nav-edge));
    left: var(--nav-edge);
    right: var(--nav-edge);
    height: 48px;
    padding: 2px 6px 2px 2px;
    gap: 4px;
    background: var(--surface);
    border-radius: 24px;
    box-shadow: var(--shadow-float);
    align-items: center;
  }
  .map-top .hmenu:not([open]) > .hmenu-button,
  .map-top .hmenu:not([open]) > .hmenu-button:hover {
    width: 44px;
    height: 44px;
    background: transparent;
    color: var(--text);
    box-shadow: none;
  }
  .map-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1;
  }
  .map-brand .brand,
  .map-brand .brand[class] {
    width: auto;
    max-width: 100%;
    height: 44px;
    min-height: 44px;
    padding: 0 4px 0 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    justify-content: flex-start;
    gap: 8px;
  }
  .map-brand .brand-text {
    display: inline;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: -0.01em;
    text-transform: none;
  }
  .map-brand .brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    box-shadow: none;
  }
  .map-top .menu-compact .account-button,
  .map-top .menu-compact .account-button:hover,
  .map-top .menu-compact .account-button[aria-expanded="true"] {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    background: var(--gray-100);
    color: var(--text);
    box-shadow: none;
  }
  .map-top .menu-compact .avatar {
    width: 36px;
    height: 36px;
    font-size: 0.7rem;
  }
  /* Account target stays 44px via padding on the wrap if needed. */
  .map-top .map-account { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
  .maphome .leaflet-top.leaflet-right,
  .maphome .leaflet-top.leaflet-right[class],
  .maphome:has(.live-chip) .leaflet-top.leaflet-right {
    top: calc(env(safe-area-inset-top, 0px) + var(--nav-edge) + 48px + 8px);
    right: var(--nav-edge);
  }
  .live-chip {
    top: calc(env(safe-area-inset-top, 0px) + var(--nav-edge) + 48px + 8px);
    left: var(--nav-edge);
    right: 72px;
    max-width: none;
  }
}

@media (prefers-color-scheme: dark) {
  @media (max-width: 899px) {
    .map-top { background: #2c2c2a; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
    .map-top .hmenu:not([open]) > .hmenu-button,
    .map-brand .brand,
    .map-brand .brand[class] {
      background: transparent;
      box-shadow: none;
      color: var(--text);
    }
    .map-top .menu-compact .account-button,
    .map-top .menu-compact .account-button:hover,
    .map-top .menu-compact .account-button[aria-expanded="true"] {
      background: var(--gray-150);
      color: var(--text);
      box-shadow: none;
    }
  }
}

/* Desktop left column already is a solid bar: keep the quiet wordmark, no capsule. */
@media (min-width: 900px) {
  .map-top {
    background: var(--surface);
    box-shadow: none;
    border-radius: 0;
    height: auto;
    padding: var(--nav-edge);
  }
  .map-brand .brand-text { display: inline; }
}

/* Menu: polished profile block and tidy rows. */
.hmenu-hello {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0 8px;
}
.hmenu-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.hmenu-avatar .ico { width: 24px; height: 24px; color: var(--text-2); }
.hmenu-hello-copy { min-width: 0; flex: 1; }
.hmenu-greet {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 4px;
}
.hmenu-hello-lead {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 400;
  line-height: 1.35;
}
.hmenu-account-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  color: var(--accent);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
}
.hmenu-account-link:hover { text-decoration: underline; }
.hmenu-account-link:focus-visible { outline: 3px solid #2f6fdb; outline-offset: 2px; }
.hmenu-auth { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 16px; }
.hmenu-signin {
  --btn-h: 48px;
  width: 100%;
  justify-content: center;
  border-radius: 16px;
  font-weight: 600;
}
.hmenu-register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  text-align: center;
}
.hmenu-register:hover { text-decoration: underline; }
.hmenu-register:focus-visible { outline: 3px solid #2f6fdb; outline-offset: 2px; }

.hmenu-list { border-top: 1px solid var(--gray-150); padding-top: 8px; gap: 0; }
.hmenu-list > li { border-bottom: 1px solid var(--gray-150); }
.hmenu-list > li:last-child { border-bottom: 0; }
.hmenu-item {
  min-height: 56px;
  padding: 0 4px 0 0;
  border-radius: 0;
  gap: 12px;
}
.hmenu-item .icon,
.hmenu-item .ico {
  width: 24px;
  height: 24px;
  color: var(--text);
  flex: none;
}
.hmenu-label { flex: 1; min-width: 0; }
.hmenu-item .menu-meta {
  margin-left: auto;
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.hmenu-chevron {
  width: 18px;
  height: 18px;
  color: var(--text-3);
  flex: none;
  margin-left: 2px;
}
.hmenu-item:hover,
.hmenu-item:active { background: var(--gray-50); border-radius: 12px; }
.hmenu-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: var(--s3);
  margin-top: auto;
  padding-top: var(--s3);
  border-top: 1px solid var(--gray-150);
  color: var(--text-3);
  font-size: var(--fs-xs);
  line-height: 1.3;
}
.hmenu-foot a,
.hmenu-foot span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-3);
  line-height: inherit;
}
.hmenu-foot a { text-decoration: underline; text-underline-offset: 2px; }
.hmenu-foot span { flex: none; margin-left: auto; text-align: right; white-space: nowrap; }

@media (prefers-color-scheme: dark) {
  .hmenu-avatar { background: var(--gray-150); color: var(--text); }
  .hmenu-item:hover, .hmenu-item:active { background: var(--gray-150); }
  .hmenu-list, .hmenu-list > li, .hmenu-foot { border-color: var(--gray-150); }
}

/* Shop hours editor and listings (batch 15) */
.hours-editor { display: grid; gap: var(--s3); }
.hours-week { display: grid; gap: 0; }
.hours-day { display: grid; gap: var(--s2); padding: var(--s4) 0; border-bottom: 1px solid var(--gray-150); }
.hours-day:last-of-type { border-bottom: 0; }
.hours-day-name { margin: 0; font-weight: 600; font-size: var(--fs-base); }
.hours-day-controls { display: grid; gap: var(--s3); }
.hours-times { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.hours-editor select,
.hours-editor input[type="time"] { min-height: 44px; width: 100%; }
.hours-week-list ul.hours-week-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.hours-week-rows li { display: flex; justify-content: space-between; gap: var(--s3); align-items: baseline; padding: var(--s2) 0; border-bottom: 1px solid var(--gray-150); }
.hours-week-rows li:last-child { border-bottom: 0; }
.shop-open { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.shop-hours { font-weight: 500; }
@media (min-width: 540px) {
  .hours-day { grid-template-columns: 7.5rem 1fr; align-items: start; }
  .hours-day-name { padding-top: 0.7rem; }
}

/* Brand-led landing pages and the crawlable home footer. The first-screen map stays clean. */
.seo-page { display: flex; flex-direction: column; gap: var(--s5); padding-bottom: var(--s10); }
.seo-page h1 { display: flex; align-items: center; gap: var(--s3); font-size: var(--fs-2xl); line-height: 1.2; }
.seo-page h2 { font-size: var(--fs-lg); margin-top: var(--s2); }
.seo-lead { font-size: var(--fs-lg); color: var(--text); }
.seo-page .btn-block { margin-top: var(--s2); }
.seo-signin { color: var(--text-2); }
.seo-signin a { font-weight: 600; }
.seo-related { margin-top: var(--s4); padding-top: var(--s5); border-top: 1px solid var(--border); }
.seo-related ul { display: flex; flex-direction: column; gap: 0; list-style: none; }
.seo-related a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; color: var(--blue-text); font-weight: 500; text-decoration: none; }
.seo-related a:hover { text-decoration: underline; }
.footer-lead { max-width: 36rem; color: var(--text-2); font-size: var(--fs-sm); margin-top: var(--s2); }
.footer-explore { display: flex; flex-direction: column; flex-basis: 100%; margin-top: var(--s2); border-top: 1px solid var(--border); }
.footer-group { margin: 0; border-bottom: 1px solid var(--border); background: transparent; }
.footer-group > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 48px; padding: 0; list-style: none; cursor: pointer; color: var(--text); font-size: var(--fs-sm); font-weight: 600; }
.footer-group > summary::-webkit-details-marker { display: none; }
.footer-group > summary::marker { content: ""; }
.footer-group-title { min-width: 0; }
.footer-chevron { flex: none; color: var(--text-2); transform: rotate(90deg); transition: transform .15s var(--ease, ease); }
.footer-group[open] > summary .footer-chevron { transform: rotate(-90deg); }
.footer-group .footer-links { display: flex; flex-direction: column; gap: 0; padding: 0 0 var(--s2); }
.footer-group .footer-links a { min-width: 44px; min-height: 48px; padding-right: var(--s2); color: var(--text-2); }
.footer-group .footer-links a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--s4); flex-basis: 100%; margin-top: var(--s3); }
.footer-bottom .footer-legal { flex-basis: auto; margin: 0; }
.footer-version { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; color: var(--text-3); }
@media (min-width: 720px) {
  body:not(.maphome) .footer-explore {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 var(--s8);
    border-top: 0;
    margin-top: var(--s4);
  }
  body:not(.maphome) .footer-group { border-bottom: 0; }
  body:not(.maphome) .footer-group > summary { min-height: 44px; margin-bottom: var(--s1); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em; text-transform: none; color: var(--text-3); cursor: default; }
  body:not(.maphome) .footer-group > summary .footer-chevron { display: none; }
  body:not(.maphome) .footer-group .footer-links { padding: 0; }
  body:not(.maphome) .footer-group .footer-links a { min-height: 44px; }
  body:not(.maphome) .footer-places .footer-links { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--s4); }
  body:not(.maphome) .footer-places .footer-links li:last-child { grid-column: 1 / -1; }
}
.maphome-footer { position: relative; z-index: 12; background: var(--surface); border-top: 1px solid var(--border); padding-bottom: calc(var(--fab-sos-space, 60px) + var(--s6)); }
.maphome-footer .footer-inner { max-width: 40rem; padding-top: var(--s5); padding-bottom: var(--s5); }
@media (min-width: 900px) {
  .maphome-footer { width: 420px; border-right: 1px solid var(--border); padding-bottom: var(--s8); }
  .maphome-footer .footer-inner { max-width: none; padding: var(--s5); }
}
@media (min-width: 720px) and (max-width: 899px) {
  .maphome-footer .footer-explore {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 var(--s5);
    border-top: 0;
  }
  .maphome-footer .footer-group { border-bottom: 0; }
  .maphome-footer .footer-group > summary { min-height: 44px; margin-bottom: var(--s1); font-size: var(--fs-xs); font-weight: 600; color: var(--text-3); cursor: default; }
  .maphome-footer .footer-group > summary .footer-chevron { display: none; }
  .maphome-footer .footer-places .footer-links { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--s3); }
  .maphome-footer .footer-places .footer-links li:last-child { grid-column: 1 / -1; }
}


/* Batch 15c: service-first home, tab bar, back control, saved state */
.back-control {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 48px;
  min-width: 48px;
  padding: 0 10px;
  margin-left: -8px;
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  flex: none;
  align-self: center;
}
.back-control:hover { background: var(--hover); color: var(--text); }
.back-control .icon { width: 20px; height: 20px; }
.page-head .back-control { margin-bottom: var(--s2); align-self: flex-start; }

.language-card { position: relative; padding-top: var(--s8); }
.sheet-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-pill);
  color: var(--text);
  text-decoration: none;
}
.sheet-close:hover { background: var(--hover); }

body.home { min-height: 100vh; min-height: 100dvh; background: var(--surface); padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + var(--s6)); }
.home-main { padding: var(--s5) var(--s4) var(--s8); max-width: 40rem; margin: 0 auto; }
.home-auth { display: flex; flex-wrap: wrap; gap: var(--s3); margin: 0 0 var(--s5); }
.home-auth .btn { min-height: 48px; flex: 1 1 9rem; justify-content: center; font-weight: 600; }
.sheet-place.home-place, body.home .sheet-place, body.app .sheet-place { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s4); min-height: 44px; color: var(--text-2); }
body.home .sheet-place a, body.app .sheet-place a { margin-left: auto; min-height: 44px; display: inline-flex; align-items: center; }
.home-hello { margin: 0 0 var(--s4); font-size: var(--fs-lg); font-weight: 700; color: var(--text); }
.live-chip-inline { position: relative; top: auto; left: auto; right: auto; max-width: none; margin: 0 0 var(--s4); }
body.home .tabbar, body.home .home-footer { z-index: 12; }
body.home .home-footer { margin-bottom: 0; }

.profile-prompt {
  margin: 0 0 var(--s5);
  padding: var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface-muted);
}
.profile-prompt h2 { margin: 0 0 var(--s2); font-size: var(--fs-md); }
.profile-prompt p { margin: 0 0 var(--s2); color: var(--text-2); }
.profile-prompt ul { list-style: none; margin: 0; padding: 0; }
.profile-prompt a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); font-weight: 600; }

button.is-saved,
button.is-saved:disabled {
  background: var(--green-text);
  border-color: var(--green-text);
  color: #fff;
  opacity: 1;
}
@media (min-width: 900px) {
  body.home { padding-bottom: 0; }
  body.home .tabbar { display: none; }
}

/* Extra space so the raised Help tab does not cover the last content or footer. */
@media (max-width: 899px) {
  body.home { padding-bottom: calc(var(--tabbar-h) + 40px + env(safe-area-inset-bottom, 0px)); }
  body.home .home-footer,
  body.app .app-footer { padding-bottom: calc(var(--tabbar-h) + 40px + env(safe-area-inset-bottom, 0px)); }
  body.app .page { padding-bottom: calc(var(--tabbar-h) + 56px + env(safe-area-inset-bottom, 0px)); }
  .toasts { bottom: calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom, 0px)); }
}
