/* ====================================================================
 * VÕ LÂM TRUYỀN KỲ - SƠN HÀ XÃ TẮC (CLASSIC RETRO PC HUD STYLESHEET)
 * Thiết kế giao diện nổi khối kim loại, viền đồng đúc dập nổi chuẩn VLTK 2005
 * ==================================================================== */

/* 1. THANH PHÍM TẮT & KỸ NĂNG DƯỚI (PAD / QUICK SLOTS) */
#pad {
  background: radial-gradient(circle at 50% 50%, #201a14 0%, #0d0a07 100%) !important;
  border: 2px solid #5a4828 !important;
  border-radius: 4px !important;
  box-shadow: 
    inset 0 0 0 1px #9c8242,
    inset 0 0 8px rgba(0,0,0,0.9),
    0 4px 12px rgba(0,0,0,0.85) !important;
  padding: 4px 6px !important;
}

#pad .hb + .hb {
  border-left: 2px groove #5a4828 !important;
  box-shadow: -1px 0 0 #110e0a !important;
  padding-left: 6px !important;
  margin-left: 6px !important;
}

#pad .pbtn {
  border: 1px solid #786237 !important;
  background: radial-gradient(circle at 35% 35%, #242424 0%, #080808 100%) !important;
  box-shadow: 
    inset 1px 1px 0 rgba(255,225,140,0.25),
    inset -1px -1px 0 rgba(0,0,0,0.8),
    0 1px 3px rgba(0,0,0,0.6) !important;
  transition: transform 0.08s ease, filter 0.08s ease !important;
}

#pad .pbtn:hover {
  border-color: #d8b868 !important;
  box-shadow: 
    inset 1px 1px 0 rgba(255,255,200,0.4),
    0 0 6px #d8b868aa !important;
}

#pad .pbtn:active {
  transform: translateY(1px) scale(0.97) !important;
  box-shadow: inset 1px 1px 3px #000 !important;
}

/* Ô chiêu thức chính (Main Skill Button) nổi bật hình bát giác/kim loại cổ */
#pad .pbtn.mn {
  border: 2px solid #b89848 !important;
  box-shadow: 
    inset 0 0 0 1px #332610,
    inset 0 0 6px rgba(255,215,100,0.35),
    0 0 8px rgba(216,184,104,0.45) !important;
  background: radial-gradient(circle at 40% 40%, #302615 0%, #0c0804 100%) !important;
}

/* 2. CỤM NÚT MENU TÍNH NĂNG ĐÁY MÀN HÌNH (#tabs) */
#tabs {
  background: linear-gradient(180deg, #2b251e 0%, #15120e 50%, #0b0907 100%) !important;
  border-top: 2px solid #70582d !important;
  box-shadow: 
    inset 0 1px 0 #9e844a,
    0 -3px 10px rgba(0,0,0,0.85) !important;
}

#tabs button {
  color: #c4b998 !important;
  text-shadow: 1px 1px 2px #000, -1px -1px 2px #000 !important;
  font-weight: 600 !important;
  position: relative !important;
  transition: all 0.15s ease !important;
}

#tabs button:hover {
  color: #fff2c4 !important;
}

#tabs button.on {
  color: #ffd768 !important;
  background: radial-gradient(ellipse at 50% 60%, rgba(130, 95, 30, 0.45) 0%, rgba(0,0,0,0) 75%) !important;
  text-shadow: 0 0 6px rgba(255,215,104,0.6), 1px 1px 2px #000 !important;
}

/* Hiệu ứng viền sáng nhẹ chân icon nút menu */
#tabs button.on::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #e2be68, transparent);
}

/* 3. NÚT TRÊN HEADER & THANH ĐIỀU KHIỂN CHIẾN ĐẤU (TOP CONTROLS & CHIPS) */
#topCtl .chip, 
#ctrlBtn, 
#rotBtn, 
#pkBtn,
.u20 .chip {
  background: linear-gradient(180deg, #2c251d 0%, #17130e 100%) !important;
  border: 1px solid #6b5329 !important;
  box-shadow: 
    inset 1px 1px 0 rgba(220,185,115,0.25),
    inset -1px -1px 0 rgba(0,0,0,0.6),
    0 2px 4px rgba(0,0,0,0.6) !important;
  color: #d9ccaa !important;
  border-radius: 3px !important;
  text-shadow: 1px 1px 1px #000 !important;
}

#topCtl .chip:hover,
#pkBtn:hover {
  border-color: #c9a656 !important;
  color: #fff !important;
  box-shadow: 0 0 5px rgba(201,166,86,0.5) !important;
}

/* Chế độ PK Đồ Sát / Hòa Bình */
#pkBtn.chip.red, #pkBtn[data-pk="1"] {
  border-color: #b83828 !important;
  background: linear-gradient(180deg, #481812 0%, #1c0604 100%) !important;
  color: #ff9d8f !important;
  box-shadow: 0 0 6px rgba(220,60,40,0.6) !important;
}

/* 4. THANH TRẠNG THÁI MÁU & MANA (HUD HP / MP BARS) */
#hud {
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.85));
}

#hud .bar {
  border: 1px solid #584422 !important;
  box-shadow: 
    inset 0 0 4px #000,
    0 1px 2px rgba(0,0,0,0.8) !important;
  border-radius: 2px !important;
}

#hud .jxs {
  background: linear-gradient(180deg, #282017 0%, #110d09 100%) !important;
  border: 1px solid #5e4822 !important;
  border-radius: 3px !important;
  box-shadow: inset 1px 1px 0 rgba(200,165,95,0.2) !important;
}

#hud .jxs b {
  color: #f7df9e !important;
  text-shadow: 0 0 3px #000 !important;
}

/* ====================================================================
 * 5. BỐ TRÍ LẠI GIAO DIỆN BẢN WEB (DESKTOP / LANDSCAPE):
 * - Đưa cụm Hòa Bình, Xoay Chiêu, Auto nằm sát mép trái ngay dưới ô Cấp độ (nhỏ gọn)
 * - Đưa khung Chế Độ: Luyện Công sang bên phải thanh kỹ năng #pad (nhỏ gọn)
 * ==================================================================== */

@media (min-width: 641px) {
  /* 5.1. Khung Chế Độ: Luyện Công (#modeSw) nằm sang BÊN PHẢI thanh kỹ năng #pad */
  body.u20 #modeSw,
  #modeSw {
    top: auto !important;
    bottom: 5px !important;
    left: calc(50% + 185px) !important; /* Đặt sát mép PHẢI của cụm kỹ năng #pad */
    right: auto !important;
    transform: none !important;
    z-index: 10 !important;
    height: 34px !important; /* Thu nhỏ chiều cao bằng ô kỹ năng */
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }

  #modeSw #mswBtn {
    height: 30px !important;
    line-height: 28px !important;
    padding: 0 8px !important;
    font-size: 11px !important; /* Chỉnh chữ nhỏ lại nhìn thanh thoát */
    font-weight: 600 !important;
    background: radial-gradient(circle at 40% 40%, #201a14 0%, #0d0a07 100%) !important;
    border: 1.5px solid #5a4828 !important;
    border-radius: 3px !important;
    box-shadow: 
      inset 0 0 0 1px #9c8242,
      inset 0 0 4px rgba(0,0,0,0.9),
      0 2px 6px rgba(0,0,0,0.8) !important;
    color: #e8dcb0 !important;
    text-shadow: 1px 1px 2px #000 !important;
    white-space: nowrap !important;
  }

  #modeSw #mswBtn b {
    color: #ffd768 !important;
  }

  #modeSw #mswMenu {
    bottom: 36px !important;
    background: #15110c !important;
    border: 1.5px solid #786237 !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.9) !important;
  }

  #modeSw #mswMenu button {
    padding: 6px 12px !important;
    font-size: 11.5px !important;
    color: #d9ccaa !important;
  }

  #modeSw #mswMenu button:hover,
  #modeSw #mswMenu button.on {
    background: linear-gradient(90deg, #423014, #1f1609) !important;
    color: #ffe494 !important;
  }

  /* 5.2. Cụm nút Hòa Bình, Xoay Chiêu, Auto (#topCtl) nằm sát ra ngoài bên dưới CẤP ĐỘ (Góc trái) */
  body.u20 #topCtl,
  #topCtl {
    top: 32px !important; /* Ngay bên dưới ô Cấp độ của thanh HUD */
    bottom: auto !important;
    left: 190px !important; /* Khớp thẳng hàng với lề trái của thanh HUD máu/cấp độ */
    right: auto !important;
    transform: none !important;
    z-index: 10 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px !important; /* Khoảng cách gọn gàng */
    background: rgba(14, 11, 8, 0.75) !important;
    padding: 2px 6px !important;
    border: 1px solid #5a4828 !important;
    border-radius: 3px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.6) !important;
    backdrop-filter: blur(2px) !important;
  }

  #topCtl .chip,
  #ctrlBtn,
  #rotBtn,
  #pkBtn {
    height: 20px !important; /* Thu nhỏ lại thanh mảnh */
    line-height: 18px !important;
    padding: 0 6px !important;
    font-size: 10.5px !important;
    white-space: nowrap !important;
    border-radius: 2px !important;
  }

  #topCtl .ck,
  #ctrlBtn .ck,
  #rotBtn .ck {
    width: 10px !important;
    height: 10px !important;
  }
  /* 5.3. Thu gọn thanh Thị Trấn (#townBar) trên PC / Màn hình ngang:
   * CHỈ HIỂN THỊ KHI ĐANG Ở TRONG THÀNH BIỆN KINH (body.intown / không có class .hidden).
   * Mặc định khi ra ngoài bãi quái dã ngoại: Luôn luôn ẩn triệt để (display: none !important).
   */
  #townBar,
  #townBar.hidden,
  body.u20 #townBar.hidden,
  body.u20:not(.intown) #townBar,
  body:not(.intown) #townBar {
    display: none !important;
  }

  body.intown #townBar:not(.hidden),
  body.u20.intown #townBar:not(.hidden) {
    top: 32px !important;
    bottom: auto !important;
    left: 450px !important;
    right: auto !important;
    width: auto !important;
    max-width: calc(100vw - 460px) !important;
    height: 26px !important;
    padding: 2px 8px !important;
    gap: 4px !important;
    display: flex !important;
    align-items: center !important;
    background: rgba(14, 11, 8, 0.85) !important;
    border: 1px solid #5a4828 !important;
    border-radius: 3px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.6) !important;
    backdrop-filter: blur(2px) !important;
    z-index: 10 !important;
  }

  #townBar b {
    flex: none !important;
    margin-right: 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #ffd768 !important;
    white-space: nowrap !important;
    text-shadow: 0 1px 2px #000 !important;
  }

  #townBar .btn,
  #townBar .btn.sm {
    height: 20px !important;
    line-height: 18px !important;
    padding: 0 6px !important;
    font-size: 10.5px !important;
    white-space: nowrap !important;
    border: 1px solid #5a4828 !important;
    border-radius: 2px !important;
    background: radial-gradient(circle at 40% 40%, #221c15 0%, #0c0906 100%) !important;
    color: #ded1ae !important;
    box-shadow: inset 0 0 0 1px rgba(156,130,66,0.3) !important;
    cursor: pointer !important;
    transition: filter 0.1s, border-color 0.1s !important;
  }

  #townBar .btn:hover,
  #townBar .btn.sm:hover {
    border-color: #ffd768 !important;
    color: #fff !important;
    box-shadow: 0 0 5px rgba(255, 215, 104, 0.4) !important;
  }

  #townBar .btn.on,
  #townBar .btn.sm.on {
    border-color: #ffd768 !important;
    color: #ffe494 !important;
    background: radial-gradient(circle at 40% 40%, #423014 0%, #1a1205 100%) !important;
  }
}


/* ====================================================================
 * 6. VIRTUAL JOYSTICK (TRỢ NĂNG JOYSTICK TRÊN MOBILE)
 * Nằm chính giữa bên trên thanh kỹ năng #pad, thiết kế mờ bán trong suốt
 * ==================================================================== */
#vliJoyPad {
  position: absolute;
  left: 50% !important;
  bottom: 52px !important; /* Nằm ngay chính giữa phía trên khung #pad */
  transform: translateX(-50%) !important;
  width: 180px; /* Tăng gấp đôi từ 90px lên 180px */
  height: 180px;
  z-index: 12;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto;
  opacity: 0.45;
  transition: opacity 0.15s ease;
}

#vliJoyPad:hover,
#vliJoyPad.active {
  opacity: 0.85;
}

#vliJoyRing {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(20, 16, 12, 0.5) 0%, rgba(5, 5, 5, 0.7) 100%);
  border: 3px solid rgba(216, 184, 104, 0.45);
  box-shadow: 
    inset 0 0 16px rgba(0, 0, 0, 0.85),
    0 0 12px rgba(0, 0, 0, 0.65);
  pointer-events: none;
}

#vliJoyRing::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 225, 140, 0.25);
}

#vliJoyThumb {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 76px; /* Tăng gấp đôi từ 38px lên 76px */
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #7a633a 0%, #302414 100%);
  border: 2.5px solid rgba(243, 216, 138, 0.8);
  box-shadow: 
    inset 2px 2px 4px rgba(255, 255, 255, 0.35),
    inset -2px -2px 6px rgba(0, 0, 0, 0.85),
    0 3px 10px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  will-change: transform;
}

/* Trên màn hình PC/Desktop Landscape: luôn ẩn Joystick */
@media (min-width: 900px) and (orientation: landscape) {
  #vliJoyPad {
    display: none !important;
  }
}

/* Khi mở 1 chức năng bất kỳ (modal hoặc tab chức năng khác tab log), tự động ẩn Joystick */
body:has(#modal:not(.hidden)) #vliJoyPad,
body.u20win #vliJoyPad,
body:not(.tablog) #vliJoyPad {
  display: none !important;
  pointer-events: none !important;
}


/* === ƯU TIÊN HIỂN THỊ DÒNG THÔNG BÁO HỆ THỐNG TRÊN NỀN BẠC MỜ === */
#u20lines .cl.sys,
#u20lines .cl.syl,
#u20lines .sys-highlight {
  position: relative;
  background: rgba(220, 230, 240, 0.16) !important;
  backdrop-filter: blur(3px) !important;
  -webkit-backdrop-filter: blur(3px) !important;
  border-left: 3px solid #ffd24a !important;
  border-radius: 3px !important;
  padding: 3px 7px !important;
  margin: 3px 0 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45) !important;
  color: #fff8e7 !important;
  text-shadow: 0 1px 2px #000, 0 0 1px #000 !important;
}

#u20lines .cl.sys i,
#u20lines .cl.syl i {
  color: #aed9f4 !important;
  font-weight: 600;
  margin-right: 4px;
}

#u20lines .sys-highlight a,
#u20lines .cl.sys a,
#u20lines .cl.syl a,
#u20lines .sys-highlight [onclick],
#u20lines .cl.syl [onclick] {
  color: #ffd24a !important;
  font-weight: bold;
}

/* === GIAO DIỆN KHUNG CHAT & THÔNG BÁO (CHUẨN VLTK / JX2) === */
#u20log {
  pointer-events: auto !important;
  z-index: 10 !important;
}

/* Nền xám mờ chuẩn game, bo góc, viền vàng kim */
#u20lines {
  display: block !important;
  min-height: 180px !important;
  max-height: 320px !important;
  overflow-y: auto !important;
  pointer-events: auto !important;
  background: rgba(18, 20, 24, 0.82) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  border-left: 2px solid rgba(138, 116, 68, 0.7) !important;
  border-right: 2px solid rgba(138, 116, 68, 0.7) !important;
  padding: 8px 12px !important;
  box-sizing: border-box !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  color: #e8dfc8 !important;
}

/* Từng dòng chat / thông báo */
#u20lines .cl {
  padding: 2px 0 !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
  text-shadow: 0 1px 2px #000 !important;
}
#u20lines .cl i {
  color: #f3d88a !important;
  font-style: normal !important;
  font-weight: 600 !important;
  margin-right: 4px !important;
}
#u20lines .cl b[data-pn] {
  color: #ff9900 !important;
  cursor: pointer !important;
  text-decoration: underline dotted !important;
}
#u20lines .cl small {
  color: #a8a08d !important;
}

/* Khi người chơi bấm ẩn (-) */
body.u20logoff #u20lines {
  display: none !important;
}

/* Thanh Tab Chat trên cùng khung */
#u20ct {
  display: flex !important;
  align-items: center !important;
  gap: 3px !important;
  padding: 3px 6px !important;
  background: linear-gradient(180deg, #2b2c28 0%, #151614 100%) !important;
  border: 2px solid rgba(138, 116, 68, 0.8) !important;
  border-bottom: 1px solid rgba(80, 70, 45, 0.9) !important;
  border-radius: 6px 6px 0 0 !important;
  user-select: none !important;
}

/* Nút Tab */
#u20ct button[data-lt] {
  position: relative !important;
  height: 24px !important;
  padding: 0 6px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.2px !important;
  border-radius: 4px 4px 0 0 !important;
  background: linear-gradient(180deg, #2a2d2c, #161918) !important;
  border: 1px solid #555b57 !important;
  border-bottom: none !important;
  color: #c9c3b2 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  transition: all 0.15s !important;
}
#u20ct button[data-lt]:hover {
  filter: brightness(1.2) !important;
}
#u20ct button[data-lt].on {
  background: linear-gradient(180deg, #d4a742, #855c14) !important;
  border-color: #ffd66b !important;
  color: #1a1002 !important;
  box-shadow: 0 0 8px rgba(230, 185, 60, 0.6) !important;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3) !important;
}

/* Nút ẩn/hiện [-] */
#u20hide {
  margin-left: auto !important;
  height: 22px !important;
  min-width: 24px !important;
  border-radius: 3px !important;
  background: #252826 !important;
  border: 1px solid #5a635e !important;
  color: #eedcb5 !important;
  font-size: 15px !important;
  font-weight: bold !important;
  line-height: 1 !important;
  cursor: pointer !important;
}
#u20hide:hover {
  background: #3c423e !important;
  color: #fff !important;
}

/* Ẩn hoàn toàn bộ đếm số người online */
#u20onl {
  display: none !important;
  visibility: hidden !important;
}

/* Khung nhập tin nhắn phía dưới */
#u20in {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 4px 6px !important;
  background: #101211 !important;
  border: 2px solid rgba(138, 116, 68, 0.8) !important;
  border-top: 1px solid rgba(60, 50, 30, 0.8) !important;
  border-radius: 0 0 6px 6px !important;
}
#u20ch {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  border: 2px solid #5a8ab8 !important;
  background: radial-gradient(circle, #2a527c 0%, #0d1e33 100%) !important;
  color: #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  font-size: 14px !important;
  line-height: 1 !important;
  padding: 0 !important;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.6) !important;
  transition: transform 0.15s, border-color 0.15s !important;
  user-select: none !important;
}
#u20ch:hover {
  transform: scale(1.08) !important;
}
/* Kênh Thế Giới */
#u20ch.world {
  border-color: #64b5f6 !important;
  background: radial-gradient(circle, #1976d2 0%, #0d47a1 100%) !important;
}
/* Kênh Lân Cận */
#u20ch.near {
  border-color: #4dd0e1 !important;
  background: radial-gradient(circle, #0097a7 0%, #006064 100%) !important;
}
/* Kênh Tổ Đội */
#u20ch.pt {
  border-color: #81c784 !important;
  background: radial-gradient(circle, #388e3c 0%, #1b5e20 100%) !important;
}
/* Kênh Bang Hội */
#u20ch.guild {
  border-color: #ffd54f !important;
  background: radial-gradient(circle, #f57f17 0%, #e65100 100%) !important;
}
#u20txt {
  flex: 1 !important;
  height: 26px !important;
  background: #171b1a !important;
  border: 1px solid #4a544f !important;
  border-radius: 3px !important;
  color: #fff !important;
  padding: 0 8px !important;
  font-size: 12px !important;
}
#u20txt:focus {
  outline: none !important;
  border-color: #ffd66b !important;
  box-shadow: 0 0 6px rgba(255, 214, 107, 0.4) !important;
}
#u20go {
  height: 26px !important;
  padding: 0 12px !important;
  background: linear-gradient(180deg, #3f4238, #20221c) !important;
  border: 1px solid #8c8263 !important;
  border-radius: 3px !important;
  color: #f7e6b7 !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  cursor: pointer !important;
}
#u20go:hover {
  filter: brightness(1.2) !important;
}

/* === BẢO ĐẢM NÚT CHUYỂN KÊNH CHAT & TAB TỔ ĐỘI LUÔN HIỂN THỊ (GHI ĐÈ PTCLOSED) === */
#u20ch,
button#u20ch,
#u20in #u20ch,
body #u20in #u20ch,
html.ptclosed body #u20in #u20ch,
.ptclosed #u20ch {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

#u20ct button[data-lt="party"],
body #u20ct button[data-lt="party"],
html.ptclosed body #u20ct button[data-lt="party"],
.ptclosed #u20ct [data-lt="party"] {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* === QUICK MENU (#u20r) BỐ CỤC 3 HÀNG NGANG & MỞ RỘNG KHUNG VIỀN === */
#u20r {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 5px !important;
  padding: 6px 8px !important;
  border-radius: 18px !important;
  box-sizing: border-box !important;
  background: rgba(14, 19, 16, 0.88) !important;
  border: 1.5px solid #7c6738 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 220, 130, 0.25) !important;
}

/* Trên màn hình dọc / điện thoại (Mobile), Quick Menu chỉ giữ Chợ / Tỉ Võ / Bang, xếp 1 hàng dọc rìa bên phải nằm dưới khung tên map */
@media (max-width: 899px), (orientation: portrait) {
  body.u2m #u20r,
  body.mob #u20r,
  body:not(.u20) #u20r,
  #u20r {
    top: 250px !important;
    right: 6px !important;
    left: auto !important;
    transform: none !important;
    z-index: 12 !important;
    padding: 6px 4px !important;
    border-radius: 12px !important;
    gap: 6px !important;
    width: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  /* Khi mở 1 chức năng bất kỳ (modal hoặc tab chức năng khác tab log), ẩn hoàn toàn Quick Menu */
  body:has(#modal:not(.hidden)) #u20r,
  body.u20win #u20r,
  body:not(.tablog) #u20r {
    display: none !important;
  }

  /* Ẩn các nút khác trên Mobile theo yêu cầu: Phần thưởng, Kỳ Trân Các, Tài liệu, Cập nhật */
  body.u2m #u20gift,
  body.mob #u20gift,
  body:not(.u20) #u20gift,
  body.u2m #u20ktc,
  body.mob #u20ktc,
  body:not(.u20) #u20ktc,
  body.u2m #u20doc,
  body.mob #u20doc,
  body:not(.u20) #u20doc,
  body.u2m #u20ver,
  body.mob #u20ver,
  body:not(.u20) #u20ver {
    display: none !important;
  }

  /* Chỉ giữ lại Chợ, Tỷ Võ, Bang và hiển thị thành cột dọc */
  body.u2m #u20mkt,
  body.mob #u20mkt,
  body:not(.u20) #u20mkt,
  body.u2m #u20tyvo,
  body.mob #u20tyvo,
  body:not(.u20) #u20tyvo,
  body.u2m #u20guild,
  body.mob #u20guild,
  body:not(.u20) #u20guild {
    display: inline-flex !important;
    margin: 0 !important;
  }

  body.u2m .u20r-row,
  body.mob .u20r-row,
  body:not(.u20) .u20r-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
  }

  /* Di chuyển khung Chế độ Luyện Công (#modeSw) lên nằm ngay BÊN TRÁI khung Hòa Bình (#topCtl) trên mobile */
  body.u2m #modeSw,
  body.mob #modeSw,
  body:not(.u20) #modeSw {
    top: 26px !important;
    right: 332px !important; /* Đặt cách mép trái nút Hòa bình một khoảng vừa vặn */
    left: auto !important;
    bottom: auto !important;
    position: absolute !important;
    z-index: 10 !important;
    transform: none !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
  }

  body.u2m #modeSw #mswBtn,
  body.mob #modeSw #mswBtn,
  body:not(.u20) #modeSw #mswBtn {
    height: 20px !important; /* Khớp đúng chiều cao 20px với nút Hòa Bình */
    line-height: 18px !important;
    padding: 0 6px !important;
    font-size: 10.5px !important;
    white-space: nowrap !important;
    border: 1px solid #6b5329 !important;
    border-radius: 3px !important;
    background: linear-gradient(180deg, #2c251d 0%, #17130e 100%) !important;
    color: #d9ccaa !important;
    text-shadow: 1px 1px 1px #000 !important;
    box-shadow: inset 1px 1px 0 rgba(220,185,115,0.25), inset -1px -1px 0 rgba(0,0,0,0.6), 0 2px 4px rgba(0,0,0,0.6) !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  body.u2m #modeSw #mswBtn:hover,
  body.mob #modeSw #mswBtn:hover,
  body:not(.u20) #modeSw #mswBtn:hover {
    border-color: #c9a656 !important;
    color: #fff !important;
    box-shadow: 0 0 5px rgba(201,166,86,0.5) !important;
  }

  body.u2m #modeSw #mswBtn b,
  body.mob #modeSw #mswBtn b,
  body:not(.u20) #modeSw #mswBtn b {
    color: #ffd768 !important;
    margin-left: 2px !important;
  }

  body.u2m #modeSw #mswMenu,
  body.mob #modeSw #mswMenu,
  body:not(.u20) #modeSw #mswMenu {
    top: 24px !important;
    bottom: auto !important;
    left: 0 !important;
    right: auto !important;
    background: #15110c !important;
    border: 1.5px solid #786237 !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.9) !important;
  }

  body.u2m #modeSw #mswMenu button,
  body.mob #modeSw #mswMenu button,
  body:not(.u20) #modeSw #mswMenu button {
    padding: 5px 10px !important;
    font-size: 11px !important;
    color: #d9ccaa !important;
  }

  /* Khung hiển thị danh sách thành viên tổ đội nằm bên trái, nhỏ gọn và ngay ngắn */
  body.u2m #ptBox,
  body.mob #ptBox,
  body:not(.u20) #ptBox {
    top: 96px !important;
    left: 4px !important;
    transform: scale(0.65) !important;
    transform-origin: top left !important;
    z-index: 25 !important;
  }
}

/* Trên màn hình PC / Desktop Landscape (>= 900px) giữ nguyên đầy đủ 3 hàng ngang */
@media (min-width: 900px) and (orientation: landscape) {
  body.u20 #u20r {
    top: 4px !important;
    left: auto !important;
    z-index: 15 !important;
  }
}

.u20r-row {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 5px !important;
}

/* === BANG HỘI MODAL STYLING & QUICK BUTTON === */
#u20guild {
  border-color: #ffd24a !important;
  background: radial-gradient(circle at 40% 30%, #7d5918 0%, #2f2005 85%) !important;
  color: #fff2a8 !important;
}
#u20guild:hover {
  box-shadow: 0 0 10px rgba(255, 210, 74, 0.7) !important;
}

.guild-modal-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #eee;
  font-family: inherit;
}
.guild-header, .my-guild-header {
  border-bottom: 1.5px solid #5a4828;
  padding-bottom: 8px;
}
.guild-header h3, .my-guild-title h3 {
  margin: 0;
  font-size: 18px;
  color: #ffd768;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.guild-sub {
  margin: 4px 0 0;
  font-size: 11.5px;
  color: #a8a08d;
}
.guild-badge {
  background: linear-gradient(180deg, #d4a742, #855c14);
  color: #100b02;
  font-weight: 700;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 10px;
  margin-left: 8px;
}
.guild-role-badge {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 4px;
  background: #333;
  color: #ccc;
  margin-left: 6px;
}
.guild-role-badge.leader {
  background: #a82e1e;
  color: #fff;
  font-weight: 700;
}
.my-guild-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
  font-size: 12.5px;
}
.guild-notice-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px dashed #786237;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
}
.notice-label {
  color: #ffd24a;
  font-weight: 700;
  white-space: nowrap;
}
.notice-txt {
  flex: 1;
  color: #eee;
  font-style: italic;
}

.guild-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 2px solid #5a4828;
  padding-bottom: 2px;
}
.guild-tab-btn {
  background: #1e1b16;
  border: 1px solid #5a4828;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  color: #c9c3b2;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.guild-tab-btn:hover {
  background: #2f281e;
  color: #fff;
}
.guild-tab-btn.active {
  background: linear-gradient(180deg, #d4a742, #855c14);
  color: #1a1002;
  border-color: #ffd66b;
  box-shadow: 0 0 8px rgba(230, 185, 60, 0.5);
}

.guild-rule-tip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(200, 160, 80, 0.1);
  border-left: 3px solid #ffd24a;
  padding: 6px 10px;
  font-size: 11.5px;
  border-radius: 2px;
}
.guild-rule-tip .my-lv {
  color: #ffd24a;
}

.guild-table-wrap {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #4a3c22;
  border-radius: 4px;
  background: rgba(10, 8, 5, 0.7);
}
.guild-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
.guild-table th {
  background: #1e1912;
  color: #ffd24a;
  padding: 8px 10px;
  font-weight: 700;
  border-bottom: 1px solid #5a4828;
  position: sticky;
  top: 0;
  z-index: 2;
}
.guild-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(90, 72, 40, 0.35);
}
.guild-table tr:hover {
  background: rgba(255, 215, 100, 0.08);
}
.guild-table tr.is-me {
  background: rgba(76, 216, 74, 0.12);
}
.g-name {
  color: #ffb834;
}
.g-mem.full {
  color: #ff5252;
  font-weight: 700;
}
.role-tag {
  font-size: 11.5px;
  font-weight: 600;
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
}
.role-tag.leader {
  color: #ffd24a;
  background: rgba(255, 210, 74, 0.15);
  border: 1px solid rgba(255, 210, 74, 0.4);
  font-weight: 700;
}
.role-tag.vice {
  color: #ff9944;
  background: rgba(255, 153, 68, 0.15);
  border: 1px solid rgba(255, 153, 68, 0.4);
  font-weight: 700;
}
.role-tag.elder {
  color: #be7aff;
  background: rgba(190, 122, 255, 0.15);
  border: 1px solid rgba(190, 122, 255, 0.4);
}
.role-tag.hall {
  color: #4dc3ff;
  background: rgba(77, 195, 255, 0.15);
  border: 1px solid rgba(77, 195, 255, 0.4);
}
.role-tag.elite {
  color: #5cf09b;
  background: rgba(92, 240, 155, 0.15);
  border: 1px solid rgba(92, 240, 155, 0.4);
}
.role-tag.member {
  color: #bbb;
}

.guild-create-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid #5a4828;
  border-radius: 4px;
  padding: 12px 14px;
}
.guild-create-box h4 {
  margin: 0 0 10px;
  color: #ffd24a;
  font-size: 13.5px;
}
.create-req-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.create-req-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
}
.create-req-item.ok {
  border-left: 3px solid #4cd84a;
}
.create-req-item.bad {
  border-left: 3px solid #ff4444;
  color: #ff9999;
}
.create-req-item .icon {
  font-weight: bold;
}
.create-req-item.ok .icon { color: #4cd84a; }
.create-req-item.bad .icon { color: #ff4444; }
.ktc-link {
  color: #ffd24a;
  margin-left: auto;
  text-decoration: underline;
  cursor: pointer;
}

.create-form label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #ddd;
  margin-bottom: 6px;
}
.create-form .form-row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}
.create-form input {
  flex: 1;
  height: 28px;
  background: #14120f;
  border: 1px solid #6b5530;
  border-radius: 3px;
  color: #fff;
  padding: 0 8px;
  font-size: 12px;
}
.create-form input:focus {
  outline: none;
  border-color: #ffd24a;
  box-shadow: 0 0 6px rgba(255, 210, 74, 0.5);
}

.guild-manage-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.guild-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid #5a4828;
  border-radius: 4px;
  padding: 10px 12px;
}
.guild-card.danger {
  border-color: #8c281e;
}
.guild-card h4 {
  margin: 0 0 6px;
  color: #ffd24a;
  font-size: 13px;
}
.guild-card.danger h4 {
  color: #ff6b6b;
}
.donate-box {
  display: flex;
  gap: 8px;
  margin: 8px 0;
}
.donate-box input {
  width: 180px;
  height: 28px;
  background: #14120f;
  border: 1px solid #6b5530;
  border-radius: 3px;
  color: #fff;
  padding: 0 8px;
  font-size: 12px;
}
.upgrade-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px;
  border-radius: 3px;
}

/* Modal Bổ Nhiệm Chức Vụ */
.guild-action-cell {
  display: flex;
  gap: 6px;
  align-items: center;
}
.guild-promote-modal {
  min-width: 320px;
  max-width: 480px;
}
.promote-header {
  border-bottom: 1px solid #5a4828;
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.promote-header h3 {
  margin: 0;
  font-size: 14px;
  color: #ffd24a;
}
.promote-role-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
}
.promote-role-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #4a3c22;
  border-radius: 4px;
  padding: 8px 10px;
  transition: all 0.15s;
}
.promote-role-item:hover:not(.disabled) {
  background: rgba(255, 210, 74, 0.08);
  border-color: #ffd24a;
}
.promote-role-item.selected {
  border-color: #ffd24a;
  background: rgba(255, 210, 74, 0.12);
}
.promote-role-item.disabled {
  opacity: 0.55;
}
.promote-role-item .role-icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
}
.promote-role-item .role-info {
  flex: 1;
}
.promote-role-item .role-name-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.promote-role-item .role-name {
  font-weight: 700;
  font-size: 12.5px;
  color: #f0e6d2;
}
.promote-role-item .role-count {
  font-size: 11px;
  color: #aaa;
}
.promote-role-item .role-count.full {
  color: #ff5252;
}
.promote-role-item .role-current-tag {
  font-size: 10px;
  background: #3c7e3a;
  color: #fff;
  padding: 0 4px;
  border-radius: 2px;
}
.promote-role-item .role-desc {
  font-size: 11px;
  color: #8c8273;
  margin-top: 2px;
}
.promote-footer {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

/* Kỹ Năng Bang Hội (Guild Skills) */
.guild-skills-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.guild-skills-header {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid #5a4828;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 12px;
}
.guild-skills-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
}
.guild-skill-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(18, 15, 11, 0.85);
  border: 1px solid #4a3c22;
  border-radius: 4px;
  padding: 8px 12px;
  transition: all 0.15s;
}
.guild-skill-card:hover {
  border-color: #ffd24a;
  background: rgba(255, 210, 74, 0.05);
}
.guild-skill-card.maxed {
  border-color: #8c733e;
  background: rgba(255, 210, 74, 0.03);
}
.gskill-icon {
  font-size: 24px;
  width: 32px;
  text-align: center;
}
.gskill-body {
  flex: 1;
}
.gskill-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}
.gskill-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffd24a;
}
.gskill-level {
  font-size: 11px;
  color: #a8a08d;
}
.gskill-desc {
  font-size: 11.5px;
  color: #b5ac9a;
  margin-bottom: 4px;
}
.gskill-stat-row {
  font-size: 11.5px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.gskill-cost-row {
  font-size: 11px;
  color: #888;
  margin-top: 3px;
}
.gskill-act {
  display: flex;
  align-items: center;
}

/* Tiệm Bang Hội (Guild Shop) */
.guild-shop-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.guild-shop-header {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #5a4828;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 12px;
}
.shop-banner {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.shop-user-wealth {
  display: flex;
  gap: 18px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed rgba(255, 210, 74, 0.2);
}
.guild-shop-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
}
.guild-shop-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(18, 15, 11, 0.85);
  border: 1px solid #4a3c22;
  border-radius: 4px;
  padding: 8px 12px;
  transition: all 0.15s;
}
.guild-shop-card:hover {
  border-color: #ffd24a;
  background: rgba(255, 210, 74, 0.05);
}
.guild-shop-card.locked {
  opacity: 0.65;
  filter: grayscale(0.5);
}
.gshop-icon-box {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #554425;
  border-radius: 4px;
}
.gshop-icon {
  max-width: 34px;
  max-height: 34px;
  object-fit: contain;
  image-rendering: pixelated;
}
.gshop-owned {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #2a2215;
  border: 1px solid #ffd24a;
  color: #ffd24a;
  font-size: 9px;
  padding: 0 3px;
  border-radius: 3px;
  line-height: 12px;
}
.gshop-body {
  flex: 1;
}
.gshop-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}
.gshop-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffd24a;
}
.gshop-req-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid currentColor;
}
.gshop-req-badge.ok {
  color: #55ff55;
  border-color: rgba(85, 255, 85, 0.3);
  background: rgba(85, 255, 85, 0.1);
}
.gshop-req-badge.bad {
  color: #ff5a5a;
  border-color: rgba(255, 90, 90, 0.3);
  background: rgba(255, 90, 90, 0.1);
}
.gshop-desc {
  font-size: 11.5px;
  color: #b5ac9a;
  margin-bottom: 4px;
}
.gshop-price-row {
  font-size: 11.5px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.gshop-price-donate, .gshop-price-gold {
  font-weight: 600;
}
.gshop-act {
  display: flex;
  align-items: center;
}
.gshop-buy-btn {
  min-width: 65px;
}


/* === QUICK MENU v2 (11/2026): luoi 3 cot, nut o vuong co icon hinh that, nut Nap KNB noi bat === */
#u20r.u20qm {
  display: grid !important;
  grid-template-columns: repeat(3, 48px) !important;
  grid-auto-rows: 52px !important;
  gap: 4px !important;
  padding: 5px !important;
  border-radius: 12px !important;
  width: auto !important;
  flex-direction: initial !important;
  align-items: initial !important;
  background: linear-gradient(180deg, rgba(34, 27, 16, 0.95) 0%, rgba(12, 10, 7, 0.95) 100%) !important;
  border: 1px solid #8a6d32 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 214, 120, 0.12) !important;
}
#u20r.u20qm .u20qb {
  position: relative;
  width: 48px !important;
  height: 52px !important;
  margin: 0 !important;
  padding: 2px 0 3px !important;
  border-radius: 9px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  background: radial-gradient(circle at 50% 32%, #43361e 0%, #1c160d 72%) !important;
  border: 1px solid #6e5528 !important;
  box-shadow: inset 0 1px 0 rgba(255, 230, 160, 0.18), 0 2px 4px rgba(0, 0, 0, 0.6) !important;
  color: #f4dfa8 !important;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s, filter 0.12s;
  -webkit-tap-highlight-color: transparent;
}
#u20r.u20qm .u20qb img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}
#u20r.u20qm .u20qb span {
  font: 700 9.5px/11px var(--font, Tahoma), sans-serif !important;
  white-space: nowrap;
  margin-top: 2px;
  color: #ffe6a6;
  text-shadow: 0 1px 2px #000, 0 0 3px #000;
  pointer-events: none;
}
#u20r.u20qm .u20qb:hover {
  border-color: #e2b54f !important;
  transform: translateY(-1px);
  filter: brightness(1.15);
  box-shadow: inset 0 1px 0 rgba(255, 230, 160, 0.3), 0 0 8px rgba(255, 200, 80, 0.45), 0 3px 6px rgba(0, 0, 0, 0.7) !important;
}
#u20r.u20qm .u20qb:active { transform: translateY(1px); filter: brightness(0.95); }
#u20r.u20qm .u20qb[style*="none"] { display: none !important; }
/* Nut Nap KNB: vien vang phat sang */
#u20r.u20qm #u20nap {
  background: radial-gradient(circle at 50% 30%, #7a5a14 0%, #3a2706 75%) !important;
  border-color: #f5c242 !important;
  animation: u20napGlow 1.8s ease-in-out infinite;
}
#u20r.u20qm #u20nap span { color: #fff2b8; }
@keyframes u20napGlow {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 240, 180, 0.4), 0 0 4px rgba(255, 196, 60, 0.45), 0 2px 4px rgba(0, 0, 0, 0.6); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 240, 180, 0.4), 0 0 11px rgba(255, 206, 80, 0.95), 0 2px 4px rgba(0, 0, 0, 0.6); }
}
@media (prefers-reduced-motion: reduce) { #u20r.u20qm #u20nap { animation: none; } }

/* Mobile / man doc: 1 cot ben phai (Nap KNB, Cho, Ty Vo, Bang) */
@media (max-width: 899px), (orientation: portrait) {
  #u20r.u20qm {
    grid-template-columns: 46px !important;
    grid-auto-rows: 52px !important;
    gap: 5px !important;
    padding: 5px !important;
    border-radius: 11px !important;
  }
  #u20r.u20qm .u20qb { width: 46px !important; height: 52px !important; }
  #u20r.u20qm .u20qb img { width: 34px; height: 34px; }
  #u20r.u20qm .u20qb span { font-size: 9px !important; }
  #u20r.u20qm #u20gift,
  #u20r.u20qm #u20ktc,
  #u20r.u20qm #u20doc,
  #u20r.u20qm #u20ver { display: none !important; }
}
#u20r.u20qm #u20ver.has-update {
  border-color: #ffd24a !important;
  background: radial-gradient(circle at 50% 32%, #9a7418 0%, #4a3205 75%) !important;
  box-shadow: 0 0 10px #ffd24a88 !important;
}

/* chua vao che do PC (u20) hay mobile (u2m) -> an menu nhanh (luoi !important o tren de len display:none cua JS, menu troi ve goc trai) */
body:not(.u20):not(.u2m) #u20r.u20qm { display: none !important; }

/* === NAP KNB (topup.js) === */
.tp-wrap { display: flex; flex-direction: column; gap: 8px; max-width: 560px; margin: 0 auto; }
.tp-rate { font-size: 13px; color: #e8d9b0; }
.tp-tiers { font-size: 12px; color: #cdbb8e; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.tp-chip { padding: 2px 7px; border: 1px solid #6e5528; border-radius: 10px; background: #241c10; }
.tp-chip b { color: #7fe08a; }
.tp-packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tp-pack { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 8px; cursor: pointer;
  background: linear-gradient(180deg, #2c2414, #17120a); border: 1px solid #6e5528; color: #ffe6a6; min-width: 0; }
.tp-pack b { font-size: 14px; }
.tp-pack span { font-size: 12px; color: #ffd24a; display: flex; align-items: center; gap: 3px; white-space: nowrap; }
.tp-pack span img { width: 18px; height: 12px; object-fit: contain; }
.tp-pack em { font-style: normal; color: #7fe08a; font-size: 11px; }
.tp-pack.on, .tp-pack:hover { border-color: #f5c242; box-shadow: 0 0 8px rgba(255, 200, 80, 0.5); }
.tp-custom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.tp-custom input { flex: 1; min-width: 120px; max-width: 220px; padding: 6px 8px; background: #120e08; color: #ffe6a6; border: 1px solid #6e5528; border-radius: 6px; font-size: 14px; }
.tp-sum { font-size: 13px; color: #e8d9b0; }
.tp-sum b { color: #ffd24a; }
.tp-sub { font-size: 12px; color: #b9a77d; margin: 4px 0 3px; }
.tp-ms { position: relative; display: flex; justify-content: space-between; gap: 6px; padding: 5px 8px; margin-bottom: 4px; border: 1px solid #4d3c1c; border-radius: 6px; font-size: 12px; overflow: hidden; background: #17120a; }
.tp-ms > * { position: relative; z-index: 1; }
.tp-ms i { position: absolute; left: 0; top: 0; bottom: 0; z-index: 0; background: rgba(255, 200, 80, 0.16); }
.tp-ms.ok { border-color: #4f8a4a; }
.tp-ms.ok b::after { content: " ✓"; color: #7fe08a; }
.tp-order { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; justify-content: center; }
.tp-qr { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 0 0 auto; }
.tp-qr img { width: 210px; max-width: 64vw; height: auto; aspect-ratio: 1 / 1; background: #fff; border-radius: 8px; padding: 4px; border: 2px solid #c9a656; }
.tp-qr small { font-size: 11px; color: #b9a77d; }
.tp-qr .tp-qrerr { display: none; color: #ff8a7a; max-width: 210px; text-align: center; }
.tp-qr.noimg img { display: none; }
.tp-qr.noimg .tp-qrerr { display: block; }
.tp-bank { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tp-row { display: flex; align-items: center; gap: 6px; padding: 4px 6px; background: #17120a; border: 1px solid #3d301a; border-radius: 6px; font-size: 13px; min-width: 0; }
.tp-row span { flex: 0 0 104px; color: #b9a77d; white-space: nowrap; }
.tp-row b { flex: 1; min-width: 0; color: #ffe6a6; word-break: break-all; }
.tp-row .tp-cp { flex: none; padding: 2px 8px; font-size: 11px; min-height: 0; }
.tp-warn { font-size: 12px; color: #ffcf8a; background: #2a1d0a; border: 1px solid #6b4a12; border-radius: 6px; padding: 6px 8px; margin: 0; }
.tp-hist { border-top: 1px solid #3d301a; padding-top: 4px; }
.tp-h { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.1fr auto; gap: 6px; align-items: center; font-size: 12px; padding: 3px 0; border-bottom: 1px dashed #2e2414; }
.tp-h .tp-hc { font-family: monospace; color: #e8d9b0; overflow: hidden; text-overflow: ellipsis; }
.tp-h .btn { padding: 1px 7px; font-size: 11px; min-height: 0; }
@media (max-width: 520px) {
  .tp-packs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-row span { flex-basis: 82px; font-size: 12px; }
  .tp-h { grid-template-columns: 1.4fr 1fr 1fr; }
  .tp-h > span:nth-child(4) { grid-column: 1 / 3; }
}
/* Dien thoai XOAY NGANG (thap): 1 hang 4 nut o tren cung, ben trai ban do nho (vi tri phai do JS dat qua --u20rR) */
@media (max-width: 899px) and (orientation: landscape) {
  #u20r.u20qm {
    top: 4px !important;
    right: var(--u20rR, 114px) !important;
    grid-template-columns: repeat(4, 46px) !important;
    grid-auto-rows: 52px !important;
  }
}

/* === KY TRAN CAC v2 (11/2026): khung CO DINH (khong nhay khi doi tab) + cot tab hoa van vang === */
/* chan 1-2px tran ngang (h3 margin am) lam hien thanh cuon -> khung cao lech giua cac tab */
/* va ::after sticky (hoa van day khung) tran 4px lam hien thanh cuon doc -> khung da co dinh, cuon nam trong cot phai */
#modal.u2ktc .mbox { overflow: hidden !important; }
#modal.u2ktc .u2shop {
  grid-template-columns: 138px minmax(0, 1fr) !important;
  gap: 10px !important;
  height: min(452px, calc(100vh - 150px));
  align-items: stretch;
}
#modal.u2ktc .u2shop > div:last-child {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #8a6d32 #120e08;
}
#modal.u2ktc .u2cat {
  position: relative;
  height: 100%;
  box-sizing: border-box;
  flex-direction: column !important;
  justify-content: flex-start;
  gap: 7px !important;
  padding: 26px 9px 26px !important;
  border: 1px solid #c49a45 !important;
  border-radius: 10px;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255, 222, 140, 0.28) 0%, rgba(255, 222, 140, 0) 62%),
    repeating-linear-gradient(135deg, rgba(255, 220, 140, 0.035) 0 6px, rgba(0, 0, 0, 0) 6px 12px),
    linear-gradient(180deg, #4a3518 0%, #2c1f0d 48%, #1b1208 100%) !important;
  box-shadow: inset 0 0 0 1px #000, inset 0 0 0 4px rgba(255, 214, 120, 0.12), 0 0 12px rgba(255, 190, 80, 0.18) !important;
}
#modal.u2ktc .u2cat::before,
#modal.u2ktc .u2cat::after {
  content: "❖ ✦ ❖";
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  letter-spacing: 3px;
  color: #e7c26a;
  text-shadow: 0 0 6px rgba(255, 200, 90, 0.7), 0 1px 1px #000;
  pointer-events: none;
}
#modal.u2ktc .u2cat::before { top: 6px; }
#modal.u2ktc .u2cat::after { bottom: 6px; }
#modal.u2ktc .u2cat button {
  position: relative;
  flex: none !important;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 6px 8px !important;
  border-radius: 7px;
  border: 1px solid rgba(196, 154, 69, 0.45) !important;
  background: linear-gradient(180deg, rgba(255, 236, 190, 0.09) 0%, rgba(0, 0, 0, 0.28) 100%) !important;
  color: #f6e2b2 !important;
  font: 700 13px/1.15 var(--font, Tahoma), sans-serif !important;
  text-align: left;
  text-shadow: 0 1px 2px #000;
  cursor: pointer;
  transition: transform 0.12s, filter 0.12s, border-color 0.12s, box-shadow 0.12s;
}
#modal.u2ktc .u2cat button img {
  width: 28px;
  height: 28px;
  flex: none;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px #000);
  pointer-events: none;
}
#modal.u2ktc .u2cat button span { pointer-events: none; }
#modal.u2ktc .u2cat button:hover {
  border-color: #f0c860 !important;
  filter: brightness(1.18);
  transform: translateX(2px);
}
#modal.u2ktc .u2cat button.on {
  background: linear-gradient(180deg, #f4d27a 0%, #c8962f 52%, #8d5f14 100%) !important;
  border-color: #fff0b0 !important;
  color: #2a1700 !important;
  text-shadow: 0 1px 0 rgba(255, 245, 200, 0.6);
  box-shadow: 0 0 10px rgba(255, 200, 80, 0.6), inset 0 1px 0 rgba(255, 255, 230, 0.7) !important;
  transform: none;
}
#modal.u2ktc .u2cat button.on::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -6px;
  border: 6px solid transparent;
  border-left-color: #ffe08a;
  filter: drop-shadow(0 0 3px rgba(255, 210, 90, 0.9));
}
#modal.u2ktc .u2cat button.on img { filter: drop-shadow(0 0 4px rgba(255, 255, 220, 0.9)); }

/* Mobile / man doc: tab thanh hang ngang 4 nut (icon tren, chu duoi), noi dung cuon ben duoi; khung van co dinh */
@media (max-width: 899px), (orientation: portrait) {
  #modal.u2ktc .u2shop {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(0, 1fr);
    height: min(600px, calc(100vh - 140px));
  }
  #modal.u2ktc .u2cat {
    height: auto;
    flex-direction: row !important;
    gap: 5px !important;
    padding: 7px !important;
  }
  #modal.u2ktc .u2cat::before,
  #modal.u2ktc .u2cat::after { display: none; }
  #modal.u2ktc .u2cat button {
    flex: 1 1 0 !important;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-height: 54px;
    padding: 4px 2px !important;
    font-size: 11.5px !important;
    text-align: center;
  }
  #modal.u2ktc .u2cat button span { white-space: nowrap; }
  #modal.u2ktc .u2cat button img { width: 26px; height: 26px; }
  #modal.u2ktc .u2cat button:hover { transform: none; }
  #modal.u2ktc .u2cat button.on::before { display: none; }
  /* khung rong gan het man hinh (truoc chi ~75%) */
  html body #modal.u2ktc.u2ktc .mbox { width: min(95%, 560px) !important; max-width: 95% !important; }
}

/* === TRO THU KIEM HIEP v2 (11/2026): khung CO DINH, tab co icon, the muc vien vang, cong tac bat/tat — dung chung PC + mobile === */
body[data-u2t="tt"] #t-more:not(.hidden) {
  display: flex !important;
  flex-direction: column;
  min-height: 0;
  overflow: hidden !important;
  padding: 0 !important;
}
body.u20[data-u2t="tt"] #panel {
  width: min(580px, 96vw) !important;
  height: min(620px, calc(100vh - 150px)) !important;
  max-height: none !important;
  overflow: hidden !important;
}
body.u20[data-u2t="tt"] #t-more:not(.hidden) { height: calc(100% - 30px) !important; }
body.u2m[data-u2t="tt"] #t-more:not(.hidden) { height: 100% !important; }
body[data-u2t="tt"] #t-more > .u2tabs {
  flex: none;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px !important;
  margin: 0 !important;
  padding: 7px 8px !important;
  border: 0 !important;
  border-bottom: 1px solid #8a6d2c !important;
  background:
    repeating-linear-gradient(45deg, rgba(255, 220, 140, 0.035) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #3b3220 0%, #231d12 100%) !important;
  box-shadow: inset 0 -1px 0 rgba(255, 215, 120, 0.15), 0 2px 6px rgba(0, 0, 0, 0.45);
}
body[data-u2t="tt"] #t-more > .u2tabs button {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 38px !important;
  padding: 3px 6px !important;
  border: 1px solid #6e5a2c !important;
  border-radius: 6px !important;
  background: linear-gradient(180deg, #4a4130 0%, #2a2418 100%) !important;
  color: #e9dcb2 !important;
  font-weight: 600;
  font-size: 13px;
  text-shadow: 0 1px 1px #000;
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.12), 0 1px 2px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: filter 0.15s;
}
body[data-u2t="tt"] #t-more > .u2tabs button img {
  width: 24px; height: 24px; object-fit: contain; flex: none;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.8));
  pointer-events: none;
}
body[data-u2t="tt"] #t-more > .u2tabs button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
body[data-u2t="tt"] #t-more > .u2tabs button:hover { filter: brightness(1.18); }
body[data-u2t="tt"] #t-more > .u2tabs button.on {
  background: linear-gradient(180deg, #ffe9a6 0%, #e0b24c 45%, #a8751c 100%) !important;
  border-color: #fff0b8 !important;
  color: #3a2406 !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 10px rgba(255, 200, 80, 0.55), inset 0 1px 0 #fff8d8;
}
body[data-u2t="tt"] #u2ttBody {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 8px 8px 10px !important;
  scrollbar-width: thin;
  scrollbar-color: #b08a3c #1b170f;
}
body[data-u2t="tt"] #u2ttBody::-webkit-scrollbar { width: 7px; }
body[data-u2t="tt"] #u2ttBody::-webkit-scrollbar-thumb { background: linear-gradient(#d8b45a, #8a6a26); border-radius: 4px; }
body[data-u2t="tt"] #u2ttBody::-webkit-scrollbar-track { background: #1b170f; }

/* the muc */
#u2ttBody .u2sec {
  margin: 0 0 9px;
  border: 1px solid #6e5a2c;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(52, 46, 32, 0.92) 0%, rgba(26, 23, 16, 0.94) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, 0.08), 0 2px 5px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
#u2ttBody .u2sec > .u2h,
#u2ttBody > h3.u2h {
  display: flex !important;
  align-items: center;
  gap: 7px;
  margin: 0 !important;
  padding: 5px 10px !important;
  border: 0 !important;
  border-bottom: 1px solid #8a6d2c !important;
  background: linear-gradient(90deg, #6d5420 0%, #3e3118 55%, rgba(40, 32, 18, 0.2) 100%) !important;
  color: #ffe6a0 !important;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px #000;
}
#u2ttBody > h3.u2h { margin: 2px 0 6px !important; border-radius: 6px; border: 1px solid #6e5a2c !important; }
#u2ttBody .u2sec > .u2h img { width: 22px; height: 22px; object-fit: contain; flex: none; filter: drop-shadow(0 1px 1px #000); }
#u2ttBody .u2sec > .u2h b { flex: 1; font-weight: 700; }
#u2ttBody .u2sec > .u2h::after { content: "❖ ✦ ❖"; color: #c9a24a; font-size: 10px; letter-spacing: 2px; opacity: 0.85; }
#u2ttBody .u2sb { padding: 2px 10px 4px; }

/* dong tuy chon */
#u2ttBody .u2sb > label,
#u2ttBody .u2row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 7px 2px !important;
  margin: 0 !important;
  border-bottom: 1px dashed rgba(255, 215, 120, 0.13);
  font-size: 13px !important;
  line-height: 1.35;
  color: #efe6c8;
  cursor: pointer;
}
#u2ttBody .u2row { cursor: default; }
#u2ttBody .u2sb > label:last-child,
#u2ttBody .u2sb > .u2row:last-child { border-bottom: 0; }
#u2ttBody .u2sb > label:hover { background: rgba(255, 215, 120, 0.05); }
#u2ttBody .u2tx { flex: 1; min-width: 0; }
#u2ttBody .u2tx small { display: block; margin-top: 1px; color: #b4a784; font-size: 11.5px; line-height: 1.3; }
#u2ttBody kbd {
  flex: none;
  min-width: 22px;
  padding: 1px 6px;
  border: 1px solid #c9a24a;
  border-bottom-width: 2px;
  border-radius: 4px;
  background: linear-gradient(#4a3f26, #2a2416);
  color: #ffe08a;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

/* cong tac bat / tat */
#u2ttBody input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  position: relative;
  width: 40px;
  height: 22px;
  margin: 0 !important;
  border-radius: 11px;
  border: 1px solid #7a6638;
  background: linear-gradient(180deg, #1d1a12, #322c1e);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  vertical-align: middle;
  transition: background 0.18s, border-color 0.18s;
}
#u2ttBody input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(180deg, #b9ad8f, #7d735c);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  transition: transform 0.18s, background 0.18s;
}
#u2ttBody input[type="checkbox"]:checked {
  border-color: #f2cf6e;
  background: linear-gradient(180deg, #e6b94e, #9b6e1c);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 6px rgba(255, 200, 80, 0.45);
}
#u2ttBody input[type="checkbox"]:checked::before { transform: translateX(18px); background: linear-gradient(180deg, #fffbe8, #f0dca0); }
#u2ttBody input[type="checkbox"]:focus-visible { outline: 2px solid #ffe08a; outline-offset: 2px; }
#u2ttBody input[type="checkbox"]:disabled { opacity: 0.45; cursor: not-allowed; }
/* o tick nho trong chip bo loc */
#u2ttBody .chip2 input[type="checkbox"] { width: 16px; height: 16px; border-radius: 3px; }
#u2ttBody .chip2 input[type="checkbox"]::before { display: none; }
#u2ttBody .chip2 input[type="checkbox"]:checked::after {
  content: "✓"; position: absolute; left: 0; top: 0; right: 0; bottom: 0; color: #2a1a04; font: 900 12px/15px sans-serif; text-align: center;
}

/* select */
#u2ttBody select {
  flex: none;
  min-height: 28px;
  padding: 2px 6px !important;
  border: 1px solid #8a7440 !important;
  border-radius: 5px !important;
  background: linear-gradient(180deg, #2c271b, #1a170f) !important;
  color: #ffe6a0 !important;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* nguong thuoc */
#u2ttBody .u2pot {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px !important;
  padding: 6px 0 4px !important;
  border-bottom: 1px dashed rgba(255, 215, 120, 0.13);
}
#u2ttBody .u2pot .u2pc {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 6px 6px 7px !important;
  border: 1px solid #5a4a2a;
  border-top-width: 3px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
}
#u2ttBody .u2pot .u2pc span small { display: block; font-weight: 400; color: #a99d7d; font-size: 11px; }
#u2ttBody .u2pot .u2pc select { width: 100% !important; text-align: center; }
#u2ttBody .u2pot .u2pc.hp { border-top-color: #e2483a; color: #ff9a8a; }
#u2ttBody .u2pot .u2pc.mp { border-top-color: #3f8fe0; color: #92c6ff; }
#u2ttBody .u2pot .u2pc.urg { border-top-color: #f08a1c; color: #ffc27a; }

/* chon loai thuoc */
#u2ttBody .u2psl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 6px 0 4px; }
#u2ttBody .u2psl .btn {
  display: flex !important;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 42px;
  padding: 4px 8px !important;
  text-align: left;
  white-space: normal;
}
#u2ttBody .u2psl .btn img { width: 28px; height: 28px; object-fit: contain; flex: none; }
#u2ttBody .u2psl .btn span { flex: 1; min-width: 0; font-size: 12px; line-height: 1.25; overflow: hidden; }
#u2ttBody .u2psl .btn span small { display: block; color: #d8c890; font-size: 10.5px; opacity: 0.85; }
#u2ttBody .u2psl .btn i { font-style: normal; color: #ffe08a; flex: none; }
#u2ttBody .u2btns { padding: 6px 0 4px; }
#u2ttBody .u2btns .btn { min-height: 34px; font-weight: 700; }
#u2ttBody #u2pwaBtn { color: #ffd24a !important; }

/* tab Nhat do: the bo loc */
#u2ttBody > .lootf {
  margin: 0 0 9px !important;
  padding: 7px 10px !important;
  border: 1px solid #6e5a2c !important;
  border-radius: 7px !important;
  background: linear-gradient(180deg, rgba(52, 46, 32, 0.92), rgba(26, 23, 16, 0.94)) !important;
}
#u2ttBody > .lootf label { display: flex !important; align-items: center; gap: 10px; padding: 5px 0 !important; font-size: 12.5px; }
#u2ttBody > .lootf .chip2 { display: inline-flex !important; gap: 5px; padding: 3px 7px !important; }

/* mobile */
@media (max-width: 899px), (orientation: portrait) {
  body[data-u2t="tt"] #t-more > .u2tabs { padding: 6px !important; gap: 4px !important; }
  body[data-u2t="tt"] #t-more > .u2tabs button { min-height: 40px !important; gap: 4px; font-size: 12.5px; padding: 3px 4px !important; }
  body[data-u2t="tt"] #t-more > .u2tabs button img { width: 22px; height: 22px; }
  #u2ttBody .u2sb > label, #u2ttBody .u2row { padding: 8px 2px !important; }
}
#u2ttBody .u2sec:last-child, #u2ttBody > .lootf:last-child { margin-bottom: 0 !important; }
/* mobile khong co ban phim: an nhan phim tat */
body.u2m #u2ttBody kbd { display: none; }
body[data-u2t="tt"] #u2ttBody, body[data-u2t="tt"] #u2ttBody label, body[data-u2t="tt"] #u2ttBody .u2tx, body[data-u2t="tt"] #u2ttBody .u2row { text-align: left !important; }
body[data-u2t="tt"] #u2ttBody .u2pot .u2pc { text-align: center !important; }
/* dien thoai xoay ngang / man hinh thap: khung cao hon (panel dat sat mep tren) */
@media (max-height: 500px) { body.u20[data-u2t="tt"] #panel { height: calc(100vh - 66px) !important; } }
/* mobile doc + khung chat dang mo: menu nhanh 2 cot x 2 hang, dat tren khung chat (JS u20rFit dat top) */
@media (max-width: 899px), (orientation: portrait) {
  body #u20r.u20qm.u20qm2 {
    display: grid !important;
    grid-template-columns: repeat(2, 46px) !important;
    grid-auto-rows: 52px !important;
    top: var(--u20qmT, 250px) !important;
  }
  body #u20r.u20qm.u20qmR {
    display: grid !important;
    grid-template-columns: repeat(4, 46px) !important;
    grid-auto-rows: 52px !important;
    top: var(--u20qmT, 250px) !important;
    right: var(--u20qmR, 6px) !important;
  }
}

/* === KHUNG CHAT v2 (11/2026): vien vang hoa van 4 goc, tab sang theo mau kenh, dong tin ro mau — dung chung PC + mobile === */
html body #u20log {
  border: 1px solid #a07c34 !important;
  border-radius: 9px !important;
  background:
    /* goc hoa van chu L vang (8 vach) */
    linear-gradient(#f0cc6a, #f0cc6a) top 3px left 3px / 16px 2px no-repeat,
    linear-gradient(#f0cc6a, #f0cc6a) top 3px left 3px / 2px 16px no-repeat,
    linear-gradient(#f0cc6a, #f0cc6a) top 3px right 3px / 16px 2px no-repeat,
    linear-gradient(#f0cc6a, #f0cc6a) top 3px right 3px / 2px 16px no-repeat,
    linear-gradient(#f0cc6a, #f0cc6a) bottom 3px left 3px / 16px 2px no-repeat,
    linear-gradient(#f0cc6a, #f0cc6a) bottom 3px left 3px / 2px 16px no-repeat,
    linear-gradient(#f0cc6a, #f0cc6a) bottom 3px right 3px / 16px 2px no-repeat,
    linear-gradient(#f0cc6a, #f0cc6a) bottom 3px right 3px / 2px 16px no-repeat,
    repeating-linear-gradient(45deg, rgba(255, 220, 140, 0.025) 0 2px, transparent 2px 10px),
    linear-gradient(180deg, rgba(38, 30, 16, 0.94) 0%, rgba(16, 13, 8, 0.93) 100%) !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.75), inset 0 0 0 1px rgba(255, 220, 140, 0.12), 0 6px 18px rgba(0, 0, 0, 0.55) !important;
  overflow: hidden;
}
/* thanh tab */
html body #u20log #u20ct {
  border: 0 !important;
  border-bottom: 1px solid #8a6d2c !important;
  border-radius: 8px 8px 0 0 !important;
  background: linear-gradient(180deg, rgba(92, 70, 28, 0.85) 0%, rgba(40, 31, 15, 0.9) 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 236, 180, 0.18), 0 2px 6px rgba(0, 0, 0, 0.4);
  gap: 4px !important;
  padding: 4px 8px !important;
}
html body #u20log #u20ct button {
  border: 1px solid #6e5a2c !important;
  border-radius: 6px !important;
  background: linear-gradient(180deg, #3e3420 0%, #221b0f 100%) !important;
  color: #f0e2b0 !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 1px #000;
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.1), 0 1px 2px rgba(0, 0, 0, 0.6);
  position: relative;
  transition: filter 0.15s;
}
html body #u20log #u20ct button:hover { filter: brightness(1.2); }
html body #u20log #u20ct button[data-lt]::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 1px;
  height: 2px;
  border-radius: 2px;
  background: var(--chc, #e8c062);
  opacity: 0.75;
}
html body #u20log #u20ct button[data-lt="chat"] { --chc: #ffd45c; }
html body #u20log #u20ct button[data-lt="near"] { --chc: #6fd6ff; }
html body #u20log #u20ct button[data-lt="party"] { --chc: #7fe38b; }
html body #u20log #u20ct button[data-lt="guild"] { --chc: #ffa24d; }
html body #u20log #u20ct button[data-lt="sys"] { --chc: #ff7d6b; }
html body #u20log #u20ct button.on {
  background: linear-gradient(180deg, #fff0b4 0%, #e6b852 48%, #a8771e 100%) !important;
  border-color: #fff2c0 !important;
  color: #3a2406 !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 9px rgba(255, 200, 80, 0.6), inset 0 1px 0 #fffae0;
}
html body #u20log #u20ct button.on::after { background: #5a3a08; opacity: 0.55; }
html body #u20log #u20ct .ctn:not(:empty) {
  display: inline-block;
  min-width: 15px;
  margin-left: 3px;
  padding: 0 4px;
  border-radius: 8px;
  background: linear-gradient(#ff6a55, #c8261a);
  color: #fff;
  font-size: 10px;
  line-height: 15px;
  text-align: center;
  text-shadow: none;
  box-shadow: 0 0 5px rgba(255, 80, 60, 0.7);
}
/* vung tin nhan */
html body #u20log #u20lines {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.32)) !important;
  color: #f2e7c6 !important;
}
html body #u20log #u20lines .cl {
  padding: 3px 6px !important;
  margin: 1px 0 !important;
  border-radius: 5px;
  border-left: 2px solid transparent;
  line-height: 1.45;
  color: #f2e7c6;
}
html body #u20log #u20lines .cl:nth-child(odd) { background: rgba(255, 235, 180, 0.035); }
html body #u20log #u20lines .cl:hover { background: rgba(255, 215, 120, 0.08); }
html body #u20log #u20lines .cl > i {
  color: #a7987a !important;
  font-style: normal;
  font-size: 0.88em;
}
html body #u20log #u20lines .cl > b[data-pn] { font-weight: 700; cursor: pointer; text-shadow: 0 1px 1px #000; }
html body #u20log #u20lines .cl > b[data-pn]:hover { text-decoration: underline; }
html body #u20log #u20lines .cl > small { color: #b9a97c !important; font-size: 0.85em; }
html body #u20log #u20lines .cl.me { background: rgba(255, 205, 90, 0.1); border-left-color: #e8c062; }
html body #u20log #u20lines .cl.sys {
  color: #ffd27a !important;
  background: linear-gradient(90deg, rgba(200, 60, 40, 0.22), rgba(200, 60, 40, 0.04));
  border-left-color: #ff7d6b;
}
html body #u20log #u20lines .ctag {
  display: inline-block;
  margin-right: 4px;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: 700;
  line-height: 1.5;
  vertical-align: 1px;
  color: #1c1406;
  text-shadow: none;
}
html body #u20log #u20lines .ctag.w { background: linear-gradient(#ffe48a, #e0a93a); }
html body #u20log #u20lines .ctag.n { background: linear-gradient(#a8ecff, #4cb8e6); }
html body #u20log #u20lines .ctag.s { background: linear-gradient(#ffb0a0, #e2584a); color: #fff; }
/* o nhap */
html body #u20log #u20in {
  border: 0 !important;
  border-top: 1px solid #8a6d2c !important;
  border-radius: 0 0 8px 8px !important;
  background: linear-gradient(180deg, rgba(48, 37, 18, 0.92), rgba(24, 19, 10, 0.95)) !important;
  gap: 6px !important;
}
html body #u20log #u20txt {
  border: 1px solid #8a6d2c !important;
  border-radius: 14px !important;
  background: rgba(10, 8, 4, 0.85) !important;
  color: #f6ecd0 !important;
  padding: 0 12px !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.7);
}
html body #u20log #u20txt::placeholder { color: #9a8c68; }
html body #u20log #u20txt:focus { border-color: #f0cc6a !important; box-shadow: 0 0 0 2px rgba(240, 204, 106, 0.25), inset 0 1px 3px rgba(0, 0, 0, 0.7); outline: none; }
html body #u20log #u20go {
  border: 1px solid #fff0b8 !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, #ffe9a6 0%, #e0b24c 50%, #a8751c 100%) !important;
  color: #3a2406 !important;
  font-weight: 800 !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 7px rgba(255, 200, 80, 0.45);
  padding: 0 14px !important;
}
html body #u20log #u20go:hover { filter: brightness(1.12); }
html body #u20log #u20ch { box-shadow: 0 0 6px rgba(120, 180, 255, 0.45); }
/* thanh cuon */
html body #u20log #u20sb i { background: linear-gradient(#e8c062, #9b6e1c) !important; border-radius: 3px; }
/* chat v2: vien kep + hoa van ngan cach o nhap */
html body #u20log { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.75), inset 0 0 0 3px rgba(0, 0, 0, 0.35), inset 0 0 0 4px rgba(240, 204, 106, 0.22), 0 6px 18px rgba(0, 0, 0, 0.55) !important; }
html body #u20log #u20in { position: relative; }
html body #u20log #u20in::before { content: "✦ ❖ ✦"; position: absolute; left: 50%; top: -8px; transform: translateX(-50%); padding: 0 8px; font-size: 10px; line-height: 14px; letter-spacing: 3px; color: #f0cc6a; background: linear-gradient(180deg, rgba(40, 31, 15, 0.98), rgba(30, 24, 12, 0.98)); border: 1px solid #8a6d2c; border-radius: 8px; text-shadow: 0 0 4px rgba(255, 200, 80, 0.6); pointer-events: none; z-index: 1; }
/* chat v2: khung hep (dien thoai xoay ngang) -> thanh tab vuot ngang duoc, nut thu gon luon ghim ben phai */
html body #u20log #u20ct { flex-wrap: nowrap !important; overflow-x: auto !important; overflow-y: hidden !important; scrollbar-width: none; overscroll-behavior-x: contain; }
html body #u20log #u20ct::-webkit-scrollbar { display: none; }
html body #u20log #u20ct > button { flex: 0 0 auto !important; }
html body #u20log #u20ct #u20hide { position: sticky; right: 0; z-index: 2; margin-left: auto; box-shadow: -6px 0 8px rgba(30, 22, 10, 0.9); }
@media (max-height: 500px) { html body #u20log #u20ct { padding: 3px 5px !important; gap: 3px !important; } html body #u20log #u20ct > button { font-size: 11px !important; padding: 1px 6px !important; } }

/* === KHUNG CHAT v3 (11/2026): nen tim than + vien vang phat sang, 4 goc hoa van dinh ngoc, mat ngoc luc bao o dinh,
       chu Thế giới xanh la sang (nhu mau co dien), vat pham theo mau pham chat — dung chung PC + mobile === */
html body #u20log {
  border: 2px solid #c99a3a !important;
  border-radius: 7px !important;
  padding-top: 9px !important;
  background:
    radial-gradient(circle at 10px 10px, rgba(255, 215, 120, 0.06) 1px, transparent 2px) 0 0 / 20px 20px,
    radial-gradient(ellipse at 50% 0%, rgba(120, 90, 200, 0.28), transparent 60%),
    linear-gradient(180deg, rgba(34, 25, 60, 0.95) 0%, rgba(16, 12, 32, 0.96) 100%) !important;
  box-shadow:
    0 0 0 1px #0a0614,
    inset 0 0 0 3px rgba(0, 0, 0, 0.45),
    inset 0 0 0 4px rgba(255, 214, 110, 0.35),
    0 0 14px rgba(255, 190, 80, 0.28),
    0 8px 22px rgba(0, 0, 0, 0.6) !important;
}
html body #u20log::after {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  z-index: 6;
  background:
    url("chat/crest.svg") top -1px center / 150px 18px no-repeat,
    url("chat/tl.svg") top left / 34px 34px no-repeat,
    url("chat/tr.svg") top right / 34px 34px no-repeat,
    url("chat/bl.svg") bottom left / 34px 34px no-repeat,
    url("chat/br.svg") bottom right / 34px 34px no-repeat;
  filter: drop-shadow(0 0 3px rgba(255, 200, 90, 0.45));
}
/* thanh tab: chua cho cho 4 goc hoa van */
html body #u20log #u20ct {
  padding: 4px 16px 5px !important;
  border-radius: 0 !important;
  border-bottom: 1px solid rgba(201, 154, 58, 0.65) !important;
  background: linear-gradient(180deg, rgba(78, 58, 128, 0.55) 0%, rgba(30, 22, 54, 0.35) 100%) !important;
  box-shadow: inset 0 -1px 0 rgba(255, 220, 140, 0.12) !important;
}
html body #u20log #u20ct > button {
  border: 1px solid #8a6d2c !important;
  background: linear-gradient(180deg, #45356c 0%, #241b40 100%) !important;
  color: #f6e7b8 !important;
}
html body #u20log #u20ct > button.on {
  background: linear-gradient(180deg, #fff0b4 0%, #e6b852 48%, #a8771e 100%) !important;
  border-color: #fff2c0 !important;
  color: #3a2406 !important;
}
html body #u20log #u20ct #u20hide { box-shadow: -6px 0 8px rgba(30, 22, 54, 0.95) !important; }
/* vung tin */
html body #u20log #u20lines {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.22)) !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
  color: #eef3dc !important;
}
html body #u20log #u20lines .cl { color: #eef3dc; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.9); }
html body #u20log #u20lines .cl:nth-child(odd) { background: rgba(255, 240, 200, 0.03); }
html body #u20log #u20lines .cl.cw { color: #a4f58e; }            /* Thế giới: xanh la sang */
html body #u20log #u20lines .cl.cn { color: #ffffff; }            /* Lân cận: trang */
html body #u20log #u20lines .cl.sys { color: #ffd77a !important; }
html body #u20log #u20lines .cl > i { color: #a99fcf !important; }
html body #u20log #u20lines .cl > small { color: #cdbd8e !important; }
html body #u20log #u20lines .cl > b[data-pn] { filter: brightness(1.15) saturate(1.1); }
html body #u20log #u20lines .cl.me { background: rgba(255, 205, 90, 0.11) !important; border-left-color: #f0cc6a; }
/* vat pham theo pham chat */
html body #u20log #u20lines .chit,
html body #chatLines .chit { font-weight: 800; text-decoration: none; cursor: pointer; padding: 0 2px; border-radius: 3px; }
html body #u20log #u20lines .chit:hover,
html body #chatLines .chit:hover { background: rgba(255, 255, 255, 0.1); text-decoration: underline; }
html body .chit.q0 { color: #ffffff !important; }
html body .chit.q1 { color: #74a9ff !important; text-shadow: 0 0 5px rgba(80, 140, 255, 0.65); }
html body .chit.qo { color: #ff8f45 !important; text-shadow: 0 0 5px rgba(255, 120, 40, 0.6); }
html body .chit.q3 { color: #d48cff !important; text-shadow: 0 0 6px rgba(190, 90, 255, 0.75); }
html body .chit.q4 { color: #ffd700 !important; text-shadow: 0 0 6px rgba(255, 200, 0, 0.8); }
html body .chit.q5 { color: #effaff !important; text-shadow: 0 0 6px rgba(150, 225, 255, 0.95), 0 0 2px #7fd6ff; background: linear-gradient(90deg, rgba(150, 220, 255, 0.14), transparent); }
/* o nhap: chua cho goc duoi + hoa van ngan cach */
html body #u20log #u20in {
  padding-left: 14px !important;
  padding-right: 14px !important;
  padding-bottom: 6px !important;
  border-top: 1px solid rgba(201, 154, 58, 0.65) !important;
  background: linear-gradient(180deg, rgba(48, 36, 84, 0.6), rgba(22, 16, 40, 0.7)) !important;
}
html body #u20log #u20in::before {
  content: "" !important;
  top: -7px !important;
  width: 110px;
  height: 12px;
  padding: 0 !important;
  border: 0 !important;
  background: url("chat/foot.svg") center / 110px 12px no-repeat !important;
  text-shadow: none !important;
}
html body #u20log #u20txt { background: rgba(8, 6, 18, 0.85) !important; border-color: #9a7a34 !important; }
html body #u20log #u20sb { z-index: 7; }

/* === KHUNG CHAT v3.1: nen TRONG SUOT (thay ban do phia sau), giu vien vang + hoa van; chu co vien den de van ro === */
html body #u20log {
  background:
    linear-gradient(180deg, rgba(16, 12, 30, 0.38) 0%, rgba(10, 8, 20, 0.5) 100%) !important;
  box-shadow:
    0 0 0 1px rgba(10, 6, 20, 0.8),
    inset 0 0 0 3px rgba(0, 0, 0, 0.25),
    inset 0 0 0 4px rgba(255, 214, 110, 0.35),
    0 0 12px rgba(255, 190, 80, 0.25) !important;
}
html body #u20log #u20lines { background: transparent !important; }
html body #u20log #u20lines .cl,
html body #u20log #u20lines .cl:nth-child(odd) { background: transparent; }
html body #u20log #u20lines .cl:hover { background: rgba(0, 0, 0, 0.28); }
html body #u20log #u20lines .cl.me { background: rgba(255, 205, 90, 0.12) !important; }
html body #u20log #u20lines .cl,
html body #u20log #u20lines .cl > i,
html body #u20log #u20lines .cl > b,
html body #u20log #u20lines .chit {
  text-shadow: -1px 0 0 #000, 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, 0 1px 3px rgba(0, 0, 0, 0.9) !important;
}
html body #u20log #u20ct { background: linear-gradient(180deg, rgba(40, 30, 70, 0.55) 0%, rgba(20, 15, 36, 0.25) 100%) !important; }
html body #u20log #u20in { background: linear-gradient(180deg, rgba(20, 15, 36, 0.25), rgba(14, 10, 26, 0.55)) !important; }
html body #u20log #u20lines, html body #u20log { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
/* mobile: tab "Hệ thống" dài hơn "System" -> thu khoảng cách để 5 tab + nút thu gọn vừa 1 hàng */
@media (max-width: 899px), (orientation: portrait) { html body #u20log #u20ct { padding: 4px 10px 5px !important; gap: 3px !important; } html body #u20log #u20ct > button { padding-left: 7px !important; padding-right: 7px !important; } }
@media (max-width: 420px) { html body #u20log #u20ct > button { padding-left: 5px !important; padding-right: 5px !important; } html body #u20log #u20ct { padding-left: 8px !important; padding-right: 8px !important; } }

/* === XEM DO KHOE TREN CHAT: hinh vat pham trong o khung mau theo pham chat, the canh giua — PC + mobile === */
#modal.chitm .chitv { display: flex; justify-content: center; padding: 4px 0 6px; }
#modal.chitm .chitv .vp-card { margin: 0 auto; }
#modal.chitm .vp-pic {
  position: relative;
  width: 76px;
  height: 76px;
  margin: 4px auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--pc, #9a8f78);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.12), transparent 65%),
    linear-gradient(180deg, #2a2620, #0e0c09);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.8), inset 0 0 14px rgba(0, 0, 0, 0.7), 0 0 10px var(--pg, transparent);
}
#modal.chitm .vp-pic img {
  max-width: 64px;
  max-height: 64px;
  height: 60px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.8));
}
#modal.chitm .vp-pic.q0 { --pc: #d8d2c4; }
#modal.chitm .vp-pic.q1 { --pc: #5e8fff; --pg: rgba(80, 140, 255, 0.45); }
#modal.chitm .vp-pic.qo { --pc: #ff8f45; --pg: rgba(255, 120, 40, 0.45); }
#modal.chitm .vp-pic.q3 { --pc: #c77bff; --pg: rgba(190, 90, 255, 0.55); }
#modal.chitm .vp-pic.q4 { --pc: #ffd34a; --pg: rgba(255, 200, 0, 0.6); }
#modal.chitm .vp-pic.q5 { --pc: #bfeaff; --pg: rgba(150, 225, 255, 0.7); }
/* goc sang nhe cho do quy */
#modal.chitm .vp-pic.q3 i, #modal.chitm .vp-pic.q4 i, #modal.chitm .vp-pic.q5 i {
  position: absolute; inset: 0; border-radius: 6px; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 40%, transparent 60%, rgba(255, 255, 255, 0.08));
}

/* === BOSS THE GIOI (11/2026): nut bao, tab Hoat dong, khung trong tran — dung chung PC + mobile === */
#wbsPill {
  position: fixed;
  left: 50%;
  top: 64px;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 24px);
  padding: 6px 8px 6px 12px;
  border: 1px solid #f0cc6a;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(90, 20, 14, 0.95), rgba(40, 8, 6, 0.95));
  color: #ffe9b0;
  font: 600 12.5px/1.2 inherit;
  text-shadow: 0 1px 1px #000;
  box-shadow: 0 0 12px rgba(255, 120, 60, 0.55), 0 4px 12px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  white-space: nowrap;
}
#wbsPill.hidden { display: none; }
#wbsPill b { color: #ffd24a; }
#wbsPill span { overflow: hidden; text-overflow: ellipsis; color: #f4dcc0; font-weight: 500; }
#wbsPill i { font-style: normal; padding: 3px 10px; border-radius: 12px; background: linear-gradient(180deg, #ffe9a6, #d9a23c); color: #3a1c04; font-weight: 800; text-shadow: none; }
#wbsPill.live { animation: wbsGlow 1.6s ease-in-out infinite; }
@keyframes wbsGlow { 0%, 100% { box-shadow: 0 0 10px rgba(255, 120, 60, 0.5), 0 4px 12px rgba(0, 0, 0, 0.6); } 50% { box-shadow: 0 0 22px rgba(255, 170, 60, 0.95), 0 4px 12px rgba(0, 0, 0, 0.6); } }
@media (prefers-reduced-motion: reduce) { #wbsPill.live { animation: none; } }
body.u2m #wbsPill { top: 128px; font-size: 12px; }
@media (max-width: 899px) and (orientation: landscape) { body #wbsPill { top: 68px; } }

/* tab Hoat dong > Boss TG */
.wbs .wbs-state { margin: 2px 0 8px; padding: 6px 10px; border: 1px solid #6e5a2c; border-radius: 6px; background: rgba(0, 0, 0, 0.3); color: #efe2b8; font-size: 13px; }
.wbs .wbs-state.live { border-color: #ff8a5c; color: #ffd0b0; background: linear-gradient(90deg, rgba(150, 30, 20, 0.45), rgba(40, 10, 8, 0.3)); font-weight: 700; }
.wbs-hp { position: relative; height: 22px; margin: 6px 0 4px; border: 1px solid #8a6d2c; border-radius: 6px; background: #1a0b08; overflow: hidden; box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.8); }
.wbs-hp i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(180deg, #ff6a4a, #b3200f 60%, #7a1006); box-shadow: 0 0 8px rgba(255, 80, 40, 0.6); transition: width 0.5s; }
.wbs-hp span { position: relative; display: block; text-align: center; line-height: 20px; font-size: 12px; font-weight: 700; color: #fff; text-shadow: -1px 0 #000, 1px 0 #000, 0 -1px #000, 0 1px #000; }
.wbs .wbs-sub { font-size: 12px; color: #c9bb92; margin-bottom: 8px; }
.wbs .wbs-go { width: 100%; min-height: 40px; margin: 4px 0 8px; font-size: 14px; font-weight: 800; }
.wbs .wbs-me { margin: 0 0 8px; padding: 6px 10px; border-left: 3px solid #f0cc6a; border-radius: 4px; background: rgba(255, 205, 90, 0.08); font-size: 13px; }
.wbs .wbs-me small { color: #a99d7d; }
.wbs .wbs-rw { margin-top: 4px; font-size: 12px; color: #e8dcb6; }
.wbs .wbs-top, .wbs .wbs-info { margin: 0 0 8px; border: 1px solid #5c4a28; border-radius: 6px; background: rgba(0, 0, 0, 0.22); overflow: hidden; }
.wbs .wbs-h, .wbs .wbs-info summary { padding: 5px 10px; background: linear-gradient(90deg, #5c4518, rgba(40, 30, 14, 0.2)); color: #ffe6a0; font-weight: 700; font-size: 13px; cursor: pointer; }
.wbs .wbs-info > p { margin: 6px 10px; }
.wbs .wbs-row { display: flex; align-items: center; gap: 8px; padding: 4px 10px; border-top: 1px dashed rgba(255, 215, 120, 0.1); font-size: 12.5px; }
.wbs .wbs-row > b { flex: none; min-width: 48px; color: #ffe6a0; }
.wbs .wbs-row > span { flex: 1; min-width: 0; color: #efe6c8; overflow-wrap: anywhere; }
.wbs .wbs-row > em { flex: none; font-style: normal; font-weight: 700; color: #ffb38a; }
.wbs .wbs-row.me { background: rgba(255, 205, 90, 0.12); }
.wbs .wbs-row b.r1 { color: #ffd700; } .wbs .wbs-row b.r2 { color: #e0e6f0; } .wbs .wbs-row b.r3 { color: #e09a5a; }
.wbs .wbs-top .wbs-row > b { min-width: 22px; }

/* khung trong tran */
#wbsHud {
  position: fixed;
  left: 50%;
  top: 62px;
  transform: translateX(-50%);
  z-index: 35;
  width: min(380px, calc(100vw - 16px));
  padding: 6px 10px 8px;
  border: 1px solid #c99a3a;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(40, 12, 10, 0.88), rgba(16, 8, 6, 0.85));
  box-shadow: 0 0 12px rgba(255, 120, 60, 0.35), 0 4px 14px rgba(0, 0, 0, 0.6);
  color: #f2e7c6;
  font-size: 12px;
  pointer-events: auto;
}
#wbsHud.hidden { display: none; }
#wbsHud .wbh-top { display: flex; align-items: center; gap: 8px; }
#wbsHud .wbh-top b { flex: 1; min-width: 0; color: #ffd24a; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#wbsHud .wbh-top span { color: #ffb38a; font-weight: 700; }
#wbsHud .wbh-top button { width: 24px; height: 24px; border: 1px solid #8a6d2c; border-radius: 50%; background: #2a1810; color: #f0cc6a; cursor: pointer; line-height: 20px; padding: 0; }
#wbsHud .wbs-hp { height: 18px; margin: 5px 0 4px; }
#wbsHud .wbs-hp span { line-height: 16px; font-size: 11px; }
#wbsHud .wbh-sub { display: flex; justify-content: space-between; gap: 8px; color: #d8cba4; }
#wbsHud .wbh-sub b { color: #ffe08a; }
#wbsHud .wbh-list { margin-top: 4px; display: grid; gap: 1px; }
#wbsHud .wbh-list div { display: flex; gap: 6px; padding: 1px 4px; border-radius: 3px; }
#wbsHud .wbh-list div.me { background: rgba(255, 205, 90, 0.15); }
#wbsHud .wbh-list b { width: 14px; color: #ffe6a0; }
#wbsHud .wbh-list span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#wbsHud .wbh-list em { font-style: normal; color: #ffb38a; font-weight: 700; }
body.u2m #wbsHud { top: 124px; }
@media (max-width: 899px) and (orientation: landscape) { body #wbsHud { top: 68px; width: min(300px, 46vw); } body #wbsHud .wbh-list { display: none; } }
/* mobile doc: nut bao + khung trong tran dat ben trai, chua cho ban do nho goc phai */
@media (max-width: 899px), (orientation: portrait) {
  body.u2m #wbsPill { top: 104px; left: 8px; right: auto; transform: none; max-width: calc(100vw - 104px); }
  body.u2m #wbsHud { top: 104px; left: 8px; transform: none; width: calc(100vw - 104px); }
  body.u2m #wbsHud .wbh-sub { flex-wrap: wrap; }
}

/* ===== O TRANG BI: vien sang chay quanh theo pham chat (Xanh / Hiem / Tim / Hoang Kim / Bach Kim) ===== */
@property --vlrot { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes vlRot { to { --vlrot: 360deg; } }
@keyframes vlBreath { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.u2doll .slot > .it:not(.empty), #inv .it.r3, #inv .it.r4, #inv .it.r5 { position: relative; }
.u2doll .slot > .it.r1 { --qc: #4f9bff; --qd: 4.6s; }
.u2doll .slot > .it.r2 { --qc: #ff9a3c; --qd: 4s; }
.u2doll .slot > .it.r3, #inv .it.r3 { --qc: #c46bff; --qd: 3.4s; }
.u2doll .slot > .it.r4, #inv .it.r4 { --qc: #ffcc33; --qd: 3s; }
.u2doll .slot > .it.r5, #inv .it.r5 { --qc: #a8f0ff; --qd: 2.6s; }
.u2doll .slot:has(> .it.r1), .u2doll .slot:has(> .it.r2), .u2doll .slot:has(> .it.r3), .u2doll .slot:has(> .it.r4), .u2doll .slot:has(> .it.r5) {
  border-color: color-mix(in srgb, var(--qc2, #8a7a50) 80%, #000) !important;
}
.u2doll .slot:has(> .it.r1) { --qc2: #4f9bff; } .u2doll .slot:has(> .it.r2) { --qc2: #ff9a3c; }
.u2doll .slot:has(> .it.r3) { --qc2: #c46bff; } .u2doll .slot:has(> .it.r4) { --qc2: #ffcc33; } .u2doll .slot:has(> .it.r5) { --qc2: #a8f0ff; }
/* tia sang chay quanh vien */
.u2doll .slot > .it.r1::before, .u2doll .slot > .it.r2::before, .u2doll .slot > .it.r3::before, .u2doll .slot > .it.r4::before, .u2doll .slot > .it.r5::before,
#inv .it.r3::before, #inv .it.r4::before, #inv .it.r5::before {
  content: ""; position: absolute; inset: 0; padding: 3px; border-radius: 2px; filter: drop-shadow(0 0 3px var(--qc)) brightness(1.2); pointer-events: none; z-index: 3; opacity: 1;
  background: conic-gradient(from var(--vlrot), transparent 0 45%, color-mix(in srgb, var(--qc) 40%, transparent) 65%, var(--qc) 84%, #fff 92%, #fff 96%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  animation: vlRot var(--qd, 3.2s) linear infinite;
}
/* Hoang Kim / Bach Kim: hai tia nguoc nhau */
.u2doll .slot > .it.r4::before, .u2doll .slot > .it.r5::before, #inv .it.r4::before, #inv .it.r5::before {
  background: conic-gradient(from var(--vlrot), transparent 0 18%, var(--qc) 38%, #fff 45%, #fff 47%, transparent 50% 68%, var(--qc) 88%, #fff 95%, #fff 97%, transparent 100%);
}
/* vien mau pham chat + hao quang tho phia trong */
.u2doll .slot > .it.r1::after, .u2doll .slot > .it.r2::after, .u2doll .slot > .it.r3::after, .u2doll .slot > .it.r4::after, .u2doll .slot > .it.r5::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2; border: 1px solid var(--qc);
  box-shadow: inset 0 0 10px color-mix(in srgb, var(--qc) 55%, transparent), 0 0 7px color-mix(in srgb, var(--qc) 60%, transparent);
  animation: vlBreath 2.4s ease-in-out infinite;
}
.u2doll .slot > .it.r1::after, .u2doll .slot > .it.r2::after { animation: none; opacity: .75; }
@media (prefers-reduced-motion: reduce) {
  .u2doll .slot > .it::before, #inv .it::before, .u2doll .slot > .it::after { animation: none !important; }
}
/* bang Danh hieu: hinh tam bien */
#mBody .qrow img.dhimg { height: 32px; width: auto !important; max-width: 100%; vertical-align: middle; display: block; margin: 0 0 2px; }
#mBody .qrow img.dhimg.lock { filter: grayscale(1) brightness(.8); opacity: .75; }

/* ===== 4 o nho: Mat na / Phi phong / An / Trang suc ===== */
.u2doll .slot[data-slot="mask"], .u2doll .slot[data-slot="cape"], .u2doll .slot[data-slot="seal"], .u2doll .slot[data-slot="ornament"] { overflow: visible; }
.u2doll .slot[data-slot="mask"] > span, .u2doll .slot[data-slot="cape"] > span, .u2doll .slot[data-slot="seal"] > span, .u2doll .slot[data-slot="ornament"] > span { font-size: 8px; line-height: 9px; letter-spacing: -.2px; }
.u2doll .slot[data-slot="mask"] .it img, .u2doll .slot[data-slot="cape"] .it img, .u2doll .slot[data-slot="seal"] .it img, .u2doll .slot[data-slot="ornament"] .it img { width: 86%; height: 86%; object-fit: contain; }
.u2doll .slot[data-slot="mask"] .it i, .u2doll .slot[data-slot="cape"] .it i, .u2doll .slot[data-slot="seal"] .it i, .u2doll .slot[data-slot="ornament"] .it i { font-size: 8px; line-height: 8px; right: 1px; bottom: 1px; z-index: 4; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.u2doll .slot[data-slot="mask"] .it b.s5, .u2doll .slot[data-slot="cape"] .it b.s5, .u2doll .slot[data-slot="seal"] .it b.s5, .u2doll .slot[data-slot="ornament"] .it b.s5 { width: 5px; height: 5px; left: 2px; bottom: 2px; z-index: 4; }

/* ===== Do moi (Mat na / Phi phong / An / Trang suc): vien sang rieng theo bac do (khong theo pham chat) ===== */
.it:has(> img[src*="/eqx_"][src$="_1.svg"]) { --qc: #e0a45a !important; --qd: 3.6s !important; }
.it:has(> img[src*="/eqx_"][src$="_2.svg"]) { --qc: #8fd0ff !important; --qd: 3.2s !important; }
.it:has(> img[src*="/eqx_"][src$="_3.svg"]) { --qc: #5ff0b0 !important; --qd: 2.9s !important; }
.it:has(> img[src*="/eqx_"][src$="_4.svg"]) { --qc: #e07bff !important; --qd: 2.6s !important; }
.it:has(> img[src*="/eqx_"][src$="_5.svg"]) { --qc: #ffcc33 !important; --qd: 2.2s !important; }
.it:has(> img[src*="/eqx_"]) { position: relative; border-color: var(--qc) !important; box-shadow: inset 0 0 10px color-mix(in srgb, var(--qc) 50%, transparent), 0 0 6px color-mix(in srgb, var(--qc) 55%, transparent) !important; }
.it:has(> img[src*="/eqx_"])::before, .u2doll .slot > .it:has(> img[src*="/eqx_"])::before {
  content: ""; position: absolute; inset: 0; padding: 3px; border-radius: 2px; pointer-events: none; z-index: 3; opacity: 1;
  filter: drop-shadow(0 0 3px var(--qc)) brightness(1.25);
  background: conic-gradient(from var(--vlrot), transparent 0 18%, var(--qc) 38%, #fff 45%, #fff 47%, transparent 50% 68%, var(--qc) 88%, #fff 95%, #fff 97%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  animation: vlRot var(--qd, 2.6s) linear infinite;
}
.it:has(> img[src*="/eqx_"])::after, .u2doll .slot > .it:has(> img[src*="/eqx_"])::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2; border: 1px solid var(--qc); opacity: 1;
  box-shadow: inset 0 0 12px color-mix(in srgb, var(--qc) 60%, transparent), 0 0 8px color-mix(in srgb, var(--qc) 65%, transparent);
  animation: vlBreath 2.2s ease-in-out infinite;
}
.u2doll .slot:has(> .it:has(> img[src*="/eqx_"])) { border-color: color-mix(in srgb, var(--qc2, #8a7a50) 80%, #000) !important; }
.u2doll .slot:has(> .it > img[src*="/eqx_"][src$="_1.svg"]) { --qc2: #e0a45a; }
.u2doll .slot:has(> .it > img[src*="/eqx_"][src$="_2.svg"]) { --qc2: #8fd0ff; }
.u2doll .slot:has(> .it > img[src*="/eqx_"][src$="_3.svg"]) { --qc2: #5ff0b0; }
.u2doll .slot:has(> .it > img[src*="/eqx_"][src$="_4.svg"]) { --qc2: #e07bff; }
.u2doll .slot:has(> .it > img[src*="/eqx_"][src$="_5.svg"]) { --qc2: #ffcc33; }
@media (prefers-reduced-motion: reduce) { .it:has(> img[src*="/eqx_"])::before, .it:has(> img[src*="/eqx_"])::after { animation: none !important; } }

/* === KY TRAN CAC v3 (11/2026): tab + mon do admin them tu may chu, bang chi tiet (bam vao the), nhieu tab cuon duoc === */
#modal.u2ktc .u2cat { overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
#modal.u2ktc .u2cat::-webkit-scrollbar { display: none; }
#modal.u2ktc .u2cat button span { overflow: hidden; text-overflow: ellipsis; }
#modal.u2ktc .u2cards .kxempty { grid-column: 1 / -1; text-align: center; padding: 30px 0; }
#modal.u2ktc .u2card.kxc { cursor: pointer; display: flex; flex-direction: column; }
#modal.u2ktc .u2card.kxc .u2cb { flex: 1; }
#modal.u2ktc .u2card.kxc:hover { border-color: #c9a052; }
#modal.u2ktc .u2card .u2ct { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#modal.u2ktc .u2cb small { -webkit-line-clamp: 2; line-height: 1.3; word-break: break-word; }
#modal.u2ktc .u2cf .kxinfo { flex: 0 0 26px; padding: 0; font-size: 13px; }
/* .gold cua game la display:flex -> "Gia:" va so tien bi tach 2 dong (loi cu cua Ky Tran Cac) */
#modal.u2ktc b.gold { display: inline !important; }
/* ten dai (Hoang Kim) khong duoc day cot luoi rong ra -> tran ngang */
#modal.u2ktc .u2cards > .u2card { min-width: 0; }
/* man rat hep (320-380px): bo nut i (bam vao the van mo chi tiet), nut xuong dong neu thieu cho */
@media (max-width: 380px) { #modal.u2ktc .u2cf .kxinfo { display: none; } #modal.u2ktc .u2cf { flex-wrap: wrap; } #modal.u2ktc .u2cf .u2buy { min-width: 0; } }
.kxic { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; box-sizing: border-box; border: 1px solid #4e4c3c; background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.08), #000 72%); border-radius: 3px; }
.kxic img { width: 32px !important; height: 32px !important; border: 0 !important; background: none !important; object-fit: contain; image-rendering: auto; }
.kxic.q1 { border-color: #6aa8ff; box-shadow: 0 0 5px rgba(106, 168, 255, 0.45); }
.kxic.q2 { border-color: #b4a77a; }
.kxic.q3 { border-color: #c77bff; box-shadow: 0 0 6px rgba(199, 123, 255, 0.55); }
.kxic.q4 { border-color: #ffcc00; box-shadow: 0 0 7px rgba(255, 204, 0, 0.6); }
.kxic.q5 { border-color: #9fe8ff; box-shadow: 0 0 7px rgba(159, 232, 255, 0.6); }
.kxic.q4::after, .kxic.q5::after, .kxic.kxeqx::after {
  content: ""; position: absolute; inset: -1px; border-radius: 3px; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 35%, rgba(255, 250, 220, 0.55) 50%, rgba(255, 255, 255, 0) 65%) -60px 0 / 200% 100% no-repeat;
  animation: kxShine 2.8s linear infinite;
}
.kxic.kxeqx { border-color: #e0a45a; }
@keyframes kxShine { 0% { background-position: -60px 0; } 60%, 100% { background-position: 80px 0; } }
.kxtag { display: inline-block; margin-right: 4px; padding: 0 4px; border-radius: 3px; font: 700 9px/14px Tahoma, sans-serif; font-style: normal; color: #fff; vertical-align: 1px; text-shadow: 0 1px 1px #000; }
.kxtag.kx-hot { background: linear-gradient(#ff5a3c, #b0200c); animation: kxPulse 1.6s ease-in-out infinite; }
.kxtag.kx-new { background: linear-gradient(#4fd06a, #1d7a32); }
.kxtag.kx-sale { background: linear-gradient(#ffb43c, #b06a0c); }
.kxtag.kx-limit { background: linear-gradient(#b07bff, #5a2aa8); }
@keyframes kxPulse { 50% { filter: brightness(1.35); } }
/* bang chi tiet */
html body #modal.u2ktc.kxdm .mbox { width: min(94vw, 460px) !important; max-width: 94vw !important; max-height: calc(100vh - 40px); overflow-y: auto !important; overflow-x: hidden !important; }
#modal.kxdm .kxdet { display: flex; flex-direction: column; gap: 8px; padding-bottom: 22px; } /* chua cho hoa van day khung */
#modal.kxdm .kxhead { display: flex; gap: 10px; align-items: center; }
#modal.kxdm .kxic.big { width: 52px; height: 52px; }
#modal.kxdm .kxic.big img { width: 46px !important; height: 46px !important; }
#modal.kxdm .kxname { display: block; font-size: 15px; color: #ffe08a; margin-bottom: 3px; }
#modal.kxdm .kxdesc { margin: 0; line-height: 1.45; white-space: normal; word-break: break-word; }
#modal.kxdm .kxpv { display: flex; flex-direction: column; align-items: center; gap: 4px; }
#modal.kxdm .kxpv .vp-card { max-width: 100%; }
#modal.kxdm .kxnote { font-size: 11.5px; color: #8fd0ff; text-align: center; }
#modal.kxdm .kxlim { display: flex; flex-wrap: wrap; gap: 5px; }
#modal.kxdm .kxlim span { padding: 2px 7px; border: 1px solid #5b5236; border-radius: 10px; background: rgba(0, 0, 0, 0.35); font-size: 11.5px; color: #e9d9ad; }
#modal.kxdm .kxqty { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#modal.kxdm .kxqty .u2buy { flex: 0 0 32px; height: 30px; font-size: 15px; }
#modal.kxdm .kxqty #kxQn { min-width: 26px; text-align: center; font-size: 15px; }
#modal.kxdm .kxqty > span:last-child { margin-left: auto; }
#modal.kxdm .kxwhy { margin: 0; }
#modal.kxdm .kxbtns { display: flex; gap: 8px; }
#modal.kxdm .kxbtns .btn { flex: 1; min-height: 36px; }
@media (max-width: 899px), (orientation: portrait) {
  #modal.u2ktc .u2cat { overflow-x: auto; overflow-y: hidden; }
  #modal.u2ktc .u2cat.many button { flex: 0 0 76px !important; }
  #modal.u2ktc .u2cat button span { max-width: 100%; }
}

/* === EP DO MOI (Lo Ep Do · the "Ep do moi"): chon loai / cap, xem truoc, nguyen lieu — PC + mobile === */
.exf { display: flex; flex-direction: column; gap: 10px; }
.exk { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.exkb { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px; border: 1px solid #5b5236; border-radius: 7px; background: linear-gradient(180deg, rgba(255, 236, 190, .08), rgba(0, 0, 0, .3)); color: #f1e2b6; cursor: pointer; font: 700 12px/1.2 var(--font, Tahoma), sans-serif; }
.exkb:hover { border-color: #c9a052; }
.exkb.on { border-color: #ffe08a; background: linear-gradient(180deg, #5a4318, #2a1c08); box-shadow: 0 0 8px rgba(255, 200, 80, .45); color: #ffe7a0; }
.exic { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid #4e4c3c; border-radius: 4px; background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .08), #000 72%); }
.exic img { width: 34px; height: 34px; object-fit: contain; }
.exic.big { width: 58px; height: 58px; flex: none; }
.exic.big img { width: 52px; height: 52px; }
.exl { display: flex; flex-wrap: wrap; gap: 5px; }
.exlb { min-width: 34px; height: 30px; padding: 0 6px; border: 1px solid #5b5236; border-radius: 6px; background: #120e08; color: #e8d8b0; font-weight: 700; cursor: pointer; }
.exlb.t1 { color: #e0a45a; } .exlb.t2 { color: #8fd0ff; } .exlb.t3 { color: #5ff0b0; } .exlb.t4 { color: #e07bff; } .exlb.t5 { color: #ffcc33; }
.exlb.on { border-color: currentColor; background: #2a2010; box-shadow: 0 0 7px currentColor; }
.exbody { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 10px; }
.expv { display: flex; gap: 10px; padding: 8px; border: 1px solid #4a4230; border-radius: 8px; background: rgba(0, 0, 0, .3); }
.expv > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.exname { font-size: 14px; }
.exname.t1 { color: #e0a45a; } .exname.t2 { color: #8fd0ff; } .exname.t3 { color: #5ff0b0; } .exname.t4 { color: #e07bff; } .exname.t5 { color: #ffcc33; text-shadow: 0 0 6px rgba(255, 204, 51, .5); }
.exbase { margin: 4px 0 2px; padding-left: 16px; font-size: 12px; color: #d8e8ff; }
.exnote { color: #8fd0ff; font-size: 11.5px; }
.exneed { display: flex; flex-direction: column; gap: 5px; padding: 8px; border: 1px solid #4a4230; border-radius: 8px; background: rgba(0, 0, 0, .3); }
.exn { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.exn img { width: 20px; height: 20px; object-fit: contain; }
.exerr { margin: 0; }
#exGo { width: 100%; min-height: 38px; }
@media (max-width: 899px), (orientation: portrait) {
  .exbody { grid-template-columns: minmax(0, 1fr); }
  .exk { gap: 4px; }
  .exkb { font-size: 11px; padding: 5px 2px; }
  .exl { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .exlb { min-width: 0; padding: 0 2px; }
}

#modal.epm .mbox { overflow-x: hidden !important; }

/* === VO LAM LIEN DAU + VAN TIEU (the Hoat dong): the dau si, thanh mau, so bay, bang — PC + mobile === */
.ldw { display: flex; flex-direction: column; gap: 9px; }
.ldtop { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ldtop b { color: #ffe08a; font-size: 14px; }
.ldtop small { color: #c9b98a; }
.ldmode { display: flex; gap: 6px; }
.ldmode button { flex: 1; min-height: 34px; border: 1px solid #5b5236; border-radius: 7px; background: linear-gradient(180deg, rgba(255, 236, 190, .08), rgba(0, 0, 0, .3)); color: #f1e2b6; font-weight: 700; cursor: pointer; }
.ldmode button.on { border-color: #ffe08a; background: linear-gradient(180deg, #6a4e18, #2a1c08); color: #ffe7a0; box-shadow: 0 0 8px rgba(255, 200, 80, .4); }
.ldwin { padding: 7px 10px; border: 1px solid #5a3a2a; border-radius: 8px; background: rgba(60, 20, 10, .35); display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.ldwin b { color: #ffe08a; font-size: 13px; }
.ldwin small { color: #c9b98a; }
.ldwin span { flex-basis: 100%; color: #f0a07a; font-size: 12.5px; }
.ldwin.on { border-color: #3f6a35; background: rgba(20, 60, 20, .35); }
.ldwin.on span { color: #8fe38a; }
.ldq { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #6a5a2a; border-radius: 8px; background: rgba(60, 50, 10, .35); }
.ldq > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ldq b { color: #ffe08a; }
.ldq small { color: #c9b98a; }
.ldspin { width: 18px; height: 18px; flex: none; border: 2px solid #6a5a2a; border-top-color: #ffe08a; border-radius: 50%; animation: ldspin 1s linear infinite; }
@keyframes ldspin { to { transform: rotate(360deg); } }
.ldf.me { box-shadow: 0 0 0 2px #ffe08a inset; }
.ldme { padding: 8px 10px; border: 1px solid #4a4230; border-radius: 8px; background: rgba(0, 0, 0, .3); display: flex; flex-direction: column; gap: 5px; }
.ldstat { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; }
.ldstat b { color: #ffe08a; }
#ldGo { width: 100%; min-height: 40px; font-size: 14px; }
.ldarena { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; padding: 8px; border: 1px solid #5b4a26; border-radius: 9px; background: radial-gradient(ellipse at 50% 0%, rgba(255, 200, 90, .12), rgba(0, 0, 0, .45)); }
.ldside { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ldvs { font: 900 18px/1 var(--font, Tahoma), sans-serif; color: #ffcf5a; text-shadow: 0 0 8px rgba(255, 180, 60, .8); }
.ldf { position: relative; padding: 6px 8px; border: 1px solid #4e4630; border-radius: 7px; background: rgba(10, 8, 4, .7); min-width: 0; transition: opacity .3s, filter .3s; }
.ldf.s0 { border-color: #3f6b8a; } .ldf.s1 { border-color: #8a4a3f; }
.ldf.dead { opacity: .45; filter: grayscale(.8); }
.ldfn { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ldf small { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ldbot { font-size: 10px; font-style: normal; color: #9aa; border: 1px solid #556; border-radius: 3px; padding: 0 3px; }
.ldhp { position: relative; height: 13px; margin: 4px 0 2px; border: 1px solid #000; border-radius: 3px; background: #2a0d0d; overflow: hidden; }
.ldhp i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(180deg, #6fe07a, #2a9a3a); transition: width .18s linear; }
.ldf.s1 .ldhp i { background: linear-gradient(180deg, #ff8a6a, #b8321e); }
.ldhp b { position: relative; display: block; text-align: center; font-size: 10px; line-height: 12px; color: #fff; text-shadow: 0 1px 1px #000; }
.ldfly { position: absolute; top: 18px; font-weight: 800; font-size: 13px; color: #ffd0a0; text-shadow: 0 1px 2px #000; pointer-events: none; animation: ldFly .9s ease-out forwards; }
.ldfly.crit { color: #ffef5a; font-size: 16px; }
@keyframes ldFly { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-26px); opacity: 0; } }
.ldres { text-align: center; font-size: 13px; }
.ldres b { font-size: 20px; letter-spacing: 2px; margin-right: 6px; }
.ldtbl { max-height: 320px; overflow: auto; border: 1px solid #4a4230; border-radius: 8px; }
.ldtbl table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ldtbl th, .ldtbl td { padding: 5px 7px; border-bottom: 1px solid rgba(255, 220, 140, .1); text-align: left; }
.ldtbl th { position: sticky; top: 0; background: #1d160b; color: #e7c26a; }
.ldtbl tr.me td { background: rgba(255, 210, 90, .12); }
@media (max-width: 899px), (orientation: portrait) {
  .ldarena { grid-template-columns: minmax(0, 1fr); }
  .ldvs { text-align: center; font-size: 15px; }
  .ldtbl { max-height: 260px; }
}
.vtst { color: #ffcf3a; letter-spacing: 1px; text-shadow: 0 0 5px rgba(255, 190, 40, .6); }
.vtst i { font-style: normal; color: #4a4030; text-shadow: none; }
.vtmy { padding: 8px 10px; border: 1px solid #5b4a26; border-radius: 9px; background: radial-gradient(ellipse at 50% 0%, rgba(255, 200, 90, .12), rgba(0, 0, 0, .4)); display: flex; flex-direction: column; gap: 6px; }
.vth { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.vtroad { position: relative; height: 26px; margin: 4px 0 2px; border-radius: 13px; background: repeating-linear-gradient(90deg, #3a2c14 0 14px, #2b2010 14px 28px); border: 1px solid #6b5426; overflow: visible; }
.vtfill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 13px; background: linear-gradient(90deg, rgba(255, 200, 80, .15), rgba(255, 200, 80, .4)); transition: width 1s linear; }
.vtcart { position: absolute; top: -3px; transform: translateX(-50%) scaleX(-1); font-size: 22px; line-height: 30px; transition: left 1s linear; filter: drop-shadow(0 2px 2px #000); }
.vtcity { position: absolute; top: 28px; font-size: 10px; color: #b8a878; }
.vtcity.a { left: 2px; } .vtcity.b { right: 2px; }
.vtmy .vtroad { margin-bottom: 14px; }
.vtpv { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.vtpc { display: flex; flex-direction: column; align-items: center; padding: 5px 2px; border: 1px solid #4a4230; border-radius: 6px; background: rgba(0, 0, 0, .3); font-size: 11px; text-align: center; }
.vtpc .vtst { font-size: 10px; letter-spacing: 0; }
.vtpc b { color: #ffe08a; font-size: 12px; }
#vtStart { width: 100%; min-height: 38px; }
.vtlist { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow: auto; }
.vtrow { display: flex; align-items: center; gap: 8px; padding: 6px 8px 14px; border: 1px solid #4a4230; border-radius: 8px; background: rgba(0, 0, 0, .3); }
.vtrow.safe { opacity: .7; }
.vtw { flex: 1; min-width: 0; }
.vtw .vtroad { height: 14px; margin-top: 5px; }
.vtw .vtcart { font-size: 15px; line-height: 18px; top: -3px; }
.vtw .vtcity { display: none; }
.vtrow .btn { flex: none; min-width: 60px; }
.vthist summary { cursor: pointer; color: #e7c26a; font-size: 12.5px; }
@media (max-width: 899px), (orientation: portrait) {
  .vtpv { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; }
  .vtpc small { font-size: 9.5px; }
}

/* .gold cua game la display:flex -> so tien tach dong trong Lien Dau / Van Tieu / Ep do */
#modal.ldm b.gold, #modal.epm b.gold, .rtk-lobby b.gold { display: inline !important; }

.rtk-sched { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 8px 0; font-size: 12.5px; }
.rtk-sched span { padding: 1px 7px; border: 1px solid #5b5236; border-radius: 10px; color: #e8d8b0; }
.rtk-sched span.on { border-color: #ffd24a; color: #ffd24a; box-shadow: 0 0 6px rgba(255, 210, 74, .45); }
#modal .mbox:has(.rtk-lobby) { overflow-x: hidden !important; }

/* ---- Tong Kim online: HUD tran (diem 2 phe, dong ho, thuoc, bang diem) + bang Top ha dich ---- */
#tkHud { position: absolute; z-index: 9; top: 62px; left: 50%; transform: translateX(-50%); width: min(320px, calc(100vw - 24px)); box-sizing: border-box; padding: 6px 10px 7px; border: 1px solid #6b5a33; border-radius: 8px; background: linear-gradient(rgba(30, 26, 18, .92), rgba(16, 14, 10, .92)); box-shadow: 0 4px 14px rgba(0, 0, 0, .5); color: #e8dcc0; font-size: 12px; }
#tkHud .tk-hud-head { display: flex; align-items: center; gap: 8px; }
#tkHud .tkbar { flex: 1; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; white-space: nowrap; }
#tkHud .tk-clock { color: #ffe08a; font-weight: 700; font-variant-numeric: tabular-nums; }
#tkHud .tk-hud-toggle { flex: none; width: 24px; height: 22px; padding: 0; border: 1px solid #6b5a33; border-radius: 4px; background: rgba(0, 0, 0, .3); color: #e8dcc0; cursor: pointer; }
#tkHud #tkHudDetails { display: none; margin-top: 6px; }
#tkHud.tk-expanded #tkHudDetails { display: block; }
#tkHud .tkmeter { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: #222; }
#tkHud .tkmeter i { display: block; height: 100%; }
#tkHud .tkme { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px; }
#tkHud .tkme img { width: 18px; height: 18px; object-fit: contain; }
#tkHud .tkbtn { margin-left: auto; display: flex; gap: 4px; }
#tkHud .tkbtn .btn { padding: 2px 7px; min-height: 0; }
#tkFocusToggle { display: none; }
#tkKb { position: absolute; z-index: 9; left: 44px; top: 62px; width: 214px; box-sizing: border-box; border: 1px solid #6b5a33; border-radius: 8px; background: linear-gradient(rgba(30, 26, 18, .92), rgba(16, 14, 10, .92)); box-shadow: 0 4px 14px rgba(0, 0, 0, .5); color: #e8dcc0; font-size: 12px; }
#tkKb:not(.open) { width: auto; }
#tkKb .tkkb-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 5px 9px; border: 0; background: none; color: #ffe08a; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
#tkKb ol { margin: 0; padding: 0 6px 6px; list-style: none; }
#tkKb li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 2px 4px; border-radius: 4px; }
#tkKb li i { font-style: normal; text-align: center; color: #c9b98a; }
#tkKb li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tkKb li b { color: #ffd76a; font-variant-numeric: tabular-nums; }
#tkKb li.me { background: rgba(255, 224, 138, .16); outline: 1px solid rgba(255, 224, 138, .4); }
#tkKb li.dim span { color: #9a8f74; }
body.mob #tkHud { top: 104px; left: 8px; transform: none; width: calc(100vw - 100px); padding: 5px 8px 6px; font-size: 11.5px; }   /* chua cho ban do nho ben phai */
body.mob #tkKb { left: 8px; top: 146px; width: 190px; font-size: 11.5px; }
body.mob #tkKb:not(.open) { width: auto; }
body.mob #tkHud.tk-expanded ~ #tkKb { top: 190px; }

/* ---- Auto PK ---- */
#tkHud .tkapk { margin-top: 5px; padding: 3px 6px; border-radius: 4px; background: rgba(120, 200, 120, .12); color: #9fe39a; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tkHud .tkbtn .btn.on { border-color: #8fe38a; color: #b8ffb0; box-shadow: 0 0 6px rgba(143, 227, 138, .5); }
#apkBtn.on { color: #9fe39a; border-color: #6fb86a; }
.apk h3 { margin: 0 0 4px; }
.apk .apk-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid rgba(255, 255, 255, .06); }
.apk .apk-row span { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.apk .apk-row small { color: #9a8f74; font-size: 11px; }
.apk .apk-row select { max-width: 52%; }
.apk .apk-row input[type="checkbox"] { order: 2; flex: none; width: 18px; height: 18px; }
body.mob .apk .apk-row { flex-wrap: wrap; }
body.mob .apk .apk-row select { max-width: 100%; width: 100%; }

/* the Vo cong: dong dem bi kip dai (90/150) tu xuong dong, nut Goi y / Tay Tuy giu 1 dong */
.u2foot .btn{white-space:nowrap;flex:none}
.u2foot>span.dim{min-width:0}

/* =====================================================================================================
   CUA SO HOAT DONG v3 (11/2026): khung kiem hiep dung chung cho moi tab (Pho ban, Tong Kim, Lien Dau, Van Tieu,
   Di thuyen, Thap, Boss tuan, Boss TG, Ma truong, Dong hanh)
   - khung CO DINH kich thuoc (truoc: moi tab cao thap khac nhau -> cua so nhay khi doi tab)
   - nen go son mai am, sang hon; vien vang + goc hoa van chu L; tieu de / tab dinh tren khi cuon
   - phan dang chon (tab, nut loc, chip) phat sang vang de nhan biet
   ===================================================================================================== */
#modal:has(#actTabs) .mbox {
  width: 700px !important;
  max-width: calc(100vw - 16px) !important;
  height: min(840px, calc(100dvh - 20px)) !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 0 12px 14px !important;
  border: 1px solid #d4ad57 !important;
  border-radius: 12px !important;
  color: #f0e4c8;
  background:
    linear-gradient(#f0cc6a, #f0cc6a) bottom 5px left 5px / 18px 2px no-repeat,
    linear-gradient(#f0cc6a, #f0cc6a) bottom 5px left 5px / 2px 18px no-repeat,
    linear-gradient(#f0cc6a, #f0cc6a) bottom 5px right 5px / 18px 2px no-repeat,
    linear-gradient(#f0cc6a, #f0cc6a) bottom 5px right 5px / 2px 18px no-repeat,
    radial-gradient(ellipse 90% 35% at 50% 0%, rgba(255, 214, 130, 0.16), transparent 70%),
    repeating-linear-gradient(45deg, rgba(255, 222, 150, 0.03) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(-45deg, rgba(255, 222, 150, 0.03) 0 1px, transparent 1px 12px),
    linear-gradient(180deg, #3d2f1a 0%, #2b2113 45%, #1f170d 100%) !important;
  box-shadow: 0 0 0 1px #2a1d08, 0 0 0 4px rgba(201, 162, 78, 0.28), 0 12px 40px rgba(0, 0, 0, 0.85), 0 0 26px rgba(255, 190, 80, 0.16) !important;
  scrollbar-width: thin;
  scrollbar-color: #a8843e #1a140b;
}
/* nut dong: dinh goc phai khi cuon */
#modal:has(#actTabs) #mClose {
  position: sticky !important;
  display: block;
  top: 8px !important;
  right: auto !important;
  margin: 8px -4px -32px auto !important;
  z-index: 6;
  width: 24px !important;
  height: 24px !important;
  border: 1.5px solid #f0cc6a !important;
  background: radial-gradient(circle at 40% 35%, #7a5a24, #2a1c08) !important;
  color: #ffe9a8 !important;
  box-shadow: 0 0 8px rgba(255, 200, 80, 0.5) !important;
}
#modal:has(#actTabs) #mClose:hover { background: radial-gradient(circle at 40% 35%, #b0802c, #4a300c) !important; color: #fff !important; }
/* tieu de: bang vang co goc hoa van, dinh tren cung */
#modal:has(#actTabs) #mBody > h3 {
  position: sticky;
  top: 0;
  z-index: 4;
  box-sizing: border-box;
  height: 40px;
  margin: 0 -12px !important;
  padding: 0 44px !important;
  display: flex !important;
  align-items: center;
  justify-content: center !important;
  gap: 10px;
  font-size: 17px !important;
  letter-spacing: 2px;
  color: #ffe9a8 !important;
  text-shadow: 0 0 10px rgba(255, 200, 90, 0.7), 0 1px 0 #000;
  border: 0 !important;
  border-bottom: 1px solid #d4ad57 !important;
  border-radius: 11px 11px 0 0;
  background:
    linear-gradient(#f0cc6a, #f0cc6a) top 5px left 5px / 18px 2px no-repeat,
    linear-gradient(#f0cc6a, #f0cc6a) top 5px left 5px / 2px 18px no-repeat,
    linear-gradient(#f0cc6a, #f0cc6a) top 5px right 5px / 18px 2px no-repeat,
    linear-gradient(#f0cc6a, #f0cc6a) top 5px right 5px / 2px 18px no-repeat,
    radial-gradient(ellipse 50% 120% at 50% 0%, rgba(255, 220, 140, 0.28), transparent 70%),
    linear-gradient(180deg, #5c4420, #3a2a12 60%, #2c2010) !important;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.5), 0 2px 14px rgba(255, 190, 80, 0.18);
}
#modal:has(#actTabs) #mBody > h3::before,
#modal:has(#actTabs) #mBody > h3::after { content: "\2756"; color: #e6c06a; font-size: 12px; text-shadow: 0 0 6px rgba(255, 200, 80, 0.8); letter-spacing: 0; }
#modal:has(#actTabs) #mBody > h3 small {
  order: 3;
  font-size: 11.5px !important;
  letter-spacing: 0;
  color: #ffd24a !important;
  padding: 2px 9px;
  border: 1px solid #8a6d32;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  text-shadow: none;
  white-space: nowrap;
}
#modal:has(#actTabs) #mBody > h3::after { order: 4; }
/* hang tab: luoi deu 5 cot, dinh duoi tieu de; tab dang chon = the vang phat sang */
#modal:has(#actTabs) #actTabs {
  position: sticky;
  top: 40px;
  z-index: 3;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px !important;
  margin: 0 -12px 10px !important;
  padding: 8px 12px !important;
  border: 0 !important;
  border-bottom: 1px solid #6e5528 !important;
  background: linear-gradient(180deg, #2e2314, #221a0f) !important;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.45) !important;
}
#modal:has(#actTabs) #actTabs button {
  min-width: 0;
  min-height: 30px;
  padding: 3px 4px !important;
  border: 1px solid #7a5f2c !important;
  border-radius: 6px !important;
  background: linear-gradient(180deg, #45361c, #271d0e) !important;
  color: #ead6a2 !important;
  font-size: 12.5px !important;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 1px #000 !important;
  box-shadow: inset 0 1px 0 rgba(255, 230, 160, 0.12) !important;
  filter: none !important;
  transition: box-shadow 0.15s, border-color 0.15s, color 0.15s;
}
#modal:has(#actTabs) #actTabs button:hover { border-color: #e6c06a !important; color: #fff3c4 !important; box-shadow: 0 0 8px rgba(255, 200, 80, 0.4) !important; }
#modal:has(#actTabs) #actTabs button.on {
  background: linear-gradient(180deg, #fff0b0 0%, #f2c650 45%, #b8821c 100%) !important;
  border-color: #fff3c4 !important;
  color: #2a1804 !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) !important;
  box-shadow: 0 0 12px rgba(255, 200, 80, 0.85), 0 0 2px #fff6d0, inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
}
/* phan than: chu sang hon, khoi / nut / tieu muc theo bo vang dong */
#modal:has(#actTabs) #mBody { color: #f0e4c8; }
#modal:has(#actTabs) #mBody .dim { color: #bba984 !important; }
#modal:has(#actTabs) #mBody > .desc {
  margin: 0 0 10px !important;
  padding: 8px 11px !important;
  border: 1px solid #5a4622;
  border-left: 3px solid #e0b45a;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255, 215, 140, 0.12), rgba(255, 215, 140, 0.03)) !important;
  color: #ecdeb8 !important;
  line-height: 1.55;
}
#modal:has(#actTabs) #mBody .card {
  border: 1px solid #8a6d32 !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, rgba(64, 49, 26, 0.92), rgba(33, 26, 16, 0.95)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 230, 160, 0.12), 0 2px 8px rgba(0, 0, 0, 0.45) !important;
  color: #f0e4c8;
}
#modal:has(#actTabs) #mBody .card.lock { opacity: 0.6; filter: grayscale(0.4); }
#modal:has(#actTabs) #mBody h4 { color: #ffe2a0 !important; text-shadow: 0 0 6px rgba(255, 190, 80, 0.35); }
#modal:has(#actTabs) #mBody .btn {
  border: 1px solid #b08a3e !important;
  border-radius: 6px !important;
  background: linear-gradient(180deg, #5e4821, #3b2c13 55%, #2a1f0d) !important;
  color: #ffeab0 !important;
  text-shadow: 0 1px 0 #000;
  box-shadow: inset 0 1px 0 rgba(255, 235, 170, 0.18) !important;
}
#modal:has(#actTabs) #mBody .btn:hover:not(:disabled) { border-color: #ffd56a !important; color: #fff !important; box-shadow: 0 0 10px rgba(255, 200, 80, 0.55), inset 0 1px 0 rgba(255, 235, 170, 0.25) !important; }
#modal:has(#actTabs) #mBody .btn.on {
  background: linear-gradient(180deg, #fff0b0 0%, #f2c650 45%, #b8821c 100%) !important;
  border-color: #fff3c4 !important;
  color: #2a1804 !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 12px rgba(255, 200, 80, 0.8) !important;
}
#modal:has(#actTabs) #mBody .btn:disabled { opacity: 0.45; filter: grayscale(0.5); box-shadow: none !important; }
/* tab con (Lien Dau / Van Tieu ...): cung bo vang, tab dang chon sang */
#modal:has(#actTabs) #mBody .dtabs:not(#actTabs) { gap: 4px !important; border: 0 !important; box-shadow: none !important; background: transparent !important; }
#modal:has(#actTabs) #mBody .dtabs:not(#actTabs) button {
  border: 1px solid #7a5f2c !important;
  border-radius: 6px !important;
  background: linear-gradient(180deg, #45361c, #271d0e) !important;
  color: #ead6a2 !important;
  box-shadow: none !important;
}
#modal:has(#actTabs) #mBody .dtabs:not(#actTabs) button.on {
  background: linear-gradient(180deg, #7a5a1e, #4a3410) !important;
  border-color: #ffd56a !important;
  color: #fff3c4 !important;
  box-shadow: 0 0 10px rgba(255, 200, 80, 0.6), inset 0 -2px 0 #ffd56a !important;
}
#modal:has(#actTabs) #mBody .chip2 { border-color: #6e5528 !important; background: linear-gradient(180deg, #2c2414, #17120a) !important; color: #e8d9b0 !important; }
#modal:has(#actTabs) #mBody .chip2.on { border-color: #ffd56a !important; background: linear-gradient(180deg, #6b4d16, #3a2808) !important; color: #fff3c4 !important; box-shadow: 0 0 10px rgba(255, 200, 80, 0.6) !important; }
@media (max-width: 560px) {
  #modal:has(#actTabs) .mbox { max-width: calc(100vw - 8px) !important; height: calc(100dvh - 12px) !important; padding: 0 8px 12px !important; }
  #modal:has(#actTabs) #mBody > h3 { margin: 0 -8px !important; font-size: 15px !important; letter-spacing: 1px; padding: 0 38px !important; }
  #modal:has(#actTabs) #mBody > h3::before, #modal:has(#actTabs) #mBody > h3::after { display: none; }
  #modal:has(#actTabs) #actTabs { margin: 0 -8px 8px !important; padding: 6px 8px !important; gap: 4px !important; }
  #modal:has(#actTabs) #actTabs button { font-size: 11px !important; min-height: 32px; padding: 2px !important; }
}

/* ======================= MA TRUONG v2 (.hst): the ngua theo mau bac, nut loc phat sang, bo suu tap ======================= */
.hst { color: #f0e4c8; }
.hst .hst-intro { margin: 0 0 10px; padding: 8px 11px; border: 1px solid #5a4622; border-left: 3px solid #e0b45a; border-radius: 6px;
  background: linear-gradient(90deg, rgba(255, 215, 140, 0.12), rgba(255, 215, 140, 0.03)); color: #ecdeb8; font-size: 12.5px; line-height: 1.55; }
.hst .hst-intro b { color: #ffd56a; }
.hst kbd { padding: 0 5px; border: 1px solid #b08a3e; border-radius: 4px; background: #2a1f0d; color: #ffe9a8; font: inherit; font-size: 11px; }
.hst .hst-h { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px; color: #ffe2a0; font-weight: 700; font-size: 13.5px; letter-spacing: 0.5px; text-shadow: 0 0 8px rgba(255, 190, 80, 0.45); }
.hst .hst-h::before, .hst .hst-h::after { content: ""; flex: 1; height: 1px; min-width: 14px; background: linear-gradient(90deg, transparent, #c9a14a 60%, #ffe7a0); }
.hst .hst-h::after { order: 4; background: linear-gradient(270deg, transparent, #c9a14a 60%, #ffe7a0); }
.hst .hst-h span::before, .hst .hst-h span::after { content: "\25C6"; font-size: 8px; color: #f0cc6a; margin: 0 7px; vertical-align: 2px; }
.hst .hst-h small { order: 3; font-size: 11px; font-weight: 400; color: #ffd24a; padding: 1px 8px; border: 1px solid #6e5528; border-radius: 9px; background: rgba(0, 0, 0, 0.3); text-shadow: none; }
.hst .hst-pic { flex: none; width: 46px; height: 46px; box-sizing: border-box; border-radius: 9px; border: 1px solid var(--hc, #8a6d32);
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--hc, #8a6d32) 34%, #2a2010), #100c07 80%);
  box-shadow: 0 0 9px color-mix(in srgb, var(--hc, #8a6d32) 45%, transparent), inset 0 0 8px rgba(0, 0, 0, 0.6);
  display: grid; place-items: center; overflow: hidden; }
.hst .hst-pic.big { width: 72px; height: 72px; border-width: 2px; border-radius: 12px; }
.hst .hst-pic img { width: 88%; height: 88%; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.7)); }
.hst .hst-pic span { font-size: 22px; color: color-mix(in srgb, var(--hc, #c9a14a) 70%, #fff); opacity: 0.75; }
.hst .hst-pic.big span { font-size: 34px; }
.hst .hst-ri { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.hst .hst-nm { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.hst .hst-nm b { font-size: 14px; text-shadow: 0 0 8px color-mix(in srgb, var(--hc, #e6c06a) 55%, transparent), 0 1px 0 #000; }
.hst .hst-tag { font-size: 10.5px; padding: 0 7px; line-height: 17px; border-radius: 9px; border: 1px solid var(--hc); color: var(--hc);
  background: color-mix(in srgb, var(--hc) 14%, rgba(0, 0, 0, 0.45)); white-space: nowrap; }
.hst .hst-on { font-size: 10.5px; padding: 0 8px; line-height: 17px; border-radius: 9px; color: #2a1804; font-weight: 700;
  background: linear-gradient(180deg, #fff0b0, #e6b440); box-shadow: 0 0 9px rgba(255, 200, 80, 0.85); animation: hstGlow 2.4s ease-in-out infinite; }
.hst .hst-dp { font-size: 10.5px; padding: 0 7px; line-height: 17px; border-radius: 9px; border: 1px dashed #ff9a7a; color: #ffb59a; }
@keyframes hstGlow { 0%, 100% { box-shadow: 0 0 5px rgba(255, 200, 80, 0.6); } 50% { box-shadow: 0 0 13px rgba(255, 210, 100, 1); } }
@media (prefers-reduced-motion: reduce) { .hst .hst-on { animation: none; } }
.hst .hst-sub { font-size: 11.5px; color: #c9b88f; }
.hst .hst-sub b { color: #ffe2a0; }
.hst .hst-stat { font-size: 11.5px; color: #9fd8a8; line-height: 1.45; }
/* ngua dang cuoi */
.hst .hst-ride { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--hc, #c9a14a) 70%, #c9a14a);
  background:
    linear-gradient(#f0cc6a, #f0cc6a) top 4px left 4px / 12px 2px no-repeat,
    linear-gradient(#f0cc6a, #f0cc6a) top 4px left 4px / 2px 12px no-repeat,
    linear-gradient(#f0cc6a, #f0cc6a) bottom 4px right 4px / 12px 2px no-repeat,
    linear-gradient(#f0cc6a, #f0cc6a) bottom 4px right 4px / 2px 12px no-repeat,
    radial-gradient(ellipse 60% 90% at 0% 50%, color-mix(in srgb, var(--hc, #c9a14a) 22%, transparent), transparent 70%),
    linear-gradient(180deg, #3e2f18, #241b0e);
  box-shadow: 0 0 16px color-mix(in srgb, var(--hc, #c9a14a) 28%, transparent), inset 0 1px 0 rgba(255, 230, 160, 0.15); }
.hst .hst-ride.hst-none { --hc: #8a6d32; }
.hst .hst-bar { position: relative; height: 15px; margin: 3px 0; border-radius: 8px; border: 1px solid #6e5528; background: #0e0b07; overflow: hidden; }
.hst .hst-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #a8701a, #ffd56a); box-shadow: 0 0 8px #ffd56a; }
.hst .hst-bar span { position: relative; display: block; text-align: center; font-size: 10.5px; line-height: 13px; color: #fff6d8; text-shadow: 0 1px 1px #000; }
.hst .hst-act { display: flex; gap: 6px; margin-top: 4px; }
.hst .hst-act .btn { flex: 1 1 0 !important; min-width: 0 !important; min-height: 34px !important; height: auto !important; }
.hst .hst-odds { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.hst .hst-odds span { font-size: 11px; padding: 1px 8px; border-radius: 9px; border: 1px solid var(--hc); color: #f0e4c8; background: color-mix(in srgb, var(--hc) 14%, rgba(0, 0, 0, 0.45)); }
.hst .hst-odds b { color: var(--hc); }
/* bo loc */
.hst .hst-filter { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid #5a4622; border-radius: 8px; background: rgba(0, 0, 0, 0.22); }
.hst .hst-chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.hst .hst-chip { font: inherit; font-size: 12px; padding: 4px 11px; min-height: 28px; border-radius: 14px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--hc, #6e5528) 55%, #4a3a1c); color: var(--hc, #e8d9b0);
  background: linear-gradient(180deg, #2f2615, #18130b); transition: box-shadow 0.15s, border-color 0.15s; }
.hst .hst-chip:hover { border-color: var(--hc, #e6c06a); box-shadow: 0 0 7px color-mix(in srgb, var(--hc, #e6c06a) 45%, transparent); }
.hst .hst-chip.on { color: #fff8dc; font-weight: 700; border-color: var(--hc, #ffe08a);
  background: linear-gradient(180deg, color-mix(in srgb, var(--hc, #e6b440) 55%, #5a3e10), color-mix(in srgb, var(--hc, #e6b440) 25%, #2a1c08));
  text-shadow: 0 0 6px var(--hc, #ffd56a), 0 1px 0 #000;
  box-shadow: 0 0 12px color-mix(in srgb, var(--hc, #ffc850) 75%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.hst #hSellDup { margin-left: auto; min-width: 0 !important; height: 28px !important; min-height: 28px !important; }
/* the ngua */
.hst .hst-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; padding: 8px 10px; border-radius: 8px;
  border: 1px solid #4d3c1c; border-left: 3px solid var(--hc);
  background: linear-gradient(90deg, color-mix(in srgb, var(--hc) 13%, #251c10), #19130b 75%);
  transition: border-color 0.15s, box-shadow 0.15s; }
.hst .hst-row:hover { border-color: color-mix(in srgb, var(--hc) 60%, #c9a14a); box-shadow: 0 0 10px color-mix(in srgb, var(--hc) 35%, transparent); }
.hst .hst-row.dup { opacity: 0.85; }
.hst .hst-btns { flex: none; display: grid; grid-template-columns: repeat(2, auto); gap: 5px; justify-content: end; }
.hst .hst-btns .btn { min-width: 64px !important; min-height: 30px !important; height: 30px !important; padding: 0 9px !important; font-size: 12px !important; white-space: nowrap; }
.hst .hst-btns .btn[data-mv] { grid-column: 1 / -1; }
.hst .btn.hb-ride:not(:disabled) { border-color: #e6c06a !important; color: #fff3c4 !important; }
.hst .btn.hb-sell:not(:disabled) { border-color: #a0603a !important; color: #ffc7a8 !important; background: linear-gradient(180deg, #5a3218, #33190a) !important; }
.hst .hst-empty { margin: 0 0 6px; padding: 10px; text-align: center; font-size: 12px; color: #a8987a; border: 1px dashed #4d3c1c; border-radius: 8px; background: rgba(0, 0, 0, 0.18); }
/* bo suu tap */
.hst .hst-sum { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; border: 1px solid #a8843e;
  background: radial-gradient(ellipse 70% 100% at 0% 50%, rgba(255, 210, 120, 0.16), transparent 70%), linear-gradient(180deg, #3a2c16, #221a0e);
  box-shadow: inset 0 1px 0 rgba(255, 230, 160, 0.15); }
.hst .hst-sumL { flex: 1; min-width: 0; }
.hst .hst-sumL > b { font-size: 20px; color: #ffe08a; text-shadow: 0 0 10px rgba(255, 200, 80, 0.6); }
.hst .hst-sumL > b small { font-size: 12px; color: #c9b88f; font-weight: 400; text-shadow: none; margin-left: 2px; }
.hst .hst-bon { display: flex; flex-direction: column; gap: 4px; }
.hst .hst-bon span { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 10px; text-align: center; white-space: nowrap; color: #2a1804;
  background: linear-gradient(180deg, #fff0b0, #e6b440); box-shadow: 0 0 9px rgba(255, 200, 80, 0.55); }
.hst .hst-note { margin: 6px 0 8px; font-size: 11.5px; color: #a8987a; }
.hst .hst-tier { margin-bottom: 7px; padding: 7px 9px; border-radius: 8px; border: 1px solid #4d3c1c; border-left: 3px solid var(--hc);
  background: linear-gradient(90deg, color-mix(in srgb, var(--hc) 11%, #221a0f), #17120a 65%); }
.hst .hst-tier.full { border-color: var(--hc); box-shadow: 0 0 12px color-mix(in srgb, var(--hc) 40%, transparent); }
.hst .hst-th { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-bottom: 6px; }
.hst .hst-th b { color: var(--hc); font-size: 13.5px; text-shadow: 0 0 8px color-mix(in srgb, var(--hc) 50%, transparent), 0 1px 0 #000; }
.hst .hst-cnt { font-size: 11px; padding: 0 7px; line-height: 17px; border-radius: 9px; border: 1px solid var(--hc); color: #fff3d0; background: color-mix(in srgb, var(--hc) 22%, #120d07); }
.hst .hst-th small { font-size: 11px; color: #b4a27c; }
.hst .hst-sp { display: flex; flex-wrap: wrap; gap: 4px; }
.hst .hst-s { font-size: 11.5px; padding: 2px 8px; border-radius: 10px; border: 1px dashed #4a3b22; color: #857a66; background: rgba(10, 8, 5, 0.55); }
.hst .hst-s.on { border: 1px solid var(--hc); color: #fffaf0; background: color-mix(in srgb, var(--hc) 30%, #1a140b);
  text-shadow: 0 0 5px var(--hc); box-shadow: 0 0 8px color-mix(in srgb, var(--hc) 55%, transparent); }
@media (max-width: 560px) {
  .hst .hst-ride { padding: 10px; gap: 10px; }
  .hst .hst-pic.big { width: 56px; height: 56px; }
  .hst .hst-row { flex-wrap: wrap; }
  .hst .hst-btns { width: 100%; grid-template-columns: repeat(3, 1fr); }
  .hst .hst-btns .btn { min-width: 0 !important; }
  .hst #hSellDup { margin-left: 0; }
  .hst .hst-sum { flex-direction: column; align-items: stretch; }
  .hst .hst-bon { flex-direction: row; }
  .hst .hst-bon span { flex: 1; }
}
/* ten ngua / ten bac: sang hon mau bac goc (bac Thuong mau nau toi kho doc tren nen toi) */
.hst .hst-nm b, .hst .hst-th b { color: color-mix(in srgb, var(--hc, #e6c06a) 72%, #fff) !important; }
/* Hoat dong v3 - chi tiet tung tab */
/* giu cho thanh cuon: tab ngan (khong cuon) va tab dai khong lech nhau 2px */
#modal:has(#actTabs) .mbox { scrollbar-gutter: stable; }
/* Pho ban: ten phong vang sang, the dang khoa mo */
#modal:has(#actTabs) #mBody .dgc > b:first-child { font-size: 14.5px; color: #ffe08a; text-shadow: 0 0 8px rgba(255, 200, 80, 0.5), 0 1px 0 #000; }
#modal:has(#actTabs) #mBody .dgc { transition: border-color 0.15s, box-shadow 0.15s; }
#modal:has(#actTabs) #mBody .dgc:not(.lock):hover { border-color: #e6c06a !important; box-shadow: 0 0 12px rgba(255, 200, 80, 0.3), inset 0 1px 0 rgba(255, 230, 160, 0.15) !important; }
/* bang chi so (Di thuyen, Boss tuan...): ke vach, gia tri vang */
#modal:has(#actTabs) #mBody .stats > span { padding: 3px 0; border-bottom: 1px dashed rgba(201, 161, 74, 0.22); }
#modal:has(#actTabs) #mBody .stats > span:nth-child(even) { color: #ffe2a0; font-weight: 700; text-align: right; }
/* Thap: dong ky luc thanh bang noi bat */
#modal:has(#actTabs) #mBody > p:not(.desc):not(.dim):not(.small) {
  margin: 0 0 10px; padding: 8px 12px; border: 1px solid #8a6d32; border-radius: 8px;
  background: linear-gradient(90deg, rgba(255, 210, 120, 0.16), rgba(255, 210, 120, 0.02)); color: #f0e4c8;
}
#modal:has(#actTabs) #mBody > p:not(.desc):not(.dim):not(.small) b { color: #ffe08a; text-shadow: 0 0 8px rgba(255, 200, 80, 0.5); }
/* Dong hanh: bo o cuon long nhau (khung ngoai da cuon) */
#modal:has(#actTabs) #mBody .petpick { max-height: none !important; overflow: visible !important; }
/* hoa van day cu (ornb2, sticky) de len chu khi cuon -> khung moi da co goc hoa van rieng */
#modal:has(#actTabs) .mbox::after, #modal:has(#actTabs) .mbox::before { display: none !important; }
/* man thap (dien thoai xoay ngang): thu gon tieu de + hang tab de con cho noi dung */
@media (max-height: 500px) {
  #modal:has(#actTabs) #mBody > h3 { height: 32px; font-size: 15px !important; }
  #modal:has(#actTabs) #mClose { top: 4px !important; margin-top: 4px !important; margin-bottom: -28px !important; }
  #modal:has(#actTabs) #actTabs { top: 32px; padding: 5px 12px !important; gap: 4px !important; }
  #modal:has(#actTabs) #actTabs button { min-height: 25px !important; height: 25px; font-size: 12px !important; }
}
#modal:has(#actTabs) #mBody .stats > span:nth-child(odd) { text-align: left; color: #d8c79e; }

/* =====================================================================================================
   VAN TIEU NGUOI THAT - TIEU LO (js/vt_road.js): tab Hoat dong + HUD trong ban do
   ===================================================================================================== */
.vtr { color: #f0e4c8; }
.vtr .vtr-hero { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; padding: 10px 12px; border: 1px solid #a8843e; border-radius: 9px;
  background: radial-gradient(ellipse 60% 120% at 0% 50%, rgba(255, 200, 100, 0.18), transparent 70%), linear-gradient(180deg, #3e2f18, #241b0e); box-shadow: inset 0 1px 0 rgba(255, 230, 160, 0.15); }
.vtr .vtr-hero b { display: block; font-size: 17px; color: #ffe08a; text-shadow: 0 0 10px rgba(255, 200, 80, 0.55); letter-spacing: 1px; }
.vtr .vtr-hero small { color: #c9b88f; font-size: 12px; }
.vtr .vtr-cnt { flex: none; font-size: 11.5px; padding: 3px 10px; border-radius: 10px; border: 1px solid #a0603a; color: #ffc7a8; background: rgba(90, 40, 20, 0.45); white-space: nowrap; }
.vtr .vtr-rules { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.vtr .vtr-rules li { display: flex; gap: 8px; align-items: flex-start; padding: 7px 9px; border: 1px solid #5a4622; border-radius: 7px; background: linear-gradient(90deg, rgba(255, 215, 140, 0.1), rgba(255, 215, 140, 0.02)); }
.vtr .vtr-rules li > span { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #a8843e; background: radial-gradient(circle, #4a3818, #1e160b); font-size: 14px; }
.vtr .vtr-rules p { margin: 0; font-size: 12px; line-height: 1.5; color: #e2d4b0; }
.vtr .vtr-rules b { color: #ffd56a; }
.vtr .vtr-my, .vtr .vtr-pick { padding: 10px 12px; margin-bottom: 8px; border: 1px solid #8a6d32; border-radius: 9px; background: linear-gradient(180deg, rgba(64, 49, 26, 0.92), rgba(33, 26, 16, 0.95)); }
.vtr .vtr-myh { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.vtr .vtr-myh b { color: #ffe2a0; font-size: 14px; }
.vtr-st { color: #ffcc33; letter-spacing: 1px; text-shadow: 0 0 6px rgba(255, 200, 60, 0.6); }
.vtr-st i { font-style: normal; color: #5a4a2a; text-shadow: none; }
.vtr .vtr-tag { font-size: 11px; padding: 1px 8px; border-radius: 9px; font-weight: 700; }
.vtr .vtr-tag.run { color: #1a2a0a; background: linear-gradient(#bff58a, #6cc23a); box-shadow: 0 0 8px rgba(120, 220, 80, 0.6); }
.vtr .vtr-tag.stop { color: #fff; background: linear-gradient(#ff8a6a, #c0402a); box-shadow: 0 0 8px rgba(255, 100, 70, 0.5); }
.vtr .vtr-bar { position: relative; height: 26px; margin: 4px 0 8px; border-radius: 13px; border: 1px solid #6e5528; overflow: visible;
  background: repeating-linear-gradient(90deg, #3a2c16 0 16px, #2a1f0e 16px 26px); }
.vtr .vtr-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 13px; background: linear-gradient(90deg, rgba(168, 112, 26, 0.5), rgba(255, 213, 106, 0.55)); }
.vtr .vtr-bar .vtr-cart { position: absolute; top: -4px; transform: translateX(-50%); font-size: 22px; filter: drop-shadow(0 0 6px rgba(255, 200, 80, 0.8)); }
.vtr .vtr-bar span { position: absolute; bottom: -17px; font-size: 10.5px; color: #b4a27c; }
.vtr .vtr-bar span:nth-of-type(1) { left: 0; } .vtr .vtr-bar span:nth-of-type(2) { right: 0; }
.vtr .vtr-hpb { position: relative; height: 14px; margin: 18px 0 6px; border-radius: 7px; border: 1px solid #6e2a1e; background: #1a0c08; overflow: hidden; }
.vtr .vtr-hpb i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #a82a1a, #ff6a4a); }
.vtr .vtr-hpb span { position: relative; display: block; text-align: center; font-size: 10.5px; line-height: 12px; color: #fff; text-shadow: 0 1px 1px #000; }
.vtr .vtr-pv { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.vtr .vtr-pc { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 3px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--sc) 55%, #4a3a1c);
  background: linear-gradient(180deg, color-mix(in srgb, var(--sc) 14%, #2a2010), #17120a); text-align: center; }
.vtr .vtr-pc b { color: var(--sc); font-size: 13px; text-shadow: 0 0 6px color-mix(in srgb, var(--sc) 50%, transparent); }
.vtr .vtr-pc small { font-size: 10.5px; color: #b4a27c; }
.vtr .vtr-pc .vtr-st { font-size: 10px; }
.vtr .vtr-act { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.vtr .vtr-act .btn { width: 100% !important; min-width: 0 !important; height: auto !important; min-height: 42px !important; white-space: normal !important; }
.vtr-done { text-align: center; padding: 6px 0; }
.vtr-done .vtr-big { font-size: 26px; }
@media (max-width: 560px) {
  .vtr .vtr-rules { grid-template-columns: 1fr; }
  .vtr .vtr-pv { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vtr .vtr-act { grid-template-columns: 1fr; }
}

/* ---------- HUD trong Tieu Lo ---------- */
#vtHud { position: fixed; inset: 0; pointer-events: none; z-index: 9; font-size: 12px; color: #f0e4c8; }
#vtHud > * { pointer-events: auto; }
#vtHud .vth-cart { position: absolute; top: 62px; left: 50%; transform: translateX(-50%); width: min(360px, calc(100vw - 24px)); box-sizing: border-box; padding: 7px 11px 8px;
  border: 1px solid #a8843e; border-radius: 10px; background: linear-gradient(rgba(46, 35, 18, 0.94), rgba(20, 15, 8, 0.94)); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 14px rgba(255, 190, 80, 0.15); }
#vtHud .vth-cart.stop { border-color: #c0503a; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 14px rgba(255, 90, 60, 0.3); }
#vtHud .vth-cart.hit { animation: vthHit 0.6s ease-in-out 4; }
@keyframes vthHit { 50% { box-shadow: 0 0 22px rgba(255, 60, 40, 0.95); border-color: #ff5a3a; } }
#vtHud .vth-cart.none { width: min(320px, calc(100vw - 24px)); }
#vtHud .vth-h { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
#vtHud .vth-h b { color: #ffe08a; }
#vtHud .vth-h small { color: #b4a27c; }
#vtHud .vth-g { margin-left: auto; color: #ffd24a; font-weight: 700; white-space: nowrap; }
#vtHud .vth-road { position: relative; height: 12px; margin: 4px 0 6px; border-radius: 6px; border: 1px solid #6e5528; background: repeating-linear-gradient(90deg, #3a2c16 0 10px, #2a1f0e 10px 16px); }
#vtHud .vth-road i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: linear-gradient(90deg, #a8701a, #ffd56a); box-shadow: 0 0 8px rgba(255, 210, 100, 0.6); }
#vtHud .vth-road b { position: absolute; top: -9px; transform: translateX(-50%); font-size: 17px; filter: drop-shadow(0 0 4px #000); }
#vtHud .vth-road span { position: absolute; right: 4px; top: -1px; font-size: 10px; color: #fff6d8; text-shadow: 0 1px 1px #000; }
#vtHud .vth-hp { position: relative; height: 12px; border-radius: 6px; border: 1px solid #6e2a1e; background: #1a0c08; overflow: hidden; }
#vtHud .vth-hp.sm { height: 6px; margin: 3px 0 5px; }
#vtHud .vth-hp i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #a82a1a, #ff6a4a); transition: width 0.25s; }
#vtHud .vth-hp span { position: relative; display: block; text-align: center; font-size: 10px; line-height: 10px; color: #fff; text-shadow: 0 1px 1px #000; }
#vtHud .vth-s { margin-top: 5px; font-size: 11.5px; color: #e2d4b0; line-height: 1.4; }
#vtHud .vth-cart.stop .vth-s { color: #ffb59a; font-weight: 700; }
#vtHud .vth-side { position: absolute; left: 8px; top: 150px; display: flex; flex-direction: column; gap: 5px; }
.vth-b { font: inherit; font-size: 12px; min-height: 32px; padding: 4px 10px; border-radius: 7px; cursor: pointer; text-align: left; white-space: nowrap;
  border: 1px solid #7a5f2c; background: linear-gradient(180deg, rgba(69, 54, 28, 0.95), rgba(39, 29, 14, 0.95)); color: #ead6a2; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); }
.vth-b:hover { border-color: #e6c06a; color: #fff3c4; }
.vth-b.on { border-color: #ffe08a; color: #2a1804; font-weight: 700; background: linear-gradient(180deg, #fff0b0, #e6b440); box-shadow: 0 0 10px rgba(255, 200, 80, 0.75); }
.vth-b.bad { border-color: #a0603a; color: #ffc7a8; background: linear-gradient(180deg, rgba(90, 50, 24, 0.95), rgba(51, 25, 10, 0.95)); }
.vth-b.sm { min-height: 26px; padding: 2px 9px; font-size: 11.5px; }
.vth-b:disabled { opacity: 0.5; }
#vtHud .vth-tg { position: absolute; top: 172px; left: 50%; transform: translateX(-50%); width: min(300px, calc(100vw - 24px)); box-sizing: border-box; padding: 6px 10px;
  border: 1px solid #c0503a; border-radius: 9px; background: rgba(30, 14, 8, 0.92); box-shadow: 0 0 12px rgba(255, 80, 50, 0.3); }
#vtHud .vth-tn { font-weight: 700; font-size: 12.5px; }
#vtHud .vth-tb { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.vth-chip { font-size: 10.5px; padding: 1px 7px; border-radius: 9px; border: 1px solid #6e5528; color: #c9b88f; }
.vth-chip.bad { border-color: #ff6a5a; color: #ffb59a; }
#vtHud .vth-feed { position: absolute; left: 8px; top: 430px; width: 240px; display: flex; flex-direction: column; gap: 3px; pointer-events: none; }
.vth-fl { font-size: 11.5px; padding: 3px 8px; border-radius: 6px; background: rgba(10, 8, 4, 0.7); border-left: 2px solid #c9a14a; transition: opacity 1s; }
.vth-fl.bad { border-left-color: #ff5a3a; color: #ffc7a8; }
.vth-fl.out { opacity: 0; }
#vtAlert { position: fixed; z-index: 30; top: 30%; left: 50%; transform: translate(-50%, -10px); opacity: 0; pointer-events: none; width: min(420px, calc(100vw - 24px)); box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 14px; border-radius: 10px; border: 2px solid #ff5a3a; text-align: center;
  background: linear-gradient(180deg, rgba(120, 20, 10, 0.95), rgba(60, 10, 4, 0.95)); color: #fff; box-shadow: 0 0 26px rgba(255, 60, 30, 0.7); transition: opacity 0.25s, transform 0.25s; }
#vtAlert.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; animation: vthBlink 0.8s ease-in-out 3; }
@keyframes vthBlink { 50% { box-shadow: 0 0 40px rgba(255, 90, 40, 1); } }
#vtAlert b { font-size: 15px; color: #ffe08a; }
#vtAlert span { font-size: 12.5px; color: #ffd8c8; }
#vtInv { position: fixed; z-index: 40; top: 38%; left: 50%; transform: translateX(-50%); width: min(340px, calc(100vw - 24px)); box-sizing: border-box; padding: 12px 14px;
  border: 1px solid #d4ad57; border-radius: 10px; background: linear-gradient(180deg, #3d2f1a, #1f170d); color: #f0e4c8; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 18px rgba(255, 190, 80, 0.25); }
#vtInv p { margin: 0 0 6px; }
#vtInv .btnrow { display: flex; gap: 8px; }
#vtInv .btn { flex: 1 !important; min-width: 0 !important; }
#vtTeam { position: fixed; z-index: 12; left: 130px; top: 150px; width: min(270px, calc(100vw - 150px)); box-sizing: border-box; padding: 8px 10px; border: 1px solid #a8843e; border-radius: 10px;
  background: linear-gradient(rgba(46, 35, 18, 0.96), rgba(20, 15, 8, 0.96)); color: #f0e4c8; font-size: 12px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7); }
#vtTeam .vtt-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; color: #ffe08a; }
#vtTeam .vtt-s { margin: 8px 0 4px; color: #ffe2a0; font-weight: 700; border-top: 1px solid #4d3c1c; padding-top: 6px; }
#vtTeam .vtt-m { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 6px 7px; margin-bottom: 4px; border-radius: 6px; background: rgba(0, 0, 0, 0.25); }
#vtTeam .vtt-m small { color: #b4a27c; }
#vtTeam .vtt-m > i { position: absolute; left: 6px; right: 6px; bottom: 2px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, #ff6a4a var(--p), #3a1a10 var(--p)); }
#vtTeam .vtt-m.dead { opacity: 0.55; }
#vtTeam #vttQuit { margin-top: 4px; }
/* dien thoai / man hep: HUD gon, khong de len thanh mau / thanh ky nang */
@media (max-width: 899px), (orientation: portrait) {
  #vtHud .vth-cart { top: 112px; padding: 5px 9px 6px; }
  #vtHud .vth-side { top: 200px; left: 4px; gap: 4px; }
  .vth-b { min-height: 34px; padding: 3px 8px; font-size: 11.5px; }
  #vtHud .vth-tg { top: 210px; }
  #vtHud .vth-feed { top: auto; bottom: 200px; left: 4px; width: 200px; }
  #vtTeam { left: 50%; transform: translateX(-50%); top: 200px; width: min(300px, calc(100vw - 24px)); }
}
@media (max-height: 500px) {
  #vtHud .vth-cart { top: 36px; width: min(300px, calc(100vw - 260px)); }
  #vtHud .vth-side { top: 70px; flex-direction: column; }
  .vth-b { min-height: 26px; padding: 2px 7px; font-size: 11px; }
  #vtHud .vth-tg { top: 138px; }
  #vtHud .vth-feed { display: none; }
  #vtTeam { top: 40px; }
}
/* man doc: bang xe tieu sang trai, chua cot phai cho ban do nho + ten khu vuc; muc tieu dat tren thanh ky nang */
@media (max-width: 899px) and (orientation: portrait) {
  #vtHud .vth-cart { top: 112px; left: 6px; transform: none; width: calc(100vw - 112px); max-width: 360px; }
  #vtHud .vth-side { top: 238px; }
  #vtHud .vth-tg { top: auto; bottom: 168px; }
}
/* dang mo bang (thuong / roi ban do / cua so khac): an HUD Tieu Lo de khong de len bang */
body:has(#modal:not(.hidden)) #vtHud, body:has(#modal:not(.hidden)) #vtTeam { visibility: hidden; }
#modal .mbox:has(.vtr-done) { overflow-x: hidden !important; }
.vtr-done p { white-space: normal; overflow-wrap: anywhere; margin: 6px 0; }
.vtr-done .gold { font-weight: 700; font-size: 14px; }
.vtr-done p { text-align: center !important; }
/* dien thoai xoay ngang: bang xe duoi hang nut tren cung, cot nut duoi hang bieu tuong buff */
@media (max-height: 500px) {
  #vtHud .vth-cart { top: 50px; }
  #vtHud .vth-side { top: 58px; }
  #vtHud .vth-tg { top: 150px; }
}

/* === TONG KIM - bang bao danh: quan so = nguoi choi + hiep khach AI (luon du ~145-150 / phe) === */
.rtk-lobby .rtk-side .rtk-mix { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.rtk-lobby .rtk-side .rtk-mix i { font-style: normal; font-size: 11px; font-weight: 700; line-height: 18px; padding: 0 7px; border-radius: 9px; white-space: nowrap; }
.rtk-lobby .rtk-side .rtk-mix i.p { color: #2a1804; background: linear-gradient(180deg, #fff0b0, #e6b440); box-shadow: 0 0 6px rgba(255, 200, 80, 0.5); }
.rtk-lobby .rtk-side .rtk-mix i.a { color: inherit; background: rgba(0, 0, 0, 0.35); border: 1px solid currentColor; }
.rtk-lobby .rtk-side .rtk-capacity { display: flex; height: 5px; }
.rtk-lobby .rtk-side .rtk-capacity i { flex: none; background: linear-gradient(90deg, #ffe08a, #ffc23a); box-shadow: 0 0 6px rgba(255, 200, 80, 0.8); }
.rtk-lobby .rtk-side .rtk-capacity em { flex: none; display: block; height: 100%; background: currentColor; opacity: 0.5; animation: rtkAi 2.4s ease-in-out infinite; }
@keyframes rtkAi { 50% { opacity: 0.8; } }
@media (prefers-reduced-motion: reduce) { .rtk-lobby .rtk-side .rtk-capacity em { animation: none; } }
/* chua mo cong bao danh: the phe van ro (truoc bi lam mo 55% nhu nut khoa -> kho doc quan so) */
.rtk-lobby .rtk-side:disabled { opacity: 0.9 !important; filter: saturate(0.8); cursor: default; }
.rtk-lobby .rtk-mixnote { margin: 8px 2px 4px !important; font-size: 11.5px !important; font-weight: 400 !important; line-height: 1.5; color: #c9c0a6 !important; text-align: center; }
.rtk-lobby .rtk-mixnote b { color: #ffe08a; }
/* chua mo cong bao danh: an quan so */
.rtk-lobby .rtk-side .rtk-count.rtk-hide { font-size: 22px; opacity: 0.55; }
.rtk-lobby .rtk-side .rtk-count.rtk-hide small { font-size: 9.5px; }

/* === TONG KIM - LIEN TRAM (js/tk_online.js tkKsShow): chu thu phap do + so vang tren vet mau loang, gon duoi bang diem === */
#tkKs { position: fixed; z-index: 21; left: 50%; transform: translateX(-50%); pointer-events: none;
  display: flex; align-items: baseline; gap: 7px; padding: 5px 20px 9px; white-space: nowrap;
  font-family: "KaiTi", "STKaiti", "BiauKai", "Noto Serif", "Times New Roman", serif; font-style: italic; font-weight: 900;
  background:
    radial-gradient(ellipse 60% 66% at 50% 56%, rgba(70, 0, 0, 0.88), rgba(110, 6, 0, 0.62) 52%, rgba(96, 4, 0, 0.25) 70%, transparent 80%),
    radial-gradient(circle at 12% 74%, rgba(150, 10, 0, 0.55) 0 5px, transparent 6px),
    radial-gradient(circle at 7% 48%, rgba(150, 10, 0, 0.45) 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 90% 30%, rgba(150, 10, 0, 0.5) 0 4px, transparent 5px),
    radial-gradient(circle at 95% 62%, rgba(150, 10, 0, 0.4) 0 2px, transparent 3px),
    radial-gradient(circle at 74% 92%, rgba(150, 10, 0, 0.45) 0 3px, transparent 4px),
    radial-gradient(circle at 30% 12%, rgba(150, 10, 0, 0.35) 0 2px, transparent 3px);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55)); transition: opacity 0.6s; }
#tkKs.out { opacity: 0.25; }
#tkKs .ks-l { font-size: 17px; letter-spacing: 0.5px; color: #ff4a32;
  text-shadow: 0 0 1px #000, 0 1px 0 #3a0000, -1px 0 0 #3a0000, 1px 0 0 #3a0000, 0 0 9px rgba(255, 70, 30, 0.55); }
#tkKs .ks-n { font-size: 27px; line-height: 1; font-style: italic; color: #ffe9a0;
  text-shadow: 0 0 1px #5a0a00, 1px 1px 0 #8a1a00, -1px -1px 0 #8a1a00, 1px -1px 0 #8a1a00, -1px 1px 0 #8a1a00, 0 3px 0 #4a0a00, 0 0 12px rgba(255, 170, 40, 0.8); }
#tkKs .ks-bar { position: absolute; left: 22%; right: 22%; bottom: 3px; height: 2px; border-radius: 2px; background: rgba(0, 0, 0, 0.45); overflow: hidden; }
#tkKs .ks-bar > i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff5a2a, #ffd56a); transition: width 0.12s linear; }
#tkKs.pop .ks-n { animation: tkKsPop 0.42s cubic-bezier(0.2, 1.7, 0.4, 1); }
#tkKs.pop .ks-l { animation: tkKsSlash 0.42s ease-out; }
@keyframes tkKsPop { 0% { transform: scale(1.9); opacity: 0.2; } 60% { transform: scale(0.92); opacity: 1; } 100% { transform: scale(1); } }
@keyframes tkKsSlash { 0% { transform: translateX(-8px); opacity: 0; } 100% { transform: none; opacity: 1; } }
/* moc: 5 cam, 10 vang ruc, 20 tim lua, 50 trang vang nhap nhay */
#tkKs[data-tier="2"] .ks-n { color: #ffd27a; text-shadow: 0 0 1px #5a0a00, 1px 1px 0 #9a2a00, -1px -1px 0 #9a2a00, 1px -1px 0 #9a2a00, -1px 1px 0 #9a2a00, 0 3px 0 #4a0a00, 0 0 14px rgba(255, 140, 30, 0.95); }
#tkKs[data-tier="3"] .ks-n { font-size: 30px; color: #fff3b0; text-shadow: 0 0 1px #5a2a00, 1px 1px 0 #a86a00, -1px -1px 0 #a86a00, 1px -1px 0 #a86a00, -1px 1px 0 #a86a00, 0 3px 0 #5a2a00, 0 0 16px rgba(255, 210, 80, 1); }
#tkKs[data-tier="4"] .ks-n { font-size: 31px; color: #ffd8ff; text-shadow: 0 0 1px #3a0040, 1px 1px 0 #8a2aa0, -1px -1px 0 #8a2aa0, 1px -1px 0 #8a2aa0, -1px 1px 0 #8a2aa0, 0 3px 0 #3a0040, 0 0 16px rgba(220, 90, 255, 1), 0 0 26px rgba(255, 80, 60, 0.7); }
#tkKs[data-tier="5"] .ks-n { font-size: 33px; color: #ffffff; text-shadow: 0 0 1px #5a2a00, 1px 1px 0 #c08a10, -1px -1px 0 #c08a10, 1px -1px 0 #c08a10, -1px 1px 0 #c08a10, 0 3px 0 #5a2a00, 0 0 18px rgba(255, 230, 120, 1), 0 0 30px rgba(255, 120, 40, 0.9); animation: tkKsGlow 1.2s ease-in-out infinite; }
#tkKs[data-tier="4"] .ks-l, #tkKs[data-tier="5"] .ks-l { color: #ff6a3a; }
@keyframes tkKsGlow { 50% { filter: brightness(1.35); } }
@media (prefers-reduced-motion: reduce) { #tkKs.pop .ks-n, #tkKs.pop .ks-l, #tkKs[data-tier="5"] .ks-n { animation: none; } }
@media (max-width: 899px), (orientation: portrait) {
  #tkKs { padding: 4px 16px 8px; gap: 5px; }
  #tkKs .ks-l { font-size: 14px; }
  #tkKs .ks-n { font-size: 22px; }
  #tkKs[data-tier="3"] .ks-n, #tkKs[data-tier="4"] .ks-n { font-size: 24px; }
  #tkKs[data-tier="5"] .ks-n { font-size: 26px; }
}
/* Top ha dich: them cot diem (so ha + diem tran) */
#tkKb.open { width: 252px; }
#tkKb li { grid-template-columns: 22px minmax(0, 1fr) 24px 46px; }
#tkKb li em { font-style: normal; text-align: right; color: #9fe8a8; font-variant-numeric: tabular-nums; font-size: 0.95em; }
#tkKb li b { text-align: right; }
#tkKb li.tkkb-cols { padding-top: 0; padding-bottom: 1px; border-bottom: 1px solid rgba(201, 161, 74, 0.25); border-radius: 0; margin-bottom: 2px; }
#tkKb li.tkkb-cols i, #tkKb li.tkkb-cols span, #tkKb li.tkkb-cols b, #tkKb li.tkkb-cols em { color: #9a8f74; font-size: 10.5px; font-weight: 400; }
@media (max-width: 899px), (orientation: portrait) { #tkKb.open { width: 232px; } #tkKb li { grid-template-columns: 20px minmax(0, 1fr) 22px 40px; } }
/* Top diem: xep theo diem -> cot diem noi bat (vang), so ha la phu */
#tkKb li em { color: #ffd76a; font-weight: 700; font-size: 1em; }
#tkKb li b { color: #c9b98a; font-weight: 400; }
#tkKb li.tkkb-cols em { color: #e7c26a; }
/* Top diem: cot lien tram cao nhat (LT) */
#tkKb.open { width: 276px; }
#tkKb li { grid-template-columns: 22px minmax(0, 1fr) 22px 26px 44px; }
#tkKb li u { text-decoration: none; text-align: right; color: #ff7a52; font-weight: 700; font-variant-numeric: tabular-nums; }
#tkKb li.tkkb-cols u { color: #9a8f74; font-weight: 400; font-size: 10.5px; }
.tktbl td.tkls { color: #ff7a52; font-weight: 700; }
@media (max-width: 899px), (orientation: portrait) { #tkKb.open { width: 252px; } #tkKb li { grid-template-columns: 20px minmax(0, 1fr) 20px 24px 40px; } }
/* body.mob #tkKb (190px) manh hon #tkKb.open -> mo rong rieng tren mobile de ten khong bi cat cut */
body.mob #tkKb.open { width: 238px; }
body.mob #tkKb li { gap: 5px; }
/* Bang diem Tong Kim day du (tkBoardHTML): o co le, so canh phai, hang minh / top 3 noi bat */
.tkside-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin: 0 0 6px; padding: 0 2px 5px; border-bottom: 1px solid rgba(201, 161, 74, 0.3); }
.tkside-h b { color: #ffe08a; }
.tkside-h em { font-style: normal; color: #9a8f74; font-size: 0.9em; }
.tktbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tktbl th, .tktbl td { padding: 3px 6px; white-space: nowrap; text-align: center; }
.tktbl th { color: #c9a14a; font-weight: 600; font-size: 0.86em; border-bottom: 1px solid rgba(201, 161, 74, 0.35); }
.tktbl td:nth-child(3) { text-align: left; max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.tktbl th:nth-child(3) { text-align: left; }
.tktbl tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.03); }
.tktbl tbody tr.me { background: rgba(255, 224, 138, 0.16); outline: 1px solid rgba(255, 224, 138, 0.4); }
.tktbl td b { color: #ffd76a; }
.tktbl .tkri { width: 20px; height: 20px; vertical-align: middle; }
@media (max-width: 899px), (orientation: portrait) { .tktbl { font-size: 12px; } .tktbl th, .tktbl td { padding: 3px 4px; } .tktbl td:nth-child(3) { max-width: 96px; } }
/* hoa van day hop thoai (.mbox::after, margin -14px) rong hon le 12px tren mobile -> thanh cuon ngang thua */
@media (max-width: 899px), (orientation: portrait) { .mbox::after { margin-left: 0; margin-right: 0; } }
/* === GIFTCODE + ZALO tren thanh tab khung chat (js/giftcode.js) === */
html body #u20log #u20ct > button.u20gc, html body #u20log #u20ct > button.u20zl { display: inline-flex !important; align-items: center; gap: 4px; }
html body #u20log #u20ct > button.u20gc i, html body #u20log #u20ct > button.u20zl i { font-style: normal; line-height: 1; }
html body #u20log #u20ct > button.u20gc {
  background: linear-gradient(180deg, #e7932f 0%, #b45f12 55%, #7e3d07 100%) !important; border-color: #ffc56b !important; color: #fff6dc !important;
  box-shadow: 0 0 7px rgba(255, 160, 50, 0.55), inset 0 1px 0 rgba(255, 236, 190, 0.45) !important; }
html body #u20log #u20ct > button.u20zl {
  background: linear-gradient(180deg, #2f8dff 0%, #0068ff 55%, #0047b3 100%) !important; border-color: #8cc4ff !important; color: #fff !important;
  box-shadow: 0 0 7px rgba(40, 130, 255, 0.55), inset 0 1px 0 rgba(200, 228, 255, 0.45) !important; }
html body #u20log #u20ct > button.u20zl i { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 4px; background: #fff; color: #0068ff; font-size: 10px; font-weight: 900; text-shadow: none; }
html body #u20log #u20ct > button.u20gc::after, html body #u20log #u20ct > button.u20zl::after { display: none; }
html body #u20log #u20ct > button.u20gc:hover, html body #u20log #u20ct > button.u20zl:hover { filter: brightness(1.15); }
@media (max-width: 520px) {
  /* dien thoai: Giftcode chi con hop qua (to hon), Zalo giu chu "Zalo" (de nhan ra hon chu Z) */
  html body #u20log #u20ct > button.u20gc span, html body #u20log #u20ct > button.u20zl i { display: none; }
  html body #u20log #u20ct > button.u20gc i { font-size: 15px; }
  html body #u20log #u20ct > button.u20gc, html body #u20log #u20ct > button.u20zl { padding-left: 5px !important; padding-right: 5px !important; }
  html body #u20log #u20ct > button.u20zl span { font-weight: 800; letter-spacing: 0.2px; }
}

/* hop Nhap Giftcode */
.gcx { display: flex; flex-direction: column; gap: 8px; }
.gcx-h { display: flex; align-items: center; gap: 10px; padding: 2px 0 8px; border-bottom: 1px solid rgba(201, 161, 74, 0.35); }
.gcx-h small { display: block; color: #c9a14a; font-size: 10.5px; letter-spacing: 1px; }
.gcx-h h3 { margin: 0; color: #ffe08a; font-size: 19px; text-shadow: 0 1px 0 #000, 0 0 10px rgba(255, 190, 70, 0.45); }
.gcx-ic { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 8px; font-size: 21px;
  background: radial-gradient(circle at 50% 35%, #ffd27a, #b45f12 70%); border: 1px solid #ffd58a; box-shadow: 0 0 10px rgba(255, 170, 60, 0.55); }
.gcx-who { margin: 0; font-size: 12.5px; color: #cfc3a0; line-height: 1.45; }
.gcx-who b { color: #ffd76a; }
.gcx-list { display: flex; flex-direction: column; gap: 7px; max-height: min(46vh, 380px); overflow-y: auto; padding-right: 2px; overscroll-behavior: contain; }
.gcx-card { display: block; width: 100%; text-align: left; padding: 9px 11px; border-radius: 7px; cursor: pointer; font: inherit; color: #e8dcb8;
  border: 1px solid rgba(201, 161, 74, 0.45); background: linear-gradient(180deg, rgba(48, 38, 20, 0.95), rgba(22, 18, 10, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, 0.08); transition: border-color 0.15s, box-shadow 0.15s; }
.gcx-card:hover, .gcx-card:focus-visible { border-color: #ffd27a; box-shadow: 0 0 9px rgba(255, 190, 80, 0.35), inset 0 1px 0 rgba(255, 230, 170, 0.12); outline: none; }
.gcx-card:not([data-gc]) { cursor: default; }
.gcx-card.done { opacity: 0.62; }
.gcx-t { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.gcx-t b { color: #ffcf5a; font-size: 13.5px; }
.gcx-t code { padding: 1px 7px; border-radius: 4px; background: #0d0a05; border: 1px solid #6e5a2c; color: #fff; font: 700 13px/1.4 Consolas, "Courier New", monospace; letter-spacing: 0.5px; }
.gcx-t em { font-style: normal; font-size: 11.5px; color: #9a8f74; }
.gcx-ok { margin-left: auto; padding: 0 7px; border-radius: 9px; background: #2f6b2a; color: #d6ffcf; font-size: 11px; line-height: 18px; }
.gcx-card p { margin: 5px 0 0; font-size: 12.5px; line-height: 1.45; }
.gcx-rw span { color: #9fe8a8; font-weight: 700; }
.gcx-card small { display: block; margin-top: 4px; color: #9a8f74; font-size: 11.5px; }
.gcx-empty { margin: 6px 0; padding: 14px 10px; text-align: center; color: #b9ad8a; border: 1px dashed rgba(201, 161, 74, 0.35); border-radius: 7px; font-size: 13px; }
.gcx-empty.bad, .gcx-msg.bad { color: #ff8a7a; }
.gcx-form { display: flex; gap: 8px; margin-top: 2px; }
.gcx-form input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 6px; border: 1px solid #8a6d2c; background: #f6efdc; color: #2a1d08;
  font: 700 15px/1 Consolas, "Courier New", monospace; letter-spacing: 1px; text-transform: uppercase; }
.gcx-form input::placeholder { font-family: inherit; font-weight: 400; letter-spacing: 0; text-transform: none; color: #8a7b58; }
.gcx-form input:focus { outline: none; border-color: #ffd27a; box-shadow: 0 0 0 2px rgba(255, 200, 90, 0.35); }
.gcx-form .btn { flex: 0 0 auto; height: 40px; padding: 0 18px; font-weight: 700; }
.gcx-msg { margin: 0; min-height: 18px; font-size: 12.5px; line-height: 1.45; }
.gcx-msg.ok { color: #9fe8a8; }
.gcx-zalo { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 6px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700;
  color: #fff; border: 1px solid #8cc4ff; background: linear-gradient(180deg, #2f8dff, #0058d6); box-shadow: 0 0 8px rgba(40, 130, 255, 0.35); }
.gcx-zalo i { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: #fff; color: #0068ff; font-style: normal; font-weight: 900; font-size: 12px; }
.gcx-zalo:hover { filter: brightness(1.1); }
@media (max-width: 899px), (orientation: portrait) { .gcx-h h3 { font-size: 17px; } .gcx-list { max-height: 42vh; } .gcx-form .btn { padding: 0 13px; } }
/* dien thoai hep: an bieu tuong kenh (chu T.G / L.C ... van giu) de du cho nut Giftcode + Zalo, khong phai vuot ngang */
html body #u20log #u20ct .u20ic { font-style: normal; }
@media (max-width: 420px) { html body #u20log #u20ct .u20ic { display: none; } }
@media (max-width: 380px) { html body #u20log #u20ct > button.u20zl span { display: none; } html body #u20log #u20ct > button.u20zl i { display: inline-grid; } }
/* PC: nut chu tron "Giftcode" / "Zalo" (giong mau), vua thanh tab khung chat */
@media (min-width: 521px) { html body #u20log #u20ct > button.u20gc i, html body #u20log #u20ct > button.u20zl i { display: none; } html body #u20log #u20ct > button.u20gc, html body #u20log #u20ct > button.u20zl { letter-spacing: 0.2px; } }
/* dien thoai xoay ngang (thanh tab von phai vuot): 2 nut chi con bieu tuong cho gon */
@media (max-height: 500px) {
  html body #u20log #u20ct > button.u20gc span, html body #u20log #u20ct > button.u20zl span { display: none; }
  html body #u20log #u20ct > button.u20gc i { display: inline; font-size: 14px; }
  html body #u20log #u20ct > button.u20zl i { display: inline-grid; }
  html body #u20log #u20ct > button.u20gc, html body #u20log #u20ct > button.u20zl { padding-left: 5px !important; padding-right: 5px !important; }
}
/* === LOI DAI LIEN DAU (js/ld_arena.js): thanh 2 phe + dong ho, nut ben trai, dem nguoc, bang ket qua === */
#ldaHud { position: fixed; inset: 0; pointer-events: none; z-index: 9; font-size: 12px; color: #f0e4c8; }
#ldaHud > * { pointer-events: auto; }
#ldaHud .lda-top { position: absolute; top: 62px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 16px)); box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: start; pointer-events: none; }
#ldaHud .lda-sd { min-width: 0; padding: 5px 8px 6px; border-radius: 8px; border: 1px solid #6e5528; background: linear-gradient(180deg, rgba(40, 31, 16, 0.92), rgba(18, 14, 7, 0.92)); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.55); }
#ldaHud .lda-sd.s0 { border-color: rgba(127, 224, 138, 0.55); }
#ldaHud .lda-sd.s1 { border-color: rgba(255, 106, 90, 0.6); text-align: right; }
#ldaHud .lda-sn { font-weight: 700; font-size: 11px; letter-spacing: 0.5px; margin-bottom: 3px; }
#ldaHud .lda-sd.s0 .lda-sn { color: #7fe08a !important; }
#ldaHud .lda-sd.s1 .lda-sn { color: #ff8a7a !important; }
#ldaHud .lda-p { margin-top: 3px; }
#ldaHud .lda-p span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; font-weight: 700; color: #fff3d0; }
#ldaHud .lda-p i { display: block; height: 7px; margin-top: 2px; border-radius: 4px; border: 1px solid #4a2a18; background: #1a0c08; overflow: hidden; }
#ldaHud .lda-p em { display: block; height: 100%; transition: width 0.25s; }
#ldaHud .lda-sd.s0 .lda-p em { background: linear-gradient(90deg, #2a8a3a, #7fe08a); }
#ldaHud .lda-sd.s1 .lda-p em { background: linear-gradient(90deg, #ff6a4a, #a82a1a); margin-left: auto; }
#ldaHud .lda-p.dead { opacity: 0.45; }
#ldaHud .lda-p.dead span::after { content: " · gục"; color: #ff8a7a; font-weight: 400; }
#ldaHud .lda-p.off span::after { content: " · chưa vào"; color: #b9b2a0; font-weight: 400; }
#ldaHud .lda-tot { margin-top: 3px; font-size: 10.5px; color: #c9b88f; }
#ldaHud .lda-clock { display: flex; flex-direction: column; align-items: center; padding: 4px 10px 5px; min-width: 86px; border-radius: 8px; border: 1px solid #d4ad57; background: linear-gradient(180deg, #4a3818, #1f170d); box-shadow: 0 0 12px rgba(255, 200, 80, 0.3), 0 4px 12px rgba(0, 0, 0, 0.6); }
#ldaHud .lda-clock b { font-size: 21px; line-height: 1.1; color: #ffe08a; font-variant-numeric: tabular-nums; text-shadow: 0 1px 0 #000, 0 0 8px rgba(255, 200, 80, 0.6); }
#ldaHud .lda-clock b.warn { color: #ff7a5a; animation: ldaWarn 1s ease-in-out infinite; }
@keyframes ldaWarn { 50% { opacity: 0.55; } }
#ldaHud .lda-clock small { font-size: 10px; color: #c9b88f; white-space: nowrap; }
#ldaHud .lda-side { position: absolute; left: 8px; top: 180px; display: flex; flex-direction: column; gap: 5px; }
#ldaHud .lda-feed { position: absolute; left: 8px; top: 320px; width: 230px; display: flex; flex-direction: column; gap: 3px; pointer-events: none; }
#ldaCount { position: fixed; z-index: 35; top: 34%; left: 50%; transform: translate(-50%, -50%) scale(1.6); opacity: 0; pointer-events: none;
  font: 900 italic 72px/1 "KaiTi", "STKaiti", "Noto Serif", serif; color: #ffe9a0; text-shadow: 0 0 2px #5a0a00, 2px 2px 0 #8a1a00, -2px -2px 0 #8a1a00, 0 6px 0 #4a0a00, 0 0 24px rgba(255, 170, 40, 0.9); }
#ldaCount.show { animation: ldaPop 0.9s ease-out forwards; }
#ldaCount.go { font-size: 58px; color: #fff3b0; }
@keyframes ldaPop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(1.8); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(0.95); } 70% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.05); } }
/* bang ket qua */
.ldaR { display: flex; flex-direction: column; gap: 8px; }
.ldaR-h { text-align: center; padding: 10px 6px 8px; border-radius: 8px; border: 1px solid #6e5528; background: radial-gradient(ellipse at 50% 0%, rgba(255, 200, 80, 0.18), transparent 70%), linear-gradient(180deg, #2e2412, #16110a); }
.ldaR-h b { display: block; font: 900 italic 40px/1.05 "KaiTi", "STKaiti", "Noto Serif", serif; letter-spacing: 3px; }
.ldaR.win .ldaR-h b { color: #ffe08a; text-shadow: 0 2px 0 #6a3a00, 0 0 18px rgba(255, 200, 80, 0.8); }
.ldaR.lose .ldaR-h b { color: #ff8a7a; text-shadow: 0 2px 0 #4a0a00, 0 0 14px rgba(255, 80, 60, 0.6); }
.ldaR.draw .ldaR-h b { color: #d8d0c0; text-shadow: 0 2px 0 #222; }
.ldaR-h small { display: block; margin-top: 5px; color: #d6c8a4; font-size: 12.5px; }
.ldaR-t { max-height: 46vh; overflow: auto; }
.ldaR-t table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ldaR-t th { padding: 4px 6px; color: #c9a14a; font-weight: 600; font-size: 11.5px; text-align: right; border-bottom: 1px solid rgba(201, 161, 74, 0.35); }
.ldaR-t th:first-child, .ldaR-t td:first-child { text-align: left; }
.ldaR-t td { padding: 4px 6px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ldaR-t td:first-child { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.ldaR-t td.g { color: #9fe8a8; font-weight: 700; }
.ldaR-t td.r { color: #ff9a8a; }
.ldaR-t tr.dead td { opacity: 0.7; }
.ldaR-t tr.ldaR-side td { padding-top: 8px; text-align: left; font-size: 11.5px; color: #e8d8b0; border-bottom: 1px dashed rgba(201, 161, 74, 0.3); white-space: normal; }
.ldaR-t tr.ldaR-side.s0 td { color: #9fd6ff; }
.ldaR-t tr.ldaR-side.s1 td { color: #ffb0a0; }
.ldaR-ko { font-style: normal; font-size: 10.5px; color: #ff8a7a; }
.ldaR-pt { margin: 0; text-align: center; color: #ffe08a; font-weight: 700; }
.ldq.lda-wait { border-color: #ffd27a; box-shadow: 0 0 12px rgba(255, 200, 80, 0.35); }
@media (max-width: 899px), (orientation: portrait) {
  /* duoi hang nut Che do / Len ngua, chua cho ban do nho goc phai */
  #ldaHud .lda-top { top: 102px; left: 8px; transform: none; width: calc(100vw - 104px); gap: 5px; }
  #ldaHud .lda-sd { padding: 4px 6px 5px; }
  #ldaHud .lda-clock { min-width: 70px; padding: 3px 7px 4px; }
  #ldaHud .lda-clock b { font-size: 18px; }
  #ldaHud .lda-side { top: 210px; }
  #ldaHud .lda-feed { top: 330px; width: 200px; }
  #ldaCount { font-size: 58px; }
  .ldaR-h b { font-size: 34px; }
}
@media (max-height: 500px) { #ldaHud .lda-top { top: 40px; left: 50%; transform: translateX(-50%); width: min(460px, calc(100vw - 260px)); } #ldaHud .lda-side { top: 110px; } #ldaHud .lda-feed { top: 230px; } }
/* === DAI CHU CHAY THONG BAO HOAT DONG (js/annbar.js): duoi thanh Cap / HP, nen trong suot, chay 1 luot roi an === */
#annBar { position: fixed; z-index: 24; top: 62px; left: 197px; right: 340px; height: 30px; display: flex; align-items: center; gap: 6px; box-sizing: border-box;
  opacity: 0; pointer-events: none; transition: opacity 0.4s; background: none; border: 0; }
#annBar.show { opacity: 1; }
#annBar .annb-tag { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; font-weight: 800; font-size: 12.5px; white-space: nowrap; color: #ffd76a; pointer-events: none;
  text-shadow: 0 0 2px #000, 0 1px 1px #000, 1px 0 1px #000, -1px 0 1px #000; }
#annBar .annb-tag i { font-style: normal; font-size: 16px; animation: annPulse 1.2s ease-in-out infinite; }
#annBar .annb-tag b::after { content: ":"; }
@keyframes annPulse { 50% { transform: scale(1.18); } }
#annBar .annb-vp { position: relative; flex: 1 1 auto; min-width: 0; height: 100%; overflow: hidden; cursor: pointer; pointer-events: auto;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent); mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent); }
#annBar .annb-tx { position: absolute; top: 50%; left: 0; white-space: nowrap; font-size: 15px; font-weight: 700; color: #ffe9a8; letter-spacing: 0.2px;
  text-shadow: 0 0 2px #000, 0 1px 2px #000, 1px 0 1px #000, -1px 0 1px #000, 0 0 8px rgba(0, 0, 0, 0.8); transform: translate(var(--from, 100vw), -50%); }
#annBar.k-wb .annb-tx { color: #f0c8ff; }
#annBar.k-ld .annb-tx { color: #bfe2ff; }
#annBar .annb-tx.run { animation: annRun linear 1 forwards; }
@keyframes annRun { from { transform: translate(var(--from), -50%); } to { transform: translate(var(--to), -50%); } }
#annBar .annb-go { flex: 0 0 auto; padding: 2px 9px; border-radius: 12px; border: 1px solid rgba(255, 215, 106, 0.85); cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; color: #ffe08a; white-space: nowrap; pointer-events: auto;
  background: rgba(0, 0, 0, 0.35); text-shadow: 0 1px 1px #000; box-shadow: 0 0 8px rgba(255, 200, 80, 0.45); }
#annBar .annb-go:hover { background: rgba(0, 0, 0, 0.55); color: #fff3c4; }
/* dang o Tong Kim / Tieu Lo / loi dai: HUD chiem phia tren -> ha thap dai chu */
body.tking #annBar, body.vting #annBar, body.lding #annBar { top: 126px; }
@media (max-width: 899px), (orientation: portrait) {
  #annBar { top: 104px; left: 6px; right: 94px; height: 28px; }
  #annBar .annb-tag b { display: none; }
  #annBar .annb-tx { font-size: 13.5px; }
  #annBar .annb-go { padding: 2px 7px; font-size: 11.5px; }
  body.tking #annBar, body.vting #annBar, body.lding #annBar { top: 164px; }
}
@media (max-height: 500px) { #annBar { top: 40px; left: 200px; right: 200px; } body.tking #annBar, body.vting #annBar, body.lding #annBar { top: 100px; } }
@media (prefers-reduced-motion: reduce) { #annBar .annb-tag i { animation: none; } }
/* === VONG SANG (js/aura.js): bang suu tap === */
.aurx { display: flex; flex-direction: column; gap: 9px; }
.aurx-h { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; padding-right: 40px; border-bottom: 1px solid rgba(201, 161, 74, 0.35); }
.aurx-h small { display: block; color: #c9a14a; font-size: 10.5px; letter-spacing: 1px; }
.aurx-h h3 { margin: 0; color: #ffe08a; font-size: 19px; text-shadow: 0 1px 0 #000, 0 0 10px rgba(255, 190, 70, 0.45); }
.aurx-ic { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; font-size: 20px; background: radial-gradient(circle, #6a4aa0, #1a1030 70%); border: 1px solid #c8a8ff; box-shadow: 0 0 12px rgba(190, 140, 255, 0.6); }
.aurx-n { margin-left: auto; color: #c9b88f; font-size: 12px; white-space: nowrap; }
.aurx-n b { color: #ffd76a; }
.aurx-cur { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 8px; border: 1px solid #6e5528; background: radial-gradient(ellipse at 20% 60%, rgba(120, 90, 200, 0.18), transparent 60%), linear-gradient(180deg, #1e1810, #0e0b07); }
.aurx-cur > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.aurx-cur b { color: #ffe9a8; font-size: 14px; }
.aurx-cur small { color: #b9ad8a; font-size: 11.5px; }
.aurx-cur .btn { align-self: flex-start; margin-top: 3px; }
.aurx-cv { display: block; background: radial-gradient(ellipse at 50% 64%, rgba(255, 255, 255, 0.05), transparent 65%); }
.aurx-cv.big { width: 150px; height: 100px; flex: 0 0 150px; }
.aurx-tabs { display: flex; gap: 6px; }
.aurx-tabs button { flex: 1; padding: 6px 8px; border-radius: 6px; border: 1px solid #6e5528; background: linear-gradient(180deg, #3e3420, #221b0f); color: #e8d8b0; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.aurx-tabs button.on { background: linear-gradient(180deg, #fff0b4, #e6b852 48%, #a8771e); color: #3a2406; border-color: #fff2c0; }
.aurx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 8px; max-height: min(52vh, 460px); overflow-y: auto; padding: 2px; overscroll-behavior: contain; }
.aurx-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 6px 8px; border-radius: 8px; text-align: center; min-width: 0;
  border: 1px solid #4a3a20; background: linear-gradient(180deg, #221a0f, #0f0c07);
  border: 1px solid color-mix(in srgb, var(--tc) 45%, #3a2c16); background: radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--tc) 14%, transparent), transparent 70%), linear-gradient(180deg, #221a0f, #0f0c07); }
.aurx-card.t5 { box-shadow: 0 0 10px color-mix(in srgb, var(--tc) 40%, transparent), inset 0 0 12px color-mix(in srgb, var(--tc) 18%, transparent); }
.aurx-card.on { border-color: #ffe08a; box-shadow: 0 0 12px rgba(255, 210, 100, 0.65); }
.aurx-card:not(.own) .aurx-cv { opacity: 0.78; filter: saturate(0.8); }
.aurx-card .aurx-cv { width: 120px; height: 84px; }
.aurx-card b { font-size: 12.5px; line-height: 1.25; }
.aurx-card small { color: #b9ad8a; font-size: 10.5px; }
.aurx-card p { margin: 2px 0 4px; color: #9a8f74; font-size: 10.5px; line-height: 1.3; min-height: 2.6em; }
.aurx-card .btn { padding: 3px 14px; }
.aurx-tag { font-size: 11px; color: #3a2406; font-weight: 800; padding: 2px 10px; border-radius: 10px; background: linear-gradient(180deg, #fff0b4, #e6b852); }
.aurx-lock { font-size: 10.5px; color: #8a7f64; }
@media (max-width: 899px), (orientation: portrait) {
  .aurx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 50vh; }
  .aurx-card .aurx-cv { width: 110px; height: 77px; }
  .aurx-cv.big { width: 120px; height: 80px; flex-basis: 120px; }
}

/* ===== SAN BOSS SAT THU (js/satboss.js) ===== */
#satPill { position: fixed; left: 8px; top: 96px; z-index: 39; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; max-width: 190px; padding: 5px 10px; border: 1px solid #8a6d2c; border-radius: 8px; background: linear-gradient(180deg, rgba(36, 22, 14, 0.92), rgba(16, 10, 6, 0.9)); color: #e8dcb6; font: 600 11.5px/1.25 inherit; text-shadow: 0 1px 1px #000; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55); cursor: pointer; text-align: left; }
#satPill.hidden, body:has(#modal:not(.hidden)) #satPill { display: none; }
#satPill b { color: #ffb52e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
#satPill span { color: #c9bb92; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
#satPill.task { border-color: #f0cc6a; box-shadow: 0 0 10px rgba(255, 180, 60, 0.45), 0 2px 8px rgba(0, 0, 0, 0.55); }
body.u2m #satPill { top: 242px; font-size: 11px; max-width: 160px; }
@media (max-width: 899px) and (orientation: landscape) { body #satPill { top: 112px; } }
#satHud { position: fixed; left: 50%; top: 62px; transform: translateX(-50%); z-index: 34; width: min(340px, calc(100vw - 16px)); padding: 6px 10px 7px; border: 1px solid #8a6d2c; border-radius: 8px; background: linear-gradient(180deg, rgba(30, 14, 22, 0.9), rgba(12, 8, 10, 0.86)); box-shadow: 0 0 10px rgba(200, 80, 255, 0.25), 0 4px 14px rgba(0, 0, 0, 0.6); color: #f2e7c6; font-size: 12px; pointer-events: none; }
#satHud.hidden { display: none; }
#satHud .sth-top { display: flex; align-items: center; gap: 8px; }
#satHud .sth-top b { flex: 1; min-width: 0; color: #ffb52e; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#satHud .wbs-hp { height: 18px; margin: 5px 0 4px; }
#satHud .wbs-hp span { line-height: 16px; font-size: 11px; }
#satHud .sth-sub { font-size: 11.5px; line-height: 1.3; }
#satHud .sth-sub.ok { color: #8fe08a; } #satHud .sth-sub.no { color: #ff9a7a; }
#satHud .wbh-list { margin-top: 3px; display: grid; gap: 1px; }
#satHud .wbh-list div { display: flex; gap: 6px; padding: 1px 4px; border-radius: 3px; }
#satHud .wbh-list div.me { background: rgba(255, 205, 90, 0.15); }
#satHud .wbh-list b { width: 14px; color: #ffe6a0; }
#satHud .wbh-list span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#satHud .wbh-list em { font-style: normal; color: #ffb38a; font-weight: 700; }
body.u2m #satHud { top: 124px; }
@media (max-width: 899px), (orientation: portrait) { body.u2m #satHud { top: 104px; left: 8px; transform: none; width: calc(100vw - 104px); } }
@media (max-width: 899px) and (orientation: landscape) { body #satHud { top: 68px; width: min(280px, 44vw); } body #satHud .wbh-list { display: none; } }
/* he ngu hanh */
.s0 { color: #ffe08a; } .s1 { color: #7fe08a; } .s2 { color: #6ac8ff; } .s3 { color: #ff8a5a; } .s4 { color: #d8a85a; }
#satHud .sth-top span, .satb-b > span { font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 8px; background: rgba(0, 0, 0, 0.35); border: 1px solid currentColor; }
/* bang nhiem vu */
.satb .satb-head { display: flex; justify-content: space-between; gap: 8px; margin: 2px 0 6px; font-size: 13px; color: #e8dcb6; }
.satb .satb-head b { color: #ffe08a; }
.satb .satb-task { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; padding: 6px 10px; border-left: 3px solid #f0cc6a; border-radius: 4px; background: rgba(255, 205, 90, 0.08); }
.satb .satb-task > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.satb .satb-task b { color: #ffd24a; } .satb .satb-task small { color: #c9bb92; }
.satb .satb-task.none { display: block; color: #a99d7d; font-size: 12.5px; border-left-color: #6e5528; }
.satb .satb-task .btnrow { display: flex; gap: 6px; flex: none; margin: 0; }
.satb .wbs-info { margin: 0 0 8px; border: 1px solid #5c4a28; border-radius: 6px; background: rgba(0, 0, 0, 0.22); overflow: hidden; }
.satb .wbs-info summary { padding: 5px 10px; background: linear-gradient(90deg, #5c4518, rgba(40, 30, 14, 0.2)); color: #ffe6a0; font-weight: 700; font-size: 13px; cursor: pointer; }
.satb .wbs-info > p { margin: 6px 10px; }
.satb .satb-list { max-height: min(52vh, 460px); overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }
.satb .satb-map { margin: 0 0 6px; border: 1px solid #4e3e22; border-radius: 6px; background: rgba(0, 0, 0, 0.2); overflow: hidden; }
.satb .satb-mh { padding: 4px 10px; background: linear-gradient(90deg, rgba(92, 69, 24, 0.7), rgba(40, 30, 14, 0.15)); color: #ffe6a0; font-weight: 700; font-size: 12.5px; }
.satb .satb-mh small { color: #c9bb92; font-weight: 500; }
.satb .satb-b { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 6px; padding: 4px 8px; border-top: 1px dashed rgba(255, 215, 120, 0.1); font-size: 12.5px; }
.satb .satb-b b { color: #efe6c8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.satb .satb-b small { color: #a99d7d; font-size: 11px; }
.satb .satb-b em { font-style: normal; font-weight: 700; font-size: 11.5px; }
.satb .satb-b em.al { color: #8fe08a; } .satb .satb-b em.dd { color: #ff9a7a; }
.satb .satb-b.on { background: rgba(255, 205, 90, 0.12); }
.satb .satb-b .btn { padding: 2px 10px; min-width: 52px; }
@media (max-width: 520px) { .satb .satb-b { grid-template-columns: auto minmax(0, 1fr) auto auto; } .satb .satb-b small { display: none; } }
