/* ==========================================================================
   TÀNG KINH CÁC 3D — Đại Thế Giới Cổ Phong, Vũ Đạo Hip-Hop & Co-Stream LIVE
   Hỗ trợ cả Interactive Web/Mobile (/tang-kinh-cac/3d) & Nguồn OBS (/live/:tok)
   ========================================================================== */
:root {
  --ink-bg: #110c14;
  --panel-glass: rgba(24, 17, 25, 0.84);
  --panel-solid: #1c141f;
  --gold: #f4c86a;
  --gold-strong: #ffd97d;
  --amber: #e29d3e;
  --pink-live: #ff3e8a;
  --crimson: #b8332a;
  --cream: #fcf3e3;
  --muted: #cbbdc2;
  --line-gold: rgba(244, 200, 106, 0.34);
  --font-sans: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  --font-serif: 'Lora', Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a070d;
  color: var(--cream);
  font-family: var(--font-sans);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

input,
select,
button {
  font-family: inherit;
}

.tkc3d-root {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, #1d1422 0%, #09060c 100%);
}

.tkc3d-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #231b18;
}

body[data-aspect="auto"] .tkc3d-frame,
body[data-aspect="free"] .tkc3d-frame {
  width: 100%;
  height: 100%;
}

body[data-aspect="9:16"] .tkc3d-frame {
  width: min(100vw, 56.25dvh);
  height: min(177.7778vw, 100dvh);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.88);
}

body[data-aspect="16:9"] .tkc3d-frame {
  width: min(100vw, 177.7778dvh);
  height: min(56.25vw, 100dvh);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.85);
}

body[data-aspect="1:1"] .tkc3d-frame {
  width: min(100vw, 100dvh);
  height: min(100vw, 100dvh);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.86);
}

body[data-aspect="4:3"] .tkc3d-frame {
  width: min(100vw, 133.3333dvh);
  height: min(75vw, 100dvh);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.86);
}

body.is-interactive[data-aspect="9:16"] .tkc3d-frame,
body.is-interactive[data-aspect="16:9"] .tkc3d-frame,
body.is-interactive[data-aspect="1:1"] .tkc3d-frame,
body.is-interactive[data-aspect="4:3"] .tkc3d-frame {
  border-radius: 20px;
  border: 1.5px solid rgba(255, 62, 138, 0.55);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.92), 0 0 36px rgba(255, 62, 138, 0.22);
}

#world-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* ── Lớp Nhãn Tên 3D & Bong Bóng Chat trên đầu nhân vật ── */
.labels-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
}

.actor-tag {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  will-change: transform, opacity;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.actor-tag.is-compact .actor-name {
  padding: 1px 7px;
  font-size: 9.5px;
  opacity: 0.85;
  background: rgba(18, 13, 20, 0.68);
  border-color: rgba(244, 200, 106, 0.24);
}

.actor-tag.is-compact .actor-rank-pill,
.actor-tag.is-compact .actor-avatar {
  display: none !important;
}

.actor-tag.is-occluded {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.actor-bubble {
  max-width: 186px;
  padding: 4px 10px;
  border-radius: 11px;
  background: rgba(255, 250, 240, 0.90);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #241612;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  border: 1px solid rgba(96, 62, 34, 0.34);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
  animation: popIn 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.actor-bubble[hidden] {
  display: none !important;
}

.actor-bubble.is-gift {
  background: linear-gradient(135deg, #5e1326, #9e2236);
  color: #ffe89e;
  border-color: var(--gold);
}

.actor-name {
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(20, 14, 18, 0.78);
  border: 1px solid rgba(244, 200, 106, 0.38);
  color: #fff6e6;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  text-shadow: 0 1px 2px #000;
}

.actor-name.is-self {
  background: rgba(41, 88, 66, 0.88);
  border-color: #8bf0b9;
  color: #eafff2;
}

.actor-name.is-tiktok {
  background: linear-gradient(90deg, rgba(36, 14, 34, 0.9), rgba(68, 16, 48, 0.9));
  border-color: rgba(255, 92, 168, 0.75);
  color: #ffd8ec;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.86);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Đại Lễ Băng-Rôn 3D Nổi Giữa Màn Hình (Quà & Rồng Vàng 30+ Xu) ── */
.grand-3d-toast {
  position: absolute;
  top: 102px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 18;
  min-width: min(88%, 460px);
  max-width: 92%;
  padding: 10px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(122, 18, 28, 0.95), rgba(54, 12, 28, 0.95));
  border: 2px solid var(--gold-strong);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.65), 0 0 28px rgba(244, 200, 106, 0.45);
  text-align: center;
  pointer-events: none;
  animation: bannerDrop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

body.is-live-obs .grand-3d-toast {
  top: 76px;
}

.grand-3d-toast strong {
  display: block;
  font-size: 14.5px;
  font-weight: 900;
  color: var(--gold-strong);
  letter-spacing: 0.03em;
}

.grand-3d-toast span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #fff2dc;
}

@keyframes bannerDrop {
  from {
    opacity: 0;
    transform: translate(-50%, -18px) scale(0.92);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

/* ── Con dấu Chữ Triện chung ── */
.obs-seal {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(145deg, #c9382b, #8b1c15);
  border: 1.5px solid var(--gold);
  color: #fff5df;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 18px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

/* ══════════════════════════════════════════════════════════════════════════
   GIAO DIỆN CHƠI TƯƠNG TÁC WEB & MOBILE (body.is-interactive)
   ══════════════════════════════════════════════════════════════════════════ */
.hud-top {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
  pointer-events: none;
}

.hud-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  pointer-events: auto;
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  pointer-events: auto;
}

.hud-actions::-webkit-scrollbar {
  display: none;
}

.hud-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px 5px 6px;
  border-radius: 13px;
  background: var(--panel-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line-gold);
  color: var(--cream);
  text-decoration: none;
}

.hud-brand strong {
  display: block;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--gold);
}

.hud-brand small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
}

.hud-select,
.hud-btn {
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--panel-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line-gold);
  color: var(--cream);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.hud-select option {
  background: #1c141f;
  color: var(--cream);
}

.hud-btn:hover,
.hud-select:hover {
  border-color: var(--gold-strong);
  transform: translateY(-1px);
}

.hud-btn-pink {
  background: linear-gradient(135deg, #e32672, #9e1a66);
  border-color: #ff8ec0;
  color: #fff;
  box-shadow: 0 4px 14px rgba(227, 38, 114, 0.38);
}

.hud-btn-gold {
  background: linear-gradient(135deg, #e7b54e, #b87b1e);
  border-color: #ffe39c;
  color: #1e1208;
}

/* Cụm nút tròn Mưa / Gió / Chuông gió bên phải (phong cách XieHanzi) */
.hud-weather {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-54%);
  z-index: 11;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.weather-orb {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(34, 26, 22, 0.76);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(244, 200, 106, 0.45);
  color: #e7d8c3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  cursor: pointer;
  transition: all 0.16s ease;
  padding: 0;
}

.weather-orb span {
  font-size: 18px;
  line-height: 1;
}

.weather-orb small {
  font-size: 9.5px;
  font-weight: 700;
}

.weather-orb.is-on {
  background: radial-gradient(circle at 35% 30%, rgba(244, 200, 106, 0.42), rgba(74, 52, 24, 0.88));
  border-color: var(--gold-strong);
  color: #fff6dc;
  box-shadow: 0 0 16px rgba(244, 200, 106, 0.35);
}

/* Thanh dịch chuyển nhanh 7 Thế Giới */
.hud-zones {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 11;
  display: flex;
  gap: 5px;
  padding: 4px;
  border-radius: 99px;
  background: rgba(20, 14, 22, 0.84);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(244, 200, 106, 0.28);
  max-width: calc(100% - 18px);
  overflow-x: auto;
  scrollbar-width: none;
}

@media (max-width: 1460px) {
  .hud-zones {
    top: 54px;
  }
}

.hud-zones::-webkit-scrollbar {
  display: none;
}

.hud-zones button {
  border: 0;
  background: transparent;
  color: #dfd2c6;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 99px;
  white-space: nowrap;
  cursor: pointer;
}

.hud-zones button.is-on {
  background: linear-gradient(135deg, rgba(244, 200, 106, 0.28), rgba(196, 128, 38, 0.36));
  color: var(--gold-strong);
  box-shadow: inset 0 0 0 1px rgba(244, 200, 106, 0.55);
}

/* Thanh Emote & Gõ Lệnh Dưới Đáy */
.hud-bottom {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: min(780px, calc(100% - 16px));
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* Bố cục siêu gọn khi bật Khung Xem Trước TikTok 9:16 (body.is-interactive[data-aspect="9:16"]) */
.hud-btn-tiktok-frame.is-on {
  background: linear-gradient(135deg, #fe2c55, #25f4ee);
  color: #140914;
  border-color: #fff;
  font-weight: 900;
  box-shadow: 0 0 18px rgba(254, 44, 85, 0.55);
}

body.is-interactive[data-aspect="9:16"] .hud-top {
  top: 8px;
  left: 8px;
  right: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 6px;
}

body.is-interactive[data-aspect="9:16"] .hud-top::-webkit-scrollbar {
  display: none;
}

body.is-interactive[data-aspect="9:16"] .hud-left,
body.is-interactive[data-aspect="9:16"] .hud-actions {
  flex-wrap: nowrap;
  flex-shrink: 0;
  gap: 5px;
}

body.is-interactive[data-aspect="9:16"] .hud-zones {
  top: 56px;
}

body.is-interactive[data-aspect="9:16"] .hud-weather {
  right: 8px;
  top: 44%;
  gap: 7px;
}

body.is-interactive[data-aspect="9:16"] .weather-orb {
  width: 42px;
  height: 42px;
}

body.is-interactive[data-aspect="9:16"] .weather-orb span {
  font-size: 15px;
}

body.is-interactive[data-aspect="9:16"] .weather-orb small {
  font-size: 8px;
}

.tiktok-preview-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.tt-sim-top {
  position: absolute;
  top: 98px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(15, 10, 20, 0.62);
  border: 1px dashed rgba(37, 244, 238, 0.55);
  font-size: 10.5px;
  font-weight: 800;
  color: #ecfeff;
}

.tt-sim-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #ff6b8b;
}

.tt-sim-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fe2c55;
  animation: blinkDot 1.1s infinite;
}

.tt-sim-right {
  position: absolute;
  right: 10px;
  bottom: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 99px;
  background: rgba(15, 10, 20, 0.44);
  border: 1px dashed rgba(254, 44, 85, 0.45);
}

.tt-sim-right span {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 16px;
  line-height: 1.1;
  opacity: 0.78;
}

.tt-sim-right small {
  font-size: 8px;
  font-weight: 700;
  color: #fce7f3;
}

.emote-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: none;
}

.emote-strip::-webkit-scrollbar {
  display: none;
}

.emote-strip button {
  flex-shrink: 0;
  height: 31px;
  padding: 0 11px;
  border-radius: 99px;
  background: rgba(24, 17, 25, 0.84);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(244, 200, 106, 0.32);
  color: #f8ebd7;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.emote-strip button:hover {
  border-color: var(--gold);
  background: rgba(68, 46, 26, 0.9);
}

.chat-cmd-bar {
  display: flex;
  gap: 7px;
  background: var(--panel-glass);
  backdrop-filter: blur(12px);
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--line-gold);
}

.chat-cmd-bar input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 7, 13, 0.65);
  color: #fff;
  font-size: 13px;
  user-select: text;
}

.chat-cmd-bar input:focus {
  outline: none;
  border-color: var(--gold);
}

.chat-cmd-bar button {
  height: 36px;
  padding: 0 16px;
  border-radius: 9px;
  border: 0;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  color: #1f1206;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}

/* Cụm Nút Di Chuyển 4 Hướng + Joystick Kép (Desktop & Mobile) */
.joy-wrap {
  position: absolute;
  left: 14px;
  bottom: 112px;
  z-index: 11;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

body.is-interactive:not(.is-zen-focus) .joy-wrap {
  display: flex;
}

body.is-interactive[data-aspect="9:16"] .joy-wrap {
  left: 8px;
  bottom: 106px;
  transform: scale(0.84);
  transform-origin: left bottom;
}

.joy-base {
  width: 98px;
  height: 98px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(24, 18, 28, 0.72), rgba(14, 10, 18, 0.85));
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(244, 200, 106, 0.45);
  position: relative;
  touch-action: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.dpad-btn {
  position: absolute;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid rgba(244, 200, 106, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(254, 240, 138, 0.88);
  font-size: 10.5px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
  touch-action: none;
  user-select: none;
  transition: background 0.12s, border-color 0.12s, transform 0.1s;
}

.dpad-btn:hover,
.dpad-btn.is-held {
  background: rgba(244, 200, 106, 0.34);
  border-color: var(--gold);
  color: #fff;
}

.dpad-up { top: 3px; left: 50%; transform: translateX(-50%); }
.dpad-down { bottom: 3px; left: 50%; transform: translateX(-50%); }
.dpad-left { left: 3px; top: 50%; transform: translateY(-50%); }
.dpad-right { right: 3px; top: 50%; transform: translateY(-50%); }
.dpad-up:active, .dpad-up.is-held { transform: translateX(-50%) scale(0.92); }
.dpad-down:active, .dpad-down.is-held { transform: translateX(-50%) scale(0.92); }
.dpad-left:active, .dpad-left.is-held { transform: translateY(-50%) scale(0.92); }
.dpad-right:active, .dpad-right.is-held { transform: translateY(-50%) scale(0.92); }

.joy-stick {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe399, #c98c2e);
  position: absolute;
  left: 30.5px;
  top: 30.5px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 1;
}

.joy-sprint-btn {
  height: 25px;
  padding: 0 11px;
  border-radius: 99px;
  border: 1px solid rgba(244, 200, 106, 0.38);
  background: rgba(20, 14, 24, 0.84);
  backdrop-filter: blur(8px);
  color: #f8ebd7;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.joy-sprint-btn:hover {
  border-color: var(--gold);
}

.joy-sprint-btn.is-on {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.88), rgba(217, 119, 6, 0.92));
  border-color: #fef08a;
  color: #1c1004;
}

/* ══════════════════════════════════════════════════════════════════════════
   GIAO DIỆN SẠCH CHO OBS / TIKTOK LIVE STUDIO (body.is-live-obs)
   ══════════════════════════════════════════════════════════════════════════ */
.obs-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.obs-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 7px;
  border-radius: 14px;
  background: rgba(18, 12, 20, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-gold);
}

.obs-brand small {
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--gold);
  font-weight: 800;
}

.obs-brand strong {
  display: block;
  font-size: 13px;
  color: #fff;
}

.obs-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.obs-pill {
  padding: 5px 10px;
  border-radius: 99px;
  background: rgba(18, 12, 20, 0.8);
  border: 1px solid rgba(244, 200, 106, 0.35);
  font-size: 11px;
  font-weight: 700;
  color: #f9ecd8;
}

.obs-pill-live {
  background: rgba(185, 28, 48, 0.88);
  border-color: #ff8da1;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.obs-pill-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: blinkDot 1.1s infinite;
}

@keyframes blinkDot {
  50% {
    opacity: 0.3;
  }
}

.obs-cmd-card {
  position: absolute;
  right: 12px;
  top: 158px;
  z-index: 11;
  width: 188px;
  padding: 10px 11px;
  border-radius: 14px;
  background: rgba(18, 12, 22, 0.78);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(244, 200, 106, 0.35);
}

.obs-cmd-card h4 {
  margin: 0 0 6px;
  font-size: 10.5px;
  color: var(--gold-strong);
  text-align: center;
  letter-spacing: 0.04em;
}

.obs-cmd-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 10.5px;
  color: #efe2d2;
}

.obs-cmd-card b {
  color: #ff9ec7;
}

.obs-bottom {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 12;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(18, 12, 22, 0.84);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line-gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.obs-book-info {
  min-width: 0;
  flex: 1;
}

.obs-kicker {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.06em;
}

.obs-book-info strong {
  display: block;
  font-size: 13.5px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.obs-book-info p {
  margin: 3px 0 0;
  font-size: 11.5px;
  color: #dfd2c5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.obs-qr {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: #fff;
  padding: 4px;
  border-radius: 9px;
}

.obs-qr img {
  display: block;
  border-radius: 4px;
}

.obs-qr small {
  font-size: 8.5px;
  font-weight: 800;
  color: #1b1218;
  max-width: 68px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.obs-unmute {
  position: absolute;
  left: 50%;
  bottom: 108px;
  transform: translateX(-50%);
  z-index: 16;
  padding: 9px 16px;
  border-radius: 99px;
  border: 1.5px solid var(--gold);
  background: rgba(24, 16, 26, 0.92);
  color: var(--gold-strong);
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

/* ══════════════════════════════════════════════════════════════════════════
   HỘP THOẠI MODAL (CHỌN NHÂN VẬT · TIKTOK LIVE DEMO 6 BƯỚC · CO-STREAM)
   ══════════════════════════════════════════════════════════════════════════ */
.tkc3d-modal {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: rgba(8, 5, 12, 0.72);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 14px;
  overflow-y: auto;
}

.modal-card {
  width: min(520px, 100%);
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  background: linear-gradient(180deg, #221826 0%, #161019 100%);
  border: 1.5px solid var(--line-gold);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
}

.modal-card.modal-wide {
  width: min(650px, 100%);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-kicker {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.modal-head h2 {
  margin: 3px 0 0;
  font-family: var(--font-serif);
  font-size: 20px;
  color: #fff6e6;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--cream);
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
}

.field-row {
  margin-bottom: 13px;
}

.field-row>label,
.tt-connect-box>label,
.tt-demo-box>label,
.cs-result-box>label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #eadbc9;
  margin-bottom: 6px;
}

.field-row input,
.field-row select,
.tt-row input,
.tt-row select {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(244, 200, 106, 0.3);
  background: rgba(9, 6, 12, 0.7);
  color: #fff;
  font-size: 13px;
  user-select: text;
}

.rig-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.rig-tabs button {
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream);
  cursor: pointer;
}

.rig-tabs button strong {
  display: block;
  font-size: 12.5px;
}

.rig-tabs button small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.rig-tabs button.is-on,
.preset-grid button.is-on {
  border-color: var(--gold-strong);
  background: rgba(244, 200, 106, 0.16);
  color: #fff7df;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.preset-grid button {
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.color-dots {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.color-dots button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
}

.color-dots button.is-on {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--gold-strong);
  transform: scale(1.1);
}

.btn-enter-world {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(135deg, var(--gold-strong), #cf8c28);
  color: #1e1105;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 8px 20px rgba(207, 140, 40, 0.35);
}

/* Modal TikTok LIVE & Demo 6 bước */
.tt-connect-box,
.tt-demo-box,
.cs-result-box {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(244, 200, 106, 0.22);
  margin-bottom: 12px;
}

.tt-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.tt-row>input {
  flex: 1.3;
  min-width: 160px;
}

.tt-row>select {
  flex: 1;
  min-width: 150px;
}

.modal-hint {
  margin: 7px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}

.btn-demo-party {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid #ff99c8;
  background: linear-gradient(135deg, #ff2e88, #b5177e);
  color: #fff;
  font-size: 13.5px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(255, 46, 136, 0.38);
  margin-bottom: 10px;
}

.demo-6-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.demo-6-grid button {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(16, 11, 20, 0.78);
  color: #f6e9d8;
  font-size: 11.5px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  line-height: 1.35;
}

.demo-6-grid button code {
  color: #ff94c4;
  font-weight: 800;
}

.demo-6-grid button.is-dragon {
  border-color: var(--gold-strong);
  background: linear-gradient(135deg, rgba(132, 26, 36, 0.75), rgba(76, 46, 14, 0.75));
  color: #ffe9a6;
}

.tt-cmd-guide strong {
  display: block;
  font-size: 11.5px;
  color: var(--gold);
  margin-bottom: 6px;
}

.cmd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.cmd-tags span {
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px;
  color: #ded1c5;
}

.cmd-tags b {
  color: #ff9ec7;
}

/* Tương thích màn hình nhỏ Điện thoại (<640px) */
@media (max-width: 640px) {
  .hud-brand div {
    display: none;
  }

  .hud-btn,
  .hud-select {
    height: 32px;
    padding: 0 9px;
    font-size: 11px;
  }

  .hud-zones {
    top: 90px;
  }

  .weather-orb {
    width: 44px;
    height: 44px;
  }

  .weather-orb small {
    font-size: 8.5px;
  }

  .rig-tabs,
  .demo-6-grid,
  .preset-grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .obs-cmd-card {
    width: 152px;
    padding: 8px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   V2: ĐA VŨ TRỤ 5 CỔNG KẾT GIỚI MỜ ẢO & HỆ THỐNG CÂU CÁ PLAY TOGETHER
   ══════════════════════════════════════════════════════════════════════════ */
.hud-btn-silver {
  background: linear-gradient(135deg, rgba(32, 46, 62, 0.92), rgba(20, 29, 42, 0.92));
  border-color: rgba(142, 224, 255, 0.55);
  color: #e6f8ff;
}

.preset-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 640px) {
  .preset-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Màn sương chuyển cảnh mượt 0.45s khi bước qua Cổng Kết Giới */
.portal-veil-fx {
  position: absolute;
  inset: 0;
  z-index: 26;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(36, 26, 48, 0.88) 0%, rgba(10, 7, 15, 0.98) 100%);
  backdrop-filter: blur(16px);
  opacity: 0;
  transition: opacity 0.34s ease;
  pointer-events: none;
}

.portal-veil-fx.is-active {
  opacity: 1;
}

.portal-veil-inner {
  text-align: center;
  padding: 22px 32px;
  border-radius: 22px;
  border: 1.5px solid rgba(244, 200, 106, 0.48);
  background: rgba(18, 12, 26, 0.72);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 40px rgba(244, 200, 106, 0.22);
}

.portal-veil-inner span {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--gold);
}

.portal-veil-inner strong {
  display: block;
  margin: 6px 0 4px;
  font-family: var(--font-serif);
  font-size: 24px;
  color: #fff8eb;
}

.portal-veil-inner small {
  display: block;
  font-size: 12.5px;
  color: #d6c8d8;
}

/* Biển treo lơ lửng trước mỗi Cánh Cửa Kết Giới */
.portal-door-tag {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -100%);
  padding: 6px 12px;
  border-radius: 13px;
  background: rgba(17, 12, 24, 0.84);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(244, 200, 106, 0.52);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.52);
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
}

.portal-door-tag strong {
  display: block;
  font-size: 12px;
  color: var(--gold-strong);
}

.portal-door-tag small {
  display: block;
  margin-top: 1px;
  font-size: 10.5px;
  color: #e4d8eb;
}

/* Nút tương tác ngữ cảnh (Bước qua Cửa / Ngồi Xích Đu / Bập Bênh / Tiệm Cá) */
.world-interact-btn {
  position: absolute;
  left: 50%;
  bottom: 104px;
  transform: translateX(-50%);
  z-index: 15;
  height: 42px;
  padding: 0 20px;
  border-radius: 99px;
  border: 2px solid #ffe59e;
  background: linear-gradient(135deg, #f3be52, #ba7618);
  color: #1d1004;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), 0 0 22px rgba(244, 200, 106, 0.55);
  animation: pulseInteract 1.5s ease-in-out infinite;
}

@keyframes pulseInteract {

  0%,
  100% {
    transform: translateX(-50%) scale(1);
  }

  50% {
    transform: translateX(-50%) scale(1.04);
  }
}

/* ── Cụm Nút Câu Cá Play Together bên bờ Hồ ── */
.fishing-dock {
  position: absolute;
  right: 16px;
  bottom: 106px;
  z-index: 14;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}

.btn-fish-cast {
  height: 46px;
  padding: 0 20px;
  border-radius: 99px;
  border: 2px solid #9beeff;
  background: linear-gradient(135deg, #1b8ec7, #11538c);
  color: #fff;
  font-size: 13.5px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(17, 83, 140, 0.55);
  transition: transform 0.12s ease;
}

.btn-fish-cast.is-biting {
  border-color: #fff3a1;
  background: linear-gradient(135deg, #ff4b3a, #c8193c);
  box-shadow: 0 0 28px rgba(255, 75, 58, 0.85);
  animation: shakeBite 0.24s infinite;
}

@keyframes shakeBite {

  0%,
  100% {
    transform: scale(1.05) rotate(-1.5deg);
  }

  50% {
    transform: scale(1.09) rotate(1.5deg);
  }
}

.btn-fish-sub {
  height: 32px;
  padding: 0 13px;
  border-radius: 99px;
  border: 1px solid rgba(155, 238, 255, 0.42);
  background: rgba(16, 24, 36, 0.86);
  color: #dff6ff;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.btn-fish-sub.is-on {
  border-color: var(--gold-strong);
  background: rgba(66, 48, 16, 0.92);
  color: var(--gold-strong);
}

/* Thanh Canh Lực Giật Cần & Chấm Than ❗ Đớp Mồi */
.fish-bite-ui {
  position: absolute;
  left: 50%;
  top: 30%;
  transform: translate(-50%, -50%);
  z-index: 19;
  width: min(320px, 84vw);
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(16, 12, 24, 0.9);
  border: 2px solid #ffd86b;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.72), 0 0 26px rgba(255, 216, 107, 0.45);
  text-align: center;
  pointer-events: none;
}

.fish-bite-bang {
  font-size: 14px;
  font-weight: 900;
  color: #ffe885;
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}

.fish-timing-track {
  position: relative;
  height: 16px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.fish-timing-sweet {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 34%;
  width: 32%;
  background: linear-gradient(90deg, #32d583, #a6f4c5, #32d583);
  border-radius: 99px;
  box-shadow: 0 0 12px rgba(50, 213, 131, 0.8);
}

.fish-timing-needle {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 6px;
  left: 50%;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 0 8px #ff3e8a;
}

/* Thẻ Khoe Cá Vừa Câu Được (Play Together Overhead Showcase) */
.fish-catch-card {
  position: absolute;
  left: 50%;
  top: 152px;
  transform: translateX(-50%);
  z-index: 20;
  min-width: 260px;
  max-width: 90vw;
  padding: 12px 20px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(20, 28, 44, 0.95), rgba(14, 16, 28, 0.95));
  border: 2px solid #7cd4fd;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.72), 0 0 28px rgba(124, 212, 253, 0.4);
  text-align: center;
  pointer-events: none;
  animation: bannerDrop 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.fish-rarity-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  background: rgba(124, 212, 253, 0.22);
  color: #9beeff;
}

.fish-rarity-pill.rarity-funny {
  background: rgba(164, 174, 190, 0.25);
  color: #e2e8f0;
}

.fish-rarity-pill.rarity-common {
  background: rgba(74, 222, 128, 0.22);
  color: #86efac;
}

.fish-rarity-pill.rarity-rare {
  background: rgba(56, 189, 248, 0.25);
  color: #7dd3fc;
}

.fish-rarity-pill.rarity-epic {
  background: rgba(192, 132, 252, 0.28);
  color: #e9d5ff;
}

.fish-rarity-pill.rarity-legendary {
  background: linear-gradient(90deg, #b45309, #ca8a04);
  color: #fef08a;
}

.fish-catch-card strong {
  display: block;
  font-size: 16px;
  color: #fff;
}

.fish-catch-meta {
  margin-top: 4px;
  font-size: 12.5px;
  color: #d6e8f5;
  display: flex;
  justify-content: center;
  gap: 7px;
  align-items: center;
}

.fish-catch-meta b {
  color: #ffe27a;
}

.fish-catch-meta em {
  font-style: normal;
  color: #7ef2b8;
  font-weight: 700;
}

/* ── Modal Tiệm Ông Lão Ngư Phủ & Sổ Tay Đồ Giám Cá ── */
.fish-wallet-banner {
  padding: 11px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(23, 52, 74, 0.72), rgba(22, 30, 48, 0.85));
  border: 1px solid rgba(125, 211, 252, 0.4);
  margin-bottom: 12px;
}

.fish-wallet-banner strong {
  display: block;
  font-size: 14px;
  color: #e0f2fe;
}

.fish-wallet-banner strong span {
  color: var(--gold-strong);
  font-size: 16px;
}

.fish-wallet-banner small {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  color: #bae6fd;
}

.shop-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.shop-tabs button {
  flex: 1;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.shop-tabs button.is-on {
  border-color: var(--gold-strong);
  background: rgba(244, 200, 106, 0.18);
  color: var(--gold-strong);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 560px) {
  .shop-grid {
    grid-template-columns: 1fr;
  }
}

.shop-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.shop-item strong {
  display: block;
  font-size: 12.5px;
  color: #fff6e5;
}

.shop-item small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.shop-item button {
  flex-shrink: 0;
  height: 32px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--gold);
  background: linear-gradient(135deg, #e7b54e, #b87b1e);
  color: #1e1105;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}

.shop-item button.is-equipped {
  background: rgba(50, 213, 131, 0.22);
  border-color: #6ce9a6;
  color: #a6f4c5;
}

.dex-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-height: 330px;
  overflow-y: auto;
  padding-right: 2px;
}

@media (max-width: 600px) {
  .dex-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dex-card {
  padding: 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(244, 200, 106, 0.28);
  text-align: center;
}

.dex-card.is-locked {
  opacity: 0.48;
  border-color: rgba(255, 255, 255, 0.1);
  filter: grayscale(0.9);
}

.dex-card .dex-icon {
  font-size: 22px;
  display: block;
  margin-bottom: 3px;
}

.dex-card strong {
  display: block;
  font-size: 11.5px;
  color: #fff;
}

.dex-card small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: #cbd5e1;
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
}

.rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12.5px;
}

.rank-row b {
  color: var(--gold-strong);
}

/* ── Kho Mô Hình Nhân Vật .VRM / .GLB trên Cloudflare R2 ── */
.r2-model-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 560px) {
  .r2-model-grid {
    grid-template-columns: 1fr;
  }
}

.r2-model-card {
  text-align: left;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.r2-model-card:hover {
  border-color: rgba(244, 200, 106, 0.65);
  transform: translateY(-1px);
}

.r2-model-card.is-on {
  border-color: var(--gold-strong);
  background: linear-gradient(135deg, rgba(244, 200, 106, 0.24), rgba(180, 110, 32, 0.18));
  box-shadow: 0 0 18px rgba(244, 200, 106, 0.22);
}

.r2-model-card strong {
  display: block;
  font-size: 12.5px;
  color: #fff8ea;
}

.r2-model-card small {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: #d8c7a8;
}

.r2-upload-bar {
  display: flex;
  gap: 8px;
  margin-top: 9px;
  align-items: center;
  flex-wrap: wrap;
}

.r2-upload-bar input[type="text"] {
  flex: 1;
  min-width: 170px;
}

.r2-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2d6a4f, #1b4332);
  border: 1px solid #74c69d;
  color: #ecfdf5;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.r2-file-btn:hover {
  filter: brightness(1.1);
}

.r2-upload-hint {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}

/* ── Thanh Điều Khiển Nổi Hồ Cá ZenAqua 3D & Rạp Chiếu Phim IMAX ── */
.zenaqua-dock,
.cinema-dock {
  position: absolute;
  left: 50%;
  bottom: 104px;
  transform: translateX(-50%);
  z-index: 13;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 99px;
  background: rgba(12, 28, 36, 0.86);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(94, 234, 212, 0.45);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  max-width: calc(100vw - 20px);
  overflow-x: auto;
  scrollbar-width: none;
}

.cinema-dock {
  background: rgba(34, 12, 22, 0.88);
  border-color: rgba(251, 191, 36, 0.48);
}

.zenaqua-dock::-webkit-scrollbar,
.cinema-dock::-webkit-scrollbar {
  display: none;
}

.zen-btn {
  flex-shrink: 0;
  height: 32px;
  padding: 0 12px;
  border-radius: 99px;
  border: 1px solid rgba(153, 246, 228, 0.35);
  background: rgba(20, 56, 68, 0.72);
  color: #ecfeff;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.14s ease, filter 0.14s ease, border-color 0.14s ease;
}

.cinema-dock .zen-btn {
  background: rgba(68, 22, 36, 0.76);
  border-color: rgba(251, 191, 36, 0.38);
  color: #fef3c7;
}

.zen-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.14);
}

.zen-btn-primary {
  background: linear-gradient(135deg, #0d9488, #0284c7);
  border-color: #99f6e4;
  color: #ffffff;
}

.cinema-dock .zen-btn-primary {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  border-color: #fde68a;
  color: #fffbeb;
}

.cinema-react-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
}

.cinema-react-btn {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  font-size: 15px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease;
}

.cinema-react-btn:hover {
  transform: scale(1.18);
  background: rgba(251, 191, 36, 0.28);
}

/* Hiệu ứng Lặn Dưới Hồ ZenAqua & Chế Độ Thiền (Zen Focus) */
body.is-underwater .tkc3d-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background: radial-gradient(circle at 50% 25%, rgba(125, 249, 255, 0.12) 0%, rgba(8, 68, 88, 0.38) 100%);
}

.zen-exit-pill {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 25;
  height: 36px;
  padding: 0 15px;
  border-radius: 99px;
  border: 1.5px solid #99f6e4;
  background: rgba(11, 44, 54, 0.85);
  backdrop-filter: blur(10px);
  color: #ecfeff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}

body.is-zen-focus .hud-top,
body.is-zen-focus .hud-zones,
body.is-zen-focus .hud-weather,
body.is-zen-focus .hud-bottom,
body.is-zen-focus .joy-wrap,
body.is-zen-focus .fishing-dock,
body.is-zen-focus .live-stage-hud {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* ==========================================================================
   V5 — AVATAR TRÒN TIKTOK LIVE · CẢNH GIỚI TU VI · SÂN KHẤU LIVE & MINI-GAME
   ========================================================================== */
.actor-name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px 2px 5px;
}

.actor-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #ff8ec7;
  background: #2b1628;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.actor-avatar-fallback {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 10px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #fe2c55, #9333ea);
  border: 1.5px solid #ffd97d;
  flex-shrink: 0;
}

.actor-rank {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 99px;
  font-size: 9.5px;
  font-weight: 800;
  background: rgba(15, 10, 22, 0.82);
  border: 1px solid rgba(255, 217, 125, 0.55);
  color: #ffe59e;
  letter-spacing: 0.01em;
}

.actor-tag.is-spotlight .actor-name {
  transform: scale(1.08);
  border-color: #ffd24c;
  box-shadow: 0 0 18px rgba(255, 210, 76, 0.65);
}

.hud-btn-code {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(14, 34, 52, 0.85);
}

.hud-btn-code b {
  color: #7dd3fc;
  letter-spacing: 0.05em;
}

#btn-auto-director.is-on {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #fef08a;
  color: #1c1004;
  font-weight: 900;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.52);
}

/* Lớp HUD Sân Khấu Live dùng chung cho OBS (/live/:token) & Khung 9:16 / Đạo Diễn */
.live-stage-hud {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  display: none;
}

body.is-live-obs .live-stage-hud,
body[data-aspect="9:16"] .live-stage-hud,
.live-stage-hud.is-active {
  display: block;
}

.live-like-meter {
  position: absolute;
  top: 62px;
  left: 12px;
  right: 12px;
  height: 28px;
  padding: 0 10px;
  border-radius: 99px;
  background: rgba(18, 11, 24, 0.84);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 92, 168, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.42);
}

body.is-interactive .live-like-meter {
  top: 128px;
  left: 10px;
  right: auto;
  width: min(330px, calc(100% - 20px));
}

.live-like-kicker {
  font-size: 9.5px;
  font-weight: 900;
  color: #ff9ec7;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.live-like-track {
  flex: 1;
  height: 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.live-like-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #ff3e8a, #fbbf24, #fde047);
  box-shadow: 0 0 12px rgba(255, 62, 138, 0.75);
  transition: width 0.25s ease;
}

.live-like-meter strong {
  font-size: 10.5px;
  font-weight: 900;
  color: #fff3d6;
  white-space: nowrap;
}

.live-festival-pill,
.live-welcome-pill {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  animation: bannerDrop 0.3s ease;
}

.live-festival-pill {
  top: 96px;
  background: linear-gradient(135deg, rgba(190, 24, 93, 0.95), rgba(124, 45, 18, 0.95));
  border: 1.5px solid #fde047;
  color: #fef9c3;
  z-index: 14;
}

.live-welcome-pill {
  top: 96px;
  background: linear-gradient(135deg, rgba(22, 38, 68, 0.94), rgba(59, 20, 68, 0.94));
  border: 1.5px solid #7dd3fc;
  color: #f0f9ff;
  z-index: 13;
}

body.is-interactive .live-festival-pill,
body.is-interactive .live-welcome-pill {
  top: 162px;
}

.live-welcome-pill b {
  color: #fde047;
}

.live-welcome-pill strong {
  color: #ff9ec7;
}

/* Bảng Menu Gõ 1 Số 1–5 Thông Minh Theo Ngữ Cảnh Phòng */
.live-stage-hud .obs-cmd-card {
  top: 98px;
  right: 12px;
  width: 178px;
  padding: 8px 10px;
}

body.is-interactive .live-stage-hud .obs-cmd-card {
  top: 164px;
  right: 10px;
  width: 170px;
}

.obs-numpad-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.obs-cmd-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: #f3e8da;
  padding: 2px 4px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
}

.obs-cmd-row b {
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 5px;
  background: rgba(255, 62, 138, 0.25);
  border: 1px solid rgba(255, 130, 186, 0.65);
  color: #ffd7ea;
  font-size: 10px;
  font-weight: 900;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}

.obs-cmd-row.is-hot b {
  background: rgba(245, 158, 11, 0.32);
  border-color: #fde047;
  color: #fef9c3;
}

.obs-cmd-row.is-gift {
  background: linear-gradient(90deg, rgba(120, 28, 48, 0.45), rgba(78, 46, 12, 0.45));
}

.obs-cmd-row.is-gift b {
  min-width: auto;
  border-color: #ffd24c;
  color: #ffe58f;
}

/* Bảng Mini-Game Trực Tiếp Trên Stream (Đua Linh Ngư 4 Làn & Vote Truyện A/B/C) */
.live-minigame-card {
  position: absolute;
  top: 98px;
  left: 12px;
  width: min(295px, calc(100% - 24px));
  padding: 9px 11px;
  border-radius: 14px;
  background: rgba(12, 22, 36, 0.88);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(56, 189, 248, 0.65);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
  z-index: 15;
}

body.is-interactive .live-minigame-card {
  top: 164px;
  left: 10px;
}

/* Trên khung dọc 9:16 hẹp, khi Mini-Game đang mở thì đẩy bảng Numpad xuống dưới để 0 đè nhau! */
#live-minigame-card:not([hidden])~#live-numpad-card {
  top: 268px;
}

body.is-interactive #live-minigame-card:not([hidden])~#live-numpad-card {
  top: 332px;
}

.mg-head {
  font-size: 11px;
  font-weight: 900;
  color: #fde047;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.mg-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mg-lane,
.mg-vote-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 3px 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.mg-lane.is-winner,
.mg-vote-row.is-winner {
  background: rgba(250, 204, 21, 0.22);
  box-shadow: inset 0 0 0 1px #fde047;
}

.mg-lane-label,
.mg-vote-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  color: #f1f5f9;
}

.mg-lane-label b,
.mg-vote-top b {
  color: #7dd3fc;
}

.mg-lane-label em,
.mg-vote-top em {
  font-style: normal;
  color: #cbd5e1;
  font-size: 9.5px;
}

.mg-lane-track {
  position: relative;
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: visible;
}

.mg-lane-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.22s linear;
}

.mg-lane-icon {
  position: absolute;
  top: -6px;
  font-size: 12px;
  line-height: 1;
  transition: left 0.22s linear;
}

.obs-book-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}

.room-code-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(14, 116, 144, 0.45);
  border: 1px solid rgba(103, 232, 249, 0.65);
  color: #ecfeff;
  font-size: 10px;
  font-weight: 700;
}

.room-code-pill b {
  color: #fde047;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.tt-numpad-sim-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(244, 200, 106, 0.35);
}

.tt-numpad-sim-bar small {
  font-size: 11px;
  color: #e2d5c8;
  margin-right: 4px;
}

.tt-numpad-sim-bar button {
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 142, 199, 0.6);
  background: rgba(190, 24, 93, 0.35);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.tt-numpad-sim-bar button:hover {
  background: rgba(225, 29, 72, 0.65);
}

/* Cho phép bấm trực tiếp vào các nút Menu 1–5, Làn Cá 1–4, Vote Truyện A–C & Thanh Tim trên Web/Mobile! */
body.is-interactive .live-stage-hud .obs-cmd-card,
body.is-interactive .live-stage-hud .live-minigame-card,
body.is-interactive .live-stage-hud .live-like-card {
  pointer-events: auto;
}

body.is-interactive .live-stage-hud .live-like-card {
  cursor: pointer;
  transition: transform 0.12s, border-color 0.15s;
}

body.is-interactive .live-stage-hud .live-like-card:hover {
  border-color: #ff9ec4;
  transform: scale(1.015);
}

body.is-interactive .live-stage-hud .obs-cmd-row[data-live-cmd],
body.is-interactive .live-stage-hud .mg-lane[data-bet-lane],
body.is-interactive .live-stage-hud .mg-vote-row[data-vote-key] {
  cursor: pointer;
  user-select: none;
  transition: background 0.14s, transform 0.1s, box-shadow 0.14s;
}

body.is-interactive .live-stage-hud .obs-cmd-row[data-live-cmd]:hover,
body.is-interactive .live-stage-hud .mg-lane[data-bet-lane]:hover,
body.is-interactive .live-stage-hud .mg-vote-row[data-vote-key]:hover {
  background: rgba(254, 240, 138, 0.16);
  box-shadow: inset 0 0 0 1px rgba(253, 224, 71, 0.55);
}

body.is-interactive .live-stage-hud .obs-cmd-row[data-live-cmd]:active,
body.is-interactive .live-stage-hud .mg-lane[data-bet-lane]:active,
body.is-interactive .live-stage-hud .mg-vote-row[data-vote-key]:active {
  transform: scale(0.97);
}

/* ==========================================================================
   V6 — NGƯỜI ĐỌC TRUYỆN 3D · TỦ ĐỒ 20 BỘ TRANG PHỤC · QUÀ MỞ CHƯƠNG AN TOÀN TIKTOK
   ========================================================================== */
.actor-name.is-storyteller-badge {
  background: linear-gradient(135deg, rgba(114, 24, 34, 0.94), rgba(58, 30, 14, 0.94));
  border: 1.5px solid #ffd97d;
  color: #fff7df;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55), 0 0 14px rgba(244, 200, 106, 0.42);
}

.actor-name.is-patron-vip {
  border-color: #fde047;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.6);
}

.obs-patron-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 99px;
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.85), rgba(153, 27, 27, 0.85));
  border: 1px solid #fde047;
  color: #fef9c3;
  font-size: 10px;
  font-weight: 800;
}

body.is-tiktok-safe .tiktok-safe-hide {
  display: none !important;
}

/* ── Tủ Đồ 20 Bộ Trang Phục (#modal-wardrobe) ── */
.wardrobe-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(64, 24, 52, 0.65), rgba(26, 18, 36, 0.82));
  border: 1px solid rgba(255, 142, 199, 0.45);
  margin-bottom: 10px;
}

.wardrobe-banner strong {
  display: block;
  font-size: 13px;
  color: #ffeaf4;
}

.wardrobe-banner small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #e2d4dc;
  line-height: 1.4;
}

.wardrobe-banner code {
  color: #fde047;
  font-weight: 800;
}

.wardrobe-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 10px;
  scrollbar-width: none;
}

.wardrobe-tabs::-webkit-scrollbar {
  display: none;
}

.wardrobe-tabs button {
  flex-shrink: 0;
  height: 31px;
  padding: 0 12px;
  border-radius: 99px;
  border: 1px solid rgba(244, 200, 106, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: #e7dacb;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.wardrobe-tabs button.is-on {
  background: linear-gradient(135deg, rgba(244, 200, 106, 0.32), rgba(227, 38, 114, 0.34));
  border-color: var(--gold-strong);
  color: #fff;
}

.wardrobe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 3px;
}

@media (max-width: 560px) {
  .wardrobe-grid {
    grid-template-columns: 1fr;
  }
}

.wardrobe-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 4px;
  text-align: left;
  padding: 10px 12px;
  border-radius: 13px;
  border: 1.5px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream);
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.wardrobe-card:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 200, 106, 0.65);
}

.wardrobe-card.is-on {
  border-color: var(--gold-strong);
  background: linear-gradient(135deg, rgba(244, 200, 106, 0.24), rgba(190, 24, 93, 0.22));
  box-shadow: 0 0 16px rgba(244, 200, 106, 0.24);
}

.wardrobe-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wardrobe-code,
.wardrobe-id-pill {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(244, 200, 106, 0.2);
  border: 1px solid rgba(244, 200, 106, 0.48);
  color: #fde047;
  font-size: 10px;
  font-weight: 900;
  flex-shrink: 0;
}

.wardrobe-card strong {
  display: block;
  font-size: 13px;
  color: #fff8eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wardrobe-card small {
  display: block;
  font-size: 10.5px;
  line-height: 1.35;
  color: #d7c7b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wardrobe-swatch-pair,
.wardrobe-swatches {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.wardrobe-swatch-pair i,
.wardrobe-swatches i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.78);
  margin-left: -4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
}

.wardrobe-swatch-pair i:first-child,
.wardrobe-swatches i:first-child {
  margin-left: 0;
}

body[data-aspect="9:16"] .hud-weather {
  display: none;
}

/* ── Hộp Thoại Người Đọc Truyện 3D & Tặng Tín Vật Mở Chương (#modal-storyteller) ── */
.st-box {
  padding: 12px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(244, 200, 106, 0.24);
  margin-bottom: 11px;
}

.st-gift-box {
  background: linear-gradient(145deg, rgba(64, 20, 36, 0.55), rgba(32, 20, 14, 0.65));
  border-color: rgba(253, 224, 71, 0.42);
}

.st-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.st-head-row label {
  font-size: 12px;
  font-weight: 800;
  color: #fcebd2;
}

.st-vip-badge,
.st-rate-pill {
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(244, 200, 106, 0.16);
  border: 1px solid rgba(244, 200, 106, 0.48);
  color: #fde047;
}

.st-vip-badge.is-locked {
  background: rgba(225, 29, 72, 0.24);
  border-color: rgba(251, 113, 133, 0.65);
  color: #fecdd3;
}

.st-vip-badge.is-unlocked {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(110, 231, 183, 0.65);
  color: #a7f3d0;
}

.st-controls-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 9px;
}

.st-chap-indicator {
  padding: 0 11px;
  height: 34px;
  border-radius: 10px;
  background: rgba(10, 7, 14, 0.72);
  border: 1px solid rgba(244, 200, 106, 0.35);
  color: #fde68a;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
}

.st-para-preview {
  margin: 9px 0 0;
  padding: 9px 12px;
  border-radius: 11px;
  background: rgba(10, 7, 14, 0.62);
  border-left: 3px solid var(--gold);
  font-family: var(--font-serif);
  font-size: 12.5px;
  line-height: 1.55;
  color: #f6ebd9;
  max-height: 78px;
  overflow-y: auto;
}

.st-gift-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}

@media (max-width: 600px) {
  .st-gift-grid {
    grid-template-columns: 1fr;
  }
}

.st-gift-btn {
  text-align: left;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  background: rgba(18, 12, 24, 0.8);
  color: #fff;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, filter 0.14s ease;
}

.st-gift-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  border-color: var(--gold-strong);
}

.st-gift-btn.is-vip {
  background: linear-gradient(135deg, rgba(157, 23, 77, 0.65), rgba(120, 53, 15, 0.65));
  border-color: #f9a8d4;
}

.st-gift-btn.is-royal {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.78), rgba(127, 29, 29, 0.78));
  border-color: #fde047;
}

.st-gift-btn strong {
  display: block;
  font-size: 12.5px;
  color: #fff9eb;
}

.st-gift-btn small {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: #e9d8c4;
}

.st-feedback {
  margin-top: 8px;
  padding: 8px 11px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(110, 231, 183, 0.55);
  color: #d1fae5;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.45;
}

.st-queue-wrap {
  margin-top: 9px;
}

.st-queue-title {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #fde68a;
  margin-bottom: 5px;
}

.st-queue-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.st-queue-empty {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
}

.st-queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 9px;
  background: rgba(12, 8, 18, 0.72);
  border: 1px solid rgba(253, 224, 71, 0.42);
  font-size: 11.5px;
  color: #fef3c7;
}

.st-queue-item b {
  color: #fde047;
}


/* ==========================================================================
   TÀNG KINH CÁC 3D v7 — CHIBI STUDIO 360° · SÂN KHẤU LIVE 4 TẦNG QUÀ · ĐỒNG HÀNH & HOA ĐĂNG
   ========================================================================== */
html.obs-clean .hud-top,
html.obs-clean .hud-zones,
html.obs-clean .hud-weather,
html.obs-clean .hud-bottom,
html.obs-clean .joy-wrap {
  display: none !important;
}

.hidden {
  display: none !important;
}

/* Dải luật thuần biểu tượng (Icon-Only Strip) 100% an toàn quét màn hình TikTok LIVE */
body.tiktok-icon-only-rules #live-numpad-card {
  display: none !important;
}

.live-icon-rule-strip {
  position: absolute;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(12, 10, 24, 0.82);
  border: 1px solid rgba(251, 191, 36, 0.55);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  z-index: 26;
  pointer-events: none;
  white-space: nowrap;
}

.live-icon-rule-strip span {
  font-size: 12.5px;
  font-weight: 800;
  color: #fef3c7;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

/* Làm mờ nhẹ bảng tên phụ khi đang vinh danh người tặng quà 4 tầng */
body.gift-focus-dim .actor-tag:not(.gift-star-actor) {
  opacity: 0.36 !important;
  transition: opacity 0.28s ease;
}

.actor-tag.gift-star-actor {
  transform: translate(-50%, -100%) scale(1.08);
  z-index: 40 !important;
}

.actor-tag.gift-star-actor .actor-name {
  border-color: #fde047 !important;
  box-shadow: 0 0 22px rgba(253, 224, 71, 0.85) !important;
}

/* 7 Bảng Tên Trang Sức (Nameplate Skins — chỉ gắn lên viên thuốc .actor-name, KHÔNG bao bọc bong bóng chat!) */
.actor-name[data-name-skin="tagPink"] {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.88), rgba(244, 114, 182, 0.88));
  border-color: #fbcfe8;
}
.actor-name[data-name-skin="tagBlue"] {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.88), rgba(56, 189, 248, 0.88));
  border-color: #bae6fd;
}
.actor-name[data-name-skin="tagGreen"] {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.88), rgba(52, 211, 153, 0.88));
  border-color: #a7f3d0;
}
.actor-name[data-name-skin="neon"] {
  background: rgba(15, 23, 42, 0.92);
  border: 1.5px solid #22d3ee;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.75), inset 0 0 8px rgba(236, 72, 153, 0.45);
  color: #67e8f9;
}
.actor-name[data-name-skin="goldName"] {
  background: linear-gradient(135deg, rgba(146, 64, 14, 0.94), rgba(217, 119, 6, 0.92));
  border: 1.5px solid #fde047;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.6);
  color: #fef9c3;
}
.actor-name[data-name-skin="rainbowName"] {
  background: linear-gradient(90deg, #ec4899, #f59e0b, #10b981, #3b82f6, #a855f7);
  background-size: 220% 220%;
  animation: tkcRainbowTag 3.5s linear infinite;
  border-color: #ffffff;
  color: #ffffff;
}
.actor-name[data-name-skin="diamondName"] {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.92), rgba(125, 211, 252, 0.82));
  border: 1.5px solid #e0f2fe;
  box-shadow: 0 0 16px rgba(186, 230, 253, 0.8);
  color: #f0f9ff;
}

@keyframes tkcRainbowTag {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Đại Xưởng Hoá Thân 3D 4 Tab Gọn Gàng & Thanh Cuộn Tối Sang Trọng (v7.1) */
.modal-card,
.chibi-chip-grid,
.wardrobe-grid,
.sanctuary-wishes-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 200, 106, 0.42) rgba(15, 11, 24, 0.55);
}

.modal-card::-webkit-scrollbar,
.chibi-chip-grid::-webkit-scrollbar,
.wardrobe-grid::-webkit-scrollbar,
.sanctuary-wishes-list::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.modal-card::-webkit-scrollbar-track,
.chibi-chip-grid::-webkit-scrollbar-track,
.wardrobe-grid::-webkit-scrollbar-track,
.sanctuary-wishes-list::-webkit-scrollbar-track {
  background: rgba(15, 11, 24, 0.55);
  border-radius: 99px;
}

.modal-card::-webkit-scrollbar-thumb,
.chibi-chip-grid::-webkit-scrollbar-thumb,
.wardrobe-grid::-webkit-scrollbar-thumb,
.sanctuary-wishes-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(244, 114, 182, 0.65), rgba(244, 200, 106, 0.65));
  border-radius: 99px;
}

.modal-card.modal-avatar-studio {
  width: min(740px, 100%);
  padding: 18px 20px;
}

.avatar-top-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.avatar-name-box {
  flex: 1 1 240px;
  min-width: 0;
}

.avatar-name-box label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: #eadbc9;
  margin-bottom: 4px;
}

.avatar-name-box input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(244, 200, 106, 0.34);
  background: rgba(9, 6, 14, 0.76);
  color: #fff;
  font-size: 13px;
}

.avatar-wardrobe-btn {
  height: 36px;
  flex-shrink: 0;
}

.avatar-studio-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: 13px;
  background: rgba(12, 9, 20, 0.78);
  border: 1px solid rgba(244, 200, 106, 0.24);
  margin-bottom: 10px;
}

.avatar-studio-tabs button {
  height: 36px;
  padding: 0 8px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.16s ease;
}

.avatar-studio-tabs button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.avatar-studio-tabs button.is-on {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.32), rgba(245, 158, 11, 0.28));
  border-color: rgba(254, 240, 138, 0.68);
  color: #fffbeb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.32);
}

@media (max-width: 640px) {
  .avatar-studio-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.chibi-studio-section {
  margin: 0 0 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(20, 14, 32, 0.78);
  border: 1px solid rgba(244, 114, 182, 0.32);
}

.modal-card {
  overflow-x: hidden;
}

.avatar-studio-body,
.chibi-studio-layout {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.avatar-studio-body.is-fullwidth {
  grid-template-columns: minmax(0, 1fr);
}

.avatar-studio-body.is-fullwidth .chibi-preview-box {
  display: none;
}

.chibi-controls-col {
  min-width: 0;
  overflow-x: hidden;
}

.avatar-tab-pane[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .avatar-studio-body,
  .chibi-studio-layout {
    grid-template-columns: 1fr;
  }
}

.chibi-preview-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 9px;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 35%, rgba(99, 102, 241, 0.28), rgba(12, 10, 24, 0.92));
  border: 1px solid rgba(165, 180, 252, 0.3);
}

#chibi-studio-canvas {
  width: 196px;
  height: 216px;
  cursor: grab;
  touch-action: none;
}

.chibi-preview-box small {
  font-size: 11px;
  color: #cbd5e1;
  margin-top: 3px;
}

.chibi-preview-actions {
  display: flex;
  gap: 6px;
  width: 100%;
  margin-top: 7px;
}

.chibi-preview-actions .hud-btn {
  flex: 1;
  height: 30px;
  padding: 0 6px;
  font-size: 11px;
  justify-content: center;
}

.avatar-classic-details {
  margin-top: 10px;
  border-radius: 12px;
  border: 1px solid rgba(244, 200, 106, 0.24);
  background: rgba(14, 10, 22, 0.62);
  padding: 8px 11px;
}

.avatar-classic-details summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: #fde68a;
  user-select: none;
}

.avatar-classic-inner {
  margin-top: 10px;
}

.mini-sec-lbl {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: #fde68a;
  margin-bottom: 6px;
}

.chibi-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 156px;
  overflow-y: auto;
  padding: 2px 4px 2px 2px;
}

.chibi-chip-grid.chibi-chip-grid-tall {
  max-height: 218px;
}

.chibi-chip,
.chibi-chip-btn {
  padding: 5px 9px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(30, 22, 44, 0.88);
  color: #f8fafc;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.chibi-chip:hover,
.chibi-chip-btn:hover {
  border-color: #f472b6;
  background: rgba(236, 72, 153, 0.22);
}

.chibi-chip.is-on,
.chibi-chip-btn.is-on {
  background: linear-gradient(135deg, #ec4899, #f59e0b);
  border-color: #fef08a;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(236, 72, 153, 0.42);
}

.chibi-dna-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.chibi-dna-row button {
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.8);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.chibi-dna-row button:hover {
  border-color: #fde047;
  color: #fef08a;
}

/* Nhãn & Bong bóng thoại NPC Bạn Đồng Hành */
.companion-tag {
  position: absolute;
  top: 0;
  left: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(24, 16, 36, 0.88);
  border: 1px solid rgba(244, 114, 182, 0.65);
  color: #fdf2f8;
  font-size: 11.5px;
  pointer-events: none;
  white-space: nowrap;
}

.companion-tag .comp-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  background: #ec4899;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  margin-right: 4px;
}

.companion-tag .comp-bubble {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 190px;
  max-width: 260px;
  white-space: normal;
  text-align: center;
  padding: 7px 11px;
  border-radius: 12px;
  background: rgba(255, 251, 235, 0.96);
  color: #1e1b4b;
  font-weight: 700;
  font-size: 11.5px;
  line-height: 1.38;
  border: 1.5px solid #f59e0b;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.38);
}

/* Sàn Đấu Ngôn Từ & Danh sách Hoa Đăng 24h */
.mg-scramble-word {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #fde047;
  text-align: center;
  padding: 8px 10px;
  margin-bottom: 5px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px dashed rgba(253, 224, 71, 0.55);
}

.mg-scramble-hint {
  font-size: 11.5px;
  color: #e2e8f0;
  text-align: center;
}

.sanctuary-wishes-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.sanctuary-wish-row,
.sanctuary-wish-card {
  padding: 8px 11px;
  border-radius: 11px;
  background: rgba(28, 19, 38, 0.84);
  border: 1px solid rgba(251, 191, 36, 0.36);
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.sanctuary-wish-row:hover,
.sanctuary-wish-card:hover {
  border-color: #fde047;
  transform: translateY(-1px);
}

.sanctuary-wish-row strong,
.sanctuary-wish-card strong {
  display: block;
  font-size: 12px;
  color: #fde68a;
  margin-bottom: 3px;
}

.sanctuary-wish-row p,
.sanctuary-wish-row span,
.sanctuary-wish-card p {
  margin: 0;
  font-size: 11.5px;
  color: #f8fafc;
  line-height: 1.42;
}

/* ── v7.2: Hộp Thoại Tương Tác NPC Đạo Hữu / Quán Trà / Bói Quẻ ── */
.npc-talk-card {
  max-width: 500px;
}

.npc-talk-speech {
  margin: 12px 0 14px;
  padding: 12px 15px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(30, 22, 46, 0.92), rgba(18, 28, 44, 0.88));
  border: 1px solid rgba(251, 191, 36, 0.42);
  color: #fef9c3;
  font-size: 13.5px;
  line-height: 1.55;
  font-style: italic;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.npc-talk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.npc-talk-actions .hud-btn {
  flex: 1 1 140px;
  justify-content: center;
  height: 38px;
  font-size: 12.5px;
}

.actor-tag.is-interactive-npc-tag .actor-name {
  border-color: rgba(251, 191, 36, 0.65);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45), 0 0 10px rgba(251, 191, 36, 0.2);
}

/* ══════════════════════════════════════════════════════════════════════════
   v7.3: BẢN ĐỒ ĐẠI THẾ GIỚI 7 CÕI & MOBILE PORTRAIT ZEN HUD (< 768px)
   ══════════════════════════════════════════════════════════════════════════ */
.hud-mobile-only {
  display: none !important;
}

.world-map-modal-card {
  max-width: 780px;
}

.wmap-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wmap-quick-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(125, 211, 252, 0.28);
  font-size: 12px;
  color: #e2e8f0;
}

.wmap-quick-bar b {
  color: #fde047;
  letter-spacing: 0.04em;
}

.world-map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 10px;
  max-height: min(62dvh, 470px);
  overflow-y: auto;
  padding: 2px 4px 4px 2px;
}

.wmap-card {
  text-align: left;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1.5px solid rgba(244, 200, 106, 0.26);
  background: linear-gradient(145deg, rgba(28, 20, 36, 0.92), rgba(16, 13, 24, 0.94));
  color: var(--cream);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.wmap-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-strong);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
}

.wmap-card.is-current {
  border-color: #fde047;
  box-shadow: 0 0 0 1px #fde047, 0 8px 24px rgba(250, 204, 21, 0.24);
}

.wmap-card.is-plaza { background: linear-gradient(145deg, rgba(58, 36, 24, 0.92), rgba(18, 36, 52, 0.92)); }
.wmap-card.is-scholar { background: linear-gradient(145deg, rgba(64, 34, 22, 0.92), rgba(28, 18, 16, 0.94)); }
.wmap-card.is-immortal { background: linear-gradient(145deg, rgba(16, 52, 70, 0.92), rgba(15, 25, 44, 0.94)); }
.wmap-card.is-floral { background: linear-gradient(145deg, rgba(72, 26, 58, 0.92), rgba(32, 16, 36, 0.94)); }
.wmap-card.is-apoc { background: linear-gradient(145deg, rgba(22, 38, 54, 0.94), rgba(15, 20, 30, 0.96)); }
.wmap-card.is-bar { background: linear-gradient(145deg, rgba(48, 18, 68, 0.94), rgba(16, 20, 44, 0.96)); }
.wmap-card.is-cinema { background: linear-gradient(145deg, rgba(68, 16, 24, 0.94), rgba(20, 12, 20, 0.96)); }

.wmap-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.wmap-icon {
  font-size: 22px;
  line-height: 1;
}

.wmap-count {
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 10px;
  font-weight: 800;
  color: #fde68a;
}

.wmap-card.is-current .wmap-count {
  background: rgba(250, 204, 21, 0.24);
  border-color: #fde047;
  color: #fef9c3;
}

.wmap-card strong {
  font-size: 13.5px;
  color: #fff7ed;
}

.wmap-card em {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: #7dd3fc;
}

.wmap-card small {
  font-size: 11px;
  line-height: 1.4;
  color: #cbd5e1;
}

@media (max-width: 767px) {
  .hud-mobile-only {
    display: inline-flex !important;
  }

  /* Bong bóng chat & Bảng tên thu gọn thanh mảnh trên Mobile — không bao giờ chắn tầm nhìn! */
  .actor-tag {
    gap: 2px;
  }

  .actor-bubble {
    max-width: 142px;
    padding: 2.5px 7.5px;
    border-radius: 9px;
    font-size: 10px;
    line-height: 1.24;
    background: rgba(255, 250, 242, 0.84);
    border: 1px solid rgba(96, 62, 34, 0.28);
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.22);
  }

  .actor-name {
    padding: 1.5px 7px;
    font-size: 9.5px;
    gap: 3.5px;
    max-width: 154px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .actor-tag.is-compact .actor-name {
    padding: 1px 5.5px;
    font-size: 8.5px;
  }

  .actor-avatar,
  .actor-avatar-fallback {
    width: 16px;
    height: 16px;
    font-size: 8.5px;
  }

  .actor-rank {
    padding: 0.5px 4.5px;
    font-size: 8.5px;
  }

  .actor-honor-wing {
    padding: 1.5px 8px;
    font-size: 9px;
    margin-bottom: 1px;
  }

  .actor-honor-wing::before,
  .actor-honor-wing::after {
    width: 18px;
    height: 14px;
  }

  .grand-3d-toast {
    top: 62px;
    min-width: 0;
    max-width: 84%;
    padding: 6px 12px;
    border-radius: 12px;
  }

  .grand-3d-toast strong {
    font-size: 12px;
  }

  .grand-3d-toast span {
    font-size: 10.5px;
  }

  body.is-interactive .hud-top {
    top: 8px;
    left: 8px;
    right: 8px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  body.is-interactive .hud-left {
    width: 100%;
    justify-content: space-between;
    gap: 5px;
  }

  body.is-interactive #sel-lobby,
  body.is-interactive #btn-join-code,
  body.is-interactive .rod-meta-txt,
  body.is-interactive .silver-unit-txt,
  body.is-interactive .wmap-btn-txt {
    display: none !important;
  }

  body.is-interactive .hud-brand {
    flex: 1 1 auto;
    min-width: 0;
    padding: 3px 8px 3px 4px;
    gap: 6px;
  }

  body.is-interactive .hud-brand div {
    display: block !important;
    min-width: 0;
  }

  body.is-interactive .hud-brand .obs-seal {
    width: 26px;
    height: 26px;
    font-size: 14px;
    border-radius: 7px;
    flex-shrink: 0;
  }

  body.is-interactive .hud-brand strong {
    display: block;
    font-size: 10.5px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.is-interactive .hud-brand small {
    display: none !important;
  }

  body.is-interactive .hud-left .hud-btn {
    height: 34px;
    padding: 0 9px;
    font-size: 11px;
    flex-shrink: 0;
  }

  body.is-interactive .hud-actions {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 9px;
    border-radius: 14px;
    background: rgba(18, 12, 24, 0.95);
    backdrop-filter: blur(14px);
    border: 1.5px solid rgba(244, 200, 106, 0.42);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.72);
    max-height: 58dvh;
    overflow-y: auto;
    overflow-x: hidden;
  }

  body.is-interactive .hud-top.is-drawer-open .hud-actions {
    display: grid;
  }

  body.is-interactive .hud-actions .hud-btn {
    width: 100%;
    justify-content: flex-start;
    height: 35px;
    padding: 0 10px;
    font-size: 11.5px;
  }

  body.is-interactive #btn-mobile-menu.is-on {
    background: linear-gradient(135deg, #f59e0b, #b45309);
    border-color: #fef08a;
    color: #1c1004;
  }

  /* Ẩn thanh 7 nút ngang trên điện thoại dọc — thay bằng 🗺️ Bản Đồ 7 Cõi 1 chạm */
  body.is-interactive #hud-zones {
    display: none !important;
  }

  body.is-interactive .hud-weather {
    right: 8px;
    top: 40%;
    gap: 6px;
  }

  body.is-interactive .weather-orb {
    width: 38px;
    height: 38px;
  }

  body.is-interactive .weather-orb span {
    font-size: 14px;
  }

  body.is-interactive .weather-orb small {
    font-size: 7.5px;
  }

  body.is-interactive .hud-bottom {
    bottom: 8px;
    width: calc(100% - 14px);
    gap: 6px;
  }

  body.is-interactive #emote-strip {
    display: none;
    flex-wrap: wrap;
    max-height: 116px;
    overflow-y: auto;
    padding: 7px;
    border-radius: 13px;
    background: rgba(18, 12, 24, 0.94);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(244, 200, 106, 0.36);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.6);
  }

  body.is-interactive .hud-bottom.is-emotes-open #emote-strip {
    display: flex;
  }

  body.is-interactive .chat-cmd-bar {
    padding: 5px;
    gap: 5px;
    border-radius: 12px;
  }

  body.is-interactive .chat-cmd-bar .btn-toggle-emotes {
    height: 34px;
    padding: 0 9px;
    border-radius: 8px;
    border: 1px solid rgba(244, 200, 106, 0.42);
    background: rgba(38, 24, 48, 0.92);
    color: #fde68a;
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  body.is-interactive .world-interact-btn {
    left: auto;
    right: 10px;
    bottom: 64px;
    transform: none;
    height: auto;
    min-height: 36px;
    max-width: calc(100vw - 122px);
    padding: 6px 13px;
    border-radius: 16px;
    font-size: 11.5px;
    line-height: 1.25;
    text-align: center;
    animation: none;
  }

  body.is-interactive .zenaqua-dock {
    left: 96px;
    right: 8px;
    bottom: 62px;
    transform: none;
    max-width: none;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 6px 8px;
    scrollbar-width: none;
  }

  body.is-interactive .zenaqua-dock::-webkit-scrollbar {
    display: none;
  }

  body.is-interactive .zenaqua-dock button {
    flex-shrink: 0;
    height: 32px;
    padding: 0 11px;
    font-size: 11.5px;
  }

  body.is-interactive .chat-cmd-bar .btn-toggle-emotes.is-on {
    background: linear-gradient(135deg, #ec4899, #a855f7);
    border-color: #fbcfe8;
    color: #fff;
  }

  body.is-interactive .chat-cmd-bar input {
    height: 34px;
    font-size: 12px;
    padding: 0 9px;
  }

  body.is-interactive .chat-cmd-bar button[type="submit"] {
    height: 34px;
    padding: 0 11px;
    font-size: 12px;
  }

  body.is-interactive:not(.is-zen-focus) .joy-wrap {
    left: 8px;
    bottom: 62px;
    transform: scale(0.80);
    transform-origin: left bottom;
    transition: bottom 0.18s ease;
  }

  body.is-interactive.is-mobile-emotes-open:not(.is-zen-focus) .joy-wrap {
    bottom: 184px;
  }

  .world-map-grid {
    grid-template-columns: 1fr;
    max-height: 64dvh;
  }
}

/* ==========================================================================
   V7.4 — MỒI CÂU THỊ GIÁC 3 GIÂY (#live-hook-pill) · ĐẠI CHIẾN ĐỎ VS XANH (#live-pk-bar)
   & THẺ NHẬN NHÂN VẬT / LỘC TIKTOK 1 CHẠM (#modal-tiktok-claim)
   ========================================================================== */
#btn-auto-hook.is-on,
#btn-start-pk.is-on {
  background: linear-gradient(135deg, #f59e0b, #e11d48);
  border-color: #fef08a;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.48);
}

.live-hook-pill {
  position: absolute;
  top: 95px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 20px);
  height: 30px;
  padding: 0 13px;
  border-radius: 99px;
  border: 1.5px solid rgba(253, 224, 71, 0.62);
  background: linear-gradient(90deg, rgba(22, 14, 36, 0.92), rgba(52, 20, 48, 0.92));
  backdrop-filter: blur(8px);
  color: #fff7df;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: auto;
  cursor: pointer;
  z-index: 16;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.48);
  transition: transform 0.16s ease, border-color 0.2s ease;
}

.live-hook-pill[hidden],
.live-pk-bar[hidden] {
  display: none !important;
}

.live-hook-pill:hover {
  transform: translateX(-50%) scale(1.02);
  border-color: #fde047;
}

.live-hook-pill.is-live-hook {
  background: linear-gradient(90deg, rgba(180, 83, 9, 0.96), rgba(190, 18, 60, 0.96));
  border-color: #fef08a;
  box-shadow: 0 0 22px rgba(251, 191, 36, 0.55);
}

.live-hook-pill .hook-timer,
.live-hook-pill .hook-badge {
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(253, 224, 71, 0.22);
  border: 1px solid rgba(253, 224, 71, 0.72);
  color: #fef08a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.live-hook-pill strong {
  color: #fffbeb;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-hook-pill em {
  font-style: normal;
  color: #fbcfe8;
  font-size: 10.5px;
}

body.is-interactive .live-hook-pill {
  top: 128px;
  left: 352px;
  transform: none;
  max-width: calc(100% - 368px);
}

body.is-interactive .live-hook-pill:hover {
  transform: translateY(-1px);
}

/* Thanh Giằng Co Đại Chiến Đỏ vs Xanh (Chuẩn phong cách PK TikTok LIVE) */
.live-pk-bar {
  position: absolute;
  top: 130px;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 20px));
  padding: 7px 9px 9px;
  border-radius: 16px;
  background: rgba(12, 10, 24, 0.9);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(253, 224, 71, 0.65);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.62), 0 0 20px rgba(239, 68, 68, 0.22);
  pointer-events: auto;
  z-index: 17;
}

body.is-interactive .live-pk-bar {
  top: 164px;
}

#live-pk-bar:not([hidden]) ~ #live-numpad-card {
  top: 206px;
}

body.is-interactive #live-pk-bar:not([hidden]) ~ #live-numpad-card {
  top: 242px;
}

.pk-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 10.5px;
}

.pk-title {
  font-weight: 900;
  color: #fef08a;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pk-timer {
  font-weight: 800;
  color: #e2e8f0;
  font-size: 10px;
  white-space: nowrap;
}

.pk-tug-track {
  position: relative;
  display: flex;
  width: 100%;
  height: 36px;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.pk-side {
  border: 0;
  height: 100%;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  transition: width 0.26s cubic-bezier(0.22, 1, 0.36, 1), filter 0.15s ease;
  min-width: 0;
}

.pk-side:hover {
  filter: brightness(1.12);
}

.pk-side-red {
  background: linear-gradient(90deg, #991b1b, #ef4444);
}

.pk-side-blue {
  background: linear-gradient(90deg, #0284c7, #1d4ed8);
}

.pk-side.is-win {
  box-shadow: inset 0 0 0 2px #fef08a;
  filter: brightness(1.15);
}

.pk-side-tag {
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pk-side-tag b {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.36);
  border: 1px solid rgba(254, 240, 138, 0.72);
  color: #fef08a;
  font-size: 9.5px;
  font-weight: 900;
}

.pk-side-score {
  font-size: 11.5px;
  font-weight: 900;
  color: #fffbeb;
  white-space: nowrap;
  flex-shrink: 0;
}

.pk-side-score em {
  font-style: normal;
  font-size: 9.5px;
  opacity: 0.88;
}

.pk-bolt {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle, #fef9c3 0%, #f59e0b 75%);
  border: 2px solid #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.95);
  pointer-events: none;
  transition: left 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Modal Nhận Nhân Vật & Lộc TikTok 1 Chạm (#modal-tiktok-claim) */
.tiktok-claim-modal-card {
  max-width: 520px;
}

.tc-feedback {
  padding: 9px 12px;
  border-radius: 11px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(253, 224, 71, 0.45);
  color: #fef3c7;
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 10px;
}

.tc-preview-card {
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(30, 19, 46, 0.95), rgba(16, 26, 42, 0.95));
  border: 1.5px solid rgba(244, 200, 106, 0.55);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.tc-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.tc-avatar-orb {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid #fde047;
  background: linear-gradient(135deg, #ec4899, #6366f1);
  display: grid;
  place-items: center;
  font-size: 24px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.tc-avatar-orb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tc-identity {
  min-width: 0;
  flex: 1;
}

.tc-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}

.tc-rank-pill,
.tc-vip-pill {
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 800;
}

.tc-rank-pill {
  background: rgba(253, 224, 71, 0.18);
  border: 1px solid rgba(253, 224, 71, 0.65);
  color: #fef08a;
}

.tc-vip-pill {
  background: rgba(236, 72, 153, 0.24);
  border: 1px solid rgba(249, 168, 212, 0.7);
  color: #fce7f3;
}

.tc-identity strong {
  display: block;
  font-size: 15.5px;
  color: #fff9ec;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tc-identity small {
  color: #93c5fd;
  font-size: 12px;
  font-weight: 700;
}

.tc-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 12px;
}

.tc-stat {
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tc-stat span {
  display: block;
  font-size: 10.5px;
  color: #cbd5e1;
}

.tc-stat b {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: #fef3c7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tc-wear-btn {
  margin-bottom: 10px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.38);
}

.tc-vip-box {
  padding: 10px 11px;
  border-radius: 12px;
  background: rgba(9, 6, 16, 0.62);
  border: 1px dashed rgba(244, 200, 106, 0.42);
}

.tc-vip-summary {
  font-size: 11.5px;
  line-height: 1.45;
  color: #e2e8f0;
  margin-bottom: 8px;
}

.tc-vip-summary.has-pending {
  color: #fde047;
  font-weight: 700;
}

.tc-vip-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.tc-vip-actions .hud-btn {
  white-space: normal;
  text-align: center;
  justify-content: center;
  flex: 1 1 auto;
  max-width: 100%;
  height: auto;
  min-height: 36px;
  line-height: 1.35;
  padding: 8px 12px;
  box-sizing: border-box;
}

body.is-interactive:not([data-aspect="9:16"]) #live-numpad-card {
  right: 70px;
}

@media (max-width: 767px) {
  body.is-interactive:not([data-aspect="9:16"]) #live-numpad-card {
    display: none;
  }

  body.is-interactive .live-like-meter {
    top: 52px;
    left: 8px;
    right: 8px;
    width: auto;
    height: 25px;
  }

  body.is-interactive .live-hook-pill {
    top: 82px;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 16px);
    height: 28px;
    padding: 0 10px;
    font-size: 10.5px;
  }

  body.is-interactive .live-hook-pill em {
    display: none;
  }

  body.is-interactive .live-pk-bar {
    top: 114px;
    width: calc(100% - 16px);
    padding: 6px 7px 7px;
  }

  .pk-tug-track {
    height: 32px;
  }

  .pk-side {
    padding: 0 7px;
  }

  .pk-side-tag {
    font-size: 10px;
  }

  body.is-interactive #live-pk-bar:not([hidden]) ~ #live-numpad-card {
    display: none;
  }
}

/* ==========================================================================
   V7.5 — CHUẨN PHÒNG LIVE 3D "D CLUB" · KHOÁ CHIBI/NGƯỜI 3D · WINGED PLAQUES
   ========================================================================== */

/* 1. Bảng Tương Tác Miễn Phí Góc Trái (.dclub-free-card) */
.dclub-free-card {
  position: absolute;
  top: 124px;
  left: 12px;
  z-index: 12;
  width: 196px;
  padding: 8px 10px;
  border-radius: 13px;
  background: rgba(10, 12, 22, 0.76);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.52);
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}

body.is-interactive .dclub-free-card {
  top: 164px;
  left: 14px;
}

body.tiktok-icon-only-rules .dclub-free-card {
  display: none !important;
}

.dclub-free-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  line-height: 1.3;
  color: #f1f5f9;
  white-space: nowrap;
}

.dclub-free-row i {
  font-style: normal;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}

.dclub-free-row b {
  color: #7dd3fc;
  font-weight: 800;
}

.dclub-free-row:nth-child(3) b {
  color: #fda4af;
}

.dclub-free-row:nth-child(5) b,
.dclub-free-row:nth-child(6) b {
  color: #fde047;
}

.dclub-free-row span {
  color: #e2e8f0;
  opacity: 0.92;
}

/* 2. Menu Icon Quà Tặng Dọc Bên Phải (.dclub-gift-card) */
.dclub-gift-card {
  position: absolute;
  top: 124px;
  right: 12px;
  z-index: 12;
  width: 148px;
  padding: 7px 8px;
  border-radius: 14px;
  background: rgba(12, 14, 26, 0.76);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(244, 200, 106, 0.34);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: auto;
}

body.is-interactive:not([data-aspect="9:16"]) .dclub-gift-card {
  top: 164px;
  right: 70px;
}

body.is-interactive[data-aspect="9:16"] .dclub-gift-card {
  top: 158px;
  right: 10px;
}

#live-pk-bar:not([hidden]) ~ .dclub-free-card,
#live-pk-bar:not([hidden]) ~ .dclub-gift-card {
  top: 204px;
}

body.is-interactive #live-pk-bar:not([hidden]) ~ .dclub-free-card,
body.is-interactive #live-pk-bar:not([hidden]) ~ .dclub-gift-card {
  top: 242px;
}

#live-minigame-card:not([hidden]) ~ .dclub-free-card {
  top: 274px;
}

body.is-interactive #live-minigame-card:not([hidden]) ~ .dclub-free-card {
  top: 336px;
}

.dclub-gift-item {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 4px 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.dclub-gift-item:hover {
  transform: translateX(-2px);
  background: rgba(254, 240, 138, 0.14);
  border-color: rgba(253, 224, 71, 0.58);
}

.dclub-gift-item:active {
  transform: scale(0.96);
}

.dclub-gift-ico {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
}

.dclub-gift-ico.is-rose {
  background: linear-gradient(135deg, #fb7185, #be123c);
}

.dclub-gift-ico.is-tiktok {
  background: linear-gradient(135deg, #22d3ee, #ec4899);
}

.dclub-gift-ico.is-heart {
  background: linear-gradient(135deg, #f472b6, #db2777);
}

.dclub-gift-ico.is-perfume {
  background: linear-gradient(135deg, #f9a8d4, #a855f7);
}

.dclub-gift-ico.is-donut {
  background: linear-gradient(135deg, #fcd34d, #f97316);
}

.dclub-gift-ico.is-match {
  background: linear-gradient(135deg, #38bdf8, #f43f5e);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.6);
}

.dclub-gift-item strong {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.18;
  color: #fffbeb;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

@media (max-width: 767px) {
  body.is-interactive:not([data-aspect="9:16"]) .dclub-free-card,
  body.is-interactive:not([data-aspect="9:16"]) .dclub-gift-card {
    display: none;
  }
}

/* 3. Bảng Vinh Danh Có Cánh Kim Loại Trên Đầu Top 1–3 (.actor-honor-wing) */
.actor-honor-wing {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0 auto 3px;
  padding: 2px 11px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.65);
}

.actor-honor-wing::before,
.actor-honor-wing::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 24px;
  height: 18px;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

.actor-honor-wing::before {
  right: 100%;
  margin-right: -3px;
  transform: translateY(-54%);
}

.actor-honor-wing::after {
  left: 100%;
  margin-left: -3px;
  transform: translateY(-54%) scaleX(-1);
}

.actor-honor-wing.is-rank-1 {
  background: linear-gradient(180deg, #78350f 0%, #451a03 100%);
  border: 1.5px solid #fde047;
  color: #fef08a;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7), 0 0 16px rgba(250, 204, 21, 0.65);
}

.actor-honor-wing.is-rank-1::before,
.actor-honor-wing.is-rank-1::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 24'%3E%3Cpath fill='%23fde047' stroke='%2392400e' stroke-width='1.2' d='M30 16C22 16 14 11 4 2c2 5 6 9 11 11-5 0-9-2-13-5 3 5 8 8 14 9-4 1-8 1-11-1 4 4 11 6 25 4z'/%3E%3C/svg%3E");
}

.actor-honor-wing.is-rank-2 {
  background: linear-gradient(180deg, #334155 0%, #0f172a 100%);
  border: 1.5px solid #e2e8f0;
  color: #f8fafc;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7), 0 0 14px rgba(148, 163, 184, 0.6);
}

.actor-honor-wing.is-rank-2::before,
.actor-honor-wing.is-rank-2::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 24'%3E%3Cpath fill='%23e2e8f0' stroke='%23475569' stroke-width='1.2' d='M30 16C22 16 14 11 4 2c2 5 6 9 11 11-5 0-9-2-13-5 3 5 8 8 14 9-4 1-8 1-11-1 4 4 11 6 25 4z'/%3E%3C/svg%3E");
}

.actor-honor-wing.is-rank-3 {
  background: linear-gradient(180deg, #7c2d12 0%, #431407 100%);
  border: 1.5px solid #fdba74;
  color: #ffedd5;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.68), 0 0 12px rgba(249, 115, 22, 0.5);
}

.actor-honor-wing.is-rank-3::before,
.actor-honor-wing.is-rank-3::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 24'%3E%3Cpath fill='%23fdba74' stroke='%237c2d12' stroke-width='1.2' d='M30 16C22 16 14 11 4 2c2 5 6 9 11 11-5 0-9-2-13-5 3 5 8 8 14 9-4 1-8 1-11-1 4 4 11 6 25 4z'/%3E%3C/svg%3E");
}

/* 4. Bảng Mở Khoá Bậc Ngoại Hình Trong Xưởng Hoá Thân & Tủ Đồ */
.avatar-unlock-banner {
  padding: 10px 12px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(30, 20, 48, 0.92), rgba(18, 28, 44, 0.92));
  border: 1px solid rgba(244, 200, 106, 0.44);
  margin-bottom: 11px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.aub-tier-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(250, 204, 21, 0.16);
  border: 1px solid rgba(253, 224, 71, 0.58);
  color: #fef08a;
  font-size: 11.5px;
  font-weight: 800;
}

.aub-tier-pill.is-tier-3 {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(245, 158, 11, 0.28));
  border-color: #6ee7b7;
  color: #d1fae5;
}

.aub-head small {
  font-size: 11.5px;
  color: #cbd5e1;
  font-weight: 700;
}

.aub-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.aub-actions .hud-btn {
  height: auto;
  min-height: 31px;
  padding: 5px 10px;
  font-size: 11px;
  white-space: normal;
  line-height: 1.25;
}

.aub-actions .hud-btn.is-unlocked {
  opacity: 0.68;
  border-color: rgba(110, 231, 183, 0.55);
  background: rgba(16, 185, 129, 0.16);
  color: #a7f3d0;
  cursor: default;
}

.starter-chibi-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px dashed rgba(110, 231, 183, 0.45);
  margin-bottom: 9px;
}

.starter-chibi-bar small {
  flex: 1 1 220px;
  font-size: 11px;
  line-height: 1.38;
  color: #d1fae5;
}

.is-tier-locked {
  position: relative;
  opacity: 0.72;
}

.is-tier-locked::after {
  content: "🔒 Quà / Xu";
  position: absolute;
  top: 4px;
  right: 5px;
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(253, 224, 71, 0.65);
  color: #fef08a;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.3;
  pointer-events: none;
  z-index: 3;
}

/* ==========================================================================
   V7.6 — THU PHÓNG CAMERA (CON LĂN / 2 NGÓN) · NGUỒN OBS ĐA BỐI CẢNH & ĐA TỶ LỆ
   ========================================================================== */
.zoom-toast-pill {
  position: absolute;
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 29;
  height: 30px;
  padding: 0 13px;
  border-radius: 99px;
  border: 1px solid rgba(125, 211, 252, 0.65);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(10px);
  color: #f0f9ff;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
  transition: opacity 0.18s ease, transform 0.14s ease;
}

.zoom-toast-pill:hover {
  border-color: #fde047;
  color: #fef08a;
}

/* Nút mở Ngăn Kéo Đổi Bối Cảnh & Khung Hình trực tiếp trong Nguồn OBS (/live/:token) */
.obs-studio-btn {
  height: 29px;
  padding: 0 11px;
  border-radius: 99px;
  border: 1px solid rgba(244, 200, 106, 0.65);
  background: rgba(24, 17, 34, 0.9);
  color: #fde047;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  pointer-events: auto;
  transition: opacity 0.22s ease, transform 0.14s ease, border-color 0.14s ease;
}

@media (hover: hover) and (pointer: fine) {
  body.is-live-obs:not(.is-obs-studio-open) .obs-studio-btn {
    opacity: 0;
  }
  body.is-live-obs #tkc3d-frame:hover .obs-studio-btn,
  body.is-live-obs .obs-studio-btn:focus-visible {
    opacity: 1;
  }
}

.obs-studio-btn:hover {
  transform: translateY(-1px);
  border-color: #fff;
  background: rgba(190, 24, 93, 0.88);
  color: #fff;
}

.obs-studio-drawer {
  position: absolute;
  top: 56px;
  right: 12px;
  z-index: 28;
  width: min(392px, calc(100% - 24px));
  max-height: calc(100% - 72px);
  overflow-y: auto;
  border-radius: 16px;
  background: rgba(16, 12, 24, 0.94);
  backdrop-filter: blur(14px);
  border: 1.5px solid rgba(244, 200, 106, 0.55);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.82);
  padding: 12px;
  pointer-events: auto;
}

.obs-studio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(244, 200, 106, 0.22);
}

.obs-studio-head strong {
  font-size: 12.5px;
  color: #fde047;
}

.obs-studio-close {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

.obs-studio-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.obs-studio-sec label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #f8ebd7;
  margin-bottom: 6px;
}

.obs-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

#obs-cam-chips,
#obs-hud-chips {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.obs-chip-grid button {
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

#obs-cam-chips button,
#obs-hud-chips button {
  text-align: center;
  padding: 4px 5px;
  font-size: 10.5px;
}

.obs-chip-grid button:hover {
  border-color: rgba(244, 200, 106, 0.65);
  color: #fff;
}

.obs-chip-grid button.is-on {
  background: linear-gradient(135deg, rgba(227, 38, 114, 0.42), rgba(217, 119, 6, 0.42));
  border-color: #fde047;
  color: #fef9c3;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.25);
}

.obs-zoom-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
}

.obs-zoom-row button {
  height: 29px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(125, 211, 252, 0.45);
  background: rgba(15, 34, 54, 0.78);
  color: #e0f2fe;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.obs-zoom-row button:hover {
  border-color: #fde047;
  color: #fef08a;
}

.obs-zoom-row span {
  flex: 1;
  text-align: center;
  font-size: 11.5px;
  font-weight: 900;
  color: #7dd3fc;
}

.obs-copy-cfg-btn {
  width: 100%;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 11px;
  border: 1px solid #fde047;
  background: linear-gradient(135deg, #e7b54e, #b87b1e);
  color: #1c1004;
  font-size: 11.5px;
  font-weight: 900;
  cursor: pointer;
}

.obs-live-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.obs-inline-inp {
  flex: 1;
  min-width: 0;
  height: 31px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(9, 13, 28, 0.86);
  color: #fdf4e5;
  font-size: 11.5px;
  outline: none;
}

.obs-inline-inp:focus {
  border-color: #fde047;
}

.obs-inline-btn {
  height: 31px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(125, 211, 252, 0.45);
  background: rgba(15, 34, 54, 0.85);
  color: #e0f2fe;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.obs-inline-btn:hover {
  border-color: #fde047;
  color: #fef08a;
}

.obs-inline-btn.is-pink {
  border-color: rgba(244, 114, 182, 0.65);
  background: linear-gradient(135deg, rgba(219, 39, 119, 0.85), rgba(147, 51, 234, 0.85));
  color: #fff;
}

.obs-inline-btn.is-on {
  border-color: #fde047;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(16, 185, 129, 0.38));
  color: #fef08a;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.25);
}

/* Chế độ HUD Gọn (Phòng Trò Chuyện TikTok / Bigo 1:1 · 4:3) & Sạch 3D 100% */
body[data-obs-hud="compact"] .dclub-free-card,
body[data-obs-hud="compact"] .obs-qr {
  display: none !important;
}

body[data-obs-hud="compact"] .dclub-gift-card {
  top: 98px;
  right: 8px;
  width: 124px;
  padding: 5px 6px;
  gap: 4px;
}

body[data-obs-hud="compact"] .dclub-gift-ico {
  width: 22px;
  height: 22px;
  font-size: 13px;
}

body[data-obs-hud="compact"] .dclub-gift-item strong {
  font-size: 10px;
}

body[data-obs-hud="compact"] .obs-bottom {
  padding: 7px 10px;
}

body[data-obs-hud="compact"] .obs-book-info p {
  -webkit-line-clamp: 1;
  font-size: 10.5px;
}

body[data-obs-hud="clean"] .obs-brand,
body[data-obs-hud="clean"] #obs-tiktok-pill,
body[data-obs-hud="clean"] .obs-pill-live,
body[data-obs-hud="clean"] .obs-bottom,
body[data-obs-hud="clean"] .dclub-free-card,
body[data-obs-hud="clean"] .dclub-gift-card,
body[data-obs-hud="clean"] .live-like-meter,
body[data-obs-hud="clean"] #live-numpad-card {
  display: none !important;
}

body[data-obs-hud="clean"] .obs-top {
  justify-content: flex-end;
  pointer-events: none;
}

/* Tối ưu bố cục thẻ trong khung vuông 1:1 / 4:3 để không chạm thanh truyện dưới đáy */
body[data-aspect="1:1"] .dclub-free-card,
body[data-aspect="4:3"] .dclub-free-card {
  top: 96px;
  padding: 6px 8px;
}

body[data-aspect="1:1"] .dclub-gift-card,
body[data-aspect="4:3"] .dclub-gift-card {
  top: 96px;
  width: 134px;
  padding: 5px 6px;
  gap: 4px;
}

/* Hộp thoại Tuỳ chỉnh Nguồn OBS (#modal-costream) & Thanh mở nhanh từ #modal-tiktok */
.tt-obs-quick-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(227, 38, 114, 0.11);
  border: 1px dashed rgba(255, 142, 199, 0.45);
}

.tt-obs-quick-bar span {
  font-size: 11.5px;
  color: #f5e9dc;
  line-height: 1.35;
  flex: 1 1 240px;
}

.cs-scene-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

@media (max-width: 820px) {
  .cs-scene-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cs-scene-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 9px;
  border-radius: 11px;
  border: 1.5px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream);
  text-align: left;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.cs-scene-card strong {
  font-size: 11.5px;
  color: #fff;
  line-height: 1.25;
}

.cs-scene-card small {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.25;
}

.cs-scene-card:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 200, 106, 0.65);
}

.cs-scene-card.is-on {
  border-color: #fde047;
  background: linear-gradient(135deg, rgba(227, 38, 114, 0.28), rgba(245, 158, 11, 0.26));
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.25);
}

.cs-scene-card.is-on strong {
  color: #fef08a;
}

.cs-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 680px) {
  .cs-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   V7.8 — CAMERA "THIÊN NHÃN LINH KÍNH" (#aerial-director-pill)
   & HỆ THỐNG ĐỘNG THIÊN / BÍ CẢNH (.wmap-realm-badge · .is-bicanh-card)
   ========================================================================== */
.aerial-director-pill {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: min(88%, 420px);
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(14, 18, 34, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(125, 211, 252, 0.52);
  color: #e0f2fe;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.38);
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.aerial-director-pill[hidden] {
  display: none !important;
}

.aerial-director-pill[data-tier="P0"] {
  background: linear-gradient(90deg, rgba(131, 24, 67, 0.88), rgba(146, 64, 14, 0.88));
  border-color: #fde047;
  color: #fef9c3;
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.45);
}

.aerial-director-pill[data-tier="P1"] {
  background: linear-gradient(90deg, rgba(153, 27, 27, 0.9), rgba(30, 58, 138, 0.9));
  border-color: #fb7185;
  color: #fff1f2;
  box-shadow: 0 0 18px rgba(244, 63, 94, 0.48);
}

.aerial-director-pill[data-tier="P2"] {
  background: rgba(15, 38, 54, 0.86);
  border-color: #38bdf8;
  color: #e0f2fe;
}

.aerial-director-pill[data-tier="P3"] {
  background: rgba(20, 36, 28, 0.84);
  border-color: #6ee7b7;
  color: #d1fae5;
}

body.is-interactive .aerial-director-pill {
  top: 96px;
  right: 14px;
  left: auto;
  transform: none;
}

body[data-obs-hud="clean"] .aerial-director-pill {
  display: none !important;
}

@media (max-width: 680px) {
  .aerial-director-pill {
    font-size: 10px;
    padding: 3px 10px;
    top: 46px;
  }
  body.is-interactive .aerial-director-pill {
    top: 92px;
    right: 8px;
  }
}

.wmap-realm-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-right: auto;
  margin-left: 6px;
}

.wmap-realm-badge.is-dong-thien {
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(125, 211, 252, 0.45);
  color: #bae6fd;
}

.wmap-realm-badge.is-bi-canh {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.34), rgba(217, 119, 6, 0.32));
  border: 1px solid rgba(251, 191, 36, 0.72);
  color: #fef08a;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.28);
}

.wmap-card.is-bicanh-card {
  border-color: rgba(245, 158, 11, 0.52);
  background: linear-gradient(155deg, rgba(45, 18, 28, 0.85), rgba(22, 28, 42, 0.88));
}

.portal-door-tag[data-realm-class="bi-canh"] {
  border-color: rgba(250, 204, 21, 0.82);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.35), 0 0 14px rgba(250, 204, 21, 0.28);
}


/* ══════════════════════════════════════════════════════════════════════════
   TÀNG KINH CÁC 3D v7.9 — PHÁP BẢO "THIÊN NHÃN LINH KÍNH" & LIVESTREAM DIỄN HOÁ
   ══════════════════════════════════════════════════════════════════════════ */
.hud-btn-live-mirror {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.92), rgba(190, 24, 93, 0.92)) !important;
  border: 1.5px solid rgba(254, 240, 138, 0.85) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.45);
}
.hud-btn-live-mirror:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.65);
}

/* Khi đang mở Giao diện Xem Livestream Thiên Nhãn: ẩn gọn HUD đi bộ, giữ thanh Tim + Thiên Nhãn + PK */
body.is-linh-kinh-live .hud-top,
body.is-linh-kinh-live #hud-zones,
body.is-linh-kinh-live .hud-weather,
body.is-linh-kinh-live .hud-bottom,
body.is-linh-kinh-live #joy-wrap,
body.is-linh-kinh-live #mobile-joy-zone,
body.is-linh-kinh-live .zenaqua-dock,
body.is-linh-kinh-live .fishing-dock,
body.is-linh-kinh-live #cinema-dock,
body.is-linh-kinh-live #world-interact-btn,
body.is-linh-kinh-live #interact-btn,
body.is-linh-kinh-live #live-free-rules-card,
body.is-linh-kinh-live #live-gift-menu-card,
body.is-linh-kinh-live #live-numpad-card {
  display: none !important;
}

body.is-linh-kinh-live .aerial-director-pill {
  top: 102px !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  z-index: 64;
}

body.is-linh-kinh-live .live-like-meter {
  top: 104px !important;
}

/* Viên ngọc thu nhỏ "Gương Hộ Thân" */
.linh-kinh-mini-pill {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 58;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 27, 75, 0.94));
  border: 1.5px solid rgba(250, 204, 21, 0.78);
  color: #fef08a;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), 0 0 16px rgba(56, 189, 248, 0.25);
  backdrop-filter: blur(10px);
}
.linh-kinh-mini-pill[hidden] {
  display: none !important;
}
.linh-kinh-mini-pill.has-alert {
  background: linear-gradient(135deg, #b91c1c, #be185d);
  color: #ffffff;
  border-color: #fde047;
  animation: lkBagPulse 0.9s ease-in-out infinite alternate;
}
.lk-mini-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}
.lk-mini-dismiss {
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  cursor: pointer;
  line-height: 1;
}

/* Lớp Phủ Chính: Thiên Nhãn Linh Kính Livestream */
.linh-kinh-live-overlay {
  position: absolute;
  inset: 0;
  z-index: 62;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  user-select: none;
}
.linh-kinh-live-overlay[hidden] {
  display: none !important;
}

.lk-floating-hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 70;
}
.lk-heart-float {
  position: absolute;
  font-size: 26px;
  filter: drop-shadow(0 4px 10px rgba(236, 72, 153, 0.65));
  animation: lkHeartRise 1.32s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.lk-heart-float.is-screen-tap {
  font-size: 34px;
}
@keyframes lkHeartRise {
  0% { opacity: 0; transform: scale(0.5) translateY(10px) rotate(-10deg); }
  20% { opacity: 1; transform: scale(1.22) translateY(-16px) rotate(8deg); }
  100% { opacity: 0; transform: scale(0.88) translateY(-135px) rotate(-12deg); }
}
@keyframes lkBagPulse {
  from { transform: scale(1); box-shadow: 0 0 14px rgba(250, 204, 21, 0.45); }
  to { transform: scale(1.05); box-shadow: 0 0 26px rgba(250, 204, 21, 0.88); }
}

/* Thanh Đầu Kênh LIVE */
.lk-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px 6px;
  flex-wrap: wrap;
  z-index: 66;
}
.lk-channel-card {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 13px 6px 8px;
  border-radius: 999px;
  background: rgba(12, 16, 28, 0.82);
  border: 1px solid rgba(250, 204, 21, 0.48);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.42);
}
.lk-channel-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.lk-channel-row {
  display: flex;
  align-items: center;
  gap: 7px;
}
.lk-channel-row strong {
  color: #fef08a;
  font-size: 13px;
  font-weight: 800;
}
.lk-channel-meta small {
  color: #bae6fd;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.lk-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}
.lk-live-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}
.lk-viewer-pill {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-size: 10.5px;
  font-weight: 700;
}

.lk-lucky-bag-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1.5px solid #fde047;
  background: linear-gradient(135deg, #dc2626, #d97706);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  animation: lkBagPulse 0.8s ease-in-out infinite alternate;
}
.lk-lucky-bag-pill[hidden] {
  display: none !important;
}
.lk-lucky-bag-pill b {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: #fef08a;
}
.lk-lucky-bag-pill em {
  font-style: normal;
  text-decoration: underline;
}

.lk-top-Controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.lk-top-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(15, 23, 42, 0.82);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.lk-top-btn:hover {
  border-color: #fde047;
  color: #fef08a;
}
.lk-top-btn.is-close {
  width: 34px;
  padding: 0;
  background: rgba(220, 38, 38, 0.82);
  border-color: rgba(252, 165, 165, 0.6);
}

/* Dải Bảng Công Đức Hộ Pháp Top 3 */
.lk-merit-strip {
  align-self: flex-start;
  margin: 0 16px auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(250, 204, 21, 0.36);
  backdrop-filter: blur(8px);
  font-size: 11.5px;
  z-index: 65;
}
.lk-merit-title {
  color: #fde047;
  font-weight: 800;
}
.lk-merit-list {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.lk-merit-empty {
  color: #cbd5e1;
  font-size: 11px;
}
.lk-merit-chip {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.16);
  border: 1px solid rgba(250, 204, 21, 0.45);
  color: #fef08a;
  font-weight: 700;
  font-size: 11px;
}
.lk-merit-chip.rank-1 {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.34), rgba(225, 29, 72, 0.34));
  border-color: #fde047;
  color: #fff;
}

/* Luồng Bình Luận & Thanh Gửi Tin (Bố cục TikTok LIVE mặc định) */
.lk-side-panel {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: min(410px, calc(100vw - 88px));
  display: flex;
  flex-direction: column;
  gap: 7px;
  z-index: 66;
}
.lk-chat-list {
  max-height: 210px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px 4px;
  mask-image: linear-gradient(to bottom, transparent 0%, black 16%, black 100%);
  scrollbar-width: none;
}
.lk-chat-list::-webkit-scrollbar {
  display: none;
}
.lk-chat-row {
  align-self: flex-start;
  max-width: 100%;
  padding: 5px 11px;
  border-radius: 14px;
  background: rgba(10, 14, 24, 0.64);
  backdrop-filter: blur(6px);
  color: #f8fafc;
  font-size: 12.5px;
  line-height: 1.38;
  border: 1px solid rgba(255, 255, 255, 0.08);
  word-break: break-word;
}
.lk-chat-row.is-gift {
  background: linear-gradient(135deg, rgba(157, 23, 77, 0.82), rgba(146, 64, 14, 0.82));
  border-color: rgba(253, 224, 71, 0.65);
}
.lk-chat-row.is-system {
  background: rgba(14, 116, 144, 0.68);
  border-color: rgba(103, 232, 249, 0.45);
}
.lk-chat-badge {
  display: inline-block;
  margin-right: 5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.25);
  color: #fef08a;
  font-size: 10px;
  font-weight: 800;
}
.lk-chat-author {
  color: #7dd3fc;
  font-weight: 800;
}

.lk-quick-chips {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.lk-quick-chips::-webkit-scrollbar {
  display: none;
}
.lk-quick-chips button {
  flex-shrink: 0;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.42);
  background: rgba(15, 23, 42, 0.78);
  color: #fef08a;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.lk-quick-chips button:hover {
  background: rgba(234, 179, 8, 0.28);
}

.lk-bottom-bar {
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(12, 16, 28, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}
.lk-bottom-bar input {
  flex: 1;
  min-width: 0;
  height: 34px;
  border: none;
  background: transparent;
  color: #fff;
  padding: 0 12px;
  font-size: 13px;
  outline: none;
}
.lk-bottom-bar input::placeholder {
  color: rgba(226, 232, 240, 0.68);
}
.lk-send-btn {
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #ec4899, #f59e0b);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}

/* Cột Nút Hành Động Phải Chuẩn TikTok LIVE */
.lk-action-rail {
  position: absolute;
  right: 12px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  z-index: 67;
}
.lk-rail-btn {
  position: relative;
  width: 56px;
  min-height: 54px;
  padding: 6px 4px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.80);
  backdrop-filter: blur(10px);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.42);
}
.lk-rail-btn[hidden] {
  display: none !important;
}
.lk-rail-btn i {
  font-style: normal;
  font-size: 21px;
  line-height: 1.1;
}
.lk-rail-btn span {
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  line-height: 1.1;
}
.lk-rail-btn.is-manifest {
  border-color: rgba(103, 232, 249, 0.65);
  background: linear-gradient(160deg, rgba(14, 116, 144, 0.88), rgba(30, 27, 75, 0.9));
}
.lk-rail-btn.is-manifest.is-active {
  border-color: #4ade80;
  box-shadow: 0 0 14px rgba(74, 222, 128, 0.45);
}
.lk-rail-btn.is-possess {
  border-color: #fde047;
  background: linear-gradient(160deg, rgba(180, 83, 9, 0.9), rgba(120, 53, 15, 0.9));
}
.lk-rail-btn.is-heart {
  border-color: rgba(244, 114, 182, 0.72);
}
.lk-rail-btn.is-gift {
  border-color: #fde047;
  background: linear-gradient(160deg, rgba(190, 24, 93, 0.9), rgba(180, 83, 9, 0.9));
}
.lk-heart-combo {
  position: absolute;
  top: -7px;
  right: -5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #ec4899;
  color: #fff;
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
}

/* Bố Cục Ngang Chuẩn YouTube Live / Studio trên Màn Hình Rộng */
@media (min-width: 960px) {
  .linh-kinh-live-overlay[data-layout="youtube"] .lk-side-panel {
    top: 66px;
    right: 16px;
    left: auto;
    bottom: 84px;
    width: 348px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(10, 14, 26, 0.82);
    border: 1px solid rgba(250, 204, 21, 0.34);
    backdrop-filter: blur(14px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  }
  .linh-kinh-live-overlay[data-layout="youtube"] .lk-chat-list {
    flex: 1;
    max-height: none;
    mask-image: none;
  }
  .linh-kinh-live-overlay[data-layout="youtube"] .lk-action-rail {
    right: 16px;
    bottom: 14px;
    flex-direction: row;
    gap: 7px;
  }
  .linh-kinh-live-overlay[data-layout="youtube"] .lk-rail-btn {
    width: auto;
    min-height: 44px;
    padding: 0 12px;
    flex-direction: row;
    gap: 6px;
    border-radius: 999px;
  }
  .linh-kinh-live-overlay[data-layout="youtube"] .lk-rail-btn i {
    font-size: 16px;
  }
  .linh-kinh-live-overlay[data-layout="youtube"] .lk-rail-btn span {
    font-size: 11.5px;
  }
}

/* Khay Tặng Quà 2 Ngăn & Khay Đổi Kênh */
.lk-gift-drawer,
.lk-realm-drawer {
  position: absolute;
  left: 50%;
  bottom: 82px;
  transform: translateX(-50%);
  width: min(680px, calc(100vw - 24px));
  padding: 14px;
  border-radius: 22px;
  background: rgba(14, 16, 30, 0.95);
  border: 1.5px solid rgba(250, 204, 21, 0.58);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75);
  z-index: 69;
}
.lk-gift-drawer[hidden],
.lk-realm-drawer[hidden] {
  display: none !important;
}
.lk-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  color: #fef08a;
}
.lk-gift-tabs {
  display: flex;
  gap: 6px;
}
.lk-gift-tabs button {
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.lk-gift-tabs button.is-on {
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  border-color: #fef08a;
  color: #fff;
}
.lk-wallet-pills {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
}
.lk-wallet-pills span {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: #fef08a;
}
.lk-topup-link {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.22);
  border: 1px solid rgba(74, 222, 128, 0.6);
  color: #86efac;
  text-decoration: none;
  font-size: 11.5px;
}
.lk-drawer-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
}
.lk-gift-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
}
.lk-gift-card {
  padding: 10px 8px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(30, 41, 59, 0.72);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease;
}
.lk-gift-card:hover {
  transform: translateY(-2px);
  border-color: #fde047;
  background: rgba(51, 65, 85, 0.88);
}
.lk-gift-ico {
  font-size: 28px;
  line-height: 1.1;
}
.lk-gift-name {
  font-size: 12px;
  font-weight: 800;
  color: #fef08a;
}
.lk-gift-tier {
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(236, 72, 153, 0.25);
  color: #fbcfe8;
  font-size: 10px;
  font-weight: 700;
}
.lk-gift-tier.is-owned {
  background: rgba(34, 197, 94, 0.22);
  color: #bbf7d0;
}
.lk-gift-desc {
  font-style: normal;
  font-size: 10.5px;
  color: #cbd5e1;
  line-height: 1.25;
}
.lk-gift-price {
  margin-top: 3px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.2);
  border: 1px solid rgba(250, 204, 21, 0.5);
  color: #fde047;
  font-size: 11px;
  font-weight: 800;
}

.lk-realm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.lk-realm-chips button {
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(30, 41, 59, 0.82);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.lk-realm-chips button.is-on {
  background: linear-gradient(135deg, #0284c7, #6366f1);
  border-color: #fde047;
  color: #fff;
}

@media (max-width: 767px) {
  .lk-hud-btn-txt {
    font-size: 10.5px;
  }
  #btn-lk-layout {
    display: none;
  }
  .lk-top-bar {
    padding: 8px 10px 4px;
  }
  .lk-gift-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lk-gift-drawer,
  .lk-realm-drawer {
    bottom: 72px;
    padding: 11px;
  }
}


/* ══════════════════════════════════════════════════════════════════════════
   v8.0: LĂNG THIÊN KÍNH 3D · CAMERA CHỐNG CHÓNG MẶT · BẢNG LỆNH ".?" MỜ 50%
   & ĐỒNG BỘ SONG HÀNH "NGƯỜI GỐC + HOÁ THÂN" (GÕ DẤU "..." & CHAT KÉP)
   ══════════════════════════════════════════════════════════════════════════ */

/* Màn sương linh quang chuyển cảnh êm 0.35s khi đổi tiêu điểm xa > 18m hoặc đổi Động Thiên */
.lk-mist-fade {
  position: fixed;
  inset: 0;
  z-index: 61;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 45%, rgba(186, 230, 253, 0.36), rgba(15, 23, 42, 0.58));
  transition: opacity 0.22s ease-out;
}
.lk-mist-fade.is-active {
  opacity: 1;
}

/* Nút tròn nổi ".?" gọn nhẹ trên Web 3D & OBS */
.cmd-help-float-btn {
  position: fixed;
  left: 14px;
  bottom: 72px;
  z-index: 44;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(103, 232, 249, 0.65);
  background: rgba(11, 18, 30, 0.62);
  color: #fde047;
  font-size: 13.5px;
  font-weight: 900;
  letter-spacing: -0.02em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.cmd-help-float-btn:hover,
.cmd-help-float-btn.is-on {
  transform: scale(1.06);
  background: rgba(14, 116, 144, 0.82);
  border-color: #fde047;
}
body.is-linh-kinh-live .cmd-help-float-btn {
  display: none;
}
body.obs-live-mode .cmd-help-float-btn {
  left: auto;
  right: 14px;
  top: 58px;
  bottom: auto;
}

/* Bảng Lệnh Tương Tác Sóng LIVE Mờ Đúng 50% (rgba(11, 18, 30, 0.50)) Chuẩn Ảnh Mẫu */
.live-cmd-help-sheet {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 74;
  width: min(860px, calc(100vw - 24px));
  max-height: min(80dvh, 620px);
  overflow-y: auto;
  border-radius: 12px;
  background: rgba(11, 18, 30, 0.50);
  border: 1px solid rgba(56, 189, 248, 0.34);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
  color: #e2e8f0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.92);
}
.live-cmd-help-sheet[hidden] {
  display: none !important;
}
@media (min-width: 900px) {
  body.is-linh-kinh-live .live-cmd-help-sheet {
    left: calc((100vw - 360px) / 2);
    width: min(820px, calc(100vw - 388px));
    z-index: 95;
  }
}

.cmd-help-head {
  display: grid;
  grid-template-columns: minmax(195px, 37%) 1fr;
  background: rgba(15, 29, 44, 0.52);
  border-bottom: 1px solid rgba(56, 189, 248, 0.28);
  font-size: 13px;
  font-weight: 700;
  color: #cbd5e1;
}
.cmd-help-col-title,
.cmd-help-col-desc {
  padding: 10px 14px;
}
.cmd-help-col-title {
  border-right: 1px solid rgba(56, 189, 248, 0.20);
}
.cmd-help-col-desc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cmd-help-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cmd-help-timer {
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(14, 116, 144, 0.55);
  border: 1px solid rgba(103, 232, 249, 0.45);
  color: #fde047;
  font-size: 11px;
  font-weight: 800;
}
.cmd-help-close {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(15, 23, 42, 0.55);
  color: #f8fafc;
  font-size: 12px;
  cursor: pointer;
}

.cmd-help-rows {
  display: flex;
  flex-direction: column;
}
.cmd-help-row {
  display: grid;
  grid-template-columns: minmax(195px, 37%) 1fr;
  border-bottom: 1px solid rgba(56, 189, 248, 0.16);
  cursor: pointer;
  transition: background 0.14s ease;
}
.cmd-help-row:last-child {
  border-bottom: none;
}
.cmd-help-row:hover {
  background: rgba(14, 116, 144, 0.26);
}
.cmd-help-row.is-active-realm {
  background: rgba(234, 179, 8, 0.12);
}
.cmd-help-keys,
.cmd-help-desc {
  padding: 9px 14px;
  font-size: 13px;
  line-height: 1.45;
}
.cmd-help-keys {
  border-right: 1px solid rgba(56, 189, 248, 0.16);
  color: #94a3b8;
}
.cmd-help-keys code,
.cmd-help-desc code {
  display: inline-block;
  margin: 1px 0;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(13, 59, 76, 0.62);
  border: 1px solid rgba(45, 212, 191, 0.34);
  color: #5eead4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
}
.cmd-help-desc {
  color: #e2e8f0;
}
.cmd-help-desc b {
  color: #ffffff;
  font-weight: 800;
}
.cmd-help-keys em {
  font-style: italic;
  font-size: 11.5px;
  color: #cbd5e1;
}

/* Nâng cấp Thanh Kênh & Khay Chọn 7 Động Thiên / Bí Cảnh trên Lăng Thiên Kính */
button.lk-channel-card {
  border: 1px solid rgba(250, 204, 21, 0.45);
  text-align: left;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
button.lk-channel-card:hover {
  border-color: #fde047;
  transform: translateY(-1px);
}
.lk-follow-sub {
  display: block;
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  color: #67e8f9;
  margin-top: 1px;
}
.lk-top-btn.is-help {
  font-weight: 900;
  color: #fde047;
  border-color: rgba(103, 232, 249, 0.55);
}

.lk-follow-host-btn {
  width: 100%;
  margin-bottom: 10px;
  padding: 9px 13px;
  border-radius: 14px;
  border: 1.5px solid rgba(250, 204, 21, 0.55);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 58, 138, 0.72));
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.lk-follow-host-btn.is-on {
  border-color: #fde047;
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.28);
}
.lk-follow-host-btn b {
  color: #fde047;
}
.lk-host-live-pill {
  font-style: normal;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.88);
  color: #fff;
  font-size: 10.5px;
  font-weight: 900;
}

.lk-realm-chips.is-grid-v8 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.lk-realm-chips.is-grid-v8 button {
  height: auto;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  text-align: left;
}
.lk-realm-chips.is-grid-v8 button small {
  font-size: 10.5px;
  font-weight: 800;
  color: #7dd3fc;
  white-space: nowrap;
}
.lk-realm-chips.is-grid-v8 button.is-host-live {
  border-color: rgba(248, 113, 113, 0.65);
}

/* Bong bóng đang gõ "💬 •••" & Nhãn "👁️ Đang soi: ..." cho Người Gốc + Hoá Thân */
.actor-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 3px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(14, 116, 144, 0.88);
  border: 1px solid rgba(253, 224, 71, 0.72);
  color: #fef08a;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}
.actor-typing-dots[hidden] {
  display: none !important;
}
.actor-typing-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fef08a;
  display: inline-block;
  animation: lkTypingBounce 1.05s infinite ease-in-out;
}
.actor-typing-dots i:nth-child(2) {
  animation-delay: 0.18s;
}
.actor-typing-dots i:nth-child(3) {
  animation-delay: 0.36s;
}
@keyframes lkTypingBounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.42;
  }
  40% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.actor-watching-tag {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(103, 232, 249, 0.55);
  color: #67e8f9;
  font-size: 9.5px;
  font-weight: 800;
  white-space: nowrap;
}
.actor-watching-tag[hidden] {
  display: none !important;
}

.actor-name.is-avatar-clone {
  border-color: rgba(56, 189, 248, 0.82) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45), 0 0 12px rgba(56, 189, 248, 0.38);
}

@media (max-width: 767px) {
  .cmd-help-head,
  .cmd-help-row {
    grid-template-columns: 1fr;
  }
  .cmd-help-col-title,
  .cmd-help-keys {
    border-right: none;
    padding-bottom: 3px;
  }
  .cmd-help-desc {
    padding-top: 2px;
  }
  .lk-realm-chips.is-grid-v8 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   v9.0 — MỨC CHẤT LƯỢNG: chính sách làm mờ nền (backdrop-filter) theo sức máy
   - partial (Vừa): bỏ blur trên các phần tử nhiều & di chuyển mỗi khung hình (bong bóng, nút nhỏ)
   - off (Nhẹ): tắt toàn bộ blur, tăng nhẹ độ đặc nền để chữ vẫn dễ đọc
   ========================================================================== */
body[data-blur="partial"] .actor-bubble,
body[data-blur="partial"] .emote-strip button,
body[data-blur="partial"] .hud-btn,
body[data-blur="partial"] .weather-orb,
body[data-blur="partial"] .lk-chat-row,
body[data-blur="partial"] .portal-door-tag,
body[data-blur="partial"] .lk-rail-btn,
body[data-blur="partial"] .lk-top-btn,
body[data-blur="partial"] .joy-base,
body[data-blur="partial"] .joy-sprint-btn {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body[data-blur="off"] *,
body[data-blur="off"] *::before,
body[data-blur="off"] *::after {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body[data-blur="off"] .actor-bubble,
body[data-blur="partial"] .actor-bubble {
  background-color: rgba(255, 250, 240, 0.96);
}

#btn-low-power[data-quality="low"] { border-color: rgba(134, 239, 172, 0.7); }
#btn-low-power[data-quality="high"],
#btn-low-power[data-quality="obs"] { border-color: rgba(253, 224, 71, 0.7); }

/* ==========================================================================
   v9.0 — SAFE-AREA CHO ĐIỆN THOẠI TAI THỎ / DYNAMIC ISLAND & CỠ CHỮ DỄ ĐỌC
   ========================================================================== */
.hud-top {
  top: max(10px, env(safe-area-inset-top, 0px));
  left: max(12px, env(safe-area-inset-left, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
}

.hud-bottom {
  bottom: max(10px, env(safe-area-inset-bottom, 0px));
}

.obs-top {
  top: max(12px, env(safe-area-inset-top, 0px));
  left: max(12px, env(safe-area-inset-left, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
}

.obs-bottom {
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  left: max(12px, env(safe-area-inset-left, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
}

.actor-tag.is-compact .actor-name,
.actor-watching-tag,
.obs-brand small,
.obs-kicker,
.live-hook-pill .hook-timer,
.live-hook-pill .hook-badge,
.pk-side-tag b,
.pk-side-score em {
  font-size: 11px;
}

.weather-orb small,
.obs-qr small {
  font-size: 10px;
}

@media (max-width: 767px) {
  body.is-interactive .hud-bottom {
    bottom: max(8px, env(safe-area-inset-bottom, 0px));
  }
  body.is-interactive:not(.is-zen-focus) .joy-wrap {
    left: max(8px, env(safe-area-inset-left, 0px));
    bottom: calc(62px + env(safe-area-inset-bottom, 0px));
  }
  body.is-interactive.is-mobile-emotes-open:not(.is-zen-focus) .joy-wrap {
    bottom: calc(184px + env(safe-area-inset-bottom, 0px));
  }
  body.is-interactive .world-interact-btn {
    right: max(10px, env(safe-area-inset-right, 0px));
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
  body.is-interactive .zenaqua-dock {
    bottom: calc(62px + env(safe-area-inset-bottom, 0px));
  }
}

/* ==========================================================================
   v9.1 — v9.4: THU GỌN HUD (<= 12 NÚT MẶC ĐỊNH), BÍ CẢNH TRẢM YÊU,
   MVP QUÀ 4 BẬC, THỂ LỰC BƠI, 4 GHẾ ĐỒNG CHỦ TRÌ & STUDIO THUỶ MẶC
   ========================================================================== */
html:not(.hud-expanded) .hud-collapsible {
  display: none !important;
}

/* ── Banner MVP Quà Tặng 4 Bậc (Phase 2C) ── */
.gift-mvp-callout {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 99px;
  background: linear-gradient(135deg, rgba(88, 18, 42, 0.94), rgba(36, 12, 28, 0.94));
  border: 1.5px solid var(--gold-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), 0 0 18px rgba(244, 200, 106, 0.4);
  font-size: 12px;
  color: #fff6e5;
  pointer-events: none;
  animation: bannerDrop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

.gift-mvp-callout .mvp-tier-badge {
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(244, 200, 106, 0.22);
  color: var(--gold-strong);
  font-weight: 800;
  font-size: 10.5px;
}

.gift-mvp-callout .gift-mvp-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #7c2d12 center / cover no-repeat;
  border: 1.5px solid var(--gold-strong);
  font-weight: 800;
  font-size: 12px;
}

.gift-mvp-callout[data-tier="4"] {
  font-size: 13.5px;
  padding: 8px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 28px rgba(250, 204, 21, 0.55);
}

/* ── Thanh Linh Lực Bơi ZenAqua (Phase 2D) ── */
.swim-stamina-pill {
  position: absolute;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 14;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 99px;
  background: rgba(12, 38, 52, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.55);
  color: #e0f2fe;
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}

.swim-stamina-track {
  width: 86px;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.swim-stamina-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #34d399);
  transition: width 0.2s ease;
}

/* ── Thanh HUD Bí Cảnh Trảm Yêu & Cá Chép Vũ Môn (Phase 3A/3B) ── */
.tram-yeu-hud {
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  width: min(92vw, 540px);
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(20, 12, 26, 0.86);
  border: 1px solid rgba(244, 200, 106, 0.42);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

body.is-live-obs .tram-yeu-hud {
  top: 64px;
}

.ty-top-row,
.ty-factions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
}

.ty-boss-txt {
  color: #fde68a;
  font-size: 11.5px;
  font-weight: 800;
}

.ty-phase-pill,
.ty-mvp-pill,
.ty-carp-pill {
  padding: 1px 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-weight: 700;
  font-size: 10.5px;
}

.ty-hp-track {
  width: 100%;
  height: 7px;
  margin: 5px 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.ty-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #ef4444, #f59e0b);
  transition: width 0.25s ease;
}

.ty-fac.is-chinh {
  color: #fde047;
  font-weight: 700;
}

.ty-fac.is-ma {
  color: #c084fc;
  font-weight: 700;
}

/* ── 4 Ghế Khách Mời Đồng Chủ Trì (Phase 4D) ── */
.cohost-seats-strip {
  position: absolute;
  top: 118px;
  right: 14px;
  z-index: 14;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.cohost-seat-pill {
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(24, 16, 32, 0.86);
  border: 1px solid rgba(244, 200, 106, 0.45);
  color: #fef3c7;
  font-size: 11px;
  font-weight: 700;
}

/* ── Nút Bỏ Qua Dạo Cảnh 5s & Khung Tranh Thuỷ Mặc (Phase 5C) ── */
.skip-flythrough-pill {
  position: absolute;
  bottom: 84px;
  right: 18px;
  z-index: 22;
  padding: 7px 14px;
  border-radius: 99px;
  background: rgba(18, 12, 24, 0.88);
  border: 1.5px solid var(--gold);
  color: var(--gold-strong);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.ink-photo-frame {
  position: absolute;
  inset: 0;
  z-index: 25;
  pointer-events: none;
}

.ink-photo-border {
  position: absolute;
  inset: 14px;
  border: 2px solid rgba(244, 200, 106, 0.65);
  border-radius: 16px;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.65);
}

.ink-photo-poem {
  position: absolute;
  top: 32px;
  left: 36px;
  color: #fef3c7;
  font-family: var(--font-serif);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

.ink-photo-poem strong {
  display: block;
  font-size: 18px;
  letter-spacing: 0.14em;
  color: var(--gold-strong);
}

.ink-photo-poem span {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  font-style: italic;
}

.ink-photo-seal {
  position: absolute;
  bottom: 34px;
  right: 36px;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: rgba(184, 28, 28, 0.92);
  border: 2px solid #fca5a5;
  color: #fff5f5;
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 14px;
  line-height: 1.15;
  display: grid;
  place-items: center;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

html.tkc-photo-studio .hud-top,
html.tkc-photo-studio .hud-zones,
html.tkc-photo-studio .hud-weather,
html.tkc-photo-studio .hud-bottom,
html.tkc-photo-studio .joy-wrap,
html.tkc-photo-studio .cmd-help-float-btn,
html.tkc-photo-studio .live-stage-hud {
  opacity: 0 !important;
  pointer-events: none !important;
}



/* ══════════════════════════════════════════════════════════════════════════
   v12.0 — GIA VIÊN ĐỘNG PHỦ LIVE (THE SIMS × PLAY TOGETHER) & NHUỘM Y PHỤC/TÓC OMBRE
   ══════════════════════════════════════════════════════════════════════════ */
.ombre-hair-bar,
.wardrobe-dye-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0 10px;
  padding: 8px 11px;
  border-radius: 12px;
  background: rgba(18, 13, 30, 0.84);
  border: 1px solid rgba(244, 114, 182, 0.34);
  font-size: 11.5px;
  color: #fdf2f8;
}

.ombre-hair-bar label,
.wardrobe-dye-bar label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  color: #fde68a;
}

.ombre-hair-bar input[type="color"],
.wardrobe-dye-bar input[type="color"] {
  width: 28px;
  height: 26px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  cursor: pointer;
}

.wardrobe-dye-bar select,
.gv-mini-select {
  height: 30px;
  padding: 0 8px;
  border-radius: 9px;
  border: 1px solid rgba(244, 200, 106, 0.42);
  background: rgba(15, 23, 42, 0.9);
  color: #fef3c7;
  font-size: 11.5px;
  font-weight: 700;
}

.gv-speedrun-pill {
  position: absolute;
  top: 96px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 18;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid #f59e0b;
  color: #fef3c7;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.gia-vien-dock {
  position: absolute;
  left: 50%;
  bottom: 58px;
  transform: translateX(-50%);
  z-index: 19;
  width: min(94vw, 960px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: auto;
}

body.is-live-obs .gia-vien-dock,
html.obs-clean .gia-vien-dock,
html.tkc-photo-studio .gia-vien-dock {
  display: none !important;
}

.gv-dock-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(244, 200, 106, 0.42);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
}

.gv-build-tray {
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(14, 18, 34, 0.92);
  border: 1px solid rgba(244, 114, 182, 0.45);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.52);
}

.gv-tray-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.gv-cat-tabs,
.gv-tool-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.gv-cat-tabs button,
.gv-tool-btn {
  height: 28px;
  padding: 0 9px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(30, 41, 59, 0.85);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.gv-cat-tabs button.is-on,
.gv-tool-btn.is-on {
  background: linear-gradient(135deg, #ec4899, #f59e0b);
  border-color: #fef08a;
  color: #fff;
}

.gv-swatch-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}

.gv-swatch-lbl {
  font-size: 11px;
  font-weight: 700;
  color: #fde68a;
}

.gv-swatch-strip {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.gv-swatch-dot {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
}

.gv-swatch-dot.is-on {
  transform: scale(1.18);
  border-color: #fde047;
  box-shadow: 0 0 8px rgba(253, 224, 71, 0.8);
}

.gv-fan-vote-pill {
  margin-left: auto;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(236, 72, 153, 0.24);
  border: 1px solid rgba(244, 114, 182, 0.6);
  color: #fbcfe8;
  font-size: 11px;
  font-weight: 700;
}

.gv-items-strip {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.gv-item-card {
  flex: 0 0 132px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 7px 9px;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(23, 31, 52, 0.9);
  color: #f8fafc;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.gv-item-card:hover {
  border-color: #f472b6;
  transform: translateY(-1px);
}

.gv-item-card.is-on {
  border-color: #fde047;
  background: linear-gradient(145deg, rgba(236, 72, 153, 0.28), rgba(30, 41, 59, 0.95));
}

.gv-item-card strong {
  font-size: 11.5px;
  line-height: 1.25;
  color: #fff;
}

.gv-item-card small {
  font-size: 10.5px;
  color: #fde68a;
}

@media (max-width: 768px) {
  .gia-vien-dock {
    bottom: 52px;
    width: 96vw;
  }
  .gv-item-card {
    flex: 0 0 116px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   v12.1 — LA BÀN TRUYỀN TỐNG TRẬN BO GÓC MỀM MẠI CHUẨN PLAY TOGETHER
   ═══════════════════════════════════════════════════════════════════════════ */
.tp-pt-modal .tp-pt-card {
  border-radius: 30px;
  border: 3px solid rgba(255, 255, 255, 0.88);
  background:
    radial-gradient(circle at 14% 0%, rgba(103, 232, 249, 0.22), transparent 45%),
    radial-gradient(circle at 88% 8%, rgba(244, 114, 182, 0.24), transparent 48%),
    linear-gradient(165deg, rgba(30, 27, 75, 0.96), rgba(18, 25, 48, 0.97));
  box-shadow:
    0 24px 60px rgba(7, 11, 26, 0.72),
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    0 0 0 5px rgba(103, 232, 249, 0.16);
  padding: 20px 22px 22px;
  max-width: 820px;
}

.tp-pt-head {
  border-bottom: none;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.tp-pt-kicker {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.25), rgba(244, 114, 182, 0.28));
  border: 1px solid rgba(165, 243, 252, 0.55);
  color: #cffafe;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.tp-pt-head h2 {
  font-size: 20px;
  font-weight: 900;
  color: #fffdf7;
  margin: 6px 0 0;
  letter-spacing: -0.01em;
}

.tp-pt-close {
  width: 38px;
  height: 38px;
  border-radius: 999px !important;
  border: 2px solid rgba(255, 255, 255, 0.65) !important;
  background: rgba(244, 63, 94, 0.85) !important;
  color: #fff !important;
  font-weight: 900;
  font-size: 15px;
  box-shadow: 0 4px 0 rgba(159, 18, 57, 0.75);
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tp-pt-close:hover {
  transform: scale(1.08);
}

.tp-pt-close:active {
  transform: translateY(2px) scale(0.95);
}

.tp-pt-quickbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.tp-pt-code-wrap {
  flex: 1 1 360px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  border: 2px solid rgba(165, 243, 252, 0.55);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
}

.tp-pt-code-wrap:focus-within {
  border-color: #fde047;
  box-shadow: 0 0 0 3px rgba(253, 224, 71, 0.25), inset 0 2px 6px rgba(0, 0, 0, 0.35);
}

.tp-pt-code-ico {
  font-size: 16px;
}

.tp-pt-code-wrap input {
  flex: 1;
  min-width: 120px;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #fff !important;
  font-size: 13.5px;
  font-weight: 700;
  padding: 6px 4px;
}

.tp-pt-code-wrap input::placeholder {
  color: rgba(203, 213, 225, 0.72);
  font-weight: 600;
}

.tp-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  border: 2px solid rgba(255, 255, 255, 0.85);
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.15s ease;
}

.tp-pill-btn:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.06);
}

.tp-pill-btn:active {
  transform: translateY(2px) scale(0.97);
}

.tp-pill-cyan {
  background: linear-gradient(180deg, #38bdf8, #0284c7);
  color: #ffffff;
  box-shadow: 0 4px 0 #0369a1, 0 6px 14px rgba(14, 165, 233, 0.35);
}

.tp-pill-pink {
  background: linear-gradient(180deg, #f472b6, #db2777);
  color: #ffffff;
  box-shadow: 0 4px 0 #9d174d, 0 6px 14px rgba(236, 72, 153, 0.35);
}

.tp-pill-gold {
  background: linear-gradient(180deg, #fde047, #f59e0b);
  color: #1e1b4b;
  box-shadow: 0 4px 0 #b45309, 0 6px 14px rgba(245, 158, 11, 0.35);
}

.tp-pill-ghost {
  background: rgba(51, 65, 85, 0.82);
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.65);
  box-shadow: 0 3px 0 rgba(15, 23, 42, 0.75);
  padding: 6px 13px;
  font-size: 12px;
}

.tp-pt-feedback {
  margin: 2px 0 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  border: 1.5px solid rgba(253, 224, 71, 0.55);
  color: #fef08a;
  font-size: 12.5px;
  font-weight: 700;
}

.tp-pt-tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  border: 1.5px solid rgba(148, 163, 184, 0.32);
  margin-bottom: 12px;
  overflow-x: auto;
}

.tp-pt-tab {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 12.8px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tp-pt-tab.is-active {
  background: linear-gradient(180deg, #fffdf7, #fef3c7);
  color: #1e1b4b;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.32);
}

.tp-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.25);
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 900;
}

.tp-pt-tab.is-active .tp-tab-badge {
  background: #ec4899;
  color: #fff;
}

.tp-room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(242px, 1fr));
  gap: 10px;
  max-height: 310px;
  overflow-y: auto;
  padding: 2px 4px 6px 2px;
}

.tp-room-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 270px;
  overflow-y: auto;
  padding-right: 4px;
}

.tp-room-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
  border: 2px solid rgba(165, 243, 252, 0.28);
  box-shadow: 0 6px 16px rgba(2, 6, 23, 0.36);
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.16s ease;
}

.tp-room-card:hover {
  transform: translateY(-2px);
  border-color: rgba(244, 114, 182, 0.72);
}

.tp-room-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.tp-room-num-pill {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.22);
  border: 1.5px solid rgba(125, 211, 252, 0.65);
  color: #e0f2fe;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.tp-online-pill {
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(74, 222, 128, 0.6);
  color: #bbf7d0;
}

.tp-online-pill.is-live {
  background: rgba(244, 63, 94, 0.28);
  border-color: rgba(251, 113, 133, 0.85);
  color: #fecdd3;
}

.tp-room-title {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
}

.tp-room-meta {
  font-size: 11.5px;
  color: #cbd5e1;
  line-height: 1.35;
}

.tp-room-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}

.tp-room-stats {
  font-size: 11.5px;
  color: #fde68a;
  font-weight: 700;
}

.tp-split-2 {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 12px;
}

.tp-soft-box {
  padding: 14px 16px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.62);
  border: 1.8px solid rgba(148, 163, 184, 0.28);
}

.tp-sec-title {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #fef08a;
  margin-bottom: 8px;
}

.tp-hint-txt {
  display: block;
  font-size: 11.5px;
  color: #cbd5e1;
  line-height: 1.4;
}

.tp-my-room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tp-room-badge-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tp-room-chip-lg {
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.28), rgba(244, 114, 182, 0.28));
  border: 2px solid #fde047;
  color: #fef9c3;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.tp-form-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 10px;
}

.tp-field-lbl {
  display: block;
  font-size: 11.8px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 5px;
}

.tp-pill-input {
  width: 100%;
  padding: 9px 14px !important;
  border-radius: 999px !important;
  border: 1.8px solid rgba(148, 163, 184, 0.45) !important;
  background: rgba(15, 23, 42, 0.85) !important;
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
}

.tp-pill-input:focus {
  border-color: #67e8f9 !important;
  outline: none !important;
}

.tp-privacy-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tp-privacy-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 20px;
  border: 2px solid rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.78);
  color: #e2e8f0;
  text-align: left;
  cursor: pointer;
  transition: all 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tp-privacy-pill strong {
  font-size: 12.8px;
  color: #fff;
}

.tp-privacy-pill small {
  font-size: 10.8px;
  color: #cbd5e1;
  line-height: 1.3;
}

.tp-privacy-pill.is-on {
  border-color: #fde047;
  background: linear-gradient(150deg, rgba(236, 72, 153, 0.32), rgba(14, 165, 233, 0.28));
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.24);
  transform: translateY(-1px);
}

.tp-save-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.tp-pub-row {
  gap: 8px;
}

@media (max-width: 720px) {
  .tp-split-2,
  .tp-form-grid,
  .tp-privacy-pills {
    grid-template-columns: 1fr;
  }
  .tp-pt-modal .tp-pt-card {
    border-radius: 24px;
    padding: 16px 14px;
  }
}
