.listening-wrap { display: flex; flex-direction: column; gap: 1.4rem; }

/* Hidden YouTube video; playback is exposed through the custom audio controls. */
.audio-yt-wrap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  left: -9999px;
}
.audio-yt-frame,
.audio-yt-frame iframe {
  width: 1px;
  height: 1px;
}

/* Custom audio player bar */
.audio-controls {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}
.audio-title {
  font-family: var(--font-jp);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  min-width: 6rem;
}
.audio-play-btn {
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s ease;
  min-width: 4.5rem;
  text-align: center;
}
.audio-play-btn:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}
.audio-seek {
  flex: 1;
  min-width: 80px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.audio-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}
.audio-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}
.audio-time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 3.5rem;
  text-align: right;
  white-space: nowrap;
}

/* Tab bar */
.l-tabs { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.l-tab {
  padding: 0.4rem 0.9rem; border-radius: var(--radius); border: 1px solid var(--border);
  font-size: 0.8rem; font-weight: 700; font-family: var(--font-sans);
  cursor: pointer; background: transparent; color: var(--text-secondary);
  transition: all 0.12s ease;
}
.l-tab:hover { border-color: var(--accent); color: var(--accent); }
.l-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Dialogue card */
.listening-questions { padding: 0; }
.listening-questions .ex-body { padding-bottom: 1.1rem; }
.listening-questions .ex-header h3 { font-size: 1.05rem; }
.l-dialogue { display: flex; flex-direction: column; gap: 0.5rem; }
.l-dline {
  display: flex; gap: 0.6rem; align-items: baseline;
  padding: 0.3rem 0; border-bottom: 1px dotted var(--border-light);
}
.l-dline:last-child { border-bottom: none; }
.l-speaker {
  font-family: var(--font-sans); font-size: 0.85rem; font-weight: 700;
  color: var(--accent); min-width: 5.5rem; flex-shrink: 0;
}
.l-text { font-family: var(--font-jp); font-size: 0.95rem; color: var(--ink); line-height: 2; }

/* Blank input */
.l-blank-wrap { display: inline-flex; flex-direction: column; align-items: stretch; vertical-align: middle; }
.l-blank {
  display: inline-block;
  min-width: 6rem;
}
.l-result {
  display: block;
  margin: 0.2rem 0 0;
  padding: 0.15rem 0.4rem;
  white-space: nowrap;
}
.l-blank[style*="error"] { border-bottom-color: var(--error); background: var(--error-light); }
.l-dialogue-controls { gap: 0.8rem; }
.l-dialogue-score { font-size: 0.85rem; font-weight: 700; font-family: var(--font-sans); color: var(--success); }
