/* Recorded scientific states. Playback and source selection belong to the parent. */
.lap-simulation-stage {
  --scene-bg:#102724; --scene-surface:#17352f; --scene-ink:#f4f7ed;
  --scene-muted:#b5c9bf; --scene-grid:#456158; --scene-accent:#7ee0ba;
  --scene-compare:#ffb08b; --scene-wait:#a9c8ff; --scene-warning:#f3c66f;
  --scene-text:#f4f7ed; --scene-skin:#7cac8f; --scene-backing:#345f4e; --scene-sphere:#d3e1d7;
  box-sizing:border-box; min-width:0; background:var(--scene-bg); color:var(--scene-ink);
  border:1px solid #38574d; border-radius:12px; padding:24px; margin:0 0 24px;
  overflow:hidden; color-scheme:dark;
}
.lap-simulation-stage *, .lap-simulation-stage *::before, .lap-simulation-stage *::after { box-sizing:border-box; }
.lap-scene-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.lap-scene-header h3 {
  min-width:0; margin:0; color:var(--scene-ink); font-size:clamp(24px,2.5vw,30px);
  font-weight:500; line-height:1.15; letter-spacing:-.035em; overflow-wrap:break-word;
}
.lap-scene-status {
  flex:0 0 auto; max-width:38%; padding:7px 9px; border:1px solid #527365; border-radius:5px;
  background:var(--scene-surface); color:var(--scene-accent); font-size:12px; font-weight:500;
  line-height:1.35; text-align:right; font-variant-numeric:tabular-nums;
}
.lap-scene-watch { margin:13px 0 18px; max-width:68ch; color:#d9e8de; font-size:17px; line-height:1.5; }
.lap-scene-watch strong { color:var(--scene-ink); font-weight:600; }
.lap-simulation-stage [data-scene-transport] { min-width:0; margin:0 0 22px; }
.lap-scene-visuals { display:grid; grid-template-columns:minmax(0,1fr); gap:22px; min-width:0; }
.lap-scene-visuals > * { min-width:0; }
.lap-plot { min-width:0; margin:0; padding:15px 12px 10px; border:1px solid #38574d; border-radius:7px; background:var(--scene-surface); }
.lap-plot-title, .lap-plot-title h4 { margin:0; color:var(--scene-ink); font-size:19px; font-weight:500; line-height:1.3; letter-spacing:-.015em; }
.lap-plot-unit, .lap-plot-unit p { margin:6px 0 4px; color:var(--scene-muted); font-size:13px; line-height:1.45; }
.lap-scene-chart, .lap-scene-contact-view, .lap-scene-schematic { display:block; width:100%; max-width:100%; height:auto; overflow:visible; }
.lap-scene-contact-view { overflow:hidden; border-radius:5px; }
.lap-scene-chart text, .lap-scene-contact-view text, .lap-scene-schematic text { font-family:Arial,Helvetica,sans-serif; fill:var(--scene-muted); }
.lap-scene-axis-label { font-size:17px; fill:var(--scene-ink) !important; }
.lap-scene-tick { font-size:16px; }
.lap-scene-grid { fill:none; stroke:var(--scene-grid); stroke-width:1; }
.lap-scene-line { fill:none; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; vector-effect:non-scaling-stroke; }
.lap-scene-cursor { stroke:#f4f7ed; stroke-width:1.5; stroke-dasharray:4 4; vector-effect:non-scaling-stroke; }
.lap-scene-key { display:flex; flex-wrap:wrap; align-items:center; gap:10px 18px; margin:12px 0 4px; color:#dae7df; font-size:13px; line-height:1.4; }
.lap-scene-key span { display:inline-flex; align-items:center; gap:7px; }
.lap-scene-key i { display:inline-block; flex:0 0 19px; width:19px; height:4px; border-radius:2px; background:currentColor; }
.lap-scene-readouts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; margin-top:22px; padding-top:20px; border-top:1px solid var(--scene-grid); }
.lap-scene-metric { min-width:0; }
.lap-scene-metric strong { display:block; color:var(--scene-ink); font-size:clamp(27px,3vw,38px); font-weight:500; letter-spacing:-.035em; line-height:1.1; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.lap-scene-metric span { display:block; margin-top:7px; color:var(--scene-muted); font-size:13px; line-height:1.4; }
.lap-scene-moment { margin:20px 0 0; padding:13px 15px; border-left:3px solid var(--scene-accent); background:var(--scene-surface); color:var(--scene-ink); font-size:16px; line-height:1.5; }
.lap-scene-moment:empty { display:none; }
.lap-simulation-stage [data-scene-primary-controls] { display:flex; flex-wrap:wrap; align-items:flex-end; gap:15px; margin-top:20px; padding-top:18px; border-top:1px solid var(--scene-grid); }
.lap-simulation-stage [data-scene-primary-controls]:empty { display:none; }
.lap-simulation-stage [data-scene-primary-controls] label { display:grid; flex:1 1 230px; gap:7px; min-width:0; color:var(--scene-muted); font-size:13px; line-height:1.35; }
.lap-simulation-stage [data-scene-primary-controls] select { display:block; width:100%; min-width:0; min-height:46px; border:1px solid #668476; border-radius:5px; background:var(--scene-surface); color:var(--scene-ink); padding:11px 30px 11px 11px; font:inherit; font-size:15px; text-overflow:ellipsis; }
.lap-simulation-stage :is(button,select,input,summary):focus-visible { outline:3px solid var(--scene-accent); outline-offset:3px; }
.lap-scene-evidence { margin-top:20px; border-top:1px solid var(--scene-grid); color:var(--scene-muted); }
.lap-scene-evidence summary { padding:15px 0; color:#deebe3; font-size:14px; line-height:1.4; cursor:pointer; }
.lap-scene-evidence[open] summary { color:var(--scene-accent); }
.lap-scene-caption { max-width:78ch; margin:16px 0 0; color:var(--scene-muted); font-size:13px; line-height:1.6; }
.lap-scene-evidence .lap-scene-caption { margin:0 0 15px; }
.lap-delivery-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px 15px; align-items:center; padding:17px 0; border-bottom:1px solid var(--scene-grid); }
.lap-delivery-row:first-child { padding-top:2px; }
.lap-delivery-row:last-child { border-bottom:0; padding-bottom:2px; }
.lap-delivery-row.lap-delivery-selected { background:var(--scene-surface); border-radius:5px; margin-left:-10px; margin-right:-10px; padding-left:10px; padding-right:10px; }
.lap-delivery-row > :is(label,p,span):not(.lap-delivery-track) { min-width:0; margin:0; color:#e0ece4; font-size:16px; font-weight:500; line-height:1.35; }
.lap-delivery-row strong { justify-self:end; color:var(--scene-ink); font-size:34px; font-weight:500; line-height:1.1; letter-spacing:-.035em; font-variant-numeric:tabular-nums; }
.lap-delivery-track { grid-column:1/-1; position:relative; display:block; width:100%; height:22px; border-radius:3px; overflow:hidden; background:#743c36; }
.lap-delivery-fill { display:block; height:100%; max-width:100%; background:var(--scene-accent); }
.lap-scene-state { transition:fill .16s ease,opacity .16s ease; }
.lap-scene-label { font-size:18px; }
.lap-scene-small { font-size:14px; }
.lap-scene-phase { font-size:20px; font-weight:600; fill:var(--scene-ink) !important; }
.lap-scene-pipe { fill:none; stroke:#79998b; stroke-width:5; stroke-linejoin:round; }
.lap-scene-hot-pipe { fill:none; stroke:var(--scene-compare); stroke-width:5; }
.lap-scene-cold-pipe { fill:none; stroke:var(--scene-wait); stroke-width:5; }
.lap-scene-vessel, .lap-scene-box { fill:var(--scene-surface); stroke:#91af9f; stroke-width:2; }
.lap-scene-core-track { fill:#29483d; }
.lap-scene-core { fill:var(--scene-warning); }
.lap-scene-tubes { fill:none; stroke:#9cbdae; stroke-width:3; }
.lap-scene-pump { fill:var(--scene-bg); stroke:#a9c8b9; stroke-width:2; }
.lap-scene-pump-mark { fill:var(--scene-accent); }
.lap-scene-phase-dot { fill:var(--scene-muted); }
.lap-scene-phase-dot.lap-scene-probing { fill:var(--scene-compare); }
.lap-scene-skin { fill:#8ac6a5; stroke:#bde7cd; stroke-width:1; }
.lap-scene-backing { fill:#436c5e; }
.lap-scene-indenter { fill:#d1e2d7; stroke:#f4f7ed; stroke-width:1.5; }
.lap-scene-contact { fill:var(--scene-compare); }
.lap-scene-force { stroke:var(--scene-compare); stroke-width:3; }
.lap-scene-network { fill:var(--scene-surface); stroke:#a9c8b9; stroke-width:2; }
.lap-scene-unit { fill:var(--scene-accent); stroke:#d8f9e7; stroke-width:1; }
.lap-scene-unit.lap-scene-offline { fill:#8a4b40; stroke:var(--scene-compare); }
.lap-scene-demand-track { fill:#743c36; }
.lap-scene-served { fill:var(--scene-accent); }
.lap-scene-unserved { fill:var(--scene-compare); }

@media (min-width:1000px) {
  .lap-simulation-stage[data-simulation-scene="robotic-finger"] .lap-scene-visuals,
  .lap-simulation-stage[data-simulation-scene="reactor-stress-test"] .lap-scene-visuals {
    grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start;
  }
  .lap-simulation-stage[data-simulation-scene="energy-cascade"] .lap-scene-visuals {
    grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); align-items:center;
  }
  .lap-simulation-stage[data-simulation-scene="reactor-diagnostic-exam"] .lap-scene-visuals {
    width:100%; max-width:850px; margin-inline:auto;
  }
}
@media (max-width:760px) {
  .lap-simulation-stage { padding:18px 14px; border-radius:8px; margin-bottom:18px; }
  .lap-scene-header { display:block; }
  .lap-scene-header h3 { font-size:25px; line-height:1.15; }
  .lap-scene-status { display:inline-block; max-width:100%; margin-top:10px; text-align:left; font-size:12px; }
  .lap-scene-watch { margin:13px 0 18px; font-size:16px; line-height:1.5; }
  .lap-simulation-stage [data-scene-transport] { margin-bottom:20px; }
  .lap-scene-visuals { gap:22px; }
  .lap-plot { padding:0; border:0; border-radius:0; background:none; }
  .lap-plot + .lap-plot { padding-top:18px; border-top:1px solid var(--scene-grid); }
  .lap-plot-title, .lap-plot-title h4 { font-size:18px; }
  .lap-plot-unit, .lap-plot-unit p { font-size:13px; margin-top:5px; }
  .lap-scene-axis-label { font-size:19px; }
  .lap-scene-tick { font-size:18px; }
  .lap-scene-key { font-size:13px; gap:8px 16px; }
  .lap-scene-readouts { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 14px; margin-top:20px; padding-top:18px; }
  .lap-scene-metric strong { font-size:31px; line-height:1.05; }
  .lap-scene-metric span { font-size:13px; line-height:1.4; margin-top:7px; }
  .lap-scene-moment { margin-top:20px; padding:13px; font-size:16px; }
  .lap-simulation-stage [data-scene-primary-controls] { display:grid; grid-template-columns:minmax(0,1fr); gap:14px; }
  .lap-simulation-stage [data-scene-primary-controls] label { font-size:13px; }
  .lap-simulation-stage [data-scene-primary-controls] select { font-size:16px; min-height:48px; }
  .lap-scene-evidence { margin-top:18px; }
  .lap-scene-evidence summary { min-height:46px; padding:14px 0; }
  .lap-scene-caption { font-size:13px; line-height:1.55; }
  .lap-delivery-row { gap:9px 12px; padding:17px 0; }
  .lap-delivery-row > :is(label,p,span):not(.lap-delivery-track) { font-size:16px; }
  .lap-delivery-row strong { font-size:33px; }
  .lap-delivery-track { height:23px; }
}
@media (max-width:360px) {
  .lap-simulation-stage { padding:16px 12px; }
  .lap-scene-header h3 { font-size:23px; }
  .lap-scene-metric strong { font-size:28px; }
  .lap-delivery-row strong { font-size:30px; }
}
@media (prefers-reduced-motion:reduce) {
  .lap-simulation-stage *, .lap-simulation-stage *::before, .lap-simulation-stage *::after {
    transition:none !important; animation:none !important;
  }
}
