:root {
  color-scheme: light;
  --ink: #241f31;
  --muted: #50465f;
  --accent: #573989;
  --line: #dfd7e9;
  --paper: #fff;
  --bg: #f6f3f9;
  font: 16px 'Avenir Next', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); }
header, footer { display: flex; gap: 1rem; align-items: center; padding: .8rem max(1rem, calc((100vw - 1100px) / 2)); background: var(--paper); }
header { justify-content: space-between; border-bottom: 1px solid var(--line); }
footer { border-top: 1px solid var(--line); font-size: .88rem; }
a { color: var(--accent); }
.brand { display: flex; align-items: center; gap: .55rem; color: inherit; font-weight: 700; text-decoration: none; }
main { max-width: 1140px; margin: auto; padding: 2.3rem 1.25rem; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.04em; line-height: 1.09; margin: 0; }
h2 { font-size: 1.24rem; margin: 0; }
p { line-height: 1.55; }
.intro, .muted { color: var(--muted); margin: .42rem 0; }
.editor { display: grid; align-items: start; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1rem; margin-top: 1.2rem; }
.panel { border: 1px solid var(--line); border-radius: .8rem; background: var(--paper); padding: 1rem; }
.row, .shift { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem; }
.shift { margin-top: .75rem; }
label, .field { font-weight: 620; }
label > input:not([type="file"]) { display: block; margin-top: .25rem; width: 7rem; }
.field { display: block; margin: .85rem 0 .36rem; }
input, button, textarea, .file-button { font: inherit; color: inherit; border: 1px solid #bfb2cf; background: #fdfbff; border-radius: .42rem; padding: .48rem .62rem; }
button, .file-button { cursor: pointer; }
button:hover, .file-button:hover { background: #eee7f8; }
button:disabled { opacity: .52; cursor: default; }
button.primary { background: var(--accent); color: white; border-color: var(--accent); font-weight: 680; }
.file-button { position: relative; overflow: hidden; }
.file-button input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
textarea { display: block; width: 100%; min-height: 11rem; resize: vertical; line-height: 1.55; font-family: ui-monospace, monospace; }
video { width: 100%; max-height: 17rem; background: #1c1627; border-radius: .48rem; margin-top: .75rem; }
:focus-visible, .file-button:focus-within { outline: 3px solid #8e61c3; outline-offset: 2px; }
.issues { color: #8e2c30; margin: .7rem 0; padding-left: 1.3rem; overflow-wrap: anywhere; }
#chapters { list-style: none; margin: .75rem 0; padding: 0; }
#chapters li { display: grid; grid-template-columns: minmax(4rem,auto) minmax(0,1fr) auto; gap: .55rem; align-items: center; padding: .56rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.time { font: 600 .9rem ui-monospace, monospace; white-space: nowrap; text-align: left; }
.length { font-size: .82rem; color: var(--muted); }
.actions { margin-top: .85rem; }
#shift-status:empty, #video-status:empty, #export-status:empty { display: none; }
.info { max-width: 800px; }
.info section { margin: 0 0 .9rem; scroll-margin-top: .8rem; }
@media (max-width: 740px) { main { padding: 1.35rem .85rem; } .editor { grid-template-columns: minmax(0,1fr); } }
