:root {
  color-scheme: dark;
  --ink: #f4f3ee;
  --muted: #b6b3aa;
  --line: rgba(244, 243, 238, 0.14);
  --surface: #171817;
  --canvas: #10110f;
  --accent: #d8ff63;
  --danger: #ff968d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: radial-gradient(circle at 14% 0%, #263119 0, transparent 28rem), var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }

.shell { width: min(100% - 32px, 920px); margin: 0 auto; padding: 48px 0 72px; }
.tool, .result { border: 1px solid var(--line); border-radius: 24px; background: rgba(23, 24, 23, 0.92); box-shadow: 0 22px 70px rgba(0, 0, 0, 0.22); }
.tool { padding: clamp(24px, 5vw, 52px); }
.result { margin-top: 20px; padding: clamp(22px, 4vw, 40px); }
.eyebrow { color: var(--accent); font-size: 0.72rem; font-weight: 750; letter-spacing: 0.15em; }
h1, h2 { margin: 9px 0 0; letter-spacing: -0.045em; }
h1 { font-size: clamp(2.5rem, 8vw, 5.5rem); line-height: 0.95; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.subhead { max-width: 38rem; margin: 18px 0 0; color: var(--muted); font-size: 1.05rem; line-height: 1.55; }
.privacy-note, .boundary { margin-top: 28px; border: 1px solid rgba(216, 255, 99, 0.26); border-radius: 12px; padding: 13px 15px; color: #e9f4c7; background: rgba(216, 255, 99, 0.07); font-size: 0.92rem; line-height: 1.45; }
.privacy-note span { display: inline-block; margin-right: 7px; color: var(--accent); font-weight: 900; }
.trust-line { margin: 12px 2px 0; color: var(--muted); font-size: 0.82rem; }
.dropzone { display: grid; place-items: center; gap: 9px; min-height: 218px; margin-top: 22px; border: 1px dashed rgba(216, 255, 99, 0.55); border-radius: 18px; padding: 24px; color: var(--muted); text-align: center; cursor: pointer; transition: background 160ms ease, border-color 160ms ease; }
.dropzone:hover, .dropzone.dragging { border-color: var(--accent); background: rgba(216, 255, 99, 0.08); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone strong { color: var(--ink); font-size: 1.1rem; }
.dropzone-icon { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 50%; color: #142007; background: var(--accent); font-size: 1.7rem; font-weight: 800; }
.file-details, .error, .status { margin: 14px 0 0; font-size: 0.92rem; line-height: 1.45; }
.file-details { color: var(--muted); }
.error { color: var(--danger); }
.controls { display: grid; grid-template-columns: 1fr 1.6fr; gap: 18px; margin-top: 26px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.control-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 0.92rem; }
.control-item.wide { display: grid; grid-template-columns: 1fr; }
.control-item label { color: var(--ink); }
output { color: var(--accent); font-variant-numeric: tabular-nums; }
input[type="checkbox"] { accent-color: var(--accent); width: 19px; height: 19px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.boundary { margin-top: 18px; color: var(--muted); border-color: var(--line); background: transparent; }
.primary, .secondary, .clear { border: 0; border-radius: 999px; cursor: pointer; font-weight: 760; }
.run-row { display: flex; gap: 10px; align-items: center; margin-top: 24px; }
.primary { width: 100%; margin-top: 24px; padding: 15px 18px; color: #10110f; background: var(--accent); }
.run-row .primary { margin-top: 0; }
.primary:disabled { cursor: not-allowed; opacity: 0.42; }
.clear { flex: 0 0 auto; min-height: 50px; padding: 0 16px; color: var(--muted); background: transparent; border: 1px solid var(--line); }
.clear:hover { color: var(--ink); border-color: rgba(244, 243, 238, 0.35); }
.status { color: var(--muted); min-height: 1.4em; }
.progress-wrap { margin-top: 12px; }
.progress-track { overflow: hidden; height: 5px; border-radius: 999px; background: #2a2c28; }
.progress-bar { width: 0%; height: 100%; border-radius: inherit; background: var(--accent); transition: width 220ms ease; }
.result-header { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.actions { display: flex; gap: 9px; flex-wrap: wrap; }
.secondary { padding: 10px 14px; color: var(--ink); background: #292b28; border: 1px solid var(--line); }
.secondary:hover { background: #353833; }
.transcript { max-width: 68ch; margin: 28px auto 0; color: #f5f2e8; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.98rem; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.timestamp { display: inline-block; min-width: 64px; color: var(--accent); font-size: 0.78rem; }

@media (max-width: 620px) {
  .shell { width: min(100% - 20px, 920px); padding: 16px 0 36px; }
  .tool, .result { border-radius: 18px; }
  .controls { grid-template-columns: 1fr; }
  .result-header { align-items: start; flex-direction: column; }
  .actions { width: 100%; }
  .secondary { flex: 1; min-height: 44px; }
  .primary { min-height: 52px; }
  .run-row { align-items: stretch; }
  .clear { min-height: 52px; }
}
