/* speaking.css — Speaking practice session UI. Reuses exam.css (topbar,
   icon-btn, timer) and base.css (modal, mode-choice cards) as-is; this
   file only adds the single-column practice-card layout specific to
   Speaking (no split prompt/answer pane needed here). */

.loading-text { color: var(--ielts-text-muted); }

/* ---- Speaking landing page: 2 top-level modes (Luyện theo đề / Luyện
   tự do), each revealing its own section below the mode picker. ---- */
.book-block.hidden,
.practice-flow-result.hidden { display: none; }
.speaking-mode-grid { grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .speaking-mode-grid { grid-template-columns: 1fr; } }

.mode-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ielts-text-muted);
  cursor: pointer;
}
.mode-back-btn:hover { color: var(--ielts-text); }
.mode-back-btn .icon { width: 16px; height: 16px; }

/* ---- "Luyện tự do" — saved custom sets + empty state ---- */
.custom-set-card .test-meta { display: flex; flex-direction: column; gap: 2px; }
.custom-set-actions { display: flex; align-items: center; gap: 8px; }
.custom-set-actions .custom-set-practice-btn { flex: 1; }
.custom-set-actions .custom-set-icon-btn {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  padding: 0;
  font-size: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--ielts-text-muted);
}
.custom-set-icon-btn .icon { width: 15px; height: 15px; }
.custom-set-actions .custom-set-edit-btn:hover { color: var(--unio-blue); border-color: var(--unio-blue); }
.custom-set-actions .custom-set-delete-btn:hover { color: var(--ielts-incorrect); border-color: var(--ielts-incorrect); }
.custom-set-create-card {
  border: 1.5px dashed var(--ielts-border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  cursor: pointer;
  color: var(--ielts-text-muted);
  font-weight: 700;
  font-size: 14px;
  gap: 8px;
}
.custom-set-create-card:hover { border-color: var(--unio-blue); color: var(--unio-blue); }

/* ---- Custom-set authoring form (inside #modalBox) ---- */
.modal-box.custom-set-authoring-modal {
  max-width: 760px;
  padding: 0;
  overflow-x: hidden;
  border-color: color-mix(in srgb, var(--unio-blue) 18%, var(--ielts-border));
  background: #f7f9fc;
}
.custom-set-authoring-modal .modal-close-x {
  top: 18px;
  right: 20px;
  z-index: 4;
  color: #586272;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(44,70,95,.1);
  backdrop-filter: blur(8px);
}
.custom-form-header {
  position: relative;
  overflow: hidden;
  padding: 25px 72px 22px 28px;
  border-bottom: 1px solid #e5eaf0;
  background:
    radial-gradient(circle at 91% 18%, rgba(244,190,42,.22) 0 7px, transparent 8px),
    radial-gradient(circle at 83% 70%, rgba(57,121,188,.09) 0 45px, transparent 46px),
    linear-gradient(135deg, #fff9e7, #fffdf8 53%, #eaf5ff);
}
.custom-form-header::after {
  content: "";
  position: absolute;
  right: -35px;
  bottom: -62px;
  width: 145px;
  height: 145px;
  border: 20px solid rgba(57,121,188,.055);
  border-radius: 50%;
}
.custom-form-eyebrow {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: #8c6a0a;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.custom-form-eyebrow .icon { width: 14px; height: 14px; }
.custom-set-authoring-modal .custom-form-header h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
  color: var(--unio-dark);
  font-family: var(--font-heading);
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.2;
}
.custom-form-header h2 span { color: var(--unio-blue); }
.custom-form-header > p {
  position: relative;
  z-index: 1;
  max-width: 530px;
  margin: 8px 0 17px;
  color: #66717f;
  font-size: 13px;
  line-height: 1.55;
}
.custom-form-progress {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  width: min(100%, 340px);
  gap: 9px;
  color: #76808d;
  font-size: 11.5px;
  font-weight: 700;
}
.custom-form-progress span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.custom-form-progress span .icon,
.custom-form-progress span b {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
}
.custom-form-progress span .icon { padding: 4px; color: #fff; background: #2e8a6e; }
.custom-form-progress span b { color: #fff; background: var(--unio-blue); font-size: 10px; }
.custom-form-progress .is-current { color: var(--unio-blue); }
.custom-form-progress > i { flex: 1; height: 1px; background: #ccd5df; }
.custom-form-body { padding: 22px 24px 6px; }
.custom-form-section {
  margin-bottom: 17px;
  padding: 19px;
  border: 1px solid #e0e6ed;
  border-radius: 16px;
  background: var(--ielts-white);
  box-shadow: 0 7px 22px rgba(31,45,61,.045);
}
.custom-form-section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.custom-form-section-heading > div { min-width: 0; }
.custom-form-section-heading h3 { margin: 0; color: var(--ielts-text); font-size: 15px; line-height: 1.35; }
.custom-form-section-heading p { margin: 3px 0 0; color: var(--ielts-text-muted); font-size: 11.8px; line-height: 1.45; }
.custom-form-section-icon,
.custom-form-part-number {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
}
.custom-form-section-icon { color: var(--unio-blue); background: var(--ielts-blue-light); }
.custom-form-section-icon .icon { width: 17px; height: 17px; }
.custom-form-part-number {
  color: #fff;
  background: linear-gradient(145deg, #e5805e, #d85f46);
  box-shadow: 0 6px 14px rgba(216,95,70,.2);
  font-size: 14px;
  font-weight: 850;
}
.custom-topic-count {
  margin-left: auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: #8b6500;
  background: #fff6d6;
  font-size: 10.5px;
  font-weight: 750;
  white-space: nowrap;
}
.custom-form-field { display: block; }
.custom-form-field + .custom-form-field { margin-top: 13px; }
.custom-form-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  color: #3e4855;
  font-size: 12px;
  font-weight: 750;
}
.custom-form-field > span em,
.custom-form-field > span small { color: var(--ielts-text-muted); font-size: 10px; font-style: normal; font-weight: 600; }
.custom-form-field > span em {
  padding: 3px 7px;
  border-radius: 999px;
  color: #a34d37;
  background: #fff0eb;
  letter-spacing: .025em;
  text-transform: uppercase;
}
.custom-form-field input[type="text"],
.custom-form-field textarea {
  width: 100%;
  border: 1px solid #cfd7e1;
  border-radius: 10px;
  padding: 11px 12px;
  outline: none;
  color: var(--ielts-text);
  background: var(--ielts-white);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}
.custom-form-field input[type="text"] { min-height: 44px; }
.custom-form-field textarea { min-height: 112px; resize: vertical; }
.custom-form-field input:focus,
.custom-form-field textarea:focus {
  border-color: var(--unio-blue);
  background: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--unio-blue) 13%, transparent);
}
.custom-form-field input::placeholder,
.custom-form-field textarea::placeholder { color: #9aa4b1; }
.custom-topics-container { display: grid; gap: 12px; }
.custom-topic-row {
  padding: 15px;
  border: 1px solid #dce3eb;
  border-radius: 13px;
  background: linear-gradient(145deg, #fbfcfe, #fff);
}
.custom-topic-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf0f4;
}
.custom-topic-number { color: var(--unio-blue); font-size: 11px; letter-spacing: .035em; text-transform: uppercase; }
.custom-topic-remove-btn {
  display: flex;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  color: var(--ielts-text-muted);
  background: transparent;
  cursor: pointer;
}
.custom-topic-remove-btn:hover:not(:disabled) { color: var(--ielts-incorrect); background: #fff0ef; }
.custom-topic-remove-btn:disabled { opacity: .25; cursor: default; }
.custom-topic-remove-btn .icon { width: 14px; height: 14px; }
.custom-add-topic-btn {
  display: flex;
  width: 100%;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  border: 1.5px dashed #afbdcb;
  border-radius: 11px;
  color: var(--unio-blue);
  background: #f8fbfe;
  font-size: 12.5px;
  font-weight: 750;
}
.custom-add-topic-btn:hover { border-color: var(--unio-blue); background: var(--ielts-blue-light); }
.custom-add-topic-symbol { display: grid; width: 21px; height: 21px; place-items: center; border-radius: 50%; color: #fff; background: var(--unio-blue); font-size: 16px; line-height: 1; }
.custom-set-authoring-modal #customFormError {
  margin: 0 0 15px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--ielts-incorrect) 28%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--ielts-incorrect) 7%, var(--ielts-white));
}
.custom-set-authoring-modal > .modal-actions {
  position: sticky;
  z-index: 3;
  bottom: 0;
  align-items: center;
  margin: 0;
  padding: 14px 24px;
  border-top: 1px solid #e0e6ed;
  background: color-mix(in srgb, var(--ielts-white) 92%, transparent);
  box-shadow: 0 -9px 24px rgba(31,45,61,.055);
  backdrop-filter: blur(12px);
}
.custom-form-back-btn { margin-right: auto; }
.custom-form-back-btn .icon,
.custom-form-save-btn .icon { width: 15px; height: 15px; }
.custom-form-save-hint { color: var(--ielts-text-muted); font-size: 10.5px; }
.custom-form-save-btn { min-width: 142px; justify-content: center; border-radius: 999px; }

.speaking-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  padding: 32px 24px;
  background:
    radial-gradient(circle at 8% 14%, rgba(244,190,42,.13) 0 5px, transparent 6px),
    radial-gradient(circle at 92% 20%, rgba(77,141,206,.1) 0 7px, transparent 8px),
    linear-gradient(145deg, #fbf9f2, #fffdf8 52%, #f3f8fc);
}

.speaking-card {
  width: 100%;
  max-width: 720px;
  background: var(--ielts-white);
  border: 1px solid var(--ielts-border);
  border-radius: 12px;
  padding: 28px 32px;
  align-self: flex-start;
}

/* Active Speaking room — one clear practice label, a friendly coach rail
   and a single question card. The rail replaces the old stack of flat,
   similarly coloured panels without changing any recorder behaviour. */
.speaking-session-stage {
  width: 100%;
  max-width: 990px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  align-self: flex-start;
}
.speaking-coach-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 355px;
  padding: 22px 18px 20px;
  border: 1px solid #f0cf72;
  border-radius: 24px;
  background:
    radial-gradient(circle at 78% 12%, rgba(255,255,255,.92) 0 8px, transparent 9px),
    linear-gradient(155deg, #fff3c9, #fffaf0 58%, #e9f5ff);
  box-shadow: 0 16px 38px rgba(49,43,27,.09);
  text-align: center;
}
.speaking-session-stage-free .speaking-coach-panel {
  border-color: #dac8ed;
  background:
    radial-gradient(circle at 78% 12%, rgba(255,255,255,.92) 0 8px, transparent 9px),
    linear-gradient(155deg, #f1e8fa, #fffaf2 60%, #fff2c9);
}
.speaking-coach-panel::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 120px;
  height: 120px;
  right: -45px;
  bottom: -44px;
  background: url("../assets/images/unio-icon.png") center / contain no-repeat;
  opacity: .09;
  transform: rotate(10deg);
}
.speaking-coach-mode {
  align-self: flex-start;
  padding: 6px 10px;
  border: 1px solid rgba(95,75,17,.1);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: #8b6500;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .065em;
  text-transform: uppercase;
}
.speaking-session-stage-free .speaking-coach-mode { color: #76529a; }
.speaking-coach-mascot {
  width: 128px;
  height: 148px;
  margin: 8px auto 2px;
  object-fit: contain;
  filter: drop-shadow(0 12px 10px rgba(35,42,54,.14));
  transform-origin: 50% 100%;
  animation: speakingCoachFloat 3.2s ease-in-out infinite;
}
.speaking-coach-panel p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #555e6d;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.55;
}
.speaking-coach-wave {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  margin-top: 13px;
}
.speaking-coach-wave i {
  display: block;
  width: 4px;
  height: 9px;
  border-radius: 4px;
  background: #df6948;
  animation: speakingCoachWave 1.2s ease-in-out infinite;
}
.speaking-coach-wave i:nth-child(2) { height: 19px; animation-delay: -.2s; }
.speaking-coach-wave i:nth-child(3) { height: 13px; animation-delay: -.4s; }
.speaking-coach-wave i:nth-child(4) { height: 22px; animation-delay: -.1s; }
.speaking-coach-wave i:nth-child(5) { height: 12px; animation-delay: -.3s; }
.speaking-session-card {
  max-width: none;
  padding: 25px 28px 22px;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--unio-yellow) 36%, var(--ielts-border));
  border-radius: 24px;
  box-shadow: 0 17px 42px rgba(32,39,53,.09);
}
.speaking-session-stage-free .speaking-session-card { border-color: color-mix(in srgb, #8a62ad 30%, var(--ielts-border)); }

.speaking-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 12.5px;
  color: var(--ielts-text-muted);
}
.speaking-session-card .speaking-progress { margin-bottom: 10px; }
.speaking-progress-count-text { margin-left: auto; font-variant-numeric: tabular-nums; }
.speaking-question-progress {
  width: 100%;
  height: 7px;
  margin-bottom: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: #f0eee8;
}
.speaking-question-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--unio-yellow), #ef825d);
  box-shadow: 0 0 12px rgba(244,190,42,.32);
  transition: width 320ms ease;
}
.speaking-session-stage-free .speaking-question-progress span { background: linear-gradient(90deg, #8b67b0, #efb44a); }
.speaking-part-badge {
  display: inline-block;
  background: var(--unio-blue);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
}

.speaking-cuecard {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #fff9e6, #fffdf8 62%, #edf6ff);
  border: 1px solid #ecd88f;
  border-radius: 18px;
  padding: 22px 23px;
  margin-bottom: 22px;
}
.speaking-cuecard::after { content:""; position:absolute; right:-35px; bottom:-42px; width:105px; height:105px; border:15px solid rgba(244,190,42,.09); border-radius:50%; }
.speaking-cuecard h3 { margin: 0; font-size: 16px; color: var(--unio-blue); }
.speaking-cuecard p { margin: 0; font-size: 14.5px; line-height: 1.7; white-space: pre-line; }
.speaking-cuecard-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.speaking-cuecard-time-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--unio-blue);
  background: var(--ielts-blue-light);
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.speaking-question-block {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding: 24px 25px;
  border: 1px solid #ead99f;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff9e8, #fffefb 68%, #eef7ff);
  box-shadow: inset 4px 0 var(--unio-yellow);
}
.speaking-session-stage-free .speaking-question-block { border-color:#ddcee9; background:linear-gradient(145deg,#f5edfb,#fffdf9 68%,#fff5d7); box-shadow:inset 4px 0 #8a62ad; }
.speaking-question-main { flex: 1 1 auto; min-width: 0; }
.speaking-question-mascot { width: 64px; height: 64px; object-fit: contain; flex-shrink: 0; }
.speaking-topic-label {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ielts-text-muted);
  margin-bottom: 8px;
}
.speaking-question-text { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.5; }

.speaking-recorder {
  min-height: 64px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;
}
.speaking-recorder audio { width: 100%; }
.speaking-session-card .speaking-record-orb-wrap {
  border: 1px dashed color-mix(in srgb, var(--unio-yellow) 45%, var(--ielts-border));
  background: radial-gradient(circle at 50% 45%, rgba(244,190,42,.09), transparent 35%);
}
.speaking-session-stage-free .speaking-record-orb-wrap { border-color:color-mix(in srgb,#8a62ad 38%,var(--ielts-border)); background:radial-gradient(circle at 50% 45%,rgba(138,98,173,.08),transparent 35%); }

@keyframes speaking-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------------------------------------------------------------------
 * Animated mic "orb" — the single tap-to-start/tap-to-stop control.
 * Idle: a slow breathing glow inviting a tap. Recording: faster red
 * pulse rings radiating outward + a pulsing core, like a live level
 * meter, so the candidate always has clear at-a-glance feedback that
 * audio is actually being captured.
 * --------------------------------------------------------------------- */
.speaking-record-orb-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 36px 20px;
  border-radius: 16px;
}
.speaking-record-orb {
  position: relative;
  width: 120px;
  height: 120px;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.orb-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(244, 190, 42, 0.55);
  opacity: 0;
  animation: orb-idle-breathe 2.6s ease-in-out infinite;
}
.orb-ring-2 { animation-delay: 0.6s; }
.orb-ring-3 { animation-delay: 1.2s; }
.speaking-record-orb.is-recording .orb-ring {
  border-color: rgba(255, 92, 92, 0.6);
  animation: orb-pulse 1.8s ease-out infinite;
}
.speaking-record-orb.is-recording .orb-ring-2 { animation-delay: 0.5s; }
.speaking-record-orb.is-recording .orb-ring-3 { animation-delay: 1s; }
@keyframes orb-idle-breathe {
  0%, 100% { transform: scale(0.92); opacity: 0.3; }
  50% { transform: scale(1.04); opacity: 0.65; }
}
@keyframes orb-pulse {
  0% { transform: scale(0.72); opacity: 0.9; }
  100% { transform: scale(1.6); opacity: 0; }
}
.orb-core {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--unio-yellow), #ffd966);
  box-shadow: 0 0 24px rgba(244, 190, 42, 0.55), 0 0 50px rgba(244, 190, 42, 0.25);
  color: var(--unio-dark);
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
}
.speaking-record-orb:hover .orb-core { transform: scale(1.05); }
.speaking-record-orb:active .orb-core { transform: scale(0.95); }
.orb-core .icon { width: 32px; height: 32px; }
.orb-stop-icon { width: 22px; height: 22px; background: #fff; border-radius: 6px; }
.speaking-record-orb.is-recording .orb-core {
  background: linear-gradient(145deg, #ff6b6b, #ff3d7a);
  box-shadow: 0 0 26px rgba(255, 61, 122, 0.65), 0 0 60px rgba(255, 61, 122, 0.3);
  animation: orb-core-recording-pulse 1.4s ease-in-out infinite;
}
@keyframes orb-core-recording-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.speaking-record-orb-label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ielts-text);
}
.speaking-record-orb-label .speaking-rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5c7a;
  animation: speaking-pulse 1s infinite;
}
.part2-phase .speaking-record-orb-wrap { padding: 22px 16px; }

.speaking-prep-hint { font-size: 13.5px; color: var(--ielts-text-muted); margin: 0; }

/* ---- Part 2 phase card: note-taking (1 min) -> 3-2-1 -> speaking (2 min).
   Its own inline timer, deliberately separate from the shared topbar
   timerWrap (that one is reserved for the overall session countdown). ---- */
.part2-phase {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 22px;
  border: 1px solid var(--ielts-border);
  border-radius: 10px;
  background: var(--ielts-bg);
}
.part2-phase-mascot { width: 64px; height: 64px; object-fit: contain; flex-shrink: 0; }
.part2-phase-body { flex: 1 1 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.part2-phase-step { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ielts-text-muted); }
.part2-phase-title { margin: 2px 0 0; font-size: 15px; font-weight: 700; color: var(--ielts-text); }
.part2-phase-sub { margin: 0; font-size: 13px; color: var(--ielts-text-muted); }
.part2-phase-timer {
  font-size: 34px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--unio-blue);
  letter-spacing: 0.02em;
  margin: 2px 0;
}
.part2-phase-timer.critical { color: var(--ielts-incorrect); animation: speaking-pulse 1s infinite; }
.part2-phase-recording { flex-direction: column; align-items: center; text-align: center; }
.part2-phase-recording .part2-phase-step,
.part2-phase-recording .part2-phase-title { text-align: center; }

.part2-phase-countdown { flex-direction: column; text-align: center; justify-content: center; padding: 30px 20px; gap: 8px; }
.part2-countdown-mascot { width: 76px; height: 76px; }
.part2-countdown-label { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--ielts-text-muted); }
.part2-countdown-number {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  color: var(--unio-blue);
  animation: part2-countdown-pop 0.5s ease;
}
@keyframes part2-countdown-pop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 480px) {
  .part2-phase { flex-direction: column; text-align: center; padding: 18px; }
  .part2-phase-body { align-items: center; }
  .part2-phase-mascot { width: 52px; height: 52px; }
  .part2-phase-timer { font-size: 28px; }
  .speaking-cuecard-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .speaking-question-mascot { width: 44px; height: 44px; }
  .speaking-record-orb-wrap { padding: 26px 14px; }
  .speaking-record-orb { width: 96px; height: 96px; }
  .orb-core { width: 64px; height: 64px; }
  .orb-core .icon { width: 26px; height: 26px; }
}

.feedback-status { font-size: 12.5px; }
.feedback-status.error { color: var(--ielts-incorrect); font-weight: 600; }
.feedback-status.hidden { display: none; }

.speaking-nav { display: flex; justify-content: space-between; gap: 10px; }
.speaking-session-card .speaking-nav .btn { min-width:128px; border-radius:999px; }
/* While a recording is in progress, Prev/Next are locked (setNavDisabled)
   so the candidate can't navigate away and silently lose it. The base
   .btn:disabled opacity-fade reads as a washed-out/broken button here —
   swap in a solid muted look instead so "locked" reads clearly on its own. */
.speaking-nav .btn:disabled {
  opacity: 1;
  background: var(--ielts-bg);
  border-color: var(--ielts-border);
  color: var(--ielts-text-muted);
}

.speaking-empty-state {
  max-width: 480px;
  text-align: center;
  align-self: center;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.speaking-finish-card h2 { display: flex; align-items: center; gap: 8px; color: var(--ielts-correct); margin-top: 0; }

/* Praise banner on the final results screen, right under the heading. */
.speaking-praise-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: #b8860b;
  background: #fff8e6;
  border: 1px solid #f5e2a8;
  border-radius: 999px;
  padding: 7px 16px;
  margin-bottom: 14px;
}
/* Dark mode — hardcoded light pastel, no theme-aware variant. */
body.dark-theme .speaking-praise-banner {
  color: #e8c766;
  background: #3a2f10;
  border-color: #5a4a1a;
}

/* Grading interstitial — shown right after Finish, before the results
   screen, while any recording is still being scored server-side. */
.speaking-grading-card { text-align: center; align-items: center; display: flex; flex-direction: column; }
.speaking-grading-mascot { width: 88px; height: 88px; object-fit: contain; margin: 0 auto 6px; animation: speaking-grading-float 2.4s ease-in-out infinite; }
@keyframes speaking-grading-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.speaking-grading-wait { width: 100%; max-width: 420px; margin: 18px auto 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.speaking-grading-message { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--ielts-text); }
.speaking-progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: var(--ielts-bg);
  border: 1px solid var(--ielts-border);
  overflow: hidden;
}
.speaking-progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #5b7cff, #9b5cff, #5b7cff);
  background-size: 200% 100%;
  animation: speaking-progress-shimmer 1.4s linear infinite;
  transition: width 0.5s ease;
}
@keyframes speaking-progress-shimmer {
  to { background-position: -200% 0; }
}
.speaking-progress-count { margin: 0; font-size: 12px; color: var(--ielts-text-muted); font-variant-numeric: tabular-nums; }

.speaking-review-list { display: flex; flex-direction: column; gap: 14px; margin: 18px 0 24px; }
.speaking-review-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--ielts-bg);
  border-radius: 8px;
}
.speaking-review-index { font-weight: 700; color: var(--ielts-text-muted); flex-shrink: 0; }
.speaking-review-text { flex: 1 1 240px; font-size: 13.5px; }
.speaking-review-row audio { max-width: 260px; }
.speaking-review-missing { font-size: 12px; color: var(--ielts-text-muted); font-style: italic; }

@media (max-width: 700px) {
  .speaking-main { padding: 18px 14px; }
  .speaking-card { padding: 20px 20px; }
  .speaking-question-text { font-size: 17px; }
  .speaking-session-stage { grid-template-columns: 1fr; gap: 12px; }
  .speaking-coach-panel {
    min-height: 0;
    display: grid;
    grid-template-columns: 74px minmax(0,1fr);
    align-items: center;
    column-gap: 13px;
    padding: 14px 16px;
    border-radius: 18px;
    text-align: left;
  }
  .speaking-coach-mode { grid-column: 2; align-self:end; justify-self:start; }
  .speaking-coach-mascot { grid-column:1; grid-row:1 / span 2; width:70px; height:78px; margin:0; }
  .speaking-coach-panel p { grid-column:2; align-self:start; }
  .speaking-coach-wave { display:none; }
  .speaking-session-card { padding:20px; border-radius:20px; }
}

/* ---------------------------------------------------------------------
 * AI Speaking Scorer — per-response status/result + session report.
 * --------------------------------------------------------------------- */
.ai-status-container { width: 100%; }
.ai-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ielts-text-muted); }
.ai-status-text.ai-status-muted { font-size: 13px; color: var(--ielts-text-muted); font-style: italic; }
.ai-status-spinner {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--ielts-border);
  border-top-color: var(--unio-blue);
  animation: ai-spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes ai-spin {
  to { transform: rotate(360deg); }
}

.ai-result { width: 100%; display: flex; flex-direction: column; gap: 14px; padding-top: 6px; }
.ai-diagnostic-note { font-size: 12px; color: var(--ielts-text-muted); font-style: italic; margin: 0; }

.ai-criteria-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-criterion-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--ielts-bg);
  border: 1px solid var(--ielts-border);
  font-size: 12.5px;
}
.ai-criterion-name { color: var(--ielts-text-muted); }
.ai-criterion-band { font-weight: 700; color: var(--unio-blue); }

.ai-section { display: flex; flex-direction: column; gap: 6px; }
.ai-section h4 { margin: 0; font-size: 13.5px; }
.ai-section ul { margin: 0; padding-left: 20px; font-size: 13px; color: var(--ielts-text); }
.ai-section ul li { margin-bottom: 4px; }

.ai-transcript-details summary,
.ai-criterion-detail summary { cursor: pointer; font-size: 13.5px; font-weight: 600; }
.ai-transcript { margin-top: 8px; font-size: 13.5px; line-height: 1.8; color: var(--ielts-text); }
.ai-word { cursor: pointer; border-radius: 3px; padding: 0 1px; }
.ai-word:hover { background: var(--ielts-blue-light); }

.ai-criterion-detail { margin-top: 8px; padding: 10px 12px; background: var(--ielts-bg); border-radius: 8px; }
.ai-criterion-detail p { margin: 8px 0 0; font-size: 13px; color: var(--ielts-text); }
.ai-next-gap { color: var(--ielts-text-muted); }

.ai-feedback-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ai-feedback-item { padding: 8px 10px; background: var(--ielts-bg); border-radius: 8px; font-size: 13px; }
.ai-feedback-original { color: var(--ielts-incorrect); }
.ai-feedback-corrected { color: var(--ielts-correct); font-weight: 600; }
.ai-feedback-action { margin: 6px 0 0; color: var(--ielts-text); }

.ai-report-issue-btn { align-self: flex-start; font-size: 12px; color: var(--ielts-text-muted); background: none; border: none; text-decoration: underline; cursor: pointer; padding: 0; }
.ai-report-issue-btn:disabled { text-decoration: none; cursor: default; }

.session-report-card {
  margin: 12px 0 24px;
  padding: 18px 20px;
  background: var(--ielts-bg);
  border: 1px solid var(--ielts-border);
}
.session-report-card:empty { display: none; }
.session-report-card h3 { margin: 0 0 6px; font-size: 16px; }
.session-report-overall {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 10px 0;
}
.session-report-overall-label { font-size: 13px; color: var(--ielts-text-muted); }
.session-report-overall-band { font-size: 28px; font-weight: 800; color: var(--unio-blue); }
.session-report-overall-confidence { font-size: 12px; color: var(--ielts-text-muted); }

/* ---------------------------------------------------------------------
 * Detailed session report (lib/speaking-ai/session-report-engine.js) —
 * generated on demand, rendered by public/js/speaking-report.js in the
 * same visual language as the Writing AI report's .writing-report-*
 * classes (public/css/writing.css), just scoped under .speaking-report-*
 * so the two stylesheets never collide.
 * --------------------------------------------------------------------- */
.speaking-detailed-report-area { margin-top: 16px; }
.speaking-detailed-report { display: flex; flex-direction: column; gap: 4px; }
.speaking-report-actions { display: flex; gap: 10px; margin-top: 16px; }

.speaking-report-section { margin: 18px 0; }
.speaking-report-heading { font-size: 15px; margin: 0 0 10px; color: var(--ielts-text); border-bottom: 1px solid var(--ielts-border); padding-bottom: 6px; }
.speaking-feedback-text { font-size: 13.5px; color: var(--ielts-text); line-height: 1.6; margin: 6px 0; }
.speaking-report-note { font-size: 12.5px; color: var(--ielts-text-muted); font-style: italic; }

.speaking-report-score-grid { display: flex; }
.speaking-report-score-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 14px 20px;
  border-radius: 10px;
  background: var(--ielts-bg);
  border: 1px solid var(--ielts-border);
}
.speaking-report-score-block .value { font-size: 32px; font-weight: 800; color: var(--unio-blue); }
.speaking-report-score-block .label { font-size: 12px; color: var(--ielts-text-muted); }
.speaking-report-confidence { font-size: 11.5px; color: var(--ielts-text-muted); }
.speaking-report-limitations { margin: 10px 0 0; padding-left: 20px; font-size: 12.5px; color: var(--ielts-text-muted); }

.speaking-report-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.speaking-report-summary-block { padding: 12px 14px; border-radius: 8px; }
.speaking-report-summary-block h4 { margin: 0 0 6px; font-size: 13px; }
.speaking-report-summary-block ul { margin: 0; padding-left: 18px; font-size: 13px; }
.speaking-report-summary-positive { background: #eefbf0; }
.speaking-report-summary-negative { background: #fdecec; }
/* Dark mode — hardcoded light pastels, no theme-aware variant. */
body.dark-theme .speaking-report-summary-positive { background: #1e3327; }
body.dark-theme .speaking-report-summary-negative { background: #3a2326; }

.speaking-criterion-grid { display: flex; flex-direction: column; gap: 14px; }
.speaking-criterion-card { border: 1px solid var(--ielts-border); border-radius: 10px; padding: 14px 16px; }
.speaking-criterion-head { display: flex; align-items: center; justify-content: space-between; }
.speaking-criterion-head h4 { margin: 0; font-size: 14.5px; }
.speaking-criterion-score { font-size: 20px; font-weight: 800; color: var(--unio-blue); }

.speaking-report-table { border-collapse: collapse; width: 100%; margin: 10px 0; }
.speaking-report-table th, .speaking-report-table td { border: 1px solid var(--ielts-border); padding: 6px 10px; text-align: left; vertical-align: top; font-size: 12.5px; }
.speaking-report-table th { background: var(--ielts-bg); }
.speaking-report-aspect-score { font-weight: 700; color: var(--unio-blue); }
.speaking-report-cell-strike { text-decoration: line-through; color: var(--ielts-incorrect); }
.speaking-report-cell-fix { color: var(--ielts-correct); font-weight: 600; }

.speaking-report-callout { padding: 8px 10px; border-radius: 6px; margin: 6px 0; font-size: 13px; background: var(--ielts-bg); }
.speaking-report-callout-positive { background: #eefbf0; }
.speaking-report-callout-negative { background: #fdecec; }
.speaking-report-callout-action { background: #fff8e6; }
/* Dark mode — hardcoded light pastels, no theme-aware variant. */
body.dark-theme .speaking-report-callout-positive { background: #1e3327; }
body.dark-theme .speaking-report-callout-negative { background: #3a2326; }
body.dark-theme .speaking-report-callout-action { background: #3a2f10; }

.speaking-target-response { border: 1px solid var(--ielts-border); border-radius: 8px; padding: 14px 16px; background: var(--ielts-bg); font-size: 13.5px; line-height: 1.7; }
.speaking-target-response p { margin: 0 0 10px; }
.speaking-target-response p:last-child { margin-bottom: 0; }

@media (max-width: 700px) {
  .speaking-report-summary-grid { grid-template-columns: 1fr; }
}

/* Practice Mode session-timeout toast — brief, dismissible on its own,
   never blocks the recorder underneath (unlike Exam Mode's auto-submit,
   which needs no UI at all beyond the redirect to the results screen). */
.speaking-time-toast {
  position: fixed;
  top: calc(var(--topbar-height, 56px) + 14px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 250;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--unio-dark);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.speaking-time-toast.hidden { display: none; }
.speaking-time-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.speaking-time-toast .icon { width: 16px; height: 16px; flex-shrink: 0; }

/* Speaking picker continuation — makes the revealed guided/free step feel
   connected to the mode choice instead of appearing as an unrelated div. */
.practice-flow-result:not(.hidden) { animation: speakingFlowReveal 420ms ease both; }
.practice-step-header {
  min-height:132px;
  padding:20px 130px 20px 24px;
  border-left:5px solid #dc714f;
  background:linear-gradient(135deg,#fff8df,#fffdf8 62%,#ebf6ff);
}
.practice-step-header-copy { max-width:620px; }
.practice-step-header .practice-flow-step { margin-bottom:7px; }
.practice-step-header h1 { font-size:clamp(25px,3vw,32px); }
.practice-step-header .practice-step-mascot { right:28px; width:88px; max-height:115px; }
.practice-step-header-free {
  border-left-color:#8a62ad;
  background:
    radial-gradient(circle at 84% 25%, rgba(139,94,177,.14), transparent 28%),
    linear-gradient(135deg,color-mix(in srgb,#f2eafa 75%,var(--ielts-white)),var(--ielts-white) 58%,color-mix(in srgb,#fff0c0 76%,var(--ielts-white)));
}

#guidedBooksContainer > [id$="Block"] { margin-bottom:34px; }
#guidedBooksContainer > [id$="Block"]:last-child { margin-bottom:0; }
#guidedBooksContainer .test-card { min-height:220px; }
#guidedBooksContainer .test-card-body { gap:7px; }

#customSetsContainer .test-grid { grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); }
.custom-set-card {
  --set-accent:#7b5aa1;
  display:grid;
  grid-template-columns:92px minmax(0,1fr);
  min-height:150px;
  border-radius:15px;
  border-color:color-mix(in srgb,var(--set-accent) 23%,var(--ielts-border));
  background:linear-gradient(145deg,color-mix(in srgb,var(--set-accent) 5%,var(--ielts-white)),var(--ielts-white));
}
.custom-set-card:nth-child(3n + 2) { --set-accent:#2d7bb9; }
.custom-set-card:nth-child(3n + 3) { --set-accent:#268166; }
.custom-set-visual { position:relative; isolation:isolate; display:grid; place-items:center; overflow:hidden; color:#fff; background:linear-gradient(155deg,color-mix(in srgb,var(--set-accent) 78%,#fff),var(--set-accent)); }
.custom-set-visual::before { content:""; position:absolute; z-index:-1; width:90px; height:90px; right:-54px; top:-40px; border:13px solid rgba(255,255,255,.1); border-radius:50%; }
.custom-set-visual-icon { display:grid; width:43px; height:43px; place-items:center; border:1px solid rgba(255,255,255,.25); border-radius:14px; background:rgba(255,255,255,.13); box-shadow:0 8px 18px rgba(18,25,39,.13); }
.custom-set-visual-icon .icon { width:21px; height:21px; }
.custom-set-wave { position:absolute; bottom:14px; display:flex; align-items:center; gap:3px; height:17px; }
.custom-set-wave i { display:block; width:3px; height:7px; border-radius:3px; background:rgba(255,255,255,.72); animation:customSetWave 1.25s ease-in-out infinite; }
.custom-set-wave i:nth-child(2) { height:15px; animation-delay:-.25s; }
.custom-set-wave i:nth-child(3) { height:10px; animation-delay:-.45s; }
.custom-set-wave i:nth-child(4) { height:14px; animation-delay:-.15s; }
.custom-set-card .test-card-body { justify-content:center; padding:17px; }
.custom-set-label { color:var(--set-accent); font-size:9.5px; font-weight:800; letter-spacing:.07em; text-transform:uppercase; }
.custom-set-card h3 { font-family:var(--font-heading); font-size:17px; }
.custom-set-actions { margin-top:4px; }
.custom-set-actions .custom-set-practice-btn { min-width:90px; }
.custom-set-create-card {
  position:relative;
  min-height:150px;
  flex-direction:column;
  gap:7px;
  border:1.5px dashed color-mix(in srgb,#7b5aa1 45%,var(--ielts-border));
  border-radius:15px;
  background:linear-gradient(145deg,color-mix(in srgb,#7b5aa1 5%,var(--ielts-white)),transparent);
  transition:transform 180ms ease,border-color 180ms ease,box-shadow 180ms ease;
}
.custom-set-create-card:hover { transform:translateY(-4px); border-color:#7b5aa1; color:#6b4b8f; box-shadow:0 12px 26px rgba(85,58,113,.1); }
.custom-set-create-icon { position:relative; display:grid; width:43px; height:43px; place-items:center; border-radius:14px; color:#6f4e94; background:#eee7f6; }
.custom-set-create-icon .icon { width:20px; height:20px; }
.custom-set-create-icon i { position:absolute; right:-4px; bottom:-4px; width:16px; height:16px; border:2px solid var(--ielts-white); border-radius:50%; background:var(--unio-yellow); }
.custom-set-create-icon i::before,
.custom-set-create-icon i::after { content:""; position:absolute; top:6px; left:3px; width:6px; height:2px; border-radius:2px; background:#5a4300; }
.custom-set-create-icon i::after { transform:rotate(90deg); }
.custom-set-create-card small { max-width:190px; color:var(--ielts-text-muted); font-size:10.5px; font-weight:500; text-align:center; }

body.dark-theme .practice-step-header-free { background:radial-gradient(circle at 84% 25%,rgba(139,94,177,.14),transparent 29%),linear-gradient(135deg,#2f2735,#242832 58%,#332e1e); }
body.dark-theme .speaking-main { background:radial-gradient(circle at 8% 14%,rgba(244,190,42,.06) 0 5px,transparent 6px),linear-gradient(145deg,#1d2027,#232831 55%,#1d2831); }
body.dark-theme .speaking-coach-panel { border-color:#5b5032; background:linear-gradient(155deg,#3a321d,#2a2b30 60%,#243542); }
body.dark-theme .speaking-session-stage-free .speaking-coach-panel { border-color:#51435e; background:linear-gradient(155deg,#33283c,#292a30 60%,#39311c); }
body.dark-theme .speaking-coach-panel p { color:#c8c4ba; }
body.dark-theme .speaking-coach-mode { color:#efd172; background:rgba(15,17,22,.42); border-color:rgba(255,255,255,.1); }
body.dark-theme .speaking-question-block,
body.dark-theme .speaking-cuecard { background:linear-gradient(145deg,#342f20,#282b32 65%,#21303b); border-color:#554c32; }
body.dark-theme .speaking-session-stage-free .speaking-question-block { background:linear-gradient(145deg,#33283b,#292b32 66%,#37311f); border-color:#51445b; }
body.dark-theme .modal-box.custom-set-authoring-modal { background:#20242b; border-color:#424b57; }
body.dark-theme .custom-set-authoring-modal .modal-close-x { color:#c1c7d0; background:rgba(29,33,40,.8); border-color:#474e58; }
body.dark-theme .custom-form-header { border-color:#454b53; background:radial-gradient(circle at 91% 18%,rgba(244,190,42,.12) 0 7px,transparent 8px),linear-gradient(135deg,#352f1f,#292c32 55%,#22313e); }
body.dark-theme .custom-set-authoring-modal .custom-form-header h2 { color:#f4f2eb; }
body.dark-theme .custom-form-header > p { color:#b7bec8; }
body.dark-theme .custom-form-progress > i { background:#515963; }
body.dark-theme .custom-form-section { border-color:#414852; background:#292d34; box-shadow:none; }
body.dark-theme .custom-topic-row { border-color:#414852; background:linear-gradient(145deg,#252930,#2c3037); }
body.dark-theme .custom-topic-row-head { border-color:#3b424b; }
body.dark-theme .custom-form-field > span { color:#d8dce2; }
body.dark-theme .custom-form-field input[type="text"],
body.dark-theme .custom-form-field textarea { color:#edf0f4; border-color:#4a535f; background:#22262d; }
body.dark-theme .custom-form-field input:focus,
body.dark-theme .custom-form-field textarea:focus { background:#252a31; }
body.dark-theme .custom-add-topic-btn { color:#8ebeed; border-color:#536272; background:#252b32; }
body.dark-theme .custom-add-topic-btn:hover { background:#283746; }
body.dark-theme .custom-set-authoring-modal > .modal-actions { border-color:#414852; background:rgba(37,41,48,.94); }

@keyframes speakingCoachFloat { 0%,100% { transform:translateY(0) rotate(-1deg); } 50% { transform:translateY(-7px) rotate(1deg); } }
@keyframes speakingCoachWave { 0%,100% { transform:scaleY(.55); opacity:.52; } 50% { transform:scaleY(1); opacity:1; } }

@keyframes speakingFlowReveal { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:translateY(0); } }
@keyframes customSetWave { 0%,100% { transform:scaleY(.55); opacity:.55; } 50% { transform:scaleY(1); opacity:1; } }

@media (max-width:700px) {
  .practice-step-header .practice-step-mascot { right:14px; }
  #customSetsContainer .test-grid { grid-template-columns:1fr; }
  .modal-box.custom-set-authoring-modal { max-height:92vh; border-radius:16px; }
  .custom-form-header { padding:22px 58px 19px 19px; }
  .custom-form-header > p { margin-bottom:15px; }
  .custom-form-body { padding:15px 13px 3px; }
  .custom-form-section { padding:15px; border-radius:13px; }
  .custom-form-section-heading { align-items:flex-start; }
  .custom-topic-count { align-self:center; }
  .custom-form-field > span { align-items:flex-end; }
  .custom-form-field > span small { text-align:right; }
  .custom-set-authoring-modal > .modal-actions { padding:12px 13px; }
  .custom-form-save-hint { display:none; }
  .custom-form-save-btn { min-width:130px; }
}
@media (max-width:500px) {
  .practice-step-header { min-height:210px; padding:20px 20px 92px; }
  .practice-step-header .practice-step-mascot { right:20px; width:78px; }
  .custom-set-card { grid-template-columns:78px minmax(0,1fr); }
}
@media (prefers-reduced-motion:reduce) {
  .practice-flow-result,
  .custom-set-wave i,
  .speaking-coach-mascot,
  .speaking-coach-wave i { animation:none !important; }
  .custom-set-create-card,
  .speaking-question-progress span { transition:none; }
}
