/* Nối Từ Việt v3.9.8 — Desktop workspace.
   Loaded LAST; intentionally scoped to the plugin. No scoring, API or mobile rules changed.
   Uses a viewport-width workspace when WordPress themes restrict page content. */
@media (min-width:1024px) {
  .ntv-game-embed[data-ntv-embed] {
    position:relative;
    left:50%;
    transform:translateX(-50%);
    width:min(1580px,calc(100vw - 32px))!important;
    max-width:none!important;
    margin:0 0 28px!important;
    box-sizing:border-box;
    isolation:isolate;
  }
}
#ntv-game-root.ntv-device-pc,
.ntv-game-embed #ntv-game-root.ntv-device-pc {
  width:100%!important;
  max-width:100%!important;
  padding:0!important;
  margin:0 auto 24px;
}
#ntv-game-root.ntv-device-pc .ntv-home,
#ntv-game-root.ntv-device-pc .ntv-play {
  min-height:0;
  width:100%;
  max-width:none;
  overflow:hidden;
  border-radius:24px;
  padding:clamp(16px,1.7vw,26px);
}
#ntv-game-root.ntv-device-pc .ntv-home-grid,
#ntv-game-root.ntv-device-pc .ntv-room-shell {width:100%;max-width:none!important;align-items:start!important}
/* Homepage: prominent play buttons and illustration on the left, discovery on the right. */
#ntv-game-root.ntv-device-pc .ntv-home-header {gap:18px;min-height:51px}
#ntv-game-root.ntv-device-pc .ntv-player-strip {margin-top:11px;gap:14px}
#ntv-game-root.ntv-device-pc .ntv-profile-card {min-height:74px;padding:10px 16px;gap:13px}
#ntv-game-root.ntv-device-pc .ntv-profile-avatar {width:52px;height:52px;flex:0 0 52px}
#ntv-game-root.ntv-device-pc .ntv-profile-name {font-size:17px}
#ntv-game-root.ntv-device-pc .ntv-cup-card {min-height:74px;flex-basis:24%}
#ntv-game-root.ntv-device-pc .ntv-honor-strip {min-height:40px;padding:7px 14px;margin-top:9px}
#ntv-game-root.ntv-device-pc .ntv-character-shortcut {width:100%;max-width:none;min-height:43px;margin:8px 0}
#ntv-game-root.ntv-device-pc .ntv-home-grid {
  grid-template-columns:minmax(0,1.82fr) minmax(310px,.8fr)!important;
  gap:clamp(14px,1.7vw,24px)!important;
  margin:12px 0 0!important;
}
#ntv-game-root.ntv-device-pc .ntv-home-core,
#ntv-game-root.ntv-device-pc .ntv-home-sidebar {width:100%;max-width:none;min-width:0;position:static!important}
#ntv-game-root.ntv-device-pc .ntv-home-core{display:flex;flex-direction:column;gap:0}
#ntv-game-root.ntv-device-pc .ntv-home-core>.ntv-section-heading {order:0;margin:7px 0 10px;font-size:18px}
#ntv-game-root.ntv-device-pc .ntv-home-core>.ntv-modes {
  order:1;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:11px!important;width:100%;max-width:none!important;margin:0!important;
}
#ntv-game-root.ntv-device-pc .ntv-mode {min-height:92px;padding:9px 6px;gap:3px;border-radius:19px}
#ntv-game-root.ntv-device-pc .ntv-mode-icon {font-size:35px;animation:none}
#ntv-game-root.ntv-device-pc .ntv-mode strong {font-size:15px;line-height:1.18}
#ntv-game-root.ntv-device-pc .ntv-home-core>.ntv-hero {
  order:2;width:100%;min-height:0!important;max-height:none!important;
  margin:17px 0 0!important;border-radius:19px;overflow:hidden;
}
#ntv-game-root.ntv-device-pc .ntv-hero-art {height:clamp(170px,18vw,245px);animation:none}
#ntv-game-root.ntv-device-pc .ntv-home-sidebar {gap:10px}
#ntv-game-root.ntv-device-pc .ntv-retain-zone {margin:0;padding:12px 14px}
#ntv-game-root.ntv-device-pc .ntv-retain-cards {gap:8px}
#ntv-game-root.ntv-device-pc .ntv-retain-card {min-height:58px;padding:9px 12px}
#ntv-game-root.ntv-device-pc .ntv-home-panels {
  display:flex!important;flex-direction:column!important;gap:11px!important;
  margin:0!important;width:100%!important;max-width:none!important;
}
#ntv-game-root.ntv-device-pc .ntv-home-panel {width:100%!important;min-height:100px;margin:0!important}
#ntv-game-root.ntv-device-pc .ntv-home-feed {min-height:45px;max-height:78px}
#ntv-game-root.ntv-device-pc .ntv-bottom-menu {margin-top:16px;gap:12px}
#ntv-game-root.ntv-device-pc .ntv-bottom-menu button {min-height:57px;padding:5px 8px}
#ntv-game-root.ntv-device-pc .ntv-bottom-menu span {font-size:20px}
/* Room: prioritize the live word and answer box; chat stays visible next to gameplay. */
#ntv-game-root.ntv-device-pc .ntv-play .ntv-topbar {min-height:34px}
#ntv-game-root.ntv-device-pc .ntv-room-shell {
  grid-template-columns:minmax(0,1.84fr) minmax(320px,.82fr)!important;
  gap:clamp(14px,1.6vw,24px)!important;
  margin-top:7px;
}
#ntv-game-root.ntv-device-pc .ntv-room-main,
#ntv-game-root.ntv-device-pc .ntv-room-side {
  min-width:0;width:100%;max-width:100%;height:auto;
}
#ntv-game-root.ntv-device-pc .ntv-room-main {display:flex!important;flex-direction:column;gap:6px!important}
#ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-heading {order:0;margin:0 0 1px;font-size:clamp(24px,2.5vw,32px);line-height:1.12}
#ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-room-identity {order:1;margin:1px 0;gap:8px}
#ntv-game-root.ntv-device-pc .ntv-room-name {font-size:clamp(18px,2vw,25px);line-height:1.22}
#ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-roomcode {order:2;margin:0;font-size:13px;line-height:1.32}
#ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-cup-rule {order:3;margin:3px 0 1px;padding:8px 12px;min-height:0}
#ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-member-list {
  order:4;display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(132px,1fr))!important;
  gap:10px!important;padding:9px 3px 6px!important;
  margin:4px 0 0!important;max-height:none!important;overflow:visible!important;
}
#ntv-game-root.ntv-device-pc .ntv-member-list .ntv-person {
  min-height:115px!important;padding:7px 5px!important;gap:1px;border-radius:18px;
}
#ntv-game-root.ntv-device-pc .ntv-person-avatar-wrap {width:50px;height:50px}
#ntv-game-root.ntv-device-pc .ntv-person-avatar {width:48px;height:48px}
#ntv-game-root.ntv-device-pc .ntv-person-name {font-size:13px}
#ntv-game-root.ntv-device-pc .ntv-person .ntv-member-state {font-size:10px}
#ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-group-rule {order:5;margin:1px 0 3px;padding:7px 10px;font-size:12px}
#ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-quiz {order:6}
#ntv-game-root.ntv-device-pc .ntv-room-main>[data-role="lobby"] {order:7}
#ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-match-card {
  order:8;width:100%;min-width:0;margin:2px 0 0!important;
  padding:clamp(11px,1.25vw,17px)!important;border-radius:20px;
}
#ntv-game-root.ntv-device-pc .ntv-match-card .ntv-boardplate {
  margin:3px 0 8px!important;padding:11px 10px!important;border-radius:19px;
}
#ntv-game-root.ntv-device-pc .ntv-boardplate small {font-size:12px}
#ntv-game-root.ntv-device-pc .ntv-boardplate .ntv-word {font-size:clamp(27px,2.7vw,39px);margin:4px 0}
#ntv-game-root.ntv-device-pc .ntv-next {font-size:13px}
#ntv-game-root.ntv-device-pc .ntv-meaning-card {margin:6px 0!important;padding:8px 11px;border-radius:12px}
#ntv-game-root.ntv-device-pc .ntv-meaning-head {font-size:12px}
#ntv-game-root.ntv-device-pc .ntv-turn-banner {margin:7px 0 5px;padding:8px 11px;border-radius:13px}
#ntv-game-root.ntv-device-pc .ntv-turn-banner strong {font-size:17px}
#ntv-game-root.ntv-device-pc .ntv-turn-banner span {font-size:12px}
#ntv-game-root.ntv-device-pc .ntv-input-label {margin:7px 0 6px;font-size:13px}
#ntv-game-root.ntv-device-pc .ntv-continuation {gap:8px}
#ntv-game-root.ntv-device-pc .ntv-continuation .ntv-field {min-width:0;flex:1}
#ntv-game-root.ntv-device-pc .ntv-status {margin:5px 0;min-height:19px}
#ntv-game-root.ntv-device-pc .ntv-tries {margin-top:5px;min-height:0}
#ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-voice-panel {order:9;margin:8px 0;padding:9px 12px;font-size:12px}
#ntv-game-root.ntv-device-pc .ntv-room-main>[data-role="result"] {order:10}
#ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-actionline-mobile {order:11}
#ntv-game-root.ntv-device-pc .ntv-room-side {
  position:sticky!important;top:12px!important;align-self:start;
  display:flex!important;flex-direction:column;gap:11px!important;
}
#ntv-game-root.ntv-device-pc .ntv-room-grid {display:flex!important;flex-direction:column;gap:10px!important}
#ntv-game-root.ntv-device-pc .ntv-moves-panel {padding:10px 11px;border-radius:16px}
#ntv-game-root.ntv-device-pc .ntv-moves-panel h3 {margin:0 0 6px;font-size:14px}
#ntv-game-root.ntv-device-pc .ntv-moves-panel .ntv-scroll {max-height:95px!important;overflow:auto}
#ntv-game-root.ntv-device-pc .ntv-chatbox:not(.ntv-chat-expanded) {
  height:clamp(325px,calc(100dvh - 275px),525px)!important;
  min-height:325px!important;max-height:525px!important;
  display:flex!important;flex-direction:column;overflow:hidden;
  border-radius:20px;
}
#ntv-game-root.ntv-device-pc .ntv-chatbox-body {flex:1;min-height:85px!important;max-height:none!important;overflow:auto}
#ntv-game-root.ntv-device-pc .ntv-chatbox-head {padding:10px 12px}
#ntv-game-root.ntv-device-pc .ntv-chat-compose {gap:7px;padding:9px 10px}
#ntv-game-root.ntv-device-pc .ntv-chat-input {height:43px;padding:0 12px;font-size:14px}
#ntv-game-root.ntv-device-pc .ntv-emoji-btn,
#ntv-game-root.ntv-device-pc .ntv-chat-send {height:41px;width:41px;flex:0 0 41px;font-size:19px}
#ntv-game-root.ntv-device-pc .ntv-actionline-desktop {margin:0!important}
/* The chat expansion mode must remain a true screen overlay. */
#ntv-game-root.ntv-device-pc .ntv-chatbox.ntv-chat-expanded {position:fixed!important;inset:12px!important;width:auto!important;height:auto!important;min-height:0!important;max-height:none!important;z-index:1100}
#ntv-game-root.ntv-device-pc .ntv-chatbox.ntv-chat-expanded .ntv-chatbox-body{flex:1;min-height:0!important}
/* Laptop with shorter viewport: retain a two-column layout and readable controls. */
@media (min-width:1024px) and (max-width:1279px) {
  #ntv-game-root.ntv-device-pc .ntv-room-shell {grid-template-columns:minmax(0,1.5fr) minmax(320px,.85fr)!important;gap:14px!important}
  #ntv-game-root.ntv-device-pc .ntv-home-grid {grid-template-columns:minmax(0,1.45fr) minmax(300px,.85fr)!important;gap:14px!important}
  #ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-member-list {grid-template-columns:repeat(auto-fit,minmax(110px,1fr))!important}
  #ntv-game-root.ntv-device-pc .ntv-member-list .ntv-person {min-height:107px!important}
  #ntv-game-root.ntv-device-pc .ntv-mode {min-height:85px}
}
@media (min-width:1024px) and (max-height:780px) {
  #ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-heading {font-size:24px}
  #ntv-game-root.ntv-device-pc .ntv-person-avatar-wrap {width:42px;height:42px}
  #ntv-game-root.ntv-device-pc .ntv-person-avatar {width:40px;height:40px}
  #ntv-game-root.ntv-device-pc .ntv-member-list .ntv-person {min-height:95px!important}
  #ntv-game-root.ntv-device-pc .ntv-chatbox:not(.ntv-chat-expanded) {height:clamp(305px,calc(100dvh - 245px),470px)!important;min-height:305px!important}
}
/* Compact desktop game card: enter the next word immediately below the live word.
   Meaning details remain accessible below the answer form. This changes visual
   order only; input, form handlers and game state stay untouched. */
#ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-match-card[style*="block"] {
  display:flex!important;flex-direction:column;gap:0;
}
#ntv-game-root.ntv-device-pc .ntv-match-card>.ntv-boardplate {order:0}
#ntv-game-root.ntv-device-pc .ntv-match-card>.ntv-turn-banner {order:1}
#ntv-game-root.ntv-device-pc .ntv-match-card>.ntv-status {order:2}
#ntv-game-root.ntv-device-pc .ntv-match-card>.ntv-input-label {order:3}
#ntv-game-root.ntv-device-pc .ntv-match-card>.ntv-input-row {order:4}
#ntv-game-root.ntv-device-pc .ntv-match-card>.ntv-preview {order:5}
#ntv-game-root.ntv-device-pc .ntv-match-card>.ntv-tries {order:6}
#ntv-game-root.ntv-device-pc .ntv-match-card>.ntv-meaning-card {order:7;margin:12px 0 2px!important}
/* Wide-screen roster: compact profile chips instead of tall phone-style cards. */
#ntv-game-root.ntv-device-pc .ntv-member-list .ntv-person {
  display:grid!important;
  grid-template-columns:62px minmax(0,1fr);
  grid-auto-rows:min-content;
  column-gap:8px;row-gap:3px;
  align-content:center;justify-content:stretch;justify-items:start;
  text-align:left;
  min-height:99px!important;
  padding:8px 10px!important;
}
#ntv-game-root.ntv-device-pc .ntv-person-avatar-wrap {
  grid-column:1;grid-row:1/span 6;
  align-self:center;justify-self:center;
  width:60px;height:60px;
}
#ntv-game-root.ntv-device-pc .ntv-person-avatar {width:56px;height:56px}
#ntv-game-root.ntv-device-pc .ntv-person-name,
#ntv-game-root.ntv-device-pc .ntv-person>small,
#ntv-game-root.ntv-device-pc .ntv-person>.ntv-player-title,
#ntv-game-root.ntv-device-pc .ntv-person>.ntv-person-wardrobe,
#ntv-game-root.ntv-device-pc .ntv-person>.ntv-player-badges,
#ntv-game-root.ntv-device-pc .ntv-person>.ntv-member-state {
  grid-column:2;min-width:0;text-align:left;max-width:100%;
  justify-content:flex-start;margin:0;
}
#ntv-game-root.ntv-device-pc .ntv-person>.ntv-member-state {font-size:10px;line-height:1.3}
#ntv-game-root.ntv-device-pc .ntv-person-name {white-space:normal;overflow-wrap:anywhere;font-size:13px;line-height:1.2}
#ntv-game-root.ntv-device-pc .ntv-person>small {font-size:11px}
#ntv-game-root.ntv-device-pc .ntv-home-header,
#ntv-game-root.ntv-device-pc .ntv-player-strip,
#ntv-game-root.ntv-device-pc .ntv-honor-strip {max-width:none!important;width:100%!important}
@media (min-width:1024px) and (max-width:1140px) {
 #ntv-game-root.ntv-device-pc .ntv-member-list .ntv-person {grid-template-columns:48px minmax(0,1fr);column-gap:5px;padding:7px 5px!important}
 #ntv-game-root.ntv-device-pc .ntv-person-avatar-wrap {width:46px;height:46px}
 #ntv-game-root.ntv-device-pc .ntv-person-avatar {width:44px;height:44px}
}
