:root {
  --bg: #060b10;
  --panel: #091219;
  --panel-2: #0c1720;
  --ink: #e7eff3;
  --ink-dim: #9aadb7;
  --ink-faint: #5f737e;
  --line: rgba(159, 190, 204, 0.16);
  --line-2: rgba(159, 190, 204, 0.28);
  --cold: #7ad9ff;
  --cold-2: #2a9fe8;
  --hot: #ff9738;
  --hot-2: #ff4e2c;
  --gold: #d6a85f;
  --green: #79e0b8;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, "SF Pro Display", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(.22,.8,.22,1);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background:
    radial-gradient(1200px 700px at 50% -12%, rgba(33, 78, 98, 0.26), transparent 65%),
    radial-gradient(900px 500px at 78% 105%, rgba(92, 48, 24, 0.13), transparent 70%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  padding: clamp(10px, 1.6vw, 26px);
  display: grid;
  place-items: center;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.11) .55px, transparent .55px);
  background-size: 6px 6px;
  opacity: .09;
  mix-blend-mode: soft-light;
}

button, input { font: inherit; }
button { color: inherit; }

.figure {
  width: min(1520px, 100%);
  border: 1px solid rgba(171, 204, 219, .18);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.025), transparent 18%),
    linear-gradient(180deg, #0a141b 0%, #081117 58%, #071017 100%);
  box-shadow:
    0 50px 100px -38px rgba(0,0,0,.95),
    0 0 0 1px rgba(0,0,0,.5) inset,
    0 1px 0 rgba(255,255,255,.06) inset;
  overflow: hidden;
  position: relative;
}

.figure::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 90px rgba(90, 168, 199, .045) inset;
}

.figure-head {
  display: grid;
  grid-template-columns: 236px minmax(380px, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding: 25px 30px 16px;
  position: relative;
  z-index: 3;
}

.brand { padding-bottom: 5px; }
.brand-line {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .17em;
  color: var(--ink-dim);
  white-space: nowrap;
}
.fig-no { color: var(--ink); }
.brand-rule { width: 25px; height: 1px; background: var(--line-2); }
.brand-sub {
  margin-top: 8px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .2em;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cold);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .18em;
  opacity: .8;
}

h1 {
  margin: 0;
  font-size: clamp(25px, 3.2vw, 44px);
  line-height: 1.02;
  letter-spacing: -.035em;
  font-weight: 620;
}

.dek {
  max-width: 650px;
  margin: 9px 0 0;
  color: var(--ink-dim);
  font-size: 12px;
  line-height: 1.65;
  letter-spacing: .01em;
}

.live-state {
  min-width: 250px;
  padding: 13px 15px 12px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(122,217,255,.045), transparent 70%),
    rgba(4, 11, 16, .46);
  border-radius: 13px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18) inset;
}
.status-top {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .13em;
  color: var(--ink-dim);
  white-space: nowrap;
}
.pulse {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(121,224,184,.85);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .35; } }
.status-code { margin-left: auto; color: var(--ink-faint); }
.status-code b { color: var(--ink); font-weight: 500; }
.status-main {
  margin-top: 7px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--mono);
  font-size: 24px;
  letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
}
.status-main small { font-size: 9px; letter-spacing: .1em; color: var(--ink-faint); }
.status-sub {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .09em;
  color: var(--ink-faint);
}
.status-sub b { color: var(--ink-dim); font-weight: 500; }

.stage {
  position: relative;
  height: clamp(500px, 63vh, 700px);
  margin: 0 10px;
  border-top: 1px solid rgba(167, 201, 217, .09);
  border-bottom: 1px solid rgba(167, 201, 217, .09);
  background:
    radial-gradient(58% 72% at 48% 50%, rgba(46, 96, 116, .16), transparent 72%),
    linear-gradient(90deg, rgba(7,16,23,.6), transparent 12%, transparent 88%, rgba(7,16,23,.6));
  overflow: hidden;
}
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(127,175,195,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127,175,195,.055) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 72% 70% at 52% 53%, #000 20%, transparent 78%);
  opacity: .55;
}
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8,17,23,.86), transparent 16%, transparent 79%, rgba(8,17,23,.72)),
    radial-gradient(88% 104% at 50% 50%, transparent 56%, rgba(2,7,11,.52) 100%);
}
body[data-phase]:not([data-phase="0"]) .stage::after {
  background:
    linear-gradient(180deg, rgba(8,17,23,.9), transparent 18%, transparent 73%, rgba(8,17,23,.84)),
    radial-gradient(78% 94% at 50% 47%, transparent 42%, rgba(2,7,11,.72) 100%);
}

.stage-meta {
  position: absolute;
  top: 15px; left: 20px; right: 20px;
  display: flex;
  justify-content: space-between;
  z-index: 4;
  pointer-events: none;
  color: rgba(158, 186, 200, .40);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .16em;
}

#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#scene text { font-family: var(--mono); }

.drag-note {
  position: absolute;
  right: 20px;
  bottom: 17px;
  z-index: 4;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .12em;
  transition: opacity .3s ease;
  pointer-events: none;
}
body[data-phase]:not([data-phase="0"]) .drag-note { opacity: 0; }

/* ---------- tooltip ---------- */
.tooltip {
  position: absolute;
  z-index: 20;
  left: 0; top: 0;
  width: 270px;
  padding: 12px 13px 12px;
  border: 1px solid rgba(154, 205, 226, .3);
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(142,215,245,.075), transparent),
    rgba(5, 13, 18, .94);
  box-shadow: 0 16px 40px rgba(0,0,0,.62), 0 0 0 1px rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translate3d(0, 6px, 0);
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
}
.tooltip.on { opacity: 1; transform: translate3d(0, 0, 0); }
.tooltip-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
}
.tooltip-top span:last-child {
  color: var(--cold);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .13em;
  font-weight: 500;
  white-space: nowrap;
}
.tooltip p {
  margin: 6px 0 0;
  color: var(--ink-dim);
  font-size: 10.5px;
  line-height: 1.6;
}

/* ---------- classroom ---------- */
.lesson-rail {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 15px;
  transform: translate(-50%, -8px);
  display: flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid rgba(152, 196, 215, .2);
  border-radius: 999px;
  background: rgba(6, 14, 20, .76);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease, transform .45s var(--ease);
}
body.in-class .lesson-rail { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.lesson-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  background: transparent;
  color: var(--ink-faint);
  font-size: 10px;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .25s ease, color .25s ease;
}
.lesson-chip span {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .1em;
  color: rgba(159, 188, 202, .52);
}
.lesson-chip:hover { color: var(--ink-dim); background: rgba(255,255,255,.04); }
.lesson-chip.active {
  color: #e9fbff;
  background: linear-gradient(180deg, rgba(104,204,240,.20), rgba(70,156,189,.10));
  box-shadow: 0 0 0 1px rgba(123,215,246,.26) inset;
}
.lesson-chip.active span { color: var(--cold); }
.lesson-chip.done span { color: var(--green); }

.class-note {
  position: absolute;
  z-index: 9;
  left: 24px;
  bottom: 21px;
  width: min(450px, calc(100% - 48px));
  padding: 18px 20px 15px;
  border: 1px solid rgba(144, 198, 219, .24);
  border-left: 2px solid rgba(122,217,255,.76);
  border-radius: 6px 15px 15px 6px;
  background:
    linear-gradient(120deg, rgba(108,196,228,.08), transparent 48%),
    rgba(5, 13, 18, .90);
  box-shadow: 0 22px 55px rgba(0,0,0,.55);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity .4s ease, transform .55s var(--ease);
}
body.in-class .class-note { opacity: 1; transform: translateY(0); }
.note-head { display: flex; align-items: center; justify-content: space-between; }
.note-index {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--cold);
  letter-spacing: .12em;
}
.note-kicker {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .18em;
  color: var(--ink-faint);
}
.class-note h2 {
  margin: 7px 0 6px;
  font-size: 23px;
  letter-spacing: -.02em;
  font-weight: 620;
}
.class-note p {
  min-height: 44px;
  margin: 0;
  color: var(--ink-dim);
  font-size: 11.5px;
  line-height: 1.7;
}
.note-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 13px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .1em;
}
.note-progress { flex: 1; height: 1px; background: rgba(154,190,205,.18); position: relative; overflow: hidden; }
.note-progress i { position: absolute; inset: 0 auto 0 0; width: 20%; background: var(--cold); transition: width .45s var(--ease); }

/* ---------- console ---------- */
.console {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(250px, .72fr) minmax(540px, 1.65fr) minmax(220px, .62fr);
  gap: clamp(18px, 2.4vw, 38px);
  align-items: stretch;
  padding: 18px 30px 20px;
  background: linear-gradient(180deg, rgba(4,10,14,.24), rgba(4,10,14,.6));
}
.console-label {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .16em;
  color: var(--ink-faint);
}

.throttle-block { padding-top: 2px; }
.throttle-head { display: flex; align-items: baseline; justify-content: space-between; }
.throttle-read { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.throttle-read b { font-size: 25px; font-weight: 450; letter-spacing: -.06em; }
.throttle-read small { margin-left: 2px; font-size: 9px; color: var(--ink-faint); }

.throttle-track { position: relative; height: 36px; margin-top: 6px; }
.throttle-track input {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  z-index: 3;
  left: 0; top: 0;
  width: 100%; height: 34px;
  margin: 0;
  background: transparent;
  cursor: ew-resize;
}
.throttle-track input::-webkit-slider-runnable-track { height: 34px; background: transparent; }
.throttle-track input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 21px; height: 21px;
  margin-top: 6px;
  border-radius: 50%;
  border: 1px solid rgba(208,243,255,.92);
  background:
    radial-gradient(circle at 38% 35%, #fff, #9edcf4 38%, #3983a0 74%);
  box-shadow: 0 0 0 5px rgba(93,185,222,.10), 0 0 20px rgba(78,193,238,.28), 0 3px 9px rgba(0,0,0,.7);
  cursor: grab;
}
.throttle-track input::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(.96); }
.throttle-track input::-moz-range-track { height: 34px; background: transparent; }
.throttle-track input::-moz-range-thumb {
  width: 21px; height: 21px; border: 1px solid #d0f3ff; border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #fff, #9edcf4 38%, #3983a0 74%);
  box-shadow: 0 0 0 5px rgba(93,185,222,.1), 0 0 20px rgba(78,193,238,.28);
}
.range-rail {
  position: absolute;
  left: 0; right: 0; top: 16px;
  height: 2px;
  background: rgba(150,188,204,.18);
  box-shadow: 0 1px 0 rgba(255,255,255,.02);
}
.range-rail i {
  display: block;
  height: 100%;
  width: 20%;
  background: linear-gradient(90deg, #4d95ad, #8ddcf7 58%, #f0b377 100%);
  box-shadow: 0 0 11px rgba(109,208,241,.3);
}
.range-tick {
  position: absolute;
  top: -4px;
  width: 1px; height: 10px;
  background: rgba(154,190,205,.26);
}
.throttle-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 1px;
  color: rgba(129,156,169,.7);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .12em;
}
.preset-row { display: flex; gap: 5px; margin-top: 9px; }
.preset {
  border: 1px solid rgba(150,187,203,.15);
  background: rgba(255,255,255,.018);
  color: var(--ink-faint);
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 9px;
  cursor: pointer;
  transition: .2s ease;
}
.preset:hover, .preset.on { border-color: rgba(135,207,238,.4); color: var(--ink); background: rgba(112,201,238,.07); }

.metrics-block {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid rgba(151,187,203,.13);
  background: rgba(151,187,203,.13);
  border-radius: 12px;
  overflow: hidden;
}
.metric {
  position: relative;
  min-width: 0;
  padding: 10px 13px 9px;
  background:
    linear-gradient(180deg, rgba(115,192,221,.03), transparent 58%),
    rgba(7, 15, 21, .76);
}
.metric.hot { background:
    linear-gradient(180deg, rgba(255,151,56,.045), transparent 58%),
    rgba(7, 15, 21, .76);
}
.metric-label {
  display: flex;
  gap: 6px;
  align-items: baseline;
  justify-content: space-between;
  color: var(--ink-dim);
  font-size: 9.5px;
  white-space: nowrap;
}
.metric-label small { font-family: var(--mono); font-size: 7px; color: var(--ink-faint); letter-spacing: .1em; }
.metric-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 4px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.055em;
}
.metric-value b { font-size: clamp(19px, 2.1vw, 28px); font-weight: 430; line-height: 1; white-space: nowrap; }
.metric.hot .metric-value b { color: #ffc58f; }
.metric-value span { font-size: 8px; color: var(--ink-faint); letter-spacing: .04em; }
.metric-foot {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-top: 7px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .07em;
  white-space: nowrap;
}
.metric-foot span:last-child { color: rgba(163,196,210,.68); }
.metric-spark { display: block; width: 100%; height: 17px; margin-top: 4px; overflow: visible; }
.spark-base { fill: none; stroke: rgba(147,182,198,.12); stroke-width: 1; }
.spark-line { fill: none; stroke: rgba(124,213,246,.62); stroke-width: 1.1; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.metric.hot .spark-line { stroke: rgba(255,156,67,.72); }

.t4-scale { position: relative; height: 17px; margin-top: 5px; background: linear-gradient(90deg, rgba(93,171,201,.22), rgba(255,151,56,.32), rgba(255,78,44,.55)); border-radius: 1px; overflow: hidden; }
.t4-scale::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 19px, rgba(6,14,20,.65) 19px 20px); }
.t4-scale i { position: absolute; inset: 0 auto 0 0; width: 20%; background: rgba(255,249,229,.1); }
.t4-scale b { position: absolute; top: -2px; bottom: -2px; left: 20%; width: 1px; background: #fff; box-shadow: 0 0 5px #fff; }

.split-bar { height: 17px; margin-top: 5px; background: rgba(83,164,201,.16); position: relative; }
.split-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(63,149,195,.5), rgba(122,217,255,.6)); }
.split-bar span { position: absolute; inset: 0 0 0 90.9%; background: rgba(255,151,56,.45); }

.controls-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  padding-left: 2px;
}
.key-line { display: flex; align-items: center; gap: 9px; color: var(--ink-faint); font-size: 9px; }
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 19px;
  padding: 0 5px;
  border: 1px solid rgba(163,198,213,.26);
  border-bottom-color: rgba(163,198,213,.4);
  border-radius: 4px;
  background: rgba(255,255,255,.028);
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .05em;
}
.action {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(144,206,231,.32);
  border-radius: 6px;
  padding: 6px 10px;
  background: linear-gradient(180deg, rgba(113,202,236,.10), rgba(113,202,236,.025));
  color: var(--ink);
  font-size: 9.5px;
  cursor: pointer;
  transition: .25s ease;
}
.action small { font-family: var(--mono); font-size: 7px; color: var(--cold); }
.action:hover { background: rgba(113,202,236,.16); border-color: rgba(144,206,231,.55); }
body.exploded .action { border-color: rgba(255,171,94,.55); background: rgba(255,151,56,.1); }
body.exploded .action small { color: var(--hot); }

/* ---------- svg interaction ---------- */
#scene .part { cursor: crosshair; }
#scene .part-hover {
  filter: drop-shadow(0 0 6px rgba(123,217,250,.72)) brightness(1.08);
}
#scene .part-hover path,
#scene .part-hover ellipse,
#scene .part-hover polygon { outline: none; }

#machine { transition: opacity .3s ease; }
body.low-power #machine { opacity: .82; }

body[data-phase="1"] #machine [data-art]:not(.phase-on) { opacity: .32; filter: saturate(.35); }
body[data-phase="2"] #machine [data-art]:not(.phase-on) { opacity: .32; filter: saturate(.35); }
body[data-phase="3"] #machine [data-art]:not(.phase-on) { opacity: .32; filter: saturate(.35); }
body[data-phase="4"] #machine [data-art]:not(.phase-on) { opacity: .32; filter: saturate(.35); }
body[data-phase="5"] #machine [data-art]:not(.phase-on) { opacity: .32; filter: saturate(.35); }
body[data-phase="1"] #machine [data-art].phase-on,
body[data-phase="2"] #machine [data-art].phase-on,
body[data-phase="3"] #machine [data-art].phase-on,
body[data-phase="4"] #machine [data-art].phase-on,
body[data-phase="5"] #machine [data-art].phase-on {
  opacity: 1;
  filter: drop-shadow(0 0 7px rgba(114,213,247,.18));
  transition: opacity .5s ease, filter .5s ease;
}
#machine [data-art] { transition: opacity .5s ease, filter .5s ease; }

.module { transition: transform .88s cubic-bezier(.2,.82,.22,1); will-change: transform; }
body.exploded [data-module="fan"] { transform: translateX(-72px); }
body.exploded [data-module="compressor"] { transform: translateX(-22px); }
body.exploded [data-module="combustor"] { transform: translateX(18px); }
body.exploded [data-module="turbine"] { transform: translateX(56px); }
body.exploded [data-module="nozzle"] { transform: translateX(108px); }
.module-tag { opacity: 0; transition: opacity .3s ease .35s; pointer-events: none; }
body.exploded .module-tag { opacity: 1; }
body.exploded #flowLayer { opacity: .2; transition: opacity .5s ease; }
#flowLayer { transition: opacity .5s ease; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .figure-head { grid-template-columns: 190px 1fr auto; gap: 18px; padding: 20px 22px 14px; }
  .live-state { min-width: 215px; }
  .console { grid-template-columns: 230px 1fr 175px; gap: 18px; padding: 16px 22px 18px; }
  .metrics-block { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(n+3) { border-top: 1px solid rgba(151,187,203,.13); }
}

@media (max-width: 900px) {
  body { padding: 0; display: block; }
  .figure { border-radius: 0; border-left: 0; border-right: 0; min-height: 100vh; }
  .figure-head { grid-template-columns: 1fr auto; gap: 12px; padding: 16px 17px 12px; }
  .brand { display: none; }
  .title-block { grid-column: 1 / 2; }
  .dek { max-width: 88%; font-size: 11px; }
  .live-state { grid-column: 2 / 3; grid-row: 1 / 3; min-width: 174px; padding: 10px 12px; }
  .status-main { font-size: 19px; }
  .status-sub { font-size: 6.5px; }
  .stage { height: min(54vh, 470px); margin: 0 4px; }
  .stage-meta { font-size: 6.5px; }
  .console { grid-template-columns: 1fr; gap: 15px; padding: 16px 17px 20px; }
  .metrics-block { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .metric { padding: 9px 9px 8px; }
  .metric:nth-child(n+3) { border-top: 0; }
  .controls-block { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 0; }
  .action { margin-left: auto; margin-top: 0; }
  .lesson-rail { top: 10px; max-width: calc(100% - 20px); }
  .lesson-chip { padding: 6px 8px; font-size: 9px; }
  .class-note { left: 12px; bottom: 12px; width: calc(100% - 24px); padding: 13px 15px 12px; }
  .class-note h2 { font-size: 19px; margin: 5px 0 4px; }
  .class-note p { min-height: 0; font-size: 10.5px; }
}

@media (max-width: 620px) {
  .figure-head { grid-template-columns: 1fr; }
  .live-state { grid-column: 1; grid-row: auto; min-width: 0; display: none; }
  .dek { max-width: 100%; }
  .stage { height: 43vh; min-height: 300px; }
  .stage-meta { display: none; }
  .console { gap: 13px; }
  .metrics-block { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(n+3) { border-top: 1px solid rgba(151,187,203,.13); }
  .lesson-chip span { display: none; }
  .lesson-chip { flex: 1; justify-content: center; padding: 6px 4px; font-size: 8.5px; }
  .lesson-rail { width: calc(100% - 18px); }
  .hide-small { display: none; }
  .controls-block { gap: 8px 13px; }
  .key-line { font-size: 8px; }
  .figure-head h1 { font-size: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
