/* Nối Từ Việt v3.9.76 — Vua Tiếng Việt: gameplay-first, readable on touch and PC.
   Changes are strictly limited to live quiz mode. Lobby, Nối Từ, results,
   WordPress admin, Chat and collectible designs are unaffected. */
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-room-main{
  display:flex!important; flex-direction:column!important; gap:10px!important;
  min-width:0; align-items:stretch!important;
}
/* The room identity is still in the DOM (sharing and server state are intact),
   but its repeated explanatory rows do not take space during a live round. */
#ntv-game-root.ntv-device-pc .ntv-play.ntv-quiz-playing .ntv-room-main>.ntv-heading,
#ntv-game-root.ntv-device-pc .ntv-play.ntv-quiz-playing .ntv-room-main>.ntv-room-identity,
#ntv-game-root.ntv-device-pc .ntv-play.ntv-quiz-playing .ntv-room-main>.ntv-roomcode,
#ntv-game-root.ntv-device-pc .ntv-play.ntv-quiz-playing .ntv-room-main>.ntv-cup-rule,
#ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-mobile-room-header{
  display:none!important;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-room-main>.ntv-quiz{
  order:0!important; width:100%!important; max-width:none!important; min-width:0!important;
  margin:0!important; padding:clamp(12px,2vw,22px)!important;
  background:linear-gradient(155deg,#f7fff5 0%,#fffef4 100%);
  border:2px solid #69c29f!important; border-radius:20px!important;
  box-shadow:0 8px 22px rgba(6,78,62,.12);
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-room-main>.ntv-member-list{
  order:20!important; margin:8px 0 6px!important;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-room-main>.ntv-group-rule{order:21!important}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-room-main>.ntv-voice-panel{order:22!important}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-room-main>[data-role="lobby"],
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-room-main>.ntv-match-card{order:23!important}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-room-main>[data-role="result"]{order:24!important}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-room-main>.ntv-actionline-mobile{order:25!important}

/* Compact header retains the useful controls: round, category, progress and timer. */
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-head{
  margin:0 0 12px!important; padding:10px 12px!important;
  gap:8px!important; border-radius:13px!important;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-head-info>b{
  font-size:clamp(15px,1.8vw,19px)!important;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-head-info>small{
  font-size:clamp(12px,1.25vw,14px)!important;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-head .ntv-quiz-timer{
  min-width:60px!important; font-size:clamp(19px,2.5vw,25px)!important;
  font-variant-numeric:tabular-nums;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-stage{
  display:grid!important; grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:12px!important; width:100%; margin:0!important; align-items:start;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-stage-no-visual{
  grid-template-columns:minmax(0,1fr)!important;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-stage>.ntv-quiz-question{
  grid-column:1/-1; min-width:0; width:100%;
  font-size:clamp(23px,2.5vw,35px)!important; line-height:1.35!important;
  margin:2px 0 5px!important; color:#073d32; font-weight:900;
  text-wrap:pretty; overflow-wrap:anywhere;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-stage>.ntv-quiz-hint,
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-stage>.ntv-quiz-semantics-note{
  grid-column:1/-1; margin:0 0 4px!important; font-size:clamp(13px,1.3vw,16px)!important;
  line-height:1.42!important; padding:8px 11px!important; overflow-wrap:anywhere;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-stage-visual,
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-stage-answer{
  width:100%; max-width:100%; min-width:0; max-height:none!important;
  overflow:visible!important;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-stage-no-visual>.ntv-quiz-stage-answer{
  grid-column:1/-1;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-picture{
  width:min(100%,340px)!important; max-width:100%; margin:3px auto 8px!important;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-picture img{
  width:100%; height:auto; max-height:340px; object-fit:contain;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-choices{
  gap:11px!important; margin:5px 0 8px!important;
  grid-template-columns:repeat(2,minmax(0,1fr));
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-choice{
  min-height:66px!important; padding:11px 13px!important;
  font-size:clamp(16px,1.55vw,19px)!important;
  line-height:1.4!important; border-radius:14px!important;
  touch-action:manipulation;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-choice b{font-size:17px;flex-shrink:0}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-wordtoken,
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-tile{
  min-height:52px!important; min-width:43px!important;
  padding:9px 11px!important; font-size:clamp(17px,1.5vw,21px)!important;
  touch-action:manipulation;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-pair-left,
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-pair-right{
  min-height:58px!important; padding:10px!important;
  font-size:clamp(15px,1.4vw,18px)!important;
  line-height:1.4!important; touch-action:manipulation;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-text-form label{font-size:15px!important;line-height:1.4}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-text-form .ntv-field{
  min-height:50px!important; font-size:17px!important; line-height:1.35!important;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-text-form .ntv-gold-btn,
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-controls .ntv-gold-btn{
  min-height:48px!important; font-size:16px!important; padding:10px 16px!important;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-tiles-preview{
  min-height:48px; font-size:16px!important;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-letter-pick button{
  min-width:40px!important; min-height:48px!important; font-size:19px!important;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-letter-toolbar button{
  min-height:40px!important; font-size:13px!important;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-letters,
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-crossword{
  width:100%; max-width:100%; overflow-x:auto;
}
/* Letter boards and crosswords previously inherited compact 15px PC type. */
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-letter-row span{
  font-size:clamp(17px,1.65vw,22px)!important;
  min-width:28px;min-height:35px;line-height:1.3!important;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-crossword span{
  font-size:clamp(17px,1.55vw,21px)!important;
  min-height:40px!important;line-height:1.3!important;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-tiles,
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-scramble{
  max-width:100%;overflow-wrap:anywhere;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-scoring-footer{
  margin:14px 0 0!important; padding:6px 10px!important;
  font-size:12px!important; background:#f0faf2; border-radius:10px;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-scoring-footer summary{
  font-weight:800; cursor:pointer;
}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-history-btn{margin:12px 0 0}
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-stage button:focus-visible,
#ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-stage input:focus-visible{
  outline:3px solid #107b69; outline-offset:2px;
}

@media(min-width:1000px){
  #ntv-game-root.ntv-device-pc .ntv-play.ntv-quiz-playing .ntv-room-shell,
  #ntv-game-root.ntv-device-pc .ntv-play.ntv-quiz-playing[data-ntv-layout="pc"] .ntv-room-shell{
    display:grid!important;
    grid-template-columns:minmax(0,2.65fr) minmax(265px,.84fr)!important;
    gap:12px!important; align-items:start;
  }
  #ntv-game-root.ntv-device-pc .ntv-play.ntv-quiz-playing .ntv-quiz-stage>.ntv-quiz-question{
    font-size:clamp(24px,2.7vw,36px)!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-play.ntv-quiz-playing .ntv-room-main>.ntv-member-list{
    width:100%!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-play.ntv-quiz-playing .ntv-quiz-side-score:not([hidden]){
    max-height:none!important; overflow:visible!important;
  }
}
/* A 1000px WordPress column still needs legible choices; do not force tiny side-by-side items. */
@media(min-width:1000px) and (max-width:1160px){
  #ntv-game-root.ntv-device-pc .ntv-play.ntv-quiz-playing .ntv-quiz-stage:not(.ntv-quiz-stage-no-visual){
    grid-template-columns:minmax(0,1fr)!important;
  }
  #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{
    grid-column:1/-1;
  }
}
@media(max-width:999px){
  /* Mobile mount places the room heading inside a sticky wrapper. Hide that
     wrapper only during quiz; the quiz timer itself remains sticky. */
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-room-main>.ntv-quiz{
    padding:12px 10px 15px!important; border-radius:16px!important;
  }
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-stage{
    grid-template-columns:minmax(0,1fr)!important; gap:8px!important;
  }
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-stage-visual,
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-stage-answer{
    grid-column:1/-1; width:100%;
  }
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-stage>.ntv-quiz-question{
    font-size:clamp(22px,5.3vw,30px)!important; line-height:1.35!important;
  }
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-choices{
    grid-template-columns:1fr!important; gap:9px!important;
  }
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-choice{
    min-height:60px!important; font-size:clamp(16px,4vw,19px)!important;
    padding:11px!important;
  }
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-picture{
    width:min(100%,380px)!important; margin:6px auto 8px!important;
  }
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-picture img{
    max-height:300px; object-fit:contain;
  }
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-head{
    padding:8px!important; gap:6px!important; margin-bottom:8px!important;
  }
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-head-info>b{font-size:15px!important}
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-head-info>small{font-size:12px!important}
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-head .ntv-quiz-timer{
    font-size:20px!important; min-width:54px!important;
  }
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-text-form>div{
    display:flex; flex-wrap:wrap; gap:9px;
  }
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-text-form .ntv-gold-btn{
    min-height:48px!important;
  }
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-match-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px;
  }
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-pair-left,
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-pair-right{
    font-size:15px!important; min-height:55px!important;
  }
}
@media(max-width:360px){
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-stage>.ntv-quiz-question{
    font-size:21px!important;
  }
  #ntv-game-root.ntv-device-mobile .ntv-play.ntv-quiz-playing .ntv-quiz-letter-pick button{
    min-width:36px!important; min-height:45px!important;
  }
}
@media(prefers-reduced-motion:reduce){
  #ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-stage *,
  #ntv-game-root .ntv-play.ntv-quiz-playing .ntv-quiz-head *{
    scroll-behavior:auto!important; transition-duration:0s!important;
  }
}
