/* Nối Từ Việt v3.9.38 — laptop & desktop visual polish.
 * Readability first: remove the extreme miniaturization introduced in v3.9.37.
 * Scoped to PC only. Keeps original markup, selectors and gameplay callbacks intact.
 */
@media (min-width:1024px){
  .ntv-game-embed[data-ntv-embed]:not(.ntv-embed-focus){
    width:min(1400px,calc(100vw - 38px))!important;
    max-width:none!important;
  }
  #ntv-game-root.ntv-device-pc{--ntv-card-shadow:0 4px 10px rgba(6,74,63,.10)}
  #ntv-game-root.ntv-device-pc .ntv-home{
    padding:15px 18px 17px!important;
    border:2px solid #79cfae!important;
    border-radius:23px!important;
    background:radial-gradient(ellipse at 12% 0%,#eaffee 0,transparent 45%),
      radial-gradient(ellipse at 100% 12%,#d5f8ee 0,transparent 39%),
      linear-gradient(145deg,#f4fff6 0%,#e1f8ee 52%,#d7f1ed 100%)!important;
    color:#174d41!important;
    box-shadow:0 12px 35px rgba(3,68,58,.16)!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home-header{
    min-height:56px!important;gap:10px!important;
    padding:8px 15px!important;margin:-4px 0 0!important;
    border-radius:17px;background:linear-gradient(110deg,#07574e,#098c7a 72%,#0b736d);
    box-shadow:0 3px 0 rgba(2,64,53,.18);
  }
  #ntv-game-root.ntv-device-pc .ntv-home-header .ntv-brand{
    font-size:clamp(25px,2.45vw,31px)!important;letter-spacing:-.6px;
    color:#ffefb9!important;text-shadow:0 2px 2px #005246!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home-header .ntv-brand small{font-size:9px}
  #ntv-game-root.ntv-device-pc .ntv-home-header .ntv-brand-book{font-size:31px!important}
  #ntv-game-root.ntv-device-pc .ntv-home-header .ntv-icon-button{
    width:43px!important;min-height:43px!important;flex-basis:43px!important;
    border-radius:13px!important;font-size:22px!important
  }
  #ntv-game-root.ntv-device-pc .ntv-home-header .ntv-pc-focus-button{
    min-height:40px!important;padding:8px 14px!important;font-size:13px!important;
    box-shadow:none!important;border-color:#ffecaa;
  }
  #ntv-game-root.ntv-device-pc .ntv-home .ntv-player-strip{margin-top:10px!important;gap:11px!important}
  #ntv-game-root.ntv-device-pc .ntv-home .ntv-profile-card,
  #ntv-game-root.ntv-device-pc .ntv-home .ntv-cup-card{
    min-height:66px!important;padding:8px 14px!important;border-radius:15px!important;
    box-shadow:var(--ntv-card-shadow)!important
  }
  #ntv-game-root.ntv-device-pc .ntv-home .ntv-profile-card{
    flex:1 1 auto!important;background:#fffef5!important;border:1.5px solid #bcded1!important;
    color:#234b41!important;gap:13px!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home .ntv-profile-avatar{
    width:49px!important;height:49px!important;flex:0 0 49px!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home .ntv-profile-text strong{font-size:18px!important;color:#124d42}
  #ntv-game-root.ntv-device-pc .ntv-home .ntv-profile-text small{font-size:11px!important;line-height:1.3}
  #ntv-game-root.ntv-device-pc .ntv-home .ntv-cup-card{
    flex:0 0 24%!important;background:linear-gradient(115deg,#ffdc8a,#f7a842)!important;
    border:1.5px solid #e7a848!important;color:#67400b!important;gap:2px!important
  }
  #ntv-game-root.ntv-device-pc .ntv-home .ntv-cup-card>span{font-size:22px!important}
  #ntv-game-root.ntv-device-pc .ntv-home .ntv-cup-card>strong{font-size:21px!important;max-width:100%;overflow:hidden;text-overflow:ellipsis}
  #ntv-game-root.ntv-device-pc .ntv-home .ntv-cup-card>small{font-size:10px!important;letter-spacing:.9px}
  #ntv-game-root.ntv-device-pc .ntv-home .ntv-honor-strip{
    min-height:35px!important;margin:8px 0 3px!important;padding:6px 12px!important;
    font-size:12px!important;gap:7px 18px!important;justify-content:flex-start!important;
    background:#e7f9ef!important;border:1px solid #b9e1cb!important;
    box-shadow:none!important;color:#145847!important;border-radius:12px!important
  }
  #ntv-game-root.ntv-device-pc .ntv-home .ntv-honor-strip>span:last-child{font-size:16px!important}
  #ntv-game-root.ntv-device-pc .ntv-home>.ntv-character-shortcut,
  #ntv-game-root.ntv-device-pc .ntv-home>.ntv-gift-shortcut{
    min-height:43px!important;width:calc(50% - 6px)!important;
    padding:9px 13px!important;margin:6px 0 1px!important;border-radius:12px!important;
    font-size:13px!important;line-height:1.35!important;white-space:normal!important;
    box-shadow:0 2px 0 rgba(27,104,77,.12)!important
  }
  #ntv-game-root.ntv-device-pc .ntv-home>.ntv-character-shortcut{
    background:#e8fff1!important;border:1.5px solid #94d4b4!important;color:#155b43!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home>.ntv-gift-shortcut{
    margin-left:8px!important;background:#fff3d3!important;border:1.5px solid #ebce87!important;color:#70470b!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home-grid{
    grid-template-columns:minmax(0,1.75fr) minmax(292px,.88fr)!important;
    gap:13px!important;margin:10px 0 0!important;align-items:stretch!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home-core{
    border:1.5px solid #c4e7d4!important;border-radius:17px!important;
    background:rgba(255,255,255,.68);padding:12px!important;
    box-shadow:var(--ntv-card-shadow);align-items:stretch!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home-core>.ntv-section-heading{
    order:0!important;margin:0 0 10px!important;font-size:19px!important;
    text-align:left!important;color:#136951!important;text-shadow:none!important;line-height:1.3;
  }
  #ntv-game-root.ntv-device-pc .ntv-home-core>.ntv-modes{
    order:1!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:10px!important;width:100%!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home-core>.ntv-modes .ntv-mode{
    min-height:81px!important;max-height:none!important;
    display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;
    gap:10px!important;padding:12px 10px!important;border-radius:14px!important;
    border:1.5px solid rgba(255,255,255,.94)!important;
    box-shadow:0 3px 0 rgba(18,75,74,.23),0 6px 13px rgba(3,52,50,.10)!important;
    color:#fff!important;text-shadow:0 1px 1px rgba(36,40,45,.24)!important;
    transition:transform .16s ease,box-shadow .16s ease!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home-core>.ntv-modes .ntv-mode:nth-child(5){grid-column:span 2}
  #ntv-game-root.ntv-device-pc .ntv-home-core>.ntv-modes .ntv-mode-icon{
    font-size:30px!important;flex:0 0 auto;line-height:1.1!important;filter:none!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home-core>.ntv-modes .ntv-mode strong{
    font-size:clamp(14px,1.15vw,17px)!important;font-weight:950!important;line-height:1.25!important;
    text-align:left!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home-core>.ntv-modes .ntv-mode:hover{
    transform:translateY(-2px)!important;box-shadow:0 5px 0 rgba(18,75,74,.22),0 8px 14px rgba(3,52,50,.12)!important
  }
  #ntv-game-root.ntv-device-pc .ntv-home-core .ntv-mode-private{background:linear-gradient(135deg,#fd788e,#e34c72)!important}
  #ntv-game-root.ntv-device-pc .ntv-home-core .ntv-mode-bot{background:linear-gradient(135deg,#55bbf2,#2279ca)!important}
  #ntv-game-root.ntv-device-pc .ntv-home-core .ntv-mode-random{background:linear-gradient(135deg,#ac78ee,#8550c5)!important}
  #ntv-game-root.ntv-device-pc .ntv-home-core .ntv-mode-search{background:linear-gradient(135deg,#3cd9b6,#079c8d)!important}
  #ntv-game-root.ntv-device-pc .ntv-home-core .ntv-mode-quiz{background:linear-gradient(135deg,#ac8cf7,#865ad5)!important}
  #ntv-game-root.ntv-device-pc .ntv-home-core>.ntv-hero{
    order:2!important;position:relative!important;isolation:isolate;
    min-height:0!important;max-height:none!important;margin:11px 0 0!important;
    padding:0!important;border:1.5px solid #a5ddcb!important;border-radius:14px!important;
    background:#b8edfa!important;overflow:hidden!important;box-shadow:none!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home-core>.ntv-hero::before{
    content:"";position:absolute;inset:-18px;z-index:0;
    background:url('../images/san-truong-chibi.webp') center 45%/cover no-repeat;
    filter:blur(19px);opacity:.43;
  }
  #ntv-game-root.ntv-device-pc .ntv-home-core>.ntv-hero .ntv-hero-art{
    position:relative;z-index:1;height:clamp(120px,17dvh,155px)!important;
    background-image:url('../images/san-truong-chibi.webp')!important;
    background-size:auto 100%!important;background-repeat:no-repeat!important;
    background-position:center!important;animation:none!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home-core>.ntv-rules-home-link{
    order:3!important;min-height:36px!important;padding:7px 11px!important;margin:9px 0 0!important;
    font-size:13px!important;border-radius:11px!important;
    box-shadow:none!important;background:#f4fff9!important;border-color:#bbdfce!important;color:#185b48!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home-core>.ntv-rules-home-link small{font-size:11px!important;color:#567e6d!important}
  #ntv-game-root.ntv-device-pc .ntv-home-sidebar{gap:9px!important;align-self:stretch!important}
  #ntv-game-root.ntv-device-pc .ntv-home-sidebar .ntv-retain-zone{
    margin:0!important;padding:10px 12px!important;
    background:#fffef8!important;border:1.5px solid #c7dfd1!important;
    box-shadow:var(--ntv-card-shadow)!important;border-radius:16px!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home-sidebar .ntv-retain-head{margin-bottom:7px!important}
  #ntv-game-root.ntv-device-pc .ntv-home-sidebar .ntv-retain-head h2{
    font-size:17px!important;color:#135d4d!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home-sidebar .ntv-retain-cards{gap:6px!important}
  #ntv-game-root.ntv-device-pc .ntv-home-sidebar .ntv-retain-card{
    height:auto!important;min-height:43px!important;max-height:none!important;
    grid-template-columns:31px minmax(0,1fr) 14px!important;
    padding:7px 9px!important;gap:7px!important;border:1px solid #cfdfd4!important;
    border-radius:10px!important;background:#f3fbf6!important;
    box-shadow:none!important;overflow:visible!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home-sidebar .ntv-retain-emoji{font-size:22px!important}
  #ntv-game-root.ntv-device-pc .ntv-home-sidebar .ntv-retain-card strong{
    font-size:13px!important;line-height:1.22!important;color:#135846!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home-sidebar .ntv-retain-link{font-size:19px!important}
  #ntv-game-root.ntv-device-pc .ntv-home-sidebar .ntv-home-panels{
    display:flex!important;flex-direction:column!important;gap:9px!important;margin:0!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home-sidebar .ntv-home-panel{
    border:1.5px solid #b5dbca!important;border-radius:15px!important;
    min-height:0!important;padding:9px 11px!important;
    background:#fffef9!important;box-shadow:var(--ntv-card-shadow)!important;
    color:#185844!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home-sidebar .ntv-panel-head{margin-bottom:5px!important}
  #ntv-game-root.ntv-device-pc .ntv-home-sidebar .ntv-panel-head strong{
    font-size:14px!important;color:#145e4f!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home-sidebar .ntv-panel-head button{
    font-size:11px!important;background:#e1faed!important;color:#176047!important;border-color:#a9d7bf!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home-sidebar .ntv-home-feed{
    min-height:37px!important;max-height:60px!important;overflow-y:auto!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home-sidebar .ntv-feed-line,
  #ntv-game-root.ntv-device-pc .ntv-home-sidebar .ntv-lb-home-row{font-size:11px!important;color:#175946!important}
  #ntv-game-root.ntv-device-pc .ntv-home .ntv-bottom-menu{
    margin-top:11px!important;gap:9px!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home .ntv-bottom-menu button{
    min-height:45px!important;padding:7px 10px!important;font-size:13px!important;
    border-radius:12px!important;border:1.5px solid #e9c17e!important;
    background:#fff2d0!important;box-shadow:0 2px 0 #c7a06488!important;
    color:#5b451a!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-home .ntv-bottom-menu span{font-size:18px!important;margin-right:7px!important}

  /* Room & quiz: do not trade readability for the last few pixels of scroll. */
  #ntv-game-root.ntv-device-pc .ntv-play{
    padding:13px 16px 16px!important;border-radius:20px!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-play .ntv-topbar .ntv-smallbtn{font-size:13px!important;min-height:39px!important}
  #ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-room-identity .ntv-room-name{font-size:17px!important}
  #ntv-game-root.ntv-device-pc .ntv-play.ntv-word-playing .ntv-member-list{
    max-height:100px!important;min-height:88px!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-play.ntv-word-playing .ntv-member-list .ntv-person{
    flex-basis:160px;min-width:160px!important;max-width:160px!important;
    height:87px!important;min-height:87px!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-play.ntv-word-playing .ntv-person-avatar-wrap{width:43px!important;height:43px!important}
  #ntv-game-root.ntv-device-pc .ntv-play.ntv-word-playing .ntv-person-avatar{width:41px!important;height:41px!important}
  #ntv-game-root.ntv-device-pc .ntv-play.ntv-word-playing .ntv-person-name{font-size:12px!important}
  #ntv-game-root.ntv-device-pc .ntv-play.ntv-quiz-playing .ntv-quiz{padding:10px 12px!important}
  #ntv-game-root.ntv-device-pc .ntv-play.ntv-quiz-playing .ntv-quiz-question{font-size:clamp(17px,1.45vw,21px)!important}
  #ntv-game-root.ntv-device-pc .ntv-play.ntv-quiz-playing .ntv-quiz-choice{
    min-height:49px!important;font-size:14px!important;padding:7px 8px!important;
  }
  #ntv-game-root.ntv-device-pc .ntv-play.ntv-quiz-playing .ntv-quiz-mini-tag{font-size:12px!important;padding:5px 9px!important}
  #ntv-game-root.ntv-device-pc .ntv-play.ntv-quiz-playing .ntv-quiz-text-form .ntv-field{min-height:43px!important;font-size:15px!important}
  #ntv-game-root.ntv-device-pc .ntv-play.ntv-quiz-playing .ntv-quiz-text-form .ntv-gold-btn{min-height:43px!important;font-size:14px!important}
  #ntv-game-root.ntv-device-pc .ntv-play.ntv-quiz-playing .ntv-quiz-letter-pick button{min-width:36px!important;min-height:39px!important;font-size:16px!important}
  #ntv-game-root.ntv-device-pc .ntv-play.ntv-quiz-playing .ntv-quiz-picture{width:min(100%,clamp(155px,25dvh,210px))!important}
}
@media(min-width:1024px) and (max-height:760px){
  #ntv-game-root.ntv-device-pc .ntv-home-core>.ntv-modes .ntv-mode{min-height:74px!important;padding:8px 9px!important}
  #ntv-game-root.ntv-device-pc .ntv-home-core>.ntv-hero .ntv-hero-art{height:115px!important}
  #ntv-game-root.ntv-device-pc .ntv-home-sidebar .ntv-retain-card{min-height:39px!important;padding:5px 8px!important}
}
@media(min-width:1024px) and (max-width:1150px){
  #ntv-game-root.ntv-device-pc .ntv-home-grid{grid-template-columns:minmax(0,1.6fr) minmax(260px,.9fr)!important;gap:10px!important}
  #ntv-game-root.ntv-device-pc .ntv-home-core>.ntv-modes .ntv-mode{gap:6px!important;padding:7px 5px!important}
  #ntv-game-root.ntv-device-pc .ntv-home-core>.ntv-modes .ntv-mode-icon{font-size:26px!important}
  #ntv-game-root.ntv-device-pc .ntv-home-core>.ntv-modes .ntv-mode strong{font-size:13px!important}
}
@media(prefers-reduced-motion:reduce){
  #ntv-game-root.ntv-device-pc .ntv-home-core>.ntv-modes .ntv-mode{transition:none!important}
}
/* Two independent wardrobe/gift buttons belong to one visual row.
   The home view is laid out as a column by older rules, so inline-flex alone cannot fix it. */
@media(min-width:1024px){
 #ntv-game-root.ntv-device-pc .ntv-home{
   display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);
   column-gap:11px!important;align-content:start!important;
 }
 #ntv-game-root.ntv-device-pc .ntv-home>.ntv-home-header,
 #ntv-game-root.ntv-device-pc .ntv-home>.ntv-player-strip,
 #ntv-game-root.ntv-device-pc .ntv-home>.ntv-honor-strip,
 #ntv-game-root.ntv-device-pc .ntv-home>.ntv-home-grid,
 #ntv-game-root.ntv-device-pc .ntv-home>.ntv-bottom-menu{grid-column:1/-1}
 #ntv-game-root.ntv-device-pc .ntv-home>.ntv-character-shortcut{
   grid-column:1!important;display:flex!important;width:100%!important;
 }
 #ntv-game-root.ntv-device-pc .ntv-home>.ntv-gift-shortcut{
   grid-column:2!important;display:flex!important;width:100%!important;
   margin-left:0!important;
 }
 #ntv-game-root.ntv-device-pc .ntv-home-core>.ntv-hero .ntv-hero-art{
   background-size:cover!important;background-position:center 22%!important;
 }
}
@media(min-width:1024px) and (max-height:830px){
 /* Laptop: decorative banner hidden, not cropped; the full illustration remains on taller displays. */
 #ntv-game-root.ntv-device-pc .ntv-home-core>.ntv-hero{display:none!important}
 #ntv-game-root.ntv-device-pc .ntv-home-sidebar .ntv-home-panel[aria-label="Chat cộng đồng"]{
   min-height:42px!important;padding:7px 10px!important
 }
 #ntv-game-root.ntv-device-pc .ntv-home-sidebar .ntv-home-panel[aria-label="Chat cộng đồng"] .ntv-home-feed{display:none!important}
 #ntv-game-root.ntv-device-pc .ntv-home-sidebar .ntv-home-panel[aria-label="Bảng xếp hạng"]{
   padding:7px 10px!important;min-height:72px!important
 }
 #ntv-game-root.ntv-device-pc .ntv-home-sidebar .ntv-home-panel[aria-label="Bảng xếp hạng"] .ntv-home-feed{
   min-height:28px!important;max-height:40px!important
 }
}
