#app {
  --accent: #ffc94a;
  --panel: #0d1420;
  --panel-2: #151f30;
  --line: #273449;
  --panel-w: 320px;
}
#stage { display: flex; flex-direction: column; background: #05070d; }
#nerve { width: 100%; flex: 1; min-height: 0; touch-action: none; }
#scenes, .stage-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: #0d1420;
}
#scenes { border-bottom: 1px solid var(--line); }
.stage-controls { border-top: 1px solid var(--line); }
#app button {
  min-height: 44px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--panel-2);
  cursor: pointer;
}
#scenes button { flex: 1; max-width: 155px; }
#scenes .on, #app #play {
  border-color: #99743b;
  background: #332719;
  color: #ffda8c;
}
#app button:hover { border-color: var(--accent); }
#app :focus-visible { outline: 2px solid #7ee081; outline-offset: 2px; }
#controlToggle { display: none; }
.stage-controls a { margin-left: auto; color: var(--muted); font-size: 12px; padding: 12px 2px; }
#panel p { line-height: 1.65; }
#panel h1 { line-height: 1.4; }
#panel label { display: block; }
#panel label b { float: right; color: var(--accent); font-variant-numeric: tabular-nums; }
#panel input[type=range] { width: 100%; height: 32px; margin: 0; }
#panel select { min-height: 44px; margin: 6px 0 10px; }
.readout { margin: 10px 0; }
.readout .big { color: var(--accent); font-variant-numeric: tabular-nums; }
.moments { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 4px 0 14px; }
#app .moments button { padding-inline: 3px; font-size: 12px; }
.note { color: var(--muted); font-size: 12px; }
#shareStatus { overflow-wrap: anywhere; }
[hidden] { display: none !important; }
#learn table { table-layout: fixed; white-space: normal; overflow-wrap: break-word; }
@media (max-width: 760px) {
  #scenes, .stage-controls { padding: 5px 8px; }
  #controlToggle { display: block; }
  #panel { bottom: 55px; max-height: calc(76% - 55px); }
  #panel.collapsed { visibility: hidden; }
}
