:root {
  --bg: #0d1117;
  --bg2: #161b27;
  --bg3: #1e2535;
  --border: #2a3348;
  --blue: #3b82f6;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --cyan: #06b6d4;
  --text: #f0f4ff;
  --text2: #94a3b8;
  --text3: #4a5568;
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'IBM Plex Sans', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--bg); font-family: var(--sans); color: var(--text); }

/* ── DECK SHELL ── */
#deck { width: 100vw; height: 100vh; position: relative; overflow: hidden; }

/* ── SLIDES ── */
.slide {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding: 60px 80px;
  opacity: 0; pointer-events: none;
  transform: translateX(60px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  overflow-y: auto;
}
.slide.active { opacity: 1; pointer-events: all; transform: translateX(0); }
.slide.exit   { opacity: 0; transform: translateX(-60px); }

/* ── SLIDE LABEL ── */
.slide-label {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  color: var(--text3); text-transform: uppercase; letter-spacing: 2px;
  margin-bottom: 18px;
}

/* ── TYPOGRAPHY ── */
.slide h1 { font-family: var(--mono); font-size: clamp(28px, 4vw, 48px); font-weight: 600; letter-spacing: -1.5px; line-height: 1.1; margin-bottom: 18px; }
.slide h2 { font-family: var(--mono); font-size: clamp(20px, 2.5vw, 30px); font-weight: 600; letter-spacing: -0.5px; margin-bottom: 16px; }
.slide h3 { font-family: var(--mono); font-size: 15px; font-weight: 600; color: var(--text2); margin-bottom: 10px; letter-spacing: 0.2px; }
.slide p  { font-size: 15px; color: var(--text2); line-height: 1.8; margin-bottom: 12px; }
.slide .lead { font-size: 18px; color: var(--text2); line-height: 1.8; max-width: 640px; }

/* ── COVER SLIDE ── */
#s0 { justify-content: center; background: radial-gradient(ellipse at 70% 30%, rgba(59,130,246,0.08) 0%, transparent 60%); }
.logo-mark { font-family: var(--mono); font-size: 80px; font-weight: 600; color: var(--blue); letter-spacing: -4px; line-height: 1; margin-bottom: 8px; }
.cover-sub { font-size: 13px; font-family: var(--mono); color: var(--text3); text-transform: uppercase; letter-spacing: 3px; margin-bottom: 48px; }
.cover-title { font-family: var(--mono); font-size: clamp(24px,3.5vw,42px); font-weight: 600; letter-spacing: -1.5px; line-height: 1.1; margin-bottom: 16px; }
.cover-desc { font-size: 17px; color: var(--text2); max-width: 520px; line-height: 1.8; }
.chapters { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 40px; }
.chapter-chip { background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; padding: 6px 14px; font-size: 12px; font-family: var(--mono); color: var(--text2); }

/* ── CARDS ── */
.card-row { display: grid; gap: 16px; margin: 20px 0; }
.card-row.cols-2 { grid-template-columns: 1fr 1fr; }
.card-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.card-row.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px 22px;
  transition: border-color 0.2s, transform 0.2s;
  cursor: default;
}
.card:hover { border-color: var(--blue); transform: translateY(-2px); }
.card .c-icon { font-size: 22px; margin-bottom: 10px; }
.card .c-title { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.card .c-desc { font-size: 12.5px; color: var(--text3); line-height: 1.6; }
.card.accent-green { border-color: rgba(34,197,94,0.3); }
.card.accent-cyan  { border-color: rgba(6,182,212,0.3); }
.card.accent-amber { border-color: rgba(245,158,11,0.3); }
.card.accent-red   { border-color: rgba(239,68,68,0.3); }

/* ── STATUS BADGE ── */
.badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  font-family: var(--mono); padding: 3px 9px; border-radius: 5px; letter-spacing: 0.3px;
}
.b-green  { background: rgba(34,197,94,0.15);  color: #22c55e; border: 1px solid rgba(34,197,94,0.3); }
.b-cyan   { background: rgba(6,182,212,0.15);  color: #06b6d4; border: 1px solid rgba(6,182,212,0.3); }
.b-amber  { background: rgba(245,158,11,0.15); color: #f59e0b; border: 1px solid rgba(245,158,11,0.3); }
.b-red    { background: rgba(239,68,68,0.15);  color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }
.b-gray   { background: rgba(100,116,139,0.15);color: #94a3b8; border: 1px solid rgba(100,116,139,0.3); }
.b-blue   { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }

/* ── TABLE ── */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; margin: 14px 0; }
.tbl th { background: var(--bg3); color: var(--text2); font-family: var(--mono); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.tbl td { padding: 9px 14px; border-bottom: 1px solid rgba(42,48,69,0.5); color: var(--text2); vertical-align: top; }
.tbl td:first-child { color: var(--text); font-weight: 500; }
.tbl tr:last-child td { border-bottom: none; }

/* ── CALLOUT ── */
.callout { border-radius: 8px; padding: 14px 18px; margin: 16px 0; display: flex; gap: 12px; font-size: 13.5px; }
.callout-icon { font-size: 16px; flex-shrink: 0; margin-top: 2px; }
.callout-body { color: var(--text2); line-height: 1.7; }
.callout-body strong { color: var(--text); }
.ci { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.2); }
.ct { background: rgba(34,197,94,0.08);  border: 1px solid rgba(34,197,94,0.2); }
.cw { background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2); }

/* ── STEPS ── */
.steps { display: flex; flex-direction: column; gap: 14px; margin: 16px 0; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step-n { width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; font-family: var(--mono); font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.step-b strong { color: var(--text); display: block; font-size: 14px; margin-bottom: 3px; }
.step-b span { font-size: 13px; color: var(--text2); line-height: 1.7; }

/* ── FIELD PILL ── */
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.field-item { background: var(--bg2); border: 1px solid var(--border); border-radius: 7px; padding: 10px 14px; }
.field-item .fk { font-family: var(--mono); font-size: 11px; color: var(--cyan); margin-bottom: 3px; }
.field-item .fv { font-size: 12.5px; color: var(--text2); line-height: 1.5; }

/* ── NAV BAR MOCK ── */
.nav-mock {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 20px; display: flex; align-items: center; gap: 28px; margin: 16px 0;
  font-size: 14px;
}
.nav-mock .brand { font-family: var(--mono); font-weight: 600; color: var(--blue); margin-right: 8px; }
.nav-mock a { color: var(--text2); text-decoration: none; cursor: pointer; padding: 4px 10px; border-radius: 5px; transition: background 0.15s, color 0.15s; font-size: 13.5px; }
.nav-mock a:hover, .nav-mock a.active { background: rgba(59,130,246,0.12); color: var(--text); }

/* ── OVERVIEW CARDS INTERACTIVE ── */
.ov-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 16px 0; }
.ov-card {
  border-radius: 10px; padding: 20px 18px; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative; overflow: hidden;
}
.ov-card:hover { transform: translateY(-3px); }
.ov-card .ov-num { font-family: var(--mono); font-size: 30px; font-weight: 600; line-height: 1; margin-bottom: 6px; }
.ov-card .ov-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.ov-card .ov-sub { font-size: 12px; opacity: 0.8; }
.ov-card.c-success { background: #14532d; color: #bbf7d0; }
.ov-card.c-info    { background: #164e63; color: #a5f3fc; }
.ov-card.c-warn    { background: #78350f; color: #fde68a; }
.ov-card.c-danger  { background: #7f1d1d; color: #fecaca; }

/* ── TAB MOCK ── */
.tab-mock { margin: 14px 0; }
.tab-bar { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.tab-btn {
  padding: 8px 16px; font-size: 13px; font-family: var(--mono); cursor: pointer;
  color: var(--text2); border: none; background: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab-btn.tab-colored.active { color: var(--tc); border-bottom-color: var(--tc); }
.tab-content { display: none; }
.tab-content.active { display: block; }

.tab-pulse { animation: tab-glow 2s ease-in-out infinite; }
.tab-pulse:hover, .tab-pulse.active { animation: none; }
@keyframes tab-glow {
  0%, 100% { color: var(--text2); }
  50%       { color: var(--blue); text-shadow: 0 0 8px rgba(59,130,246,0.5); }
}
.tab-colored.tab-pulse { animation: tab-glow-c 2s ease-in-out infinite; }
.tab-colored.tab-pulse:hover, .tab-colored.tab-pulse.active { animation: none; }
@keyframes tab-glow-c {
  0%, 100% { color: var(--text2); }
  50%       { color: var(--tc); filter: drop-shadow(0 0 4px var(--tc)); }
}
.tab-click-hint {
  font-family: var(--mono); font-size: 12px; color: var(--blue);
  animation: bounce-down 1.2s ease-in-out infinite;
  display: inline-block;
}
@keyframes bounce-down {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50%       { transform: translateY(4px); opacity: 1; }
}

/* ── WO MOCK LIST ── */
.wo-list { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.wo-row {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 16px; display: grid;
  grid-template-columns: 110px 100px 90px 1fr 60px;
  gap: 12px; align-items: center; font-size: 13px;
  cursor: pointer; transition: border-color 0.15s;
}
.wo-row:hover { border-color: var(--blue); }
.wo-num { font-family: var(--mono); font-size: 12px; color: var(--blue); font-weight: 600; }
.wo-date { color: var(--text2); font-size: 12px; }
.wo-customer { color: var(--text2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wo-det { color: var(--text3); font-size: 11.5px; }

/* ── INVENTORY BARS ── */
.inv-bar-section { margin: 14px 0; }
.inv-bar-row { display: flex; align-items: center; gap: 12px; margin: 8px 0; font-size: 13px; }
.inv-bar-label { width: 50px; font-family: var(--mono); color: var(--text2); font-size: 12px; }
.inv-bar-track { flex: 1; background: var(--bg3); border-radius: 4px; height: 8px; overflow: hidden; }
.inv-bar-fill { height: 100%; border-radius: 4px; transition: width 0.8s ease; }
.inv-bar-val { width: 60px; text-align: right; font-family: var(--mono); font-size: 12px; }

/* ── CALENDAR MOCK ── */
.cal-mock { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin: 14px 0; }
.cal-header { padding: 12px 16px; border-bottom: 1px solid var(--border); font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--text); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-day-hdr { padding: 8px 4px; text-align: center; font-size: 11px; font-family: var(--mono); color: var(--text3); border-bottom: 1px solid var(--border); }
.cal-cell { padding: 8px 6px; min-height: 64px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: 11px; vertical-align: top; }
.cal-cell:nth-child(7n) { border-right: none; }
.cal-date { font-family: var(--mono); font-size: 11px; color: var(--text3); margin-bottom: 4px; }
.cal-entry { border-radius: 3px; padding: 2px 5px; font-size: 10px; font-family: var(--mono); color: #a5f3fc; background: #164e63; margin-bottom: 2px; white-space: nowrap; }
.cal-entry.alt { color: #bbf7d0; background: #14532d; }
.cal-entry.alt2 { color: #fde68a; background: #78350f; }

/* ── CHART MOCK ── */
.chart-mock { margin: 14px 0; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.chart-title { font-family: var(--mono); font-size: 13px; color: var(--text); margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.chart-bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; }
.bar-group { display: flex; gap: 2px; align-items: flex-end; flex: 1; }
.bar { border-radius: 3px 3px 0 0; flex: 1; min-width: 8px; transition: opacity 0.2s; }
.bar:hover { opacity: 0.8; }
.bar.green { background: var(--green); }
.bar.red   { background: var(--red); }
.chart-labels { display: flex; gap: 8px; margin-top: 8px; }
.chart-lbl { flex: 1; text-align: center; font-family: var(--mono); font-size: 10px; color: var(--text3); }

/* ── GLOSSARY ── */
.gloss-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.gloss-item { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
.gloss-term { font-family: var(--mono); font-size: 12px; color: var(--blue); margin-bottom: 4px; font-weight: 600; }
.gloss-def { font-size: 12.5px; color: var(--text2); line-height: 1.6; }

/* ── BOTTOM NAV ── */
#bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(13,17,23,0.97); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 8px 48px;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 100; height: 58px;
}
.nav-btn {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); font-family: var(--mono); font-size: 13px;
  padding: 8px 20px; border-radius: 7px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  display: flex; align-items: center; gap: 6px;
}
.nav-btn:hover { background: var(--bg2); border-color: var(--blue); color: var(--blue); }
.nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.nav-btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.nav-btn.primary:hover { background: #2563eb; }

.slide-counter { font-family: var(--mono); font-size: 12px; color: var(--text3); }
.slide-title-display { font-family: var(--mono); font-size: 12px; color: var(--text2); text-align: center; max-width: 320px; }

/* ── PROGRESS BAR ── */
#progress-bar { position: fixed; top: 0; left: 0; height: 2px; background: var(--blue); z-index: 200; transition: width 0.3s; }

/* ── SLIDE INDEX ── */
#slide-index {
  position: fixed; top: 50%; right: 12px; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 5px; z-index: 100;
}
.idx-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--border); cursor: pointer; transition: background 0.15s, transform 0.15s;
}
.idx-dot.active { background: var(--blue); transform: scale(1.5); }

/* ── KEY HINT ── */
#key-hint {
  position: fixed; bottom: 130px; right: 24px;
  font-family: var(--mono); font-size: 11px; color: var(--text3);
  background: var(--bg2); border: 1px solid var(--border);
  padding: 6px 10px; border-radius: 6px; opacity: 0.7;
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; margin: 16px 0; }

/* ── SCREENSHOTS ── */
.shot-wrap {
  border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; margin: 14px 0;
  background: var(--bg3); flex-shrink: 0;
}
.shot-wrap img {
  width: 100%; display: block;
  border-radius: 9px; cursor: zoom-in;
  transition: opacity 0.15s;
}
.shot-wrap img:hover { opacity: 0.88; }
.shot-label {
  font-family: var(--mono); font-size: 10px; color: var(--text3);
  text-transform: uppercase; letter-spacing: 1px;
  padding: 6px 12px; border-top: 1px solid var(--border);
  background: var(--bg2);
}
.slide-with-shot {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 28px; align-items: start;
}
.shot-col { display: flex; flex-direction: column; gap: 12px; }

/* ── CAPTIONS ── */
#caption-bar {
  position: fixed; bottom: 180px; left: 50%; transform: translateX(-50%);
  max-width: 820px; width: 90%;
  padding: 6px 20px; z-index: 150;
  text-align: center; pointer-events: none;
  opacity: 0; transition: opacity 0.3s;
}
#caption-bar.visible { opacity: 1; }
#caption-text {
  font-size: 15px; color: #fff; line-height: 1.6;
  font-family: var(--sans);
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

/* ── VOICEOVER BAR ── */
#vo-bar {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 40px; padding: 7px 16px;
  display: flex; align-items: center; gap: 12px;
  z-index: 200; transition: border-color 0.3s;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
#vo-bar.speaking { border-color: var(--blue); }
#vo-btn {
  width: 30px; height: 30px; border-radius: 50%;
  border: none; cursor: pointer;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; transition: background 0.2s, transform 0.1s;
  flex-shrink: 0;
}
#vo-btn:hover { background: #2563eb; transform: scale(1.05); }
#vo-btn.paused { background: var(--bg3); border: 1px solid var(--border); }
#vo-label {
  font-family: var(--mono); font-size: 11px; color: var(--text2);
  white-space: nowrap; max-width: 260px;
  overflow: hidden; text-overflow: ellipsis;
}
#vo-wave {
  display: flex; align-items: center; gap: 2px; height: 16px;
}
#vo-wave span {
  display: block; width: 3px; border-radius: 2px;
  background: var(--blue); animation: wave 0.9s ease-in-out infinite;
}
#vo-wave span:nth-child(1){ height: 4px;  animation-delay: 0s; }
#vo-wave span:nth-child(2){ height: 10px; animation-delay: 0.15s; }
#vo-wave span:nth-child(3){ height: 14px; animation-delay: 0.3s; }
#vo-wave span:nth-child(4){ height: 10px; animation-delay: 0.45s; }
#vo-wave span:nth-child(5){ height: 4px;  animation-delay: 0.6s; }
#vo-wave.hidden { display: none; }
@keyframes wave {
  0%, 100% { transform: scaleY(0.5); opacity: 0.5; }
  50%       { transform: scaleY(1);   opacity: 1; }
}
#vo-toggle-label {
  font-family: var(--mono); font-size: 10px; color: var(--text3);
  cursor: pointer; white-space: nowrap;
}
#vo-toggle-label:hover { color: var(--text2); }

/* ── VOLUME ── */
#vo-vol-wrap {
  display: flex; align-items: center; gap: 6px;
  border-left: 1px solid var(--border); padding-left: 12px;
}
#vo-vol-icon { font-size: 13px; cursor: pointer; user-select: none; }
#vo-vol {
  -webkit-appearance: none; appearance: none;
  width: 72px; height: 3px; border-radius: 2px;
  background: var(--border); outline: none; cursor: pointer;
}
#vo-vol::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px;
  border-radius: 50%; background: var(--blue); cursor: pointer;
}
#vo-vol::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--blue); border: none; cursor: pointer;
}

/* ── MEDIA PLAYER ── */
#media-player {
  position: fixed; bottom: 58px; left: 0; right: 0;
  background: rgba(13,17,23,0.97); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 8px 24px 10px;
  z-index: 150;
}
#seek-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
#seek-bar-wrap {
  flex: 1; height: 16px; display: flex; align-items: center; cursor: pointer; position: relative;
}
#seek-track {
  width: 100%; height: 4px; background: var(--bg3);
  border-radius: 2px; position: relative; overflow: visible;
}
#seek-fill {
  height: 100%; background: var(--blue); border-radius: 2px;
  width: 0%; transition: none; pointer-events: none;
}
#seek-thumb {
  width: 12px; height: 12px; border-radius: 50%; background: #fff;
  position: absolute; top: 50%; transform: translate(-50%,-50%);
  left: 0%; pointer-events: none; opacity: 0;
  transition: opacity 0.15s;
}
#seek-bar-wrap:hover #seek-thumb { opacity: 1; }
#seek-bar-wrap:hover #seek-track { height: 5px; }
#time-display {
  font-family: var(--mono); font-size: 11px; color: var(--text3);
  white-space: nowrap; min-width: 80px; text-align: right;
}
#controls-row {
  display: flex; align-items: center; gap: 6px;
}
.mp-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: none; color: var(--text2);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: color 0.15s, background 0.15s; flex-shrink: 0;
}
.mp-btn:hover { color: var(--text); background: rgba(255,255,255,0.07); }
.mp-btn.primary {
  background: var(--blue); color: #fff; width: 36px; height: 36px; font-size: 15px;
}
.mp-btn.primary:hover { background: #2563eb; }
#mp-title {
  flex: 1; font-family: var(--mono); font-size: 11px; color: var(--text2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin: 0 8px;
}
#mp-vol-wrap { display: flex; align-items: center; gap: 6px; }
#mp-vol-icon { font-size: 14px; cursor: pointer; color: var(--text2); transition: color 0.15s; }
#mp-vol-icon:hover { color: var(--text); }
#mp-vol {
  -webkit-appearance: none; appearance: none;
  width: 70px; height: 3px; border-radius: 2px;
  background: var(--border); outline: none; cursor: pointer;
}
#mp-vol::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px;
  border-radius: 50%; background: var(--blue); cursor: pointer;
}
#mp-vol::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--blue); border: none; cursor: pointer;
}
#mp-speed {
  font-family: var(--mono); font-size: 11px; color: var(--text2);
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 5px; padding: 3px 6px; cursor: pointer; outline: none;
}
#mp-speed:hover { border-color: var(--blue); color: var(--text); }
#mp-auto {
  font-family: var(--mono); font-size: 10px; color: var(--text3);
  cursor: pointer; white-space: nowrap; padding: 3px 8px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 5px;
  transition: color 0.15s, border-color 0.15s;
}
#mp-auto:hover { color: var(--text2); border-color: var(--blue); }
#mp-auto.on { color: var(--blue); border-color: rgba(59,130,246,0.4); background: rgba(59,130,246,0.08); }
#mp-advance {
  font-family: var(--mono); font-size: 10px; color: var(--text3);
  cursor: pointer; white-space: nowrap; padding: 3px 8px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 5px;
  transition: color 0.15s, border-color 0.15s;
}
#mp-advance:hover { color: var(--text2); border-color: var(--blue); }
#mp-advance.on { color: var(--green); border-color: rgba(34,197,94,0.4); background: rgba(34,197,94,0.08); }
.mp-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; flex-shrink: 0; }

/* ── TABLE OF CONTENTS ── */
#toc-toggle {
  position: fixed; top: 12px; left: 20px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 14px;
  font-family: var(--mono); font-size: 12px; color: var(--text2);
  cursor: pointer; z-index: 200;
  display: flex; align-items: center; gap: 8px;
  transition: border-color 0.2s, color 0.2s;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
#toc-toggle:hover { border-color: var(--blue); color: var(--blue); }
#toc-toggle .toc-icon { font-size: 14px; }

#toc-panel {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 300px; background: var(--bg2);
  border-right: 1px solid var(--border);
  z-index: 300; overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex; flex-direction: column;
}
#toc-panel.open { transform: translateX(0); }

#toc-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 299; opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
#toc-overlay.open { opacity: 1; pointer-events: all; }

.toc-header {
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.toc-header-title { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--text); }
.toc-close {
  background: none; border: none; color: var(--text3);
  font-size: 18px; cursor: pointer; line-height: 1; padding: 4px; transition: color 0.15s;
}
.toc-close:hover { color: var(--text); }
.toc-section-label {
  padding: 14px 20px 6px; font-family: var(--mono); font-size: 10px; font-weight: 600;
  color: var(--text3); text-transform: uppercase; letter-spacing: 1.5px;
}
.toc-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 20px; cursor: pointer;
  border-left: 2px solid transparent; transition: background 0.15s, border-color 0.15s;
}
.toc-item:hover { background: var(--bg3); border-left-color: var(--border); }
.toc-item.active { background: rgba(59,130,246,0.08); border-left-color: var(--blue); }
.toc-num { font-family: var(--mono); font-size: 10px; color: var(--text3); width: 20px; flex-shrink: 0; text-align: right; }
.toc-title { font-size: 13px; color: var(--text2); }
.toc-item.active .toc-title { color: var(--blue); font-weight: 500; }
.toc-item.done .toc-num { color: var(--green); }

/* ── LIGHTBOX ── */
#lightbox {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.88);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
#lightbox.open { opacity: 1; pointer-events: all; }
#lightbox-img {
  max-width: 90vw; max-height: 85vh;
  border-radius: 10px; display: block;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
  cursor: default;
}
#lightbox-close {
  position: absolute; top: 20px; right: 24px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 50%; width: 36px; height: 36px;
  color: var(--text2); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s, border-color 0.15s; line-height: 1;
}
#lightbox-close:hover { color: var(--text); border-color: var(--blue); }
