/* ==========================================================================
   DARK FANTASY D&D UNIFIED FULLSCREEN DRAGON BOARD - STYLESHEET
   ========================================================================== */

:root {
    --gold-primary: #e5b95c;
    --gold-bright: #ffe699;
    --gold-dark: #8c6820;
    --gold-glow: rgba(229, 185, 92, 0.4);

    --ruby-red: #c02626;
    --ruby-glow: rgba(192, 38, 38, 0.5);

    --wood-darkest: #0c0704;
    --wood-dark: #1f120b;
    --wood-medium: #331d11;
    --wood-light: #52311d;
    --wood-border: #6d4227;

    --text-gold: #f5e9d3;
    --text-muted: #c4b097;

    --card-bg: rgba(18, 10, 6, 0.88);
    --card-border: rgba(229, 185, 92, 0.35);

    --hp-green: #388e3c;
    --hp-yellow: #f57c00;
    --hp-red: #d32f2f;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

html, body {
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden !important;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #070402;
    background-image: 
        radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.25) 100%),
        url('assets/sfondo1.png');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text-gold);
    font-family: 'Outfit', sans-serif;
}

/* Background Particle Canvas */
#particlesCanvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
}

h1, h2, h3, h4, .main-title, .rune-title, .wood-tab, .wood-btn {
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   LOADING SCREEN 3D
   ========================================================================== */
.loading-screen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #26160c 0%, #080403 100%);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out, visibility 0.8s;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.d20-3d-canvas-container {
    width: 260px;
    height: 260px;
    position: relative;
    cursor: pointer;
}

.loading-status {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.rune-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.6rem;
    color: var(--gold-primary);
    text-shadow: 0 0 15px var(--gold-glow);
    font-weight: 900;
}

.loading-bar-wrapper {
    width: 340px;
    height: 14px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--gold-dark);
    border-radius: 7px;
    padding: 2px;
    box-shadow: 0 0 15px rgba(0,0,0,0.9), inset 0 0 5px #000;
}

.loading-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold-primary) 50%, var(--gold-bright) 100%);
    border-radius: 4px;
    box-shadow: 0 0 10px var(--gold-glow);
    transition: width 0.1s linear;
}

.loading-percentage {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--gold-bright);
    text-shadow: 0 0 8px var(--gold-glow);
}

.loading-subtext {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ==========================================================================
   CENTERED DRAGON BOARD CONTAINER (CENTRATO PERFETTAMENTE IN MEZZO ALLA PLANCIA)
   ========================================================================== */
.unified-dragon-board {
    position: relative;
    z-index: 5;
    width: 92%;
    max-width: 1260px;
    height: 86vh !important;
    max-height: 86vh !important;
    margin: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: flex;
    flex-direction: column;
    background: rgba(12, 6, 3, 0.20);
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
    border: 1.5px solid rgba(229, 185, 92, 0.28);
    border-radius: 20px;
    padding: 30px 45px 50px 45px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.75), inset 0 0 35px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease, backdrop-filter 0.3s ease;
}

/* Custom Scrollbar for Dragon Board & Containers */
.unified-dragon-board {
    scrollbar-width: thin;
    scrollbar-color: var(--gold-primary) rgba(10, 6, 4, 0.6);
}

.unified-dragon-board::-webkit-scrollbar,
*::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.unified-dragon-board::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
    background: rgba(12, 6, 3, 0.65);
    border-radius: 4px;
}

.unified-dragon-board::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    border-radius: 4px;
    box-shadow: 0 0 6px var(--gold-glow);
}

.unified-dragon-board::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover {
    background: var(--gold-bright);
    box-shadow: 0 0 10px var(--gold-bright);
}

/* MEDIEVAL TAVERN SIGN HEADER SYSTEM */
.board-head-section {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
}

.tavern-sign-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.tavern-sign-plaque {
    position: relative;
    width: 100%;
    max-width: 820px;
    padding: 22px 35px 26px 35px;
    text-align: center;
    background: linear-gradient(180deg, rgba(32, 17, 9, 0.65) 0%, rgba(16, 8, 3, 0.75) 100%);
    border: 3px double var(--gold-primary);
    border-radius: 16px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.85), inset 0 0 35px rgba(0, 0, 0, 0.65), 0 0 25px var(--gold-glow);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.sign-chain {
    position: absolute;
    top: -16px;
    font-size: 1.4rem;
    color: var(--gold-primary);
    filter: drop-shadow(0 4px 6px #000);
}

.sign-chain.left-chain { left: 45px; }
.sign-chain.right-chain { right: 45px; }

.eyebrow-tag {
    font-size: 0.9rem;
    color: var(--gold-bright);
    letter-spacing: 3px;
    font-weight: 700;
    text-shadow: 0 0 8px var(--gold-glow);
}

.main-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--gold-bright);
    margin: 6px 0 2px 0;
    letter-spacing: 2px;
    text-shadow: 2px 3px 12px #000, 0 0 30px var(--gold-glow);
}

.tavern-motto {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    color: var(--text-gold);
    font-style: italic;
    letter-spacing: 1px;
    opacity: 0.9;
    margin: 0;
}

.header-interactive-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

.wood-btn.mini {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
}

.quick-dice-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(10, 6, 4, 0.7);
    border: 1px solid rgba(229, 185, 92, 0.3);
    border-radius: 8px;
    padding: 4px 8px;
}

.dice-chip {
    background: rgba(25, 14, 8, 0.85);
    border: 1px solid var(--wood-border);
    color: var(--text-gold);
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.dice-poly-icon {
    font-size: 0.75rem;
    display: inline-block;
    line-height: 1;
    filter: drop-shadow(0 0 4px var(--gold-glow));
    transition: transform 0.2s ease;
}

.d4-icon { color: #f87171; }
.d6-icon { color: #60a5fa; }
.d8-icon { color: #4ade80; }
.d10-icon { color: #fb923c; }
.d12-icon { color: #c084fc; }
.d20-icon { color: #fde047; }
.d100-icon { color: #2dd4bf; }

.dice-chip:hover {
    background: var(--gold-primary);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 0 10px var(--gold-glow);
}

.dice-chip:hover .dice-poly-icon {
    color: #000 !important;
    transform: scale(1.2);
}

.dice-chip.gold-dice {
    border-color: var(--gold-primary);
    color: var(--gold-bright);
}

.dice-chip.active-selected-dice {
    background: linear-gradient(180deg, #ffe699 0%, #b38529 100%) !important;
    color: #000 !important;
    font-weight: 900 !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 14px var(--gold-bright) !important;
    transform: scale(1.08);
}

.dice-chip.active-selected-dice .dice-poly-icon {
    color: #000 !important;
}

.quick-preset-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.preset-chip {
    background: rgba(25, 14, 8, 0.85);
    border: 1px solid rgba(229, 185, 92, 0.4);
    color: var(--gold-bright);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-chip:hover {
    background: var(--gold-primary);
    color: #000;
    transform: scale(1.05);
    box-shadow: 0 0 10px var(--gold-glow);
}

.party-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 6px 0 8px 0;
    color: var(--gold-primary);
    border-bottom: 1px solid rgba(229, 185, 92, 0.3);
    padding-bottom: 6px;
}

.party-quick-actions {
    display: flex;
    gap: 8px;
}

/* Floating Damage Text Animation FX */
.floating-damage-fx {
    position: absolute;
    top: 10px;
    right: 20px;
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.6rem;
    font-weight: 900;
    pointer-events: none;
    z-index: 100;
    animation: floatDamageUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.floating-damage-fx.dmg-red {
    color: #ff3333;
    text-shadow: 0 0 10px #ff0000, 2px 2px 4px #000;
}

.floating-damage-fx.heal-green {
    color: #43a047;
    text-shadow: 0 0 10px #66bb6a, 2px 2px 4px #000;
}

@keyframes floatDamageUp {
    0% { transform: translateY(0) scale(0.7); opacity: 0; }
    20% { transform: translateY(-10px) scale(1.3); opacity: 1; }
    80% { transform: translateY(-35px) scale(1); opacity: 0.9; }
    100% { transform: translateY(-50px) scale(0.8); opacity: 0; }
}

/* DICE TRAY WIDGET */
.dice-tray-widget {
    background: linear-gradient(135deg, rgba(20, 11, 7, 0.92) 0%, rgba(10, 5, 3, 0.95) 100%);
    border: 2px solid var(--gold-primary);
    border-radius: 14px;
    padding: 6px 18px 6px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.75), 0 0 15px var(--gold-glow);
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.25s ease;
    user-select: none;
}

.dice-tray-widget:hover {
    transform: translateY(-3px) scale(1.03);
    border-color: #ffe699;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 25px var(--gold-bright);
}

.dice-tray-widget:active {
    transform: translateY(0px) scale(0.98);
}

.board-d20-canvas {
    width: 65px;
    height: 65px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(229, 185, 92, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
}

.board-d20-canvas canvas {
    display: block;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.7));
}

.dice-tray-label {
    display: flex;
    flex-direction: column;
}

.d20-roll-value {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--gold-bright);
    text-shadow: 0 0 6px var(--gold-glow);
}

.dice-tray-label small {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* CORPO CENTRALE */
.board-body-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
}

#setupSection, #combatSection {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 30px;
    height: auto;
    overflow: visible;
}

.setup-split-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    height: auto;
    overflow: visible;
}

.setup-col-left, .setup-col-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: auto;
    overflow: visible;
}

/* ==========================================================================
   FULL-WIDTH RESPONSIVE PANELS & GRIDS
   ========================================================================== */
.section-banner {
    margin-bottom: 25px;
}

.section-banner h2 {
    font-size: 1.8rem;
    color: var(--gold-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==========================================================================
   MEDIEVAL PANELS, INPUTS & BUTTON SYSTEM WITH UNIQUE ANIMATIONS
   ========================================================================== */
.wood-panel {
    background: rgba(14, 7, 3, 0.32);
    border: 1.5px solid rgba(229, 185, 92, 0.45);
    border-radius: 14px;
    padding: 24px 30px;
    box-shadow: inset 0 0 25px rgba(0,0,0,0.5), 0 8px 24px rgba(0,0,0,0.4);
    backdrop-filter: blur(2.5px);
    -webkit-backdrop-filter: blur(2.5px);
}

.panel-header-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(229, 185, 92, 0.3);
    padding-bottom: 8px;
}

.panel-header-inline h3 {
    font-size: 1.15rem;
    color: var(--gold-primary);
}

.icon-gold { color: var(--gold-primary); font-size: 1.2rem; }
.icon-red { color: var(--ruby-red); font-size: 1.2rem; }

/* Toggles & Tabs */
.setup-toggles-container {
    display: flex;
    gap: 14px;
}

.wood-toggle-card {
    flex: 1;
    background: rgba(18, 10, 6, 0.85);
    border: 1.5px solid rgba(229, 185, 92, 0.35);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.wood-toggle-card:hover {
    border-color: var(--gold-primary);
    transform: translateY(-2px);
    box-shadow: 0 0 15px var(--gold-glow);
}

.wood-toggle-card input { display: none; }

.toggle-box {
    width: 40px;
    height: 40px;
    border: 2px solid var(--gold-dark);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: all 0.3s;
}

.toggle-text strong { display: block; color: var(--text-gold); font-size: 0.95rem; }
.toggle-text small { color: var(--text-muted); font-size: 0.8rem; }

.wood-toggle-card input:checked + .toggle-box {
    background: var(--gold-primary);
    color: #000;
    border-color: #fff;
    box-shadow: 0 0 15px var(--gold-glow);
}

.wood-toggle-card input:checked ~ .toggle-text strong {
    color: var(--gold-bright);
}

.encounter-tabs {
    display: flex;
    gap: 12px;
}

.wood-tab {
    position: relative;
    flex: 1;
    background: rgba(20, 12, 8, 0.85);
    border: 2px solid var(--wood-border);
    color: var(--text-gold);
    padding: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wood-tab:hover {
    border-color: var(--gold-primary);
    color: var(--gold-bright);
    transform: translateY(-2px);
    box-shadow: 0 0 15px var(--gold-glow);
}

.wood-tab.active {
    background: linear-gradient(180deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    color: #000;
    border-color: var(--gold-bright);
    box-shadow: 0 0 18px var(--gold-glow);
}

/* Inputs */
.input-field-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-field-group label {
    font-size: 0.85rem;
    color: var(--gold-primary);
    font-weight: 600;
}

.wood-input, .wood-textarea, .quick-delta-input {
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(229, 185, 92, 0.3);
    border-radius: 6px;
    padding: 10px 12px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
    color-scheme: dark;
}

.wood-textarea { min-height: 70px; resize: vertical; }

.wood-input:focus, .wood-textarea:focus, .quick-delta-input:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 12px var(--gold-glow);
}

/* ==========================================================================
   FRECCE DI SCORRIMENTO DORATE (SPINNER ARROWS) PER CAMPI NUMBER
   ========================================================================== */
.wood-input[type="number"],
input[type="number"].wood-input,
.quick-delta-input[type="number"],
input[type="number"] {
    color-scheme: dark;
}

/* Freccette di incremento/decremento numerico con filtro oro fantasy */
.wood-input[type="number"]::-webkit-inner-spin-button,
.wood-input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 0.8;
    cursor: pointer;
    filter: invert(0.78) sepia(1) saturate(5) hue-rotate(5deg) brightness(1.25);
    transition: opacity 0.2s ease, filter 0.2s ease, transform 0.15s ease;
    margin-left: 4px;
    padding: 2px 0;
}

.wood-input[type="number"]:hover::-webkit-inner-spin-button,
.wood-input[type="number"]:focus::-webkit-inner-spin-button,
input[type="number"]:hover::-webkit-inner-spin-button {
    opacity: 1;
    filter: invert(0.88) sepia(1) saturate(7) hue-rotate(10deg) brightness(1.6) drop-shadow(0 0 4px rgba(229, 185, 92, 0.95));
    transform: scale(1.1);
}

/* Scrollbar personalizzate dorate per aree di testo e input */
.wood-textarea::-webkit-scrollbar,
.wood-input::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.wood-textarea::-webkit-scrollbar-track,
.wood-input::-webkit-scrollbar-track {
    background: rgba(10, 5, 3, 0.6);
    border-radius: 4px;
}

.wood-textarea::-webkit-scrollbar-thumb,
.wood-input::-webkit-scrollbar-thumb {
    background: var(--gold-primary);
    border-radius: 4px;
    box-shadow: 0 0 6px var(--gold-glow);
}

.wood-textarea::-webkit-scrollbar-thumb:hover,
.wood-input::-webkit-scrollbar-thumb:hover {
    background: var(--gold-bright);
}

/* MEDIEVAL ANIMATED BUTTON SYSTEM */
.wood-btn {
    position: relative;
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 10px 22px;
    border-radius: 8px;
    border: 2px solid var(--gold-primary);
    background: linear-gradient(180deg, #3d2415 0%, #1c1008 100%);
    color: var(--gold-bright);
    text-shadow: 0 2px 4px #000, 0 0 6px var(--gold-glow);
    box-shadow: inset 0 1px 0 rgba(255, 230, 153, 0.3), inset 0 -2px 0 rgba(0,0,0,0.8), 0 5px 15px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    user-select: none;
}

/* Medieval Shimmer Light Sweep on Hover */
.wood-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 50%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 230, 153, 0.45), transparent);
    transform: rotate(25deg);
    transition: left 0.65s ease-in-out;
    pointer-events: none;
}

.wood-btn:hover::before {
    left: 130%;
}

.wood-btn:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: #fff;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 0 22px var(--gold-glow), 0 10px 25px rgba(0,0,0,0.8);
    animation: medievalRuneGlow 1.8s infinite ease-in-out alternate;
}

.wood-btn:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.9), 0 2px 8px rgba(0,0,0,0.8);
}

@keyframes medievalRuneGlow {
    0% { border-color: var(--gold-primary); box-shadow: 0 0 12px var(--gold-glow); }
    100% { border-color: var(--gold-bright); box-shadow: 0 0 24px rgba(255, 230, 153, 0.7); }
}

.wood-btn.primary-btn {
    background: linear-gradient(180deg, #e5b95c 0%, #8c6820 100%);
    color: #0c0704;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4);
    border-color: #ffe699;
}

.wood-btn.primary-btn:hover {
    background: linear-gradient(180deg, #ffe699 0%, #b38529 100%);
    color: #000;
}

.wood-btn.boss-btn {
    background: linear-gradient(180deg, #c02626 0%, #500a0a 100%);
    border-color: #ff6b6b;
    color: #fff;
    text-shadow: 0 2px 4px #000, 0 0 8px rgba(255, 107, 107, 0.6);
}

.wood-btn.boss-btn:hover {
    background: linear-gradient(180deg, #e53935 0%, #7f1d1d 100%);
    box-shadow: 0 0 22px rgba(229, 57, 53, 0.7);
}

.wood-btn.danger-btn {
    background: linear-gradient(180deg, #8b0000 0%, #3a0000 100%);
    border-color: #ff5252;
    color: #fff;
}

.wood-btn.success-btn {
    background: linear-gradient(180deg, #2e7d32 0%, #113e14 100%);
    border-color: #81c784;
    color: #e8f5e9;
}

.wood-btn.success-btn:hover {
    background: linear-gradient(180deg, #388e3c 0%, #1b5e20 100%);
    box-shadow: 0 0 22px rgba(76, 175, 80, 0.7);
}

.start-combat-btn {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 2px;
    padding: 16px 28px;
    border-radius: 12px;
    background: linear-gradient(180deg, #e5b95c 0%, #996e1a 50%, #4a340b 100%);
    color: #000;
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
    border: 3px solid var(--gold-bright);
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.6), 0 8px 30px rgba(0,0,0,0.9), 0 0 25px var(--gold-glow);
    margin-top: 10px;
}

.full-width { width: 100%; }

.add-enemy-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1fr auto;
    gap: 10px;
    align-items: end;
}

.add-enemy-grid.mini {
    grid-template-columns: 2.2fr 1fr 1fr 1fr auto;
}

.boss-grid-inputs {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.boss-textareas-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

/* Party Hero Grid (Full width responsive) */
.party-section-title {
    margin: 6px 0 4px 0;
    color: var(--gold-primary);
    border-bottom: 1px solid rgba(229, 185, 92, 0.3);
    padding-bottom: 4px;
}

.party-section-title h3 {
    font-size: 1.05rem;
}

.setup-hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
    margin-bottom: 0;
}

.hero-card-setup {
    background: rgba(14, 7, 3, 0.30);
    border: 1.5px solid rgba(229, 185, 92, 0.45);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: transform 0.2s, border-color 0.2s, background-color 0.2s;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.hero-card-setup:hover {
    border-color: var(--gold-primary);
    transform: translateY(-2px);
}

.hero-token-3d {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    border: 2.5px solid var(--gold-primary);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.45), inset 0 -3px 5px rgba(0,0,0,0.85), 0 5px 14px rgba(0,0,0,0.9), 0 0 12px var(--gold-glow);
    animation: tokenFloat 4s ease-in-out infinite;
    flex-shrink: 0;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-token-3d:hover {
    transform: scale(1.12) translateY(-4px);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.6), inset 0 -3px 5px rgba(0,0,0,0.9), 0 8px 20px rgba(0,0,0,0.95), 0 0 20px var(--gold-bright);
}

@keyframes tokenFloat {
    0%, 100% { transform: translateY(0px) rotateY(0deg); }
    50% { transform: translateY(-4px) rotateY(12deg); }
}

/* Individual Character Token Assets */
.cleric-token, .clerictwilight-token {
    background-image: url('assets/chierico.png') !important;
}

.cleric-light-token, .clericlight-token {
    background-image: url('assets/chierico2.png') !important;
}

.rogue-token {
    background-image: url('assets/ladro.png') !important;
}

.monk-token {
    background-image: url('assets/monaco.png') !important;
}

.warlock-token {
    background-image: url('assets/warlock.png') !important;
}

.sorcerer-token {
    background-image: url('assets/stregone.png') !important;
}

.enemy-token-3d {
    background-image: url('assets/nemico.png') !important;
    border-color: #ff4d4d !important;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.3), inset 0 -3px 5px rgba(0,0,0,0.85), 0 5px 14px rgba(0,0,0,0.9), 0 0 12px rgba(255, 77, 77, 0.6) !important;
}

.boss-token-3d {
    background-image: url('assets/boss.png') !important;
    border: 3px solid var(--gold-bright) !important;
    box-shadow: inset 0 2px 5px rgba(255,255,255,0.6), inset 0 -4px 6px rgba(0,0,0,0.9), 0 6px 18px rgba(0,0,0,0.95), 0 0 20px var(--gold-bright) !important;
}

.hero-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hero-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-gold);
}

.hero-class-tag {
    font-size: 0.75rem;
    color: var(--gold-primary);
}

.hero-setup-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.hero-stats-inputs {
    display: flex;
    gap: 4px;
    align-items: center;
}

.hero-stats-inputs .wood-input {
    width: 52px;
    padding: 6px 2px;
    font-size: 0.82rem;
    text-align: center;
}

.hero-stats-inputs .wood-input.init-input {
    width: 54px;
}

.hero-stats-inputs .wood-input.dex-input {
    width: 44px;
    background: rgba(22, 12, 6, 0.9);
    border-color: rgba(255, 230, 153, 0.45);
    color: var(--gold-bright);
    font-weight: 700;
}

.hero-stats-inputs .wood-input.ac-input {
    width: 46px;
    background: rgba(12, 18, 28, 0.9);
    border-color: rgba(144, 202, 249, 0.45);
    color: #90caf9;
    font-weight: 700;
}

.hero-stats-inputs .wood-input.hp-input {
    width: 48px;
    background: rgba(26, 12, 12, 0.9);
    border-color: rgba(239, 83, 80, 0.45);
    color: #ef9a9a;
    font-weight: 700;
}

/* Condition Selectors & Themes */
.condition-selector-panel {
    background: rgba(30, 15, 10, 0.85);
    border: 1px dashed var(--gold-primary);
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 6px;
}

.condition-selector-panel.surprise-theme {
    border-color: #ffca28;
    box-shadow: 0 0 12px rgba(255, 202, 40, 0.25);
}

.condition-selector-panel.frightened-theme {
    border-color: #ec407a;
    box-shadow: 0 0 12px rgba(236, 64, 122, 0.25);
}

.condition-selector-panel h4 {
    color: var(--gold-bright);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.condition-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip-item {
    background: rgba(20, 10, 5, 0.8);
    border: 1px solid var(--wood-border);
    padding: 6px 14px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.chip-item.selected-surprise {
    background: linear-gradient(135deg, #ffca28, #ff8f00);
    color: #000;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(255, 202, 40, 0.8);
}

.chip-item.selected-frightened {
    background: linear-gradient(135deg, #ab47bc, #8e24aa);
    color: #fff;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(171, 71, 188, 0.8);
}

/* Debuff Badges in Combat Card & Queue */
.debuff-badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.debuff-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.debuff-badge:hover {
    transform: scale(1.06);
}

.debuff-surprised {
    background: linear-gradient(135deg, #ffb300 0%, #ff6f00 100%);
    color: #000;
    box-shadow: 0 0 10px rgba(255, 179, 0, 0.6);
}

.debuff-frightened {
    background: linear-gradient(135deg, #ba68c8 0%, #7b1fa2 100%);
    color: #fff;
    box-shadow: 0 0 10px rgba(186, 104, 200, 0.6);
}

.cond-toggle-btn {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--wood-border);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.cond-toggle-btn:hover {
    border-color: var(--gold-primary);
    color: #fff;
}

.cond-toggle-btn.active-surprised {
    background: #ffb300;
    color: #000;
    font-weight: bold;
    border-color: #ffe082;
    box-shadow: 0 0 8px rgba(255, 179, 0, 0.7);
}

.cond-toggle-btn.active-frightened {
    background: #ab47bc;
    color: #fff;
    font-weight: bold;
    border-color: #e1bee7;
    box-shadow: 0 0 8px rgba(171, 71, 188, 0.7);
}

.queue-debuff-icon {
    font-size: 0.78rem;
    margin-left: 2px;
}

/* ==========================================================================
   COMBAT TRACKER (STICKY DOCK & FLOATING NAVIGATION)
   ========================================================================== */
/* ==========================================================================
   COMBAT TRACKER (STICKY DOCK FISSO & FLOATING NAVIGATION)
   ========================================================================== */
.sticky-combat-controls {
    position: sticky;
    top: -15px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(180deg, rgba(22, 12, 7, 0.97) 0%, rgba(12, 6, 3, 0.98) 100%);
    border: 2px solid var(--gold-primary);
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.92), 0 0 25px var(--gold-glow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-bottom: 25px;
}

.combat-control-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 5, 2, 0.65);
    border: 1px solid rgba(229, 185, 92, 0.35);
    border-radius: 10px;
    padding: 8px 18px;
}

.round-badge {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.5rem;
    color: var(--gold-bright);
    text-shadow: 0 0 12px var(--gold-glow);
    user-select: none;
}

.queue-section {
    background: rgba(10, 5, 2, 0.65);
    border: 1px solid rgba(229, 185, 92, 0.35);
    border-radius: 10px;
    padding: 8px 14px;
}

.queue-title {
    font-size: 0.82rem;
    color: var(--gold-primary);
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.turn-queue-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

.queue-card {
    background: rgba(18, 10, 6, 0.85);
    border: 1.5px solid rgba(229, 185, 92, 0.3);
    border-radius: 10px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.78;
    transition: all 0.25s ease;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
    min-width: 150px;
}

.queue-card.active-queue {
    opacity: 1;
    border-color: var(--gold-bright);
    box-shadow: 0 0 18px var(--gold-glow);
    transform: scale(1.04);
    background: linear-gradient(135deg, rgba(50, 28, 14, 0.95), rgba(25, 12, 5, 0.95));
}

.queue-card.queue-surprised {
    border-color: #ffca28;
    box-shadow: 0 0 12px rgba(255, 202, 40, 0.45);
}

.queue-card.queue-frightened {
    border-color: #ab47bc;
    box-shadow: 0 0 12px rgba(171, 71, 188, 0.45);
}

.queue-card-info {
    display: flex;
    flex-direction: column;
}

.queue-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-gold);
}

.queue-init-tag {
    font-size: 0.74rem;
    color: var(--gold-primary);
}

.queue-badges-row {
    display: flex;
    gap: 4px;
    margin-top: 2px;
}

.queue-debuff-icon.icon-surprise {
    background: #ffb300;
    color: #000;
    font-weight: 800;
    font-size: 0.68rem;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.queue-debuff-icon.icon-fear {
    background: #ab47bc;
    color: #fff;
    font-weight: 800;
    font-size: 0.68rem;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.queue-card .hero-token-3d {
    width: 36px;
    height: 36px;
    animation: none;
}

/* ==========================================================================
   CONDITION BANNERS (SORPRESO / SPAVENTATO IN COMBATTIMENTO)
   ========================================================================== */
.combat-condition-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 16px;
    border-radius: 8px;
    margin: 4px 0 8px 0;
    animation: pulseBannerGlow 2.5s infinite ease-in-out;
}

@keyframes pulseBannerGlow {
    0%, 100% { opacity: 0.95; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.008); }
}

.combat-condition-banner.surprise-banner {
    background: linear-gradient(90deg, rgba(60, 40, 5, 0.95), rgba(30, 20, 3, 0.9));
    border: 1.5px solid #ffca28;
    box-shadow: 0 0 15px rgba(255, 202, 40, 0.35);
}

.combat-condition-banner.frightened-banner {
    background: linear-gradient(90deg, rgba(50, 15, 60, 0.95), rgba(25, 8, 30, 0.9));
    border: 1.5px solid #ba68c8;
    box-shadow: 0 0 15px rgba(186, 104, 200, 0.35);
}

.banner-icon {
    font-size: 1.4rem;
}

.surprise-banner .banner-icon { color: #ffca28; }
.frightened-banner .banner-icon { color: #e1bee7; }

.banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.banner-text strong {
    font-size: 0.88rem;
    letter-spacing: 0.5px;
}

.surprise-banner .banner-text strong { color: #ffe082; }
.frightened-banner .banner-text strong { color: #f3e5f5; }

.banner-text span {
    font-size: 0.78rem;
    color: var(--text-gold);
    opacity: 0.9;
}

.skip-surprise-btn {
    background: linear-gradient(180deg, #ffb300 0%, #e65100 100%) !important;
    color: #000 !important;
    font-weight: 800 !important;
    border-color: #ffe082 !important;
    white-space: nowrap;
    box-shadow: 0 0 10px rgba(255, 179, 0, 0.6) !important;
}

.master-unlock-btn {
    background: linear-gradient(180deg, #ba68c8 0%, #6a1b9a 100%) !important;
    color: #fff !important;
    font-weight: 800 !important;
    border-color: #e1bee7 !important;
    white-space: nowrap;
    box-shadow: 0 0 10px rgba(186, 104, 200, 0.6) !important;
}

.combatant-card.is-surprised-card {
    border-color: #ffca28;
    box-shadow: 0 0 18px rgba(255, 202, 40, 0.35);
}

.combatant-card.is-frightened-card {
    border-color: #ab47bc;
    box-shadow: 0 0 18px rgba(171, 71, 188, 0.35);
}

.init-breakdown {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: normal;
    margin-left: 3px;
}

.gold-bright-text {
    color: var(--gold-bright);
    font-size: 1rem;
    font-weight: 800;
}

/* Combat Cards Grid Layout across screen */
.combatants-cards-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 28px;
}

.combatant-card {
    background: rgba(14, 7, 3, 0.32);
    border: 1.5px solid rgba(229, 185, 92, 0.45);
    border-radius: 14px;
    padding: 24px 30px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
    transition: all 0.3s;
    backdrop-filter: blur(2.5px);
    -webkit-backdrop-filter: blur(2.5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.combatant-card.active-turn-card {
    border-color: var(--gold-primary);
    box-shadow: 0 0 30px var(--gold-glow);
    border-left: 8px solid var(--gold-primary);
}

.combatant-card.dead-card {
    opacity: 0.5;
    filter: grayscale(80%);
}

.card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-left-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.card-title-group .c-name {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-gold);
}

.card-title-group .c-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* HP Controls Section */
.hp-panel {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--wood-border);
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hp-row-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hp-delta-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-delta-input {
    width: 70px;
    text-align: center;
}

.hp-btn-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--wood-light);
    border: 1px solid var(--gold-primary);
    color: var(--gold-bright);
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
}

.hp-btn-circle:hover {
    background: var(--gold-primary);
    color: #000;
}

.hp-numeric-display {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold-bright);
}

.hp-bar-track {
    height: 14px;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid var(--wood-border);
    border-radius: 7px;
    overflow: hidden;
}

.hp-bar-fill-animated {
    height: 100%;
    background: var(--hp-green);
    border-radius: 6px;
    transition: width 0.4s ease, background-color 0.4s ease;
}

/* Toast Container */
.toast-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 12000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(20, 12, 8, 0.95);
    border: 1px solid var(--gold-primary);
    color: var(--text-gold);
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.8), 0 0 15px var(--gold-glow);
    font-family: 'Cinzel', serif;
    animation: toastIn 0.3s ease-out;
}

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 11000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wooden-modal {
    background: linear-gradient(135deg, rgba(35, 20, 12, 0.96), rgba(15, 8, 5, 0.98));
    border: 3px solid var(--gold-primary);
    border-radius: 16px;
    padding: 40px;
    max-width: 520px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 60px rgba(0,0,0,0.95), 0 0 25px var(--gold-glow);
    backdrop-filter: blur(10px);
}

.modal-crown {
    font-size: 3.5rem;
    color: var(--gold-primary);
    margin-bottom: 12px;
}

@media (max-width: 900px) {
    .setup-split-container {
        grid-template-columns: 1fr;
    }
    .combatants-cards-list {
        grid-template-columns: 1fr;
    }
    .add-enemy-grid, .add-enemy-grid.mini, .boss-grid-inputs, .boss-textareas-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   SEZIONI CADUTI & SCONFITTI A FINE PLANCIA
   ========================================================================== */
.fallen-section {
    margin-top: 35px;
    border-radius: 14px;
    padding: 20px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.fallen-heroes-panel {
    background: linear-gradient(180deg, rgba(32, 14, 10, 0.88) 0%, rgba(18, 8, 5, 0.92) 100%);
    border: 1.5px solid rgba(229, 115, 115, 0.6);
    box-shadow: 0 0 20px rgba(211, 47, 47, 0.25);
}

.defeated-enemies-panel {
    background: linear-gradient(180deg, rgba(20, 15, 12, 0.82) 0%, rgba(12, 8, 6, 0.88) 100%);
    border: 1.5px dashed rgba(160, 140, 120, 0.4);
}

.fallen-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.fallen-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fallen-header-left h3 {
    font-size: 1.15rem;
    color: var(--gold-bright);
    margin: 0;
}

.icon-fallen-hero {
    color: #ef5350;
    font-size: 1.3rem;
}

.icon-defeated-enemy {
    color: #9e9e9e;
    font-size: 1.3rem;
}

.fallen-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

.fallen-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 16px;
}

.fallen-card {
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    transition: all 0.25s ease;
}

.fallen-hero-card {
    background: rgba(26, 12, 8, 0.9);
    border: 1.5px solid rgba(239, 83, 80, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.fallen-hero-card.permanently-dead-card {
    opacity: 0.65;
    background: rgba(15, 6, 6, 0.9);
    border-color: rgba(120, 40, 40, 0.5);
}

.defeated-enemy-card {
    background: rgba(16, 10, 8, 0.7);
    border: 1px solid rgba(120, 100, 90, 0.3);
    opacity: 0.7;
    filter: grayscale(40%);
}

.fallen-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.fallen-token {
    filter: grayscale(70%) brightness(0.85);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8) !important;
}

.fallen-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fallen-hero-name, .fallen-enemy-name {
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-gold);
    display: flex;
    align-items: center;
    gap: 8px;
}

.fallen-hero-meta, .fallen-enemy-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.fallen-status-pill {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.down-pill {
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    color: #fff;
    box-shadow: 0 0 8px rgba(211, 47, 47, 0.6);
}

.dead-pill {
    background: #37474f;
    color: #b0bec5;
    border: 1px solid #546e7a;
}

.defeated-pill {
    background: rgba(60, 40, 35, 0.85);
    color: #cfd8dc;
    border: 1px solid rgba(120, 90, 80, 0.5);
}

.fallen-card-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.revive-hero-btn {
    background: linear-gradient(180deg, #2e7d32 0%, #1b5e20 100%) !important;
    color: #fff !important;
    border-color: #81c784 !important;
    font-weight: 700 !important;
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.5) !important;
    white-space: nowrap;
}

.revive-hero-btn:hover {
    background: linear-gradient(180deg, #43a047 0%, #2e7d32 100%) !important;
    box-shadow: 0 0 18px rgba(129, 199, 132, 0.8) !important;
}

.declare-dead-btn {
    background: rgba(40, 20, 20, 0.8) !important;
    border-color: #e57373 !important;
    color: #ffcdd2 !important;
    font-size: 0.72rem !important;
    white-space: nowrap;
}

.declare-dead-btn:hover {
    background: #c62828 !important;
    color: #fff !important;
}

.defeated-badge-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.defeated-subnote, .dead-note-tag {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-style: italic;
}

.queue-empty-msg {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    padding: 6px 12px;
}

/* Background Peek Mode */
.unified-dragon-board.peek-bg-active {
    opacity: 0.12 !important;
    backdrop-filter: blur(0px) !important;
    -webkit-backdrop-filter: blur(0px) !important;
    transition: opacity 0.4s ease;
}

.unified-dragon-board.peek-bg-active:hover {
    opacity: 0.85 !important;
}
