/* Forklift pre-shift check.
   Visual source: forklift safety yellow on black (ANSI Z535 caution yellow, the truck's own paint).
   Phone first: one column, 20px body, 64px tap targets. Red only for a real problem. */

:root {
  --yellow: #F5C400;
  --yellow-tint: #FFF6CC;
  --black: #1A1A1A;
  --ink: #1C1F22;
  --muted: #545B61;
  --paper: #F3F3F0;
  --white: #FFFFFF;
  --line: #B7BCBF;
  --green: #12703A;
  --green-tint: #E2F2E7;
  --red: #B3261E;
  --red-tint: #FBE9E7;
  --focus: #0B57D0;

  --font: "Atkinson Hyperlegible", "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", Arial, sans-serif;
  --step-0: 1.0625rem; /* 17px hints */
  --step-1: 1.25rem;   /* 20px body */
  --step-2: 1.5rem;    /* 24px */
  --step-3: 1.875rem;  /* 30px */
  --tap: 4rem;         /* 64px */
  --radius: 8px;
}

* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px)); }
body { margin: 0; font-family: var(--font); font-size: var(--step-1); line-height: 1.45; color: var(--ink); background: var(--paper); overflow-wrap: break-word; }
h1, h2 { text-wrap: balance; }
img { max-inline-size: 100%; block-size: auto; display: block; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.visually-hidden { position: absolute; clip-path: inset(50%); overflow: hidden; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; white-space: nowrap; }

/* ---------- header band: black with a yellow/black hazard edge */

.band { background: var(--black); color: var(--white); padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 0.5rem solid; border-image: repeating-linear-gradient(-45deg, var(--yellow) 0 14px, var(--black) 14px 28px) 8; }
.band-in { max-width: 36rem; margin: 0 auto; padding: 0.875rem 1rem 1rem; display: flex; gap: 0.75rem; align-items: flex-start; justify-content: space-between; }
.band-kicker { margin: 0; font-size: var(--step-0); color: var(--yellow); font-weight: 700; letter-spacing: 0.02em; }
.band h1 { margin: 0.125rem 0 0; font-size: var(--step-3); line-height: 1.15; }

.langs { display: flex; flex-shrink: 0; border: 2px solid var(--yellow); border-radius: var(--radius); overflow: hidden; }
.lang { font: inherit; font-size: var(--step-0); font-weight: 700; min-block-size: 2.75rem; min-inline-size: 2.75rem; padding: 0 0.625rem;
  border: 0; background: transparent; color: var(--yellow); cursor: pointer; }
.lang + .lang { border-inline-start: 2px solid var(--yellow); }
.lang[aria-pressed="true"] { background: var(--yellow); color: var(--black); }

/* ---------- layout */

.wrap { max-width: 36rem; margin: 0 auto; padding: 1rem 1rem calc(7rem + env(safe-area-inset-bottom, 0px)); }
.model { margin: 0 0 0.25rem; color: var(--muted); font-size: var(--step-0); }
.last { margin: 0 0 1rem; padding: 0.75rem 1rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); font-size: var(--step-0); }
.last-label { font-weight: 700; }
.res-ok { color: var(--green); font-weight: 700; }
.res-fail { color: var(--red); }
.hint { margin: 0.25rem 0 0.5rem; color: var(--muted); font-size: var(--step-0); text-wrap: pretty; }
.warn { margin: 0.5rem 0 0; color: var(--red); font-size: var(--step-0); font-weight: 700; }
.error { padding: 1rem; background: var(--red-tint); border-inline-start: 6px solid var(--red); border-radius: var(--radius); }

fieldset { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
legend { padding: 0; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 0 0 1rem; }
.card > legend { float: left; width: 100%; font-weight: 700; font-size: var(--step-2); margin-bottom: 0.5rem; }
.card > legend + * { clear: both; }
.big-label { display: block; font-weight: 700; font-size: var(--step-2); }

/* ---------- operator picker */

.ops { display: grid; gap: 0.5rem; }
.op { display: flex; align-items: center; gap: 0.75rem; min-block-size: var(--tap); padding: 0 1rem; border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer; font-weight: 700; }
.op input { inline-size: 1.5rem; block-size: 1.5rem; accent-color: var(--black); margin: 0; flex-shrink: 0; }
.op:has(input:checked) { border-color: var(--black); background: var(--yellow-tint); }
.other { display: none; margin-top: 0.75rem; }
.card:has(input[value="__other"]:checked) .other { display: block; }

input:not([type]), input[inputmode], textarea {
  font: inherit; font-size: max(1rem, 1em); inline-size: 100%; min-block-size: 3.5rem; padding: 0.625rem 0.875rem;
  border: 2px solid #767676; border-radius: var(--radius); background: var(--white); color: var(--ink); }
#hours { font-size: var(--step-3); font-weight: 700; letter-spacing: 0.04em; }
textarea { min-block-size: 4.5rem; resize: vertical; }

/* ---------- checklist */

.group { margin: 1.5rem 0 0; }
.group > h2 { font-size: var(--step-2); margin: 0 0 0.5rem; padding-bottom: 0.25rem; border-bottom: 3px solid var(--black); }
.group-l2 { padding: 1rem; background: var(--yellow-tint); border: 2px solid var(--black); border-radius: var(--radius); }
.group-l2 > h2 { border-bottom: 0; padding: 0; }

.item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.875rem 1rem 1rem; margin: 0 0 0.625rem; }
.item > legend { float: left; width: 100%; font-weight: 700; text-wrap: pretty; }
.item > legend + * { clear: both; }
/* pictogram: inside the legend, left of the title; the hint lines up under the title */
.item.has-icon > legend { display: flex; gap: 0.875rem; align-items: center; }
.item .icon { inline-size: 6rem; block-size: 6rem; flex-shrink: 0; border-radius: 6px; }
.item.has-icon > .hint { padding-inline-start: 6.875rem; }
.item:has(input[value="ok"]:checked) { border-color: var(--green); }
.item:has(input[value="fail"]:checked) { border: 2px solid var(--red); }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.625rem; }
.seg label { position: relative; display: flex; align-items: center; justify-content: center; min-block-size: var(--tap);
  border: 2px solid var(--line); border-radius: var(--radius); font-weight: 700; cursor: pointer; text-align: center; padding: 0 0.5rem; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.seg-ok:has(input:checked) { background: var(--green); border-color: var(--green); color: var(--white); }
.seg-ok:has(input:checked) span::before { content: "✓ "; }
.seg-fail:has(input:checked) { background: var(--red-tint); border-color: var(--red); color: var(--red); }
.seg-fail:has(input:checked) span::before { content: "✕ "; }

.failbox { display: none; margin-top: 0.75rem; }
.item:has(input[value="fail"]:checked) .failbox { display: block; }
.need { margin: 0.5rem 0; color: var(--red); font-weight: 700; font-size: var(--step-0); }
.preview { margin: 0.5rem 0; border-radius: var(--radius); max-block-size: 14rem; object-fit: cover; }
.note-label { display: block; margin: 0.5rem 0 0.25rem; font-size: var(--step-0); font-weight: 700; }

/* ---------- buttons */

.btn { font: inherit; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 0.5rem; text-decoration: none;
  min-block-size: var(--tap); inline-size: 100%; padding: 0 1rem; border-radius: var(--radius); cursor: pointer; border: 2px solid var(--black); }
.btn-primary { background: var(--black); color: var(--yellow); font-size: var(--step-2); }
.btn-primary:disabled { opacity: 0.6; cursor: progress; }
.btn-secondary { background: var(--white); color: var(--black); }
.btn-photo { background: var(--white); color: var(--ink); position: relative; }
.btn-photo::before { content: ""; inline-size: 1.4rem; block-size: 1.1rem; border: 2px solid currentColor; border-radius: 4px;
  background: radial-gradient(circle, currentColor 0 3px, transparent 4px); }

.missing:not(:empty) { margin: 1.25rem 0 0; padding: 0.75rem 1rem; background: var(--red-tint); border-inline-start: 6px solid var(--red); border-radius: var(--radius); font-size: var(--step-0); }
.submit-bar { position: sticky; bottom: 0; margin: 1rem -1rem 0; padding: 0.75rem 1rem max(0.75rem, env(safe-area-inset-bottom, 0px));
  background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -6px 12px rgb(0 0 0 / 0.06); }   /* solid: the attest line sits at the top of the bar (2026-11-18) */

/* ---------- truck picker */

.picker { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.btn-truck { flex-direction: column; align-items: flex-start; padding: 0.75rem 1rem; background: var(--white); color: var(--ink); min-block-size: 5rem; }
.truck-name { font-size: var(--step-2); }
.truck-model { font-weight: 400; color: var(--muted); font-size: var(--step-0); }

/* ---------- done */

.done { padding: 1.5rem 1rem; background: var(--green-tint); border-inline-start: 6px solid var(--green); border-radius: var(--radius); }
.done h2 { margin: 0 0 0.5rem; font-size: var(--step-3); }
.done p { margin: 0 0 1.25rem; }

/* ---------- stop dialog (only after a problem is reported) */

dialog { border: 4px solid var(--red); border-radius: var(--radius); padding: 1.5rem; max-inline-size: min(32rem, calc(100vw - 2rem)); color: var(--ink); }
dialog h2 { margin: 0 0 0.75rem; font-size: var(--step-3); color: var(--red); }
dialog p { margin: 0 0 1.25rem; font-size: var(--step-2); line-height: 1.4; }
dialog:modal { overscroll-behavior: contain; }
dialog::backdrop { background: rgb(0 0 0 / 0.6); overflow: hidden; overscroll-behavior: contain; }

/* ---------- enrolled owner / not enrolled */
.me-card { display: flex; flex-direction: column; gap: 0.125rem; }
.me-label { margin: 0; color: var(--muted); font-size: var(--step-0); }
.me-name { margin: 0; font-size: var(--step-3); font-weight: 700; line-height: 1.2; }
.nf-title { margin: 0 0 0.5rem; font-size: var(--step-2); }
.card > p:last-child { margin-bottom: 0; }

/* ---------- home */
.hello { margin: 0 0 0.75rem; font-size: var(--step-3); font-weight: 700; }
.btn-panel { margin-bottom: 0.25rem; }
.panel-hint { margin: 0 0 0.5rem; }
.home-h { font-size: var(--step-2); margin: 1.25rem 0 0.5rem; }
.my-recent { list-style: none; margin: 0; padding: 0; font-size: var(--step-0); }
.my-recent li { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.code-input { font-size: var(--step-3) !important; letter-spacing: 0.25em; text-transform: uppercase; text-align: center; margin: 0 0 1rem; }

/* ---------- weekly open-hood check (own form, ?k=hood) */
.hood-line { margin: 0 0 1rem; padding: 0.5rem 1rem; color: var(--muted); font-size: var(--step-0); }
.hood-line a { color: var(--ink); font-weight: 700; }
.hood-card { background: var(--yellow-tint); border: 2px solid var(--black); }
.hood-card p { margin: 0 0 0.75rem; font-weight: 700; }
.hood-card .btn { margin: 0; }
.hood-late { border-color: var(--red); border-inline-start-width: 8px; }
.hood-late p { color: var(--red); }
.hood-intro { margin: 0 0 1rem; padding: 0.75rem 1rem; background: var(--yellow-tint); border-radius: var(--radius); font-size: var(--step-1); color: var(--ink); }
.done .hood-after { margin: 1.25rem 0 0.75rem; font-weight: 700; }
.done .btn + .btn { margin-top: 0.75rem; }

/* ---------- known problem (supervisor: doesn't stop use) */
.known { margin: 0.5rem 0 0.75rem; padding: 0.6rem 0.8rem; background: var(--yellow-tint); border-inline-start: 4px solid var(--black); border-radius: 4px; font-size: var(--step-0); }
.known p { margin: 0; }
.known p + p { margin-top: 0.25rem; color: var(--muted); }
.seg3 { grid-template-columns: 1fr 1fr 1fr; }

.seg-known:has(input:checked) { background: var(--yellow); border-color: var(--black); color: var(--black); }
.seg-known:has(input:checked) span::before { content: "= "; }

/* ---------- open problems: pending (red) / being watched (yellow) — 2026-11-18 grading */
.known-red { background: var(--red-tint); border-inline-start-color: var(--red); }
.known-red strong { color: var(--red); }
.pend-card { border: 2px solid var(--red); border-inline-start-width: 8px; }
.pend-card .pend-title { margin: 0 0 0.5rem; font-weight: 700; color: var(--red); font-size: var(--step-1); }
.pend-card ul { margin: 0 0 0.5rem; padding-inline-start: 1.25rem; }
.pend-card p:last-child { margin: 0; font-weight: 700; }
dialog.dlg-gray { border-color: var(--black); }
dialog.dlg-gray h2 { color: var(--ink); }
dialog.dlg-yellow { border-color: var(--yellow); border-inline-start: 12px solid var(--yellow); }
dialog.dlg-yellow h2 { color: var(--ink); }
.attest { margin: 0 0 0.5rem; font-size: 0.875rem; color: var(--muted); line-height: 1.35; }
.seg3 label { font-size: var(--step-0); padding-inline: 0.25rem; text-align: center; line-height: 1.2; }

/* ---------- step 1 / step 2 (2026-11-19): the weekly engine check looks different on purpose */
.step-hint { margin: -0.5rem 0 1rem; font-size: var(--step-0); color: var(--muted); }
.mode-hood .band { background: #1F3550; }
.mode-hood .band-kicker { color: #BFD8F5; }
.mode-hood .band { border-image: repeating-linear-gradient(-45deg, #BFD8F5 0 10px, #1F3550 10px 20px) 12; }
.mode-hood .wrap { --yellow-tint: #E6EFFA; }
.done-next { background: var(--white); border-inline-start-color: #1F3550; }
.done-next .next-t { margin: 1rem 0 0.25rem; font-size: var(--step-2); font-weight: 700; }
.btn-next { background: #1F3550; color: var(--white); }
.done-all { text-align: center; }
.big-check { margin: 0 !important; font-size: 5rem; line-height: 1; color: var(--green); font-weight: 700; }
p.done-other { margin: 1.25rem 0 0; text-align: center; font-size: var(--step-0); }
p.done-other a { color: var(--ink); }
.need-daily h2 { margin: 0 0 0.5rem; font-size: var(--step-2); }

.known p.known-prog { color: var(--black); }
.pend-prog { font-size: 0.9375rem; color: var(--black); }
/* driver's own reports (home + done page) and "fixed since" thanks */
.mine ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.mine li { padding: 0.6rem 0.8rem; background: var(--white); border: 1px solid var(--line); border-inline-start: 4px solid var(--black); border-radius: 4px; }
.mine li p { margin: 0; }
.mine .mine-line { margin-top: 0.2rem; }
.mine-red { border-inline-start-color: var(--red) !important; }
.mine-yellow { border-inline-start-color: var(--yellow) !important; }
.mine-green { border-inline-start-color: var(--green) !important; }
.mine-st { font-size: 0.875rem; color: var(--muted); margin-inline-start: 0.25rem; }
.mine-ok { color: var(--green); font-weight: 700; margin-inline-start: 0.25rem; }
.fixed-card { border-inline-start: 6px solid var(--green); }
.fixed-card ul { margin: 0.25rem 0 0; padding-inline-start: 1.1rem; }
.fixed-title { margin: 0; font-weight: 700; color: var(--green); }
#mine { margin-top: 1.25rem; }

/* A51 cranes / 分级 v2 (2026-11-24) */
.choices { margin: 0 0 0.75rem; padding: 0; border: 0; }
.choices legend { font-weight: 700; margin-bottom: 0.375rem; font-size: var(--step-0); }
.choice { display: flex; align-items: center; gap: 0.625rem; min-block-size: var(--tap); padding: 0.5rem 0.75rem; margin-top: 0.375rem;
  border: 2px solid var(--line, #bbb); border-radius: var(--radius); cursor: pointer; }
.choice input { inline-size: 1.375rem; block-size: 1.375rem; flex-shrink: 0; accent-color: var(--red); }
.choice:has(input:checked) { border-color: var(--red); background: var(--red-tint); font-weight: 700; }
.everybox { margin-top: 0.75rem; padding: 0.75rem; background: var(--yellow-tint); border-radius: var(--radius); }
.every-t { margin: 0; font-weight: 700; }
.restrict-card { background: var(--yellow-tint); border: 2px solid var(--black); border-inline-start-width: 8px; }
.restrict-title { margin: 0 0 0.375rem; font-weight: 800; font-size: var(--step-1); }
.restrict-card ul { margin: 0; padding-inline-start: 1.25rem; }
.repair-card { background: var(--red-tint); border-inline-start: 8px solid var(--red); }
.repair-card h2 { margin: 0 0 0.5rem; color: var(--red); }
.known-pic { margin: 0.5rem 0 0; }
.known-pic img { display: block; max-inline-size: 100%; max-block-size: 14rem; border-radius: var(--radius); }
.known-pic figcaption { font-size: var(--step-0); color: var(--muted, #555); }

/* ---------- "report a breakdown" (?k=stop) and the crane monthly check (2026-11-25) */
/* the way in: plain, full width, above everything on step 1; not red (nothing has happened yet) */
.btn-stop { background: var(--white); color: var(--black); border-width: 3px; margin: 0.25rem 0 1rem; min-block-size: 3.75rem; font-size: var(--step-1); }
.btn-stop::before { content: "⚠"; font-size: 1.25em; line-height: 1; }
.stop-q > legend { font-size: var(--step-1); }
.stop-choices { margin-top: 0.5rem; }
.stop-known { border-inline-start: 6px solid var(--line); }
.stop-known p { margin: 0 0 0.5rem; }
.stop-known ul { margin: 0; padding-inline-start: 1.25rem; }
/* "none here" on rigging items (monthly check) */
.seg-na:has(input:checked) { background: var(--line); border-color: var(--ink); }
.seg-na:has(input:checked) span::before { content: "– "; }
.item:has(input[value="na"]:checked) { opacity: 0.75; }
.seg3:has(> label:nth-child(4)) { grid-template-columns: 1fr 1fr; }

/* ---------- home tabs + unit cards, the unit's page with three buttons (2026-11-25) */
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0.5rem; margin: 1.25rem 0 0.75rem; }
.tab { font: inherit; font-weight: 700; font-size: var(--step-1); min-block-size: var(--tap); border: 2px solid var(--black);
  border-radius: var(--radius); background: var(--white); color: var(--black); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--black); color: var(--yellow); }
.tab:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.card-lines { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; margin-top: 0.375rem; font-size: var(--step-0); }
.cl { font-weight: 700; }
.cl-ok { color: var(--green); }
.cl-todo { color: var(--ink); }
.cl-todo::before { content: "○ "; }
.cl-pend { color: var(--red); }
.cl-restrict { background: var(--yellow-tint); padding: 0 0.375rem; border-radius: 4px; }
.cl-repair { color: var(--muted); }
.card-todo { border-inline-start-width: 8px; }
.pilot-tag { font-size: var(--step-0); font-weight: 400; border: 1px solid var(--muted); border-radius: 4px; padding: 0 0.375rem; color: var(--muted); vertical-align: middle; }

.hub { display: grid; gap: 0.75rem; margin: 0.5rem 0 1rem; }
.hub-btn { display: flex; flex-direction: column; justify-content: center; gap: 0.125rem; text-decoration: none; min-block-size: 4.5rem;
  padding: 0.75rem 1rem; border: 2px solid var(--black); border-radius: var(--radius); background: var(--white); color: var(--ink); }
.hub-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.hub-t { font-weight: 700; font-size: var(--step-2); }
.hub-s { font-size: var(--step-0); }
.hub-daily.is-todo { background: var(--black); color: var(--yellow); min-block-size: 6rem; }
.hub-daily.is-todo .hub-t { font-size: var(--step-3); }
.hub-daily.is-done { border-color: var(--green); min-block-size: 3.5rem; }
.hub-daily.is-done .hub-t { font-size: var(--step-1); }
.hub-daily.is-done .hub-s { color: var(--green); font-weight: 700; }
.hub-stop { border-width: 3px; }
.hub-stop .hub-t::before { content: "⚠ "; }
.hub-l2.is-due { background: var(--yellow-tint); }
.hub-l2.is-late { border-color: var(--red); }
.hub-l2.is-late .hub-s { color: var(--red); font-weight: 700; }
.back-link { display: inline-block; margin: 0 0 0.75rem; font-weight: 700; color: var(--ink); min-block-size: var(--tap); line-height: var(--tap); }
.btn-back { margin-top: 1rem; }

/* back buttons (2026-11-25: a real button, not an underlined line) */
.back-btn { display: inline-flex; align-items: center; gap: 0.5rem; min-block-size: var(--tap); padding: 0 1rem; margin: 0 0 0.75rem;
  border: 2px solid var(--black); border-radius: 999px; background: var(--white); color: var(--black); font-weight: 700; text-decoration: none; }
.back-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.done ~ .back-btn, .repair-card ~ .back-btn { margin-top: 1rem; }

/* shop sketch: which crane is which (the QR can't go on the crane). Game-minimap look: dark floor, tinted bays,
   this crane bright yellow with a halo, a pin and a slow ping; the rest dim. */
.plan { display: block; inline-size: 100%; block-size: auto; }
.plan .pl-bg { fill: #10161D; }
.plan .pl-bay { stroke: #3A4A5A; stroke-width: 1; }
.plan .pl-bay-w { fill: #1E2A38; }
.plan .pl-bay-n { fill: #17283A; }
.plan .pl-bay-s { fill: #1A2E2A; }
.plan .pl-split { stroke: #4C6070; stroke-width: 0.8; stroke-dasharray: 3 2; }
.plan .pl-off { stroke: #5D6E7E; stroke-width: 3; stroke-linecap: round; }
.plan .pl-end, .plan .pl-tr { fill: #5D6E7E; }
.plan .pl-on { stroke: #FFC400; stroke-width: 6; stroke-linecap: round; filter: drop-shadow(0 0 2.5px #FFC400); }
.plan .pl-end-on { fill: #FFC400; }
.plan .pl-tr-on { fill: #FF8A00; stroke: #10161D; stroke-width: 0.8; }
.plan .pl-halo { fill: rgb(255 196 0 / 0.18); stroke: rgb(255 196 0 / 0.55); stroke-width: 1; }
.plan .pl-ping { fill: none; stroke: #FFC400; stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: pl-ping 1.8s ease-out infinite; }
.plan .pl-pin { fill: #FF8A00; stroke: #10161D; stroke-width: 0.8; }
.plan .pl-pin-dot { fill: #10161D; }
.plan .pl-lt { font: 700 8px var(--font); fill: #9FB0C0; }
.plan .pl-lt-on { font: 700 10px var(--font); fill: #FFC400; paint-order: stroke; stroke: #10161D; stroke-width: 2.5px; }
.plan .pl-n { font: 700 7px var(--font); fill: #9FB0C0; }
@keyframes pl-ping { from { transform: scale(0.4); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .plan .pl-ping { animation: none; opacity: 0; } }
.btn-truck.has-plan { flex-direction: row; align-items: center; justify-content: space-between; gap: 0.75rem; }
.card-text { display: flex; flex-direction: column; align-items: flex-start; min-inline-size: 0; }
.card-plan { flex: 0 0 9rem; border-radius: 6px; overflow: hidden; }
.card-plan .pl-ping { display: none; }
.plan-big { margin: 0 0 1rem; padding: 0.5rem; background: #10161D; border-radius: var(--radius); }
.plan-big figcaption { font-weight: 700; font-size: var(--step-0); margin: 0 0 0.375rem 0.25rem; color: #FFC400; }
.card-plan text { display: none; }

/* ---------- supervisors' bar under the band: Field | Panel, panel tabs, who (2026-11-25) */
.rolebar, .pages:has(.rb-in) { position: sticky; top: 0; z-index: 5; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: 0 2px 6px rgb(0 0 0 / 0.06); }
.rb-in { max-width: 64rem; margin: 0 auto; padding: 0.375rem 1rem; display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.wrap + .rolebar .rb-in, .rolebar .rb-in { max-width: 40rem; }
.rb-switch { display: inline-flex; border: 2px solid var(--black); border-radius: 999px; overflow: hidden; flex-shrink: 0; }
.rb-opt { display: flex; align-items: center; min-block-size: 2.5rem; padding: 0 1.125rem; font-weight: 700; font-size: var(--step-0); color: var(--black); text-decoration: none; background: var(--white); }
.rb-opt[aria-current="page"] { background: var(--black); color: var(--yellow); }
.rb-opt:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.rb-tabs { display: flex; gap: 0.25rem; overflow-x: auto; }
.rb-tabs a { display: flex; align-items: center; gap: 0.35rem; min-block-size: 2.5rem; padding: 0 0.75rem; font-size: var(--step-0); font-weight: 700;
  color: var(--ink); text-decoration: none; border-bottom: 3px solid transparent; }
.rb-tabs a[aria-current="page"] { border-bottom-color: var(--black); }
.rb-me { margin-inline-start: auto; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; font-size: var(--step-0); }
.rb-role { font-size: 0.875rem; color: var(--muted); }
@media (max-width: 40rem) { .rb-in { gap: 0.5rem; } .rb-me { display: none; } .rb-tabs { order: 3; inline-size: 100%; } }
@media print { .rolebar { display: none !important; } }

/* tab pictograms, forklift photos on the cards and the unit page (2026-11-25) */
.tab { display: flex; align-items: center; justify-content: center; gap: 0.5rem; min-block-size: 3.5rem; }
.tab-ic { inline-size: 2.5rem; block-size: 2.5rem; border-radius: 6px; background: var(--white); }
.card-photo { flex: 0 0 9rem; border-radius: 6px; overflow: hidden; }
.card-photo img { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.unit-photo { margin: 0 0 1rem; border-radius: var(--radius); overflow: hidden; }
.unit-photo img { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.pilot-tag { white-space: nowrap; }
.card-photo, .unit-photo { position: relative; }
.photo-tag { position: absolute; inset-inline-end: 0.25rem; inset-block-start: 0.25rem; padding: 0 0.4rem; border-radius: 6px;
  background: var(--black); color: var(--yellow); font-size: var(--step-2); line-height: 1.3; border: 2px solid var(--yellow); }
.unit-photo .photo-tag { font-size: 3rem; inset-inline-end: 0.75rem; inset-block-start: 0.75rem; padding: 0 0.75rem; }

/* ---------- game-style problem cards, the unit's status banner, status chips (2026-11-25: big, no small print) */
.plist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.gcard { display: flex; gap: 1rem; padding: 0.75rem; background: var(--white); color: var(--ink); text-decoration: none;
  border: 2px solid var(--line); border-inline-start-width: 8px; border-radius: var(--radius); }
a.gcard:hover { border-color: var(--black); }
a.gcard:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.gc-red { border-color: var(--red); border-inline-start-color: var(--red); background: var(--red-tint); }
.gc-yellow { border-color: #B58900; border-inline-start-color: var(--yellow); }
.gc-green { border-inline-start-color: var(--green); }
.gc-pic { position: relative; flex: 0 0 7.5rem; block-size: 7.5rem; border-radius: 8px; overflow: hidden; background: #10161D; }
.gc-pic img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.gc-nopic { display: block; inline-size: 100%; block-size: 100%; background: repeating-linear-gradient(135deg, #1E2A38 0 10px, #10161D 10px 20px); }
.gc-grade { position: absolute; inset-block-start: 0.3rem; inset-inline-start: 0.3rem; inline-size: 2.4rem; block-size: 2.4rem; display: grid; place-items: center;
  border-radius: 8px; font-size: 1.6rem; line-height: 1; border: 3px solid var(--white); box-shadow: 0 2px 6px rgb(0 0 0 / 0.35); }
.g-A { background: var(--red); color: var(--white); }
.g-B { background: #E8740C; color: var(--white); }
.g-C { background: var(--yellow); color: var(--black); }
.gc-body { display: flex; flex-direction: column; gap: 0.3rem; min-inline-size: 0; }
.gc-unit { font-weight: 700; font-size: var(--step-0); color: var(--muted); }
.gc-title { font-weight: 700; font-size: var(--step-2); line-height: 1.2; }
.gc-chips { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.gc-st, .gc-age { display: inline-flex; align-items: center; min-block-size: 2rem; padding: 0 0.75rem; border-radius: 999px; font-weight: 700; font-size: var(--step-0); white-space: nowrap; }
.gc-red .gc-st { background: var(--red); color: var(--white); }
.gc-yellow .gc-st { background: var(--yellow); color: var(--black); }
.gc-green .gc-st { background: var(--green); color: var(--white); }
.gc-age { background: var(--black); color: var(--yellow); }
.gc-said { font-size: var(--step-1); font-style: italic; }
.gc-line { font-size: var(--step-0); }
.gc-restr { font-weight: 700; background: var(--yellow-tint); padding: 0.125rem 0.5rem; border-radius: 6px; }
.gc-who { font-size: var(--step-0); color: var(--muted); }
@media (max-width: 30rem) { .gc-pic { flex-basis: 5.5rem; block-size: 5.5rem; } .gc-title { font-size: var(--step-1); } }

.tn { white-space: nowrap; padding: 0.05rem 0.55rem; border-radius: 999px; font-size: var(--step-0); font-weight: 700; }
.tn-pend { background: var(--red); color: var(--white); }
.tn-watch { background: var(--yellow-tint); color: #6B5400; border: 1px solid #B58900; }

/* the unit's status, top of its page: same states as the supervisors' tiles */
.ubanner { display: flex; gap: 1rem; align-items: center; padding: 0.875rem 1rem; margin: 0 0 1rem; border-radius: var(--radius); border: 3px solid var(--line); background: var(--white); }
.ub-ic { flex: 0 0 3.5rem; block-size: 3.5rem; display: grid; place-items: center; border-radius: 50%; font-size: 1.8rem; font-weight: 700; color: var(--white); background: var(--muted); }
.ub-txt { display: flex; flex-direction: column; gap: 0.25rem; }
.ub-word { font-size: var(--step-3); font-weight: 700; line-height: 1.1; }
.ub-sub { font-size: var(--step-0); }
.ub-chips { display: flex; gap: 0.375rem; flex-wrap: wrap; }
.ub-stop { border-color: var(--red); background: var(--red-tint); } .ub-stop .ub-ic { background: var(--red); } .ub-stop .ub-word { color: var(--red); }
.ub-look { border-color: var(--red); } .ub-look .ub-ic { background: var(--red); }
.ub-restrict { border-color: #B58900; background: repeating-linear-gradient(135deg, var(--white) 0 16px, var(--yellow-tint) 16px 32px); } .ub-restrict .ub-ic { background: #B58900; }
.ub-watch { border-color: var(--yellow); } .ub-watch .ub-ic { background: #B58900; }
.ub-ok { border-color: var(--green); } .ub-ok .ub-ic { background: var(--green); } .ub-ok .ub-word { color: var(--green); }

/* status chip on the home cards */
.cst { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 700; font-size: var(--step-1); }
.cst-ic { display: inline-grid; place-items: center; inline-size: 1.5rem; block-size: 1.5rem; border-radius: 50%; font-size: 0.9rem; color: var(--white); background: var(--muted); }
.cst-stop { color: var(--red); } .cst-stop .cst-ic, .cst-look .cst-ic { background: var(--red); }
.cst-restrict .cst-ic, .cst-watch .cst-ic { background: #B58900; }
.cst-ok { color: var(--green); } .cst-ok .cst-ic { background: var(--green); }
.card-lines { align-items: center; }
.cst-ic { font-size: 1rem; inline-size: 1.6rem; block-size: 1.6rem; }
.rb-role { font-size: 1rem; }
.plan .pl-lt { font-size: 9.5px; } .plan .pl-lt-on { font-size: 11px; } .plan .pl-n { font-size: 9px; }

/* breakdown lines with their pictogram (2026-11-25) */
.stop-choices .choice { min-block-size: 4.75rem; }
.choice-ic { inline-size: 4rem; block-size: 4rem; flex-shrink: 0; border-radius: 6px; background: var(--white); }
.choice-ic-q { display: grid; place-items: center; font-size: 2rem; font-weight: 700; border: 2px dashed var(--line); color: var(--muted); }
.stop-choices .choice span:last-child { font-size: var(--step-1); }

/* ---------- short videos with a problem (2026-11-25) */
.vidbox { margin-top: 0.75rem; }
.btn-video { background: var(--white); color: var(--black); }
.btn-video::before { content: "▶"; display: inline-grid; place-items: center; inline-size: 1.6rem; block-size: 1.6rem; border-radius: 50%; background: var(--red); color: var(--white); font-size: 0.8rem; }
.vid-preview { inline-size: 100%; max-block-size: 16rem; background: #000; }
.vid-ok { font-weight: 700; color: var(--green); margin: 0.25rem 0; }
.vid-fail { margin: 0 0 1rem; padding: 0.75rem 1rem; border-radius: var(--radius); background: var(--yellow-tint); border: 2px solid #B58900; font-weight: 700; }
.gc-vid { display: inline-flex; align-items: center; min-block-size: 2rem; padding: 0 0.75rem; border-radius: 999px; font-weight: 700; font-size: var(--step-0);
  background: var(--white); color: var(--black); border: 2px solid var(--black); white-space: nowrap; }
.ev-video, .follow-item video { display: block; inline-size: 100%; max-inline-size: 32rem; max-block-size: 20rem; background: #000; border-radius: var(--radius); margin-top: 0.5rem; }
/* the recorder: full screen, big buttons, red frame while recording */
dialog.rec { inline-size: min(36rem, 100vw); max-inline-size: 100vw; max-block-size: 100dvh; margin: auto; padding: 1rem; border: 0; border-radius: var(--radius); background: #10161D; color: var(--white); }
dialog.rec::backdrop { background: rgb(0 0 0 / 0.85); }
dialog.rec.is-rec .rec-view { outline: 6px solid var(--red); }
.rec-view { display: block; inline-size: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #000; border-radius: 8px; }
.rec-t { font-size: var(--step-1); font-weight: 700; margin: 0.75rem 0; min-block-size: 1.5em; }
.rec-btns { display: grid; gap: 0.5rem; }
.rec .btn-secondary { background: transparent; color: var(--white); border-color: var(--white); }
@media (max-width: 40rem) {
  dialog.rec { inset: 0; inline-size: 100vw; block-size: 100dvh; max-block-size: 100dvh; margin: 0; border-radius: 0; display: none; }
  dialog.rec[open] { display: flex; flex-direction: column; justify-content: center; }
}
dialog.rec .btn-primary { background: var(--yellow); color: var(--black); border-color: var(--yellow); }
