/* Original Safiri colours and typography, with a more generous stage. */
:root {
  --header:64px; --inspector:304px; --ribbon:76px;
}
/* Read by screen readers, never drawn (the mixed network's milestone line). */
.visually-hidden {position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

.topbar {height:calc(var(--header) + env(safe-area-inset-top,0px)); padding:env(safe-area-inset-top,0px) 24px 0; gap:24px; background:linear-gradient(120deg,var(--band),var(--band-2)); color:var(--band-fg); border-bottom:0; box-shadow:0 2px 14px rgba(40,0,15,.25)}
.brand {gap:18px}
.brand svg {width:90px;height:32px}
.brand svg > path {fill:#fff}
.brand .eyebrow,.brand .dashes {display:none}
.brand h1 {font:italic 900 22px/1 var(--font-display); letter-spacing:-.01em; margin:0; padding-left:18px; border-left:1px solid var(--band-muted)}
.tabs {padding:0; background:none; border-radius:0; margin-left:auto; gap:26px; height:100%; align-items:stretch}
.tabs button {border-radius:0; padding:0 2px; color:var(--band-fg); border-bottom:3px solid transparent; font-size:13.5px; background:none}
.tabs button[aria-selected="true"] {color:var(--band-fg); background:none; border-bottom-color:var(--band-fg)}
.back {color:var(--band-fg); font-size:12px; border:0; margin-right:138px; padding:4px 0}
.topbar :focus-visible {outline-color:#fff}
.hudtop {top:calc(env(safe-area-inset-top,0px) + 18px); left:auto; right:24px; transform:none; max-width:none; gap:12px;z-index:31}
.clock {color:var(--band-fg);border:0; background:none; box-shadow:none; padding:4px 0; border-radius:0; backdrop-filter:none; gap:8px}
.clock strong {font-size:17px}
.clock .d {font-size:10px;color:var(--band-muted)}
.clock .lapse {color:var(--band-muted);position:absolute;right:0;top:29px;font-size:10px}
/* Floating boxes are opaque: they have no backdrop blur over the live canvas
   (it would be redone every frame), and at 93% the map's signs and labels
   ghosted through their text. */
.route-summary {position:fixed; z-index:18; left:24px; top:calc(var(--header) + env(safe-area-inset-top,0px) + 20px); display:flex; align-items:center; gap:12px; padding:14px 16px; background:var(--panel-solid); border:1px solid var(--line); border-radius:10px; box-shadow:var(--shadow); max-width:calc(100% - var(--inspector) - 64px)}
.route-summary > div {display:grid;gap:3px;min-width:0}
.route-summary strong {font:600 18px/1.2 var(--font-body)}
.route-summary > div > span {font-size:11px;color:var(--muted)}
.route-symbol {font:600 29px/1 var(--font-body);color:var(--saf)}
.route-summary button {margin-left:18px; border:0; background:none; font-size:12px; font-weight:600; color:var(--saf); cursor:pointer; padding:10px 0; white-space:nowrap}
.route-summary button span {margin-left:4px}
.panel {background:var(--panel-solid);backdrop-filter:none;border-color:var(--line);box-shadow:var(--shadow);scrollbar-width:thin;scrollbar-color:var(--line) transparent;overscroll-behavior:contain}
.panel.right {top:calc(var(--header) + env(safe-area-inset-top,0px));right:0;bottom:calc(var(--ribbon) + env(safe-area-inset-bottom,0px));width:var(--inspector);max-height:none;border-radius:0;border-width:0 0 0 1px;padding:25px 22px;box-shadow:none}
.panel.left {left:24px;top:calc(var(--header) + env(safe-area-inset-top,0px) + 104px);width:330px;max-height:calc(100% - var(--header) - var(--ribbon) - 126px);padding:20px;border-radius:10px;z-index:22}
body[data-mode="showcase"]:not([data-route-open="1"]) #panel-route {display:none}
.drawer-heading {display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.drawer-heading .ph {margin:0;font:italic 800 19px/1.15 var(--font-display);color:var(--saf)}
.drawer-heading button {border:0;background:var(--surface);border-radius:50%;width:30px;height:30px;font-size:23px;line-height:1;cursor:pointer}
.psub {font-size:13px;margin:0 0 18px}
fieldset {margin-bottom:18px}
legend {font-size:10px;margin-bottom:8px;letter-spacing:.12em}
.seg {gap:5px}
.seg label {border-radius:6px;padding:8px 10px;font-size:13px;background:transparent}
.city-picker {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
.city-picker label {display:grid;gap:6px;min-width:0;font-size:11px;color:var(--muted)}
.city-picker select {width:100%;min-width:0;border:1px solid var(--line);border-radius:6px;background:var(--panel-solid);color:var(--fg);font:400 12px/1.4 var(--font-body);padding:10px 6px;cursor:pointer}
.city-picker select:focus-visible {outline:2px solid var(--saf);outline-offset:2px}
.city-picker label[hidden] {display:none}
.city-picker:has(label[hidden]) {grid-template-columns:1fr}
.city-swap {border:0;background:none;color:var(--saf);font:600 11px/1.4 var(--font-body);padding:9px 0 0;cursor:pointer}
.city-note {font-size:10px;line-height:1.5;color:var(--muted);margin:8px 0 0}
.play-city-picker {margin:18px 0 6px;max-width:460px}
.play-city-picker select {font-size:14px;padding:10px}
.btn {border-radius:6px;font-size:12px}
.btn.primary,.seg input:checked + label {color:var(--bg)}
.btn.primary:hover {filter:brightness(1.08)}
.inspector-kicker {margin:0 0 18px;display:flex;justify-content:space-between;font:500 10px/1.2 var(--font-mono);letter-spacing:.13em;text-transform:uppercase;color:var(--muted)}
.inspector-kicker span {letter-spacing:0;color:var(--saf)}
.journey-stage {margin:0 0 12px;font:600 22px/1.25 var(--font-body);color:var(--saf)}
.jroute {font:italic 800 22px/1.1 var(--font-display);color:var(--fg);margin:0}
.jchips {gap:0;margin:7px 0 22px}
.chip {border-radius:0;background:none;padding:0;color:var(--muted);font-size:11px}
.chip + .chip::before {content:'·';margin:0 7px;color:#a8aaa3}
.holder {flex-wrap:wrap;gap:5px 7px;padding:15px 12px;border:0;border-radius:7px;background:var(--surface);font-size:12px}
.holder .dot {width:9px;height:9px}
.holder strong {flex:1 1 150px;font-size:13px;font-weight:600}
.holder.k-operator {background:var(--op-soft);color:var(--op-ink)}
.holder.k-safiri {background:var(--saf-soft);color:var(--saf)}
.holder.k-operator .k,.holder.k-safiri .k {color:inherit}
.journey-map {display:grid;grid-template-columns:10px 1fr 20px 1fr 10px;align-items:center;row-gap:10px;margin:24px 0 28px}
.map-dot {width:9px;height:9px;border-radius:50%;background:var(--op);border:2px solid var(--op)}
.map-dot.end {background:var(--panel-solid);border-color:var(--muted)}
.map-line {border-top:1px dashed var(--muted)}
.map-arrow {text-align:center;color:var(--muted)}
.journey-map small {font-size:11px;color:var(--muted);grid-column:1 / 3}
.journey-map small:last-child {grid-column:4 / 6;text-align:right}
.latest-message {display:flex;gap:10px;padding:14px 12px;border:1px solid var(--line);border-radius:7px;margin-bottom:22px;font-size:12px}
.message-icon {font-size:21px;line-height:1;color:var(--saf)}
.message-label {font-size:10px;letter-spacing:.03em;color:var(--muted)}
.latest-message p {margin:6px 0 0;line-height:1.55}
.journey-detail {border-top:1px solid var(--line)}
.journey-detail summary {cursor:pointer;padding:13px 0;font-size:12px;font-weight:600;list-style:none;display:flex;gap:8px;align-items:center}
.journey-detail summary::-webkit-details-marker {display:none}
.journey-detail summary::after {content:'+';margin-left:auto;font-size:18px;font-weight:400;color:var(--muted)}
.journey-detail[open] summary::after {content:'−'}
.journey-detail summary span {font:400 10px/1.2 var(--font-mono);color:var(--muted)}
.journey-detail > :not(summary) {margin-bottom:14px}
.jstep {font-size:13px;padding:7px 0;gap:6px;grid-template-columns:20px minmax(0,1fr)}
.jstep .leg {display:none}
.jstep.now {padding:7px 6px}
.legs {grid-template-columns:1fr}
.legs li {border:0;padding:9px}
.smsfeed {margin-top:0}
.smsfeed .sms {border-radius:6px;font-size:12.5px;background:var(--surface)}
.statuses .code {font-size:11px;overflow-wrap:anywhere;max-width:100%}
.inspector-foot {font-size:11px;color:var(--muted);margin:25px 0 0}
.caption {left:24px;right:calc(var(--inspector) + 24px);bottom:calc(var(--ribbon) + env(safe-area-inset-bottom,0px) + 14px);max-width:660px;padding:12px 16px 14px;border-radius:8px;background:var(--panel-solid);box-shadow:var(--shadow);backdrop-filter:none}
.caption .step {font-size:10.5px;letter-spacing:.1em}
.caption p {font-size:14.5px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.caption.open p {display:block;max-height:30vh;overflow:auto}
.caption .prog {height:2px}
.transport {left:0;right:0;bottom:0;width:auto;height:calc(var(--ribbon) + env(safe-area-inset-bottom,0px));padding:0 24px env(safe-area-inset-bottom,0px);gap:18px;flex-wrap:nowrap;border-radius:0;border-width:1px 0 0;background:var(--panel-solid);box-shadow:none;backdrop-filter:none}
.transport .btn {background:transparent;border:0;padding:8px 9px;white-space:nowrap}
.transport #btn-pause {min-width:76px;border:1px solid var(--line);border-radius:8px;padding:12px}
.transport .grp {gap:2px}
.transport .grp .btn.on {background:var(--surface-2);color:var(--fg);border:0}
.transport .sep {display:none}
.journey-timeline {display:flex;list-style:none;align-items:flex-start;flex:1;padding:0 0 0 16px;margin:0;min-width:0}
.journey-timeline li {flex:1;position:relative;font-size:10px;color:var(--muted);padding:26px 8px 0 0}
.journey-timeline li::before {content:'';position:absolute;top:7px;left:0;width:calc(100% - 8px);height:1px;background:var(--line)}
.journey-timeline li::after {content:'';position:absolute;top:2px;left:0;width:9px;height:9px;border:2px solid var(--muted);border-radius:50%;background:var(--panel-solid)}
.journey-timeline li:last-child::before {display:none}
.journey-timeline li.done::before {background:var(--op)}
.journey-timeline li.done::after {background:var(--op);border-color:var(--op)}
.journey-timeline li.now {color:var(--saf);font-weight:600}
.journey-timeline li.now::after {border-color:var(--saf);background:var(--saf);box-shadow:0 0 0 4px var(--saf-soft)}
.camera-controls {position:fixed;top:calc(var(--header) + env(safe-area-inset-top,0px) + 106px);left:24px;z-index:19;display:flex;flex-wrap:wrap;width:290px;gap:2px;padding:4px;border:1px solid var(--line);border-radius:8px;background:var(--panel-solid);box-shadow:var(--shadow)}
.camera-controls .btn {border:0;background:none;padding:8px 11px;color:var(--muted);font-size:11px}
.camera-controls .btn.on {background:var(--saf);color:var(--bg)}
.map-focus {display:flex;flex-wrap:wrap;align-items:center;gap:6px;width:100%;border-top:1px solid var(--line);padding:8px 6px 3px;margin-top:3px}
.map-focus[hidden] {display:none}
.map-focus label {font-size:11px;color:var(--muted)}
.map-focus select {font:500 12px/1.4 var(--font-body);color:var(--fg);background:var(--panel-solid);border:1px solid var(--line);border-radius:5px;padding:5px;min-width:0;flex:1}
.map-zoom {font:500 18px/1 var(--font-body);color:var(--saf);background:var(--surface);border:0;border-radius:5px;width:26px;height:28px;cursor:pointer}
.map-focus small {font-size:10px;color:var(--muted);flex-basis:100%}
body[data-mode="play"] .camera-controls {width:274px}
body[data-route-open="1"] .camera-controls {visibility:hidden}
.lbl {font-weight:600}
.lbl-city {display:grid;gap:2px;text-align:center;padding:7px 12px;border-radius:7px;background:var(--panel);border:1px solid var(--line);box-shadow:var(--shadow);color:var(--fg)}
.lbl-city strong {font:600 15px/1.2 var(--font-body);color:var(--saf)}
.lbl-city span {font:400 9px/1.3 var(--font-body);color:var(--muted)}
.lbl-place {border-width:1px;border-radius:5px;box-shadow:0 3px 9px #282b251c;font-size:11.5px;padding:4px 8px}
.lbl-parcel {border-width:1px;font-size:10px;background:rgba(22,12,16,.88);box-shadow:0 2px 8px #1e261b33}
.lbl-person {background:rgba(22,12,16,.7);font-size:10.5px}
.lbl-veh {font-size:11px}
.lbl-badge {border-color:var(--line);background:var(--panel);color:var(--fg);font-size:10.5px}
.sheet {border-radius:12px;padding:28px}
.sheet li {color:var(--muted);line-height:1.5}
body[data-mode="play"] .hudtop {top:calc(var(--header) + env(safe-area-inset-top,0px) + 14px);left:24px;right:auto;transform:none;flex-direction:row;align-items:center;gap:14px}
body[data-mode="play"] .clock {position:fixed;right:24px;top:calc(env(safe-area-inset-top,0px) + 22px)}
body[data-mode="play"] .kpis {box-shadow:var(--shadow);border-radius:8px}
body[data-mode="play"] .kpis div {min-width:90px;padding:9px 14px}
body[data-mode="play"] .kpis dt {font-size:10px}
body[data-mode="play"] .kpis dd {font-size:14px}
body[data-mode="play"] .kpis dd.of {font:500 10px/1.2 var(--font-mono);white-space:normal}
body[data-mode="play"] .kpis div:nth-child(3) {display:block}
body[data-mode="play"] .panel.left {top:calc(var(--header) + env(safe-area-inset-top,0px) + 94px);width:290px;max-height:calc(100% - var(--header) - var(--ribbon) - 112px)}
body[data-mode="play"] .camera-controls {left:auto;right:calc(var(--inspector) + 18px);top:calc(var(--header) + env(safe-area-inset-top,0px) + 14px)}
.deskhead .ph {font:italic 800 19px/1.15 var(--font-display);color:var(--saf)}
.card {padding:13px;border-radius:7px}
.card.selected {border-color:var(--saf);box-shadow:0 0 0 2px var(--saf-soft)}
/* A 24px tall tap target; the negative margins keep the card header as tall as before. */
.card .locate {border:0;background:none;color:var(--saf);font:600 10px/1.4 var(--font-body);padding:5px 6px 5px 0;margin:-5px -6px -5px 0;min-height:24px;white-space:nowrap;flex:none;cursor:pointer}
.decision-preview {background:var(--surface);border-radius:5px;padding:9px;margin:8px 0;font-size:11px;color:var(--muted)}
.decision-preview strong {color:var(--fg)}
.calm.empty-state {padding:14px 0;line-height:1.6}
.board h3 {font-size:10px;letter-spacing:.12em;margin-top:22px}
.dep {display:block;border-bottom:1px solid var(--line);padding:12px 0}
.dep.next {background:var(--op-soft);padding:12px 10px;margin:0 -10px;border-radius:6px;border-bottom:0}
.dep.urgent {background:var(--warn-soft)}
.dep-main {display:flex;align-items:center;gap:8px}
.dep-time {font:500 17px/1 var(--font-mono)}
.dep-status {margin-left:auto;font:500 11px/1.3 var(--font-mono);text-transform:uppercase;color:var(--op-ink)}
.dep.urgent .dep-status {color:var(--warn)}
/* In the 260px board column the items wrap whole instead of breaking 'Cut-off / 12:00'. */
.dep-meta {display:flex;flex-wrap:wrap;justify-content:flex-start;gap:2px 12px;margin-top:7px;font-size:10px;color:var(--muted)}
.dep-meta span {white-space:nowrap}
.dep-main b {flex:1}.dep-status {display:block;margin-top:6px}.dep-main .dep-time {margin:0;font-size:17px;color:var(--fg)}
.decision-preview {display:grid;grid-template-columns:1fr 1fr;gap:8px}.decision-preview span {display:grid;gap:4px}.decision-preview small {font-size:10px}.decision-preview b {font:500 12px/1.3 var(--font-mono);color:var(--fg)}.decision-preview.tight .margin-value {color:var(--warn)}
.lbl-selection {background:var(--saf);color:var(--bg);border-radius:5px;padding:4px 8px;font-size:10px}
.dep.closed:not(.gone) .dep-status {color:var(--bad)}
.run {border-radius:6px;background:var(--surface);border:0}
/* The slot name and hours never break mid-token; a long status moves to its own line. */
.run .rh {flex-wrap:wrap;row-gap:4px}
.run .rh b,.run .rh span,.run .rh em {white-space:nowrap}
.playback-hint {margin-left:auto;font-size:11px;color:var(--muted)}
.toasts {top:calc(var(--map-controls-bottom, 130px) + 12px);left:calc((100% + 300px - var(--inspector)) / 2);width:min(360px,calc(100% - 660px));min-width:180px}
@media (max-width:1100px) and (min-width:901px) {
  :root {--inspector:280px}
  .topbar {gap:18px}.brand {gap:10px}.brand h1 {font-size:15px;padding-left:10px}.back {display:none}.tabs {margin-right:140px}
  .route-summary {max-width:calc(100% - var(--inspector) - 48px)}
  body[data-mode="play"] .panel.left {width:258px;padding:15px}
  body[data-mode="play"] .kpis div {min-width:75px;padding:8px 10px}
  body[data-mode="play"] .kpis div:nth-child(3) {display:none}
}
@media (max-width:900px) {
  :root {--header:54px;--ribbon:56px;--tb:56px;--sheet:42svh;--safe-b:env(safe-area-inset-bottom,0px)}
  .topbar {padding-left:16px;padding-right:16px;gap:14px}.brand svg {width:73px;height:27px}.brand .t,.back {display:none}.tabs {gap:18px;margin-left:6px;margin-right:110px}.tabs button {font-size:13px}
  .hudtop {right:16px;top:calc(env(safe-area-inset-top,0px) + 16px);transform:none}.clock strong {font-size:14px}.clock .d {font-size:10px}
  /* Keeps the 10px time-lapse label inside the shorter top bar. */
  .clock .lapse {top:27px}
  .route-summary {top:calc(var(--header) + env(safe-area-inset-top,0px) + 12px);left:14px;right:14px;max-width:none;padding:10px 12px;gap:10px;border-radius:8px}
  .route-summary > div {flex:1}.route-summary strong {font-size:14px}.route-summary button {font-size:11px;margin-left:0}.route-symbol {font-size:23px}
  .camera-controls {top:calc(var(--header) + env(safe-area-inset-top,0px) + 89px);left:14px;padding:3px;border-radius:6px;width:274px}
  .camera-controls .btn {padding:7px 10px;font-size:10px}
  body[data-route-open="1"] .camera-controls {visibility:visible}
  .panel.left,.panel.right,body[data-mode="play"] .panel.left {top:auto;bottom:calc(var(--tb) + var(--safe-b));left:0!important;right:0!important;width:auto!important;height:var(--sheet);max-height:none!important;padding:58px 20px 20px;border-radius:16px 16px 0 0;border-width:1px 0 0;box-shadow:none;z-index:15}
  body[data-mode="showcase"][data-sheet="a"] #panel-route {display:block}
  body[data-mode="showcase"][data-sheet="b"] #panel-route {display:none}
  body[data-sheet="a"] .panel.right {display:none}
  .sheettabs {padding:0 16px;height:44px;bottom:calc(var(--tb) + var(--safe-b) + var(--sheet) - 44px);background:var(--panel-solid);border-width:1px 0 0;border-radius:16px 16px 0 0}
  .sheettabs button {border:0;background:none;padding:8px 12px;border-radius:6px;font-size:12px}
  .sheettabs button[aria-selected="true"] {background:var(--surface-2);color:var(--saf)}
  .caption {left:14px;right:14px;bottom:calc(var(--tb) + var(--safe-b) + var(--sheet) + 8px);max-width:660px;padding:9px 12px 12px}
  .caption p {font-size:12px;-webkit-line-clamp:2}
  .transport {height:calc(var(--tb) + var(--safe-b));padding:0 16px var(--safe-b);gap:12px;overflow:visible}
  .transport #btn-pause {padding:8px 12px;min-width:72px;font-size:12px}.transport .grp {margin-left:auto}.transport .btn {padding:8px 11px;font-size:12px}
  .journey-timeline,.playback-hint {display:none!important}
  .journey-stage {font-size:22px}.inspector-kicker {margin-bottom:12px}.inspector-foot {display:none}.jchips {margin-bottom:16px}
  .journey-map {margin:20px 0}.drawer-heading button {display:none}
  body[data-mode="play"] .hudtop {top:calc(var(--header) + env(safe-area-inset-top,0px) + 12px);left:14px;right:14px;width:auto;transform:none;flex-direction:row}
  body[data-mode="play"] .clock {top:calc(env(safe-area-inset-top,0px) + 20px);right:16px}
  body[data-mode="play"] .kpis {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;border-radius:7px}
  body[data-mode="play"] .kpis div {padding:7px 10px;min-width:0}
  body[data-mode="play"] .kpis div:nth-child(3) {display:none}
  body[data-mode="play"] .camera-controls {left:14px;right:auto;top:calc(var(--header) + env(safe-area-inset-top,0px) + 86px)}
  .toasts {top:calc(var(--map-controls-bottom, 180px) + 12px);left:50%;width:calc(100% - 28px);min-width:0}
  body[data-collapsed="1"] {--sheet:44px}
  body[data-collapsed="1"] .panel {display:none!important}
}
@media (max-width:380px) {
  .tabs {gap:12px;margin-right:90px}.brand svg {width:64px}.topbar {gap:7px;padding-left:12px}.hudtop {right:12px}.clock .d {display:none}
  .route-summary > div > span {font-size:10px}.route-summary {gap:7px}.route-summary button {font-size:10px}
}
@media (max-height:500px) {
  :root {--header:44px;--ribbon:48px;--tb:48px;--col:min(300px,38vw);--top:calc(var(--header) + env(safe-area-inset-top,0px))}
  .topbar {height:var(--top);padding-left:14px;padding-right:14px}.brand svg {width:65px;height:24px}.brand .t,.back {display:none}.tabs {margin-left:auto;margin-right:120px;gap:18px}
  .hudtop {top:calc(env(safe-area-inset-top,0px) + 10px);right:14px;left:auto;transform:none}.clock strong {font-size:14px}.clock .d {font-size:10px}.clock .lapse {top:24px}
  .route-summary {top:calc(var(--top) + 8px);left:12px;right:auto;max-width:calc(100% - var(--col) - 26px);padding:8px 10px;gap:8px}
  .route-summary strong {font-size:12px}.route-summary > div > span {font-size:10px}.route-summary button {font-size:10px;margin-left:8px}.route-symbol {display:none}
  .camera-controls {top:calc(var(--top) + 76px);left:12px}.camera-controls .btn {padding:5px 7px;font-size:10px}
  .camera-controls,body[data-mode="play"] .camera-controls {width:244px;max-width:calc(100% - var(--col) - 24px)}
  .map-focus {padding-top:5px}.map-focus small {display:none}.map-focus label {display:none}
  .sheettabs {top:var(--top);bottom:auto;right:0;left:auto;width:var(--col);height:40px;border-radius:0;border-left:1px solid var(--line);padding:0 8px}.sheettabs button {padding:5px 7px;font-size:11px}
  .panel.left,.panel.right,body[data-mode="play"] .panel.left {top:calc(var(--top) + 40px)!important;bottom:0!important;left:auto!important;right:0!important;width:var(--col)!important;height:auto!important;max-height:none!important;padding:14px;border-width:0 0 0 1px;border-radius:0;z-index:15}
  body[data-mode="showcase"][data-sheet="a"] #panel-route {display:block}
  body[data-mode="showcase"][data-sheet="b"] #panel-route {display:none}
  .caption {left:12px;right:calc(var(--col) + 12px);bottom:calc(var(--tb) + env(safe-area-inset-bottom,0px) + 8px);padding:7px 10px 9px;max-width:none}.caption p {font-size:11px;-webkit-line-clamp:2}.caption .step {font-size:10px}
  .transport {left:0;right:var(--col);height:calc(var(--tb) + env(safe-area-inset-bottom,0px));padding:0 12px env(safe-area-inset-bottom,0px);gap:8px}.transport #btn-pause {padding:6px 10px;min-width:64px}.transport .grp {margin-left:auto}.transport .btn {font-size:11px;padding:6px 8px}
  .journey-timeline,.playback-hint {display:none!important}
  .journey-stage {font-size:23px}.inspector-kicker {margin-bottom:10px}.jchips {margin-bottom:15px}
  body[data-route-open="1"] .camera-controls {visibility:visible}
  body[data-mode="play"] .hudtop {top:calc(var(--top) + 8px);left:12px;right:calc(var(--col) + 12px);width:auto;max-width:none;transform:none;flex-direction:row}
  body[data-mode="play"] .clock {top:calc(env(safe-area-inset-top,0px) + 13px);right:14px}
  body[data-mode="play"] .kpis {width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.kpis div:nth-child(3) {display:none!important}body[data-mode="play"] .kpis div {min-width:0;padding:6px 8px}.kpis dd {font-size:12px!important}
  body[data-mode="play"] .camera-controls {top:calc(var(--top) + 77px);left:12px;right:auto}
  .toasts {top:calc(var(--map-controls-bottom, 145px) + 8px);left:calc((100% - var(--col)) / 2);width:min(340px,calc(100% - var(--col) - 24px));min-width:0}
  body[data-collapsed="1"] {--col:0px}body[data-collapsed="1"] .sheettabs {width:auto;border-radius:0 0 0 8px}
  /* The hidden column leaves its tab strip in the top-right corner: the
     scoreboard keeps the open column's width so it never covers Show. */
  body[data-collapsed="1"][data-mode="play"] .hudtop {right:calc(min(300px,38vw) + 12px)}
}
@media (max-height:500px) {body[data-mode="play"] .kpis dd.of {font-size:10px!important}}
@media (prefers-reduced-motion:reduce) {*,*::before,*::after {scroll-behavior:auto!important;transition:none!important}}

/* Mixed network uses the existing Safiri palette and type hierarchy. */
.network-select-field {display:grid;gap:7px;margin-bottom:18px;min-width:0}
.network-field-label {font-size:12px;color:var(--muted)}
.network-select-field select {display:block;width:100%;min-width:0;max-width:100%;font:inherit;font-size:12px;line-height:1.4;color:var(--fg);background:var(--panel-solid);border:1px solid var(--line);border-radius:6px;padding:10px 8px;cursor:pointer}
.network-checks {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.network-checks label {display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:6px;padding:9px 7px;font-size:12px;cursor:pointer;min-width:0}
.network-checks label:has(input:checked) {background:var(--saf-soft);border-color:var(--saf);color:var(--saf)}
.network-checks input {accent-color:var(--saf);width:15px;height:15px;margin:0;flex:none}
.network-entry {width:100%;margin-top:20px;color:var(--saf);display:flex;align-items:center;justify-content:space-between}
.network-viewbar {position:fixed;z-index:20;right:0;top:calc(var(--header) + env(safe-area-inset-top,0px));width:var(--inspector);padding:15px 15px 10px;display:flex;gap:3px;background:var(--panel-solid);border-left:1px solid var(--line)}
.network-viewbar button {flex:1;min-width:0;font:inherit;font-size:12px;font-weight:600;line-height:1.3;padding:10px 5px;border:1px solid var(--line);border-radius:6px;cursor:pointer;color:var(--muted);background:var(--panel-solid);white-space:nowrap}
.network-viewbar button[aria-pressed="true"] {color:var(--bg);background:var(--saf);border-color:var(--saf)}
body[data-showcase-kind="network"] #panel-journey {padding-top:74px}
.network-view-help {font-size:11px;line-height:1.5;color:var(--muted);margin:0 0 18px}
#network-title {font-size:21px;overflow-wrap:anywhere}
.network-totals {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0 0 16px}
.network-totals > div {padding:11px 6px;background:var(--surface);border:1px solid var(--line);border-radius:6px;min-width:0}
.network-totals dt {font-size:10px;color:var(--muted);white-space:nowrap}
.network-totals dd {font-size:23px;line-height:1.3;font-weight:600;font-variant-numeric:tabular-nums;margin:3px 0 0;color:var(--saf)}
.network-totals > div:last-child dd {color:var(--ok)}
.network-section-title {font-size:12px;font-weight:600;margin:22px 0 8px;color:var(--fg);display:flex;align-items:center;gap:7px}
.network-section-title > span {background:var(--surface-2);padding:2px 6px;border-radius:5px;font-size:11px}
.network-explanation,.network-empty {font-size:12px;color:var(--muted);line-height:1.6;margin:8px 0 16px}
.network-list {display:grid;gap:6px;margin-bottom:18px}
.network-item {width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;gap:10px;color:var(--fg);background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:10px;font:inherit;font-size:12px;min-width:0}
button.network-item {cursor:pointer}
button.network-item:hover {border-color:var(--saf);background:var(--saf-soft)}
.network-item > span:first-child {min-width:0}
.network-item strong,.network-item small {display:block;overflow-wrap:anywhere}
.network-item strong {font-weight:600;font-size:12px;line-height:1.4}
.network-item small {color:var(--muted);font-size:11px;line-height:1.45;margin-top:3px}
.network-item > b {color:var(--saf);font-size:18px;text-align:right;flex:none}
.network-item > b small {font-weight:400;font-size:10px}
.network-operator {background:var(--op-soft);border-color:var(--line)}
.network-operator strong {color:var(--op-ink)}
.network-history {list-style:none;margin:0 0 16px;padding:0;display:grid;gap:0}
.network-history li {display:flex;gap:9px;font-size:12px;line-height:1.5;padding:9px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.network-history li:last-child {border-bottom:0}
.network-history time {color:var(--muted);font-size:10px;flex:0 0 45px;padding-top:2px;font-variant-numeric:tabular-nums}
.network-history li > div {min-width:0}
.network-history small {display:block;font-size:10px;color:var(--muted);margin-top:3px;overflow-wrap:anywhere}
.network-history .now {color:var(--saf);font-weight:600}
.network-history .done {color:var(--muted)}
.network-stop-index {font-size:11px;min-width:18px;padding-top:2px;color:var(--saf)}
.network-history .done .network-stop-index {color:var(--ok)}
.network-duty {padding:12px;background:var(--saf-soft);border-radius:7px;margin-bottom:14px}
.network-duty p {margin:6px 0 0;font-size:14px;color:var(--saf);font-weight:600;line-height:1.5}
.network-duty-facts {margin:0;display:grid;gap:12px}
.network-duty-facts dt {font-size:11px;color:var(--muted);margin-bottom:3px}
.network-duty-facts dd {margin:0;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.network-completion {font-size:12px;line-height:1.5;border:1px solid var(--ok);background:var(--ok-soft);color:var(--ok);border-radius:6px;padding:12px}
@media (max-width:900px) and (min-height:501px) {
  .network-viewbar {right:auto;left:14px;top:calc(var(--header) + env(safe-area-inset-top,0px) + 88px);width:274px;max-width:calc(100% - 28px);padding:4px;border:1px solid var(--line);border-radius:7px;background:var(--panel-solid);box-shadow:var(--shadow)}
  .network-viewbar button {padding:8px 5px;font-size:11px;border-color:transparent;background:transparent}
  body[data-mode="showcase"][data-showcase-kind="network"] .camera-controls {top:calc(var(--header) + env(safe-area-inset-top,0px) + 137px)}
  body[data-showcase-kind="network"] #panel-journey {padding-top:58px}
  body[data-route-open="1"] .network-viewbar {z-index:14}
  /* With the sheet open the view switcher docks under the sheet's tabs, as it
     does in the sideways column, instead of floating over the map; the setup
     tab has no use for it. It floats again once the sheet is hidden. */
  body:not([data-collapsed="1"]) .network-viewbar {top:auto;bottom:calc(var(--tb) + var(--safe-b) + var(--sheet) - 88px);left:0;right:0;width:auto;max-width:none;height:44px;align-items:center;padding:0 16px;border-width:0 0 1px;border-radius:0;box-shadow:none}
  body:not([data-collapsed="1"])[data-sheet="a"] .network-viewbar {display:none}
  body[data-showcase-kind="network"]:not([data-collapsed="1"]) #panel-journey {padding-top:100px}
}
@media (max-height:500px) {
  .network-viewbar {top:calc(var(--top) + 40px);right:0;left:auto;width:var(--col);padding:6px 10px;border-width:0 0 0 1px;border-radius:0;box-shadow:none}
  .network-viewbar button {font-size:10px;padding:7px 3px}
  body[data-showcase-kind="network"] #panel-journey {padding-top:60px}
  body[data-sheet="a"] .network-viewbar,body[data-collapsed="1"] .network-viewbar {display:none}
}
/* Phones and short screens: while the sheet (or the sideways column) is open
   it already has the Route tab, so the route summary and the camera bar with
   its Explore row step aside; stacked over the sheet they could leave the
   scene a strip only a few pixels tall. Hiding the panel brings them back
   over a free map. */
@media (max-width:900px), (max-height:500px) {
  body:not([data-collapsed="1"]) .route-summary,
  body:not([data-collapsed="1"]) .camera-controls {display:none}
  /* Toasts sit at the foot of the map, just above the sheet or the playback
     bar: they were placed under the camera bar, which can now be hidden, and
     falling back to the top would cover the scoreboard. Only the newest two
     are shown, so a burst never climbs over the scoreboard. */
  body[data-mode="play"] .toasts {top:auto}
  .toasts .toast:nth-last-child(n+3) {display:none}
}
@media (max-width:900px) and (min-height:501px) {
  body[data-mode="play"] .toasts {bottom:calc(var(--tb) + var(--safe-b) + var(--sheet) + 8px)}
}
@media (max-height:500px) {
  body[data-mode="play"] .toasts {bottom:calc(var(--tb) + env(safe-area-inset-bottom,0px) + 8px)}
}
/* Desktop: the open route drawer covers the left of the map, so the caption
   moves right of it (24 + 330 + 24 px) instead of showing through it. */
@media (min-width:901px) and (min-height:501px) {
  body[data-route-open="1"] .caption {left:378px}
}
