/* HINH ANH Y HOC / RadLearn V8.4.3
   Quiz UI refresh + result review + mobile hardening for leaderboard/avatar picker. */

/* --------------------------------------------------------------------------
   1) Quizizz / Luyen tung cau - cleaner single-flow layout
   -------------------------------------------------------------------------- */
.v62-quizizz-progress{
  padding:12px 24px 13px;
  gap:8px;
}
.v84-quiz-progress-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  min-width:0;
}
.v84-quiz-progress-row>#quizizz-position{
  min-width:0;
  font-weight:850;
  color:var(--ink);
  font-variant-numeric:tabular-nums;
}
.v84-quiz-bookmark-slot{display:flex;align-items:center;justify-content:flex-end;min-width:0}
.v84-quiz-bookmark{
  min-height:36px;
  padding:7px 11px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  border:1px solid var(--line);
  border-radius:11px;
  background:var(--surface);
  color:var(--muted);
  font:inherit;
  font-size:10px;
  font-weight:800;
  cursor:pointer;
  transition:border-color .16s ease,background .16s ease,color .16s ease,transform .16s ease;
}
.v84-quiz-bookmark:hover{border-color:color-mix(in srgb,var(--theme-accent) 55%,var(--line));color:var(--theme-accent);transform:translateY(-1px)}
.v84-quiz-bookmark.saved{border-color:color-mix(in srgb,var(--theme-accent) 42%,var(--line));background:var(--theme-soft);color:var(--theme-accent)}
.v84-quiz-bookmark .icon{width:15px;height:15px}
.v62-quizizz-layout{padding:18px 20px 22px}
.v62-quizizz-layout .v62-question-panel{padding:26px 28px 28px}
.v62-quizizz-layout .v62-question-panel h2{margin-top:0}
.v84-review-label{
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin:0 0 15px;
  padding:6px 10px;
  border-radius:999px;
  background:color-mix(in srgb,var(--theme-soft) 74%,var(--surface));
  color:var(--theme-accent);
  font-size:9px;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.v84-review-label small{font:inherit;font-weight:750;opacity:.78;text-transform:none;letter-spacing:0}
.v84-review-feedback{min-height:30px;margin-top:13px;font-size:10px;font-weight:800}
.v84-review-feedback.correct{color:#198454}.v84-review-feedback.wrong{color:#bf4242}

/* Keep answer cards large enough for touch without wasting vertical space. */
.v62-quizizz-layout .v62-answer-grid .answer-option{min-width:0}

/* --------------------------------------------------------------------------
   2) Centered submit confirmation + compact interleaved-review offer
   -------------------------------------------------------------------------- */
.v84-submit-modal,.v84-review-offer{
  width:min(480px,calc(100vw - 34px));
  margin:0 auto;
  display:grid;
  justify-items:center;
  text-align:center;
  gap:12px;
  color:var(--ink);
}
.v84-submit-modal .modal-close,.v84-review-offer .modal-close{position:absolute;top:14px;right:14px}
.v84-submit-icon,.v84-review-offer-icon{
  width:56px;height:56px;
  display:grid;place-items:center;
  border-radius:16px;
  background:var(--theme-soft);
  color:var(--theme-accent);
  margin:2px auto 1px;
}
.v84-submit-icon .icon,.v84-review-offer-icon .icon{width:26px;height:26px}
.v84-submit-modal h2,.v84-review-offer h2{margin:0;font-size:26px;line-height:1.2}
.v84-submit-copy,.v84-review-offer p{margin:0;max-width:360px;color:var(--muted);font-size:11px;line-height:1.65}
.v84-submit-copy strong{color:var(--ink)}
.v84-submit-actions,.v84-review-offer-actions{width:100%;display:flex;justify-content:center;gap:10px;margin-top:5px}
.v84-submit-actions .btn,.v84-review-offer-actions .btn{min-width:118px}

/* --------------------------------------------------------------------------
   3) Result / review: compact 5-column map + four explicit actions
   -------------------------------------------------------------------------- */
.v84-result-map-body{display:flex;justify-content:flex-start;min-width:0}
.v82-result-map .v50-result-grid.v84-result-grid{
  width:max-content;
  max-width:100%;
  grid-template-columns:repeat(5,52px)!important;
  grid-auto-rows:32px;
  gap:6px!important;
  max-height:184px;
  overflow-y:auto;
  overflow-x:hidden;
  padding:2px 7px 2px 0;
}
.v82-result-map .v50-result-grid.v84-result-grid .v50-result-dot{
  width:52px!important;
  height:32px!important;
  min-height:32px!important;
  padding:0!important;
  border-radius:8px!important;
}
.v50-result-actions.v84-result-actions{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px!important;
  width:min(920px,100%);
  margin:14px auto 22px!important;
}
.v84-result-actions>.btn,.v84-result-actions>a.btn{
  width:100%;
  min-width:0;
  min-height:42px;
  white-space:normal;
  text-align:center;
}
.v84-result-actions .btn[disabled]{opacity:.5;cursor:not-allowed}
.v84-result-detail-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0 10px}
.v84-result-detail-head h2{margin:0}.v84-result-detail-head span{font-size:9px;color:var(--muted);font-weight:750}
.v84-back-top{
  position:fixed;
  z-index:80;
  right:18px;
  bottom:calc(96px + env(safe-area-inset-bottom,0px));
  width:46px;height:46px;
  display:grid;place-items:center;
  border:1px solid color-mix(in srgb,var(--theme-accent) 35%,var(--line));
  border-radius:50%;
  background:color-mix(in srgb,var(--surface) 92%,var(--theme-soft));
  color:var(--theme-accent);
  box-shadow:0 12px 30px rgba(16,55,78,.18);
  font-size:22px;
  font-weight:900;
  cursor:pointer;
  opacity:1;
  transform:translateY(0);
  transition:opacity .18s ease,transform .18s ease;
}
.v84-back-top[hidden]{display:none!important}
.v84-back-top:hover{transform:translateY(-2px)}
.v50-review-card[hidden]{display:none!important}

/* --------------------------------------------------------------------------
   4) Avatar picker mobile hardening - no row overlap on Safari/small devices
   -------------------------------------------------------------------------- */
.v83-avatar-grid,.v83-avatar-grid.profile{
  min-width:0;
  grid-auto-flow:row;
  grid-auto-rows:auto;
  align-items:start;
}
.v83-avatar-choice{
  width:100%;
  min-width:0;
  max-width:100%;
  height:auto;
  min-height:0;
  aspect-ratio:1 / 1;
  margin:0;
  box-sizing:border-box;
  isolation:isolate;
}
.v83-avatar-choice img{width:100%;height:100%;max-width:100%;aspect-ratio:1 / 1;object-fit:cover}
@media(hover:none){.v83-avatar-choice:hover{transform:none}}

/* --------------------------------------------------------------------------
   5) Leaderboard mobile hardening
   -------------------------------------------------------------------------- */
.v83-leader-hero,.v83-leader-tabs,.v83-leaderboard-card,.v834-leader-shell,.v834-podium,.v834-podium-card,.v834-rank-list,.v834-rank-row{
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}
.v83-leader-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}
.v83-leader-tabs button{width:100%;min-width:0;padding-left:4px;padding-right:4px}
.v83-leaderboard-card{overflow:hidden}
.v834-podium-card{overflow:hidden}
.v834-podium-name,.v834-podium-class,.v834-rank-person{min-width:0;max-width:100%}
.v834-podium-stats{min-width:0;max-width:100%;flex-wrap:wrap}

/* --------------------------------------------------------------------------
   6) Mobile-first rules
   -------------------------------------------------------------------------- */
@media(max-width:760px){
  .exam-focus .main{padding:8px!important}
  .v62-quizizz-shell{border-radius:14px}
  .v62-quizizz-head{padding:11px 12px;gap:8px}
  .v62-quizizz-head>div:first-child{min-width:0;gap:7px;flex:1}
  .v62-quizizz-head>div:first-child>span{flex:0 0 auto}
  .v62-quizizz-head strong{min-width:0;max-width:100%;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .v62-quizizz-head>div:last-child{flex:0 0 auto;gap:6px}
  .v62-quizizz-head .timer{padding:6px 8px;font-size:11px}
  .v62-quizizz-head .icon-button{width:34px;height:34px}
  .v62-streak{display:none}
  .v62-quizizz-progress{padding:10px 12px}
  .v84-quiz-progress-row>#quizizz-position{font-size:11px}
  .v84-quiz-bookmark{min-height:34px;padding:6px 9px;font-size:9px}
  .v62-quizizz-layout{padding:8px}
  .v62-quizizz-layout .v62-question-panel{padding:18px 14px 20px;border-radius:14px}
  .v62-quizizz-layout .v62-question-panel h2{font-size:18px;line-height:1.48;margin-bottom:15px}
  .v62-quizizz-layout .v62-answer-grid{grid-template-columns:1fr!important;gap:9px;margin-top:14px}
  .v62-quizizz-layout .v62-answer-grid .answer-option{min-height:58px;padding:9px 10px;border-radius:13px;grid-template-columns:38px minmax(0,1fr);gap:9px}
  .v62-quizizz-layout .v62-answer-grid .answer-letter{width:34px;height:34px;border-radius:10px}
  .v62-quizizz-footer{padding:0 10px 12px;gap:8px;display:grid;grid-template-columns:auto 1fr auto}
  .v62-quizizz-footer .save-state{margin:0;justify-self:end;font-size:8px}
  .v62-quizizz-footer .btn{min-height:42px;padding-left:12px;padding-right:12px}

  .v84-submit-modal,.v84-review-offer{width:min(430px,calc(100vw - 28px));gap:10px}
  .v84-submit-icon,.v84-review-offer-icon{width:50px;height:50px;border-radius:14px}
  .v84-submit-modal h2,.v84-review-offer h2{font-size:23px}
  .v84-submit-copy,.v84-review-offer p{font-size:10.5px}

  .v82-result-map .v50-result-grid.v84-result-grid{grid-template-columns:repeat(5,48px)!important;grid-auto-rows:31px;max-height:179px}
  .v82-result-map .v50-result-grid.v84-result-grid .v50-result-dot{width:48px!important;height:31px!important;min-height:31px!important}
  .v50-result-actions.v84-result-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px!important}
  .v84-result-actions>.btn,.v84-result-actions>a.btn{min-height:46px;font-size:10px;padding:8px 9px}
  .v84-back-top{right:14px;bottom:calc(94px + env(safe-area-inset-bottom,0px));width:44px;height:44px}

  .v83-avatar-grid,.v83-avatar-grid.profile{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:9px!important;grid-auto-rows:auto!important;align-items:start!important}
  .v83-avatar-grid.profile{max-height:none!important;overflow:visible!important;padding:4px 2px 6px!important}
  .v83-avatar-choice{aspect-ratio:1/1!important;transform:none!important}

  .v83-leader-hero{padding:18px 14px!important;border-radius:20px!important;overflow:hidden}
  .v83-leader-hero h1{font-size:27px!important;line-height:1.08}
  .v83-leader-hero p{font-size:9px;line-height:1.5}
  .v83-leader-rules{gap:7px!important}
  .v83-leader-tabs{gap:6px!important;margin:11px 0!important}
  .v83-leader-tabs button{min-height:50px!important;padding:6px 2px!important;border-radius:13px!important}
  .v83-leader-tabs button b{font-size:18px!important}.v83-leader-tabs button span{font-size:8px!important}
  .v83-leaderboard-card{padding:10px!important;border-radius:18px!important}
  .v83-board-head{align-items:flex-start!important;gap:8px!important;margin-bottom:10px!important;padding-bottom:10px!important}
  .v83-board-head h2{font-size:18px!important}.v83-board-count{flex:0 0 auto}
  .v834-podium{padding:7px!important;gap:7px!important;border-radius:16px!important}
  .v834-podium-card.rank-1,.v834-podium-card.rank-2,.v834-podium-card.rank-3{
    grid-template-columns:82px minmax(0,1fr)!important;
    column-gap:8px!important;
    padding:9px 8px!important;
    border-radius:15px!important;
    min-height:0!important;
  }
  .v834-podium-avatar{width:82px!important;height:82px!important;min-width:0!important}
  .v834-podium-card.rank-1 .v834-podium-avatar{height:82px!important}
  .v834-podium-avatar .v83-avatar-frame.size-xl{--v83-size:76px!important}
  .v834-podium-avatar .v83-avatar-frame.size-lg{--v83-size:70px!important}
  .v834-podium-name{font-size:11.5px!important}.v834-podium-class{font-size:8px!important}
  .v834-podium-stats{gap:5px!important;margin-top:2px!important}
  .v834-podium-stats b,.v834-podium-stats span{min-height:27px!important;padding:4px 6px!important;border-radius:9px!important}
  .v834-podium-stats b{font-size:14px!important}.v834-podium-stats span{font-size:8px!important}
  .v834-podium-medal{top:7px!important;right:7px!important;font-size:17px!important}
  .v834-rank-row{width:100%;grid-template-columns:30px 46px minmax(0,1fr) 60px!important;gap:6px!important;padding:7px!important;min-height:62px!important;overflow:hidden}
  .v834-rank-avatar .v83-avatar-frame.size-sm{--v83-size:42px!important}
  .v834-rank-score strong{font-size:14px!important}
}

@media(max-width:430px){
  .v84-quiz-bookmark span{display:none}
  .v84-quiz-bookmark{width:36px;padding:0}
  .v62-quizizz-footer{grid-template-columns:1fr 1fr}.v62-quizizz-footer .save-state{grid-column:1/-1;justify-self:center}
  .v84-submit-actions,.v84-review-offer-actions{gap:8px}.v84-submit-actions .btn,.v84-review-offer-actions .btn{min-width:0;flex:1}
  .v82-result-map .v50-result-grid.v84-result-grid{grid-template-columns:repeat(5,46px)!important}
  .v82-result-map .v50-result-grid.v84-result-grid .v50-result-dot{width:46px!important}
  .v83-board-head p{display:none}
}

@media(max-width:340px){
  .v62-quizizz-head strong{font-size:12px}
  .v62-quizizz-head .timer{font-size:10px;padding:5px 6px}
  .v82-result-map .v50-result-grid.v84-result-grid{grid-template-columns:repeat(5,43px)!important;gap:5px!important}
  .v82-result-map .v50-result-grid.v84-result-grid .v50-result-dot{width:43px!important}
  .v83-avatar-grid,.v83-avatar-grid.profile{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .v83-leader-tabs{gap:4px!important}.v83-leader-tabs button b{font-size:16px!important}
  .v834-podium-card.rank-1,.v834-podium-card.rank-2,.v834-podium-card.rank-3{grid-template-columns:72px minmax(0,1fr)!important}
  .v834-podium-avatar{width:72px!important;height:74px!important}
  .v834-podium-avatar .v83-avatar-frame.size-xl{--v83-size:68px!important}.v834-podium-avatar .v83-avatar-frame.size-lg{--v83-size:64px!important}
}

/* --------------------------------------------------------------------------
   V8.4.3 Result map alignment polish
   Center the compact 5-column map, keep its legend close to the map, and
   normalize the four review actions without changing quiz/result logic.
   -------------------------------------------------------------------------- */
.v82-result-map.v50-result-map{
  display:grid;
  justify-items:center;
  align-content:start;
  row-gap:10px;
}
.v82-result-map .v82-result-map-head{
  width:100%;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  margin:0 0 2px!important;
  text-align:center;
}
.v82-result-map .v82-result-map-head>div:first-child{
  display:grid;
  justify-items:center;
  gap:2px;
}
.v82-result-map .v82-result-map-head h2,
.v82-result-map .v82-result-map-head p{
  text-align:center;
}
.v82-result-map .v50-result-legend{
  justify-content:center;
  align-items:center;
  width:auto;
  margin:0 auto;
}
.v84-result-map-body{
  width:100%;
  display:flex;
  justify-content:center;
  min-width:0;
}
.v82-result-map .v50-result-grid.v84-result-grid{
  margin-inline:auto;
  padding:2px 7px 2px 7px;
}
.v50-result-actions.v84-result-actions{
  align-items:stretch;
}
.v84-result-actions>.btn,
.v84-result-actions>a.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--line);
  border-radius:10px;
  min-height:44px;
  font-weight:700;
}
.v84-result-actions>a.btn.ghost{
  background:var(--surface);
  color:var(--ink);
  border-color:var(--line);
}
.v84-result-actions>a.btn.ghost:hover{
  border-color:#93b7b2;
  color:var(--ink);
}

@media(max-width:760px){
  .v82-result-map.v50-result-map{row-gap:8px}
  .v82-result-map .v82-result-map-head{gap:6px!important}
  .v82-result-map .v50-result-legend{font-size:8px;gap:9px}
  .v84-result-map-body{justify-content:center}
}

/* --------------------------------------------------------------------------
   V8.4.3 Quiz footer: one centered submit action only
   -------------------------------------------------------------------------- */
.v62-quizizz-footer.v84-submit-only-footer{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  grid-template-columns:none!important;
  gap:0!important;
  padding:4px 24px 22px!important;
}
.v62-quizizz-footer.v84-submit-only-footer .v84-quiz-submit{
  width:auto!important;
  min-width:150px;
  min-height:44px;
  margin:0 auto!important;
  justify-content:center;
  text-align:center;
}
@media(max-width:640px){
  .v62-quizizz-footer.v84-submit-only-footer{padding:4px 12px calc(14px + env(safe-area-inset-bottom,0px))!important}
  .v62-quizizz-footer.v84-submit-only-footer .v84-quiz-submit{min-width:148px;min-height:46px}
}

/* ========================================================================== 
   V8.4.3 Result UI polish
   - Balanced result summary
   - Uniform review-number tiles
   - 10-column desktop map, 5-column mobile map
   - Softer status colors + clear active state
   - Consistent four-action footer
   ========================================================================== */

/* Result hero: keep score readable while making the summary feel like one unit. */
.v82-result-hero{
  grid-template-columns:minmax(220px,280px) minmax(0,1fr)!important;
  gap:20px 22px!important;
  padding:24px 26px!important;
  border-radius:24px!important;
}
.v82-result-primary{
  min-height:154px;
  padding:18px 20px;
  border:1px solid color-mix(in srgb,var(--theme-accent) 14%,var(--line));
  border-radius:18px;
  background:color-mix(in srgb,var(--surface) 91%,var(--theme-soft));
  box-sizing:border-box;
}
.v82-result-hero .v50-result-status{
  border:1px solid color-mix(in srgb,#2d9a6b 18%,transparent);
}
.v82-result-hero .v50-result-score strong{font-size:58px!important}
.v82-result-hero .v50-result-summary{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  align-items:stretch;
  gap:10px!important;
}
.v82-result-hero .v50-result-summary article{
  min-width:0;
  min-height:82px!important;
  border:1px solid color-mix(in srgb,var(--theme-accent) 8%,var(--line));
}
.v82-result-hero .v50-result-summary article strong{
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.v82-result-progress{padding-top:13px}

/* Review map card */
.v82-result-map.v50-result-map.v843-result-map{
  display:grid!important;
  justify-items:stretch!important;
  align-content:start;
  row-gap:16px!important;
  margin:16px 0 0!important;
  padding:22px 24px 24px!important;
  border-radius:22px!important;
  overflow:hidden;
}
.v82-result-map .v843-result-map-head{
  width:100%;
  display:flex!important;
  flex-direction:row!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:20px!important;
  margin:0!important;
  text-align:left!important;
}
.v843-result-map-title{
  min-width:0;
  display:grid!important;
  justify-items:start!important;
  gap:3px!important;
}
.v843-result-kicker{
  display:block;
  color:var(--theme-accent);
  font-size:8px;
  font-weight:900;
  letter-spacing:.1em;
}
.v82-result-map .v843-result-map-title h2{
  margin:0;
  font-size:20px!important;
  line-height:1.2;
  text-align:left!important;
}
.v82-result-map .v843-result-map-title p{
  margin:2px 0 0!important;
  max-width:560px;
  color:var(--muted);
  font-size:10px!important;
  line-height:1.55;
  text-align:left!important;
}
.v843-result-map-meta{
  flex:0 0 auto;
  display:grid;
  justify-items:end;
  gap:8px;
}
.v843-result-count{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:4px 9px;
  border:1px solid var(--line);
  border-radius:999px;
  background:color-mix(in srgb,var(--surface) 88%,var(--theme-soft));
  color:var(--ink);
  font-size:9px;
  font-weight:800;
}
.v82-result-map .v50-result-legend{
  width:auto!important;
  margin:0!important;
  justify-content:flex-end!important;
  gap:12px!important;
  color:var(--muted);
  font-size:9px!important;
}
.v82-result-map .v50-result-legend span{gap:5px}
.v82-result-map .v50-result-legend i{
  width:9px!important;
  height:9px!important;
  border-radius:3px;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.035);
}

/* The map gets its own subtle panel so it never looks lost inside a wide card. */
.v843-result-map .v84-result-map-body{
  width:100%;
  min-width:0;
  display:flex!important;
  justify-content:center!important;
  padding:15px;
  border:1px solid color-mix(in srgb,var(--theme-accent) 7%,var(--line));
  border-radius:17px;
  background:color-mix(in srgb,var(--surface) 80%,var(--theme-soft));
  box-sizing:border-box;
}
.v843-result-map .v50-result-grid.v84-result-grid{
  width:min(100%,760px)!important;
  max-width:760px!important;
  display:grid!important;
  grid-template-columns:repeat(10,minmax(0,1fr))!important;
  grid-auto-rows:40px!important;
  gap:8px!important;
  margin:0 auto!important;
  padding:2px 8px 2px 2px!important;
  max-height:286px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  scrollbar-gutter:stable;
  overscroll-behavior:contain;
  align-content:start;
  box-sizing:border-box;
}
.v843-result-map .v50-result-grid.v84-result-grid::-webkit-scrollbar{width:6px}
.v843-result-map .v50-result-grid.v84-result-grid::-webkit-scrollbar-track{background:transparent}
.v843-result-map .v50-result-grid.v84-result-grid::-webkit-scrollbar-thumb{
  border-radius:999px;
  background:color-mix(in srgb,var(--muted) 35%,transparent);
}
.v843-result-map .v50-result-grid.v84-result-grid .v50-result-dot{
  width:100%!important;
  min-width:0!important;
  height:40px!important;
  min-height:40px!important;
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  padding:0!important;
  border:1px solid transparent!important;
  border-radius:10px!important;
  box-sizing:border-box;
  box-shadow:none!important;
  color:#176d4e;
  background:#e8f7f0;
  font-size:11px!important;
  font-weight:850;
  font-variant-numeric:tabular-nums;
  line-height:1;
  cursor:pointer;
  transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease,filter .15s ease;
}
.v843-result-map .v50-result-grid.v84-result-grid .v50-result-dot span{pointer-events:none}
.v843-result-map .v50-result-grid.v84-result-grid .v50-result-dot.wrong{
  color:#ad4543;
  background:#fff0ef;
  border-color:#f6d4d2!important;
}
.v843-result-map .v50-result-grid.v84-result-grid .v50-result-dot.skipped{
  color:#677682;
  background:#edf1f4;
  border-color:#dce3e8!important;
}
.v843-result-map .v50-result-grid.v84-result-grid .v50-result-dot.correct{
  border-color:#cfeade!important;
}
.v843-result-map .v50-result-grid.v84-result-grid .v50-result-dot:hover{
  transform:translateY(-1px);
  filter:brightness(.985);
  box-shadow:0 7px 16px rgba(23,58,75,.10)!important;
}
.v843-result-map .v50-result-grid.v84-result-grid .v50-result-dot.active,
.v843-result-map .v50-result-grid.v84-result-grid .v50-result-dot[aria-current="true"]{
  border-color:var(--theme-accent)!important;
  outline:2px solid color-mix(in srgb,var(--theme-accent) 22%,transparent);
  outline-offset:1px;
  box-shadow:0 7px 18px color-mix(in srgb,var(--theme-accent) 16%,transparent)!important;
}
.v843-result-map .v50-result-grid.v84-result-grid .v50-result-dot:focus-visible{
  outline:3px solid color-mix(in srgb,var(--theme-accent) 28%,transparent);
  outline-offset:2px;
}

/* Review actions: four equal controls on desktop, predictable wrapping below. */
.v50-result-actions.v84-result-actions{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
  width:min(100%,1020px)!important;
  margin:14px auto 24px!important;
}
.v84-result-actions>.btn,
.v84-result-actions>a.btn{
  width:100%!important;
  min-width:0!important;
  min-height:48px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px;
  padding:10px 12px!important;
  border-radius:13px!important;
  box-sizing:border-box;
  font-size:10px;
  font-weight:800!important;
  line-height:1.3;
  white-space:normal!important;
}
.v84-result-actions .icon{width:16px;height:16px;flex:0 0 auto}
.v84-result-actions .btn[disabled]{opacity:.42;filter:saturate(.55)}

/* Detail area follows the same visual rhythm as the summary above. */
#v50-result-detail{width:min(100%,1120px);margin:0 auto 34px}
.v84-result-detail-head{
  margin:18px 0 12px!important;
  padding:0 2px;
}
.v84-result-detail-head h2{font-size:19px}
.v84-result-detail-head span{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:4px 9px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--surface);
}
#v50-result-detail .v50-review-card{
  border-radius:18px;
  border-color:color-mix(in srgb,var(--theme-accent) 8%,var(--line));
  box-shadow:0 8px 24px rgba(22,52,66,.04);
}

[data-theme=dark] .v82-result-primary{
  background:color-mix(in srgb,#102129 92%,var(--theme-accent));
  border-color:#29414b;
}
[data-theme=dark] .v843-result-map .v84-result-map-body{
  background:#0f2028;
  border-color:#29414b;
}
[data-theme=dark] .v843-result-map .v50-result-grid.v84-result-grid .v50-result-dot.correct{
  color:#86d7b3;background:#15372d;border-color:#275544!important;
}
[data-theme=dark] .v843-result-map .v50-result-grid.v84-result-grid .v50-result-dot.wrong{
  color:#efaaa6;background:#3a2325;border-color:#573033!important;
}
[data-theme=dark] .v843-result-map .v50-result-grid.v84-result-grid .v50-result-dot.skipped{
  color:#bac6cc;background:#223039;border-color:#34444d!important;
}

@media(max-width:1050px){
  .v82-result-hero{grid-template-columns:1fr!important;grid-template-areas:"primary" "summary" "progress"!important}
  .v82-result-primary{min-height:0;justify-items:center;text-align:center}
  .v82-result-hero .v50-result-score{justify-content:center!important}
  .v82-result-hero .v50-result-score span{text-align:center}
  .v50-result-actions.v84-result-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media(max-width:760px){
  .v82-result-hero{padding:16px!important;gap:12px!important}
  .v82-result-primary{padding:15px 16px;border-radius:16px}
  .v82-result-hero .v50-result-score strong{font-size:50px!important}
  .v82-result-hero .v50-result-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .v82-result-hero .v50-result-summary article{min-height:70px!important}

  .v82-result-map.v50-result-map.v843-result-map{padding:16px!important;row-gap:13px!important;border-radius:18px!important}
  .v82-result-map .v843-result-map-head{flex-direction:column!important;gap:10px!important}
  .v843-result-map-meta{width:100%;justify-items:start;gap:7px}
  .v82-result-map .v50-result-legend{justify-content:flex-start!important}
  .v82-result-map .v843-result-map-title h2{font-size:18px!important}
  .v82-result-map .v843-result-map-title p{font-size:9.5px!important}
  .v843-result-map .v84-result-map-body{padding:11px}
  .v843-result-map .v50-result-grid.v84-result-grid{
    width:100%!important;
    max-width:100%!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    grid-auto-rows:42px!important;
    gap:7px!important;
    max-height:292px!important;
    padding:2px 7px 2px 2px!important;
  }
  .v843-result-map .v50-result-grid.v84-result-grid .v50-result-dot{
    height:42px!important;
    min-height:42px!important;
    font-size:11px!important;
  }
  .v50-result-actions.v84-result-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .v84-result-actions>.btn,.v84-result-actions>a.btn{min-height:46px!important;font-size:9.5px}
}

@media(max-width:430px){
  .v82-result-map.v50-result-map.v843-result-map{padding:14px!important}
  .v843-result-map .v50-result-grid.v84-result-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:6px!important}
  .v50-result-actions.v84-result-actions{grid-template-columns:1fr!important}
  .v84-result-actions>.btn,.v84-result-actions>a.btn{min-height:48px!important}
}

@media(max-width:340px){
  .v843-result-map .v50-result-grid.v84-result-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
