/* Quiz 3 — Immersive Quiz Canvas. Scoped to this activity only. */
body.mode-game.mode-quiz3 {
  --quiz3-accent: #c65f49;
  --quiz3-accent-dark: #944331;
  --quiz3-ink: #302c29;
  --quiz3-muted: #7e7870;
  --quiz3-line: #e8e3d9;
  --quiz3-canvas: #f8fbf4;
  --quiz3-paper: #fff;
  min-height: 100vh;
  padding-bottom: 92px;
  color: var(--quiz3-ink);
  background: var(--quiz3-canvas);
}

body.mode-game.mode-quiz3::before {
  background: rgba(248, 251, 244, .88);
}

body.mode-game.mode-quiz3 .yh-game-header {
  grid-template-columns: minmax(220px, 1fr) auto minmax(120px, 1fr) 42px;
  min-height: 80px;
  padding: 9px clamp(20px, 3vw, 38px);
  background: rgba(255, 255, 255, .97);
  border-top: 0;
  border-bottom: 1px solid var(--quiz3-line);
  box-shadow: 0 4px 14px rgba(64, 75, 59, .08);
}

body.mode-game.mode-quiz3 .yh-game-logo { justify-self: start; font-size: 17px !important; }
.mode-quiz3 .yh-game-logo span:first-child {
  width: 44px !important;
  height: 44px !important;
  flex-basis: 44px !important;
  color: var(--quiz3-accent) !important;
  background: #fff !important;
  border-color: #efd8d1 !important;
  border-radius: 11px !important;
}

.mode-quiz3 .yh-game-title {
  justify-self: center;
  color: var(--quiz3-accent) !important;
  font-size: 19px !important;
  letter-spacing: -.01em !important;
  text-transform: none !important;
}

.mode-quiz3 .yh-game-progress { display: none !important; }
.mode-quiz3 .yh-game-score {
  justify-self: end;
  min-height: 44px !important;
  padding: 8px 16px !important;
  color: var(--quiz3-accent) !important;
  background: #fff1ed !important;
  border-color: #f1d5cd !important;
  border-radius: 11px !important;
  font-size: 17px !important;
}
.mode-quiz3 .yh-score-label { color: var(--quiz3-accent) !important; font-size: 13px !important; text-transform: none !important; }
.mode-quiz3 .yh-game-close {
  width: 44px !important;
  height: 44px !important;
  color: var(--quiz3-accent) !important;
  border-color: #efd8d1 !important;
  border-radius: 11px !important;
}

.yh-quiz3-stepper {
  position: relative;
  z-index: 3;
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: flex-start;
  gap: 22px;
  padding: 13px clamp(20px, 8vw, 128px);
  color: #477254;
  background: rgba(255, 255, 255, .84);
  border-bottom: 1px solid var(--quiz3-line);
}
.yh-quiz3-stepper > strong { flex: 0 0 auto; font-size: 16px; white-space: nowrap; }
.yh-quiz3-stepper-list {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}
.yh-quiz3-stepper-list::-webkit-scrollbar { display: none; }
.yh-quiz3-step {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  color: #aaa79f;
  background: #fff;
  border: 1px solid #dedbd3;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
}
.yh-quiz3-step:not(:last-child)::after {
  position: absolute;
  left: calc(100% + 3px);
  width: 8px;
  height: 1px;
  content: "";
  background: #dcd8cf;
}
.yh-quiz3-step.is-current {
  color: #fff;
  background: var(--quiz3-accent);
  border-color: var(--quiz3-accent);
  box-shadow: 0 0 0 4px #f8e8e3;
}
.yh-quiz3-step.is-complete:not(.is-current) {
  color: #477254;
  background: #edf6ef;
  border-color: #aac7b1;
}

body.mode-game.mode-quiz3 .yh-game-main {
  width: min(1060px, calc(100% - 32px));
  max-width: 1060px !important;
  min-height: 0 !important;
  justify-content: flex-start !important;
  padding: 18px 0 30px;
}
.yh-quiz3-breadcrumb {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
  color: #817a71;
  font-size: 13px;
  font-weight: 700;
}
.yh-quiz3-breadcrumb i { color: #6e916c; font-size: 22px; }
.yh-quiz3-breadcrumb strong { color: var(--quiz3-accent); font-size: 13px; }

body.mode-game.mode-quiz3 #yhStage .yhw-quiz-card {
  width: 100%;
  max-width: none;
  margin: 0;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
body.mode-game.mode-quiz3 #yhStage .yhw-quiz-page {
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
}
body.mode-game.mode-quiz3 #yhStage .yhw-quiz-card > .ant-card-body { padding: 0 !important; }
.mode-quiz3 .yhw-quiz-main { display: grid; gap: 16px; }

.yh-quiz3-question-card {
  position: relative;
  display: flex;
  min-height: 320px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 26px 28px 22px;
  background: rgba(255, 255, 255, .98);
  border: 1px solid #e2ded4;
  border-radius: 16px;
  box-shadow: 0 7px 24px rgba(60, 72, 54, .07);
}
.yh-quiz3-question-kicker {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-bottom: 17px;
  color: var(--quiz3-accent);
  font-size: 18px;
  font-weight: 900;
}
.yh-quiz3-question-kicker i { color: #7f9c72; font-size: 29px; font-weight: 400; }
.yh-quiz3-question-card h2 {
  margin: 0;
  color: var(--quiz3-ink);
  font-size: clamp(44px, 5vw, 62px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.035em;
}
.yh-quiz3-phonetic { margin-top: 8px; color: var(--quiz3-muted); font-size: 22px; font-weight: 550; }
.yh-quiz3-audio {
  display: grid;
  width: 58px;
  height: 58px;
  min-height: 58px;
  margin-top: 16px;
  padding: 0;
  place-items: center;
  color: var(--quiz3-accent);
  background: #fff5f2;
  border: 1px solid #efbcae;
  border-radius: 50%;
  box-shadow: 0 3px 0 #efd7d0;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.yh-quiz3-audio i { font-size: 25px; }
.yh-quiz3-audio:hover { background: #ffece6; transform: translateY(-2px); box-shadow: 0 5px 0 #efd7d0; }
.yh-quiz3-audio:focus-visible { outline: 3px solid #3977c9; outline-offset: 3px; }
.yh-quiz3-audio-label { margin-top: 8px; color: var(--quiz3-muted); font-size: 13px; font-weight: 700; }

.mode-quiz3 .yhw-quiz-grid { display: grid !important; grid-template-columns: 1fr; gap: 10px; margin: 0 !important; }
.mode-quiz3 .yhw-quiz-grid > .ant-col { width: 100% !important; max-width: none !important; padding: 0 !important; }
.mode-quiz3 .yhw-quiz-option {
  display: flex;
  width: 100%;
  min-height: 68px !important;
  align-items: center;
  padding: 9px 18px !important;
  color: var(--quiz3-ink);
  border: 1px solid transparent;
  border-bottom-width: 1px !important;
  border-radius: 13px;
  box-shadow: none;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.mode-quiz3 .yhw-quiz-option:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(57, 70, 52, .08); }
.mode-quiz3 .yhw-quiz-option:focus-visible { outline: 3px solid #3977c9; outline-offset: 2px; }
.mode-quiz3 .yhw-quiz-option.is-selected {
  border-color: #3977c9 !important;
  box-shadow: 0 0 0 3px rgba(57, 119, 201, .13) !important;
}
.mode-quiz3 .yhw-quiz-option-letter {
  display: flex !important;
  width: auto;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
}
.mode-quiz3 .yhw-quiz-option-letter-badge {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  box-shadow: none;
  font-size: 17px;
  font-weight: 900;
}
.mode-quiz3 .yhw-quiz-option-text { padding: 0 18px; font-size: 19px; font-weight: 850; }
.mode-quiz3 .yhw-quiz-option-icon { margin-left: auto; }
.mode-quiz3 .yhw-quiz-option-icon-circle {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #3977c9;
  background: #eef6ff;
  border: 2px solid #3977c9;
  border-radius: 50%;
}
.mode-quiz3 .yhw-quiz-option--correct,
.mode-quiz3 .yhw-quiz-option--correct:hover {
  color: #fff !important;
  background: #4f956b !important;
  border-color: #347a52 !important;
  box-shadow: 0 0 0 3px rgba(79, 149, 107, .13) !important;
}
.mode-quiz3 .yhw-quiz-option--wrong,
.mode-quiz3 .yhw-quiz-option--wrong:hover {
  color: #fff !important;
  background: #d45d57 !important;
  border-color: #ad433e !important;
  box-shadow: 0 0 0 3px rgba(212, 93, 87, .12) !important;
}
.mode-quiz3 .yhw-quiz-option--correct .yhw-quiz-option-text,
.mode-quiz3 .yhw-quiz-option--wrong .yhw-quiz-option-text { color: #fff; }
.mode-quiz3 .yhw-quiz-option--correct .yhw-quiz-option-icon-circle { color: #347a52; background: #fff; border-color: #fff; }

body.mode-game.mode-quiz3 .yh-game-actions {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(260px, 488px) minmax(40px, 1fr) minmax(320px, 455px) minmax(210px, 250px);
  align-items: center;
  gap: 24px;
  min-height: 78px;
  margin: 0;
  padding: 11px clamp(22px, 4vw, 52px);
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--quiz3-line);
  box-shadow: 0 -5px 20px rgba(61, 72, 56, .08);
}
.mode-quiz3 .yh-game-actions .btn {
  min-height: 52px;
  margin: 0;
  border-radius: 11px !important;
  font-size: 16px;
  font-weight: 850;
}
.mode-quiz3 .yh-quiz3-prev { grid-column: 1; display: inline-flex; align-items: center; justify-content: center; gap: 9px; color: var(--quiz3-accent) !important; }
.mode-quiz3 .yh-quiz3-confirm {
  grid-column: 3;
  color: #fff;
  background: var(--quiz3-accent) !important;
  border-color: var(--quiz3-accent) !important;
  box-shadow: 0 3px 0 var(--quiz3-accent-dark) !important;
}
.mode-quiz3 .yh-quiz3-confirm:hover:not(:disabled) { background: var(--quiz3-accent-dark) !important; transform: translateY(-1px); }
.mode-quiz3 .yh-game-actions .btn:disabled { cursor: not-allowed; opacity: .46; box-shadow: none !important; transform: none; }

body.mode-game.mode-quiz3 .teacher-preview {
  right: 24px !important;
  bottom: 20px !important;
  z-index: 90 !important;
  min-height: 40px;
  padding: 9px 14px !important;
  color: #7b5613 !important;
  background: #fff8dc !important;
  border: 1px solid #efd27d;
  border-radius: 10px !important;
  box-shadow: none !important;
  font-size: 13px;
}

@media (max-height: 820px) and (min-width: 761px) {
  body.mode-game.mode-quiz3 .yh-game-header { min-height: 64px; }
  .yh-quiz3-stepper { min-height: 54px; padding-block: 7px; }
  .yh-quiz3-step { width: 30px; height: 30px; flex-basis: 30px; font-size: 11px; }
  body.mode-game.mode-quiz3 .yh-game-main { padding-top: 6px; }
  .yh-quiz3-breadcrumb { min-height: 22px; margin-bottom: 5px; }
  .yh-quiz3-question-card { min-height: 158px; padding-block: 11px 9px; }
  .yh-quiz3-question-kicker { gap: 18px; margin-bottom: 5px; font-size: 15px; }
  .yh-quiz3-question-kicker i { font-size: 20px; }
  .yh-quiz3-question-card h2 { font-size: 40px; }
  .yh-quiz3-phonetic { margin-top: 3px; font-size: 16px; }
  .yh-quiz3-audio { width: 42px; height: 42px; min-height: 42px; margin-top: 6px; }
  .yh-quiz3-audio i { font-size: 20px; }
  .yh-quiz3-audio-label { margin-top: 4px; font-size: 11px; }
  .mode-quiz3 .yhw-quiz-main { gap: 9px; }
  .mode-quiz3 .yhw-quiz-grid { gap: 7px; }
  .mode-quiz3 .yhw-quiz-option { min-height: 51px !important; padding-block: 5px !important; }
  .mode-quiz3 .yhw-quiz-option-letter-badge { width: 32px; height: 32px; font-size: 14px; }
  .mode-quiz3 .yhw-quiz-option-text { font-size: 17px; }
  body.mode-game.mode-quiz3 .yh-game-actions { min-height: 64px; padding-block: 7px; }
  .mode-quiz3 .yh-game-actions .btn { min-height: 46px; }
  body.mode-game.mode-quiz3 .teacher-preview { bottom: 16px !important; }
}

@media (max-width: 760px) {
  body.mode-game.mode-quiz3 { padding-bottom: 78px; }
  body.mode-game.mode-quiz3 .yh-game-header { grid-template-columns: minmax(0, 1fr) auto 38px; min-height: 58px; padding: 7px 10px; }
  .mode-quiz3 .yh-game-title { display: none; }
  body.mode-game.mode-quiz3 .yh-game-logo { font-size: 14px !important; }
  .mode-quiz3 .yh-game-logo span:first-child { width: 38px !important; height: 38px !important; flex-basis: 38px !important; }
  .mode-quiz3 .yh-game-score { min-height: 38px !important; padding: 6px 9px !important; font-size: 14px !important; }
  .mode-quiz3 .yh-score-label { display: none; }
  .mode-quiz3 .yh-game-close { width: 38px !important; height: 38px !important; }
  .yh-quiz3-stepper { min-height: 60px; justify-content: flex-start; gap: 12px; padding: 9px 12px; }
  .yh-quiz3-stepper > strong { font-size: 13px; }
  .yh-quiz3-stepper-list { justify-content: flex-start; gap: 9px; }
  .yh-quiz3-step { width: 31px; height: 31px; flex-basis: 31px; font-size: 12px; }
  .yh-quiz3-step:not(:last-child)::after { display: none; }
  body.mode-game.mode-quiz3 .yh-game-main { width: min(100% - 20px, 620px); padding-top: 10px; }
  .yh-quiz3-breadcrumb { justify-content: flex-start; gap: 8px; margin-bottom: 8px; font-size: 11px; }
  .yh-quiz3-breadcrumb i { font-size: 18px; }
  .yh-quiz3-question-card { min-height: 190px; padding: 19px 14px 16px; border-radius: 13px; }
  .yh-quiz3-question-kicker { margin-bottom: 10px; font-size: 15px; }
  .yh-quiz3-question-kicker { gap: 16px; }
  .yh-quiz3-question-kicker i { font-size: 22px; }
  .yh-quiz3-question-card h2 { font-size: clamp(36px, 12vw, 48px); }
  .yh-quiz3-phonetic { margin-top: 5px; font-size: 17px; }
  .yh-quiz3-audio { width: 48px; height: 48px; min-height: 48px; margin-top: 10px; }
  .yh-quiz3-audio-label { margin-top: 5px; font-size: 11px; }
  .mode-quiz3 .yhw-quiz-grid { gap: 8px; }
  .mode-quiz3 .yhw-quiz-option { min-height: 59px !important; padding: 7px 11px !important; border-radius: 11px; }
  .mode-quiz3 .yhw-quiz-option-letter-badge { width: 32px; height: 32px; font-size: 14px; }
  .mode-quiz3 .yhw-quiz-option-text { padding-inline: 12px; font-size: 16px; }
  body.mode-game.mode-quiz3 .yh-game-actions { grid-template-columns: minmax(110px, .72fr) minmax(150px, 1.28fr); gap: 9px; min-height: 70px; padding: 8px 10px; }
  .mode-quiz3 .yh-quiz3-prev { grid-column: 1; }
  .mode-quiz3 .yh-quiz3-confirm { grid-column: 2; }
  .mode-quiz3 .yh-game-actions .btn { min-height: 50px; padding: 8px 10px; font-size: 14px; }
  body.mode-game.mode-quiz3 .teacher-preview { right: 10px !important; bottom: 78px !important; padding: 7px 9px !important; font-size: 11px; }
}

@media (max-width: 420px) {
  .yh-quiz3-breadcrumb span:last-child { display: none; }
  .yh-quiz3-stepper > strong { display: none; }
  .mode-quiz3 .yh-game-logo span:last-child { max-width: 170px; }
}

@media (prefers-reduced-motion: reduce) {
  .mode-quiz3 .yhw-quiz-option,
  .mode-quiz3 .yh-quiz3-audio,
  .mode-quiz3 .yh-game-actions .btn { transition: none !important; }
}
