.oral-sense {
  --oral-ink: #27243e;
  --oral-secondary: #625e71;
  --oral-iris: #6151ae;
  --oral-lilac: #c6c8fa;
  --oral-paper: #faf9fc;
  --oral-line: #dfdce6;
  --oral-correct: #236959;
  --oral-incorrect: #8a4530;
  color: var(--oral-ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  margin: 0 auto;
  max-width: 980px;
  padding: clamp(10px, 2vw, 28px) clamp(4px, 2vw, 20px) 28px;
}

.oral-sense *, .oral-sense { box-sizing: border-box; }
.oral-sense [hidden] { display: none !important; }
.oral-sense h1, .oral-sense h2, .oral-sense p { margin: 0; }
.oral-sense button {
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.oral-sense button[aria-disabled="true"] { cursor: default; }
.oral-sense :is(button, a, h2):focus-visible {
  outline: 3px solid var(--oral-iris);
  outline-offset: 2px;
  position: relative;
  z-index: 2;
}

.oral-sense-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: clamp(8px, 2vw, 22px);
}
.oral-sense-back {
  align-items: center;
  color: var(--oral-ink);
  display: inline-flex;
  font-size: 14px;
  font-weight: 560;
  gap: 9px;
  min-height: 44px;
  text-decoration: none;
}
.oral-sense-back::before {
  border: solid currentColor;
  border-width: 0 0 1.6px 1.6px;
  content: "";
  height: 8px;
  transform: rotate(45deg);
  width: 8px;
}
.oral-sense-back:hover { color: var(--oral-iris); }
.oral-sense-progress {
  color: var(--oral-secondary);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}
.oral-sense-progress-track { display: flex; gap: 3px; margin-top: 3px; }
.oral-sense-progress-track span { background: #dedbe7; border-radius: 2px; flex: 1; height: 3px; }
.oral-sense-progress-track [data-state="current"] { background: var(--oral-iris); }
.oral-sense-progress-track [data-state="complete"] { background: var(--oral-ink); }
.oral-sense-progress-track [data-state="skipped"] { background: repeating-linear-gradient(100deg, #948baf 0 2px, transparent 2px 4px); }

.oral-sense-workspace {
  display: grid;
  gap: clamp(22px, 5.6vw, 64px);
  grid-template-columns: minmax(0, .92fr) minmax(0, 1fr);
}
.oral-sense-prompt {
  align-items: flex-start;
  align-self: start;
  background: linear-gradient(140deg, #363149 0%, #27243e 55%, #464065 100%);
  border-radius: 14px;
  color: white;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  justify-content: space-between;
  min-height: 330px;
  overflow: hidden;
  padding: clamp(24px, 3.8vw, 45px);
  position: relative;
}
.oral-sense-prompt h1 {
  color: #fff;
  font-size: clamp(28px, 3.7vw, 46px);
  font-weight: 650;
  letter-spacing: -.045em;
  line-height: 1.22;
}
.oral-sense-prompt h1 [lang="en"] {
  color: #d2cefd;
  display: block;
  font: italic 400 clamp(28px, 3.4vw, 43px)/1 Georgia, "Times New Roman", serif;
  letter-spacing: -.055em;
  margin-bottom: 5px;
}
.oral-sense-disc {
  display: block;
  aspect-ratio: 1;
  pointer-events: none;
  border: 1px solid rgb(250 250 255 / 85%);
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side, transparent 0% 16%, #f3edf2bd 16.6%, #615e8466 17.2%, #e7e5ed99 18%, transparent 18.7% 21%, #63617e55 21.4%, #f9f9ff99 22.2%, transparent 23.1% 94.7%, #7b799680 95.4%, #fff9 96%, transparent 96.7%, #f9f9ff 99.4%),
    repeating-radial-gradient(circle closest-side, #fff2 0 .6px, #6d6d8c15 .8px 1.2px, transparent 1.4px 3.3px),
    conic-gradient(from -36deg, #d4d6e9 0deg, #b1abcc 17deg, #a2b1e9 32deg, #b4e3ec 49deg, #fbf5d6 64deg, #f0d4e8 77deg, #ac9bbe 94deg, #f5f4fd 116deg, #dadce7 134deg, #8c8ca9 161deg, #e6e2ee 181deg, #a5b1df 201deg, #b9ddd9 221deg, #f3e9c6 237deg, #e3c2db 248deg, #b5a8d5 265deg, #797992 282deg, #c5c9d9 306deg, #fafaff 329deg, #d4d6e9);
  box-shadow: inset 0 0 0 2px #f3eff1bb, inset 0 0 0 4px #73708d99;
  -webkit-mask-image: radial-gradient(circle closest-side, transparent 0% 11.7%, #000 12.3%);
  mask-image: radial-gradient(circle closest-side, transparent 0% 11.7%, #000 12.3%);
}

.oral-sense-disc::after {
  content: "";
  position: absolute;
  inset: 40%;
  border: 1px solid #e4e3ec;
  border-radius: 50%;
  background: radial-gradient(circle closest-side, transparent 57%, #29243988 59%, #fff9 62%, #918ca880 66%, #d5d2eb66 81%, transparent 85%);
}

.oral-sense-prompt .oral-sense-disc {
  bottom: -13%;
  position: absolute;
  right: -22%;
  width: 79%;
  z-index: -1;
}
.oral-sense-prompt:has([data-playing]) .oral-sense-disc {
  animation: oral-sense-turn 12s linear infinite;
}
@keyframes oral-sense-turn { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) {
  .oral-sense-prompt:has([data-playing]) .oral-sense-disc { animation: none; }
}

.oral-sense-play,
.oral-sense-action-buttons button,
.oral-sense .oral-sense-primary {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 46px;
}
.oral-sense-play-icon {
  align-items: center;
  display: inline-flex;
  flex: none;
  justify-content: center;
}
.oral-sense-play-icon::before {
  border-bottom: .34em solid transparent;
  border-left: .55em solid currentColor;
  border-top: .34em solid transparent;
  content: "";
  margin-left: .13em;
}
.oral-sense-play[data-playing] .oral-sense-play-icon::before {
  background: currentColor;
  border: 0;
  border-radius: 1px;
  height: .58em;
  margin: 0;
  width: .58em;
}
.oral-sense-prompt .oral-sense-play {
  color: white;
  font-size: 14px;
  font-weight: 600;
  gap: 11px;
}
.oral-sense-prompt .oral-sense-play:focus-visible { outline-color: white; }
.oral-sense-prompt .oral-sense-play-icon {
  background: #e9e7ff;
  border-radius: 50%;
  color: #332b55;
  font-size: 19px;
  height: 44px;
  width: 44px;
}
.oral-sense-prompt .oral-sense-play:hover .oral-sense-play-icon { background: white; }
.oral-sense-response { align-self: center; min-width: 0; }
.oral-sense-choices h2 {
  color: var(--oral-ink);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 650;
  letter-spacing: -.035em;
  line-height: 1.4;
}
.oral-sense-choices h2 + p {
  color: var(--oral-secondary);
  font-size: 14px;
  line-height: 1.5;
  margin-top: 5px;
}
.oral-sense-choice-grid {
  border-top: 1px solid var(--oral-line);
  margin-top: clamp(12px, 2vw, 20px);
}
.oral-sense-choice {
  align-items: stretch;
  border-bottom: 1px solid var(--oral-line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(80px, 36%);
}
.oral-sense-choice[data-state="selected"] { background: #eeebf8; }
.oral-sense-choice[data-state="correct"] { background: #eaf3ee; }
.oral-sense-choice[data-state="incorrect"] { background: #fbf0eb; }
.oral-sense-choice .oral-sense-play {
  gap: 12px;
  justify-content: flex-start;
  min-height: 54px;
  padding-inline: 9px;
}
.oral-sense-choice .oral-sense-play-icon {
  border: 1px solid #c4c0d5;
  border-radius: 50%;
  color: var(--oral-iris);
  font-size: 12px;
  height: 30px;
  width: 30px;
}
.oral-sense-choice .oral-sense-play:hover .oral-sense-play-icon,
.oral-sense-choice .oral-sense-play[data-playing] .oral-sense-play-icon {
  background: var(--oral-iris);
  border-color: var(--oral-iris);
  color: white;
}
.oral-sense-letter { font: 400 24px/1 Georgia, "Times New Roman", serif; }
.oral-sense-choice [data-oral-play-label] { color: var(--oral-secondary); font-size: 13px; }
.oral-sense .oral-sense-choose {
  align-items: center;
  color: var(--oral-iris);
  display: flex;
  font-size: 13px;
  font-weight: 600;
  gap: 7px;
  justify-content: flex-end;
  min-height: 48px;
  padding-inline: 3px 9px;
}
.oral-sense-choose::after {
  border: 1.5px solid #918ba3;
  border-radius: 50%;
  content: "";
  flex: none;
  height: 21px;
  width: 21px;
  box-sizing: border-box;
}
.oral-sense-choose[aria-pressed="true"]::after {
  background: var(--oral-iris);
  border: 4px solid var(--oral-paper);
  box-shadow: 0 0 0 1.5px var(--oral-iris);
}
.oral-sense-choice[data-state="correct"] .oral-sense-choose { color: var(--oral-correct); }
.oral-sense-choice[data-state="correct"] .oral-sense-choose::after {
  align-content: center;
  background: var(--oral-correct);
  border: 0;
  box-shadow: none;
  color: white;
  content: "✓";
  font: 700 15px/21px system-ui, sans-serif;
  text-align: center;
}
.oral-sense-choice[data-state="incorrect"] .oral-sense-choose { color: var(--oral-incorrect); }
.oral-sense-choice[data-state="incorrect"] .oral-sense-choose::after {
  background: transparent;
  border: 1px solid currentColor;
  box-shadow: none;
  content: "×";
  font: 500 18px/18px system-ui, sans-serif;
  text-align: center;
}
.oral-sense-choose:hover:not([aria-disabled="true"])::after { border-color: var(--oral-iris); }

.oral-sense-actions { margin-top: 6px; }
.oral-sense-result-line {
  display: grid;
  align-items: center;
  min-height: 42px;
  margin-bottom: 6px;
}
.oral-sense-action-buttons { display: grid; gap: 10px; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.oral-sense-action-buttons button, .oral-sense .oral-sense-primary {
  border-radius: 9px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  padding: 10px 12px;
}
.oral-sense .oral-sense-primary, .oral-sense [data-oral-next][data-emphasis="primary"] { background: var(--oral-ink); color: white; }
.oral-sense [data-oral-compare] button { background: #ebe8f7; color: #4f408e; gap: 8px; width: 100%; }
.oral-sense [data-oral-next] { gap: 8px; grid-column: 2; }
.oral-sense [data-oral-next]::after {
  border: solid currentColor;
  border-width: 1.5px 1.5px 0 0;
  content: "";
  height: 7px;
  transform: rotate(45deg);
  width: 7px;
}
.oral-sense [data-oral-next][data-emphasis="secondary"] { color: var(--oral-iris); }
.oral-sense [data-oral-next][data-emphasis="secondary"]:hover { background: #eeebf8; }
.oral-sense .oral-sense-primary:hover, .oral-sense [data-oral-next][data-emphasis="primary"]:hover { background: #44395e; }
.oral-sense-notice:not(:empty) {
  color: #873d33;
  font-size: 13px;
  line-height: 1.6;
  margin-top: 8px;
}
.oral-sense-feedback:not(:empty) {
  align-items: baseline;
  background: #eeebf8;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  gap: 4px 12px;
  justify-content: space-between;
  line-height: 1.5;
  padding: 8px 12px;
}
.oral-sense-feedback[data-state="correct"] { background: #eaf3ee; color: var(--oral-correct); }
.oral-sense-feedback[data-state="incorrect"] { background: #fbf0eb; color: var(--oral-incorrect); }
.oral-sense-feedback[data-state="error"] { background: #fcf0ee; color: #873d33; }
.oral-sense-feedback p { color: var(--oral-secondary); font-size: 13px; }
.oral-sense-feedback [lang="en"] { color: var(--oral-ink); font: italic 19px/1.2 Georgia, serif; margin-left: 4px; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: no-preference) {
  .oral-sense-choice[data-state="correct"] .oral-sense-choose::after { animation: oral-sense-check-in 340ms ease-out; }
  .oral-sense-choice[data-state="incorrect"] .oral-sense-choose::after { animation: oral-sense-nudge 300ms ease-in-out; }
  .oral-sense-feedback[data-state="correct"], .oral-sense-feedback[data-state="incorrect"] {
    animation: oral-sense-answer-in 230ms ease-out;
  }
}
@keyframes oral-sense-check-in {
  0% { transform: scale(.78); }
  55% { transform: scale(1.13); }
  100% { transform: scale(1); }
}
@keyframes oral-sense-nudge {
  25%, 65% { transform: translateX(-2px); }
  45% { transform: translateX(2px); }
}
@keyframes oral-sense-answer-in {
  from { transform: translateY(3px); }
  to { transform: translateY(0); }
}
.oral-sense-finish {
  background: var(--oral-ink);
  border-radius: 14px;
  color: white;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(24px, 5vw, 56px);
  position: relative;
}
.oral-sense-finish .oral-sense-disc { position: absolute; right: -6%; top: 12%; width: min(48%, 330px); z-index: -1; }
.oral-sense-finish h2 { display: inline-block; font-size: clamp(26px, 4vw, 40px); line-height: 1.4; margin-bottom: 8px; }
.oral-sense-finish p { color: #e2dff3; font-size: 15px; line-height: 1.6; max-width: 66%; }
.oral-sense-finish .oral-sense-primary { background: #e8e5ff; color: var(--oral-ink); margin-top: 20px; }
.oral-sense-finish .oral-sense-primary:hover { background: white; }
.oral-sense-finish :is(h2, button):focus-visible { outline-color: white; }

@media (max-width: 720px) {
  .oral-sense { max-width: 520px; padding: 12px 7px max(24px, env(safe-area-inset-bottom)); }
  .oral-sense-header { margin-bottom: 9px; }
  .oral-sense-workspace { gap: 23px; grid-template-columns: minmax(0, 1fr); }
  .oral-sense-prompt { gap: 20px; min-height: 0; padding: 22px 23px 17px; }
  .oral-sense-prompt h1 { font-size: 32px; }
  .oral-sense-prompt h1 [lang="en"] { font-size: 26px; margin-bottom: 4px; }
  .oral-sense-prompt .oral-sense-disc { bottom: auto; right: -14%; top: 20%; width: 52%; }
  .oral-sense-response { align-self: stretch; }
  .oral-sense-choices h2 { font-size: 22px; }
  .oral-sense-choice-grid { margin-top: 13px; }
  .oral-sense-finish .oral-sense-disc { right: -10%; top: 12px; width: 34%; }
  .oral-sense-finish p { max-width: 84%; }
}

@media (max-width: 355px), (max-height: 620px) and (max-width: 720px) {
  .oral-sense { padding-block-start: 2px; }
  .oral-sense-header { margin-bottom: 2px; }
  .oral-sense-workspace { gap: 15px; }
  .oral-sense-prompt { gap: 8px; padding: 14px 18px 11px; }
  .oral-sense-prompt h1 { font-size: 27px; }
  .oral-sense-prompt h1 [lang="en"] { font-size: 22px; }
  .oral-sense-choices h2 { font-size: 19px; }
  .oral-sense-choice-grid { margin-top: 9px; }
  .oral-sense-choice .oral-sense-play { min-height: 46px; }
  .oral-sense .oral-sense-choose { min-height: 46px; }
  .oral-sense-actions { margin-top: 2px; }
}

@media screen {
  body.oral-practice-open, .oral-practice-open .topbar { background: #faf9fc; }
}

@media screen and (max-width: 820px) {
  .oral-practice-open .app-shell {
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
  }
  .oral-practice-open .topbar, .oral-practice-open .library-bottom-nav { display: none; }
}
