:root {
  font: 15px/1.55 system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #24312f;
  background: #f4f5f1;
  --line: #d8ded6;
  --muted: #596b63;
  --accent: #245e50;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: .22em; }
button, select, textarea { font: inherit; color: inherit; }
button, select { min-height: 40px; }
button, select, textarea {
  border: 1px solid #bccac1;
  background: #fff;
  border-radius: 5px;
  padding: 7px 12px;
}
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }
:focus-visible { outline: 2px solid #217a6d; outline-offset: 3px; }
h1, h2, p { margin: 0; }
h2 { font-size: 18px; }
.topbar {
  min-height: 55px;
  padding: 12px max(4vw, 16px);
  background: #253d36;
  color: #edf3ec;
  display: flex; gap: 8px 20px; justify-content: space-between; align-items: center; flex-wrap: wrap;
}
.topbar a { color: inherit; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; }
.brand { text-decoration: none; font-weight: 740; letter-spacing: .02em; }
.brand span { opacity: .75; font-weight: 450; }
main { max-width: 1440px; margin: 0 auto; padding: clamp(22px, 4vw, 54px) max(4vw, 16px) 36px; }
.heading { padding-bottom: 25px; }
.status { color: #664a19; background: #ece6d4; padding: 4px 8px; font-size: 12px; border-radius: 3px; }
h1 { font-size: clamp(27px, 4vw, 43px); line-height: 1.17; margin: 10px 0; font-weight: 730; letter-spacing: -.03em; }
.heading p { max-width: 780px; color: var(--muted); }
.scenes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 17px; }
.scenes button { display: flex; align-items: baseline; gap: 8px; }
.scenes small { font: 12px ui-monospace, monospace; }
.scenes button[aria-current="true"] { background: #dcebe2; color: #214638; border-color: #84ad98; font-weight: 700; }
.controls { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.controls label, .human label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 650; }
.controls select, .human select { font-size: 14px; color: #23332c; font-weight: 500; }
.phase-control { min-width: min(245px, 100%); }
.steps { display: flex; gap: 5px; }
.finding { color: #314c43; background: #e4ede5; border-left: 3px solid #709983; padding: 10px 13px; margin: 17px 0; overflow-wrap: anywhere; }
.inspection { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.focus, .map-panel { background: #fff; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; }
figcaption, .map-panel h2 { padding: 10px 14px; }
figcaption { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.muted, .caption, #sequence-info, .legend, footer { color: var(--muted); font-size: 13px; }
#view-time { margin-left: 9px; font-variant-numeric: tabular-nums; }
.switch { font-size: 13px; cursor: pointer; white-space: nowrap; }
.switch input { accent-color: var(--accent); vertical-align: -2px; }
.picture { position: relative; background: #354642; aspect-ratio: 546 / 359; }
.picture img, .picture canvas { display: block; width: 100%; height: 100%; }
.picture canvas { position: absolute; inset: 0; pointer-events: none; }
.caption { padding: 7px 12px; display: flex; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; }
.coverage-list { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 7px; }
.coverage-list button { min-height: 32px; padding: 4px 7px; font-size: 12px; }
.coverage-list button[aria-pressed="true"] { background: #dcebe2; border-color: #84ad98; }
.map-panel canvas { display: block; width: 100%; height: auto; background: #e7ebe4; }
.legend { display: flex; padding: 7px 12px; column-gap: 11px; row-gap: 3px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; }
.ego { background: #276d9a; } .target { background: #c46917; }
.lane { background: #4c8c72; } .stop { background: #b93e76; }
.legend .reference { border: 1px solid #4f5962; border-radius: 50%; }
dl { margin: 0; padding: 3px 12px 10px; font-size: 13px; }
dl div { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid #edf0eb; }
dt { color: #53665d; } dd { margin: 0; text-align: right; }
.sequence { margin-top: 26px; }
.section-heading { display: flex; justify-content: space-between; gap: 4px 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 9px; }
.sequence-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sequence-grid .time { grid-column: 1 / -1; font-size: 13px; font-weight: 680; border-bottom: 1px solid var(--line); padding: 3px 0; }
.tile { display: block; position: relative; padding: 0; width: 100%; text-align: left; border-color: var(--line); overflow: hidden; }
.tile[aria-pressed="true"] { border-color: #257665; box-shadow: 0 0 0 1px #257665; }
.tile img { display: block; width: 100%; height: auto; background: #e7ece6; aspect-ratio: 546 / 359; }
.tile span { display: block; padding: 5px 6px; font-size: clamp(10px, 2vw, 13px); overflow-wrap: anywhere; }
.tile small { margin-left: 5px; color: var(--muted); }
.source, .human { margin-top: 24px; padding: 12px 0; border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 680; }
.source-content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 12px; color: var(--muted); }
.source-content img { display: block; width: 100%; height: auto; border-radius: 4px; }
.source-content p + p { margin-top: 8px; }
.human p { margin: 3px 0 10px; }
.human label { width: fit-content; }
.human .feedback-label { width: min(100%, 680px); margin: 8px 0; }
.human textarea { width: 100%; }
#draft-status { font-size: 13px; color: var(--accent); margin-left: 7px; }
footer { margin-top: 15px; display: flex; gap: 8px 18px; flex-wrap: wrap; }
#error { background: #fbe9e3; color: #913b24; padding: 10px; margin: 8px 0; }
@media(max-width: 790px) {
  .inspection { grid-template-columns: minmax(0, 1fr); }
  .source-content { grid-template-columns: minmax(0, 1fr); }
}
@media(max-width: 390px) {
  .sequence-grid { gap: 4px; }
  .tile small { display: block; margin-left: 0; }
}
