/* Legacy layout and paint share one cascade layer. Theme recipes own opt-in appearance. */
@layer legacy {
  :root {
    color-scheme: dark;
    font:
      16px/1.5 'Field Kit UI',
      system-ui,
      sans-serif;
    color: #e9f1ed;
    background: #101b28;
  }
  * {
    box-sizing: border-box;
  }
  body {
    margin: 0;
  }
  main {
    max-width: 1080px;
    margin: auto;
    padding: 24px;
  }
  h1 {
    font-family: 'Field Kit Display', 'Reveal Line Pixel', monospace;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: clamp(1.7rem, 4vw, 2.3rem);
  }
  nav,
  .controls,
  .cue-buttons,
  fieldset {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
  }
  a {
    color: #8fe0d8;
    text-underline-offset: 3px;
  }
  button,
  select {
    font: inherit;
    color: inherit;
    background: #253b4e;
    border: 1px solid #72909b;
    border-radius: 0;
    min-height: 44px;
    padding: 8px 12px;
  }
  button {
    cursor: pointer;
  }
  button:disabled {
    opacity: 0.55;
    cursor: wait;
  }
  :focus-visible {
    outline: 3px solid #ffd64a;
    outline-offset: 3px;
  }
  label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
  }
  input[type='checkbox'] {
    width: 20px;
    height: 20px;
    accent-color: #ffd64a;
  }
  input[type='range'] {
    width: 100%;
    min-height: 44px;
    accent-color: #ffd64a;
  }
  .controls {
    background: #182a3b;
    padding: 16px;
    border: 1px solid #516e7b;
  }
  .controls label {
    margin-left: auto;
  }
  .cue-buttons {
    width: 100%;
  }
  fieldset {
    min-width: 0;
    margin: 20px 0 8px;
    border: 1px solid #516e7b;
    padding: 10px 16px 16px;
  }
  .background-control {
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
  }
  .background-control select {
    min-width: 0;
    max-width: 100%;
  }
  legend {
    padding: 0 8px;
    font-weight: 600;
  }
  .note {
    color: #b0c3c9;
    font-size: 0.9rem;
  }
  .current-cue {
    font-weight: 600;
    min-height: 1.5em;
    color: #ffd64a;
  }
  .panes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  figure {
    margin: 0;
  }
  figcaption {
    margin-bottom: 8px;
    font-weight: 600;
  }
  canvas {
    display: block;
    width: 100%;
    max-width: 384px;
    height: auto;
    image-rendering: pixelated;
    border: 1px solid #617987;
    background: #152333;
  }
  .measurement {
    margin: 24px 0;
    border-top: 1px solid #516e7b;
    padding-top: 20px;
  }
  output {
    font-family: 'Field Kit Mono', monospace;
    font-variant-numeric: tabular-nums;
  }
  @media (max-width: 720px) {
    main {
      padding: 16px;
    }
    .panes {
      grid-template-columns: 1fr;
    }
    .controls label {
      margin-left: 0;
      width: 100%;
    }
  }
}
