:root {
  --tc-hero-ink: #094174;
  --tc-hero-soft: #1b5faa;
  --tc-hero-found: #158179;
  --ink-blue: #094174;
  --sky: #90cef1;
  --sl-font: system-ui, "Noto Sans CJK SC", sans-serif;
  --sl-font-mono: ui-monospace, monospace;
  --font-heading: var(--sl-font);
  font: 16px/1.45 var(--sl-font);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; color: #f2f8fc; background: #123653; }
:root .tc-lab[data-theme=dark], :root .tc-hero, :root .tc-quiz {
  --tc-surface: #123653; --tc-panel: #193f5c; --tc-panel-2: #234d6b;
  --tc-field: #0c293e; --tc-grid: #31556c; --tc-line: #507189;
  --tc-ink: #f2f8fc; --tc-deep: white; --tc-muted: #c5dbe8; --tc-ghost: #a6bbc9;
  --tc-accent: var(--sky); --tc-pressed: var(--sky); --tc-on-pressed: #092c47;
  --tc-robot: #1b5faa; --tc-bumper: var(--sky); --tc-wheel: #dbefff;
  --tc-vec: #ffc107; --tc-vec-2: #66ccec; --tc-vec-3: #a2db7d;
  --tc-hero-soft: var(--sky);
  --tc-mono: var(--sl-font-mono);
}
main { max-width: 72rem; margin: auto; }
main > :is(.tc-lab, .tc-quiz) { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.tc-lab-body { padding: 1rem; }
.tc-quiz { background: var(--tc-surface); color: var(--tc-ink); }
.tc-verdict, .tc-readout, .tc-legend, .tc-quiz-why { font-size: 1rem; }
[hidden] { display: none !important; }
html:has(.hero), body.hero { color-scheme: light; background: transparent; }
main .tc-hero::after { display: none; }
main .tc-hero .tc-hero-text { left: 0; width: 40%; }
.cover .tc-lab { border: 0; padding: 0; }
.cover { overflow: hidden; }
main .tc-hero { width: 100vw; height: 100vh; margin: 0; border-radius: 0; background: transparent; }
main .tc-hero canvas { width: 100%; height: 100%; max-height: none; }
.cover main { width: 100%; max-width: none; }
.cover .tc-lab-body {
  display: flex; flex-direction: column; justify-content: center; align-items: stretch;
  gap: 1.1rem; padding: 1.25rem; height: 100vh;
}
.cover .tc-lab-body > :not(.stage-visual, .stage-controls),
.cover .stage-controls.tc-row > :not(.stage-control) { display: none; }
.cover .stage-visual { order: 0; }
.cover .stage-controls { order: 1; margin: 0; justify-content: center; align-self: center; }
.cover .tc-lab-body > canvas.stage-visual {
  flex: 1 1 0; min-height: 0 !important; max-height: none !important;
  width: 100%; height: 0; aspect-ratio: auto; margin: 0 !important;
}
.cover .tc-elastic.stage-visual { flex: 0 1 auto; }
.cover .tc-toggle, .cover .tc-btn, .cover .tc-select { font: 600 1rem/1.25 var(--sl-font); }
.cover .tc-toggle button { font: inherit; min-height: 2.55rem; padding-inline: .85rem; }
.cover .tc-btn, .cover .tc-select { min-height: 2.55rem; }
.cover .tc-control:has(input[type=range]) { width: min(22rem, 85vw); }
.cover input[type=range] { width: 100%; accent-color: var(--sky); }
.cover :focus-visible { outline: 3px solid #ffc107; outline-offset: 2px; }
@media (max-width: 560px) {
  .cover .tc-lab-body { gap: .5rem; padding: .6rem; }
  .cover .tc-toggle button { min-height: 2rem; padding-inline: .4rem; }
}
