/* Charcoal workspace with violet accents. Event hues and the responsive player layout
   remain defined in styles.css; this layer owns shared UI surfaces. */
:root {
  --bg: #18181b;
  --panel: #222225;
  --panel-2: #2c2c31;
  --border: #3f3f46;
  --text: #f5f3fa;
  --muted: #b6b3c1;
  --accent: #c4a5ff;
  --primary: #7c3aed;
  --selected: #38264f;
  --radius: 8px;
  --radius-lg: 16px;
  --hit: 44px;
  --text-xs: 0.875rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --shadow: 0 16px 48px #08050d80;
}

body { font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 16px; }
:where(a) { color: var(--accent); text-underline-offset: 3px; }
button, input, select, textarea { font-family: inherit; }
button { font-weight: 600; }
button, button.tiny, button.ghost, a.button-like, .view-toggle button, #stream-view button, .timeline-primary-controls button { min-height: 44px; }
input:not([type=checkbox]):not([type=radio]):not([type=range]), select { min-height: 44px; font-size: 16px; }
button, a, input, select { transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease; }
button:not(.ghost):not(.tab):not(.danger) { box-shadow: inset 0 1px 0 #ffffff12; }
button.ghost, button.tab { border-color: var(--border); }
button.ghost:hover { border-color: #866ba9; }
input:not([type='checkbox']):not([type='radio']):not([type='range']), select, textarea {
  background: #1b1b1f;
  border-color: var(--border);
}
input:not([type='checkbox']):not([type='radio']):not([type='range']):focus,
select:focus, textarea:focus { border-color: var(--accent); }

.app-header { background: #1e1e22; }
.app-brand > .icon { width: 34px; height: 34px; padding: 8px; background: var(--selected); border-radius: 10px; }
.app-header h1 .icon-gift { color: var(--accent); }
.app-brand small { letter-spacing: 0.025em; }
.workspace-label { font-size: 12px; }
.workspace-kicker { color: var(--text); font-size: 10px; font-weight: 700; letter-spacing: 0.15em; margin-right: 14px; }
.header-overflow { gap: 12px; }
#logout { min-height: 44px; }
.app-nav .tab.active { background: var(--selected); color: var(--accent); }

main { padding: var(--space-6); }
.page-heading { margin-bottom: var(--space-6); }
.eyebrow { color: var(--accent); font-size: 10px; letter-spacing: 0.18em; font-weight: 700; }
.page-heading h2 { font-size: 34px; font-weight: 650; letter-spacing: -0.045em; margin: 0.45rem 0 0.6rem; }
.page-description { font-size: 14px; color: var(--muted); }
#streams-count, #videos-count { display: inline-block; padding: 3px 9px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; }
#streams-count:empty, #videos-count:empty { display: none; }

.toolbar { background: var(--panel); padding: var(--space-5); border-radius: var(--radius-lg); box-shadow: none; }
.toolbar-row { gap: 1rem; flex-wrap: wrap; }
.toolbar-group { min-width: 0; flex-wrap: wrap; }
.toolbar form:has(input[type=search]) { flex: 1 1 240px; }
.toolbar input[type='search'] { padding-left: 0.85rem; min-width: min(240px, 100%); max-width: 100%; }
.view-toggle { background: #19191d; padding: 4px; border-radius: 10px; }
.view-toggle button { border-radius: 6px; }
.view-toggle button.active { background: var(--selected); color: var(--accent); }
.toolbar-panel:not([hidden]) { margin-top: 0.35rem; padding-top: 1rem; }
.group-title { font-size: 14px; letter-spacing: -0.01em; padding-bottom: 0.85rem; }
.stream-grid { gap: var(--space-5); }
.live-card, .stream-card { padding: var(--space-5); gap: 1rem; box-shadow: none; }
.live-card:hover, .stream-card:hover { background: #2b2833; border-top-color: #775c9b; border-right-color: #775c9b; border-bottom-color: #775c9b; }
.live-card-top { gap: 0.6rem; }
.live-chan { font-size: 15px; letter-spacing: -0.015em; }
.live-card-time { font-size: 14px; }
.live-card-viewers { padding: 0.35rem 0; }
.stream-len { font-size: 26px; font-weight: 650; letter-spacing: -0.04em; }
.live-now strong { font-size: 30px; letter-spacing: -0.04em; }
.stream-card .live-now strong { font-size: 22px; }
.live-card .counter-strip, .stream-card .counter-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
}
.live-card .counter, .stream-card .counter { display: grid; grid-template-columns: 15px minmax(0, 1fr); align-items: center; gap: 0.1rem 0.4rem; }
.live-card .counter strong, .stream-card .counter strong { font-size: 16px; font-weight: 600; }
.live-card .counter-label, .stream-card .counter-label { grid-column: 2; font-size: 11px; }
.live-card-transcript { display: grid; gap: 0.3rem; padding: 0.75rem; border: 1px solid var(--border); border-radius: 8px; background: color-mix(in srgb, var(--panel-2) 55%, transparent); }
.live-card-transcript > a { display: inline-flex; align-items: center; gap: 0.35rem; width: fit-content; font-size: 13px; font-weight: 650; }
.live-card-transcript-text { font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.live-card-foot { padding-top: 0.75rem; }
.pinned-live { padding-bottom: 1.5rem; margin-bottom: 1.75rem; }
.badge { font-size: 12px; font-weight: 600; letter-spacing: 0.02em; padding: 3px 7px; }
.live-strip { background: #112721; border-color: #2b5144; }

.table-wrap { box-shadow: 0 5px 20px #00000012; }
th { background: #29292e; font-size: 14px; font-weight: 600; }
th, td { padding: 1rem 1.25rem; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { max-width: 100%; overflow-x: auto; }
tbody tr:focus-within { background: var(--selected); }
.group-head th { background: #322b3e; }
.group-head th > a { color: var(--text); }
.empty { border: 1px dashed var(--border); padding: 2.5rem 1.5rem; }
.settings-block, .discover-panel, .channel-add-panel { box-shadow: 0 5px 20px #00000012; }
.settings-block, .discover-panel, .channel-add-panel { padding: var(--space-5); margin-bottom: var(--space-5); }
.settings-block h3, .discover-panel h3 { letter-spacing: -0.025em; }
.settings-group { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: var(--accent); }
.setting-help { font-size: 14px; line-height: 1.6; }
.settings-jump { gap: 0.5rem; }

.videos-list { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--panel); }
.videos-list .video-item { padding: 1rem; gap: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); }
.videos-list .video-list-head { font-size: 14px; padding: 0.75rem 1rem; background: var(--panel); }
.files-nav { padding-bottom: 1rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.files-nav .active { background: var(--selected); color: var(--accent); border-color: #76579c; }
.archive-card { border-radius: var(--radius-lg); padding: 1.25rem; }
.archive-card strong { font-size: 28px; letter-spacing: -0.035em; }
.videos-list .video-item.is-selected { background: var(--selected); box-shadow: inset 3px 0 var(--accent); }
.videos-player { padding: 1rem; }
#videos-player[data-stream-id] { gap: 0.75rem; }
.video-lifecycle-actions { gap: 0.75rem; flex-wrap: wrap; }
.videos-preview-head { line-height: 1.6; }
.videos-preview-idle .empty { background: var(--panel); border-radius: var(--radius-lg); }
.videos-file-name { letter-spacing: -0.025em; }
.modal { border-radius: 18px; border-color: #5b4a70; box-shadow: 0 30px 100px #08050dc9; }
.modal::backdrop { background: #08060dc9; backdrop-filter: blur(6px); }
.modal-head { background: #27252e; padding: 1.15rem 1.5rem; }
.modal-tabs { background: #1e1e22; padding: 0.65rem 1.5rem; }
.modal-tabs button.tab.active { background: var(--selected); color: var(--accent); }
.person-primary-metrics > span { background: #2c2933; padding: 1.15rem; border-radius: 12px; }
.person-primary-metrics strong { font-size: 28px; }

#login-view { background: radial-gradient(ellipse at 50% 15%, #3a25566b 0, transparent 60%), var(--bg); }
.login-card { padding: 2.5rem; width: min(440px, 100%); border-radius: 20px; box-shadow: 0 24px 90px #0006; }
.login-mark { height: 52px; width: 52px; border: 1px solid #76579c; border-radius: 14px; }
.login-card h1 { font-size: 30px; }
.login-card input, .login-card button { min-height: 46px; }

@media (min-width: 1100px) {
  :root { --sidebar-w: 232px; --header-row: 4.25rem; }
  .app-header .app-brand { background: #1e1e22; padding-left: 1.5rem; font-size: 15px; }
  .app-nav { background: #1e1e22; padding: 2rem 1rem 1.25rem; gap: 0.5rem; }
  .nav-caption { padding-left: 0.85rem; padding-bottom: 1rem; font-size: 9px; letter-spacing: 0.17em; }
  .app-nav .tab { border-radius: 10px; min-height: 46px; padding: 0.7rem 0.85rem; font-size: 13px; }
  .app-nav .tab.active { border-color: #76579c; box-shadow: inset 3px 0 0 var(--accent); }
  main { padding-left: 2rem; padding-right: 2rem; }
  .app-nav .tab[data-tab="health"] { margin-top: 1.5rem; position: relative; }
  .app-nav .tab[data-tab="health"]::before { content: ""; position: absolute; top: -0.85rem; left: 0; right: 0; border-top: 1px solid var(--border); }
  .app-nav .tab[data-tab="settings"] { margin-top: 0; }
}

@media (min-width: 701px) and (max-width: 1099px) {
  .app-header { padding-left: 1rem; padding-right: 1rem; }
  main { padding-left: 2rem; padding-right: 2rem; }
}

@media (max-width: 700px) {
  .app-header { padding-left: 1rem; padding-right: 1rem; }
  .app-brand > .icon { width: 30px; height: 30px; padding: 7px; }
  .app-nav { background: #1e1e22; box-shadow: 0 -8px 24px #0003; }
  .app-nav .tab { border-radius: 8px; flex: 0 0 auto; min-width: 76px; padding-inline: 0.65rem; }
  .app-nav { justify-content: flex-start; }
  main { padding: 1.5rem 1rem; }
  .page-heading { margin-bottom: 1.25rem; }
  .page-heading h2 { font-size: 28px; }
  .toolbar { padding: 1rem; }
  .toolbar input[type='search'] { min-width: 0; }
  .toolbar-row { gap: 0.5rem; }
  .live-card, .stream-card { padding: 1rem; }
  .live-card .counter-strip, .stream-card .counter-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  th, td { padding: 0.85rem 1rem; }
  .modal { border-radius: 0; }
  .modal-head { padding: 0.85rem; }
  .modal-tabs { padding: 0.5rem 0.75rem; }
  .login-card { padding: 1.75rem; }
  .login-card h1 { font-size: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  button, a, input, select { transition: none; }
}

/* Comfortable broadcast browsing and a detail frame with navigation always
   visible while its content scrolls. */
#stream-view { gap: 4px; padding: 5px; border-radius: 12px; }
#stream-view button { min-height: 44px; padding: 0.5rem 0.85rem; border-radius: 8px; }
#stream-view button.active { box-shadow: inset 0 0 0 1px #c4a5ff40; }
.stream-card, .live-card { border-radius: var(--radius-lg); }
.live-card-foot { flex-wrap: wrap; gap: 0.65rem; }
.stream-open { white-space: nowrap; text-decoration: none; }
.stream-card .stream-open { margin-left: auto; }
.modal[data-kind='stream'] { width: min(96%, 1280px); background: #222225; }
.modal[data-kind='stream'] .crumbs {
  padding: 0.85rem 1.5rem;
  background: #1e1e22;
  border-bottom: 1px solid var(--border);
  gap: 0.65rem;
}
.modal[data-kind='stream'] .crumbs > a:first-child {
  color: var(--accent); font-weight: 600;
}
.modal[data-kind='stream'] .crumb-steppers a {
  min-height: 44px; padding: 0.4rem 0.7rem; border-radius: 8px;
}
.modal[data-kind='stream'] .modal-head { padding: 1.25rem 1.5rem; }
.modal[data-kind='stream'] .modal-head h3 { font-size: 20px; line-height: 1.5; }
.modal[data-kind='stream'] .modal-tabs {
  flex-wrap: wrap; gap: 0.5rem; padding: 0.85rem 1.5rem;
  mask-image: none; -webkit-mask-image: none;
}
.modal[data-kind='stream'] .tab-sep { display: none; }
.modal[data-kind='stream'] .modal-tabs button.tab {
  min-height: 44px; padding: 0.6rem 1rem;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  font-size: 13px;
}
.modal[data-kind='stream'] .modal-tabs button.tab.active {
  background: var(--selected); border-color: #8664ad; color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.modal[data-kind='stream'] .modal-tabs button.tab.active::after { display: none; }
.modal[data-kind='stream'] .modal-body { padding: 1.5rem; }
.modal[data-kind='stream'] .modal-body:has(.console-workspace) { padding: 0.75rem; }
.modal[data-kind='stream'] .charts-page {
  --charts-warm: color-mix(in srgb, var(--accent-2) 4%, var(--panel-2));
  --charts-line: color-mix(in srgb, var(--accent-2) 8%, var(--border));
  gap: 1rem;
}
.modal[data-kind='stream'] .charts-nav {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  padding: 0.75rem; border: 1px solid var(--border); border-radius: 12px;
  background: var(--panel);
}
.modal[data-kind='stream'] .charts-nav .ghost.tiny {
  background: transparent; border-color: var(--border); border-radius: 8px;
  padding: 0.4rem 0.65rem;
}
.modal[data-kind='stream'] .charts-nav .ghost.tiny:hover { background: var(--selected); color: var(--accent); }
.modal[data-kind='stream'] .chart-section { padding: 1rem; gap: 0.75rem; border-radius: 14px; }
.modal[data-kind='stream'] .modal-body > h4 { margin-top: 1.5rem; margin-bottom: 0.85rem; }
.modal[data-kind='stream'] .modal-body > .counters {
  padding: 1.25rem; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 14px; margin: 1rem 0 1.5rem;
}
.modal[data-kind='stream'] .viz-filters:has([data-pv], [data-rv]) {
  padding: 0.65rem; gap: 0.5rem; background: var(--panel);
  border: 1px solid var(--border); border-radius: 12px; margin-bottom: 1.25rem;
}
.modal[data-kind='stream'] .viz-filters button.active {
  background: var(--selected); color: var(--accent); border-color: #8664ad;
}
@media (max-width: 700px) {
  #stream-view { width: 100%; }
  #stream-view button { flex: 1; padding: 0.5rem 0.4rem; }
  .modal[data-kind='stream'] { width: 100%; height: 100dvh; max-height: 100dvh; }
  .modal[data-kind='stream'] .crumbs { padding: max(0.65rem, var(--safe-top)) 0.85rem 0.65rem; gap: 0.4rem; }
  .modal[data-kind='stream'] .modal-head { padding: 0.85rem; }
  .modal[data-kind='stream'] .modal-head h3 { font-size: 16px; }
  .modal[data-kind='stream'] .modal-tabs {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0.65rem 0.85rem; gap: 0.4rem; overflow: visible;
  }
  .modal[data-kind='stream'] .modal-tabs button.tab {
    min-width: 0; min-height: 44px; padding: 0.5rem 0.25rem; font-size: 12px;
  }
  .modal[data-kind='stream'] .modal-body { padding: 1rem; }
}

/* Live console: a room-wide metric strip above a player and readable feed.
   The player and feed keep their DOM while the socket patches their contents. */
.modal[data-kind='stream']:has(.console-workspace) { width: min(97%, 1600px); }
.modal[data-kind='stream'] .stream-title-main { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.modal[data-kind='stream'] .stream-title-context {
  display: block; margin-top: 0.35rem; color: var(--muted);
  font-size: 12px; font-weight: 400; line-height: 1.5;
}
.modal[data-kind='stream'] .title-clock {
  margin-left: 0.35rem; padding-left: 0.75rem; border-left: 1px solid var(--border);
  font-size: 14px;
}
.modal[data-kind='stream']:has(.console-workspace) .crumbs { padding-top: 0.65rem; padding-bottom: 0.65rem; }
.modal[data-kind='stream']:has(.console-workspace) .modal-head { padding-top: 0.85rem; padding-bottom: 0.85rem; align-items: flex-start; }
.modal[data-kind='stream']:has(.console-workspace) .modal-tabs { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.modal[data-kind='stream'] .modal-body:has(.console-workspace) { padding: 1rem; }
.console-workspace {
  grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr); gap: 1rem;
}
.console-metrics { grid-column: 1 / -1; min-width: 0; font-variant-numeric: tabular-nums; }
.console-metrics .counter-strip.full {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem; padding: 0; margin: 0; background: none; border: 0;
}
.console-metrics .counter-strip.full .counter {
  display: grid; grid-template-columns: 1fr auto; gap: 0.25rem;
  padding: 0.8rem 1rem; background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; min-width: 0;
}
.console-metrics .counter-strip.full .counter > .icon { grid-column: 2; grid-row: 1; color: var(--muted); width: 15px; height: 15px; }
.console-metrics .counter-strip.full strong {
  grid-column: 1; grid-row: 2; font-size: clamp(20px, 2vw, 28px);
  line-height: 1.2; font-weight: 650; letter-spacing: -0.035em;
}
.console-metrics .counter-strip.full .counter-label { grid-column: 1; grid-row: 1; color: var(--muted); font-size: 11px; white-space: normal; }
.console-metrics .counter-strip.full .counter:has(#c-viewers) { border-color: #366359; background: #142c2a; }
.console-metrics #c-viewers { color: var(--accent); }
.console-secondary-metrics .counter-strip {
  display: flex; flex-wrap: wrap; gap: 0.45rem 1.5rem; padding: 0.65rem 0.25rem 0;
  margin: 0; background: none; border: 0; font-size: 12px;
}
.console-secondary-metrics .counter { gap: 0.35rem; }
.console-secondary-metrics .counter-label { color: var(--muted); font-size: 12px; }
.console-watch { display: flex; flex-direction: column; min-width: 0; min-height: 0; gap: 0.75rem; overflow-y: auto; }
.console-preview { flex: 1 0 auto; min-height: 390px; padding: 1rem; border-radius: 14px; background: var(--panel); }
.console-preview .stream-video { gap: 0.65rem; }
.console-preview .detail-head { margin-bottom: 0; }
.console-preview .detail-head h4 { font-size: 13px; }
.console-preview .video-stage {
  flex: 1 1 auto; min-height: 180px; max-height: none; border-radius: 10px;
  background: #060a0f;
}
.console-preview .stream-video video { background: #060a0f; min-height: 0; }
.console-preview .stream-video > [data-video-health] { margin: 0; font-size: 11px; line-height: 1.6; }
.console-preview .recording-timeline { flex: 0 0 auto; margin: 0; padding: 0.5rem 0; }
.console-preview .recording-timeline input[type='range'] { accent-color: var(--accent); min-height: 24px; }
.console-preview .recording-timeline-actions { margin-top: 0.35rem; font-size: 12px; }
.console-preview [data-recording-live] { color: var(--accent); }
.console-panel { padding: 0.25rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); flex: 0 0 auto; max-height: 160px; overflow-y: auto; }
.console-panel .guests { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; padding: 0.6rem 0; margin: 0; border: 0; background: none; }
.console-panel .guests + .guests { border-top: 1px solid var(--border); }
.console-panel .guests > span:first-child { margin-right: auto; }
.console-panel .badge { padding: 4px 8px; font-size: 11px; text-decoration: none; }
.console-workspace .console-layout {
  position: relative; gap: 0; border: 1px solid var(--border); border-radius: 14px;
  background: var(--panel); overflow: hidden;
}
.console-activity-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 1rem 1rem 0.75rem; flex: 0 0 auto; }
.modal-body .console-activity-head h4 { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-size: 14px; }
.console-activity-head h4 .icon { color: var(--accent); }
.console-activity-head .small { font-size: 11px; }
.console-feed-filters { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0 1rem 0.75rem; flex: 0 0 auto; }
.console-feed-filters button { border-color: transparent; background: transparent; color: var(--muted); padding: 0.4rem 0.65rem; min-height: 44px; }
.console-feed-filters button.active, .console-layout .span-bar button.active { background: var(--selected); border-color: #76579c; color: var(--accent); }
.console-layout .span-bar { padding: 0.65rem 1rem; margin: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #1e1e22; gap: 0.4rem; }
.console-layout .span-bar button { min-height: 44px; }
.console-range { min-width: 0; }
.console-range summary { color: var(--muted); cursor: pointer; font-size: 12px; padding: 0.45rem; border-radius: 6px; }
.console-range summary:hover { color: var(--text); }
.console-range-fields { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; padding: 0.5rem 0; }
.console-range[open] { flex-basis: 100%; }
.console-range-fields input[type='number'] { width: 4.5rem; min-height: 44px; padding: 0.35rem; }
.console-layout :is(#console-feed, #console-history) { background: #1c1c20; border-radius: 0; padding: 0.4rem 0; scrollbar-width: thin; scrollbar-color: #705986 transparent; }
.feed-content { flex: 1; min-width: 0; }
.console-layout :is(#console-feed, #console-history) .feed-row {
  align-items: baseline; padding: 0.65rem 0.85rem; gap: 0.75rem;
  font-size: 13px; line-height: 1.65; border-bottom: 1px solid #3f3f4680;
}
.console-layout :is(#console-feed, #console-history) .feed-time { flex-basis: 5rem; font-size: 10px; color: var(--muted); }
.console-layout :is(#console-feed, #console-history) .feed-content > .icon:first-child { margin-right: 0.3rem; color: var(--muted); }
.console-layout :is(#console-feed, #console-history) .feed-content > .feed-user { text-decoration: none; }
.console-layout :is(#console-feed, #console-history) .feed-user:hover { text-decoration: underline; }
.console-layout #console-feed .feed-gift { background: #7dd3fc09; }
.console-layout #console-feed .feed-like { background: #fb718505; }
.console-layout #console-feed .feed-enforcement { background: color-mix(in srgb, var(--danger) 18%, var(--panel)); }
.console-layout[data-feed-filter='comment'] .feed-row:not(.feed-comment),
.console-layout[data-feed-filter='gift'] .feed-row:not(.feed-gift),
.console-layout[data-feed-filter='like'] .feed-row:not(.feed-like),
.console-layout[data-feed-filter='signals'] .feed-row:is(.feed-comment, .feed-gift, .feed-like) { display: none; }
.console-feed-empty { display: none; position: absolute; bottom: 25%; left: 1rem; right: 1rem; text-align: center; font-size: 13px; color: var(--muted); pointer-events: none; }
.console-layout:has(#console-feed:not([hidden])):is(
  [data-feed-filter='all']:not(:has(#console-feed .feed-row)),
  [data-feed-filter='comment']:not(:has(#console-feed .feed-comment)),
  [data-feed-filter='gift']:not(:has(#console-feed .feed-gift)),
  [data-feed-filter='like']:not(:has(#console-feed .feed-like)),
  [data-feed-filter='signals']:not(:has(#console-feed .feed-row:not(.feed-comment, .feed-gift, .feed-like)))
) .console-feed-empty { display: block; }

@media (max-width: 1100px) and (min-width: 1001px) {
  .console-metrics .counter-strip.full .counter { padding: 0.75rem; }
  .console-feed-filters { padding-left: 0.65rem; padding-right: 0.65rem; }
  .console-feed-filters button { padding-left: 0.45rem; padding-right: 0.45rem; }
}
@media (max-width: 1000px) {
  .modal[data-kind='stream'] .modal-body:has(.console-workspace) { overflow-y: auto; display: block; }
  .console-workspace {
    height: auto; min-height: 100%; grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(440px, 1fr);
  }
  .console-metrics .counter-strip.full { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .console-watch { min-height: 480px; }
  .console-preview { min-height: 380px; }
  .console-workspace .console-layout { height: 560px; }
}
@media (max-width: 700px) {
  .modal[data-kind='stream']:has(.console-workspace) { width: 100%; height: var(--vvh); max-height: var(--vvh); }
  .modal[data-kind='stream'] .modal-body:has(.console-workspace) { padding: 0.75rem; }
  .modal[data-kind='stream'] .stream-title-context { font-size: 11px; }
  .console-workspace { gap: 0.75rem; }
  .console-metrics .counter-strip.full { gap: 0.4rem; }
  .console-metrics .counter-strip.full .counter { padding: 0.6rem; border-radius: 9px; }
  .console-metrics .counter-strip.full strong { font-size: 21px; }
  .console-metrics .counter-strip.full .counter-label { font-size: 10px; }
  .console-metrics .counter-strip.full .counter > .icon { width: 12px; height: 12px; }
  .console-secondary-metrics .counter-strip { gap: 0.35rem 0.75rem; }
  .console-preview { padding: 0.75rem; min-height: 450px; }
  .console-layout :is(#console-feed, #console-history) .feed-row { padding: 0.55rem 0.65rem; gap: 0.5rem; font-size: 12px; }
  .console-layout :is(#console-feed, #console-history) .feed-time { flex-basis: 4.3rem; font-size: 9px; }
  .console-activity-head, .console-layout .span-bar { padding-left: 0.75rem; padding-right: 0.75rem; }
  .console-feed-filters { padding-left: 0.75rem; padding-right: 0.75rem; gap: 0.15rem; }
  .console-feed-filters button { padding: 0.4rem 0.45rem; font-size: 11px; }
}

/* Broadcast timeline workspace. Keep embedded channel/person charts compact. */
#stream-timeline {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  --tl-lane: 30px; --tl-pad: 10px; --tl-h: 20px;
}
#stream-timeline.tl-comfortable { --tl-lane: 40px; --tl-pad: 12px; --tl-h: 28px; }
.tl-overview { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.25rem; padding-bottom: 1.25rem; }
.tl-eyebrow { display: block; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.35rem; }
.tl-overview h3 { font-size: 19px; letter-spacing: -0.025em; margin-bottom: 0.25rem; }
.tl-overview-stats { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.tl-overview-stats > span { display: flex; flex-direction: column; color: var(--muted); font-size: 11px; }
.tl-overview-stats strong { color: var(--text); font-size: 23px; font-weight: 650; font-variant-numeric: tabular-nums; }
.tl-overview-stats .tl-live-stat strong { color: var(--live); }
#stream-timeline .tl-legend { gap: 0.5rem; margin: 0 0 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
#stream-timeline .tl-legend-item { padding: 0.35rem 0.6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); font-size: 12px; gap: 0.4rem; }
#stream-timeline .tl-legend-item.active { border-color: var(--accent); background: var(--selected); }
#stream-timeline .tl-head { background: var(--panel); padding: 0.6rem 0; }
#stream-timeline .tl-month { color: var(--text); border: 0; margin: 0; padding: 1.2rem 0 0.65rem; font-size: 11px; }
#stream-timeline .tl-row:not(.tl-head):not(.tl-quiet) { padding: 0.65rem 0; margin: 0; }
#stream-timeline .tl-label { align-items: flex-start; gap: 0.25rem; padding-left: 0.3rem; }
#stream-timeline .tl-date { font-size: 13px; }
#stream-timeline .tl-dow { font-size: 10px; }
#stream-timeline .tl-track { border-radius: 8px; background-color: var(--bg); border-color: color-mix(in srgb, var(--border) 65%, transparent); }
#stream-timeline .tl-head .tl-track { background: transparent; border: 0; border-radius: 0; }
#stream-timeline .is-today .tl-track { background-color: color-mix(in srgb, var(--accent) 7%, var(--bg)); }
#stream-timeline .tl-bar { border-radius: 5px; container-type: inline-size; }
.tl-bar-label { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; padding: 0 7px; color: #fff; font-size: 10px; font-weight: 650; white-space: nowrap; overflow: hidden; text-shadow: 0 1px 3px #000; pointer-events: none; }
@container (max-width: 65px) { .tl-bar-label { display: none; } }
#stream-timeline .tl-gap span { background: var(--panel); }
.tl-help { border-top: 1px solid var(--border); margin-top: 1.25rem; padding-top: 0.85rem; color: var(--muted); font-size: 12px; }
.tl-help summary { cursor: pointer; width: fit-content; }
.tl-help summary:hover { color: var(--text); }
.tl-help .tl-caption { max-width: 85ch; line-height: 1.7; padding-top: 0.5rem; }
#stream-shape:has(.timeline-primary-controls) { padding: 0.75rem; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); }
.timeline-primary-controls button { min-height: 44px; }
.timeline-primary-controls [data-zoomread] { padding: 0.3rem 0.6rem; border-radius: 6px; background: var(--bg); font-variant-numeric: tabular-nums; }
@media (max-width: 700px) {
  #stream-timeline { padding: 0.75rem; border-radius: 12px; }
  .tl-overview { gap: 0.85rem; }
  .tl-overview h3 { font-size: 17px; }
  .tl-overview-stats { gap: 1.1rem; }
  .tl-overview-stats strong { font-size: 20px; }
  #stream-timeline .tl-row { grid-template-columns: 3.5rem minmax(0, 1fr); gap: 0.4rem; }
  #stream-timeline.tl-by-channel .tl-row { grid-template-columns: 3.5rem 3rem minmax(0, 1fr); }
  #stream-timeline .tl-legend-item { padding: 0.3rem 0.4rem; }
}
#stream-timeline .tl-bar.tl-w1 .tl-bar-label,
#stream-timeline .tl-bar.tl-w2 .tl-bar-label { display: none; }
@media (max-width: 700px) {
  #stream-timeline .tl-label { flex-direction: column; }
}

/* Carbon surfaces with a soft purple glow and consistent outlines. */
body { background: radial-gradient(ellipse at 88% 0%, #7c3aed18, transparent 46%), var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.app-header { border-bottom-color: #3f3f46; box-shadow: 0 8px 28px #09060e45; }
.app-brand > .icon { color: #fff; background: linear-gradient(145deg, #a66af0, #67359d); border-radius: 12px; box-shadow: 0 4px 18px #7c3aed55; }
.app-brand small { color: var(--muted); }
.app-nav .tab { color: var(--muted); }
.app-nav .tab:hover { background: #302938; color: var(--text); }
.app-nav .tab > .icon { opacity: 1; width: 19px; height: 19px; }
.app-nav .tab.active { background: linear-gradient(110deg, #4a315f, #38264f); color: #ead8ff; }
.page-heading h2 { font-weight: 700; color: var(--text); text-wrap: balance; }
.page-description { line-height: 1.7; }
.eyebrow { color: #d5b8ff; }
.toolbar { border: 1px solid var(--border); border-radius: var(--radius-lg); background: linear-gradient(145deg, #29262fe8, #222225f0); }
input:not([type='checkbox']):not([type='radio']):not([type='range']), select, textarea { border-radius: 8px; }
input:not([type='checkbox']):not([type='radio']):not([type='range']):focus,
select:focus, textarea:focus { box-shadow: 0 0 0 3px #c4a5ff26; }
button { border-radius: 8px; }
button:not(.ghost):not(.tab):not(.danger):hover { filter: brightness(1.12); }
.live-card, .stream-card { background: linear-gradient(150deg, #2a272f, #222225 68%); box-shadow: 0 10px 28px #07050c38; }
.live-card, .stream-card, .transcript-item, .transcript-live-card { border-color: var(--border); }
.live-card .counter-strip, .stream-card .counter-strip { background: #18181b66; border-radius: 10px; padding: 0.85rem; }
.table-wrap { border-radius: var(--radius-lg); border: 1px solid var(--border); }
th { letter-spacing: 0.045em; }
tbody tr:hover { background: #c4a5ff12; }
.empty { border-radius: 14px; background: linear-gradient(145deg, #342a4385, #22222566); color: var(--muted); }
.settings-block, .discover-panel, .channel-add-panel, .archive-card { border-radius: 16px; box-shadow: 0 10px 28px #07050c30; }
.settings-jump button, .files-nav button { border-radius: 9px; }
.login-card { background: #222225f5; border: 1px solid #604a78; }
.login-mark { color: #ead8ff; background: linear-gradient(145deg, #4a315f, #2d2638); }
.login-mark .icon { width: 28px; height: 28px; }
.login-card .attrib { font-size: 11px; letter-spacing: 0.025em; }
.modal-head, .modal-tabs { border-bottom-color: var(--border); }

@media (min-width: 1100px) {
  :root { --sidebar-w: 240px; }
  .app-nav { padding-top: 2.25rem; }
  .app-nav .tab { min-height: 48px; gap: 0.85rem; }
  .app-nav .tab.active { box-shadow: inset 3px 0 0 var(--accent); border-color: #76579c; }
  .workspace-kicker { border-right: 1px solid var(--border); padding-right: 16px; }
}
@media (max-width: 700px) {
  .app-nav .tab > .icon { display: block; width: 19px; height: 19px; }
  .app-nav .tab { gap: 0.3rem; }
  .page-heading h2 { font-size: 29px; }
}

/* Investigation and monitoring share the existing workspace surfaces. */
.coverage-panel, .moments-panel { margin-block: 1rem; padding: 1rem; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.coverage-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: .75rem; align-items: center; margin-block: .6rem; font-size: .85rem; text-transform: capitalize; }
.coverage-track { position: relative; height: 16px; overflow: hidden; border-radius: 4px; background: #35575b; }
.coverage-gap, .coverage-unknown { position: absolute; top: 0; height: 100%; }
.coverage-gap { background: #d34f62; min-width: 2px; }
.coverage-unknown { left: 0; background: repeating-linear-gradient(135deg, #303645, #303645 4px, #555e71 4px, #555e71 8px); }
.coverage-panel li { margin-block: .65rem; }
.moment-form { display: grid; gap: 1.5rem; margin-block: 1.5rem; }
.moment-form label { display: grid; gap: .35rem; min-width: 0; }
.moment-form input, .moment-form textarea { width: 100%; box-sizing: border-box; }
.moment-range { display: flex; align-items: end; gap: .65rem; flex-wrap: wrap; }
.moment-range label { flex: 1 1 120px; }
.moment-form > button { justify-self: start; }
.saved-moment { border-top: 1px solid var(--border); padding-block: .8rem; }
.moment-note { white-space: pre-wrap; overflow-wrap: anywhere; margin-block: .4rem; }
.moment-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.health-issues { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1.5rem; margin-block: 1.5rem; }
.health-issue { padding: 1.5rem; border: 1px solid var(--border); border-left: 3px solid #e7b35b; border-radius: var(--radius-lg); background: var(--panel); overflow-wrap: anywhere; }
.health-error { border-left-color: #d34f62; }
#health-overview { max-width: 1200px; }
@media (max-width: 480px) { .coverage-row { grid-template-columns: 90px minmax(0, 1fr); gap: .4rem; } }
.tl-coverage-gap { position: absolute; inset-block: 0; background: repeating-linear-gradient(135deg, #d34f6280, #d34f6280 3px, #d34f6220 3px, #d34f6220 6px); min-width: 2px; pointer-events: auto; }
.moment-form[hidden], .moment-quick[hidden] { display: none; }
.moment-quick { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-bottom: .75rem; }
.moment-quick span { flex: 1 1 14rem; min-width: 0; }
.moment-edit-form { gap: .75rem; margin-block: 0; }
.moment-edit-form .moment-actions { margin-top: 0; }
.moment-edit-form [data-moment-edit-status]:empty { display: none; }
[data-moment-exporting] { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .5rem; }
[data-moment-exporting] progress { flex: 1 1 8rem; min-width: 0; }
[data-moment-exporting] p { flex-basis: 100%; margin: 0; }
.tl-ev-filter-coverage { border-left-color: #d34f62; }

/* Shared outline icons: optical sizes for navigation, identity and metrics. */
.icon { width: 1.125em; height: 1.125em; }
.app-nav .tab > .icon { width: 22px; height: 22px; opacity: 0.9; }
.app-nav .tab.active > .icon { opacity: 1; }
.app-brand > .icon { width: 36px; height: 36px; padding: 6px; }
.counter > .icon { width: 18px; height: 18px; }
.live-now > .icon { width: 20px; height: 20px; }
.console-metrics .counter-strip.full .counter > .icon { width: 18px; height: 18px; }
#console-feed .icon, #console-history .icon { width: 18px; height: 18px; vertical-align: -0.2em; }
.live-card .counter, .stream-card .counter { grid-template-columns: 18px minmax(0, 1fr); }
@media (max-width: 700px) {
  .app-brand > .icon { width: 32px; height: 32px; padding: 5px; }
  .app-nav .tab > .icon { width: 22px; height: 22px; }
}

/* Broadcast identity and timing lead; supporting metrics remain easy to scan. */
.stream-grid :is(.live-card, .stream-card) { gap: 1.25rem; }
.stream-grid .live-chan { font-size: 18px; font-weight: 700; line-height: 1.4; }
.stream-grid .live-card-top .badge { flex-shrink: 0; }
.stream-grid .live-card-time { gap: 0.25rem; flex-direction: column; align-items: flex-start; }
.stream-grid .live-card-time .small { font-size: 14px; line-height: 1.5; }
.stream-grid .stream-len { font-size: 28px; line-height: 1.2; }
.stream-grid .live-elapsed { font-size: 24px; line-height: 1.2; }
.stream-grid .stream-card .live-now strong { font-size: 24px; font-weight: 600; }
.stream-grid :is(.live-now, .live-peak) .small,
.stream-grid .live-peak { font-size: 14px; line-height: 1.5; }
.stream-grid :is(.live-card, .stream-card) .counter-strip {
  background: transparent; border-radius: 0; padding: 0.85rem 0 0;
}
.stream-grid :is(.live-card, .stream-card) .counter strong { font-size: 15px; }
.stream-grid :is(.live-card, .stream-card) .counter-label {
  font-size: 14px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere;
}
.stream-grid .counter .icon { opacity: 0.8; }
.stream-grid .live-card-foot { margin-top: auto; border-top: 1px solid var(--border); }
.stream-grid .live-card-foot :is(a.button-like, button) { min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 700px) {
  .stream-grid .live-chan { font-size: 17px; }
  .stream-grid .stream-len { font-size: 26px; }
}

/* Keep spacious controls within the existing responsive navigation and player frames. */
@media (max-width: 700px) {
  :root { --hit: 44px; }
  .toolbar form:has(input[type=search]), .toolbar input[type=search] { width: 100%; }
  .settings-block, .discover-panel, .channel-add-panel, .health-issue { padding: 1rem; }
  .modal-body { padding: 1rem; }
}

/* A stacked library needs document scrolling: the filters and player must not
   consume the fixed-height grid and squeeze the recording list to a sliver. */
#app-view:has(#tab-videos:not(.hidden)) > main { padding-inline: 2rem; }
@media (max-width: 900px) {
  #app-view:has(#tab-videos:not(.hidden)) { height: auto; min-height: 100dvh; overflow: visible; }
  #app-view:has(#tab-videos:not(.hidden)) > main,
  #tab-videos:not(.hidden) { overflow: visible; }
  .videos-workspace,
  .videos-workspace:has(#videos-player[data-stream-id]),
  .videos-workspace:not(:has(#videos-player[data-stream-id])) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    max-height: none;
    overflow: visible;
    gap: 1.5rem;
  }
  .videos-player { min-height: 160px; }
  #videos-player[data-stream-id] { overflow: visible; }
  .videos-list { height: auto; max-height: none; overflow: visible; }
}
@media (max-width: 700px) {
  #app-view:has(#tab-videos:not(.hidden)) > main { padding-inline: 1rem; }
  #stream-sort select { max-width: 120px; }
  .videos-list .video-item { grid-template-columns: auto 5rem minmax(0, 1fr); }
  .videos-list .video-thumb-frame { width: 5rem; height: 4rem; }
  .videos-list .video-item-actions { flex-wrap: wrap; gap: 0.5rem; }
}

/* Live speech stays visible above the busy activity feed. */
.console-transcript {
  flex: 0 0 auto; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 88%, var(--accent)); min-width: 0;
}
.console-transcript-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.console-transcript-head h4 { display: flex; align-items: center; gap: 0.4rem; margin: 0; font-size: 14px; }
.console-transcript-head a { font-size: 12px; white-space: nowrap; }
.console-transcript > p { margin: 0.35rem 0 0.5rem; }
.console-transcript-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.55rem; padding: 0.35rem 0; font-size: 12px; line-height: 1.45; }
.console-transcript-row + .console-transcript-row { border-top: 1px solid var(--border); }
.console-transcript-row > span:nth-child(3) { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }
.console-transcript-row .badge { font-size: 10px; padding: 1px 5px; }
.console-transcript-row.is-flagged { background: color-mix(in srgb, var(--danger) 10%, transparent); }

/* Cross-broadcast transcript review and operator training. */
.transcript-training { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1rem; margin: 0 0 1rem; padding: 0.9rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--panel); }
.transcript-term-form, .transcript-term-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 0.8rem; }
.transcript-term-form label, .transcript-term-row label { font-size: 13px; font-weight: 600; }
.transcript-term-form input { flex: 1 1 12rem; max-width: 24rem; }
.transcript-term-row select { min-width: 12rem; max-width: 24rem; }
.transcript-training strong { font-size: 14px; }
.transcript-training .muted { flex-basis: 100%; }
.transcript-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.transcript-toolbar label { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 12px; }
.transcript-toolbar select { max-width: 12rem; }
.transcript-list { display: grid; gap: 0.75rem; }
.transcript-item { padding: 0.9rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--panel); }
.transcript-item.is-flagged { border-left: 3px solid var(--danger); }
.transcript-item-head, .transcript-item-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.65rem; }
.transcript-item-head a { font-weight: 650; }
.transcript-item-head time { margin-left: auto; }
.transcript-item-text { margin: 0.7rem 0; line-height: 1.55; overflow-wrap: anywhere; }
.transcript-label-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-left: auto; }
.transcript-label-actions [aria-pressed="true"] { background: var(--selected); color: var(--accent); }
.transcript-mood { font-size: 11px; font-weight: 650; text-transform: capitalize; }
.transcript-mood.positive { color: var(--good); }
.transcript-mood.negative { color: var(--danger); }
#transcript-pagination { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 1rem; }
@media (max-width: 600px) { .transcript-item-head time { width: 100%; margin-left: 0; } .transcript-label-actions { width: 100%; margin-left: 0; } }
.transcript-flag { color: var(--danger); font-size: 11px; }
@media (max-width: 700px) {
  .console-transcript { padding: 0.7rem; }
  .console-transcript-head { align-items: flex-start; }
  .console-transcript-head a { white-space: normal; text-align: right; }
}

/* Speech review workspace. */
.transcript-workspace { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.transcript-setup { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; min-width: 0; }
.transcript-panel-heading h3, .transcript-review-heading h3 { display: flex; align-items: center; gap: .6rem; margin: .35rem 0 .65rem; font-size: 19px; }
.transcript-panel-heading p { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0 0 1.25rem; }
.transcript-setup .transcript-term-form, .transcript-setup .transcript-term-row { display: grid; gap: .6rem; margin-bottom: 1.25rem; }
.transcript-setup input, .transcript-setup select { width: 100%; min-width: 0; max-width: none; }
.transcript-setup .transcript-term-form input { flex: none; }
.transcript-setup .transcript-term-row { padding-top: 1.25rem; border-top: 1px solid var(--border); }
.transcript-setup #transcript-remove-term { justify-self: start; color: var(--muted); padding-left: 0; }
.transcript-setup .transcript-training { display: grid; gap: .9rem; padding: 1rem; margin: 0; background: var(--panel-2); }
.transcript-training-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; overflow-wrap: anywhere; }
.transcript-progress { display: grid; gap: .8rem; }
.transcript-progress label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .35rem; font-size: 12px; }
.transcript-progress label span { color: var(--muted); }
.transcript-progress progress { width: 100%; height: 5px; border: 0; border-radius: 10px; overflow: hidden; accent-color: var(--accent); background: var(--border); }
.transcript-progress progress::-webkit-progress-bar { background: var(--border); }
.transcript-progress progress::-webkit-progress-value { background: var(--accent); border-radius: 10px; }
.transcript-progress progress::-moz-progress-bar { background: var(--accent); }
.transcript-review-note { display: flex; align-items: start; gap: .65rem; margin-top: 1.25rem; color: var(--muted); }
.transcript-review-note .icon { flex-shrink: 0; margin-top: .15rem; color: var(--accent); }
.transcript-review-note strong { font-size: 12px; color: var(--text); }
.transcript-review-note p { font-size: 12px; line-height: 1.6; margin: .3rem 0 0; }
.transcript-review { min-width: 0; }
.transcript-review-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .2rem 0 1rem; flex-wrap: wrap; }
.transcript-review .transcript-toolbar { padding: .85rem 1rem; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.transcript-toolbar #transcript-refresh { margin-left: auto; }
.transcript-review .transcript-item { padding: 1.15rem 1.25rem; }
.transcript-review .transcript-item.is-flagged { border-left-color: var(--accent-2); }
.transcript-review .transcript-flag { color: var(--accent-2); }
.transcript-review .transcript-item-text { font-size: 16px; line-height: 1.7; margin: 1rem 0; }
.transcript-review .transcript-item-foot { border-top: 1px solid var(--border); padding-top: .8rem; gap: .6rem; }
.transcript-context { font-size: 12px; font-weight: 600; }
.transcript-review .transcript-label-actions button { min-height: 36px; padding: .4rem .8rem; }
.transcript-empty { border: 1px dashed var(--border); border-radius: var(--radius-lg); padding: 3rem 1.5rem; }
.transcript-empty > .icon { width: 30px; height: 30px; color: var(--accent); }
.transcript-empty h3 { color: var(--text); margin: 1rem 0 .5rem; }
.transcript-empty p { max-width: 360px; margin: 0 auto; line-height: 1.6; }
@media (max-width: 1100px) { .transcript-workspace { grid-template-columns: 260px minmax(0, 1fr); gap: 1rem; } }
@media (max-width: 800px) { .transcript-workspace { grid-template-columns: minmax(0, 1fr); } .transcript-review-heading { margin-top: .5rem; } }
@media (max-width: 480px) { .transcript-review .transcript-toolbar { align-items: stretch; } .transcript-toolbar label { flex: 1 1 100%; justify-content: space-between; } .transcript-toolbar select { width: 65%; max-width: none; } .transcript-review .transcript-item { padding: 1rem; } }
.transcript-item-text mark { background: color-mix(in srgb, var(--accent-2) 22%, var(--panel)); color: var(--text); border-radius: 3px; padding: .08em .15em; box-decoration-break: clone; }
#transcript-queue-description:empty { display: none; }
.transcript-training-target { font-size: 12px; align-self: center; color: var(--muted); margin-right: .35rem; }
.transcript-label-actions { align-items: center; }
.transcript-item-foot:has(.transcript-label-actions + .transcript-label-actions) .transcript-label-actions { flex-basis: 100%; margin-left: 0; }

.transcript-live-status { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: .75rem; margin-bottom: 1rem; }
.transcript-live-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem; }
.transcript-live-card > a { font-weight: 700; }
.transcript-live-card p { margin: .5rem 0; font-size: 13px; line-height: 1.5; }
.transcript-live-card.has-error { border-color: var(--accent-2); }
#transcript-pause[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }

.transcript-search { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: .9rem 0; }
.transcript-search label { font-size: 12px; color: var(--muted); }
.transcript-search input { flex: 1; min-width: min(100%, 160px); }
.transcript-toolbar label { min-width: 0; }
.transcript-toolbar select { width: 100%; }

/* People carries more columns than any other table, and since cells went to
   1rem 1.25rem the shared priority breakpoints (1200/900/700px) let it grow
   past its container at every width — the action buttons were cut off on the
   right. Its own thresholds come from the table's measured min-content width
   per tier (1649 / 1338 / 911px with the wrapping below) plus ~5% for longer
   real handles and channel names than the fixtures carry. */
#tab-people th { white-space: normal; }
#tab-people .row-actions { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; }
@container (max-width: 1730px) { #tab-people [data-priority="4"] { display: none; } }
@container (max-width: 1400px) { #tab-people [data-priority="3"] { display: none; } }
@container (max-width: 960px) { #tab-people [data-priority="2"] { display: none; } }
@container (max-width: 480px) { #tab-people th, #tab-people td { padding-left: 0.6rem; padding-right: 0.6rem; } }

/* Moments tab: the chosen broadcast with its moment form, beside every saved moment. */
.moments-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(20rem, 38%); gap: 1rem; align-items: start; }
.moments-player, .moments-list { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--panel); padding: 1rem; }
.moments-player-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.moments-player .stream-video { margin: 0; }
.moments-player .detail-head h4 { display: none; }
.moments-player .stream-video video { width: 100%; max-height: min(52vh, 34rem); background: #0b0b0f; border-radius: 12px; }
.moments-player .moments-panel { margin-bottom: 0; }
.moments-picker { display: inline-flex; align-items: center; gap: .5rem; min-width: 0; }
.moments-picker select { max-width: min(100%, 26rem); }
.moments-group { padding-block: .25rem .5rem; }
.moments-group + .moments-group { border-top: 1px solid var(--border); margin-top: .5rem; padding-top: .75rem; }
.moments-group.is-selected { box-shadow: inset 3px 0 var(--accent); padding-inline-start: .75rem; }
.moments-group-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
@media (max-width: 900px) {
  .moments-workspace { grid-template-columns: minmax(0, 1fr); }
  #tab-moments .toolbar-row, #tab-moments .toolbar-group { min-width: 0; max-width: 100%; }
  .moments-picker { display: grid; width: 100%; }
  .moments-picker select { width: 100%; max-width: 100%; min-width: 0; }
  #moments-search-form, #moments-search { width: 100%; }
}

/* Personal timeline appearance, shared by full and embedded timelines. */
.tl-appearance { margin: 0.75rem 0; border: 1px solid var(--border); border-radius: 10px; padding: 0.65rem 0.8rem; }
.tl-appearance summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.tl-appearance-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding-top: 0.8rem; }
.tl-appearance-fields label, .tl-custom-field { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; font-size: 12px; }
.tl-appearance-fields > .muted { flex-basis: 100%; }
.tl-appearance select, .tl-custom-field select { min-height: 36px; padding: 0.35rem; }
.tl input[type='color'] { width: 46px; height: 36px; padding: 3px; cursor: pointer; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); }
.tl[data-tl-shape='pill'] .tl-bar { border-radius: 999px !important; }
.tl[data-tl-shape='square'] .tl-bar, .tl[data-tl-shape='square'] .tl-seg { border-radius: 0 !important; }
.tl[data-tl-grid='subtle'] .tl-track { background-image: linear-gradient(to right, color-mix(in srgb, var(--border) 35%, transparent) 1px, transparent 1px); background-size: calc(12.5% * var(--tl-z)) 100%; }
.tl[data-tl-grid='none'] .tl-track { background-image: none; }
.tl[style*='--tl-custom-bg'] .tl-row:not(.tl-head) .tl-track { background-color: var(--tl-custom-bg) !important; }

/* Keep repeated navigation out of the keyboard path when desired. */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 12px 16px;
  background: var(--panel);
  color: var(--text);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }
