/* ============================================================================
   Time-travel debugger styles. Only loaded on tutorials with `debugger: true`.
   Follows the existing `.tvm-*` naming convention used by tutorial.css.

   Color system — UCLA brand palette:
     --gold        #FFD100  primary (button backgrounds, focus emphasis)
     --gold-hover  #FFB81C  darker gold for solid-button hover
     --gold-deep   #946B0C  dark gold used AS text on white (5.0:1 contrast — AA)
     --gold-soft   #FFE066  lighter gold for dark-mode accent text
     --on-gold     #1A1A1A  near-black text on gold backgrounds (14:1 contrast)

   Tints (light mode): rgba(255, 209, 0, .10–.40) for subtle backgrounds.
   ========================================================================== */

/* ---- Debug button + step toolbar (in editor's output-actions row) -------- */

.tvm-debug-btn {
  background: #FFD100;
  color: #1A1A1A;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 4px;
}
.tvm-debug-btn:hover { background: #FFB81C; color: #1A1A1A; }

.tvm-debug-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 8px;
  padding: 2px 6px;
  background: rgba(255, 209, 0, 0.20);
  border: 1px solid rgba(184, 134, 11, 0.55);
  border-radius: 4px;
}
.tvm-debug-toolbar .tvm-debug-step {
  background: transparent;
  border: 1px solid transparent;
  color: #946B0C;
  border-radius: 3px;
  padding: 2px 7px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  min-height: 22px;
}
.tvm-debug-toolbar .tvm-debug-step:hover:not(:disabled) {
  background: rgba(255, 209, 0, 0.40);
  border-color: rgba(184, 134, 11, 0.7);
  color: #5C4308;
}
.tvm-debug-toolbar .tvm-debug-step:disabled {
  opacity: 0.35; cursor: not-allowed;
}
.tvm-debug-toolbar .tvm-debug-divider {
  width: 1px;
  height: 16px;
  background: rgba(184, 134, 11, 0.55);
  margin: 0 3px;
}
.tvm-debug-toolbar .tvm-debug-status {
  flex: 0 0 160px;
  min-width: 160px;
  max-width: 160px;
  margin-right: 8px;
  font-size: 11px;
  color: #5C4308;
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Reload-needed inline note (when crossOriginIsolated is false) ------ */
.sebook-dbg-reload-note {
  font-size: 11px;
  color: #c0392b;
  font-style: italic;
  margin-left: 8px;
  padding: 2px 8px;
  background: rgba(192, 57, 43, 0.08);
  border-radius: 3px;
}

/* ---- Breakpoint glyphs in Monaco gutter --------------------------------- */
.tvm-bp-glyph {
  background: #d62828;
  border-radius: 50%;
  width: 12px !important;
  height: 12px !important;
  margin-left: 4px;
  margin-top: 4px;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.4) inset;
}
.tvm-bp-cond {
  background: #d62828;
  position: relative;
}
.tvm-bp-cond::after {
  content: '?';
  position: absolute;
  top: -3px;
  left: 1px;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  line-height: 12px;
}
.tvm-bp-error {
  background: #f1a325;
}

/* Current-line decoration during pause — keep amber/yellow but distinct from
   the gold UI accent so the gutter arrow remains the strongest signal. */
.tvm-debug-current-line {
  background: rgba(255, 213, 79, 0.22);
}
.tvm-debug-current-glyph {
  background: transparent !important;
  position: relative;
}
.tvm-debug-current-glyph::before {
  content: '▶';
  color: #f9a825;
  font-size: 12px;
  position: absolute;
  left: 2px;
  top: -2px;
}
.tvm-debug-current-line-rewound {
  background: rgba(149, 165, 166, 0.18);
}
.tvm-debug-current-glyph-rewound::before {
  content: '◁';
  color: #7f8c8d;
}

/* ---- Debug views (in the left instructions panel as tabs) -------------- */

.tvm-debug-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: 8px 12px;
  font-size: 13px;
  font-family: 'Fira Code', 'Cascadia Code', Menlo, monospace;
  background: #fafafa;
}
/* Combined Debug tab: stacked Watch / Call Stack / Variables / History
   sections. Outer view has zero padding so each section's header reaches
   the panel edges; the section bodies provide their own (compact) padding. */
.tvm-debug-view-dbg-combined { padding: 0; }
.tvm-dbg-section { display: flex; flex-direction: column; flex: none; }
.tvm-dbg-section + .tvm-dbg-section { border-top: 1px solid #e0e0e0; }
.tvm-dbg-section-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  background: #f1f1f1;
  cursor: pointer;
  user-select: none;
  font-family: -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #1A1A1A;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  line-height: 1.5;
  transition: background-color 120ms;
}
.tvm-dbg-section-head:hover { background: rgba(255, 209, 0, 0.30); }
.tvm-dbg-section-head .fa { color: #946B0C; font-size: 14px; }
.tvm-dbg-section-chevron {
  display: inline-block;
  font-size: 12px;
  width: 14px;
  transition: transform 120ms ease;
  color: #946B0C;
}
.tvm-dbg-section.collapsed .tvm-dbg-section-chevron { transform: rotate(-90deg); }
.tvm-dbg-section-title { flex: 1; }
.tvm-dbg-section-body {
  padding: 0 10px;
  flex: none;
}
/* Tighter empty-state inside section bodies */
.tvm-dbg-section-body > .tvm-debug-empty { padding: 6px; }
.tvm-dbg-section.collapsed .tvm-dbg-section-body { display: none; }

/* When the Variables section body holds subsections, the subsections own all
   internal layout — strip the body's inset entirely so subsection headers
   butt up against the section divider with no gap. */
.tvm-dbg-section-body[data-section="vars"] { padding: 0; }

/* Sub-sections inside Variables: Locals / Globals (independently collapsible) */
.tvm-debug-subsection { margin: 0; }
.tvm-debug-subsection + .tvm-debug-subsection { border-top: 1px solid #e0e0e0; }
/* Hide any zero-row var lists so the body collapses to nothing. */
.tvm-debug-subsection-body:empty,
.tvm-debug-subsection-body > .tvm-debug-vars:empty { display: none; }
.tvm-debug-subsection-head {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  background: #ececec;
  cursor: pointer;
  user-select: none;
  font-family: -apple-system, sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: #2c3e50;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background-color 120ms;
}
.tvm-debug-subsection-head:hover { background: rgba(255, 209, 0, 0.22); }
.tvm-debug-subsection-chevron {
  display: inline-block;
  font-size: 9px;
  width: 10px;
  transition: transform 120ms ease;
  color: #946B0C;
}
.tvm-debug-subsection.collapsed .tvm-debug-subsection-chevron { transform: rotate(-90deg); }
.tvm-debug-subsection-title { flex: 1; }
.tvm-debug-subsection-body { padding: 3px 10px 4px; }
.tvm-debug-subsection.collapsed .tvm-debug-subsection-body { display: none; }

.tvm-debug-empty {
  color: #777;                    /* darker for AA contrast on #fafafa */
  font-style: italic;
  text-align: center;
  padding: 20px;
  font-family: -apple-system, sans-serif;
}

.tvm-debug-empty-row {
  color: #777;
  font-style: italic;
  padding: 4px 8px;
  font-size: 12px;
}

.tvm-debug-section-head {
  font-weight: 700;
  color: #1A1A1A;
  background: #FFD100;
  padding: 4px 8px;
  margin: 8px -12px 4px;
  font-family: -apple-system, sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tvm-debug-section-head:first-child { margin-top: 0; }

.tvm-debug-exception {
  background: #f8d7da;
  color: #721c24;
  padding: 4px 8px;
  border-left: 3px solid #c0392b;
  margin-bottom: 4px;
  font-family: -apple-system, sans-serif;
  font-size: 12px;
  border-radius: 3px;
}

.tvm-debug-return {
  background: #d4edda;
  color: #155724;
  padding: 3px 8px;
  border-left: 3px solid #28a745;
  margin-bottom: 3px;
  font-family: -apple-system, sans-serif;
  font-size: 12px;
  border-radius: 3px;
}

/* Variables tree */
.tvm-debug-vars { line-height: 1.4; }
.tvm-debug-var-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 0;
  cursor: default;
}
.tvm-debug-var-row:hover { background: rgba(255, 209, 0, 0.12); }
.tvm-debug-expander {
  display: inline-block;
  width: 14px;
  font-size: 9px;
  color: #946B0C;
  cursor: pointer;
  user-select: none;
}
.tvm-debug-expander-spacer {
  display: inline-block;
  width: 14px;
}
.tvm-debug-var-name {
  color: #2c3e50;
  font-weight: 600;
  min-width: 60px;
}
.tvm-debug-var-type {
  color: #777;
  font-size: 10px;
  font-style: italic;
}
.tvm-debug-var-value {
  color: #b34700;                 /* slightly darker than orig #d35400 — AA on white */
  word-break: break-all;
  flex: 1;
}
.tvm-debug-var-editable {
  cursor: text;
  border-bottom: 1px dashed transparent;
  padding: 0 2px;
  border-radius: 2px;
}
.tvm-debug-var-editable:hover {
  border-bottom-color: rgba(184, 134, 11, 0.8);
  background: rgba(255, 209, 0, 0.18);
}
.tvm-debug-var-edit-input {
  flex: 1;
  font-family: 'Fira Code', 'Cascadia Code', Menlo, monospace;
  font-size: 13px;
  padding: 1px 4px;
  border: 1px solid #946B0C;
  border-radius: 3px;
  background: #fff;
  color: #b34700;
  outline: none;
}
.tvm-debug-var-edit-input:focus {
  box-shadow: 0 0 0 2px rgba(255, 209, 0, 0.50);
}
.tvm-debug-var-edit-pending {
  background: rgba(255, 209, 0, 0.40);
  color: #1A1A1A;
  border-bottom: 1px dashed #946B0C;
  font-style: italic;
}
.tvm-debug-var-edit-pending::after {
  content: ' ⏳';
  font-size: 10px;
  opacity: 0.8;
}
.tvm-debug-alias {
  background: #fff3cd;
  color: #5C4308;
  border-radius: 3px;
  padding: 0 5px;
  font-size: 10px;
  font-family: -apple-system, sans-serif;
}
.tvm-debug-truncated {
  color: #777;
  font-style: italic;
  padding: 2px 0;
  font-size: 11px;
}
.tvm-debug-var-children { padding-left: 0; }

/* Call stack */
.tvm-debug-stack { padding: 0; }
.tvm-debug-frame {
  display: flex;
  justify-content: space-between;
  padding: 2px 6px;
  border-radius: 2px;
  cursor: pointer;
  margin: 1px 0;
}
.tvm-debug-frame:hover { background: rgba(255, 209, 0, 0.18); }
.tvm-debug-frame.active {
  background: rgba(255, 209, 0, 0.42);
  border-left: 3px solid #FFD100;
  padding-left: 5px;
  color: #1A1A1A;
}
.tvm-debug-frame.active .tvm-debug-frame-fn,
.tvm-debug-frame.active .tvm-debug-frame-loc { color: #1A1A1A; }
.tvm-debug-frame-fn { color: #2c3e50; font-weight: 600; }
.tvm-debug-frame-loc { color: #555; font-size: 11px; }

/* Watch */
.tvm-debug-watch-list { margin-bottom: 4px; }
.tvm-debug-watch-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  border-bottom: 1px solid #ececec;
}
.tvm-debug-watch-expr {
  color: #2c3e50;
  font-weight: 600;
  flex: 0 0 130px;
  word-break: break-all;
}
.tvm-debug-watch-arrow { color: #777; }
.tvm-debug-watch-val {
  color: #b34700;
  flex: 1;
  word-break: break-all;
}
.tvm-debug-watch-na { color: #999; font-style: italic; }
.tvm-debug-watch-error { color: #c0392b; font-style: italic; font-size: 11px; }
.tvm-debug-watch-remove {
  background: transparent;
  color: #c0392b;
  border: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 4px;
}
.tvm-debug-watch-remove:hover { color: #e74c3c; }
.tvm-debug-watch-add {
  display: flex;
  gap: 6px;
  padding: 4px 0 2px;
}
.tvm-debug-watch-input {
  flex: 1;
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-family: 'Fira Code', Menlo, monospace;
  font-size: 12px;
}
.tvm-debug-watch-input:focus {
  outline: none;
  border-color: #946B0C;
  box-shadow: 0 0 0 2px rgba(255, 209, 0, 0.40);
}
.tvm-debug-watch-add-btn {
  background: #FFD100;
  color: #1A1A1A;
  border: none;
  border-radius: 3px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.tvm-debug-watch-add-btn:hover { background: #FFB81C; }

/* History */
.tvm-debug-history-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  border-bottom: 1px solid #ddd;
  margin-bottom: 3px;
}
.tvm-debug-history-slider {
  flex: 1;
  cursor: pointer;
  accent-color: #FFD100;            /* native control tint */
}
.tvm-debug-history-pos {
  font-family: 'Fira Code', Menlo, monospace;
  font-size: 11px;
  color: #555;
  min-width: 60px;
  text-align: right;
}
.tvm-debug-history-live {
  color: #1e6b32;                   /* darker green for AA on white */
  font-weight: 700;
  font-size: 11px;
  font-family: -apple-system, sans-serif;
}
.tvm-debug-history-rewound {
  color: #b34700;
  font-weight: 700;
  font-size: 11px;
  font-family: -apple-system, sans-serif;
}
.tvm-debug-history-list {
  font-family: 'Fira Code', Menlo, monospace;
  font-size: 11px;
}
.tvm-debug-history-item {
  display: flex;
  gap: 6px;
  padding: 1px 4px;
  border-radius: 2px;
  cursor: pointer;
}
.tvm-debug-history-item:hover { background: rgba(255, 209, 0, 0.14); }
.tvm-debug-history-item.active {
  background: #FFD100;
  color: #1A1A1A;
  font-weight: 700;
}
.tvm-debug-history-item.active .tvm-debug-history-i,
.tvm-debug-history-item.active .tvm-debug-history-ev,
.tvm-debug-history-item.active .tvm-debug-history-loc { color: #1A1A1A; }
.tvm-debug-history-i {
  color: #777;
  min-width: 36px;
  text-align: right;
}
.tvm-debug-history-ev {
  width: 14px;
  text-align: center;
  color: #946B0C;
  font-weight: 700;
}
.tvm-debug-history-loc { color: #2c3e50; }

/* Output panel collapsed sliver during debug */
.tvm-output-panel.tvm-debug-collapsed { overflow: hidden; }
.tvm-output-panel.tvm-debug-collapsed .tvm-output-container { display: none; }

/* ============================================================================
   Instructions-detached + debugger:true case.
   When the user pops out the instructions to a separate window AND the tutorial
   has the debugger enabled, we DON'T collapse the left panel to a thin strip
   (which is the default behavior for non-debugger tutorials). The panel stays
   full size so Watch / Call Stack / Variables / History remain visible. The
   default `.tvm-instructions-detached` rule already hides .tvm-steps-view, so
   here we just need to:
     - keep the panel at its normal flex width (override the 56px shrink)
     - keep the debug views visible (they're shown by activateTab)
     - render the "popped out" placeholder as a compact bar above the tabs
       instead of as a floating tile that takes the whole panel
   ========================================================================== */
.tvm-instructions-panel.tvm-instructions-detached.tvm-instructions-detached-debugger {
  flex: 1 1 0 !important;       /* honour the panel's normal share of width */
  min-width: 0 !important;
  max-width: none !important;
  overflow: visible;
}
/* Compact "popped out" pill above the tab bar — single-line, click to reattach. */
.tvm-instructions-panel.tvm-instructions-detached-debugger .tvm-instructions-detached-placeholder {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: #fff8d6;
  border-bottom: 1px solid #FFD100;
  flex: 0 0 auto;
  writing-mode: horizontal-tb;
}
.tvm-instructions-panel.tvm-instructions-detached-debugger .tvm-detached-msg {
  font-size: 11px;
  color: #5C4308;
  font-weight: 600;
  flex: 1;
}
.tvm-instructions-panel.tvm-instructions-detached-debugger .tvm-btn-reattach {
  background: #FFD100;
  color: #1A1A1A;
  border: none;
  border-radius: 3px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.tvm-instructions-panel.tvm-instructions-detached-debugger .tvm-btn-reattach:hover {
  background: #FFB81C;
}
/* Dark mode */
html.dark-mode .tvm-instructions-panel.tvm-instructions-detached-debugger .tvm-instructions-detached-placeholder {
  background: rgba(255, 209, 0, 0.14);
  border-bottom-color: rgba(255, 209, 0, 0.45);
}
html.dark-mode .tvm-instructions-panel.tvm-instructions-detached-debugger .tvm-detached-msg {
  color: #FFE066;
}

/* ============================================================================
   Dark mode — UCLA Gold pops on the deep slate panel background. The bright
   gold (#FFD100) maintains 13:1+ contrast on #1f2330 when used as text/icons,
   and pairs with #1A1A1A text on solid-gold backgrounds (matches light mode).
   ========================================================================== */

/* --- Debug button + step toolbar --- */
html.dark-mode .tvm-debug-btn { background: #FFD100; color: #1A1A1A; }
html.dark-mode .tvm-debug-btn:hover { background: #FFE066; color: #1A1A1A; }
html.dark-mode .tvm-debug-toolbar {
  background: rgba(255, 209, 0, 0.14);
  border-color: rgba(255, 209, 0, 0.45);
}
html.dark-mode .tvm-debug-toolbar .tvm-debug-step { color: #FFE066; }
html.dark-mode .tvm-debug-toolbar .tvm-debug-step:hover:not(:disabled) {
  background: rgba(255, 209, 0, 0.28);
  border-color: rgba(255, 224, 102, 0.65);
  color: #FFEEB3;
}
html.dark-mode .tvm-debug-toolbar .tvm-debug-divider { background: rgba(255, 224, 102, 0.45); }
html.dark-mode .tvm-debug-toolbar .tvm-debug-status { color: #FFE066; }
html.dark-mode .sebook-dbg-reload-note {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.12);
}

/* --- Breakpoint glyphs (slightly brighter red so they pop on dark gutter) --- */
html.dark-mode .tvm-bp-glyph { background: #f87171; box-shadow: 0 0 0 1px rgba(0,0,0,0.5) inset; }
html.dark-mode .tvm-bp-error { background: #fbbf24; }

/* Current-line decoration */
html.dark-mode .tvm-debug-current-line { background: rgba(251, 191, 36, 0.20); }
html.dark-mode .tvm-debug-current-glyph::before { color: #fbbf24; }
html.dark-mode .tvm-debug-current-line-rewound { background: rgba(148, 163, 184, 0.20); }
html.dark-mode .tvm-debug-current-glyph-rewound::before { color: #94a3b8; }

/* --- Debug view panels --- */
html.dark-mode .tvm-debug-view {
  background: #1f2330;
  color: #e2e8f0;
}
html.dark-mode .tvm-debug-empty { color: #94a3b8; }
html.dark-mode .tvm-debug-empty-row { color: #94a3b8; }
html.dark-mode .tvm-debug-section-head {
  background: #FFD100;
  color: #1A1A1A;
}
/* Combined-view stacked sections, dark mode */
html.dark-mode .tvm-dbg-section + .tvm-dbg-section { border-top-color: #2d3346; }
html.dark-mode .tvm-dbg-section-head {
  background: #2d3346;
  color: #FFE066;
}
html.dark-mode .tvm-dbg-section-head:hover {
  background: rgba(255, 209, 0, 0.22);
  color: #FFEEB3;
}
html.dark-mode .tvm-dbg-section-head .fa { color: #FFE066; }
html.dark-mode .tvm-dbg-section-chevron { color: #FFE066; }

/* Variables sub-sections (Locals / Globals) — dark mode */
html.dark-mode .tvm-debug-subsection + .tvm-debug-subsection { border-top-color: #2d3346; }
html.dark-mode .tvm-debug-subsection-head {
  background: #262b3a;
  color: #f1f5f9;
}
html.dark-mode .tvm-debug-subsection-head:hover {
  background: rgba(255, 209, 0, 0.18);
  color: #FFEEB3;
}
html.dark-mode .tvm-debug-subsection-chevron { color: #FFE066; }
html.dark-mode .tvm-debug-exception {
  background: rgba(248, 113, 113, 0.18);
  color: #fecaca;
  border-left-color: #f87171;
}
html.dark-mode .tvm-debug-return {
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
  border-left-color: #4ade80;
}

/* Variables tree */
html.dark-mode .tvm-debug-var-row:hover { background: rgba(255, 209, 0, 0.14); }
html.dark-mode .tvm-debug-expander { color: #FFE066; }
html.dark-mode .tvm-debug-var-name { color: #f1f5f9; }
html.dark-mode .tvm-debug-var-type { color: #94a3b8; }
html.dark-mode .tvm-debug-var-value { color: #fbbf24; }
html.dark-mode .tvm-debug-var-editable:hover {
  border-bottom-color: rgba(255, 224, 102, 0.8);
  background: rgba(255, 209, 0, 0.18);
}
html.dark-mode .tvm-debug-var-edit-input {
  background: #2d3346;
  color: #fbbf24;
  border-color: #FFD100;
}
html.dark-mode .tvm-debug-var-edit-input:focus {
  box-shadow: 0 0 0 2px rgba(255, 209, 0, 0.45);
}
html.dark-mode .tvm-debug-var-edit-pending {
  background: rgba(255, 209, 0, 0.30);
  color: #FFEEB3;
  border-bottom-color: #FFD100;
}
html.dark-mode .tvm-debug-alias {
  background: rgba(251, 191, 36, 0.20);
  color: #fde68a;
}
html.dark-mode .tvm-debug-truncated { color: #94a3b8; }

/* Call stack */
html.dark-mode .tvm-debug-frame:hover { background: rgba(255, 209, 0, 0.18); }
html.dark-mode .tvm-debug-frame.active {
  background: rgba(255, 209, 0, 0.32);
  border-left-color: #FFD100;
  color: #FFEEB3;
}
html.dark-mode .tvm-debug-frame.active .tvm-debug-frame-fn,
html.dark-mode .tvm-debug-frame.active .tvm-debug-frame-loc { color: #FFEEB3; }
html.dark-mode .tvm-debug-frame-fn { color: #f1f5f9; }
html.dark-mode .tvm-debug-frame-loc { color: #cbd5e1; }

/* Watch */
html.dark-mode .tvm-debug-watch-row { border-bottom-color: #2d3346; }
html.dark-mode .tvm-debug-watch-expr { color: #f1f5f9; }
html.dark-mode .tvm-debug-watch-arrow { color: #94a3b8; }
html.dark-mode .tvm-debug-watch-val { color: #fbbf24; }
html.dark-mode .tvm-debug-watch-na { color: #64748b; }
html.dark-mode .tvm-debug-watch-error { color: #fca5a5; }
html.dark-mode .tvm-debug-watch-remove { color: #f87171; }
html.dark-mode .tvm-debug-watch-remove:hover { color: #fca5a5; }
html.dark-mode .tvm-debug-watch-input {
  background: #2d3346;
  color: #f1f5f9;
  border-color: #475569;
}
html.dark-mode .tvm-debug-watch-input:focus {
  border-color: #FFD100;
  box-shadow: 0 0 0 2px rgba(255, 209, 0, 0.40);
}
html.dark-mode .tvm-debug-watch-input::placeholder { color: #64748b; }
html.dark-mode .tvm-debug-watch-add-btn { background: #FFD100; color: #1A1A1A; }
html.dark-mode .tvm-debug-watch-add-btn:hover { background: #FFE066; color: #1A1A1A; }

/* History */
html.dark-mode .tvm-debug-history-controls { border-bottom-color: #2d3346; }
html.dark-mode .tvm-debug-history-slider { accent-color: #FFD100; }
html.dark-mode .tvm-debug-history-pos { color: #cbd5e1; }
html.dark-mode .tvm-debug-history-live { color: #4ade80; }
html.dark-mode .tvm-debug-history-rewound { color: #fb923c; }
html.dark-mode .tvm-debug-history-list { color: #e2e8f0; }
html.dark-mode .tvm-debug-history-item:hover { background: rgba(255, 209, 0, 0.16); }
html.dark-mode .tvm-debug-history-item.active {
  background: #FFD100;
  color: #1A1A1A;
}
html.dark-mode .tvm-debug-history-item.active .tvm-debug-history-i,
html.dark-mode .tvm-debug-history-item.active .tvm-debug-history-ev,
html.dark-mode .tvm-debug-history-item.active .tvm-debug-history-loc { color: #1A1A1A; }
html.dark-mode .tvm-debug-history-i { color: #94a3b8; }
html.dark-mode .tvm-debug-history-ev { color: #FFE066; }
html.dark-mode .tvm-debug-history-loc { color: #f1f5f9; }
