/* ============================================================================
 * 《PHỆ TIÊN: NGHỊCH THIÊN TU ĐẠO》 — 《HUYỀN NGỌC LƯU KIM》 AAA DESIGN SYSTEM
 * (styles.css)
 * Aesthetic: Naraka: Bladepoint × Modern TLBB PC Tu Tiên Sinh Tồn & Đấu Pháp
 * Surfaces:  Huyền Mặc Lưu Ly (Obsidian Ink Glass) • Lưu Kim Cổ Đồng (Gilded Bronze)
 *            Đế Ngọc Linh Quang (Imperial Jade) • Chu Ấn Huyết Mệnh (Crimson Seal)
 * Ergonomics: 88%+ Unobstructed 3D Viewport • Strictly Centered Sculpted Action Bar
 * ============================================================================ */

:root {
  /* Core Void & Obsidian Ink Glass Surfaces */
  --pt-bg-void: #05070b;
  --pt-obsidian-glass: linear-gradient(165deg, rgba(13, 17, 26, 0.92) 0%, rgba(7, 10, 16, 0.96) 100%);
  --pt-modal-surface: radial-gradient(ellipse at 50% 0%, rgba(212, 175, 95, 0.11), transparent 58%),
    linear-gradient(170deg, rgba(14, 18, 28, 0.96) 0%, rgba(8, 10, 17, 0.99) 100%);
  --pt-card-surface: linear-gradient(165deg, rgba(18, 24, 37, 0.88) 0%, rgba(10, 14, 23, 0.95) 100%);

  /* Legacy Variable Aliases (Preserved & Elevated for Seamless Compatibility) */
  --pt-bronze-glass: rgba(11, 15, 24, 0.90);
  --pt-bronze-panel: rgba(12, 16, 25, 0.96);
  --pt-bronze-card: rgba(17, 23, 36, 0.88);

  /* Gilded Bronze Rims & Specular Highlights */
  --pt-gold: #d4af5f;
  --pt-gold-bright: #fbbf24;
  --pt-gold-pale: #fef08a;
  --pt-gold-soft: rgba(212, 175, 95, 0.48);
  --pt-gold-subtle: rgba(212, 175, 95, 0.22);
  --pt-bronze-rim: 1px solid rgba(212, 175, 95, 0.48);
  --pt-inner-specular: inset 0 1px 0 rgba(255, 248, 220, 0.14);

  /* Imperial Jade, Crimson Seal & Porcelain Typography */
  --pt-jade: #2dd4bf;
  --pt-jade-bright: #34d399;
  --pt-jade-deep: #0f766e;
  --pt-crimson: #e11d48;
  --pt-crimson-bright: #fb7185;
  --pt-porcelain: #e2e8f0;
  --pt-porcelain-bright: #f8fafc;
  --pt-porcelain-muted: #94a3b8;

  /* Optics, Viewport Safe-Area & Typography */
  --pt-blur: blur(16px);
  --pt-safe-top: env(safe-area-inset-top, 0px);
  --pt-safe-right: env(safe-area-inset-right, 0px);
  --pt-safe-bottom: env(safe-area-inset-bottom, 0px);
  --pt-safe-left: env(safe-area-inset-left, 0px);
  --pt-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --pt-font-title: 'Palatino Linotype', 'Book Antiqua', 'Noto Serif', Georgia, serif;
  --pt-font-ui: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--pt-bg-void);
  color: var(--pt-porcelain);
  font-family: var(--pt-font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
}

/* Low-End Integrated GPU / Steam Deck Battery Saver (Disables Expensive Frosted Glass Blur) */
body.pt-perf-low {
  --pt-blur: none;
}

body.pt-perf-low * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Custom 5px Gilded Scrollbars Across All Modal Bodies & Panels */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 95, 0.58) rgba(6, 9, 15, 0.72);
}

::-webkit-scrollbar,
.pt-modal-body::-webkit-scrollbar,
.pt-modal-window::-webkit-scrollbar,
.pt-mv-body::-webkit-scrollbar,
.pt-prog-col::-webkit-scrollbar,
.pt-prog-dialog::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track,
.pt-modal-body::-webkit-scrollbar-track,
.pt-modal-window::-webkit-scrollbar-track,
.pt-mv-body::-webkit-scrollbar-track,
.pt-prog-col::-webkit-scrollbar-track,
.pt-prog-dialog::-webkit-scrollbar-track {
  background: rgba(6, 9, 15, 0.72);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb,
.pt-modal-body::-webkit-scrollbar-thumb,
.pt-modal-window::-webkit-scrollbar-thumb,
.pt-mv-body::-webkit-scrollbar-thumb,
.pt-prog-col::-webkit-scrollbar-thumb,
.pt-prog-dialog::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(212, 175, 95, 0.76) 0%, rgba(138, 102, 42, 0.90) 100%);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover,
.pt-modal-body::-webkit-scrollbar-thumb:hover,
.pt-mv-body::-webkit-scrollbar-thumb:hover,
.pt-prog-col::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #fef08a 0%, #fbbf24 100%);
}

#game-canvas,
body > canvas:not(.pt-cs-ash-canvas) {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: block;
  z-index: 1;
  outline: none;
}

/* Subtle atmospheric edge focus when -12dB Đạo Lôi 9 ducking activates */
body.pt-audio-ducked::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  box-shadow: inset 0 0 110px rgba(248, 250, 252, 0.20), inset 0 0 42px rgba(8, 12, 22, 0.88);
  transition: box-shadow 0.16s ease;
}

/* ============================================================================
 * 1. ROOT HUD OVERLAY & DIEGETIC WORLD LAYER (88%+ UNOBSTRUCTED 3D VIEWPORT)
 * ============================================================================ */
.pt-hud-root {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  overflow: hidden;
}

.pt-diegetic-layer {
  position: fixed;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  overflow: hidden;
}

/* 8-Octant Screen-Edge Threat Ripples (25m - 60m Combat / Độ Kiếp) */
.pt-octant-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 11;
}

.pt-octant-ripple {
  position: fixed;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease-out;
  filter: blur(2px);
}

.pt-octant-ripple.is-tribulation {
  --rip-tint: rgba(168, 85, 247, 0.58);
}

.pt-octant-ripple.is-combat {
  --rip-tint: rgba(225, 29, 72, 0.52);
}

/* N, S, E, W, NE, NW, SE, SW Edge Ink Smudges */
.pt-octant-n {
  top: 0; left: 26%; width: 48%; height: 38px;
  background: radial-gradient(ellipse at 50% 0%, #020306 26%, var(--rip-tint, rgba(225,29,72,0.45)) 62%, transparent 100%);
}
.pt-octant-s {
  bottom: 0; left: 26%; width: 48%; height: 38px;
  background: radial-gradient(ellipse at 50% 100%, #020306 26%, var(--rip-tint, rgba(225,29,72,0.45)) 62%, transparent 100%);
}
.pt-octant-w {
  left: 0; top: 24%; width: 40px; height: 52%;
  background: radial-gradient(ellipse at 0% 50%, #020306 26%, var(--rip-tint, rgba(225,29,72,0.45)) 62%, transparent 100%);
}
.pt-octant-e {
  right: 0; top: 24%; width: 40px; height: 52%;
  background: radial-gradient(ellipse at 100% 50%, #020306 26%, var(--rip-tint, rgba(225,29,72,0.45)) 62%, transparent 100%);
}
.pt-octant-nw {
  top: 0; left: 0; width: 210px; height: 140px;
  background: radial-gradient(ellipse at 0% 0%, #020306 22%, var(--rip-tint, rgba(225,29,72,0.45)) 56%, transparent 90%);
}
.pt-octant-ne {
  top: 0; right: 0; width: 210px; height: 140px;
  background: radial-gradient(ellipse at 100% 0%, #020306 22%, var(--rip-tint, rgba(225,29,72,0.45)) 56%, transparent 90%);
}
.pt-octant-sw {
  bottom: 0; left: 0; width: 210px; height: 140px;
  background: radial-gradient(ellipse at 0% 100%, #020306 22%, var(--rip-tint, rgba(225,29,72,0.45)) 56%, transparent 90%);
}
.pt-octant-se {
  bottom: 0; right: 0; width: 210px; height: 140px;
  background: radial-gradient(ellipse at 100% 100%, #020306 22%, var(--rip-tint, rgba(225,29,72,0.45)) 56%, transparent 90%);
}

/* Blood Thread SVG Overlay (Phản Cốt Phù 3.0s Chest-to-Chest Wire) */
.pt-blood-thread-svg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 14;
}

.pt-blood-wire-glow {
  stroke: rgba(225, 29, 72, 0.50);
  stroke-width: 8px;
  stroke-linecap: round;
}

.pt-blood-wire-core {
  stroke: #fb7185;
  stroke-width: 2.6px;
  stroke-dasharray: 10 5;
  stroke-linecap: round;
  animation: ptWirePulse 0.25s linear infinite;
}

@keyframes ptWirePulse {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -15; }
}

.pt-betrayal-badge {
  position: fixed;
  z-index: 15;
  transform: translate(-50%, -50%);
  padding: 3px 10px;
  background: linear-gradient(180deg, rgba(136, 19, 55, 0.94), rgba(69, 10, 10, 0.96));
  border: 1px solid var(--pt-crimson-bright);
  border-radius: 4px;
  color: #ffe4e6;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 0 18px rgba(225, 29, 72, 0.78), var(--pt-inner-specular);
  white-space: nowrap;
  animation: ptDangerPulse 0.35s ease-in-out infinite alternate;
}

@keyframes ptDangerPulse {
  from { transform: translate(-50%, -50%) scale(0.96); }
  to { transform: translate(-50%, -50%) scale(1.06); }
}

/* ============================================================================
 * 2. DIEGETIC OVERHEAD BARS (250HP TICKS + 6x6 E GEM + 4-COLOR GOURD)
 * ============================================================================ */
.pt-overhead-bar {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.pt-ov-name-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  text-shadow: 0 1px 3px #000, 0 0 6px rgba(0, 0, 0, 0.95);
  white-space: nowrap;
}

.pt-ov-realm-tag {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(8, 11, 18, 0.90);
  border: 1px solid rgba(212, 175, 95, 0.44);
  color: var(--pt-gold-bright);
}

.pt-ov-name {
  color: var(--pt-porcelain-bright);
  letter-spacing: 0.02em;
}

.pt-overhead-bar.is-hostile .pt-ov-name {
  color: #fecdd3;
}

.pt-overhead-bar.is-ally .pt-ov-name {
  color: #99f6e4;
}

.pt-overhead-bar.is-boss .pt-ov-name {
  color: var(--pt-gold-pale);
  font-family: var(--pt-font-title);
  font-size: 12.5px;
  text-shadow: 0 1px 4px #000, 0 0 10px rgba(251, 191, 36, 0.45);
}

.pt-ov-cc-pill {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, #6b21a8, #4c1d95);
  border: 1px solid #e9d5ff;
  color: #faf5ff;
  letter-spacing: 0.04em;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.55);
}

/* Right end of Nameplate: 4-Color Hồ Lô Icon */
.pt-ov-gourd {
  width: 13px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pt-ov-gourd svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.pt-ov-gourd[data-tier="0"] {
  color: #94a3b8;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9));
}
.pt-ov-gourd[data-tier="1"] {
  color: var(--pt-jade-bright);
  filter: drop-shadow(0 0 4px rgba(52, 211, 153, 0.70));
}
.pt-ov-gourd[data-tier="2"] {
  color: var(--pt-gold-bright);
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.85));
}
.pt-ov-gourd[data-tier="3"] {
  color: var(--pt-crimson);
  filter: drop-shadow(0 0 7px rgba(225, 29, 72, 0.95));
  animation: ptGourdFlame 0.7s ease-in-out infinite alternate;
}

@keyframes ptGourdFlame {
  from { transform: scale(0.95); }
  to { transform: scale(1.12); }
}

/* HP Bar Row: 6x6px E Diamond Gem on Left + Segmented 250HP Bar + Silver Shield */
.pt-ov-bar-row {
  display: flex;
  align-items: center;
  gap: 3px;
}

.pt-ov-e-gem {
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  flex-shrink: 0;
  background: #06080d;
  border: 1px solid rgba(212, 175, 95, 0.45);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.pt-ov-e-gem.is-ready {
  background: var(--wpn-color, var(--pt-jade));
  border-color: #ffffff;
  box-shadow: 0 0 7px var(--wpn-color, var(--pt-jade)), 0 0 2px #ffffff;
}

.pt-ov-track {
  position: relative;
  width: 96px;
  height: 8px;
  background: rgba(6, 9, 15, 0.92);
  border: 1px solid rgba(212, 175, 95, 0.46);
  border-radius: 2px;
  overflow: hidden;
  display: flex;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.82);
}

.pt-overhead-bar.is-monster .pt-ov-track {
  width: 72px;
  height: 6px;
  border-color: rgba(148, 163, 184, 0.36);
}

.pt-overhead-bar.is-boss .pt-ov-track {
  width: 150px;
  height: 11px;
  border-color: var(--pt-gold-bright);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 10px rgba(251, 191, 36, 0.28);
}

.pt-ov-hp-fill {
  height: 100%;
  background: linear-gradient(180deg, #34d399 0%, #059669 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: width 0.08s linear;
}

.pt-overhead-bar.is-ally .pt-ov-hp-fill {
  background: linear-gradient(180deg, #2dd4bf 0%, #0d9488 100%);
}

.pt-overhead-bar.is-hostile .pt-ov-hp-fill {
  background: linear-gradient(180deg, #fb7185 0%, #e11d48 100%);
}

.pt-overhead-bar.is-boss .pt-ov-hp-fill {
  background: linear-gradient(90deg, #e11d48 0%, #f59e0b 58%, #fef08a 100%);
}

/* Contiguous White-Silver Virtual Shield (Giáp Ảo) */
.pt-ov-shield-fill {
  height: 100%;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 65%, #94a3b8 100%);
  box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.92);
  transition: width 0.08s linear;
}

/* Vertical Tick Lines every 250 HP */
.pt-ov-ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent calc(var(--tick-px, 12px) - 1px),
    rgba(5, 7, 12, 0.82) calc(var(--tick-px, 12px) - 1px),
    rgba(5, 7, 12, 0.82) var(--tick-px, 12px)
  );
}

/* Floating Damage / Heal Numbers */
.pt-float-text {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.96), 0 0 2px #000;
  will-change: transform, opacity;
}

/* ============================================================================
 * 3A. TOP-LEFT: SCULPTED CHARACTER UNIT FRAME (NARAKA / MODERN TLBB PC)
 * ============================================================================ */
.pt-hud-topleft {
  position: fixed;
  top: 14px;
  left: 16px;
  z-index: 22;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  pointer-events: auto;
}

.pt-status-card,
.pt-unit-frame {
  position: relative;
  min-width: 268px;
  max-width: 310px;
  padding: 9px 12px 9px 13px;
  background: var(--pt-obsidian-glass);
  backdrop-filter: var(--pt-blur);
  -webkit-backdrop-filter: var(--pt-blur);
  border: var(--pt-bronze-rim);
  border-left: 3px solid var(--pt-jade);
  border-radius: 4px 10px 10px 4px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.76), var(--pt-inner-specular);
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

/* Angled Gilded-Jade Left Accent & Subtle Corner Ornament */
.pt-status-card::before,
.pt-unit-frame::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--pt-jade-bright) 0%, var(--pt-gold) 65%, rgba(212, 175, 95, 0.25) 100%);
  pointer-events: none;
}

.pt-status-card::after,
.pt-unit-frame::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 5px;
  width: 8px;
  height: 8px;
  border-top: 1px solid rgba(212, 175, 95, 0.65);
  border-right: 1px solid rgba(212, 175, 95, 0.65);
  border-top-right-radius: 3px;
  pointer-events: none;
}

/* Support horizontal emblem + right column layout automatically when #pt-unit-emblem is direct child */
.pt-unit-frame:has(> #pt-unit-emblem),
.pt-unit-frame:has(> .pt-unit-emblem),
.pt-status-card:has(> #pt-unit-emblem),
.pt-status-card:has(> .pt-unit-emblem) {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.pt-unit-meta,
.pt-unit-body,
.pt-unit-info,
.pt-unit-content,
.pt-unit-col,
.pt-unit-bars {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Avatar / Weapon Emblem inside Unit Frame */
#pt-unit-emblem,
.pt-unit-emblem,
.pt-unit-avatar {
  position: relative;
  width: 42px;
  height: 42px;
  padding: 4px;
  flex-shrink: 0;
  border-radius: 8px;
  background: radial-gradient(circle at 50% 35%, rgba(45, 212, 191, 0.24), rgba(7, 10, 16, 0.96) 76%);
  border: 1.5px solid var(--wpn-accent, rgba(212, 175, 95, 0.72));
  box-shadow: 0 0 14px rgba(45, 212, 191, 0.20), var(--pt-inner-specular);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s var(--pt-ease-out), border-color 0.15s ease, box-shadow 0.15s ease;
}

#pt-unit-emblem:hover,
.pt-unit-emblem:hover,
.pt-unit-avatar:hover {
  transform: scale(1.04);
  border-color: var(--pt-gold-bright);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.35), var(--pt-inner-specular);
}

#pt-unit-emblem svg,
.pt-unit-emblem svg {
  width: 100%;
  height: 100%;
  transition: opacity 0.15s ease;
}

#pt-unit-emblem img,
.pt-unit-emblem img {
  position: absolute;
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.18s ease;
}

#pt-unit-emblem img.is-loaded,
.pt-unit-emblem img.is-loaded {
  opacity: 1;
}

#pt-unit-emblem:has(> img.is-loaded) svg,
.pt-unit-emblem:has(> img.is-loaded) svg {
  opacity: 0;
}

.pt-status-header,
.pt-unit-header,
.pt-unit-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  margin-bottom: 0;
  min-width: 0;
}

.pt-player-name,
#pt-hud-name {
  font-family: var(--pt-font-title);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--pt-porcelain-bright);
  letter-spacing: 0.02em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.88);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pt-realm-pill,
#pt-hud-realm {
  font-size: 10.5px;
  font-weight: 800;
  padding: 1.5px 7px;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(45, 212, 191, 0.20), rgba(212, 175, 95, 0.09) 56%, transparent 92%),
    linear-gradient(180deg, rgba(16, 23, 38, 0.95), rgba(8, 11, 19, 0.99));
  border: 1px solid currentColor;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 220, 0.22),
    0 0 10px rgba(45, 212, 191, 0.20),
    0 0 4px rgba(212, 175, 95, 0.18),
    0 2px 6px rgba(0, 0, 0, 0.58);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.92), 0 0 8px rgba(251, 191, 36, 0.22);
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Sculpted Live HP + Virtual Shield Bar inside Unit Frame */
.pt-unit-hp-wrap,
.pt-unit-hp-row {
  position: relative;
  width: 100%;
}

.pt-unit-hp-track,
#pt-unit-hp-track {
  position: relative;
  width: 100%;
  height: 15px;
  background: rgba(5, 8, 14, 0.94);
  border: 1px solid rgba(212, 175, 95, 0.44);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.88), 0 1px 0 rgba(255, 248, 220, 0.08);
}

.pt-unit-hp-fill,
#pt-unit-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #0d9488 0%, #10b981 52%, #34d399 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 0 10px rgba(52, 211, 153, 0.36);
  transition: width 0.14s var(--pt-ease-out);
}

.pt-unit-shield-fill,
#pt-unit-shield-fill {
  height: 100%;
  background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 56%, #94a3b8 100%);
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.95), 0 0 8px rgba(226, 232, 240, 0.48);
  transition: width 0.14s var(--pt-ease-out);
}

.pt-unit-hp-nums,
#pt-unit-hp-nums,
.pt-unit-hp-track #pt-dock-hp-text,
.pt-unit-hp-wrap #pt-dock-hp-text {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  color: #f8fafc;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.98), 0 0 6px rgba(0, 0, 0, 0.92);
  pointer-events: none;
}

/* Slim 5px Glowing Imperial Jade Tu Vi Bar */
.pt-tuvi-row {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 2.5px;
}

.pt-tuvi-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 600;
  color: var(--pt-porcelain-muted);
  letter-spacing: 0.02em;
}

.pt-tuvi-labels strong {
  color: var(--pt-jade);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.pt-tuvi-bar,
#pt-hud-tuvi-bar {
  height: 5px;
  background: rgba(4, 7, 13, 0.94);
  border: 1px solid rgba(212, 175, 95, 0.28);
  border-radius: 999px;
  overflow: hidden;
}

.pt-tuvi-fill,
#pt-hud-tuvi-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pt-jade-deep) 0%, var(--pt-jade) 58%, var(--pt-gold-bright) 100%);
  box-shadow: 0 0 8px rgba(45, 212, 191, 0.55);
  transition: width 0.25s var(--pt-ease-out);
}

.pt-tuvi-bar.is-full,
#pt-hud-tuvi-bar.is-full {
  border-color: rgba(251, 191, 36, 0.72);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.42);
}

.pt-tuvi-bar.is-full .pt-tuvi-fill,
#pt-hud-tuvi-bar.is-full #pt-hud-tuvi-fill {
  background: linear-gradient(90deg, #f59e0b 0%, #fef08a 38%, #ffffff 50%, #fef08a 62%, #fbbf24 100%);
  background-size: 200% 100%;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  animation: ptTuviBreakthroughPulse 1.65s ease-in-out infinite;
}

@keyframes ptTuviBreakthroughPulse {
  0% {
    background-position: 100% 0%;
    filter: brightness(0.98);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.72);
  }
  50% {
    background-position: 0% 0%;
    filter: brightness(1.18);
    box-shadow: 0 0 16px rgba(254, 240, 138, 0.98);
  }
  100% {
    background-position: -100% 0%;
    filter: brightness(0.98);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.72);
  }
}

/* ============================================================================
 * 3B. TOP-RIGHT: 146x146 COMPASS MINIMAP, ZONE PILL & SYSTEM MICRO-DOCK
 * ============================================================================ */
.pt-hud-topright {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 22;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  pointer-events: auto;
}

.pt-minimap-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.84));
}

.pt-hud-topright .pt-minimap-wrap {
  align-items: flex-end;
}

/* 146x146px Octagonal Bronze-Gold Bezel (#pt-minimap-canvas 142x142px) */
.pt-minimap-bezel {
  position: relative;
  width: 146px;
  height: 146px;
  padding: 2px;
  background: conic-gradient(
    from 45deg,
    #fbbf24 0deg,
    #785623 65deg,
    #d4af5f 135deg,
    #3f2e16 195deg,
    #f59e0b 260deg,
    #6b4e22 320deg,
    #fbbf24 360deg
  );
  clip-path: polygon(29.3% 0%, 70.7% 0%, 100% 29.3%, 100% 70.7%, 70.7% 100%, 29.3% 100%, 0% 70.7%, 0% 29.3%);
}

.pt-minimap-inner {
  width: 142px;
  height: 142px;
  background: radial-gradient(circle at 50% 50%, rgba(13, 19, 30, 0.94), rgba(6, 9, 15, 0.98));
  clip-path: polygon(29.3% 0%, 70.7% 0%, 100% 29.3%, 100% 70.7%, 70.7% 100%, 29.3% 100%, 0% 70.7%, 0% 29.3%);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.92);
}

#pt-minimap-canvas {
  width: 142px;
  height: 142px;
  display: block;
}

.pt-minimap-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  font-size: 9px;
  font-weight: 700;
  color: var(--pt-porcelain-muted);
  background: var(--pt-obsidian-glass);
  backdrop-filter: var(--pt-blur);
  -webkit-backdrop-filter: var(--pt-blur);
  border: 1px solid var(--pt-gold-subtle);
  border-radius: 999px;
  box-shadow: var(--pt-inner-specular);
}

.pt-leg-siphon { color: var(--pt-jade); }
.pt-leg-altar { color: var(--pt-gold-bright); }
.pt-leg-rift { color: var(--pt-crimson-bright); }

/* Sleek Translucent Zone Badge Pill (Zero Clutter: #pt-hud-zone-sub hidden) */
.pt-zone-pill-bar {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 4px 10px;
  min-width: 146px;
  max-width: 248px;
  background: var(--pt-obsidian-glass);
  backdrop-filter: var(--pt-blur);
  -webkit-backdrop-filter: var(--pt-blur);
  border: var(--pt-bronze-rim);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.72), var(--pt-inner-specular);
}

.pt-zone-row {
  padding-top: 5px;
  border-top: 1px solid rgba(212, 175, 95, 0.16);
}

.pt-zone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.pt-zone-name,
#pt-hud-zone-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--pt-gold-pale);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pt-zone-safety,
#pt-hud-zone-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 1.5px 6px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.pt-zone-safety.is-safe {
  background: rgba(16, 185, 129, 0.20);
  border: 1px solid rgba(52, 211, 153, 0.56);
  color: #6ee7b7;
}

.pt-zone-safety.is-pvp {
  background: rgba(225, 29, 72, 0.24);
  border: 1px solid rgba(251, 113, 133, 0.60);
  color: #fda4af;
}

.pt-zone-safety.is-arena {
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(251, 191, 36, 0.60);
  color: #fde68a;
}

/* Strictly Hide Verbose Subtitle Clutter */
.pt-zone-sub,
#pt-hud-zone-sub {
  display: none !important;
}

/* System Micro-Dock (Symmetrical 2x2 Grid: Động Phủ [H], NPC Thành / Pháp Bảo [K], Tiên Giới [M]) */
#pt-sys-micro-dock,
.pt-sys-micro-dock {
  display: grid;
  grid-template-columns: repeat(2, auto);
  justify-content: end;
  align-items: center;
  gap: 5px;
  max-width: 248px;
}

.pt-sys-btn,
#pt-sys-micro-dock .pt-qnav-btn,
#pt-sys-micro-dock .pt-mini-btn,
.pt-sys-micro-dock .pt-qnav-btn,
.pt-sys-micro-dock .pt-mini-btn,
#pt-sys-micro-dock > button,
.pt-sys-micro-dock > button {
  height: 27px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--pt-porcelain);
  background: var(--pt-obsidian-glass);
  backdrop-filter: var(--pt-blur);
  -webkit-backdrop-filter: var(--pt-blur);
  border: 1px solid rgba(212, 175, 95, 0.46);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.65), var(--pt-inner-specular);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.14s var(--pt-ease-out), border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.pt-sys-btn:hover,
.pt-sys-btn.is-active,
#pt-sys-micro-dock .pt-qnav-btn:hover,
#pt-sys-micro-dock .pt-mini-btn:hover,
#pt-sys-micro-dock .pt-mini-btn.is-active,
.pt-sys-micro-dock > button:hover,
.pt-sys-micro-dock > button.is-active {
  transform: translateY(-1.5px);
  color: var(--pt-gold-pale);
  border-color: var(--pt-gold-bright);
  background: linear-gradient(165deg, rgba(45, 34, 18, 0.94) 0%, rgba(14, 20, 32, 0.98) 100%);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.78), 0 0 12px rgba(251, 191, 36, 0.32), inset 0 1px 0 rgba(255, 251, 235, 0.24);
}

.pt-sys-btn:active,
#pt-sys-micro-dock > button:active,
.pt-sys-micro-dock > button:active {
  transform: translateY(0.5px) scale(0.97);
}

/* ============================================================================
 * 3C. TOP-CENTER: CAMPAIGN PILL & FLOATING POPOVER GRID (#pt-showcase-bar)
 * ============================================================================ */
#pt-showcase-bar {
  position: fixed;
  top: 10px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: min(640px, calc(100vw - 340px));
  max-width: calc(100vw - 340px);
  z-index: 9600;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--pt-modal-surface);
  backdrop-filter: var(--pt-blur);
  -webkit-backdrop-filter: var(--pt-blur);
  border: 1px solid rgba(212, 175, 95, 0.54);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.86), var(--pt-inner-specular);
  pointer-events: auto;
  user-select: none;
}

#pt-showcase-bar.is-collapsed {
  top: 10px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: auto;
  max-width: none;
  padding: 2px;
  border-radius: 999px;
  background: rgba(10, 14, 22, 0.76);
  border: 1px solid rgba(212, 175, 95, 0.38);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65), var(--pt-inner-specular);
}

#pt-showcase-bar.is-collapsed .pt-sc-items,
#pt-showcase-bar.is-collapsed .pt-sc-popover,
#pt-showcase-bar.is-collapsed .pt-sc-badge {
  display: none !important;
}

.pt-sc-badge {
  order: 1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--pt-gold-bright);
  padding: 2px 4px;
  border-right: none;
  white-space: nowrap;
}

.pt-sc-toggle,
#pt-sc-collapse-btn {
  order: 2;
  appearance: none;
  border: 1px solid rgba(212, 175, 95, 0.38);
  background: rgba(15, 22, 34, 0.88);
  color: var(--pt-gold-pale);
  font-family: var(--pt-font-ui);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

#pt-showcase-bar.is-collapsed .pt-sc-toggle,
#pt-showcase-bar.is-collapsed #pt-sc-collapse-btn {
  border-color: transparent;
  background: transparent;
  padding: 3px 10px;
}

.pt-sc-toggle:hover,
#pt-sc-collapse-btn:hover {
  color: #ffffff;
  border-color: var(--pt-gold-bright);
  background: rgba(45, 34, 18, 0.85);
}

.pt-sc-items,
.pt-sc-popover {
  order: 3;
  flex: 0 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  min-width: 0;
}

.pt-sc-btn {
  appearance: none;
  border: 1px solid rgba(212, 175, 95, 0.26);
  background: rgba(16, 22, 34, 0.90);
  color: var(--pt-porcelain);
  font-family: var(--pt-font-ui);
  font-weight: 600;
  font-size: 10px;
  line-height: 1.25;
  padding: 5px 7px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  transition: all 0.14s var(--pt-ease-out);
}

.pt-sc-btn:hover {
  border-color: var(--pt-gold-bright);
  background: rgba(52, 36, 16, 0.88);
  color: var(--pt-gold-pale);
  transform: translateY(-1px);
}

.pt-sc-btn.is-active {
  border-color: var(--pt-gold-bright);
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.92), rgba(15, 76, 72, 0.86));
  color: var(--pt-gold-pale);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.34);
}

/* ============================================================================
 * 4. BOTTOM-CENTER SCULPTED ACTION BAR (Q, W, E | R | D, F + COMPACT CONTROLS)
 *    Strictly Centered at left: 50%; transform: translateX(-50%); bottom: 14px;
 * ============================================================================ */
.pt-hud-bottom {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  z-index: 23;
}

/* Channeling Bar & Contextual Prompts (Siphon 3.5s / Safe Pocket 4.0s / Độ Kiếp) */
.pt-channel-strip {
  min-width: 288px;
  padding: 6px 13px;
  background: var(--pt-obsidian-glass);
  backdrop-filter: var(--pt-blur);
  -webkit-backdrop-filter: var(--pt-blur);
  border: var(--pt-bronze-rim);
  border-radius: 8px;
  display: none;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.78), var(--pt-inner-specular);
}

.pt-channel-strip.is-visible {
  display: flex;
}

.pt-channel-head {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--pt-gold-pale);
  letter-spacing: 0.02em;
}

.pt-channel-track {
  height: 6px;
  background: rgba(4, 7, 13, 0.94);
  border: 1px solid rgba(212, 175, 95, 0.25);
  border-radius: 999px;
  overflow: hidden;
}

.pt-channel-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pt-jade), var(--pt-gold-bright));
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.55);
  transition: width 0.05s linear;
}

/* 1-Line Crisp Skill Summary Hover Card */
.pt-skill-tooltip {
  max-width: 480px;
  padding: 8px 14px;
  background: var(--pt-modal-surface);
  backdrop-filter: var(--pt-blur);
  -webkit-backdrop-filter: var(--pt-blur);
  border: 1px solid rgba(212, 175, 95, 0.58);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.88), var(--pt-inner-specular);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.14s var(--pt-ease-out), transform 0.14s var(--pt-ease-out);
  pointer-events: none;
  text-align: center;
  display: none;
}

.pt-skill-tooltip.is-open {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.pt-tt-header {
  font-size: 11.5px;
  color: #cbd5e1;
  margin-bottom: 2px;
}

.pt-tt-header strong {
  color: var(--pt-porcelain-bright);
  font-size: 12.5px;
}

.pt-tt-tag {
  font-size: 13px;
  font-weight: 800;
  color: var(--pt-gold-bright);
  letter-spacing: 0.02em;
}

.pt-tt-desc {
  font-size: 11px;
  color: var(--pt-porcelain-muted);
  margin-top: 2px;
}

/* Sculpted Obsidian-Bronze Action Dock */
.pt-skill-dock {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  background: var(--pt-obsidian-glass);
  backdrop-filter: var(--pt-blur);
  -webkit-backdrop-filter: var(--pt-blur);
  border: 1px solid rgba(212, 175, 95, 0.50);
  border-bottom: 2px solid var(--pt-gold);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.86),
    inset 0 1px 0 rgba(255, 248, 220, 0.18),
    inset 0 -1px 14px rgba(212, 175, 95, 0.08);
  pointer-events: auto;
}

/* Top Center Gilded Specular Ornament */
.pt-skill-dock::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(254, 240, 138, 0.80), transparent);
  pointer-events: none;
}

.pt-dock-divider {
  width: 1px;
  height: 38px;
  background: linear-gradient(180deg, transparent, rgba(212, 175, 95, 0.60), transparent);
  margin: 0 2px;
}

/* Compact Weapon Emblem on Left of Action Bar */
.pt-weapon-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-right: 7px;
  border-right: 1px solid rgba(212, 175, 95, 0.24);
  cursor: pointer;
  transition: transform 0.14s var(--pt-ease-out);
}

.pt-weapon-badge:hover {
  transform: translateY(-1px);
}

.pt-weapon-icon-box {
  width: 40px;
  height: 40px;
  padding: 4px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(45, 212, 191, 0.22), #070a10 78%);
  border: 1.5px solid var(--wpn-accent, var(--pt-jade));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 14px rgba(45, 212, 191, 0.24), var(--pt-inner-specular);
  flex-shrink: 0;
}

.pt-weapon-icon-box svg {
  width: 100%;
  height: 100%;
  transition: opacity 0.15s ease;
}

.pt-weapon-icon-box img {
  position: absolute;
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.pt-weapon-icon-box img.is-loaded {
  opacity: 1;
}

.pt-weapon-icon-box:has(> img.is-loaded) svg,
.pt-slot-art:has(> img.is-loaded) svg {
  opacity: 0;
}

.pt-weapon-meta {
  display: flex;
  flex-direction: column;
  max-width: 92px;
}

.pt-weapon-title {
  font-size: 10px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pt-weapon-hp {
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--pt-jade-bright);
}

/* Individual 50x50px Q W E Skill Slots */
.pt-skill-slot {
  position: relative;
  width: 50px;
  height: 50px;
  background: radial-gradient(circle at 50% 24%, rgba(30, 41, 59, 0.65), rgba(8, 11, 18, 0.98) 78%);
  border: 1.5px solid rgba(212, 175, 95, 0.50);
  border-radius: 7px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.68), var(--pt-inner-specular);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s var(--pt-ease-out), border-color 0.15s ease, box-shadow 0.15s ease;
  padding: 0;
  color: var(--pt-porcelain-bright);
}

.pt-skill-slot:hover {
  transform: translateY(-2px);
  border-color: var(--pt-gold-bright);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.78), 0 0 14px rgba(251, 191, 36, 0.36), inset 0 1px 0 rgba(255, 251, 235, 0.24);
}

.pt-skill-slot:active {
  transform: translateY(1px) scale(0.96);
}

/* 60x60px Centerpiece Ultimate R Slot with Golden Halo Border */
.pt-skill-slot.slot-ult {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  border-width: 2px;
  border-color: var(--ult-accent, var(--pt-gold-bright));
  background: radial-gradient(circle at 50% 34%, rgba(212, 175, 95, 0.26), rgba(14, 18, 29, 0.96) 68%, rgba(7, 9, 15, 0.99) 100%);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.28),
    0 6px 18px rgba(0, 0, 0, 0.84),
    inset 0 0 14px rgba(251, 191, 36, 0.16),
    inset 0 1px 0 rgba(255, 251, 235, 0.32);
}

.pt-skill-slot.slot-ult::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 13px;
  border: 1px solid rgba(251, 191, 36, 0.30);
  pointer-events: none;
}

.pt-skill-slot.slot-ult:hover {
  box-shadow: 0 0 26px rgba(251, 191, 36, 0.48),
    0 8px 20px rgba(0, 0, 0, 0.88),
    inset 0 0 16px rgba(251, 191, 36, 0.24);
}

/* 46x46px D & F Talisman / Pill Slots */
.pt-skill-slot.slot-talisman {
  width: 46px;
  height: 46px;
  border-radius: 7px;
  border-color: rgba(45, 212, 191, 0.42);
}

.pt-skill-slot.is-depleted {
  opacity: 0.42;
  filter: grayscale(0.85);
}

.pt-slot-art {
  width: 82%;
  height: 82%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.pt-slot-art svg {
  width: 100%;
  height: 100%;
}

.pt-slot-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pt-slot-art img.is-loaded {
  opacity: 1;
}

/* Sculpted Diamond Key-Caps (Upright Crisp Letter Over Rotated Diamond Bezel) */
.pt-slot-key {
  position: absolute;
  top: -7px;
  left: -6px;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  background: transparent;
  border: none;
  font-size: 9.5px;
  font-weight: 800;
  color: var(--pt-gold-pale);
  text-shadow: 0 1px 2px #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.pt-slot-key::before {
  content: '';
  position: absolute;
  inset: 1px;
  background: linear-gradient(145deg, #182032 0%, #090c14 100%);
  border: 1px solid rgba(212, 175, 95, 0.88);
  border-radius: 3px;
  transform: rotate(45deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.88), inset 0 1px 0 rgba(255, 248, 220, 0.22);
  z-index: -1;
}

.pt-skill-slot.slot-ult .pt-slot-key {
  color: #ffffff;
}

.pt-skill-slot.slot-ult .pt-slot-key::before {
  background: linear-gradient(145deg, #78350f 0%, #271305 100%);
  border-color: var(--pt-gold-bright);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.55), 0 2px 6px rgba(0, 0, 0, 0.9);
}

.pt-slot-count {
  position: absolute;
  bottom: -5px;
  right: -5px;
  min-width: 18px;
  height: 17px;
  padding: 0 4px;
  background: linear-gradient(180deg, #0f172a, #070b14);
  border: 1px solid rgba(45, 212, 191, 0.65);
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #99f6e4;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
  z-index: 3;
}

/* Radial Cooldown Sweep + Numeric Timer */
.pt-slot-cd {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: conic-gradient(
    rgba(4, 6, 11, 0.88) var(--cd-deg, 0deg),
    transparent var(--cd-deg, 0deg)
  );
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.pt-skill-slot.on-cd .pt-slot-cd {
  display: flex;
}

.pt-slot-cd-num {
  font-size: 13.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--pt-gold-pale);
  text-shadow: 0 1px 4px #000, 0 0 6px rgba(0, 0, 0, 0.9);
}

/* Ultra-Compact Right Dock Utility Pills (#pt-btn-smart4, #pt-btn-mute) */
.pt-dock-controls {
  display: grid;
  grid-template-rows: repeat(2, auto);
  grid-auto-flow: column;
  gap: 4px;
  margin-left: 2px;
  padding-left: 6px;
  border-left: 1px solid rgba(212, 175, 95, 0.22);
}

.pt-mini-btn {
  height: 22px;
  padding: 0 7px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #cbd5e1;
  background: rgba(12, 17, 28, 0.90);
  border: 1px solid rgba(212, 175, 95, 0.30);
  border-radius: 5px;
  box-shadow: inset 0 1px 0 rgba(255, 248, 220, 0.10);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: all 0.14s var(--pt-ease-out);
}

.pt-mini-btn:hover,
.pt-mini-btn.is-active {
  color: #090c12;
  background: linear-gradient(180deg, #fef08a 0%, #fbbf24 100%);
  border-color: #fef08a;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.42);
}

/* SMART-4 Compact Mode (Merges D+F into 1 Contextual Slot & Slims Metadata) */
.pt-hud-root.is-smart4 .pt-weapon-meta {
  display: none;
}

.pt-hud-root.is-smart4 .pt-skill-slot[data-slot="F"] {
  display: none;
}

.pt-hud-root.is-smart4 .pt-skill-slot[data-slot="D"] .pt-slot-key {
  color: #fde68a;
}

.pt-hud-root.is-smart4 .pt-skill-slot[data-slot="D"] .pt-slot-key::before {
  transform: none;
  inset: 0;
  border-radius: 4px;
  background: linear-gradient(180deg, #7c2d12, #431407);
}

/* ============================================================================
 * 5. BOTTOM-RIGHT: COMPACT JADE GOURD, 2 HEART SAFE POCKETS & UTILITY DRAWER
 * ============================================================================ */
.pt-hud-bottomright {
  position: fixed;
  bottom: 14px;
  right: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  pointer-events: auto;
  z-index: 22;
}

.pt-extraction-card {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 7px 10px;
  max-width: 276px;
  background: var(--pt-obsidian-glass);
  backdrop-filter: var(--pt-blur);
  -webkit-backdrop-filter: var(--pt-blur);
  border: var(--pt-bronze-rim);
  border-radius: 9px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.78), var(--pt-inner-specular);
}

.pt-gourd-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 136px;
  flex: 1;
}

.pt-gourd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  color: var(--pt-gold-bright);
  letter-spacing: 0.02em;
}

.pt-gourd-tier-label {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(8, 12, 20, 0.92);
  border: 1px solid rgba(212, 175, 95, 0.30);
  white-space: nowrap;
}

.pt-gourd-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3.5px;
}

.pt-gourd-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  padding: 2.5px 5.5px;
  background: rgba(8, 12, 20, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--pt-porcelain);
  cursor: pointer;
  transition: transform 0.12s var(--pt-ease-out), border-color 0.14s ease, background-color 0.14s ease;
}

.pt-gourd-chip:hover {
  transform: translateY(-1px);
  border-color: var(--pt-gold-bright);
  background: rgba(24, 33, 50, 0.94);
}

.pt-gourd-chip.has-val {
  border-color: rgba(45, 212, 191, 0.52);
  background: rgba(13, 40, 38, 0.55);
  color: #ecfdf5;
}

/* 2 Sculpted Crimson-Gold Heart Safe Pockets (46x46px) */
.pt-safe-pockets-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding-left: 8px;
  border-left: 1px solid rgba(212, 175, 95, 0.24);
  gap: 4px;
  flex-shrink: 0;
}

.pt-safe-title {
  font-size: 8.5px;
  font-weight: 800;
  color: #fda4af;
  text-align: center;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.pt-safe-hearts {
  display: flex;
  gap: 5px;
}

.pt-heart-slot {
  position: relative;
  width: 46px;
  height: 46px;
  background: radial-gradient(circle at 50% 34%, rgba(159, 18, 57, 0.48), rgba(9, 12, 20, 0.96) 76%);
  border: 1.5px solid rgba(251, 113, 133, 0.52);
  border-radius: 8px 8px 16px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 228, 230, 0.18), 0 4px 10px rgba(0, 0, 0, 0.62);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.14s var(--pt-ease-out), border-color 0.15s ease, box-shadow 0.2s ease;
}

.pt-heart-slot:hover {
  border-color: var(--pt-gold-bright);
  transform: translateY(-1.5px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.78), 0 0 10px rgba(251, 191, 36, 0.30);
}

.pt-heart-slot.is-locked-item {
  border-color: var(--pt-gold-bright);
  background: radial-gradient(circle at 50% 34%, rgba(190, 18, 60, 0.58), rgba(24, 16, 12, 0.96) 78%);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.38), inset 0 0 10px rgba(244, 63, 94, 0.34);
}

.pt-heart-slot.is-flash {
  animation: ptPocketLockSnap 0.45s var(--pt-ease-out);
}

@keyframes ptPocketLockSnap {
  0% { transform: scale(1.26); box-shadow: 0 0 26px var(--pt-gold-pale); }
  100% { transform: scale(1); }
}

.pt-heart-icon {
  font-size: 14px;
  line-height: 1;
}

.pt-heart-label {
  font-size: 8.5px;
  font-weight: 700;
  color: #fde68a;
  max-width: 40px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

/* Collapsible Utility Drawer (.pt-quick-nav-drawer) & Quick Nav Helper Grid */
.pt-quick-nav-drawer {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.pt-quick-nav-toggle,
.pt-drawer-toggle,
.pt-quick-nav-drawer > summary {
  height: 24px;
  min-width: 32px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--pt-obsidian-glass);
  backdrop-filter: var(--pt-blur);
  -webkit-backdrop-filter: var(--pt-blur);
  border: 1px solid rgba(212, 175, 95, 0.42);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.65), var(--pt-inner-specular);
  color: var(--pt-gold-pale);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  list-style: none;
  transition: all 0.14s var(--pt-ease-out);
}

.pt-quick-nav-drawer > summary::-webkit-details-marker {
  display: none;
}

.pt-quick-nav-toggle:hover,
.pt-drawer-toggle:hover,
.pt-quick-nav-drawer > summary:hover,
.pt-quick-nav-drawer.is-open .pt-quick-nav-toggle,
.pt-quick-nav-drawer[open] > summary {
  border-color: var(--pt-gold-bright);
  color: #ffffff;
  background: rgba(42, 31, 16, 0.92);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.32);
}

.pt-quick-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  max-width: 276px;
}

.pt-quick-nav:not(:has(> .pt-quick-nav-bar)) {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pt-quick-nav-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.pt-qnav-more-toggle {
  min-width: 28px;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1;
  color: var(--pt-porcelain-muted);
  border-color: rgba(212, 175, 95, 0.36);
}

.pt-qnav-more-toggle.is-active {
  color: var(--pt-gold-pale);
  border-color: var(--pt-gold-bright);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.30);
}

.pt-quick-nav-more {
  display: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  padding: 6px;
  border-radius: 7px;
  background: var(--pt-modal-surface);
  backdrop-filter: var(--pt-blur);
  -webkit-backdrop-filter: var(--pt-blur);
  border: var(--pt-bronze-rim);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.82), var(--pt-inner-specular);
}

/* Keep helper buttons in DOM for automated tests while collapsed inside utility drawer */
.pt-quick-nav-drawer.is-collapsed .pt-quick-nav,
.pt-quick-nav-drawer:not(.is-open):not([open]):has(.pt-quick-nav-toggle) .pt-quick-nav,
.pt-quick-nav.is-collapsed {
  display: none;
}

.pt-quick-nav-drawer.is-open .pt-quick-nav,
.pt-quick-nav-drawer[open] .pt-quick-nav {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  z-index: 32;
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 5px;
  padding: 8px;
  max-width: 310px;
  border-radius: 9px;
  background: var(--pt-modal-surface);
  backdrop-filter: var(--pt-blur);
  -webkit-backdrop-filter: var(--pt-blur);
  border: var(--pt-bronze-rim);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.88), var(--pt-inner-specular);
}

.pt-qnav-btn {
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  color: #f1f5f9;
  background: var(--pt-obsidian-glass);
  backdrop-filter: var(--pt-blur);
  -webkit-backdrop-filter: var(--pt-blur);
  border: 1px solid rgba(212, 175, 95, 0.36);
  border-radius: 5px;
  box-shadow: var(--pt-inner-specular);
  cursor: pointer;
  transition: all 0.14s var(--pt-ease-out);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  gap: 3px;
}

.pt-qnav-btn:hover {
  transform: translateY(-1px);
  border-color: var(--pt-gold-bright);
  color: var(--pt-gold-pale);
  background: rgba(36, 28, 17, 0.92);
}

.pt-qnav-btn.is-rescue {
  border-color: rgba(251, 191, 36, 0.78);
  color: var(--pt-gold-pale);
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.86), rgba(88, 28, 135, 0.82));
}

.pt-qnav-btn.is-rescue.is-pulsing {
  animation: ptRescueGlow 0.8s ease-in-out infinite alternate;
}

@keyframes ptRescueGlow {
  from { box-shadow: 0 0 6px rgba(251, 191, 36, 0.4); }
  to { box-shadow: 0 0 18px rgba(251, 191, 36, 0.95); }
}

/* ============================================================================
 * 6. UNIFIED ANCIENT-JADE & GILDED-BRONZE MODAL SYSTEM
 * ============================================================================ */
@keyframes ptModalPopIn {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.975);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.pt-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: radial-gradient(circle at 50% 45%, rgba(8, 12, 22, 0.74), rgba(2, 4, 8, 0.88));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  pointer-events: auto;
}

.pt-modal-backdrop.is-open {
  display: flex;
}

.pt-modal-window {
  width: min(960px, 95vw);
  max-height: 86vh;
  background: var(--pt-modal-surface);
  border: 1px solid rgba(212, 175, 95, 0.54);
  border-radius: 12px;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.92), inset 0 1px 0 rgba(255, 248, 220, 0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.pt-modal-backdrop.is-open .pt-modal-window {
  animation: ptModalPopIn 0.18s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Refined 54px Header with Gold-Leaf Bottom Gradient Line & Crisp Readability */
.pt-modal-header {
  position: relative;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 20px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(45, 212, 191, 0.08), transparent 55%),
    linear-gradient(90deg, rgba(19, 23, 35, 0.97) 0%, rgba(12, 16, 26, 0.98) 58%, rgba(24, 20, 16, 0.96) 100%);
  border-bottom: 1px solid rgba(212, 175, 95, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 248, 220, 0.10);
}

.pt-modal-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(212, 175, 95, 0.70) 20%,
    rgba(254, 240, 138, 0.92) 50%,
    rgba(212, 175, 95, 0.70) 80%,
    transparent 100%
  );
  pointer-events: none;
}

.pt-modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pt-modal-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  color: var(--pt-jade-bright);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.92), 0 0 8px rgba(45, 212, 191, 0.20);
  text-transform: uppercase;
}

.pt-modal-title {
  font-family: var(--pt-font-title);
  font-size: 18.5px;
  font-weight: 700;
  color: var(--pt-gold-pale);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 2px 12px rgba(251, 191, 36, 0.28);
  margin: 0;
  line-height: 1.2;
}

/* 32x32px Diamond-Styled Close Button with Smooth Crimson-Gold Hover */
.pt-modal-close {
  position: relative;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(20, 26, 39, 0.94), rgba(9, 12, 20, 0.98));
  border: 1px solid rgba(212, 175, 95, 0.48);
  box-shadow: var(--pt-inner-specular);
  color: var(--pt-porcelain);
  font-size: 17px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.16s var(--pt-ease-out);
}

.pt-modal-close::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(212, 175, 95, 0.24);
  border-radius: 2px;
  transform: rotate(45deg);
  pointer-events: none;
  transition: border-color 0.18s ease, transform 0.22s var(--pt-ease-out);
}

.pt-modal-close:hover {
  background: linear-gradient(145deg, rgba(159, 18, 57, 0.94), rgba(76, 5, 25, 0.98));
  border-color: var(--pt-gold-bright);
  color: var(--pt-gold-pale);
  box-shadow: 0 0 16px rgba(225, 29, 72, 0.55), inset 0 1px 0 rgba(255, 248, 220, 0.28);
  transform: scale(1.05);
}

.pt-modal-close:hover::before {
  border-color: rgba(254, 240, 138, 0.55);
  transform: rotate(135deg);
}

.pt-modal-close:active {
  transform: scale(0.96);
}

/* Sleek Underline-Tab Navigation (Zero Clunky Gray Boxes) */
.pt-modal-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 0 20px;
  background: rgba(8, 11, 18, 0.80);
  border-bottom: 1px solid rgba(212, 175, 95, 0.22);
}

.pt-tab-btn {
  position: relative;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--pt-porcelain-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease;
}

.pt-tab-btn:hover {
  color: var(--pt-porcelain-bright);
  background: radial-gradient(ellipse at 50% 100%, rgba(212, 175, 95, 0.12), transparent 72%);
}

.pt-tab-btn.is-active {
  color: #fef08a;
  background: radial-gradient(ellipse at 50% 100%, rgba(251, 191, 36, 0.20), transparent 74%);
  border-bottom-color: var(--pt-gold-bright);
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.42);
}

.pt-tab-btn.is-active::after {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #fef08a, #fbbf24, transparent);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.85);
  pointer-events: none;
}

.pt-modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}

.pt-npc-quote {
  padding: 11px 15px;
  margin-bottom: 14px;
  background: linear-gradient(90deg, rgba(13, 18, 29, 0.88), rgba(8, 11, 18, 0.76));
  border: 1px solid rgba(212, 175, 95, 0.18);
  border-left: 3px solid var(--pt-gold);
  border-radius: 6px;
  font-style: italic;
  color: var(--pt-porcelain);
  font-size: 13px;
  line-height: 1.52;
  box-shadow: var(--pt-inner-specular);
}

.pt-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.pt-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

/* Refined Dark-Slate Glass Cards */
.pt-card {
  padding: 12px 14px;
  background: var(--pt-card-surface);
  border: 1px solid rgba(212, 175, 95, 0.22);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.44), inset 0 1px 0 rgba(255, 248, 220, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  transition: transform 0.16s var(--pt-ease-out), border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.pt-card:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 175, 95, 0.48);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.60), var(--pt-inner-specular);
}

.pt-card.is-selected {
  border-color: var(--pt-gold-bright);
  background: radial-gradient(ellipse at 50% 0%, rgba(212, 175, 95, 0.16), transparent 70%),
    linear-gradient(165deg, rgba(36, 28, 17, 0.90) 0%, rgba(14, 18, 28, 0.96) 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.68), 0 0 16px rgba(251, 191, 36, 0.20), inset 0 1px 0 rgba(255, 251, 235, 0.22);
}

.pt-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--pt-porcelain-bright);
  letter-spacing: 0.01em;
}

.pt-card-sub {
  font-size: 11.5px;
  color: var(--pt-porcelain-muted);
  line-height: 1.42;
}

.pt-card-tag {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--pt-gold-bright);
}

/* Sculpted Game Buttons (Bronze-Gold, Imperial Jade, Crimson Seal) */
.pt-btn {
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--pt-gold-pale);
  background: linear-gradient(180deg, rgba(133, 77, 14, 0.90) 0%, rgba(69, 26, 3, 0.97) 100%);
  border: 1px solid rgba(212, 175, 95, 0.72);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 251, 235, 0.26);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: transform 0.12s var(--pt-ease-out), filter 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.pt-btn:hover:not(:disabled) {
  filter: brightness(1.14);
  transform: translateY(-1px);
  border-color: var(--pt-gold-bright);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.68), 0 0 12px rgba(251, 191, 36, 0.28), inset 0 1px 0 rgba(255, 251, 235, 0.36);
}

.pt-btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.98);
  filter: brightness(0.96);
}

.pt-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: saturate(0.6);
}

.pt-btn-jade {
  color: #ecfdf5;
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.92) 0%, rgba(13, 74, 70, 0.98) 100%);
  border-color: rgba(45, 212, 191, 0.78);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(204, 251, 241, 0.28);
}

.pt-btn-jade:hover:not(:disabled) {
  border-color: var(--pt-jade-bright);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.68), 0 0 14px rgba(45, 212, 191, 0.34), inset 0 1px 0 rgba(204, 251, 241, 0.38);
}

.pt-btn-crimson {
  color: #ffe4e6;
  background: linear-gradient(180deg, rgba(159, 18, 57, 0.92) 0%, rgba(76, 5, 25, 0.98) 100%);
  border-color: rgba(251, 113, 133, 0.78);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 228, 230, 0.26);
}

.pt-btn-crimson:hover:not(:disabled) {
  border-color: var(--pt-crimson-bright);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.68), 0 0 14px rgba(225, 29, 72, 0.38), inset 0 1px 0 rgba(255, 228, 230, 0.36);
}

.pt-input {
  padding: 8px 12px;
  background: rgba(6, 9, 15, 0.94);
  border: 1px solid rgba(212, 175, 95, 0.38);
  border-radius: 6px;
  color: var(--pt-porcelain-bright);
  font-size: 13.5px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.65);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pt-input:focus {
  border-color: var(--pt-gold-bright);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.65), 0 0 0 2px rgba(251, 191, 36, 0.18);
}

.pt-currency-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 8px 13px;
  margin-bottom: 12px;
  background: rgba(7, 10, 17, 0.88);
  border: 1px solid rgba(212, 175, 95, 0.26);
  border-radius: 8px;
  box-shadow: var(--pt-inner-specular);
  font-size: 12px;
}

.pt-currency-bar span strong {
  color: var(--pt-gold-bright);
  font-variant-numeric: tabular-nums;
}

/* Toast Stack (Right Edge Below Top-Right Minimap/Micro-Dock — Zero Obstruction) */
.pt-toast-stack {
  position: fixed;
  top: 266px;
  right: 16px;
  z-index: 75;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  pointer-events: none;
}

.pt-toast {
  max-width: 340px;
  padding: 8px 13px;
  background: var(--pt-obsidian-glass);
  backdrop-filter: var(--pt-blur);
  -webkit-backdrop-filter: var(--pt-blur);
  border: 1px solid rgba(212, 175, 95, 0.42);
  border-right: 3px solid var(--pt-gold-bright);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #f1f5f9;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.78), var(--pt-inner-specular);
  animation: ptToastIn 0.20s var(--pt-ease-out);
}

.pt-toast.type-danger { border-right-color: var(--pt-crimson-bright); color: #ffe4e6; }
.pt-toast.type-jade,
.pt-toast.type-success { border-right-color: var(--pt-jade); color: #ccfbf1; }
.pt-toast.type-warn { border-right-color: #f59e0b; color: #fef3c7; }
.pt-toast.type-gold,
.pt-toast.type-loot { border-right-color: #facc15; color: #fef9c3; }
.pt-toast.type-lore { border-right-color: #c084fc; color: #f3e8ff; }
.pt-toast.type-info { border-right-color: #38bdf8; color: #e0f2fe; }

@keyframes ptToastIn {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============================================================================
 * 7. VOICE BROADCAST BANNER (PT.AudioDirector.playVoiceBroadcast)
 * ============================================================================ */
.pt-voice-broadcast {
  position: fixed;
  top: 44px;
  left: 50%;
  transform: translate(-50%, -14px);
  z-index: 55;
  width: min(600px, calc(100vw - 360px));
  min-width: 300px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease, transform 0.26s var(--pt-ease-out);
}

.pt-voice-broadcast.is-active {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.pt-voice-inner {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 14px;
  background: var(--pt-obsidian-glass);
  backdrop-filter: var(--pt-blur);
  -webkit-backdrop-filter: var(--pt-blur);
  border: 1px solid var(--voice-border, rgba(212, 175, 95, 0.52));
  border-radius: 9px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.82), 0 0 22px var(--voice-glow, transparent), var(--pt-inner-specular);
}

.pt-voice-eq {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 22px;
}

.pt-voice-eq span {
  width: 3px;
  height: 8px;
  background: var(--voice-accent, var(--pt-gold-bright));
  border-radius: 2px;
  animation: ptEqWave 0.65s ease-in-out infinite alternate;
}
.pt-voice-eq span:nth-child(2) { animation-delay: 0.12s; height: 16px; }
.pt-voice-eq span:nth-child(3) { animation-delay: 0.24s; height: 22px; }
.pt-voice-eq span:nth-child(4) { animation-delay: 0.16s; height: 14px; }
.pt-voice-eq span:nth-child(5) { animation-delay: 0.30s; height: 9px; }

@keyframes ptEqWave {
  from { transform: scaleY(0.35); }
  to { transform: scaleY(1.05); }
}

.pt-voice-body {
  flex: 1;
  min-width: 0;
}

.pt-voice-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 2px;
}

.pt-voice-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  color: var(--voice-accent, var(--pt-gold-bright));
  border: 1px solid var(--voice-border, rgba(234, 179, 8, 0.42));
}

.pt-voice-speaker {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--pt-porcelain-bright);
}

.pt-voice-text {
  font-size: 12.5px;
  color: var(--pt-porcelain);
  line-height: 1.38;
}

.pt-voice-dismiss {
  background: transparent;
  border: none;
  color: var(--pt-porcelain-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.14s ease;
}

.pt-voice-dismiss:hover {
  color: var(--pt-gold-pale);
}

/* ============================================================================
 * 8. 2.5D DARK-INK MOTION COMIC STAGE & 1.1s skewY(-5deg) ULTIMATE CUT-IN
 * ============================================================================ */
.pt-story-stage {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #040508;
  display: none;
  overflow: hidden;
  cursor: pointer;
}

.pt-story-stage.is-open {
  display: block;
}

.pt-story-stage.is-shaking {
  animation: ptCutsceneShake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes ptCutsceneShake {
  0%, 100% { transform: translate3d(0, 0, 0); }
  15% { transform: translate3d(-12px, 7px, 0); }
  30% { transform: translate3d(11px, -8px, 0); }
  45% { transform: translate3d(-9px, -5px, 0); }
  65% { transform: translate3d(7px, 6px, 0); }
  80% { transform: translate3d(-4px, 3px, 0); }
}

.pt-cs-parallax-viewport {
  position: absolute;
  inset: -4%;
  perspective: 950px;
}

.pt-cs-layer {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.pt-cs-layer-bg {
  background: radial-gradient(circle at 50% 42%, rgba(30, 27, 46, 0.55), #040508 82%);
}

.pt-cs-layer-ext-img {
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.pt-cs-layer-ext-img.has-art {
  opacity: 0.88;
}

.pt-story-stage.has-panel-art .pt-cs-svg > rect:first-of-type {
  opacity: 0.26;
}

.pt-cs-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.pt-cs-panel-enter {
  animation: ptInkPanelReveal 0.55s ease-out;
}

@keyframes ptInkPanelReveal {
  from { opacity: 0.15; filter: contrast(1.5) brightness(1.4); }
  to { opacity: 1; filter: contrast(1) brightness(1); }
}

.pt-cs-ink-vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 160px 65px #030407;
}

.pt-cs-ash-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
}

.pt-cs-letterbox {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 6;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pt-cs-letterbox-top {
  top: 0;
  background: linear-gradient(180deg, rgba(3, 4, 8, 0.95) 35%, transparent 100%);
}

.pt-cs-letterbox-bottom {
  bottom: 0;
  justify-content: center;
  padding-bottom: 26px;
  background: linear-gradient(0deg, rgba(3, 4, 8, 0.97) 52%, transparent 100%);
}

.pt-cs-chapter {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--cs-accent, var(--pt-gold-bright));
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.96), 0 0 10px rgba(0, 0, 0, 0.85);
}

.pt-cs-title {
  font-family: var(--pt-font-title);
  font-size: 20px;
  font-weight: 700;
  color: var(--pt-porcelain-bright);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.96), 0 0 16px rgba(212, 175, 95, 0.22);
}

.pt-cs-skip-btn {
  padding: 7px 14px;
  background: var(--pt-obsidian-glass);
  backdrop-filter: var(--pt-blur);
  -webkit-backdrop-filter: var(--pt-blur);
  border: 1px solid var(--cs-accent, var(--pt-gold-bright));
  border-radius: 6px;
  box-shadow: var(--pt-inner-specular);
  color: var(--pt-porcelain-bright);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.14s ease;
}

.pt-cs-skip-btn:hover {
  border-color: var(--pt-gold-pale);
  color: var(--pt-gold-pale);
}

.pt-key-pill {
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  font-size: 10px;
  color: var(--pt-gold-pale);
}

.pt-cs-caption-box {
  width: min(860px, 92vw);
  padding: 15px 22px;
  background: linear-gradient(170deg, rgba(10, 14, 24, 0.96) 0%, rgba(6, 8, 15, 0.98) 100%);
  backdrop-filter: var(--pt-blur);
  -webkit-backdrop-filter: var(--pt-blur);
  border: 1px solid rgba(212, 175, 95, 0.50);
  border-left: 4px solid var(--cs-accent, var(--pt-gold-bright));
  border-radius: 8px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.88), inset 0 1px 0 rgba(255, 248, 220, 0.16);
}

.pt-cs-beat-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--cs-accent, var(--pt-gold-bright));
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.96);
  margin-bottom: 5px;
}

.pt-cs-beat-text {
  font-family: var(--pt-font-title);
  font-size: 16.5px;
  line-height: 1.58;
  letter-spacing: 0.01em;
  color: #f8fafc;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.98), 0 0 12px rgba(0, 0, 0, 0.85);
}

.pt-cs-footer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.pt-cs-dots {
  display: flex;
  gap: 6px;
}

.pt-cs-dot {
  width: 22px;
  height: 4px;
  background: rgba(148, 163, 184, 0.30);
  border-radius: 999px;
}

.pt-cs-dot.is-active {
  background: var(--cs-accent, var(--pt-gold-bright));
  box-shadow: 0 0 8px var(--cs-accent, var(--pt-gold-bright));
}

.pt-cs-next-btn {
  background: rgba(212, 175, 95, 0.10);
  border: 1px solid rgba(212, 175, 95, 0.48);
  color: var(--pt-gold-pale);
  padding: 5px 13px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}

.pt-cs-next-btn:hover {
  border-color: var(--pt-gold-bright);
  background: rgba(212, 175, 95, 0.22);
}

/* 1.1s Diagonal Ultimate Cut-In Banner (skewY(-5deg)) */
.pt-ult-cutin-layer {
  position: fixed;
  inset: 0;
  z-index: 48;
  pointer-events: none;
  overflow: hidden;
}

.pt-ult-cutin-banner {
  position: absolute;
  top: 15%;
  left: -8%;
  right: -8%;
  height: 104px;
  background: linear-gradient(90deg, rgba(5, 7, 12, 0.96) 15%, rgba(18, 24, 38, 0.95) 50%, rgba(5, 7, 12, 0.96) 85%);
  border-top: 2.5px solid var(--ult-color, var(--pt-gold-bright));
  border-bottom: 2.5px solid var(--ult-color, var(--pt-gold-bright));
  box-shadow: 0 0 36px rgba(0, 0, 0, 0.92), 0 0 24px var(--ult-color, var(--pt-gold-bright));
  transform: skewY(-5deg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: ptUltSlash1100ms 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ptUltSlash1100ms {
  0% {
    opacity: 0;
    transform: skewY(-5deg) translateX(-100%) scaleY(0.35);
  }
  16% {
    opacity: 1;
    transform: skewY(-5deg) translateX(0%) scaleY(1);
  }
  80% {
    opacity: 1;
    transform: skewY(-5deg) translateX(2%) scaleY(1);
  }
  100% {
    opacity: 0;
    transform: skewY(-5deg) translateX(105%) scaleY(0.25);
  }
}

.pt-ult-speedlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 6px,
    rgba(255, 255, 255, 0.06) 6px,
    rgba(255, 255, 255, 0.06) 8px
  );
}

.pt-ult-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 25%, rgba(255, 255, 255, 0.28) 48%, transparent 68%);
  animation: ptSheenPass 0.9s ease-out forwards;
}

@keyframes ptSheenPass {
  from { transform: translateX(-80%); }
  to { transform: translateX(85%); }
}

.pt-ult-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 18px;
}

.pt-ult-portrait {
  width: 78px;
  height: 78px;
  flex-shrink: 0;
}

.pt-ult-emblem-svg {
  width: 100%;
  height: 100%;
}

.pt-ult-caster {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--ult-color, var(--pt-gold-bright));
}

.pt-ult-skill-name {
  font-family: var(--pt-font-title);
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 12px var(--ult-color, var(--pt-gold-bright));
  line-height: 1.1;
}

.pt-ult-skill-tag {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--pt-gold-pale);
  margin-top: 2px;
}

/* ============================================================================
 * 9. RESPONSIVE SMALL-VIEWPORT ADAPTATIONS (ACTION BAR REMAINS CENTERED)
 * ============================================================================ */
@media (max-width: 900px) {
  .pt-hud-bottom {
    left: 50%;
    transform: translateX(-50%);
    bottom: 10px;
  }
  .pt-voice-broadcast {
    width: calc(100vw - 24px);
    top: 168px;
  }
  .pt-status-card,
  .pt-unit-frame {
    min-width: 210px;
    max-width: 256px;
  }
  .pt-extraction-card {
    padding: 6px 8px;
    max-width: 248px;
  }
  #pt-showcase-bar:not(.is-collapsed) {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }
  .pt-sc-items,
  .pt-sc-popover {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ============================================================================
 * 10. 《THỦY MẶC LINH ĐÀI — AAA XIANXIA DESIGN SYSTEM (HUYỀN MẶC LƯU KIM v2)》
 * Aesthetic: Where Winds Meet × Naraka: Bladepoint × Black Myth: Wukong
 * Shared Split-Screen 3D Stage, Obsidian Left Rail, Jade-Slate Hồi Văn Inspector,
 * Taiji Meridian Nodes, Scannable Combat Keyword Chips & Sculpted Gold Plaque CTA
 * ============================================================================ */

:root {
  --pt-font-display: "Palatino Linotype", "Book Antiqua", "Noto Serif", Georgia, serif;
  --pt-font-ui: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;

  --pt-jade-panel-bg: linear-gradient(170deg, rgba(16, 28, 33, 0.90) 0%, rgba(9, 16, 20, 0.95) 100%);
  --pt-jade-card-bg: linear-gradient(165deg, rgba(19, 34, 40, 0.78) 0%, rgba(10, 19, 24, 0.90) 100%);
  --pt-obsidian-rail-bg: linear-gradient(180deg, rgba(8, 14, 18, 0.95) 0%, rgba(5, 9, 12, 0.98) 100%);

  --pt-gold-line: rgba(212, 175, 95, 0.48);
  --pt-gold-line-soft: rgba(212, 175, 95, 0.24);
  --pt-gold-bright: #f5d47a;
  --pt-jade-cyan: #4fd1c5;
  --pt-jade-glow: rgba(79, 209, 197, 0.34);
  --pt-ivory: #f4efe6;
  --pt-mist: #9cb0b8;
}

/* 10.1 Split-Screen 3D Stage Backdrop (ZERO Full-Screen Blur -> 100% Crisp 3D Hero) */
.pt-split-backdrop,
.pt-modal-backdrop.pt-split-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-between;
  padding: 0;
  margin: 0;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: linear-gradient(
    90deg,
    rgba(4, 8, 11, 0.72) 0%,
    rgba(4, 8, 11, 0.03) 26%,
    rgba(4, 8, 11, 0.08) 50%,
    rgba(6, 12, 16, 0.88) 72%,
    rgba(6, 12, 16, 0.96) 100%
  );
  pointer-events: auto;
  overflow: hidden;
}

.pt-split-backdrop.is-open,
.pt-modal-backdrop.pt-split-backdrop.is-open,
.is-open > .pt-split-backdrop,
.is-open .pt-split-backdrop,
#pt-huyet-lo-selector-modal.pt-split-backdrop:not(.is-closed),
#pt-huyet-lo-selector-modal:not(.is-closed) .pt-split-backdrop {
  display: flex;
}

/* 10.2 Left Vertical Obsidian Navigation Rail (68px) */
.pt-left-rail {
  position: relative;
  width: 68px;
  min-width: 68px;
  flex: 0 0 68px;
  height: 100vh;
  background: var(--pt-obsidian-rail-bg);
  border-right: 1px solid var(--pt-gold-line);
  box-shadow:
    8px 0 28px rgba(0, 0, 0, 0.68),
    inset -1px 0 0 rgba(245, 212, 122, 0.10);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 0;
  z-index: 3;
  pointer-events: auto;
}

.pt-left-rail::before,
.pt-left-rail::after {
  content: "";
  position: absolute;
  right: 4px;
  width: 14px;
  height: 14px;
  border-right: 1px solid rgba(212, 175, 95, 0.46);
  pointer-events: none;
}

.pt-left-rail::before {
  top: 10px;
  border-top: 1px solid rgba(212, 175, 95, 0.46);
}

.pt-left-rail::after {
  bottom: 10px;
  border-bottom: 1px solid rgba(212, 175, 95, 0.46);
}

.pt-rail-btn {
  position: relative;
  width: 100%;
  min-height: 64px;
  padding: 10px 6px;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  color: var(--pt-mist);
  font-family: var(--pt-font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition:
    color 0.18s var(--pt-ease-out),
    background 0.18s var(--pt-ease-out),
    border-color 0.18s var(--pt-ease-out),
    transform 0.16s var(--pt-ease-out);
}

.pt-rail-btn svg,
.pt-rail-btn img,
.pt-rail-icon {
  width: 26px;
  height: 26px;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s var(--pt-ease-out), filter 0.18s ease, color 0.18s ease;
}

.pt-rail-btn:hover {
  color: var(--pt-ivory);
  background: radial-gradient(ellipse at 0% 50%, rgba(79, 209, 197, 0.14) 0%, transparent 82%);
}

.pt-rail-btn:hover svg,
.pt-rail-btn:hover img,
.pt-rail-btn:hover .pt-rail-icon {
  transform: translateY(-1px) scale(1.04);
  filter: drop-shadow(0 0 8px rgba(79, 209, 197, 0.42));
}

.pt-rail-btn.is-active {
  color: var(--pt-gold-bright);
  border-left-color: var(--pt-gold-bright);
  background:
    radial-gradient(ellipse at 0% 50%, rgba(245, 212, 122, 0.22) 0%, rgba(79, 209, 197, 0.15) 48%, transparent 90%);
  text-shadow: 0 0 12px rgba(79, 209, 197, 0.45);
}

.pt-rail-btn.is-active::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 50%;
  width: 7px;
  height: 7px;
  background: var(--pt-gold-bright);
  border-radius: 1px;
  transform: translateY(-50%) rotate(45deg);
  box-shadow: 0 0 10px var(--pt-gold-bright), 0 0 18px rgba(79, 209, 197, 0.65);
  pointer-events: none;
}

.pt-rail-btn.is-active svg,
.pt-rail-btn.is-active img,
.pt-rail-btn.is-active .pt-rail-icon {
  color: #99f6e4;
  filter: drop-shadow(0 0 10px rgba(79, 209, 197, 0.78)) drop-shadow(0 0 4px rgba(245, 212, 122, 0.42));
}

/* 10.3 Center-Left Interactive 3D Hero Stage Zone */
.pt-stage-open-zone {
  position: relative;
  flex: 1 1 auto;
  min-width: 180px;
  height: 100vh;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  pointer-events: auto;
  z-index: 2;
}

.pt-stage-open-zone.is-dragging,
.pt-stage-open-zone:active {
  cursor: grabbing;
}

.pt-stage-hero-plaque {
  position: absolute;
  top: 22px;
  left: 26px;
  max-width: min(440px, calc(100% - 48px));
  padding: 9px 18px 9px 15px;
  background: linear-gradient(90deg, rgba(7, 14, 18, 0.76) 0%, rgba(7, 14, 18, 0.34) 72%, transparent 100%);
  border-left: 2.5px solid var(--pt-gold-bright);
  box-shadow: -4px 0 16px rgba(212, 175, 95, 0.16);
  display: flex;
  flex-direction: column;
  gap: 3px;
  pointer-events: none;
}

.pt-stage-hero-plaque .pt-plaque-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pt-jade-cyan);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.92);
}

.pt-stage-hero-plaque .pt-plaque-title,
.pt-stage-hero-plaque h2,
.pt-stage-hero-plaque h3,
.pt-stage-hero-plaque strong {
  margin: 0;
  font-family: var(--pt-font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--pt-ivory);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 0 18px rgba(212, 175, 95, 0.26);
}

.pt-stage-hero-plaque .pt-plaque-sub,
.pt-stage-hero-plaque small,
.pt-stage-hero-plaque span:not(.pt-kw-chip) {
  font-size: 11.5px;
  color: var(--pt-mist);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.92);
}

.pt-stage-orbit-hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 15px;
  border-radius: 999px;
  background: rgba(7, 14, 18, 0.74);
  border: 1px solid rgba(212, 175, 95, 0.32);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 248, 220, 0.08);
  color: rgba(244, 239, 230, 0.84);
  font-family: var(--pt-font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
}

/* 10.4 Right Jade-Slate Glass Inspector & Ornamental Hồi Văn Frame */
@keyframes ptRightInspectorEnter {
  0% {
    opacity: 0;
    transform: translateX(16px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.pt-right-inspector,
.pt-modal-window.pt-right-inspector {
  position: relative;
  width: min(530px, 47vw);
  min-width: 410px;
  max-width: calc(100vw - 84px);
  height: calc(100vh - 28px);
  max-height: calc(100vh - 28px);
  margin: 14px 16px 14px 0;
  flex-shrink: 0;
  background:
    radial-gradient(ellipse at 50% 14%, rgba(79, 209, 197, 0.10) 0%, transparent 56%),
    var(--pt-jade-panel-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--pt-gold-line);
  border-radius: 6px;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.88),
    inset 0 0 0 1px rgba(245, 212, 122, 0.08),
    inset 0 1px 0 rgba(255, 248, 220, 0.14);
  color: var(--pt-ivory);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 3;
  pointer-events: auto;
  animation: ptRightInspectorEnter 0.22s var(--pt-ease-out) forwards;
}

/* 4-Corner Hồi Văn (Greek-Key Meander) Ornamental Borders */
.pt-huiven-frame {
  position: relative;
}

.pt-huiven-frame::before {
  content: "";
  position: absolute;
  inset: 5px;
  pointer-events: none;
  z-index: 5;
  background-repeat: no-repeat;
  background-size: 26px 26px;
  background-position:
    top 0 left 0,
    top 0 right 0,
    bottom 0 left 0,
    bottom 0 right 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28' fill='none'%3E%3Cpath d='M1 27V1H27M5 17V5H17V11H11V8H14' stroke='%23d4af5f' stroke-opacity='0.82' stroke-width='1.25' stroke-linecap='square'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28' fill='none'%3E%3Cg transform='translate(28,0) scale(-1,1)'%3E%3Cpath d='M1 27V1H27M5 17V5H17V11H11V8H14' stroke='%23d4af5f' stroke-opacity='0.82' stroke-width='1.25' stroke-linecap='square'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28' fill='none'%3E%3Cg transform='translate(0,28) scale(1,-1)'%3E%3Cpath d='M1 27V1H27M5 17V5H17V11H11V8H14' stroke='%23d4af5f' stroke-opacity='0.82' stroke-width='1.25' stroke-linecap='square'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28' fill='none'%3E%3Cg transform='translate(28,28) scale(-1,-1)'%3E%3Cpath d='M1 27V1H27M5 17V5H17V11H11V8H14' stroke='%23d4af5f' stroke-opacity='0.82' stroke-width='1.25' stroke-linecap='square'/%3E%3C/g%3E%3C/svg%3E");
}

.pt-inspector-header,
.pt-right-inspector > .pt-modal-header {
  position: relative;
  min-height: 54px;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(90deg, rgba(13, 25, 30, 0.88) 0%, rgba(9, 17, 22, 0.72) 100%);
  border-bottom: 1px solid var(--pt-gold-line-soft);
  flex-shrink: 0;
}

.pt-inspector-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pt-jade-cyan);
}

.pt-inspector-title {
  margin: 0;
  font-family: var(--pt-font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--pt-gold-bright);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
}

.pt-inspector-body,
.pt-right-inspector > .pt-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pt-inspector-footer {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--pt-gold-line-soft);
  background: linear-gradient(180deg, rgba(8, 15, 19, 0.45) 0%, rgba(6, 11, 15, 0.88) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-shrink: 0;
}

.pt-jade-card {
  background: var(--pt-jade-card-bg);
  border: 1px solid var(--pt-gold-line-soft);
  border-radius: 6px;
  padding: 12px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 248, 220, 0.06);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.14s var(--pt-ease-out);
}

.pt-jade-card:hover {
  border-color: var(--pt-gold-line);
}

.pt-jade-card.is-selected,
.pt-jade-card.is-active {
  border-color: var(--pt-gold-bright);
  box-shadow:
    0 0 18px rgba(79, 209, 197, 0.18),
    inset 0 0 14px rgba(79, 209, 197, 0.08);
}

/* 10.5 DOM-Preserving Tab Panes (CRITICAL Automated Test Selector Invariant!) */
.pt-tab-pane {
  display: none;
}

.pt-tab-pane.is-active {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 10.6 Taiji Skill Medallion Row & Golden Qi Meridian Connectors */
.pt-emblem-medallion {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 4px auto 8px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 34%, rgba(79, 209, 197, 0.34) 0%, rgba(16, 36, 42, 0.88) 58%, rgba(7, 14, 18, 0.98) 100%);
  border: 1.5px solid var(--pt-gold-bright);
  box-shadow:
    0 0 28px rgba(79, 209, 197, 0.28),
    inset 0 0 18px rgba(79, 209, 197, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-emblem-medallion::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 95, 0.34);
  pointer-events: none;
}

.pt-taiji-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 6px 0 10px;
}

.pt-taiji-node {
  position: relative;
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  border-radius: 50%;
  padding: 6px;
  background:
    radial-gradient(circle at 66% 32%, rgba(79, 209, 197, 0.32) 0%, rgba(14, 28, 34, 0.92) 56%, rgba(6, 12, 16, 0.98) 100%);
  border: 1.5px solid rgba(212, 175, 95, 0.68);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.68),
    inset 0 0 12px rgba(79, 209, 197, 0.14);
  color: var(--pt-ivory);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform 0.16s var(--pt-ease-out),
    border-color 0.16s ease,
    box-shadow 0.18s ease;
}

.pt-taiji-node:hover,
.pt-taiji-node.is-active,
.pt-taiji-node.is-selected {
  transform: translateY(-2px);
  border-color: var(--pt-gold-bright);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.78),
    0 0 18px rgba(79, 209, 197, 0.42),
    inset 0 0 14px rgba(79, 209, 197, 0.26);
}

.pt-taiji-node .pt-taiji-key {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 22px;
  height: 18px;
  padding: 0 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, #152229 0%, #091015 100%);
  border: 1px solid rgba(212, 175, 95, 0.78);
  color: var(--pt-gold-bright);
  font-family: var(--pt-font-display);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}

.pt-meridian-connector {
  position: relative;
  flex: 0 0 32px;
  width: 32px;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(212, 175, 95, 0.45) 0%,
    rgba(245, 212, 122, 0.92) 50%,
    rgba(212, 175, 95, 0.45) 100%
  );
  box-shadow: 0 0 8px rgba(212, 175, 95, 0.35);
}

.pt-meridian-connector::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  background: #102026;
  border: 1px solid var(--pt-gold-bright);
  transform: translate(-50%, -50%) rotate(45deg);
}

.pt-meridian-connector.is-vertical {
  flex: 0 0 auto;
  width: 2px;
  height: 22px;
  margin: 0 auto;
  background: linear-gradient(
    180deg,
    rgba(212, 175, 95, 0.75) 0%,
    rgba(79, 209, 197, 0.65) 100%
  );
}

.pt-meridian-connector.is-branch {
  flex: 0 0 auto;
  width: min(220px, 68%);
  height: 14px;
  margin: 0 auto;
  background: transparent;
  border-top: 1.5px solid rgba(212, 175, 95, 0.62);
  border-left: 1.5px solid rgba(212, 175, 95, 0.62);
  border-right: 1.5px solid rgba(212, 175, 95, 0.62);
  border-radius: 6px 6px 0 0;
  box-shadow: none;
}

.pt-meridian-connector.is-branch::after {
  top: 0;
}

/* 10.7 Sculpted Chamfered Antique-Gold Primary CTA Button (.pt-gold-plaque-btn) */
.pt-gold-plaque-btn {
  position: relative;
  min-height: 42px;
  padding: 9px 30px;
  border-radius: 7px;
  border: 1.5px solid #fbe7b2;
  background: linear-gradient(180deg, #f4dfa8 0%, #d7b265 48%, #b38637 100%);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.72),
    0 0 18px rgba(212, 175, 95, 0.28),
    inset 0 1px 0 rgba(255, 252, 240, 0.82),
    inset 0 0 0 2px rgba(92, 60, 14, 0.42);
  color: #1b1205;
  font-family: var(--pt-font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 250, 230, 0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition:
    transform 0.14s var(--pt-ease-out),
    filter 0.16s ease,
    box-shadow 0.18s ease;
}

.pt-gold-plaque-btn::before,
.pt-gold-plaque-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #fef3c7 0%, #c89d4c 100%);
  border: 1px solid rgba(92, 60, 14, 0.72);
  transform: translateY(-50%) rotate(45deg);
  pointer-events: none;
}

.pt-gold-plaque-btn::before {
  left: -5px;
}

.pt-gold-plaque-btn::after {
  right: -5px;
}

.pt-gold-plaque-btn:hover:not(:disabled):not(.is-disabled) {
  transform: translateY(-1.5px);
  filter: brightness(1.07);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.80),
    0 0 26px rgba(245, 212, 122, 0.48),
    inset 0 1px 0 rgba(255, 253, 245, 0.92),
    inset 0 0 0 2px rgba(92, 60, 14, 0.36);
}

.pt-gold-plaque-btn:active:not(:disabled):not(.is-disabled) {
  transform: translateY(1px) scale(0.985);
}

.pt-gold-plaque-btn:disabled,
.pt-gold-plaque-btn.is-disabled {
  opacity: 0.48;
  filter: saturate(0.35);
  cursor: not-allowed;
}

/* 10.8 Hades-II / Wukong Scannable Combat Keyword Chips (.pt-kw-chip) */
.pt-kw-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.pt-kw-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--pt-font-ui);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.02em;
  background: rgba(15, 28, 34, 0.78);
  border: 1px solid rgba(212, 175, 95, 0.42);
  color: var(--pt-ivory);
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pt-kw-chip.kw-jade {
  background: rgba(17, 70, 67, 0.62);
  border-color: rgba(79, 209, 197, 0.56);
  color: #99f6e4;
}

.pt-kw-chip.kw-gold {
  background: rgba(98, 56, 16, 0.60);
  border-color: rgba(245, 212, 122, 0.58);
  color: #fef08a;
}

.pt-kw-chip.kw-crimson {
  background: rgba(118, 18, 48, 0.60);
  border-color: rgba(251, 113, 133, 0.56);
  color: #fecdd3;
}

.pt-kw-chip.kw-violet {
  background: rgba(76, 29, 124, 0.60);
  border-color: rgba(192, 132, 252, 0.56);
  color: #e9d5ff;
}

.pt-kw-chip.kw-lightning {
  background: rgba(45, 42, 118, 0.64);
  border-color: rgba(129, 140, 248, 0.60);
  color: #c7d2fe;
}

.pt-kw-chip.kw-frost {
  background: rgba(12, 68, 102, 0.62);
  border-color: rgba(56, 189, 248, 0.56);
  color: #bae6fd;
}

.pt-kw-num {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--pt-gold-bright);
}

.pt-kw-inline {
  font-weight: 700;
  color: var(--pt-jade-cyan);
}

/* 10.9 Ultra-Clean Thin Jade-Gold Scrollbars & Responsive Split-Screen */
.pt-right-inspector,
.pt-right-inspector * {
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 95, 0.56) rgba(7, 13, 17, 0.68);
}

.pt-right-inspector ::-webkit-scrollbar,
.pt-inspector-body::-webkit-scrollbar,
.pt-tab-pane::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.pt-right-inspector ::-webkit-scrollbar-track,
.pt-inspector-body::-webkit-scrollbar-track,
.pt-tab-pane::-webkit-scrollbar-track {
  background: rgba(7, 13, 17, 0.68);
  border-radius: 999px;
}

.pt-right-inspector ::-webkit-scrollbar-thumb,
.pt-inspector-body::-webkit-scrollbar-thumb,
.pt-tab-pane::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(79, 209, 197, 0.55) 0%, rgba(212, 175, 95, 0.82) 100%);
  border-radius: 999px;
}

@media (max-width: 900px) {
  .pt-left-rail {
    width: 54px;
    min-width: 54px;
    flex-basis: 54px;
  }
  .pt-right-inspector,
  .pt-modal-window.pt-right-inspector {
    width: min(440px, calc(100vw - 68px));
    min-width: 300px;
    margin: 8px 8px 8px 0;
    height: calc(100vh - 16px);
    max-height: calc(100vh - 16px);
  }
  .pt-stage-orbit-hint {
    display: none;
  }
}

/* 10.10 Unified Split-Screen Stage, Title Screen & System [ESC] HUD Auto-Fade */
body:has(#pt-prog-3col-backdrop.is-open) .pt-hud-topleft,
body:has(#pt-prog-3col-backdrop.is-open) .pt-hud-topright,
body:has(#pt-prog-3col-backdrop.is-open) .pt-hud-bottom,
body:has(#pt-prog-3col-backdrop.is-open) .pt-hud-bottomright,
body:has(#pt-prog-3col-backdrop.is-open) #pt-campaign-quest-card,
body:has(#pt-prog-3col-backdrop.is-open) #pt-ctrl-scheme-pill,
body:has(#pt-prog-3col-backdrop.is-open) #pt-floating-container,
body:has(#pt-prog-3col-backdrop.is-open) #pt-ngo-dao-bar,
body:has(#pt-multiverse-modal-backdrop.is-open) .pt-hud-topleft,
body:has(#pt-multiverse-modal-backdrop.is-open) .pt-hud-topright,
body:has(#pt-multiverse-modal-backdrop.is-open) .pt-hud-bottom,
body:has(#pt-multiverse-modal-backdrop.is-open) .pt-hud-bottomright,
body:has(#pt-multiverse-modal-backdrop.is-open) #pt-campaign-quest-card,
body:has(#pt-multiverse-modal-backdrop.is-open) #pt-ctrl-scheme-pill,
body:has(#pt-multiverse-modal-backdrop.is-open) #pt-floating-container,
body:has(#pt-multiverse-modal-backdrop.is-open) #pt-ngo-dao-bar,
body:has(#pt-modal-backdrop.is-split-stage.is-open) .pt-hud-topleft,
body:has(#pt-modal-backdrop.is-split-stage.is-open) .pt-hud-topright,
body:has(#pt-modal-backdrop.is-split-stage.is-open) .pt-hud-bottom,
body:has(#pt-modal-backdrop.is-split-stage.is-open) .pt-hud-bottomright,
body:has(#pt-modal-backdrop.is-split-stage.is-open) #pt-campaign-quest-card,
body:has(#pt-modal-backdrop.is-split-stage.is-open) #pt-ctrl-scheme-pill,
body:has(#pt-modal-backdrop.is-split-stage.is-open) #pt-floating-container,
body:has(#pt-modal-backdrop.is-split-stage.is-open) #pt-ngo-dao-bar,
body:has(#pt-van-dao-modal.is-open) .pt-hud-topleft,
body:has(#pt-van-dao-modal.is-open) .pt-hud-topright,
body:has(#pt-van-dao-modal.is-open) .pt-hud-bottom,
body:has(#pt-van-dao-modal.is-open) .pt-hud-bottomright,
body:has(#pt-van-dao-modal.is-open) #pt-campaign-quest-card,
body:has(#pt-van-dao-modal.is-open) #pt-ctrl-scheme-pill,
body:has(#pt-van-dao-modal.is-open) #pt-floating-container,
body:has(#pt-title-screen.is-open) .pt-hud-topleft,
body:has(#pt-title-screen.is-open) .pt-hud-topright,
body:has(#pt-title-screen.is-open) .pt-hud-bottom,
body:has(#pt-title-screen.is-open) .pt-hud-bottomright,
body:has(#pt-title-screen.is-open) #pt-campaign-quest-card,
body:has(#pt-title-screen.is-open) #pt-ctrl-scheme-pill,
body:has(#pt-title-screen.is-open) #pt-floating-container,
body:has(#pt-title-screen.is-open) #pt-ngo-dao-bar,
body:has(#pt-title-screen.is-open) #pt-boss-encounter-hud,
body:has(#pt-title-screen.is-open) #pt-objective-tracker,
body:has(#pt-title-screen.is-open) #pt-clan8v8-hud,
body:has(#pt-title-screen.is-open) .pt-fct-layer,
body:has(#pt-title-screen.is-open) .pt-diegetic-layer,
body:has(#pt-esc-system-modal.is-open) .pt-hud-topleft,
body:has(#pt-esc-system-modal.is-open) .pt-hud-topright,
body:has(#pt-esc-system-modal.is-open) .pt-hud-bottom,
body:has(#pt-esc-system-modal.is-open) .pt-hud-bottomright,
body:has(#pt-esc-system-modal.is-open) #pt-campaign-quest-card,
body:has(#pt-esc-system-modal.is-open) #pt-ctrl-scheme-pill,
body:has(#pt-esc-system-modal.is-open) #pt-floating-container,
body:has(#pt-esc-system-modal.is-open) #pt-ngo-dao-bar,
body:has(#pt-esc-system-modal.is-open) #pt-boss-encounter-hud,
body:has(#pt-esc-system-modal.is-open) #pt-objective-tracker,
body:has(#pt-esc-system-modal.is-open) #pt-clan8v8-hud,
body:has(#pt-esc-system-modal.is-open) .pt-fct-layer,
body:has(#pt-prog-3col-backdrop.is-open) #pt-boss-encounter-hud,
body:has(#pt-prog-3col-backdrop.is-open) #pt-objective-tracker,
body:has(#pt-prog-3col-backdrop.is-open) .pt-fct-layer,
body:has(#pt-multiverse-modal-backdrop.is-open) #pt-boss-encounter-hud,
body:has(#pt-multiverse-modal-backdrop.is-open) #pt-objective-tracker,
body:has(#pt-multiverse-modal-backdrop.is-open) .pt-fct-layer,
body:has(#pt-modal-backdrop.is-split-stage.is-open) #pt-boss-encounter-hud,
body:has(#pt-modal-backdrop.is-split-stage.is-open) #pt-objective-tracker,
body:has(#pt-modal-backdrop.is-split-stage.is-open) .pt-fct-layer,
body:has(#pt-van-dao-modal.is-open) #pt-boss-encounter-hud,
body:has(#pt-van-dao-modal.is-open) #pt-objective-tracker,
body:has(#pt-van-dao-modal.is-open) .pt-fct-layer {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.18s ease !important;
}

/* ============================================================================
 * 11. AAA COMBAT READABILITY, BOSS ENCOUNTER HUD, ĐAN ĐỘC & OBJECTIVE SYSTEMS
 * ============================================================================ */

/* ----------------------------------------------------------------------------
 * 11.1 GPU-Accelerated Ballistic Floating Combat Text (.pt-fct-layer)
 * ---------------------------------------------------------------------------- */
.pt-fct-layer,
#pt-fct-layer {
  position: fixed;
  inset: 0;
  z-index: 26;
  pointer-events: none;
  overflow: hidden;
  contain: layout style paint;
}

@keyframes ptFctBallisticArc {
  0% {
    opacity: 0;
    transform: translate3d(calc(-50% + var(--fct-x0, 0px)), calc(-50% + 6px), 0) scale(0.68);
  }
  16% {
    opacity: 1;
    transform: translate3d(calc(-50% + var(--fct-dx, 14px) * 0.35), calc(-50% + var(--fct-peak-y, -28px)), 0) scale(1.12);
  }
  58% {
    opacity: 1;
    transform: translate3d(calc(-50% + var(--fct-dx, 14px) * 0.78), calc(-50% + var(--fct-peak-y, -28px) * 1.35), 0) scale(1.0);
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(-50% + var(--fct-dx, 14px)), calc(-50% + var(--fct-end-y, -52px)), 0) scale(0.86);
  }
}

@keyframes ptFctCritSlam {
  0% {
    opacity: 0;
    transform: translate3d(-50%, calc(-50% + 10px), 0) scale(0.45);
  }
  14% {
    opacity: 1;
    transform: translate3d(calc(-50% + var(--fct-dx, 18px) * 0.28), calc(-50% - 26px), 0) scale(1.42);
  }
  32% {
    opacity: 1;
    transform: translate3d(calc(-50% + var(--fct-dx, 18px) * 0.52), calc(-50% - 36px), 0) scale(1.08);
  }
  75% {
    opacity: 1;
    transform: translate3d(calc(-50% + var(--fct-dx, 18px) * 0.86), calc(-50% - 50px), 0) scale(1.04);
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(-50% + var(--fct-dx, 18px)), calc(-50% - 64px), 0) scale(0.90);
  }
}

@keyframes ptFctReactionPop {
  0% {
    opacity: 0;
    transform: translate3d(-50%, calc(-50% + 4px), 0) scale(0.55);
  }
  18% {
    opacity: 1;
    transform: translate3d(calc(-50% + var(--fct-dx, 0px) * 0.35), calc(-50% - 30px), 0) scale(1.26);
  }
  68% {
    opacity: 1;
    transform: translate3d(calc(-50% + var(--fct-dx, 0px) * 0.80), calc(-50% - 46px), 0) scale(1.02);
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(-50% + var(--fct-dx, 0px)), calc(-50% - 62px), 0) scale(0.90);
  }
}

@keyframes ptFctCounterSnap {
  0% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(0.52);
  }
  15% {
    opacity: 1;
    transform: translate3d(-50%, calc(-50% - 22px), 0) scale(1.30);
  }
  72% {
    opacity: 1;
    transform: translate3d(-50%, calc(-50% - 34px), 0) scale(1.0);
  }
  100% {
    opacity: 0;
    transform: translate3d(-50%, calc(-50% - 48px), 0) scale(0.92);
  }
}

@keyframes ptFctDodgeFloat {
  0% {
    opacity: 0;
    transform: translate3d(calc(-50% - 10px), -50%, 0) scale(0.82);
  }
  20% {
    opacity: 1;
    transform: translate3d(calc(-50% + 8px), calc(-50% - 18px), 0) scale(1.08);
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(-50% + 22px), calc(-50% - 42px), 0) scale(0.94);
  }
}

@keyframes ptFctHealRise {
  0% {
    opacity: 0;
    transform: translate3d(-50%, calc(-50% + 6px), 0) scale(0.76);
  }
  22% {
    opacity: 1;
    transform: translate3d(-50%, calc(-50% - 18px), 0) scale(1.08);
  }
  100% {
    opacity: 0;
    transform: translate3d(-50%, calc(-50% - 50px), 0) scale(0.94);
  }
}

.pt-fct-item {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  will-change: transform, opacity;
  font-family: var(--pt-font-ui);
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--pt-porcelain-bright);
  white-space: nowrap;
  text-shadow:
    0 2px 5px rgba(0, 0, 0, 0.96),
    0 0 2px #000000,
    0 0 10px rgba(0, 0, 0, 0.80);
  transform: translate3d(-50%, -50%, 0) scale(1);
  animation: ptFctBallisticArc var(--fct-dur, 0.86s) var(--pt-ease-out) forwards;
}

.pt-fct-item.is-crit {
  font-family: var(--pt-font-display);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #fef08a;
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.98),
    0 0 14px rgba(244, 63, 94, 0.82),
    0 0 24px rgba(251, 191, 36, 0.68);
  animation: ptFctCritSlam var(--fct-dur, 0.96s) var(--pt-ease-out) forwards;
}

.pt-fct-item.is-true {
  font-size: 16.5px;
  font-weight: 900;
  color: #ffffff;
  padding: 1px 6px;
  border-bottom: 1.5px solid rgba(192, 132, 252, 0.85);
  text-shadow:
    0 2px 5px rgba(0, 0, 0, 0.98),
    0 0 12px rgba(192, 132, 252, 0.85),
    0 0 22px rgba(248, 250, 252, 0.55);
}

.pt-fct-item.is-reaction {
  font-family: var(--pt-font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(8, 12, 20, 0.82);
  border: 1px solid var(--fct-accent, rgba(251, 191, 36, 0.68));
  color: var(--fct-accent, #fde68a);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.82), 0 0 14px rgba(251, 191, 36, 0.30);
  animation: ptFctReactionPop var(--fct-dur, 0.98s) var(--pt-ease-out) forwards;
}

.pt-fct-item.is-parry {
  font-family: var(--pt-font-display);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.06em;
  padding: 2px 10px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(136, 19, 55, 0.90), rgba(69, 10, 10, 0.92));
  border: 1px solid #fb7185;
  color: #ffe4e6;
  box-shadow: 0 0 18px rgba(244, 63, 94, 0.72), inset 0 1px 0 rgba(255, 248, 220, 0.25);
  animation: ptFctCounterSnap var(--fct-dur, 0.84s) var(--pt-ease-out) forwards;
}

.pt-fct-item.is-dodge {
  font-size: 14.5px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.05em;
  color: #67e8f9;
  text-shadow:
    0 2px 5px rgba(0, 0, 0, 0.96),
    0 0 14px rgba(45, 212, 191, 0.82);
  animation: ptFctDodgeFloat var(--fct-dur, 0.80s) var(--pt-ease-out) forwards;
}

.pt-fct-item.is-heal {
  font-size: 15px;
  font-weight: 800;
  color: #34d399;
  text-shadow:
    0 2px 5px rgba(0, 0, 0, 0.96),
    0 0 12px rgba(16, 185, 129, 0.72);
  animation: ptFctHealRise var(--fct-dur, 0.90s) var(--pt-ease-out) forwards;
}

.pt-fct-item.is-posture {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #fbbf24;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.98),
    0 0 10px rgba(245, 158, 11, 0.72);
}

/* ----------------------------------------------------------------------------
 * 11.2 Unified BossEncounterHUD (#pt-boss-encounter-hud at top: 44px)
 *      Obsidian-Jade & Gilded-Bronze Top-Center Sovereign Frame
 * ---------------------------------------------------------------------------- */
#pt-boss-encounter-hud,
.pt-boss-encounter-hud {
  position: fixed;
  top: 44px;
  left: 50%;
  transform: translate3d(-50%, 0, 0);
  z-index: 25;
  width: min(560px, calc(100vw - 360px));
  min-width: 310px;
  padding: 9px 16px 10px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(45, 212, 191, 0.12), rgba(212, 175, 95, 0.08) 46%, transparent 78%),
    linear-gradient(172deg, rgba(11, 20, 26, 0.94) 0%, rgba(6, 11, 16, 0.97) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(212, 175, 95, 0.62);
  border-bottom: 2px solid var(--pt-gold);
  border-radius: 6px 6px 10px 10px;
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.86),
    0 0 24px rgba(15, 118, 110, 0.16),
    inset 0 1px 0 rgba(255, 248, 220, 0.18);
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s var(--pt-ease-out);
}

#pt-boss-encounter-hud::before,
.pt-boss-encounter-hud::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 16%;
  right: 16%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, #fef08a, #d4af5f, transparent);
  pointer-events: none;
}

#pt-boss-encounter-hud.is-hidden,
.pt-boss-encounter-hud.is-hidden {
  display: none !important;
}

.pt-boss-hud-head,
.pt-boss-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.pt-boss-title-group {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
}

.pt-boss-name {
  font-family: var(--pt-font-display);
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--pt-gold-pale);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 0 14px rgba(251, 191, 36, 0.34);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pt-boss-subtitle,
.pt-boss-realm-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(9, 18, 24, 0.90);
  border: 1px solid rgba(79, 209, 197, 0.48);
  color: #99f6e4;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Boss Immortal Lifelines / Phase Gems (.pt-boss-lifelines) */
.pt-boss-lifelines {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.pt-boss-lifelines > span,
.pt-boss-lifeline-pip,
.pt-boss-lifeline-gem {
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  border-radius: 1.5px;
  background: radial-gradient(circle at 35% 35%, #fda4af 0%, #e11d48 58%, #881337 100%);
  border: 1px solid #fef08a;
  box-shadow: 0 0 8px rgba(225, 29, 72, 0.82), 0 0 3px rgba(254, 240, 138, 0.65);
  transition: transform 0.18s var(--pt-ease-out), background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.pt-boss-lifelines > .is-spent,
.pt-boss-lifelines > .is-broken,
.pt-boss-lifeline-pip.is-spent,
.pt-boss-lifeline-gem.is-spent {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: none;
  opacity: 0.42;
  transform: rotate(45deg) scale(0.82);
}

/* Boss Layered HP & Shield Tubes (.pt-boss-hp-tubes) */
.pt-boss-hp-tubes {
  position: relative;
  width: 100%;
  height: 13px;
  background: rgba(4, 8, 13, 0.96);
  border: 1px solid rgba(212, 175, 95, 0.56);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.92), 0 1px 0 rgba(255, 248, 220, 0.10);
}

.pt-boss-hp-trail {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--boss-trail-pct, 0%);
  background: linear-gradient(180deg, #fef08a 0%, #f59e0b 100%);
  opacity: 0.68;
  transition: width 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.pt-boss-hp-fill {
  position: relative;
  z-index: 1;
  height: 100%;
  width: var(--boss-hp-pct, 100%);
  background: linear-gradient(90deg, #881337 0%, #e11d48 54%, #f59e0b 90%, #fef08a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 0 12px rgba(225, 29, 72, 0.42);
  transition: width 0.10s linear;
}

.pt-boss-shield-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: 2;
  width: var(--boss-shield-pct, 0%);
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 62%, #94a3b8 100%);
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.92), 0 0 10px rgba(226, 232, 240, 0.52);
  transition: width 0.12s linear;
}

.pt-boss-hp-nums {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: #f8fafc;
  text-shadow: 0 1px 3px #000000, 0 0 6px rgba(0, 0, 0, 0.94);
}

/* Boss Posture / Stagger Bar & Amber DPS-Check State (.pt-boss-stagger-bar.is-amber-check) */
@keyframes ptBossAmberCheckPulse {
  0% {
    filter: brightness(0.96);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.58), inset 0 0 6px rgba(254, 240, 138, 0.42);
  }
  50% {
    filter: brightness(1.22);
    box-shadow: 0 0 18px rgba(254, 240, 138, 0.95), inset 0 0 10px rgba(255, 255, 255, 0.65);
  }
  100% {
    filter: brightness(0.96);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.58), inset 0 0 6px rgba(254, 240, 138, 0.42);
  }
}

.pt-boss-stagger-bar {
  position: relative;
  width: 88%;
  height: 6px;
  margin: 0 auto;
  background: rgba(5, 10, 16, 0.94);
  border: 1px solid rgba(212, 175, 95, 0.34);
  border-radius: 999px;
  overflow: hidden;
}

.pt-boss-stagger-fill {
  height: 100%;
  width: var(--boss-stagger-pct, 0%);
  border-radius: 999px;
  background: linear-gradient(90deg, #0d9488 0%, #2dd4bf 52%, #f5d47a 100%);
  box-shadow: 0 0 8px rgba(45, 212, 191, 0.45);
  transition: width 0.10s linear;
}

.pt-boss-stagger-bar.is-amber-check {
  height: 7px;
  border-color: #fde047;
  background: rgba(42, 20, 4, 0.95);
  animation: ptBossAmberCheckPulse 0.62s ease-in-out infinite;
}

.pt-boss-stagger-bar.is-amber-check .pt-boss-stagger-fill,
.pt-boss-stagger-bar.is-amber-check > div {
  background: linear-gradient(90deg, #ea580c 0%, #f59e0b 45%, #fef08a 82%, #ffffff 100%);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.92);
}

/* Boss Active Cast & Threat-Color Telegraph Bar (.pt-boss-cast-bar) */
.pt-boss-cast-bar {
  position: relative;
  width: 100%;
  min-height: 18px;
  padding: 2px 8px;
  background: rgba(7, 13, 20, 0.92);
  border: 1px solid rgba(212, 175, 95, 0.42);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--pt-ivory);
}

.pt-boss-cast-bar.is-hidden {
  display: none !important;
}

.pt-boss-cast-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--boss-cast-pct, 0%);
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.55), rgba(251, 191, 36, 0.78));
  pointer-events: none;
  transition: width 0.05s linear;
}

.pt-boss-cast-bar.is-blue-focus {
  border-color: rgba(56, 189, 248, 0.76);
  color: #e0f2fe;
}

.pt-boss-cast-bar.is-blue-focus .pt-boss-cast-fill {
  background: linear-gradient(90deg, rgba(2, 132, 199, 0.58), rgba(56, 189, 248, 0.84));
}

.pt-boss-cast-bar.is-red-parry {
  border-color: rgba(244, 63, 94, 0.82);
  color: #ffe4e6;
}

.pt-boss-cast-bar.is-red-parry .pt-boss-cast-fill {
  background: linear-gradient(90deg, rgba(159, 18, 57, 0.62), rgba(244, 63, 94, 0.86));
}

.pt-boss-cast-bar.is-gold-fury {
  border-color: #fbbf24;
  color: #fef9c3;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.42);
}

.pt-boss-cast-bar.is-gold-fury .pt-boss-cast-fill {
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.72), rgba(251, 191, 36, 0.90));
}

.pt-boss-cast-label,
.pt-boss-cast-timer {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.96);
}

/* ----------------------------------------------------------------------------
 * 11.3 Đan Độc Meridian Vein Indicator (.pt-dandoc-bar, .is-toxic-warn)
 * ---------------------------------------------------------------------------- */
@keyframes ptDanDocToxicWarn {
  0% {
    border-color: rgba(192, 38, 211, 0.68);
    box-shadow: 0 0 6px rgba(192, 38, 211, 0.42);
  }
  50% {
    border-color: rgba(244, 63, 94, 0.95);
    box-shadow: 0 0 14px rgba(244, 63, 94, 0.82), inset 0 0 6px rgba(74, 222, 128, 0.35);
  }
  100% {
    border-color: rgba(192, 38, 211, 0.68);
    box-shadow: 0 0 6px rgba(192, 38, 211, 0.42);
  }
}

.pt-dandoc-row,
.pt-dandoc-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.pt-dandoc-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #a7f3d0;
  letter-spacing: 0.02em;
}

.pt-dandoc-bar {
  position: relative;
  width: 100%;
  height: 5px;
  background: rgba(5, 9, 14, 0.94);
  border: 1px solid rgba(52, 211, 153, 0.32);
  border-radius: 999px;
  overflow: hidden;
}

.pt-dandoc-fill,
.pt-dandoc-bar > div,
.pt-dandoc-bar > span {
  display: block;
  height: 100%;
  width: var(--dandoc-pct, 0%);
  border-radius: 999px;
  background: linear-gradient(90deg, #059669 0%, #4ade80 54%, #a855f7 100%);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.48);
  transition: width 0.16s var(--pt-ease-out), background 0.2s ease;
}

.pt-dandoc-bar.is-toxic-warn,
.is-toxic-warn .pt-dandoc-bar {
  border-color: #f43f5e;
  animation: ptDanDocToxicWarn 0.68s ease-in-out infinite;
}

.pt-dandoc-bar.is-toxic-warn .pt-dandoc-fill,
.pt-dandoc-bar.is-toxic-warn > div,
.pt-dandoc-bar.is-toxic-warn > span,
.is-toxic-warn .pt-dandoc-fill {
  background: linear-gradient(90deg, #16a34a 0%, #c026d3 46%, #f43f5e 88%, #fde047 100%);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.88);
}

.pt-dandoc-row.is-toxic-warn .pt-dandoc-labels,
.pt-dandoc-wrap.is-toxic-warn .pt-dandoc-labels {
  color: #fda4af;
}

/* ----------------------------------------------------------------------------
 * 11.4 Elemental Aura Badges (.pt-aura-icons)
 * ---------------------------------------------------------------------------- */
.pt-aura-icons {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  pointer-events: none;
}

.pt-aura-icons > span,
.pt-aura-icon,
.pt-aura-badge {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(7, 11, 18, 0.92);
  border: 1px solid rgba(212, 175, 95, 0.56);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.86);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1;
  color: var(--pt-porcelain-bright);
  flex-shrink: 0;
}

.pt-aura-icons [data-elem="hoa"],
.pt-aura-icons .is-hoa {
  border-color: #fb923c;
  color: #fed7aa;
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.72);
}

.pt-aura-icons [data-elem="bang"],
.pt-aura-icons .is-bang {
  border-color: #38bdf8;
  color: #bae6fd;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.72);
}

.pt-aura-icons [data-elem="loi"],
.pt-aura-icons .is-loi {
  border-color: #c084fc;
  color: #e9d5ff;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.76);
}

.pt-aura-icons [data-elem="doc"],
.pt-aura-icons .is-doc {
  border-color: #4ade80;
  color: #bbf7d0;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.72);
}

/* ----------------------------------------------------------------------------
 * 11.5 Guiding Wind / Chapter Objective Pill (#pt-objective-tracker)
 * ---------------------------------------------------------------------------- */
@keyframes ptGuidingWindBreeze {
  0%, 100% {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.74), inset 0 1px 0 rgba(255, 248, 220, 0.14);
  }
  50% {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.80), 0 0 16px rgba(79, 209, 197, 0.24), inset 0 1px 0 rgba(255, 248, 220, 0.22);
  }
}

#pt-objective-tracker,
.pt-objective-tracker {
  position: relative;
  min-width: 0;
  max-width: min(358px, 46vw);
  min-height: 29px;
  padding: 4px 10px 4px 9px;
  background:
    radial-gradient(ellipse at 0% 50%, rgba(79, 209, 197, 0.14), transparent 68%),
    var(--pt-jade-panel-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 95, 0.46);
  border-left: 3px solid var(--pt-jade-cyan);
  border-radius: 999px;
  color: var(--pt-ivory);
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  pointer-events: auto;
  animation: ptGuidingWindBreeze 3.4s ease-in-out infinite;
}

body > #pt-objective-tracker,
.pt-hud-root > #pt-objective-tracker {
  position: fixed;
  top: 138px;
  left: 16px;
  z-index: 21;
}

#pt-objective-tracker.is-hidden,
.pt-objective-tracker.is-hidden {
  display: none !important;
}

.pt-obj-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--pt-jade-cyan);
}

.pt-obj-title {
  font-family: var(--pt-font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--pt-gold-pale);
  line-height: 1.28;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.92);
}

.pt-obj-sub,
.pt-obj-hint {
  font-size: 11px;
  color: var(--pt-mist);
  line-height: 1.35;
}

.pt-obj-wind-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1.5px 7px;
  border-radius: 999px;
  background: rgba(13, 42, 42, 0.78);
  border: 1px solid rgba(79, 209, 197, 0.52);
  color: #99f6e4;
  font-size: 9.5px;
  font-weight: 800;
  cursor: pointer;
}

/* ----------------------------------------------------------------------------
 * 11.6 Collapsible Combat & Progression Sandbox Drawer (.pt-sandbox-drawer)
 *      Preserves inner buttons in DOM at all times for automated test queries!
 * ---------------------------------------------------------------------------- */
.pt-sandbox-drawer {
  position: relative;
  width: 100%;
  border-radius: 7px;
  background: rgba(8, 15, 20, 0.86);
  border: 1px solid rgba(212, 175, 95, 0.30);
  box-shadow: inset 0 1px 0 rgba(255, 248, 220, 0.06);
  overflow: hidden;
  pointer-events: auto;
}

.pt-sandbox-drawer > summary,
.pt-sandbox-drawer-toggle {
  width: 100%;
  min-height: 32px;
  padding: 6px 12px;
  background: linear-gradient(90deg, rgba(14, 26, 32, 0.90), rgba(9, 17, 22, 0.85));
  border: none;
  color: var(--pt-gold-bright);
  font-family: var(--pt-font-ui);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.pt-sandbox-drawer > summary::-webkit-details-marker {
  display: none;
}

.pt-sandbox-drawer > summary:hover,
.pt-sandbox-drawer-toggle:hover {
  background: linear-gradient(90deg, rgba(24, 42, 48, 0.94), rgba(16, 26, 34, 0.92));
  color: #fef08a;
}

.pt-sandbox-drawer-body,
.pt-sandbox-content {
  padding: 10px 12px;
  border-top: 1px solid rgba(212, 175, 95, 0.20);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pt-sandbox-drawer.is-collapsed .pt-sandbox-drawer-body,
.pt-sandbox-drawer.is-collapsed .pt-sandbox-content,
.pt-sandbox-drawer:not(.is-open):not([open]):has(.pt-sandbox-drawer-toggle) .pt-sandbox-drawer-body,
.pt-sandbox-drawer:not(.is-open):not([open]):has(.pt-sandbox-drawer-toggle) .pt-sandbox-content {
  display: none;
}

.pt-sandbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 6px;
}

.pt-sandbox-btn {
  padding: 5px 9px;
  border-radius: 5px;
  background: rgba(15, 28, 35, 0.90);
  border: 1px solid rgba(212, 175, 95, 0.36);
  color: var(--pt-ivory);
  font-family: var(--pt-font-ui);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.12s var(--pt-ease-out);
}

.pt-sandbox-btn:hover {
  transform: translateY(-1px);
  border-color: var(--pt-gold-bright);
  background: rgba(34, 48, 56, 0.95);
  color: #fef08a;
}

@media (max-width: 900px) {
  #pt-boss-encounter-hud,
  .pt-boss-encounter-hud {
    width: min(460px, calc(100vw - 28px));
    min-width: 260px;
    padding: 7px 12px 8px;
  }
  #pt-objective-tracker,
  .pt-objective-tracker {
    max-width: 256px;
  }
}

/* ----------------------------------------------------------------------------
 * 11.7 Cross-Platform Dynamic Viewport (100dvh) & Safe-Area Landscape Support
 * ---------------------------------------------------------------------------- */
.pt-split-backdrop,
.pt-modal-backdrop.pt-split-backdrop,
.pt-left-rail,
.pt-right-inspector {
  height: 100vh;
  height: 100dvh;
}

.pt-hud-topleft {
  top: calc(14px + env(safe-area-inset-top, 0px));
  left: calc(16px + env(safe-area-inset-left, 0px));
}

.pt-hud-topright {
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: calc(16px + env(safe-area-inset-right, 0px));
}

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

.pt-hud-bottomright {
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}

.pt-left-rail {
  padding-left: env(safe-area-inset-left, 0px);
  width: calc(68px + env(safe-area-inset-left, 0px));
  min-width: calc(68px + env(safe-area-inset-left, 0px));
  flex: 0 0 calc(68px + env(safe-area-inset-left, 0px));
}

@media (orientation: landscape) and (max-height: 540px) {
  .pt-hud-topleft {
    top: calc(8px + env(safe-area-inset-top, 0px));
    left: calc(10px + env(safe-area-inset-left, 0px));
    transform: scale(0.88);
    transform-origin: top left;
  }
  .pt-hud-topright {
    top: calc(8px + env(safe-area-inset-top, 0px));
    right: calc(10px + env(safe-area-inset-right, 0px));
    transform: scale(0.88);
    transform-origin: top right;
  }
  .pt-hud-bottom {
    transform: translateX(-50%) scale(0.90);
    transform-origin: bottom center;
  }
  .pt-rail-btn {
    min-height: 48px;
    padding: 6px 4px;
  }
}
