.sidebar-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.sidebar-heading .sidebar-logo { padding-inline: 0; }
.sidebar-toggle { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 6px; color: #aeb7c4; background: #16191e; }
.sidebar-toggle:hover { color: var(--text); background: #22262d; }
.shell.sidebar-collapsed { grid-template-columns: 62px minmax(0, 1fr); }
.sidebar-collapsed .sidebar { padding-inline: 9px; }
.sidebar-collapsed .sidebar-heading { flex-direction: column; gap: 14px; }
.sidebar-collapsed .sidebar-logo .brand-name,
.sidebar-collapsed .sidebar .nav-item span,
.sidebar-collapsed .profile strong,
.sidebar-collapsed .profile small,
.sidebar-collapsed .nav-caption,
.sidebar-collapsed .mini-status { display: none; }
.sidebar-collapsed .sidebar .nav-item { justify-content: center; padding-inline: 0; }
.sidebar-collapsed .sidebar-toggle svg { transform: scaleX(-1); }
.sidebar .profile .avatar { flex: none; }
.sidebar-collapsed .profile { justify-content: center; gap: 0; padding-inline: 0; }
.sidebar-collapsed .profile > span:not(.avatar) { display: none; }

.transcript-shell { height: 100dvh; min-height: 0; overflow: hidden; }
.transcript-shell .top-bar, .transcript-shell .nav-caption, .transcript-shell .nav-item.disabled,
.transcript-shell .mini-status, .transcript-shell .profile small { display: none; }
.transcript-shell .sidebar { height: 100%; min-height: 0; }
.transcript-shell .main-layout { min-width: 0; min-height: 0; height: 100%; }
.transcript-editor { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; min-width: 0; color: #f0f0ed; }
.transcript-toolbar {
  display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  min-height: 62px; padding: 9px clamp(12px, 2.5vw, 32px);
  border-bottom: 1px solid #2d3037; z-index: 4; background: #101216;
}
.transcript-toolbar button, .transcript-toolbar a, .transcript-selection button, .transcript-follow {
  display: inline-flex; align-items: center; justify-content: center; min-height: 34px;
  padding: 5px 10px; border-radius: 6px; color: #dce1e9; font-size: 12px;
  font-weight: 600; background: transparent; white-space: nowrap;
}
.transcript-toolbar button:hover, .transcript-toolbar a:hover, .transcript-selection button:hover { background: #272b34; }
.transcript-modes, .transcript-tools { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.transcript-modes { border: 1px solid #343945; border-radius: 8px; background: #161922; padding: 3px; }
.transcript-modes [aria-pressed=true] { background: #e2efe9; color: #182a22; }
.transcript-modes [aria-pressed=true]:hover { background: #f2f9f5; }
.transcript-modes kbd { margin: 0 5px 0 2px; color: #aeb4c0; padding: 3px 4px; border: 1px solid #454954; border-radius: 4px; font: 10px ui-monospace, monospace; }
.transcript-tools [data-reels] span { margin-left: 5px; color: #9bdac0; }
.transcript-stage { display: grid; grid-template-rows: minmax(0, 1fr) auto; position: relative; isolation: isolate; min-height: 0; background: #0c0e12; }
.transcript-player { display: contents; }
.transcript-editor .transcript-player .player-screen {
  position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto;
  z-index: -2; opacity: var(--transcript-video-opacity, .18); pointer-events: none; border-radius: 0;
}
.transcript-editor .transcript-player .player-screen video { width: 100%; height: 100%; object-fit: cover; }
.transcript-editor .transcript-player .big-play, .transcript-editor .transcript-player #fullscreen { display: none; }
.transcript-scroll {
  min-height: 0; overflow: auto; grid-row: 1; scrollbar-color: #59606e #101216;
  scrollbar-gutter: stable; overscroll-behavior: contain; overflow-anchor: none;
}
.transcript-scroll:focus-visible { outline-offset: -3px; }
.transcript-document {
  position: relative;
  width: min(100%, 1040px); margin: 0 auto; padding: clamp(30px, 6vh, 76px) clamp(24px, 6vw, 88px) min(40vh, 250px);
  font: 400 clamp(18px, 2vw, 25px)/1.68 'Inter', 'Segoe UI', system-ui, sans-serif;
}
.transcript-chunk { display: flow-root; }
.transcript-chunk:empty { user-select: none; }
.transcript-paragraph { position: relative; margin: 0 0 1.3em; }
.transcript-paragraph::before {
  content: attr(data-time);
  position: absolute; right: calc(100% + 10px); top: .9em;
  color: #a4aab4; font: 10px/1.25 ui-monospace, monospace;
  white-space: nowrap; user-select: none; pointer-events: none; text-shadow: none;
}
.transcript-document [data-cue] { color: #e8ebef; }
.transcript-document [data-cue].is-past { color: #a9b0bb; }
.transcript-document [data-cue].is-highlight { background: #765924; color: #fff3ca; }
.transcript-document [data-cue].is-highlight:where(.is-past) { color: #ddd1a9; }
.transcript-space.is-highlight { background: #765924; }
.transcript-outline .transcript-document { text-shadow: -1px -1px #000, 1px -1px #000, -1px 1px #000, 1px 1px #000, 0 2px 5px #000; }
.transcript-document [data-cue].is-reel { box-shadow: inset 0 -2px #78bdc5; }
.transcript-document [data-cue].is-active { color: #10251a; background: #a9e8ca; border-radius: 3px; box-shadow: 0 0 0 2px #a9e8ca; transition: background-color 75ms; text-shadow: none; }
.transcript-document [data-cue].is-active.is-reel { box-shadow: 0 0 0 2px #a9e8ca, inset 0 -2px #347884; }
.transcript-editor[data-mode=navigate] .transcript-document { user-select: none; }
.transcript-editor[data-mode=navigate] [data-cue] { cursor: pointer; }
.transcript-editor[data-mode=navigate] [data-cue]:hover { background: #497162; color: #fff; }
.transcript-editor[data-mode=copy] .transcript-document { cursor: text; }
.transcript-editor .review-controls { grid-row: 2; position: relative; z-index: 3; padding: 7px clamp(9px, 2vw, 24px) 11px; border-top: 1px solid #323744; background: #151820; }
.transcript-editor .review-track { height: 35px; margin: 0 8px; }
.transcript-editor .review-seek { height: 6px; }
.transcript-editor .review-marker { height: 20px; top: -1px; }
.transcript-editor .review-marker::before { width: 9px; height: 9px; }
.transcript-editor #toggle-play { width: 42px; height: 36px; color: #17231d; background: #d7eee2; }
.transcript-editor #toggle-play:hover { background: #f0fff7; }
.transcript-follow, .transcript-selection, .transcript-reels, .transcript-view-settings {
  position: absolute; z-index: 5; bottom: 105px; border-radius: 8px; border: 1px solid #424952; background: #20252e; box-shadow: 0 10px 28px #0007;
}
.transcript-follow { right: 18px; }
.transcript-selection { left: 50%; transform: translateX(-50%); display: flex; gap: 3px; padding: 4px; }
.transcript-selection [data-selection=reel] { background: #315249; }
.transcript-selection button:disabled { opacity: .5; cursor: default; }
.transcript-reels, .transcript-view-settings { top: 12px; bottom: auto; right: 16px; max-height: 65%; overflow: auto; padding: 14px; }
.transcript-view-settings { width: min(265px, calc(100% - 32px)); color: #e8ebef; font-size: 13px; }
.transcript-view-settings label { display: block; }
.transcript-view-settings label + label { margin-top: 12px; }
.transcript-view-settings output { float: right; font-variant-numeric: tabular-nums; }
.transcript-view-settings input[type=range] { width: 100%; margin-top: 9px; }
.transcript-reels { width: min(460px, calc(100% - 32px)); }
.transcript-reels h2 { font-size: 14px; margin-bottom: 10px; }
.reel-picker, .reel-name { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px; }
.transcript-reels select, .transcript-reels input { min-width: 105px; flex: 1; color: #e8ebef; background: #171a22; border: 1px solid #424952; border-radius: 5px; padding: 6px; }
.transcript-reels button { color: #dce1e9; background: #171a22; border: 1px solid #373d48; border-radius: 5px; padding: 6px 8px; }
.transcript-reels button:hover { background: #2d3340; }
.transcript-reels button:disabled { opacity: .4; cursor: default; }
.transcript-reels [data-reel-action=delete-reel] { color: #ffb8b7; }
.reel-clips, .reel-highlights { display: grid; gap: 5px; padding: 0; margin: 8px 0 12px; list-style: none; }
.reel-clips li, .reel-highlights li { display: flex; gap: 4px; align-items: center; }
.transcript-reels [data-reel-action=jump] { display: grid; gap: 3px; flex: 1; min-width: 0; text-align: left; }
.transcript-reels [data-reel-action=jump] span { overflow-wrap: anywhere; }
.transcript-reels strong { color: #a9e8ca; }
.transcript-reels summary { cursor: pointer; color: #e7cb91; }
.transcript-reels summary span { margin-left: 4px; }
.transcript-editor [hidden] { display: none !important; }

@media (max-width: 890px) {
  .transcript-shell:not(.sidebar-collapsed) { grid-template-rows: auto minmax(0, 1fr); }
  .shell.sidebar-collapsed { grid-template-columns: 48px minmax(0, 1fr); }
  .shell.sidebar-collapsed .sidebar { flex-direction: column; padding: 12px 6px; gap: 12px; }
  .shell.sidebar-collapsed .sidebar .nav-item { width: 100%; }
}
@media (max-width: 580px) {
  .transcript-document { font-size: 18px; padding-inline: 20px; }
  .transcript-toolbar { gap: 4px; }
  .transcript-toolbar button, .transcript-toolbar a, .transcript-selection button { font-size: 11px; padding-inline: 6px; }
  .transcript-selection { left: 10px; right: 10px; transform: none; flex-wrap: wrap; }
}
@media (max-width: 840px) {
  .transcript-paragraph::before { right: auto; left: 0; top: -1.3em; }
}
@media (prefers-reduced-motion: reduce) { .transcript-document [data-cue] { transition: none; } }
