.oral-page {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
  max-width: 1180px;
}

.coach-sidebar {
  position: sticky;
  top: 22px;
  display: grid;
  gap: 18px;
  align-content: start;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: rgba(21, 24, 28, 0.82);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  padding: var(--space-4);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: #20252c;
  border: 1px solid rgba(193, 18, 31, 0.4);
  color: #fff;
}

.coach-nav {
  display: grid;
  gap: 8px;
}

.coach-nav a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 750;
  padding: 11px 12px;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.coach-nav a:hover,
.coach-nav a.active {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  color: var(--accent);
}

.coach-nav a.exam-nav-link.active {
  border-color: rgba(193, 18, 31, 0.45);
  background: rgba(193, 18, 31, 0.14);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--accent);
}

.coach-workspace {
  min-width: 0;
}

.app-header {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--text);
  padding: 0 0 var(--space-3);
}

.app-header::after {
  content: none;
}

.app-header h1,
.app-header .intro,
.header-topline {
  position: relative;
  z-index: 1;
}

.app-header h1 {
  color: var(--text);
}

.app-header .intro {
  color: var(--muted);
  font-weight: 800;
}

.app-header .app-title {
  font-size: clamp(2.2rem, 3.5vw, 3rem);
}

.header-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.back-link {
  width: fit-content;
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
}

.back-link:hover {
  color: #ffe47a;
  text-decoration: underline;
}

.mode-badge,
.section-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border-radius: 999px;
  font-weight: 900;
}

.mode-badge {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  padding: 7px 12px;
}

.section-label {
  margin-bottom: 7px;
  color: var(--muted-2);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.exam-config,
.question-area,
.record-panel,
.feedback-area,
.result-area {
  display: grid;
  gap: var(--space-3);
  padding: clamp(18px, 3vw, 26px);
  margin-bottom: var(--space-4);
}

.panel-title p {
  color: var(--muted-2);
  font-weight: 700;
}

.exam-config {
  gap: var(--space-3);
  border-top: 1px solid var(--border-subtle);
  opacity: 0.96;
  padding: clamp(16px, 2.4vw, 22px);
}

.exam-config .panel-title h2 {
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
}

.question-area {
  border: 1px solid rgba(241, 191, 0, 0.16);
  background:
    linear-gradient(180deg, rgba(241, 191, 0, 0.035), rgba(34, 39, 47, 0.98)),
    var(--bg-elevated);
  box-shadow: var(--shadow-panel);
  padding: clamp(22px, 3.5vw, 34px);
}

.question-area::before {
  content: none;
}

.record-panel {
  border-top: 1px solid rgba(193, 18, 31, 0.26);
}

.feedback-area {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.panel-title,
.question-header,
.record-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-title {
  justify-content: start;
}

.panel-title h2,
.record-header h2,
.feedback-area h2,
.result-area h2 {
  font-size: clamp(1.18rem, 2vw, 1.55rem);
}

.question-header {
  align-items: start;
}

.question-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.question-area h2 {
  max-width: 860px;
  font-size: clamp(1.9rem, 3.5vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.exam-progress {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: rgba(18, 18, 18, 0.26);
  padding: 10px 12px;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted-2);
  font-size: 0.84rem;
  font-weight: 900;
}

.progress-meta strong {
  color: var(--accent);
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #111315;
}

.progress-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.22s ease;
}

.translation-box {
  display: none;
  border: 1px solid rgba(241, 191, 0, 0.22);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  background: rgba(241, 191, 0, 0.075);
  color: var(--muted);
  padding: 14px 16px;
  font-weight: 700;
}

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

.record-button {
  background: var(--primary);
}

.recording-status {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-weight: 900;
  padding: 7px 12px;
}

.recording-status.is-recording {
  background: rgba(193, 18, 31, 0.16);
  color: #ffb4b8;
  border-color: rgba(193, 18, 31, 0.45);
  box-shadow: none;
}

.transcript-card,
.feedback-block,
.score-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(17, 19, 21, 0.58);
  padding: var(--space-4);
  box-shadow: none;
}

.transcript-card {
  display: grid;
  gap: 8px;
}

.transcript-card h3,
.feedback-block h3 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
}

.transcript-card p,
.feedback-block p {
  color: var(--muted);
}

.feedback-content {
  display: grid;
  gap: 14px;
}

.feedback-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.variation-section {
  grid-column: 1 / -1;
}

.pronunciation-block {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  border-color: rgba(241, 191, 0, 0.18);
}

.pronunciation-block.is-loading {
  color: var(--muted);
}

.pronunciation-score-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.pronunciation-metric {
  display: grid;
  gap: 4px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  padding: 10px;
}

.pronunciation-metric small {
  color: var(--muted-2);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.pronunciation-metric strong {
  color: var(--accent-bright);
  font-size: 1.2rem;
  font-weight: 950;
}

.pronunciation-word-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.pronunciation-word-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(241, 191, 0, 0.18);
  border-radius: 999px;
  background: rgba(241, 191, 0, 0.07);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 850;
  padding: 7px 10px;
}

.pronunciation-word-list strong {
  color: var(--accent-bright);
  font-size: 0.78rem;
}

.score-card {
  display: grid;
  gap: 8px;
  border-color: rgba(46, 125, 50, 0.22);
  background: rgba(46, 125, 50, 0.08);
}

.dynamic-score {
  gap: 10px;
  border-color: color-mix(in srgb, var(--score-color) 42%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--score-color) 14%, transparent), rgba(17, 19, 21, 0.68));
}

.score-label,
.score-meta {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.score-value {
  color: var(--score-color);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 950;
  line-height: 0.95;
}

.score-bar {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.score-bar-fill {
  width: var(--score-percent);
  height: 100%;
  border-radius: inherit;
  background: var(--score-color);
  box-shadow: 0 0 18px color-mix(in srgb, var(--score-color) 34%, transparent);
  transition: width 0.22s ease, background 0.22s ease;
}

.score-number {
  color: #77d879;
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.keyword-list li {
  border: 1px solid rgba(46, 125, 50, 0.35);
  border-radius: 999px;
  background: rgba(46, 125, 50, 0.14);
  color: #77d879;
  font-weight: 900;
  padding: 7px 11px;
}

.keyword-list .missing {
  border-color: rgba(193, 18, 31, 0.4);
  background: rgba(193, 18, 31, 0.14);
  color: #ffb4b8;
}

.variation-list {
  display: grid;
  gap: 12px;
  margin: 0;
  color: var(--text);
}

.variation-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  padding: 13px;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.variation-card.is-playing {
  border-color: rgba(241, 191, 0, 0.52);
  background: rgba(241, 191, 0, 0.08);
  transform: translateY(-1px);
}

.variation-header,
.variation-audio-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.variation-header {
  justify-content: space-between;
}

.variation-type,
.variation-level {
  font-size: 0.76rem;
  font-weight: 900;
}

.variation-type {
  color: var(--accent-bright);
  text-transform: uppercase;
}

.variation-level {
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--muted);
  padding: 4px 8px;
}

.variation-text {
  color: var(--text);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.45;
}

.variation-explanation {
  color: var(--muted);
  font-size: 0.9rem;
}

.variation-play-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid rgba(241, 191, 0, 0.35);
  border-radius: 999px;
  background: rgba(241, 191, 0, 0.1);
  color: var(--accent-bright);
  cursor: pointer;
  font-weight: 950;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.variation-play-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(241, 191, 0, 0.6);
  background: rgba(241, 191, 0, 0.16);
}

.variation-play-btn.is-playing {
  color: #101214;
  background: var(--accent);
}

.variation-waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  flex: 1;
  height: 34px;
  overflow: hidden;
}

.wave-bar {
  width: 4px;
  height: calc(8px + (var(--bar-index) % 5) * 4px);
  border-radius: 999px;
  background: rgba(241, 191, 0, 0.34);
  transform-origin: center;
}

.variation-card.is-playing .wave-bar {
  animation: wavePulse var(--variation-duration, 3s) ease-in-out infinite;
  animation-delay: calc(var(--bar-index) * 45ms);
  background: var(--accent-bright);
}

.variation-duration {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  min-width: 34px;
  text-align: right;
}

@keyframes wavePulse {
  0%,
  100% {
    transform: scaleY(0.55);
    opacity: 0.55;
  }

  45% {
    transform: scaleY(1.2);
    opacity: 1;
  }
}

.result-area {
  display: none;
}

.result-area.show {
  display: grid;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

@media (max-width: 980px) {
  .oral-page {
    grid-template-columns: 1fr;
  }

  .coach-sidebar {
    position: static;
    min-height: auto;
  }

  .coach-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .coach-nav a {
    text-align: center;
  }
}

@media (max-width: 760px) {
  .header-topline,
  .question-header,
  .record-header,
  .challenge-banner {
    align-items: start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .coach-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .question-badges {
    justify-content: flex-start;
  }

  .feedback-grid {
    grid-template-columns: 1fr;
  }

  .pronunciation-score-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
