:root {
  --accent: #087f75;
  --ink: #203335;
  --muted: #738486;
  --border: #dfe8e5;
  --green: #087f75;
  --bg: #f5f8f6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button { transition: background .18s, box-shadow .18s, transform .18s; }
button:disabled { cursor: wait; opacity: .55; }
button:active:not(:disabled) { transform: translateY(1px); }
input, textarea, select { outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px #087f7514; }
button:focus-visible { outline: 3px solid #54c7b7; outline-offset: 3px; }
label { display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 600; }
input:not([type=checkbox]), select { border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; background: white; color: var(--ink); }
.primary, .secondary { border-radius: 11px; padding: 12px 17px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.primary { background: var(--accent); border: 1px solid var(--accent); color: white; box-shadow: 0 3px 8px #087f7512; }
.primary:hover { background: #066b63; }
.secondary { background: white; border: 1px solid var(--border); color: #41595b; }
.secondary:hover { background: #eef5f2; border-color: #bacfc8; }
.icon-btn { border: 0; background: transparent; font-size: 20px; color: var(--muted); padding: 4px 8px; border-radius: 8px; }
.icon-btn:hover { background: #ffffff12; color: var(--accent); }
.brand { display: flex; align-items: center; min-height: 42px; }
.brand img { display: block; width: 100%; height: auto; }
.eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; color: var(--muted); }
.workspace { display: flex; min-height: 100vh; }
.sidebar { width: 264px; flex: 0 0 264px; background: #142c2e; color: #eef8f3; padding: 32px 18px 0; display: flex; flex-direction: column; height: 100vh; position: sticky; top: 0; }
.sidebar .brand { margin: 0 12px 39px; }
.sidebar > .primary { width: 100%; margin-bottom: 37px; background: #30c9b0; border-color: #30c9b0; color: #123b36; padding: 14px; }
.sidebar > .primary:hover { background: #57d8c3; }
.nav-heading { display: flex; justify-content: space-between; align-items: center; font-size: 10px; font-weight: 600; letter-spacing: 1.4px; color: #91a9a8; margin: 0 12px 15px; }
.nav-heading span { background: #ffffff0d; padding: 3px 7px; border-radius: 6px; letter-spacing: 0; }
.job-list { overflow: auto; flex: 1; }
.job-item { display: block; width: 100%; text-align: left; border: 1px solid transparent; background: transparent; color: #d9e6e3; border-radius: 12px; padding: 16px 13px; margin-bottom: 7px; }
.job-item:hover { background: #ffffff06; }
.job-item.selected { background: #244749; border-color: #366260; box-shadow: inset 3px 0 #30c9b0; }
.job-item strong { font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.job-item small { display: block; font-size: 11px; color: #93b2ad; margin-top: 8px; }
.job-item.selected strong { color: #fff; }
.job-empty { font-size: 13px; color: #93b2ad; padding: 12px; }
.sidebar-bottom { border-top: 1px solid #ffffff14; display: flex; gap: 9px; align-items: center; padding: 23px 0; margin-top: 18px; }
.sidebar-bottom strong { font-size: 13px; font-weight: 500; }
.sidebar-bottom { display:grid; grid-template-columns:36px minmax(0,1fr); gap:10px; }
.sidebar-bottom .avatar { width:36px; height:36px; }
.sidebar-bottom strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sidebar-bottom > .account-actions { grid-column:1/-1; display:flex; gap:8px; margin-top:4px; }
.account-actions .icon-btn { flex:1; min-width:0; display:inline-flex; align-items:center; justify-content:center; gap:6px; font-size:12px; min-height:38px; border:1px solid #ffffff16; background:#ffffff05; white-space:nowrap; }
.account-actions .icon-btn:hover { background:#ffffff10; }
.account-identity { overflow-wrap:anywhere; font-size:14px; }
.telegram-connect-actions { display:flex; gap:10px; flex-wrap:wrap; margin:16px 0; }
.telegram-settings { overflow-wrap:anywhere; }
.telegram-connect-actions > * { min-height:44px; text-align:center; text-decoration:none; }
.telegram-settings details { margin:18px 0; color:var(--muted); font-size:13px; }
.telegram-settings summary { cursor:pointer; padding:10px 0; }
.capture-tabs,.capture-actions { display:flex; gap:10px; flex-wrap:wrap; margin:14px 0; }
.capture-tabs > button { flex:1; min-height:44px; }
.capture-tabs [aria-pressed=true] { border-color:var(--accent); background:#e4f5ef; color:var(--green); }
.capture-panel { padding:18px; border:1px solid #cee5db; border-radius:16px; background:#f2faf7; margin-bottom:20px; }
.capture-panel[hidden] { display:none; }
.capture-status { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:22px 0; font-size:13px; }
.capture-status output { font:600 26px ui-monospace,monospace; }
.capture-dot { width:10px; height:10px; border-radius:50%; background:#9cafaa; }
.capture-dot.is-recording { background:#d94b4b; box-shadow:0 0 0 5px #d94b4b15; }
.capture-note { font-size:12px; line-height:1.65; color:var(--muted); }
.capture-actions button { min-height:44px; flex:1; }
.sidebar-bottom small { display: block; font-size: 10px; color: #91a9a8; margin-top: 4px; }
.sidebar-bottom > div { flex: 1; min-width: 0; }
.sidebar-bottom .icon-btn { color: #91a9a8; }
.sidebar-bottom .icon-btn:hover { color: #62d8c5; }
.avatar { width: 35px; height: 35px; background: #315554; color: #b6efdf; border: 1px solid #47706a; border-radius: 12px; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
main { min-width: 0; flex: 1; }
.topbar { height: 78px; border-bottom: 1px solid var(--border); padding: 0 44px; display: flex; align-items: center; justify-content: space-between; gap: 15px; font-size: 12px; color: var(--muted); background: #ffffffb3; }
.topbar > span:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.slash { margin: 0 12px; color: #b9cac3; }
#crumb { color: #41595b; }
.engine-badge { display: flex; gap: 7px; align-items: center; background: #edf5ef; border: 1px solid #deebe1; padding: 8px 12px; border-radius: 30px; font-size: 11px; color: #4b7667; white-space: nowrap; }
.engine-badge i { width: 6px; height: 6px; background: #26a679; border-radius: 50%; box-shadow: 0 0 0 3px #26a67912; }
.recording-view { max-width: 1190px; margin: auto; padding: 42px 44px 80px; }
.recording-heading { display: flex; gap: 20px; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.recording-heading > div:first-child { min-width: 0; flex: 1; }
.title-input { font-size: 29px; font-weight: 650; letter-spacing: -1px; border: 1px solid transparent !important; background: transparent !important; padding: 10px 0 !important; max-width: 100%; width: 100%; text-overflow: ellipsis; border-radius: 4px !important; }
.recording-stats { display: flex; gap: 18px; color: var(--muted); font-size: 12px; margin-top: 6px; align-items: center; }
.recording-stats span:empty { display: none; }
#saveState { color: var(--green); }
.download { display: flex; gap: 7px; background: white; padding: 4px; border: 1px solid var(--border); border-radius: 13px; }
.download select { border: 0; padding: 8px; font-size: 12px; }
.download button { white-space: nowrap; border: 0; background: #edf5f1; }
.player-card { background: linear-gradient(115deg, #edf8f4, #fdfefc); border: 1px solid #cee5db; border-radius: 18px; padding: 21px 24px; margin-bottom: 29px; box-shadow: 0 8px 24px #183e2f04; }
.player-caption { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.player-caption .eyebrow { color: #4a8277; }
.speed-label { flex-direction: row; align-items: center; color: #668279; font-size: 11px; font-weight: 400; }
.speed-label select { padding: 5px 9px; font-size: 12px; background: #ffffffa8; }
.audio-row { display: flex; gap: 12px; align-items: center; }
audio { width: 100%; height: 47px; border-radius: 28px; }
audio::-webkit-media-controls-panel { background: #e9f1ed; }
.round-btn { border: 1px solid #cadfd5; background: #ffffffb3; border-radius: 50%; min-width: 41px; height: 41px; font-size: 12px; color: #487064; }
.round-btn:hover { background: #d7eee3; }
.editor-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 24px; }
.search-box { position: relative; flex: 1; max-width: 390px; font-weight: 400; }
.search-box span { position: absolute; font-size: 25px; left: 13px; top: 5px; color: var(--muted); }
.search-box input { padding-left: 39px; font-size: 13px; height: 42px; background: white; }
.editor-toolbar button { font-size: 12px; padding: 12px 14px; white-space: nowrap; }
.follow-label { flex-direction: row; align-items: center; gap: 6px; font-size: 11px; font-weight: 400; color: var(--muted); margin-left: auto; white-space: nowrap; }
input[type=checkbox] { accent-color: var(--accent); width: 14px; height: 14px; }
.transcript-info { display: flex; justify-content: space-between; gap: 20px; font-size: 11px; color: var(--muted); padding: 0 3px 14px; }
.transcript-info span:first-child { font-weight: 600; color: #48625b; white-space: nowrap; }
.transcript { background: white; border: 1px solid var(--border); border-radius: 18px; padding: 8px 26px; box-shadow: 0 6px 30px #173e2f03; }
.dialogue-details { margin-top:24px; }
.dialogue-details > summary { cursor:pointer; padding:20px; border:1px solid var(--border); border-radius:14px; background:white; font-weight:600; }
.dialogue-details > summary span { color:var(--muted); font-size:12px; font-weight:400; margin-left:16px; }
.dialogue-controls { display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap; margin:16px 0; }
.review-player { position:sticky; top:10px; z-index:20; display:flex; align-items:center; gap:16px; flex-wrap:wrap; padding:12px 16px; margin:0 0 18px; background:#f2faf7f5; border:1px solid #cadfd5; border-radius:14px; box-shadow:0 5px 22px #173e2f10; backdrop-filter:blur(12px); }
.review-transport { display:flex; gap:8px; align-items:center; }
.review-player .round-btn { display:inline-block; }
.review-play { min-width:120px; height:42px; background:var(--accent); color:white; border:0; border-radius:10px; font-size:13px; font-weight:600; }
.review-position { flex:1; min-width:120px; display:flex; flex-direction:column; gap:5px; }
.review-position output { font:11px ui-monospace,monospace; color:#48625b; }
.review-position input { width:100%; height:20px; padding:0; border:0; accent-color:var(--accent); background:transparent; cursor:pointer; }
.review-speed { display:flex; gap:5px; flex-direction:column; color:var(--muted); font-size:10px; }
.review-speed select { padding:4px 8px; font-size:12px; }
.review-mute { height:36px; width:36px; background:white; border:1px solid var(--border); border-radius:9px; color:#48625b; }
.review-player button:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.dialogue-details .turn { scroll-margin-top:130px; }
.dialogue-details { margin-bottom:26px; }
.dialogue-details > h2 { font-size:20px; margin:0 0 16px; }
.delete-recording { color:#a54242; }
.review-player { margin-bottom:20px; }
@media(max-width:600px) { .review-player { top:6px; gap:10px; padding:10px; } .review-position { order:3; flex-basis:100%; } .review-speed { margin-left:auto; } .review-transport { gap:5px; } .review-play { min-width:104px; } .review-mute { width:30px; } .review-player .round-btn { min-width:34px; height:34px; } }
.block-grip { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; border-radius:8px; color:var(--muted); font-size:25px; cursor:grab; touch-action:none; user-select:none; }
.block-grip:hover,.block-grip:focus-visible { color:var(--accent); background:#e7f5ef; }
.block-grip:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.dragging-block,.dragging-block * { cursor:grabbing !important; user-select:none !important; }
.turn.is-dragging { opacity:.45; }
.turn.merge-target { background:#e7f5ef; border-radius:10px; outline:2px solid var(--accent); outline-offset:-2px; }
.block-drag-ghost { position:fixed; z-index:1000; pointer-events:none; max-width:245px; padding:12px 16px; border-radius:12px; background:#354947; color:white; font-size:12px; box-shadow:0 8px 25px #12382b30; }
.block-drag-ghost.can-drop { background:var(--accent); }
.turn-content { min-width:0; }
.word-editor { position:relative; }
.word-layer { position:absolute; inset:0; pointer-events:none; white-space:pre-wrap; overflow-wrap:break-word; overflow:hidden; padding:2px 6px; border:1px solid transparent; font-size:15px; line-height:1.8; color:transparent; }
.word-layer mark { color:transparent; background:transparent; padding:0; border-radius:3px; }
.word-layer mark.spoken-word { background:#f7d86b; box-shadow:0 0 0 2px #f7d86b; }
.word-editor textarea { position:relative; z-index:1; }
@media(max-width:600px) { .word-layer { font-size:14px; } }
.block-tools { display:flex; gap:12px; padding:4px 6px 0; }
.block-tools button { background:transparent; border:0; padding:3px 0; font-size:11px; color:var(--muted); }
.block-tools button:hover { color:var(--accent); }
.manual-time { font-size:10px; color:var(--muted); }
.dialogue-details .transcript { max-height:520px; overflow-y:auto; overscroll-behavior:contain; }
.dialogue-details.dialogue-full .transcript { max-height:none; overflow:visible; }
progress { display:block; width:100%; height:12px; border:0; border-radius:20px; overflow:hidden; accent-color:var(--accent); margin:14px 0 8px; }
progress::-webkit-progress-bar { background:#e8eeeb; border-radius:20px; }
progress::-webkit-progress-value { background:var(--accent); border-radius:20px; }
.processing-content { flex:1; min-width:0; }
.processing-content small,#uploadEta,#summaryEta { display:block; color:var(--muted); font-size:12px; line-height:1.7; }
.model-picker { display:flex; gap:12px; align-items:center; flex-wrap:wrap; color:var(--muted); font-size:12px; margin:18px 0; }
.model-picker select { width:auto; max-width:100%; }
.turn { display: grid; grid-template-columns: 110px 1fr; gap: 17px; padding: 23px 0; border-bottom: 1px solid #eef3f0; transition: background .18s; }
.turn:last-child { border: 0; }
.turn.active { background: #f0faf5; border-radius: 8px; box-shadow: -3px 0 #30c9b0; }
.turn-side { padding-top: 5px; display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.speaker-select { border: 0 !important; border-radius: 7px; padding: 5px 7px !important; font-size: 11px !important; font-weight: 600; background: #e4f4ed !important; color: #267765 !important; max-width: 110px; }
.turn[data-color="1"] .speaker-select { background: #e8f1fb !important; color: #3e73a6 !important; }
.turn[data-color="2"] .speaker-select { background: #fbefdc !important; color: #98722c !important; }
.timecode { font-family: ui-monospace, monospace; font-size: 11px; color: #91a19b; border: 0; background: transparent; padding: 2px 7px; }
.timecode:hover { color: var(--accent); }
.turn textarea { width: 100%; resize: vertical; min-height: 42px; padding: 2px 6px; font-size: 15px; line-height: 1.8; color: #354947; border: 1px solid transparent; background: transparent; border-radius: 6px; overflow: hidden; }
.review-note { font-size: 11px; color: var(--muted); line-height: 1.8; padding: 19px 3px; }
.summary-card { border: 1px solid var(--border); border-radius: 18px; background: white; padding: 24px; margin-bottom: 29px; }
.summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.summary-heading h2 { font-size: 20px; letter-spacing: -.5px; margin: 8px 0 0; }
.summary-format-hint { color:var(--muted); font-size:12px; line-height:1.6; margin:8px 0 16px; }
.media-retention-note { color:var(--muted); font-size:12px; line-height:1.6; margin:-8px 0 22px; }
.review-track-row { display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; margin:0 0 8px; color:var(--muted); font-size:12px; line-height:1.5; }
.review-track-choice { min-height:36px; max-width:100%; padding:6px 12px; font-size:12px; }
.review-track-choice:disabled { cursor:default; }
.review-track-row + .media-retention-note { margin-top:0; }
@media (max-width:600px) { .review-track-choice { min-height:44px; } }
.upload-retention-note { font-size:12px; line-height:1.6; color:var(--muted); margin:16px 0; }
.review-player button:disabled,.timecode:disabled,.summary-timecode:disabled { cursor:not-allowed; }
.summary-card p { color: var(--muted); font-size: 12px; line-height: 1.7; margin-bottom: 0; }
.summary-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.85; font-size: 14px; border-top: 1px solid var(--border); padding-top: 20px; margin-top: 20px; }
.summary-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 14px; }
.summary-card small { color: var(--muted); font-size: 11px; }
.summary-timecode { border: 0; border-radius: 5px; background: #e7f5ef; color: var(--accent); padding: 2px 5px; font: 11px ui-monospace, monospace; vertical-align: middle; }
.summary-timecode:hover { background: #d0ecdf; }
@media (max-width:600px) { .summary-card { padding: 18px; } .summary-heading { align-items: flex-start; flex-direction: column; } }
.empty-state { min-height: calc(100vh - 78px); display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; padding: 50px 20px; }
.empty-state h1 { font-size: 38px; letter-spacing: -1.5px; margin: 20px 0 8px; }
.empty-state p { font-size: 15px; color: var(--muted); line-height: 1.9; margin-bottom: 27px; }
.sound-mark { display: flex; gap: 5px; align-items: center; height: 78px; width: 78px; justify-content: center; border-radius: 25px; background: #dcefe5; margin-bottom: 30px; transform: rotate(-6deg); }
.sound-mark b { width: 4px; background: var(--accent); border-radius: 4px; height: 15px; }
.sound-mark b:nth-child(2), .sound-mark b:nth-child(4) { height: 29px; }
.sound-mark b:nth-child(3) { height: 41px; }
.feature-line { display: flex; gap: 30px; margin-top: 37px; color: #7c948a; font-size: 12px; }
.login-screen { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(ellipse at 12% 8%, #28635c 0, transparent 55%), radial-gradient(ellipse at 100% 100%, #235452, transparent 60%), #142c2e; padding: 30px; }
.login-card { width: 450px; max-width: 100%; background: #fcfefb; border: 1px solid #ffffff55; padding: 42px; border-radius: 25px; box-shadow: 0 25px 100px #061b2440; }
.login-card .brand { max-width: 280px; margin-bottom: 40px; }
.login-card h1 { font-size: 39px; line-height: 1.17; letter-spacing: -1.5px; margin: 19px 0; }
.login-card p { font-size: 13px; color: var(--muted); line-height: 1.7; }
.login-card label { margin-top: 20px; }
.login-card .primary { width: 100%; justify-content: space-between; margin-top: 24px; padding: 14px 18px; }
.login-foot { border-top: 1px solid var(--border); padding-top: 23px; color: #83958b; font-size: 11px; margin-top: 22px; }
.error { color: #b44c47 !important; font-size: 12px; min-height: 14px; }
.processing { display: flex; gap: 18px; align-items: center; border: 1px solid var(--border); background: white; border-radius: 18px; padding: 30px; }
.processing strong { font-size: 16px; }
.processing p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.processing .secondary { margin-left: auto; }
.spinner { border: 3px solid #e1f1e9; border-top-color: var(--accent); width: 30px; height: 30px; border-radius: 50%; animation: spin 1s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.no-matches { padding: 35px; text-align: center; color: var(--muted); }
dialog { width: 550px; max-width: calc(100% - 32px); border: 1px solid var(--border); border-radius: 22px; padding: 32px; box-shadow: 0 25px 100px #142c2e25; color: var(--ink); max-height: 90vh; overflow: auto; }
dialog::backdrop { background: #142c2e75; backdrop-filter: blur(6px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; }
.dialog-heading h2 { font-size: 24px; letter-spacing: -.7px; margin: 0; }
dialog p { font-size: 13px; color: var(--muted); line-height: 1.7; }
dialog > .primary, dialog form > .primary { margin-top: 20px; width: 100%; }
dialog label { margin-top: 17px; }
.dropzone { display: flex; align-items: center; justify-content: center; text-align: center; background: #f3faf6; border: 1px dashed #a2cdbb; border-radius: 15px; padding: 28px 15px; position: relative; cursor: pointer; }
.dropzone.dragover { background: #ddf4e9; border-color: var(--accent); }
.dropzone strong { font-size: 13px; }
.dropzone small { font-size: 11px; color: var(--muted); font-weight: 400; line-height: 1.7; }
.dropzone input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.upload-icon { font-size: 26px; color: var(--accent); margin-bottom: 7px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid select { font-size: 12px; padding: 12px 9px; max-width: 100%; min-width: 0; }
.hint { background: #f1f6f2; border-radius: 10px; padding: 13px; font-size: 11px; color: #6a8273; line-height: 1.7; margin-top: 20px; }
#speakerFields label { flex-direction: row; align-items: center; color: var(--muted); }
#speakerFields label input { flex: 1; min-width: 0; }
#addSpeaker { margin-top: 20px; }
.toast { position: fixed; bottom: 25px; right: 25px; background: #142c2e; color: white; border-radius: 12px; padding: 15px 21px; box-shadow: 0 5px 25px #142c2e25; font-size: 13px; z-index: 10; max-width: calc(100vw - 50px); }
hr { border: 0; border-top: 1px solid var(--border); margin: 25px 0; }
h3 { font-size: 15px; }
#userList { color: var(--muted); font-size: 13px; line-height: 1.9; }
#accountMessage { color: var(--green); }
.ops-nav { display:flex; flex-wrap:wrap; gap:8px; grid-column:1/-1; }
.ops-nav button { flex:1; min-height:44px; padding:8px; }
.ops-dialog { color:var(--ink); }
#adminDialog { width:1040px; }
.ops-dialog h3 { margin:20px 0 10px; }
.ops-dialog section { margin-block:20px; }
.ops-dialog [role="status"]:empty { display:none; }
.ops-toolbar { display:flex; align-items:end; flex-wrap:wrap; gap:8px 12px; margin-block:10px; }
.ops-toolbar span { align-self:center; }
.ops-dialog button { min-height:44px; }
.ops-form { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr)); align-items:end; gap:12px; margin-block:12px; }
.ops-form input { min-width:0; width:100%; }
.ops-table-wrap { overflow:auto; max-width:100%; border:1px solid var(--border); border-radius:10px; margin-block:10px; }
.ops-table { border-collapse:collapse; width:100%; text-align:left; font-variant-numeric:tabular-nums; }
.ops-table th,.ops-table td { padding:10px 12px; border-bottom:1px solid var(--border); vertical-align:middle; }
.ops-table th { background:var(--bg); white-space:nowrap; }
.ops-table td:first-child { min-width:116px; overflow-wrap:anywhere; }
.ops-table tbody tr:last-child td { border-bottom:0; }
.ops-table button { padding:8px 12px; }
.ops-stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(104px,1fr)); gap:8px; }
.ops-stats div { border:1px solid var(--border); border-radius:10px; background:var(--bg); padding:10px; }
.ops-stats dd { margin:4px 0 0; font-size:20px; font-weight:700; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.ops-note { color:#41595b; }
@media (max-width: 1050px) {
  .sidebar { width: 230px; flex-basis: 230px; }
  .recording-view { padding: 34px 28px; }
  .topbar { padding: 0 28px; }
  .follow-label { display: none; }
  .transcript-info span:last-child { max-width: 270px; text-align: right; }
}
@media (max-width: 800px) {
  .sidebar { width: 205px; flex-basis: 205px; padding: 24px 13px 0; }
  .recording-view { padding: 30px 22px; }
  .topbar { padding: 0 22px; }
  .recording-heading { align-items: flex-start; }
  .download { flex-direction: column; }
  .title-input { font-size: 24px; }
  .transcript { padding: 8px 15px; }
  .turn { grid-template-columns: 85px 1fr; gap: 10px; }
  .speaker-select { max-width: 85px; }
  .editor-toolbar { flex-wrap: wrap; }
  .search-box { flex-basis: 100%; max-width: none; }
  .recording-stats { gap: 10px; }
}
@media (max-width: 600px) {
  .workspace { display: block; }
  .sidebar { width: 100%; height: auto; position: relative; padding: 19px 16px; display: grid; grid-template-columns: 1fr auto; gap: 16px; }
  .sidebar > .primary { width: auto; margin: 0; padding: 12px; }
  .nav-heading { display: none; }
  .job-list { grid-column: 1/3; display: flex; overflow-x: auto; gap: 8px; max-height: 100px; }
  .job-item { min-width: 185px; max-width: 210px; margin: 0; }
  .sidebar-bottom { grid-column: 1/3; margin: 0; padding: 12px 0 0; }
  .topbar { height: 58px; font-size: 11px; padding: 0 16px; }
  .recording-view { padding: 28px 16px; }
  .recording-heading { gap: 10px; margin-bottom: 23px; }
  .title-input { font-size: 22px; }
  .recording-stats { flex-wrap: wrap; font-size: 11px; }
  .download button { font-size: 11px; padding: 10px; }
  .transcript-info { font-size: 10px; }
  .transcript-info span:last-child { max-width: 180px; }
  .turn { grid-template-columns: 74px 1fr; gap: 6px; padding: 20px 0; }
  .speaker-select { max-width: 73px; font-size: 10px !important; padding: 5px !important; }
  .turn textarea { font-size: 14px; }
  .player-card { padding: 16px; }
  .round-btn { display: none; }
  .empty-state { min-height: 55vh; }
  .empty-state h1 { font-size: 29px; }
  .feature-line { gap: 15px; font-size: 11px; }
  .form-grid { grid-template-columns: 1fr; }
  .login-screen { padding: 20px; }
  .login-card { padding: 30px; }
  .login-card h1 { font-size: 34px; }
  .engine-badge { font-size: 10px; padding: 7px 10px; }
  dialog { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  button, .turn { transition: none; }
  .spinner { animation-duration: 2s; }
}

/* Full speaker names and responsive reading controls. Native select remains
   keyboard/screen-reader accessible; the visible label can wrap freely. */
.turn { grid-template-columns:180px minmax(0,1fr); }
.turn-side { min-width:0; }
.speaker-picker { position:relative; width:100%; min-width:0; border-radius:10px; }
.speaker-label { display:block; min-height:40px; padding:10px 28px 10px 10px; background:#e4f4ed; color:#267765; border-radius:10px; font-size:12px; font-weight:600; line-height:1.45; white-space:normal; overflow-wrap:anywhere; }
.speaker-picker::after { content:''; position:absolute; right:11px; top:17px; width:7px; height:7px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg); pointer-events:none; color:#487064; }
.speaker-picker .speaker-select { position:absolute; inset:0; opacity:0; width:100%; height:100%; max-width:none; margin:0; cursor:pointer; }
.speaker-picker:focus-within { outline:3px solid #54c7b7; outline-offset:2px; }
.turn[data-color="1"] .speaker-label { background:#e8f1fb; color:#3e73a6; }
.turn[data-color="2"] .speaker-label { background:#fbefdc; color:#98722c; }
.recording-stats { flex-wrap:wrap; }
.download { flex-wrap:wrap; }
.search-box { min-width:0; }
.search-box input, .model-picker select, dialog input, dialog select { min-width:0; max-width:100%; }
.dropzone strong,.summary-text,#userList { overflow-wrap:anywhere; }
@media(max-width:1100px) { .turn { grid-template-columns:150px minmax(0,1fr); } .editor-toolbar { flex-wrap:wrap; } }
@media(max-width:900px) {
  .workspace { display:block; }
  .sidebar { width:100%; height:auto; position:relative; padding:16px; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; }
  .sidebar .brand { max-width: 204px; margin: 0; }
  .sidebar > .primary { width:auto; margin:0; padding:12px; min-height:44px; }
  .nav-heading { display:none; }
  .job-list { grid-column:1/-1; display:flex; overflow-x:auto; gap:8px; max-height:90px; min-width:0; }
  .job-item { flex:0 0 200px; min-width:0; max-width:200px; margin:0; padding:12px; }
  .sidebar-bottom { grid-column:1/-1; margin:0; padding:8px 0 0; }
  .sidebar-bottom .icon-btn { min-width:44px; min-height:44px; }
  .turn { grid-template-columns:minmax(0,1fr); gap:12px; }
  .turn-side { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:10px; align-items:center; padding:0; }
  .speaker-picker { max-width:420px; }
  .speaker-label { min-height:44px; font-size:13px; }
  .turn-side .timecode,.block-grip { min-width:44px; min-height:44px; }
  .manual-time { grid-column:1/-1; }
  .follow-label { display:flex; margin-left:0; min-height:44px; }
  .editor-toolbar { flex-wrap:wrap; gap:8px; }
  .search-box { flex-basis:100%; max-width:none; }
  .search-box input { width:100%; }
  .recording-heading { flex-direction:column; align-items:stretch; }
  .download { flex-direction:row; align-self:flex-start; max-width:100%; }
}
@media(max-width:600px) {
  .sidebar { padding:12px; gap:10px; }
  .sidebar > .primary { font-size:12px; padding:10px; }
  .recording-view { padding:22px 12px calc(32px + env(safe-area-inset-bottom)); }
  .topbar { padding:0 12px; }
  .title-input { font-size:22px; }
  .download { width:100%; display:grid; grid-template-columns:auto minmax(0,1fr) minmax(0,1fr); gap:4px; }
  .download button { white-space:normal; min-height:44px; }
  .dialogue-controls { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .dialogue-controls button { min-height:44px; padding:10px; }
  .dialogue-controls button:first-child { grid-column:1/-1; }
  .editor-toolbar button { min-height:44px; }
  .transcript-info { flex-direction:column; gap:6px; }
  .transcript-info span:last-child { max-width:none; text-align:left; }
  .transcript { padding:6px 12px; border-radius:14px; }
  .turn { padding:18px 0; }
  .turn-side { gap:8px; }
  .speaker-picker { max-width:none; }
  .speaker-picker .speaker-select { font-size:16px !important; }
  .turn textarea,.word-layer { font-size:16px; line-height:1.65; }
  .block-tools { gap:16px; }
  .block-tools button { min-height:44px; font-size:12px; }
  .review-player { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:8px; top:calc(6px + env(safe-area-inset-top)); }
  .review-transport { display:grid; grid-template-columns:44px minmax(0,1fr) 44px; grid-column:1/-1; gap:8px; }
  .review-player .round-btn,.review-play { min-height:44px; width:100%; }
  .review-position { grid-column:1; order:0; min-width:0; }
  .review-speed { grid-column:2; margin:0; }
  .review-mute { grid-column:3; width:44px; height:44px; }
  .review-speed select { min-height:40px; font-size:16px; }
  .review-position input { min-height:28px; }
  .follow-label { width:100%; }
  input[type=checkbox] { width:20px; height:20px; }
  .summary-actions { flex-wrap:wrap; }
  .summary-actions button,.summary-heading button { min-height:44px; }
  dialog { width:calc(100% - 24px); max-width:calc(100% - 24px); padding:20px 16px; border-radius:16px; max-height:calc(100dvh - 24px); }
  dialog input:not([type=checkbox]),dialog select,.search-box input { font-size:16px; min-height:44px; }
  .dialog-heading h2 { font-size:22px; }
  .dialog-heading .icon-btn { min-width:44px; min-height:44px; }
  #speakerFields label { flex-direction:column; align-items:stretch; gap:6px; }
  .login-card { width:100%; padding:24px 18px; }
  .login-card input { font-size:16px; }
  .toast { left:12px; right:12px; bottom:calc(12px + env(safe-area-inset-bottom)); max-width:none; }
}
