:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --ink: #16202b;
  --muted: #5f6b78;
  --line: #dde1e6;
  --primary: #1d5fd1;
  --danger: #c5221f;
  --ok: #188038;
  --warn: #b06000;
  --drill: #7b1fa2;
  --radius: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; overscroll-behavior: none; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans Hebrew", "Heebo", Arial, sans-serif;
  font-size: 16px; line-height: 1.45; color: var(--ink); background: var(--bg);
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
input, textarea, select, button { font: inherit; color: inherit; }
input, textarea { -webkit-user-select: text; user-select: text; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
[hidden] { display: none !important; }
#app { height: 100%; }
.boot { height: 100%; display: grid; place-items: center; color: var(--muted); }

/* ---- buttons and fields ---- */
.btn {
  appearance: none; border: 1px solid var(--line); background: var(--panel); border-radius: 12px;
  min-height: 48px; padding: 10px 16px; font-weight: 600; cursor: pointer; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.big { min-height: 64px; font-size: 1.2rem; border-radius: 16px; }
.btn.small { min-height: 36px; padding: 4px 12px; font-size: 0.9rem; border-radius: 10px; }
.icon-btn { appearance: none; border: 0; background: transparent; width: 44px; height: 44px; border-radius: 50%; font-size: 1.4rem; cursor: pointer; display: grid; place-items: center; }
.icon-btn:active { background: rgba(0, 0, 0, 0.08); }
.row { display: flex; gap: 10px; align-items: center; }
.row.two > * { flex: 1; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; }
.field-label { font-size: 0.9rem; font-weight: 600; color: var(--muted); }
.field input, .field textarea, .field select, .input {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.hint { color: var(--muted); font-size: 0.85rem; }
.muted { color: var(--muted); }
.warning-box { background: #fff4e5; border: 1px solid #f0c27b; color: #6b3d00; border-radius: 12px; padding: 12px; font-size: 0.95rem; }
.info-box { background: #e8f0fe; border: 1px solid #b6cdf8; color: #17408b; border-radius: 12px; padding: 12px; font-size: 0.95rem; }
.error-text { color: var(--danger); font-weight: 600; min-height: 1.4em; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.list { display: grid; gap: 8px; }
.list-item { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; cursor: pointer; }
.list-item small { color: var(--muted); display: block; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: #e8eaed; color: #3c4043; white-space: nowrap; }
.badge.ok { background: #e6f4ea; color: var(--ok); } .badge.warn { background: #fef3e0; color: var(--warn); }
.badge.danger { background: #fce8e6; color: var(--danger); } .badge.blue { background: #e8f0fe; color: var(--primary); }
.badge.drill { background: #f3e5f5; color: var(--drill); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--c, #5f6368); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; flex: none; }
.section-title { font-size: 0.85rem; font-weight: 700; color: var(--muted); margin: 14px 2px 6px; }
.switch { position: relative; display: inline-block; width: 46px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; z-index: 1; cursor: pointer; }
.switch i { position: absolute; inset: 0; background: #c4c9cf; border-radius: 999px; transition: background 0.15s; }
.switch i::after { content: ""; position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; background: #fff; border-radius: 50%; transition: transform 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(-18px); }
.switch input:disabled + i { opacity: 0.45; }

/* ---- entry screens ---- */
.center-screen { min-height: 100%; display: grid; place-items: center; padding: calc(24px + var(--safe-top)) 20px calc(24px + var(--safe-bottom)); background: linear-gradient(180deg, #16202b 0, #223244 100%); color: #fff; }
.center-box { width: min(420px, 100%); display: grid; gap: 14px; }
.center-box .card { color: var(--ink); }
.brand { text-align: center; margin-bottom: 8px; }
.brand h1 { font-size: 1.8rem; } .brand p { opacity: 0.75; }
.brand img { width: 84px; height: 84px; border-radius: 20px; margin-bottom: 10px; }

/* ---- home ---- */
.home { position: fixed; inset: 0; display: grid; grid-template-rows: auto 1fr; background: #dfe3e8; }
#map { position: absolute; inset: 0; }
.topbar { position: relative; z-index: 5; padding-top: var(--safe-top); background: rgba(22, 32, 43, 0.94); color: #fff; }
.topbar-row { display: flex; align-items: center; gap: 6px; padding: 6px 8px; min-height: 52px; }
.topbar .icon-btn { color: #fff; }
.squad-select { flex: 1; min-width: 0; text-align: start; background: transparent; border: 0; color: #fff; font-weight: 700; font-size: 1.05rem; padding: 6px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.squad-select small { display: block; font-weight: 400; opacity: 0.75; font-size: 0.78rem; }
.net-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); flex: none; margin-inline: 6px; }
.net-dot.off { background: var(--danger); }
.banner { padding: 6px 12px; font-weight: 700; text-align: center; font-size: 0.95rem; }
.banner.offline { background: #5c1b17; color: #fff; }
.banner.drill { background: repeating-linear-gradient(45deg, #7b1fa2 0 14px, #9c27b0 14px 28px); color: #fff; letter-spacing: 0.08em; }
.banner.event { background: var(--danger); color: #fff; }
.banner.acting { background: #b06000; color: #fff; }
.banner button { margin-inline-start: 8px; }
.stage { position: relative; overflow: hidden; }
.force { position: absolute; top: 8px; right: 8px; bottom: 150px; width: 56px; z-index: 3; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; scrollbar-width: none; padding: 4px 0; }
.force::-webkit-scrollbar { display: none; }
.force-item { position: relative; width: 48px; height: 48px; border-radius: 50%; border: 3px solid #fff; background: var(--c, #5f6368); color: #fff; font-weight: 700; display: grid; place-items: center; flex: none; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.35); font-size: 0.9rem; margin-inline: auto; padding: 0; }
.force-item[data-status="ack"] { border-color: #fbbc04; } .force-item[data-status="arrived"] { border-color: #34a853; }
.force-item[data-status="declined"] { border-color: #ea4335; opacity: 0.7; } .force-item[data-status="pending"], .force-item[data-status="unanswered"] { border-color: #9aa0a6; opacity: 0.75; }
.force-item.selected { outline: 3px solid var(--primary); outline-offset: 2px; }
.force-item .on { position: absolute; bottom: -2px; left: -2px; width: 12px; height: 12px; border-radius: 50%; background: #9aa0a6; border: 2px solid #fff; }
.force-item .on.yes { background: #34a853; }
.force-count { text-align: center; background: rgba(22,32,43,.9); color: #fff; border-radius: 12px; padding: 4px 0; font-weight: 700; font-size: 0.85rem; flex: none; border: 0; width: 100%; cursor: pointer; }
.map-tools { position: absolute; left: 8px; top: 8px; z-index: 3; display: grid; gap: 8px; }
.map-tools .icon-btn { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); font-size: 1.2rem; }
.order-card { position: absolute; top: 8px; left: 60px; right: 72px; z-index: 4; background: #fff; border-radius: var(--radius); box-shadow: 0 2px 10px rgba(0,0,0,.3); padding: 10px 12px; border-inline-start: 6px solid var(--primary); cursor: pointer; }
.order-card.urgent { border-inline-start-color: var(--danger); }
.order-card .line { font-weight: 700; font-size: 1.05rem; }
.order-card small { color: var(--muted); display: block; }
.bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; padding: 10px 10px calc(10px + var(--safe-bottom)); display: grid; gap: 8px; background: linear-gradient(180deg, transparent, rgba(22,32,43,.55) 45%); pointer-events: none; }
.bottom > * { pointer-events: auto; }
.bottom-main { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bottom-cmd { display: flex; gap: 8px; }
.bottom-cmd .btn { flex: 1; min-height: 44px; }
.requests { display: grid; gap: 6px; }
.request { background: #fff; border-radius: 12px; padding: 8px 10px; display: flex; align-items: center; gap: 8px; box-shadow: 0 1px 6px rgba(0,0,0,.3); font-weight: 600; }
.request span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edit-bar { position: absolute; left: 10px; right: 10px; bottom: calc(10px + var(--safe-bottom)); z-index: 6; background: #fff; border-radius: var(--radius); box-shadow: 0 2px 12px rgba(0,0,0,.35); padding: 10px; display: grid; gap: 8px; }
.crosshair { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; z-index: 5; pointer-events: none; }
.crosshair::before, .crosshair::after { content: ""; position: absolute; background: #c5221f; }
.crosshair::before { left: 16px; top: 0; width: 2px; height: 34px; } .crosshair::after { top: 16px; left: 0; height: 2px; width: 34px; }

/* ---- map markers ---- */
.dot { width: 34px; height: 34px; border-radius: 50%; background: var(--c, #5f6368); color: #fff; border: 3px solid #fff; display: grid; place-items: center; font-weight: 700; font-size: 0.78rem; box-shadow: 0 1px 4px rgba(0,0,0,.45); cursor: pointer; padding: 0; }
.dot[data-status="ack"] { border-color: #fbbc04; } .dot[data-status="arrived"] { border-color: #34a853; } .dot[data-status="declined"] { border-color: #ea4335; }
.dot.stale { opacity: 0.55; }
.dot.other { background: #9aa0a6; width: 22px; height: 22px; border-width: 2px; }
.self-dot { width: 18px; height: 18px; border-radius: 50%; background: #1a73e8; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(26,115,232,.35), 0 1px 4px rgba(0,0,0,.4); }
.pin { display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.pin-dot { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.pin-label { margin-top: 2px; background: rgba(255,255,255,.92); padding: 0 6px; border-radius: 8px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.target-pin { font-size: 30px; color: #c5221f; text-shadow: 0 1px 3px #fff, 0 0 2px #fff; line-height: 1; }
.handle { width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 3px solid var(--primary); box-shadow: 0 1px 5px rgba(0,0,0,.5); cursor: grab; touch-action: none; }
.handle.move { border-color: #3c4043; background: #3c4043; width: 22px; height: 22px; }
.handle.radius { border-color: var(--danger); }
/* Distress: a faded red circle that grows, fades and grows again in the same place. */
/* No "position" here: the map library positions its markers absolutely, and overriding that makes them drift with zoom. */
.sos-pulse { width: 26px; height: 26px; }
.sos-pulse b { position: absolute; inset: 0; border-radius: 50%; background: #d93025; color: #fff; display: grid; place-items: center; font-size: 0.95rem; border: 2px solid #fff; }
.sos-pulse i { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: rgba(217,48,37,.45); animation: sos 1.8s ease-out infinite; }
@keyframes sos { from { transform: scale(1); opacity: .8; } to { transform: scale(7); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sos-pulse i { animation-duration: 4s; } }
.maplibregl-ctrl-attrib { font-size: 10px; }

/* ---- sheets ---- */
#sheets { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.sheet-wrap { position: absolute; inset: 0; pointer-events: auto; display: flex; flex-direction: column; justify-content: flex-end; }
.sheet-shade { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); }
/* A window without a shade (an order with its route) leaves the map above it visible and usable. */
.sheet-wrap.no-shade { pointer-events: none; }
.sheet-wrap.no-shade .sheet { pointer-events: auto; box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.3); }
.sheet { position: relative; background: var(--bg); display: flex; flex-direction: column; max-height: 100%; }
.sheet-wrap.full .sheet { height: 100%; }
.sheet-wrap.half .sheet { height: 67%; border-radius: 18px 18px 0 0; }
.sheet-wrap.third .sheet { height: 34%; border-radius: 18px 18px 0 0; }
.sheet-wrap.auto .sheet { border-radius: 18px 18px 0 0; max-height: 88%; }
.sheet-head { display: flex; align-items: center; gap: 4px; padding: calc(6px + var(--safe-top)) 8px 6px; background: var(--panel); border-bottom: 1px solid var(--line); flex: none; }
.sheet-wrap:not(.full) .sheet-head { padding-top: 6px; border-radius: 18px 18px 0 0; }
.sheet-body { padding: 14px 14px calc(18px + var(--safe-bottom)); overflow-y: auto; -webkit-overflow-scrolling: touch; display: grid; gap: 12px; align-content: start; flex: 1; }
.dialog .sheet-body { gap: 14px; }
.dialog-text { font-size: 1.05rem; }
.menu-item { appearance: none; width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; min-height: 54px; padding: 10px 14px; display: flex; align-items: center; gap: 12px; font-weight: 600; text-align: start; cursor: pointer; }
.menu-item small { color: var(--muted); font-weight: 400; margin-inline-start: auto; }
.menu-item.danger { color: var(--danger); }
.menu-icon { font-size: 1.3rem; width: 28px; text-align: center; }

/* ---- slide to confirm ---- */
.slide-track { position: relative; height: 64px; border-radius: 32px; background: #e3e6ea; overflow: hidden; touch-action: none; display: grid; place-items: center; }
.slide-track.danger { background: #f7d4d1; }
.slide-track.armed { outline: 3px solid var(--primary); }
.slide-track::before { content: ""; position: absolute; inset: 0; background: var(--ok); opacity: calc(var(--progress, 0) * 0.55); }
.slide-track.danger::before { background: var(--danger); }
.slide-label { position: relative; font-weight: 700; color: #3c4043; padding-inline-end: 56px; }
.slide-knob { position: absolute; top: 4px; right: 4px; width: 56px; height: 56px; border-radius: 50%; background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,.4); display: grid; place-items: center; font-size: 1.4rem; font-weight: 700; color: var(--danger); touch-action: none; cursor: grab; }
.slide-track.done .slide-knob { background: var(--ok); color: #fff; }

/* ---- incoming order ---- */
.incoming { position: fixed; inset: 0; z-index: 30; background: #16202b; color: #fff; display: grid; grid-template-rows: auto 1fr auto; padding: calc(18px + var(--safe-top)) 18px calc(18px + var(--safe-bottom)); gap: 16px; }
.incoming.drill { background: #4a148c; }
.incoming .tag { font-weight: 700; letter-spacing: 0.06em; opacity: 0.85; }
.incoming .what { align-self: center; text-align: center; font-size: clamp(1.8rem, 8vw, 3rem); font-weight: 700; line-height: 1.2; }
.incoming .mine { text-align: center; margin-top: 14px; font-size: 1.15rem; font-weight: 600; background: rgba(255,255,255,.12); border-radius: 12px; padding: 10px; }
.incoming .from { text-align: center; opacity: 0.8; margin-top: 10px; font-size: 1rem; font-weight: 400; }
.incoming .btn.big { min-height: 76px; font-size: 1.4rem; }
.count-big { font-size: 2.2rem; font-weight: 700; }

/* ---- permissions matrix ---- */
.matrix-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; max-height: 70vh; }
table.matrix { border-collapse: collapse; width: max-content; min-width: 100%; }
.matrix th, .matrix td { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: center; min-width: 62px; }
.matrix th:first-child, .matrix td:first-child { text-align: start; position: sticky; right: 0; background: #fff; z-index: 1; min-width: 118px; max-width: 132px; font-weight: 600; font-size: 0.9rem; padding-inline: 10px 6px; }
.matrix thead th .btn { padding: 2px 4px; min-height: 30px; font-size: 0.78rem; white-space: normal; line-height: 1.15; }
.matrix .switch { width: 40px; height: 24px; }
.matrix .switch i::after { width: 18px; height: 18px; }
.matrix .switch input:checked + i::after { transform: translateX(-16px); }
.matrix thead th { position: sticky; top: 0; background: #f1f3f4; z-index: 2; font-size: 0.85rem; }
.matrix thead th:first-child { z-index: 3; background: #f1f3f4; }
.role-chip { display: inline-flex; align-items: center; gap: 6px; }
.role-chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; }

/* ---- chips ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { appearance: none; border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 42px; }
.chip.on { border-color: var(--primary); background: #e8f0fe; color: var(--primary); }
.chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c, #5f6368); }
.grid-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tmpl { min-height: 58px; }
.tmpl.on { border-color: var(--primary); background: #e8f0fe; color: var(--primary); }

/* ---- timeline ---- */
.timeline { display: grid; gap: 0; }
.tl-item { display: grid; grid-template-columns: 58px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tl-item time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.85rem; padding-top: 2px; }
.table-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
table.plain { width: 100%; border-collapse: collapse; background: #fff; }
.plain th, .plain td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: start; font-size: 0.92rem; }
.plain th { background: #f1f3f4; font-size: 0.82rem; }

/* ---- toasts, lock ---- */
#toasts { position: fixed; left: 12px; right: 12px; top: calc(64px + var(--safe-top)); z-index: 60; display: grid; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; background: #202124; color: #fff; padding: 12px 14px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.35); display: flex; gap: 10px; align-items: center; font-weight: 600; }
.toast.warn { background: #8c1d18; } .toast.quiet { background: #3c4043; font-weight: 400; }
.toast span { flex: 1; }
.toast-action { appearance: none; background: #fff; color: #202124; border: 0; border-radius: 8px; padding: 6px 10px; font-weight: 700; }
#lock { position: fixed; inset: 0; z-index: 100; background: #16202b; color: #fff; display: grid; place-items: center; padding: 24px; }
.lock-box { width: min(340px, 100%); display: grid; gap: 14px; text-align: center; }
.pin-input { min-height: 56px; border-radius: 14px; border: 0; padding: 0 16px; font-size: 1.6rem; text-align: center; letter-spacing: 0.3em; color: #16202b; }
.code-box { font-family: ui-monospace, Consolas, monospace; font-size: 1.5rem; letter-spacing: 0.14em; font-weight: 700; direction: ltr; text-align: center; background: #f1f3f4; border-radius: 12px; padding: 12px; -webkit-user-select: all; user-select: all; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.checks { display: grid; gap: 8px; }
.check-row { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.check-row .state { font-size: 1.2rem; width: 26px; text-align: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { appearance: none; border: 0; background: #fff; padding: 8px 12px; font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--primary); color: #fff; }

@media (min-width: 720px) {
  .sheet-wrap { align-items: center; }
  .sheet { width: min(560px, 100%); }
  .sheet-wrap.full .sheet { border-inline: 1px solid var(--line); }
}

/* ---- voice ---- */
.voice-strip { position: fixed; left: 12px; right: 12px; top: calc(8px + var(--safe-top)); z-index: 70; background: #0b5d1e; color: #fff; padding: 10px 14px; border-radius: 12px; font-weight: 700; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,.35); pointer-events: none; }
.voice-strip.sending { background: #b3261e; }
.talk-btn { min-height: 120px; background: #0b5d1e; color: #fff; border: 0; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.talk-btn.talking { background: #b3261e; }
.talk-btn:disabled { background: #9aa0a6; }
.voice-row.chosen { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.voice-state.ok { color: #0b5d1e; } .voice-state.bad { color: #b3261e; } .voice-state.wait { color: #8a5a00; }
.talk-btn.busy { background: #5f6368; }
.boot-fail { display: grid; gap: 12px; justify-items: center; padding: 24px; text-align: center; }
.boot-fail code { direction: ltr; font-size: 0.8rem; color: var(--muted); word-break: break-word; }

/* ---- icons: one plain line set, in the colour of the text around it ---- */
.ico { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.22em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.mark { stroke: none; fill: none; }
.menu-icon .ico { width: 24px; height: 24px; display: block; margin: 0 auto; }
.icon-btn .ico { width: 24px; height: 24px; }
.btn .ico { margin-inline-end: 4px; }
.btn.small .ico, a.btn .ico { margin-inline-end: 0; }
.chip .ico { width: 1.1em; height: 1.1em; }
.voice-strip .ico { margin-inline-end: 6px; }
.target-pin .ico { width: 32px; height: 32px; stroke: #c5221f; stroke-width: 2.5; fill: #c5221f; fill-opacity: 0.25; filter: drop-shadow(0 0 2px #fff) drop-shadow(0 1px 1px #fff); }
.check-row .state.good { color: #0b5d1e; } .check-row .state.bad { color: #b3261e; } .check-row .state.none { color: var(--muted); }
.voice-msg.new { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }

/* ---- a window that is dragged up and down ---- */
.sheet-wrap.draggable .sheet { transition: height .18s ease; border-radius: 18px 18px 0 0; }
.sheet-wrap.draggable .sheet.tall { border-radius: 0; }
.sheet-wrap.draggable .sheet.tall .sheet-grip { padding-top: calc(8px + var(--safe-top)); }
.sheet-grip { flex: none; display: grid; place-items: center; padding: 8px 0 2px; background: var(--panel); border-radius: 18px 18px 0 0; touch-action: none; cursor: ns-resize; }
.sheet-grip i { width: 44px; height: 5px; border-radius: 3px; background: #b0b6bd; }
.sheet-wrap.draggable .sheet-head { touch-action: none; border-radius: 0; padding-top: 2px; }

/* ---- an incoming order that is not a call-up: the lower half of the screen, the map stays visible above it ---- */
.incoming.half { inset: auto 0 0 0; height: 56%; min-height: 330px; max-height: 100%; border-radius: 18px 18px 0 0; box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.45); padding-top: 16px; gap: 10px; }
.incoming.half .what { font-size: clamp(1.4rem, 6vw, 2.1rem); }
.incoming.half .btn.big { min-height: 60px; font-size: 1.2rem; }

/* ---- narrow phones: nothing in a window may be wider than the screen ---- */
.sheet { max-width: 100vw; overflow-x: hidden; }
.sheet-body { grid-template-columns: minmax(0, 1fr); }
.sheet-body > *, .grid-buttons > *, .row > * { min-width: 0; }
.btn { white-space: normal; overflow-wrap: break-word; }
.slide-label { padding-inline-start: 8px; text-align: center; font-size: clamp(0.85rem, 4vw, 1rem); }
.request { flex-wrap: wrap; }
.tasks-btn { border-color: var(--primary); color: var(--primary); font-weight: 700; }
@media (max-width: 360px) {
  .grid-buttons { grid-template-columns: 1fr; }
  .bottom-cmd { flex-wrap: wrap; }
  .btn.big { font-size: 1.05rem; min-height: 58px; }
}
.voice-strip.tap { pointer-events: auto; cursor: pointer; background: #8a5a00; }

/* ---- second review ---- */
/* A long order text scrolls inside its box; the confirm and decline buttons always stay on screen. */
.incoming { grid-template-rows: auto minmax(0, 1fr) auto; }
.incoming .what { min-height: 0; overflow-y: auto; }
/* The half-height order sits above the main screen but below every window, so menus opened over it are visible. */
.incoming.half { z-index: 15; }
.bottom-cmd { flex-wrap: wrap; }
.bottom-cmd .btn { flex: 1 1 auto; }
