/* ==========================================================================
   INTERACTIVE COMBAT GUIDE / BATTLE MINI-WIKI (HOW TO PLAY)
   ========================================================================== */

.battle-guide-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.battle-guide-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.battle-guide-card {
    width: 100%;
    max-width: 890px;
    height: 90vh;
    max-height: 850px;
    background: #0b1120;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 24px;
    box-shadow: 0 25px 65px -12px rgba(0, 0, 0, 0.9), 0 0 50px rgba(56, 189, 248, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transform: scale(0.97) translateY(8px);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.battle-guide-backdrop.is-open .battle-guide-card {
    transform: scale(1) translateY(0);
}

/* Header */
.battle-guide-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 14px 24px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    background: rgba(15, 23, 42, 0.85);
    flex-shrink: 0;
}

.battle-guide-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.battle-guide-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(99, 102, 241, 0.25));
    border: 1px solid rgba(56, 189, 248, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

.battle-guide-icon-badge svg {
    width: 20px;
    height: 20px;
}

.battle-guide-header-title {
    margin: 0;
    font-family: 'Unbounded', sans-serif;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.battle-guide-header-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 9999px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.battle-guide-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(71, 85, 105, 0.5);
    color: #94a3b8;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.battle-guide-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
    transform: scale(1.05);
}

/* Nav Tabs: horizontal scroll with visible scrollbar and mouse-wheel horizontal panning */
.battle-guide-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px 12px 20px;
    background: rgba(11, 17, 32, 0.95);
    border-bottom: 1px solid rgba(51, 65, 85, 0.4);
    overflow-x: auto;
    overflow-y: hidden;
    flex-shrink: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.45) rgba(15, 23, 42, 0.7);
}

.battle-guide-tabs::-webkit-scrollbar {
    height: 5px;
}

.battle-guide-tabs::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.7);
    border-radius: 4px;
}

.battle-guide-tabs::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.45);
    border-radius: 4px;
}

.battle-guide-tabs::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.75);
}

.guide-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid rgba(51, 65, 85, 0.5);
    color: #94a3b8;
    font-family: 'Unbounded', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    outline: none;
}

.guide-tab-btn:focus:not(:focus-visible) {
    outline: none;
}

.guide-tab-btn:hover {
    background: rgba(51, 65, 85, 0.65);
    color: #e2e8f0;
    border-color: rgba(100, 116, 139, 0.6);
}

.guide-tab-btn.is-active {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(99, 102, 241, 0.25));
    border-color: #38bdf8;
    color: #f8fafc;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

.guide-tab-btn .tab-icon-svg {
    width: 14px;
    height: 14px;
    display: inline-flex;
}

/* Main Content Area */
.battle-guide-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 22px 26px;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.4) rgba(15, 23, 42, 0.6);
}

.battle-guide-body::-webkit-scrollbar {
    width: 6px;
}

.battle-guide-body::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 4px;
}

.battle-guide-body::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.35);
    border-radius: 4px;
}

.battle-guide-body::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.65);
}

/* Tab Pane */
.guide-pane {
    display: none;
    flex-direction: column;
    gap: 18px;
    animation: guidePaneFade 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.guide-pane.is-active {
    display: flex;
}

@keyframes guidePaneFade {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Headings */
.guide-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
}

.guide-section-title {
    margin: 0;
    font-family: 'Unbounded', sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: #38bdf8;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.guide-section-hint {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

/* Static Cards & Containers (NO HOVER, DEFAULT CURSOR) */
.guide-info-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: default;
}

.guide-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
}

.guide-card-tile {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(51, 65, 85, 0.45);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: default;
}

.tile-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tile-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #f1f5f9;
}

.tile-desc {
    font-size: 12px;
    line-height: 1.5;
    color: #94a3b8;
    margin: 0;
}

.tile-desc strong {
    color: #e2e8f0;
}

/* Callout Banners */
.guide-banner-info {
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.35);
    font-size: 12px;
    line-height: 1.55;
    color: #cbd5e1;
    cursor: default;
}

.guide-banner-info strong {
    color: #38bdf8;
}

.guide-banner-warning {
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.35);
    font-size: 12px;
    line-height: 1.55;
    color: #e2e8f0;
    cursor: default;
}

.guide-banner-warning strong {
    color: #fbbf24;
}

/* ==========================================================================
   CARD ANATOMY & STAT BUBBLES INTERACTIVE SHOWCASE
   ========================================================================== */
.card-anatomy-container {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    cursor: default;
}

.card-anatomy-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 720px) {
    .card-anatomy-layout {
        grid-template-columns: 1fr;
        justify-items: center;
    }
}

.guide-card-stage {
    width: 250px;
    height: 350px;
    margin: 0 auto;
    position: relative;
    user-select: none;
    flex-shrink: 0;
}

#howToPlayModal .guide-card-stage .tcg-card,
#howToPlayModal .guide-card-stage .tcg-card.on-table,
#howToPlayModal .guide-card-stage .tcg-card.on-table:not(.inspected),
#howToPlayModal .guide-card-stage .tcg-card:not(.inspected) {
    top: 0 !important;
    left: 0 !important;
    bottom: auto !important;
    right: auto !important;
    transform: none !important;
    transform-origin: center center !important;
    width: 250px !important;
    height: 350px !important;
    aspect-ratio: 5 / 7 !important;
    position: relative !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.95), 0 0 30px rgba(56, 189, 248, 0.25) !important;
    outline: none !important;
    container-type: inline-size !important;
    margin: 0 auto !important;
}

#howToPlayModal .guide-card-stage .card-rotator {
    position: absolute !important;
    inset: 0 !important;
    pointer-events: none !important;
    transform: none !important;
}

#howToPlayModal .guide-card-stage .card-face {
    position: absolute !important;
    inset: 0 !important;
    border-radius: 14px !important;
    overflow: visible !important;
    contain: none !important;
    background: #0b1120 !important;
}

#howToPlayModal .guide-card-stage .card-border {
    position: absolute !important;
    inset: 0 !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 40%, #fef3c7 70%, #92400e 100%) !important;
    box-shadow: 0 0 14px rgba(251, 191, 36, 0.35) !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

#howToPlayModal .guide-card-stage .card-inner {
    position: absolute !important;
    inset: 3.5% !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 10px 12px 8px 12px !important;
    background: linear-gradient(160deg, #1e293b 0%, #0f172a 60%, #020617 100%) !important;
    z-index: 2 !important;
}

#howToPlayModal .guide-card-stage .card-header {
    height: auto !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 4px !important;
    padding: 0 !important;
}

#howToPlayModal .guide-card-stage .card-header-left {
    padding-left: 22px !important;
}

#howToPlayModal .guide-card-stage .card-class {
    font-size: 8.5px !important;
    letter-spacing: 0.12em !important;
    color: #94a3b8 !important;
    font-family: 'DM Mono', monospace !important;
}

#howToPlayModal .guide-card-stage .card-name {
    margin: 2px 0 0 0 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #f8fafc !important;
    font-family: 'Unbounded', sans-serif !important;
    line-height: 1.15 !important;
}

#howToPlayModal .guide-card-stage .card-rarity-badge {
    padding: 2px 5px !important;
    border-radius: 4px !important;
    font-size: 8px !important;
    font-family: 'DM Mono', monospace !important;
    font-weight: 800 !important;
    background: rgba(251, 191, 36, 0.2) !important;
    border: 1px solid rgba(251, 191, 36, 0.6) !important;
    color: #fbbf24 !important;
}

#howToPlayModal .guide-card-stage .art-window {
    height: 128px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    border: 1.5px solid rgba(51, 65, 85, 0.7) !important;
    background: #020617 !important;
    position: relative !important;
    margin-bottom: 4px !important;
}

#howToPlayModal .guide-card-stage .card-art {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center top !important;
    display: block !important;
}

#howToPlayModal .guide-card-stage .type-line {
    font-size: 9px !important;
    font-weight: 700 !important;
    color: #94a3b8 !important;
    font-family: 'DM Mono', monospace !important;
    text-transform: uppercase !important;
    margin-bottom: 4px !important;
    height: auto !important;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5) !important;
    padding-bottom: 2px !important;
}

#howToPlayModal .guide-card-stage .rules-box {
    flex: 1 !important;
    height: auto !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    padding: 3px 5px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

#howToPlayModal .guide-card-stage .rules-box:hover {
    background: rgba(56, 189, 248, 0.15) !important;
}

#howToPlayModal .guide-card-stage .rules-box.is-highlighted {
    background: rgba(56, 189, 248, 0.25) !important;
    box-shadow: 0 0 0 2px #38bdf8, 0 0 16px rgba(56, 189, 248, 0.5) !important;
}

#howToPlayModal .guide-card-stage .card-passives {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    margin: 0 !important;
}

#howToPlayModal .guide-card-stage .card-passive-item {
    font-size: 8.5px !important;
    line-height: 1.25 !important;
    font-family: 'Manrope', sans-serif !important;
    font-weight: 700 !important;
    color: #e2e8f0 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 3px !important;
}

#howToPlayModal .guide-card-stage .card-footer {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 8px !important;
    font-family: 'DM Mono', monospace !important;
    color: #64748b !important;
    margin-top: 3px !important;
    padding-top: 3px !important;
    border-top: 1px solid rgba(51, 65, 85, 0.3) !important;
}

/* Sleep Mode on Guide Card (Authentic to In-Game Board) */
#howToPlayModal .guide-card-stage .tcg-card.is-sleeping::after {
    content: '' !important;
    position: absolute !important;
    top: 8px !important;
    right: 10px !important;
    width: 44px !important;
    height: 44px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3ClinearGradient id='zg' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0%25' stop-color='%23bae6fd'/%3E%3Cstop offset='55%25' stop-color='%2338bdf8'/%3E%3Cstop offset='100%25' stop-color='%236366f1'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg font-family='Arial Black, Impact, sans-serif' font-weight='900' stroke='%23020617' stroke-linejoin='round' stroke-linecap='round' fill='url(%23zg)' style='paint-order:stroke fill'%3E%3Ctext x='51' y='44' font-size='28' stroke-width='8' transform='rotate(-6 62 34)'%3Ez%3C/text%3E%3Ctext x='38' y='64' font-size='38' stroke-width='9' transform='rotate(6 52 52)'%3Ez%3C/text%3E%3Ctext x='18' y='88' font-size='48' stroke-width='10' transform='rotate(-8 34 72)'%3EZ%3C/text%3E%3C/g%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    z-index: 75 !important;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.85)) !important;
    animation: sleepFloat 2s infinite ease-in-out !important;
    pointer-events: none !important;
}

#howToPlayModal .guide-card-stage .tcg-card:not(.is-sleeping)::after {
    display: none !important;
    content: none !important;
}

#howToPlayModal .guide-card-stage .tcg-card.is-sleeping .card-face {
    filter: brightness(0.62) contrast(0.95) grayscale(0.28) !important;
    transition: filter 0.25s ease;
}

/* Status Halo Previews (Divine Shield & Armor) */
#howToPlayModal .guide-card-stage .tcg-card.has-shield-preview {
    box-shadow: 0 0 0 4px #38bdf8, 0 0 35px rgba(56, 189, 248, 0.8), 0 20px 45px rgba(0, 0, 0, 0.95) !important;
    transition: box-shadow 0.25s ease;
}

#howToPlayModal .guide-card-stage .tcg-card.has-armor-preview {
    box-shadow: 0 0 0 4px #fbbf24, 0 0 35px rgba(251, 191, 36, 0.8), 0 20px 45px rgba(0, 0, 0, 0.95) !important;
    transition: box-shadow 0.25s ease;
}

/* 3D Glass Stat Bubbles (Authentic Sizing on Guide Card) */
#howToPlayModal .guide-card-stage .battle-stat-bubble {
    display: flex !important;
    position: absolute !important;
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;
    border-radius: 50% !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 60 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-sizing: border-box !important;
}

#howToPlayModal .guide-card-stage .battle-stat-bubble:hover {
    transform: scale(1.15) !important;
    z-index: 70 !important;
}

#howToPlayModal .guide-card-stage .battle-stat-bubble.is-highlighted {
    transform: scale(1.22) !important;
    z-index: 80 !important;
    animation: guideBubblePulse 1.2s infinite ease-in-out !important;
}

@keyframes guideBubblePulse {
    0%, 100% { box-shadow: 0 0 0 4px #ffffff, 0 0 25px currentColor; }
    50% { box-shadow: 0 0 0 7px #ffffff, 0 0 35px currentColor; }
}

#howToPlayModal .guide-card-stage .battle-stat-bubble.stat-mana {
    top: -10px !important;
    left: -10px !important;
    bottom: auto !important;
    right: auto !important;
    background: radial-gradient(circle at 35% 30%, #7dd3fc 0%, #0284c7 45%, #0369a1 78%, #082f49 100%) !important;
    border: 3.5px solid #0f172a !important;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.9), 0 0 20px rgba(2, 132, 199, 0.6) !important;
    color: #e0f2fe !important;
}

#howToPlayModal .guide-card-stage .battle-stat-bubble.stat-atk {
    bottom: -10px !important;
    left: -10px !important;
    top: auto !important;
    right: auto !important;
    background: radial-gradient(circle at 35% 30%, #fed7aa 0%, #f97316 48%, #c2410c 80%, #7c2d12 100%) !important;
    border: 3.5px solid #0f172a !important;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.9), 0 0 20px rgba(249, 115, 22, 0.6) !important;
    color: #fff7ed !important;
}

#howToPlayModal .guide-card-stage .battle-stat-bubble.stat-hp {
    bottom: -10px !important;
    right: -10px !important;
    top: auto !important;
    left: auto !important;
    background: radial-gradient(circle at 35% 30%, #fecdd3 0%, #e11d48 48%, #9f1239 80%, #4c0519 100%) !important;
    border: 3.5px solid #0f172a !important;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.9), 0 0 20px rgba(225, 29, 72, 0.6) !important;
    color: #fff1f2 !important;
}

#howToPlayModal .guide-card-stage .battle-stat-bubble .bubble-value {
    font-family: 'Unbounded', sans-serif !important;
    font-size: 24px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    color: #ffffff !important;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.95), -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000 !important;
}

/* Explainer Column on the Right: Detail Panel on Top, Compact Grid Below */
.anatomy-right-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.anatomy-details-panel {
    background: rgba(15, 23, 42, 0.92);
    border: 1.5px solid rgba(56, 189, 248, 0.45);
    border-radius: 16px;
    padding: 14px 18px;
    font-size: 12.5px;
    line-height: 1.55;
    color: #e2e8f0;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(56, 189, 248, 0.05);
    height: 154px;
    min-height: 154px;
    max-height: 154px;
    box-sizing: border-box;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.4) transparent;
}

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

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

.anatomy-select-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: rgba(30, 41, 59, 0.55);
    border: 1px solid rgba(71, 85, 105, 0.45);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.16s ease;
    user-select: none;
}

.anatomy-select-btn:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.5);
    transform: translateY(-1px);
}

.anatomy-select-btn.is-active {
    background: rgba(56, 189, 248, 0.22);
    border-color: #38bdf8;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
    transform: translateY(-1px);
}

.anatomy-btn-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}

.anatomy-btn-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.anatomy-btn-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 11px;
    font-weight: 800;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.anatomy-btn-tag {
    font-size: 9.5px;
    color: #94a3b8;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   VISUAL MANA PROGRESSION LADDER & CLASHES
   ========================================================================== */
.mana-mode-toggle-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 4px;
    width: 100%;
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.8);
    border: 1px solid rgba(51, 65, 85, 0.65);
}

.mana-mode-btn {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    user-select: none;
    white-space: nowrap;
}

.mana-mode-btn:hover {
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.65);
}

.mana-mode-btn.is-active {
    background: rgba(14, 165, 233, 0.16);
    border-color: rgba(56, 189, 248, 0.45);
    color: #ffffff;
}

.mana-mode-btn.is-active[data-mana-mode="fast"] {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(251, 191, 36, 0.48);
    color: #ffffff;
}

.mana-ladder-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mana-ladder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: 8px;
}

.mana-ladder-tile {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.mana-tile-rounds {
    font-size: 10.5px;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
}

.mana-tile-value {
    font-family: 'Unbounded', sans-serif;
    font-size: 16px;
    font-weight: 900;
    color: #38bdf8;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mana-tile-icon {
    font-size: 12px;
    color: #7dd3fc;
}

.mana-tile-sub {
    font-size: 9.5px;
    color: #64748b;
    font-weight: 600;
}

.mana-ladder-container.is-fast .guide-section-title {
    color: #fbbf24;
}

.mana-ladder-container.is-fast .mana-tile-value {
    color: #fbbf24;
}

.mana-ladder-container.is-fast .mana-tile-icon {
    color: #fcd34d;
}

/* ==========================================================================
   MUTUAL COMBAT CLASH VISUAL DIAGRAM
   ========================================================================== */
.clash-diagram-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 18px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 16px;
    flex-wrap: wrap;
}

.clash-unit-card {
    background: rgba(30, 41, 59, 0.7);
    border: 2px solid rgba(56, 189, 248, 0.4);
    border-radius: 14px;
    padding: 12px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 140px;
}

.clash-unit-card.is-defender {
    border-color: rgba(248, 113, 113, 0.5);
}

.clash-vs-symbol {
    font-family: 'Unbounded', sans-serif;
    font-size: 16px;
    font-weight: 900;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.3);
}

/* ==========================================================================
   PASSIVES & SKILLS CARDS (DETAILED FORMULAS & PHRASING)
   ========================================================================== */
.damage-formula-container {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: default;
}

.formula-step-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    line-height: 1.55;
    color: #cbd5e1;
}

.formula-step-num {
    font-family: 'Unbounded', sans-serif;
    font-size: 10px;
    font-weight: 800;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.2);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.damage-formula-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.damage-formula-card {
    background: rgba(30, 41, 59, 0.55);
    border: 1px solid rgba(71, 85, 105, 0.45);
    border-radius: 14px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: default;
}

.formula-card-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 11.5px;
    font-weight: 800;
    color: #38bdf8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.formula-card-desc {
    font-size: 11.5px;
    line-height: 1.55;
    color: #cbd5e1;
    margin: 0;
}

.formula-card-desc strong {
    color: #f8fafc;
}

/* Phrasing on Cards List */
.phrasing-list-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.phrasing-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(51, 65, 85, 0.45);
    border-radius: 14px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: default;
}

.phrasing-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.phrasing-text-badge {
    font-family: 'DM Mono', monospace;
    font-size: 11.5px;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
    padding: 2px 8px;
    border-radius: 6px;
}

.phrasing-summary {
    font-size: 11.5px;
    font-weight: 700;
    color: #f1f5f9;
}

.phrasing-details {
    font-size: 11.5px;
    line-height: 1.5;
    color: #94a3b8;
    margin: 0;
}

/* Footer */
.battle-guide-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border-top: 1px solid rgba(51, 65, 85, 0.5);
    background: rgba(15, 23, 42, 0.85);
    flex-shrink: 0;
}

.guide-footer-tip {
    font-size: 11px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.guide-primary-close-btn {
    padding: 10px 22px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: #ffffff;
    font-family: 'Unbounded', sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(14, 165, 233, 0.35);
    transition: all 0.16s ease;
}

.guide-primary-close-btn:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(14, 165, 233, 0.5);
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .battle-guide-card {
        height: 96vh;
        max-height: none;
        border-radius: 20px;
    }
    .battle-guide-header {
        padding: 14px 16px;
    }
    .battle-guide-tabs {
        padding: 8px 12px 10px 12px;
        gap: 6px;
    }
    .guide-tab-btn {
        padding: 6px 10px;
        font-size: 10px;
    }
    .battle-guide-body {
        padding: 16px;
    }
    .guide-cards-grid {
        grid-template-columns: 1fr;
    }
    .element-cycle-buttons-row {
        grid-template-columns: 1fr;
        margin-bottom: 0;
    }
    .element-select-btn {
        border-radius: 12px;
        border-bottom: 2px solid rgba(51, 65, 85, 0.6) !important;
    }
    .element-details-tray {
        border-radius: 16px;
        margin-top: 8px;
    }
    .battle-guide-footer {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    .guide-primary-close-btn {
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================================
   BOARD STATUS INDICATORS SHOWCASE & PLAYER MANA HUD LEGEND (ENGINE V2)
   ========================================================================== */
.guide-indicators-section {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(51, 65, 85, 0.65);
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

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

.guide-indicator-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 13px;
    background: rgba(30, 41, 59, 0.52);
    border: 1px solid rgba(71, 85, 105, 0.45);
    border-radius: 13px;
}

.guide-indicator-preview {
    width: 64px;
    min-width: 64px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.guide-indicator-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.guide-indicator-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 11px;
    font-weight: 800;
    color: #f8fafc;
}

.guide-indicator-desc {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.45;
    color: #cbd5e1;
}

/* Authentic Miniature Stat Bubbles for Visual Legend */
.guide-mini-bubble {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-family: 'Unbounded', sans-serif;
    font-size: 16px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95), -1.5px -1.5px 0 #000, 1.5px -1.5px 0 #000, -1.5px 1.5px 0 #000, 1.5px 1.5px 0 #000;
    box-sizing: border-box;
}

.guide-mini-bubble.is-hp {
    background: radial-gradient(circle at 35% 30%, #fca5a5 0%, #ef4444 45%, #b91c1c 78%, #7f1d1d 100%);
    border: 3px solid #1e293b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.85), 0 0 12px rgba(239, 68, 68, 0.4);
}

.guide-mini-bubble.is-atk {
    background: radial-gradient(circle at 35% 30%, #fef08a 0%, #f59e0b 45%, #b45309 78%, #78350f 100%);
    border: 3px solid #1e293b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.85), 0 0 12px rgba(245, 158, 11, 0.45);
}

.guide-mini-bubble.is-armor {
    width: 34px;
    height: 34px;
    font-size: 14px;
    background: radial-gradient(circle at 35% 30%, #e2e8f0 0%, #94a3b8 45%, #475569 78%, #1e293b 100%);
    border: 2.5px solid #1e293b;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.85), 0 0 12px rgba(148, 163, 184, 0.5);
}

.guide-mini-bubble.has-divine-shield {
    border-color: #fde047;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.85), 0 0 14px rgba(250, 204, 21, 0.9), inset 0 0 8px rgba(254, 240, 138, 0.8);
}

.guide-mini-bubble.has-divine-shield::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(254, 240, 138, 0.92);
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.75);
    animation: guideShieldPulse 2.1s ease-in-out infinite;
    pointer-events: none;
}

@keyframes guideShieldPulse {
    0%, 100% { transform: scale(1); opacity: 0.92; }
    50% { transform: scale(1.08); opacity: 0.52; }
}

.guide-mini-dd-tag {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fca5a5 0%, #ef4444 45%, #b91c1c 78%, #7f1d1d 100%);
    border: 2px solid #1e293b;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.guide-mini-dd-tag svg {
    width: 62%;
    height: 62%;
    fill: #ffffff;
    stroke: #000000;
    stroke-width: 2.2;
    paint-order: stroke fill;
}

.guide-mini-twin-tag {
    position: absolute;
    bottom: -6px;
    right: -9px;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fef08a 0%, #f59e0b 45%, #b45309 78%, #78350f 100%);
    border: 2px solid #1e293b;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Unbounded', sans-serif;
    font-size: 9.5px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.guide-mini-bubble.has-first-attack-ready {
    border-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.85), 0 0 12px rgba(255, 255, 255, 0.92), 0 0 22px rgba(254, 240, 138, 0.65);
}

.guide-mini-sleep-card {
    width: 38px;
    height: 48px;
    border-radius: 7px;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1.5px solid #475569;
    filter: brightness(0.75) grayscale(0.25);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
}

.guide-mini-sleep-zzz {
    position: absolute;
    top: -6px;
    right: -8px;
    font-size: 20px;
    line-height: 1;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.95));
}

.guide-mini-stat-colors {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-family: 'Unbounded', sans-serif;
    font-size: 11px;
    font-weight: 900;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
    align-items: center;
}

.guide-mini-gems-pair {
    display: flex;
    align-items: center;
    gap: 6px;
}

.guide-mini-hero-gem {
    width: 27px;
    height: 27px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Unbounded', sans-serif;
    font-size: 11px;
    font-weight: 900;
    color: #ffffff;
    border: 2px solid #94a3b8;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.guide-mini-hero-gem.is-armored {
    background: radial-gradient(circle at 35% 30%, #cbd5e1 0%, #64748b 45%, #334155 78%, #0f172a 100%);
    border-color: #94a3b8;
    box-shadow: 0 0 10px rgba(148, 163, 184, 0.55);
}

.guide-mini-hero-gem.is-vulnerable {
    background: radial-gradient(circle at 35% 30%, #fca5a5 0%, #ef4444 45%, #b91c1c 78%, #7f1d1d 100%);
    border-color: #7f1d1d;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.75);
}

/* Player Mana HUD Replica inside Tab 3 */
.guide-mana-hud-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 14px;
}

.guide-mana-tray-demo {
    background: rgba(2, 6, 23, 0.88);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 12px;
    padding: 10px 12px;
    min-width: 158px;
    box-shadow: inset 0 0 14px rgba(14, 165, 233, 0.08);
    flex-shrink: 0;
}

.guide-mana-tray-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Unbounded', sans-serif;
    font-size: 10px;
    font-weight: 800;
    margin-bottom: 7px;
}

.guide-mana-tray-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}

.guide-mana-orb {
    width: 21px;
    height: 21px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.guide-mana-orb svg {
    width: 62%;
    height: 62%;
}

.guide-mana-orb.filled {
    background: radial-gradient(circle at 32% 28%, #e0f2fe 0%, #38bdf8 38%, #0284c7 74%, #082f49 100%);
    border: 1.5px solid #bae6fd;
    box-shadow: 0 0 9px rgba(56, 189, 248, 0.9), inset 0 2px 3px rgba(255, 255, 255, 0.85);
    color: #ffffff;
}

.guide-mana-orb.spent {
    background: radial-gradient(circle at 35% 30%, rgba(56, 189, 248, 0.30) 0%, rgba(14, 116, 144, 0.24) 65%, rgba(12, 74, 110, 0.38) 100%);
    border: 1.5px solid rgba(56, 189, 248, 0.48);
    color: rgba(186, 230, 253, 0.58);
    opacity: 0.78;
}

.guide-mana-orb.next-unlock {
    background: radial-gradient(circle at 35% 30%, rgba(56, 189, 248, 0.14) 0%, rgba(15, 23, 42, 0.55) 85%);
    border: 1.5px dashed rgba(125, 211, 252, 0.44);
    color: rgba(125, 211, 252, 0.40);
    opacity: 0.65;
}

.guide-mana-orb.locked {
    background: rgba(15, 23, 42, 0.45);
    border: 1.5px dashed rgba(148, 163, 184, 0.24);
    color: rgba(148, 163, 184, 0.14);
    opacity: 0.45;
}

.guide-mana-orb-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.guide-mana-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #cbd5e1;
}
