/* ========================================================================
   COMPREHENSION PROTOCOL
   ======================================================================== */
#comprehension-area {
  margin-top: 1rem;
}
.comp-level-tabs {
  display: flex; gap: 0.25rem; overflow-x: auto; padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}
.comp-tab {
  flex: 0 0 auto; padding: 0.35rem 0.7rem; border: 1px solid var(--border);
  border-radius: 99px; font-size: 0.75rem; font-weight: 600; background: var(--card-bg);
  color: var(--muted); cursor: pointer; white-space: nowrap; transition: all 0.15s;
}
.comp-tab.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.comp-tab.has-progress {
  border-color: var(--success);
}
.comp-tab.completed {
  background: #dcfce7; color: var(--success); border-color: var(--success);
}
.comp-progress-row {
  text-align: center; margin-bottom: 0.5rem;
}
.comp-question-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem; margin-bottom: 0.75rem;
}
.comp-question-text {
  font-size: 1rem; line-height: 1.5; margin-bottom: 0.75rem; white-space: pre-line;
}
.comp-textarea {
  width: 100%; padding: 0.6rem; border: 1px solid var(--border); border-radius: 6px;
  font-size: 0.95rem; font-family: inherit; resize: vertical; margin-bottom: 0.5rem;
}
.comp-textarea:focus { border-color: var(--primary); outline: none; }
#comp-choices {
  display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.75rem;
}
.comp-choice-btn {
  display: block; width: 100%; text-align: left; padding: 0.6rem 0.8rem;
  border: 1px solid var(--border); border-radius: 6px; background: var(--card-bg);
  font-size: 0.9rem; cursor: pointer; transition: all 0.15s;
}
.comp-choice-btn:hover { border-color: var(--primary); background: #eff6ff; }
.comp-choice-btn.selected { border-color: var(--primary); background: #dbeafe; font-weight: 600; }
.comp-choice-btn.correct { border-color: var(--success); background: #dcfce7; }
.comp-choice-btn.wrong { border-color: var(--danger); background: #fee2e2; }
.comp-submit-btn {
  display: block; width: 100%; padding: 0.6rem; background: var(--primary); color: #fff;
  border: none; border-radius: 6px; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: background 0.15s;
}
.comp-submit-btn:hover { background: var(--primary-hover); }
.comp-submit-btn:disabled { opacity: 0.5; cursor: default; }
.comp-feedback {
  margin-top: 0.5rem; padding: 0.6rem; border-radius: 6px;
  font-size: 0.9rem; line-height: 1.4;
}
.comp-feedback.correct { background: #dcfce7; color: #166534; }
.comp-feedback.wrong { background: #fef9c3; color: #854d0e; }
.comp-nav {
  display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 0.75rem;
}
.comp-nav-btn {
  padding: 0.3rem 0.8rem; border: 1px solid var(--border); border-radius: 6px;
  background: var(--card-bg); font-size: 1rem; cursor: pointer;
}
.comp-nav-btn:hover { border-color: var(--primary); }
.comp-q-counter { font-size: 0.85rem; color: var(--muted); }
.comp-empty {
  text-align: center; padding: 1.5rem; color: var(--muted); font-size: 0.9rem;
}

/* ========================================================================
   SCENE TIMELINE
   ======================================================================== */
.scene-timeline {
  display: flex; gap: 2px; margin-bottom: 0.75rem; height: 8px;
}
.scene-chunk {
  flex-grow: 1;
  background: #e5e7eb; border-radius: 2px; cursor: pointer;
  transition: background 0.2s; position: relative;
}
.scene-chunk:hover { background: #9ca3af; }
.scene-chunk.active { background: var(--primary); }
.scene-chunk.watched { background: #93c5fd; }
.scene-label {
  display: none; position: absolute; top: -20px; left: 50%;
  transform: translateX(-50%); font-size: 0.65rem; font-weight: 700;
  color: var(--muted); background: var(--card-bg); padding: 1px 4px;
  border-radius: 3px; white-space: nowrap; pointer-events: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.scene-chunk:hover .scene-label { display: block; }

/* ========================================================================
   TAPPABLE WORDS (Level 5)
   ======================================================================== */
.tap-word {
  cursor: pointer; transition: all 0.15s; padding: 0 2px;
  border-radius: 3px; display: inline;
}
.tap-word:hover { background: rgba(255,255,255,0.2); }
.hidden-word {
  background: rgba(255,255,255,0.15); color: transparent;
  min-width: 40px; display: inline-block;
  border-bottom: 2px solid rgba(255,255,255,0.4);
}
.tap-instruction {
  text-align: center; padding: 0.4rem 0.6rem; font-size: 0.8rem;
  color: var(--muted); font-style: italic; margin-bottom: 0.5rem;
}

