#app { --force-one: #77d8e3; --force-two: #f29e88; --force-sum: #ffc94a; }
#stage { display: flex; flex-direction: column; background: #05070d; }
.stage-head, .live, .stage-foot { margin-inline: clamp(16px, 3vw, 36px); }
.stage-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  gap: 10px 16px; padding: 16px 0 10px;
}
.stage-head h1 { font-size: 18px; font-weight: 600; margin: 0; }
.stage-head p { color: #a5b1c3; font-size: 12px; margin: 3px 0 0; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.actions button, #panelToggle {
  font: inherit; font-size: 12px; color: var(--text); background: #141c29;
  border: 1px solid var(--line); border-radius: 7px; padding: 5px 10px;
  min-height: 38px; cursor: pointer; white-space: nowrap;
}
.actions button:hover, #panelToggle:hover { border-color: #8090a7; }
.actions button.on {
  color: var(--force-sum); background: #272217; border-color: #a58138;
}
.scene-switch { gap: 3px; padding: 3px; background: #0d131e; border: 1px solid #253144; border-radius: 10px; }
.scene-switch button { border-color: transparent; background: transparent; }
.live { display: flex; gap: 20px; padding: 8px 0; border-top: 1px solid #222d3e; }
.live div { display: flex; align-items: baseline; gap: 8px; }
.live small { color: #a5b1c3; font-size: 11px; }
.live b { font-size: 18px; color: var(--force-sum); font-weight: 600; font-variant-numeric: tabular-nums; }
#liveAngle { color: #e6ebf2; }
.plot { flex: 1; min-height: 0; }
#lab { width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.stage-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 2px 10px; padding: 8px 0; border-top: 1px solid #222d3e;
}
.stage-foot a { color: #a5b1c3; font-size: 12px; padding-block: 7px; text-decoration: none; }
.stage-foot a:hover { color: var(--force-sum); }
#panel { background: #111723; padding-top: 16px; }
#panel section + section { margin-top: 10px; }
#panel h2 { color: var(--text); letter-spacing: normal; }
#summary { color: var(--force-sum); font-size: 15px; font-weight: 600; line-height: 1.4; }
#name1, #read1 { color: var(--force-one); }
#name2, #read2 { color: var(--force-two); }
.readout dl { grid-template-columns: 1fr auto; font-variant-numeric: tabular-nums; }
.readout dd { text-align: right; }
.force-group {
  --force-color: var(--force-sum);
  margin-bottom: 6px; padding: 0 8px; border-radius: 6px;
  border-inline-start: 2px solid var(--force-color); background: #171f2c;
}
.force-one { --force-color: var(--force-one); }
.force-two { --force-color: var(--force-two); }
.slider { grid-template-columns: 73px minmax(0, 1fr) 34px; margin: 0; min-height: 36px; }
.slider span { font-size: 12px; }
.slider input { margin: 0; accent-color: var(--force-color); height: 32px; }
.switch { min-height: 40px; font-size: 12px; }
#records { font-size: 12px; color: #aeb9c9; line-height: 1.8; }
#records:not(:empty) { margin: 8px 0; }
#share { margin-top: 6px; min-height: 40px; }
#shareNote { overflow-wrap: anywhere; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid #4fc3f7; outline-offset: 2px; }
.learn th, .learn td { white-space: normal; }
[hidden] { display: none !important; }

@media (max-width: 760px) {
  .stage-head { padding-top: 9px; gap: 6px 8px; }
  .stage-head > div:first-child { grid-column: 1 / -1; }
  .stage-head h1, .live b { font-size: 16px; }
  .stage-head p { font-size: 11px; }
  .scene-switch { justify-self: start; flex-wrap: nowrap; }
  .actions button, #panelToggle, #share { min-height: 44px; }
  #panelToggle { position: relative; inset: auto; justify-self: end; }
  .live { padding-block: 5px; }
  .stage-foot { padding-block: 4px; }
  .stage-foot .actions { flex-wrap: nowrap; gap: 4px; }
  .stage-foot .actions button { padding-inline: 7px; }
  .stage-foot a { display: flex; align-items: center; min-height: 44px; }
  .slider, .switch { min-height: 44px; }
  .slider input { height: 42px; }
  #app { --drawer-height: min(43%, 360px); }
  #panel { height: var(--drawer-height); max-height: none; }
  #panel.collapsed { visibility: hidden; }
  .parameters-open #stage { bottom: var(--drawer-height); }
  .parameters-open .stage-foot { display: none; }
  .learn th, .learn td { padding: 7px; font-size: 12px; }
}
@media (max-height: 480px) and (max-width: 760px) {
  #app { min-height: 490px; }
}
@media (prefers-reduced-motion: reduce) {
  #panel { transition: none; }
}
