/* TRAC24 — map-first, one-screen-at-a-time. Light by default, dark follows the system. No page ever scrolls. */
/* Inter (SIL OFL), variable weight, served by us: no phone-font dependency. latin covers ă â î; latin-ext adds ș ț. */
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin.woff2?v=5.1.1) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin-ext.woff2?v=5.1.1) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --bg: #eceef1; --sheet: #ffffff; --surface: #f3f4f6; --surface2: #e6e8ec; --line: #e2e5ea;
  --text: #0d0f12; --mute: #667080; --primary: #0d0f12; --on-primary: #ffffff;
  --signal: #f5a400; --signal-ink: #1b1400; --signal-soft: #fff3d1;
  --ok: #087a48; --ok-soft: #dff5ea; --bad: #d92d2d; --bad-soft: #fde6e6; --info: #1a6fe0; --on-ok: #fff; --on-bad: #fff; /* WCAG AA: ≥ 4.5 on buttons and text */
  --route: #0d0f12; --casing: #ffffff; --map-bg: #e5e8ec; --shadow: 0 -8px 32px rgba(13, 15, 18, .16); --shadow-sm: 0 2px 10px rgba(13, 15, 18, .18);
  --sheet-h: 0px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color-scheme: light dark;
}
@media all {
  :root[data-theme="dark"] {
    --bg: #0b0d10; --sheet: #14171b; --surface: #1d2127; --surface2: #282d35; --line: #2b3038;
    --text: #f4f6f8; --mute: #98a2b1; --primary: #ffb81c; --on-primary: #171100;
    --signal: #ffb81c; --signal-soft: #2c2410; --ok: #34d399; --ok-soft: #10281f; --bad: #ff6b6b; --bad-soft: #301616; --info: #6cb4ff; --on-ok: #04170f; --on-bad: #2b0707;
    --route: #ffb81c; --casing: #0b0d10; --map-bg: #171a1f; --shadow: 0 -8px 32px rgba(0, 0, 0, .55); --shadow-sm: 0 2px 10px rgba(0, 0, 0, .5);
  }
}
/* The dark theme exists (theme.js sets data-theme); declaring it in CSS stops Samsung Internet from repainting the app with its own dark mode. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
body { -webkit-text-size-adjust: 100%; font-size: 15px; line-height: 1.35; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; } h2 { font-size: 19px; font-weight: 800; letter-spacing: -.015em; line-height: 1.2; } h3 { font-size: 16px; font-weight: 700; }
.muted { color: var(--mute); } .small { font-size: 13px; } .tiny { font-size: 12px; } .ok { color: var(--ok); } .bad { color: var(--bad); } .center { text-align: center; } .grow { flex: 1; min-width: 0; } .tr { text-align: right; } .b { font-weight: 700; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 8px; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { opacity: .4; cursor: not-allowed; }
.row { display: flex; align-items: center; } .row.between { justify-content: space-between; } .row.end { justify-content: flex-end; } .row.gap { gap: 10px; } .row.gap-s { gap: 6px; } .row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 10px; } .stack.s { gap: 6px; } .stack.l { gap: 14px; }

/* ---- shell ---------------------------------------------------------------- */
#app { position: fixed; inset: 0; overflow: hidden; }
#map { position: absolute; inset: 0; z-index: 0; isolation: isolate; background: var(--map-bg); touch-action: none; overflow: hidden; user-select: none; cursor: grab; }
#map.no-tiles { background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 64px 64px; background-position: var(--gx, 0) var(--gy, 0); }
.topbar { position: absolute; z-index: 8; top: calc(var(--safe-t) + 12px); left: 12px; right: 12px; display: flex; align-items: center; gap: 8px; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.brandchip { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 22px; background: var(--sheet); box-shadow: var(--shadow-sm); font-weight: 900; font-size: 16px; letter-spacing: .01em; color: var(--text); text-decoration: none; }
.brandchip b { color: var(--signal); } .brandchip img { display: block; margin-left: -4px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); } .brandchip span { letter-spacing: -.01em; }
.verified { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px 2px 5px; border-radius: 99px; background: var(--ok-soft); color: var(--ok); font-size: 11px; font-weight: 800; letter-spacing: .01em; flex: none; }
.demo-tag { font-size: 10px; font-weight: 900; letter-spacing: .1em; padding: 3px 6px; border-radius: 6px; background: var(--signal); color: var(--signal-ink); }
.conn { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); } .conn.off { background: var(--bad); }
.iconbtn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--sheet); box-shadow: var(--shadow-sm); flex: none; color: var(--text); text-decoration: none; transition: transform var(--t-fast); }
.iconbtn:active { transform: scale(.92); } .iconbtn.small { width: 34px; height: 34px; box-shadow: none; background: var(--surface); position: relative; }
.iconbtn.small::after { content: ''; position: absolute; inset: -5px; } /* 44 px touch target, 34 px look */
.iconbtn.plain { box-shadow: none; background: var(--surface); }
.spacer { flex: 1; }
.fabs { position: absolute; z-index: 7; right: 12px; bottom: calc(var(--sheet-h) + 12px); display: flex; flex-direction: column; gap: 10px; transition: bottom var(--t); }
.power { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 12px; border-radius: 22px; background: var(--sheet); box-shadow: var(--shadow-sm); font-weight: 800; }
.power i { width: 12px; height: 12px; border-radius: 50%; background: var(--mute); } .power.on i { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.sheet { position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; max-height: 90dvh; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; background: var(--sheet); border-radius: 24px 24px 0 0; box-shadow: var(--shadow); padding: 18px 16px calc(14px + var(--safe-b)); display: flex; flex-direction: column; gap: 12px; }
.sheet::-webkit-scrollbar { display: none; }
.sheet > * { flex-shrink: 0; }
.sheet::before { content: ''; position: absolute; top: 7px; left: 50%; width: 36px; height: 4px; margin-left: -18px; background: var(--surface2); border-radius: 4px; }
.sheet.enter { animation: rise var(--t-slow) var(--ease); }
#app.picking .sheet, #app.picking .topbar, #app.picking .fabs { display: none; }
@media (min-width: 900px) {
  .sheet { left: 16px; right: auto; bottom: 16px; width: 404px; border-radius: 22px; box-shadow: 0 12px 48px rgba(0, 0, 0, .28); padding-bottom: 16px; }
  .sheet::before { display: none; } .sheet { padding-top: 16px; }
  .fabs { bottom: 16px; }
}

/* Tablet in portrait (600-899 px wide, tall): the bottom sheet keeps a phone-like width instead of stretching across the screen. */
@media (min-width: 600px) and (max-width: 899px) and (min-height: 521px) { .sheet { left: 0; right: 0; margin-inline: auto; max-width: 520px; } }

/* ---- controls ------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; padding: 0 20px; border-radius: 14px; background: var(--surface2); font-weight: 700; font-size: 16px; color: var(--text); text-decoration: none; transition: transform var(--t-fast), filter var(--t-fast); white-space: nowrap; }
.btn:active:not(:disabled) { transform: scale(.985); } .btn:hover:not(:disabled) { filter: brightness(.97); }
.btn.primary { background: var(--primary); color: var(--on-primary); }
.btn.signal { background: var(--signal); color: var(--signal-ink); }
.btn.secondary { background: var(--surface); }
.btn.danger { background: var(--bad); color: var(--on-bad); } .btn.ghost { background: transparent; } .btn.danger-text { color: var(--bad); }
.btn.ok { background: var(--ok); color: var(--on-ok); }
.btn.block { display: flex; width: 100%; } .btn.sm { height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; } .btn.xs { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 10px; }
.btn.call { width: 52px; padding: 0; border-radius: 50%; background: var(--ok); color: var(--on-ok); flex: none; }
.seg { display: flex; gap: 3px; padding: 3px; border-radius: 13px; background: var(--surface); }
.seg button { flex: 1; min-width: 0; height: 40px; border-radius: 10px; font-weight: 700; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; justify-content: center; color: var(--mute); transition: background var(--t-fast), color var(--t-fast); }
.seg button.on { background: var(--sheet); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.seg.compact button { font-size: 13px; padding: 0 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 38px; padding: 0 14px; border-radius: 19px; background: var(--surface); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; transition: background var(--t-fast); }
.chip.on { background: var(--primary); color: var(--on-primary); }
.lab { font-size: 12.5px; font-weight: 600; color: var(--mute); margin-bottom: 6px; display: block; }
.field { display: flex; flex-direction: column; }
input, textarea { width: 100%; font: inherit; font-size: 16px; /* iOS zooms into smaller fields */ color: var(--text); background: var(--surface); border: 2px solid transparent; border-radius: 13px; padding: 12px 14px; min-height: 50px; outline: none; transition: border-color var(--t-fast); }
input:focus, textarea:focus { border-color: var(--text); } textarea { resize: none; display: block; }
input::placeholder, textarea::placeholder { color: var(--mute); opacity: .75; }
input[type=range] { padding: 0; min-height: 28px; accent-color: var(--primary); background: none; }
.code-input { text-align: center; font-size: 32px; font-weight: 800; letter-spacing: .3em; padding-left: 22px; }
.phone-wrap { display: flex; align-items: center; gap: 0; background: var(--surface); border-radius: 13px; border: 2px solid transparent; } .phone-wrap:focus-within { border-color: var(--text); }
.phone-wrap span { padding-left: 14px; font-weight: 700; } .phone-wrap input { background: none; border: 0; }
.stepper-n { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 8px; }
.stepper-n .val { text-align: center; font-size: 30px; font-weight: 800; letter-spacing: -.02em; } .stepper-n .val small { font-size: 14px; font-weight: 700; color: var(--mute); margin-left: 4px; }
.stepper-n button { height: 52px; border-radius: 14px; background: var(--surface); display: grid; place-items: center; font-size: 24px; font-weight: 700; } .stepper-n button:active { background: var(--surface2); }

/* ---- content blocks ------------------------------------------------------- */
.head { display: flex; align-items: center; gap: 10px; } .head .grow > .sub { margin-top: 2px; }
.sub { font-size: 14px; color: var(--mute); }
.back { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; flex: none; }
.loc { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 11px 14px; border-radius: 14px; background: var(--surface); min-width: 0; }
.loc .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--info); box-shadow: 0 0 0 4px color-mix(in srgb, var(--info) 22%, transparent); flex: none; }
.loc .dot.sq { border-radius: 3px; background: var(--text); box-shadow: 0 0 0 4px var(--surface2); }
.loc .t { font-weight: 700; } .loc .t + .s { font-size: 12.5px; color: var(--mute); }
.loc .act { font-weight: 700; font-size: 14px; color: var(--info); flex: none; }
.loc.empty .t { color: var(--mute); font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.svc { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 88px; border-radius: 16px; background: var(--surface); transition: transform var(--t-fast), background var(--t-fast); padding: 0 4px; }
.svc svg { color: var(--text); } .svc .n { font-weight: 700; font-size: 13px; } .svc .p { font-size: 11.5px; color: var(--mute); }
.svc:hover { background: var(--surface2); } .svc:active { transform: scale(.95); }
.svc.hot svg { color: var(--signal); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--surface); font-size: 13px; color: var(--mute); } .notice svg { flex: none; margin-top: 1px; color: var(--ok); }
.notice.warn { background: var(--signal-soft); color: var(--text); } .notice.warn svg { color: var(--signal); }
.notice.bad { background: var(--bad-soft); color: var(--text); } .notice.bad svg { color: var(--bad); }
.kv { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14.5px; } .kv > span:first-child { color: var(--mute); } .kv strong { text-align: right; }
.kv.total { padding-top: 10px; margin-top: 2px; border-top: 1px solid var(--line); font-size: 17px; } .kv.total > span:first-child { color: var(--text); font-weight: 700; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: 13px; background: var(--surface); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.badge.signal { background: var(--signal-soft); color: var(--text); } .badge.signal svg { color: var(--signal); } .badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.info { color: var(--info); } .badge.dark { background: var(--primary); color: var(--on-primary); } .badge.bad { background: var(--bad-soft); color: var(--bad); }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--signal-soft); color: var(--text); font-weight: 800; font-size: 16px; flex: none; }
.plate { display: inline-flex; align-items: center; height: 24px; border-radius: 5px; border: 1.5px solid #111; background: #fff; color: #111; font-weight: 800; font-size: 13px; letter-spacing: .06em; overflow: hidden; }
.plate::before { content: 'RO'; align-self: stretch; display: grid; place-items: center; width: 20px; background: #0a3ca8; color: #fff; font-size: 8px; letter-spacing: 0; margin-right: 6px; }
.plate { padding-right: 8px; }
.ttl { height: 4px; border-radius: 3px; background: var(--surface2); overflow: hidden; } .ttl i { display: block; height: 100%; width: 100%; background: var(--signal); border-radius: 3px; transition: width .5s linear; } .ttl.urgent i { background: var(--bad); }
.count { font-variant-numeric: tabular-nums; font-weight: 700; } .count.urgent { color: var(--bad); }
.phasewrap { display: flex; flex-direction: column; gap: 5px; } .phaselab { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--mute); } .phaselab b { color: var(--text); font-weight: 800; letter-spacing: .01em; }
.phasebar { display: flex; gap: 4px; } .phasebar i { flex: 1; height: 5px; border-radius: 3px; background: var(--surface2); transition: background var(--t-slow); } .phasebar i.done { background: var(--ok); } .phasebar i.now { background: var(--signal); animation: pulse 1.6s infinite; }
.price { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; } .price small { font-size: 14px; font-weight: 700; letter-spacing: 0; color: var(--mute); margin-left: 4px; }
/* Navigation strip: while driving the sheet folds into one line (minutes, distance, arrival, call) and leaves the road visible. */
.sheet[data-screen="job-strip"] { padding: 16px 14px calc(10px + var(--safe-b)); gap: 0; }
.strip { display: flex; align-items: center; gap: 10px; cursor: pointer; min-height: 52px; }
.strip .eta { font-size: 34px; } .strip .eta small { font-size: 14px; }
.strip .btn.call { width: 46px; height: 46px; }
.rot90 { transform: rotate(90deg); }
/* Loading skeleton: the shape of the first screen, with a soft sweep, instead of an empty sheet. */
.skel { display: block; border-radius: 12px; background: linear-gradient(100deg, var(--surface) 40%, var(--surface2) 50%, var(--surface) 60%) 0 0 / 300% 100%; animation: sweep 1.4s var(--ease) infinite; }
.skel-title { height: 26px; width: 58%; } .skel-line { height: 14px; width: 82%; }
.skel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; } .skel-grid .skel { height: 76px; border-radius: 16px; }
.skel-btn { height: 54px; border-radius: 14px; }
@keyframes sweep { from { background-position: 100% 0; } to { background-position: 0 0; } }
.eta { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1; } .eta small { font-size: 16px; font-weight: 700; color: var(--mute); letter-spacing: 0; margin-left: 4px; }
.divider { height: 1px; background: var(--line); }
.dots { display: flex; gap: 5px; align-items: center; justify-content: center; } .dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--surface2); transition: width var(--t) var(--ease), background-color var(--t) var(--ease); } .dots i.on { width: 18px; background: var(--text); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.offer { display: flex; flex-direction: column; gap: 12px; touch-action: pan-y; }
.offer.slide-l { animation: slideL var(--t); } .offer.slide-r { animation: slideR var(--t); }
.radar-head { display: flex; align-items: center; gap: 14px; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--surface2); border-top-color: var(--signal); animation: spin 1s linear infinite; flex: none; }
.code { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; border-radius: 16px; background: var(--signal-soft); border: 2px dashed var(--signal); }
.code .digits { font-size: 44px; font-weight: 900; letter-spacing: .14em; padding-left: .14em; line-height: 1; }
.stars { display: flex; justify-content: center; gap: 2px; } .star { color: var(--surface2); padding: 4px; } .star.on { color: var(--signal); } .star.on svg { fill: currentColor; } .star svg { width: 34px; height: 34px; }
.rate { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; } .rate svg { fill: var(--signal); color: var(--signal); }
.hero { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 6px 0; }
.hero .ico { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); } .hero .ico.off { background: var(--surface); color: var(--mute); }
.thumbs { display: flex; gap: 8px; }
.thumb { position: relative; width: 68px; height: 68px; border-radius: 12px; overflow: hidden; background: var(--surface); display: grid; place-items: center; padding: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; } .thumb.add { color: var(--mute); border: 2px dashed var(--surface2); }
.thumb .x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .7); color: #fff; display: grid; place-items: center; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; } .timeline li { display: grid; grid-template-columns: 48px 1fr; gap: 8px; } .timeline time { color: var(--mute); }
.menu { display: flex; flex-direction: column; } .menu button { display: flex; align-items: center; gap: 14px; height: 54px; font-weight: 600; font-size: 16px; text-align: left; border-bottom: 1px solid var(--line); } .menu button:last-child { border: 0; } .menu button.bad { color: var(--bad); }

/* ---- overlays, toasts ----------------------------------------------------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(8, 10, 14, .5); display: flex; align-items: flex-end; justify-content: center; animation: fade var(--t); }
.modal { width: min(520px, 100%); max-height: 88dvh; overflow-y: auto; background: var(--sheet); border-radius: 24px 24px 0 0; padding: 16px 16px calc(16px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; animation: rise var(--t) var(--ease); }
.modal-head { display: flex; align-items: center; justify-content: space-between; }
@media (min-width: 700px) { .overlay { align-items: center; } .modal { border-radius: 22px; } }
.lightbox { max-width: 96%; max-height: 90dvh; border-radius: 14px; align-self: center; }
.toasts { position: fixed; z-index: 60; top: calc(var(--safe-t) + 66px); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { pointer-events: auto; max-width: 440px; padding: 12px 16px; border-radius: 14px; background: #111; color: #fff; box-shadow: 0 8px 30px rgba(0, 0, 0, .35); font-weight: 600; font-size: 14px; animation: drop var(--t); }
.toast.error { background: var(--bad); color: var(--on-bad); } .toast.ok { background: var(--ok); color: var(--on-ok); }

/* ---- pick-a-point mode ---------------------------------------------------- */
.pickui { position: absolute; inset: 0; z-index: 9; pointer-events: none; }
.pickui > * { pointer-events: auto; }
.picktop { position: absolute; top: calc(var(--safe-t) + 12px); left: 12px; right: 12px; display: flex; flex-direction: column; gap: 8px; max-width: 520px; }
.searchbox { display: flex; align-items: center; gap: 8px; background: var(--sheet); border-radius: 22px; box-shadow: var(--shadow-sm); padding: 0 6px 0 6px; height: 44px; } .searchbox input { background: none; border: 0; min-height: 44px; padding: 0 6px; } .searchbox svg { color: var(--mute); flex: none; }
.results { background: var(--sheet); border-radius: 16px; box-shadow: var(--shadow-sm); overflow: hidden; } .results button { display: flex; width: 100%; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); font-weight: 600; } .results button:last-child { border: 0; } .results button:hover { background: var(--surface); } .results svg { color: var(--mute); flex: none; }
.pickcard { position: absolute; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); max-width: 460px; margin: 0 auto; background: var(--sheet); border-radius: 22px; box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.pickfab { position: absolute; right: 12px; top: calc(var(--safe-t) + 66px); }

/* ---- map internals -------------------------------------------------------- */
.glmap { position: absolute; inset: 0; z-index: 0; } .glmap .maplibregl-canvas { outline: none; }
.map-markers { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.map-pin { z-index: 3; } .map-attr { z-index: 4; }
.map-attr { position: absolute; left: 6px; bottom: calc(var(--sheet-h) + 4px); font-size: 10px; color: var(--mute); background: color-mix(in srgb, var(--sheet) 75%, transparent); padding: 1px 6px; border-radius: 5px; pointer-events: none; }
.map-pin { position: absolute; transform: translate(-50%, -100%); pointer-events: none; z-index: 3; }
.map-pin-head { display: block; color: var(--text); transition: transform var(--t-fast); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .4)); } .map-pin-head svg { width: 44px; height: 44px; fill: var(--signal); stroke: var(--text); }
.map-pin.lift .map-pin-head { transform: translateY(-10px); }
.map-pin-shadow { position: absolute; left: 50%; bottom: -3px; width: 12px; height: 5px; margin-left: -6px; border-radius: 50%; background: rgba(0, 0, 0, .35); }
.mk { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform; }
.mk.clickable { pointer-events: auto; cursor: pointer; }
.mk-body { position: absolute; display: grid; place-items: center; }
.mk-label { position: absolute; left: 0; transform: translateX(-50%); font-size: 11.5px; font-weight: 800; white-space: nowrap; padding: 2px 8px; border-radius: 10px; background: var(--sheet); box-shadow: var(--shadow-sm); }
.mk-me .mk-body { width: 18px; height: 18px; left: -9px; top: -9px; border-radius: 50%; background: var(--info); border: 3px solid #fff; box-shadow: 0 0 0 0 color-mix(in srgb, var(--info) 55%, transparent), 0 2px 6px rgba(0, 0, 0, .4); animation: halo 2.2s infinite; } .mk-me .mk-body svg { display: none; }
.mk-pickup .mk-body, .mk-dest .mk-body { width: 38px; height: 38px; left: -19px; top: -50px; border-radius: 50%; background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-sm); }
.mk-pickup .mk-body::after, .mk-dest .mk-body::after { content: ''; position: absolute; bottom: -6px; width: 12px; height: 12px; background: var(--primary); transform: rotate(45deg); z-index: -1; border-radius: 2px; }
.mk-dest .mk-body { border-radius: 10px; }
.mk-pickup .mk-label, .mk-dest .mk-label { top: 6px; }
.mk-provider .mk-body { width: 42px; height: 42px; left: -21px; top: -21px; border-radius: 50%; background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-sm), 0 0 0 4px color-mix(in srgb, var(--primary) 20%, transparent); }
.mk-provider .mk-body svg { transform: rotate(calc(var(--rot, 0deg) - 45deg)); }
.mk-provider .mk-label { top: 26px; } .mk-provider.stale .mk-body { opacity: .5; }
.mk-base .mk-body { width: 34px; height: 34px; left: -17px; top: -17px; border-radius: 50%; background: var(--sheet); border: 3px solid var(--info); box-shadow: var(--shadow-sm); } .mk-base .mk-label { top: 20px; }
.mk-req .mk-body { height: 34px; left: 0; top: -17px; transform: translateX(-50%); padding: 0 11px 0 9px; border-radius: 17px; background: var(--sheet); box-shadow: var(--shadow-sm); border: 2px solid var(--signal); display: flex; gap: 6px; white-space: nowrap; }
.mk-req .mk-text { font-weight: 800; font-size: 13px; } .mk-req.sel .mk-body { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.mk-radar i { position: absolute; left: -90px; top: -90px; width: 180px; height: 180px; border-radius: 50%; border: 2px solid var(--signal); opacity: 0; animation: ring 3s infinite; } .mk-radar i:nth-child(2) { animation-delay: 1s; } .mk-radar i:nth-child(3) { animation-delay: 2s; }
.mk-radar b { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--signal); border: 3px solid #fff; box-shadow: var(--shadow-sm); }

/* ---- turn-by-turn banner (provider) --------------------------------------- */
.navbanner { position: absolute; z-index: 7; left: 12px; right: 12px; margin-inline: auto; top: calc(var(--safe-t) + 66px); max-width: 520px; /* centred at the top */ display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 12px 16px; border-radius: 18px; background: #101317; color: #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); overflow: hidden; }
.navbanner .arrow { width: 46px; height: 46px; display: grid; place-items: center; flex: none; color: #fff; } .navbanner .arrow svg { width: 42px; height: 42px; transition: transform var(--t-slow); stroke-width: 2.4; }
.navbanner .grow { flex: 1; min-width: 0; }
.navbanner .d { font-size: 28px; font-weight: 900; letter-spacing: -.02em; line-height: 1; } .navbanner .t { font-size: 14px; opacity: .85; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.navbanner.now .arrow { color: var(--signal); animation: nudge 1s ease-in-out infinite; }
.navbanner .spd { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 52px; height: 52px; border-radius: 50%; border: 3px solid #fff3; font-size: 18px; line-height: 1; } .navbanner .spd small { font-size: 9px; opacity: .7; font-weight: 700; margin-top: 1px; }
.navbanner .appr { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #ffffff1f; } .navbanner .appr b { display: block; height: 100%; background: var(--signal); transition: width .9s linear; }
.navbanner .then { flex-basis: 100%; display: flex; align-items: center; gap: 8px; margin-top: 6px; padding-top: 8px; border-top: 1px solid #ffffff22; font-size: 13px; opacity: .8; min-width: 0; } .navbanner .then span:first-child { font-weight: 800; text-transform: uppercase; font-size: 10.5px; letter-spacing: .08em; opacity: .7; } .navbanner .then svg { stroke-width: 2.6; flex: none; }
.navbanner.off { background: #3a2a05; } .navbanner .spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid #ffffff33; border-top-color: var(--signal); animation: spin .8s linear infinite; }
@keyframes nudge { 50% { transform: translateY(-3px); } }
.navtools { position: absolute; z-index: 7; right: 12px; bottom: calc(var(--sheet-h) + 120px); display: flex; flex-direction: column; gap: 10px; transition: bottom var(--t); }
.navtool.on { background: var(--primary); color: var(--on-primary); } .navtool svg { transition: transform var(--t-slow); }
.recenter { position: absolute; z-index: 7; left: 50%; transform: translateX(-50%); bottom: calc(var(--sheet-h) + 14px); display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 23px; background: #101317; color: #fff; font-weight: 800; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); animation: rise var(--t); } .recenter svg { color: var(--signal); fill: var(--signal); }
.simfab { position: absolute; z-index: 7; left: 12px; bottom: calc(var(--sheet-h) + 40px); }
.simspeed { position: absolute; z-index: 7; left: 192px; bottom: calc(var(--sheet-h) + 40px); min-width: 54px; }
@media (min-width: 900px) { .navtools { bottom: 126px; } .recenter, .simfab { bottom: 18px; } .simfab { left: 436px; } .simspeed { left: 630px; bottom: 18px; } .recenter { left: calc(50% + 200px); } .navbanner { left: 436px; right: auto; width: 420px; } }

/* ---- ops ------------------------------------------------------------------- */
.stripe { height: 8px; background: repeating-linear-gradient(135deg, var(--signal) 0 16px, #14110a 16px 32px); }
.ops { width: min(1100px, 100%); margin: 0 auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; height: calc(100dvh - 8px); overflow-y: auto; }
.ops table { width: 100%; border-collapse: collapse; font-size: 13.5px; } .ops th, .ops td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; } .ops code { font-size: 12px; color: var(--mute); word-break: break-all; }
.ops .panel, .panel { padding: 16px; border-radius: 16px; background: var(--sheet); box-shadow: var(--shadow-sm); overflow-x: auto; }
/* In the flex column .ops a panel with overflow-x:auto has min-height 0, so a long page squashed it below its content. */
.ops > * { flex: none; }
.btn.small { height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }

@keyframes ring { 0% { transform: scale(.2); opacity: .8; } 100% { transform: scale(1); opacity: 0; } }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes halo { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--info) 50%, transparent), 0 2px 6px rgba(0, 0, 0, .4); } 60% { box-shadow: 0 0 0 14px transparent, 0 2px 6px rgba(0, 0, 0, .4); } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes drop { from { transform: translateY(-10px); opacity: 0; } }
@keyframes slideL { from { transform: translateX(26px); opacity: 0; } }
@keyframes slideR { from { transform: translateX(-26px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-height: 600px) { .svc { height: 74px; } .eta { font-size: 34px; } .code .digits { font-size: 36px; } }

/* keyboard open on a phone: the viewport is short, drop secondary text so the action stays visible */
@media (max-height: 560px) { .sheet[data-screen^="verify"] .sub, .sheet[data-screen^="verify"]::before { display: none; } .sheet { padding-top: 14px; gap: 10px; } }

/* MapLibre chrome: attribution sits above the bottom sheet, in the app's own look; no logo, no built-in zoom buttons. */
#map .maplibregl-ctrl-bottom-left, #map .maplibregl-ctrl-bottom-right { bottom: var(--sheet-h); z-index: 4; }
#map .maplibregl-ctrl-logo { display: none; }
/* Discreet: no box, small and faint; a thin halo keeps it readable over any map colour. */
#map .maplibregl-ctrl-attrib { font-size: 9px; background: none; box-shadow: none; color: var(--mute); opacity: .6; border-radius: 0; margin: 0 0 4px 6px; padding: 0 2px; text-shadow: 0 0 2px var(--sheet), 0 0 3px var(--sheet), 0 0 4px var(--sheet); }
#map .maplibregl-ctrl-attrib a { color: inherit; }
#map .maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib { padding-left: 22px; } /* room for the small info button, which sits at the left edge here */
#map .maplibregl-ctrl-attrib-button { background-color: transparent; width: 18px; height: 18px; background-size: 12px; opacity: .55; }
:root[data-theme="dark"] #map .maplibregl-ctrl-attrib-button { filter: invert(1); }

/* Navigation arrow: chevron with a bright edge, soft ground ring and (at night) a glow, instead of a plain disc. */
.mk-provider.car .mk-body { width: 58px; height: 58px; left: -29px; top: -29px; background: transparent; box-shadow: none; border-radius: 0; overflow: visible; }
.mk-provider.car .mk-body::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--primary) 34%, transparent), transparent 70%); }
.mk-provider.car .mk-body svg { position: relative; width: 58px; height: 58px; transform: rotate(var(--rot, 0deg)); filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .45)); }
.mk-provider.car .chev { fill: var(--primary); stroke: var(--casing); stroke-width: 3.5; stroke-linejoin: round; }
:root[data-theme="dark"] .mk-provider.car .mk-body svg { filter: drop-shadow(0 0 8px color-mix(in srgb, var(--primary) 65%, transparent)) drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); } :root[data-theme="dark"] .mk-provider.car .chev { stroke: #fff; }
.simdetour { position: absolute; z-index: 7; left: 258px; bottom: calc(var(--sheet-h) + 40px); min-width: 44px; padding-inline: 12px; }
@media (min-width: 900px) { .simdetour { left: 630px; bottom: 70px; } }
.mk-turn { z-index: 2; } .mk-turn .mk-body { width: 34px; height: 34px; left: -17px; top: -17px; border-radius: 50%; background: #fff; color: #0b0d10; border: 3px solid var(--primary); box-shadow: var(--shadow-sm); display: grid; place-items: center; }
:root[data-theme="dark"] .mk-turn .mk-body { background: #0b0d10; color: #fff; }
.mk-provider.car .mk-label { top: 36px; }

.maplibregl-ctrl-attrib a { padding: 8px 2px; }

/* phone held sideways: the sheet becomes a compact side panel, the map keeps the full height beside it, the manoeuvre banner shrinks to a slim strip */
@media (orientation: landscape) and (max-height: 520px) {
  .sheet { left: 12px; right: auto; bottom: 12px; width: min(380px, 48vw); max-height: calc(100dvh - 24px - 56px - var(--safe-t)); /* stops under the logo, which stays top-left */ border-radius: 20px; box-shadow: 0 10px 36px rgba(0, 0, 0, .35); padding: 10px 14px; gap: 6px; }
  .sheet::before { display: none; }
  .sheet h2 { font-size: 19px; } .sheet h3 { font-size: 16px; }
  .sheet .btn { height: 44px; font-size: 15px; border-radius: 12px; } .sheet .btn.sm { height: 34px; }
  .svc { height: 62px; } .eta { font-size: 30px; } .code .digits { font-size: 30px; letter-spacing: .12em; }
  /* compact density: every control keeps a 34-40 px touch height, labels and gaps shrink */
  .seg { padding: 2px; border-radius: 11px; } .seg button { height: 32px; font-size: 13px; }
  .chip { height: 30px; font-size: 13px; padding: 0 12px; } .chips { gap: 6px; }
  .lab { font-size: 11.5px; line-height: 1.2; margin-bottom: 2px; }
  .stepper-n { grid-template-columns: 44px 1fr 44px; gap: 6px; } .stepper-n .val { font-size: 24px; } .stepper-n button { height: 40px; border-radius: 12px; font-size: 20px; }
  .loc { padding: 7px 12px; border-radius: 12px; } .back { width: 32px; height: 32px; }
  .hero { gap: 4px; padding: 0; } .hero .ico { width: 44px; height: 44px; } .price { font-size: 26px; }
  .code { padding: 8px; gap: 4px; } .code-input { font-size: 26px; padding-top: 6px; padding-bottom: 6px; }
  /* offer composer: price and arrival time side by side */
  .offer { gap: 8px; }
  .offer .stack { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; } .offer .stack > :nth-child(n+3) { grid-column: 1 / -1; }
  .offer .stepper-n { grid-template-columns: 34px 1fr 34px; gap: 4px; } .offer .stepper-n .val { font-size: 20px; } .offer .stepper-n .val small { font-size: 11px; margin-left: 2px; } .offer .stepper-n button { height: 36px; }
  .sheet[data-screen^="wizard"] .chip { height: 28px; }
  .sheet[data-screen^="wizard"] label.field { display: grid; grid-template-columns: 1fr minmax(96px, 120px); align-items: center; gap: 0 10px; } .sheet[data-screen^="wizard"] label.field .lab { margin: 0; } /* label left, field right */
  .sheet[data-screen="wizard-0"] label.field, .sheet[data-screen="wizard-2"] label.field { display: flex; flex-direction: column; align-items: stretch; }
  .sheet[data-screen="wizard-1"] .stack > div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; } .sheet[data-screen="wizard-1"] .chips { display: contents; } .sheet[data-screen="wizard-1"] .lab { margin: 0 4px 0 0; } .sheet[data-screen="wizard-1"] .seg { flex: 1 1 200px; } /* group label shares the first row with its options */
  .sheet[data-screen="wizard-1"] input:not([type=range]) { min-height: 32px; padding-top: 3px; padding-bottom: 3px; }
  .stack.s:has(> .loc + .loc) { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } /* pickup and destination side by side */
  .stack.s:has(> .loc + .loc) .loc { padding: 6px 10px; gap: 8px; align-items: center; } .stack.s:has(> .loc + .loc) .loc .act { display: none; } /* the whole row is the button */
  .stack.s:has(> .loc + .loc) .loc .t { font-size: 13.5px; line-height: 1.2; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .stack.s:has(> .loc + .loc) .loc .s { font-size: 11.5px; }
  .head .grow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; } .head .grow > .sub { margin: 0; } /* subtitle next to the title */
  .head .grow > .sub { margin-top: 0; font-size: 13px; } .stack { gap: 6px; } .stack.l { gap: 8px; }
  .sheet input, .sheet textarea { padding-top: 6px; padding-bottom: 6px; } .sheet input:not([type=range]) { min-height: 38px; } .sheet textarea { min-height: 60px; }
  .sheet[data-screen="wizard-0"] .stack { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; } /* profile form: two fields per row */
  .sheet > .btn.primary, .sheet .btn.primary.block { position: sticky; bottom: -2px; z-index: 2; box-shadow: 0 -12px 14px -4px var(--sheet); } /* the main action stays reachable while the rest scrolls */
  .fabs { bottom: 12px; }
  /* the logo keeps its place top-left, as in portrait; the bar is just a little lower-profile */
  .topbar { top: calc(var(--safe-t) + 8px); } .topbar .brandchip { height: 40px; }
  .navbanner { top: 8px; left: min(404px, 50vw); right: auto; width: min(380px, calc(100vw - min(404px, 50vw) - 184px)); flex-wrap: nowrap; gap: 8px; padding: 6px 12px; border-radius: 14px; }
  /* Driving with the folded strip (a small card bottom-left), the left side is free: the turn banner takes it, text uncut; the map credit stays above the card. */
  #app:has(.sheet[data-screen="job-strip"]) .navbanner { left: 0; right: 0; margin-inline: auto; top: calc(var(--safe-t) + 8px); width: min(520px, calc(100vw - 2 * 250px)); } /* top centre, between the logo and the buttons */
  #app:has(.sheet[data-screen="job-strip"]) .navbanner .t { -webkit-line-clamp: 2; }
  #app:has(.sheet[data-screen="job-strip"]) .map-attr, #app:has(.sheet[data-screen="job-strip"]) #map .maplibregl-ctrl-bottom-left { bottom: calc(var(--sheet-h) + 18px); }
  .navbanner .arrow { width: 34px; height: 34px; } .navbanner .arrow svg { width: 30px; height: 30px; }
  .navbanner .d { font-size: 21px; } .navbanner .t { font-size: 12px; margin-top: 2px; -webkit-line-clamp: 1; }
  .navbanner .spd { min-width: 40px; height: 40px; border-width: 2px; font-size: 14px; } .navbanner .spd small { display: none; }
  .navbanner .then { flex: none; flex-basis: auto; margin: 0; padding: 0 0 0 8px; border: 0; border-left: 1px solid #ffffff2e; } .navbanner .then span { display: none; } .navbanner .then svg { width: 20px; height: 20px; }
  .navtools { bottom: 122px; } .recenter, .simfab, .simspeed, .simdetour { bottom: 12px; }
  .simfab { left: min(404px, 50vw); } .simspeed { left: calc(min(404px, 50vw) + 62px); } .simdetour { left: calc(min(404px, 50vw) + 124px); } .recenter { left: calc(min(404px, 50vw) + 190px); transform: none; }
  /* sheets (modals) and the address picker: compact, never taller than the screen, the confirm button stays in view */
  .modal { width: min(560px, 92vw); max-height: calc(100dvh - 16px); border-radius: 20px; padding: 10px 14px 12px; gap: 8px; }
  .modal-head h3 { font-size: 17px; }
  .modal .btn { height: 44px; } .modal .btn.primary.block { position: sticky; bottom: -4px; z-index: 2; box-shadow: 0 -12px 14px -4px var(--sheet); }
  .modal .thumb { width: 64px; height: 64px; } .modal .menu button { min-height: 44px; }
  .picktop { top: 8px; right: auto; width: min(460px, 48vw); } .pickfab { top: 8px; }
  .pickcard { left: auto; right: 12px; bottom: 12px; width: min(380px, 46vw); margin: 0; padding: 12px; }
}

/* landscape with the on-screen keyboard open (viewport under ~260 px): only what is needed to type and confirm stays */
@media (orientation: landscape) and (max-height: 260px) {
  .topbar, .fabs { display: none; }
  .sheet { top: 6px; bottom: 6px; max-height: calc(100dvh - 12px); padding: 6px 12px; gap: 4px; border-radius: 16px; }
  .sheet h1, .sheet h2, .sheet h3, .sheet .sub, .sheet .tiny, .sheet .phasewrap, .sheet .lab:not(label .lab) { display: none; } .sheet .stack.s:has(> h1:only-child), .sheet .stack.s:has(> h1:first-child + .sub) { display: none; }
  .sheet .btn { height: 38px; } .sheet .btn.sm { height: 30px; } .sheet input:not([type=range]) { min-height: 34px; } .sheet .code-input { font-size: 20px; min-height: 36px; padding-top: 2px; padding-bottom: 2px; }
  .sheet p { display: none; } .sheet .row.between { font-size: 12px; }
  .modal { max-height: calc(100dvh - 8px); padding: 6px 12px; gap: 4px; } .modal-head h3 { display: none; } .modal-head { justify-content: flex-end; }
  .modal .lab:not(label .lab), .modal .tiny { display: none; } .modal textarea { min-height: 44px; }
}
@media (orientation: landscape) and (max-height: 160px) { .sheet { gap: 2px; padding: 4px 12px; } .sheet .btn { height: 34px; } .sheet .btn.sm { height: 26px; } .sheet .code-input { min-height: 32px; } .sheet input:not([type=range]) { min-height: 30px; } }

/* Touch targets: 44 px hit area even where the look is smaller (checked on the phone by the accessibility audit). */
.back { position: relative; }
.back::after { content: ''; position: absolute; inset: -6px; }
.maplibregl-ctrl-attrib a { position: relative; }
.maplibregl-ctrl-attrib a::after { content: ''; position: absolute; inset: -8px -4px; }
.svc .p { font-size: 12px; }
.code button.b { padding: 14px 10px; margin: -14px -10px; text-decoration: underline; text-underline-offset: 3px; }
.modal:focus, .modal:focus-visible { outline: none; }
.iconbtn[hidden] { display: none; }


/* ---- Premium finish: hairlines, layered depth, glass chips, calmer motion. Purely visual and self-contained: delete this block to go back. ---- */
:root {
  --hair: rgba(13, 15, 18, .07); --glass: color-mix(in srgb, var(--sheet) 82%, transparent); --ease: cubic-bezier(.22, .8, .2, 1); --t-fast: .14s; --t: .24s; --t-slow: .42s; /* one motion system: press, enter, sheet */
  --shadow-sm: 0 1px 2px rgba(13, 15, 18, .08), 0 8px 20px rgba(13, 15, 18, .13);
  --shadow: 0 -1px 0 var(--hair), 0 -14px 44px rgba(13, 15, 18, .17);
}
:root[data-theme="dark"] {
  --hair: rgba(255, 255, 255, .08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45), 0 10px 24px rgba(0, 0, 0, .45);
  --shadow: 0 -1px 0 var(--hair), 0 -16px 48px rgba(0, 0, 0, .6);
}
body { text-rendering: optimizeLegibility; }
h1, h2 { letter-spacing: -.025em; }
/* floating controls: frosted glass over the map */
.brandchip, .iconbtn:not(.small):not(.plain):not(.on) {
  background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--hair);
}
/* sheets and dialogs */
.sheet, .modal { border-top: 1px solid var(--hair); }
.sheet::before { width: 40px; margin-left: -20px; background: color-mix(in srgb, var(--mute) 38%, transparent); }
.sheet.enter { animation-duration: var(--t-slow); animation-timing-function: var(--ease); }
.modal { animation-timing-function: var(--ease); box-shadow: var(--shadow); }
/* buttons: a faint top highlight on solid ones, a hairline on neutral ones, one easing curve everywhere */
.btn { letter-spacing: -.005em; transition: transform var(--t-fast) var(--ease), filter var(--t-fast), background-color var(--t), box-shadow var(--t); }
.btn.primary, .btn.signal, .btn.ok, .btn.danger { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .17), 0 1px 2px rgba(13, 15, 18, .2); }
.btn:not(.primary):not(.signal):not(.ok):not(.danger):not(.ghost):not(.call):not(.danger-text) { box-shadow: inset 0 0 0 1px var(--hair); }
.btn:disabled { box-shadow: none; }
.iconbtn { transition: transform var(--t-fast) var(--ease); }
/* fields and small surfaces */
input, textarea { box-shadow: inset 0 0 0 1px var(--hair); transition: border-color var(--t-fast), box-shadow var(--t); }
input:focus, textarea:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--text) 9%, transparent); }
.notice, .svc, .chip:not(.on), .badge:not(.dark):not(.ok):not(.signal) { box-shadow: inset 0 0 0 1px var(--hair); }
.svc { transition: transform var(--t-fast) var(--ease), background var(--t-fast); }
/* messages */
.toast { animation-duration: var(--t-slow); animation-timing-function: var(--ease); box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 12px 32px rgba(0, 0, 0, .32); }
/* navigation banner: a quiet vertical gradient and an edge light, like instrument glass */
.navbanner { background: linear-gradient(180deg, #151a20, #0d1014); box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .07); }
/* the "done" moment: the check pops in and a soft ring spreads once, only when the screen first appears */
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1); } }
@keyframes ringout { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 38%, transparent); } to { box-shadow: 0 0 0 22px transparent; } }
.sheet.enter .hero .ico:not(.off) { animation: pop .5s var(--ease), ringout .9s var(--t-fast) ease-out; }

/* Rating tags + receipt */
.tagpick, .tagrow { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.tagrow { justify-content: flex-start; margin-top: 4px; }
.tagchip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600; transition: background var(--t-fast) var(--ease, ease), border-color var(--t-fast), color var(--t-fast); }
.tagchip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.tagchip.static { padding: 3px 9px; font-size: 11.5px; color: var(--mute); background: transparent; font-weight: 600; }
.receipt { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.receipt-ref { font-size: 12px; letter-spacing: .08em; color: var(--mute); font-weight: 700; }
.stars-static { color: var(--signal); font-size: 19px; letter-spacing: 2px; line-height: 1; }

/* Keep long field labels and actions inside narrow sheets. */
.sheet .grow, .modal .grow, .field { min-width: 0; }
.sheet .btn, .modal .btn { max-width: 100%; white-space: normal; text-align: center; }
@media (max-width: 599px) and (orientation: portrait) and (max-height: 740px) {
  .sheet { gap: 8px; padding: 14px 12px calc(10px + var(--safe-b)); }
  .sheet .chips { gap: 5px; }
  .sheet .chip { padding-inline: 10px; }
  .sheet .stack { gap: 7px; }
  .sheet > .btn.primary:last-child { position: sticky; bottom: 0; z-index: 1; }
  .modal { max-height: calc(100dvh - 12px - var(--safe-t)); gap: 8px; }
  .modal .stack { gap: 6px; }
  .modal .field textarea { min-height: 58px; height: 58px; }
  .modal .btn.primary.block:last-child { position: sticky; bottom: 0; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .sheet:is([data-screen^="wizard-"], [data-screen="request"]) {
    width: min(720px, calc(100vw - 78px));
    max-height: calc(100dvh - 62px - var(--safe-t) - var(--safe-b));
    gap: 5px;
  }
  .sheet[data-screen^="wizard-"] > .stack,
  .sheet[data-screen="request"] { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sheet[data-screen^="wizard-"] > .stack > :only-child,
  .sheet[data-screen="wizard-1"] > .stack > :last-child,
  .sheet[data-screen="request"] > .head { grid-column: 1/-1; }
  .sheet[data-screen^="wizard-"] > .btn.primary { position: sticky; bottom: 0; z-index: 1; }
  .sheet[data-screen="request"] > :nth-child(2) { grid-row: span 2; }
  .sheet[data-screen="request"] .chip { gap: 4px; padding-inline: 7px; }
  .sheet[data-screen="request"] > .btn { align-self: end; }
  .modal:has(textarea) { width: min(740px, 96vw); max-height: calc(100dvh - 12px); }
  .modal:has(textarea) .stack:has(textarea) { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
  .modal:has(textarea) .stack > .btn { grid-column: 1 / -1; }
}
@media (min-width: 900px) and (max-height: 800px) {
  .sheet { max-height: calc(100dvh - 86px - var(--safe-t)); }
}

@media (max-width: 899px) and (orientation: portrait) {
  .sheet { max-height: min(90dvh, calc(100dvh - 68px - var(--safe-t))); }
  .tight-tools .fabs { top: calc(12px + var(--safe-t)); bottom: auto; flex-direction: row; gap: 6px; }
  .tight-tools .topbar { right: 110px; gap: 4px; }
  .tight-tools .brandchip, .tight-tools .power { padding-inline: 8px; gap: 4px; }
  .tight-tools .topbar:has(.power) .brandchip > span:not(.demo-tag):not(.conn) { display: none; }
  .tight-tools .topbar:has(.power) .brandchip img { margin: 0; }
  .sheet[data-screen="job-loading"] > .kv { font-size: 13px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .sheet:is([data-screen="job-assigned"],[data-screen="job-loading"],[data-screen="job-arrived"],[data-screen="active-arrived"],[data-screen="active-at_destination"],[data-screen="done"],[data-screen="fee"]) {
    width: min(740px, calc(100vw - 78px)); display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 6px 12px;
  }
  .sheet:is([data-screen^="job-"],[data-screen^="active-"]) > .phasebar { grid-column: 1/-1; }
  .sheet:is([data-screen="job-assigned"],[data-screen="job-loading"],[data-screen="job-arrived"]) > .row.between { grid-column: 1/-1; }
  .sheet[data-screen="job-loading"] .thumb { width: 50px; height: 50px; }
  .sheet[data-screen="done"] > .hero { grid-row: span 2; }
  .overlay[aria-label="Contul meu"] .modal { width: min(680px,96vw); }
  .overlay[aria-label="Contul meu"] .modal > .stack { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .overlay[aria-label="Contul meu"] p { grid-column: 1/-1; }
  .overlay:has(.receipt) .modal { width: min(720px,96vw); }
  .receipt { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px 16px; }
  .receipt .receipt-ref, .receipt .total { grid-column: 1/-1; }
}
@media (orientation: landscape) and (min-height: 261px) and (max-height: 520px) {
  #app .navbanner, #app:has(.sheet[data-screen="job-strip"]) .navbanner {
    left: clamp(174px, 26vw, 220px); right: 66px; width: auto; max-width: 520px; margin-inline: auto;
  }
}
