:root {
  color-scheme: light;
  font-family: 'DM Sans', system-ui, sans-serif;
  background: #f2f4f7;
  color: #162637;
  --muted: #4d6173;
  --line: #d3dce5;
  --accent: #164c70;
  --paper: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .2em; }
header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .88rem max(1rem, calc((100vw - 1110px) / 2)); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; gap: .58rem; align-items: center; text-decoration: none; color: #173c56; font-weight: 720; }
.brand img { border-radius: .45rem; }
main, footer { width: min(1110px, calc(100% - 2rem)); margin-inline: auto; }
h1, h2, p { margin: 0; }
.intro { padding: 2.9rem 0 1.5rem; }
h1 { font-size: clamp(2.12rem, 5.4vw, 3.72rem); line-height: 1.06; letter-spacing: -.06em; }
.intro p { color: var(--muted); margin-top: .55rem; font-size: 1.06rem; }
.workbench { display: grid; grid-template-columns: minmax(275px,.77fr) minmax(0,1.23fr); gap: 1.05rem; align-items: start; }
.settings, .output { padding: 1.05rem; min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: .75rem; }
#drop { padding: 1.12rem .7rem; text-align: center; background: #f4f7fa; border: 1px dashed #9eb2c3; border-radius: .52rem; }
#drop.dragging { background: #d9ebf7; }
button, .button, .file-button, input, select { font: inherit; border: 1px solid var(--line); border-radius: .42rem; background: var(--paper); color: inherit; }
button, .button, .file-button { min-height: 42px; padding: .57rem .83rem; font-weight: 690; cursor: pointer; font-size: .88rem; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
button:hover:not(:disabled), .button:hover, .file-button:hover { background: #eaf3fa; }
button:disabled { opacity: .6; cursor: default; }
.primary { color: #fff; border-color: var(--accent); background: var(--accent); }
.primary:hover:not(:disabled), a.primary:hover { background: #235e86; }
.quiet { background: transparent; border-color: transparent; color: var(--accent); min-height: 32px; text-decoration: underline; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
:focus-visible, .file-button:has(+ input:focus-visible) { outline: 2px solid #357bad; outline-offset: 2px; }
.guide { color: var(--muted); font-size: .82rem; line-height: 1.55; margin-top: .48rem; }
.source { color: var(--muted); font-size: .87rem; overflow-wrap: anywhere; margin: .65rem 0 1rem; }
.source:empty { display: none; }
.limit { margin: 1.1rem 0 .85rem; }
label:not(.file-button) { display: block; font-size: .88rem; font-weight: 710; padding-bottom: .39rem; }
.limit-fields, .actions, .output-header { display: flex; gap: .5rem; }
input, select { min-height: 43px; padding: .54rem; }
#amount { flex: 1; min-width: 0; }
#audio { width: 100%; }
.actions { margin-top: 1rem; }
progress { margin-top: .7rem; width: 100%; accent-color: var(--accent); }
#status { font-size: .85rem; line-height: 1.5; min-height: 1.3rem; margin-top: .6rem; color: var(--muted); }
#status.error { padding: .55rem; background: #fef0ed; color: #852a23; border-radius: .36rem; }
.output-header { justify-content: space-between; align-items: center; margin-bottom: .75rem; }
h2 { font-size: 1.21rem; }
.stage { display: grid; align-items: center; min-height: 250px; background: #162b3e; color: #e1edf6; border-radius: .48rem; overflow: hidden; text-align: center; }
video { display: block; width: 100%; max-height: 480px; margin-inline: auto; }
#metadata { margin-top: .7rem; font-size: .93rem; color: #173c56; line-height: 1.5; }
#metadata:empty { display: none; }
footer { display: flex; gap: 1rem; margin-top: 1.45rem; margin-bottom: 1.5rem; font-size: .85rem; }
.info { max-width: 720px; line-height: 1.65; }
.info section { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.info p { margin-top: .48rem; }
[hidden] { display: none !important; }
@media (max-width: 720px) { .workbench { grid-template-columns: 1fr; } .intro { padding: 1.6rem 0 1.05rem; } .stage { min-height: 200px; } }
