/* Listening Lab */

html {
  scrollbar-width: thin;
  scrollbar-color: #10b981 rgba(6, 9, 14, 0.95);
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: block !important;
  width: 8px !important;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: rgba(6, 9, 14, 0.95) !important;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: #10b981 !important;
  border-radius: 999px !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6) !important;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background: #34d399 !important;
}

body.workspace-active {
  overflow: hidden !important;
}

body.workspace-active #lab-dashboard {
  display: none !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.workspace-active #lab-workspace {
  margin-top: 0 !important;
  padding-top: 16px !important;
}

.audio-lab-page {
  --listening-sticky-top: 77px;
  overflow-x: clip;
  overflow-y: visible;
  padding-bottom: 72px;
  background:
    radial-gradient(circle at 12% 8%, rgba(46, 232, 120, 0.12), transparent 34%),
    radial-gradient(circle at 88% 16%, rgba(250, 204, 21, 0.09), transparent 30%),
    linear-gradient(180deg, #05080d 0%, #08111d 48%, #05080d 100%);
}

.audio-lab-page [hidden] {
  display: none !important;
}


.listening-command {
  padding-top: 54px;
}

.command-hero,
.lab-dashboard-grid,
.mission-shell {
  display: grid;
  gap: 22px;
}

.command-hero {
  grid-template-columns: minmax(0, 1fr) 360px;
  margin-bottom: 20px;
}

.lab-dashboard-grid {
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
}

.mission-shell {
  grid-template-columns: minmax(260px, 320px) minmax(0, 680px) minmax(240px, 280px);
  align-items: start;
  justify-content: center;
}

.lab-workspace {
  max-width: 1380px;
}

.mission-shell,
.mission-context,
.session-player-card,
.audio-workbench {
  min-width: 0;
}

.command-copy,
.diagnostic-panel,
.mission-map,
.insight-panel,
.mission-context,
.session-player-card,
.player-panel,
.stage-card,
.result-panel {
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(7, 15, 28, 0.96)),
    #0b1220;
  box-shadow: var(--shadow);
}

.command-copy {
  min-height: 390px;
  padding: 44px;
  border-radius: 20px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  background:
    linear-gradient(90deg, rgba(6, 9, 14, 0.82) 0%, rgba(6, 9, 14, 0.65) 50%, rgba(6, 9, 14, 0.25) 100%),
    radial-gradient(circle at 85% 25%, rgba(16, 185, 129, 0.28), transparent 45%),
    url("https://images.unsplash.com/photo-1501339847302-ac426a4a7cbb?auto=format&fit=crop&w=1920&q=90") center/cover;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 30px rgba(16, 185, 129, 0.12);
}

.command-copy h1 {
  max-width: 820px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.9), 0 0 24px rgba(56, 189, 248, 0.26);
}

.real-situation {
  max-width: 760px;
  margin: 20px 0 0;
  color: rgba(248, 251, 255, 0.9);
  font-size: 18px;
  line-height: 1.65;
}

.command-actions,
.player-actions,
.hint-actions,
.mission-tags,
.mini-stats,
.earned-badges,
.keyword-strip,
.sound-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.command-actions {
  margin-top: 28px;
}

.diagnostic-panel,
.mission-map,
.insight-panel,
.mission-context,
.session-player-card,
.player-panel,
.stage-card,
.result-panel {
  padding: 22px;
}

.score-ring {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.score-ring svg {
  width: 162px;
  height: 162px;
}

.score-ring span,
.diagnostic-list strong,
.insight-panel h3,
.mission-info h3,
.mission-context h2,
.player-topline h3,
.stage-heading h3,
.result-panel h3 {
  color: #ffffff;
}

.circle-bg {
  fill: none;
  stroke: rgba(148, 163, 184, 0.18);
  stroke-width: 2.6;
}

.circle {
  fill: none;
  stroke: #2ee878;
  stroke-linecap: round;
  stroke-width: 2.6;
  filter: drop-shadow(0 0 5px rgba(46, 232, 120, 0.72));
  transition: stroke-dasharray 0.45s ease;
}

.score-ring text {
  fill: #ffffff;
  font-size: 0.48rem;
  font-weight: 900;
  text-anchor: middle;
}

.diagnostic-list,
.lab-insights,
.audio-workbench,
.listen-pass ol,
.mistake-bank,
.mode-preview-list {
  display: grid;
  gap: 12px;
}

.diagnostic-list div {
  border-left: 3px solid rgba(46, 232, 120, 0.72);
  padding-left: 12px;
}

.diagnostic-list span,
.mission-info p,
.insight-panel p,
.stage-heading p,
.mission-story,
.player-note,
.result-panel p,
.listen-pass p {
  color: var(--muted);
  line-height: 1.5;
}

.diagnostic-list span {
  display: block;
  font-size: 13px;
  margin-top: 4px;
}

.goal-selector {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  padding: 12px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: var(--radius);
  background: rgba(2, 6, 23, 0.46);
}

.goal-selector span {
  color: #e6f6ff;
  font-weight: 900;
}

.goal-chip,
.mode-tab,
.roleplay-btn,
.phrase-chip {
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: var(--radius);
  background: rgba(2, 6, 23, 0.42);
  color: #e2e8f0;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.goal-chip {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
}

/* Level Badges in Goal Selector */
.level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}

.level-badge.easy {
  color: #2ee878;
  background: rgba(46, 232, 120, 0.12);
  border: 1px solid rgba(46, 232, 120, 0.35);
  box-shadow: 0 0 10px rgba(46, 232, 120, 0.15);
}

.level-badge.medium {
  color: #facc15;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.35);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.15);
}

.level-badge.hard {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

/* Goal Chips per Level Group */
.goal-level-group.easy .goal-chip:hover,
.goal-level-group.easy .goal-chip.active {
  border-color: #2ee878;
  background: rgba(46, 232, 120, 0.16);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(46, 232, 120, 0.25);
}

.goal-level-group.medium .goal-chip:hover,
.goal-level-group.medium .goal-chip.active {
  border-color: #facc15;
  background: rgba(250, 204, 21, 0.16);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.25);
}

.goal-level-group.hard .goal-chip:hover,
.goal-level-group.hard .goal-chip.active {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.16);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.25);
}

.mode-tab:hover,
.mode-tab.active {
  border-color: rgba(46, 232, 120, 0.62);
  background: rgba(46, 232, 120, 0.14);
  color: #ffffff;
}

.mission-map .section-heading {
  margin-bottom: 22px;
}

.mission-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.mission-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  flex: 1;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: var(--radius);
  background: rgba(2, 6, 23, 0.42);
  color: #93c5fd;
  padding: 0 12px;
}

.mission-search input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  outline: none;
}

.mission-search input::placeholder {
  color: #64748b;
}

.mission-count {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid rgba(46, 232, 120, 0.24);
  border-radius: var(--radius);
  background: rgba(46, 232, 120, 0.1);
  color: #a7f3d0;
  font-size: 13px;
  font-weight: 900;
  padding: 8px 12px;
  white-space: nowrap;
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.mission-empty {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  min-height: 120px;
  place-content: center;
  border: 1px dashed rgba(125, 211, 252, 0.24);
  border-radius: var(--radius);
  color: #cbd5e1;
  text-align: center;
}

.mission-empty strong {
  color: #ffffff;
}

.mission-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  min-height: 178px;
  border-radius: var(--radius);
  background: transparent !important;
  color: var(--text);
  cursor: pointer;
  padding: 18px;
  text-align: left;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mission-card[data-tone="green"] {
  border: 1.5px solid #2ee878;
  background: transparent !important;
}
.mission-card[data-tone="green"]:hover:not(.locked) {
  transform: translateY(-4px);
  border-color: #4ade80;
  box-shadow: 0 0 24px rgba(46, 232, 120, 0.35), 0 10px 20px rgba(0, 0, 0, 0.4);
}
.mission-card[data-tone="green"].active {
  border-color: #4ade80;
  box-shadow: 0 0 20px rgba(46, 232, 120, 0.3);
}

.mission-card[data-tone="warm"] {
  border: 1.5px solid #facc15;
  background: transparent !important;
}
.mission-card[data-tone="warm"]:hover:not(.locked) {
  transform: translateY(-4px);
  border-color: #fde047;
  box-shadow: 0 0 24px rgba(250, 204, 21, 0.35), 0 10px 20px rgba(0, 0, 0, 0.4);
}
.mission-card[data-tone="warm"].active {
  border-color: #fde047;
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.3);
}

.mission-card[data-tone="danger"] {
  border: 1.5px solid #ef4444;
  background: transparent !important;
}
.mission-card[data-tone="danger"]:hover:not(.locked) {
  transform: translateY(-4px);
  border-color: #f87171;
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.35), 0 10px 20px rgba(0, 0, 0, 0.4);
}
.mission-card[data-tone="danger"].active {
  border-color: #f87171;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.mission-card.locked {
  cursor: not-allowed;
  opacity: 0.56;
}

.mission-icon,
.panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
  font-size: 22px;
}

.mission-card .mission-icon {
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mission-card[data-tone="green"] .mission-icon {
  background: rgba(46, 232, 120, 0.12);
  border: 1px solid rgba(46, 232, 120, 0.3);
  color: #2ee878;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 8px rgba(0, 0, 0, 0.15);
}

.mission-card[data-tone="warm"] .mission-icon {
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.3);
  color: #facc15;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 8px rgba(0, 0, 0, 0.15);
}

.mission-card[data-tone="danger"] .mission-icon {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 8px rgba(0, 0, 0, 0.15);
}

.mission-card:hover .mission-icon {
  transform: scale(1.12) rotate(6deg);
}

.mission-card[data-tone="green"]:hover .mission-icon {
  background: rgba(46, 232, 120, 0.22);
  border-color: rgba(46, 232, 120, 0.5);
  box-shadow: 0 0 14px rgba(46, 232, 120, 0.35);
}

.mission-card[data-tone="warm"]:hover .mission-icon {
  background: rgba(250, 204, 21, 0.22);
  border-color: rgba(250, 204, 21, 0.5);
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.35);
}

.mission-card[data-tone="danger"]:hover .mission-icon {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.35);
}

.panel-icon {
  border: 1px solid rgba(46, 232, 120, 0.28);
  background: linear-gradient(135deg, rgba(46, 232, 120, 0.18), rgba(16, 185, 129, 0.08));
  color: #2ee878;
}

.mission-info h3 {
  font-size: 18px;
  line-height: 1.25;
  margin: 0 0 8px;
}

.mission-tags span,
.mini-stats span,
.earned-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.5);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 900;
  padding: 4px 9px;
}

.mission-progress {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.mission-progress > span:first-child {
  color: #a7f3d0;
  font-size: 12px;
  font-weight: 900;
}

.progress-track {
  overflow: hidden;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2ee878, #38bdf8);
}

.mistake-bank {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mistake-bank li,
.mode-preview-list span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #cbd5e1;
  font-size: 14px;
}

.mistake-bank li {
  border-bottom: 1px solid rgba(125, 211, 252, 0.12);
  padding-bottom: 9px;
}

.mission-context {
  position: sticky;
  top: var(--listening-sticky-top);
  z-index: 2;
}

.session-player-card {
  position: sticky;
  top: var(--listening-sticky-top);
  align-self: start;
  z-index: 2;
  overflow: hidden;
  border-color: rgba(46, 232, 120, 0.28);
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(3, 12, 24, 0.98)),
    #07111d;
}

.session-player-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.session-player-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(46, 232, 120, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(46, 232, 120, 0.18), rgba(56, 189, 248, 0.12)),
    rgba(2, 6, 23, 0.62);
  color: #a7f3d0;
  font-size: 22px;
}

.session-player-head strong {
  display: block;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.2;
}

.session-player-meta {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.session-player-meta > span:not(.mode-status) {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.4);
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
}

.session-player-actions {
  display: grid;
  gap: 10px;
}

.session-player-actions .btn {
  width: 100%;
  min-height: 48px;
  min-width: 0;
  white-space: normal;
}

.mission-context h2 {
  font-size: 32px;
  line-height: 1.1;
  margin: 0;
}

.mission-meta {
  display: grid;
  gap: 10px;
  margin: 0;
}

.mission-meta div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  border-top: 1px solid rgba(125, 211, 252, 0.12);
  padding-top: 10px;
}

.mission-meta dt {
  color: #93c5fd;
  font-size: 12px;
  font-weight: 900;
}

.mission-meta dd {
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  margin: 0;
}

.challenge-clock {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
  margin-top: 18px;
  border: 1px solid rgba(250, 204, 21, 0.28);
  border-radius: var(--radius);
  background: rgba(250, 204, 21, 0.09);
  color: #fde68a;
  padding: 12px;
}

.challenge-clock span {
  grid-row: span 2;
}

.challenge-clock strong {
  color: #ffffff;
  font-size: 24px;
}

.listen-pass {
  margin-top: 18px;
  border-top: 1px solid rgba(125, 211, 252, 0.12);
  padding-top: 16px;
}

.listen-pass h3 {
  color: #ffffff;
  font-size: 16px;
}

.listen-pass li {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
}

.listen-pass li.active,
.listen-pass li.done {
  color: #a7f3d0;
}

.session-audit {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: var(--radius);
  background: rgba(2, 6, 23, 0.3);
  padding: 14px;
}

.session-audit h3 {
  color: #ffffff;
  font-size: 15px;
  margin: 0;
}

.session-audit ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.session-audit li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
}

.session-audit li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(46, 232, 120, 0.14);
  color: #a7f3d0;
  font-size: 10px;
}

.session-audit li.warn span {
  background: rgba(250, 204, 21, 0.12);
  color: #fde68a;
}

.session-audit p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.player-topline,
.stage-heading,
.result-panel {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.mode-status {
  flex: 0 0 auto;
  border: 1px solid rgba(46, 232, 120, 0.34);
  border-radius: 999px;
  background: rgba(46, 232, 120, 0.14);
  color: #d0ffd8;
  font-size: 12px;
  font-weight: 900;
  padding: 8px 10px;
}

.waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 86px;
  margin: 18px 0;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.52)),
    repeating-linear-gradient(90deg, rgba(125, 211, 252, 0.05) 0 1px, transparent 1px 18px);
  padding: 14px;
}

.wave-bar {
  width: 5px;
  min-height: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #38bdf8, #2ee878);
  opacity: 0.42;
  transform-origin: center;
}

.waveform.playing .wave-bar {
  animation: pulse-wave 0.72s ease-in-out infinite alternate;
  opacity: 1;
}

@keyframes pulse-wave {
  from { transform: scaleY(0.42); }
  to { transform: scaleY(1.08); }
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.mode-tab {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 10px;
  text-align: left;
}

.mode-tab span {
  color: #94a3b8;
  font-size: 11px;
}

.mode-tab.chaos.active {
  border-color: rgba(248, 113, 113, 0.62);
  background: rgba(248, 113, 113, 0.12);
}

.stage-card.stage-locked {
  opacity: 0.58;
  filter: grayscale(0.85);
  pointer-events: none;
}

.stage-card.stage-locked .keyword-strip,
.stage-card.stage-locked .fill-blanks,
.stage-card.stage-locked .hint-actions,
.stage-card.stage-locked .connected-panel,
.stage-card.stage-locked .transcript,
.stage-card.stage-locked .native-line,
.stage-card.stage-locked .sound-timeline,
.stage-card.stage-locked .breakdown-grid,
.stage-card.stage-locked #finish-mission {
  display: none;
}

.stage-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(46, 232, 120, 0.42);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.94);
  color: #a7f3d0;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 14px;
  padding: 5px 10px;
}

.roleplay-options {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.roleplay-btn {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 12px 14px;
  text-align: left;
}

.roleplay-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 211, 252, 0.42);
  background: rgba(255, 255, 255, 0.07);
}

.option-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  background: rgba(125, 211, 252, 0.12);
  color: #bfdbfe;
}

.roleplay-btn.correct {
  border-color: rgba(46, 232, 120, 0.72);
  background: rgba(46, 232, 120, 0.14);
}

.roleplay-btn.wrong {
  border-color: rgba(248, 113, 113, 0.72);
  background: rgba(248, 113, 113, 0.12);
}

.confidence-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.confidence-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.3);
  padding: 6px 10px;
}

.answer-feedback {
  min-height: 22px;
  color: #fde68a;
  font-weight: 800;
  line-height: 1.45;
  margin: 14px 0 0;
}

.keyword-strip {
  margin: 16px 0 12px;
}

.keyword-strip span {
  border: 1px solid rgba(250, 204, 21, 0.28);
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.08);
  color: #fde68a;
  font-size: 13px;
  font-weight: 900;
  padding: 7px 10px;
}

.keyword-strip.is-hidden span {
  color: transparent;
  text-shadow: 0 0 8px rgba(253, 230, 138, 0.65);
}

.fill-blanks {
  min-height: 74px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: var(--radius);
  background: rgba(2, 6, 23, 0.38);
  color: #e2e8f0;
  font-size: 18px;
  line-height: 2.25;
  margin-top: 14px;
  padding: 16px;
}

.fill-blanks input {
  width: min(150px, 42vw);
  border: 0;
  border-bottom: 2px solid #38bdf8;
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  font: inherit;
  font-weight: 900;
  margin: 0 5px;
  outline: none;
  padding: 4px 8px;
  text-align: center;
}

.fill-blanks input.correct {
  border-color: #2ee878;
  background: rgba(46, 232, 120, 0.12);
}

.fill-blanks input.wrong {
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

.connected-panel,
.native-line {
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--radius);
  background: rgba(56, 189, 248, 0.08);
  color: #dbeafe;
  margin-top: 14px;
  padding: 14px;
}

.transcript {
  border-left: 4px solid #2ee878;
  color: #ffffff;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.5;
  margin: 16px 0;
  padding-left: 14px;
}

.native-line {
  display: grid;
  gap: 5px;
}

.native-line span {
  color: #93c5fd;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.native-line strong {
  color: #fde68a;
  font-size: 18px;
}

.phrase-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border-radius: 999px;
  font-size: 13px;
  padding: 7px 10px;
}

.breakdown-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 14px;
  margin: 16px 0;
}

.breakdown-grid > div {
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: var(--radius);
  background: rgba(2, 6, 23, 0.34);
  padding: 16px;
}

.breakdown-grid h4 {
  color: #ffffff;
  margin: 0 0 10px;
}

.breakdown-grid ul,
.breakdown-grid p {
  color: #cbd5e1;
  line-height: 1.55;
}

.result-panel {
  border-color: rgba(46, 232, 120, 0.42);
  background:
    linear-gradient(135deg, rgba(46, 232, 120, 0.14), rgba(56, 189, 248, 0.1)),
    rgba(15, 23, 42, 0.94);
}

button:disabled,
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}

@media (max-width: 1240px) {
  .lab-workspace {
    max-width: var(--container);
  }

  .mission-shell {
    grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  }

  .session-player-card {
    grid-column: 1 / -1;
    position: static;
  }

  .session-player-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1060px) {
  .command-hero,
  .lab-dashboard-grid,
  .mission-shell {
    grid-template-columns: 1fr;
  }

  .session-player-card {
    order: 1;
  }

  .mission-context {
    order: 2;
  }

  .audio-workbench {
    order: 3;
  }

  .mission-context,
  .session-player-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .listening-command {
    padding-top: 28px;
  }

  .command-copy,
  .diagnostic-panel,
  .mission-map,
  .insight-panel,
  .mission-context,
  .session-player-card,
  .player-panel,
  .stage-card,
  .result-panel {
    padding: 18px;
  }

  .command-copy {
    min-height: 430px;
  }

  .mission-grid,
  .mode-tabs,
  .breakdown-grid,
  .session-player-actions {
    grid-template-columns: 1fr;
  }

  .mission-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .mission-count {
    justify-content: center;
  }

  .mission-card {
    grid-template-columns: 46px minmax(0, 1fr);
    min-height: auto;
  }

  .player-topline,
  .stage-heading,
  .result-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .mission-meta div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .waveform {
    gap: 3px;
    overflow: hidden;
  }

  .wave-bar {
    width: 4px;
  }

  .fill-blanks {
    font-size: 16px;
  }
}

/* --- Premium Custom Enhancements for Listening Lab --- */

/* Live Subtitle & Transcript highlighting styling */
.live-transcript-box {
  margin: 18px 0;
  padding: 18px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid rgba(125, 211, 252, 0.15);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 20px;
  line-height: 1.6;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.voice-word {
  display: inline-block;
  margin: 0 4px;
  transition: all 0.12s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
  border-bottom: 2px solid transparent;
}

.voice-word.highlighted {
  color: #70f59d;
  text-shadow: 0 0 12px rgba(112, 245, 157, 0.7);
  transform: scale(1.1) translateY(-1px);
  border-bottom-color: #2ee878;
}

.live-subtitle-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #94a3b8;
  font-size: 16px;
  font-weight: 600;
}

.voice-wave-animation {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.voice-wave-animation span {
  display: inline-block;
  width: 3px;
  height: 100%;
  border-radius: 99px;
  background: #38bdf8;
  animation: voice-bar-pulse 0.6s ease-in-out infinite alternate;
}

.voice-wave-animation span:nth-child(2) {
  animation-delay: 0.15s;
  background: #2ee878;
}

.voice-wave-animation span:nth-child(3) {
  animation-delay: 0.3s;
  background: #38bdf8;
}

.voice-wave-animation span:nth-child(4) {
  animation-delay: 0.45s;
  background: #2ee878;
}

@keyframes voice-bar-pulse {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1.1); }
}

/* Gamified Skills & Weakness Report */
.mistake-item {
  display: grid !important;
  gap: 6px;
  border-bottom: 1px solid rgba(125, 211, 252, 0.1) !important;
  padding-bottom: 12px;
}

.mistake-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.mistake-info span {
  font-weight: 700;
  color: #e2e8f0;
}

.mistake-info strong {
  font-size: 12px;
  color: #94a3b8;
}

.mistake-progress-track {
  overflow: hidden;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
}

.mistake-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Full width modifiers for dashboard */
.command-hero.full-width,
.lab-dashboard-grid.full-width {
  grid-template-columns: 1fr !important;
}

/* Tab selector matching Vocab style */
.listening-mode-switch {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  width: fit-content;
  padding: 6px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 38px rgba(0, 0, 0, 0.24);
  margin-bottom: 24px;
}

.listening-mode-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  min-width: 120px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #cbd5e1;
  font-weight: 900;
  padding: 8px 16px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.listening-mode-tab:hover {
  border-color: rgba(125, 211, 252, 0.34);
  color: #ffffff;
}

.listening-mode-tab.is-active {
  background: linear-gradient(135deg, #22d3ee, #2ee878);
  color: #042f2e;
  box-shadow: 0 14px 30px rgba(46, 232, 120, 0.20);
}

/* Progress View Layout Redesign (Matching Vocab Polish Standard) */
/* Unified Listening Progress & Weakness Card */
.listening-progress-unified-card {
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(46, 232, 120, 0.12), transparent 35%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.98));
  padding: 32px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

.listening-progress-top-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 24px;
  align-items: center;
}

.listening-unified-divider {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  margin: 4px 0;
}

.mistake-bank-scroll-container {
  margin-top: 10px;
}

.listening-progress-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 24px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 20px;
  background:
    radial-gradient(circle at top left, rgba(46, 232, 120, 0.12), transparent 32%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.96));
  padding: 24px;
  margin-bottom: 24px;
}

.listening-progress-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.listening-progress-copy p.eyebrow {
  margin: 0;
  color: #2ee878;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.listening-progress-score-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.listening-progress-copy h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(3rem, 6vw, 4.5rem);
  line-height: 1;
  font-weight: 900;
}

.listening-progress-copy p {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.5;
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 4px;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22d3ee, #2ee878);
  box-shadow: 0 0 12px rgba(46, 232, 120, 0.4);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.listening-progress-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-self: start;
  margin-top: -10px;
  margin-left: -24px;
}

.listening-progress-metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-height: 100px;
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.44);
  padding: 19px;
}

.listening-progress-metric span {
  color: #9be8ff;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.listening-progress-metric strong {
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
}

.listening-progress-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.listening-progress-grid .stat-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 120px;
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.6);
  padding: 18px;
  backdrop-filter: blur(12px);
}

.listening-progress-grid .stat-card span {
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.listening-progress-grid .stat-card strong {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.3;
}

.listening-progress-grid .stat-card small {
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.82rem;
}

/* Mistake Bank Styling (Fixed Text Squishing & Bar Length) */
.progress-card.weakness-card {
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.6);
  padding: 24px;
}

.progress-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.card-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(46, 232, 120, 0.14);
  border: 1px solid rgba(46, 232, 120, 0.3);
  color: #2ee878;
  font-size: 18px;
}

.progress-card-header h3 {
  margin: 0 0 4px;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
}

.progress-card-desc {
  margin: 0;
  color: #94a3b8;
  font-size: 0.88rem;
}

.mistake-bank {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mistake-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
}

.mistake-item:last-child {
  border-bottom: none;
}

.mistake-item:hover {
  background: transparent;
}

.mistake-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.mistake-label {
  color: #f8fafc;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}

.mistake-track {
  background: transparent;
  height: 8px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  box-sizing: border-box;
}

.mistake-fill {
  width: 100%;
  min-width: 100%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #22d3ee, #2ee878);
  box-shadow: 0 0 12px rgba(46, 232, 120, 0.4);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.mistake-count {
  color: #2ee878;
  font-weight: 800;
  font-size: 0.82rem;
  background: rgba(46, 232, 120, 0.12);
  border: 1px solid rgba(46, 232, 120, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.mistake-empty {
  color: #94a3b8;
  font-size: 0.92rem;
  padding: 20px;
  text-align: center;
  font-style: italic;
}

/* ==========================================================================
   NEW WORKSPACE LAYOUT (Đậu TOEIC Inspired)
   ========================================================================= */
.workspace-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(125, 211, 252, 0.12);
  padding-bottom: 8px;
}

.workspace-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* LEFT SIDEBAR: Session List */
.workspace-sidebar {
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.85);
  padding: 16px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-topic-header {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(125, 211, 252, 0.12);
  padding-bottom: 12px;
  margin-bottom: 12px;
  color: #2ee878;
}

.sidebar-topic-header span {
  font-size: 18px;
}

.sidebar-topic-header strong {
  font-size: 15px;
  color: #ffffff;
}

.sidebar-session-list {
  display: grid;
  gap: 8px;
}

.sidebar-session-item {
  border-radius: 12px;
  border: 1px solid transparent;
  overflow: hidden;
  transition: all 0.2s ease;
}

.sidebar-session-item.active {
  border-color: rgba(46, 232, 120, 0.3);
  background: rgba(46, 232, 120, 0.05);
}

.session-header-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-weight: 700;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.session-header-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-session-item.active .session-header-btn {
  color: #2ee878;
}

.session-stages-list {
  display: grid;
  padding: 0 10px 10px 24px;
  gap: 4px;
}

.stage-link {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 6px 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #94a3b8;
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stage-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.stage-link.active {
  color: #ffffff;
  background: rgba(34, 211, 238, 0.16);
  font-weight: 700;
}

/* MAIN WORKSPACE PANEL */
.workspace-main-panel {
  display: grid;
  gap: 20px;
}

/* Top Toolbar */
.workspace-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.75);
  padding: 12px 18px;
}

.toolbar-playback {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolbar-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(125, 211, 252, 0.2);
  background: rgba(2, 6, 23, 0.5);
  color: #cbd5e1;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toolbar-btn:hover {
  color: #ffffff;
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(2, 6, 23, 0.8);
  transform: scale(1.05);
}

.toolbar-btn.play-btn {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #22d3ee, #2ee878);
  border: none;
  color: #042f2e;
  font-size: 18px;
}

.toolbar-btn.play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 15px rgba(46, 232, 120, 0.3);
}

.toolbar-status-text {
  color: #94a3b8;
  font-weight: 700;
  font-size: 13.5px;
  margin: 0 8px;
}

/* Speed Controls */
.toolbar-speeds {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: 999px;
  padding: 4px;
  background: rgba(2, 6, 23, 0.4);
}

.speed-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.speed-btn:hover {
  color: #ffffff;
}

.speed-btn.active {
  background: rgba(34, 211, 238, 0.16);
  border-color: rgba(34, 211, 238, 0.3);
  color: #22d3ee;
}

.speed-btn.chaos-speed.active {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* Top Mode Tabs */
.workspace-tabs {
  display: flex;
  background: rgba(2, 6, 23, 0.4);
  border: 1px solid rgba(125, 211, 252, 0.1);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}

.workspace-tab {
  padding: 6px 18px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.workspace-tab:hover {
  color: #ffffff;
}

.workspace-tab.is-active {
  background: #0284c7;
  color: #ffffff;
}

/* Exercise Content Card */
.exercise-content-card {
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.03), transparent 40%),
    rgba(15, 23, 42, 0.6);
  padding: 24px;
  min-height: 280px;
}

.stage-intro {
  margin-bottom: 20px;
}

.stage-intro h3 {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 18px;
}

.stage-intro p {
  margin: 0;
  color: #94a3b8;
  font-size: 13.5px;
}

/* STAGE 1: Multiple Choice roleplay-card */
.roleplay-card-box {
  background: rgba(2, 6, 23, 0.4);
  border: 1px solid rgba(125, 211, 252, 0.1);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 18px;
}

.roleplay-question-title {
  margin: 0 0 16px;
  font-size: 16px;
  color: #ffffff;
  line-height: 1.4;
}

/* STAGE 2: Dictation Box */
.dictation-filling-box {
  background: rgba(2, 6, 23, 0.5);
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 12px;
  padding: 24px;
  font-size: 18px;
  line-height: 2;
  color: #f8fafc;
  margin-bottom: 18px;
  text-align: center;
  min-height: 100px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.dictation-filling-box input {
  display: inline-block;
  background: rgba(34, 211, 238, 0.08);
  border: 1px dashed rgba(34, 211, 238, 0.4);
  border-radius: 6px;
  color: #22d3ee;
  font: inherit;
  font-weight: 700;
  text-align: center;
  padding: 2px 6px;
  width: 90px;
  transition: all 0.2s ease;
}

.dictation-filling-box input:focus {
  outline: none;
  background: rgba(34, 211, 238, 0.15);
  border-color: #22d3ee;
  border-style: solid;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.2);
}

.dictation-filling-box input.correct {
  background: rgba(46, 232, 120, 0.12);
  border-color: #2ee878;
  border-style: solid;
  color: #2ee878;
}

.dictation-filling-box input.wrong {
  background: rgba(239, 68, 68, 0.12);
  border-color: #ef4444;
  border-style: solid;
  color: #ef4444;
}

.dictation-hints-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.hint-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  background: rgba(2, 6, 23, 0.4);
  color: #cbd5e1;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hint-btn:hover:not(:disabled) {
  color: #ffffff;
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(2, 6, 23, 0.7);
}

.hint-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.hint-btn.reset-btn {
  margin-left: auto;
  border-color: rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.05);
  color: #fecaca;
}

.hint-btn.reset-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
}

/* STAGE 3: Explanation */
.transcript-display-box {
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 22px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.transcript-display-box .transcript {
  font-size: 17px;
  line-height: 1.6;
  color: #ffffff;
  margin: 0 0 12px;
}

.transcript-display-box .native-line {
  border-top: 1px solid rgba(125, 211, 252, 0.1);
  padding-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.transcript-display-box .native-line span {
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
}

.transcript-display-box .native-line strong {
  font-size: 15px;
  color: #2ee878;
}

.breakdown-card {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: 12px;
  padding: 16px;
}

.breakdown-card h4 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #22d3ee;
}

.breakdown-card ul {
  margin: 0;
  padding-left: 18px;
  color: #cbd5e1;
}

.breakdown-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.5;
}

.action-footer {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

/* Shortcuts Legend at Bottom */
.shortcuts-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  margin-top: 10px;
}

.shortcuts-legend code {
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(125, 211, 252, 0.14);
  padding: 2px 6px;
  border-radius: 4px;
  color: #cbd5e1;
}

/* Responsive workspace rules */
@media (max-width: 900px) {
  .workspace-layout {
    grid-template-columns: 1fr;
  }
}

/* TOEIC Main 4-Column Grid Layout */
.toeic-main-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
  margin-top: 18px !important;
  box-sizing: border-box !important;
}

@media (max-width: 1100px) {
  .toeic-main-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 600px) {
  .toeic-main-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  }
}

.toeic-grid-card {
  width: 100%;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.toeic-grid-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.toeic-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.toeic-card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.toeic-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: 0.3px;
}

.toeic-badge.test-badge {
  background: rgba(14, 165, 233, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.toeic-badge.part1-badge {
  background: rgba(20, 184, 166, 0.18);
  color: #2dd4bf;
  border: 1px solid rgba(45, 212, 191, 0.3);
}

.toeic-badge.part2-badge {
  background: rgba(168, 85, 247, 0.18);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.3);
}

.toeic-badge.part3-badge {
  background: rgba(249, 115, 22, 0.18);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.3);
}

.toeic-badge.part4-badge {
  background: rgba(244, 63, 94, 0.18);
  color: #fb7185;
  border: 1px solid rgba(251, 113, 133, 0.3);
}

.toeic-folder-icon {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.toeic-card-body {
  margin: 6px 0;
}

.toeic-card-count {
  font-size: 1.45rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toeic-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toeic-card-status {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.toeic-card-btn {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #ffffff;
  border: none;
  font-weight: 800;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.25);
}

.toeic-card-btn:hover {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  transform: translateX(2px);
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.4);
}

/* Sidebar Accordion Tree Styles matching Image 1 */
.workspace-sidebar {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.workspace-sidebar.is-hidden {
  display: none !important;
}

.sidebar-group-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(125, 211, 252, 0.1);
  border-radius: 10px;
  color: #e2e8f0;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 4px;
}

.sidebar-group-header:hover {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(56, 189, 248, 0.25);
}

.sidebar-group-header.is-active {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.4);
  color: #10b981;
}

.sidebar-group-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 12px;
  margin-bottom: 10px;
}

.sidebar-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-item-row:hover {
  background: rgba(51, 65, 85, 0.4);
  color: #ffffff;
}

.sidebar-item-row.is-active {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  font-weight: 800;
}


