/* =========================================
   WHISKEY & BULLETS — FRONTIER NIGHTS
   Dark, cinematic Western game UI
   ========================================= */

:root {
    /* ---- Color Palette ---- */
    --bg-void: #060504;
    --bg-deep: #0d0a07;
    --bg-dark: #161110;
    --bg-medium: #1e1814;
    --bg-warm: #28201a;
    --bg-surface: #302620;

    --surface: rgba(40, 32, 26, 0.65);
    --surface-elevated: rgba(48, 38, 30, 0.8);
    --surface-hover: rgba(56, 44, 34, 0.7);

    --accent-ember: #e8732a;
    --accent-gold: #b89a42;
    --accent-copper: #a07850;
    --accent-blood: #7a1a1a;
    --accent-iron: #5a5048;

    --text-bone: #e4d5c1;
    --text-dust: #a89478;
    --text-ash: #6b5a48;

    --success: #4a8c32;
    --danger: #b83a2a;
    --warning: #c48a18;
    --info: #4a7c9c;

    /* ---- Typography ---- */
    --font-display: 'Cinzel Decorative', serif;
    --font-header: 'Rye', serif;
    --font-body: 'Alegreya', serif;
    --font-mono: 'IBM Plex Mono', monospace;

    /* ---- Scale ---- */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.75rem;

    /* ---- Spacing ---- */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* ---- Borders ---- */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;

    /* ---- Shadows ---- */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px rgba(232, 115, 42, 0.12);
    --shadow-glow-strong: 0 0 35px rgba(232, 115, 42, 0.22);

    /* ---- Transitions ---- */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   BASE STYLES
   ========================================= */

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

html {
    overflow-x: hidden;
}

body {
    background: var(--bg-void);
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(232, 115, 42, 0.035) 0%, transparent 65%),
        radial-gradient(ellipse at 50% 100%, rgba(184, 154, 66, 0.015) 0%, transparent 45%);
    background-attachment: fixed;
    color: var(--text-bone);
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Cinematic vignette overlay */
#app::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    background: radial-gradient(ellipse at center, transparent 45%, rgba(6, 5, 4, 0.45) 100%);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-iron);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-copper);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-header);
    color: var(--accent-ember);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.2;
}

h1 {
    font-size: var(--text-3xl);
}

h2 {
    font-size: var(--text-2xl);
}

h3 {
    font-size: var(--text-xl);
}

h4 {
    font-size: var(--text-lg);
}

a {
    color: var(--accent-ember);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-gold);
}

/* =========================================
   LAYOUT
   ========================================= */

#game-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.game-wrapper {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

#content-area {
    flex: 1;
    padding: var(--space-2xl);
    overflow-y: auto;
    min-height: 0;
}

/* =========================================
   AUTH SCREENS
   ========================================= */

#auth-container {
    max-width: 420px;
    margin: 12vh auto;
    padding: var(--space-2xl) var(--space-xl);
    background: var(--bg-medium);
    border: 1px solid rgba(232, 115, 42, 0.1);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    position: relative;
}

#auth-container::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-xl);
    padding: 1px;
    background: linear-gradient(135deg, rgba(232, 115, 42, 0.2), transparent 40%, transparent 60%, rgba(184, 154, 66, 0.15));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

#auth-container h1 {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    text-align: center;
    background: linear-gradient(175deg, #f0a050 0%, var(--accent-ember) 40%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.7));
    margin-bottom: var(--space-2xl);
    letter-spacing: 0.04em;
    line-height: 1.3;
}

#auth-container h2 {
    margin-bottom: var(--space-lg);
    text-align: center;
    font-size: var(--text-xl);
    color: var(--text-dust);
}

#auth-container p {
    text-align: center;
    margin-top: var(--space-md);
    color: var(--text-dust);
}

#auth-container a {
    color: var(--accent-ember);
    font-weight: 600;
}

#auth-container a:hover {
    color: var(--accent-gold);
}

/* =========================================
   GAME HEADER
   ========================================= */

#game-header {
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-deep) 100%);
    border-bottom: 1px solid rgba(232, 115, 42, 0.15);
    padding: var(--space-sm) var(--space-2xl);
    text-align: center;
    position: relative;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

#game-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-ember), transparent);
    opacity: 0.5;
}

.text-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-display);
    padding: 6px 0;
}

.logo-whiskey,
.logo-bullets {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--accent-ember);
    text-shadow: 0 0 18px rgba(232, 115, 42, 0.35);
}

.logo-ampersand {
    font-size: 18px;
    color: var(--accent-copper);
    opacity: 0.5;
    text-shadow: none;
}

/* =========================================
   STATUS BAR — RUGGED GAME HUD
   ========================================= */

#status-bar {
    background:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.03) 2px,
            rgba(0, 0, 0, 0.03) 4px
        ),
        linear-gradient(180deg, rgba(30, 22, 18, 0.97) 0%, rgba(18, 13, 10, 0.98) 100%);
    border-bottom: 2px solid rgba(232, 115, 42, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(232, 115, 42, 0.15);
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Row 1 — Primary stats */
.status-row-primary {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 6px var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.status-player {
    color: var(--accent-gold);
    font-size: var(--text-sm);
    font-weight: 700;
    white-space: nowrap;
    text-shadow: 0 0 8px rgba(232, 175, 42, 0.3);
}

.status-player i {
    color: var(--accent-ember);
    margin-right: 4px;
    text-shadow: 0 0 6px rgba(232, 115, 42, 0.4);
}

.status-stats-primary {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
    flex-wrap: wrap;
}

/* Stat badges — raised plate look */
.status-stat {
    color: var(--text-dust);
    font-size: var(--text-xs);
    font-family: 'Crimson Text', serif;
    font-weight: 600;
    white-space: nowrap;
    padding: 3px 10px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.status-stat i {
    margin-right: 4px;
    font-size: 0.7rem;
}

.status-level i {
    color: var(--accent-gold);
    text-shadow: 0 0 6px rgba(232, 175, 42, 0.5);
}

.status-craft-level i {
    color: #cd7f32;
    text-shadow: 0 0 6px rgba(205, 127, 50, 0.4);
}

/* HP bar */
.status-hp {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    position: relative;
}

.status-hp-label i {
    color: #e74c3c;
    font-size: 0.75rem;
    text-shadow: 0 0 6px rgba(231, 76, 60, 0.5);
}

.status-hp-track {
    width: 80px;
    height: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.status-hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #c0392b, #e74c3c);
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
}

.status-hp-fill.hp-critical {
    background: linear-gradient(90deg, #7b1a1a, #a01515);
    animation: hp-pulse 1.5s ease-in-out infinite;
}

@keyframes hp-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

.status-hp-text {
    color: var(--text-dust);
    font-size: 0.65rem;
    font-family: 'Crimson Text', serif;
    font-weight: 600;
}

.status-hp-timer {
    color: #e74c3c;
    font-size: 0.6rem;
    font-family: 'Crimson Text', serif;
    opacity: 0.8;
}

.status-hp-timer.hp-slowed {
    color: #e67e22;
}

.status-hp-timer.hp-blocked {
    color: #e74c3c;
    animation: hp-pulse 1.5s ease-in-out infinite;
}

.status-hp-timer.hp-full {
    color: #2ecc71;
    opacity: 1;
}

/* HP hover tooltip */
.status-hp-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background:
        repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(0,0,0,0.02) 2px, rgba(0,0,0,0.02) 4px),
        rgba(20, 15, 12, 0.96);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 6px;
    padding: 8px 12px;
    white-space: nowrap;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    font-size: 0.7rem;
    font-family: 'Crimson Text', serif;
    color: var(--text-dust);
    line-height: 1.5;
}

.status-hp:hover .status-hp-tooltip {
    display: block;
}

.status-hp-tooltip .tooltip-label {
    color: #e74c3c;
    font-weight: 700;
}

.status-hp-tooltip .tooltip-warning {
    color: #e67e22;
}

.status-hp-tooltip .tooltip-blocked {
    color: #e74c3c;
    font-weight: 700;
}

/* Energy bar + timer */
.status-energy {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    position: relative;
}

.status-energy-label i {
    color: #2ecc71;
    font-size: 0.75rem;
    text-shadow: 0 0 6px rgba(46, 204, 113, 0.5);
}

.status-energy-track {
    width: 70px;
    height: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.status-energy-fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.status-energy-text {
    color: var(--text-dust);
    font-size: 0.65rem;
    font-family: 'Crimson Text', serif;
    font-weight: 600;
}

.status-energy-timer {
    color: #2ecc71;
    font-size: 0.6rem;
    font-family: 'Crimson Text', serif;
    opacity: 0.8;
}

.status-energy-timer.energy-full {
    color: #2ecc71;
    opacity: 1;
}

/* Energy hover tooltip */
.status-energy-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.02) 2px,
            rgba(0, 0, 0, 0.02) 4px
        ),
        rgba(20, 15, 12, 0.96);
    border: 1px solid rgba(232, 115, 42, 0.3);
    border-radius: 6px;
    padding: 8px 12px;
    white-space: nowrap;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    font-size: 0.7rem;
    font-family: 'Crimson Text', serif;
    color: var(--text-dust);
    line-height: 1.5;
}

.status-energy:hover .status-energy-tooltip {
    display: block;
}

.status-energy-tooltip .tooltip-label {
    color: #2ecc71;
    font-weight: 700;
}

/* XP bar */
.status-xp {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.status-xp-label {
    color: var(--accent-gold);
    font-size: var(--text-xs);
    font-family: 'Crimson Text', serif;
    font-weight: 600;
    text-shadow: 0 0 6px rgba(232, 175, 42, 0.4);
}

.status-xp-track {
    width: 80px;
    height: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.status-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-ember), var(--accent-gold));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.status-xp-text {
    color: var(--text-dust);
    font-size: 0.65rem;
    font-family: 'Crimson Text', serif;
    font-weight: 600;
}

/* Row 2 — Secondary stats */
.status-row-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: 4px var(--space-lg);
}

.status-combat-stats,
.status-economy {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-pill {
    color: var(--text-dust);
    font-size: 0.65rem;
    font-family: 'Crimson Text', serif;
    font-weight: 600;
    white-space: nowrap;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.status-pill i {
    margin-right: 3px;
    font-size: 0.6rem;
}

/* Combat stat colors */
.status-str i { color: #e74c3c; text-shadow: 0 0 4px rgba(231, 76, 60, 0.4); }
.status-agi i { color: #3498db; text-shadow: 0 0 4px rgba(52, 152, 219, 0.4); }
.status-spd i { color: #2ecc71; text-shadow: 0 0 4px rgba(46, 204, 113, 0.4); }
.status-lck i { color: var(--accent-gold); text-shadow: 0 0 4px rgba(232, 175, 42, 0.4); }

/* Penalized stat */
.status-pill.stat-penalized {
    color: #e57373;
    border-color: rgba(229, 115, 115, 0.2);
}

.status-pill .penalty-arrow {
    font-size: 0.5rem;
    margin-left: 2px;
    color: #e57373;
}

/* Economy */
.status-cash i { color: var(--accent-gold); text-shadow: 0 0 4px rgba(232, 175, 42, 0.4); }
.status-bank i { color: #8e8e8e; text-shadow: 0 0 4px rgba(142, 142, 142, 0.3); }
.status-sp i { color: #3498db; text-shadow: 0 0 4px rgba(52, 152, 219, 0.4); }

/* Buff/debuff icons */
.status-buffs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-buff-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    color: #fff;
    cursor: default;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.status-buff-icon.buff-bordello { background: rgba(233, 30, 99, 0.7); }
.status-buff-icon.buff-companion { background: rgba(156, 39, 176, 0.7); }
.status-buff-icon.buff-pain-relief { background: rgba(33, 150, 243, 0.7); }
.status-buff-icon.buff-injury { background: rgba(244, 67, 54, 0.7); }

.status-buff-icon .buff-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #c62828;
    color: #fff;
    font-size: 0.5rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Buff tooltip */
.status-buff-icon .buff-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 15, 12, 0.96);
    border: 1px solid rgba(232, 115, 42, 0.3);
    border-radius: 6px;
    padding: 6px 10px;
    white-space: nowrap;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    font-size: 0.65rem;
    font-family: 'Crimson Text', serif;
    color: var(--text-dust);
}

.status-buff-icon:hover .buff-tooltip {
    display: block;
}

/* Logout button */
.status-logout {
    padding: 3px 8px;
    font-size: 0.7rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dust);
    box-shadow: none;
    white-space: nowrap;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, color 0.2s;
}

.status-logout:hover {
    opacity: 1;
    color: var(--accent-ember);
    border-color: var(--accent-ember);
    box-shadow: none;
    transform: none;
}

/* Status bar mobile responsive */
@media (max-width: 768px) {
    .status-row-primary {
        padding: 4px var(--space-sm);
        gap: var(--space-xs);
        flex-wrap: wrap;
    }

    .status-stats-primary {
        gap: 6px;
    }

    .status-hp-track,
    .status-energy-track,
    .status-xp-track {
        width: 50px;
        height: 8px;
    }

    .status-row-secondary {
        padding: 3px var(--space-sm);
        gap: var(--space-xs);
        flex-wrap: wrap;
        justify-content: center;
    }

    .status-energy-timer {
        display: none;
    }

    .status-player {
        font-size: var(--text-xs);
    }

    .status-stat {
        padding: 2px 6px;
        font-size: 0.6rem;
    }

    .status-pill {
        padding: 1px 5px;
        font-size: 0.58rem;
    }

    .status-buff-icon {
        width: 18px;
        height: 18px;
        font-size: 0.5rem;
    }
}

@media (max-width: 480px) {
    .status-row-secondary .status-combat-stats {
        display: none;
    }
}

/* =========================================
   COOKIE CONSENT BANNER
   ========================================= */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--bg-dark);
    border-top: 2px solid var(--accent-gold);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(232, 175, 42, 0.15);
    padding: 14px 24px;
    animation: cookieSlideUp 0.4s ease-out;
    font-family: 'Crimson Text', serif;
}

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

.cookie-banner-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-text {
    color: var(--text-dust);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
    flex: 1;
}

.cookie-text i {
    color: var(--accent-gold);
    margin-right: 6px;
}

.cookie-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 8px 18px;
    border-radius: 4px;
    font-family: 'Rye', cursive;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-ember));
    color: var(--bg-midnight);
    border: 1px solid var(--accent-gold);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.cookie-btn-accept:hover {
    background: linear-gradient(135deg, #f0c850, var(--accent-gold));
    box-shadow: 0 0 12px rgba(232, 175, 42, 0.4);
}

.cookie-btn-reject {
    background: transparent;
    color: var(--text-dust);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.cookie-btn-reject:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.cookie-btn-manage {
    background: none;
    border: none;
    color: var(--accent-gold);
    font-family: 'Crimson Text', serif;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 4px;
    white-space: nowrap;
}

.cookie-btn-manage:hover {
    color: #f0c850;
}

/* Preferences panel */
.cookie-preferences {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cookie-pref-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}

.cookie-pref-row + .cookie-pref-row {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.cookie-pref-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cookie-pref-name {
    color: var(--text-dust);
    font-size: 0.9rem;
    font-weight: 700;
}

.cookie-pref-desc {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
}

/* Toggle switch */
.cookie-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
}

.cookie-toggle input {
    display: none;
}

.cookie-toggle-slider {
    width: 40px;
    height: 22px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 11px;
    position: relative;
    transition: background 0.25s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cookie-toggle-slider::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #888;
    top: 2px;
    left: 3px;
    transition: all 0.25s ease;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: rgba(232, 175, 42, 0.25);
    border-color: var(--accent-gold);
}

.cookie-toggle input:checked + .cookie-toggle-slider::after {
    background: var(--accent-gold);
    left: 19px;
    box-shadow: 0 0 6px rgba(232, 175, 42, 0.4);
}

.cookie-toggle-disabled {
    cursor: default;
    opacity: 0.6;
}

.cookie-toggle-label {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.7rem;
    font-style: italic;
}

.cookie-btn-save {
    margin-top: 12px;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-ember));
    color: var(--bg-midnight);
    border: 1px solid var(--accent-gold);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.cookie-btn-save:hover {
    background: linear-gradient(135deg, #f0c850, var(--accent-gold));
    box-shadow: 0 0 12px rgba(232, 175, 42, 0.4);
}

/* Cookie settings link on auth page */
.cookie-settings-link {
    margin-top: 16px;
    text-align: center;
}

.cookie-settings-link a {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.75rem;
    text-decoration: none;
    font-family: 'Crimson Text', serif;
    transition: color 0.2s ease;
}

.cookie-settings-link a:hover {
    color: var(--accent-gold);
}

.cookie-settings-link i {
    margin-right: 4px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 12px 16px;
    }

    .cookie-banner-main {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .cookie-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* =========================================
   SIDEBAR NAVIGATION
   ========================================= */

#sidebar {
    width: 260px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-void) 100%);
    border-right: 1px solid rgba(232, 115, 42, 0.06);
    padding: 0;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Sidebar Header */
.sidebar-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-lg) var(--space-md);
}

.sidebar-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-medium);
    border: 2px solid var(--accent-ember);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--accent-ember);
    box-shadow: 0 0 12px rgba(232, 115, 42, 0.2);
    flex-shrink: 0;
}

.sidebar-player-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.sidebar-player-name {
    font-family: var(--font-header);
    font-size: var(--text-sm);
    color: var(--text-bone);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-player-level {
    font-size: var(--text-xs);
    color: var(--text-ash);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-family: var(--font-mono);
}

/* Sidebar Divider */
.sidebar-divider {
    height: 1px;
    margin: var(--space-sm) var(--space-xl);
    background: linear-gradient(90deg, transparent, var(--accent-iron), transparent);
    opacity: 0.5;
    position: relative;
}

.sidebar-divider::after {
    content: '✦';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 8px;
    color: var(--accent-iron);
    background: var(--bg-deep);
    padding: 0 8px;
}

/* Navigation Sections */
.nav-section {
    padding: var(--space-xs) var(--space-md);
}

.nav-section-title {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-ash);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    padding: var(--space-xs) var(--space-sm);
    margin-bottom: var(--space-xs);
}

#sidebar ul {
    list-style: none;
}

#sidebar li {
    margin-bottom: 1px;
}

#sidebar a {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 9px var(--space-md);
    color: var(--text-dust);
    text-decoration: none;
    font-family: var(--font-header);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

#sidebar a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent-ember);
    border-radius: 0 2px 2px 0;
    transform: scaleY(0);
    transition: transform var(--transition-base);
}

#sidebar a::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(232, 115, 42, 0.06), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

#sidebar a:hover {
    color: var(--text-bone);
}

#sidebar a:hover::after {
    opacity: 1;
}

#sidebar a.active {
    color: var(--accent-ember);
    background: rgba(232, 115, 42, 0.05);
}

#sidebar a.active::before {
    transform: scaleY(1);
}

#sidebar a.active::after {
    opacity: 1;
}

#sidebar i {
    font-size: var(--text-lg);
    width: 22px;
    text-align: center;
    position: relative;
    z-index: 1;
    transition: transform var(--transition-fast);
}

#sidebar .sidebar-icon {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
    position: relative;
    z-index: 1;
    transition: transform var(--transition-fast), filter var(--transition-fast);
    flex-shrink: 0;
}

#sidebar a:hover i,
#sidebar a:hover .sidebar-icon {
    transform: scale(1.12);
}

#sidebar a.active .sidebar-icon {
    filter: brightness(1.15) saturate(1.2);
}

#sidebar a span {
    position: relative;
    z-index: 1;
}

/* =========================================
   PANELS & CARDS
   ========================================= */

#stats-panel,
#medical-panel,
#actions-panel,
#bank-panel,
#shop-panel,
#saloon-panel,
#inventory-panel {
    background: var(--surface);
    border: 1px solid rgba(232, 115, 42, 0.07);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-lg);
}

#stats-panel h3,
#medical-panel h3,
#actions-panel h3,
#bank-panel h3,
#shop-panel h3,
#saloon-panel h2,
#inventory-panel h3 {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(232, 115, 42, 0.08);
}

/* Medical Panel */
#medical-panel h3 {
    color: #e74c3c;
}

.med-buff {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    margin-bottom: var(--space-sm);
    background: rgba(46, 204, 113, 0.06);
    border: 1px solid rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

.med-injury {
    display: flex;
    align-items: stretch;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
    overflow: hidden;
    border: 1px solid rgba(232, 115, 42, 0.06);
}

.med-injury-color {
    width: 4px;
    flex-shrink: 0;
}

.med-injury.minor .med-injury-color { background: #f1c40f; }
.med-injury.moderate .med-injury-color { background: #e67e22; }
.med-injury.serious .med-injury-color { background: #e74c3c; }
.med-injury.critical .med-injury-color { background: #ff4444; }

.med-injury-body {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
}

.med-injury-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.med-injury-name {
    font-family: var(--font-header);
    font-size: var(--text-sm);
    color: var(--text-bone);
}

.med-injury-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.7rem;
}

.med-injury-part {
    color: var(--text-dust);
}

.med-injury-badge {
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
}

.med-injury-badge.minor { background: rgba(241, 196, 15, 0.15); color: #f1c40f; }
.med-injury-badge.moderate { background: rgba(230, 126, 34, 0.15); color: #e67e22; }
.med-injury-badge.serious { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }
.med-injury-badge.critical { background: rgba(142, 36, 36, 0.2); color: #ff4444; }

.med-tag-bleed {
    color: #e74c3c;
}

.med-tag-infect {
    color: #8e44ad;
}

.med-tag-risk {
    color: #e67e22;
}

.med-view-btn {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.65rem;
    background: rgba(232, 115, 42, 0.06);
    border: 1px solid rgba(232, 115, 42, 0.15);
    color: var(--accent-ember);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.med-view-btn:hover {
    background: rgba(232, 115, 42, 0.15);
}

.med-scars {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    padding-top: var(--space-sm);
    margin-top: var(--space-sm);
    border-top: 1px solid rgba(232, 115, 42, 0.06);
}

.med-scar-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.7rem;
    background: rgba(90, 80, 72, 0.12);
    color: var(--accent-iron);
    border: 1px solid rgba(90, 80, 72, 0.2);
}

/* =========================================
   BUTTONS
   ========================================= */

button {
    font-family: var(--font-header);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: 600;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left var(--transition-slow);
}

button:hover::before {
    left: 100%;
}

button,
.btn-primary {
    background: linear-gradient(135deg, var(--accent-ember) 0%, #c45d1a 100%);
    color: var(--text-bone);
    padding: var(--space-md) var(--space-xl);
    box-shadow: 0 4px 14px rgba(232, 115, 42, 0.2);
}

button:hover,
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(232, 115, 42, 0.3);
}

button:active,
.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(232, 115, 42, 0.2);
}

button:disabled {
    background: rgba(90, 80, 72, 0.4) !important;
    color: var(--text-ash);
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

button:disabled:hover {
    transform: none !important;
}

button:disabled::before {
    display: none;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--accent-ember);
    color: var(--accent-ember);
    padding: calc(var(--space-md) - 1px) calc(var(--space-xl) - 1px);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(232, 115, 42, 0.08);
    box-shadow: var(--shadow-glow);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #8a2a1e 100%);
    color: var(--text-bone);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #3a6c28 100%);
    color: var(--text-bone);
}

.action-btn {
    width: 100%;
    margin-bottom: var(--space-md);
    padding: var(--space-lg) var(--space-xl);
    font-size: var(--text-base);
    cursor: crosshair;
}

/* =========================================
   FORMS & INPUTS
   ========================================= */

input,
select {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(232, 115, 42, 0.12);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: var(--text-base);
    padding: var(--space-md);
    color: var(--text-bone);
    width: 100%;
    margin-bottom: var(--space-md);
    transition: all var(--transition-fast);
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent-ember);
    background: rgba(0, 0, 0, 0.45);
    box-shadow: 0 0 0 3px rgba(232, 115, 42, 0.08), var(--shadow-glow);
}

input::placeholder {
    color: var(--text-ash);
}

select option {
    background: var(--bg-dark);
    color: var(--text-bone);
}

/* Password Input */
.password-input-wrapper {
    position: relative;
    margin-bottom: var(--space-md);
}

.password-input-wrapper input {
    margin-bottom: 0;
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    height: 70%;
    width: 40px;
    min-height: 40px;
    padding: 0;
    background: rgba(232, 115, 42, 0.08);
    border: 1px solid rgba(232, 115, 42, 0.15);
    border-radius: var(--radius-sm);
    color: var(--text-ash);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: auto;
    box-shadow: none;
}

.toggle-password:hover {
    background: rgba(232, 115, 42, 0.15);
    color: var(--accent-ember);
    border-color: var(--accent-ember);
    box-shadow: none;
    transform: translateY(-50%);
}

.toggle-password i {
    font-size: 0.9rem;
}

.password-requirements {
    margin-top: -8px;
    margin-bottom: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: rgba(232, 115, 42, 0.05);
    border-radius: var(--radius-sm);
    border-left: 2px solid var(--accent-ember);
}

.password-requirements small {
    color: var(--text-dust);
    font-size: 0.85rem;
}

/* =========================================
   STATS & HOME LAYOUT
   ========================================= */

#stats-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-sm);
}

#stats-list li {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(232, 115, 42, 0.05);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: all var(--transition-fast);
}

#stats-list li:hover {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(232, 115, 42, 0.12);
    transform: translateX(3px);
}

#stats-list i {
    font-size: var(--text-xl);
    color: var(--accent-ember);
    width: 28px;
    text-align: center;
    opacity: 0.85;
}

#stats-list span {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-bone);
}

.game-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

/* =========================================
   COMPACT ITEM LIST
   ========================================= */

.item-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: var(--space-md);
}

.item-row {
    background: var(--surface);
    border: 1px solid rgba(232, 115, 42, 0.06);
    border-left: 3px solid var(--accent-iron);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    overflow: hidden;
}

.item-row:hover {
    background: var(--surface-hover);
    border-color: rgba(232, 115, 42, 0.12);
}

.item-row.expanded {
    border-color: rgba(232, 115, 42, 0.2);
    background: var(--surface-elevated);
}

/* Rarity left borders */
.item-row.rarity-common {
    border-left-color: #7a7068;
}

.item-row.rarity-uncommon {
    border-left-color: #4a8c32;
}

.item-row.rarity-rare {
    border-left-color: #3a78c4;
}

.item-row.rarity-epic {
    border-left-color: #8a4cc8;
}

.item-row.rarity-legendary {
    border-left-color: var(--accent-gold);
    box-shadow: 0 0 10px rgba(184, 154, 66, 0.1);
}

.item-row-summary {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 10px var(--space-md);
    min-height: 44px;
}

.item-row-icon {
    font-size: 1.3em;
    color: var(--accent-copper);
    width: 36px;
    height: 36px;
    text-align: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-row-icon .item-icon-img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
}

.item-row-name {
    font-family: var(--font-header);
    font-size: var(--text-sm);
    color: var(--text-bone);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.item-row-qty {
    color: var(--text-ash);
    font-size: var(--text-xs);
    margin-left: 4px;
}

.item-row-badges {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-shrink: 0;
}

.item-row-badges .rarity-badge {
    font-size: 0.6em;
    padding: 1px 6px;
}

.item-row-badges .slot-badge {
    font-size: 0.55em;
    padding: 1px 5px;
    margin-left: 0;
}

.item-row-price {
    color: var(--accent-gold);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 55px;
    text-align: right;
}

.item-row-chevron {
    color: var(--text-ash);
    font-size: var(--text-sm);
    transition: transform var(--transition-fast);
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

.item-row.expanded .item-row-chevron {
    transform: rotate(180deg);
}

.item-row-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.item-row.expanded .item-row-details {
    max-height: 400px;
}

.item-row-details-inner {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid rgba(232, 115, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.item-row-description {
    color: var(--text-dust);
    font-style: italic;
    font-size: var(--text-sm);
    line-height: 1.4;
}

.item-row-stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-lg);
    font-size: var(--text-sm);
}

.item-row-stats span {
    color: var(--text-dust);
}

.item-row-stats strong {
    color: var(--accent-ember);
}

.item-row-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    flex-wrap: wrap;
}

.item-row-actions button {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
    flex: 1;
    min-width: 100px;
}

.item-row-actions input {
    flex: 1;
    min-width: 100px;
    margin-bottom: 0;
    padding: var(--space-sm) var(--space-md);
}

.purchase-limit-badge {
    font-size: var(--text-xs);
    color: var(--accent-ember);
    font-weight: 700;
    white-space: nowrap;
}

.item-row-seller {
    color: var(--text-ash);
    font-size: var(--text-xs);
}

.item-row-equipped {
    color: var(--success);
    font-size: var(--text-xs);
    font-weight: bold;
    text-transform: uppercase;
}

/* Section headers in item lists */
.item-list-section {
    padding: var(--space-sm) var(--space-md);
    margin-top: var(--space-md);
    background: rgba(232, 115, 42, 0.06);
    border-radius: var(--radius-sm);
    color: var(--accent-ember);
    font-family: var(--font-header);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.item-list-section:first-child {
    margin-top: 0;
}

/* =========================================
   RARITY SYSTEM
   ========================================= */

.rarity-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 0.7em;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 4px;
    letter-spacing: 0.05em;
}

.rarity-badge.common {
    background: #7a7068;
    color: #e4d5c1;
}

.rarity-badge.uncommon {
    background: #4a8c32;
    color: #e4f0d8;
}

.rarity-badge.rare {
    background: #3a78c4;
    color: #d8e8f8;
}

.rarity-badge.epic {
    background: #8a4cc8;
    color: #e8d8f8;
}

.rarity-badge.legendary {
    background: var(--accent-gold);
    color: #1a1410;
}

.item-card.rarity-common {
    border: 1px solid #7a7068;
}

.item-card.rarity-uncommon {
    border: 1px solid #4a8c32;
}

.item-card.rarity-rare {
    border: 1px solid #3a78c4;
}

.item-card.rarity-epic {
    border: 1px solid #8a4cc8;
}

.item-card.rarity-legendary {
    border: 1px solid var(--accent-gold);
    box-shadow: 0 0 12px rgba(184, 154, 66, 0.2);
}

.slot-badge {
    display: inline-block;
    padding: 2px 6px;
    background: var(--accent-iron);
    color: var(--text-bone);
    border-radius: 3px;
    font-size: 0.65em;
    text-transform: uppercase;
    margin-left: 4px;
}

.level-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75em;
    font-weight: bold;
}

.level-badge.locked {
    background: var(--danger);
    color: var(--text-bone);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

/* Inventory sections */
.inventory-section-header {
    grid-column: 1 / -1;
    margin-top: 18px;
    padding: 8px;
    background: rgba(232, 115, 42, 0.1);
    color: var(--accent-ember);
    border-radius: var(--radius-sm);
    text-align: center;
}

.inventory-section-header h4 {
    margin: 0;
    font-size: 1em;
}

.slot-divider {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4px;
    font-size: 0.85em;
    color: var(--accent-copper);
    border-bottom: 1px solid var(--accent-iron);
    margin: 8px 0;
    font-weight: bold;
}

.item-actions {
    display: flex;
    gap: 5px;
    margin-top: 8px;
}

.sell-btn {
    background: linear-gradient(135deg, var(--danger), #8a2a1e) !important;
    flex: 1;
}

/* PvP grid cards */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.item-card {
    background: var(--surface);
    border: 1px solid rgba(232, 115, 42, 0.08);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
    transition: all var(--transition-base);
}

.item-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(232, 115, 42, 0.15);
}

.item-card h4 {
    font-size: var(--text-base);
    margin: var(--space-sm) 0;
    color: var(--text-bone);
}

.item-card p {
    color: var(--text-dust);
    font-size: var(--text-sm);
    margin-bottom: var(--space-md);
}

.icon-large {
    font-size: 2.5rem;
    color: var(--accent-ember);
    margin-bottom: var(--space-sm);
}

/* =========================================
   SLOT MACHINE
   ========================================= */

#slot-machine-frame {
    display: flex;
    gap: 10px;
    background: linear-gradient(135deg, #0a0806 0%, #1a1410 50%, #0a0806 100%);
    padding: 32px 22px 22px 22px;
    border-radius: 18px;
    border: 6px solid transparent;
    background-image:
        linear-gradient(#0a0806, #0a0806),
        linear-gradient(135deg, var(--accent-ember) 0%, #c45d1a 25%, var(--accent-ember) 50%, var(--accent-copper) 75%, var(--accent-ember) 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow:
        inset 0 2px 10px rgba(255, 255, 255, 0.05),
        inset 0 -3px 10px rgba(0, 0, 0, 0.7),
        0 10px 30px rgba(0, 0, 0, 0.8),
        0 0 50px rgba(232, 115, 42, 0.15);
    margin: 20px auto;
    width: fit-content;
    position: relative;
}

#slot-machine-frame::before {
    content: '⬥ LUCKY 7 ⬥';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--accent-ember);
    font-family: var(--font-header);
    font-size: 0.65em;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(232, 115, 42, 0.6);
}

.reel-window {
    width: clamp(55px, 20vw, 78px);
    height: clamp(70px, 25vw, 98px);
    background: linear-gradient(to bottom, #f0ebe0, #faf6ee, #f0ebe0);
    border: 3px solid #2a2018;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow:
        inset 0 0 15px rgba(0, 0, 0, 0.2),
        inset 0 2px 2px rgba(255, 255, 255, 0.3),
        0 3px 8px rgba(0, 0, 0, 0.4);
}

.reel-window::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 35%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.25), transparent);
    pointer-events: none;
}

.reel-strip {
    font-size: 3.5em;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.15));
}

@keyframes blurSpin {
    0% {
        transform: translateY(-5px) scale(0.95);
        filter: blur(3px);
    }

    25% {
        transform: translateY(5px) scale(1.05);
        filter: blur(5px);
    }

    50% {
        transform: translateY(-5px) scale(0.95);
        filter: blur(3px);
    }

    75% {
        transform: translateY(5px) scale(1.05);
        filter: blur(5px);
    }

    100% {
        transform: translateY(-5px) scale(0.95);
        filter: blur(3px);
    }
}

.spinning .reel-strip {
    animation: blurSpin 0.08s infinite linear;
}

@keyframes landingBounce {
    0% {
        transform: translateY(-25px) scale(1.1);
    }

    50% {
        transform: translateY(8px) scale(0.95);
    }

    75% {
        transform: translateY(-5px) scale(1.02);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

.reel-stop {
    animation: landingBounce 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* =========================================
   SALOON GAMES
   ========================================= */

.saloon-game {
    background: var(--surface);
    border: 1px solid rgba(232, 115, 42, 0.08);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    text-align: center;
}

.saloon-game h4 {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(232, 115, 42, 0.08);
}

.dice-controls {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-width: 400px;
    margin: var(--space-lg) auto;
}

/* =========================================
   LOG PANEL
   ========================================= */

#log-panel {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(232, 115, 42, 0.06);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-top: var(--space-xl);
    max-height: 280px;
    overflow-y: auto;
}

#log-panel h3 {
    margin-bottom: var(--space-md);
}

#log-content p {
    margin: var(--space-sm) 0;
    font-size: var(--text-sm);
    color: var(--text-dust);
    font-family: var(--font-mono);
    opacity: 0.85;
}

/* =========================================
   NPC DIALOGUE / BROTHEL
   ========================================= */

.npc-dialogue {
    background: rgba(232, 115, 42, 0.04);
    border: 1px solid rgba(232, 115, 42, 0.1);
    border-left: 3px solid var(--accent-ember);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.npc-dialogue p {
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.npc-dialogue p:last-child {
    margin-bottom: 0;
}

.npc-dialogue strong {
    color: var(--accent-ember);
    font-family: var(--font-header);
}

.npc-dialogue em {
    color: var(--text-bone);
    font-style: italic;
}

/* Speech Bubble */
.speech-bubble {
    background: #f0e6d0;
    color: #2a1e14;
    border: 2px solid var(--accent-ember);
    border-radius: 14px;
    padding: var(--space-lg);
    position: relative;
    margin-left: 140px;
    overflow: visible;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.speech-bubble::before {
    content: "";
    position: absolute;
    left: -22px;
    top: 30px;
    border: 12px solid transparent;
    border-right-color: var(--accent-ember);
}

.speech-bubble::after {
    content: "";
    position: absolute;
    left: -16px;
    top: 32px;
    border: 10px solid transparent;
    border-right-color: #f0e6d0;
}

.speech-bubble p {
    color: #2a1e14 !important;
    margin-bottom: 10px;
    font-weight: 500;
}

.speech-bubble strong {
    color: var(--accent-blood) !important;
    font-family: var(--font-header);
}

.speech-bubble em {
    color: #4a3828 !important;
}

.npc-portrait {
    float: left;
    max-width: 120px;
    width: 100%;
    height: auto;
    margin: 0 var(--space-lg) var(--space-md) 0;
    border: 2px solid var(--accent-ember);
    border-radius: var(--radius-md);
    box-shadow:
        0 0 18px rgba(232, 115, 42, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: transform 0.3s ease;
    transform-origin: top left;
}

.npc-portrait:hover {
    transform: scale(3);
    z-index: 9999;
    position: relative;
    box-shadow:
        0 0 30px rgba(232, 115, 42, 0.4),
        0 8px 24px rgba(0, 0, 0, 0.7);
}

.npc-dialogue::after {
    content: "";
    display: table;
    clear: both;
}

/* =========================================
   SKILLS - WANTED POSTER BOARD THEME
   ========================================= */

/* Page Layout */
.skills-board {
    background: linear-gradient(180deg, #3d2b1f 0%, #2a1e14 50%, #3d2b1f 100%);
    padding: 20px;
    min-height: 100%;
}

.skills-bounty-banner {
    text-align: center;
    margin-bottom: 24px;
}

.bounty-frame {
    display: inline-block;
    background: linear-gradient(135deg, #d4c5a9 0%, #c4b393 50%, #d9cbb0 100%);
    border: 3px solid #8b7355;
    border-radius: 6px;
    padding: 16px 32px;
    box-shadow: 2px 3px 8px rgba(0,0,0,0.4);
}

.bounty-label {
    text-transform: uppercase;
    font-family: 'Rye', cursive;
    color: var(--accent-gold, #b89a42);
    letter-spacing: 3px;
    font-size: 0.9rem;
    margin: 0 0 4px;
}

.bounty-value {
    font-family: 'Rye', cursive;
    color: var(--accent-gold, #b89a42);
    font-size: 2.5rem;
    margin: 0;
    line-height: 1.2;
}

.bounty-subtitle {
    font-family: 'Crimson Text', serif;
    font-style: italic;
    color: #7a6a58;
    font-size: 0.9rem;
    margin: 4px 0 0;
}

/* Category Layout */
.skills-poster-board {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.skill-category {
    margin-bottom: 8px;
}

.category-sign {
    background: linear-gradient(180deg, #5a3a22 0%, #4a2e18 50%, #5a3a22 100%);
    color: #e8d5b0;
    padding: 12px 24px;
    font-family: 'Rye', cursive;
    font-size: 1.3rem;
    border: 2px solid #3a2210;
    border-radius: 4px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 16px;
    position: relative;
}

.category-combat {
    border-left: 4px solid #7a1a1a;
}

.category-survival {
    border-left: 4px solid #2e5a1e;
}

.category-charisma {
    border-left: 4px solid #5a2e6e;
}

.category-fortune {
    border-left: 4px solid var(--accent-gold, #c9a434);
}

.category-trades {
    border-left: 4px solid var(--accent-copper, #b87333);
}

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

/* Skill Cards (Wanted Poster Style) */
.skill-card {
    background: linear-gradient(135deg, #d4c5a9 0%, #c4b393 30%, #d9cbb0 70%, #c8b898 100%);
    border: 2px solid #8b7355;
    border-radius: 6px;
    padding: 20px 16px;
    text-align: center;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 2px 3px 8px rgba(0,0,0,0.4), inset 0 0 20px rgba(139,115,85,0.2);
    overflow: hidden;
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: 4px 6px 16px rgba(0,0,0,0.5);
}

.skill-card.tier-2 {
    border-color: #c9a434;
    box-shadow: 2px 3px 8px rgba(0,0,0,0.4), 0 0 10px rgba(201,164,52,0.3);
}

.skill-card.tier-3 {
    border-color: #e06030;
    box-shadow: 2px 3px 8px rgba(0,0,0,0.4), 0 0 15px rgba(224,96,48,0.4);
    transform: scale(1.02);
}

.skill-card.tier-3:hover {
    transform: scale(1.02) translateY(-4px);
}

.skill-card.skill-locked {
    opacity: 0.5;
    filter: grayscale(40%);
}

.skill-card.skill-locked:hover {
    transform: none;
    box-shadow: 2px 3px 8px rgba(0,0,0,0.4);
}

/* Card Elements */
.skill-stamp {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(90,58,34,0.15);
    border: 2px solid #8b7355;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 1.5rem;
    color: #5a3a22;
}

.tier-2-stamp {
    border-color: #c9a434;
    color: #c9a434;
}

.tier-3-stamp {
    border-color: #e06030;
    color: #e06030;
    box-shadow: 0 0 8px rgba(224,96,48,0.3);
}

.skill-name {
    font-family: 'Rye', cursive;
    font-size: 1.1rem;
    color: #3a2210;
    margin: 0 0 6px;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.3);
}

.skill-desc {
    font-family: 'Crimson Text', serif;
    font-size: 0.9rem;
    color: #5a4a38;
    margin: 0 0 10px;
    font-style: italic;
}

.skill-effect-text {
    font-family: 'Crimson Text', serif;
    font-size: 0.95rem;
    color: #2e1a08;
    font-weight: 700;
    padding: 4px 8px;
    background: rgba(90,58,34,0.1);
    border-radius: 3px;
    margin-bottom: 10px;
    display: inline-block;
}

/* Level Pips (Bullet Holes) */
.skill-pips {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.skill-pip {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #5a3a22;
    transition: all 0.3s;
}

.skill-pip.filled {
    background: #5a3a22;
    box-shadow: inset 0 0 3px rgba(0,0,0,0.5);
}

.skill-pip.empty {
    background: transparent;
}

/* MAXED Stamp */
.skill-maxed-stamp {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-family: 'Rye', cursive;
    font-size: 2rem;
    color: #7a1a1a;
    border: 3px solid #7a1a1a;
    padding: 4px 16px;
    border-radius: 4px;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
    opacity: 0.7;
    pointer-events: none;
}

/* Requirement Text */
.skill-req {
    font-size: 0.8rem;
    color: #7a1a1a;
    margin-top: 8px;
    font-style: italic;
}

.skill-req i {
    margin-right: 4px;
}

/* Unlock Button (Wax Seal Style) */
.skill-unlock-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #8b7355;
    background: linear-gradient(135deg, #8b7355, #6b5340);
    color: #d4c5a9;
    font-family: 'Rye', cursive;
    font-size: 0.7rem;
    cursor: default;
    margin-top: 8px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.1;
    padding: 4px;
}

.skill-unlock-btn.can-unlock {
    background: linear-gradient(135deg, #c9a434, #a88828);
    border-color: #c9a434;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(201,164,52,0.4);
}

.skill-unlock-btn.can-unlock:hover {
    transform: scale(1.1);
    box-shadow: 0 0 16px rgba(201,164,52,0.6);
}

.skill-unlock-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* =========================================
   QUEST SYSTEM
   ========================================= */

.quest-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.quest-tab,
#quests-tabs button {
    padding: var(--space-sm) var(--space-lg);
    background: var(--surface);
    border: 1px solid var(--accent-iron);
    border-radius: var(--radius-sm);
    color: var(--text-dust);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: none;
}

.quest-tab:hover,
#quests-tabs button:hover {
    background: var(--surface-hover);
    border-color: var(--accent-ember);
    box-shadow: none;
    transform: none;
}

.quest-tab.active,
#quests-tabs button.active {
    background: rgba(232, 115, 42, 0.12);
    border-color: var(--accent-ember);
    color: var(--accent-ember);
}

#quests-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.quests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-md);
}

.quest-card {
    background: var(--surface);
    border: 1px solid rgba(232, 115, 42, 0.08);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: all 0.3s;
}

.quest-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.quest-card.repeatable {
    border-color: var(--info);
}

.quest-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
}

.quest-icon {
    font-size: 2.2em;
    color: var(--accent-ember);
}

.quest-title h4 {
    margin: 0;
    color: var(--text-bone);
    font-size: 1em;
}

.quest-npc {
    margin: 4px 0 0 0;
    font-size: 0.82em;
    color: var(--accent-copper);
}

.quest-desc {
    color: var(--text-dust);
    margin: var(--space-sm) 0;
    font-size: 0.88em;
    line-height: 1.4;
}

.quest-progress {
    margin: var(--space-md) 0;
}

.progress-bar {
    width: 100%;
    height: 18px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 9px;
    overflow: hidden;
    margin-bottom: 4px;
    border: 1px solid rgba(232, 115, 42, 0.06);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-ember), #c45d1a);
    transition: width 0.3s;
    border-radius: 9px;
}

.quest-progress span {
    font-size: 0.82em;
    color: var(--accent-ember);
    font-weight: bold;
    font-family: var(--font-mono);
}

.quest-rewards {
    background: rgba(184, 154, 66, 0.08);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    margin: var(--space-sm) 0;
    color: var(--accent-gold);
    font-size: 0.88em;
}

.quest-cooldown {
    color: var(--danger);
    font-size: 0.82em;
    margin: 4px 0;
}

.quest-completed {
    color: var(--success);
    font-weight: bold;
    text-align: center;
    margin: var(--space-sm) 0;
}

.repeatable-badge {
    color: var(--info);
    font-size: 0.88em;
}

.quest-btn {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: linear-gradient(135deg, var(--success) 0%, #3a6c28 100%);
    color: var(--text-bone);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    margin-top: var(--space-sm);
    font-size: var(--text-sm);
}

.quest-btn:hover {
    background: linear-gradient(135deg, #5aa03a 0%, var(--success) 100%);
    transform: translateY(-2px);
}

.quest-btn.complete {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #a08030 100%);
    color: var(--bg-dark);
}

.quest-btn.complete:hover {
    background: linear-gradient(135deg, #c8a84a 0%, var(--accent-gold) 100%);
}

/* =========================================
   MARKETPLACE
   ========================================= */

#marketplace-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.marketplace-tab {
    padding: var(--space-sm) var(--space-lg);
    background: var(--surface);
    border: 1px solid var(--accent-iron);
    border-radius: var(--radius-sm);
    color: var(--text-dust);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: none;
}

.marketplace-tab:hover {
    background: var(--surface-hover);
    border-color: var(--accent-ember);
    box-shadow: none;
    transform: none;
}

.marketplace-tab.active {
    background: rgba(232, 115, 42, 0.12);
    border-color: var(--accent-ember);
    color: var(--accent-ember);
}

.marketplace-filters {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.marketplace-filters select {
    flex: 1;
    min-width: 140px;
    margin-bottom: 0;
}

/* =========================================
   DUNGEON SYSTEM
   ========================================= */

.combat-stats-panel {
    background: var(--surface);
    border: 2px solid rgba(232, 115, 42, 0.12);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-md);
}

.combat-stats-panel h3 {
    color: var(--accent-ember);
    margin-bottom: var(--space-md);
    text-align: center;
    font-size: 1.2em;
}

.stat-row {
    display: flex;
    justify-content: space-around;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.stat-row span {
    color: var(--text-dust);
    font-size: 1em;
}

.stat-row strong {
    color: var(--accent-ember);
    font-size: 1.1em;
}

.dungeons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-lg);
    padding: var(--space-lg) 0;
}

.dungeon-card {
    background: var(--surface);
    border: 2px solid rgba(232, 115, 42, 0.08);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    position: relative;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.dungeon-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(232, 115, 42, 0.2);
}

.dungeon-card.difficulty-easy {
    border-left: 4px solid var(--success);
}

.dungeon-card.difficulty-medium {
    border-left: 4px solid var(--warning);
}

.dungeon-card.difficulty-hard {
    border-left: 4px solid var(--danger);
}

.dungeon-card.difficulty-extreme {
    border-left: 4px solid #8a4cc8;
    box-shadow: var(--shadow-md), 0 0 20px rgba(138, 76, 200, 0.1);
}

.dungeon-locked {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.85);
    color: var(--danger);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-weight: bold;
    font-size: 0.85em;
}

.dungeon-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.dungeon-icon {
    font-size: 2.5em;
    color: var(--accent-ember);
    text-shadow: 0 0 12px rgba(232, 115, 42, 0.3);
}

.dungeon-title h3 {
    margin: 0 0 4px 0;
    color: var(--text-bone);
    font-size: 1.2em;
}

.difficulty-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.7em;
    font-weight: bold;
    color: var(--text-bone);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dungeon-desc {
    color: var(--text-dust);
    font-style: italic;
    margin: var(--space-sm) 0;
    line-height: 1.4;
    font-size: 0.92em;
}

.boss-info {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(122, 26, 26, 0.3);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin: var(--space-md) 0;
}

.boss-image-container {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-md);
}

.boss-portrait {
    max-width: 180px;
    max-height: 180px;
    border-radius: var(--radius-md);
    border: 2px solid var(--accent-gold);
    box-shadow: 0 0 18px rgba(184, 154, 66, 0.3);
    object-fit: cover;
    transition: transform 0.3s ease;
}

.boss-portrait:hover {
    transform: scale(1.12);
}

.boss-info h4 {
    color: var(--danger);
    margin: 0 0 var(--space-sm) 0;
    font-size: 1.05em;
}

.boss-info p {
    color: var(--text-dust);
    font-size: 0.88em;
    margin: 4px 0 var(--space-sm) 0;
    font-style: italic;
}

.boss-stats {
    display: flex;
    gap: var(--space-md);
    justify-content: space-around;
    margin-top: var(--space-sm);
}

.boss-stats span {
    background: rgba(122, 26, 26, 0.15);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    color: var(--accent-gold);
    font-weight: bold;
    font-size: 0.85em;
}

.dungeon-info {
    display: flex;
    justify-content: space-between;
    gap: var(--space-sm);
    margin: var(--space-md) 0;
    padding: var(--space-sm) var(--space-md);
    background: rgba(232, 115, 42, 0.04);
    border-radius: var(--radius-sm);
}

.dungeon-info span {
    color: var(--text-dust);
    font-size: 0.88em;
}

.dungeon-cooldown {
    color: var(--warning);
    text-align: center;
    font-weight: bold;
    margin: var(--space-sm) 0;
    font-size: 0.92em;
}

.dungeon-btn {
    width: 100%;
    padding: var(--space-md);
    background: linear-gradient(135deg, var(--accent-blood) 0%, #a02020 100%);
    color: var(--text-bone);
    border: 1px solid rgba(184, 58, 42, 0.4);
    border-radius: var(--radius-md);
    font-family: var(--font-header);
    font-size: 1em;
    cursor: crosshair;
    transition: all 0.3s ease;
    margin-top: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dungeon-btn:hover:not(.disabled) {
    background: linear-gradient(135deg, #a02020 0%, #c43030 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(184, 58, 42, 0.3);
}

.dungeon-btn.disabled {
    background: rgba(90, 80, 72, 0.3) !important;
    border-color: var(--accent-iron) !important;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Dungeon Combat Modal */
.dungeon-modal-content {
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
}

.combat-log {
    background: var(--bg-void);
    border: 1px solid rgba(232, 115, 42, 0.08);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    max-height: 380px;
    overflow-y: auto;
    margin: var(--space-lg) 0;
    font-family: var(--font-mono);
}

.combat-boss-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    background: rgba(122, 26, 26, 0.1);
}

.combat-portrait {
    max-width: 220px;
    max-height: 220px;
    border-radius: var(--radius-md);
    border: 3px solid var(--accent-gold);
    box-shadow: 0 0 25px rgba(184, 154, 66, 0.4);
    object-fit: cover;
    margin-bottom: var(--space-sm);
}

.boss-active .combat-portrait {
    animation: boss-pulse 2s infinite;
}

.boss-defeated .combat-portrait {
    filter: grayscale(100%) opacity(0.5);
    border-color: var(--accent-iron);
    box-shadow: none;
}

@keyframes boss-pulse {

    0%,
    100% {
        box-shadow: 0 0 25px rgba(184, 154, 66, 0.4);
    }

    50% {
        box-shadow: 0 0 40px rgba(232, 115, 42, 0.7);
    }
}

.boss-name-label {
    font-family: var(--font-header);
    font-size: 1.2em;
    color: var(--accent-gold);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.boss-defeated .boss-name-label {
    color: var(--accent-iron);
    text-decoration: line-through;
}

.combat-log p {
    color: var(--text-dust);
    margin: 4px 0;
    line-height: 1.5;
    font-size: 0.9em;
    animation-fill-mode: forwards;
}

.combat-log {
    scroll-behavior: smooth;
}

.rewards-section {
    margin: var(--space-lg) 0;
}

.rewards-earned {
    background: rgba(74, 140, 50, 0.1);
    border: 2px solid var(--success);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
}

.rewards-earned h3 {
    color: var(--accent-gold);
    margin-bottom: var(--space-md);
}

.reward-items {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
}

.reward-item {
    background: rgba(74, 140, 50, 0.12);
    border: 1px solid var(--success);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    color: var(--accent-gold);
    font-weight: bold;
    font-size: 0.95em;
}

.defeat-message {
    background: rgba(122, 26, 26, 0.1);
    border: 1px solid var(--danger);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    color: var(--text-dust);
    text-align: center;
    font-style: italic;
}

.modal-close-btn {
    width: 100%;
    padding: var(--space-md);
    background: var(--surface);
    color: var(--text-bone);
    border: 1px solid var(--accent-iron);
    border-radius: var(--radius-sm);
    font-family: var(--font-header);
    font-size: 1em;
    cursor: pointer;
    margin-top: var(--space-md);
    transition: all 0.3s ease;
    box-shadow: none;
}

.modal-close-btn:hover {
    background: var(--surface-hover);
    border-color: var(--accent-ember);
    transform: none;
    box-shadow: none;
}

/* =========================================
   SETTINGS
   ========================================= */

.settings-page-wrapper {
    max-width: 650px;
    margin: 0 auto;
    padding: var(--space-lg);
}

.settings-page-wrapper h2 {
    text-align: center;
    margin-bottom: var(--space-sm);
    font-size: 1.8rem;
}

.settings-subtitle {
    text-align: center;
    color: var(--text-dust);
    margin-bottom: var(--space-xl);
    font-size: 0.95rem;
}

.settings-box {
    background: var(--surface-elevated);
    border: 1px solid rgba(232, 115, 42, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
}

.settings-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(232, 115, 42, 0.06);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.settings-card:last-child {
    margin-bottom: 0;
}

.settings-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(232, 115, 42, 0.08);
}

.settings-card-header i {
    font-size: 1.3rem;
    color: var(--accent-ember);
}

.settings-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--accent-ember);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.settings-card-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-group label {
    font-size: 0.85rem;
    color: var(--text-dust);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    margin-bottom: 0;
}

.form-group input[readonly] {
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-ash);
    cursor: not-allowed;
    border-color: rgba(90, 80, 72, 0.3);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon input {
    flex: 1;
    padding-right: 48px;
}

.btn-toggle-password {
    position: absolute;
    right: 1px;
    top: 1px;
    bottom: 1px;
    width: 42px;
    padding: 0;
    background: rgba(232, 115, 42, 0.06);
    border: none;
    border-left: 1px solid rgba(232, 115, 42, 0.1);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-ash);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.btn-toggle-password:hover {
    background: rgba(232, 115, 42, 0.12);
    color: var(--accent-ember);
    box-shadow: none;
    transform: none;
}

.btn-toggle-password i {
    font-size: 0.9rem;
}

.password-hint {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(232, 115, 42, 0.04);
    border-radius: var(--radius-sm);
    border-left: 2px solid var(--accent-ember);
}

.password-hint i {
    color: var(--accent-ember);
    font-size: 0.85rem;
}

.password-hint span {
    color: var(--text-dust);
    font-size: 0.82em;
}

.btn-settings {
    background: linear-gradient(135deg, var(--accent-ember) 0%, #c45d1a 100%);
    border: none;
    color: var(--text-bone);
    padding: var(--space-md) var(--space-xl);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 14px rgba(232, 115, 42, 0.2);
}

.btn-settings:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(232, 115, 42, 0.3);
}

/* =========================================
   MODALS
   ========================================= */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 5, 4, 0.88);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-medium);
    border: 1px solid rgba(232, 115, 42, 0.15);
    border-radius: var(--radius-xl);
    margin: 5% auto;
    padding: var(--space-2xl);
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl), var(--shadow-glow-strong);
    position: relative;
}

.close {
    color: var(--accent-ember);
    float: right;
    font-size: 1.8em;
    font-weight: bold;
    cursor: pointer;
    transition: color var(--transition-fast);
    line-height: 1;
}

.close:hover {
    color: var(--accent-gold);
}

/* =========================================
   TOAST NOTIFICATIONS
   ========================================= */

#toast-container {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    max-width: 420px;
    pointer-events: none;
}

.toast {
    background: var(--bg-dark);
    border-left: 4px solid var(--accent-ember);
    padding: var(--space-md) var(--space-lg);
    padding-right: var(--space-xl);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), var(--shadow-glow);
    font-family: var(--font-body);
    color: var(--text-bone);
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    min-width: 280px;
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    font-size: var(--text-base);
    line-height: 1.4;
    position: relative;
    pointer-events: auto;
}

.toast.toast-visible {
    opacity: 1;
    transform: translateX(0);
}

.toast.toast-dismissing {
    opacity: 0;
    transform: translateX(40px);
}

.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast-message {
    flex: 1;
    word-break: break-word;
}

.toast-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
    border-radius: var(--radius-sm);
    transition: color 0.15s, background 0.15s;
}

.toast-close:hover {
    color: var(--text-bone);
    background: rgba(255, 255, 255, 0.1);
}

.toast-success {
    border-left-color: #4caf50;
}

.toast-success .toast-icon {
    color: #4caf50;
}

.toast-error {
    border-left-color: #e53935;
}

.toast-error .toast-icon {
    color: #e53935;
}

.toast-info .toast-icon {
    color: var(--accent-ember);
}

.toast-win {
    border-left-color: var(--accent-gold);
}

.toast-win .toast-icon {
    color: var(--accent-gold);
}

.toast-loss {
    border-left-color: #e53935;
}

.toast-loss .toast-icon {
    color: #e53935;
}

.toast-xp {
    border-left-color: var(--accent-gold);
}

.toast-xp .toast-icon {
    color: var(--accent-gold);
}

.toast-luck {
    background: linear-gradient(135deg, var(--bg-warm), var(--bg-surface));
    border-left-color: var(--accent-gold);
    color: var(--accent-gold);
}

.toast-luck .toast-icon {
    color: var(--accent-gold);
}

/* =========================================
   ANIMATIONS
   ========================================= */

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

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

.page-section {
    animation: fadeSlideIn 0.35s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-15px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pulse {

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

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

/* =========================================
   UTILITY CLASSES
   ========================================= */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-sm {
    margin-top: var(--space-sm);
}

.mt-md {
    margin-top: var(--space-md);
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

/* =========================================
   TOWN MAP (Single Image + Hotspots)
   ========================================= */

/* === Town Map — Card Grid === */
.town-map-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-md);
}

.map-page-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    color: var(--accent-ember);
    text-align: center;
    margin-bottom: var(--space-xl);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.05em;
}

.map-page-title i {
    color: var(--accent-gold);
    margin-right: var(--space-sm);
}

/* Zone sections */
.map-zone {
    margin-bottom: var(--space-xl);
}

.map-zone-header {
    font-family: var(--font-header);
    font-size: var(--text-lg);
    color: var(--accent-gold);
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-md);
    border-bottom: 2px solid rgba(160, 120, 80, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.map-zone-header i {
    margin-right: var(--space-sm);
    color: var(--accent-copper);
    font-size: 0.85em;
}

/* Card grid */
.map-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-md);
}

/* Individual card */
.map-card {
    display: flex;
    flex-direction: column;
    background: var(--surface-elevated);
    border: 2px solid rgba(160, 120, 80, 0.2);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition-fast),
                border-color var(--transition-fast),
                box-shadow var(--transition-fast);
    text-decoration: none;
    color: inherit;
}

.map-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-copper);
    box-shadow: var(--shadow-md), 0 0 18px rgba(232, 115, 42, 0.15);
}

.map-card:active {
    transform: translateY(-1px) scale(0.98);
}

/* Card image area */
.map-card-img {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--bg-dark);
    border-bottom: 2px solid rgba(160, 120, 80, 0.15);
}

.map-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    transition: transform var(--transition-base),
                filter var(--transition-base);
}

.map-card:hover .map-card-img img {
    transform: scale(1.08);
    filter: brightness(1.15);
}

/* Card text */
.map-card-body {
    padding: var(--space-sm) var(--space-md);
    text-align: center;
}

.map-card-name {
    font-family: var(--font-header);
    font-size: var(--text-sm);
    color: var(--text-bone);
    margin-bottom: 2px;
}

.map-card-desc {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--text-dust);
    font-style: italic;
}

/* Large featured card (saloon, ranch) */
.map-card--large {
    grid-column: span 2;
}

.map-card--large .map-card-img {
    aspect-ratio: 2 / 1;
}

.map-card--large .map-card-name {
    font-size: var(--text-base);
}

/* Adventure exit cards */
.map-card--exit {
    border-color: rgba(122, 26, 26, 0.3);
}

.map-card--exit:hover {
    border-color: var(--accent-blood);
    box-shadow: var(--shadow-md), 0 0 18px rgba(122, 26, 26, 0.25);
}

.map-card--exit .map-card-name {
    color: var(--danger);
}

/* =========================================
   GENERAL STORE PAGE
   ========================================= */

.shopkeeper-dialogue {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    background: rgba(232, 115, 42, 0.04);
    border: 1px solid rgba(232, 115, 42, 0.1);
    border-left: 3px solid var(--accent-ember);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.shopkeeper-portrait {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-medium);
    border: 2px solid var(--accent-ember);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-ember);
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(232, 115, 42, 0.2);
}

.banker-portrait {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    box-shadow: 0 0 12px rgba(184, 154, 66, 0.2);
}

.shopkeeper-speech {
    flex: 1;
}

.shopkeeper-speech strong {
    font-family: var(--font-header);
    color: var(--accent-ember);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: var(--text-sm);
}

.shopkeeper-speech p {
    color: var(--text-bone);
    font-style: italic;
    margin-top: var(--space-xs);
}

/* Daily Deals */
#daily-deals-panel {
    background: var(--surface);
    border: 1px solid rgba(232, 115, 42, 0.12);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-md), 0 0 20px rgba(232, 115, 42, 0.05);
}

#daily-deals-panel h3 {
    color: var(--accent-ember);
    margin-bottom: var(--space-md);
}

.deal-item {
    border-left-color: var(--accent-ember) !important;
    box-shadow: 0 0 8px rgba(232, 115, 42, 0.08);
}

.deal-badge {
    background: var(--accent-ember);
    color: var(--text-bone);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.65em;
    font-weight: bold;
    flex-shrink: 0;
}

.price-original {
    text-decoration: line-through;
    color: var(--text-ash);
    font-size: 0.85em;
    margin-right: 4px;
}

/* Store Layout */
.store-layout {
    display: flex;
    gap: var(--space-lg);
}

.store-categories {
    width: 180px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.store-cat-btn {
    width: 100%;
    padding: var(--space-md);
    background: var(--surface);
    border: 1px solid rgba(232, 115, 42, 0.06);
    border-left: 3px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-dust);
    text-align: left;
    font-family: var(--font-header);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: none;
}

.store-cat-btn:hover {
    background: var(--surface-hover);
    color: var(--text-bone);
    border-left-color: var(--accent-iron);
    transform: none;
    box-shadow: none;
}

.store-cat-btn.active {
    background: rgba(232, 115, 42, 0.08);
    border-left-color: var(--accent-ember);
    color: var(--accent-ember);
}

.store-cat-btn i {
    width: 20px;
    margin-right: var(--space-sm);
    text-align: center;
}

.store-items {
    flex: 1;
    min-width: 0;
}

.store-items-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: rgba(232, 115, 42, 0.06);
    border-radius: var(--radius-sm);
}

#store-category-label {
    font-family: var(--font-header);
    color: var(--accent-ember);
    text-transform: uppercase;
    font-size: var(--text-sm);
    letter-spacing: 0.05em;
}

.store-cash {
    font-family: var(--font-mono);
    color: var(--accent-gold);
    font-size: var(--text-sm);
}

/* =========================================
   BANK PAGE
   ========================================= */

.bank-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.bank-stat-card {
    background: var(--surface);
    border: 1px solid rgba(232, 115, 42, 0.08);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
}

.bank-stat-label {
    display: block;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-ash);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
}

.bank-stat-value {
    display: block;
    font-family: var(--font-header);
    font-size: var(--text-xl);
    color: var(--accent-gold);
}

.bank-section {
    background: var(--surface);
    border: 1px solid rgba(232, 115, 42, 0.07);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-md);
}

.bank-section h3 {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(232, 115, 42, 0.08);
}

.bank-btn-row {
    display: flex;
    gap: var(--space-sm);
}

.bank-btn-row button {
    flex: 1;
}

/* Loan styling */
.loan-info {
    color: var(--text-dust);
    font-size: var(--text-sm);
    margin-bottom: var(--space-md);
}

.loan-warning {
    color: var(--danger);
    font-weight: bold;
    padding: var(--space-md);
    background: rgba(184, 58, 42, 0.1);
    border: 1px solid var(--danger);
    border-radius: var(--radius-sm);
}

/* Vault styling */
.vault-desc {
    color: var(--text-dust);
    font-size: var(--text-sm);
    margin-bottom: var(--space-md);
}

#vault-store-section {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(232, 115, 42, 0.08);
}

#vault-store-section h4 {
    margin-bottom: var(--space-md);
}

/* =========================================
   TRAIL RIDES & ADVENTURES
   ========================================= */

/* Energy bar styles moved to STATUS BAR section above */

/* Trail Energy Display on page */
.trail-energy-display {
    background: rgba(0, 0, 0, 0.3);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    color: var(--text-dust);
    font-size: var(--text-sm);
}

.trail-energy-bar {
    flex: 1;
    max-width: 200px;
    height: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    overflow: hidden;
}

.trail-energy-fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    border-radius: 5px;
    transition: width 0.5s ease;
}

/* Trail Grid */
.trail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.trail-card {
    background: var(--surface);
    border: 1px solid rgba(232, 115, 42, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.trail-card:hover:not(.trail-locked) {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.trail-card.trail-locked {
    opacity: 0.5;
    filter: grayscale(0.5);
}

.trail-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.trail-easy .trail-icon {
    color: #2ecc71;
}

.trail-medium .trail-icon {
    color: var(--accent-gold);
}

.trail-hard .trail-icon {
    color: var(--accent-ember);
}

.trail-very_hard .trail-icon {
    color: #e74c3c;
}

.trail-extreme .trail-icon {
    color: #9b59b6;
}

.trail-card h3 {
    font-family: 'Rye', serif;
    color: var(--text-parchment, var(--text-bone));
    margin-bottom: var(--space-sm);
}

.trail-difficulty-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-md);
}

.trail-easy .trail-difficulty-badge {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.trail-medium .trail-difficulty-badge {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.trail-hard .trail-difficulty-badge {
    background: rgba(232, 115, 42, 0.2);
    color: var(--accent-ember);
    border: 1px solid rgba(232, 115, 42, 0.3);
}

.trail-very_hard .trail-difficulty-badge {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.trail-extreme .trail-difficulty-badge {
    background: rgba(155, 89, 182, 0.2);
    color: #9b59b6;
    border: 1px solid rgba(155, 89, 182, 0.3);
}

.trail-info {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    font-size: var(--text-xs);
    color: var(--text-dust);
    margin-bottom: var(--space-md);
}

.trail-desc {
    font-size: var(--text-sm);
    color: var(--text-dust);
    font-style: italic;
    margin-bottom: var(--space-lg);
    opacity: 0.8;
}

.trail-ride-btn {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(135deg, rgba(232, 115, 42, 0.3), rgba(232, 115, 42, 0.1));
    border: 1px solid var(--accent-ember);
    color: var(--accent-ember);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: 'Rye', serif;
    font-size: var(--text-sm);
    transition: all 0.2s ease;
}

.trail-ride-btn:hover {
    background: rgba(232, 115, 42, 0.4);
    transform: translateY(-1px);
}

.trail-lock {
    color: var(--text-dust);
    font-size: var(--text-sm);
    opacity: 0.6;
    padding: var(--space-md);
}

/* Active Bounty Banner */
.active-bounty-banner {
    background: rgba(122, 26, 26, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-lg);
    margin-bottom: var(--space-lg);
    color: #e74c3c;
    font-size: var(--text-sm);
}

/* Adventure Active View */
.adventure-header {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.adventure-header h2 {
    font-family: 'Rye', serif;
    margin: 0;
}

.adventure-progress {
    flex: 1;
    min-width: 200px;
}

.adventure-progress span {
    font-size: var(--text-sm);
    color: var(--text-dust);
}

.adventure-progress-bar {
    height: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}

.adventure-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-ember), var(--accent-gold));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.btn-retreat {
    padding: var(--space-sm) var(--space-lg);
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--text-sm);
    transition: all 0.2s ease;
}

.btn-retreat:hover {
    background: rgba(231, 76, 60, 0.3);
}

.adventure-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    min-height: 400px;
}

.adventure-log {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(232, 115, 42, 0.06);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    max-height: 500px;
    overflow-y: auto;
    font-family: 'Crimson Text', serif;
}

.adventure-log p {
    margin: var(--space-sm) 0;
    font-size: var(--text-base);
    color: var(--text-bone);
    font-weight: 600;
    opacity: 1;
    line-height: 1.6;
}

.adventure-event-panel {
    background: var(--surface);
    border: 1px solid rgba(232, 115, 42, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.event-narrative {
    font-style: italic;
    color: var(--text-bone);
    font-size: var(--text-base);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.adventure-choice-btn {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: rgba(232, 115, 42, 0.08);
    border: 1px solid rgba(232, 115, 42, 0.2);
    color: var(--text-bone);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--text-sm);
    text-align: left;
    transition: all 0.2s ease;
    margin-bottom: var(--space-sm);
}

.adventure-choice-btn:hover {
    background: rgba(232, 115, 42, 0.2);
    border-color: var(--accent-ember);
    transform: translateX(4px);
}

#adventure-continue-btn {
    padding: var(--space-md) var(--space-xl);
    font-family: 'Rye', serif;
}

/* Combat Arena */
.combat-arena {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.combat-enemy,
.combat-player {
    flex: 1;
    text-align: center;
    max-width: 300px;
}

.combat-enemy h3 {
    color: #e74c3c;
    font-family: 'Rye', serif;
}

.combat-player h3 {
    color: #2ecc71;
    font-family: 'Rye', serif;
}

.combat-vs {
    font-family: 'Rye', serif;
    font-size: 2rem;
    color: var(--accent-gold);
    text-shadow: 0 0 10px rgba(232, 115, 42, 0.5);
}

.combat-hp-bar {
    height: 16px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    overflow: hidden;
    margin: var(--space-sm) 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.combat-hp-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 0.3s ease;
}

.combat-hp-fill.enemy-hp {
    background: linear-gradient(90deg, #c0392b, #e74c3c);
}

.combat-hp-fill.player-hp {
    background: linear-gradient(90deg, #27ae60, #2ecc71);
}

.combat-hp-text {
    font-size: var(--text-sm);
    color: var(--text-dust);
}

#adventure-combat .combat-log {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(232, 115, 42, 0.06);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: var(--space-lg);
    font-family: 'Crimson Text', serif;
}

#adventure-combat .combat-log p {
    margin: var(--space-xs) 0;
    font-size: var(--text-sm);
    color: var(--text-dust);
}

.combat-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.combat-actions button {
    padding: var(--space-md) var(--space-xl);
    min-width: 140px;
    font-size: var(--text-sm);
}

/* Adventure Summary */
.summary-banner {
    text-align: center;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    font-family: 'Rye', serif;
    font-size: 1.5rem;
    margin-bottom: var(--space-xl);
}

.summary-victory {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

.summary-defeat {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.summary-retreat {
    background: rgba(241, 196, 15, 0.15);
    border: 1px solid rgba(241, 196, 15, 0.3);
    color: #f1c40f;
}

.summary-stats {
    display: flex;
    gap: var(--space-xl);
    justify-content: center;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.summary-stat {
    background: var(--surface);
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(232, 115, 42, 0.1);
    font-size: var(--text-base);
    color: var(--text-bone);
}

.summary-stat i {
    color: var(--accent-gold);
    margin-right: var(--space-sm);
}

/* Bounty Board */
#bounty-board-panel {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(122, 26, 26, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-top: var(--space-xl);
}

#bounty-board-panel h3 {
    font-family: 'Rye', serif;
    color: var(--text-bone);
    margin-bottom: var(--space-lg);
}

.bounty-active {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-lg);
    margin-bottom: var(--space-lg);
    color: #e74c3c;
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

#bounty-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.bounty-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(122, 26, 26, 0.2);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.bounty-poster {
    padding: var(--space-lg);
    text-align: center;
    background: linear-gradient(180deg, rgba(122, 26, 26, 0.15), transparent);
}

.bounty-wanted {
    font-family: 'Rye', serif;
    font-size: 1.2rem;
    color: #e74c3c;
    letter-spacing: 0.2em;
    margin-bottom: var(--space-sm);
}

.bounty-name {
    font-family: 'Rye', serif;
    font-size: var(--text-lg);
    color: var(--text-bone);
    margin-bottom: var(--space-sm);
}

.bounty-desc {
    font-size: var(--text-xs);
    color: var(--text-dust);
    font-style: italic;
    margin-bottom: var(--space-md);
}

.bounty-details {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    font-size: var(--text-xs);
    color: var(--text-dust);
    margin-bottom: var(--space-md);
}

.bounty-reward-amount {
    font-family: 'Rye', serif;
    font-size: var(--text-lg);
    color: var(--accent-gold);
    margin-bottom: var(--space-md);
}

.bounty-accept-btn {
    width: 100%;
    padding: var(--space-sm) var(--space-lg);
    background: rgba(122, 26, 26, 0.3);
    border: 1px solid rgba(231, 76, 60, 0.4);
    color: #e74c3c;
    cursor: pointer;
    font-size: var(--text-sm);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.bounty-accept-btn:hover {
    background: rgba(231, 76, 60, 0.3);
}

/* Bounty Board Building on Town Map */
.building-bounty .building-body {
    background: rgba(122, 26, 26, 0.3);
    border-color: rgba(122, 26, 26, 0.4);
}

.building-bounty .building-body i {
    color: #e74c3c;
}

.building-bounty .building-roof {
    background: linear-gradient(135deg, #4a1a1a, #6b2020);
}

/* Doctor's Office Building on Town Map */
.building-doctor .building-body {
    background: rgba(46, 139, 87, 0.3);
    border-color: rgba(46, 139, 87, 0.4);
}

.building-doctor .building-body i {
    color: #2ecc71;
}

.building-doctor .building-roof {
    background: linear-gradient(135deg, #1a4a2e, #2a6b3f);
}

/* =========================================
   DOCTOR'S OFFICE PAGE
   ========================================= */

.doctor-portrait {
    background: linear-gradient(135deg, #1a4a2e, #2a6b3f);
    border-color: #2ecc71;
}

.doctor-portrait i {
    color: #2ecc71;
    font-size: 3rem;
}

.doctor-section {
    background: var(--surface);
    border: 1px solid rgba(232, 115, 42, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.doctor-section h3 {
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* ---- INJURY BODY DIAGRAM SECTION ---- */

#injury-banner {
    background: var(--surface);
    border: 1px solid rgba(232, 115, 42, 0.08);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.injury-section-title {
    color: var(--text-bone);
    font-family: var(--font-header);
    font-size: var(--text-lg);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* No injuries state */
.injury-none {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    color: var(--success);
    font-size: var(--text-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.injury-none i {
    font-size: 2.5rem;
    opacity: 0.7;
}

/* Two-panel layout */
.injury-panels {
    display: flex;
    gap: var(--space-xl);
    align-items: flex-start;
}

/* ---- Left: Body Diagram ---- */
.injury-diagram-panel {
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.body-diagram {
    width: 200px;
    height: 380px;
}

/* SVG zone base styles */
.body-zone {
    cursor: pointer;
    transition: all 0.3s ease;
}

.body-zone ellipse,
.body-zone path,
.body-zone rect {
    fill: rgba(255, 255, 255, 0.03);
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 1;
    stroke-dasharray: 4 3;
    transition: all 0.3s ease;
}

.body-zone:hover ellipse,
.body-zone:hover path,
.body-zone:hover rect {
    stroke: rgba(255, 255, 255, 0.2);
    fill: rgba(255, 255, 255, 0.06);
}

.zone-label {
    fill: rgba(255, 255, 255, 0.12);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    pointer-events: none;
}

.zone-label-sm {
    font-size: 8px;
}

/* Neck connector */
.body-connector {
    fill: rgba(255, 255, 255, 0.02);
    stroke: none;
}

/* Zone severity states */
.body-zone.severity-healthy ellipse,
.body-zone.severity-healthy path {
    fill: rgba(255, 255, 255, 0.03);
    stroke-dasharray: 4 3;
}

.body-zone.severity-minor ellipse,
.body-zone.severity-minor path {
    fill: rgba(241, 196, 15, 0.12);
    stroke: rgba(241, 196, 15, 0.3);
    stroke-dasharray: none;
}

.body-zone.severity-moderate ellipse,
.body-zone.severity-moderate path {
    fill: rgba(230, 126, 34, 0.15);
    stroke: rgba(230, 126, 34, 0.4);
    stroke-dasharray: none;
}

.body-zone.severity-serious ellipse,
.body-zone.severity-serious path {
    fill: rgba(231, 76, 60, 0.18);
    stroke: rgba(231, 76, 60, 0.5);
    stroke-dasharray: none;
    filter: drop-shadow(0 0 6px rgba(231, 76, 60, 0.2));
}

.body-zone.severity-critical ellipse,
.body-zone.severity-critical path {
    fill: rgba(142, 36, 36, 0.25);
    stroke: rgba(255, 68, 68, 0.6);
    stroke-dasharray: none;
    animation: criticalPulse 1.5s ease-in-out infinite;
}

@keyframes criticalPulse {
    0%, 100% {
        fill: rgba(142, 36, 36, 0.2);
        filter: drop-shadow(0 0 4px rgba(255, 68, 68, 0.15));
    }
    50% {
        fill: rgba(142, 36, 36, 0.35);
        filter: drop-shadow(0 0 12px rgba(255, 68, 68, 0.35));
    }
}

/* Selected zone */
.body-zone.selected ellipse,
.body-zone.selected path {
    stroke: var(--accent-ember) !important;
    stroke-width: 2;
    stroke-dasharray: none !important;
    filter: drop-shadow(0 0 8px rgba(232, 115, 42, 0.3)) !important;
}

/* Floating status dots in SVG */
.body-dot-bleed {
    fill: #e74c3c;
    animation: bleedPulse 1.5s ease-in-out infinite;
}

.body-dot-infect {
    fill: #8e44ad;
    animation: infectPulse 2s ease-in-out infinite;
}

.body-dot-scar {
    fill: var(--accent-iron);
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 1;
}

@keyframes infectPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes bleedPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Mobile: zone buttons (hidden on desktop) */
.body-zone-buttons {
    display: none;
    gap: var(--space-xs);
    flex-wrap: wrap;
    justify-content: center;
}

.zone-btn {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-dust);
    font-size: var(--text-xs);
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.zone-btn.selected {
    border-color: var(--accent-ember);
    color: var(--accent-ember);
    background: rgba(232, 115, 42, 0.08);
}

.zone-btn.severity-minor { border-color: rgba(241, 196, 15, 0.4); color: #f1c40f; }
.zone-btn.severity-moderate { border-color: rgba(230, 126, 34, 0.4); color: #e67e22; }
.zone-btn.severity-serious { border-color: rgba(231, 76, 60, 0.5); color: #e74c3c; }
.zone-btn.severity-critical { border-color: rgba(255, 68, 68, 0.6); color: #ff4444; background: rgba(142, 36, 36, 0.1); }

/* ---- Right: Detail Panel ---- */
.injury-detail-panel {
    flex: 1;
    min-width: 0;
}

/* Detail header */
.injury-detail-header {
    margin-bottom: var(--space-md);
}

.detail-part-name {
    font-family: var(--font-header);
    font-size: var(--text-xl);
    color: var(--text-bone);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.detail-part-name i {
    color: var(--accent-ember);
}

.detail-count {
    font-size: var(--text-sm);
    color: var(--text-dust);
    font-family: var(--font-mono);
}

.detail-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
}

.detail-worst {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-worst.severity-minor { background: rgba(241, 196, 15, 0.15); color: #f1c40f; }
.detail-worst.severity-moderate { background: rgba(230, 126, 34, 0.15); color: #e67e22; }
.detail-worst.severity-serious { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }
.detail-worst.severity-critical { background: rgba(142, 36, 36, 0.2); color: #ff4444; }

.detail-status-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: var(--text-xs);
}

.detail-status-tag.bleeding {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.detail-status-tag.infected {
    background: rgba(142, 68, 173, 0.1);
    color: #8e44ad;
}

.detail-status-tag.scar {
    background: rgba(90, 80, 72, 0.15);
    color: var(--accent-iron);
}

/* Detail alert banners */
.injury-detail-alerts {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.detail-alert {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.detail-alert.alert-bleeding {
    background: rgba(231, 76, 60, 0.08);
    border: 1px solid rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

.detail-alert.alert-infected {
    background: rgba(142, 68, 173, 0.08);
    border: 1px solid rgba(142, 68, 173, 0.15);
    color: #8e44ad;
}

/* Detail empty state */
.injury-detail-empty {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    color: var(--text-ash);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.injury-detail-empty i {
    font-size: 2rem;
    color: var(--success);
    opacity: 0.4;
}

/* ---- Injury Strips (inside detail panel) ---- */
.injury-detail-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.injury-strip {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(232, 115, 42, 0.06);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-fast);
}

.injury-strip:hover {
    border-color: rgba(232, 115, 42, 0.15);
}

.strip-color {
    width: 4px;
    flex-shrink: 0;
}

.injury-strip.minor .strip-color { background: #f1c40f; }
.injury-strip.moderate .strip-color { background: #e67e22; }
.injury-strip.serious .strip-color { background: #e74c3c; }
.injury-strip.critical .strip-color { background: #ff4444; }

.strip-content {
    flex: 1;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.strip-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.injury-name {
    font-family: var(--font-header);
    font-size: var(--text-sm);
    color: var(--text-bone);
}

.injury-severity-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.injury-severity-badge.minor { background: rgba(241, 196, 15, 0.15); color: #f1c40f; }
.injury-severity-badge.moderate { background: rgba(230, 126, 34, 0.15); color: #e67e22; }
.injury-severity-badge.serious { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }
.injury-severity-badge.critical { background: rgba(142, 36, 36, 0.2); color: #ff4444; }

.injury-flavor {
    font-size: var(--text-base);
    color: var(--text-dust);
    font-style: italic;
    line-height: 1.4;
    margin: 0;
}

/* Penalties Row */
.injury-penalties-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.injury-penalty-tag {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-family: var(--font-mono);
    background: rgba(231, 76, 60, 0.06);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.12);
}

/* Healing Progress Row */
.injury-heal-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.injury-heal-row.paused {
    color: #8e44ad;
    font-size: var(--text-xs);
    gap: 6px;
}

.injury-heal-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.injury-heal-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-ember), #2ecc71);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.injury-heal-text {
    font-size: 0.65rem;
    color: var(--text-dust);
    font-family: var(--font-mono);
    white-space: nowrap;
}

/* Cure Button (inside strip) */
.injury-cure-btn {
    align-self: center;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-xs);
    font-family: var(--font-body);
    background: rgba(46, 204, 113, 0.08);
    border: 1px solid rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    margin-right: var(--space-md);
}

.injury-cure-btn:hover {
    background: rgba(46, 204, 113, 0.18);
    border-color: rgba(46, 204, 113, 0.4);
}

/* ---- Injury Footer (debuffs + cure all) ---- */
.injury-footer {
    margin-top: var(--space-md);
    display: flex;
    justify-content: flex-end;
}

#injury-penalties-display {
    background: rgba(231, 76, 60, 0.06);
    border: 1px solid rgba(231, 76, 60, 0.12);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    margin-top: var(--space-lg);
    font-size: var(--text-sm);
    color: #e74c3c;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

#cure-all-btn {
    background: rgba(46, 204, 113, 0.08);
    border: 1px solid rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    padding: var(--space-sm) var(--space-xl);
    font-size: var(--text-sm);
    font-family: var(--font-body);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

#cure-all-btn:hover {
    background: rgba(46, 204, 113, 0.18);
    border-color: rgba(46, 204, 113, 0.4);
}

/* Doctor Services Grid */
.doctor-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.doctor-service-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(232, 115, 42, 0.1);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    transition: all 0.2s ease;
}

.doctor-service-card:hover {
    border-color: rgba(46, 204, 113, 0.3);
    transform: translateY(-2px);
}

.doctor-service-name {
    font-family: 'Rye', serif;
    color: var(--text-bone);
    font-size: var(--text-lg);
}

.doctor-service-desc {
    font-size: var(--text-sm);
    color: var(--text-dust);
    flex: 1;
}

.doctor-service-price {
    font-size: var(--text-lg);
    color: var(--accent-gold);
    font-weight: bold;
}

.doctor-service-btn {
    width: 100%;
    padding: var(--space-md);
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #2ecc71;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: var(--text-sm);
    transition: all 0.2s ease;
}

.doctor-service-btn:hover {
    background: rgba(46, 204, 113, 0.3);
}

.doctor-service-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Doctor Items Grid */
.doctor-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-md);
}

.doctor-item-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(232, 115, 42, 0.1);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    transition: all 0.2s ease;
}

.doctor-item-card:hover {
    border-color: rgba(46, 204, 113, 0.2);
}

.doctor-item-icon {
    font-size: 1.5rem;
}

.doctor-item-icon .doctor-item-img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
}

.doctor-item-name {
    font-weight: 600;
    color: var(--text-bone);
}

.doctor-item-desc {
    font-size: var(--text-xs);
    color: var(--text-dust);
}

.doctor-item-price {
    color: var(--accent-gold);
    font-weight: bold;
}

.doctor-item-buy-btn {
    background: rgba(232, 115, 42, 0.1);
    border: 1px solid rgba(232, 115, 42, 0.3);
    color: var(--accent-ember);
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: var(--text-xs);
    transition: all 0.2s ease;
}

.doctor-item-buy-btn:hover {
    background: rgba(232, 115, 42, 0.25);
}

/* Injury Indicator in Stats Panel / Status Bar */
.injury-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 10px;
    color: #e74c3c;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.injury-indicator:hover {
    background: rgba(231, 76, 60, 0.25);
}

.injury-indicator i {
    font-size: 0.65rem;
}

/* Doctor Relationship Level Panel */
.doctor-level-panel {
    background: var(--surface);
    border: 1px solid rgba(46, 204, 113, 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
}

.doctor-level-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.doctor-level-label {
    font-family: var(--font-header);
    font-size: var(--text-sm);
    color: #2ecc71;
}

.doctor-level-xp {
    font-size: var(--text-xs);
    color: var(--text-dust);
    font-family: var(--font-mono);
}

.doctor-level-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.doctor-level-fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Injury Severity Badge */
.injury-severity-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.injury-severity-badge.minor {
    background: rgba(241, 196, 15, 0.15);
    color: #f1c40f;
}

.injury-severity-badge.moderate {
    background: rgba(230, 126, 34, 0.15);
    color: #e67e22;
}

.injury-severity-badge.serious {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

.injury-severity-badge.critical {
    background: rgba(142, 36, 36, 0.2);
    color: #ff4444;
}

.injury-item.critical {
    border-left-color: #8e2424;
    background: rgba(142, 36, 36, 0.08);
}

/* Doctor Service Success Rate */
.doctor-service-success {
    font-size: var(--text-sm);
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

/* Doctor Item Locked */
.doctor-item-locked {
    font-size: var(--text-xs);
    color: var(--text-ash);
    font-style: italic;
}

/* Scars Section */
.scars-section {
    background: rgba(90, 80, 72, 0.1);
    border: 1px solid rgba(90, 80, 72, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.scars-section h3 {
    color: var(--accent-iron);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.scars-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-md);
}

.scar-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(90, 80, 72, 0.25);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}

.scar-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.scar-part {
    font-weight: 600;
    color: var(--text-bone);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.scar-part i {
    color: var(--accent-iron);
}

.scar-penalty {
    font-size: var(--text-xs);
    color: #e74c3c;
}

.scar-bonus {
    font-size: var(--text-xs);
    color: #27ae60;
}

.scar-remove-btn {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--text-xs);
    background: rgba(142, 68, 173, 0.1);
    border: 1px solid rgba(142, 68, 173, 0.3);
    color: #8e44ad;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.scar-remove-btn:hover:not(:disabled) {
    background: rgba(142, 68, 173, 0.25);
}

.scar-remove-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: var(--text-ash);
    border-color: rgba(90, 80, 72, 0.2);
    background: transparent;
}


/* =========================================
   RESPONSIVE — TABLET (768px)
   ========================================= */

@media (max-width: 768px) {
    /* Injury diagram: stack vertically */
    .injury-panels {
        flex-direction: column;
    }

    .injury-diagram-panel {
        flex: none;
        width: 100%;
    }

    .body-diagram {
        width: 150px;
        height: 285px;
    }

    .game-wrapper {
        flex-direction: column;
    }

    .status-xp-track {
        width: 60px;
    }

    .status-stat {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    #sidebar {
        width: 100%;
        order: 2;
        border-right: none;
        border-top: 1px solid rgba(232, 115, 42, 0.08);
        padding: var(--space-sm);
        flex-direction: row;
        overflow-y: visible;
        flex-shrink: 0;
        box-shadow: none;
    }

    #content-area {
        order: 1;
        padding: var(--space-lg);
        flex: 1;
    }

    .sidebar-header,
    .sidebar-divider,
    .nav-section-title {
        display: none;
    }

    .nav-section {
        padding: 0;
        display: contents;
    }

    #sidebar ul {
        display: flex;
        justify-content: space-around;
        flex-wrap: wrap;
    }

    #sidebar li {
        margin-bottom: 0;
    }

    #sidebar a {
        flex-direction: column;
        gap: var(--space-xs);
        padding: var(--space-sm) var(--space-xs);
        font-size: 0.7rem;
        min-height: 44px;
        justify-content: center;
        border-radius: 0;
    }

    #sidebar a span {
        font-size: 0.58rem;
    }

    #sidebar a::before,
    #sidebar a::after {
        display: none;
    }

    .speech-bubble {
        margin-left: 0;
        margin-top: var(--space-md);
    }

    .npc-portrait {
        max-width: 100px;
    }

    .map-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .map-card--large {
        grid-column: span 2;
    }

    .store-layout {
        flex-direction: column;
    }

    .store-categories {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .store-cat-btn {
        flex: 1;
        min-width: 80px;
        text-align: center;
        font-size: 0.7rem;
        padding: var(--space-sm);
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .store-cat-btn.active {
        border-left: none;
        border-bottom-color: var(--accent-ember);
    }

    .bank-overview {
        grid-template-columns: repeat(2, 1fr);
    }

    .combat-arena {
        flex-direction: column;
    }

    .trail-grid {
        grid-template-columns: 1fr;
    }

    #bounty-list {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   RESPONSIVE — MOBILE (480px)
   ========================================= */

@media (max-width: 480px) {
    /* Injury diagram: swap SVG for buttons */
    .body-diagram {
        display: none;
    }

    .body-zone-buttons {
        display: flex;
    }

    #sidebar {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0;
    }

    #sidebar::-webkit-scrollbar {
        display: none;
    }

    .nav-section {
        display: contents;
    }

    #sidebar ul {
        justify-content: flex-start;
        gap: var(--space-xs);
        padding: var(--space-xs);
        flex-wrap: nowrap;
    }

    #sidebar a {
        font-size: 0.65rem;
        white-space: nowrap;
        min-width: 52px;
    }

    #sidebar a span {
        font-size: 0.52rem;
    }

    #sidebar i {
        font-size: var(--text-base);
    }

    #content-area {
        padding: var(--space-md);
    }

    /* Logo scaling */
    .logo-whiskey,
    .logo-bullets {
        font-size: 18px;
        letter-spacing: 2px;
    }

    .logo-ampersand {
        font-size: 14px;
    }

    .text-logo {
        gap: 6px;
    }

    #game-header {
        padding: var(--space-xs) var(--space-md);
    }

    /* Status bar */
    #status-bar {
        flex-wrap: wrap;
        gap: var(--space-xs);
        padding: var(--space-xs) var(--space-sm);
        justify-content: center;
    }

    .status-player {
        display: none;
    }

    /* Status bar handled in dedicated responsive section above */

    /* Buttons */
    button,
    .btn-primary {
        padding: var(--space-md) var(--space-lg);
    }

    /* Grid layouts */
    .game-layout {
        grid-template-columns: 1fr;
    }

    #stats-list {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .category-sign {
        font-size: 1.1rem;
        padding: 10px 16px;
    }

    .bounty-value {
        font-size: 2rem;
    }

    .quests-grid {
        grid-template-columns: 1fr;
    }

    .dungeons-grid {
        grid-template-columns: 1fr;
    }

    /* Slot machine */
    #slot-machine-frame {
        gap: 7px;
        padding: 26px 14px 16px 14px;
        border-width: 4px;
        margin: 12px auto;
    }

    #slot-machine-frame::before {
        font-size: 0.5em;
        letter-spacing: 1px;
    }

    .reel-strip {
        font-size: 2.5em;
    }

    /* NPC stacking */
    .npc-portrait {
        float: none;
        display: block;
        margin: 0 auto var(--space-md) auto;
        max-width: 100px;
    }

    .npc-portrait:hover {
        transform: scale(2);
        transform-origin: center center;
    }

    .speech-bubble {
        margin-left: 0;
    }

    .speech-bubble::before {
        left: 50%;
        top: -22px;
        transform: translateX(-50%);
        border: 12px solid transparent;
        border-bottom-color: var(--accent-ember);
        border-right-color: transparent;
    }

    .speech-bubble::after {
        left: 50%;
        top: -16px;
        transform: translateX(-50%);
        border: 10px solid transparent;
        border-bottom-color: #f0e6d0;
        border-right-color: transparent;
    }

    /* Item list */
    .item-row-summary {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .item-row-badges {
        order: 5;
    }

    .item-row-name {
        flex-basis: calc(100% - 80px);
    }

    .item-row-actions {
        flex-direction: column;
    }

    .item-row-actions button,
    .item-row-actions input {
        width: 100%;
    }

    /* Tabs */
    #quests-tabs,
    .quest-tabs {
        flex-wrap: wrap;
    }

    .quest-tab,
    #quests-tabs button {
        flex: 1;
        min-width: 80px;
        padding: var(--space-sm);
        text-align: center;
        font-size: 0.8rem;
        min-height: 44px;
    }

    #marketplace-tabs {
        flex-wrap: wrap;
    }

    .marketplace-tab {
        flex: 1;
        min-width: 80px;
        text-align: center;
        font-size: 0.8rem;
        padding: var(--space-sm);
        min-height: 44px;
    }

    .marketplace-filters {
        flex-direction: column;
    }

    .marketplace-filters select {
        width: 100%;
    }

    /* Modal */
    .modal-content {
        margin: 2% auto;
        padding: var(--space-lg);
        width: 95%;
        max-height: 90vh;
    }

    /* Bank */
    .bank-controls {
        display: flex;
        flex-direction: column;
        gap: var(--space-sm);
    }

    .bank-controls input,
    .bank-controls select,
    .bank-controls button {
        width: 100%;
    }

    .dice-controls {
        max-width: 100%;
    }

    /* Dungeons */
    .dungeon-info {
        flex-direction: column;
        gap: var(--space-xs);
    }

    .boss-stats {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .stat-row {
        flex-direction: column;
        align-items: center;
        gap: var(--space-sm);
    }

    .combat-portrait {
        max-width: 160px;
        max-height: 160px;
    }

    /* Toast */
    #toast-container {
        top: var(--space-md);
        right: var(--space-md);
        left: var(--space-md);
        max-width: none;
    }

    /* Settings */
    .settings-page-wrapper {
        padding: var(--space-md);
    }

    .settings-box {
        padding: var(--space-md);
    }

    .settings-card {
        padding: var(--space-md);
    }

    .combat-actions {
        flex-direction: column;
    }

    .combat-actions button {
        width: 100%;
    }

    .summary-stats {
        flex-direction: column;
    }

    .adventure-header {
        flex-direction: column;
        text-align: center;
    }

    /* Status bar mobile — handled in main status bar responsive section */
}

/* =========================================
   RESPONSIVE — TINY PHONES (360px)
   ========================================= */

@media (max-width: 360px) {
    .reel-window {
        width: 48px;
        height: 62px;
    }

    .reel-strip {
        font-size: 2em;
    }

    #slot-machine-frame {
        gap: 5px;
        padding: 22px 8px 12px 8px;
    }

    .grid-container {
        grid-template-columns: 1fr;
    }

    #auth-container {
        margin: var(--space-md) var(--space-sm);
        padding: var(--space-lg);
    }

    #auth-container h1 {
        font-size: var(--text-2xl);
    }

    .map-card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    .map-card--large {
        grid-column: span 2;
    }

    .map-page-title {
        font-size: var(--text-xl);
    }

    .bank-overview {
        grid-template-columns: 1fr;
    }

    .store-cat-btn i {
        display: none;
    }

    .bank-btn-row {
        flex-direction: column;
    }

    .shopkeeper-dialogue {
        flex-direction: column;
        text-align: center;
    }
}

/* =========================================
   BORDELLO PAGE
   ========================================= */

/* Relationship Panel */
.bordello-relationship-panel {
    background: var(--surface);
    border: 1px solid rgba(233, 30, 99, 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
}

.bordello-level-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.bordello-level-label {
    font-family: var(--font-header);
    font-size: var(--text-sm);
    color: #e91e63;
}

.bordello-level-xp {
    font-size: var(--text-xs);
    color: var(--text-dust);
    font-family: var(--font-mono);
}

.bordello-level-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.bordello-level-fill {
    height: 100%;
    background: linear-gradient(90deg, #c2185b, #e91e63);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Banners */
.bordello-banner {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
    font-size: var(--text-sm);
    align-items: center;
    gap: var(--space-sm);
}

.companion-banner {
    display: flex;
    background: rgba(233, 30, 99, 0.06);
    border: 1px solid rgba(233, 30, 99, 0.15);
    color: #f48fb1;
}

.companion-banner .bordello-rides-left {
    font-size: var(--text-xs);
    color: var(--text-dust);
    margin-left: var(--space-xs);
}

.favour-banner {
    background: rgba(255, 193, 7, 0.06);
    border: 1px solid rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

.favour-info {
    margin-bottom: var(--space-xs);
}

.favour-progress {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-dust);
}

.favour-bar-wrap {
    height: 4px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: var(--space-xs);
}

.favour-bar-fill {
    height: 100%;
    background: #ffc107;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.buff-banner {
    display: flex;
    background: rgba(156, 39, 176, 0.06);
    border: 1px solid rgba(156, 39, 176, 0.15);
    color: #ce93d8;
}

.buff-timer {
    font-size: var(--text-xs);
    color: var(--text-dust);
}

.bordello-dismiss-btn,
.bordello-complete-btn {
    margin-left: auto;
    padding: 2px 10px;
    font-size: var(--text-xs);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dust);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.bordello-dismiss-btn:hover { background: rgba(231, 76, 60, 0.15); color: #e74c3c; border-color: rgba(231, 76, 60, 0.3); }
.bordello-complete-btn:hover { background: rgba(46, 204, 113, 0.15); color: #2ecc71; border-color: rgba(46, 204, 113, 0.3); }

/* Tabs */
.bordello-tabs {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(232, 115, 42, 0.06);
    padding-bottom: var(--space-sm);
}

.bordello-tab {
    padding: var(--space-sm) var(--space-lg);
    background: none;
    border: 1px solid transparent;
    border-bottom: none;
    color: var(--text-dust);
    font-family: var(--font-header);
    font-size: var(--text-sm);
    cursor: pointer;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: all var(--transition-fast);
    position: relative;
    text-transform: uppercase;
}

.bordello-tab:hover {
    color: #f48fb1;
    background: rgba(233, 30, 99, 0.04);
}

.bordello-tab.active {
    color: #e91e63;
    border-color: rgba(233, 30, 99, 0.15);
    background: rgba(233, 30, 99, 0.06);
}

.bordello-tab-badge {
    background: #e91e63;
    color: white;
    font-size: 0.6rem;
    padding: 1px 5px;
    border-radius: 8px;
    margin-left: 4px;
    font-family: var(--font-mono);
}

.bordello-tab-content {
    background: var(--surface);
    border: 1px solid rgba(233, 30, 99, 0.08);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}

/* Tier Cards */
.bordello-tiers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.bordello-tier-card {
    background: var(--surface);
    border: 1px solid rgba(232, 115, 42, 0.06);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.bordello-tier-card:hover:not(.locked) {
    border-color: rgba(233, 30, 99, 0.25);
    transform: translateY(-2px);
}

.bordello-tier-card.selected {
    border-color: #e91e63;
    box-shadow: 0 0 15px rgba(233, 30, 99, 0.15);
    background: rgba(233, 30, 99, 0.04);
}

.bordello-tier-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.bordello-lock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    color: var(--text-dust);
    font-family: var(--font-header);
    font-size: var(--text-sm);
    gap: var(--space-xs);
    z-index: 2;
}

.bordello-tier-icon {
    font-size: 1.8rem;
    color: #e91e63;
    margin-bottom: var(--space-sm);
}

.bordello-tier-name {
    font-family: var(--font-header);
    color: var(--text-bone);
    margin: 0 0 var(--space-xs);
    font-size: var(--text-base);
}

.bordello-tier-price {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: #e91e63;
    margin-bottom: var(--space-sm);
}

.bordello-original-price {
    font-size: var(--text-xs);
    color: var(--text-ash);
}

.bordello-tier-details {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    font-size: var(--text-xs);
    color: var(--text-dust);
    margin-bottom: var(--space-sm);
}

.bordello-tier-desc {
    font-size: var(--text-xs);
    color: var(--text-ash);
    margin: 0;
    line-height: 1.4;
}

/* Women Cards */
.bordello-section {
    margin-bottom: var(--space-lg);
}

.bordello-section h4 {
    font-family: var(--font-header);
    color: var(--text-bone);
    margin-bottom: var(--space-md);
    font-size: var(--text-sm);
}

.bordello-women-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-md);
}

.bordello-woman-card {
    background: var(--surface);
    border: 1px solid rgba(232, 115, 42, 0.06);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.bordello-woman-card:hover:not(.locked) {
    border-color: var(--woman-color, rgba(233, 30, 99, 0.25));
    transform: translateY(-2px);
}

.bordello-woman-card.selected {
    border-color: var(--woman-color, #e91e63);
    box-shadow: 0 0 12px rgba(233, 30, 99, 0.12);
}

.bordello-woman-card.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.bordello-woman-icon {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

.bordello-woman-portrait {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
    border: 2px solid rgba(233, 30, 99, 0.1);
    transition: border-color var(--transition-fast);
}

.bordello-woman-card.selected .bordello-woman-portrait {
    border-color: var(--woman-color, #e91e63);
}

.bordello-woman-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.bordello-woman-portrait img:hover {
    opacity: 0.7;
}

.bordello-woman-name {
    font-family: var(--font-header);
    color: var(--text-bone);
    margin: 0 0 2px;
    font-size: var(--text-sm);
}

.bordello-woman-specialty {
    display: inline-block;
    font-size: 0.6rem;
    text-transform: uppercase;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 8px;
    background: rgba(233, 30, 99, 0.1);
    color: #f48fb1;
    margin-bottom: var(--space-xs);
}

.bordello-woman-desc {
    font-size: var(--text-xs);
    color: var(--text-ash);
    margin: 0;
    line-height: 1.3;
}

/* Portrait pop-up overlay */
.portrait-popup-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: portraitFadeIn 0.2s ease;
    overflow: visible !important;
}

.portrait-popup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    animation: portraitPopIn 0.25s ease;
}

.portrait-popup-overlay img {
    max-height: 75vh;
    max-width: 85vw;
    border-radius: var(--radius-md);
    border: 3px solid rgba(233, 30, 99, 0.5);
    box-shadow:
        0 0 40px rgba(233, 30, 99, 0.4),
        0 0 80px rgba(233, 30, 99, 0.2),
        0 12px 32px rgba(0, 0, 0, 0.8);
}

.portrait-popup-name {
    color: #f48fb1;
    font-family: 'Rye', cursive;
    font-size: 1.4rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    margin: 0;
}

@keyframes portraitFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes portraitPopIn {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Add-Ons */
.bordello-addons-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.bordello-addon-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--surface);
    border: 1px solid rgba(232, 115, 42, 0.06);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: var(--text-sm);
    color: var(--text-dust);
}

.bordello-addon-row:hover {
    border-color: rgba(233, 30, 99, 0.15);
}

.bordello-addon-row.checked {
    border-color: rgba(233, 30, 99, 0.3);
    background: rgba(233, 30, 99, 0.04);
    color: var(--text-bone);
}

.bordello-addon-row input[type="checkbox"] {
    accent-color: #e91e63;
}

.bordello-addon-name {
    flex: 1;
}

.bordello-addon-stat {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: #2ecc71;
}

.bordello-addon-cost {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: #e91e63;
}

/* Confirm Bar */
.bordello-confirm-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    background: var(--surface);
    border: 1px solid rgba(233, 30, 99, 0.15);
    border-radius: var(--radius-md);
    margin-top: var(--space-lg);
}

.bordello-total {
    font-family: var(--font-header);
    font-size: var(--text-base);
    color: var(--text-bone);
}

.bordello-total strong {
    color: #e91e63;
    font-size: 1.2rem;
}

#bordello-confirm-btn {
    background: linear-gradient(135deg, #c2185b, #e91e63);
    border: none;
    color: white;
    padding: var(--space-sm) var(--space-xl);
    font-size: var(--text-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

#bordello-confirm-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

#bordello-confirm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Result */
.bordello-result {
    margin-top: var(--space-lg);
    padding: var(--space-lg);
    background: rgba(233, 30, 99, 0.04);
    border: 1px solid rgba(233, 30, 99, 0.12);
    border-radius: var(--radius-md);
}

.bordello-result-speech {
    font-size: var(--text-base);
    color: var(--text-bone);
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

.bordello-result-speech em {
    color: var(--text-dust);
}

.bordello-result-effects {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.bordello-result-heal,
.bordello-result-buff,
.bordello-result-xp {
    padding: 2px 10px;
    border-radius: 8px;
    font-size: var(--text-xs);
    font-weight: 600;
}

.bordello-result-heal { background: rgba(46, 204, 113, 0.1); color: #2ecc71; }
.bordello-result-buff { background: rgba(156, 39, 176, 0.1); color: #ce93d8; }
.bordello-result-xp { background: rgba(233, 30, 99, 0.1); color: #f48fb1; }

.bordello-result-addons {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
}

.bordello-addon-tag {
    padding: 1px 8px;
    border-radius: 8px;
    font-size: 0.65rem;
    background: rgba(46, 204, 113, 0.08);
    color: #2ecc71;
}

.bordello-result-bonus {
    padding: var(--space-sm);
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: var(--radius-sm);
    color: #ffd700;
    font-size: var(--text-sm);
    margin-top: var(--space-sm);
}

.bordello-result-side {
    padding: var(--space-sm);
    background: rgba(255, 193, 7, 0.06);
    border: 1px solid rgba(255, 193, 7, 0.1);
    border-radius: var(--radius-sm);
    color: #ffc107;
    font-size: var(--text-sm);
    font-style: italic;
    margin-top: var(--space-sm);
}

.bordello-result-levelup {
    padding: var(--space-sm);
    background: rgba(233, 30, 99, 0.1);
    border: 1px solid rgba(233, 30, 99, 0.25);
    border-radius: var(--radius-sm);
    color: #e91e63;
    font-family: var(--font-header);
    font-size: var(--text-sm);
    text-align: center;
    margin-top: var(--space-sm);
}

/* Gossip */
.bordello-gossip-category {
    font-family: var(--font-header);
    color: #f48fb1;
    font-size: var(--text-sm);
    margin: var(--space-md) 0 var(--space-sm);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid rgba(233, 30, 99, 0.08);
}

.bordello-gossip-item {
    padding: var(--space-sm) var(--space-md);
    background: var(--surface);
    border: 1px solid rgba(232, 115, 42, 0.06);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-xs);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
}

.bordello-gossip-item.locked {
    opacity: 0.4;
}

.bordello-gossip-item.purchased {
    flex-direction: column;
    align-items: flex-start;
    border-color: rgba(233, 30, 99, 0.1);
}

.bordello-gossip-title {
    font-family: var(--font-header);
    font-size: var(--text-sm);
    color: var(--text-bone);
}

.bordello-gossip-level {
    font-size: var(--text-xs);
    color: var(--text-ash);
    margin-left: var(--space-xs);
}

.bordello-gossip-cost {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: #e91e63;
    margin-left: var(--space-sm);
}

.bordello-gossip-content {
    font-size: var(--text-sm);
    color: var(--text-dust);
    font-style: italic;
    line-height: 1.5;
    margin-top: var(--space-xs);
}

.bordello-buy-gossip-btn {
    padding: 3px 12px;
    font-size: var(--text-xs);
    background: rgba(233, 30, 99, 0.08);
    border: 1px solid rgba(233, 30, 99, 0.2);
    color: #e91e63;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.bordello-buy-gossip-btn:hover {
    background: rgba(233, 30, 99, 0.15);
}

/* Companion Hire */
.bordello-hire-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-md);
}

.bordello-hire-card {
    background: var(--surface);
    border: 1px solid rgba(232, 115, 42, 0.06);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.bordello-hire-card:not(.locked):hover {
    border-color: var(--woman-color, rgba(233, 30, 99, 0.25));
}

.bordello-hire-card.locked {
    opacity: 0.4;
}

.bordello-hire-icon {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

.bordello-hire-portrait {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
    border: 2px solid rgba(233, 30, 99, 0.1);
}

.bordello-hire-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.bordello-hire-portrait img:hover {
    opacity: 0.7;
}

.bordello-hire-card h5 {
    font-family: var(--font-header);
    color: var(--text-bone);
    margin: 0 0 var(--space-xs);
}

.bordello-hire-buff {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: #2ecc71;
    margin-bottom: var(--space-sm);
}

.bordello-hire-meta {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    font-size: var(--text-xs);
    color: var(--text-dust);
    margin-bottom: var(--space-sm);
}

.bordello-hire-btn {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--text-xs);
    background: linear-gradient(135deg, #c2185b, #e91e63);
    border: none;
    color: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.bordello-hire-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.25);
}

/* Active Companion Card */
.bordello-active-comp-card {
    background: rgba(233, 30, 99, 0.04);
    border: 1px solid rgba(233, 30, 99, 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
}

.bordello-active-comp-header {
    font-family: var(--font-header);
    font-size: var(--text-sm);
    color: var(--text-bone);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.bordello-active-comp-details {
    display: flex;
    gap: var(--space-lg);
    font-size: var(--text-xs);
    color: var(--text-dust);
    margin-bottom: var(--space-sm);
}

/* Responsive */
@media (max-width: 768px) {
    .bordello-tiers-grid {
        grid-template-columns: 1fr;
    }

    .bordello-women-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bordello-hire-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bordello-confirm-bar {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }

    .bordello-tabs {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .bordello-women-grid,
    .bordello-hire-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   Beg on the Street - Death Spiral Safety Net
   ========================================= */
.beg-panel {
    background: linear-gradient(135deg, rgba(80, 40, 20, 0.6), rgba(60, 30, 15, 0.8));
    border: 1px solid rgba(200, 120, 50, 0.3);
    border-left: 4px solid var(--accent-rust);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    animation: begPulse 3s ease-in-out infinite;
}

@keyframes begPulse {
    0%, 100% { border-left-color: var(--accent-rust); }
    50% { border-left-color: var(--accent-gold); }
}

.beg-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.beg-header > i {
    font-size: 1.8rem;
    color: var(--accent-rust);
    margin-top: 2px;
}

.beg-header h3 {
    margin: 0;
    font-family: 'Rye', cursive;
    color: var(--accent-gold);
    font-size: 1.1rem;
}

.beg-header p {
    margin: var(--space-xs) 0 0;
    color: var(--text-dust);
    font-size: 0.85rem;
    font-style: italic;
}

#beg-message {
    min-height: 0;
    transition: all 0.3s ease;
}

#beg-message:not(:empty) {
    margin-bottom: var(--space-md);
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
}

.beg-narrative {
    color: var(--text-light);
    font-style: italic;
    margin: 0 0 var(--space-sm);
    line-height: 1.5;
}

.beg-earnings {
    color: var(--accent-gold);
    font-weight: 600;
    margin: 0;
}

.beg-btn {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: linear-gradient(135deg, var(--accent-rust), #8b4513);
    color: var(--text-light);
    border: 1px solid rgba(200, 120, 50, 0.4);
    border-radius: var(--radius-sm);
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.beg-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #a0522d, #cd853f);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(160, 82, 45, 0.3);
}

.beg-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* =========================================
   Doctor's Bed Rest System
   ========================================= */
.bed-rest-panel {
    background: linear-gradient(135deg, rgba(30, 50, 60, 0.6), rgba(20, 40, 50, 0.8));
    border: 1px solid rgba(100, 180, 220, 0.15);
    border-left: 4px solid #5b9bd5;
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.bed-rest-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.bed-rest-header > i {
    font-size: 1.8rem;
    color: #5b9bd5;
    margin-top: 2px;
}

.bed-rest-header h3 {
    margin: 0;
    font-family: 'Rye', cursive;
    color: #5b9bd5;
    font-size: 1.1rem;
}

.bed-rest-header p {
    margin: var(--space-xs) 0 0;
    color: var(--text-dust);
    font-size: 0.85rem;
    font-style: italic;
}

.bed-rest-progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: var(--space-sm);
}

.bed-rest-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #5b9bd5, #7ec8e3);
    border-radius: 6px;
    transition: width 1s linear;
    width: 0%;
}

.bed-rest-timer {
    text-align: center;
    color: #7ec8e3;
    font-family: 'Crimson Text', serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.bed-rest-effects {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
}

.bed-rest-effects span {
    font-size: 0.8rem;
    color: var(--text-dust);
    background: rgba(91, 155, 213, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(91, 155, 213, 0.15);
}

.bed-rest-effects span i {
    color: #5b9bd5;
    margin-right: 4px;
}

.bed-rest-btn {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: linear-gradient(135deg, #3a7bbf, #5b9bd5);
    color: var(--text-light);
    border: 1px solid rgba(91, 155, 213, 0.4);
    border-radius: var(--radius-sm);
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.bed-rest-btn:hover {
    background: linear-gradient(135deg, #5b9bd5, #7ec8e3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(91, 155, 213, 0.3);
}

.bed-leave-btn {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: rgba(200, 60, 60, 0.2);
    color: #e57373;
    border: 1px solid rgba(200, 60, 60, 0.3);
    border-radius: var(--radius-sm);
    font-family: 'Crimson Text', serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-top: var(--space-sm);
}

.bed-leave-btn:hover {
    background: rgba(200, 60, 60, 0.35);
}

/* Bone Setting */
#bone-set-section {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(91, 155, 213, 0.15);
}

#bone-set-section h4 {
    color: #5b9bd5;
    font-family: 'Rye', cursive;
    font-size: 0.95rem;
    margin: 0 0 var(--space-xs);
}

.bone-set-desc {
    color: var(--text-dust);
    font-size: 0.8rem;
    font-style: italic;
    margin: 0 0 var(--space-md);
}

.bone-set-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-xs);
    border: 1px solid rgba(91, 155, 213, 0.08);
}

.bone-set-item span {
    font-size: 0.85rem;
    color: var(--text-dust);
}

.bone-set-item span i {
    margin-right: 4px;
}

.bone-set-item.bone-healing {
    border-color: rgba(255, 193, 7, 0.2);
}

.bone-set-item.bone-healing .bone-timer {
    color: #ffc107;
    font-weight: 600;
}

.bone-set-item.bone-ready {
    border-color: rgba(76, 175, 80, 0.3);
    background: rgba(76, 175, 80, 0.08);
}

.bone-set-btn, .bone-complete-btn {
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-family: 'Crimson Text', serif;
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.bone-set-btn {
    background: rgba(91, 155, 213, 0.2);
    color: #7ec8e3;
    border: 1px solid rgba(91, 155, 213, 0.3);
}

.bone-set-btn:hover {
    background: rgba(91, 155, 213, 0.35);
}

.bone-complete-btn {
    background: rgba(76, 175, 80, 0.2);
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.bone-complete-btn:hover {
    background: rgba(76, 175, 80, 0.35);
}

/* Bed Rest Lockout Popup */
.bed-rest-popup-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.75);
    z-index: 999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: portraitFadeIn 0.2s ease;
}

.bed-rest-popup {
    background: linear-gradient(135deg, #3a2518, #2a1a10);
    border: 2px solid rgba(232, 115, 42, 0.4);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl) var(--space-2xl) var(--space-xl);
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow:
        0 0 30px rgba(232, 115, 42, 0.2),
        0 12px 40px rgba(0, 0, 0, 0.6);
    animation: portraitPopIn 0.25s ease;
}

.bed-rest-popup-icon {
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: var(--space-md);
}

.bed-rest-popup-msg {
    color: #ffffff;
    font-family: 'Crimson Text', serif;
    font-size: 1.15rem;
    font-weight: 700;
    font-style: italic;
    line-height: 1.6;
    margin: 0 0 var(--space-lg);
}

.bed-rest-popup-close {
    padding: var(--space-sm) var(--space-xl);
    background: var(--accent-ember);
    color: #ffffff;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.bed-rest-popup-close:hover {
    background: #d4651f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(160, 82, 45, 0.3);
}

/* ═══════════════════════════════════════════════
   RANCH & HORSES
   ═══════════════════════════════════════════════ */

/* Purchase Card */
.ranch-purchase-card {
    max-width: 420px;
    margin: var(--space-3xl) auto;
    padding: var(--space-2xl);
    background: var(--surface-elevated);
    border: 2px solid rgba(184, 154, 66, 0.3);
    border-radius: var(--radius-lg);
    text-align: center;
}

.ranch-purchase-icon {
    font-size: 4rem;
    color: var(--accent-copper);
    margin-bottom: var(--space-md);
}

.ranch-purchase-card h2 {
    font-family: var(--font-header);
    color: var(--accent-gold);
    margin-bottom: var(--space-sm);
}

.ranch-purchase-card p {
    color: var(--text-dust);
    margin-bottom: var(--space-lg);
}

.ranch-purchase-price {
    font-family: var(--font-header);
    font-size: var(--text-2xl);
    color: var(--accent-gold);
    margin-bottom: var(--space-lg);
}

.ranch-buy-btn {
    padding: var(--space-sm) var(--space-xl);
    background: var(--accent-ember);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: var(--text-lg);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ranch-buy-btn:hover {
    background: #d4651f;
    transform: translateY(-1px);
}

/* Banners */
.ranch-banner {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(184, 154, 66, 0.15);
    border: 1px solid rgba(184, 154, 66, 0.3);
    border-radius: var(--radius-sm);
    color: var(--accent-gold);
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.ranch-banner.cattle-banner {
    background: rgba(74, 140, 50, 0.15);
    border-color: rgba(74, 140, 50, 0.3);
    color: var(--success);
}

.ranch-collect-btn {
    margin-left: auto;
    padding: var(--space-xs) var(--space-md);
    background: var(--success);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ranch-collect-btn:hover {
    filter: brightness(1.2);
}

/* Ranch Tabs */
.ranch-tabs {
    display: flex;
    gap: var(--space-xs);
    margin: var(--space-lg) 0 var(--space-md);
    border-bottom: 2px solid rgba(184, 154, 66, 0.2);
    padding-bottom: 0;
}

.ranch-tab {
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-dust);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ranch-tab:hover {
    color: var(--accent-gold);
}

.ranch-tab.active {
    color: var(--accent-gold);
    border-bottom-color: var(--accent-gold);
}

/* Horse Grid */
.ranch-horse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

/* Horse Card */
.ranch-horse-card {
    background: var(--surface-elevated);
    border: 1px solid rgba(160, 120, 80, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: all var(--transition-fast);
}

.ranch-horse-card:hover {
    border-color: rgba(184, 154, 66, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.ranch-horse-card.rarity-common { border-left: 3px solid #8a8a8a; }
.ranch-horse-card.rarity-uncommon { border-left: 3px solid #4a8c32; }
.ranch-horse-card.rarity-rare { border-left: 3px solid #4a7c9c; }
.ranch-horse-card.rarity-epic { border-left: 3px solid #9b59b6; }
.ranch-horse-card.rarity-legendary { border-left: 3px solid var(--accent-gold); }

.horse-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.horse-card-icon {
    font-size: 1.5rem;
    color: var(--accent-copper);
}

.horse-card-name {
    font-family: var(--font-header);
    font-size: var(--text-lg);
    color: var(--text-bone);
}

.horse-card-breed {
    font-size: var(--text-xs);
    color: var(--text-dust);
}

/* Rarity Badges */
.horse-rarity-badge {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.horse-rarity-badge.rarity-common { background: rgba(138, 138, 138, 0.2); color: #aaa; }
.horse-rarity-badge.rarity-uncommon { background: rgba(74, 140, 50, 0.2); color: #6abf40; }
.horse-rarity-badge.rarity-rare { background: rgba(74, 124, 156, 0.2); color: #5ba8d0; }
.horse-rarity-badge.rarity-epic { background: rgba(155, 89, 182, 0.2); color: #c084f5; }
.horse-rarity-badge.rarity-legendary { background: rgba(184, 154, 66, 0.2); color: var(--accent-gold); }

/* Horse Tags */
.horse-card-tags {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
    min-height: 1.5em;
}

.horse-tag {
    padding: 1px 8px;
    border-radius: var(--radius-xs);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
}

.horse-tag.tag-active { background: rgba(232, 115, 42, 0.2); color: var(--accent-ember); }
.horse-tag.tag-pregnant { background: rgba(233, 30, 99, 0.2); color: #f48fb1; }
.horse-tag.tag-foal { background: rgba(74, 124, 156, 0.2); color: #5ba8d0; }

/* Horse Stats Row */
.horse-card-stats {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
}

.horse-stat {
    font-size: var(--text-sm);
    color: var(--text-dust);
}

.horse-stat strong {
    color: var(--text-bone);
}

.horse-stat i {
    color: var(--accent-copper);
    width: 14px;
    text-align: center;
}

/* Bond Bar */
.horse-bond-bar {
    height: 4px;
    background: rgba(160, 120, 80, 0.2);
    border-radius: 2px;
    margin-bottom: var(--space-sm);
    overflow: hidden;
}

.horse-bond-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-copper), var(--accent-gold));
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Trait */
.horse-card-trait {
    font-size: var(--text-sm);
    color: var(--text-dust);
    margin-bottom: var(--space-sm);
    line-height: 1.4;
}

.horse-card-trait strong {
    color: var(--accent-gold);
    text-transform: capitalize;
}

.trait-desc {
    display: block;
    font-size: var(--text-xs);
    color: var(--text-ash);
    margin-top: 2px;
}

/* Horse Card Actions */
.horse-card-actions {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
    align-items: center;
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(160, 120, 80, 0.15);
}

.horse-btn {
    padding: var(--space-xs) var(--space-sm);
    border: none;
    border-radius: var(--radius-xs);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.horse-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.15);
}

.horse-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.horse-btn.btn-saddle { background: var(--accent-ember); color: #fff; }
.horse-btn.btn-unsaddle { background: var(--accent-copper); color: #fff; }
.horse-btn.btn-name { background: rgba(184, 154, 66, 0.2); color: var(--accent-gold); }
.horse-btn.btn-buy { background: var(--success); color: #fff; }
.horse-btn.btn-sell { background: rgba(184, 58, 42, 0.2); color: var(--danger); }

.horse-price {
    font-family: var(--font-header);
    font-size: var(--text-lg);
    color: var(--accent-gold);
}

/* Locked Horse Overlay */
.horse-locked { opacity: 0.6; position: relative; }

.horse-locked-overlay {
    color: var(--danger);
    font-weight: 700;
    font-size: var(--text-sm);
    padding: var(--space-xs) 0;
}

/* Upgrades Grid */
.ranch-upgrades-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.ranch-upgrade-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--surface-elevated);
    border: 1px solid rgba(160, 120, 80, 0.2);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.ranch-upgrade-card.upgrade-owned {
    border-color: rgba(74, 140, 50, 0.3);
    background: rgba(74, 140, 50, 0.08);
}

.ranch-upgrade-card.upgrade-locked {
    opacity: 0.5;
}

.upgrade-icon {
    font-size: 1.5rem;
    color: var(--accent-copper);
    width: 40px;
    text-align: center;
}

.upgrade-owned .upgrade-icon {
    color: var(--success);
}

.upgrade-info {
    flex: 1;
}

.upgrade-name {
    font-family: var(--font-header);
    color: var(--text-bone);
    font-size: var(--text-base);
}

.upgrade-desc {
    font-size: var(--text-sm);
    color: var(--text-dust);
}

.upgrade-req {
    font-size: var(--text-xs);
    color: var(--danger);
    margin-top: 2px;
}

.upgrade-action {
    text-align: right;
}

.upgrade-cost {
    font-family: var(--font-header);
    color: var(--accent-gold);
    margin-bottom: var(--space-xs);
}

.upgrade-owned-badge {
    color: var(--success);
    font-weight: 700;
    font-size: var(--text-sm);
}

/* Breeding */
.ranch-breed-info {
    color: var(--text-dust);
    font-size: var(--text-sm);
    margin-bottom: var(--space-md);
}

.ranch-breed-selectors {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.ranch-breed-select {
    flex: 1;
}

.ranch-breed-select label {
    display: block;
    font-weight: 600;
    color: var(--text-dust);
    margin-bottom: var(--space-xs);
    font-size: var(--text-sm);
}

.ranch-breed-select select {
    width: 100%;
    padding: var(--space-sm);
    background: var(--bg-warm);
    color: var(--text-bone);
    border: 1px solid rgba(160, 120, 80, 0.3);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: var(--text-base);
}

.ranch-breed-vs {
    color: var(--danger);
    font-size: 1.5rem;
}

.ranch-breed-btn {
    padding: var(--space-sm) var(--space-xl);
    background: linear-gradient(135deg, #e91e63, #c2185b);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ranch-breed-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

/* Pregnant / Foal Cards */
.ranch-pregnant-card {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(233, 30, 99, 0.08);
    border: 1px solid rgba(233, 30, 99, 0.2);
    border-radius: var(--radius-sm);
    color: var(--text-dust);
    margin-bottom: var(--space-xs);
}

.ranch-pregnant-card i {
    color: #f48fb1;
}

/* Empty State */
.ranch-empty-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-ash);
}

.ranch-empty-state p {
    margin-top: var(--space-md);
}

/* Horse Detail Modal */
.ranch-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.ranch-modal-content {
    background: var(--bg-medium);
    border: 2px solid rgba(184, 154, 66, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

/* Slots Info */
.ranch-slots-info {
    color: var(--text-dust);
    font-weight: 600;
    margin-bottom: var(--space-md);
    font-size: var(--text-sm);
}

.ranch-slots-info i {
    color: var(--accent-copper);
}

/* Mobile */
@media (max-width: 768px) {
    .ranch-horse-grid {
        grid-template-columns: 1fr;
    }

    .ranch-breed-selectors {
        flex-direction: column;
    }

    .ranch-breed-vs {
        transform: rotate(90deg);
    }

    .ranch-upgrade-card {
        flex-direction: column;
        text-align: center;
    }

    .upgrade-action {
        text-align: center;
    }
}

/* ═══════════════════════════════════════════════════════
   GATHERING SYSTEM
   ═══════════════════════════════════════════════════════ */

.gathering-page {
    max-width: 900px;
    margin: 0 auto;
}

.gathering-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--surface-elevated);
    border-radius: 12px;
    border: 1px solid rgba(184, 154, 66, 0.15);
}

.gathering-npc {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.gathering-npc-portrait {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-copper), var(--accent-ember));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.gathering-npc-info h2 {
    font-family: var(--font-header);
    color: var(--accent-gold);
    margin: 0 0 0.25rem 0;
    font-size: 1.3rem;
}

.gathering-npc-name {
    color: var(--accent-ember);
    font-weight: 600;
    font-size: 0.9rem;
}

.gathering-npc-dialogue {
    color: var(--text-dust);
    font-style: italic;
    margin: 0.3rem 0 0 0;
    font-size: 0.85rem;
}

.gathering-crafting-level {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    flex-shrink: 0;
}

.gathering-level-label {
    color: var(--text-ash);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gathering-level-value {
    color: var(--accent-gold);
    font-family: var(--font-header);
    font-size: 1.8rem;
}

.gathering-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.gathering-quick-action,
.gathering-timed-action {
    background: var(--surface-elevated);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(184, 154, 66, 0.15);
}

.gathering-quick-action h3,
.gathering-timed-action h3 {
    font-family: var(--font-header);
    color: var(--accent-gold);
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.gathering-quick-action p,
.gathering-timed-action p {
    color: var(--text-dust);
    font-size: 0.85rem;
    margin: 0 0 1rem 0;
}

.btn-gather-quick,
.btn-gather-session,
.btn-gather-collect {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-gather-quick {
    background: linear-gradient(135deg, var(--accent-ember), #c65d1a);
    color: white;
}

.btn-gather-quick:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 115, 42, 0.3);
}

.btn-gather-session {
    background: linear-gradient(135deg, var(--accent-copper), #8a6540);
    color: white;
}

.btn-gather-session:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(160, 120, 80, 0.3);
}

.btn-gather-collect {
    background: linear-gradient(135deg, #27ae60, #1e8449);
    color: white;
    animation: pulse-glow 1.5s infinite alternate;
}

@keyframes pulse-glow {
    from { box-shadow: 0 0 5px rgba(39, 174, 96, 0.3); }
    to { box-shadow: 0 0 15px rgba(39, 174, 96, 0.6); }
}

.gathering-timer {
    text-align: center;
    padding: 1rem;
    color: var(--accent-gold);
    font-family: var(--font-display);
    font-size: 1.2rem;
}

.gathering-timer i {
    margin-right: 0.5rem;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.gathering-session-location {
    display: block;
    text-align: center;
    color: var(--text-ash);
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.gathering-materials h3 {
    font-family: var(--font-header);
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.gathering-material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gathering-material-card {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    background: var(--surface-elevated);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border-left: 3px solid var(--text-ash);
    transition: transform 0.2s;
}

.gathering-material-card:hover {
    transform: translateY(-2px);
}

.gathering-material-card.rarity-common { border-left-color: #8a8a8a; }
.gathering-material-card.rarity-uncommon { border-left-color: #4a8c32; }
.gathering-material-card.rarity-rare { border-left-color: #4a7c9c; }
.gathering-material-card.rarity-epic { border-left-color: #9b59b6; }
.gathering-material-card.rarity-legendary { border-left-color: var(--accent-gold); }

.gathering-material-card.material-locked {
    opacity: 0.5;
}

.material-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-bone);
    flex-shrink: 0;
}

.material-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.material-name {
    color: var(--text-bone);
    font-weight: 600;
    font-size: 0.9rem;
}

.material-rarity {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rarity-text-common { color: #8a8a8a; }
.rarity-text-uncommon { color: #4a8c32; }
.rarity-text-rare { color: #4a7c9c; }
.rarity-text-epic { color: #9b59b6; }
.rarity-text-legendary { color: var(--accent-gold); }

.material-owned {
    color: var(--text-dust);
    font-size: 0.8rem;
}

.material-owned strong {
    color: var(--accent-ember);
}

.material-req {
    color: #c0392b;
    font-size: 0.75rem;
}

/* ═══════════════════════════════════════════════════════
   CRAFTING STATIONS
   ═══════════════════════════════════════════════════════ */

.crafting-page {
    max-width: 900px;
    margin: 0 auto;
}

.crafting-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--surface-elevated);
    border-radius: 12px;
    border: 1px solid rgba(184, 154, 66, 0.15);
}

.crafting-npc {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.crafting-npc-portrait {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-ember), #a85020);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.crafting-npc-info h2 {
    font-family: var(--font-header);
    color: var(--accent-gold);
    margin: 0 0 0.25rem 0;
    font-size: 1.3rem;
}

.crafting-npc-name {
    color: var(--accent-ember);
    font-weight: 600;
    font-size: 0.9rem;
}

.crafting-npc-dialogue {
    color: var(--text-dust);
    font-style: italic;
    margin: 0.3rem 0 0 0;
    font-size: 0.85rem;
}

.crafting-level-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    min-width: 140px;
}

.crafting-level-badge,
.crafting-mastery-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.crafting-level-label,
.crafting-mastery-label {
    color: var(--text-ash);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.crafting-level-value {
    color: var(--accent-gold);
    font-family: var(--font-header);
    font-size: 1.4rem;
}

.crafting-mastery-value {
    color: var(--accent-ember);
    font-family: var(--font-header);
    font-size: 1.2rem;
}

.crafting-xp-bar,
.crafting-mastery-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.crafting-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-gold), #d4a843);
    border-radius: 3px;
    transition: width 0.3s;
}

.crafting-mastery-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-ember), #c65d1a);
    border-radius: 3px;
    transition: width 0.3s;
}

.crafting-xp-text,
.crafting-mastery-text {
    color: var(--text-ash);
    font-size: 0.7rem;
}

.crafting-recipes h3 {
    font-family: var(--font-header);
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.crafting-recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.crafting-recipe-card {
    background: var(--surface-elevated);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid rgba(184, 154, 66, 0.15);
    transition: transform 0.2s;
}

.crafting-recipe-card:hover {
    transform: translateY(-2px);
}

.crafting-recipe-card.recipe-locked {
    opacity: 0.6;
}

.crafting-recipe-card.recipe-legendary {
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px rgba(184, 154, 66, 0.15);
}

.recipe-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.recipe-item-icon {
    font-size: 1.3rem;
    color: var(--accent-ember);
}

.recipe-title {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.recipe-name {
    color: var(--text-bone);
    font-weight: 700;
    font-size: 1rem;
}

.recipe-rarity {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recipe-legendary-badge {
    background: linear-gradient(135deg, var(--accent-gold), #d4a843);
    color: #1a1410;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
}

.recipe-desc {
    color: var(--text-dust);
    font-size: 0.8rem;
    margin: 0 0 0.75rem 0;
    font-style: italic;
}

.recipe-ingredients {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.recipe-ingredient {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
}

.recipe-ingredient.has-enough {
    color: #27ae60;
}

.recipe-ingredient.not-enough {
    color: #c0392b;
}

.recipe-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
}

.recipe-energy {
    color: var(--accent-gold);
}

.recipe-xp {
    color: #27ae60;
}

.recipe-fail-chance {
    color: #c0392b;
    font-weight: 600;
}

.recipe-qty {
    color: var(--text-ash);
    margin-left: auto;
}

.btn-craft {
    width: 100%;
    padding: 0.65rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent-ember), #c65d1a);
    color: white;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-craft:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 115, 42, 0.3);
}

.btn-craft:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.recipe-locked-msg {
    text-align: center;
    padding: 1rem;
    color: var(--text-ash);
    font-size: 0.85rem;
}

.recipe-locked-msg i {
    margin-right: 0.3rem;
}

/* Craft Result Modal */
.craft-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.craft-modal {
    background: var(--surface-elevated);
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    border: 1px solid rgba(184, 154, 66, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.craft-modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.craft-modal h3 {
    font-family: var(--font-header);
    color: var(--accent-gold);
    margin: 0 0 0.75rem 0;
}

.craft-modal p {
    color: var(--text-dust);
    font-style: italic;
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
}

.craft-modal-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.craft-modal-item i {
    font-size: 1.3rem;
    color: var(--accent-ember);
}

#craft-modal-item-name {
    color: var(--text-bone);
    font-weight: 700;
}

.craft-quality-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.quality-poor {
    background: #555;
    color: #aaa;
}

.quality-normal {
    background: rgba(184, 154, 66, 0.2);
    color: var(--text-bone);
}

.quality-fine {
    background: rgba(74, 124, 156, 0.3);
    color: #6aafcf;
}

.quality-masterwork {
    background: linear-gradient(135deg, var(--accent-gold), #d4a843);
    color: #1a1410;
}

.craft-modal-xp {
    color: #27ae60;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}

.craft-modal-close {
    padding: 0.65rem 2rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent-ember), #c65d1a);
    color: white;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.craft-modal-close:hover {
    transform: translateY(-2px);
}

/* Mobile responsive for gathering/crafting */
@media (max-width: 768px) {
    .gathering-header {
        flex-direction: column;
    }

    .gathering-actions {
        grid-template-columns: 1fr;
    }

    .gathering-material-grid {
        grid-template-columns: 1fr;
    }

    .crafting-header {
        flex-direction: column;
    }

    .crafting-recipe-grid {
        grid-template-columns: 1fr;
    }

    .crafting-level-info {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        min-width: auto;
    }
}

/* Slot Machine Payboard */
.bet-selector {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.bet-selector label {
    font-weight: bold;
    color: var(--color-gold, #d4af37);
}

.bet-selector select {
    padding: 5px 10px;
    border: 2px solid var(--color-gold, #d4af37);
    border-radius: 4px;
    background: #3d2817;
    color: #fff;
    font-size: 14px;
}

.luck-bonus {
    color: #4ade80;
    font-size: 12px;
}

.slots-payboard {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #5c4033 0%, #3d2817 100%);
    border: 3px solid var(--color-gold, #d4af37);
    border-radius: 8px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5), 0 4px 8px rgba(0,0,0,0.3);
    position: relative;
}

.slots-payboard::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 5px,
        rgba(212, 175, 55, 0.1) 5px,
        rgba(212, 175, 55, 0.1) 10px
    );
    pointer-events: none;
}

.slots-payboard h5 {
    text-align: center;
    color: var(--color-gold, #d4af37);
    margin-bottom: 10px;
    font-size: 16px;
    text-shadow: 1px 1px 2px #000;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 8px;
}

.payboard-table {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pay-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.pay-row:hover {
    background: rgba(212, 175, 55, 0.1);
    border-left-color: var(--color-gold, #d4af37);
}

.pay-row.special {
    background: rgba(139, 69, 19, 0.3);
    border-left-color: #8b4513;
}

.pay-symbols {
    font-size: 18px;
    min-width: 60px;
}

.pay-amount {
    font-weight: bold;
    color: #4ade80;
    font-size: 14px;
    min-width: 50px;
}

.pay-name {
    font-size: 12px;
    color: #ccc;
    text-align: right;
    flex: 1;
}

.payboard-info {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    text-align: center;
}

.payboard-info p {
    margin: 4px 0;
    font-size: 12px;
    color: #aaa;
}

.payboard-info strong {
    color: var(--color-gold, #d4af37);
}

/* Win Animation for Payboard */
.pay-row.winner {
    animation: payboardFlash 0.5s ease-in-out 3;
    background: rgba(74, 222, 128, 0.2);
    border-left-color: #4ade80;
}

@keyframes payboardFlash {
    0%, 100% { background: rgba(74, 222, 128, 0.2); }
    50% { background: rgba(74, 222, 128, 0.5); }
}

/* =========================================
   HEIST SYSTEM + JAIL + WANTED
   ========================================= */

/* ── Status Bar Wanted Pill ── */
.status-wanted {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    font-weight: 600;
    white-space: nowrap;
    transition: all var(--transition-base);
    background: rgba(100, 100, 80, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.status-wanted i {
    font-size: 0.7rem;
}

.wanted-pill-bounty {
    color: var(--accent-gold);
    font-size: 0.6rem;
}

/* Wanted level color coding */
.status-wanted.wanted-0 {
    color: #8a9a6b;
    background: rgba(138, 154, 107, 0.12);
    border-color: rgba(138, 154, 107, 0.25);
}

.status-wanted.wanted-0 i { color: #8a9a6b; }

.status-wanted.wanted-1 {
    color: #c9b458;
    background: rgba(201, 180, 88, 0.12);
    border-color: rgba(201, 180, 88, 0.25);
}
.status-wanted.wanted-1 i { color: #c9b458; }

.status-wanted.wanted-2 {
    color: #d4903a;
    background: rgba(212, 144, 58, 0.15);
    border-color: rgba(212, 144, 58, 0.3);
}
.status-wanted.wanted-2 i { color: #d4903a; }

.status-wanted.wanted-3 {
    color: #c44a2a;
    background: rgba(196, 74, 42, 0.15);
    border-color: rgba(196, 74, 42, 0.3);
}
.status-wanted.wanted-3 i { color: #c44a2a; }

.status-wanted.wanted-4 {
    color: #8b1a1a;
    background: rgba(139, 26, 26, 0.2);
    border-color: rgba(139, 26, 26, 0.4);
    animation: wantedPulse 2s ease-in-out infinite;
}
.status-wanted.wanted-4 i { color: #8b1a1a; }

.status-wanted.wanted-5 {
    color: #ff2020;
    background: rgba(180, 0, 0, 0.25);
    border-color: rgba(255, 32, 32, 0.5);
    animation: deadOrAlivePulse 1.2s ease-in-out infinite;
    text-shadow: 0 0 8px rgba(255, 0, 0, 0.6);
}
.status-wanted.wanted-5 i {
    color: #ff2020;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
}

@keyframes wantedPulse {
    0%, 100% { border-color: rgba(139, 26, 26, 0.4); }
    50% { border-color: rgba(139, 26, 26, 0.7); }
}

@keyframes deadOrAlivePulse {
    0%, 100% {
        border-color: rgba(255, 32, 32, 0.5);
        box-shadow: 0 0 6px rgba(255, 0, 0, 0.2);
    }
    50% {
        border-color: rgba(255, 32, 32, 0.9);
        box-shadow: 0 0 16px rgba(255, 0, 0, 0.5);
    }
}

/* ── Back Room Divider ── */
.back-room-divider {
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    border-top: 2px solid rgba(122, 26, 26, 0.3);
    border-bottom: 2px solid rgba(122, 26, 26, 0.3);
    background: linear-gradient(180deg, rgba(122, 26, 26, 0.05) 0%, rgba(30, 10, 5, 0.3) 50%, rgba(122, 26, 26, 0.05) 100%);
    margin: var(--space-lg) 0;
}

.back-room-door {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.back-room-door i {
    font-size: 2.5rem;
    color: var(--accent-blood);
    opacity: 0.7;
    text-shadow: 0 0 12px rgba(122, 26, 26, 0.4);
}

.back-room-text {
    font-style: italic;
    color: var(--text-ash);
    font-size: var(--text-sm);
    max-width: 350px;
}

/* ── NPC Portraits (Scarlett + Pete) ── */
.scarlett-portrait {
    background: linear-gradient(135deg, #3a1a2a, #1a0a0f);
    border-color: rgba(180, 60, 90, 0.4);
}
.scarlett-portrait i { color: #c44a6a; }

.pete-portrait {
    background: linear-gradient(135deg, #2a2a1a, #0f0f0a);
    border-color: rgba(140, 130, 90, 0.4);
}
.pete-portrait i { color: #8c8a5a; }

/* ── Heist Rank Bar ── */
.heist-rank-bar {
    margin-top: var(--space-sm);
}

.heist-rank-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: var(--text-sm);
    color: var(--text-dust);
}

.heist-rank-info strong {
    color: var(--accent-ember);
}

.heist-xp-fill {
    background: linear-gradient(90deg, #7a1a1a, #c44a2a) !important;
}

.heist-stats-row {
    display: flex;
    gap: var(--space-md);
    margin-top: 6px;
    font-size: var(--text-xs);
    color: var(--text-ash);
}

.heist-stats-row strong {
    color: var(--text-bone);
}

/* ── Wanted Display (Bank page) ── */
.wanted-display {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-sm);
}

.wanted-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: var(--text-sm);
    font-weight: 700;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wanted-badge.wanted-level-0 {
    background: rgba(100, 100, 80, 0.15);
    color: var(--text-ash);
    border: 1px solid rgba(100, 100, 80, 0.3);
}

.wanted-badge.wanted-level-1 {
    background: rgba(201, 180, 88, 0.15);
    color: #c9b458;
    border: 1px solid rgba(201, 180, 88, 0.3);
}

.wanted-badge.wanted-level-2 {
    background: rgba(212, 144, 58, 0.18);
    color: #d4903a;
    border: 1px solid rgba(212, 144, 58, 0.35);
}

.wanted-badge.wanted-level-3 {
    background: rgba(196, 74, 42, 0.18);
    color: #c44a2a;
    border: 1px solid rgba(196, 74, 42, 0.35);
}

.wanted-badge.wanted-level-4 {
    background: rgba(139, 26, 26, 0.22);
    color: #b82020;
    border: 1px solid rgba(139, 26, 26, 0.45);
    animation: wantedPulse 2s ease-in-out infinite;
}

.wanted-badge.wanted-level-5 {
    background: rgba(180, 0, 0, 0.25);
    color: #ff2020;
    border: 1px solid rgba(255, 32, 32, 0.5);
    animation: deadOrAlivePulse 1.2s ease-in-out infinite;
    text-shadow: 0 0 6px rgba(255, 0, 0, 0.5);
}

.wanted-bounty {
    font-size: var(--text-sm);
    color: var(--accent-gold);
    font-weight: 600;
    font-family: var(--font-mono);
}

/* ── Cooldown ── */
.cooldown-text {
    color: var(--text-ash);
    font-style: italic;
    font-size: var(--text-sm);
}

.cooldown-text i {
    color: var(--warning);
    margin-right: 4px;
}

/* ── Heist Cards Grid ── */
.heist-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-sm);
}

.heist-card {
    background: var(--surface-elevated);
    border: 1px solid rgba(196, 74, 42, 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: all var(--transition-base);
}

.heist-card:hover {
    border-color: rgba(196, 74, 42, 0.35);
    box-shadow: 0 0 16px rgba(196, 74, 42, 0.1);
}

.heist-card.heist-locked {
    opacity: 0.55;
    filter: grayscale(0.3);
}

.heist-card.heist-level-locked {
    opacity: 1;
    filter: none;
    pointer-events: none;
}

.heist-card.heist-level-locked .heist-card-header,
.heist-card.heist-level-locked .heist-card-items,
.heist-card.heist-level-locked .heist-execute-btn {
    opacity: 0.3;
    filter: grayscale(0.6);
}

.heist-card-level-req {
    color: var(--accent-blood);
    font-size: var(--text-sm);
    font-weight: 700;
    text-align: center;
    padding: var(--space-xs) 0;
}

.heist-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.heist-card-tier {
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    color: var(--accent-blood);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

.heist-card-name {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-bone);
    font-family: var(--font-header);
}

.heist-card-payout {
    font-size: var(--text-lg);
    color: var(--success);
    font-weight: 700;
    font-family: var(--font-mono);
    margin-bottom: 2px;
}

.heist-card-chance {
    font-size: var(--text-xs);
    color: var(--text-dust);
    margin-bottom: var(--space-sm);
}

.heist-card-items {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: var(--space-md);
}

.heist-item-check {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 10px;
    font-family: var(--font-mono);
}

.heist-item-check.have {
    background: rgba(74, 140, 50, 0.15);
    color: var(--success);
    border: 1px solid rgba(74, 140, 50, 0.3);
}

.heist-item-check.missing {
    background: rgba(184, 58, 42, 0.12);
    color: var(--danger);
    border: 1px solid rgba(184, 58, 42, 0.25);
}

.heist-execute-btn {
    width: 100%;
    padding: 8px;
    background: linear-gradient(135deg, #7a1a1a, #a02a1a);
    color: var(--text-bone);
    border: 1px solid rgba(160, 42, 26, 0.5);
    border-radius: var(--radius-sm);
    font-family: var(--font-header);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.heist-execute-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #a02a1a, #c44a2a);
    box-shadow: 0 0 12px rgba(196, 74, 42, 0.3);
}

.heist-execute-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Heist Log ── */
.heist-log {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: var(--space-sm);
}

.heist-log-entry {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid transparent;
}

.heist-log-entry.log-clean {
    border-left-color: var(--success);
}

.heist-log-entry.log-messy {
    border-left-color: var(--warning);
}

.heist-log-entry.log-failed {
    border-left-color: var(--danger);
}

.log-name {
    flex: 1;
    color: var(--text-bone);
    font-weight: 600;
}

.log-outcome {
    color: var(--text-dust);
    font-weight: 600;
    min-width: 80px;
}

.log-clean .log-outcome { color: var(--success); }
.log-messy .log-outcome { color: var(--warning); }
.log-failed .log-outcome { color: var(--danger); }

.log-payout {
    color: var(--success);
    font-weight: 600;
    min-width: 50px;
}

.log-xp {
    color: var(--accent-gold);
    min-width: 40px;
}

.log-date {
    color: var(--text-ash);
    min-width: 70px;
    text-align: right;
}

/* ── Jail Page ── */
.jail-free-text {
    text-align: center;
    color: var(--text-dust);
    font-size: var(--text-lg);
    padding: var(--space-xl) 0;
}

.jail-free-text i {
    color: var(--success);
    margin-right: 6px;
}

.jail-timer-section {
    text-align: center;
}

.jail-reason {
    color: var(--text-ash);
    font-style: italic;
    font-size: var(--text-sm);
    margin-bottom: var(--space-sm);
}

.jail-progress {
    height: 22px;
    margin-bottom: var(--space-sm);
}

.jail-fill {
    background: linear-gradient(90deg, #5a5048, #8c8a5a) !important;
}

.jail-timer-text {
    color: var(--text-dust);
    font-size: var(--text-sm);
    font-family: var(--font-mono);
    font-weight: 600;
}

/* ── Jail Actions Grid ── */
.jail-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.jail-action-card {
    text-align: center;
}

.jail-action-card h4 {
    color: var(--text-bone);
    margin-bottom: var(--space-sm);
    font-family: var(--font-header);
    font-size: var(--text-base);
}

.jail-action-card h4 i {
    color: var(--accent-ember);
    margin-right: 4px;
}

.jail-action-card p {
    font-size: var(--text-sm);
    color: var(--text-dust);
    margin-bottom: var(--space-sm);
}

.jail-action-cost {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--accent-gold);
}

.jail-action-btn {
    padding: 8px 16px;
    background: var(--surface-elevated);
    color: var(--text-bone);
    border: 1px solid rgba(232, 115, 42, 0.2);
    border-radius: var(--radius-sm);
    font-family: var(--font-header);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-top: var(--space-xs);
}

.jail-action-btn:hover {
    background: var(--surface-hover);
    border-color: rgba(232, 115, 42, 0.4);
    box-shadow: 0 0 8px rgba(232, 115, 42, 0.15);
}

.jail-btn-danger {
    border-color: rgba(184, 58, 42, 0.3);
}

.jail-btn-danger:hover {
    border-color: rgba(184, 58, 42, 0.6);
    box-shadow: 0 0 8px rgba(184, 58, 42, 0.2);
}

.jail-gamble-input {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
    justify-content: center;
    margin-top: var(--space-sm);
}

.jail-gamble-input input {
    width: 70px;
    text-align: center;
}

/* =========================================
   DEAD OR ALIVE — SITE THEME OVERRIDE
   When wanted level 5, body gets .dead-or-alive class
   ========================================= */

body.dead-or-alive {
    --bg-void: #0a0204;
    --bg-deep: #120508;
    --bg-dark: #1a080c;
    --bg-medium: #220c10;
    --bg-warm: #2c1014;
    --bg-surface: #361418;

    --surface: rgba(54, 20, 24, 0.65);
    --surface-elevated: rgba(64, 24, 28, 0.8);
    --surface-hover: rgba(74, 30, 34, 0.7);

    --accent-ember: #cc2020;
    --accent-gold: #8b2020;
    --accent-copper: #6b3030;
    --accent-iron: #4a2020;

    --text-bone: #d4b0b0;
    --text-dust: #8a5858;
    --text-ash: #5a3838;

    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(200, 0, 0, 0.06) 0%, transparent 65%),
        radial-gradient(ellipse at 50% 100%, rgba(100, 0, 0, 0.03) 0%, transparent 45%);
}

/* Dead or Alive status bar — pulsing red badge */
body.dead-or-alive #status-bar {
    border-bottom: 2px solid rgba(200, 0, 0, 0.3);
    box-shadow: 0 2px 12px rgba(200, 0, 0, 0.1);
}

body.dead-or-alive .status-player {
    color: #cc3030;
    text-shadow: 0 0 10px rgba(200, 0, 0, 0.4);
}

body.dead-or-alive .status-player i {
    color: #ff2020;
}

/* Dead or Alive sidebar tint */
body.dead-or-alive #sidebar {
    background: linear-gradient(180deg, rgba(30, 5, 8, 0.98) 0%, rgba(20, 4, 6, 0.95) 100%);
    border-right-color: rgba(200, 0, 0, 0.15);
}

body.dead-or-alive #sidebar a {
    color: #b07070;
}

body.dead-or-alive #sidebar a:hover,
body.dead-or-alive #sidebar a.active {
    color: #cc3030;
    background: rgba(200, 0, 0, 0.08);
}

/* Dead or Alive "DEAD OR ALIVE" badge in header area */
body.dead-or-alive .text-logo .logo-whiskey,
body.dead-or-alive .text-logo .logo-bullets {
    color: #cc2020;
    text-shadow: 0 0 20px rgba(200, 0, 0, 0.4);
}

body.dead-or-alive .text-logo .logo-ampersand {
    color: #8b2020;
}

/* ── Bounty Board ── */
.bounty-board-desc {
    font-size: var(--text-sm);
    color: var(--text-ash);
    font-style: italic;
    margin-bottom: var(--space-sm);
}

.bounty-board-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: var(--space-sm);
}

.bounty-board-entry {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 8px var(--space-md);
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent-blood);
}

.bounty-target-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex: 1;
    flex-wrap: wrap;
}

.bounty-target-name {
    font-weight: 700;
    color: var(--text-bone);
    font-family: var(--font-header);
    font-size: var(--text-sm);
}

.bounty-target-level {
    font-size: var(--text-xs);
    color: var(--text-ash);
    font-family: var(--font-mono);
}

.bounty-reward {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--accent-gold);
    font-family: var(--font-mono);
    min-width: 70px;
    text-align: right;
}

.bounty-hunt-btn {
    padding: 6px 14px;
    background: linear-gradient(135deg, #7a1a1a, #a02a1a);
    color: var(--text-bone);
    border: 1px solid rgba(160, 42, 26, 0.5);
    border-radius: var(--radius-sm);
    font-family: var(--font-header);
    font-size: var(--text-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.bounty-hunt-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #a02a1a, #c44a2a);
    box-shadow: 0 0 10px rgba(196, 74, 42, 0.3);
}

.bounty-hunt-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ══════════════════════════════════════════════════════════════
   SHERIFF ONESHOT OLLIE — SHOWDOWN ENCOUNTER MODAL
   ══════════════════════════════════════════════════════════════ */

.sheriff-showdown-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.88);
    z-index: 999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: sheriffFadeIn 0.4s ease;
}

@keyframes sheriffFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes sheriffSlam {
    0% { transform: scale(1.3); opacity: 0; }
    60% { transform: scale(0.95); }
    100% { transform: scale(1); opacity: 1; }
}

.sheriff-showdown-modal {
    background: linear-gradient(135deg, #1a0e08, #2a1510, #1a0e08);
    border: 3px solid var(--accent-blood, #8b2500);
    border-radius: var(--radius-lg, 12px);
    padding: var(--space-xl, 24px) var(--space-2xl, 32px);
    max-width: 480px;
    width: 92%;
    text-align: center;
    box-shadow:
        0 0 60px rgba(139, 37, 0, 0.5),
        0 0 120px rgba(139, 37, 0, 0.2),
        0 16px 48px rgba(0, 0, 0, 0.8);
    animation: sheriffSlam 0.35s ease;
}

.sheriff-showdown-header {
    margin-bottom: var(--space-md, 12px);
}

.sheriff-showdown-wanted {
    font-family: 'Rye', cursive;
    font-size: 1.4rem;
    color: var(--accent-blood, #c44a2a);
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(196, 74, 42, 0.6);
    padding: var(--space-sm, 8px);
    border: 2px solid rgba(196, 74, 42, 0.3);
    border-radius: var(--radius-sm, 6px);
    background: rgba(139, 37, 0, 0.15);
}

.sheriff-showdown-image-row {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: var(--space-md, 12px) 0;
}

.sheriff-showdown-image {
    width: 100%;
    max-width: 320px;
    border-radius: 8px;
    border: 3px solid var(--accent-blood, #8b2500);
    box-shadow:
        0 0 20px rgba(139, 37, 0, 0.6),
        0 0 40px rgba(139, 37, 0, 0.2);
    object-fit: contain;
}

.sheriff-showdown-image.sheriff-defeated {
    filter: grayscale(0.5) brightness(0.7);
    border-color: var(--accent-gold, #c9a95a);
    box-shadow: 0 0 20px rgba(201, 169, 90, 0.4);
}

.sheriff-showdown-name {
    font-family: 'Rye', cursive;
    font-size: 1.1rem;
    color: var(--accent-gold, #c9a95a);
    margin-bottom: var(--space-sm, 8px);
}

.sheriff-showdown-dialogue {
    font-family: 'Crimson Text', serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--text-secondary, #b8a88a);
    line-height: 1.5;
    margin: var(--space-md, 12px) 0 var(--space-lg, 16px);
    padding: var(--space-sm, 8px) var(--space-md, 12px);
    border-left: 3px solid rgba(196, 74, 42, 0.4);
    background: rgba(139, 37, 0, 0.08);
    border-radius: 0 var(--radius-sm, 6px) var(--radius-sm, 6px) 0;
}

.sheriff-showdown-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-lg, 16px);
    margin-bottom: var(--space-lg, 16px);
    font-size: 0.85rem;
    color: var(--text-secondary, #b8a88a);
}

.sheriff-showdown-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sheriff-showdown-stats i {
    color: var(--accent-gold, #c9a95a);
    font-size: 0.8rem;
}

.sheriff-showdown-actions {
    display: flex;
    gap: var(--space-sm, 8px);
    justify-content: center;
    flex-wrap: wrap;
}

.sheriff-btn-fight,
.sheriff-btn-flee,
.sheriff-btn-surrender,
.sheriff-btn-dismiss {
    padding: var(--space-sm, 8px) var(--space-lg, 16px);
    border: 2px solid;
    border-radius: var(--radius-md, 8px);
    font-family: 'Rye', cursive;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.sheriff-btn-fight {
    background: linear-gradient(135deg, #8b2500, #c44a2a);
    border-color: #c44a2a;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.sheriff-btn-fight:hover:not(:disabled) {
    background: linear-gradient(135deg, #a02a1a, #d45a3a);
    box-shadow: 0 0 15px rgba(196, 74, 42, 0.5);
    transform: translateY(-1px);
}

.sheriff-btn-flee {
    background: linear-gradient(135deg, #8a6f2f, #c9a95a);
    border-color: #c9a95a;
    color: #1a0e08;
    text-shadow: 0 1px 1px rgba(255,255,255,0.2);
}

.sheriff-btn-flee:hover:not(:disabled) {
    background: linear-gradient(135deg, #a08035, #d9b96a);
    box-shadow: 0 0 15px rgba(201, 169, 90, 0.5);
    transform: translateY(-1px);
}

.sheriff-btn-surrender {
    background: linear-gradient(135deg, #3a3020, #5a4a30);
    border-color: #6a5a40;
    color: var(--text-secondary, #b8a88a);
}

.sheriff-btn-surrender:hover:not(:disabled) {
    background: linear-gradient(135deg, #4a4030, #6a5a40);
    box-shadow: 0 0 10px rgba(106, 90, 64, 0.4);
    transform: translateY(-1px);
}

.sheriff-btn-dismiss {
    background: linear-gradient(135deg, #3a2518, #5a3a25);
    border-color: var(--accent-ember, #e8732a);
    color: var(--accent-ember, #e8732a);
    min-width: 180px;
}

.sheriff-btn-dismiss:hover {
    background: linear-gradient(135deg, #4a3020, #6a4a30);
    box-shadow: 0 0 12px rgba(232, 115, 42, 0.3);
}

.sheriff-showdown-actions button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* Result screen */
.sheriff-outcome-win {
    color: var(--accent-gold, #c9a95a) !important;
    border-color: rgba(201, 169, 90, 0.4) !important;
    background: rgba(201, 169, 90, 0.1) !important;
    text-shadow: 0 0 10px rgba(201, 169, 90, 0.5);
}

.sheriff-outcome-lose {
    color: var(--accent-blood, #c44a2a) !important;
}

.sheriff-result-details {
    margin: var(--space-md, 12px) 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs, 4px);
}

.sheriff-result-detail {
    font-size: 0.9rem;
    padding: var(--space-xs, 4px) var(--space-sm, 8px);
    border-radius: var(--radius-sm, 6px);
}

.sheriff-result-detail.win {
    color: var(--accent-gold, #c9a95a);
    background: rgba(201, 169, 90, 0.1);
}

.sheriff-result-detail.lose {
    color: var(--accent-blood, #c44a2a);
    background: rgba(139, 37, 0, 0.1);
}