:root { color-scheme: light; --ink:#172a41; --muted:#52677f; --quiet:#61758a; --blue:#174a7e; --blue-dark:#123e6b; --soft:#eef5fc; --line:#dbe4ee; --canvas:#f3f6fa; --gold:#8a500e; --gold-bg:#fff3dd; --green:#28634f; }
* { box-sizing:border-box; }
body { margin:0; background:var(--canvas); color:var(--ink); font:14px/1.5 -apple-system,BlinkMacSystemFont,"PingFang SC","Helvetica Neue",sans-serif; -webkit-font-smoothing:antialiased; }
button,select,input,textarea { font:inherit; color:inherit; }
button { cursor:pointer; }
button:focus-visible, a:focus-visible, select:focus-visible, textarea:focus-visible, input:focus-visible { outline:2px solid #326ca6; outline-offset:3px; }
button[disabled] { cursor:default; opacity:.55; }
[hidden] { display:none !important; }
a { color:inherit; text-decoration:none; }
.topbar { background:#fff; border-bottom:1px solid #e1e8f0; }
.nav,.shell { width:min(1248px, calc(100% - 72px)); margin:auto; }
.nav { height:65px; display:flex; align-items:center; justify-content:space-between; }
.brand,.navlinks,.top-actions,.file-name,.privacy,.notes,.player-controls,.time-group,.review-tabs,.footer-actions,.heading-with-count,.rail-title,.pair-actions { display:flex; align-items:center; }
.brand { gap:10px; font-weight:730; font-size:16px; letter-spacing:.15px; }
.brand-mark { display:grid; place-items:center; height:33px; width:33px; border-radius:9px; background:var(--blue); color:#fff; font-size:17px; }
.navlinks { gap:25px; color:var(--muted); font-size:13px; font-weight:550; }
select { appearance:none; padding:0 36px 0 12px; border:1px solid var(--line); background:#fff; border-radius:8px; height:38px; background-image:linear-gradient(45deg,transparent 50%,#516780 50%),linear-gradient(135deg,#516780 50%,transparent 50%); background-position:calc(100% - 15px) 16px,calc(100% - 10px) 16px; background-size:5px 5px; background-repeat:no-repeat; }
.navlinks select { height:33px; min-width:104px; background-position:calc(100% - 15px) 14px,calc(100% - 10px) 14px; }
.shell { padding:29px 0 28px; }
.top-actions { justify-content:space-between; gap:18px; align-items:flex-end; margin-bottom:23px; }
h1,h2,h3,p { margin:0; }
h1 { font-size:30px; font-weight:740; line-height:1.22; letter-spacing:-.7px; margin-bottom:7px; }
h2 { font-size:17px; font-weight:710; }
h3 { font-size:14px; font-weight:680; }
.lead { color:var(--muted); }
.subtle { color:var(--muted); font-size:13px; }
.card { background:#fff; border-radius:14px; border:1px solid var(--line); box-shadow:0 2px 4px #1d345605; min-width:0; }
.grid { display:grid; grid-template-columns:minmax(0,1.88fr) minmax(320px,1fr); gap:18px; align-items:stretch; }
.script { display:flex; flex-direction:column; padding:23px; min-height:515px; }
.section-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:13px; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:36px; border:1px solid #d4dfeb; background:#fff; border-radius:8px; padding:0 13px; font-size:13px; font-weight:650; white-space:nowrap; }
.btn:hover { background:#f3f7fc; }
.btn.primary { background:var(--blue); color:#fff; border-color:var(--blue); }
.btn.primary:hover { background:var(--blue-dark); border-color:var(--blue-dark); }
.btn.large { min-height:44px; font-size:14px; }
.btn.quiet { color:var(--blue); background:var(--soft); border-color:#d5e3f2; }
.draft { flex:1; width:100%; min-height:326px; resize:vertical; border:1px solid #d9e3ee; border-radius:10px; background:#f8fafc; color:#233a53; padding:19px; line-height:2.08; font-size:15px; }
.draft::placeholder { color:var(--quiet); }
.notes { justify-content:space-between; font-size:12px; color:var(--muted); gap:12px; padding-top:13px; }
.inputs { padding:22px; display:flex; flex-direction:column; }
.file-card { padding:15px 14px; background:#f8fafc; border:1px solid var(--line); border-radius:10px; }
.file-name { gap:10px; min-width:0; }
.file-name strong { display:block; overflow-wrap:anywhere; color:var(--ink); font-size:13px; }
.file-name small { display:block; color:var(--muted); margin-top:2px; font-size:12px; }
.file-icon { display:grid; place-items:center; border-radius:8px; width:38px; height:38px; background:#e7f0fa; color:var(--blue); flex-shrink:0; font-size:20px; line-height:1; }
.compact-preview { margin-top:12px; padding-top:11px; border-top:1px solid #e4ebf3; }
.compact-preview .clock { min-width:74px; text-align:right; }
.player-controls { gap:11px; min-width:0; }
.player-controls .wave { flex:1; }
.round-play { display:grid; place-items:center; width:32px; height:32px; border:1px solid #d7e4f2; border-radius:50%; background:#edf4fb; color:var(--blue); flex:0 0 auto; }
.round-play.dark { width:37px; height:37px; color:#fff; background:var(--blue); border-color:var(--blue); }
.triangle { display:inline-block; width:0; height:0; border-top:5px solid transparent; border-bottom:5px solid transparent; border-left:8px solid currentColor; margin-left:2px; }
.settings { margin-top:19px; padding-top:17px; border-top:1px solid #e8eef4; }
.settings label { display:block; margin:10px 0 5px; font-size:13px; color:var(--muted); }
.settings select { width:100%; }
details { margin-top:13px; color:var(--muted); }
summary { cursor:pointer; font-weight:600; font-size:13px; }
.launch { margin-top:auto; padding-top:20px; }
.launch .btn { width:100%; }
#return-results { margin-top:8px; }
.privacy { justify-content:center; gap:7px; margin-top:12px; color:var(--muted); font-size:12px; }
.privacy::before { content:""; width:7px; height:7px; border-radius:50%; background:#4e8871; }
.clock,.stamp { font-variant-numeric:tabular-nums; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:12px; font-weight:550; color:var(--muted); white-space:nowrap; }
.player { padding:15px 19px 12px; margin-bottom:15px; }
.rail-title { justify-content:space-between; gap:12px; font-size:13px; font-weight:700; margin-bottom:8px; }
.rail-title span { color:var(--muted); font-weight:500; }
.player-main { display:grid; grid-template-columns:37px minmax(0,1fr) auto; align-items:center; gap:14px; }
.check { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:12px; white-space:nowrap; }
input[type=checkbox] { accent-color:var(--blue); margin:0; }
.time-group { justify-content:space-between; gap:8px; margin:6px 102px 0 51px; }
.time-group .stamp { font-size:10px; }
.review-grid { display:grid; grid-template-columns:minmax(0,1.75fr) minmax(320px,1fr); gap:15px; align-items:stretch; }
.review-list,.detail { min-height:420px; }
.review-list { overflow:hidden; }
.review-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 17px; }
.heading-with-count { gap:9px; white-space:nowrap; }
.review-tabs { background:#eef3f8; border-radius:8px; padding:3px; gap:1px; }
.review-tabs button { padding:5px 9px; border:1px solid transparent; background:transparent; border-radius:6px; font-size:12px; color:var(--muted); font-weight:600; white-space:nowrap; }
.review-tabs button[aria-pressed=true] { background:#fff; color:var(--blue); border-color:#dbe6f2; box-shadow:0 1px 2px #162e4b0a; }
.review-tabs .review-count { color:var(--gold); margin-left:3px; }
.cue-list { padding:0; margin:0; list-style:none; }
.cue { display:grid; grid-template-columns:32px minmax(0,1fr) auto; gap:11px; align-items:center; text-align:left; width:100%; min-height:51px; padding:7px 16px; border:0; border-top:1px solid #e9eef5; background:#fff; position:relative; }
.cue:hover { background:#f8fafd; }
.cue.current { background:#edf5fe; box-shadow:inset 3px 0 var(--blue); }
.cue-index { font:600 12px ui-monospace,SFMono-Regular,Menlo,monospace; color:#59718d; }
.cue-line { font-size:14px; font-weight:580; display:block; line-height:1.35; overflow-wrap:anywhere; }
.cue .stamp { display:block; font-size:10.5px; margin-top:3px; }
.pill { display:inline-flex; align-items:center; justify-content:center; padding:2px 8px; min-height:22px; border-radius:5px; color:var(--gold); background:var(--gold-bg); font-size:11px; font-weight:650; white-space:nowrap; }
.pill.good { color:var(--green); background:#eaf4ef; }
.detail { padding:16px 17px; display:flex; flex-direction:column; }
.detail .section-head { margin-bottom:10px; }
.pair { border:1px solid #dfe8f2; border-radius:8px; background:#f6f9fc; padding:9px 11px; margin-top:6px; }
.pair strong { display:block; color:var(--muted); font-size:11px; font-weight:650; margin-bottom:4px; }
.pair p { font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
em { font-style:normal; font-weight:650; }
.source-mark { background:#dbeaff; color:#174a7d; padding:1px 3px; border-radius:3px; }
mark { background:#ffebc3; color:#6d420d; padding:1px 3px; border-radius:3px; }
.time-pair { margin-top:10px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.time-pair label { font-size:11px; color:var(--muted); }
.time-pair input { display:block; border:1px solid #dce5ef; border-radius:7px; width:100%; padding:5px 8px; background:#fff; color:#23384f; margin-top:4px; }
.detail .subtle { margin-top:9px; font-size:12px; }
.pair-actions { justify-content:space-between; gap:7px; margin-top:auto; padding-top:12px; }
.pair-actions .btn { min-height:34px; }
.export-card { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-top:15px; padding:11px 15px; }
.footer-actions { gap:9px; }
.export-card select { min-width:76px; height:36px; background-position:calc(100% - 15px) 15px,calc(100% - 10px) 15px; }
.dialog { max-width:min(460px,calc(100vw - 30px)); padding:23px; border:1px solid var(--line); border-radius:14px; color:var(--ink); }
.dialog::backdrop { background:#12243b65; }
.dialog p { margin:10px 0 16px; }
.dialog .footer-actions { justify-content:flex-end; }
.drop { display:grid; place-items:center; gap:8px; min-height:130px; width:100%; padding:16px 9px; border:1px dashed #bacddd; border-radius:10px; background:#f8fafc; color:var(--blue); }
.drop small { font-size:12px; color:var(--muted); }
.drop.drag,.drop:hover { background:var(--soft); border-color:var(--blue); }
.seek { min-width:45px; width:100%; accent-color:var(--blue); }
.wave { position:relative; height:42px; border-radius:4px; background:#f0f4f9; overflow:hidden; }
.wave canvas { display:block; width:100%; height:100%; }
.wave-seek { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.wave:focus-within { outline:2px solid #326ca6; outline-offset:2px; }
.round-play.is-playing .triangle { width:8px; height:10px; margin:0; border:solid currentColor; border-width:0 2px; }
.rail-title strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.media-preview { display:block; max-width:100%; width:520px; max-height:265px; border-radius:8px; margin:10px auto 0; background:#13273e; }
.run-status { margin-bottom:10px; font-size:12px; color:var(--muted); }
.run-status[data-error=true], .error { color:#a12530; }
.run-status progress { appearance:auto; display:block; width:100%; height:10px; margin-top:6px; accent-color:var(--blue); }
.error { font-size:12px; margin-top:8px; }
.settings .check { display:flex; }
.cue-list { max-height:535px; overflow:auto; }
.more-cues { margin:12px 16px; }
.empty-list { padding:17px; }
.detail form { display:flex; flex-direction:column; flex:1; }
.pair p { white-space:pre-wrap; }
.lead { overflow-wrap:anywhere; }
#topNav { min-width:0; }
@media(max-width:920px){ .nav,.shell { width:calc(100% - 42px); } .grid { grid-template-columns:minmax(0,1.35fr) minmax(280px,1fr); } .review-grid { grid-template-columns:minmax(0,1.35fr) minmax(280px,1fr); } .cue { grid-template-columns:24px minmax(0,1fr) auto; gap:7px; padding-left:12px; padding-right:12px; } }
@media(max-width:670px){ .nav,.shell { width:calc(100% - 28px); } .nav { height:54px; } .navlinks>a { display:none; } .shell { padding-top:19px; } .top-actions { align-items:center; gap:8px; margin-bottom:15px; } .top-actions>div { min-width:0; } h1 { font-size:23px; } .lead { font-size:12px; } .grid,.review-grid { grid-template-columns:1fr; gap:10px; } .script,.inputs,.detail { padding:14px; } .script { min-height:0; } .draft { min-height:225px; padding:12px; font-size:14px; } .settings { margin-top:13px; } .player { padding:11px 12px; margin-bottom:10px; } .player-main { gap:7px; grid-template-columns:31px minmax(0,1fr) auto; } .round-play.dark { width:31px; height:31px; } .time-group { margin:4px 90px 0 38px; } .player .wave { gap:2px; } .review-list,.detail { min-height:0; } .review-head { padding:10px 11px; } .cue { min-height:51px; } .cue-line { font-size:13px; } .review-tabs button { padding:4px 5px; } .pair-actions { margin-top:8px; } .export-card { margin-top:10px; padding:9px 11px; gap:9px; align-items:flex-start; flex-direction:column; } .footer-actions { width:100%; } .footer-actions .primary { flex:1; } }
@media(max-width:670px){
  .nav { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-rows:auto auto; height:auto; gap:5px 10px; padding:9px 0 4px; }
  .navlinks { display:contents; }
  .navlinks select { grid-area:1 / 2; min-width:80px; max-width:100px; }
  .nav #topNav { grid-area:2 / 1 / 3 / 3; max-width:100%; justify-content:flex-start; flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden; }
  .cue-list { max-height:262px; }
}
