/* Nối Từ Việt 3.9.58 — Quiz-only readability, single scroll, sticky timer/progress.
   Loaded AFTER all earlier CSS to override 3937's nowrap truncation and nested scroll. */
#ntv-game-root .ntv-play.ntv-quiz-playing{
  overflow:clip!important; /* unlike overflow:hidden, does not break viewport sticky positioning */
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz{
  min-width:0;max-width:100%;overflow:visible!important;isolation:isolate;
  margin-block:9px;padding:12px!important;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz *{box-sizing:border-box}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-head{
  position:sticky!important;
  top:var(--ntv-quiz-sticky-top,6px)!important;
  z-index:70;
  scroll-margin-top:calc(var(--ntv-quiz-sticky-top,6px) + 8px);
  display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;
  gap:6px 9px;min-width:0;margin:-2px -2px 5px;padding:9px 10px!important;
  border:1px solid #66baa0;border-radius:13px;
  background:linear-gradient(140deg,#e9fff4 0%,#fff4cc 100%);
  box-shadow:0 3px 12px #035d4630,0 1px 0 #ffffff inset;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-head-info{min-width:0;flex:1 1 150px}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-head-info>b{
  color:#0a5646;font-size:clamp(13px,1.4vw,17px)!important;line-height:1.22;overflow-wrap:anywhere;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-head-info>small{
  display:block;color:#306254;font-weight:800;font-size:clamp(11px,1vw,13px);line-height:1.3;
  margin:2px 0!important;overflow-wrap:anywhere;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-head-actions{
  display:flex;align-items:center;justify-content:flex-end;flex:0 0 auto;gap:6px;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-jump{
  appearance:none;min-height:34px;padding:5px 9px;border:1px solid #76bca4;border-radius:9px;
  background:#fffef7;color:#136350;font:inherit;font-size:12px;font-weight:850;
  white-space:nowrap;cursor:pointer;touch-action:manipulation;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-jump:focus-visible{
  outline:3px solid #176eae;outline-offset:2px;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-head .ntv-quiz-timer{
  display:grid;place-items:center;min-width:54px;padding:5px 9px!important;
  border-width:2px;border-radius:10px;font-size:clamp(16px,2vw,20px)!important;
  line-height:1.25;white-space:nowrap;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-head .ntv-quiz-progress{
  display:block;min-width:0;margin:2px 0 0!important;padding:0;
  text-align:left;font-size:12px;color:#805a17;font-weight:850;line-height:1.2;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-head .ntv-quiz-tap-status{
  flex:1 0 100%;min-width:0;margin:2px 0 0;padding:6px 9px;
  text-align:left;font-size:12px;line-height:1.35;overflow-wrap:anywhere;
  max-height:90px;overflow-y:auto;
}
/* Always show note contents when there is room, never visually truncate scoring rules. */
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-rule{
  white-space:normal!important;text-overflow:clip!important;overflow:visible!important;
  max-width:100%;line-height:1.4!important;padding:6px 9px!important;
  margin:6px 0!important;font-size:12px!important;overflow-wrap:anywhere;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-scoring-details{
  white-space:normal;overflow:visible;max-width:100%;margin:7px 0!important;
  padding:7px 10px!important;font-size:12px!important;line-height:1.5;overflow-wrap:anywhere;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-scoring-details summary{
  cursor:pointer;min-height:25px;overflow-wrap:anywhere;white-space:normal;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-scoring-details p{margin:6px 0;line-height:1.5}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-mini-tag,
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-semantics-note,
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-hint{
  white-space:normal!important;max-width:100%;overflow-wrap:anywhere;
  line-height:1.4!important;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-semantics-note{padding:7px 9px;margin:7px 0!important;font-size:12px!important}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-question{
  max-width:100%;min-width:0;overflow-wrap:anywhere;scroll-margin-top:clamp(115px,17vh,150px);
  margin:12px 0!important;line-height:1.4;
}
/* One page scroll instead of the left-question/right-answer mini-scrolls. */
#ntv-game-root.ntv-device-pc .ntv-play.ntv-quiz-playing .ntv-quiz-stage{
  min-width:0;align-items:start;
}
#ntv-game-root.ntv-device-pc .ntv-play.ntv-quiz-playing .ntv-quiz-stage-visual,
#ntv-game-root.ntv-device-pc .ntv-play.ntv-quiz-playing .ntv-quiz-stage-answer{
  max-height:none!important;overflow:visible!important;overscroll-behavior:auto;
  min-width:0;max-width:100%;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-choice,
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-pair-left,
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-pair-right,
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-tile,
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-wordtoken{
  min-width:0;max-width:100%;white-space:normal!important;overflow-wrap:anywhere;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-choice span{flex:1;min-width:0;overflow-wrap:anywhere}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-scores>div,
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-round-row{
  min-width:0;max-width:100%;overflow-wrap:anywhere;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-scores>div>span,
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-round-row>span{min-width:0;overflow-wrap:anywhere}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-letters,
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-crossword,
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-scramble{
  max-width:100%;min-width:0;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-letter-instruction{
  display:block;max-width:100%;margin:7px 0 10px!important;
  border:1px solid #bfdfd2;border-radius:9px;background:#f5fff9;
  padding:7px 10px!important;font-size:12px!important;line-height:1.5;
  text-align:left;overflow-wrap:anywhere;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-letter-instruction summary{
  min-height:24px;cursor:pointer;font-weight:800;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-letter-instruction p{margin:5px 0 2px}
/* Result explanations remain accessible, without swallowing the entire five-second reveal. */
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-reveal-extra{
  margin:8px 0 0;text-align:left;border:1px solid #e4c47a;border-radius:10px;
  background:#fffef5;overflow-wrap:anywhere;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-reveal-extra>summary{
  cursor:pointer;min-height:39px;padding:9px 12px;font-size:13px;font-weight:850;color:#74521e;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-reveal-extra .ntv-quiz-learning{
  max-height:none!important;overflow:visible!important;margin:0 7px 10px;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-reveal-extra .ntv-quiz-round-results{
  margin:0 7px 10px;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-learning,
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-learning-word,
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-scores{
  min-width:0;max-width:100%;overflow-wrap:anywhere;
}
/* Notebook: one scrollbar, with close/title accessible at the top of the dialog. */
#ntv-game-root .ntv-modal:has(.ntv-quiz-history){
  background:#f6fff6;color:#164e3e;max-width:min(100%,810px);
  overflow-y:auto;overflow-x:hidden;
}
#ntv-game-root .ntv-modal:has(.ntv-quiz-history) .ntv-modal-head{
  position:sticky;top:0;z-index:6;padding:9px 2px;
  background:#f6fff6;border-bottom:1px solid #b7d8c4;
}
#ntv-game-root .ntv-modal:has(.ntv-quiz-history) .ntv-modal-head h2{color:#0b5f48;text-shadow:none;font-size:clamp(17px,4vw,23px)}
#ntv-game-root .ntv-modal:has(.ntv-quiz-history) .ntv-modal-head .ntv-smallbtn{background:#0f7560;color:#fff}
#ntv-game-root .ntv-modal:has(.ntv-quiz-history) .ntv-quiz-history{
  max-height:none!important;overflow:visible!important;
}
#ntv-game-root .ntv-modal:has(.ntv-quiz-history) .ntv-quiz-history-item summary{
  flex-wrap:wrap;overflow-wrap:anywhere;
}
#ntv-game-root .ntv-modal:has(.ntv-quiz-history) .ntv-quiz-history-item summary span{
  white-space:normal!important;overflow-wrap:anywhere;
}
#ntv-game-root .ntv-modal:has(.ntv-quiz-history) .ntv-quiz-learning-word p{overflow-wrap:anywhere}
@media(max-width:599px){
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz{padding:9px!important;margin:4px 0 10px!important}
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-head{
    gap:4px 6px;margin:0 0 6px;padding:7px 8px!important;
  }
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-head-info{flex:1 1 125px}
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-head-info>b{font-size:13px!important}
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-head-info>small{font-size:11px!important}
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-jump{font-size:11px;min-height:31px;padding:4px 6px}
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-timer{min-width:45px;padding:5px 6px!important}
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-question{scroll-margin-top:140px}
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-choices{grid-template-columns:1fr!important}
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-match-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-round-row{
    grid-template-columns:minmax(0,1fr) 42px 48px;gap:4px;padding:7px 5px;font-size:11px;
  }
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-scores>div{font-size:12px;padding:7px 8px}
}
@media(prefers-reduced-motion:reduce){
  #ntv-game-root .ntv-quiz-round-track i{transition:none!important}
}
@media(max-width:359px){
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-jump{
    font-size:0!important;min-width:31px;padding:5px 7px;
  }
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-jump::before{
    content:"↑";font-size:17px;line-height:1;
  }
}
/* Very narrow desktop answer columns need one readable choice per row, not two tall strips. */
#ntv-game-root.ntv-device-pc .ntv-play.ntv-quiz-playing .ntv-quiz-stage-answer{
  container-name:ntvQuizAnswer;container-type:inline-size;
}
@container ntvQuizAnswer (max-width:420px){
  #ntv-game-root .ntv-quiz-choices{grid-template-columns:1fr!important}
}

#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-reveal{
  scroll-margin-top:clamp(112px,19vh,166px);
}
