/* Nối Từ Việt Online v3.9.44 — room and ranking readability.
 * Load AFTER frame-safe-3943.css. Keeps VIP/avatar safety limits while
 * undoing earlier desktop's 76px player chips and excessively tall podium.
 */

/* ROOM / PC: use a readable horizontal roster, not 145 × 76px chips.
   Never clip an expanded avatar/title by a fixed 95px parent height. */
#ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-member-list{
  display:flex!important;flex-wrap:nowrap!important;justify-content:flex-start!important;
  align-items:stretch!important;gap:12px!important;
  width:100%!important;min-width:0!important;min-height:0!important;
  max-height:none!important;height:auto!important;
  margin:8px 0 10px!important;padding:17px 8px 13px!important;
  overflow-x:auto!important;overflow-y:hidden!important;
  scrollbar-width:thin;scroll-snap-type:x proximity;
}
#ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-member-list>.ntv-person{
  box-sizing:border-box!important;flex:0 0 244px!important;
  width:244px!important;min-width:244px!important;max-width:244px!important;
  height:auto!important;min-height:142px!important;max-height:none!important;
  padding:11px 10px!important;overflow:hidden!important;
  display:grid!important;grid-template-columns:76px minmax(0,1fr)!important;
  grid-template-rows:repeat(6,min-content)!important;
  align-content:center!important;align-items:center!important;
  justify-items:stretch!important;justify-content:stretch!important;
  column-gap:10px!important;row-gap:4px!important;
  text-align:left!important;border-radius:15px!important;
  scroll-snap-align:start;
}
#ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-member-list>.ntv-person>.ntv-person-avatar-wrap{
  grid-column:1!important;grid-row:1 / span 3!important;
  width:58px!important;height:58px!important;
  min-width:58px!important;min-height:58px!important;
  align-self:end!important;justify-self:center!important;
  margin:0 auto 8px!important;
}
#ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-member-list>.ntv-person>.ntv-person-avatar-wrap>.ntv-person-avatar{
  width:54px!important;height:54px!important;
}
#ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-member-list>.ntv-person>.ntv-vip-title{
  grid-column:1!important;grid-row:4 / span 3!important;
  align-self:start!important;justify-self:center!important;
  --ntv-safe-title-width:75px;--ntv-safe-title-height:29px;
  width:75px!important;max-width:75px!important;
  height:29px!important;margin:2px auto 0!important;
}
#ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-member-list>.ntv-person>.ntv-vip-title>img{
  width:100%!important;height:29px!important;max-height:29px!important;object-fit:contain!important;
}
#ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-member-list>.ntv-person>.ntv-person-name{
  grid-column:2!important;grid-row:1!important;
  font-size:14px!important;line-height:1.32!important;
  color:#fff5d7!important;font-weight:900!important;
  max-width:100%!important;overflow-wrap:anywhere!important;
  overflow:visible!important;white-space:normal!important;
}
#ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-member-list>.ntv-person>small{
  grid-column:2!important;grid-row:2!important;
  font-size:12px!important;line-height:1.35!important;
  white-space:normal!important;overflow-wrap:anywhere!important;
  color:#f7fae9!important;min-width:0!important;
}
#ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-member-list>.ntv-person>.ntv-player-title{
  grid-column:2!important;grid-row:3!important;
  font-size:12px!important;line-height:1.3!important;
  text-align:left!important;overflow-wrap:anywhere!important;
}
#ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-member-list>.ntv-person>.ntv-person-wardrobe{
  grid-column:2!important;grid-row:4!important;
  font-size:11px!important;line-height:1.3!important;
  min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
#ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-member-list>.ntv-person>.ntv-player-badges{
  grid-column:2!important;grid-row:5!important;
  justify-content:flex-start!important;margin:0!important;gap:4px!important;
}
#ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-member-list>.ntv-person>.ntv-member-state{
  grid-column:2!important;grid-row:6!important;
  font-size:11px!important;line-height:1.3!important;
  color:#adf5da!important;overflow-wrap:anywhere!important;
  margin:0!important;text-align:left!important;
}
#ntv-game-root.ntv-device-pc .ntv-room-main>.ntv-member-list>.ntv-person .ntv-you{
  display:inline-block;font-size:10px!important;vertical-align:baseline;
}

/* On phone/tablet, preserve a comfortable tap target and spacing without
   forcing the desktop two-column row into a 320px viewport. */
#ntv-game-root.ntv-device-mobile .ntv-play .ntv-member-list{
  gap:12px!important;padding:16px 8px 12px!important;
  max-height:none!important;min-height:0!important;
}
#ntv-game-root.ntv-device-mobile .ntv-play .ntv-member-list>.ntv-person{
  box-sizing:border-box;min-height:184px!important;height:auto!important;
  padding:15px 9px 12px!important;gap:5px!important;
  overflow:hidden!important;
}
#ntv-game-root.ntv-device-mobile .ntv-play[data-ntv-layout="mobile"] .ntv-member-list>.ntv-person>.ntv-person-avatar-wrap{margin:7px auto 5px!important}
#ntv-game-root.ntv-device-mobile .ntv-play[data-ntv-layout="mobile"] .ntv-member-list>.ntv-person>.ntv-vip-title{
  --ntv-safe-title-height:30px;--ntv-safe-title-width:95px;margin:0 auto 3px!important;
}
#ntv-game-root.ntv-device-mobile .ntv-person-name{
  font-size:13px!important;line-height:1.3!important;overflow-wrap:anywhere;
}
#ntv-game-root.ntv-device-mobile .ntv-person>small{font-size:11px!important;line-height:1.35!important;overflow-wrap:anywhere}

/* LEADERBOARD: medal fully inside the card; contents begin near the top.
   More legible faces/titles, compact vertical spacing, no clipped crown. */
#ntv-game-root .ntv-lb-podium{
  max-width:100%;min-height:0!important;height:auto!important;
  display:flex;justify-content:center;align-items:stretch!important;
  gap:clamp(7px,1.25vw,14px)!important;
  margin:15px 0 14px!important;padding:8px 4px 9px!important;
}
#ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card{
  box-sizing:border-box!important;display:flex!important;flex-direction:column!important;
  justify-content:flex-start!important;align-items:center!important;
  flex:1 1 0!important;min-width:0!important;max-width:320px!important;
  min-height:285px!important;height:auto!important;
  padding:58px 12px 17px!important;gap:6px!important;
  overflow:visible!important;border-radius:20px!important;
}
#ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card.ntv-lb-gold{
  min-height:299px!important;padding-top:58px!important;
}
#ntv-game-root .ntv-lb-podium .ntv-lb-podium-medal{
  top:8px!important;left:50%;width:42px!important;height:42px!important;
  font-size:25px!important;line-height:1!important;z-index:5;
}
#ntv-game-root .ntv-lb-podium .ntv-lb-gold .ntv-lb-podium-medal{
  top:5px!important;width:47px!important;height:47px!important;font-size:29px!important;
}
#ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card>.ntv-lb-portrait{
  flex:0 0 82px!important;width:82px!important;height:82px!important;
  margin:2px auto 4px!important;--ntv-safe-frame-limit:128%;
}
#ntv-game-root .ntv-lb-podium>.ntv-lb-gold>.ntv-lb-portrait{
  flex-basis:98px!important;width:98px!important;height:98px!important;
}
#ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card>.ntv-vip-title{
  --ntv-safe-title-width:140px;--ntv-safe-title-height:38px;
  width:min(100%,140px)!important;max-width:100%!important;
  height:38px!important;margin:0 auto 1px!important;
}
#ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card>.ntv-vip-title>img{
  height:38px!important;max-height:38px!important;object-fit:contain!important;
}
#ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card>.ntv-lb-name{
  font-size:16px!important;line-height:1.3!important;color:#45351c!important;
  font-weight:900!important;text-align:center!important;white-space:normal!important;
  overflow-wrap:anywhere!important;overflow:visible!important;
}
#ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card>.ntv-lb-title{
  font-size:11px!important;line-height:1.35!important;
  white-space:normal!important;overflow-wrap:anywhere!important;
  text-align:center!important;
}
#ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card>.ntv-lb-score{
  font-size:clamp(11px,1.2vw,15px)!important;line-height:1.35!important;
  padding:7px 9px!important;border-radius:14px!important;
  white-space:normal!important;overflow-wrap:anywhere!important;
  text-align:center!important;max-width:100%!important;
  overflow:visible!important;
}
#ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card>.ntv-lb-base{
  font-size:11px!important;line-height:1.35!important;margin-top:3px!important;
}
#ntv-game-root .ntv-lb-podium .ntv-lb-sparkle{top:7px!important;right:6px!important}

/* Leaderboard rows must also retain clear separation between picture and score. */
#ntv-game-root .ntv-lb-entry{min-height:80px;gap:12px!important;padding:11px!important;align-items:center!important}
#ntv-game-root .ntv-lb-avatar-stack{min-width:72px!important;width:72px!important}
#ntv-game-root .ntv-lb-entry-score{white-space:normal!important;overflow-wrap:anywhere!important;font-size:12px!important;line-height:1.35!important;max-width:38%;text-align:right!important}
#ntv-game-root .ntv-lb-person strong{font-size:14px!important}

@media(max-width:620px){
  #ntv-game-root .ntv-lb-podium{gap:5px!important;padding:7px 0 9px!important}
  #ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card{
    min-height:235px!important;padding:47px 5px 12px!important;gap:5px!important;
    border-radius:15px!important;
  }
  #ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card.ntv-lb-gold{
    min-height:248px!important;padding-top:47px!important;
  }
  #ntv-game-root .ntv-lb-podium .ntv-lb-podium-medal{
    top:6px!important;width:34px!important;height:34px!important;font-size:21px!important;
  }
  #ntv-game-root .ntv-lb-podium .ntv-lb-gold .ntv-lb-podium-medal{
    top:5px!important;width:38px!important;height:38px!important;font-size:24px!important;
  }
  #ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card>.ntv-lb-portrait{
    flex-basis:50px!important;width:50px!important;height:50px!important;margin:0 auto 3px!important;
  }
  #ntv-game-root .ntv-lb-podium>.ntv-lb-gold>.ntv-lb-portrait{
    flex-basis:62px!important;width:62px!important;height:62px!important;
  }
  #ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card>.ntv-vip-title{
    --ntv-safe-title-width:96px;--ntv-safe-title-height:31px;
    width:100%!important;height:31px!important;
  }
  #ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card>.ntv-vip-title>img{
    height:31px!important;max-height:31px!important;
  }
  #ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card>.ntv-lb-name{
    font-size:12px!important;line-height:1.3!important;
  }
  #ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card>.ntv-lb-title{font-size:10px!important}
  #ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card>.ntv-lb-score{
    font-size:10px!important;padding:5px 4px!important;line-height:1.3!important;
  }
  #ntv-game-root .ntv-lb-entry{gap:7px!important;padding:9px 7px!important}
  #ntv-game-root .ntv-lb-avatar-stack{min-width:64px!important;width:64px!important}
}
@media(max-width:380px){
  #ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card{min-height:229px!important;padding-inline:3px!important}
  #ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card>.ntv-lb-portrait{flex-basis:44px!important;width:44px!important;height:44px!important}
  #ntv-game-root .ntv-lb-podium>.ntv-lb-gold>.ntv-lb-portrait{flex-basis:56px!important;width:56px!important;height:56px!important}
}


/* Mobile roster: wider horizontal cards for readable Cúp and title text. */
#ntv-game-root.ntv-device-mobile .ntv-play[data-ntv-layout="mobile"] .ntv-room-main>.ntv-member-list{
  display:flex!important;grid-template-columns:none!important;flex-wrap:nowrap!important;align-items:stretch!important;
  justify-content:flex-start!important;
  gap:11px!important;padding:15px 9px 13px!important;
  overflow-x:auto!important;overflow-y:hidden!important;
  scroll-snap-type:x proximity;scrollbar-width:thin;
}
#ntv-game-root.ntv-device-mobile .ntv-play[data-ntv-layout="mobile"] .ntv-member-list>.ntv-person{
  flex:0 0 218px!important;width:218px!important;min-width:218px!important;max-width:218px!important;
  min-height:139px!important;height:auto!important;
  display:grid!important;grid-template-columns:74px minmax(0,1fr)!important;
  grid-template-rows:repeat(6,min-content)!important;
  align-content:center!important;align-items:center!important;
  justify-items:stretch!important;justify-content:stretch!important;
  column-gap:8px!important;row-gap:4px!important;
  padding:11px 9px!important;overflow:hidden!important;
  text-align:left!important;border-radius:15px!important;
  scroll-snap-align:start;
}
#ntv-game-root.ntv-device-mobile .ntv-play[data-ntv-layout="mobile"] .ntv-member-list>.ntv-person>.ntv-person-avatar-wrap{
  grid-column:1!important;grid-row:1/span 3!important;
  width:55px!important;height:55px!important;align-self:end!important;
  justify-self:center!important;margin:0 auto 7px!important;
}
#ntv-game-root.ntv-device-mobile .ntv-play[data-ntv-layout="mobile"] .ntv-member-list>.ntv-person>.ntv-vip-title{
  grid-column:1!important;grid-row:4/span 3!important;
  align-self:start!important;justify-self:center!important;
  --ntv-safe-title-width:73px;--ntv-safe-title-height:28px;
  width:73px!important;height:28px!important;margin:1px auto 0!important;
}
#ntv-game-root.ntv-device-mobile .ntv-play[data-ntv-layout="mobile"] .ntv-member-list>.ntv-person>.ntv-person-name{
  grid-column:2!important;grid-row:1!important;
  font-size:13px!important;line-height:1.3!important;
  color:#fff5d7!important;white-space:normal!important;overflow:visible!important;overflow-wrap:anywhere!important;
}
#ntv-game-root.ntv-device-mobile .ntv-play[data-ntv-layout="mobile"] .ntv-member-list>.ntv-person>small{
  grid-column:2!important;grid-row:2!important;
  font-size:11px!important;line-height:1.35!important;
  white-space:normal!important;overflow-wrap:anywhere!important;text-align:left!important;
}
#ntv-game-root.ntv-device-mobile .ntv-play[data-ntv-layout="mobile"] .ntv-member-list>.ntv-person>.ntv-player-title{
  grid-column:2!important;grid-row:3!important;display:block!important;font-size:11px!important;text-align:left!important;
}
#ntv-game-root.ntv-device-mobile .ntv-play[data-ntv-layout="mobile"] .ntv-member-list>.ntv-person>.ntv-person-wardrobe{
  grid-column:2!important;grid-row:4!important;display:block!important;font-size:10px!important;text-align:left!important;
}
#ntv-game-root.ntv-device-mobile .ntv-play[data-ntv-layout="mobile"] .ntv-member-list>.ntv-person>.ntv-player-badges{
  grid-column:2!important;grid-row:5!important;display:flex!important;justify-content:flex-start!important;
}
#ntv-game-root.ntv-device-mobile .ntv-play[data-ntv-layout="mobile"] .ntv-member-list>.ntv-person>.ntv-member-state{
  grid-column:2!important;grid-row:6!important;
  font-size:11px!important;line-height:1.3!important;
  text-align:left!important;
}

/* Top 1 full-width on narrow phones, Top 2–3 below: legible even at 320px. */
@media(max-width:620px){
  #ntv-game-root .ntv-lb-podium{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
    align-items:stretch!important;gap:11px!important;
    padding:6px 1px 13px!important;
  }
  #ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card{
    max-width:none!important;min-width:0!important;width:100%!important;
    min-height:238px!important;padding:49px 8px 14px!important;
  }
  #ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card.ntv-lb-gold{
    grid-column:1/-1!important;grid-row:1!important;
    min-height:0!important;padding:61px 12px 18px!important;
  }
  #ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card.ntv-lb-silver{
    grid-column:1!important;grid-row:2!important;
  }
  #ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card.ntv-lb-bronze{
    grid-column:2!important;grid-row:2!important;
  }
  #ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card.ntv-lb-silver:last-child{grid-column:1/-1!important}
  #ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card>.ntv-lb-portrait{
    width:68px!important;height:68px!important;flex-basis:68px!important;
  }
  #ntv-game-root .ntv-lb-podium>.ntv-lb-gold>.ntv-lb-portrait{
    width:100px!important;height:100px!important;flex-basis:100px!important;
  }
  #ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card>.ntv-vip-title{
    --ntv-safe-title-width:126px;--ntv-safe-title-height:37px;
    width:min(100%,126px)!important;height:37px!important;
  }
  #ntv-game-root .ntv-lb-podium>.ntv-lb-gold>.ntv-vip-title{
    --ntv-safe-title-width:158px;--ntv-safe-title-height:46px;
    width:min(100%,158px)!important;height:46px!important;
  }
  #ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card>.ntv-vip-title>img{
    height:100%!important;max-height:100%!important;
  }
  #ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card>.ntv-lb-name{
    font-size:14px!important;
  }
  #ntv-game-root .ntv-lb-podium>.ntv-lb-gold>.ntv-lb-name{font-size:17px!important}
  #ntv-game-root .ntv-lb-podium>.ntv-lb-podium-card>.ntv-lb-score{
    font-size:12px!important;padding:6px 8px!important;
  }
  #ntv-game-root .ntv-lb-podium>.ntv-lb-gold>.ntv-lb-score{font-size:14px!important}
}
