:root {
  --bg: #f6f7f9; --panel: #fff; --text: #1d2330; --muted: #677085; --line: #e3e6ec;
  --accent: #2f5bea; --accent-weak: #e8eefe; --ok: #18864b; --warn: #b26a00; --err: #c62f2f;
  --diff-del: #fde8e8; --diff-add: #e3f6ea; --radius: 10px;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151b; --panel: #1b1f27; --text: #e6e9ef; --muted: #98a1b3; --line: #2c323d;
    --accent: #6d8cff; --accent-weak: #232d4a; --ok: #4cc583; --warn: #f0a640; --err: #ff6b6b;
    --diff-del: #4a2326; --diff-add: #1f3b2a;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.55; }
a { color: var(--accent); }
header.top { display: flex; align-items: center; gap: 24px; padding: 0 24px; height: 56px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
header.top[hidden] { display: none; }
header.top .brand { font-weight: 700; letter-spacing: .3px; }
header.top .brand small { color: var(--muted); font-weight: 400; margin-left: 6px; }
header.top nav { display: flex; gap: 4px; flex: 1; }
header.top nav a { white-space: nowrap; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); }
header.top nav a.active { background: var(--accent-weak); color: var(--accent); font-weight: 600; }
header.top .who { color: var(--muted); font-size: 13px; }
main { max-width: 1280px; margin: 0 auto; padding: 24px; }
h1 { font-size: 20px; margin: 0 0 16px; }
h2 { font-size: 16px; margin: 24px 0 10px; }
h3 { font-size: 14px; margin: 16px 0 8px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
button, .btn { font: inherit; border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 7px 12px; border-radius: 8px; cursor: pointer; text-decoration: none; display: inline-block; }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { color: var(--err); }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; width: 100%; }
textarea { resize: vertical; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 16px; }
.form .full { grid-column: 1 / -1; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: var(--accent-weak); }
.badge { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; background: var(--accent-weak); color: var(--accent); white-space: nowrap; }
.badge.done { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.badge.cancelled, .badge.error { background: color-mix(in srgb, var(--err) 15%, transparent); color: var(--err); }
.badge.queued, .badge.transcribing, .badge.translating, .badge.summarizing, .badge.aligning, .badge.reconciling, .badge.running { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; min-width: 120px; }
.progress > div { height: 100%; background: var(--accent); transition: width .4s; }

/* 캘린더 */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal .dow { background: var(--panel); padding: 6px; font-size: 12px; color: var(--muted); text-align: center; }
.cal .day { background: var(--panel); min-height: 96px; padding: 6px; font-size: 12px; cursor: pointer; }
.cal .day.other { opacity: .45; }
.cal .day.today .num { background: var(--accent); color: #fff; border-radius: 99px; padding: 0 6px; }
.cal .ev { display: block; margin-top: 3px; padding: 2px 6px; border-radius: 6px; background: var(--accent-weak); color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .ev.done { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.cal .ev.cancelled { text-decoration: line-through; opacity: .6; }

/* 모달 */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; overflow: auto; z-index: 10; }
.modal { background: var(--panel); border-radius: var(--radius); padding: 20px; width: min(760px, 100%); }

/* 스크립트 */
.script { max-height: 560px; overflow: auto; }
.script .seg { display: grid; grid-template-columns: 72px 1fr 1fr; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.script .seg.ko-only { grid-template-columns: 72px 1fr; }
.ts { font-family: ui-monospace, monospace; font-size: 12px; color: var(--accent); cursor: pointer; }
.cmp td { font-size: 13px; }
.cmp td.stt, .cmp td.ext { width: 28%; }
.cmp del { background: var(--diff-del); text-decoration: none; }
.cmp ins { background: var(--diff-add); text-decoration: none; }
.cmp textarea { min-height: 54px; font-size: 13px; }
.metric { display: inline-flex; flex-direction: column; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; margin-right: 8px; }
.metric b { font-size: 18px; }

/* 인사이트 */
.answer { line-height: 1.7; }
.answer h2 { border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.answer blockquote { margin: 6px 0; padding: 4px 12px; border-left: 3px solid var(--accent); color: var(--muted); }
.steps { font-size: 12px; color: var(--muted); }
.steps li { margin: 2px 0; }
.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tabs button.on { background: var(--accent-weak); color: var(--accent); border-color: var(--accent); }

/* Interview Note (Word 양식과 동일한 배치) */
.note { font-family: "Malgun Gothic", "맑은 고딕", var(--font, inherit); line-height: 1.7; max-width: 900px; }
.note p { margin: 2px 0; }
.note .note-head { border-bottom: 2px solid #7030a0; padding-bottom: 8px; margin-bottom: 14px; }
.note .ind { padding-left: 24px; }
.note ul.dash { list-style: none; padding-left: 24px; margin: 4px 0 14px; }
.note ul.dash li { position: relative; }
.note ul.dash li::before { content: "-"; position: absolute; left: -18px; }
.note .sec { margin-top: 14px; padding-left: 24px; }
.note .nb { display: grid; grid-template-columns: 26px 1fr; }
.note .nb.l1 { margin-left: 48px; } .note .nb.l2 { margin-left: 76px; } .note .nb.l3 { margin-left: 104px; }
.note .nb.l4 { margin-left: 132px; } .note .nb.l5 { margin-left: 160px; }
.note .mk { color: var(--muted); }
.note .ts { margin-left: 4px; opacity: .6; }
.note-table { margin: 6px 0 6px 48px; width: auto; font-size: 12px; }
.note-table th { background: color-mix(in srgb, var(--muted) 20%, transparent); color: var(--text); }
.note-table th, .note-table td { border: 1px solid var(--line); padding: 4px 8px; }
.excerpt { border-left: 3px solid var(--accent); background: var(--accent-weak); padding: 8px 12px; margin: 8px 0; border-radius: 0 8px 8px 0; }
.excerpt .xl { display: grid; grid-template-columns: 72px 1fr; gap: 8px; font-size: 13px; }
.ts-plain { font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted); }

.login { max-width: 360px; margin: 12vh auto; }
.toast { position: fixed; bottom: 20px; right: 20px; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 8px; z-index: 20; }

@media (max-width: 800px) {
  .grid2, .form { grid-template-columns: 1fr; }
  .script .seg { grid-template-columns: 60px 1fr; }
  .script .seg > :nth-child(3) { grid-column: 2; }
  header.top { gap: 8px; padding: 0 12px; overflow-x: auto; }
  header.top .brand small, header.top .who { display: none; }
  header.top button { white-space: nowrap; }
  main { padding: 16px; }
}
