:root {
  color-scheme: light;
  font-family: "Avenir Next", system-ui, sans-serif;
  background: #f5f0e8;
  color: #32251c;
  --surface: #fff;
  --border: #e2d8c9;
  --muted: #68594c;
  --accent: #81401e;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, select:focus-visible { outline: 3px solid #a65429; outline-offset: 3px; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem max(1.25rem, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.brand {
  display: flex;
  gap: .65rem;
  align-items: center;
  color: inherit;
  text-decoration: none;
  font-weight: 750;
}
.shell { max-width: 1160px; padding: 3rem 1.25rem 2rem; margin: auto; }
h1 { font-family: Georgia, serif; font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -.045em; margin: 0; line-height: 1.08; }
h2 { font-size: 1.2rem; margin: 0 0 .4rem; }
.intro { color: var(--muted); max-width: 55ch; line-height: 1.55; margin: 1rem 0 1.8rem; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(235px, 1fr); gap: 1rem; align-items: start; }
.document, .settings { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 1.15rem; }
.sections-head, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.sections-head { justify-content: space-between; gap: 1rem; }
.hint { color: var(--muted); margin: 0; font-size: .88rem; line-height: 1.5; }
button, select, .download {
  min-height: 42px;
  padding: .55rem .85rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: inherit;
  font: inherit;
}
button, select { cursor: pointer; }
button:disabled, select:disabled { opacity: .55; cursor: default; }
button:not(:disabled):hover { border-color: var(--accent); }
#choose, .primary { background: var(--accent); color: white; border-color: var(--accent); font-weight: 650; }
.empty { border: 1px dashed var(--border); border-radius: 10px; margin-top: 1rem; padding: 2rem 1rem; text-align: center; }
.empty p { margin: .4rem 0; line-height: 1.5; color: var(--muted); }
.settings label { font-weight: 650; display: block; margin-top: 1rem; margin-bottom: .35rem; }
.settings select, #convert, .download { width: 100%; }
.settings .hint { margin-top: .35rem; }
#convert, .download { display: block; text-align: center; margin-top: 1rem; }
.download { text-decoration: none; border-color: var(--accent); font-weight: 700; }
#status { font-size: .88rem; color: var(--muted); overflow-wrap: anywhere; }
#status:empty { display: none; }
footer { display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: center; padding: 1rem 1rem 2rem; }
.prose { max-width: 730px; line-height: 1.65; }
.prose section { border-top: 1px solid var(--border); padding: 1rem 0; margin-top: 1rem; }
@media (max-width: 700px) {
  .shell { padding-top: 1.6rem; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
}
#choose { margin-top: 0; }
input:focus-visible { outline: 3px solid #a65429; outline-offset: 3px; }
audio { display: block; width: 100%; margin: .75rem 0 .25rem; }
.file-status { color: var(--muted); font-size: .95rem; line-height: 1.5; overflow-wrap: anywhere; }
.settings .check { display: flex; align-items: center; gap: .4rem; }
.settings input[type="checkbox"] { width: 19px; height: 19px; accent-color: var(--accent); }
.time-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.time-fields label { font-size: .87rem; margin-top: .4rem; }
.time-fields input { width: 100%; min-height: 42px; border: 1px solid var(--border); border-radius: 7px; padding: .55rem .65rem; font: inherit; }
.playhead { width: 100%; margin-top: .4rem; font-size: .78rem; padding: .45rem; }
.error { color: #8a2518 !important; }
