/* LOGISCHAB: night-yard control room. Dark by default, light theme for bright offices and outdoors.
   System fonts only, works offline. Colours, radii and spacing live in the custom properties below. */
:root, [data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B0C0D;
  --glow-1: rgba(255, 255, 255, .055);
  --glow-2: rgba(255, 170, 90, .035);
  --surface: rgba(27, 28, 30, .74);
  --surface-solid: #17181A;
  --raise: #1F2123;
  --raise-2: #2B2D30;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .15);
  --text: #F3F4F5;
  --muted: #A9ACB0;
  --faint: #8D9196;
  --accent: #F3F4F5;
  --accent-strong: #F3F4F5;
  --accent-ink: #0B0C0D;
  --accent-soft: rgba(255, 255, 255, .10);
  --crit: #FF6F6F;
  --crit-ink: #0B0C0D;
  --warn: #FFA94D;
  --info: #A9B8C6;
  --st-booked: #B4B8BE;
  --st-arrived: #FFA94D;
  --st-called: #5CC8E0;
  --st-at_dock: #8FB6FF;
  --st-done: #5BD893;
  --st-departed: #7DB096;
  --st-no_show: #FF7A8A;
  --st-cancelled: #98A1AD;
  --late: #FF6F6F;
  --shadow: 0 1px 0 rgba(255, 255, 255, .035) inset, 0 20px 44px -28px rgba(0, 0, 0, .8);
  --shadow-pop: 0 18px 50px -12px rgba(0, 0, 0, .65);
  --tile-filter: invert(1) hue-rotate(180deg) brightness(1.75) contrast(.82) saturate(.18);
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #ECECEA;
  --glow-1: rgba(255, 255, 255, .7);
  --glow-2: rgba(20, 21, 22, .03);
  --surface: rgba(255, 255, 255, .88);
  --surface-solid: #FFFFFF;
  --raise: #F4F4F2;
  --raise-2: #E6E6E3;
  --line: rgba(20, 21, 22, .09);
  --line-2: rgba(20, 21, 22, .18);
  --text: #141516;
  --muted: #53565A;
  --faint: #5E6166;
  --accent: #141516;
  --accent-strong: #141516;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(20, 21, 22, .07);
  --crit: #C92A2A;
  --crit-ink: #FFFFFF;
  --warn: #855000;
  --info: #3D5568;
  --st-booked: #555B63;
  --st-arrived: #855000;
  --st-called: #0B7590;
  --st-at_dock: #2F5FC4;
  --st-done: #17784A;
  --st-departed: #3D7458;
  --st-no_show: #C2304C;
  --st-cancelled: #66707C;
  --late: #C92A2A;
  --shadow: 0 1px 2px rgba(20, 35, 50, .05), 0 12px 32px -18px rgba(20, 35, 50, .22);
  --shadow-pop: 0 18px 44px -12px rgba(20, 35, 50, .28);
  --tile-filter: saturate(.3);
}
:root {
  --r-card: 18px;
  --r-inner: 12px;
  --r-ctl: 10px;
  --gap: 1rem;
  --pad: clamp(.9rem, 2vw, 1.5rem);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--text); font: 15px/1.5 var(--font);
  background:
    radial-gradient(1000px 620px at 72% -14%, var(--glow-1), transparent 70%),
    radial-gradient(760px 520px at -8% 108%, var(--glow-2), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; margin: 0; }
h2 { font-size: 1rem; letter-spacing: -.005em; }
a { color: var(--accent); }
.num, time { font-variant-numeric: tabular-nums; }
.mono, .plate { font-family: var(--mono); }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- controls ---------- */
button, input, select, textarea { font: inherit; color: inherit; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 38px; padding: .35rem 1rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--raise); color: var(--text);
  font-weight: 550; white-space: nowrap;
  transition: background-color .15s, border-color .15s, transform .08s;
}
a.btn { text-decoration: none; }
.btn:hover { background: var(--raise-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent-strong) 86%, #fff); }
.btn.danger { color: var(--st-no_show); border-color: color-mix(in srgb, var(--st-no_show) 45%, transparent); background: transparent; }
.btn.danger:hover { background: color-mix(in srgb, var(--st-no_show) 12%, transparent); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--raise); }
.btn.sm { min-height: 32px; padding: .2rem .75rem; font-size: .85rem; }
.btn.icon { width: 36px; min-height: 36px; padding: 0; }
.btn.big { min-height: 58px; font-size: 1.1rem; width: 100%; border-radius: 16px; }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--raise-2); color: var(--text); }

label { display: grid; gap: .3rem; font-size: .85rem; color: var(--muted); }
label.btn { display: inline-flex; font-size: 1rem; color: var(--text); }
input, select, textarea {
  min-height: 40px; padding: .45rem .75rem; border-radius: var(--r-ctl);
  border: 1px solid var(--line-2); background: var(--raise); color: var(--text);
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; border-color: var(--accent); }
input[type="date"], input[type="time"] { font-variant-numeric: tabular-nums; }
[data-theme="dark"] ::-webkit-calendar-picker-indicator { filter: invert(.85); }
textarea { min-height: 76px; resize: vertical; }
.field-row { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.field-row > *, label > select, label > input { min-width: 0; }
.error { color: var(--crit); font-size: .9rem; margin: 0; }
.error:empty { display: none; }
kbd, .kbd-hint { font: 600 .75rem var(--mono); padding: .05rem .45rem; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; color: var(--muted); }

/* segmented pill control: timeline zoom, theme */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--raise); border: 1px solid var(--line); }
.seg button, .seg label span { display: inline-block; border: 0; background: none; padding: .25rem .8rem; border-radius: 999px; font-size: .82rem; font-weight: 550; color: var(--muted); cursor: pointer; }
.seg label { display: inline-flex; font-size: inherit; }
.seg label input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg button[aria-pressed="true"], .seg input:checked + span { background: var(--text); color: var(--bg); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg-field { border: 0; padding: 0; display: flex; align-items: center; gap: .8rem; }
.seg-field legend { float: left; padding: 0; margin-right: .8rem; }

/* ---------- panels and cards ---------- */
.panel, .card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .9rem 1.15rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-body { padding: 1.15rem; }
.panel-head .hint { color: var(--muted); font-size: .84rem; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 1100; display: flex; align-items: center; gap: .5rem 1rem; flex-wrap: wrap;
  padding: .55rem var(--pad); border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: .55rem; font-family: var(--display); font-weight: 700; letter-spacing: .14em; font-size: .92rem; }
.brand svg { color: var(--accent); flex: none; }
.company { color: var(--muted); font-size: .88rem; padding: .2rem .75rem; border: 1px solid var(--line-2); border-radius: 999px; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs { display: flex; gap: .25rem; padding: 3px; border-radius: 999px; background: var(--raise); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab { border: 0; background: none; padding: .3rem .95rem; border-radius: 999px; color: var(--muted); font-weight: 550; font-size: .88rem; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab[aria-current="page"] { background: var(--text); color: var(--bg); cursor: default; }
.topbar .spacer { flex: 1; }
.now { display: inline-flex; align-items: center; gap: .9rem; color: var(--muted); font-size: .86rem; white-space: nowrap; padding-right: .3rem; }
.now > :empty { display: none; }
.now-place { color: var(--text); font-weight: 500; }
.now-wx { display: inline-flex; align-items: center; gap: .35rem; }
.now-wx b { color: var(--text); font-weight: 600; }
.now-clock { font-variant-numeric: tabular-nums; }
.theme-btn { width: 36px; height: 36px; min-height: 0; padding: 0; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); }
@media (max-width: 1600px) { .now-wx-l { display: none; } }
@media (max-width: 1400px) { .now-place { display: none; } }
@media (max-width: 1180px) { .now-clock { display: none; } }
@media (max-width: 760px) { .now { display: none; } }
.topbar .tools { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.account { padding-left: .3rem; }
.avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 700 .72rem var(--font); letter-spacing: .02em; }

.live { display: inline-flex; align-items: center; gap: .45rem; font: 600 .72rem var(--mono); letter-spacing: .08em; color: var(--st-done); padding: .2rem .6rem; border: 1px solid color-mix(in srgb, var(--st-done) 40%, transparent); border-radius: 999px; }
.live i { position: relative; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.live i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor; animation: ping 1.8s ease-out infinite; }
.live.off { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.live.off i::after { animation: none; }
@keyframes ping { from { transform: scale(1); opacity: .7; } to { transform: scale(3); opacity: 0; } }

.page { padding: var(--pad); display: grid; gap: var(--gap); max-width: 1720px; margin: 0 auto; }
.page > *, .carrier-grid > *, .board-grid > *, .flow > * { min-width: 0; }

/* ---------- login and sign-up ---------- */
.login-wrap { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem; overflow: hidden; }
/* the approach rings of the board, faint, behind the form */
.login-wrap::before {
  content: ""; position: absolute; inset: -20vmax; pointer-events: none;
  background: repeating-radial-gradient(circle at 50% 50%, transparent 0 89px, var(--line-2) 90px 91px);
  -webkit-mask: radial-gradient(circle at 50% 50%, #000 10%, transparent 60%); mask: radial-gradient(circle at 50% 50%, #000 10%, transparent 60%);
}
.login-hero { display: none; position: relative; min-width: 0; }
.login-hero .lh-k { margin: 0 0 .8rem; color: var(--muted); font-size: .95rem; }
.login-hero .lh-t { margin: 0; font: 300 clamp(2.4rem, 4.4vw, 3.9rem)/1.06 var(--display); letter-spacing: -.035em; text-wrap: balance; max-width: 13em; }
.login-hero .lh-player { margin: 2.2rem 0 1.6rem; }
.login-hero .chip { cursor: default; }
@media (min-width: 1000px) {
  .login-wrap { grid-template-columns: minmax(0, 640px) minmax(360px, 440px); justify-content: center; gap: clamp(2rem, 6vw, 5.5rem); }
  .login-wrap::before { background-position: 30% 50%; }
  .login-hero { display: block; }
}
.login { position: relative; width: min(440px, 100%); padding: 2.1rem; display: grid; gap: 1.1rem; border-radius: 24px; }
.login h1 { font-size: 1.9rem; font-weight: 350; letter-spacing: -.02em; }
.login p { margin: 0; }
.login .demo { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.login .demo p { grid-column: 1 / -1; color: var(--muted); font-size: .85rem; }
.login .btn.primary { min-height: 44px; }

/* ---------- board head, chips ---------- */
.board-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .8rem 1.2rem; }
.bh-title { flex: 1 1 auto; }
.bh-title h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 300; letter-spacing: -.025em; }
.bh-date { margin: .1rem 0 0; color: var(--muted); }
.day-nav, .bh-tools { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.day-nav input { border-radius: 999px; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  display: inline-flex; align-items: baseline; gap: .4rem; padding: .35rem .95rem .38rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font-size: .88rem; transition: background-color .15s, border-color .15s;
}
.chip b { color: var(--text); font-weight: 600; font-size: 1rem; }
.chip:hover { border-color: var(--faint); }
.chip.crit { border-color: color-mix(in srgb, var(--crit) 50%, transparent); }
.chip.crit b { color: var(--crit); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip[aria-pressed="true"] b { color: var(--bg); }

/* ---------- gate check-in strip ---------- */
.gate { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: .7rem 1.1rem; border-radius: var(--r-card); }
.gate label { font-weight: 600; color: var(--text); font-size: .95rem; }
.gate input::placeholder { font: 400 .95rem var(--font); letter-spacing: 0; }
.gate input { flex: 1 1 260px; max-width: 380px; font: 600 1.05rem var(--mono); letter-spacing: .05em; border-radius: 999px; padding-inline: 1rem; }
.gate-result { flex-basis: 100%; display: grid; gap: .4rem; }
.gate-result:empty { display: none; }
.gate-hit { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; padding: .55rem .8rem; border-radius: var(--r-inner); background: var(--raise); }

/* ---------- board grid: figures | approach | alerts ---------- */
.board-grid { display: grid; gap: var(--gap); grid-template-columns: minmax(270px, 300px) minmax(0, 1fr) minmax(280px, 330px); grid-template-areas: "kpi ap al"; align-items: start; }
.kpi-col { grid-area: kpi; display: grid; gap: var(--gap); }
.approach { grid-area: ap; overflow: hidden; }
.alerts { grid-area: al; display: flex; flex-direction: column; }

.card { position: relative; padding: 1rem 1.1rem; }
.card h3 { font-size: .82rem; font-weight: 500; color: var(--muted); font-family: var(--font); margin-bottom: .35rem; }
.kpi-num { display: block; font: 300 2.45rem/1.05 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi-num .dim { color: var(--faint); font-size: .55em; letter-spacing: 0; margin-left: .08em; }
.kpi-card .sub { margin: .45rem 0 0; font-size: .8rem; color: var(--muted); }
.kpi-card.warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.kpi-card.warn .kpi-num { color: var(--warn); }
.kpi-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.kpi-pair .kpi-num { font-size: 2.1rem; }
.corner { position: absolute; top: .7rem; right: .7rem; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--muted); cursor: pointer; }
.corner:hover { color: var(--text); background: var(--raise-2); }
.meter { height: 4px; margin-top: .7rem; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }

.chart { display: block; width: 100%; height: auto; margin-top: .6rem; overflow: visible; }
.ch-bar { fill: color-mix(in srgb, var(--text) 16%, transparent); }
.ch-bar.now { fill: var(--accent); }
.ch-line { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; }
.ch-pt { fill: var(--surface-solid); stroke: var(--accent); stroke-width: 1.5; }
.ch-target { stroke: var(--faint); stroke-dasharray: 3 4; stroke-width: 1; }
.ch-lbl { font: 9px var(--font); fill: var(--faint); }
.legend-mini { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; margin: .5rem 0 0; font-size: .72rem; color: var(--muted); }
.legend-mini span { display: inline-block; width: 12px; }
.lm-bar { height: 8px; border-radius: 2px; background: color-mix(in srgb, var(--text) 16%, transparent); }
.lm-line { height: 2px; background: var(--accent); }
.lm-dash { height: 0; border-top: 1px dashed var(--faint); }

/* approach: map or radar with floating cards */
.ap-stage { position: relative; height: clamp(380px, 46vh, 520px); }
.ap-view { position: absolute; inset: 0; }
.ap-view[data-mode="svg"] { display: grid; place-items: center; padding: .5rem .5rem .5rem 250px; } /* room for the floating cards */
.approach-svg { width: 100%; height: 100%; max-height: 100%; }
.ap-ring { fill: none; stroke: var(--line-2); }
.ap-yard { fill: var(--accent-soft); stroke: color-mix(in srgb, var(--accent) 40%, transparent); }
.ap-spoke { stroke: var(--line); stroke-dasharray: 2 5; }
.ap-tick { font: 10px var(--font); fill: var(--faint); }
.ap-dock { font: 600 11px var(--font); fill: var(--muted); }
.ap-center { font: 600 10px var(--font); fill: var(--accent); letter-spacing: .06em; }
.ap-dot { cursor: pointer; outline: none; }
.ap-dot circle { fill: var(--c); transition: r .15s; }
.ap-dot .ap-halo { opacity: .16; }
.ap-dot text { font: 600 10.5px var(--mono); fill: var(--text); paint-order: stroke; stroke: var(--surface-solid); stroke-width: 3px; }
.ap-dot.late circle:not(.ap-halo) { fill: var(--late); }
.ap-dot:hover .ap-halo, .ap-dot:focus-visible .ap-halo { opacity: .45; }
.ap-dot:focus-visible .ap-halo { stroke: var(--accent); stroke-width: 2; }

.ap-cards { position: absolute; inset: 0; pointer-events: none; z-index: 500; }
.float-card {
  position: absolute; pointer-events: auto; width: 236px; padding: .75rem .85rem; border-radius: 16px;
  background: color-mix(in srgb, var(--surface-solid) 82%, transparent); border: 1px solid var(--line-2);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow-pop);
}
.float-card h3 { font-size: .78rem; font-weight: 500; color: var(--muted); margin-bottom: .4rem; font-family: var(--font); }
.float-card ol, .float-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.fc-next { top: .8rem; left: .8rem; }
.fc-next button { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: .5rem; align-items: baseline; padding: .3rem .4rem; border: 0; border-radius: 8px; background: none; cursor: pointer; text-align: left; font-size: .82rem; }
.fc-next button:hover { background: var(--raise-2); }
.fc-next .plate { font-size: .8rem; font-weight: 600; }
.fc-next .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.late-txt { color: var(--crit); }
.fc-docks { left: .8rem; bottom: .8rem; }
.fc-docks li { display: grid; grid-template-columns: 5.6rem 1fr 2.6rem; gap: .5rem; align-items: center; font-size: .78rem; }
.fd-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.fd-bar { height: 5px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.fd-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.fc-docks .num { text-align: right; }

/* Leaflet, themed */
.ap-view .leaflet-container { width: 100%; height: 100%; background: var(--surface-solid); font: inherit; }
.leaflet-tile-pane { filter: var(--tile-filter); }
.leaflet-bar { border: 1px solid var(--line-2) !important; border-radius: 12px !important; overflow: hidden; box-shadow: var(--shadow-pop) !important; }
.leaflet-bar a, .leaflet-bar a:hover { background: var(--surface-solid); color: var(--text); border-bottom-color: var(--line); }
.leaflet-container .leaflet-control-attribution { background: color-mix(in srgb, var(--surface-solid) 85%, transparent); color: var(--muted); border-top-left-radius: 8px; font-size: 11px; }
.leaflet-control-attribution a { color: var(--accent); }
.mk-wrap { background: none; border: 0; }
.mk { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .55rem .15rem .3rem; border-radius: 999px; white-space: nowrap;
  font: 600 .72rem var(--mono); color: var(--text); background: var(--surface-solid); border: 1px solid var(--c); box-shadow: var(--shadow-pop); transform: translate(0, 0); }
.mk i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent); }
.leaflet-marker-icon:focus-visible { outline: none; }
.leaflet-marker-icon:focus-visible .mk { outline: 2px solid var(--accent); outline-offset: 2px; }
.mk-home { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-strong); color: var(--accent-ink); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent-strong) 25%, transparent); }
path.mk-line { stroke: var(--c); stroke-opacity: .7; }
.leaflet-marker-icon, path.mk-line { transition: transform .6s ease; }
.leaflet-zoom-anim .leaflet-marker-icon { transition: none; }

/* alerts column */
.alerts .count { display: flex; }
.count-pill { min-width: 1.6rem; padding: 0 .5rem; border-radius: 999px; text-align: center; font: 600 .8rem/1.5rem var(--font); background: var(--raise-2); }
.count-pill.crit { background: var(--crit); color: var(--crit-ink); }
[data-theme="dark"] .count-pill.crit { color: #2A0707; }
.alerts-body { padding: .8rem; display: grid; gap: 1rem; max-height: 36rem; overflow: auto; }
.al-group h3 { display: flex; align-items: center; gap: .45rem; font: 600 .72rem var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--lv); margin: 0 0 .5rem .2rem; }
.al-group h3 .num { padding: 0 .45rem; border-radius: 99px; background: color-mix(in srgb, var(--lv) 18%, transparent); letter-spacing: 0; }
.al-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.lv-critical { --lv: var(--crit); }
.lv-warning { --lv: var(--warn); }
.lv-info { --lv: var(--info); }
.al-card { display: grid; grid-template-columns: 1fr auto; align-items: start; border-radius: var(--r-inner);
  background: color-mix(in srgb, var(--lv) 8%, var(--raise)); border: 1px solid color-mix(in srgb, var(--lv) 32%, transparent); }
.al-open { display: grid; gap: .15rem; padding: .6rem .2rem .6rem .75rem; border: 0; background: none; text-align: left; cursor: pointer; border-radius: var(--r-inner); }
.al-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .5rem; }
.al-top .plate { font-size: .84rem; }
.al-title { color: var(--lv); font-weight: 600; font-size: .84rem; }
.al-text { color: var(--muted); font-size: .8rem; line-height: 1.4; }
.al-acts { display: flex; padding: .35rem .3rem 0 0; opacity: .7; }
.al-card:hover .al-acts, .al-card:focus-within .al-acts { opacity: 1; }
.all-clear { display: flex; gap: .6rem; margin: 0; padding: .6rem .4rem; color: var(--muted); font-size: .88rem; }
.all-clear svg { flex: none; color: var(--st-done); width: 20px; height: 20px; }
.restore { justify-self: start; font-size: .84rem; }

/* ---------- dock timeline ---------- */
.tl-scroll { overflow-x: auto; padding: .4rem 1.15rem 1.1rem; scroll-behavior: smooth; }
.tl { position: relative; --label: 8.2rem; width: 100%; }
.tl-head, .tl-row { display: grid; grid-template-columns: var(--label) 1fr; }
.tl-axis { position: relative; height: 1.9rem; }
.tl-axis span { position: absolute; bottom: .35rem; transform: translateX(-50%); font-size: .72rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.tl-row { min-height: 3.5rem; border-top: 1px solid var(--line); }
.tl-row:last-child { border-bottom: 1px solid var(--line); }
.tl-dock { display: flex; flex-direction: column; justify-content: center; gap: .1rem; font-weight: 600; font-size: .9rem; padding-right: .9rem; min-width: 0; }
.tl-dock small { display: block; font-size: .72rem; color: var(--muted); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-load { display: block; height: 3px; border-radius: 99px; background: var(--line-2); overflow: hidden; margin-top: .2rem; }
.tl-load i { display: block; height: 100%; background: var(--accent); }
.tl-track { position: relative; }
.tl-grid { position: absolute; top: 0; bottom: 0; left: var(--label); right: 0; pointer-events: none; }
.tl-grid b { position: absolute; top: 1.9rem; bottom: 0; width: 1px; background: var(--line); }
.tl-past { position: absolute; left: 0; top: 1.9rem; bottom: 0; background: color-mix(in srgb, var(--text) 3.5%, transparent); }
.tl-now { position: absolute; top: 1.2rem; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent); z-index: 3; transition: left .6s linear; }
.tl-now::before { content: attr(data-t); position: absolute; top: -1.15rem; left: 50%; transform: translateX(-50%); padding: 0 .4rem; border-radius: 99px; background: var(--accent-strong); color: var(--accent-ink); font: 700 .68rem/1.15rem var(--font); font-variant-numeric: tabular-nums; }

.blk {
  position: absolute; top: .45rem; bottom: .45rem; min-width: 1.6rem; z-index: 2;
  display: grid; align-content: center; gap: 0; padding: 0 .5rem 0 .6rem; text-align: left; cursor: pointer; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--c) 70%, transparent); border-radius: 8px;
  background: color-mix(in srgb, var(--c) 15%, var(--surface-solid)); color: var(--text);
  transition: transform .12s, background-color .12s, opacity .2s;
}
.blk:hover { background: color-mix(in srgb, var(--c) 26%, var(--surface-solid)); }
.blk b, .blk span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blk b { font: 600 .8rem var(--mono); }
.blk span { font-size: .7rem; color: color-mix(in srgb, var(--text) 78%, transparent); }
.blk.late { --c: var(--late); box-shadow: 0 0 0 1px var(--late); }
.blk.dim { opacity: .22; }
.blk:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; z-index: 4; }
.legend { display: flex; flex-wrap: wrap; gap: .3rem .8rem; font-size: .76rem; color: var(--muted); margin-left: auto; }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.legend i { width: .65rem; height: .65rem; border-radius: 3px; background: var(--c); }
.tl-break { position: absolute; top: 0; bottom: 0; z-index: 1; background: repeating-linear-gradient(135deg, var(--line) 0 6px, transparent 6px 12px); border-inline: 1px dashed var(--line-2); }
.lg-break i { background: repeating-linear-gradient(135deg, var(--line-2) 0 2px, transparent 2px 4px); border: 1px dashed var(--line-2); }

/* status colour hook shared by blocks, badges, legend, markers */
.s-booked { --c: var(--st-booked); }
.s-arrived { --c: var(--st-arrived); }
.s-called { --c: var(--st-called); }
.s-at_dock { --c: var(--st-at_dock); }
.s-done { --c: var(--st-done); }
.s-departed { --c: var(--st-departed); }
.s-no_show { --c: var(--st-no_show); }
.s-cancelled { --c: var(--st-cancelled); }
.s-late { --c: var(--late); }

.badge {
  display: inline-flex; align-items: center; gap: .35rem; padding: .08rem .55rem; border-radius: 999px; white-space: nowrap;
  font-size: .76rem; font-weight: 600; color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, transparent); border: 1px solid color-mix(in srgb, var(--c) 38%, transparent);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.late { --c: var(--late); }
.tag { display: inline-block; font-size: .8rem; color: var(--muted); white-space: nowrap; }

/* flags */
.flag { display: inline-block; padding: 0 .4rem; border-radius: 5px; font: 700 .68rem/1.25rem var(--mono); letter-spacing: .04em; vertical-align: middle; }
.flag.jit { color: var(--accent-ink); background: var(--accent-strong); }
.flag.adr { color: #2A1600; background: #FB923C; }
.flag.drive { color: var(--crit-ink); background: var(--late); }
[data-theme="dark"] .flag.drive { color: #2A0707; }
.flag.early { color: var(--st-booked); border: 1px solid var(--st-booked); }
.flag.asn { color: var(--st-done); border: 1px solid color-mix(in srgb, var(--st-done) 55%, transparent); }
.flag.asn-off { color: #2A1600; background: #F5C26B; }

/* ---------- truck flow cards: on the way, yard, at the docks ---------- */
.flow { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); align-items: start; }
.yard { list-style: none; margin: 0; padding: 0; }
.yard.cards { display: grid; gap: .6rem; padding: .8rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.vcard { position: relative; display: grid; gap: .35rem; align-content: start; padding: .75rem .85rem; border-radius: 14px; cursor: pointer;
  background: var(--raise); border: 1px solid var(--line); transition: border-color .15s, background-color .15s; }
.vcard:hover { border-color: var(--line-2); background: var(--raise-2); }
.vc-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.vcard .plate { font-weight: 700; font-size: .98rem; }
.vcard > .muted { font-size: .8rem; line-height: 1.35; }
.vc-flags { display: flex; flex-wrap: wrap; gap: .25rem; }
.vc-meter { display: block; height: 4px; border-radius: 99px; background: var(--line-2); overflow: hidden; margin-top: .2rem; }
.vc-meter i { display: block; height: 100%; border-radius: inherit; background: var(--c); }
.vc-meter.over i { background: var(--crit); }
.yard .wait { font-size: .8rem; color: var(--muted); }
.vcard .vc-top .wait { color: var(--muted); }
.vcard.near .wait { color: var(--accent); }
.vcard.overdue .wait { color: var(--crit); }
.vcard .acts { margin-top: .25rem; }

/* change flash when a live update moves a truck */
.pulse { animation: pulse 1.3s ease-out 2; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 65%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }

/* ---------- truck table ---------- */
.table-wrap { overflow-x: auto; position: relative; } /* keeps the absolutely placed sr-only header inside the scroller */
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; padding: .65rem .85rem; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
td { padding: .6rem .85rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr { cursor: pointer; transition: background-color .12s; }
tbody tr:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.is-late { background: color-mix(in srgb, var(--late) 8%, transparent); }
tbody tr.is-cancelled { opacity: .55; }
td.nowrap { white-space: nowrap; }
td.plate { font-weight: 600; font-size: .9rem; white-space: nowrap; }
td small { display: block; font-size: .75rem; color: var(--muted); font-weight: 400; }
.info, .acts { display: flex; flex-wrap: wrap; gap: .3rem .5rem; align-items: center; }
.empty { padding: 2rem 1.1rem; color: var(--muted); text-align: center; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; font: inherit; }

/* ---------- hover card ---------- */
.tip { position: fixed; top: 0; left: 0; z-index: 1200; display: grid; gap: .25rem; max-width: 300px; padding: .65rem .8rem; border-radius: 12px; pointer-events: none;
  background: var(--surface-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow-pop); font-size: .84rem; }
.tip-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.tip .plate { font-size: .95rem; }

/* ---------- dialogs: drawer, modals ---------- */
dialog { color: var(--text); background: var(--surface-solid); border: 1px solid var(--line-2); padding: 0; box-shadow: var(--shadow-pop); }
dialog::backdrop { background: rgba(4, 8, 12, .55); backdrop-filter: blur(3px); }
.drawer { margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(480px, 100%); border-width: 0 0 0 1px; border-radius: 22px 0 0 22px; }
#drawerContent { min-height: 100%; }
.drawer[open] { animation: slidein .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes slidein { from { transform: translateX(28px); opacity: 0; } }
.drawer-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.3rem 1rem; background: var(--surface-solid); border-bottom: 1px solid var(--line); }
.drawer-head h2 { font: 600 1.55rem var(--mono); letter-spacing: .02em; margin-bottom: .35rem; }
.drawer-body { padding: 1.2rem 1.3rem; display: grid; gap: 1.4rem; }
.drawer-body h3 { font: 600 .72rem var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.dl { display: grid; grid-template-columns: 8.5rem 1fr; gap: .55rem 1rem; margin: 0; }
.dl dt { color: var(--muted); font-size: .84rem; }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.drawer .dl { padding: .9rem 1rem; border-radius: 14px; background: var(--raise); border: 1px solid var(--line); }
.history { list-style: none; margin: 0; padding: 0; }
.history li { position: relative; padding: 0 0 1rem 1.4rem; }
.history li::before { content: ""; position: absolute; left: 0; top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }
.history li:not(:last-child)::after { content: ""; position: absolute; left: 4px; top: 1.1rem; bottom: .1rem; width: 2px; background: var(--line-2); }
.history .by { color: var(--muted); font-size: .84rem; }
.history time { color: var(--muted); font-size: .84rem; margin-left: .4rem; }
.big-code { font-size: 1.15rem; letter-spacing: .12em; }

.modal { width: min(540px, calc(100% - 2rem)); border-radius: 22px; }
.modal[open] { animation: pop .18s ease-out; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.modal form { display: grid; gap: 1rem; padding: 1.4rem; }
.modal h2 { font-size: 1.35rem; font-weight: 400; letter-spacing: -.01em; }
.modal .foot, .modal-body .foot { display: flex; justify-content: flex-end; gap: .5rem; padding-top: .4rem; }
#settingsForm .foot { position: sticky; bottom: 0; margin: 0 -1.4rem -1.4rem; padding: .9rem 1.4rem; background: var(--surface-solid); border-top: 1px solid var(--line); }
.docks-edit { display: grid; gap: .5rem; }
fieldset { border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem 1rem; margin: 0; display: grid; gap: .7rem; background: var(--raise); }
fieldset > .btn { justify-self: start; }
legend { color: var(--text); font-size: .85rem; font-weight: 600; padding: 0 .35rem; }
.modal-body { padding: 1.4rem; display: grid; gap: 1rem; }
.modal-body h3 { font-size: .95rem; }
.modal.wide { width: min(820px, calc(100% - 2rem)); max-height: calc(100vh - 2rem); }
.stack { display: grid; gap: .7rem; }
.checks { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; }
.check { display: inline-flex; align-items: center; gap: .45rem; color: var(--text); font-size: .9rem; cursor: pointer; }
.check input { min-height: 0; width: 1.05rem; height: 1.05rem; accent-color: var(--accent-strong); }
.dock-edit { display: grid; gap: .4rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.note { font-size: .84rem; color: var(--muted); margin: 0; }
.warn-note { color: var(--warn); }
.wizard { padding: .75rem .95rem; border-radius: var(--r-inner); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-soft); color: var(--text); }
.team { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-inner); background: var(--raise); }
.team li { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; padding: .65rem .85rem; border-bottom: 1px solid var(--line); }
.team li:last-child { border-bottom: 0; }
.team li > span:first-child { flex: 1; min-width: 12rem; }
.issues { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.issues li { padding: .6rem .75rem; border-radius: var(--r-inner); border: 1px solid color-mix(in srgb, var(--warn) 38%, transparent); background: color-mix(in srgb, var(--warn) 7%, transparent); }
.issues p { margin: 0 0 .2rem; }
.issues .muted { font-size: .8rem; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; }
.photos a { display: grid; gap: .25rem; color: var(--muted); font-size: .78rem; text-decoration: none; }
.photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line-2); background: var(--raise); }
.copy-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.copy-row input { flex: 1; min-width: 12rem; font: .85rem var(--mono); }

/* reports */
.report { padding: 1.4rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.report-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.report-head h2 { font-size: 1.5rem; font-weight: 300; letter-spacing: -.02em; }
.report-head .acts select { border-radius: 999px; }
.report h3 { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: .5rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .6rem; margin: 0; }
.kpi { padding: .8rem 1rem; border-radius: 14px; background: var(--raise); border: 1px solid var(--line); }
.kpi dt { color: var(--muted); font-size: .8rem; }
.kpi dd { margin: .15rem 0 0; font: 300 2rem/1.1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi dd small { font-size: .5em; color: var(--faint); margin-left: .12rem; }
.kpi.warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.kpi.warn dd { color: var(--warn); }
table.static tbody tr { cursor: default; }
th.r, td.r { text-align: right; }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 150px; padding: .4rem 0; border-bottom: 1px solid var(--line-2); }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; min-width: 0; }
.bar i { width: 100%; max-width: 18px; min-height: 2px; border-radius: 99px 99px 2px 2px; background: var(--accent); }
.bar span { font-size: .7rem; color: var(--muted); }
.bar small { font-size: .68rem; color: var(--faint); }
table.heat { border-collapse: separate; border-spacing: 3px; font-size: .75rem; }
table.heat th { padding: .2rem .3rem; font-size: .68rem; color: var(--faint); border: 0; text-align: center; text-transform: none; letter-spacing: 0; }
table.heat td { padding: 0; height: 1.6rem; min-width: 1.8rem; text-align: center; font-size: .7rem; color: var(--text); border: 0; border-radius: 6px;
  background: color-mix(in srgb, var(--accent) calc(var(--a) * 80%), var(--raise)); }

/* ---------- toast ---------- */
.toasts { position: fixed; z-index: 1300; inset: auto 1rem 1rem auto; margin: 0; padding: 0; border: 0; background: none; overflow: visible; color: inherit; display: grid; gap: .5rem; width: min(420px, calc(100% - 2rem)); }
.toast { display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem .7rem 1rem; border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--line-2);
  border-color: color-mix(in srgb, var(--st-done) 60%, var(--line-2)); box-shadow: var(--shadow-pop); animation: toastin .22s cubic-bezier(.2, .8, .2, 1); }
.toast span { flex: 1; }
.toast.err { border-color: color-mix(in srgb, var(--crit) 70%, var(--line-2)); }
@keyframes toastin { from { transform: translateY(10px); opacity: 0; } }

/* ---------- carrier ---------- */
.carrier-grid { display: grid; gap: var(--gap); grid-template-columns: minmax(250px, 300px) minmax(0, 1fr) minmax(300px, 380px); align-items: start; }
.carrier-grid .kpi-col { grid-area: auto; }
.cr .chip { cursor: default; }
.cr-h { font: 500 .82rem var(--font); color: var(--muted); margin: .4rem .2rem .6rem; display: grid; gap: .1rem; }
.cr-h .hint { font-weight: 400; color: var(--faint); }
.cr-next .cr-next-l { margin: .7rem 0 0; line-height: 1.45; }
.cr-code { margin: .6rem 0 .8rem; padding: .5rem .75rem; border-radius: 12px; background: var(--raise); display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .88rem; }
.cr-code .mono { font-size: 1.15rem; letter-spacing: .12em; color: var(--text); }
.cr-meter { display: block; height: 4px; margin-top: .7rem; border-radius: 2px; background: var(--raise); overflow: hidden; }
.cr-meter i { display: block; height: 100%; border-radius: 2px; background: var(--st-done); }
.kpi-card.warn .cr-meter i { background: var(--warn); }
.cr-step { display: flex; align-items: center; gap: .6rem; font: 500 1.05rem var(--font); }
.cr-step i { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--text); color: var(--bg); font: 600 .85rem var(--font); font-style: normal; }
.cr-truck { display: grid; gap: .5rem; padding: 1rem 1rem .8rem; border-radius: var(--r-inner); background: var(--raise); border: 1px solid var(--line); }
.cr-truck svg { max-height: 240px; cursor: default; }
.cr-truck-t { margin: 0; font-size: .88rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .2rem .8rem; justify-content: space-between; }
.cr-truck-t b { color: var(--text); font-weight: 600; }
.slot-dock { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: .6rem 1rem; align-items: start; padding: .7rem 0; border-top: 1px solid var(--line); }
.slot-dock h3 { padding-top: .45rem; }
.slot-btn { border-radius: 999px; }
.cr-mine .bookings { max-height: calc(100vh - 15rem); overflow: auto; }
@media (max-width: 1250px) { .carrier-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); } .carrier-grid > .kpi-col { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } .cr-score { display: contents; } .cr-h { grid-column: 1 / -1; margin-bottom: 0; } #score { display: contents; } }
@media (max-width: 820px) { .carrier-grid { grid-template-columns: minmax(0, 1fr); } .slot-dock { grid-template-columns: 1fr; } .cr-mine .bookings { max-height: none; } }
.slots { display: grid; gap: 1rem; }
.slot-dock h3 { font-size: .9rem; margin: 0; }
.slot-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.slot-btn { font-variant-numeric: tabular-nums; min-width: 4.6rem; }
.slot-btn[aria-pressed="true"] { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); }
.book-form { display: grid; gap: .9rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.picked { font-weight: 600; color: var(--accent); }
.success { display: grid; gap: .8rem; padding: 1rem; border-radius: var(--r-inner); border: 1px solid color-mix(in srgb, var(--st-done) 40%, transparent); background: color-mix(in srgb, var(--st-done) 8%, transparent); }
.success h3 { color: var(--st-done); }
.bookings { list-style: none; margin: 0; padding: .6rem; display: grid; gap: .5rem; }
.bookings li { padding: .85rem 1rem; border-radius: 14px; background: var(--raise); border: 1px solid var(--line); display: grid; gap: .35rem; }
.bookings li.empty { background: none; border: 0; }
.bookings .row1 { display: flex; justify-content: space-between; gap: .6rem; align-items: center; flex-wrap: wrap; }
.bookings .when { font-weight: 600; font-variant-numeric: tabular-nums; }
.scorecard { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; padding: .9rem 1.15rem; }
.scorecard div { display: grid; }
.scorecard b { font: 300 2rem/1.1 var(--display); letter-spacing: -.02em; }
.stack-col { display: grid; gap: var(--gap); align-content: start; min-width: 0; }
.choice { display: grid; gap: .4rem; }
.switch-auth { margin: 0; font-size: .9rem; }
.freed { border-color: var(--accent); }

/* ---------- driver page (phone, often outdoors): big type, big targets ---------- */
.driver-page { font-size: 17px; }
.driver { max-width: 560px; margin: 0 auto; padding: 0 1rem calc(1.5rem + env(safe-area-inset-bottom)); display: grid; gap: .9rem; }
.driver .brand { position: sticky; top: 0; z-index: 5; justify-content: space-between; margin: 0 -1rem; padding: .7rem 1rem; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.driver .btn { min-height: 48px; }
.driver input, .driver select { min-height: 48px; }
.driver .panel { border-radius: 22px; }
.driver .panel-head h2, .driver .panel-body > h2 { font: 500 .82rem var(--font); color: var(--muted); }
.status-card { position: relative; overflow: hidden; padding: 1.2rem 1.25rem 0; border-radius: 26px; border: 1px solid color-mix(in srgb, var(--c) 40%, var(--line-2)); background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--c) 20%, var(--surface-solid)), var(--surface-solid) 65%); display: grid; gap: .85rem; }
.sc-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.status-card .badge { font-size: .9rem; }
.sc-dock { padding: .3rem .85rem; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 600; font-size: .9rem; }
.status-card h1 { font: 300 clamp(1.65rem, 7.2vw, 2.2rem)/1.18 var(--display); letter-spacing: -.025em; text-wrap: balance; }
.sc-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.sc-steps li { height: 5px; border-radius: 3px; background: var(--line-2); }
.sc-steps li.past { background: color-mix(in srgb, var(--c) 55%, var(--line-2)); }
.sc-steps li.now { background: var(--c); }
.sc-slot { display: grid; gap: .15rem; }
.sc-slot .kpi-num { font-size: clamp(2.1rem, 10vw, 2.7rem); }
.status-card .slot { margin: 0; color: var(--muted); font-size: 1rem; }
.sc-truck { display: block; width: 112%; max-width: none; height: auto; margin: -.2rem 0 -1px 14%; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .35)); }
.s-cancelled .sc-truck, .s-no_show .sc-truck, .s-departed .sc-truck { opacity: .35; filter: grayscale(1); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: 1rem; color: var(--text); cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; flex: none; width: 56px; height: 32px; min-height: 0; padding: 0; border-radius: 999px; background: var(--line-2); position: relative; cursor: pointer; transition: background-color .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-solid); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s; }
.switch input:checked { background: var(--accent-strong); border-color: var(--accent-strong); }
.switch input:checked::after { transform: translateX(24px); background: var(--accent-ink); }
.eta-form { display: flex; gap: .5rem; align-items: end; }
.eta-form label { flex: 1; }
.eta-form .btn { border-radius: 999px; padding-inline: 1.2rem; }
.driver .note { font-size: .9rem; }
.driver-tools { display: flex; align-items: center; gap: .5rem; }
.driver .lang { min-height: 38px; padding: .2rem .7rem; font-size: .9rem; border-radius: 999px; }
.pre { white-space: pre-line; }
.safety { display: grid; gap: .6rem; padding: 1rem; border-radius: var(--r-inner); border: 1px solid color-mix(in srgb, var(--warn) 50%, transparent); background: color-mix(in srgb, var(--warn) 9%, transparent); }
.safety h2 { font-size: 1.05rem; color: var(--warn); }
.safety p { margin: 0; }
.big-check { font-size: 1rem; align-items: flex-start; }
.big-check input { width: 1.5rem; height: 1.5rem; flex: none; }
.status-card.calling { animation: calling 1.2s ease-in-out 6; }
@keyframes calling { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--st-called) 45%, transparent); } }
.gate-code .panel-body { display: grid; gap: .3rem; justify-items: center; text-align: center; padding-block: 1.3rem; }
.gate-code .code { margin: .1rem 0; font: 600 clamp(2.6rem, 14vw, 3.6rem)/1.1 var(--mono); letter-spacing: .18em; padding-left: .18em; color: var(--text); }
.gate-code .tear { width: calc(100% + 2.4rem); margin: .9rem -1.2rem .5rem; border: 0; border-top: 2px dashed var(--line-2); }
.driver .dl { grid-template-columns: 8.5rem 1fr; gap: 0; }
.driver .dl dt, .driver .dl dd { padding: .6rem 0; border-top: 1px solid var(--line); margin: 0; }
.driver .dl dt:first-of-type, .driver .dl dt:first-of-type + dd { border-top: 0; padding-top: 0; }
.driver .dl dd { text-align: right; font-weight: 500; }
#maps { border-radius: 999px; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .board-grid { grid-template-columns: minmax(260px, 290px) minmax(0, 1fr); grid-template-areas: "kpi ap" "al al"; }
  .alerts-body { max-height: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
  .alerts-body > .restore, .alerts-body > .all-clear { grid-column: 1 / -1; }
}
@media (max-width: 1000px) {
  .board-grid { grid-template-columns: 1fr 1fr; grid-template-areas: "ap ap" "kpi al"; }
  .alerts-body { grid-template-columns: 1fr; max-height: 34rem; }
  .carrier-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .board-grid { grid-template-columns: 1fr; grid-template-areas: "ap" "al" "kpi"; }
  .ap-stage { height: auto; }
  .ap-view { position: relative; height: 340px; }
  .ap-view[data-mode="svg"] { padding: .5rem; }
  .ap-cards { position: static; display: grid; gap: .6rem; padding: .7rem; }
  .float-card { position: static; width: auto; box-shadow: none; }
  .company { display: none; }
  .tl { --label: 5.2rem; }
  .dl { grid-template-columns: 1fr; gap: .1rem; }
  .dl dd { margin-bottom: .5rem; }
  .acc-name { display: none; }
  .legend { display: none; }
  .drawer { border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .blk, .badge, .chip, .vcard, .al-card { border: 1px solid CanvasText; }
}

/* ---------- print: the day list on paper ---------- */
.print-only { display: none; }
@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #000; font-size: 11px; }
  .topbar, .no-print, .toasts, dialog, .tip, .kbd-hint { display: none !important; }
  .print-only { display: block; }
  .print-title { font: 700 16px var(--font); margin: 0 0 8px; }
  .page { padding: 0; max-width: none; }
  .flow { display: block; }
  .panel { background: none; border: 0; box-shadow: none; backdrop-filter: none; }
  .panel-head { padding: 4px 0; border-color: #999; }
  .hint, .muted, small, td small { color: #333 !important; }
  th, td { padding: 4px 6px; border-color: #bbb; color: #000; }
  .badge { background: none; border: 1px solid #555; color: #000; }
  .badge::before { display: none; }
  .flag { border: 1px solid #000; background: none; color: #000; }
  tbody tr.is-late { background: none; font-weight: 700; }
  .yard.cards { display: block; padding: 0; }
  .vcard { display: block; padding: 4px 0; border: 0; border-bottom: 1px solid #bbb; border-radius: 0; background: none; }
  .vc-meter, .yard .acts { display: none; }
}
.gate-code .qr { width: min(72vw, 300px); margin-top: .6rem; }
.gate-code .qr svg { display: block; width: 100%; height: auto; border-radius: var(--r-ctl); }

.blk[data-move] { cursor: grab; touch-action: none; user-select: none; }
.blk.dragging { cursor: grabbing; z-index: 5; box-shadow: var(--shadow-pop); opacity: .92; transition: none; }
.leaflet-container { background: var(--surface-solid) !important; }

/* Control-room stage: the map fills the screen, panels float on top of it. */
.page.board { max-width: none; padding-top: 0; }
.stage { position: relative; isolation: isolate; display: grid; gap: var(--gap); grid-template-columns: minmax(280px, 330px) minmax(0, 1fr) minmax(280px, 330px);
  min-height: calc(100vh - 3.6rem); margin-inline: calc(-1 * var(--pad)); padding: var(--pad); align-items: stretch; pointer-events: none; }
.stage > :not(.stage-map) > * { pointer-events: auto; }
.stage > .stage-right { pointer-events: auto; }
.stage-map { position: absolute; inset: 0; z-index: -1; pointer-events: auto; }
.stage-map::after { content: ""; position: absolute; inset: 0; z-index: 450; pointer-events: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 88%, transparent), transparent 30%, transparent 70%, color-mix(in srgb, var(--bg) 88%, transparent)),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 94%, transparent), color-mix(in srgb, var(--bg) 55%, transparent) 20%, transparent 40%, transparent 55%, var(--bg)); }
.stage-map .ap-view[data-mode="svg"] { padding: 9rem 22rem 22rem; }
.stage-col { display: grid; gap: var(--gap); align-content: start; min-width: 0; }
.stage-mid { display: grid; align-content: space-between; gap: var(--gap); min-width: 0; }
.stage-top { display: grid; gap: .7rem; justify-items: start; }
.stage-top .bh-title h1 { font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 300; letter-spacing: -.03em; text-shadow: 0 2px 24px var(--bg); }
.stage-top .bh-date { text-shadow: 0 1px 12px var(--bg); }
.stage-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; }
.stage-ctl .hint { padding: .25rem .7rem; border-radius: 999px; background: color-mix(in srgb, var(--surface-solid) 80%, transparent); border: 1px solid var(--line); }
.stage-ctl .hint:empty { display: none; }
.stage .gate { width: min(100%, 34rem); padding: .45rem .5rem .45rem 1rem; border-radius: 999px; }
.stage .gate:has(.gate-result:not(:empty)) { border-radius: var(--r-card); padding: .6rem .8rem; }
.stage-bottom { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr) 250px; align-items: end; }
.stage .ap-cards { position: static; display: grid; gap: var(--gap); }
.stage .float-card { position: static; width: auto; }
.stage .panel, .stage .card, .stage .float-card, .stage .chips > * { backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.stage .panel, .stage .card { background: color-mix(in srgb, var(--surface-solid) 78%, transparent); }
.stage-right { align-self: start; max-height: calc(100vh - 3.6rem - 2 * var(--pad)); }
.stage-right .alerts-body { max-height: none; overflow: auto; }
.stage-left .yard.cards { grid-template-columns: 1fr 1fr; gap: .6rem; max-height: 21rem; overflow: auto; padding: .7rem; }
.stage-left .vcard { padding: .65rem .7rem; }
.stage-left .panel-head .hint { display: none; }
.stage .tl-row { min-height: 2.9rem; }
@media (max-width: 1180px) {
  .stage { grid-template-columns: 1fr 1fr; min-height: 0; pointer-events: auto; }
  .stage-map { position: relative; grid-column: 1 / -1; height: 380px; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); z-index: 0; }
  .stage-map::after { display: none; }
  .stage-map .ap-view[data-mode="svg"] { padding: .5rem; }
  .stage-mid { grid-column: 1 / -1; grid-row: 1; }
  .stage-bottom { grid-template-columns: 1fr; }
  .stage .ap-cards { grid-template-columns: 1fr 1fr; }
  .stage-right { max-height: 34rem; }
}
@media (max-width: 720px) {
  .stage { grid-template-columns: 1fr; }
  .stage .ap-cards { grid-template-columns: 1fr; }
  .stage-left .yard.cards { grid-template-columns: 1fr; }
}
.stage .kpi-col, .stage .alerts { grid-area: auto; }
@media (min-width: 1181px) {
  .stage { height: calc(100vh - 3.7rem); min-height: 640px; }
  .stage-left { overflow: auto; scrollbar-width: thin; padding-right: 2px; }
  .stage-mid { min-height: 0; }
  .stage .tl-panel .legend, .stage .gate .kbd-hint { display: none; }
  .stage .tl-scroll { max-height: 17.5rem; overflow-y: auto; }
}
@media (min-width: 1181px) and (max-width: 1450px) {
  .stage-bottom { grid-template-columns: 1fr; }
  .stage .ap-cards { display: none; } /* arrivals are in "On the way", utilisation is on the timeline rows */
}
@media (min-width: 1181px) and (max-height: 820px) {
  .stage .tl-scroll { max-height: 10.5rem; }
  .stage-top .bh-title h1 { font-size: 2rem; }
}
.stage-top > * { max-width: 100%; min-width: 0; }
.stage-mid, .stage-top, .stage-col { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1180px) { .stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-inline: 0; padding: var(--pad) 0 0; } }
@media (max-width: 720px) { .stage { grid-template-columns: minmax(0, 1fr); } .stage .gate { border-radius: var(--r-card); } }
@media (max-width: 1180px) { .stage-bottom { grid-template-columns: minmax(0, 1fr); } .stage .ap-cards { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } .stage > * { min-width: 0; } }

/* ---------- guided tour ---------- */
.tour-shield { position: fixed; inset: 0; z-index: 9000; }
.tour-ring { position: fixed; z-index: 9001; pointer-events: none; border: 2px solid var(--text); box-shadow: 0 0 0 4px color-mix(in srgb, var(--text) 22%, transparent), 0 0 0 200vmax rgba(0, 0, 0, .62); transition: left .28s cubic-bezier(.2, .8, .2, 1), top .28s cubic-bezier(.2, .8, .2, 1), width .28s cubic-bezier(.2, .8, .2, 1), height .28s cubic-bezier(.2, .8, .2, 1); }
[data-theme="light"] .tour-ring { box-shadow: 0 0 0 4px color-mix(in srgb, var(--text) 18%, transparent), 0 0 0 200vmax rgba(20, 21, 22, .5); }
.tour-card { position: fixed; z-index: 9002; width: min(340px, calc(100vw - 24px)); padding: 1rem 1.1rem .9rem; border-radius: 18px; background: var(--surface-solid); border: 1px solid var(--line-2); box-shadow: 0 18px 50px rgba(0, 0, 0, .45); display: grid; gap: .45rem; transition: left .28s cubic-bezier(.2, .8, .2, 1), top .28s cubic-bezier(.2, .8, .2, 1); }
.tour-card h2 { font: 600 1.05rem var(--font); }
.tour-card p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.45; }
.tour-card .tour-count { font: 600 .72rem var(--mono); letter-spacing: .08em; color: var(--muted); }
.tour-acts { display: flex; align-items: center; gap: .4rem; margin-top: .4rem; }
.tour-acts > span { flex: 1; }
.tour-arrow { position: absolute; width: 14px; height: 14px; margin-left: -7px; background: var(--surface-solid); border: 1px solid var(--line-2); transform: rotate(45deg); }
.tour-card[data-side="below"] .tour-arrow { top: -8px; border-right: 0; border-bottom: 0; }
.tour-card[data-side="above"] .tour-arrow { bottom: -8px; border-left: 0; border-top: 0; }
.tour-card[data-side="inside"] .tour-arrow { display: none; }
@media (prefers-reduced-motion: reduce) { .tour-ring, .tour-card { transition: none; } }
.driver .theme-btn { min-height: 38px; height: 38px; width: 38px; }
@media (max-width: 440px) { .driver .live span { display: none; } .driver .live { padding: .45rem; } }

/* ---------- pickers: a select shown as visible choices (picker.js) ---------- */
.pick { display: flex; flex-wrap: wrap; gap: .4rem; }
.pick button { font: inherit; color: var(--text); background: var(--raise); border: 1px solid var(--line); border-radius: 999px; padding: .35rem .85rem; min-height: 40px; cursor: pointer; text-align: left; display: inline-flex; align-items: center; gap: .6rem; transition: background .15s, border-color .15s, transform .1s; }
.pick button:hover:not(:disabled) { border-color: var(--muted); }
.pick button:active:not(:disabled) { transform: scale(.97); }
.pick button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick button[aria-checked="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.pick button:disabled { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.pick b { font-weight: 550; font-size: .88rem; }
.pick small { display: block; margin-top: .15rem; color: var(--muted); font-size: .78rem; font-weight: 400; line-height: 1.35; }
.pick-seg { display: inline-flex; flex-wrap: wrap; max-width: 100%; justify-self: start; gap: 2px; padding: 3px; border-radius: 20px; background: var(--raise); border: 1px solid var(--line); }
.pick-seg button { border: 0; background: none; min-height: 34px; padding: .25rem .8rem; color: var(--muted); white-space: nowrap; }
.pick-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.pick-cards button { border-radius: 14px; padding: .7rem .8rem; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: .45rem; }
.pick-cards button[aria-checked="true"] { background: var(--raise); color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.pick-cards button[aria-checked="true"] b::after { content: " ✓"; }
.pick-cards img { width: 100%; height: 54px; object-fit: contain; }
.field-row label:has(> .pick-cards), .field-row label:has(> .pick-chips) { grid-column: 1 / -1; }
@media (prefers-reduced-motion: reduce) { .pick button { transition: none; } }

/* ---------- intro: what LOGISCHAB is, shown once before the first tour ---------- */
.intro { width: min(560px, calc(100% - 1.5rem)); border-radius: 26px; overflow: hidden; }
.intro[open] { animation: pop .22s ease-out; }
.intro-art { height: 240px; display: grid; place-items: center; background: var(--raise); border-bottom: 1px solid var(--line); overflow: hidden; }
.intro-body { padding: 1.3rem 1.5rem 1.2rem; display: grid; gap: .55rem; }
.intro-k { margin: 0; font: 600 .72rem var(--mono); letter-spacing: .16em; color: var(--muted); }
.intro h2 { font: 300 1.75rem/1.12 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.intro #introText { margin: 0; color: var(--muted); line-height: 1.5; min-height: 4.5em; }
.intro-dots { display: flex; gap: 6px; margin-top: .2rem; }
.intro-dots i { width: 7px; height: 7px; border-radius: 99px; background: var(--line-2); transition: width .25s, background .25s; }
.intro-dots i.on { width: 22px; background: var(--text); }
.ia { width: 100%; height: 100%; position: relative; }
@keyframes ia-in { from { opacity: 0; transform: translateY(8px) scale(.9); } to { opacity: 1; transform: none; } }
.s1-wh { position: absolute; right: 0; bottom: 44px; width: 150px; height: 150px; z-index: 2; background: var(--surface-solid); border: 1px solid var(--line-2); border-right: 0; border-radius: 10px 0 0 0; display: grid; place-items: start center; padding-top: 14px; font: 600 .66rem var(--mono); letter-spacing: .14em; color: var(--muted); }
.s1-wh i { position: absolute; left: 0; bottom: 25px; width: 46px; height: 52px; border: 1px solid var(--line-2); border-left: 0; background: var(--raise); }
.s1::after { content: ""; position: absolute; left: 0; right: 0; bottom: 43px; border-bottom: 2px solid var(--line-2); }
.s1-rig { position: absolute; right: 146px; bottom: 44px; width: 240px; height: 70px; animation: s1-in 1s cubic-bezier(.2, .8, .2, 1) both; }
.s1-rig img { width: 240px; height: 70px; display: block; }
.s1-rig b { position: absolute; bottom: 25px; right: var(--r); width: 17px; height: 17px; border-radius: 3px; background: #C99A5E; border: 1px solid #8A6230; animation: s1-load .9s calc(var(--d) + .9s) cubic-bezier(.3, .7, .2, 1) both; }
.s1-ok { position: absolute; left: 1.2rem; top: 1.1rem; font: 600 .8rem var(--font); padding: .35rem .8rem; border-radius: 99px; background: var(--text); color: var(--bg); animation: ia-in .4s 3.6s both; }
@keyframes s1-in { from { transform: translateX(-140%); } }
@keyframes s1-load { from { right: -70px; opacity: 0; } 25% { opacity: 1; } }
.s2 { display: grid; grid-template-rows: 1fr 1fr; padding: 0 1.2rem; }
.s2-lane { position: relative; display: flex; align-items: flex-end; justify-content: space-between; padding-bottom: 18px; border-bottom: 2px dashed var(--line-2); margin-bottom: 14px; }
.s2-lane span { position: absolute; left: 0; top: 12px; font: 600 .66rem var(--mono); letter-spacing: .14em; color: var(--muted); }
.s2-t { height: 34px; width: auto; transform: translateX(170%) scaleX(-1); animation: s2-go 2.4s cubic-bezier(.3, 0, .2, 1) both; }
.s2-goal { height: 58px; width: auto; animation: ia-in .5s .2s both; }
@keyframes s2-go { from { transform: translateX(-160%) scaleX(-1); } }
.s3 text, .s4 text { font: 600 10px var(--mono); letter-spacing: .12em; fill: var(--muted); }
.s3 .sea { fill: rgba(70, 130, 210, .22); }
.s3 .rwy { fill: var(--surface-solid); stroke: var(--line-2); }
.s3 .rwy-l, .s3 .road-l { fill: none; stroke: var(--muted); stroke-width: 1; stroke-dasharray: 8 8; }
.s3 .road { fill: none; stroke: var(--surface-solid); stroke-width: 16; stroke-linecap: round; }
.s3 .trk, .ia .plane, .ia .ship { fill: var(--text); }
.s4 .globe { fill: rgba(70, 130, 210, .2); stroke: var(--line-2); }
.s4-map { fill: var(--muted); animation: s4-spin 3s cubic-bezier(.2, .6, .2, 1) both; }
@keyframes s4-spin { from { transform: translateX(400px); } }
.s4 .route { fill: none; stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 1; animation: s4-draw 2s 2.4s ease-in-out both; }
@keyframes s4-draw { from { stroke-dashoffset: 1; } }
.s4 .from { fill: var(--text); }
.s4 .pin { animation: s4-pin .45s var(--d) both; }
@keyframes s4-pin { from { opacity: 0; } }
.s4 .pin circle { fill: #2FBF71; stroke: var(--bg); stroke-width: 2; }
.s4 .pin text { fill: var(--text); letter-spacing: 0; font: 600 11px var(--font); paint-order: stroke; stroke: var(--raise); stroke-width: 4px; }
/* the same scenes as a small player on the login screen */
.lh-player { width: min(100%, 560px); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: color-mix(in srgb, var(--surface-solid) 80%, transparent); }
.lh-player .intro-art { border-bottom: 1px solid var(--line); }
.mp-cap { margin: 0; padding: .75rem 1rem .2rem; font-weight: 550; }
.mp-dots { display: flex; gap: 2px; padding: 0 .55rem .5rem; }
.mp-dots button { width: 34px; height: 24px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.mp-dots button::before { content: ""; width: 100%; height: 4px; border-radius: 9px; background: var(--line-2); transition: background .2s; }
.mp-dots button[aria-current="true"]::before { background: var(--text); }
.mp-dots button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px; }
@media (max-width: 480px) { .intro-art { height: 190px; } .s1-wh { width: 96px; } .s1-rig { right: 92px; transform-origin: right bottom; scale: .8; } .s2-t { height: 24px; } .s2-goal { height: 40px; } }
@media (prefers-reduced-motion: reduce) { .intro[open], .ia *, .intro-dots i { animation: none !important; transition: none; } }
@media (max-width: 520px) { .pick-cards button:has(img) { flex-direction: row; align-items: center; } .pick-cards img { width: 92px; flex: none; } }

/* ---------- yard wall screen (screen.html) ---------- */
.wall { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; gap: 1.2rem; padding: 1.4rem 1.8rem; }
.wall-head { display: flex; align-items: center; gap: 1.2rem; font-size: 1.2rem; color: var(--muted); }
.wall-head .spacer { flex: 1; }
.wall-grid { display: grid; gap: 1.2rem; grid-template-columns: 1.4fr 1fr 1fr 1fr; align-items: start; }
.wall-col { border: 1px solid var(--line); border-radius: 26px; background: var(--surface-solid); padding: 1.3rem 1.4rem; display: grid; gap: 1rem; }
.wall-col h2 { font: 600 clamp(1rem, 1.5vw, 1.5rem) var(--font); display: flex; justify-content: space-between; color: var(--muted); }
.wall-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.wall-col li { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .7rem .9rem; border-radius: 16px; background: var(--raise); font-size: clamp(1rem, 1.5vw, 1.5rem); }
.wall-col li b { font-size: clamp(1.4rem, 2.4vw, 2.6rem); letter-spacing: .02em; }
.wall-col.call { border-color: var(--text); }
.wall-col.call h2 { color: var(--text); }
.wall-col.call li { background: var(--text); color: var(--bg); font-weight: 600; }
.wall-col.call li b { font-size: clamp(1.8rem, 3.4vw, 3.8rem); }
@media (max-width: 1000px) { .wall-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .wall-grid { grid-template-columns: 1fr; } .wall { padding: 1rem; } }

/* ---------- legal pages ---------- */
.legal { max-width: 46rem; margin: 0 auto; padding: 2.5rem 1.2rem 4rem; display: grid; gap: .9rem; line-height: 1.6; }
.legal h1 { font: 300 2.4rem var(--display); letter-spacing: -.02em; }
.legal h2 { font-size: 1.1rem; margin-top: 1rem; }
.legal p, .legal ul { margin: 0; color: var(--muted); }
.legal .draft { padding: .8rem 1rem; border-radius: 14px; border: 1px solid var(--warn); color: var(--text); }
.legal-links { text-align: center; }
