
/* =========================================================
   🛡️ STRICT SCREEN VIEW ISOLATION (ZERO LEAKAGE ACROSS SCREENS)
   ========================================================= */
.screen-view {
    display: none !important;
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    flex-direction: column !important;
}

.screen-view.active-screen {
    display: flex !important;
    flex-direction: column !important;
}

#combat-view {
    justify-content: space-between;
    padding: 4px 8px 6px;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
}


/* Screen View Purity: Only active screen is displayed */
.screen-view {
    display: none !important;
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
}
.screen-view.active-screen {
    display: flex !important;
    flex-direction: column !important;
}

:root {  
 --bg-dark: #07090e;  
 --bg-panel: #0d1219;  
 --bg-card: #151d28;  
 --border-ink: #1f2937;  
 --border-blood: #7f1d1d;  
 --border-gold: #c8963e;  
 --blood-dark: #450a0a;  
 --blood: #991b1b;  
 --blood-bright: #ef4444;  
 --ghost-cyan: #06b6d4;  
 --ghost-bright: #22d3ee;  
 --cursed-purple: #8b5cf6;  
 --spirit-green: #10b981;  
 --spirit-bright: #34d399;  
 --holy-gold: #f59e0b;  
 --holy-bright: #fbbf24;  
 --paper-talisman: #fef3c7;  
 --ink-text: #1c1917;  
 --text-light: #f8fafc;  
 --text-muted: #94a3b8;  
 }  
  
 * {  
 box-sizing: border-box;  
 user-select: none;  
 -webkit-user-select: none;  
 margin: 0;  
 padding: 0;  
 font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;  
 }  
  
 body {  
 background-color: var(--bg-dark);  
 color: var(--text-light);  
 display: flex;  
 justify-content: center;  
 align-items: center;  
 min-height: 100vh;  
 overflow: hidden;  
 background-image: radial-gradient(circle at 50% 50%, #151b26 0%, #05070a 100%);  
 }  
  
 #game-viewport {  
 width: 100vw;  
 height: 100vh;  
 max-width: 520px;  
 max-height: 940px;  
 background: var(--bg-panel);  
 position: relative;  
 display: flex;  
 flex-direction: column;  
 box-shadow: 0 0 60px rgba(0,0,0,0.95), 0 0 0 2px rgba(127, 29, 29, 0.4);  
 border-radius: 12px;  
 overflow: hidden;  
 }  
  
 /* Top Navigation Header */  
 #top-nav-bar {  
 height: 62px;  
 background: linear-gradient(180deg, #18202d 0%, #090e16 100%);  
 border-bottom: 2px solid var(--border-blood);  
 display: flex;  
 align-items: center;  
 justify-content: space-between;  
 padding: 0 12px;  
 z-index: 50;  
 flex-shrink: 0;  
 }  
  
 .nav-profile-group {  
 display: flex;  
 align-items: center;  
 gap: 10px;  
 }  
  
 .avatar-circle-frame {  
 width: 44px;  
 height: 44px;  
 border-radius: 10px;  
 border: 2px solid var(--holy-gold);  
 box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);  
 overflow: hidden;  
 background: #090d16;  
 display: flex;  
 align-items: center;  
 justify-content: center;  
 }  
  
 .avatar-circle-frame svg {  
 width: 100%;  
 height: 100%;  
 }  
  
 .nav-stats-tray {  
 display: flex;  
 align-items: center;  
 gap: 10px;  
 font-size: 13px;  
 font-weight: 700;  
 }  
  
 .stat-badge {  
 display: inline-flex;  
 align-items: center;  
 gap: 4px;  
 background: rgba(0, 0, 0, 0.5);  
 padding: 4px 8px;  
 border-radius: 6px;  
 border: 1px solid rgba(255, 255, 255, 0.1);  
 }  
  
 .btn-bag-toggle {  
 background: linear-gradient(135deg, #1e293b, #0f172a);  
 color: var(--holy-bright);  
 border: 1px solid var(--holy-gold);  
 padding: 5px 9px;  
 border-radius: 6px;  
 cursor: pointer;  
 font-size: 12px;  
 font-weight: 700;  
 display: flex;  
 align-items: center;  
 gap: 4px;  
 transition: all 0.2s;  
 }  
 .btn-bag-toggle:hover {  
 filter: brightness(1.2);  
 transform: scale(1.04);  
 }  
  
 /* Relic Shelf Bar */  
 #relic-shelf-bar {  
 background: #070a10;  
 border-bottom: 1px solid #1f2937;  
 padding: 4px 10px;  
 display: flex;  
 align-items: center;  
 gap: 6px;  
 overflow-x: auto;  
 white-space: nowrap;  
 scrollbar-width: none;  
 flex-shrink: 0;  
 min-height: 34px;  
 }  
 #relic-shelf-bar::-webkit-scrollbar { display: none; }  
  
 .relic-chip {  
 display: inline-flex;  
 align-items: center;  
 gap: 4px;  
 background: rgba(255, 255, 255, 0.05);  
 border: 1px solid rgba(245, 158, 11, 0.3);  
 border-radius: 4px;  
 padding: 2px 7px;  
 font-size: 11px;  
 cursor: pointer;  
 transition: all 0.15s;  
 }  
 .relic-chip:hover {  
 border-color: var(--holy-bright);  
 background: rgba(245, 158, 11, 0.15);  
 }  
 .relic-chip.upgraded {  
 border-color: var(--ghost-bright);  
 background: rgba(6, 182, 212, 0.15);  
 box-shadow: 0 0 6px rgba(6, 182, 212, 0.3);  
 }  
  
   
/* Animations: Hero Attack Lunge, Foe Attack Lunge, Screen Flash & Shield Barrier */  
 @keyframes heroAttackLunge {  
 0% { transform: translateY(0) scale(1); }  
 35% { transform: translateY(-16px) scale(1.04); }  
 100% { transform: translateY(0) scale(1); }  
 }  
 .hero-lunge-anim {  
 animation: heroAttackLunge 0.35s ease-out;  
 }  
  
 @keyframes foeAttackLunge {  
 0% { transform: translateY(0); }  
 35% { transform: translateY(22px) scale(1.08); filter: drop-shadow(0 0 15px #ef4444); }  
 100% { transform: translateY(0); }  
 }  
 .foe-lunge-anim {  
 animation: foeAttackLunge 0.4s ease-in-out;  
 }  
  
 @keyframes screenDamageFlash {  
 0% { box-shadow: inset 0 0 0 0 transparent; }  
 30% { box-shadow: inset 0 0 45px 12px rgba(239, 68, 68, 0.85); }  
 100% { box-shadow: inset 0 0 0 0 transparent; }  
 }  
 .screen-flash-anim {  
 animation: screenDamageFlash 0.45s ease-out;  
 }  
  
 @keyframes shieldBarrierBurst {  
 0% { opacity: 0; transform: translate(-50%, -40%) scale(0.6); filter: drop-shadow(0 0 8px #38bdf8); }  
 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); filter: drop-shadow(0 0 25px #38bdf8) drop-shadow(0 0 50px #0284c7); }  
 70% { opacity: 0.95; transform: translate(-50%, -55%) scale(1); }  
 100% { opacity: 0; transform: translate(-50%, -75%) scale(1.2); filter: drop-shadow(0 0 0 transparent); }  
 }  
 .shield-barrier-container {  
 position: absolute;  
 top: 52%;  
 left: 50%;  
 transform: translate(-50%, -50%);  
 pointer-events: none;  
 z-index: 80;  
 animation: shieldBarrierBurst 0.85s forwards cubic-bezier(0.2, 0.8, 0.2, 1);  
 display: flex;  
 flex-direction: column;  
 align-items: center;  
 justify-content: center;  
 text-align: center;  
 }  
 .shield-barrier-icon {  
 width: 80px;  
 height: 80px;  
 filter: drop-shadow(0 0 15px #38bdf8);  
 }  
 .shield-barrier-txt {  
 font-size: 16px;  
 font-weight: 900;  
 color: #e0f2fe;  
 text-shadow: 0 2px 6px #0369a1, 0 0 12px #38bdf8;  
 margin-top: 4px;  
 }  
  
 /* Improved Foe Pod & Intent Badge (No overlapping!) */  
 .foe-pod {  
 background: rgba(17, 24, 36, 0.92);  
 border: 2px solid #2d384c;  
 border-radius: 12px;  
 padding: 8px 8px 6px;  
 display: flex;  
 flex-direction: column;  
 align-items: center;  
 min-width: 105px;  
 max-width: 130px;  
 cursor: pointer;  
 transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);  
 position: relative;  
 box-shadow: 0 4px 12px rgba(0,0,0,0.6);  
 }  
 .foe-pod.targeted {  
 border-color: var(--blood-bright);  
 background: rgba(45, 14, 18, 0.96);  
 box-shadow: 0 0 16px rgba(239, 68, 68, 0.8), inset 0 0 8px rgba(239, 68, 68, 0.4);  
 transform: scale(1.05);  
 }  
 .targeted-tag-indicator {  
 background: #ef4444;  
 color: #fff;  
 font-size: 9px;  
 font-weight: 800;  
 padding: 1px 6px;  
 border-radius: 10px;  
 margin-bottom: 3px;  
 letter-spacing: 0.5px;  
 box-shadow: 0 1px 4px rgba(0,0,0,0.6);  
 }  
 .intent-badge-modern {  
 position: relative;  
 top: 0;  
 background: #090e17;  
 border: 1.5px solid var(--blood-bright);  
 color: #fca5a5;  
 padding: 2px 8px;  
 border-radius: 12px;  
 font-size: 10.5px;  
 font-weight: 800;  
 box-shadow: 0 2px 6px rgba(0,0,0,0.7);  
 white-space: nowrap;  
 margin-bottom: 5px;  
 }  
  
 /* Combat Hero Console - Spacious, Non-Overlapping Layout */  
 .combat-hero-console {  
 display: flex;  
 align-items: center;  
 justify-content: space-between;  
 background: linear-gradient(135deg, rgba(24, 32, 48, 0.98) 0%, rgba(11, 16, 26, 0.98) 100%);  
 border: 1.5px solid rgba(239, 68, 68, 0.5);  
 border-radius: 12px;  
 padding: 6px 10px;  
 margin: 3px 0 4px;  
 box-shadow: 0 4px 15px rgba(0,0,0,0.7);  
 flex-shrink: 0;  
 min-height: 72px;  
 position: relative;  
 gap: 10px;  
 }  
 .hero-console-left {  
 display: flex;  
 align-items: center;  
 gap: 10px;  
 flex: 1.4;  
 min-width: 0;  
 }  
 .hero-vn-bust-container {  
 width: 50px;  
 height: 50px;  
 border-radius: 10px;  
 border: 2px solid var(--holy-gold);  
 box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);  
 overflow: hidden;  
 background: #090d16;  
 flex-shrink: 0;  
 display: flex;  
 align-items: center;  
 justify-content: center;  
 }  
 .hero-console-mid {  
 display: flex;  
 flex-direction: column;  
 align-items: center;  
 gap: 4px;  
 flex-shrink: 0;  
 }  
 .qi-orb-graphic {  
 width: 36px;  
 height: 36px;  
 border-radius: 10px;  
 background: radial-gradient(circle, #38bdf8 0%, #0369a1 85%);  
 border: 2px solid #e0f2fe;  
 box-shadow: 0 0 12px #38bdf8;  
 display: flex;  
 align-items: center;  
 justify-content: center;  
 font-size: 14px;  
 font-weight: 900;  
 color: #fff;  
 }  
 .hero-console-right {  
 display: flex;  
 flex-direction: column;  
 align-items: flex-end;  
 gap: 4px;  
 flex: 1;  
 flex-shrink: 0;  
 }  
 .btn-end-turn-modern {  
 background: linear-gradient(135deg, #dc2626, #991b1b);  
 border: 1.5px solid #ef4444;  
 color: #fff;  
 padding: 8px 14px;  
 border-radius: 8px;  
 font-weight: 800;  
 font-size: 13px;  
 cursor: pointer;  
 box-shadow: 0 3px 10px rgba(239, 68, 68, 0.4);  
 transition: all 0.2s;  
 white-space: nowrap;  
 }  
 .btn-end-turn-modern:hover:not(:disabled) {  
 filter: brightness(1.2);  
 transform: scale(1.03);  
 box-shadow: 0 4px 14px rgba(239, 68, 68, 0.6);  
 }  
 .combat-ticker-box {  
 background: rgba(10, 15, 24, 0.88);  
 border: 1px solid rgba(56, 189, 248, 0.35);  
 border-radius: 8px;  
 padding: 5px 12px;  
 font-size: 12px;  
 font-weight: 600;  
 color: var(--ghost-bright);  
 text-align: center;  
 min-height: 30px;  
 display: flex;  
 align-items: center;  
 justify-content: center;  
 flex-shrink: 0;  
 line-height: 1.4;  
 box-shadow: 0 2px 8px rgba(0,0,0,0.5);  
 }  
  
   
/* Boss Showcase Styling */  
 .boss-crown-badge {  
 background: linear-gradient(90deg, #b91c1c, #991b1b);  
 color: #fef08a;  
 border: 1px solid #eab308;  
 border-radius: 10px;  
 font-size: 10px;  
 font-weight: 800;  
 padding: 1px 8px;  
 margin-bottom: 4px;  
 box-shadow: 0 2px 6px rgba(0,0,0,0.8);  
 letter-spacing: 0.5px;  
 }  
 .foe-pod.boss-pod {  
 min-width: 190px;  
 max-width: 240px;  
 border: 3px solid #ef4444;  
 background: radial-gradient(circle at 50% 20%, rgba(69, 10, 10, 0.96) 0%, rgba(17, 24, 36, 0.98) 100%);  
 box-shadow: 0 0 32px rgba(239, 68, 68, 0.9), inset 0 0 16px rgba(185, 28, 28, 0.7);  
 padding: 10px 14px;  
 }  
 .foe-pod.boss-pod .foe-avatar-frame {  
 width: 145px;  
 height: 145px;  
 border-radius: 18px;  
 border: 3px solid var(--holy-gold);  
 box-shadow: 0 0 20px rgba(245, 158, 11, 0.7);  
 }  
 .foe-pod.boss-pod .hp-gauge-modern {  
 height: 16px;  
 margin-top: 5px;  
 border: 1.5px solid #ef4444;  
 }  
 .foe-pod.boss-pod .hp-gauge-fill-modern {  
 background: linear-gradient(90deg, #ef4444, #dc2626);  
 }  
  
 /* Widescreen / PC Desktop Responsive Support */  
 @media (min-width: 768px) {  
 #game-viewport {  
 max-width: 920px;  
 max-height: min(980px, 98vh);  
 border-radius: 16px;  
 }  
 .enemy-arena-area {  
 min-height: 180px;  
 max-height: 240px;  
 }  
 .enemy-group-tray {  
 gap: 20px;  
 justify-content: center;  
 }  
 .foe-pod {  
 min-width: 135px;  
 max-width: 175px;  
 padding: 10px 10px 8px;  
 }  
 .foe-pod.boss-pod {  
 min-width: 180px;  
 max-width: 240px;  
 }  
 .foe-pod.boss-pod .foe-avatar-frame {  
 width: 115px;  
 height: 115px;  
 }  
 .char-cards-grid {  
 grid-template-columns: repeat(4, 1fr);  
 gap: 14px;  
 }  
 .hand-cards-tray {  
 justify-content: center;  
 gap: 12px;  
 padding: 6px 12px;  
 }  
 .card-item {  
 width: 126px;  
 height: 174px;  
 padding: 7px 6px 6px;  
 }  
 .card-title-text {  
 font-size: 13px;  
 }  
 .card-effect-desc {  
 font-size: 12px;  
 line-height: 1.45;  
 }  
 .combat-hero-console {  
 padding: 10px 18px;  
 gap: 18px;  
 }  
 }  
  
 /* Mobile Viewport Fix */  
 @media (max-width: 767px) {  
 #game-viewport {  
 max-width: 100vw;  
 max-height: 100dvh;  
 height: 100dvh;  
 border-radius: 0;  
 box-shadow: none;  
 }  
 .foe-pod {  
 min-width: 155px;  
 max-width: 190px;  
 }  
 .foe-pod.boss-pod {  
 min-width: 190px;  
 max-width: 240px;  
 }  
 }  
  
   
/* Card Color Identities (Slay the Spire-style Color Coding) */  
 .card-item.card-color-red {  
 border-left: 6px solid #b91c1c;  
 border-color: #991b1b;  
 background: radial-gradient(circle at 50% 15%, #fff1f2 0%, #fee2e2 55%, #fecaca 100%);  
 box-shadow: 0 4px 14px rgba(185, 28, 28, 0.4), inset 0 0 0 1px #dc2626;  
 }  
 .card-item.card-color-red .card-cost-circle {  
 background: #b91c1c;  
 border-color: #fef08a;  
 color: #fff;  
 }  
 .card-item.card-color-red:hover {  
 box-shadow: 0 10px 22px rgba(0,0,0,0.85), 0 0 16px rgba(239, 68, 68, 0.75);  
 }  
  
 .card-item.card-color-green {  
 border-left: 6px solid #059669;  
 border-color: #047857;  
 background: radial-gradient(circle at 50% 15%, #f0fdf4 0%, #dcfce7 55%, #bbf7d0 100%);  
 box-shadow: 0 4px 14px rgba(5, 150, 105, 0.4), inset 0 0 0 1px #10b981;  
 }  
 .card-item.card-color-green .card-cost-circle {  
 background: #059669;  
 border-color: #a7f3d0;  
 color: #fff;  
 }  
 .card-item.card-color-green:hover {  
 box-shadow: 0 10px 22px rgba(0,0,0,0.85), 0 0 16px rgba(16, 185, 129, 0.75);  
 }  
  
 .card-item.card-color-blue {  
 border-left: 6px solid #1d4ed8;  
 border-color: #1e40af;  
 background: radial-gradient(circle at 50% 15%, #eff6ff 0%, #dbeafe 55%, #bfdbfe 100%);  
 box-shadow: 0 4px 14px rgba(29, 78, 216, 0.4), inset 0 0 0 1px #3b82f6;  
 }  
 .card-item.card-color-blue .card-cost-circle {  
 background: #1d4ed8;  
 border-color: #93c5fd;  
 color: #fff;  
 }  
 .card-item.card-color-blue:hover {  
 box-shadow: 0 10px 22px rgba(0,0,0,0.85), 0 0 16px rgba(59, 130, 246, 0.75);  
 }  
  
 .card-item.card-color-purple {  
 border-left: 6px solid #7e22ce;  
 border-color: #6b21a8;  
 background: radial-gradient(circle at 50% 15%, #faf5ff 0%, #f3e8ff 55%, #e9d5ff 100%);  
 box-shadow: 0 4px 14px rgba(126, 34, 206, 0.4), inset 0 0 0 1px #a855f7;  
 }  
 .card-item.card-color-purple .card-cost-circle {  
 background: #7e22ce;  
 border-color: #d8b4fe;  
 color: #fff;  
 }  
 .card-item.card-color-purple:hover {  
 box-shadow: 0 10px 22px rgba(0,0,0,0.85), 0 0 16px rgba(168, 85, 247, 0.75);  
 }  
  
 .card-item.card-color-neutral {  
 border-left: 6px solid #d97706;  
 border-color: #b45309;  
 background: radial-gradient(circle at 50% 15%, #fefce8 0%, #fef9c3 55%, #fde68a 100%);  
 box-shadow: 0 4px 14px rgba(180, 83, 9, 0.35), inset 0 0 0 1px #f59e0b;  
 }  
 .card-item.card-color-neutral .card-cost-circle {  
 background: #d97706;  
 border-color: #fef08a;  
 color: #fff;  
 }  
 .card-item.card-color-neutral:hover {  
 box-shadow: 0 10px 22px rgba(0,0,0,0.85), 0 0 16px rgba(245, 158, 11, 0.75);  
 }  
  
 .card-color-badge {  
 font-size: 8px;  
 font-weight: 800;  
 padding: 1px 4px;  
 border-radius: 3px;  
 background: rgba(0,0,0,0.06);  
 color: #334155;  
 letter-spacing: 0.2px;  
 white-space: nowrap;  
 }  
  
   
/* Streamlined Combat Top Status Bar */  
 .combat-top-status-bar {  
 display: flex;  
 align-items: center;  
 gap: 8px;  
 padding: 4px 8px;  
 background: rgba(9, 14, 23, 0.95);  
 border-bottom: 1px solid #334155;  
 flex-shrink: 0;  
 z-index: 10;  
 }  
 .combat-turn-badge {  
 display: flex;  
 align-items: center;  
 gap: 5px;  
 background: #1e293b;  
 border: 1.5px solid #0284c7;  
 border-radius: 8px;  
 padding: 3px 8px;  
 white-space: nowrap;  
 box-shadow: 0 2px 6px rgba(0,0,0,0.5);  
 flex-shrink: 0;  
 }  
 .combat-turn-badge .turn-num {  
 font-size: 11.5px;  
 font-weight: 800;  
 color: #f8fafc;  
 }  
 .combat-turn-badge .turn-phase.hero {  
 font-size: 11px;  
 font-weight: 800;  
 color: #38bdf8;  
 background: rgba(2, 132, 199, 0.25);  
 padding: 1px 6px;  
 border-radius: 4px;  
 }  
 .combat-turn-badge .turn-phase.foe {  
 font-size: 11px;  
 font-weight: 800;  
 color: #f87171;  
 background: rgba(220, 38, 38, 0.25);  
 padding: 1px 6px;  
 border-radius: 4px;  
 }  
 .btn-combat-pouch-toggle {  
 display: flex;  
 align-items: center;  
 gap: 4px;  
 background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);  
 border: 1.5px solid #0284c7;  
 border-radius: 8px;  
 padding: 3px 7px;  
 color: #f0f9ff;  
 font-size: 11.5px;  
 font-weight: 800;  
 cursor: pointer;  
 box-shadow: 0 2px 6px rgba(0,0,0,0.5);  
 transition: all 0.15s;  
 }  
 .btn-combat-pouch-toggle:hover {  
 border-color: #38bdf8;  
 transform: translateY(-2px);  
 }  
  
 /* Intent Badges with Distinct Colors & Styles */  
 .intent-badge-modern {  
 background: #090e17;  
 border: 1.5px solid var(--blood-bright);  
 color: #fca5a5;  
 padding: 2.5px 8px;  
 border-radius: 12px;  
 font-size: 11px;  
 font-weight: 800;  
 box-shadow: 0 2px 6px rgba(0,0,0,0.7);  
 white-space: nowrap;  
 margin-bottom: 4px;  
 display: inline-flex;  
 align-items: center;  
 justify-content: center;  
 }  
 .intent-badge-modern.intent-type-atk {  
 background: #450a0a;  
 border-color: #ef4444;  
 color: #fca5a5;  
 box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);  
 }  
 .intent-badge-modern.intent-type-def {  
 background: #172554;  
 border-color: #3b82f6;  
 color: #bfdbfe;  
 box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);  
 }  
 .intent-badge-modern.intent-type-buff {  
 background: #422006;  
 border-color: #eab308;  
 color: #fef08a;  
 box-shadow: 0 0 10px rgba(234, 179, 8, 0.5);  
 }  
 .intent-badge-modern.intent-type-debuff {  
 background: #3b0764;  
 border-color: #a855f7;  
 color: #f3e8ff;  
 box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);  
 }  
  
 /* Screen Views - Isolation */  
 .screen-view {  
 display: none !important;  
 flex: 1;  
 flex-direction: column;  
 overflow: hidden;  
 position: relative;  
 width: 100%;  
 height: 100%;  
 }  
 .screen-view.active-screen {  
 display: flex !important;  
 }  
  
 /* Title Screen */  
 #title-view {  
 background: radial-gradient(circle at 50% 35%, #1a0f18 0%, #05070a 100%);  
 justify-content: space-between;  
 align-items: center;  
 padding: 22px 16px 18px;  
 text-align: center;  
 overflow-y: auto;  
 }  
  
 .title-hero-art-box {  
 width: 180px;  
 height: 216px;  
 margin: 6px auto;  
 border-radius: 14px;  
 overflow: hidden;  
 border: 2px solid var(--blood-bright);  
 box-shadow: 0 8px 25px rgba(0,0,0,0.9), 0 0 20px rgba(239, 68, 68, 0.35);  
 background: #090d16;  
 display: flex;  
 align-items: center;  
 justify-content: center;  
 flex-shrink: 0;  
 }  
 .title-hero-art-box svg {  
 width: 100%;  
 height: 100%;  
 display: block;  
 }  
  
 .title-calligraphy {  
 font-family: 'Charm', cursive, sans-serif;  
 font-size: 32px;  
 font-weight: 700;  
 color: #fca5a5;  
 text-shadow: 0 2px 10px rgba(0,0,0,0.9), 0 0 20px rgba(239, 68, 68, 0.6);  
 letter-spacing: 1px;  
 margin-bottom: 2px;  
 }  
  
 .title-menu-btns {  
 display: flex;  
 flex-direction: column;  
 gap: 10px;  
 width: 100%;  
 max-width: 290px;  
 margin-top: 6px;  
 }  
  
 .menu-action-btn {  
 background: linear-gradient(135deg, #1e293b, #0f172a);  
 color: var(--text-light);  
 border: 1.5px solid var(--border-blood);  
 padding: 11px 16px;  
 border-radius: 8px;  
 font-size: 15px;  
 font-weight: 700;  
 cursor: pointer;  
 box-shadow: 0 4px 12px rgba(0,0,0,0.5);  
 transition: all 0.2s;  
 }  
 .menu-action-btn:hover:not(:disabled) {  
 background: linear-gradient(135deg, #7f1d1d, #450a0a);  
 color: #fff;  
 transform: translateY(-2px);  
 box-shadow: 0 6px 16px rgba(239, 68, 68, 0.45);  
 }  
 .menu-action-btn:disabled {  
 opacity: 0.4;  
 cursor: not-allowed;  
 border-color: #4b5563;  
 }  
 .menu-action-btn.primary {  
 background: linear-gradient(135deg, #b91c1c, #7f1d1d);  
 border-color: #ef4444;  
 color: #fff;  
 }  
 .menu-action-btn.primary:hover:not(:disabled) {  
 background: linear-gradient(135deg, #dc2626, #991b1b);  
 }  
  
 /* Character Select Screen */  
 #char-select-view {  
 background: radial-gradient(circle at 50% 30%, #151824 0%, #06080e 100%);  
 padding: 14px 14px 12px;  
 justify-content: space-between;  
 overflow-y: auto;  
 }  
 .char-cards-grid {  
 display: grid;  
 grid-template-columns: 1fr 1fr;  
 gap: 10px;  
 margin: 10px 0;  
 flex: 1;  
 overflow-y: auto;  
 }  
 .char-card-select {  
 background: #111722;  
 border: 2px solid #283344;  
 border-radius: 10px;  
 padding: 8px 6px;  
 text-align: center;  
 cursor: pointer;  
 transition: all 0.2s;  
 display: flex;  
 flex-direction: column;  
 align-items: center;  
 }  
 .char-card-select:hover, .char-card-select.selected {  
 border-color: var(--blood-bright);  
 background: #1c2331;  
 box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);  
 transform: translateY(-2px);  
 }  
 .char-card-select .char-portrait-frame {  
 width: 84px;  
 height: 100px;  
 border-radius: 8px;  
 overflow: hidden;  
 margin-bottom: 6px;  
 background: #07090e;  
 border: 1px solid rgba(239, 68, 68, 0.3);  
 display: flex;  
 align-items: center;  
 justify-content: center;  
 }  
 .char-card-select .char-portrait-frame svg {  
 width: 100%;  
 height: 100%;  
 display: block;  
 }  
  
         /* Map View */
        #map-view {
            padding: 0;
            background-color: #07090e;
            background-image: linear-gradient(180deg, rgba(7, 9, 14, 0.82) 0%, rgba(7, 9, 14, 0.94) 100%), url('images/bg_map_act1.jpg'), url('images/bg_map.jpg'), radial-gradient(circle at 50% 50%, #121824 0%, #05070a 100%);
            background-position: center;
            background-size: cover;
            background-repeat: no-repeat;
            overflow: hidden;
            flex-direction: column;
            height: 100%;
        }  
 .map-header-bar {  
 display: flex;  
 justify-content: space-between;  
 align-items: center;  
 padding: 8px 12px;  
 background: #121824;  
 border-radius: 8px;  
 border: 1px solid #283346;  
 margin-bottom: 8px;  
 }  
 #map-scroll-area {  
 flex: 1;  
 overflow-y: auto;  
 position: relative;  
 padding-bottom: 30px;  
 scrollbar-width: thin;  
 }  
 #map-svg {  
 position: absolute;  
 top: 0; left: 0;  
 width: 100%;  
 height: 100%;  
 pointer-events: none;  
 z-index: 1;  
 }  
 .map-lanes-wrap {  
 display: flex;  
 flex-direction: column-reverse;  
 gap: 22px;  
 position: relative;  
 z-index: 2;  
 padding: 15px 5px;  
 }  
 .map-lane-row {  
 display: flex;  
 justify-content: space-around;  
 align-items: center;  
 }  
 .map-node-btn {  
 width: 54px;  
 height: 54px;  
 border-radius: 10px;  
 background: #121824;  
 border: 2px solid #2c384c;  
 display: flex;  
 flex-direction: column;  
 align-items: center;  
 justify-content: center;  
 font-size: 18px;  
 cursor: pointer;  
 box-shadow: 0 4px 10px rgba(0,0,0,0.6);  
 transition: all 0.2s;  
 position: relative;  
 }  
 .map-node-btn .node-sub {  
 font-size: 8.5px;  
 font-weight: 700;  
 color: #94a3b8;  
 margin-top: 1px;  
 }  
 .map-node-btn.available {  
 border-color: var(--ghost-bright);  
 box-shadow: 0 0 14px rgba(34, 211, 238, 0.6);  
 transform: scale(1.08);  
 animation: pulseAvailable 1.5s infinite alternate;  
 }  
 @keyframes pulseAvailable {  
 0% { box-shadow: 0 0 6px rgba(34, 211, 238, 0.4); }  
 100% { box-shadow: 0 0 16px rgba(34, 211, 238, 0.9); }  
 }  
 .map-node-btn.current {  
 border-color: var(--blood-bright);  
 background: #2a0e12;  
 box-shadow: 0 0 12px rgba(239, 68, 68, 0.7);  
 }  
 .map-node-btn.visited {  
 opacity: 0.4;  
 filter: grayscale(0.8);  
 }  
 .map-node-btn.subboss {  
 border-color: var(--cursed-purple);  
 background: #1f102c;  
 }  
 .map-node-btn.boss {  
 width: 72px;  
 height: 72px;  
 border-radius: 10px;  
 border: 2.5px solid var(--blood-bright);  
 background: radial-gradient(circle, #3b0764 0%, #1e1b4b 50%, #090d16 100%);  
 box-shadow: 0 0 20px rgba(239, 68, 68, 0.8), 0 0 10px rgba(245, 158, 11, 0.5);  
 display: flex;  
 flex-direction: column;  
 align-items: center;  
 justify-content: center;  
 position: relative;  
 padding: 0;  
 }  
 /* Boss Node Portal on Map (Edge-to-Edge Circle) */  
 .map-node-btn.boss {  
 width: 82px;  
 height: 82px;  
 border-radius: 10px;  
 border: none;  
 background: transparent;  
 box-shadow: none;  
 display: flex;  
 flex-direction: column;  
 align-items: center;  
 justify-content: center;  
 position: relative;  
 padding: 0;  
 cursor: pointer;  
 }  
 .boss-portal-circle {  
 width: 76px;  
 height: 76px;  
 border-radius: 10px;  
 border: 3px solid #f59e0b;  
 background: #05070a;  
 box-shadow: 0 0 25px rgba(239, 68, 68, 0.9), inset 0 0 14px rgba(185, 28, 28, 0.7);  
 overflow: hidden;  
 position: relative;  
 display: flex;  
 align-items: center;  
 justify-content: center;  
 }  
 .boss-portal-circle img,  
 .boss-portal-circle svg {  
 width: 100% !important;  
 height: 100% !important;  
 object-fit: cover !important;  
 border-radius: 50% !important;  
 display: block !important;  
 }  
 .boss-node-crown {  
 position: absolute;  
 top: -3px;  
 font-size: 20px;  
 filter: drop-shadow(0 2px 4px #000);  
 z-index: 10;  
 }  
 .boss-portal-tag {  
 position: absolute;  
 bottom: -15px;  
 background: rgba(17, 24, 39, 0.95);  
 border: 1px solid #ef4444;  
 border-radius: 10px;  
 padding: 1px 8px;  
 font-size: 10.5px;  
 font-weight: 800;  
 color: #fca5a5;  
 white-space: nowrap;  
 box-shadow: 0 2px 6px rgba(0,0,0,0.8);  
 text-shadow: 0 1px 3px #000;  
 z-index: 12;  
 }  
 .map-boss-header-avatar {  
 width: 36px;  
 height: 36px;  
 border-radius: 10px;  
 border: 2px solid #f59e0b;  
 overflow: hidden;  
 display: flex;  
 align-items: center;  
 justify-content: center;  
 background: #1e1b4b;  
 box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);  
 }  
 .map-boss-header-avatar img,  
 .map-boss-header-avatar svg {  
 width: 100% !important;  
 height: 100% !important;  
 object-fit: cover !important;  
 border-radius: 50% !important;  
 display: block !important;  
 }  
  
 /* Unified Hero Combat Console */  
 .combat-hero-console {  
 display: flex;  
 align-items: center;  
 justify-content: space-between;  
 background: linear-gradient(90deg, rgba(24, 32, 46, 0.95) 0%, rgba(13, 18, 28, 0.9) 100%);  
 border: 1.5px solid rgba(239, 68, 68, 0.45);  
 border-radius: 10px;  
 padding: 4px 8px;  
 margin: 2px 0 4px;  
 box-shadow: 0 3px 12px rgba(0,0,0,0.6);  
 flex-shrink: 0;  
 height: 60px;  
 position: relative;  
 gap: 8px;  
 }  
 .hero-console-left {  
 display: flex;  
 align-items: center;  
 gap: 8px;  
 flex: 1;  
 min-width: 0;  
 }  
 .hero-console-mid {  
 display: flex;  
 align-items: center;  
 gap: 6px;  
 flex-shrink: 0;  
 }  
 .qi-orb-label {  
 font-size: 9.5px;  
 font-weight: 700;  
 color: #7dd3fc;  
 text-align: center;  
 display: block;  
 }  
 .hero-console-right {  
 display: flex;  
 flex-direction: column;  
 align-items: flex-end;  
 gap: 3px;  
 flex-shrink: 0;  
 }  
 .deck-counts-row {  
 display: flex;  
 gap: 8px;  
 font-size: 10.5px;  
 color: #cbd5e1;  
 font-weight: 600;  
 }  
 .deck-counts-row b {  
 color: var(--holy-gold);  
 }  
  
         /* Combat View */
        #combat-view {
            background-color: #07090e;
            background-image: linear-gradient(180deg, rgba(7, 9, 14, 0.78) 0%, rgba(7, 9, 14, 0.92) 100%), url('images/bg_combat_act1.jpg'), url('images/bg_combat.jpg'), radial-gradient(circle at 50% 30%, #151d28 0%, #06080e 100%);
            background-position: center;
            background-size: cover;
            background-repeat: no-repeat;  
 padding: 6px 10px;  
 flex-direction: column;  
 justify-content: space-between;  
 overflow: hidden;  
 height: 100%;  
 }  
  
 /* Enemy Arena Area */  
 .enemy-arena-area {  
 flex: 1;  
 min-height: 125px;  
 max-height: 165px;  
 display: flex;  
 align-items: center;  
 justify-content: center;  
 padding: 2px 0;  
 position: relative;  
 }  
 .enemy-group-tray {  
 display: flex;  
 gap: 10px;  
 justify-content: center;  
 align-items: flex-end;  
 width: 100%;  
 overflow-x: auto;  
 scrollbar-width: none;  
 padding: 4px;  
 }  
 .enemy-group-tray::-webkit-scrollbar { display: none; }  
  
 /* Mobile-First Large & High-Detail Enemy Pods */  
 .foe-pod {  
 background: rgba(17, 24, 36, 0.95);  
 border: 2.5px solid #334155;  
 border-radius: 16px;  
 padding: 8px 10px;  
 display: flex;  
 flex-direction: column;  
 align-items: center;  
 min-width: 155px;  
 max-width: 190px;  
 cursor: pointer;  
 transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);  
 position: relative;  
 box-shadow: 0 6px 20px rgba(0,0,0,0.85);  
 }  
 .foe-pod.targeted {  
 border-color: var(--blood-bright);  
 background: rgba(45, 14, 18, 0.96);  
 box-shadow: 0 0 20px rgba(239, 68, 68, 0.9), inset 0 0 10px rgba(239, 68, 68, 0.4);  
 transform: scale(1.05);  
 }  
 .foe-pod.boss-pod {  
 min-width: 190px;  
 max-width: 240px;  
 border: 3px solid #ef4444;  
 background: radial-gradient(circle at 50% 20%, rgba(69, 10, 10, 0.96) 0%, rgba(17, 24, 36, 0.98) 100%);  
 box-shadow: 0 0 32px rgba(239, 68, 68, 0.9), inset 0 0 16px rgba(185, 28, 28, 0.7);  
 }  
 .foe-avatar-frame {  
 width: 125px !important;  
 height: 125px !important;  
 border-radius: 14px !important;  
 border: 2.5px solid var(--holy-gold) !important;  
 box-shadow: 0 0 16px rgba(245, 158, 11, 0.6) !important;  
 overflow: hidden !important;  
 background: #090d16 !important;  
 display: flex !important;  
 align-items: center !important;  
 justify-content: center !important;  
 }  
 .foe-avatar-frame img, .foe-avatar-frame svg {  
 width: 100% !important;  
 height: 100% !important;  
 object-fit: cover !important;  
 display: block !important;  
 }  
 .foe-pod.boss-pod .foe-avatar-frame {  
 width: 145px !important;  
 height: 145px !important;  
 border-radius: 18px !important;  
 border: 3px solid #f59e0b !important;  
 box-shadow: 0 0 22px rgba(239, 68, 68, 0.9) !important;  
 }  
  
 .intent-badge-modern {  
 position: absolute;  
 top: -9px;  
 background: #090e17;  
 border: 1.5px solid var(--blood-bright);  
 color: #fca5a5;  
 padding: 2px 7px;  
 border-radius: 12px;  
 font-size: 10px;  
 font-weight: 700;  
 box-shadow: 0 2px 6px rgba(0,0,0,0.7);  
 white-space: nowrap;  
 z-index: 5;  
 }  
 .btn-lore-trigger {  
 background: #1e293b;  
 color: var(--ghost-bright);  
 border: 1px solid var(--ghost-cyan);  
 font-size: 9.5px;  
 padding: 1px 6px;  
 border-radius: 4px;  
 margin-top: 3px;  
 cursor: pointer;  
 }  
  
 .hero-vn-bust-container {  
 width: 46px;  
 height: 46px;  
 border-radius: 10px;  
 border: 2px solid var(--holy-gold);  
 box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);  
 overflow: hidden;  
 background: #090d16;  
 flex-shrink: 0;  
 display: flex;  
 align-items: center;  
 justify-content: center;  
 }  
 .hero-vn-bust-container svg {  
 width: 100%;  
 height: 100%;  
 display: block;  
 }  
  
 .hero-info-column {  
 flex: 1;  
 display: flex;  
 flex-direction: column;  
 gap: 2px;  
 min-width: 0;  
 }  
 .hero-name-row {  
 display: flex;  
 justify-content: space-between;  
 align-items: center;  
 }  
 .hero-title-tag {  
 font-size: 10.5px;  
 color: var(--holy-bright);  
 font-weight: 600;  
 }  
  
 .hp-gauge-modern {  
 height: 13px;  
 background: #090e17;  
 border-radius: 6px;  
 border: 1px solid #334155;  
 overflow: hidden;  
 position: relative;  
 width: 100%;  
 }  
 .hp-gauge-fill-modern {  
 height: 100%;  
 background: linear-gradient(90deg, #ef4444, #10b981);  
 transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);  
 }  
 .hp-gauge-num-modern {  
 position: absolute;  
 top: 0; left: 0;  
 width: 100%;  
 height: 100%;  
 display: flex;  
 align-items: center;  
 justify-content: center;  
 font-size: 9.5px;  
 font-weight: 800;  
 color: #fff;  
 text-shadow: 0 1px 3px rgba(0,0,0,0.9);  
 }  
  
 .status-chips-wrap {  
 display: flex;  
 flex-wrap: wrap;  
 gap: 3px;  
 max-height: 18px;  
 overflow: hidden;  
 }  
 .status-badge {  
 font-size: 9.5px;  
 font-weight: 700;  
 padding: 1px 5px;  
 border-radius: 3px;  
 display: inline-flex;  
 align-items: center;  
 gap: 2px;  
 }  
 .status-shield { background: #1e3a8a; color: #93c5fd; border: 1px solid #3b82f6; }  
 .status-poison { background: #064e3b; color: #6ee7b7; border: 1px solid #10b981; }  
 .status-vuln { background: #7f1d1d; color: #fca5a5; border: 1px solid #ef4444; }  
 .status-weak { background: #581c87; color: #d8b4fe; border: 1px solid #a855f7; }  
 .status-bleed { background: #881337; color: #fda4af; border: 1px solid #f43f5e; }  
 .status-str { background: #78350f; color: #fde68a; border: 1px solid #f59e0b; }  
 .status-dodge { background: #0e7490; color: #a5f3fc; border: 1px solid #06b6d4; }  
  
 .qi-orb-container {  
 display: flex;  
 align-items: center;  
 gap: 6px;  
 }  
 .qi-orb-graphic {  
 width: 32px;  
 height: 32px;  
 border-radius: 10px;  
 background: radial-gradient(circle, #38bdf8 0%, #0369a1 80%);  
 border: 2px solid #e0f2fe;  
 box-shadow: 0 0 10px #38bdf8;  
 display: flex;  
 align-items: center;  
 justify-content: center;  
 font-size: 13px;  
 font-weight: 800;  
 color: #fff;  
 }  
 .potions-mini-tray {  
 display: flex;  
 gap: 6px;  
 }  
 .potion-click-btn {  
 background: #1e293b;  
 border: 1px solid #475569;  
 color: #fff;  
 padding: 3px 7px;  
 border-radius: 6px;  
 font-size: 10.5px;  
 font-weight: 700;  
 cursor: pointer;  
 transition: all 0.15s;  
 }  
 .potion-click-btn:hover {  
 border-color: var(--holy-bright);  
 background: #334155;  
 }  
 .btn-end-turn-modern {  
 background: linear-gradient(135deg, #b91c1c, #7f1d1d);  
 border: 1.5px solid #ef4444;  
 color: #fff;  
 padding: 6px 12px;  
 border-radius: 6px;  
 font-weight: 800;  
 font-size: 12.5px;  
 cursor: pointer;  
 box-shadow: 0 3px 8px rgba(0,0,0,0.5);  
 transition: all 0.2s;  
 }  
 .btn-end-turn-modern:hover:not(:disabled) {  
 filter: brightness(1.2);  
 transform: scale(1.03);  
 }  
 .btn-end-turn-modern:disabled {  
 opacity: 0.5;  
 cursor: not-allowed;  
 }  
  
 /* Hand Cards Tray */  
 .hand-cards-tray {  
 display: flex;  
 gap: 8px;  
 overflow-x: auto;  
 padding: 6px 4px 6px;  
 scrollbar-width: thin;  
 height: 156px;  
 min-height: 156px;  
 align-items: flex-start;  
 flex-shrink: 0;  
 }  
 .hand-cards-tray::-webkit-scrollbar { height: 4px; }  
 .hand-cards-tray::-webkit-scrollbar-thumb {  
 background: var(--border-blood);  
 border-radius: 2px;  
 }  
  
 
        /* High-Legibility Dark Occult Card Component */
        .card-item {
            width: 114px;
            min-width: 114px;
            height: 162px;
            background: linear-gradient(180deg, #18151f 0%, #0d0c11 100%);
            border: 2px solid #52525b;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.85);
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
            padding: 5px;
            cursor: pointer;
            position: relative;
            transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
            overflow: visible;
        }
        .card-item:hover {
            transform: translateY(-14px) scale(1.06);
            z-index: 30;
            box-shadow: 0 12px 25px rgba(0,0,0,0.95), 0 0 15px rgba(245, 158, 11, 0.8);
            border-color: var(--holy-bright);
        }
        .card-item.card-color-red {
            border-color: #991b1b;
            background: linear-gradient(180deg, #221215 0%, #0e090b 100%);
            box-shadow: 0 5px 15px rgba(0,0,0,0.85), inset 0 0 10px rgba(185, 28, 28, 0.25);
        }
        .card-item.card-color-green {
            border-color: #065f46;
            background: linear-gradient(180deg, #0e1e19 0%, #08110e 100%);
            box-shadow: 0 5px 15px rgba(0,0,0,0.85), inset 0 0 10px rgba(16, 185, 129, 0.25);
        }
        .card-item.card-color-blue {
            border-color: #1e40af;
            background: linear-gradient(180deg, #10192e 0%, #080d19 100%);
            box-shadow: 0 5px 15px rgba(0,0,0,0.85), inset 0 0 10px rgba(59, 130, 246, 0.25);
        }
        .card-item.card-color-purple {
            border-color: #6b21a8;
            background: linear-gradient(180deg, #1e112d 0%, #0f0718 100%);
            box-shadow: 0 5px 15px rgba(0,0,0,0.85), inset 0 0 10px rgba(168, 85, 247, 0.25);
        }
        .card-item.card-color-neutral {
            border-color: #854d0e;
            background: linear-gradient(180deg, #1c1813 0%, #0f0d0a 100%);
            box-shadow: 0 5px 15px rgba(0,0,0,0.85), inset 0 0 10px rgba(245, 158, 11, 0.2);
        }

        .card-cost-circle {
            position: absolute;
            top: -8px;
            left: -6px;
            width: 25px;
            height: 25px;
            border-radius: 10px;
            background: radial-gradient(circle, #38bdf8 0%, #0284c7 80%);
            border: 2px solid #e0f2fe;
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 900;
            font-size: 13.5px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.8), 0 0 8px rgba(56, 189, 248, 0.6);
            z-index: 10;
        }
        .card-upgrade-badge {
            position: absolute;
            top: -7px;
            right: -5px;
            background: #15803d;
            border: 1.5px solid #86efac;
            color: #fff;
            font-size: 9.5px;
            font-weight: 800;
            padding: 1px 5px;
            border-radius: 4px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.8);
            z-index: 10;
        }

        .card-header-bar {
            margin-left: 18px;
            margin-bottom: 4px;
            display: flex;
            align-items: center;
        }
        .card-title-text {
            font-size: 11px;
            font-weight: 800;
            color: #f8fafc;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            display: block;
            max-width: 86px;
            text-shadow: 0 1px 3px #000;
            letter-spacing: 0.2px;
        }

        .card-tags-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 4px;
            gap: 2px;
        }
        .card-tag-pill {
            font-size: 9px;
            font-weight: 700;
            padding: 2px 5px;
            border-radius: 4px;
            line-height: 1.2;
            white-space: nowrap;
        }
        .tag-atk { background: rgba(185, 28, 28, 0.35); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.5); }
        .tag-def { background: rgba(3, 105, 161, 0.35); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.5); }
        .tag-skill { background: rgba(109, 40, 217, 0.35); color: #d8b4fe; border: 1px solid rgba(168, 85, 247, 0.5); }

        .card-color-badge {
            font-size: 8.5px;
            font-weight: 700;
            color: #cbd5e1;
            white-space: nowrap;
        }

        .card-effect-desc {
            font-size: 10.5px;
            color: #e2e8f0;
            line-height: 1.4;
            background: rgba(0, 0, 0, 0.45);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 6px;
            padding: 5px 6px;
            font-weight: 500;
            flex: 1;
            overflow-y: auto;
            word-break: break-word;
            text-align: left;
        }
        .card-effect-desc b {
            font-weight: 800;
        }
  
  
 /* Combat Ticker - Clear, Multi-line, Highly Legible */  
 .combat-ticker-box {  
 background: rgba(0,0,0,0.85);  
 border: 1.5px solid #475569;  
 border-radius: 8px;  
 padding: 6px 14px;  
 font-size: 13px;  
 font-weight: 700;  
 color: #fef08a;  
 text-align: center;  
 min-height: 38px;  
 max-height: 54px;  
 display: flex;  
 align-items: center;  
 justify-content: center;  
 flex-shrink: 0;  
 overflow-y: auto;  
 line-height: 1.45;  
 box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);  
 }  
  
 /* Combat Potion Belt Bar */  
 .combat-potion-belt-bar {  
 display: flex;  
 align-items: center;  
 gap: 8px;  
 background: rgba(15, 23, 42, 0.92);  
 border: 1.5px solid #334155;  
 border-radius: 8px;  
 padding: 4px 10px;  
 margin: 3px 0 5px;  
 flex-shrink: 0;  
 box-shadow: 0 2px 8px rgba(0,0,0,0.6);  
 }  
 .potion-belt-label {  
 display: flex;  
 align-items: center;  
 gap: 4px;  
 font-size: 12px;  
 font-weight: 800;  
 color: #cbd5e1;  
 white-space: nowrap;  
 }  
 .potion-slots-scroll {  
 display: flex;  
 align-items: center;  
 gap: 8px;  
 flex: 1;  
 overflow-x: auto;  
 scrollbar-width: none;  
 }  
 .potion-slot-item {  
 display: flex;  
 align-items: center;  
 gap: 6px;  
 background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);  
 border: 1.5px solid #0284c7;  
 border-radius: 6px;  
 padding: 3px 9px;  
 cursor: pointer;  
 transition: all 0.15s ease;  
 box-shadow: 0 2px 6px rgba(0,0,0,0.5);  
 white-space: nowrap;  
 user-select: none;  
 }  
 .potion-slot-item:hover {  
 border-color: #38bdf8;  
 background: #1e3a8a;  
 transform: translateY(-2px);  
 box-shadow: 0 4px 10px rgba(56, 189, 248, 0.4);  
 }  
 .potion-slot-item .slot-icon {  
 font-size: 16px;  
 }  
 .potion-slot-item .slot-name {  
 font-size: 12px;  
 font-weight: 800;  
 color: #f0f9ff;  
 }  
 .potion-slot-item .slot-btn {  
 background: #0284c7;  
 color: #fff;  
 font-size: 10.5px;  
 font-weight: 800;  
 padding: 1.5px 7px;  
 border-radius: 4px;  
 border: none;  
 margin-left: 2px;  
 }  
 .potion-slot-empty {  
 display: flex;  
 align-items: center;  
 gap: 4px;  
 border: 1.5px dashed #475569;  
 border-radius: 6px;  
 padding: 3px 10px;  
 font-size: 11px;  
 color: #64748b;  
 white-space: nowrap;  
 }  
 .btn-open-bag-sm {  
 background: #1e293b;  
 border: 1px solid #475569;  
 color: #94a3b8;  
 font-size: 11px;  
 font-weight: 700;  
 padding: 3px 8px;  
 border-radius: 6px;  
 cursor: pointer;  
 transition: all 0.15s;  
 white-space: nowrap;  
 }  
 .btn-open-bag-sm:hover {  
 color: #f8fafc;  
 border-color: #38bdf8;  
 background: #334155;  
 }  
  
 /* Potion Bag Modal */  
 .potion-modal-card {  
 background: #111827;  
 border: 1.5px solid #374151;  
 border-radius: 8px;  
 padding: 10px 12px;  
 box-shadow: 0 4px 12px rgba(0,0,0,0.5);  
 }  
 .potion-modal-card:hover {  
 border-color: #0284c7;  
 }  
  
 /* Signature Visual FX Animations */  
 @keyframes blueFlameBurn {  
 0% { transform: translate(-50%, -50%) scale(0.6) translateY(20px); opacity: 0; filter: drop-shadow(0 0 5px #06b6d4); }  
 40% { transform: translate(-50%, -50%) scale(1.3) translateY(-10px); opacity: 1; filter: drop-shadow(0 0 25px #38bdf8) drop-shadow(0 0 45px #2563eb); }  
 100% { transform: translate(-50%, -50%) scale(1.5) translateY(-40px); opacity: 0; filter: drop-shadow(0 0 10px #60a5fa); }  
 }  
 .blue-flame-burst {  
 position: absolute;  
 top: 40%;  
 left: 50%;  
 transform: translate(-50%, -50%);  
 pointer-events: none;  
 z-index: 60;  
 font-size: 48px;  
 animation: blueFlameBurn 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;  
 }  
  
 @keyframes holyFoxAura {  
 0% { transform: translate(-50%, -50%) scale(0.6) rotate(-5deg); opacity: 0; filter: drop-shadow(0 0 10px #facc15); }  
 50% { transform: translate(-50%, -50%) scale(1.3) rotate(0deg); opacity: 1; filter: drop-shadow(0 0 35px #fde047) drop-shadow(0 0 55px #eab308); }  
 100% { transform: translate(-50%, -50%) scale(1.5) rotate(5deg); opacity: 0; filter: drop-shadow(0 0 15px #fef08a); }  
 }  
 .holy-fox-burst {  
 position: absolute;  
 top: 35%;  
 left: 50%;  
 transform: translate(-50%, -50%);  
 pointer-events: none;  
 z-index: 60;  
 font-size: 54px;  
 animation: holyFoxAura 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;  
 }  
  
 @keyframes holyCrossBeam {  
 0% { transform: translate(-50%, -50%) scale(0.5) translateY(-50px); opacity: 0; filter: drop-shadow(0 0 10px #38bdf8); }  
 50% { transform: translate(-50%, -50%) scale(1.3) translateY(0); opacity: 1; filter: drop-shadow(0 0 40px #facc15) drop-shadow(0 0 65px #fff); }  
 100% { transform: translate(-50%, -50%) scale(1.5) translateY(10px); opacity: 0; filter: drop-shadow(0 0 20px #eab308); }  
 }  
 .holy-cross-burst {  
 position: absolute;  
 top: 35%;  
 left: 50%;  
 transform: translate(-50%, -50%);  
 pointer-events: none;  
 z-index: 60;  
 font-size: 58px;  
 animation: holyCrossBeam 0.95s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;  
 }  
  
 @keyframes eldritchRift {  
 0% { transform: translate(-50%, -50%) scale(0.5) rotate(0deg); opacity: 0; filter: drop-shadow(0 0 10px #c084fc); }  
 50% { transform: translate(-50%, -50%) scale(1.35) rotate(180deg); opacity: 1; filter: drop-shadow(0 0 35px #a855f7) drop-shadow(0 0 50px #581c87); }  
 100% { transform: translate(-50%, -50%) scale(1.6) rotate(360deg); opacity: 0; filter: drop-shadow(0 0 15px #7e22ce); }  
 }  
 .eldritch-void-burst {  
 position: absolute;  
 top: 40%;  
 left: 50%;  
 transform: translate(-50%, -50%);  
 pointer-events: none;  
 z-index: 60;  
 font-size: 52px;  
 animation: eldritchRift 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;  
 }  
  
 /* Visual Novel Dialogue View */  
 #dialogue-view {  
 padding: 14px 12px;  
 background: radial-gradient(circle at 50% 30%, #171c26 0%, #07090e 100%);  
 flex-direction: column;  
 justify-content: flex-start;  
 gap: 12px;  
 overflow-y: auto;  
 }  
 .vn-stage-container {  
 display: flex;  
 gap: 12px;  
 align-items: flex-start;  
 margin-bottom: 8px;  
 flex-shrink: 0;  
 }  
 .vn-speaker-bust {  
 width: 100px;  
 height: 120px;  
 border-radius: 10px;  
 border: 2px solid var(--border-blood);  
 background: #090d16;  
 box-shadow: 0 4px 15px rgba(0,0,0,0.85);  
 overflow: hidden;  
 flex-shrink: 0;  
 display: flex;  
 align-items: center;  
 justify-content: center;  
 }  
 .vn-speaker-bust img, .vn-speaker-bust svg {  
 width: 100% !important;  
 height: 100% !important;  
 object-fit: cover !important;  
 display: block !important;  
 }  
 .vn-dialogue-card {  
 background: linear-gradient(180deg, #161e2a 0%, #0a0e16 100%);  
 border: 2px solid var(--border-blood);  
 border-radius: 10px;  
 padding: 10px 12px;  
 box-shadow: 0 6px 18px rgba(0,0,0,0.8);  
 display: flex;  
 flex-direction: column;  
 gap: 6px;  
 flex: 1;  
 }  
 .vn-speaker-nameplate {  
 background: linear-gradient(90deg, #991b1b, #450a0a);  
 color: #fff;  
 padding: 2px 10px;  
 border-radius: 4px;  
 font-size: 12px;  
 font-weight: 800;  
 border-left: 3px solid var(--holy-gold);  
 align-self: flex-start;  
 }  
 .vn-body-text {  
 font-size: 13px;  
 line-height: 1.5;  
 color: #e2e8f0;  
 max-height: 140px;  
 overflow-y: auto;  
 }  
 .dialogue-choices-tray {  
 display: flex;  
 flex-direction: column;  
 gap: 7px;  
 overflow-y: auto;  
 max-height: 280px;  
 padding: 4px 2px 8px;  
 }  
 .choice-btn-click {  
 background: #161f2e;  
 border: 1.5px solid #334155;  
 color: #f1f5f9;  
 padding: 8px 12px;  
 border-radius: 8px;  
 font-size: 12.5px;  
 font-weight: 600;  
 text-align: left;  
 cursor: pointer;  
 transition: all 0.2s;  
 }  
 .choice-btn-click:hover:not(:disabled) {  
 border-color: var(--blood-bright);  
 background: #253346;  
 transform: translateX(4px);  
 }  
 .choice-btn-click:disabled {  
 opacity: 0.45;  
 cursor: not-allowed;  
 border-color: #242f3d;  
 }  
  
 /* Shop Items */  
 .shop-item-btn {  
 display: flex;  
 flex-direction: column;  
 gap: 3px;  
 padding: 9px 12px;  
 text-align: left;  
 }  
 .shop-item-header {  
 display: flex;  
 justify-content: space-between;  
 align-items: center;  
 width: 100%;  
 font-weight: 700;  
 font-size: 13px;  
 color: var(--text-light);  
 }  
 .shop-price-badge {  
 background: rgba(245, 158, 11, 0.15);  
 border: 1px solid var(--holy-bright);  
 color: var(--holy-bright);  
 padding: 2px 8px;  
 border-radius: 12px;  
 font-size: 11px;  
 font-weight: 800;  
 white-space: nowrap;  
 }  
 .shop-item-desc {  
 font-size: 11.5px;  
 color: #94a3b8;  
 line-height: 1.4;  
 }  
  
   
/* Combat FX Overlay Layer - Persistent Across Combat Re-renders */  
 .combat-fx-overlay {  
 position: absolute;  
 inset: 0;  
 pointer-events: none;  
 z-index: 110;  
 overflow: hidden;  
 }  
 @keyframes slashSwipe {  
 0% { transform: scale(0.3) rotate(-35deg); opacity: 0; filter: drop-shadow(0 0 10px #f87171); }  
 30% { transform: scale(1.15) rotate(0deg); opacity: 1; filter: drop-shadow(0 0 25px #ef4444) drop-shadow(0 0 40px #fff); }  
 100% { transform: scale(1.35) rotate(15deg); opacity: 0; filter: drop-shadow(0 0 5px #dc2626); }  
 }  
 .slash-fx-item {  
 position: absolute;  
 width: 140px;  
 height: 140px;  
 transform-origin: center;  
 pointer-events: none;  
 animation: slashSwipe 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;  
 }  
 @keyframes blueFlameSurge {  
 0% { transform: scale(0.4) translateY(30px); opacity: 0; filter: drop-shadow(0 0 10px #06b6d4); }  
 40% { transform: scale(1.25) translateY(-10px); opacity: 1; filter: drop-shadow(0 0 35px #38bdf8) drop-shadow(0 0 60px #2563eb) drop-shadow(0 0 80px #0ea5e9); }  
 100% { transform: scale(1.45) translateY(-45px); opacity: 0; filter: drop-shadow(0 0 15px #60a5fa); }  
 }  
 .blue-flame-fx-item {  
 position: absolute;  
 width: 170px;  
 height: 170px;  
 transform-origin: center;  
 pointer-events: none;  
 display: flex;  
 flex-direction: column;  
 align-items: center;  
 justify-content: center;  
 animation: blueFlameSurge 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;  
 }  
 @keyframes holyFoxExpand {  
 0% { transform: translate(-50%, -50%) scale(0.4); opacity: 0; filter: drop-shadow(0 0 15px #facc15); }  
 40% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; filter: drop-shadow(0 0 45px #fde047) drop-shadow(0 0 70px #eab308); }  
 100% { transform: translate(-50%, -50%) scale(1.45); opacity: 0; filter: drop-shadow(0 0 20px #fef08a); }  
 }  
 .holy-fox-fx-item {  
 position: absolute;  
 top: 30%;  
 left: 50%;  
 width: 220px;  
 height: 180px;  
 pointer-events: none;  
 display: flex;  
 flex-direction: column;  
 align-items: center;  
 justify-content: center;  
 animation: holyFoxExpand 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;  
 }  
 @keyframes holyCrossDrop {  
 0% { transform: scale(0.5) translateY(-70px); opacity: 0; filter: drop-shadow(0 0 15px #38bdf8); }  
 45% { transform: scale(1.3) translateY(0); opacity: 1; filter: drop-shadow(0 0 45px #facc15) drop-shadow(0 0 80px #fff); }  
 100% { transform: scale(1.5) translateY(15px); opacity: 0; filter: drop-shadow(0 0 25px #eab308); }  
 }  
 .holy-cross-fx-item {  
 position: absolute;  
 width: 160px;  
 height: 180px;  
 transform-origin: center;  
 pointer-events: none;  
 display: flex;  
 flex-direction: column;  
 align-items: center;  
 justify-content: center;  
 animation: holyCrossDrop 0.95s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;  
 }  
 @keyframes eldritchSpin {  
 0% { transform: scale(0.4) rotate(0deg); opacity: 0; filter: drop-shadow(0 0 15px #c084fc); }  
 50% { transform: scale(1.3) rotate(180deg); opacity: 1; filter: drop-shadow(0 0 40px #a855f7) drop-shadow(0 0 65px #581c87); }  
 100% { transform: scale(1.6) rotate(360deg); opacity: 0; filter: drop-shadow(0 0 20px #7e22ce); }  
 }  
 .eldritch-fx-item {  
 position: absolute;  
 width: 160px;  
 height: 160px;  
 transform-origin: center;  
 pointer-events: none;  
 display: flex;  
 flex-direction: column;  
 align-items: center;  
 justify-content: center;  
 animation: eldritchSpin 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;  
 }  
 @keyframes shieldExpandRing {  
 0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; filter: drop-shadow(0 0 10px #38bdf8); }  
 40% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; filter: drop-shadow(0 0 35px #38bdf8) drop-shadow(0 0 60px #0284c7); }  
 100% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; filter: drop-shadow(0 0 15px #0369a1); }  
 }  
 .shield-fx-item {  
 position: absolute;  
 top: 50%;  
 left: 50%;  
 width: 170px;  
 height: 170px;  
 pointer-events: none;  
 display: flex;  
 flex-direction: column;  
 align-items: center;  
 justify-content: center;  
 animation: shieldExpandRing 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;  
 }  
 @keyframes skillQiRise {  
 0% { transform: translate(-50%, -50%) scale(0.6) translateY(20px); opacity: 0; filter: drop-shadow(0 0 10px #34d399); }  
 40% { transform: translate(-50%, -50%) scale(1.2) translateY(-10px); opacity: 1; filter: drop-shadow(0 0 30px #10b981) drop-shadow(0 0 50px #059669); }  
 100% { transform: translate(-50%, -50%) scale(1.4) translateY(-30px); opacity: 0; filter: drop-shadow(0 0 10px #047857); }  
 }  
 .skill-fx-item {  
 position: absolute;  
 top: 50%;  
 left: 50%;  
 width: 160px;  
 height: 160px;  
 pointer-events: none;  
 display: flex;  
 flex-direction: column;  
 align-items: center;  
 justify-content: center;  
 animation: skillQiRise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;  
 }  
 @keyframes arenaShake {  
 0% { transform: translate(0, 0); }  
 20% { transform: translate(-4px, 3px); }  
 40% { transform: translate(4px, -3px); }  
 60% { transform: translate(-3px, -2px); }  
 80% { transform: translate(3px, 2px); }  
 100% { transform: translate(0, 0); }  
 }  
 .arena-hit-shake {  
 animation: arenaShake 0.35s ease-out;  
 }  
  
 /* Modals & Popups */  
 .modal-backdrop-modern {  
 position: absolute;  
 top: 0; left: 0;  
 width: 100%;  
 height: 100%;  
 background: rgba(0, 0, 0, 0.88);  
 backdrop-filter: blur(4px);  
 z-index: 100;  
 display: flex;  
 align-items: center;  
 justify-content: center;  
 padding: 16px;  
 }  
 .modal-card-modern {  
 background: #111823;  
 border: 2px solid var(--border-blood);  
 border-radius: 12px;  
 padding: 18px;  
 width: 100%;  
 max-width: 440px;  
 box-shadow: 0 12px 35px rgba(0,0,0,0.95);  
 display: flex;  
 flex-direction: column;  
 gap: 12px;  
 max-height: 90%;  
 overflow: hidden;  
 }  
 .modal-title-modern {  
 font-size: 18px;  
 font-weight: 800;  
 color: var(--blood-bright);  
 text-align: center;  
 border-bottom: 1px solid #283344;  
 padding-bottom: 8px;  
 }  
  
 .modal-cards-scroll-grid {  
 display: grid;  
 grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));  
 gap: 10px;  
 overflow-y: auto;  
 padding: 8px 4px;  
 max-height: 380px;  
 }  
  
 .reward-card-chosen {  
 border: 3px solid #38bdf8 !important;  
 box-shadow: 0 0 18px rgba(56, 189, 248, 0.9), inset 0 0 8px rgba(56, 189, 248, 0.4) !important;  
 transform: translateY(-8px) scale(1.05) !important;  
 z-index: 30;  
 }  
 .card-item:active {  
 transform: scale(0.97);  
 }  
 @keyframes mistFloat {  
 0% { transform: translate(0, 0); opacity: 0.15; }  
 50% { transform: translate(15px, -8px); opacity: 0.35; }  
 100% { transform: translate(-10px, 5px); opacity: 0.15; }  
 }  
 .mist-fog-bg {  
 position: absolute;  
 top: 0; left: 0; width: 100%; height: 100%;  
 pointer-events: none;  
 background: radial-gradient(circle at 50% 60%, rgba(6, 182, 212, 0.1) 0%, transparent 70%);  
 animation: mistFloat 10s ease-in-out infinite alternate;  
 z-index: 1;  
 }  
 .reward-card-locked {  
 opacity: 0.35 !important;  
 filter: grayscale(0.8) !important;  
 pointer-events: none;  
 }  
  
 @keyframes hitShakeAnim {  
 0% { transform: translate(0, 0); }  
 20% { transform: translate(-6px, 4px); }  
 40% { transform: translate(6px, -4px); }  
 60% { transform: translate(-4px, -2px); }  
 80% { transform: translate(4px, 2px); }  
 100% { transform: translate(0, 0); }  
 }  
 .hit-shake {  
 animation: hitShakeAnim 0.35s ease-in-out;  
 }  
  
 .floater-num {  
 position: absolute;  
 font-size: 16px;  
 font-weight: 900;  
 text-shadow: 0 2px 4px rgba(0,0,0,0.95);  
 pointer-events: none;  
 animation: floatUpFade 0.85s forwards ease-out;  
 z-index: 50;  
 }  
 @keyframes floatUpFade {  
 0% { opacity: 1; transform: translateY(0) scale(1.1); }  
 100% { opacity: 0; transform: translateY(-36px) scale(1.3); }  
 }

/* =========================================================
   🎴 GRAND OCCULT LUXURY CARD UI (ดูแพง อลังการ คมชัด)
   ========================================================= */
.card-item {
    width: 124px !important;
    min-width: 124px !important;
    height: 182px !important;
    background: linear-gradient(165deg, #1c182b 0%, #100b19 45%, #08060d 100%) !important;
    border: 2px solid #b45309 !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.95), inset 0 0 10px rgba(245, 158, 11, 0.25) !important;
    flex-shrink: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 6px !important;
    cursor: pointer !important;
    position: relative !important;
    transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    overflow: visible !important;
    user-select: none !important;
    box-sizing: border-box !important;
}

.card-item:hover, .card-item:active {
    transform: translateY(-8px) scale(1.05) !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.98), 0 0 20px rgba(245, 158, 11, 0.6) !important;
    z-index: 45 !important;
}

/* Upgraded Gold Radiance */
.card-item.is-upgraded {
    border-color: #facc15 !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.95), 0 0 15px rgba(234, 179, 8, 0.55), inset 0 0 14px rgba(254, 240, 138, 0.3) !important;
}
.card-upgrade-badge {
    position: absolute !important;
    top: -8px !important;
    right: -4px !important;
    background: linear-gradient(135deg, #ca8a04, #eab308) !important;
    border: 1.5px solid #fef08a !important;
    color: #1e1b4b !important;
    font-size: 9px !important;
    font-weight: 900 !important;
    padding: 1.5px 6px !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.8), 0 0 10px rgba(250, 204, 21, 0.8) !important;
    z-index: 15 !important;
    letter-spacing: 0.3px !important;
}

/* School Color Variations */
.card-color-red {
    border-color: #dc2626 !important;
    background: linear-gradient(165deg, #2b1115 0%, #17090c 50%, #0d0406 100%) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.95), inset 0 0 12px rgba(239, 68, 68, 0.3) !important;
}
.card-color-red.is-upgraded {
    border-color: #f87171 !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.95), 0 0 16px rgba(239, 68, 68, 0.65), inset 0 0 14px rgba(254, 202, 202, 0.3) !important;
}

.card-color-green {
    border-color: #059669 !important;
    background: linear-gradient(165deg, #0e291f 0%, #081711 50%, #040d0a 100%) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.95), inset 0 0 12px rgba(16, 185, 129, 0.3) !important;
}
.card-color-green.is-upgraded {
    border-color: #34d399 !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.95), 0 0 16px rgba(16, 185, 129, 0.65), inset 0 0 14px rgba(167, 243, 208, 0.3) !important;
}

.card-color-blue {
    border-color: #2563eb !important;
    background: linear-gradient(165deg, #102142 0%, #091326 50%, #050a14 100%) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.95), inset 0 0 12px rgba(59, 130, 246, 0.3) !important;
}
.card-color-blue.is-upgraded {
    border-color: #60a5fa !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.95), 0 0 16px rgba(59, 130, 246, 0.65), inset 0 0 14px rgba(191, 219, 254, 0.3) !important;
}

.card-color-purple {
    border-color: #9333ea !important;
    background: linear-gradient(165deg, #241138 0%, #150921 50%, #0b0412 100%) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.95), inset 0 0 12px rgba(168, 85, 247, 0.3) !important;
}
.card-color-purple.is-upgraded {
    border-color: #c084fc !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.95), 0 0 16px rgba(168, 85, 247, 0.65), inset 0 0 14px rgba(233, 213, 255, 0.3) !important;
}

/* Glowing Crystal Energy Orb */
.card-cost-circle {
    position: absolute !important;
    top: -9px !important;
    left: -7px !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: radial-gradient(circle at 35% 35%, #38bdf8 0%, #0284c7 60%, #0c4a6e 100%) !important;
    border: 2px solid #fef08a !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 900 !important;
    font-size: 14.5px !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.85), 0 0 12px rgba(56, 189, 248, 0.9) !important;
    z-index: 15 !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9) !important;
}

.card-inner-frame {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

/* Card Header Ribbon */
.card-header-bar {
    margin-left: 20px !important;
    margin-bottom: 5px !important;
    display: flex !important;
    align-items: center !important;
    border-bottom: 1px solid rgba(245, 158, 11, 0.3) !important;
    padding-bottom: 2px !important;
}
.card-title-text {
    font-size: 12px !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: block !important;
    max-width: 92px !important;
    text-shadow: 0 1px 4px #000, 0 0 8px rgba(254, 240, 138, 0.4) !important;
    letter-spacing: 0.3px !important;
}

/* Tag & School Badges */
.card-tags-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 5px !important;
    gap: 2px !important;
}
.card-tag-pill {
    font-size: 9.5px !important;
    font-weight: 800 !important;
    padding: 2px 6px !important;
    border-radius: 6px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    letter-spacing: 0.3px !important;
}
.card-tag-pill.tag-atk {
    background: linear-gradient(135deg, rgba(185, 28, 28, 0.9), rgba(127, 29, 29, 0.9)) !important;
    border: 1px solid #f87171 !important;
    color: #fff !important;
}
.card-tag-pill.tag-def {
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.9), rgba(30, 58, 138, 0.9)) !important;
    border: 1px solid #60a5fa !important;
    color: #fff !important;
}
.card-tag-pill.tag-skill {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.9)) !important;
    border: 1px solid #34d399 !important;
    color: #fff !important;
}

.card-color-badge {
    font-size: 8.5px !important;
    font-weight: 800 !important;
    padding: 2px 5px !important;
    border-radius: 5px !important;
    background: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #fde047 !important;
    white-space: nowrap !important;
}

/* Card Effect Description Box (Parchment Inset) */
.card-effect-desc {
    font-size: 11px !important;
    color: #f1f5f9 !important;
    line-height: 1.48 !important;
    background: rgba(8, 12, 22, 0.92) !important;
    border: 1.5px solid rgba(245, 158, 11, 0.3) !important;
    border-radius: 8px !important;
    padding: 6px 7px !important;
    font-weight: 600 !important;
    flex: 1 !important;
    overflow-y: auto !important;
    word-break: break-word !important;
    text-align: left !important;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.7) !important;
}

/* Glowing Highlight Numbers inside Cards */
.num-dmg {
    color: #fbbf24 !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.8) !important;
    text-decoration: underline !important;
}
.num-dmg-buffed {
    color: #4ade80 !important;
    font-size: 14.5px !important;
    font-weight: 900 !important;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.9) !important;
    text-decoration: underline !important;
}
.num-dmg-weak {
    color: #fb923c !important;
    font-size: 13.5px !important;
    font-weight: 900 !important;
    text-shadow: 0 0 8px rgba(251, 146, 60, 0.7) !important;
}
.dmg-buff-badge {
    color: #86efac !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    text-shadow: 0 0 6px rgba(74, 222, 128, 0.8) !important;
}
.dmg-weak-badge {
    color: #fca5a5 !important;
    font-size: 11px !important;
    font-weight: 900 !important;
}
.num-shld {
    color: #38bdf8 !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.8) !important;
}
.num-heal {
    color: #4ade80 !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.8) !important;
}
.num-poison {
    color: #c084fc !important;
    font-size: 13px !important;
    font-weight: 900 !important;
}

/* Foe Signature Passive Chip in Pod */
.foe-passive-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    border: 1.5px solid rgba(245, 158, 11, 0.75);
    border-radius: 8px;
    padding: 2.5px 8px;
    font-size: 10.5px;
    font-weight: 800;
    color: #fde047;
    margin-bottom: 4px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.7), 0 0 8px rgba(245, 158, 11, 0.3);
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}
.foe-passive-chip:hover {
    border-color: #f59e0b;
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}

/* Enhanced Combat Slash & Flash FX */
.slash-fx-item {
    position: absolute;
    width: 160px;
    height: 160px;
    pointer-events: none;
    z-index: 80;
    animation: slashSwipeAnim 0.5s ease-out forwards;
}
@keyframes slashSwipeAnim {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6) rotate(-25deg); }
    30% { opacity: 1; transform: translate(-50%, -50%) scale(1.15) rotate(0deg); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.3) rotate(20deg); }
}

.blue-flame-fx-item {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 80;
    animation: blueFlameSurgeAnim 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes blueFlameSurgeAnim {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    40% { opacity: 1; transform: translate(-50%, -50%) scale(1.25); filter: drop-shadow(0 0 25px #38bdf8); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4) translateY(-30px); }
}


/* =========================================================
   📱 MOBILE-PERFECT RESPONSIVE POLISH (ZERO OVERLAP)
   ========================================================= */

/* Top Navigation Bar: Strictly 46px, Clean Single Line */
#top-nav-bar {
    height: 46px;
    max-height: 46px;
    background: linear-gradient(180deg, #18202d 0%, #090e16 100%);
    border-bottom: 1.5px solid var(--border-blood);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    z-index: 50;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.nav-profile-group {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
    flex-shrink: 1 !important;
    overflow: hidden !important;
}

.nav-profile-text-wrap {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-width: 0 !important;
    line-height: 1.15 !important;
    overflow: hidden !important;
}

.nav-hero-name {
    font-weight: 800 !important;
    font-size: 12px !important;
    color: var(--text-light) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.nav-act-floor {
    font-size: 10px !important;
    color: var(--holy-bright) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.avatar-circle-frame {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    border: 1.5px solid var(--holy-gold) !important;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4) !important;
    overflow: hidden !important;
    background: #090d16 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.nav-stats-tray {
    display: flex !important;
    align-items: center !important;
    gap: 3.5px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    flex-shrink: 0 !important;
}

.stat-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 2.5px !important;
    background: rgba(0, 0, 0, 0.6) !important;
    padding: 2.5px 5px !important;
    border-radius: 5px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    white-space: nowrap !important;
    font-size: 10.5px !important;
}

/* Relic Shelf Bar: Dedicated Row directly below Header, Never Collides */
#relic-shelf-bar {
    min-height: 26px !important;
    max-height: 26px !important;
    background: rgba(7, 10, 16, 0.96) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 2px 8px !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    scrollbar-width: none !important;
    z-index: 40 !important;
    clear: both !important;
    position: relative !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

.relic-chip {
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    background: rgba(24, 32, 48, 0.85) !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    padding: 1.5px 6px !important;
    border-radius: 4px !important;
    font-size: 10.5px !important;
    color: var(--text-light) !important;
    cursor: pointer !important;
}

/* Combat View Arena & Pod Structure */
#combat-view {
    padding: 4px 6px 4px;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.enemy-arena-area {
    flex: 1 1 auto !important;
    min-height: 180px !important;
    max-height: 230px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 2px 0 !important;
    position: relative !important;
    overflow: visible !important;
}

.enemy-group-tray {
    display: flex !important;
    gap: 8px !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    overflow: visible !important;
}

.foe-pod {
    background: rgba(17, 24, 36, 0.96) !important;
    border: 2px solid #334155 !important;
    border-radius: 14px !important;
    padding: 6px 8px 6px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    min-width: 135px !important;
    max-width: 165px !important;
    cursor: pointer !important;
    position: relative !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.85) !important;
    overflow: visible !important;
}

.foe-avatar-frame {
    width: 95px !important;
    height: 95px !important;
    border-radius: 12px !important;
    border: 2px solid var(--holy-gold) !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.6) !important;
    overflow: hidden !important;
    background: #090d16 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 2px 0 !important;
}

/* Prominent Enemy Intent Badge: Positioned at Top, Never Cut Off */
.intent-badge-prominent {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 3.5px 10px !important;
    border-radius: 12px !important;
    font-size: 11.5px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    margin: 2px auto 4px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8) !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    z-index: 10 !important;
    letter-spacing: 0.3px !important;
}
.intent-type-atk {
    background: linear-gradient(135deg, #dc2626, #991b1b) !important;
    border: 1.5px solid #f87171 !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6) !important;
}
.intent-type-def {
    background: linear-gradient(135deg, #1d4ed8, #1e3a8a) !important;
    border: 1.5px solid #60a5fa !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.6) !important;
}
.intent-type-buff {
    background: linear-gradient(135deg, #7e22ce, #581c87) !important;
    border: 1.5px solid #c084fc !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(192, 132, 252, 0.6) !important;
}
.intent-type-debuff {
    background: linear-gradient(135deg, #b45309, #78350f) !important;
    border: 1.5px solid #fbbf24 !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.6) !important;
}

/* Interactive Status Badges (Buffs & Debuffs) */
.foe-status-chips-wrap, #status-chips-hero {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3.5px !important;
    margin-top: 3px !important;
    min-height: 18px !important;
}

.status-badge-chip {
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
    padding: 1.5px 5.5px !important;
    border-radius: 6px !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    box-shadow: 0 1.5px 5px rgba(0,0,0,0.7) !important;
    transition: transform 0.15s ease-in-out !important;
    user-select: none !important;
}
.status-badge-chip:hover, .status-badge-chip:active {
    transform: scale(1.15) !important;
}
.status-badge-chip.chip-shield { background: rgba(30, 58, 138, 0.95) !important; border: 1px solid #60a5fa !important; color: #ffffff !important; }
.status-badge-chip.chip-poison { background: rgba(6, 78, 59, 0.95) !important; border: 1px solid #34d399 !important; color: #ffffff !important; }
.status-badge-chip.chip-vuln { background: rgba(120, 53, 15, 0.95) !important; border: 1px solid #fbbf24 !important; color: #ffffff !important; }
.status-badge-chip.chip-weak { background: rgba(136, 19, 55, 0.95) !important; border: 1px solid #f43f5e !important; color: #ffffff !important; }
.status-badge-chip.chip-bleed { background: rgba(127, 29, 29, 0.95) !important; border: 1px solid #f87171 !important; color: #ffffff !important; }
.status-badge-chip.chip-str { background: rgba(180, 83, 9, 0.95) !important; border: 1px solid #f59e0b !important; color: #ffffff !important; }
.status-badge-chip.chip-dodge { background: rgba(12, 74, 110, 0.95) !important; border: 1px solid #38bdf8 !important; color: #ffffff !important; }

/* Combat Hero Console: Tight, Clean & Mobile Ergonomic */
.combat-hero-console {
    background: linear-gradient(135deg, rgba(24, 32, 48, 0.98) 0%, rgba(11, 16, 26, 0.98) 100%) !important;
    border: 1.5px solid rgba(239, 68, 68, 0.5) !important;
    border-radius: 10px !important;
    padding: 4px 8px !important;
    margin: 3px 0 !important;
    height: 54px !important;
    min-height: 54px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
}

.hero-console-left {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex: 1.2 !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

.hero-vn-bust-container {
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    border: 1.5px solid var(--holy-gold) !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.hero-name-clean-stack {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    line-height: 1.15 !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

.combat-hero-clean-name {
    font-weight: 800 !important;
    font-size: 12.5px !important;
    color: var(--text-light) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.combat-hero-clean-title {
    font-size: 9.5px !important;
    color: var(--holy-bright) !important;
    font-weight: 600 !important;
    opacity: 0.95 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.hero-console-mid {
    flex-shrink: 0 !important;
}

.qi-orb-container {
    width: 38px !important;
    height: 38px !important;
}

.hero-console-right {
    flex-shrink: 0 !important;
}

.btn-end-turn-modern {
    padding: 6px 12px !important;
    font-size: 12.5px !important;
}

/* Combat Potion Belt Bar */
.combat-potion-belt-bar {
    height: 26px !important;
    padding: 2px 8px !important;
    margin: 2px 0 4px !important;
    flex-shrink: 0 !important;
}

/* Hand Cards Tray */
.hand-cards-tray {
    height: 184px !important;
    min-height: 184px !important;
    padding: 4px 6px !important;
    gap: 8px !important;
}

/* Hide the bottom ticker box completely */
.combat-ticker-box {
    display: none !important;
}


/* =========================================================
   👹 BALANCED & PRESTIGIOUS FOE POD (ศัตรูสมดุล คมชัด สวยสง่า)
   ========================================================= */
.enemy-arena-area {
    flex: 1 1 auto !important;
    min-height: 190px !important;
    max-height: 240px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px 0 !important;
    position: relative !important;
    overflow: visible !important;
}

.enemy-group-tray {
    display: flex !important;
    gap: 10px !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    overflow: visible !important;
    padding: 4px 6px !important;
}

.foe-pod {
    background: linear-gradient(180deg, rgba(20, 27, 40, 0.98) 0%, rgba(10, 14, 22, 0.98) 100%) !important;
    border: 2px solid rgba(239, 68, 68, 0.7) !important;
    border-radius: 14px !important;
    padding: 6px 8px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 165px !important;
    min-width: 155px !important;
    max-width: 180px !important;
    cursor: pointer !important;
    position: relative !important;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.9), 0 0 12px rgba(239, 68, 68, 0.25) !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

.foe-pod.boss-pod {
    border-color: #f59e0b !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.95), 0 0 18px rgba(245, 158, 11, 0.4) !important;
}

.foe-pod.targeted {
    border-color: #38bdf8 !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.95), 0 0 18px rgba(56, 189, 248, 0.6) !important;
}

/* Intent Badge: Crisp header inside pod */
.intent-badge-prominent {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    width: 100% !important;
    padding: 3px 6px !important;
    border-radius: 8px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-bottom: 3px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7) !important;
    position: static !important;
    box-sizing: border-box !important;
    letter-spacing: 0.2px !important;
}

/* Passive Chip */
.foe-passive-chip {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    width: 100% !important;
    background: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid rgba(245, 158, 11, 0.5) !important;
    border-radius: 6px !important;
    padding: 2px 4px !important;
    font-size: 9.5px !important;
    font-weight: 700 !important;
    color: #fde047 !important;
    margin-bottom: 4px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-sizing: border-box !important;
}

/* Avatar Frame */
.foe-avatar-frame {
    width: 100px !important;
    height: 100px !important;
    border-radius: 12px !important;
    border: 2px solid var(--holy-gold) !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.5) !important;
    overflow: hidden !important;
    background: #090d16 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 2px 0 3px !important;
}


/* =========================================================
   🎴 BALANCED LUXURY CARD PROPORTIONS (สมส่วน ไม่โล่งกลวง)
   ========================================================= */
.hand-cards-tray {
    height: 165px !important;
    min-height: 165px !important;
    max-height: 165px !important;
    display: flex !important;
    gap: 8px !important;
    padding: 4px 8px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    box-sizing: border-box !important;
}

.card-item {
    width: 114px !important;
    min-width: 114px !important;
    height: 156px !important;
    background: linear-gradient(165deg, #1d192c 0%, #110d1c 45%, #08060e 100%) !important;
    border: 1.5px solid #b45309 !important;
    border-radius: 10px !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.9), inset 0 0 8px rgba(245, 158, 11, 0.2) !important;
    flex-shrink: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 5px !important;
    cursor: pointer !important;
    position: relative !important;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    overflow: visible !important;
    user-select: none !important;
    box-sizing: border-box !important;
}

.card-item:hover, .card-item:active {
    transform: translateY(-8px) scale(1.04) !important;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.98), 0 0 16px rgba(245, 158, 11, 0.6) !important;
    z-index: 45 !important;
}

/* Card Header Bar */
.card-header-bar {
    margin-left: 18px !important;
    margin-bottom: 3px !important;
    display: flex !important;
    align-items: center !important;
    border-bottom: 1px solid rgba(245, 158, 11, 0.25) !important;
    padding-bottom: 1px !important;
}

.card-title-text {
    font-size: 11px !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: block !important;
    max-width: 86px !important;
    text-shadow: 0 1px 3px #000 !important;
}

/* Card Tags Row */
.card-tags-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 3px !important;
    gap: 2px !important;
}
.card-tag-pill {
    font-size: 8.5px !important;
    padding: 1.5px 5px !important;
}
.card-color-badge {
    font-size: 8px !important;
    padding: 1.5px 4px !important;
}

/* Card Effect Description Box: Perfectly Filled, No Giant Empty Void */
.card-effect-desc {
    font-size: 10.5px !important;
    color: #f1f5f9 !important;
    line-height: 1.4 !important;
    background: rgba(10, 14, 24, 0.94) radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.08) 0%, transparent 75%) !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    border-radius: 6px !important;
    padding: 5px 6px !important;
    font-weight: 600 !important;
    flex: 1 !important;
    overflow-y: auto !important;
    word-break: break-word !important;
    text-align: left !important;
    box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.8) !important;
}


/* Hero Console Zero Cutoff */
.hero-console-left {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex: 1.5 !important;
    min-width: 0 !important;
    overflow: hidden !important;
}
.combat-hero-clean-name {
    font-weight: 800 !important;
    font-size: 12.5px !important;
    color: var(--text-light) !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
}
.combat-hero-clean-title {
    font-size: 9.5px !important;
    color: var(--holy-bright) !important;
    font-weight: 600 !important;
    opacity: 0.95 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}


/* =========================================================
   🎯 COMBAT VIEW BALANCED SPACING & ENEMY TOP POSITIONING
   (ศัตรูอยู่ด้านบนเว้นระยะพอดี แผง Panel เว้นระยะห่างสมดุล)
   ========================================================= */

/* Combat Screen Container */


/* Enemy Arena: Sits gracefully in the upper half with clean top margin */
.enemy-arena-area {
    flex: 1 1 auto !important;
    min-height: 200px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important; /* Places enemy in upper section */
    padding-top: 14px !important;           /* Clean breathing room from top bar */
    padding-bottom: 6px !important;
    position: relative !important;
    overflow: visible !important;
}

.enemy-group-tray {
    display: flex !important;
    gap: 12px !important;
    justify-content: center !important;
    align-items: flex-start !important;
    width: 100% !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Foe Pod: Balanced frame */
.foe-pod {
    background: linear-gradient(180deg, rgba(20, 27, 40, 0.98) 0%, rgba(10, 14, 22, 0.98) 100%) !important;
    border: 2px solid rgba(239, 68, 68, 0.75) !important;
    border-radius: 14px !important;
    padding: 6px 10px 8px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 170px !important;
    min-width: 160px !important;
    max-width: 185px !important;
    cursor: pointer !important;
    position: relative !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.92), 0 0 14px rgba(239, 68, 68, 0.3) !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
}

/* Bottom Controls Section: Grouped cleanly with generous vertical spacing */
.combat-hero-console {
    background: linear-gradient(135deg, rgba(24, 32, 48, 0.98) 0%, rgba(11, 16, 26, 0.98) 100%) !important;
    border: 1.5px solid rgba(239, 68, 68, 0.5) !important;
    border-radius: 12px !important;
    padding: 4px 10px !important;
    margin: 8px 0 8px 0 !important; /* Clean 8px gap above and below */
    height: 54px !important;
    min-height: 54px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.7) !important;
}

/* Potion Belt Bar: Well-spaced gap from cards so energy orbs never collide */
.combat-potion-belt-bar {
    height: 28px !important;
    min-height: 28px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: rgba(15, 23, 42, 0.95) !important;
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    padding: 2px 10px !important;
    margin: 0 0 14px 0 !important; /* 14px space prevents card cost orbs from colliding! */
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6) !important;
    box-sizing: border-box !important;
}

/* Hand Cards Tray: Clean bottom docking */
.hand-cards-tray {
    height: 168px !important;
    min-height: 168px !important;
    max-height: 168px !important;
    display: flex !important;
    gap: 8px !important;
    padding: 4px 6px 6px 6px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    box-sizing: border-box !important;
    margin-bottom: 2px !important;
}


/* =========================================================
   💎 100% UNCLIPPED RADIANT CARD ENERGY COST ORB
   ========================================================= */
.card-cost-circle {
    position: absolute !important;
    top: 2px !important;
    left: 2px !important;
    width: 25px !important;
    height: 25px !important;
    border-radius: 50% !important;
    background: radial-gradient(circle at 35% 35%, #38bdf8 0%, #0284c7 60%, #0c4a6e 100%) !important;
    border: 1.5px solid #fef08a !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 900 !important;
    font-size: 13.5px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.85), 0 0 10px rgba(56, 189, 248, 0.9) !important;
    z-index: 15 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9) !important;
}

.card-header-bar {
    margin-left: 24px !important;
    margin-bottom: 3px !important;
    display: flex !important;
    align-items: center !important;
    border-bottom: 1px solid rgba(245, 158, 11, 0.25) !important;
    padding-bottom: 1px !important;
}

.hand-cards-tray {
    height: 168px !important;
    min-height: 168px !important;
    max-height: 168px !important;
    display: flex !important;
    gap: 8px !important;
    padding: 6px 8px 6px 8px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    box-sizing: border-box !important;
    margin-bottom: 2px !important;
}


/* =========================================================
   👹 ADAPTIVE ENEMY ARENA (อยู่ด้านบน ขยายใหญ่ถ้ามีตัวเดียว แบ่งซ้ายขวาถ้ามีหลายตัว)
   ========================================================= */

/* Combat Screen Container: Flex column aligned from top */
#combat-view {
    display: none !important;
    width: 100% !important;
    height: 100% !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    padding: 0 8px 4px 8px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

#combat-view.active-screen {
    display: flex !important;
}

/* Enemy Arena Area: Sits right below top bar with pleasant 10px spacing */
.enemy-arena-area {
    flex: 1 1 auto !important;
    min-height: 210px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important; /* Forces enemy to top area! */
    padding-top: 10px !important;            /* Clean 10px spacing from top bar */
    padding-bottom: 6px !important;
    position: relative !important;
    overflow: visible !important;
}

.enemy-group-tray {
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    width: 100% !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* --- CASE 1: SINGLE ENEMY (ขยายภาพใหญ่ขึ้น สวยอลังการ บรรทัดข้อความชัดเจน) --- */
.enemy-group-tray.single-enemy {
    justify-content: center !important;
}

.enemy-group-tray.single-enemy .foe-pod {
    width: 220px !important;
    min-width: 210px !important;
    max-width: 240px !important;
    padding: 8px 12px 10px !important;
    border: 2px solid rgba(239, 68, 68, 0.8) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.95), 0 0 16px rgba(239, 68, 68, 0.35) !important;
    margin: 0 auto !important;
}

.enemy-group-tray.single-enemy .foe-avatar-frame {
    width: 135px !important;
    height: 135px !important;
    border-radius: 14px !important;
    border: 2.5px solid var(--holy-gold) !important;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.6) !important;
    margin: 4px auto 6px !important;
}

.enemy-group-tray.single-enemy .intent-badge-prominent {
    font-size: 12px !important;
    padding: 4px 10px !important;
    width: 100% !important;
}

.enemy-group-tray.single-enemy .foe-passive-chip {
    font-size: 10.5px !important;
    padding: 3px 8px !important;
    width: 100% !important;
}

.enemy-group-tray.single-enemy .foe-name-text {
    font-size: 13.5px !important;
    font-weight: 800 !important;
}

/* --- CASE 2: TWO ENEMIES (แบ่งซ้ายและขวาให้ใหญ่พอดีโดยอัตโนมัติ) --- */
.enemy-group-tray.two-enemies {
    display: flex !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
}

.enemy-group-tray.two-enemies .foe-pod {
    flex: 1 1 0 !important;
    width: calc(50% - 4px) !important;
    min-width: 145px !important;
    max-width: 175px !important;
    padding: 6px 8px 8px !important;
    border: 1.5px solid rgba(239, 68, 68, 0.75) !important;
    border-radius: 14px !important;
}

.enemy-group-tray.two-enemies .foe-avatar-frame {
    width: 90px !important;
    height: 90px !important;
    border-radius: 10px !important;
    margin: 3px auto 4px !important;
}

.enemy-group-tray.two-enemies .intent-badge-prominent {
    font-size: 10.5px !important;
    padding: 2.5px 6px !important;
    width: 100% !important;
}

.enemy-group-tray.two-enemies .foe-passive-chip {
    font-size: 9px !important;
    padding: 2px 5px !important;
    width: 100% !important;
}

.enemy-group-tray.two-enemies .foe-name-text {
    font-size: 11.5px !important;
}

/* --- CASE 3: THREE OR MORE ENEMIES --- */
.enemy-group-tray.multi-enemies {
    display: flex !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 100% !important;
}

.enemy-group-tray.multi-enemies .foe-pod {
    flex: 1 1 0 !important;
    min-width: 105px !important;
    max-width: 120px !important;
    padding: 4px 6px !important;
}

.enemy-group-tray.multi-enemies .foe-avatar-frame {
    width: 68px !important;
    height: 68px !important;
    margin: 2px auto !important;
}

.enemy-group-tray.multi-enemies .intent-badge-prominent {
    font-size: 9.5px !important;
    padding: 2px 4px !important;
}

.enemy-group-tray.multi-enemies .foe-name-text {
    font-size: 10.5px !important;
}

/* Foe Name & Lore Row: Clean Single Line Alignment */
.foe-name-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin: 3px 0 2px !important;
    gap: 4px !important;
}

.foe-name-text {
    color: var(--text-light) !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex: 1 !important;
    text-align: left !important;
}

.btn-lore-trigger {
    background: rgba(30, 41, 59, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #93c5fd !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 2px 6px !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.btn-lore-trigger:hover {
    background: rgba(51, 65, 85, 0.95) !important;
    color: #fff !important;
}

/* Docked Bottom Controls: Clean & Ergonomic Spacing */
.combat-hero-console {
    background: linear-gradient(135deg, rgba(24, 32, 48, 0.98) 0%, rgba(11, 16, 26, 0.98) 100%) !important;
    border: 1.5px solid rgba(239, 68, 68, 0.5) !important;
    border-radius: 12px !important;
    padding: 4px 10px !important;
    margin: 6px 0 6px 0 !important;
    height: 54px !important;
    min-height: 54px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.7) !important;
}

.combat-potion-belt-bar {
    height: 28px !important;
    min-height: 28px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: rgba(15, 23, 42, 0.95) !important;
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    padding: 2px 10px !important;
    margin: 0 0 12px 0 !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6) !important;
    box-sizing: border-box !important;
}

.hand-cards-tray {
    height: 168px !important;
    min-height: 168px !important;
    max-height: 168px !important;
    display: flex !important;
    gap: 8px !important;
    padding: 6px 8px 6px 8px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    box-sizing: border-box !important;
    margin-bottom: 2px !important;
}


/* =========================================================
   🎯 DEFINITIVE COMBAT 3-TIER BALANCED LAYOUT
   Tier 1 (Top): ศัตรูอยู่ด้านบน
   Tier 2 (Lower-Mid): ตัวละครเราอยู่ตรงกลางเกือบล่าง
   Tier 3 (Bottom): ไพ่อยู่ด้านล่างสุด
   ========================================================= */

/* Combat Container: Flex column filling 100% height */
#combat-view {
    display: none !important;
    width: 100% !important;
    height: 100% !important;
    flex-direction: column !important;
    justify-content: space-between !important; /* Perfect 3-tier distribution */
    padding: 2px 8px 4px 8px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    position: relative !important;
}

#combat-view.active-screen {
    display: flex !important;
}

/* Tier 1: Enemy Arena Area (อยู่ด้านบน เว้นระยะห่างนิดหน่อย) */
.enemy-arena-area {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important; /* Top aligned */
    padding-top: 8px !important;            /* Pleasant small top gap */
    padding-bottom: 4px !important;
    position: relative !important;
    overflow: visible !important;
    z-index: 10 !important;
}

.enemy-group-tray {
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    width: 100% !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Single Enemy: Grand & Majestic */
.enemy-group-tray.single-enemy .foe-pod {
    width: 220px !important;
    min-width: 210px !important;
    max-width: 240px !important;
    padding: 6px 10px 8px !important;
    border: 2px solid rgba(239, 68, 68, 0.8) !important;
    border-radius: 14px !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.95), 0 0 14px rgba(239, 68, 68, 0.35) !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

.enemy-group-tray.single-enemy .foe-avatar-frame {
    width: 125px !important;
    height: 125px !important;
    border-radius: 12px !important;
    border: 2px solid var(--holy-gold) !important;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.6) !important;
    margin: 3px auto 5px !important;
}

/* Two Enemies: Split Left and Right Automatically */
.enemy-group-tray.two-enemies {
    display: flex !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
}

.enemy-group-tray.two-enemies .foe-pod {
    flex: 1 1 0 !important;
    width: calc(50% - 4px) !important;
    min-width: 145px !important;
    max-width: 175px !important;
    padding: 5px 6px 6px !important;
    border: 1.5px solid rgba(239, 68, 68, 0.75) !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
}

.enemy-group-tray.two-enemies .foe-avatar-frame {
    width: 85px !important;
    height: 85px !important;
    border-radius: 10px !important;
    margin: 2px auto 3px !important;
}

/* Tier 2: Hero Console & Potion Belt (ตัวละครเราอยู่ตรงกลางเกือบล่าง) */
.combat-hero-console {
    background: linear-gradient(135deg, rgba(24, 32, 48, 0.98) 0%, rgba(11, 16, 26, 0.98) 100%) !important;
    border: 1.5px solid rgba(239, 68, 68, 0.5) !important;
    border-radius: 12px !important;
    padding: 4px 10px !important;
    margin: 4px 0 4px 0 !important;
    height: 52px !important;
    min-height: 52px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.7) !important;
    position: relative !important;
    z-index: 25 !important;
    pointer-events: auto !important;
}

.btn-end-turn-modern {
    background: linear-gradient(135deg, #b91c1c, #7f1d1d) !important;
    border: 1.5px solid #ef4444 !important;
    color: #ffffff !important;
    padding: 6px 14px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 30 !important;
    pointer-events: auto !important;
    user-select: none !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4) !important;
}

.btn-end-turn-modern:active {
    transform: scale(0.96) !important;
}

.combat-potion-belt-bar {
    height: 28px !important;
    min-height: 28px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: rgba(15, 23, 42, 0.95) !important;
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    padding: 2px 10px !important;
    margin: 0 0 6px 0 !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6) !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 25 !important;
    pointer-events: auto !important;
}

/* Tier 3: Hand Cards Tray (ไพ่อื่นด้านล่างสุด) */
.hand-cards-tray {
    height: 164px !important;
    min-height: 164px !important;
    max-height: 164px !important;
    display: flex !important;
    gap: 8px !important;
    padding: 4px 6px 4px 6px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    box-sizing: border-box !important;
    margin-top: 0 !important;
    margin-bottom: 2px !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 25 !important;
    pointer-events: auto !important;
}

/* Card Interaction: 100% Clickable & Responsive */
.card-item {
    width: 114px !important;
    min-width: 114px !important;
    height: 154px !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 26 !important;
    pointer-events: auto !important;
    user-select: none !important;
}

/* Ensure inner card elements do NOT intercept touches or block clicks */
.card-inner-frame,
.card-header-bar,
.card-title-text,
.card-tags-row,
.card-tag-pill,
.card-color-badge,
.card-effect-desc,
.card-shine-effect {
    pointer-events: none !important;
}

/* Combat FX Overlay must NEVER block pointer events */
.combat-fx-overlay {
    pointer-events: none !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 5 !important; /* Behind UI controls */
}


/* Blue Fire Status Chip */
.chip-bluefire {
    background: rgba(2, 132, 199, 0.3) !important;
    border: 1.5px solid #38bdf8 !important;
    color: #bae6fd !important;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.4) !important;
}

/* Instant Mobile Touch Response */
.card-item,
.btn-end-turn-modern {
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
}


/* =========================================================
   ✨ CINEMATIC TOP-LAYER COMBAT FX ENGINE (z-index: 95)
   อยู่บนสุดเหนือศัตรู 100% ไม่โดนบัง พร้อมเอฟเฟกต์ค้างให้นานจุใจ
   ========================================================= */

/* Combat FX Overlay: Topmost layer inside combat-view, pointer-events pass-through */
.combat-fx-overlay {
    pointer-events: none !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 95 !important; /* อยู่เหนือศัตรู (z-index 10) และแผงตัวละคร (z-index 25-30) อย่างเด็ดขาด */
    overflow: hidden !important;
}

/* Universal FX Tags & Badges */
.fx-title-tag {
    font-size: 13px !important;
    font-weight: 900 !important;
    padding: 3px 14px !important;
    border-radius: 12px !important;
    white-space: nowrap !important;
    margin-top: 4px !important;
    pointer-events: none !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.8) !important;
}
.tag-slash {
    background: rgba(185, 28, 28, 0.95) !important;
    color: #fef2f2 !important;
    border: 1.5px solid #ef4444 !important;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.8) !important;
}
.tag-blueflame {
    background: rgba(2, 132, 199, 0.95) !important;
    color: #e0f2fe !important;
    border: 1.5px solid #38bdf8 !important;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.85) !important;
}
.tag-holyfox {
    background: rgba(180, 83, 9, 0.95) !important;
    color: #fef08a !important;
    border: 1.5px solid #facc15 !important;
    box-shadow: 0 0 18px rgba(250, 204, 21, 0.85) !important;
}
.tag-holycross {
    background: rgba(153, 27, 27, 0.95) !important;
    color: #fffde7 !important;
    border: 1.5px solid #f59e0b !important;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.9) !important;
}
.tag-eldritch {
    background: rgba(88, 28, 135, 0.95) !important;
    color: #f3e8ff !important;
    border: 1.5px solid #c084fc !important;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.85) !important;
}
.tag-shield {
    background: rgba(3, 105, 161, 0.95) !important;
    color: #f0f9ff !important;
    border: 1.5px solid #38bdf8 !important;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.85) !important;
}
.tag-skill {
    background: rgba(4, 120, 87, 0.95) !important;
    color: #ecfdf5 !important;
    border: 1.5px solid #34d399 !important;
    box-shadow: 0 0 18px rgba(52, 211, 153, 0.85) !important;
}

/* 1. Slash FX (มีดหมอ / ดาบฟัน) - อยู่ยาว 1.3s ไม่หายเร็ว */
.slash-fx-item {
    position: absolute !important;
    width: 170px !important;
    height: 170px !important;
    pointer-events: none !important;
    z-index: 96 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    animation: slashLingeringSwipe 1.3s cubic-bezier(0.15, 0.85, 0.25, 1) forwards !important;
}
.fx-sparks-burst {
    position: absolute !important;
    top: 36% !important;
    left: 40% !important;
    font-size: 42px !important;
    filter: drop-shadow(0 0 15px #f59e0b) drop-shadow(0 0 30px #ef4444) !important;
    animation: sparkPulse 1.3s ease-out forwards !important;
}
@keyframes slashLingeringSwipe {
    0% { transform: translate(-50%, -50%) scale(0.4) rotate(-30deg); opacity: 0; filter: drop-shadow(0 0 15px #f87171); }
    18% { transform: translate(-50%, -50%) scale(1.15) rotate(0deg); opacity: 1; filter: drop-shadow(0 0 35px #ef4444) drop-shadow(0 0 60px #fff); }
    65% { transform: translate(-50%, -50%) scale(1.18) rotate(5deg); opacity: 0.95; filter: drop-shadow(0 0 25px #dc2626); }
    100% { transform: translate(-50%, -50%) scale(1.35) rotate(15deg); opacity: 0; filter: drop-shadow(0 0 5px #b91c1c); }
}
@keyframes sparkPulse {
    0% { transform: scale(0.5); opacity: 0; }
    20% { transform: scale(1.3); opacity: 1; }
    70% { transform: scale(1.1); opacity: 0.9; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* 2. Blue Flame FX (มีดเหล็กไหลเพลิงฟ้า) - อยู่ยาว 1.45s เผาผลาญท่วมตัว */
.blue-flame-fx-item {
    position: absolute !important;
    width: 180px !important;
    height: 180px !important;
    pointer-events: none !important;
    z-index: 96 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    animation: blueFlameLingeringSurge 1.45s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important;
}
.blue-flame-core {
    font-size: 72px !important;
    filter: drop-shadow(0 0 30px #38bdf8) drop-shadow(0 0 65px #2563eb) drop-shadow(0 0 90px #0284c7) !important;
    margin-top: -35px !important;
    animation: flameBobbing 1.45s ease-in-out infinite alternate !important;
}
@keyframes blueFlameLingeringSurge {
    0% { transform: translate(-50%, -50%) scale(0.4) translateY(35px); opacity: 0; filter: drop-shadow(0 0 15px #06b6d4); }
    22% { transform: translate(-50%, -50%) scale(1.28) translateY(-10px); opacity: 1; filter: drop-shadow(0 0 45px #38bdf8) drop-shadow(0 0 75px #2563eb); }
    68% { transform: translate(-50%, -50%) scale(1.22) translateY(-15px); opacity: 0.95; filter: drop-shadow(0 0 35px #38bdf8); }
    100% { transform: translate(-50%, -50%) scale(1.45) translateY(-50px); opacity: 0; filter: drop-shadow(0 0 10px #60a5fa); }
}
@keyframes flameBobbing {
    0% { transform: scale(1) rotate(-3deg); }
    100% { transform: scale(1.12) rotate(3deg); }
}

/* 3. Holy Fox FX (ยันต์จิ้งจอกเก้าหางศักดิ์สิทธิ์) - อยู่ยาว 1.45s ส่องแสงสว่างเจิดจ้า */
.holy-fox-fx-item {
    position: absolute !important;
    width: 220px !important;
    height: 200px !important;
    pointer-events: none !important;
    z-index: 96 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    animation: holyFoxLingeringExpand 1.45s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important;
}
.holy-fox-spirit-wrap {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.holy-fox-icon {
    font-size: 78px !important;
    filter: drop-shadow(0 0 35px #facc15) drop-shadow(0 0 75px #eab308) drop-shadow(0 0 100px #ca8a04) !important;
    animation: foxShimmer 1.45s ease-in-out infinite alternate !important;
}
.holy-fox-tails-halo {
    position: absolute !important;
    font-size: 24px !important;
    display: flex !important;
    gap: 8px !important;
    bottom: -10px !important;
}
@keyframes holyFoxLingeringExpand {
    0% { transform: translate(-50%, -50%) scale(0.4); opacity: 0; filter: drop-shadow(0 0 15px #facc15); }
    22% { transform: translate(-50%, -50%) scale(1.22); opacity: 1; filter: drop-shadow(0 0 50px #fde047) drop-shadow(0 0 85px #eab308); }
    68% { transform: translate(-50%, -50%) scale(1.18); opacity: 0.95; filter: drop-shadow(0 0 40px #facc15); }
    100% { transform: translate(-50%, -50%) scale(1.45); opacity: 0; filter: drop-shadow(0 0 20px #fef08a); }
}

/* 4. Holy Cross FX (ทัณฑ์พิพากษากางเขนวาติกัน) - อยู่ยาว 1.5s ดั่งสายฟ้าสวรรค์ฟาด */
.holy-cross-fx-item {
    position: absolute !important;
    width: 180px !important;
    height: 220px !important;
    pointer-events: none !important;
    z-index: 96 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    animation: holyCrossLingeringDrop 1.5s cubic-bezier(0.18, 0.88, 0.22, 1) forwards !important;
}
.holy-cross-symbol {
    font-size: 80px !important;
    filter: drop-shadow(0 0 30px #facc15) drop-shadow(0 0 70px #fff) drop-shadow(0 0 100px #f59e0b) !important;
}
.holy-cross-pillar {
    position: absolute !important;
    top: -50px !important;
    width: 6px !important;
    height: 120px !important;
    background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(250,204,21,0.8), transparent) !important;
    filter: drop-shadow(0 0 15px #fff) !important;
}
@keyframes holyCrossLingeringDrop {
    0% { transform: translate(-50%, -50%) scale(0.4) translateY(-85px); opacity: 0; filter: drop-shadow(0 0 20px #38bdf8); }
    22% { transform: translate(-50%, -50%) scale(1.3) translateY(0); opacity: 1; filter: drop-shadow(0 0 50px #facc15) drop-shadow(0 0 90px #fff); }
    70% { transform: translate(-50%, -50%) scale(1.24) translateY(5px); opacity: 0.95; filter: drop-shadow(0 0 40px #f59e0b); }
    100% { transform: translate(-50%, -50%) scale(1.5) translateY(25px); opacity: 0; filter: drop-shadow(0 0 25px #d97706); }
}

/* 5. Eldritch Void FX (ลำแสงเนโครโนมิคอนมิติพิศวง) - อยู่ยาว 1.45s หลุมดำบิดมิติ */
.eldritch-fx-item {
    position: absolute !important;
    width: 180px !important;
    height: 180px !important;
    pointer-events: none !important;
    z-index: 96 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    animation: eldritchLingeringSpin 1.45s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important;
}
.eldritch-eye {
    font-size: 74px !important;
    filter: drop-shadow(0 0 30px #a855f7) drop-shadow(0 0 65px #581c87) drop-shadow(0 0 95px #3b0764) !important;
}
.eldritch-particles {
    font-size: 26px !important;
    letter-spacing: 4px !important;
    margin-top: -15px !important;
}
@keyframes eldritchLingeringSpin {
    0% { transform: translate(-50%, -50%) scale(0.4) rotate(0deg); opacity: 0; filter: drop-shadow(0 0 15px #c084fc); }
    25% { transform: translate(-50%, -50%) scale(1.3) rotate(90deg); opacity: 1; filter: drop-shadow(0 0 45px #a855f7) drop-shadow(0 0 75px #581c87); }
    70% { transform: translate(-50%, -50%) scale(1.22) rotate(180deg); opacity: 0.95; filter: drop-shadow(0 0 35px #9333ea); }
    100% { transform: translate(-50%, -50%) scale(1.6) rotate(360deg); opacity: 0; filter: drop-shadow(0 0 20px #6b21a8); }
}

/* 6. Shield & Skill FX (เกราะ & วิชาอาคม) - อยู่ยาว 1.35s ม่านมนตรามั่นคง */
.shield-fx-item {
    position: absolute !important;
    width: 180px !important;
    height: 180px !important;
    pointer-events: none !important;
    z-index: 96 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    animation: shieldLingeringExpand 1.35s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important;
}
.shield-barrier-icon {
    font-size: 74px !important;
    filter: drop-shadow(0 0 30px #38bdf8) drop-shadow(0 0 60px #0284c7) !important;
}
@keyframes shieldLingeringExpand {
    0% { transform: translate(-50%, -50%) scale(0.4); opacity: 0; filter: drop-shadow(0 0 15px #38bdf8); }
    22% { transform: translate(-50%, -50%) scale(1.22); opacity: 1; filter: drop-shadow(0 0 40px #38bdf8) drop-shadow(0 0 70px #0284c7); }
    70% { transform: translate(-50%, -50%) scale(1.18); opacity: 0.95; }
    100% { transform: translate(-50%, -50%) scale(1.42); opacity: 0; filter: drop-shadow(0 0 15px #0369a1); }
}

.skill-fx-item {
    position: absolute !important;
    width: 180px !important;
    height: 180px !important;
    pointer-events: none !important;
    z-index: 96 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    animation: skillLingeringRise 1.35s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important;
}
.skill-qi-icon {
    font-size: 70px !important;
    filter: drop-shadow(0 0 30px #34d399) drop-shadow(0 0 55px #059669) !important;
}
@keyframes skillLingeringRise {
    0% { transform: translate(-50%, -50%) scale(0.5) translateY(25px); opacity: 0; filter: drop-shadow(0 0 15px #34d399); }
    22% { transform: translate(-50%, -50%) scale(1.22) translateY(-8px); opacity: 1; filter: drop-shadow(0 0 35px #10b981) drop-shadow(0 0 60px #059669); }
    70% { transform: translate(-50%, -50%) scale(1.18) translateY(-14px); opacity: 0.95; }
    100% { transform: translate(-50%, -50%) scale(1.42) translateY(-40px); opacity: 0; filter: drop-shadow(0 0 10px #047857); }
}
