.routing-lab { width: min(1560px, calc(100% - 40px)); margin: auto; padding-bottom: 24px; }
.routing-lab [hidden], .palette-preview[hidden] { display: none !important; }
.routing-lab .breadcrumb { padding: 15px 0 9px; }
.routing-title { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; }
.routing-title .eyebrow { color: var(--mint-strong); margin: 0 0 7px; font-size: .65rem; }
.routing-title h1 { font-size: clamp(1.35rem, 2.5vw, 2.2rem); margin: 0; font-weight: 700; line-height: 1.4; letter-spacing: -.03em; }
.routing-title p:last-child { margin: 6px 0 0; color: var(--ink-soft); font-size: .84rem; }
.routing-lab button, .routing-lab select, .routing-lab input { font: inherit; color: var(--ink); }
.routing-lab button { border: 1px solid var(--line); border-radius: 8px; background: var(--white); min-height: 40px; padding: 7px 13px; font-size: .78rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.routing-lab button:hover { border-color: var(--mint-strong); background: #eef6f1; }
.routing-lab button:disabled { opacity: .5; cursor: default; }
.routing-lab button.primary { background: var(--ink); color: var(--white); border-color: var(--ink); }
.routing-lab button.primary:hover { background: var(--mint-strong); }
.routing-lab button.danger { color: var(--coral-strong); border-color: #dfb3a9; background: #fff2ed; }
.routing-lab button[aria-pressed="true"] { background: #e0efe7; border-color: var(--mint-strong); color: #1d5f51; }
.routing-lab button.primary[aria-pressed="true"] { background: var(--mint-strong); color: white; }
.routing-lab select, .routing-lab input:not([type="checkbox"]) { min-width: 0; width: 100%; min-height: 40px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); font-size: .82rem; }
.routing-lab :is(button, select, input, summary, a, svg):focus-visible { outline: 3px solid var(--mint-strong); outline-offset: 3px; }
.routing-lab input[type="checkbox"] { accent-color: var(--mint-strong); width: 17px; height: 17px; }
.help { position: relative; flex: 0 0 auto; font-size: .8rem; }
.help summary { padding: 8px 13px; cursor: pointer; border: 1px solid var(--line); border-radius: 8px; }
.help-content { position: absolute; z-index: 40; right: 0; top: 48px; width: min(460px, calc(100vw - 40px)); max-height: 65vh; overflow: auto; padding: 20px 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: var(--shadow); }
.help-content h2 { font-size: .95rem; margin: 16px 0 8px; }
.help-content h2:first-child { margin-top: 0; }
.help-content p, .help-content ol { font-size: .8rem; margin: 8px 0; }
.help-content ol { padding-left: 20px; }
.composer { display: grid; grid-template-columns: 155px 12px 155px minmax(160px, 1fr) auto; align-items: center; gap: 12px; padding: 16px; }
.composer label { display: grid; gap: 5px; font-size: .72rem; font-weight: 700; }
.composer .endpoint-picker { display: grid; gap: 2px; text-align: left; padding: 8px 10px; min-height: 76px; white-space: normal; }
.composer #pick-source { grid-column: 1; grid-row: 1; }
.composer #pick-destination { grid-column: 3; grid-row: 1; }
.composer .send-arrow { grid-column: 2; grid-row: 1; }
.composer .message-input { grid-column: 4; }
.composer #repeat { grid-column: 5; }
.endpoint-picker strong { font-size: 1rem; }
.endpoint-picker small { font-size: .68rem; font-weight: 400; color: var(--ink-soft); }
.endpoint-role { font-size: .7rem; font-weight: 700; }
.source-picker .endpoint-role { color: var(--blue-strong); }
.destination-picker .endpoint-role { color: var(--mint-strong); }
.source-picker { border-left: 4px solid var(--blue-strong) !important; }
.destination-picker { border-left: 4px solid var(--mint-strong) !important; }
.pc-choices { margin: 0 12px 12px; border: 1px solid #a6bfb5; border-radius: 9px; padding: 12px; background: #f1f6f1; }
.pc-choice-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.pc-choice-heading h2 { margin: 0; font-size: .8rem; }
.pc-choice-heading p { margin: 4px 0 0; font-size: .68rem; color: var(--ink-soft); }
.pc-choice-heading button { padding: 5px 8px; font-size: .68rem; }
.pc-choice-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 6px; }
.pc-choice-list button { display: grid; text-align: center; white-space: normal; padding: 7px 5px; }
.pc-choice-list small { font-size: .65rem; font-weight: 400; color: var(--ink-soft); }
.send-arrow { color: var(--mint-strong); }
.experiment-tip { margin: 0 16px; color: var(--ink-soft); font-size: .72rem; }
.experiment-tip summary { cursor: pointer; }
.experiment-tip p { margin: 6px 0; }
.experiment-tip button { font-size: .72rem; margin-bottom: 12px; }
.status { font-size: .75rem; min-height: 30px; padding: 6px 16px; color: var(--ink-soft); overflow-wrap: anywhere; }
.status:empty { min-height: 0; padding: 0; }
.status.is-error { color: var(--coral-strong); }
.network-panel, .results-panel, .trace-panel, .history-panel { border: 1px solid var(--line); border-radius: 13px; background: var(--white); min-width: 0; overflow: hidden; }
.panel-heading { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { font-size: .86rem; margin: 0; white-space: nowrap; }
.legend { display: flex; gap: 13px; font-size: .65rem; color: var(--ink-soft); }
.legend > span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue-strong); }
.legend-dot.update { background: var(--amber-strong); }
.legend-line { width: 12px; border-bottom: 2px dashed var(--coral-strong); }
.network-heading { position: relative; z-index: 10; flex-wrap: wrap; gap: 10px 18px; }
.network-heading-main { display: flex; align-items: center; gap: 14px; }
.network-heading-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-send { display: flex; align-items: center; gap: 7px; }
.header-send #send { min-width: 86px; }
#send-settings-toggle { display: inline-flex; align-items: center; gap: 8px; background: #f5f6ef; }
#send-settings-toggle small { color: var(--ink-soft); font-size: .68rem; font-weight: 400; }
.settings-chevron { color: var(--mint-strong); transition: transform .15s; }
#send-settings-toggle[aria-expanded="true"] .settings-chevron { transform: rotate(180deg); }
.send-settings { border-bottom: 1px solid var(--line); background: #f5f6ef; }
.device-palette { position: relative; flex-shrink: 0; }
.device-palette > summary { font-size: .72rem; font-weight: 700; cursor: pointer; min-height: 34px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.device-palette[open] > summary { border-color: var(--mint-strong); background: #edf5ee; }
.palette-content { position: absolute; top: calc(100% + 7px); left: 0; z-index: 12; width: 210px; padding: 12px; border: 1px solid #bdc9c0; border-radius: 9px; background: #fffef9; box-shadow: 0 5px 18px #102f3514; }
.palette-content p { margin: 0 0 8px; color: var(--ink-soft); font-size: .65rem; }
.palette-buttons { display: flex; gap: 6px; }
.palette-buttons button { min-height: 38px; padding: 5px 9px; font-size: .7rem; touch-action: none; cursor: grab; }
.palette-preview { position: fixed; z-index: 100; transform: translate(-50%, -50%); pointer-events: none; padding: 12px 20px; border: 2px solid var(--mint-strong); border-radius: 12px; background: #e8f1eb; color: var(--ink); font: 700 15px sans-serif; box-shadow: 0 6px 24px #102f3526; }
.palette-preview.outside { opacity: .6; border-style: dashed; }
.canvas-wrap.is-drop-target { box-shadow: inset 0 0 0 3px var(--mint-strong); }
.canvas-wrap { height: clamp(460px, 48vw, 660px); position: relative; background: #faf9f4; overflow: hidden; }
#network { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; cursor: grab; }
#network.is-editing { cursor: crosshair; }
#network.is-dragging { cursor: grabbing; }
#network:focus:not(:focus-visible), .device, .link-hit { outline: none; }
#network:focus-visible { outline-offset: -3px; }
.map-controls { position: absolute; right: 10px; bottom: 10px; z-index: 6; display: flex; gap: 3px; }
.map-controls button { min-height: 30px; padding: 4px 8px; border-color: rgb(103 125 122 / 25%); border-radius: 6px; background: rgb(255 254 249 / 70%); color: var(--ink-soft); font-size: .68rem; line-height: 1; box-shadow: 0 1px 3px rgb(16 47 53 / 4%); }
.map-controls button:hover { background: rgb(255 254 249 / 95%); border-color: var(--mint-strong); }
.map-controls button:first-child, .map-controls button:nth-child(2) { width: 30px; padding: 3px; font-size: .95rem; }
.canvas-hint { position: absolute; left: 12px; bottom: 13px; max-width: calc(100% - 200px); padding: 5px 8px; border-radius: 6px; color: var(--ink-soft); background: rgb(255 254 249 / 92%); font-size: .65rem; pointer-events: none; }
.canvas-hint:empty { display: none; }
.network-link { stroke: #a9b5b2; stroke-width: 2.5; }
.network-link.is-down { stroke: var(--coral-strong); stroke-dasharray: 7 6; }
.network-link.is-selected { stroke-width: 5; stroke: var(--violet-strong); }
.link-hit { stroke: transparent; stroke-width: 22; cursor: pointer; }
.link-cross { fill: var(--coral-strong); font: 700 23px sans-serif; pointer-events: none; }
.device { cursor: grab; }
.device .device-body { fill: var(--white); stroke: var(--mint-strong); stroke-width: 2; }
.device.router .device-body { fill: #e8f1eb; }
.device.lan .device-body { fill: #f3ecd9; stroke: var(--amber-strong); }
.device.pc .device-body { fill: #e8f0f8; stroke: var(--blue-strong); }
.device.is-down .device-body { fill: #f8e4dc; stroke: var(--coral-strong); stroke-dasharray: 4 3; }
.device .selection-ring { fill: none; stroke: var(--violet-strong); stroke-width: 1.5; vector-effect: non-scaling-stroke; visibility: hidden; pointer-events: none; }
.device.is-selected .selection-ring { visibility: visible; }
.device.is-source .endpoint-ring { fill: none; stroke: var(--blue-strong); stroke-width: 2; stroke-dasharray: 5 3; }
.device.is-destination .endpoint-ring { fill: none; stroke: var(--mint-strong); stroke-width: 2; }
.device text { fill: var(--ink); font: 700 17px "Hiragino Sans", "Yu Gothic", sans-serif; pointer-events: none; }
.device .node-label { font-size: 17px; }
.device .node-icon { fill: none; stroke: var(--blue-strong); stroke-width: 2; }
.device .endpoint-tag { font-size: 14px; fill: var(--blue-strong); paint-order: stroke; stroke: #faf9f4; stroke-width: 4px; }
.device.is-destination .endpoint-tag { fill: var(--mint-strong); }
.device.is-connect-candidate .device-body { stroke: var(--mint-strong); stroke-width: 5; fill: #d7eddd; }
.device.is-pc-candidate .device-body { stroke: var(--blue-strong); stroke-width: 4; }
.device .connection-ring { fill: none; stroke: transparent; visibility: hidden; pointer-events: none; cursor: crosshair; }
.device.is-selected .connection-ring { visibility: visible; pointer-events: stroke; }
.device.is-selected:has(.connection-ring:hover) .selection-ring { stroke: var(--mint-strong); stroke-width: 2.5; }
.device .endpoint-ring { pointer-events: none; }
.connection-preview { stroke: var(--mint-strong); stroke-width: 4; stroke-dasharray: 8 5; pointer-events: none; }
#signals, #bubbles, #connection-preview { pointer-events: none; }
.device .fault-mark { fill: var(--coral-strong); font-size: 19px; }
.device:focus-visible .device-body, .link-hit:focus-visible { stroke: var(--violet-strong); stroke-width: 5; outline: none; }
.route-line { fill: none; stroke: var(--blue-strong); stroke-width: 4; opacity: .45; pointer-events: none; }
.route-line.forecast { stroke-dasharray: 7 7; stroke-width: 2.5; opacity: .3; }
.signal-data { fill: var(--blue-strong); stroke: white; stroke-width: 2; }
.signal-label { fill: var(--blue-strong); font: 700 14px sans-serif; paint-order: stroke; stroke: var(--white); stroke-width: 4; }
.signal-update { fill: var(--amber-strong); stroke: white; stroke-width: 1.5; }
.loss-marker circle { fill: #fff0e9; stroke: var(--coral-strong); stroke-width: 2; }
.loss-cross { fill: var(--coral-strong); font: 700 28px sans-serif; }
.loss-label { fill: var(--coral-strong); font: 700 16px sans-serif; paint-order: stroke; stroke: #fffef9; stroke-width: 5px; }
.loss-notice { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #dfb3a9; background: #fff0e9; color: #a43627; }
.loss-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: #a43627; color: white; font-size: 1.4rem; font-weight: 700; }
.loss-notice > div { flex: 1; min-width: 0; }
.loss-notice strong { font-size: .82rem; }
.loss-notice p { margin: 2px 0 0; font-size: .73rem; overflow-wrap: anywhere; }
.loss-notice button { font-size: .7rem; min-height: 36px; }
#loss-dismiss { padding: 4px 9px; font-size: 1rem; }
.bubble rect { fill: #fffef9; stroke: #9aafa6; stroke-width: 1; }
.bubble text { fill: var(--ink); font: 600 13px "Hiragino Sans", "Yu Gothic", sans-serif; }
.bubble.update rect { fill: #fff5dd; stroke: #b9985d; }
.bubble.update text { fill: #805000; }
.routing-lab button.quiet { padding: 4px 6px; min-height: 32px; font-size: .65rem; background: transparent; border-color: transparent; color: var(--ink-soft); white-space: normal; }
.metrics { display: flex; align-items: center; gap: 20px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: .7rem; background: #f5f6ef; }
.metrics b { font-size: .92rem; }
#update-state { margin-left: auto; color: var(--ink-soft); }
#update-state.is-updating { color: var(--amber-strong); font-weight: 700; }
.selection-context { position: absolute; z-index: 4; width: max-content; max-width: min(210px, calc(100% - 20px)); max-height: calc(100% - 20px); overflow: auto; border: 1px solid #bdc9c0; border-radius: 10px; background: #fffef9; box-shadow: 0 5px 20px #102f3514; }
.selection-context:has(details[open]) { width: min(300px, calc(100% - 20px)); max-width: calc(100% - 20px); }
#selection-detail { padding: 10px 12px; }
.context-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.context-heading h3 { font-size: .8rem; margin: 0; }
.context-heading .context-state { font-weight: 400; color: var(--ink-soft); font-size: .65rem; }
.context-heading .context-state.down { color: var(--coral-strong); }
.context-heading button { min-height: 30px; padding: 0 7px; border-color: transparent; color: var(--ink-soft); font-size: .9rem; }
.context-controls { display: flex; align-items: center; gap: 2px; }
.context-heading .context-delete { color: var(--coral-strong); font-size: .65rem; padding: 4px 5px; }
.context-details { border-top: 1px solid var(--line); margin-top: 9px; padding-top: 7px; }
.context-details summary { cursor: pointer; font-size: .7rem; color: var(--ink-soft); }
.context-details .device-meta { margin: 8px 0; font-size: .7rem; }
.context-details button { margin-top: 7px; min-height: 34px; font-size: .7rem; }
.device-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.device-title h3 { font-size: 1.1rem; margin: 0; }
.badge { border: 1px solid #b6d1c0; background: #eaf4ed; color: #1d6453; border-radius: 20px; padding: 3px 10px; font-size: .73rem; white-space: nowrap; }
.badge.down, .badge.lost { color: #a43627; border-color: #e8c1b3; background: #fff0e9; }
.badge.active { color: var(--blue-strong); background: #e8f0f8; border-color: #c5d4e7; }
.muted { color: var(--ink-soft); font-size: .72rem; }
.device-meta { margin: 8px 0 16px; font-size: .8rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.selection-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.selection-actions button { font-size: .7rem; min-height: 34px; padding: 5px 8px; }
.connect-action { margin-top: 7px; }
.connect-action button { width: 100%; min-height: 34px; padding: 5px 8px; font-size: .7rem; color: var(--mint-strong); background: #f0f5ef; }
.routing-table-title { margin: 12px 0 0; font-size: .8rem; }
.table-meta { margin: 4px 0 10px; font-size: .72rem; color: var(--ink-soft); }
.table-scroll { max-height: 185px; overflow: auto; }
.routing-table { width: 100%; border-collapse: collapse; font-size: .76rem; line-height: 1.5; }
.routing-table th { position: sticky; top: 0; background: #eeefe7; text-align: left; font-size: .75rem; padding: 7px 5px; white-space: nowrap; }
.routing-table td { border-bottom: 1px solid #e7e8e0; padding: 7px 5px; }
.routing-table small { display: block; color: var(--ink-soft); font-size: .64rem; font-weight: normal; }
.routing-table tr.is-target { background: #e9f2f8; }
.routing-table tr.is-changed { box-shadow: inset 3px 0 #805000; background: #fbf0d7; }
.routing-table .unreachable { color: var(--coral-strong); }
.selection-note { font-size: .68rem; line-height: 1.7; margin: 8px 0 0; color: var(--ink-soft); }
.link-cost { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: .7rem; }
.link-cost select { width: 62px; }
.trace-body { height: 250px; padding: 12px 16px; overflow: auto; }
.packet-title { display: flex; justify-content: space-between; margin-top: 12px; gap: 8px; font-size: .76rem; }
.packet-fragment { margin: 7px 0; padding: 6px 9px; background: #eef2f0; border-radius: 6px; font-size: .72rem; overflow-wrap: anywhere; }
.packet-path { margin: 8px 0; color: var(--blue-strong); font-size: .69rem; overflow-wrap: anywhere; line-height: 1.8; }
.packet-decisions { padding-left: 18px; margin: 12px 0; font-size: .76rem; max-height: 260px; overflow-y: auto; }
.packet-decisions li { margin-bottom: 4px; }
.danger-text { color: var(--coral-strong); }
.success-text { color: var(--mint-strong); }
.results-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; align-items: start; }
.result-scroll { height: 250px; overflow-y: auto; }
.empty-state { color: var(--ink-soft); font-size: .78rem; text-align: center; margin: 30px 16px; }
.message-row { padding: 12px 16px; border-bottom: 1px solid #e7e8e0; }
.message-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .75rem; }
.message-row p { font-size: .72rem; margin: 5px 0; overflow-wrap: anywhere; }
.packet-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.packet-chips button { min-height: 30px; padding: 3px 9px; font-size: .65rem; }
.packet-chips .delivered { color: var(--mint-strong); }
.packet-chips .lost { color: var(--coral-strong); }
.message-row.has-loss { background: #fff5ef; border-left: 4px solid #a43627; }
.loss-explanation { color: #a43627; font-size: .78rem; font-weight: 700; padding: 8px 10px; background: #fff0e9; border-radius: 6px; overflow-wrap: anywhere; }
.history-filter select { min-height: 30px; font-size: .68rem; padding: 3px 5px; }
.history-row { padding: 9px 14px; display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 10px; border-bottom: 1px solid #e7e8e0; font-size: .74rem; line-height: 1.7; }
.history-row time { color: var(--ink-soft); font-family: monospace; }
.history-row.table { border-left: 3px solid var(--amber-strong); background: #fdf6e7; }
.history-row.lost { border-left: 3px solid var(--coral-strong); }
.history-row details { margin-top: 4px; }
.history-row summary { color: var(--amber-strong); cursor: pointer; }
.model-note { max-width: 1050px; font-size: .7rem; color: var(--ink-soft); margin: 16px 0 0; }
.lab-footer { width: min(1560px, calc(100% - 40px)); margin: auto; border-top: 1px solid var(--line); padding: 20px 0 30px; display: flex; justify-content: space-between; gap: 16px; font-size: .72rem; color: var(--ink-soft); }
@media (max-width: 1150px) {
  .network-heading-tools { gap: 7px; }
  .legend { gap: 7px; }
  #send-settings-toggle small { display: none; }
  .metrics { gap: 11px; flex-wrap: wrap; }
}
@media (max-width: 900px) {
  .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-panel { grid-column: 1 / -1; }
  .composer { grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr) auto; }
  .composer .message-input { grid-column: 1 / 4; grid-row: 2; }
  .composer #repeat { grid-column: 4; grid-row: 2; }
}
@media (max-width: 760px) {
  .routing-lab { width: calc(100% - 24px); }
  .routing-title { align-items: flex-start; margin-bottom: 16px; gap: 10px; flex-wrap: wrap; }
  .routing-title h1 { font-size: 1.35rem; }
  .routing-title .eyebrow { font-size: .6rem; }
  .help summary { font-size: .7rem; padding: 5px 10px; }
  .help-content { position: fixed; top: 150px; right: 12px; width: calc(100% - 24px); }
  .composer { padding: 12px; gap: 10px 8px; grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr); }
  .composer .endpoint-picker { min-height: 72px; padding: 7px 8px; }
  .composer .message-input { grid-column: 1 / -1; grid-row: 2; }
  .composer #repeat { grid-column: 1 / -1; grid-row: 3; }
  .pc-choice-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .experiment-tip { margin: 0 12px; }
  .status { padding: 6px 12px; font-size: .7rem; }
  .canvas-wrap { height: 400px; }
  .map-controls button { min-height: 34px; }
  .map-controls button:first-child, .map-controls button:nth-child(2) { width: 34px; }
  .canvas-hint { left: 9px; bottom: 59px; max-width: calc(100% - 18px); font-size: .6rem; }
  .panel-heading { padding: 10px 12px; gap: 7px; }
  .panel-heading h2 { font-size: .77rem; }
  .network-heading { display: grid; grid-template-columns: 1fr; gap: 6px; }
  .network-heading-main { gap: 12px; }
  .network-heading-tools { grid-row: 3; justify-content: space-between; margin: 0; }
  .header-send { grid-row: 2; }
  #send-settings-toggle { flex: 1; justify-content: space-between; }
  #send-settings-toggle small { display: inline; font-size: .63rem; }
  .legend { font-size: .56rem; gap: 6px; }
  .routing-lab #reset { font-size: .58rem; padding: 3px; min-height: 26px; }
  .device-palette { position: static; }
  .palette-content { left: 12px; right: auto; width: 200px; }
  .loss-notice { gap: 7px; flex-wrap: wrap; }
  .loss-notice > div { flex-basis: calc(100% - 40px); }
  #loss-inspect { margin-left: 37px; }
  #loss-dismiss { margin-left: auto; }
  .selection-context { max-width: min(210px, calc(100% - 18px)); }
  .selection-context:has(details[open]) { width: min(280px, calc(100% - 18px)); }
  .selection-actions button { min-height: 38px; }
  .metrics { padding: 8px 12px; }
  #update-state { flex-basis: 100%; margin: 0; }
  .results-grid { grid-template-columns: 1fr; }
  .history-panel { grid-column: auto; }
  .lab-footer { width: calc(100% - 24px); flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
