:root {
  color-scheme: dark;
  font-family: "Avenir Next", ui-sans-serif, system-ui, sans-serif;
  background: #141614;
  color: #f4f1e8;
  --muted: #a8b1a6;
  --line: #3b433c;
  --acid: #d9f998;
  --surface: #202520;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; }
button, input { font: inherit; }
button, a, input { touch-action: manipulation; }
:focus-visible { outline: 2px solid #f9e8ae; outline-offset: 4px; }
[hidden] { display: none !important; }
.topbar { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 max(22px, calc((100vw - 1120px) / 2)); border-bottom: 1px solid var(--line); }
.topbar a { text-decoration: none; font-weight: 650; }
.brand { white-space: nowrap; display: flex; align-items: center; gap: 10px; }
.topbar a:last-child { color: var(--muted); font-size: .92rem; }
.shell { width: min(1120px, calc(100% - 44px)); margin: auto; }
.intro { padding: 59px 0 30px; }
h1 { font-size: clamp(2.25rem, 5.5vw, 4.4rem); letter-spacing: -.068em; line-height: 1.03; margin: 0; }
p { margin: 0; }
.intro p { margin-top: 12px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.12rem); }
.studio { display: grid; gap: 16px; grid-template-columns: minmax(280px, 375px) minmax(0, 1fr); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 24px; min-width: 0; }
.file-label { font-weight: 700; }
.picker { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 9px 0 6px; position: relative; }
#file { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.picker:has(#file:focus-visible) .file-button { outline: 2px solid #f9e8ae; outline-offset: 3px; }
button, .file-button, .primary { border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; color: inherit; font-weight: 650; background: #30392f; text-decoration: none; cursor: pointer; min-height: 40px; }
button:hover, .file-button:hover { background: #3b4936; }
button:disabled { opacity: .5; cursor: default; }
.plain { background: transparent; }
.detail { color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; line-height: 1.45; }
.inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 23px 0 8px; }
.inputs label { min-width: 0; font-size: .86rem; font-weight: 650; }
.inputs span { display: inline-block; color: var(--muted); font-size: .72rem; margin-left: 3px; }
.inputs input { display: block; margin-top: 5px; width: 100%; min-height: 44px; color: inherit; background: #171c17; border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; }
.presets { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 18px; }
.presets button { font-size: .75rem; background: transparent; min-height: 31px; padding: 5px 8px; }
.primary { display: inline-flex; align-items: center; justify-content: center; color: #17220b; background: var(--acid); border-color: var(--acid); }
.primary:hover { background: #e8ffb9; }
#normalize { width: 100%; }
.privacy { margin-top: 10px; color: var(--muted); font-size: .79rem; }
#status { margin-top: 12px; min-height: 2lh; }
#status[data-tone="warn"] { color: #f8d889; }
#status[data-tone="good"] { color: var(--acid); }
.monitor { display: flex; flex-direction: column; gap: 15px; }
.monitor-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.monitor-title h2 { font-size: 1.18rem; margin: 0; }
.monitor-title span { color: var(--muted); font: .75rem ui-monospace, monospace; white-space: nowrap; }
.comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.take { background: #171d17; border: 1px solid var(--line); min-width: 0; padding: 15px; border-radius: 10px; }
.take.after { background: #242e20; }
.take h3 { font-size: .88rem; margin: 0 0 16px; }
.meter { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px; }
.meter output { font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums; font-size: clamp(1.6rem, 3.9vw, 2.75rem); line-height: 1; }
.after .meter output { color: var(--acid); }
.meter span, .mini { color: var(--muted); font-size: .77rem; }
.mini { display: flex; flex-wrap: wrap; gap: 8px; margin: 9px 0 13px; }
.mini output { color: #e4eadb; font-family: ui-monospace, monospace; }
audio { width: 100%; height: 38px; }
.export { display: flex; flex: 1; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; border-top: 1px solid var(--line); padding-top: 12px; }
#result-title { font-weight: 650; font-size: .9rem; }
.footer { margin-top: 22px; padding-bottom: 28px; display: flex; gap: 16px; color: var(--muted); font-size: .84rem; }
.policy { max-width: 720px; padding-top: 40px; line-height: 1.65; }
.policy p, .policy ol { margin: 0 0 12px; }
.policy h1 { font-size: 2.2rem; }
.policy h2 { margin: 24px 0 6px; }
@media (max-width: 760px) { .studio { grid-template-columns: 1fr; } .intro { padding: 34px 0 23px; } }
@media (max-width: 430px) { .shell { width: calc(100% - 26px); } .panel { padding: 15px; } .comparison { grid-template-columns: 1fr; } }
