/* Retell practice interface v21. */
.mode-icon.retell {
  color: #9a691f;
  background: #fff0bd;
}

.retell-mode-card .mode-check {
  display: block;
  color: var(--accent-dark);
}

.retell-page-heading {
  align-items: center;
}

.retell-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.retell-deck-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 17px;
  padding: 12px 16px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: var(--glass-surface);
  box-shadow: 0 10px 28px rgba(127, 87, 25, .055), inset 0 1px 0 rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.retell-deck-bar > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.retell-deck-bar > div:first-child strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.retell-live-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(238, 177, 69, .17);
}

.retell-deck-stats {
  color: var(--ink-soft);
  font-size: 10px;
}

.retell-deck-stats span {
  padding-left: 11px;
  border-left: 1px solid var(--line);
}

.retell-deck-stats strong {
  color: var(--ink);
  font-size: 12px;
}

.retell-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 575px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 27px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 24px 68px rgba(127, 87, 25, .09), inset 0 1px 0 rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(26px) saturate(135%);
  backdrop-filter: blur(26px) saturate(135%);
}

.retell-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: 29px 23px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(rgba(255, 255, 255, .12), rgba(255, 255, 255, .12)),
    repeating-linear-gradient(0deg, transparent, transparent 35px, rgba(149, 99, 31, .035) 36px);
}

.retell-round {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 6px;
}

.retell-round strong {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 58px;
  font-weight: 500;
  line-height: 1;
}

.retell-round span {
  color: var(--ink-soft);
  font-size: 11px;
}

.retell-vocab-wrap {
  min-width: 0;
}

.retell-vocab-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 8px;
}

.retell-vocab-chip {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  padding: 8px 9px;
  border: 1px solid rgba(238, 177, 69, .16);
  border-radius: 9px;
  background: rgba(255, 240, 189, .54);
  color: var(--accent-dark);
}

.retell-vocab-chip strong,
.retell-vocab-chip span,
.retell-vocab-chip small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.retell-vocab-chip strong {
  font-size: 12px;
}

.retell-vocab-chip span {
  color: #aa7c38;
  font-size: 9px;
}

.retell-vocab-chip small {
  color: var(--ink-soft);
  font-size: 9px;
}

.retell-vocab-hidden {
  display: grid;
  min-height: 86px;
  place-items: center;
  border: 1px dashed rgba(238, 177, 69, .32);
  border-radius: 10px;
  background: rgba(255, 250, 235, .46);
  color: #b79662;
  text-align: center;
}

.retell-vocab-hidden span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  background: rgba(238, 177, 69, .13);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
}

.retell-vocab-hidden small {
  display: block;
  margin-top: -17px;
  font-size: 9px;
}

.retell-context {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 10px;
}

.retell-is-blind .retell-context {
  color: #b8aa96;
  font-style: italic;
}

.retell-card-shell {
  min-width: 0;
  padding: 25px 31px 30px;
  background:
    radial-gradient(circle at 83% 17%, rgba(255, 209, 102, .12), transparent 17rem),
    rgba(255, 255, 255, .44);
}

.retell-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
  color: #aa9a84;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .13em;
}

.retell-card {
  min-height: 472px;
}

.retell-phase {
  display: flex;
  min-height: 472px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.retell-phase h2,
.retell-result h2 {
  margin: 23px 0 8px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(29px, 3.3vw, 42px);
  font-weight: 500;
  letter-spacing: -.035em;
}

.retell-phase > p,
.retell-score-row p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.retell-play {
  display: grid;
  width: 104px;
  height: 104px;
  padding-left: 7px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 50%;
  background: linear-gradient(145deg, #ffd16f, #eeb145);
  box-shadow: 0 0 0 12px rgba(238, 177, 69, .12), 0 16px 30px rgba(149, 99, 31, .13);
  color: #5b3c12;
  font-size: 27px;
  transition: transform .18s ease, box-shadow .18s ease;
}

.retell-play:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 0 17px rgba(238, 177, 69, .09), 0 20px 36px rgba(149, 99, 31, .16);
}

.retell-phase > .primary-button {
  margin-top: 24px;
}

.retell-status,
.retell-recording {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 240, 189, .65);
  color: var(--accent-dark);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .11em;
}

.retell-status i,
.retell-recording i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: retell-pulse 1s ease infinite;
}

.retell-recording {
  background: rgba(182, 138, 112, .12);
  color: #9f655e;
}

.retell-recording i {
  background: #ba736a;
}

.retell-wave {
  display: flex;
  height: 69px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 27px 0 4px;
}

.retell-wave i {
  width: 4px;
  border-radius: 5px;
  background: var(--accent-dark);
  transform: scaleY(.45);
  transform-origin: center;
}

.retell-wave.is-active i {
  animation: retell-wave .85s ease-in-out infinite alternate;
}

.retell-countdown {
  margin: 7px 0 3px;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 178px;
  font-weight: 500;
  line-height: .94;
  animation: retell-count-in .3s ease both;
}

.retell-timer {
  display: flex;
  width: min(470px, 90%);
  align-items: center;
  gap: 15px;
  margin-top: 31px;
}

.retell-timer > span {
  height: 5px;
  flex: 1;
  overflow: hidden;
  border-radius: 999px;
  background: #f1e8d8;
}

.retell-timer > span i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #ba736a;
  transition: width 1s linear;
}

.retell-timer strong {
  width: 44px;
  color: var(--ink);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.retell-finish {
  margin-top: 21px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .5);
  color: var(--ink-soft);
  font-size: 10px;
}

.retell-result {
  padding-top: 20px;
}

.retell-score-row {
  display: flex;
  align-items: center;
  gap: 19px;
  padding-bottom: 18px;
}

.retell-score-row h2 {
  margin: 0 0 5px;
  font-size: 28px;
}

.retell-score-ring {
  display: grid;
  position: relative;
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--accent) var(--score), #f0e8db 0);
}

.retell-score-ring::before {
  content: "";
  position: absolute;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #fffdf8;
}

.retell-score-ring div {
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.retell-score-ring strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  font-weight: 500;
  line-height: 1;
}

.retell-score-ring span {
  color: var(--ink-soft);
  font-size: 8px;
}

.retell-dimensions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.retell-dimension {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 253, 248, .72);
}

.retell-dimension > div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 2px 8px;
}

.retell-dimension span {
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
}

.retell-dimension small {
  grid-column: 1;
  color: var(--ink-soft);
  font-size: 8px;
}

.retell-dimension strong {
  grid-row: 1 / 3;
  grid-column: 2;
  color: var(--accent-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 500;
}

.retell-dimension > i {
  display: block;
  height: 3px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #eee5d6;
}

.retell-dimension > i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.retell-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
}

.retell-diff-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid var(--retell-line, rgba(23, 38, 63, .12));
  border-radius: 14px;
  background: rgba(255, 253, 250, .72);
}

.retell-diff-summary > span {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(33, 59, 99, .055);
}

.retell-diff-summary small {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
}

.retell-diff-summary strong {
  color: var(--ink);
  font-size: 13px;
}

.retell-diff-summary p {
  grid-column: 1 / -1;
  margin: 2px 2px 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.55;
}

body.dark .retell-diff-summary {
  border-color: var(--line);
  background: var(--card);
}

body.dark .retell-diff-summary > span {
  background: var(--surface-soft);
}

@media (max-width: 520px) {
  .retell-diff-summary {
    grid-template-columns: 1fr;
  }

  .retell-diff-summary p {
    grid-column: 1;
  }
}

.retell-compare section {
  min-width: 0;
  padding: 17px 19px 20px;
}

.retell-compare section + section {
  border-left: 1px solid var(--line);
  background: rgba(255, 248, 232, .46);
}

.retell-compare header {
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: #a99c89;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .12em;
}

.retell-compare header button {
  padding: 6px 9px;
  border-radius: 999px;
  background: #fff2cc;
  color: var(--accent-dark);
  font-size: 9px;
}

.retell-compare audio {
  width: 145px;
  height: 26px;
}

.retell-word-line {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.58;
}

.retell-word-line span {
  display: inline-block;
  margin-right: .17em;
}

.retell-word-line span.target {
  padding: 0 3px;
  border-radius: 4px;
  background: rgba(238, 177, 69, .22);
  color: var(--accent-dark);
}

.retell-word-line span.wrong {
  color: #b86b62;
  text-decoration: underline wavy rgba(184, 107, 98, .55);
  text-underline-offset: 4px;
}

.retell-word-line span.target.wrong {
  background: rgba(184, 107, 98, .1);
  color: #ad5d55;
}

.retell-word-line em {
  color: var(--ink-soft);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-size: 11px;
  font-style: normal;
}

.retell-inline-error {
  margin: 10px 0 0;
  color: #ad5d55;
  font-size: 10px;
}

.retell-review-note {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(238, 177, 69, .12);
  color: var(--accent-dark);
  font-size: 10px;
}

.retell-recognition-note {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.55;
}

.retell-legend {
  display: flex;
  gap: 18px;
  margin-top: 11px;
  color: var(--ink-soft);
  font-size: 9px;
}

.retell-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.retell-legend i {
  width: 14px;
  height: 8px;
  border-radius: 2px;
}

.retell-legend i.target {
  background: rgba(238, 177, 69, .38);
}

.retell-legend i.wrong {
  background: rgba(184, 107, 98, .3);
}

.retell-actions,
.retell-error-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.retell-error-mark {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 50%;
  background: rgba(184, 107, 98, .1);
  color: #ad5d55;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 36px;
}

.retell-footnote {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 4px 0;
  color: var(--ink-soft);
  font-size: 9px;
}

body.dark .retell-layout,
body.dark .retell-deck-bar {
  border-color: rgba(255, 255, 255, .09);
  background: rgba(37, 38, 55, .68);
}

body.dark .retell-side,
body.dark .retell-card-shell,
body.dark .retell-compare section + section {
  border-color: rgba(255, 255, 255, .09);
  background-color: rgba(35, 36, 52, .38);
}

body.dark .retell-score-ring::before {
  background: #292a3d;
}

body.dark .retell-vocab-chip {
  border-color: rgba(238, 177, 69, .18);
  background: rgba(116, 84, 37, .3);
}

body.dark .retell-compare {
  border-color: rgba(255, 255, 255, .09);
}

body.dark .retell-dimension {
  border-color: rgba(255, 255, 255, .09);
  background: rgba(35, 36, 52, .38);
}

@keyframes retell-wave {
  from { transform: scaleY(.45); }
  to { transform: scaleY(1); }
}

@keyframes retell-pulse {
  50% { opacity: .35; }
}

@keyframes retell-count-in {
  from { opacity: 0; transform: scale(.75); }
  to { opacity: 1; transform: scale(1); }
}

@media (min-width: 821px) {
  .mode-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 820px) {
  .retell-layout {
    grid-template-columns: 1fr;
    min-height: 650px;
    border-radius: 22px;
  }

  .retell-side {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 18px;
    padding: 16px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .retell-round strong {
    font-size: 34px;
  }

  .retell-vocab-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 84px;
    overflow-y: auto;
  }

  .retell-vocab-wrap > .eyebrow,
  .retell-context {
    display: none;
  }

  .retell-card-shell {
    padding: 20px 18px 25px;
  }

  .retell-card,
  .retell-phase {
    min-height: 470px;
  }
}

@media (max-width: 560px) {
  .retell-page-heading {
    gap: 15px;
  }

  .retell-heading-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .retell-heading-actions button {
    width: 100%;
  }

  .retell-deck-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .retell-deck-stats {
    width: 100%;
    justify-content: space-between;
  }

  .retell-deck-stats span:first-child {
    padding-left: 0;
    border-left: 0;
  }

  .retell-card-shell {
    padding-right: 14px;
    padding-left: 14px;
  }

  .retell-compare {
    grid-template-columns: 1fr;
  }

  .retell-compare section + section {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .retell-score-ring {
    width: 76px;
    height: 76px;
  }

  .retell-score-ring::before {
    width: 59px;
    height: 59px;
  }

  .retell-score-ring strong {
    font-size: 25px;
  }

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

  .retell-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .retell-actions button {
    min-width: 0;
  }

  .retell-footnote span:last-child {
    text-align: right;
  }
}

@media (prefers-reduced-motion: reduce) {
  .retell-wave i,
  .retell-status i,
  .retell-recording i,
  .retell-countdown {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
