:root {
  --ink: #18181b;
  --muted: #70707b;
  --line: #e4e4e7;
  --paper: #fafafa;
  --card: #ffffff;
  --accent: #c2410c;
  --accent-soft: #fff7ed;
  --gold: #c2410c;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --ok: #15803d;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 24px; background: #ffffff; color: var(--ink); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.mark { width: 26px; height: 26px; border-radius: 8px; background: var(--ink); position: relative; }
.mark::before, .mark::after { content: ""; position: absolute; left: 6px; height: 3px; border-radius: 2px; background: var(--gold); }
.mark::before { top: 8px; width: 14px; }
.mark::after { top: 15px; width: 9px; }
.privacy { font-size: 13px; color: #52525b; display: flex; align-items: center; gap: 8px; }
.privacy i { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; display: inline-block; }

main { max-width: 980px; margin: 0 auto; padding: 28px 20px 60px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px; margin-bottom: 20px; }
[hidden] { display: none !important; }
.eyebrow { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--accent); }
h1 { margin: 0 0 12px; font-size: clamp(30px, 5vw, 46px); line-height: 1.08; letter-spacing: -.03em; }
h1 em { color: var(--accent); font-style: normal; }
h2 { margin: 0 0 10px; font-size: 18px; }
.lead { margin: 0 0 22px; color: var(--muted); font-size: 17px; max-width: 640px; }

.dropzone {
  border: 2px dashed #d4d4d8; border-radius: 16px; background: #fafafa;
  padding: 34px 18px; text-align: center; cursor: pointer; display: grid; gap: 6px;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.dropzone strong { font-size: 18px; }
.dropzone span { color: var(--muted); font-size: 14px; }
.dropzone .file-chosen { color: var(--ink); font-weight: 700; margin-top: 4px; }

.options { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin: 18px 0 8px; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
select, button {
  font: inherit; border-radius: 10px; border: 1px solid var(--line); background: #ffffff; color: var(--ink);
  padding: 10px 14px; cursor: pointer;
}
select { min-width: 240px; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.primary:hover:not(:disabled) { background: #9a3412; border-color: #9a3412; }
button.link { background: none; border: 0; color: var(--accent); text-decoration: underline; padding: 6px 0; }
.note { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.progress { margin-top: 18px; }
.bar { height: 10px; background: #f4f4f5; border-radius: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.bar.indeterminate i { width: 35%; animation: slide 1.2s ease-in-out infinite; }
@keyframes slide { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
.progress p { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.error { margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-weight: 600; }

.player { background: #18181b; border-radius: 14px; overflow: hidden; margin-bottom: 14px; }
.player video { display: block; width: 100%; max-height: 360px; background: #000000; }
.player audio { display: block; width: 100%; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.toolbar .sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }
.stats { margin: 4px 0 2px; font-weight: 700; }
.hint { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 6px; font: 12px ui-monospace, monospace; background: #ffffff; }

.transcript {
  border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: #ffffff;
  max-height: 440px; overflow-y: auto; font-size: 19px; line-height: 2; user-select: none; outline: none;
  position: relative;
}
.transcript:focus-visible { border-color: var(--accent); }
.w { cursor: pointer; border-radius: 5px; padding: 1px 2px; }
.w:hover { background: #f4f4f5; }
.w.current { background: #fff1c2; box-shadow: 0 0 0 2px #fff1c2; }
.w.sel { background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent-soft); outline: 1px solid var(--accent); }
.w.del { color: var(--danger); text-decoration: line-through; background: var(--danger-soft); }
.w.del.sel { outline-color: var(--danger); }
.w-edit { font: inherit; color: inherit; border: 0; outline: 2px solid var(--accent); border-radius: 5px; padding: 0 3px; background: #ffffff; user-select: text; -webkit-user-select: text; min-width: 3ch; }

.exports { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.export-buttons { display: flex; flex-wrap: wrap; gap: 10px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: #ffffff; padding: 10px 16px; border-radius: 10px; font-size: 14px;
  pointer-events: none; transition: opacity .2s, transform .2s; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
  .panel { padding: 20px 16px; }
  select { min-width: 0; width: 100%; }
  label { width: 100%; }
  .transcript { font-size: 17px; }
}

.pause-pick{display:inline-flex;align-items:center;gap:6px;font-size:13px}
.pause-pick select{padding:6px 8px;border-radius:8px;border:1px solid rgba(122,122,134,.4);background:transparent;color:inherit;font:inherit}
