/* ========================================================
   STUDY:NLINK // M1-2 [중1-2 중간고사 시험 범위 정복]
   Dark Futuristic Neomorphism & Cyberpunk Gamification Theme
   ======================================================== */

:root {
  --bg-deep: #060911;
  --bg-card: rgba(14, 20, 36, 0.75);
  --bg-card-hover: rgba(22, 32, 58, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 240, 255, 0.3);

  --accent-cyan: #00f0ff;
  --accent-pink: #ff007a;
  --accent-green: #00ff88;
  --accent-amber: #ffb800;
  --accent-purple: #9d4edd;

  --text-primary: #f0f4fc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --font-main: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

input, textarea, [contenteditable="true"], .selectable, .selectable-text {
  -webkit-user-select: text;
  user-select: text;
}

/* Ambient Background Glow */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}
.glow-cyan {
  width: 500px;
  height: 500px;
  top: -150px;
  left: -100px;
  background: radial-gradient(circle, var(--accent-cyan), transparent 70%);
}
.glow-pink {
  width: 450px;
  height: 450px;
  top: 30%;
  right: -120px;
  background: radial-gradient(circle, var(--accent-pink), transparent 70%);
}
.glow-green {
  width: 500px;
  height: 500px;
  bottom: -150px;
  left: 20%;
  background: radial-gradient(circle, var(--accent-green), transparent 70%);
}

.layout-container {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 16px 80px;
}

/* Header */
.hub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-symbol {
  font-size: 26px;
}
.brand-title {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}
.brand-title .accent-dot {
  color: var(--accent-cyan);
}
.brand-sub {
  font-size: 11px;
  color: var(--accent-amber);
  font-weight: 600;
  letter-spacing: 1px;
  display: block;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-header-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}
.btn-header-action:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-cyan);
}

/* Hero Section */
.hero-banner {
  text-align: center;
  padding: 24px 16px 28px;
  margin-bottom: 24px;
  background: linear-gradient(180deg, rgba(0, 240, 255, 0.08) 0%, rgba(14, 20, 36, 0.4) 100%);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 240, 255, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}
.hero-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.gradient-text {
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-desc {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto;
}

/* Navigation Tabs: [공부하기] vs [시험보기] */
.mode-tabs-container {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.mode-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}
.mode-tab-btn .tab-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
}
.mode-tab-btn.active {
  color: #fff;
  border-color: var(--accent-cyan);
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.18) 0%, rgba(14, 20, 36, 0.9) 100%);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.25);
}
.mode-tab-btn.active .tab-badge {
  background: var(--accent-cyan);
  color: #060911;
  font-weight: 800;
}

/* Subject Selector & Chips Bar */
.subject-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.subject-chips-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.subject-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.subject-chip-btn {
  flex: 1;
  min-width: 170px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition-fast);
}
.subject-btn:hover,
.subject-chip-btn:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
}
.subject-btn.active,
.subject-chip-btn.active {
  border-color: var(--sub-color, var(--accent-cyan));
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(14, 20, 36, 0.95));
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), 0 0 16px rgba(0, 240, 255, 0.15);
}
.sub-icon {
  font-size: 22px;
  margin-bottom: 4px;
}
.subject-chip-btn .sub-icon {
  font-size: 24px;
  margin-bottom: 0;
  flex-shrink: 0;
}
.chip-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  overflow: hidden;
}
.chip-text-wrap .sub-name {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
}
.chip-school-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-amber);
  white-space: nowrap;
  letter-spacing: -0.2px;
}
.sub-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.sub-meta {
  font-size: 11px;
  color: var(--text-muted);
}
.sub-scope {
  font-size: 11px;
  color: var(--accent-amber);
  font-weight: 600;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================================================
   SECTION: STUDY NOTES VIEW (공부하기 뷰)
   ======================================================== */
.study-view-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.scope-header-box {
  background: rgba(255, 184, 0, 0.08);
  border: 1px solid rgba(255, 184, 0, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.scope-header-title {
  font-size: 14px;
  color: var(--accent-amber);
  font-weight: 700;
}
.scope-header-desc {
  font-size: 13px;
  color: var(--text-primary);
}

.unit-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(12px);
  transition: var(--transition-fast);
}
.unit-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}
.unit-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}
.unit-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.unit-page-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  color: var(--accent-cyan);
}

.unit-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.unit-bullets li {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  position: relative;
  padding-left: 18px;
}
.unit-bullets li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--accent-cyan);
  font-size: 18px;
  line-height: 1.2;
}
.unit-bullets strong {
  color: #fff;
  font-weight: 700;
}

.unit-tip-box {
  background: rgba(0, 240, 255, 0.06);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--accent-cyan);
  font-weight: 600;
}

/* ========================================================
   SECTION: EXAM VIEW (시험보기 뷰)
   ======================================================== */
.exam-view-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Exam Sub-mode Selector */
.exam-type-bar {
  display: flex;
  gap: 10px;
  background: var(--bg-card);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}
.exam-type-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.exam-type-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.exam-type-btn.active.type-sub {
  background: rgba(255, 0, 122, 0.2);
  color: var(--accent-pink);
  border: 1px solid rgba(255, 0, 122, 0.4);
}

/* Exam Dashboard / Status Bar */
.exam-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.exam-progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  max-width: 320px;
}
.progress-bar-bg {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-pink));
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}
.exam-score-box {
  display: flex;
  gap: 14px;
}
.score-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.score-correct {
  color: var(--accent-green);
}
.score-wrong {
  color: var(--accent-pink);
}

/* Question Active Card */
.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  overflow: hidden;
}
.question-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-pink), var(--accent-green));
}

.question-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.q-type-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}
.badge-sub {
  background: rgba(255, 0, 122, 0.2);
  color: var(--accent-pink);
  border: 1px solid rgba(255, 0, 122, 0.4);
}
.badge-choice {
  background: rgba(0, 240, 255, 0.2);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.4);
}
.q-page-tag {
  font-size: 12px;
  color: var(--accent-amber);
  font-weight: 600;
}

.question-text {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.55;
  color: #fff;
  white-space: pre-line;
}

/* Subjective (직접 단어 쓰기) Input Area */
.input-answer-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.input-row {
  display: flex;
  gap: 10px;
}
.answer-input {
  flex: 1;
  background: rgba(10, 14, 26, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  outline: none;
  transition: var(--transition-fast);
}
.answer-input:focus {
  border-color: var(--accent-pink);
  box-shadow: 0 0 15px rgba(255, 0, 122, 0.3);
}
.btn-submit-answer {
  background: linear-gradient(135deg, var(--accent-pink), #b00055);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0 24px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-submit-answer:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 0, 122, 0.4);
}

/* Hint Accordion / Button */
.hint-container {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-hint {
  background: rgba(255, 184, 0, 0.12);
  border: 1px solid rgba(255, 184, 0, 0.3);
  color: var(--accent-amber);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-hint:hover {
  background: rgba(255, 184, 0, 0.22);
}
.hint-text {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-amber);
  letter-spacing: 2px;
  display: none;
}
.hint-text.visible {
  display: inline-block;
  animation: fadeIn 0.2s ease;
}

/* Multiple Choice Option Buttons */
.options-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.option-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  text-align: left;
  font-size: 15px;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 12px;
}
.option-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateX(4px);
}
.option-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-secondary);
}

/* Feedback / Result Card */
.feedback-box {
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: none;
  flex-direction: column;
  gap: 10px;
  animation: slideUp 0.25s ease;
}
.feedback-box.correct {
  display: flex;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.4);
}
.feedback-box.wrong {
  display: flex;
  background: rgba(255, 0, 122, 0.1);
  border: 1px solid rgba(255, 0, 122, 0.4);
}
.feedback-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
}
.feedback-box.correct .feedback-head {
  color: var(--accent-green);
}
.feedback-box.wrong .feedback-head {
  color: var(--accent-pink);
}
.feedback-explanation {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
}
.btn-next-question {
  align-self: flex-end;
  background: #fff;
  color: #060911;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}
.btn-next-question:hover {
  background: var(--accent-cyan);
  transform: translateX(2px);
}

/* Exam Complete Screen */
.result-screen-card {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.result-badge-icon {
  font-size: 64px;
}
.result-title {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
}
.result-score-display {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 800;
  color: var(--accent-cyan);
  text-shadow: 0 0 25px rgba(0, 240, 255, 0.5);
}
.result-subtext {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 480px;
}
.result-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}
.btn-retry {
  background: linear-gradient(135deg, var(--accent-cyan), #0099cc);
  color: #060911;
  font-weight: 800;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 24px;
  font-size: 15px;
  cursor: pointer;
}
.btn-to-study {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 24px;
  font-size: 15px;
  cursor: pointer;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .layout-container {
    padding: 12px 10px 60px;
  }
  .hero-title {
    font-size: 21px;
  }
  .subject-selector {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .question-card {
    padding: 18px 14px;
  }
  .question-text {
    font-size: 16px;
  }
  .input-row {
    flex-direction: column;
  }
  .btn-submit-answer {
    padding: 12px;
    justify-content: center;
  }
}

/* ========================================================
   SECTION: VISUAL LAB (인터랙티브 실험실 스타일)
   ======================================================== */
.lab-view-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lab-panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}
.lab-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}
.lab-panel-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lab-tag {
  background: rgba(0, 240, 255, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}

/* Canvas Display */
.sim-canvas-wrap {
  width: 100%;
  height: 380px;
  background: #090e1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  margin-bottom: 18px;
}
.sim-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Controls Grid */
.lab-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.control-group {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.control-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.control-value {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}
.sim-slider {
  width: 100%;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

/* Live Indicators */
.gauge-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.gauge-chip {
  flex: 1;
  min-width: 140px;
  background: rgba(14, 20, 36, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gauge-title {
  font-size: 11px;
  color: var(--text-muted);
}
.gauge-val {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.lab-summary-box {
  background: rgba(0, 240, 255, 0.06);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
}

/* Social Sandbox Specifics */
.climate-select-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.climate-select-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: var(--transition-fast);
}
.climate-select-btn.active {
  background: rgba(0, 255, 136, 0.15);
  border-color: var(--accent-green);
  color: #fff;
}
.soc-scene-box {
  width: 100%;
  height: 180px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 16px;
  transition: background 0.4s ease;
}
.builder-actions-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
}
.builder-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}
.builder-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-build-choice {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-build-choice:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--accent-green);
}
.soc-result-box {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.6;
}
.soc-result-box.success {
  background: rgba(0, 255, 136, 0.12);
  border: 1px solid rgba(0, 255, 136, 0.4);
  color: #fff;
}
.soc-result-box.fail {
  background: rgba(255, 0, 122, 0.12);
  border: 1px solid rgba(255, 0, 122, 0.4);
  color: #fff;
}

/* ========================================================
   SECTION: ACTIVE RECALL & MEMORY BOOST INTERACTIVES
   (블라인드 탭-투-리빌, 3D 플립 카드, 뇌새김 기억력 게이지)
   ======================================================== */

/* 1. Blind Mode (Tap to Reveal) */
.blind-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.btn-blind-toggle {
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: var(--accent-cyan);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}
.btn-blind-toggle:hover {
  background: rgba(0, 240, 255, 0.25);
  transform: translateY(-1px);
}
.btn-blind-toggle.active {
  background: linear-gradient(135deg, var(--accent-pink), #b00055);
  border-color: var(--accent-pink);
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 0, 122, 0.35);
}

/* When blind mode is active, strong keywords are blurred */
.blind-active .unit-bullets strong {
  filter: blur(5.5px);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 0 4px;
  cursor: pointer;
  user-select: none;
  transition: filter 0.2s ease, background 0.2s ease;
  position: relative;
}
.blind-active .unit-bullets strong:hover {
  filter: blur(3px);
  background: rgba(0, 240, 255, 0.15);
}
.blind-active .unit-bullets strong.revealed {
  filter: none !important;
  background: rgba(0, 240, 255, 0.22) !important;
  color: #fff !important;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

/* 2. 3D Flip Flashcards Section */
.flipcards-section {
  margin-bottom: 24px;
}
.flipcards-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.flipcards-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}
.flipcards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.flip-card {
  height: 170px;
  perspective: 1000px;
  cursor: pointer;
}
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  border-radius: var(--radius-md);
}
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}
.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius-md);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}
.flip-card-front {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(14, 20, 36, 0.9));
  border: 1px solid var(--border-glow);
  color: #fff;
}
.flip-card-back {
  background: linear-gradient(145deg, rgba(0, 240, 255, 0.15), rgba(14, 20, 36, 0.95));
  border: 1px solid var(--accent-cyan);
  transform: rotateY(180deg);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}
.flip-tag {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-amber);
}
.flip-question {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  color: #f1f5f9;
}
.flip-answer {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  color: #fff;
}
.flip-hint-btn {
  font-size: 11px;
  color: var(--text-muted);
}

/* 3. Memory Self-Checklist & Gauge */
.memory-gauge-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}
.memory-gauge-bar {
  flex: 1;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}
.memory-gauge-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
  border-radius: 999px;
  transition: width 0.3s ease;
}
.unit-checklist-box {
  background: rgba(0, 255, 136, 0.04);
  border: 1px dashed rgba(0, 255, 136, 0.25);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-top: 14px;
}
.checklist-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-green);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.check-item-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: var(--transition-fast);
}
.check-item-label:hover {
  color: #fff;
}
.check-item-label input[type="checkbox"] {
  accent-color: var(--accent-green);
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.check-item-label.checked {
  color: #fff;
  font-weight: 600;
  text-decoration: line-through;
  text-decoration-color: var(--accent-green);
}

/* ========================================================
   APP UPDATE TOAST NOTIFICATION (스마트 비침해 업데이트 알림)
   ======================================================== */
.update-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  max-width: 440px;
  width: calc(100vw - 32px);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 240, 255, 0.45);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 240, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toastSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.update-toast-icon {
  font-size: 24px;
  flex-shrink: 0;
  animation: rocketPulse 2s infinite ease-in-out;
}

@keyframes rocketPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.update-toast-content {
  flex: 1;
  min-width: 0;
}

.update-toast-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 3px;
}

.update-toast-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.3;
}

.update-toast-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-toast-reload {
  background: linear-gradient(135deg, var(--accent-cyan), #0284c7);
  color: #000;
  border: none;
  font-weight: 800;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
  box-shadow: 0 4px 12px rgba(0, 240, 255, 0.3);
}

.btn-toast-reload:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 240, 255, 0.5);
}

.btn-toast-dismiss {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 15px;
  padding: 6px;
  cursor: pointer;
  border-radius: 4px;
  transition: var(--transition-fast);
}

.btn-toast-dismiss:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 600px) {
  .update-toast {
    bottom: 16px;
    right: 16px;
    left: 16px;
    width: auto;
    max-width: none;
  }
}

/* ========================================================
   SCOPE CONTROL BAR & MODAL STYLES (맞춤 시험 범위 선택기)
   ======================================================== */

.scope-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(135deg, rgba(14, 20, 36, 0.9), rgba(20, 30, 55, 0.85));
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 22px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 0 15px rgba(0, 240, 255, 0.05);
}

.scope-info-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.scope-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--accent-cyan);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  letter-spacing: -0.3px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulseGreen 1.8s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.scope-details {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scope-summary-text {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 600;
}

.btn-scope-setup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(255, 0, 122, 0.15));
  border: 1px solid var(--accent-cyan);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
  box-shadow: 0 2px 10px rgba(0, 240, 255, 0.2);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn-scope-setup * {
  pointer-events: none;
}

.btn-scope-setup:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.28), rgba(255, 0, 122, 0.28));
  box-shadow: 0 4px 16px rgba(0, 240, 255, 0.4);
}

.scope-count-pill {
  background: var(--accent-pink);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

/* Modal Backdrop & Dialog */
.scope-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 1 !important;
}

.scope-modal-dialog {
  background: #0d1322;
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 660px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 240, 255, 0.15);
  overflow: hidden;
  animation: modalScaleUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.scope-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(14, 20, 36, 0.6);
}

.modal-title-wrap h3 {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-title-wrap p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* Presets Bar */
.scope-presets-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 12px 22px;
  background: rgba(8, 12, 24, 0.7);
  border-bottom: 1px solid var(--border-subtle);
}

.preset-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 2px;
}

.btn-preset {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-preset:hover {
  background: rgba(0, 240, 255, 0.12);
  color: var(--accent-cyan);
  border-color: rgba(0, 240, 255, 0.3);
}

.btn-preset.active {
  background: rgba(0, 240, 255, 0.2);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  font-weight: 700;
}

/* Modal Subject Tabs */
.modal-subject-tabs {
  display: flex;
  padding: 10px 22px 0;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-sub-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-sub-tab:hover {
  color: var(--text-primary);
}

.modal-sub-tab.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
}

/* Units List */
.scope-units-list {
  padding: 16px 22px;
  overflow-y: auto;
  max-height: 380px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.unit-check-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(18, 25, 45, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
}

.unit-check-card:hover {
  background: rgba(24, 34, 62, 0.85);
  border-color: rgba(0, 240, 255, 0.3);
}

.unit-check-card.checked {
  background: rgba(0, 240, 255, 0.08);
  border-color: var(--accent-cyan);
  box-shadow: inset 0 0 12px rgba(0, 240, 255, 0.05);
}

.unit-check-card.school-recommended {
  border-left: 3px solid var(--accent-amber);
}

.unit-card-page-badge {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.35);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  letter-spacing: -0.2px;
  flex-shrink: 0;
}

.scope-list-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 16px 0 10px;
  text-align: center;
}

.scope-list-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 184, 0, 0.4), transparent);
}

.scope-list-divider span {
  position: relative;
  background: #0f1629;
  border: 1px dashed rgba(255, 184, 0, 0.4);
  color: var(--accent-amber);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: var(--radius-full);
}

.unit-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.unit-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

.unit-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.unit-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}

.unit-card-subtitle {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.unit-card-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.badge-page {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.badge-qcount {
  font-size: 11px;
  font-weight: 700;
  background: rgba(0, 255, 136, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(0, 255, 136, 0.3);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.badge-preset {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
}

.badge-preset.midterm {
  background: rgba(255, 184, 0, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(255, 184, 0, 0.3);
}

.badge-preset.final {
  background: rgba(157, 78, 221, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(157, 78, 221, 0.3);
}

/* Modal Footer */
.scope-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(14, 20, 36, 0.8);
  gap: 12px;
}

.scope-stats-text {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.scope-stats-text strong {
  color: var(--accent-cyan);
}

.modal-footer-btns {
  display: flex;
  gap: 8px;
}

.btn-modal-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-modal-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-modal-primary {
  background: linear-gradient(135deg, var(--accent-cyan), #0284c7);
  border: none;
  color: #000;
  font-size: 12.5px;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 4px 14px rgba(0, 240, 255, 0.35);
}

.btn-modal-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 240, 255, 0.5);
}

@media (max-width: 600px) {
  .subject-chips-bar {
    gap: 8px;
  }
  .subject-chip-btn {
    min-width: 100%;
    padding: 10px 12px;
  }
  .unit-card-left {
    gap: 8px;
  }
  .unit-card-page-badge {
    font-size: 11px;
    padding: 3px 6px;
  }
  .unit-card-title {
    font-size: 13px;
  }
  .unit-card-right {
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }
  .scope-control-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }
  .btn-scope-setup {
    justify-content: center;
  }
  .scope-presets-wrap {
    padding: 10px 14px;
  }
  .scope-modal-dialog {
    max-height: 92vh;
  }
  .scope-modal-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .modal-footer-btns {
    width: 100%;
  }
  .modal-footer-btns button {
    flex: 1;
  }
}

/* ========================================================
   SECTION: INLINE SCOPE SELECTOR & QUESTION PAPER STREAM (v2.2)
   ======================================================== */

/* 1. Inline Scope Card (화면 상단 시험 범위 최우선 카드) */
.inline-scope-card {
  background: var(--bg-card);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
}

.inline-scope-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.scope-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.scope-title-icon {
  font-size: 26px;
}

.scope-title-main {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

.scope-title-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.scope-presets-inline {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Units Grid */
.inline-units-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.unit-chip-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(18, 25, 45, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
}

.unit-chip-card:hover {
  background: rgba(28, 38, 68, 0.85);
  border-color: rgba(0, 240, 255, 0.3);
}

.unit-chip-card.checked {
  background: rgba(0, 240, 255, 0.08);
  border-color: var(--accent-cyan);
  box-shadow: inset 0 0 14px rgba(0, 240, 255, 0.08);
}

.unit-chip-card.recommended {
  border-left: 3px solid var(--accent-amber);
}

.unit-chip-left {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.unit-chip-cb {
  width: 17px;
  height: 17px;
  accent-color: var(--accent-cyan);
  cursor: pointer;
  flex-shrink: 0;
}

.unit-chip-page {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.35);
  padding: 3px 7px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.unit-chip-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unit-chip-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.unit-chip-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.unit-chip-tag.midterm {
  background: rgba(255, 184, 0, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(255, 184, 0, 0.3);
}

.unit-chip-tag.final {
  background: rgba(157, 78, 221, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(157, 78, 221, 0.3);
}

.unit-chip-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-green);
  background: rgba(0, 255, 136, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.inline-scope-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--text-secondary);
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.inline-scope-footer strong {
  color: var(--accent-amber);
}

/* 2. Collapsible Tools Bar (실험실 & 요약 접이식) */
.tools-accordion-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.btn-tool-accordion {
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-tool-accordion:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn-tool-accordion.active {
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.1);
  color: #fff;
}

.badge-tool-state {
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.btn-tool-accordion.active .badge-tool-state {
  background: var(--accent-cyan);
  color: #000;
}

/* 3. Question Paper Stream (실전 문제 나열 메인) */
.exam-paper-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.paper-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.paper-main-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.paper-desc-text {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.paper-filter-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.paper-filter-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.paper-filter-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.paper-filter-btn.active {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn-paper-reset {
  background: rgba(255, 0, 122, 0.1);
  border: 1px solid rgba(255, 0, 122, 0.3);
  color: var(--accent-pink);
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-paper-reset:hover {
  background: rgba(255, 0, 122, 0.2);
}

/* Sticky Score & Status Bar */
.paper-sticky-bar {
  position: sticky;
  top: 10px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 15, 28, 0.95);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.paper-stat-pill {
  font-size: 13px;
  color: var(--text-secondary);
}

.paper-stat-pill strong {
  color: var(--accent-cyan);
  font-size: 15px;
}

.paper-score-group {
  display: flex;
  gap: 10px;
}

.score-badge {
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.score-badge.badge-correct {
  background: rgba(0, 255, 136, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.score-badge.badge-wrong {
  background: rgba(255, 0, 122, 0.12);
  color: var(--accent-pink);
  border: 1px solid rgba(255, 0, 122, 0.3);
}

/* Question Cards List */
.paper-questions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.paper-q-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: var(--transition-fast);
  backdrop-filter: blur(12px);
}

.paper-q-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.paper-q-card.status-correct {
  border-color: rgba(0, 255, 136, 0.5);
  box-shadow: 0 4px 20px rgba(0, 255, 136, 0.08);
}

.paper-q-card.status-wrong {
  border-color: rgba(255, 0, 122, 0.5);
  box-shadow: 0 4px 20px rgba(255, 0, 122, 0.08);
}

.paper-q-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.paper-q-left-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.q-number-badge {
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  padding: 3px 9px;
  border-radius: 6px;
}

.q-page-pill {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
}

.q-type-label {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.q-type-label.sub {
  background: rgba(255, 184, 0, 0.12);
  color: var(--accent-amber);
  border: 1px solid rgba(255, 184, 0, 0.3);
}

.q-type-label.choice {
  background: rgba(0, 240, 255, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.paper-q-body {
  font-size: 16px;
  line-height: 1.65;
  color: #f1f5f9;
  margin-bottom: 16px;
  font-weight: 500;
}

/* Sub-input controls */
.paper-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.paper-text-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 14.5px;
  color: #fff;
  outline: none;
  transition: var(--transition-fast);
}

.paper-text-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

.btn-paper-check {
  background: linear-gradient(135deg, var(--accent-cyan), #0284c7);
  border: none;
  color: #000;
  font-size: 13.5px;
  font-weight: 800;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.btn-paper-check:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 240, 255, 0.4);
}

.paper-hint-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.btn-paper-hint {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: var(--text-secondary);
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-paper-hint:hover {
  color: var(--accent-amber);
  border-color: var(--accent-amber);
}

.paper-hint-display {
  font-size: 12px;
  color: var(--accent-amber);
  font-weight: 700;
}

/* Choice options grid */
.paper-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.paper-opt-btn {
  background: rgba(18, 25, 45, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  text-align: left;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 10px;
}

.paper-opt-btn:hover {
  background: rgba(28, 38, 68, 0.9);
  border-color: rgba(0, 240, 255, 0.3);
}

.paper-opt-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.paper-opt-btn.is-selected-correct {
  background: rgba(0, 255, 136, 0.15);
  border-color: var(--accent-green);
  color: #fff;
}

.paper-opt-btn.is-selected-correct .paper-opt-num {
  background: var(--accent-green);
  color: #000;
}

.paper-opt-btn.is-selected-wrong {
  background: rgba(255, 0, 122, 0.15);
  border-color: var(--accent-pink);
  color: #fff;
}

.paper-opt-btn.is-selected-wrong .paper-opt-num {
  background: var(--accent-pink);
  color: #fff;
}

/* Question feedback box */
.paper-feedback-box {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.6;
}

.paper-feedback-box.correct {
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.3);
  color: #f0fdf4;
}

.paper-feedback-box.wrong {
  background: rgba(255, 0, 122, 0.08);
  border: 1px solid rgba(255, 0, 122, 0.3);
  color: #fff1f2;
}

.paper-fb-head {
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.paper-feedback-box.correct .paper-fb-head {
  color: var(--accent-green);
}

.paper-feedback-box.wrong .paper-fb-head {
  color: var(--accent-pink);
}

.paper-fb-ans {
  font-weight: 700;
  margin-bottom: 8px;
}

.paper-fb-exp {
  font-size: 12.5px;
  color: var(--text-secondary);
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 8px;
}

/* ========================================================
   AUDIO STUDY PODCAST & TTS LEARNING PLAYER
   ======================================================== */

/* ========================================================
   AUDIO HERO BANNER (독립 와이드 프리미엄 오디오 러닝 바)
   ======================================================== */
.audio-hero-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.12) 0%, rgba(157, 78, 221, 0.15) 50%, rgba(14, 22, 42, 0.95) 100%);
  border: 1px solid rgba(0, 240, 255, 0.45);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 240, 255, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: var(--transition-fast);
}

.audio-hero-banner:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 240, 255, 0.25);
}

.audio-banner-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.audio-hero-icon-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.25), rgba(157, 78, 221, 0.25));
  border: 1px solid rgba(0, 240, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.audio-hero-icon {
  font-size: 26px;
  animation: audioPulse 2s infinite ease-in-out;
}

/* Sound Wave Bars Animation */
.audio-wave-bars {
  position: absolute;
  bottom: 6px;
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 12px;
}

.wave-bar {
  width: 2.5px;
  background: var(--accent-cyan);
  border-radius: 999px;
  animation: waveMotion 1.2s infinite ease-in-out;
}

.wave-bar.bar-1 { height: 6px; animation-delay: 0.1s; }
.wave-bar.bar-2 { height: 11px; animation-delay: 0.3s; }
.wave-bar.bar-3 { height: 8px; animation-delay: 0.2s; }
.wave-bar.bar-4 { height: 10px; animation-delay: 0.4s; }

@keyframes waveMotion {
  0%, 100% { transform: scaleY(0.4); opacity: 0.6; }
  50% { transform: scaleY(1); opacity: 1; filter: drop-shadow(0 0 3px var(--accent-cyan)); }
}

.audio-banner-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.audio-hero-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.audio-hero-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.audio-hero-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.audio-hero-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.audio-hero-tags {
  display: flex;
  gap: 6px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.hero-tag {
  font-size: 11px;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-tag.tag-sub {
  color: var(--accent-green);
  background: rgba(0, 255, 136, 0.08);
  border-color: rgba(0, 255, 136, 0.2);
}

.audio-banner-right {
  flex-shrink: 0;
}

.btn-audio-hero-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #00a8ff 100%);
  color: #060911;
  font-weight: 800;
  font-size: 14.5px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 240, 255, 0.4);
  transition: var(--transition-fast);
  font-family: inherit;
  white-space: nowrap;
}

.btn-audio-hero-action:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 24px rgba(0, 240, 255, 0.6);
}

.badge-hero-toggle {
  font-size: 11px;
  background: rgba(6, 9, 17, 0.2);
  color: #060911;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

/* Playing state for Hero Action Button */
.btn-audio-hero-action.is-playing {
  background: linear-gradient(135deg, var(--accent-pink) 0%, #ff0055 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(255, 0, 122, 0.45);
}

.btn-audio-hero-action.is-playing .badge-hero-toggle {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

@media (max-width: 680px) {
  .audio-hero-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 14px;
  }
  .audio-banner-left {
    align-items: flex-start;
  }
  .btn-audio-hero-action {
    width: 100%;
    justify-content: center;
    padding: 12px 18px;
  }
}

.audio-player-card {
  background: linear-gradient(135deg, rgba(16, 24, 48, 0.95) 0%, rgba(8, 12, 24, 0.98) 100%);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 20px rgba(0, 240, 255, 0.12);
  backdrop-filter: blur(16px);
  animation: fadeIn 0.25s ease-out;
}

.audio-player-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.audio-title-wrap {
  flex: 1;
  min-width: 260px;
}

.audio-title-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.audio-pulse-icon {
  font-size: 24px;
  display: inline-block;
  animation: audioPulse 2s infinite ease-in-out;
}

@keyframes audioPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px var(--accent-cyan)); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 10px var(--accent-cyan)); }
}

.audio-player-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.audio-player-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.audio-track-counter {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.audio-track-counter .counter-label {
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.audio-track-counter strong {
  font-size: 16px;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}

/* Modes Bar */
.audio-modes-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}

.audio-mode-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
}

.audio-modes-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.btn-audio-mode {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 13px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: inherit;
}

.btn-audio-mode:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-audio-mode.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2) 0%, rgba(157, 78, 221, 0.2) 100%);
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
  font-weight: 700;
}

/* Current Track Panel */
.audio-current-track-panel {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 20px;
}

.track-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.track-meta-pill {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.1);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 240, 255, 0.2);
}

.audio-phase-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.audio-phase-badge.idle {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.audio-phase-badge.question {
  background: rgba(0, 240, 255, 0.15);
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan);
  animation: pulseCyan 1.5s infinite;
}

.audio-phase-badge.thinking {
  background: rgba(255, 184, 0, 0.15);
  color: var(--accent-amber);
  border: 1px solid var(--accent-amber);
  animation: pulseAmber 1s infinite;
}

.audio-phase-badge.answer {
  background: rgba(0, 255, 136, 0.15);
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
}

@keyframes pulseCyan {
  0%, 100% { box-shadow: 0 0 4px rgba(0, 240, 255, 0.3); }
  50% { box-shadow: 0 0 12px rgba(0, 240, 255, 0.6); }
}

@keyframes pulseAmber {
  0%, 100% { box-shadow: 0 0 4px rgba(255, 184, 0, 0.3); }
  50% { box-shadow: 0 0 12px rgba(255, 184, 0, 0.7); }
}

.track-title-text {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.45;
}

/* Script Subtitle Box */
.audio-script-box {
  background: rgba(14, 20, 36, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.6;
  min-height: 80px;
}

.audio-script-idle {
  color: var(--text-muted);
  font-style: italic;
}

.audio-script-q {
  color: #f0f4fc;
  margin-bottom: 8px;
}

.audio-script-q strong {
  color: var(--accent-cyan);
}

.audio-script-choices {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 6px 0;
}

.script-choice-pill {
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 8px;
  border-radius: 4px;
}

.audio-script-timer {
  color: var(--accent-amber);
  font-weight: 700;
  font-size: 13px;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255, 184, 0, 0.1);
  border-radius: 6px;
  border: 1px dashed rgba(255, 184, 0, 0.3);
  animation: pulseAmber 1.2s infinite;
}

.audio-script-ans {
  color: var(--accent-green);
  font-weight: 700;
  font-size: 14px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.audio-script-exp {
  color: #e2e8f0;
  font-size: 13px;
  margin-top: 6px;
  line-height: 1.55;
}

.audio-script-exp strong {
  color: var(--accent-amber);
}

/* Controls Wrap */
.audio-controls-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.audio-main-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-audio-ctrl {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-audio-ctrl:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.btn-audio-play {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #0099ff 100%);
  color: #060911;
  font-weight: 800;
  font-size: 15px;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 240, 255, 0.35);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}

.btn-audio-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0, 240, 255, 0.5);
}

.btn-audio-play.is-playing {
  background: linear-gradient(135deg, var(--accent-pink) 0%, #ff0055 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 0, 122, 0.35);
}

.audio-extra-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-audio-opt {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: inherit;
}

.btn-audio-opt:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-opt-jump {
  color: var(--accent-green);
  border-color: rgba(0, 255, 136, 0.3);
}

.btn-opt-jump:hover {
  background: rgba(0, 255, 136, 0.12);
  border-color: var(--accent-green);
  color: #fff;
}

/* Floating Mini Audio Bar */
.audio-mini-bar {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 620px;
  background: rgba(10, 16, 32, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 990;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 16px rgba(0, 240, 255, 0.2);
  animation: slideUpMini 0.25s ease-out;
}

@keyframes slideUpMini {
  from { transform: translate(-50%, 40px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.mini-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.mini-pulse-icon {
  font-size: 20px;
  animation: audioPulse 1.8s infinite ease-in-out;
}

.mini-text-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mini-badge {
  font-size: 10px;
  color: var(--accent-cyan);
  font-weight: 700;
  line-height: 1.2;
}

.mini-title {
  font-size: 12.5px;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.mini-bar-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-ctrl-btn,
.mini-rate-btn,
.mini-expand-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #fff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: inherit;
}

.mini-rate-btn {
  border-radius: var(--radius-full);
  width: auto;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
}

.mini-ctrl-btn:hover,
.mini-rate-btn:hover,
.mini-expand-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.mini-play-btn {
  background: var(--accent-cyan);
  color: #060911;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 240, 255, 0.4);
  transition: var(--transition-fast);
}

.mini-play-btn:hover {
  transform: scale(1.08);
}

/* Exam Question Highlight on Jump */
.highlight-pulse {
  animation: cardHighlightGlow 2s ease-out !important;
}

@keyframes cardHighlightGlow {
  0% { box-shadow: 0 0 0 3px var(--accent-green), 0 0 25px rgba(0, 255, 136, 0.6); }
  100% { box-shadow: none; }
}

@media (max-width: 600px) {
  .audio-player-card {
    padding: 16px;
  }
  .audio-modes-group {
    flex-direction: column;
    width: 100%;
  }
  .btn-audio-mode {
    width: 100%;
    text-align: center;
  }
  .audio-controls-wrap {
    flex-direction: column;
    align-items: stretch;
  }
  .audio-main-controls {
    justify-content: center;
  }
  .audio-extra-controls {
    justify-content: center;
  }
}

/* ── Footer (테일부) ───────────────────────────────────────── */
.hub-footer {
  margin-top: 48px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 32px;
  padding-bottom: 40px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.05em;
}

.footer-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-dot {
  opacity: 0.5;
}


