/**
 * css/podcast-pilot.css — Gamified Podcast Pilot Player & Quest Interface
 * Standardized on css/grammar-lessons.css tokens and components.
 */

.pilot-container {
  max-width: 980px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

/* ── HUD Strip (Mirroring Grammar Lessons gx-strip) ───────────────────────── */
.pilot-hud {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 1.2rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.4rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
  position: relative;
  overflow: hidden;
}

.pilot-hud::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--purple), var(--accent));
}

.hud-ring {
  --p: 0;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--surface-2) 0);
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
}

.hud-ring::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--surface);
}

.hud-ring span {
  position: relative;
  font-size: .75rem;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  line-height: 1.15;
}

.hud-rank {
  min-width: 0;
}

.hud-rank-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.hud-rank-sub {
  font-size: .78rem;
  color: var(--text-muted);
  margin: .15rem 0 .45rem;
}

.hud-bar {
  height: 8px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
}

.hud-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--purple), var(--teal));
  transition: width .45s ease-out;
}

.hud-stat {
  text-align: center;
  min-width: 58px;
}

.hud-stat b {
  display: block;
  font-size: 1.25rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.hud-stat small {
  font-size: .68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 700;
}

/* 3-Hearts Life Meter for Boss Round */
.heart-meter {
  display: flex;
  align-items: center;
  gap: .25rem;
  font-size: 1.2rem;
  letter-spacing: 2px;
}

.heart-meter .lost {
  opacity: .25;
  filter: grayscale(1);
}

/* ── Companion Mascot Stage Box in Hero ───────────────────────────────────── */
.pilot-mascot-box {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.4rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.mascot-avatar-slot {
  width: 78px;
  height: 78px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .2s ease;
}

.mascot-avatar-slot:hover {
  transform: scale(1.08) rotate(3deg);
}

.mascot-avatar-slot svg {
  width: 78px;
  height: 78px;
}

.mascot-speech-bubble {
  flex: 1;
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .75rem 1rem;
}

.mascot-speech-bubble::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 8px 8px 8px 0;
  border-style: solid;
  border-color: transparent var(--border) transparent transparent;
}

.mascot-speech-bubble::after {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 7px 7px 7px 0;
  border-style: solid;
  border-color: transparent var(--surface-2) transparent transparent;
}

.mascot-bubble-title {
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--teal-text);
  letter-spacing: .5px;
  margin-bottom: .25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mascot-bubble-text {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin: 0;
}

.mascot-bubble-sub {
  font-size: .76rem;
  color: var(--text-muted);
  margin-top: .3rem;
  margin-bottom: 0;
}

/* ── Step Navigation Tabs (Pills) ─────────────────────────────────────────── */
.pilot-steps-bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: .4rem;
}

.step-tab {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem 1rem;
  border-radius: 99px;
  font-size: .82rem;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all .18s ease;
}

.step-tab:hover {
  border-color: var(--purple);
  color: var(--text);
}

.step-tab.active {
  background: var(--purple-soft);
  border-color: var(--purple);
  color: var(--purple);
  box-shadow: 0 0 12px rgba(177,151,252,0.2);
}

.step-tab.completed {
  border-color: var(--green);
  color: var(--green);
}

.step-tab.completed::after {
  content: '✓';
  font-size: .78rem;
  font-weight: 900;
  color: var(--green);
  margin-left: .2rem;
}

.step-tab.locked {
  opacity: .5;
  cursor: not-allowed;
  filter: grayscale(0.5);
  border-style: dashed;
  position: relative;
}

.step-tab.locked::after {
  content: '🔒';
  font-size: .72rem;
  margin-left: .25rem;
  opacity: .85;
}

.step-tab.locked:hover {
  border-color: var(--border);
  color: var(--text-muted);
}

.step-tab.boss-tab.active {
  background: var(--red-soft);
  border-color: var(--red);
  color: var(--red);
  box-shadow: 0 0 16px rgba(255,107,107,0.3);
}

/* ── Panel Stages ─────────────────────────────────────────────────────────── */
.pilot-stage {
  display: none;
}

.pilot-stage.active {
  display: block;
}

/* ── Stage 1: Podcast Audio & Synced Transcript ───────────────────────────── */
.audio-card {padding: 1.4rem;margin-bottom: 1.25rem;}

.audio-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.podcast-main-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text);
}

.cast-picker {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: .25rem .75rem;
  font-size: .8rem;
  display: flex; width: 100%; box-sizing: border-box; max-width: 100%;
}
@media (min-width: 640px) { .cast-picker { display: inline-flex; width: auto; } }

.cast-picker select {
  flex: 1 1 auto; min-width: 0; text-overflow: ellipsis;
  background: transparent;
  border: none;
  color: var(--text);
  font-weight: 700;
  font-size: .8rem;
  outline: none;
  cursor: pointer;
}

/* Custom Player Bar */
.player-controls-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.play-pause-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--teal), var(--purple));
  color: #0b0f19;
  font-size: 1.2rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  flex-shrink: 0;
}

.play-pause-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 16px rgba(56,189,248,0.4);
}

.time-scrubber-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.scrubber-slider {
  width: 100%;
  height: 6px;
  border-radius: 99px;
  accent-color: var(--teal);
  cursor: pointer;
}

.time-row {
  display: flex;
  justify-content: space-between;
  font-size: .75rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.speed-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 700;
  padding: .3rem .65rem;
  cursor: pointer;
}

.speed-btn:hover {
  color: #fff;
  border-color: var(--teal);
}

/* Pilot Seats Bar (Intervenants en tête) */
.pilot-seats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: .65rem .95rem;
  background: var(--surface-2, rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: .85rem;
  font-size: .82rem;
}

.pilot-seat {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.seat-role {
  color: var(--text-dim);
  font-size: .78rem;
  font-weight: 500;
}

.pilot-seat-sep {
  color: var(--text-dim);
  opacity: .5;
  font-size: .9rem;
}

/* Transcript Box */
.transcript-card {padding: 1.15rem;max-height: 380px;overflow-y: auto;scroll-behavior: smooth;margin-bottom: 1.25rem;position: relative;}

.transcript-line {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .6rem .85rem;
  border-radius: var(--radius);
  margin-bottom: .4rem;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
}

.transcript-line.cont {
  margin-top: -.25rem;
  padding-top: .35rem;
}

.transcript-line:hover {
  background: rgba(255,255,255,0.03);
}

.transcript-line.active {
  background: rgba(163, 113, 247, 0.12);
  border-color: rgba(163, 113, 247, 0.35);
  border-left-color: var(--purple);
  box-shadow: 0 2px 10px rgba(163, 113, 247, 0.15);
}

.line-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.line-speaker {
  display: flex;
  align-items: center;
  margin-bottom: .25rem;
}

.transcript-line.cont .line-speaker {
  display: none;
}

.line-text-wrap {
  width: 100%;
  min-width: 0;
}

.line-fr {
  font-size: .95rem;
  color: var(--text);
  line-height: 1.5;
  font-weight: 600;
  word-break: break-word;
}

.line-en {
  font-size: .82rem;
  color: var(--text-dim);
  line-height: 1.35;
  margin-top: .25rem;
  word-break: break-word;
  display: none;
}

.line-en.visible {
  display: block;
}

.stage-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.toggle-en-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 700;
  padding: .45rem .9rem;
  border-radius: 99px;
  cursor: pointer;
}

.toggle-en-btn:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.25);
}

.primary-stage-btn {
  background: linear-gradient(90deg, var(--purple), var(--teal));
  color: #0d1117;
  font-weight: 800;
  font-size: .95rem;
  border: none;
  border-radius: var(--radius);
  padding: .75rem 1.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  transition: transform .15s, opacity .15s;
}

.primary-stage-btn:hover {
  transform: translateY(-2px);
  opacity: .95;
}

/* ── Stage 2, 3, 4: Quizzes & Boss Round ───────────────────────────────────── */
.exercise-card {padding: 1.75rem;margin-bottom: 1.25rem;text-align: center;position: relative;transition: all .25s ease;}

.exercise-card.boss {
  border-color: var(--red);
  box-shadow: 0 0 0 1px rgba(255,107,107,0.35), 0 0 35px rgba(255,107,107,0.18);
  background: radial-gradient(circle at 50% 0%, #201318 0%, var(--surface) 80%);
}

.ex-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.exercise-counter {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: .2rem .75rem;
}

.boss-tag { animation:pulseBoss 2s infinite ease-in-out; }

@keyframes pulseBoss {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.combo {
  font-size: .78rem;
  font-weight: 800;
  color: var(--accent-text);
  background: var(--accent-soft);
  border-radius: 99px;
  padding: .2rem .75rem;
  visibility: hidden;
}

.combo.on {
  visibility: visible;
}

.ex-prog {
  height: 6px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.ex-prog i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--green);
  transition: width .35s;
}

.exercise-prompt-row {
  margin-bottom: 1.25rem;
}

.exercise-prompt {
  font-size: 1.2rem;
  color: var(--text);
  line-height: 1.5;
  margin: 0;
  font-weight: 700;
}

.exercise-hint {
  font-size: .84rem;
  color: var(--text-muted);
  margin-top: .4rem;
}

.exercise-options {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  margin-bottom: 1.25rem;
}

.result-box {
  display: none;
  margin-top: 1.2rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  text-align: left;
}

.result-box.show {
  display: block;
}

.result-box.ok {
  background: var(--green-soft);
  border-left: 4px solid var(--green);
}

.result-box.wrong {
  background: var(--red-soft);
  border-left: 4px solid var(--red);
}

.verdict-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .25rem;
}

.verdict-title {
  font-weight: 800;
  font-size: 1rem;
}

.result-box.ok .verdict-title {
  color: var(--green);
}

.result-box.wrong .verdict-title {
  color: var(--red);
}


.verdict-desc {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* ── Stage 5: Victory & Trophy ────────────────────────────────────────────── */
.pilot-victory-card {text-align: center;padding: 2.5rem 1.5rem;box-shadow: 0 10px 30px rgba(0,0,0,0.3);position: relative;overflow: hidden;}

.victory-trophy {
  font-size: 3.5rem;
  margin-bottom: .5rem;
  animation: bounceTrophy 1.5s infinite alternate ease-in-out;
}

@keyframes bounceTrophy {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

.victory-stars {
  font-size: 2.2rem;
  letter-spacing: .25em;
  color: var(--accent-text);
  margin-bottom: .75rem;
}

.victory-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--text);
  margin: 0 0 .5rem 0;
}

.victory-motive {
  font-size: 1rem;
  color: var(--teal-text);
  font-weight: 700;
  max-width: 580px;
  margin: 0 auto 1.25rem;
}

.victory-stats-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.v-stat-card {
  padding: .75rem 1.5rem;
  min-width: 130px;
}

.v-stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-text);
  display: block;
}

.v-stat-lbl {
  font-size: .75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
}

.victory-actions-row {
  display: flex;
  justify-content: center;
  gap: .8rem;
  flex-wrap: wrap;
}

.v-btn {
  padding: .75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  transition: all .15s ease;
}

.v-btn.primary {
  background: linear-gradient(90deg, var(--purple), var(--teal));
  color: #0d1117;
  border: none;
}

.v-btn.secondary {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}

.v-btn:hover {
  transform: translateY(-2px);
}

/* ── Floating XP Animation ────────────────────────────────────────────────── */
.xp-floater {
  position: fixed;
  font-size: 1.2rem;
  font-weight: 900;
  color: #f5b02e;
  text-shadow: 0 0 10px rgba(245,176,46,0.6);
  pointer-events: none;
  z-index: 1000;
  animation: floatFadeUp 1.2s forwards cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes floatFadeUp {
  0% { opacity: 0; transform: translateY(0) scale(0.7); }
  20% { opacity: 1; transform: translateY(-15px) scale(1.15); }
  100% { opacity: 0; transform: translateY(-70px) scale(1); }
}

/* ── Additional Gamified Activity Section Styles ────────────────────────── */
.pod-line-jump {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: .75rem;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .15s;
}

.pod-line-jump:hover,
.pod-line-jump.playing {
  background: var(--purple);
  color: #0b0f19;
  border-color: var(--purple);
  transform: scale(1.1);
}

.speaker-role {
  font-size: .68rem;
  color: var(--text-dim);
  display: block;
  font-weight: 500;
  margin-top: .1rem;
}

/* Vocab & Idioms Flashcards */
.vocab-flashcard-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 18px rgba(0,0,0,0.12);
}

.vocab-tag-pill { margin-bottom:.85rem; }

.vocab-term-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-bottom: .6rem;
}

.vocab-term-fr {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.vocab-audio-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform .15s, border-color .15s;
}

.vocab-audio-btn:hover {
  transform: scale(1.1);
  border-color: var(--teal);
}

.vocab-term-en {
  font-size: 1.15rem;
  color: var(--teal-text);
  font-weight: 600;
  margin-bottom: .85rem;
}

.vocab-term-ctx {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 580px;
  margin: 0 auto;
}

.vocab-actions-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.vocab-btn {
  padding: .65rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  transition: all .15s ease;
}

.vocab-btn.master {
  background: var(--green);
  color: #08110b;
}

.vocab-btn.review {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}

.vocab-btn:hover {
  transform: translateY(-2px);
}

.vocab-grid-toggle {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-dim);
  border-radius: 99px;
  padding: .35rem .85rem;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 1rem;
}

.vocab-grid-toggle:hover {
  color: var(--text);
  border-color: var(--teal);
}

.vocab-all-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .75rem;
  margin-top: 1.25rem;
  text-align: left;
}

.vocab-chip-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .65rem .85rem;
  font-size: .85rem;
}

.vocab-chip-item strong {
  display: block;
  color: var(--text);
  margin-bottom: .15rem;
}

.vocab-chip-item span {
  color: var(--text-muted);
  font-size: .78rem;
}

/* Cloze & Puzzle Activity */
.cloze-sentence-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.cloze-input {
  background: var(--surface);
  border: 2px solid var(--purple);
  border-radius: 6px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  padding: .2rem .6rem;
  width: 160px;
  text-align: center;
  outline: none;
}

.cloze-input.ok {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}

.cloze-input.wrong {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--red);
}

.accent-bar-helpers {
  display: flex;
  justify-content: center;
  gap: .35rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.accent-pill {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: transform .1s, border-color .15s;
}

.accent-pill:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
}

/* Shadowing Section */
.shadow-quote-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.shadow-speaker-tag {
  display: inline-block;
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: .6rem;
}

.shadow-fr-text {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: .75rem;
}

.shadow-en-text {
  font-size: .95rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.shadow-listen-btn {
  background: linear-gradient(135deg, var(--teal), var(--purple));
  color: #0b0f19;
  border: none;
  border-radius: 99px;
  padding: .65rem 1.5rem;
  font-weight: 800;
  font-size: .95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.25rem;
  transition: transform .15s;
}

.shadow-listen-btn:hover {
  transform: scale(1.05);
}

.shadow-eval-row {
  display: flex;
  justify-content: center;
  gap: .8rem;
  flex-wrap: wrap;
}

.eval-btn {
  padding: .6rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: all .15s;
}

.eval-btn:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
}

.eval-btn.perfect {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green);
}

/* Worksheet & Debate Arena */
.worksheet-goals-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.worksheet-goals-box h3 {
  margin: 0 0 .5rem;
  font-size: 1rem;
  color: var(--teal-text);
}

.worksheet-goals-box ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.debate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .debate-grid {
    grid-template-columns: 1fr;
  }
}

.debate-card {
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: left;
  cursor: pointer;
  transition: all .2s ease;
}

.debate-card:hover {
  border-color: var(--purple);
}

.debate-card.chosen {
  border-color: var(--teal);
  background: rgba(56,189,248,0.08);
  box-shadow: 0 0 16px rgba(56,189,248,0.2);
}

.debate-card h4 {
  margin: 0 0 .35rem;
  font-size: 1.05rem;
  color: var(--text);
}

.debate-card p {
  margin: 0;
  font-size: .84rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.writing-box {
  padding: 1.2rem;
  text-align: left;
  margin-bottom: 1.25rem;
}

.writing-box label {
  display: block;
  font-weight: 700;
  font-size: .92rem;
  color: var(--text);
  margin-bottom: .5rem;
}

.writing-box textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem;
  color: var(--text);
  font-family: inherit;
  font-size: .9rem;
  resize: vertical;
  min-height: 90px;
  outline: none;
}

.writing-box textarea:focus {
  border-color: var(--teal);
}

/* Boss Round HP & Screen Shake */
.boss-hp-row {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: 1.25rem;
  background: rgba(0,0,0,0.2);
  border-radius: 99px;
  padding: .35rem .85rem;
  border: 1px solid rgba(255,107,107,0.3);
}

.boss-hp-label {
  font-size: .78rem;
  font-weight: 800;
  color: #ff6b6b;
  text-transform: uppercase;
}

.boss-hp-track {
  flex: 1;
  height: 10px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
}

.boss-hp-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ff6b6b, #fa5252);
  transition: width .4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.screen-shake {
  animation: shakeFx 0.45s ease-in-out;
}

@keyframes shakeFx {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px) rotate(-1deg); }
  40% { transform: translateX(8px) rotate(1deg); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

/* Short answer input for comprehension */
.short-answer-form {
  display: flex;
  gap: .6rem;
  max-width: 450px;
  margin: 0 auto 1rem;
}

.short-answer-form input {
  flex: 1;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  padding: .6rem .85rem;
  text-align: center;
  outline: none;
}

.short-answer-form input:focus {
  border-color: var(--purple);
}

.short-answer-form button {
  background: var(--purple);
  color: #0d1117;
  border: none;
  border-radius: var(--radius);
  font-weight: 800;
  font-size: .9rem;
  padding: 0 1.25rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .pilot-hud {
    grid-template-columns: auto 1fr;
    gap: .75rem;
  }
  .pilot-mascot-box {
    flex-direction: column;
    text-align: center;
  }
  .mascot-speech-bubble::before,
  .mascot-speech-bubble::after {
    display: none;
  }
}

@media (max-width: 640px) {
  .pilot-container {
    padding: .75rem .5rem 2rem;
  }
  .audio-card {
    padding: .85rem .65rem;
  }
  .pilot-seats-bar {
    flex-direction: row;
    justify-content: space-between;
    gap: .5rem;
    padding: .5rem .75rem;
  }
  .pilot-seat {
    gap: .35rem;
  }
  .seat-role {
    font-size: .72rem;
  }
  .pilot-seat-sep {
    font-size: .75rem;
    opacity: .35;
  }
  .transcript-card {
    padding: .65rem .5rem;
    max-height: 360px;
  }
  .transcript-line {
    gap: .5rem;
    padding: .45rem .5rem;
  }
  .pod-line-jump {
    width: 24px;
    height: 24px;
    font-size: .65rem;
  }
  .line-fr {
    font-size: .9rem;
    line-height: 1.45;
  }
  .line-en {
    font-size: .78rem;
    line-height: 1.35;
  }
}

/* M621: the pastel badges use light-theme-unsafe ink (#fb7185 on its own
   15% tint is 2.3:1 on white). Darker ink where the page is light. */
:is([data-theme="light"], [data-theme="paper"], [data-theme="app"]) .c2-pill { color: #9a3412; }

/* M632: inside the App theme's fixed blue page header the C2 pill needs
   light ink (orange-on-blue was 1.0–1.1:1). */
[data-theme="app"] .page-header .c2-pill { --ds-c: #ffffff; color: #ffffff; background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.5); }

/* M642: keep the designed size above the 16px phone floor; inline gap, so no 44px box */
@media (max-width:767px){input.cloze-input{font-size:1.15rem !important;min-height:0}}

/* M642: answer text left, status icon right (as before M637) */
.option-btn{justify-content:space-between}
