/* Legacy layout and paint share one cascade layer. Theme recipes own opt-in appearance. */
@layer legacy {
  :root {
    color-scheme: dark;
    font-family: var(--fk-font-ui, 'Field Kit UI', sans-serif);
    background: #080d18;
    color: #edf4ff;
    font-size: 20px;
  }
  * {
    box-sizing: border-box;
  }
  body {
    margin: 0;
  }
  main {
    max-width: 1000px;
    margin: auto;
    padding: 18px;
  }
  nav {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 8px 0;
    background: #080d18;
  }
  h1 {
    font-size: clamp(26px, 4vw, 40px);
    letter-spacing: 0.06em;
    color: #81e5f3;
  }
  h2 {
    font-size: 26px;
  }
  p {
    line-height: 1.45;
  }
  fieldset,
  section {
    border: 2px solid #35425c;
    padding: 18px;
    margin: 20px 0;
    background: #111a2a;
    min-width: 0;
  }
  legend {
    color: #aee5ff;
    padding: 0 8px;
  }
  label {
    display: block;
    margin-bottom: 8px;
  }
  button,
  input,
  select,
  a,
  summary {
    font: inherit;
  }
  button,
  a,
  summary {
    min-height: 48px;
    padding: 11px 14px;
    border: 2px solid #526b91;
    border-radius: 0;
    background: #172840;
    color: #edf4ff;
    cursor: pointer;
  }
  a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
  }
  button:hover,
  a:hover {
    background: #274360;
  }
  :focus-visible {
    outline: 3px solid #ffb7de;
    outline-offset: 4px;
  }
  input,
  select {
    width: 100%;
    min-height: 48px;
    border: 2px solid #50647d;
    border-radius: 0;
    background: #080d18;
    color: #edf4ff;
    padding: 8px;
  }
  input[type='range'] {
    accent-color: #72dbe8;
    padding: 0;
  }
  input::file-selector-button {
    min-height: 42px;
    font: inherit;
    background: #274360;
    color: #edf4ff;
    border: 1px solid #8cabd3;
    margin-right: 10px;
  }
  .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
  }
  .time-controls {
    display: grid;
    gap: 8px;
  }
  .range-grid {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) minmax(8rem, 1fr);
    gap: 10px 16px;
    align-items: center;
    margin-bottom: 16px;
  }
  .range-grid label {
    margin: 0;
  }
  button:disabled,
  input:disabled,
  select:disabled {
    opacity: 0.5;
    cursor: default;
  }
  #video-poster-status {
    position: sticky;
    top: 72px;
    z-index: 1;
    padding: 12px;
    border-left: 4px solid #8ddceb;
    background: #122337;
    overflow-wrap: anywhere;
  }
  #video-poster-metadata,
  #video-poster-evidence,
  #video-poster-playback-evidence,
  #video-poster-transform-plan,
  #video-poster-trim-support,
  #video-poster-trim-evidence {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  #video-poster-image {
    display: block;
    width: 100%;
    max-height: 65vh;
    object-fit: contain;
    background: #000;
    image-rendering: auto;
  }
  #video-poster-hint {
    color: #becbde;
  }
  [hidden] {
    display: none !important;
  }
  @media (max-width: 520px) {
    :root {
      font-size: 18px;
    }
    main {
      padding: 12px;
    }
    fieldset,
    section {
      padding: 12px;
    }
    .actions {
      display: grid;
    }
    .range-grid {
      grid-template-columns: 1fr;
    }
    button {
      width: 100%;
    }
  }
}
