/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2);
  border: none; cursor: pointer; font-family: var(--font-sans);
  font-size: 13px; font-weight: 600; border-radius: var(--radius-md);
  transition: all 0.15s; white-space: nowrap; text-decoration: none;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  background: var(--gradient-teal); color: #0b0e14;
  padding: 9px 20px;
}
.btn-primary:hover:not(:disabled) { opacity: 0.88; box-shadow: 0 0 14px var(--teal-glow); }

.btn-secondary {
  background: transparent; border: 1px solid var(--border-medium);
  color: var(--text-secondary); padding: 8px 16px;
}
.btn-secondary:hover:not(:disabled) { border-color: var(--teal-bright); color: var(--teal-bright); }

.btn-analyze {
  background: rgba(139,92,246,0.15); border: 1px solid rgba(139,92,246,0.4);
  color: #a78bfa; padding: 8px 14px; font-weight: 600;
}
.btn-analyze:hover:not(:disabled) {
  background: rgba(139,92,246,0.25); border-color: #a78bfa; color: #c4b5fd;
}
.tp-qa-on {
  background: rgba(96,165,250,0.12) !important;
  border-color: rgba(96,165,250,0.4) !important;
  color: #60a5fa !important;
}

.btn-ghost {
  background: transparent; border: none;
  color: var(--text-muted); padding: 6px 10px; font-weight: 500;
}
.btn-ghost:hover:not(:disabled) { color: var(--text-primary); }

.btn-danger {
  background: transparent; border: 1px solid var(--red);
  color: var(--red); padding: 8px 16px;
}
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,0.08); }

.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-icon { padding: 6px; border-radius: var(--radius-md); }

/* ── Filter chips ──────────────────────────────────────────────── */
.filter-chip {
  padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border-medium); background: transparent;
  color: var(--text-muted); cursor: pointer; transition: all 0.15s;
}
.filter-chip:hover { color: var(--text-primary); border-color: var(--border-focus); }
.filter-chip.active {
  background: var(--teal-dim); border-color: var(--teal-bright); color: var(--teal-bright);
}

/* ── Inputs / Textareas ────────────────────────────────────────── */
input[type="text"], textarea, .editable-field {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font-sans);
  outline: none;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type="text"]:focus,
textarea:focus,
.editable-field:focus {
  border-color: var(--teal-bright);
  box-shadow: 0 0 0 2px var(--teal-glow);
}
input[type="text"]::placeholder,
textarea::placeholder { color: var(--text-faint); }
textarea { resize: none; line-height: 1.6; }
.auto-resize { overflow: hidden; }

/* ── Section label ─────────────────────────────────────────────── */
.section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--text-muted);
  display: flex; align-items: center; gap: var(--space-2);
}
.section-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.dot-green  { background: var(--green); }
.dot-amber  { background: var(--amber); }
.dot-purple { background: var(--purple); }
.dot-blue   { background: var(--blue); }

/* ── Cards / panels ────────────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.card-elevated {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

/* ── Badges ────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.badge-ready    { background: rgba(74,222,128,0.15); color: var(--green); }
.badge-pending  { background: rgba(156,163,175,0.12); color: var(--text-muted); }
.badge-generating { background: rgba(251,191,36,0.15); color: var(--amber); }
.badge-error    { background: rgba(239,68,68,0.15); color: var(--red); }
.badge-feedback { background: rgba(192,132,252,0.15); color: var(--purple); }
.badge-timed    { background: rgba(94,234,212,0.1); color: var(--teal-bright); }

/* ── Slide rows (sidebar) ──────────────────────────────────────── */
.slide-row {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 8px var(--space-4); cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.1s, border-color 0.1s;
  min-height: 62px;
}
.slide-row:hover { background: var(--bg-elevated); }
.slide-row.active {
  border-left-color: var(--teal-bright);
  background: var(--teal-dim);
}

.slide-thumb {
  width: 56px; height: 42px; object-fit: cover; flex-shrink: 0;
  border-radius: 5px; border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}
.slide-thumb-placeholder {
  width: 56px; height: 42px; flex-shrink: 0;
  border-radius: 5px; border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint); font-size: 10px;
}
.slide-row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.slide-row-num  { font-size: 10px; color: var(--text-faint); }
.slide-row-title {
  font-size: 13px; font-weight: 500; color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.slide-row-badges { display: flex; gap: 4px; flex-wrap: wrap; }

/* ── Progress bar (header) ─────────────────────────────────────── */
.progress-bar-wrap {
  display: flex; flex-direction: column; gap: 4px; min-width: 120px;
}
.progress-bar-labels {
  display: flex; align-items: baseline; gap: var(--space-2);
}
.progress-count { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.progress-pct   { font-size: 11px; color: var(--text-muted); }
.progress-sub   { font-size: 10px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: var(--text-muted); flex: 1; }
.progress-bar-track {
  height: 5px; background: var(--border-medium); border-radius: 3px; overflow: hidden;
}
.progress-bar-fill {
  height: 100%; width: 0%; background: var(--teal-bright);
  border-radius: 3px; transition: width 0.3s ease, background 0.3s;
}
.progress-bar-fill.complete { background: var(--green); }

/* ── Talk track pane ───────────────────────────────────────────── */
.talk-track-editor {
  background: rgba(0,0,0,0.15);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  font-size: 14px; color: var(--text-secondary); line-height: 1.7;
  min-height: 120px; outline: none;
  transition: border-color 0.15s;
}
.talk-track-editor:focus { border-color: var(--teal-bright); }
.talk-track-editor.save-flash {
  animation: savePulse 0.6s ease;
}
.word-count {
  font-size: 11px; color: var(--text-faint); text-align: right; margin-top: 4px;
}

/* ── Accordion (Q&A / Objections) ──────────────────────────────── */
.accordion { display: flex; flex-direction: column; gap: 2px; }
.accordion-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.accordion-header {
  display: flex; align-items: center; gap: var(--space-2);
  padding: 10px var(--space-3); cursor: pointer;
  background: var(--bg-elevated);
  transition: background 0.1s;
  user-select: none;
}
.accordion-header:hover { background: var(--bg-surface); }
.accordion-chevron {
  margin-left: auto; flex-shrink: 0;
  color: var(--text-muted); font-size: 12px;
  transition: transform 0.2s;
}
.accordion-item.open .accordion-chevron { transform: rotate(90deg); }
.accordion-question {
  flex: 1; font-size: 14px; font-weight: 600; color: var(--text-primary);
  outline: none;
}
.accordion-question.obj-tint { color: var(--purple); }
.accordion-body {
  display: none; padding: var(--space-3); background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
}
.accordion-item.open .accordion-body { display: block; }
.accordion-answer {
  font-size: 14px; color: var(--text-secondary); outline: none;
  width: 100%; min-height: 48px;
}
.accordion-remove {
  flex-shrink: 0; opacity: 0; background: transparent;
  border: none; color: var(--red-soft); cursor: pointer;
  font-size: 14px; padding: 2px 4px; transition: opacity 0.15s;
}
.accordion-header:hover .accordion-remove { opacity: 1; }

/* ── Notes for AI ──────────────────────────────────────────────── */
.notes-for-ai-wrap { display: flex; flex-direction: column; gap: var(--space-2); }
.notes-for-ai {
  min-height: 64px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Save indicator ────────────────────────────────────────────── */
#save-indicator {
  font-size: 11px; font-weight: 600; color: var(--green);
  opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
}
#save-indicator.visible { opacity: 1; }

/* ── Slide image ───────────────────────────────────────────────── */
.slide-image {
  width: 100%; border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  display: block;
}
.slide-image-placeholder {
  width: 100%; aspect-ratio: 4/3;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint); font-size: 12px; text-align: center;
}

/* ── Collapsible raw text ──────────────────────────────────────── */
.collapsible-header {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none;
}
.collapsible-body { overflow: hidden; }
.collapsible-body.collapsed { display: none; }
.raw-text-content {
  font-size: 12px; color: var(--text-muted);
  line-height: 1.5; max-height: 200px; overflow-y: auto;
  background: rgba(0,0,0,0.15); border-radius: var(--radius-md);
  padding: var(--space-3); margin-top: var(--space-2);
  word-break: break-word;
}

/* ── Markdown rendered content ─────────────────────────────────── */
.markdown-body { font-size: 13px; line-height: 1.6; color: var(--text-primary); }
.markdown-body p { margin: 0 0 8px; }
.markdown-body p:last-child { margin-bottom: 0; }
.markdown-body ul, .markdown-body ol { padding-left: 20px; margin: 0 0 8px; }
.markdown-body li { margin-bottom: 3px; }
.markdown-body strong { font-weight: 700; color: var(--text-primary); }
.markdown-body em { font-style: italic; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 {
  font-size: 13px; font-weight: 700; margin: 10px 0 4px; color: var(--text-primary);
}
.markdown-body code {
  font-family: var(--font-mono); font-size: 11px;
  background: rgba(0,0,0,0.2); border-radius: 3px; padding: 1px 4px;
}
.teleprompter-text.markdown-body p { margin: 0 0 1em; }
.teleprompter-text.markdown-body { font-size: inherit; }

/* ── Upload zone ───────────────────────────────────────────────── */
.upload-drop-zone {
  width: 420px; max-width: 90vw;
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  display: flex; flex-direction: column; align-items: center; gap: var(--space-4);
}
.upload-drop-zone:hover,
.upload-drop-zone.dragover {
  border-color: var(--teal-bright);
  background: var(--teal-dim);
}
.upload-icon   { font-size: 40px; line-height: 1; }
.upload-title  { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.upload-sub    { font-size: 13px; color: var(--text-muted); }
.upload-status { font-size: 13px; color: var(--amber); min-height: 20px; }

/* ── Teleprompter / Live Run-Through ───────────────────────────── */
#teleprompter-view { padding: var(--space-6) 0; }
.teleprompter-slide-header {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--teal-bright);
  margin-bottom: var(--space-2); margin-top: var(--space-8);
  display: flex; align-items: center; gap: 10px;
}
.teleprompter-slide-header:first-child { margin-top: 0; }
.tp-slide-time {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  background: var(--bg-elevated); border-radius: 4px;
  padding: 2px 6px; letter-spacing: 0; text-transform: none;
}
.tp-clock {
  font-family: var(--font-mono); font-size: 14px; font-weight: 700;
  color: var(--teal-bright); letter-spacing: 0.05em;
  min-width: 48px; text-align: center;
}
.recording-active {
  color: var(--red) !important;
  border-color: var(--red) !important;
  animation: recordPulse 1.2s ease-in-out infinite;
}
@keyframes recordPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.teleprompter-divider {
  border: none; border-top: 1px solid var(--border-subtle);
  margin-bottom: var(--space-4);
}
.teleprompter-text {
  font-size: inherit; line-height: 1.9; color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

/* ── Interrupt cards (Q&A / objections) ──────────────────────────── */
.tp-interrupt-card {
  margin: var(--space-5) 0 var(--space-8);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  border-left: 3px solid;
  opacity: 0.45;
  transition: opacity 0.3s, box-shadow 0.3s;
}
.tp-interrupt-card.tp-interrupt-active {
  opacity: 1;
  box-shadow: 0 0 0 1px var(--border-medium);
}
.tp-interrupt-card.tp-interrupt-done {
  opacity: 0.25;
}
.tp-interrupt-question {
  background: var(--bg-elevated); border-radius: var(--border-medium);
  border-color: #60a5fa;
}
.tp-interrupt-objection {
  background: var(--bg-elevated);
  border-color: #f59e0b;
}
.tp-interrupt-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-muted);
  margin-bottom: var(--space-3);
}
.tp-interrupt-icon {
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; flex-shrink: 0;
}
.tp-interrupt-question .tp-interrupt-icon { background: rgba(96,165,250,0.2); color: #60a5fa; }
.tp-interrupt-objection .tp-interrupt-icon { background: rgba(245,158,11,0.2); color: #f59e0b; }
.tp-interrupt-question .tp-interrupt-label { color: #60a5fa; }
.tp-interrupt-objection .tp-interrupt-label { color: #f59e0b; }
.tp-interrupt-card > .tp-interrupt-question-text {
  font-size: inherit; font-weight: 600; color: var(--text-primary);
  line-height: 1.5; margin-bottom: var(--space-4);
}
.tp-interrupt-answer {
  font-size: calc(1em * 0.85); color: var(--text-muted); line-height: 1.65;
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-3); margin-top: var(--space-3);
  margin-bottom: var(--space-4);
}
.tp-interrupt-actions {
  display: flex; gap: var(--space-3); margin-top: var(--space-3);
}
.tp-interrupt-reveal {
  background: transparent; border: 1px solid var(--border-medium);
  color: var(--text-muted); font-size: 12px;
}
.tp-interrupt-reveal:hover { border-color: var(--teal-bright); color: var(--teal-bright); }

/* Q&A setup modal body */
.tp-qa-setup-body {
  flex: 1; overflow-y: auto;
  padding: var(--space-4) var(--space-5);
  display: flex; flex-direction: column; gap: var(--space-2);
}
.tp-qa-toolbar {
  display: flex; gap: var(--space-2); align-items: center;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}
.tp-qa-search-input {
  flex: 1; background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); padding: 6px 10px;
  font-size: 13px; color: var(--text-primary); outline: none;
}
.tp-qa-search-input:focus { border-color: var(--teal-bright); }
.tp-qa-selected-only-btn { white-space: nowrap; }
.tp-qa-filter-active {
  background: rgba(96,165,250,0.12) !important;
  border-color: rgba(96,165,250,0.4) !important;
  color: #60a5fa !important;
}
.tp-qa-setup-options {
  display: flex; gap: var(--space-3); padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-subtle); margin-bottom: var(--space-2);
}
.tp-qa-slide-group { display: flex; flex-direction: column; }
.tp-qa-slide-heading {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted);
  padding: var(--space-3) 0 var(--space-2);
}
.tp-qa-item {
  display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-2) var(--space-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.tp-qa-item:hover { background: var(--bg-elevated); }
.tp-qa-item input[type=checkbox] { margin-top: 2px; flex-shrink: 0; accent-color: var(--teal-bright); }
.tp-qa-item-text { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.tp-qa-item-tag {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  padding: 1px 5px; border-radius: 3px; flex-shrink: 0; margin-top: 2px;
}
.tp-qa-item-tag.tag-q { background: rgba(96,165,250,0.15); color: #60a5fa; }
.tp-qa-item-tag.tag-o { background: rgba(245,158,11,0.15); color: #f59e0b; }
.speed-dots { display: flex; gap: 4px; align-items: center; }
.tp-speed-label { font-size: 11px; color: var(--text-muted); margin-left: 4px; white-space: nowrap; }
.speed-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border-medium); cursor: pointer;
  transition: background 0.15s;
}
.speed-dot.on { background: var(--teal-bright); }

/* ── Flashcard ─────────────────────────────────────────────────── */
.flashcard-wrap {
  flex: 1; display: flex; flex-direction: column;
  padding: var(--space-4); gap: var(--space-4);
  max-width: 800px; margin: 0 auto; width: 100%;
}
.flashcard-zone {
  position: relative; cursor: pointer;
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border-subtle);
}
.flashcard-blurred {
  padding: var(--space-4); font-size: 14px; line-height: 1.7;
  color: var(--text-secondary); background: var(--bg-elevated);
  transition: filter 0.4s ease, opacity 0.4s ease;
  filter: blur(6px); opacity: 0.3; user-select: none;
  min-height: 80px;
}
.flashcard-blurred.revealed { filter: blur(0); opacity: 1; user-select: text; }
.flashcard-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  letter-spacing: 0.3px;
}
.flashcard-blurred.revealed + .flashcard-overlay { display: none; }

/* ── Guided run-through ────────────────────────────────────────── */
.guided-wrap {
  flex: 1; display: flex;
  padding: var(--space-4); gap: var(--space-4);
  overflow: hidden;
}
.guided-left  { width: 400px; flex-shrink: 0; overflow-y: auto; }
.guided-right { flex: 1; display: flex; flex-direction: column; gap: var(--space-4); overflow-y: auto; }

.qa-prompt-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-5);
}
.qa-prompt-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.qa-prompt-text  { font-size: 16px; font-weight: 600; color: var(--text-primary); line-height: 1.5; }
.qa-answer-text  { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

.guided-complete {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: var(--space-8);
}
.guided-complete-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  text-align: center;
  max-width: 400px;
  display: flex; flex-direction: column; gap: var(--space-4);
}

/* ── Settings panel internals ──────────────────────────────────── */
.settings-section { display: flex; flex-direction: column; gap: var(--space-2); }
.settings-title   { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.settings-desc    { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ── Deck title in header ──────────────────────────────────────── */
#deck-title-display {
  font-size: 14px; font-weight: 600; color: var(--text-primary);
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#app-title {
  font-size: 14px; font-weight: 700; color: var(--teal-bright); white-space: nowrap;
}

/* ── Generating / empty states ─────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--space-3); padding: var(--space-6);
  color: var(--text-faint); font-size: 13px; text-align: center;
}
.spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--border-medium);
  border-top-color: var(--teal-bright);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block; flex-shrink: 0;
}

/* ── Animations ────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes savePulse {
  0%, 100% { border-color: var(--border-medium); }
  50%       { border-color: var(--teal-bright); box-shadow: 0 0 8px var(--teal-glow); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.2s ease-out; }

/* ── Session Analysis Overlay ──────────────────────────────────── */
.analysis-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(11,14,20,0.92);
  display: flex; align-items: flex-start; justify-content: center;
  padding: var(--space-6);
  overflow-y: auto;
}
.analysis-panel {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl); padding: var(--space-6);
  width: 100%; max-width: 860px;
  display: flex; flex-direction: column; gap: var(--space-4);
}
.analysis-header {
  display: flex; align-items: center; justify-content: space-between;
}
.analysis-score {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-4); background: var(--bg-base);
  border-radius: var(--radius-md);
}
.score-ring {
  font-size: 36px; font-weight: 800; color: var(--teal-bright);
  min-width: 80px; text-align: center;
}
.score-ring span { font-size: 16px; color: var(--text-muted); }
.score-meta { display: flex; flex-direction: column; gap: 4px; font-size: 16px; font-weight: 600; }
.analysis-summary { font-size: 14px; line-height: 1.6; color: var(--text-secondary); }
.analysis-fillers { display: flex; flex-wrap: wrap; gap: 6px; }
.filler-tag {
  font-size: 12px; background: rgba(251,191,36,0.12); color: var(--amber);
  border-radius: 4px; padding: 2px 8px;
}
.analysis-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
}
.analysis-table th, .analysis-table td {
  text-align: left; padding: 6px 10px;
  border-bottom: 1px solid var(--border-subtle);
}
.analysis-table th { color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.missed-list { margin: 0; padding-left: 14px; color: var(--amber); }
.analysis-transcript {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
  background: var(--bg-base); border-radius: var(--radius-md);
  padding: var(--space-3); max-height: 200px; overflow-y: auto;
  white-space: pre-wrap; word-break: break-word; margin-top: 6px;
}

/* ── Presenter Brief ─────────────────────────────────────────────── */
#presenter-brief-wrap {
  border-bottom: 1px solid var(--border-subtle);
}
#presenter-brief-wrap .collapsible-header {
  padding: var(--space-3) var(--space-3);
}
.presenter-brief-content {
  padding: 0 var(--space-3) var(--space-3);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.presenter-brief-content strong {
  color: var(--teal-bright);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin: 8px 0 4px;
}
.presenter-brief-content strong:first-child { margin-top: 0; }
.presenter-brief-content ul, .presenter-brief-content ol {
  padding-left: 14px; margin: 0 0 6px;
}
.presenter-brief-content li { margin-bottom: 3px; }
.presenter-brief-content p { margin: 0 0 6px; }

/* ── Slide search palette ────────────────────────────────────────── */
#slide-search-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 15vh;
}
.slide-search-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  width: 560px; max-width: 95vw;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  overflow: hidden;
}
.slide-search-input-wrap {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}
.slide-search-icon { font-size: 18px; color: var(--text-muted); flex-shrink: 0; }
#slide-search-input {
  flex: 1; background: none; border: none; outline: none;
  font-size: 16px; color: var(--text-primary); font-family: var(--font-sans);
}
#slide-search-input::placeholder { color: var(--text-muted); }
.slide-search-esc {
  font-size: 11px; color: var(--text-muted);
  border: 1px solid var(--border-medium); border-radius: 4px; padding: 2px 6px;
}
.slide-search-results {
  max-height: 360px; overflow-y: auto;
  padding: var(--space-2) 0;
}
.slide-search-result {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  cursor: pointer; transition: background 0.1s;
}
.slide-search-result:hover,
.slide-search-result.active {
  background: var(--bg-elevated);
}
.slide-search-thumb {
  width: 48px; height: 32px; object-fit: cover;
  border-radius: 3px; flex-shrink: 0;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}
.slide-search-num {
  font-size: 11px; color: var(--text-muted); white-space: nowrap; width: 44px; flex-shrink: 0;
}
.slide-search-title { font-size: 13px; color: var(--text-primary); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slide-search-title mark { background: none; color: var(--teal-bright); font-weight: 700; }
.slide-search-empty { padding: var(--space-5) var(--space-4); color: var(--text-muted); font-size: 13px; text-align: center; }

/* ── Hotkey help overlay ─────────────────────────────────────────── */
.hotkey-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.hotkey-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  width: 680px; max-width: 95vw; max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.hotkey-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 15px; font-weight: 700; color: var(--text-primary);
}
.hotkey-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--space-5); padding: var(--space-5);
}
.hotkey-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--teal-bright);
  margin-bottom: var(--space-3);
}
.hotkey-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-secondary);
  margin-bottom: var(--space-2);
}
.hotkey-row span { margin-left: 4px; }
kbd {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 2px 6px; min-width: 22px;
  white-space: nowrap;
}

/* ── Modal overlay / dialog ────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.12s ease;
}
.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 24px;
  min-width: 320px; max-width: 440px; width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: slideUp 0.14s ease;
}
.modal-title {
  font-size: 15px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 10px;
}
.modal-body {
  font-size: 13px; color: var(--text-secondary); line-height: 1.5;
  margin-bottom: 16px;
}
.modal-field {
  margin-bottom: 16px;
}
.modal-label {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px;
  margin-bottom: 6px;
}
.modal-footer {
  display: flex; gap: 8px; justify-content: flex-end;
}

/* ── Toast ──────────────────────────────────────────────────────── */
.app-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(16px);
  z-index: 1300; padding: 10px 20px;
  border-radius: var(--radius-md); font-size: 13px; font-weight: 500;
  pointer-events: none; opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.app-toast-visible {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
.app-toast-error {
  background: var(--bg-elevated); border: 1px solid var(--red);
  color: var(--red);
}
.app-toast-success {
  background: var(--bg-elevated); border: 1px solid var(--teal-bright);
  color: var(--teal-bright);
}
.app-toast-info {
  background: var(--bg-elevated); border: 1px solid var(--border-medium);
  color: var(--text-secondary);
}

@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Presenter Brief Cards ─────────────────────────────────────── */
.brief-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  max-width: 1100px;
  margin: 0 auto;
}
.brief-grid-full { grid-column: 1 / -1; }

.brief-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.brief-card:hover { border-color: var(--border-medium); }

.brief-card-header {
  display: flex; align-items: center; gap: var(--space-2);
  margin-bottom: var(--space-1);
}
.brief-card-icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  background: var(--teal-dim);
  color: var(--teal-bright);
  flex-shrink: 0;
}
.brief-card-icon svg { display: block; }
.brief-card-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--teal-bright);
}

.brief-narrative {
  font-size: 14px; color: var(--text-primary); line-height: 1.7;
  font-style: italic;
}
.brief-hook-close {
  font-size: 13px; color: var(--text-secondary); line-height: 1.6;
}

.brief-list {
  list-style: none; display: flex; flex-direction: column; gap: var(--space-2);
  padding: 0; margin: 0;
}
.brief-list li {
  display: flex; align-items: flex-start; gap: var(--space-2);
  font-size: 13px; color: var(--text-secondary); line-height: 1.5;
}
.brief-list li::before {
  content: '→'; color: var(--teal-bright); flex-shrink: 0; font-weight: 700;
  margin-top: 1px;
}
.brief-list.concerns li::before { content: '⚠'; color: var(--amber); }

.brief-delivery {
  font-size: 13px; color: var(--text-secondary); line-height: 1.7;
}

/* Story map */
.brief-story-map {
  display: flex; flex-direction: column; gap: 0;
}
.brief-story-slide {
  display: grid;
  grid-template-columns: 48px 28px 1fr;
  gap: 0 var(--space-3);
  position: relative;
}
.brief-story-slide + .brief-story-slide { margin-top: 2px; }
.brief-story-num {
  font-size: 11px; font-weight: 600; color: var(--text-faint);
  text-align: right; padding-top: 10px; grid-column: 1;
}
.brief-story-dot-col {
  display: flex; flex-direction: column; align-items: center;
  grid-column: 2;
}
.brief-story-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--teal-bright); flex-shrink: 0;
  margin-top: 9px; z-index: 1;
  transition: transform 0.15s;
}
.brief-story-slide:hover .brief-story-dot { transform: scale(1.4); }
.brief-story-line {
  flex: 1; width: 2px; background: var(--border-subtle);
}
.brief-story-slide:last-child .brief-story-line { display: none; }
.brief-story-content {
  grid-column: 3; padding: var(--space-2) 0 var(--space-3);
}
.brief-story-title {
  font-size: 13px; font-weight: 600; color: var(--text-primary);
  margin-bottom: 2px;
}
.brief-story-role {
  display: inline-block;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--teal-bright);
  background: var(--teal-dim); border-radius: 3px; padding: 1px 5px;
  margin-bottom: 4px;
}
.brief-story-moment {
  font-size: 12px; color: var(--text-muted); line-height: 1.5;
}

/* Role color variants */
.role-opens         { color: var(--teal-bright); background: var(--teal-dim); }
.role-closes        { color: var(--teal-bright); background: var(--teal-dim); }
.role-key-proof     { color: #a78bfa; background: rgba(167,139,250,0.12); }
.role-call-to-action { color: #f59e0b; background: rgba(245,158,11,0.12); }
.role-addresses-risk { color: #f87171; background: rgba(248,113,113,0.12); }
.role-transition    { color: var(--text-muted); background: var(--bg-elevated); }

/* Dot colors by role */
.brief-story-slide[data-role="Key Proof"] .brief-story-dot    { background: #a78bfa; }
.brief-story-slide[data-role="Call to Action"] .brief-story-dot { background: #f59e0b; }
.brief-story-slide[data-role="Addresses Risk"] .brief-story-dot { background: #f87171; }
.brief-story-slide[data-role="Transition"] .brief-story-dot   { background: var(--border-medium); }
.brief-story-slide[data-role="Closes"] .brief-story-dot       { background: var(--teal-bright); }

/* ── Timed mode badge ──────────────────────────────────────────── */
.timed-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(94,234,212,0.12);
  border: 1px solid rgba(94,234,212,0.35);
  color: var(--teal-bright);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.timed-badge:hover { background: rgba(94,234,212,0.2); }

/* ── Set List view ─────────────────────────────────────────────── */
.setlist-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  gap: 0;
}

.setlist-picker-col {
  flex: 0 0 300px;
  min-width: 220px;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-subtle);
  overflow: hidden;
}

.setlist-plan-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.setlist-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  flex-shrink: 0;
}

.setlist-col-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Picker */
.sl-all-slides {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-2) 0;
}

.sl-pick-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 6px var(--space-4);
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid var(--border-subtle);
}
.sl-pick-row:hover { background: var(--bg-elevated); }
.sl-pick-row.selected { background: var(--teal-dim); }

.sl-pick-thumb {
  width: 48px;
  height: 34px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  flex-shrink: 0;
}
.sl-pick-thumb-empty {
  width: 48px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-faint);
  flex-shrink: 0;
}

.sl-pick-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sl-pick-num { font-size: 11px; color: var(--text-muted); }
.sl-pick-title { font-size: 12px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-pick-check { font-size: 14px; color: var(--teal-bright); width: 16px; flex-shrink: 0; }

/* Time row */
.sl-time-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  flex-wrap: wrap;
  background: var(--bg-surface);
}
.sl-time-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 600;
}
.sl-time-input {
  width: 56px;
  padding: 4px 8px;
  font-size: 13px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  text-align: center;
}
.sl-time-input:focus { outline: none; border-color: var(--teal-bright); }
.sl-time-sep { font-size: 12px; color: var(--text-muted); }

/* Set slides */
.sl-set-slides {
  flex: 0 0 auto;
  max-height: 280px;
  overflow-y: auto;
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}

.sl-set-meta {
  font-size: 11px;
  color: var(--text-muted);
  padding: 4px 0 8px;
}

.sl-set-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 5px 0;
  border-bottom: 1px solid var(--border-subtle);
  cursor: grab;
  transition: opacity 0.15s;
}
.sl-set-row:last-child { border-bottom: none; }
.sl-set-row.dragging { opacity: 0.4; }

.sl-drag-handle {
  color: var(--text-faint);
  font-size: 14px;
  cursor: grab;
  padding: 0 2px;
  flex-shrink: 0;
}

.sl-set-thumb {
  width: 36px;
  height: 26px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  flex-shrink: 0;
}
.sl-set-thumb-empty {
  width: 36px;
  height: 26px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-faint);
  flex-shrink: 0;
}
.sl-set-info { flex: 1; min-width: 0; }
.sl-set-num { font-size: 10px; color: var(--text-muted); display: block; }
.sl-set-title { font-size: 12px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.sl-set-time { font-size: 11px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.sl-remove-btn { color: var(--text-faint); font-size: 16px; padding: 2px 6px; flex-shrink: 0; }
.sl-remove-btn:hover { color: var(--red); }

/* Plan output */
.sl-plan-output {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
}

.sl-plan-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}
.sl-plan-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.sl-plan-total {
  font-size: 12px;
  color: var(--text-muted);
}
.sl-plan-summary {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--teal-bright);
  margin-bottom: var(--space-4);
}

.sl-plan-group { margin-bottom: var(--space-4); }
.sl-plan-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.sl-plan-slide {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.sl-plan-slide:last-child { border-bottom: none; }

.sl-plan-priority {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}
.priority-must {
  background: rgba(94,234,212,0.12);
  border: 1px solid rgba(94,234,212,0.3);
  color: var(--teal-bright);
}
.priority-brief {
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.3);
  color: var(--amber);
}
.priority-cut {
  background: rgba(156,163,175,0.08);
  border: 1px solid var(--border-medium);
  color: var(--text-faint);
}

.sl-plan-slide-info { flex: 1; min-width: 0; }
.sl-plan-slide-num { font-size: 11px; color: var(--text-muted); display: block; }
.sl-plan-slide-title { font-size: 13px; color: var(--text-primary); display: block; margin-bottom: 2px; }
.sl-plan-slide-rationale { font-size: 12px; color: var(--text-muted); font-style: italic; display: block; }
.sl-plan-alloc { font-size: 12px; color: var(--text-muted); flex-shrink: 0; white-space: nowrap; padding-top: 2px; }

.sl-plan-timed-row {
  margin-top: var(--space-5);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
}
.sl-timed-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}
.sl-timed-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--teal-bright);
  cursor: pointer;
}

.sl-empty {
  font-size: 13px;
  color: var(--text-muted);
  padding: var(--space-4) 0;
  text-align: center;
}
