.ctv-controls, .ctv-undo, .ctv-insights, .ctv-dialog {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  --ctv-ink: var(--vs-ink, #eceef2);
  --ctv-muted: var(--vs-muted, #b8bdc6);
  --ctv-surface: var(--vs-surface, #191a1d);
  --ctv-border: var(--vs-border, #45474d);
  --ctv-accent: var(--vs-accent-2, #efbd70);
  color: var(--ctv-ink);
}
.portal-page .ctv-controls, .portal-page .ctv-undo, .ctv-dialog {
  --ctv-ink: #eceef2; --ctv-muted: #b8bdc6; --ctv-surface: #191a1d; --ctv-border: #45474d; --ctv-accent: #efbd70;
}
.ctv-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
.ctv-controls button, .ctv-undo button, .ctv-dialog button, .ctv-insights button, .ctv-insights a {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px;
  padding: 8px 10px; border: 1px solid var(--ctv-border); border-radius: 6px; background: transparent;
  color: inherit; font: inherit; text-decoration: none; cursor: pointer; white-space: normal;
}
.ctv-controls svg, .ctv-undo svg, .ctv-dialog svg, .ctv-insights svg { flex-shrink: 0; }
.ctv-controls button[aria-pressed="true"] { color: var(--ctv-accent); border-color: #8c713f; }
.ctv-controls button:hover, .ctv-undo button:hover, .ctv-insights a:hover, .ctv-insights button:hover { background: #88888818; }
.ctv-controls button:focus-visible, .ctv-undo button:focus-visible, .ctv-dialog :focus-visible, .ctv-insights :focus-visible { outline: 2px solid var(--ctv-accent); outline-offset: 3px; }
.ctv-controls button:disabled, .ctv-undo button:disabled, .ctv-dialog button:disabled, .ctv-insights button:disabled { opacity: .6; cursor: wait; }
.ctv-error { color: #f4a7a7; margin: 8px 0; }
.ctv-undo { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; border-block: 1px solid var(--ctv-border); padding: 12px 0; margin-bottom: 20px; }
.ctv-undo > span { flex: 1 1 180px; }
.ctv-undo > p { flex-basis: 100%; }
.ctv-dialog { box-sizing: border-box; width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 24px; border: 1px solid var(--ctv-border); border-radius: 8px; background: var(--ctv-surface); color-scheme: dark; margin: auto; }
.ctv-dialog::backdrop { background: #000a; }
.ctv-dialog header, .ctv-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ctv-dialog h2, .ctv-insights h2 { font-size: 20px; font-weight: 650; margin: 0; }
.ctv-dialog .ctv-video-name { color: var(--ctv-muted); margin: 12px 0 20px; }
.ctv-dialog label { display: grid; gap: 8px; margin: 16px 0; }
.ctv-dialog textarea { box-sizing: border-box; width: 100%; min-width: 0; resize: vertical; min-height: 96px; max-height: 300px; padding: 10px; border: 1px solid var(--ctv-border); border-radius: 6px; background: #101113; color: var(--ctv-ink); font: inherit; }
.ctv-counter { text-align: right; color: var(--ctv-muted); }
.ctv-dialog footer { justify-content: flex-end; flex-wrap: wrap; margin-top: 20px; }
.ctv-dialog .ctv-primary { color: #101113; background: #efbd70; border-color: #efbd70; }
.ctv-insights { min-width: 0; padding-block: 24px; border-top: 1px solid var(--ctv-border); --ctv-muted: color-mix(in srgb, var(--ctv-ink) 72%, var(--vs-bg, #101113)); }
.ctv-insights :focus-visible { outline-color: var(--ctv-ink); }
.ctv-insights header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ctv-insights .ctv-caption { margin: 8px 0 20px; color: var(--ctv-muted); }
.ctv-insights .ctv-error { color: var(--vs-danger, #f4a7a7); }
.ctv-insights ul { list-style: none; padding: 0; margin: 0; }
.ctv-insights li { padding: 20px 0; border-top: 1px solid var(--ctv-border); }
.ctv-insights h3 { font-size: 16px; margin: 0; font-weight: 650; }
.ctv-insights p { margin: 8px 0; white-space: pre-wrap; }
.ctv-insights dl { margin: 16px 0; }
.ctv-insights dt { color: var(--ctv-muted); }
.ctv-insights dd { margin: 4px 0 16px; white-space: pre-wrap; }
.ctv-insights .ctv-links { display: flex; flex-wrap: wrap; gap: 8px; }
.portal-sidebar .portal-menu button { font-size: 16px; }
.ctv-logout-error { color: #f4a7a7; font-size: 16px; overflow-wrap: anywhere; }
.ctv-logout-error button { display: flex; align-items: center; gap: 8px; min-height: 44px; font: inherit; }
@media (max-width: 900px) { .portal-sidebar .portal-menu { flex-wrap: wrap; } }
@media (max-width: 600px) {
  .portal-content .portal-grid:has(.ctv-controls) { grid-template-columns: minmax(0, 1fr); }
  .portal-content .portal-grid:has(.ctv-controls) .portal-thumb { aspect-ratio: 4 / 3; }
  .portal-content .portal-grid:has(.ctv-controls) .portal-card strong { font-size: 16px; min-height: auto; }
  .ctv-dialog { padding: 16px; }
}
/*$vite$:1*/