.crash-report .panel-head h2 { margin: 0; }
.crash-report .panel-head .helper { margin: 4px 0 0; }
.crash-steps { display:flex; flex-wrap:wrap; gap:7px; padding:0 0 20px; margin-bottom:20px; border-bottom:1px solid var(--line,#dce3eb); }
.crash-steps button { border-radius:10px; padding:9px 14px; background:transparent; box-shadow:none; }
.crash-steps button[aria-current=step] { background:var(--accent,#2563eb); color:white; border-color:transparent; }
.crash-reused { padding:16px; margin:0 0 20px; background:var(--surface-soft,rgba(120,150,185,.07)); border:1px solid var(--line,#dce3eb); border-radius:12px; }
.crash-reused p { margin:7px 0 12px; font-size:13px; line-height:1.6; }
.crash-section-title { display:flex; align-items:center; justify-content:space-between; gap:15px; margin:18px 0 12px; }
.crash-section-title h3 { margin:0; }
.crash-row { margin:12px 0; border:1px solid var(--line,#dce3eb); border-radius:14px; }
.crash-row > summary { display:flex; gap:18px; justify-content:space-between; cursor:pointer; padding:16px; font-weight:600; }
.crash-row > summary small { font-weight:400; white-space:nowrap; color:var(--muted,#607088); }
.crash-row-body { padding:0 16px 16px; }
.crash-unit-group { border-top:1px solid var(--line,#dce3eb); padding:12px 0; }
.crash-unit-group > summary { cursor:pointer; font-weight:600; padding:8px 0; }
.crash-unit-group .section-fields { padding-top:12px; }
.crash-linked-person { margin:0 0 18px; padding:12px; border-radius:9px; background:var(--surface-soft,rgba(120,150,185,.07)); }
.crash-linked-person p { margin:4px 0; font-size:13px; }
.crash-step-footer { display:flex; align-items:center; gap:10px; margin-top:24px; padding-top:18px; border-top:1px solid var(--line,#dce3eb); }
.crash-optional { margin:24px 0; }
.crash-optional > summary { cursor:pointer; font-weight:600; }
.crash-drawing { width:100%; }
.crash-drawing canvas { display:block; width:100%; height:auto; border:1px solid #aebdcb; border-radius:8px; background:white; touch-action:none; cursor:crosshair; }
.crash-drawing-tools { display:flex; gap:10px; align-items:end; flex-wrap:wrap; margin-top:12px; }
.crash-drawing-tools .field { flex:1 1 150px; }
.crash-report .section-field:has(.crash-drawing) { grid-column:1 / -1; }
.crash-report .field { min-width:0; }
.crash-report .section-fields { grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.crash-report [data-section-field$=".vehicleId"],.crash-report [data-section-field$=".driverId"],.crash-report [data-section-field$=".personId"] { grid-column:1 / -1; }
.crash-report [hidden] { display:none !important; }
.crash-narrative { white-space:pre-wrap; max-height:250px; overflow:auto; }
@media(max-width:700px) { .crash-report .panel-head { align-items:start; flex-direction:column; gap:10px; } .crash-row > summary { flex-direction:column; gap:6px; } .crash-step-footer { flex-wrap:wrap; } .crash-section-title { align-items:start; } .crash-steps { gap:5px; } .crash-steps button { padding:8px 10px; } }
@media(max-width:700px) { .crash-report .section-fields { grid-template-columns:1fr; } }
/* Scene editor shares the report's controls and saves through the same draft. */
.scene-builder { border:1px solid var(--line,#dce3eb); border-radius:14px; padding:16px; background:var(--surface,#fff); }
.scene-heading { display:flex; gap:16px; align-items:start; justify-content:space-between; margin-bottom:12px; }
.scene-heading strong { font-size:16px; }
.scene-heading .helper { margin:5px 0 0; }
.scene-units { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.scene-units button { display:flex; flex-direction:column; align-items:start; gap:3px; max-width:230px; padding:10px 13px; border:1px solid var(--line,#ced8e2); border-radius:10px; text-align:left; touch-action:none; cursor:grab; background:var(--surface-soft,#eef3f8); }
.scene-units button span { font-weight:650; color:var(--accent,#183a61); }
.scene-units button small { overflow-wrap:anywhere; font-weight:400; color:var(--muted,#607088); }
.scene-toolbar { display:flex; flex-wrap:wrap; gap:5px; margin:0 0 10px; }
.scene-toolbar button { padding:8px 10px; border-radius:8px; font-size:12px; }
.scene-toolbar button[aria-pressed=true] { background:var(--accent,#183a61); border-color:var(--accent,#183a61); color:#fff; }
[data-scene-stage] { display:block; width:100%; height:auto; border:1px solid #aebdcb; background:#fff; border-radius:8px; touch-action:none; user-select:none; }
[data-scene-stage]:focus-visible { outline:3px solid #6aa6e8; outline-offset:2px; }
[data-scene-stage] [data-diagram-object] { cursor:grab; }
[data-scene-stage][data-tool=pen],[data-scene-stage][data-tool=approach],[data-scene-stage][data-tool=departure],[data-scene-stage][data-tool=skid] { cursor:crosshair; }
.scene-caption { display:flex; flex-wrap:wrap; justify-content:space-between; gap:5px 12px; font-size:10px; color:var(--muted,#607088); margin:6px 0 12px; }
.scene-selection { display:flex; flex-wrap:wrap; align-items:end; gap:12px; padding:12px; margin:10px 0; border:1px solid var(--line,#dce3eb); border-radius:10px; background:var(--surface-soft,#eef3f8); }
.scene-selection > strong { width:100%; font-size:13px; }
.scene-selection label,.scene-background-controls label { display:flex; flex-direction:column; gap:5px; font-size:12px; min-width:0; flex:1 1 140px; }
.scene-selection input,.scene-selection select,.scene-background-controls input,.scene-background-controls select { width:100%; min-width:0; }
.scene-selection label:has([data-scene-size]) { flex:0 1 90px; }
.scene-selection input[type=range],.scene-background-controls input[type=range] { padding:0; height:28px; }
.scene-review { margin:12px 0; }
.scene-review .helper { margin:5px 0 0; }
.scene-background { border-top:1px solid var(--line,#dce3eb); margin-top:12px; padding-top:12px; }
.scene-background > summary { cursor:pointer; font-weight:600; font-size:13px; }
.scene-background-controls { display:flex; flex-wrap:wrap; gap:12px; align-items:end; padding:14px 0 0; }
.scene-background-controls input[type=file] { font-size:12px; }
.scene-pan { display:flex; gap:4px; }
.scene-pan button { width:36px; height:36px; padding:3px; }
.scene-status { margin:10px 0 0; min-height:18px; }
.scene-expanded { position:fixed; inset:18px; overflow:auto; z-index:90; box-shadow:0 20px 80px #10284f40; background:var(--surface,#fff); max-width:1400px; margin:0 auto; }
.scene-expanded [data-scene-stage] { max-width:min(100%,124vh); margin:0 auto; }
.scene-road-labels { display:flex; gap:6px; flex-wrap:wrap; padding:4px 0 10px; }
.scene-road-labels button { font-size:11px; padding:5px 9px; }
@media(max-width:700px) { .scene-builder { padding:10px; } .scene-heading { gap:8px; } .scene-units button { flex:1 1 130px; } .scene-selection label,.scene-background-controls label { flex:1 1 135px; } .scene-expanded { inset:5px; } .scene-toolbar button { min-height:40px; } .scene-selection input,.scene-selection select,.scene-background-controls input,.scene-background-controls select { font-size:16px; } }
.crash-location-field{min-width:0;display:grid;gap:12px}
.crash-location-field .field{margin:0}
.crash-location-results{display:grid;gap:6px;max-height:240px;overflow:auto;border:1px solid var(--line);border-radius:12px;padding:6px}
.crash-location-results[hidden]{display:none}
.crash-location-results button{display:grid;text-align:left;gap:4px;padding:12px;white-space:normal}
.crash-location-results button[aria-selected=true]{outline:2px solid var(--accent)}
.crash-location-results small{color:var(--muted)}
.crash-location-map{height:300px;min-height:260px;z-index:0}
.crash-location-pin span{display:block;width:24px;height:24px;border:3px solid white;border-radius:50%;background:#174776;box-shadow:0 1px 8px #0008}
.crash-coordinate-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px;min-width:0}
.crash-coordinate-fields input{min-width:0;width:100%}
.crash-location-confirm{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.crash-location-confirm p{margin:0}
.crash-location-linked{padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--surface);margin:14px 0}
.crash-location-derived{display:none}
@media(max-width:600px){.crash-location-map{height:280px}.crash-location-field input,.crash-location-field select{font-size:16px}.crash-location-confirm button{width:100%}}
.scene-import{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:14px;background:var(--surface);border:1px solid var(--line);border-radius:12px;margin:10px 0 16px}
.scene-import .helper{font-variant-numeric:tabular-nums}
@media(max-width:600px){.scene-import{align-items:stretch;flex-direction:column}.scene-import button{white-space:normal}}
