/* Base */
:root {
    --bg-dark: #0d0d0d;
    --bg-primary: #1a1a1a;
    --bg-secondary: #1a1d24;
    --bg-card: #1e2128;
    --bg-elevated: #22262f;
    --bg-hover: #2a2f3a;
    --border-default: #2d3341;
    --border-hover: #3d4451;
    --text-primary: #f5f5f5;
    --text-secondary: #a0a8b8;
    --text-muted: #6b7280;
    --brand-red: #c53030;
    --accent-gold: #d4af37;
    --accent-gold-light: #f0d875;
    --accent-blue: #4a90d9;
    --accent-green: #48bb78;
    --hp-red: #dc2626;
    --hp-green: #16a34a;
    --vp-blue: #3b82f6;
    --vp-purple: #9333ea;
    --font-display: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Character Sheet V2 - Exact Color Palette */
    --bg-panel: linear-gradient(180deg, #16181f 0%, #0f1115 100%);
    --bg-header: linear-gradient(180deg, #12141a 0%, #0d0f14 100%);
    --border-panel: #2d3341;
    --border-gold: #8b7335;
    --gold-primary: #d4af37;
    --gold-light: #f0d875;
    --red-hp: #ef4444;
    --red-dark: #c53030;
    --green-vp: #22c55e;
    --copper: #c2703a;
    --silver: #94a3b8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: var(--font-body); 
    background: var(--bg-dark); 
    color: var(--text-primary); 
    min-height: 100vh;
}
body.app-active {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-dark) 100%);
    background-attachment: fixed;
}
body.app-active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,.03) 2px, rgba(0,0,0,.03) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0,0,0,.03) 2px, rgba(0,0,0,.03) 4px);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}
.hidden { display: none !important; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.75rem 1.5rem; border: none; border-radius: var(--radius-md);
    font-family: var(--font-body); font-size: 0.875rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.btn-primary { background: var(--brand-red); color: white !important; }
.btn-primary:hover { background: #a52828; }
.btn-gold { background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light)); color: #1a1a1a !important; }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(212,175,55,0.4); }
.btn-ghost { background: transparent; color: var(--text-secondary) !important; }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary) !important; }
.btn-outline { background: transparent; border: 1px solid var(--border-default); color: var(--text-primary) !important; }
.btn-outline:hover { border-color: var(--accent-gold); }
.btn-google { 
    background: white; 
    color: #333 !important; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 0.75rem; 
    border: 1px solid #dadce0; 
    font-weight: 500; 
}
.btn-google:hover { 
    background: #f8f9fa; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); 
}
.btn-danger { 
    background: #dc2626; 
    color: white !important; 
    border: none;
}
.btn-danger:hover { 
    background: #b91c1c; 
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}
.modal-confirm.danger .btn-confirm { 
    background: #dc2626;
    color: white;
}
.modal-confirm.danger .btn-confirm:hover { 
    background: #b91c1c;
}
.btn-google svg { 
    flex-shrink: 0; 
}
.btn-block { width: 100%; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.813rem; }
.btn-xl { padding: 1rem 2rem; font-size: 1rem; }
.btn-xs { padding: 0.25rem 0.5rem; font-size: 0.75rem; }

/* Epic Start Game Mode Button */
.btn-start-game-mode {
    background: linear-gradient(145deg, #2d2a20, #3d3828, #2d2a20);
    border: 2px solid #d4af37;
    border-radius: 8px;
    padding: 14px 28px;
    color: #d4af37;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(212, 175, 55, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    /* Width calculation: 2 character cards (220px each) + 1 gap (1.25rem) */
    /* Note: 220px is the standard character card width in fantasy-character-card */
    width: calc(220px * 2 + 1.25rem);
    max-width: 100%;
    margin: 0 auto;
}

.btn-start-game-mode:hover {
    background: linear-gradient(145deg, #3d3828, #4d4838, #3d3828);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(212, 175, 55, 0.2);
}

/* Responsiv anpassning för Starta Spelläge knapp */
@media (max-width: 500px) {
    .btn-start-game-mode {
        width: 100%;
    }
}

/* Sessions Calendar */
.sessions-calendar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.session-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.2s;
    cursor: pointer;
}

.session-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-2px);
}

/* Compact session cards for overview */
.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.session-card-compact {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.session-card-compact:hover {
    border-color: var(--accent-gold);
    background: var(--bg-elevated);
}

.session-card-compact .session-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.session-card-compact .session-info {
    flex: 1;
    min-width: 0;
}

.session-card-compact .session-party {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.session-card-compact .session-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.session-card-compact .session-location {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.session-card-compact .session-arrow {
    color: var(--accent-gold);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.session-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: 0.75rem;
}

.session-party-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.session-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.session-attendees {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-default);
}

.session-attendees-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.attendee-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.attendee-status.attending {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.attendee-status.maybe {
    background: rgba(250, 204, 21, 0.1);
    color: #facc15;
}

.attendee-status.not-attending {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Landing */
.landing-header { background: linear-gradient(180deg, var(--bg-secondary), var(--bg-dark)); min-height: 80vh; position: relative; display: flex; flex-direction: column; }
@media (prefers-reduced-motion: reduce) {
    .landing-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: url('banner_img_02.png');
        background-size: cover;
        background-position: center;
        opacity: 0.3;
        z-index: 0;
    }
}
.nav-brand { text-decoration: none; }
.brand-logo { width: 420px; padding-top: 20px; }
.nav-actions { display: flex; gap: 0.75rem; }
.hero { max-width: 100%; margin: 0 auto; padding: 4rem 3rem; text-align: center; position: relative; flex: 1; display: flex; align-items: center; justify-content: center; }

/* Video Carousel Container */
.bg-video-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.5;
    transition: opacity 1s ease-in-out;
}

.bg-video.hidden {
    opacity: 0;
    pointer-events: none;
}

.bg-video.active {
    opacity: 0.5;
}

.bg-video.fade-out {
    opacity: 0;
}

.bg-video.fade-in {
    opacity: 0.5;
}

/* CTA Content Transitions */
.hero-content {
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.hero-content.cta-fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

.hero-content.cta-fade-in {
    animation: ctaFadeIn 0.5s ease-out forwards;
}

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

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    gap: 0.75rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--accent-gold);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot:hover {
    background: var(--accent-gold-dark);
    transform: scale(1.1);
}

.carousel-dot.active {
    background: var(--accent-gold);
    box-shadow: 0 0 10px var(--accent-gold);
}

/* Carousel Controls Container */
.carousel-controls {
    position: absolute;
    bottom: 8rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    z-index: 10;
}

/* Navigation Arrows */
.carousel-nav {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--accent-gold);
    background: rgba(0, 0, 0, 0.5);
    color: var(--accent-gold);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.carousel-nav:hover {
    background: var(--accent-gold);
    color: var(--bg-dark);
    transform: scale(1.1);
}

.carousel-nav svg {
    width: 20px;
    height: 20px;
}

/* Center Section */
.carousel-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

/* Progress Bar */
.carousel-progress {
    width: 120px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.carousel-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-gold-light));
    border-radius: 2px;
    transition: width 0.05s linear;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .carousel-controls {
        gap: 1rem;
    }
    
    .carousel-nav {
        width: 36px;
        height: 36px;
    }
    
    .carousel-nav svg {
        width: 16px;
        height: 16px;
    }
    
    .carousel-progress {
        width: 80px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bg-video {
        display: none;
    }
    .bg-video-carousel {
        display: none;
    }
}
.hero-content { position: relative; z-index: 2; }
.hero-title-main { display: block; font-family: var(--font-display); font-size: 4rem; font-weight: 700; color: var(--text-primary); }
.hero-title-sub { display: block; font-family: var(--font-display); font-size: 3rem; background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-description { font-size: 1.25rem; color: var(--text-secondary); margin: 1.5rem 0 2rem; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.features { padding: 4rem 3rem; background: var(--bg-primary); }
.container { max-width: 1200px; margin: 0 auto; }
.section-heading { font-family: var(--font-display); font-size: 2rem; text-align: center; margin-bottom: 3rem; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.feature-card { background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-xl); padding: 2rem; text-align: center; }
.feature-icon { font-size: 3rem; margin-bottom: 1rem; }
.feature-card h3 { font-family: var(--font-display); margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-secondary); }
.landing-footer { padding: 2rem; text-align: center; color: var(--text-muted); }
.landing-footer p { margin-bottom: 0.5rem; }
.footer-disclaimer { font-size: 0.75rem; color: var(--text-muted); max-width: 800px; margin: 0.75rem auto 0; line-height: 1.5; }
.app-footer { padding: 2rem; text-align: center; color: var(--text-muted); border-top: 1px solid var(--border-default); margin-top: 2rem; }
.app-footer p { margin-bottom: 0.5rem; }

/* Unified App Header (used on both landing and app pages) */
.unified-header { background: var(--bg-secondary); position: sticky; top: 0; z-index: 1100; }
.header-top { background: var(--bg-primary); height: 86px; border-bottom: 1px solid var(--border-default); }
.header-content { max-width: 1600px; margin: 0 auto; padding: 0 1.5rem; min-height: 70px; display: flex; align-items: center; justify-content: space-between; }
.header-brand { text-decoration: none; }
.header-sub { border-bottom: 1px solid #91712a; }
.app-nav { max-width: 1600px; margin: 0 auto; padding: 0 1.5rem; display: flex; gap: 0; }
.nav-tab { padding: 0.875rem 1.25rem; background: transparent; border: none; border-bottom: 3px solid transparent; color: var(--text-secondary); font-family: var(--font-body); font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.nav-tab:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-tab.active { color: var(--text-primary); border-bottom-color: var(--brand-red); }

/* Navigation dropdown */
.nav-dropdown {
    position: relative;
}
.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
}
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 100;
    overflow: hidden;
}
.nav-dropdown-item {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid var(--border-default);
}
.nav-dropdown-item:last-child {
    border-bottom: none;
}
.nav-dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.user-menu { display: flex; align-items: center; gap: 0.75rem; height: 100%; }
.user-name { font-size: 0.875rem; color: var(--text-secondary); }

/* App Main */
.app-main { max-width: 1400px; margin: 0 auto; padding: 2rem 1.5rem; }
.section { display: none; }
.section.active { display: block; }
.home-welcome h1 { font-family: var(--font-display); font-size: 1.75rem; margin-bottom: 1.5rem; }
.quick-actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.quick-action-card { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-lg); cursor: pointer; transition: all 0.2s; text-align: left; }
.quick-action-card:hover { border-color: var(--accent-gold); transform: translateY(-2px); }
.qa-icon { font-size: 2rem; }
.qa-content h3 { font-size: 1rem; margin-bottom: 0.25rem; color: var(--text-primary); }
.qa-content p { font-size: 0.813rem; color: var(--text-muted); }
.home-section { margin-top: 2rem; }
.home-section h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.section-header-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.section-header-bar h1 { font-family: var(--font-display); font-size: 1.5rem; }
.section-header-bar p { color: var(--text-muted); font-size: 0.875rem; }

/* Character Cards */
.character-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.characters-grid { 
    display: flex; 
    flex-wrap: wrap;
    gap: 1.5rem; 
    justify-content: flex-start;
}
.character-card { display: flex; gap: 1rem; padding: 1rem; background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-lg); cursor: pointer; transition: all 0.2s; }
.character-card:hover { border-color: var(--accent-gold); }
.char-portrait { width: 64px; height: 64px; background: var(--bg-elevated); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 2rem; flex-shrink: 0; overflow: hidden; }
.char-portrait svg { width: 64px; height: 64px; color: var(--accent-gold); }
.char-portrait img, .char-portrait .race-icon { width: 100%; height: 100%; object-fit: contain; max-width: 64px; max-height: 64px; }
.char-info { flex: 1; }
.char-name { font-weight: 600; margin-bottom: 0.25rem; }
.char-subtitle { font-size: 0.813rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.char-stats { display: flex; gap: 1rem; }
.char-stat { font-size: 0.75rem; color: var(--text-secondary); }
.character-card-full { background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-xl); overflow: hidden; cursor: pointer; transition: all 0.2s; }
.character-card-full:hover { border-color: var(--accent-gold); transform: translateY(-2px); }
.card-header { display: flex; gap: 1rem; padding: 1rem; background: linear-gradient(135deg, var(--bg-secondary), var(--bg-elevated)); }
.card-portrait { width: 64px; height: 64px; background: var(--bg-primary); border: 2px solid var(--accent-gold); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.card-portrait svg { width: 40px; height: 40px; color: var(--accent-gold); }
.card-identity { flex: 1; }
.card-name { font-weight: 600; font-size: 1.125rem; }
.card-subtitle { font-size: 0.813rem; color: var(--accent-gold); }
.card-body { padding: 1rem; }
.card-stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.5rem; margin-bottom: 1rem; }
.stat-box { text-align: center; padding: 0.5rem; background: var(--bg-secondary); border-radius: var(--radius-sm); }
.stat-name { font-size: 0.625rem; color: var(--text-muted); text-transform: uppercase; }
.stat-value { font-size: 1.25rem; font-weight: 700; color: var(--accent-gold); }
.card-derived { display: flex; justify-content: space-around; padding: 0.75rem; background: var(--bg-secondary); border-radius: var(--radius-md); }
.derived-stat { text-align: center; }
.derived-label { font-size: 0.625rem; color: var(--text-muted); text-transform: uppercase; }
.derived-value { font-size: 1rem; font-weight: 700; }
.derived-value.hp { color: var(--brand-red); }
.derived-value.wp { color: var(--accent-blue); }
.derived-value.mv { color: var(--accent-green); }
.card-footer { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; border-top: 1px solid var(--border-default); font-size: 0.813rem; color: var(--text-secondary); }

/* Loading & Empty States */
.loading-placeholder { text-align: center; padding: 3rem; color: var(--text-muted); }
.spinner { width: 40px; height: 40px; border: 3px solid var(--border-default); border-top-color: var(--accent-gold); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 1rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 3rem; }
.empty-state-icon { font-size: 4rem; margin-bottom: 1rem; }
.activity-empty { text-align: center; padding: 2rem; color: var(--text-muted); }
.coming-soon { text-align: center; padding: 4rem; }
.coming-soon-icon { font-size: 4rem; margin-bottom: 1rem; }

/* Modals */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.8); display: none; align-items: center; justify-content: center; z-index: 1200; padding: 1rem; }
.modal.active { display: flex; }
.modal-fullscreen { padding: 0; top: 0; }
.modal-fullscreen .modal-content { max-width: 100%; width: 100%; height: 100%; max-height: 100%; border-radius: 0; overflow-y: auto; }
.modal-content { background: var(--bg-secondary); border-radius: var(--radius-xl); padding: 2rem; max-width: 450px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-large { max-width: 900px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-header h2 { margin: 0; font-family: var(--font-display); font-size: 1.5rem; }
.modal-close { background: transparent; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-md); transition: all 0.2s; padding: 0; }
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.modal-body { margin-bottom: 1.5rem; }
.modal-footer { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1.5rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--text-secondary); font-size: 0.875rem; font-weight: 500; }
.close-modal { position: absolute; top: 1rem; right: 1rem; background: transparent; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-md); transition: all 0.2s; }
.close-modal:hover { background: var(--bg-hover); color: var(--text-primary); }

/* Auth */
.auth-tabs { display: flex; gap: 0; margin: 1.5rem 0; border-bottom: 1px solid var(--border-default); }
.auth-tab { flex: 1; padding: 0.75rem; background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--text-secondary); cursor: pointer; transition: all 0.2s; }
.auth-tab.active { color: var(--text-primary); border-bottom-color: var(--accent-gold); }
.auth-form { display: none; }
.auth-form.active { display: block; }
.auth-form input { width: 100%; padding: 0.875rem 1rem; background: var(--bg-primary); border: 1px solid var(--border-default); border-radius: var(--radius-md); color: var(--text-primary); font-size: 1rem; margin-bottom: 1rem; }
.auth-form input:focus { outline: none; border-color: var(--accent-gold); }
.auth-divider { text-align: center; margin: 1.5rem 0; color: var(--text-muted); font-size: 0.813rem; }
.auth-error { background: rgba(197,48,48,0.1); border: 1px solid var(--brand-red); color: var(--brand-red); padding: 0.75rem; border-radius: var(--radius-md); margin-bottom: 1rem; font-size: 0.875rem; display: none; }
.auth-error.active { display: block; }
.auth-success { background: rgba(72,187,120,0.1); border: 1px solid var(--accent-green); color: var(--accent-green); padding: 0.75rem; border-radius: var(--radius-md); margin-bottom: 1rem; font-size: 0.875rem; display: none; }
.auth-success.active { display: block; }

/* Character Creator */
.creator-progress { display: flex; justify-content: center; gap: 0.5rem; margin: 1.5rem 0; }
.progress-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--border-default); }
.progress-dot.active { background: var(--accent-gold); }
.progress-dot.completed { background: var(--accent-green); }
.creator-step { text-align: center; }
.creator-step h2 { margin-bottom: 1.5rem; }
.creator-input { width: 100%; max-width: 400px; padding: 1rem; background: var(--bg-primary); border: 1px solid var(--border-default); border-radius: var(--radius-md); color: var(--text-primary); font-size: 1rem; margin-bottom: 1.5rem; }
.creator-input:focus { outline: none; border-color: var(--accent-gold); }
.creator-nav { display: flex; justify-content: center; gap: 1rem; margin-top: 2rem; }
.kin-grid, .profession-grid, .age-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.kin-card, .profession-card, .age-card { padding: 1.25rem; background: var(--bg-card); border: 2px solid var(--border-default); border-radius: var(--radius-lg); cursor: pointer; transition: all 0.2s; }
.kin-card:hover, .profession-card:hover, .age-card:hover { border-color: var(--accent-gold); }
.kin-card.selected, .profession-card.selected, .age-card.selected { border-color: var(--accent-gold); background: var(--bg-elevated); }
.kin-name, .prof-name, .age-name { font-weight: 600; margin-bottom: 0.25rem; }
.kin-ability, .prof-ability { font-size: 0.813rem; color: var(--text-muted); }
.attrs-roll-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; margin: 1.5rem 0; }
.attr-roll-item { text-align: center; padding: 1rem; background: var(--bg-card); border-radius: var(--radius-md); }
.attr-roll-item .attr-label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.attr-roll-item .attr-value { display: block; font-size: 1.5rem; font-weight: 700; color: var(--accent-gold); margin-bottom: 0.5rem; }
.summary-card { background: var(--bg-card); padding: 1.5rem; border-radius: var(--radius-lg); text-align: left; margin: 1.5rem auto; max-width: 400px; }
.summary-card p { margin-bottom: 0.5rem; }

/* Portrait Selector */
.portrait-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin: 1.5rem 0;
}

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

.portrait-options {
    width: 100%;
    max-width: 600px;
}

.portrait-options h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
    justify-items: center;
}

.icon-option {
    padding: 0.5rem;
    background: var(--bg-card);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.icon-option:hover {
    border-color: var(--accent-gold);
    transform: scale(1.05);
}

.icon-option.selected {
    border-color: var(--accent-gold);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 2px var(--accent-gold);
}

.icon-option img {
    display: block;
}

/* Specific styling for character creation icon options */
.creation-icon-option {
    position: relative;
}

.creation-icon-option.selected::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--accent-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    border: 2px solid var(--bg-primary);
}

/* Character Sheet */
.character-sheet-wrapper { max-width: 1000px; margin: 0 auto; }
.character-sheet-full { background: var(--bg-primary); border-radius: var(--radius-lg); overflow: hidden; }
.sheet-header-full { display: flex; gap: 1.5rem; padding: 1.5rem; background: linear-gradient(135deg, var(--bg-secondary), var(--bg-elevated)); border-bottom: 1px solid var(--border-default); flex-wrap: wrap; }
.sheet-portrait-large { width: 80px; height: 80px; background: var(--bg-primary); border: 3px dashed var(--accent-gold); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; font-size: 3rem; position: relative; cursor: pointer; transition: all 0.2s; }
.sheet-portrait-large svg { width: 48px; height: 48px; color: var(--accent-gold); }
.sheet-portrait-large:hover { border-color: var(--accent-green); transform: scale(1.05); }
.sheet-portrait-large::after { content: '+'; position: absolute; bottom: -8px; right: -8px; width: 24px; height: 24px; background: var(--accent-green); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; font-weight: 700; border: 2px solid var(--bg-secondary); }
.sheet-header-info { flex: 1; min-width: 200px; }
.sheet-name-input { width: 100%; font-size: 1.5rem; font-weight: 700; background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--text-primary); padding: 0.25rem 0; font-family: var(--font-display); }
.sheet-name-input:hover, .sheet-name-input:focus { border-bottom-color: var(--accent-gold); outline: none; }
.sheet-subtitle-row { color: var(--accent-gold); margin: 0.5rem 0; }
.sheet-hp-vp-bar { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.hp-vp-item { display: flex; align-items: center; gap: 0.5rem; }
.hp-vp-item label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }
.stat-input.current { width: 50px; padding: 0.375rem; text-align: center; font-size: 1.25rem; font-weight: 700; background: var(--bg-primary); border: 1px solid var(--border-default); border-radius: var(--radius-sm); color: var(--brand-red); }
.stat-input.current:focus { border-color: var(--accent-gold); outline: none; }

/* HP/VP Progress Bars */
.hp-vp-progress-bar { flex: 1; min-width: 200px; }
.progress-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.progress-label-text { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; }
.progress-label-values { font-size: 0.875rem; font-weight: 700; }
.progress-bar-track { height: 24px; background: var(--bg-primary); border: 1px solid var(--border-default); border-radius: var(--radius-md); overflow: hidden; position: relative; }
.progress-bar-fill { height: 100%; transition: width 0.3s ease; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; color: white; }
.progress-bar-fill.hp { background: linear-gradient(90deg, var(--hp-red) 0%, var(--hp-green) 100%); }
.progress-bar-fill.vp { background: linear-gradient(90deg, var(--vp-purple) 0%, var(--vp-blue) 100%); }
.progress-bar-input-group { display: flex; gap: 0.25rem; align-items: center; }
.progress-bar-input { width: 50px; padding: 0.375rem; text-align: center; font-size: 1rem; font-weight: 700; background: var(--bg-primary); border: 1px solid var(--border-default); border-radius: var(--radius-sm); color: var(--text-primary); }
.progress-bar-input:focus { border-color: var(--accent-gold); outline: none; }

/* Character Sheet Tabs */
.sheet-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border-default); background: var(--bg-secondary); padding: 0 1rem; }
.sheet-tab { padding: 0.875rem 1.5rem; background: transparent; border: none; border-bottom: 3px solid transparent; color: var(--text-secondary); font-family: var(--font-body); font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: all 0.2s; text-transform: uppercase; letter-spacing: 0.05em; }
.sheet-tab:hover { background: var(--bg-hover); color: var(--text-primary); }
.sheet-tab.active { color: var(--accent-gold); border-bottom-color: var(--accent-gold); }
.sheet-tab-content { display: none; }
.sheet-tab-content.active { display: block; }

.sheet-header-actions { display: flex; align-items: flex-start; gap: 0.5rem; }
.sheet-body-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1rem; }
@media (max-width: 768px) { .sheet-body-grid { grid-template-columns: 1fr; } }
.sheet-column { display: flex; flex-direction: column; gap: 1rem; }
.sheet-panel { background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 1rem; }
.panel-title { font-size: 0.813rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-default); display: flex; justify-content: space-between; align-items: center; }

/* Collapsible Accordions */
.accordion-item { background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-lg); margin-bottom: 0.75rem; overflow: hidden; }
.accordion-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem; cursor: pointer; transition: all 0.2s; background: var(--bg-elevated); }
.accordion-header:hover { background: var(--bg-hover); }
.accordion-title { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); text-transform: uppercase; letter-spacing: 0.05em; }
.accordion-chevron { font-size: 0.875rem; color: var(--text-muted); transition: transform 0.2s; }
.accordion-item.open .accordion-chevron { transform: rotate(180deg); }
.accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.accordion-item.open .accordion-content { max-height: 1000px; }
.accordion-body { padding: 1rem; }

.attrs-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.5rem; }
.attr-item { text-align: center; padding: 0.5rem; background: var(--bg-secondary); border-radius: var(--radius-sm); }
.attr-label { display: block; font-size: 0.625rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 0.25rem; }
.attr-input { width: 100%; padding: 0.375rem; text-align: center; font-size: 1.25rem; font-weight: 700; background: var(--bg-primary); border: 1px solid var(--border-default); border-radius: var(--radius-sm); color: var(--accent-gold); }
.attr-input:focus { border-color: var(--accent-gold); outline: none; }
.skill-group { margin-bottom: 0.75rem; }
.skill-group-header { font-size: 0.625rem; font-weight: 600; color: var(--accent-gold); text-transform: uppercase; margin-bottom: 0.5rem; }
.skill-row { display: flex; align-items: center; justify-content: space-between; padding: 0.375rem 0; border-bottom: 1px solid var(--border-default); }
.skill-row:last-child { border-bottom: none; }
.skill-name { font-size: 0.813rem; color: var(--text-secondary); }
.skill-input { width: 50px; padding: 0.25rem; text-align: center; font-size: 0.875rem; font-weight: 600; background: var(--bg-primary); border: 1px solid var(--border-default); border-radius: var(--radius-sm); color: var(--text-primary); }
.skill-input:focus { border-color: var(--accent-gold); outline: none; }
.inventory-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem; background: var(--bg-secondary); border-radius: var(--radius-sm); margin-bottom: 0.5rem; }
.item-name-input { flex: 1; padding: 0.25rem 0.5rem; background: transparent; border: none; color: var(--text-primary); font-size: 0.875rem; }
.item-name-input:focus { outline: none; background: var(--bg-primary); border-radius: var(--radius-sm); }
.inventory-item-full { position: relative; padding: 1rem; background: var(--bg-secondary); border: 1px solid var(--border-default); border-radius: var(--radius-md); margin-bottom: 0.75rem; }
.inv-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.inv-row:last-child { margin-bottom: 0; }
.inv-row label { min-width: 100px; font-size: 0.813rem; color: var(--text-muted); font-weight: 500; }
.inv-input { flex: 1; padding: 0.5rem; background: var(--bg-primary); border: 1px solid var(--border-default); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.875rem; }
.inv-input:focus { border-color: var(--accent-gold); outline: none; }
.inv-input-sm { width: 120px; padding: 0.5rem; background: var(--bg-primary); border: 1px solid var(--border-default); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.875rem; }
.inv-input-sm:focus { border-color: var(--accent-gold); outline: none; }
.inv-select { flex: 1; padding: 0.5rem; background: var(--bg-primary); border: 1px solid var(--border-default); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.875rem; cursor: pointer; }
.inv-select:focus { border-color: var(--accent-gold); outline: none; }
.btn-icon-sm { width: 24px; height: 24px; background: transparent; border: none; color: var(--text-muted); font-size: 1rem; cursor: pointer; border-radius: var(--radius-sm); }
.btn-icon-sm:hover { background: var(--brand-red); color: white; }
.btn-delete { position: absolute; top: 0.5rem; right: 0.5rem; }
.empty-inventory { color: var(--text-muted); text-align: center; padding: 1rem; font-size: 0.875rem; }
.currency-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.currency-item { text-align: center; padding: 0.75rem; background: var(--bg-secondary); border-radius: var(--radius-md); }
.currency-item span { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.currency-input { width: 100%; padding: 0.5rem; text-align: center; font-size: 1rem; font-weight: 700; background: var(--bg-primary); border: 1px solid var(--border-default); border-radius: var(--radius-sm); color: var(--accent-gold); }
.currency-input:focus { border-color: var(--accent-gold); outline: none; }
.bio-textarea { width: 100%; min-height: 120px; padding: 0.75rem; background: var(--bg-secondary); border: 1px solid var(--border-default); border-radius: var(--radius-md); color: var(--text-secondary); resize: vertical; font-family: var(--font-body); font-size: 0.875rem; line-height: 1.6; }
.bio-textarea:focus { border-color: var(--accent-gold); outline: none; color: var(--text-primary); }

/* Toast */
.toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(100px); background: var(--bg-elevated); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 1rem 1.5rem; opacity: 0; transition: all 0.3s ease; z-index: 2000; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast-success { border-color: var(--accent-green); }
.toast-error { border-color: var(--brand-red); }

/* Group Selection */
.group-select-item { display: flex; justify-content: space-between; align-items: center; padding: 1rem; background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-md); margin-bottom: 0.75rem; cursor: pointer; transition: all 0.2s; }
.group-select-item:hover { border-color: var(--accent-gold); background: var(--bg-elevated); }
.group-select-item.disabled { opacity: 0.5; cursor: not-allowed; border-color: var(--border-default); }
.group-select-item.disabled:hover { background: var(--bg-card); }
.group-name { font-weight: 600; margin-bottom: 0.25rem; }
.group-owner { font-size: 0.813rem; color: var(--text-muted); }

/* Join Requests */
.join-request-item { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem; background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-md); margin-bottom: 0.5rem; }
.join-request-info { flex: 1; }
.join-request-char { font-weight: 600; margin-bottom: 0.25rem; }
.join-request-user { font-size: 0.813rem; color: var(--text-muted); }
.join-request-actions { display: flex; gap: 0.5rem; }

/* Responsive */
@media (max-width: 768px) {
    .landing-nav { padding: 1rem 1.5rem; }
    .hero { padding: 2rem 1.5rem; }
    .hero-title-main { font-size: 2.5rem; }
    .hero-title-sub { font-size: 2rem; }
    .features { padding: 2rem 1.5rem; }
    .app-main { padding: 1rem; }
    .attrs-grid { grid-template-columns: repeat(3, 1fr); }
    .attrs-roll-grid { grid-template-columns: repeat(3, 1fr); }
}
/* ============================================
   GOLD FRAME SECTION
   ============================================ */
.gold-frame-section {
    position: relative;
    margin-top: -100px; /* Negativ margin för överlappning */
    padding: 0 2rem 3rem;
    z-index: 10;
}

.gold-frame-box {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    background: linear-gradient(180deg, #12141a 0%, #0d0f14 100%);
    padding: 2.5rem 3rem;
    border: 2px solid var(--accent-gold-dark, #8b7335);
    border-radius: 4px;
}

/* Inre glöd */
.gold-frame-box::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 3px;
    pointer-events: none;
}

/* Hörn-linjer */
.gold-frame-box .corner {
    position: absolute;
    width: 50px;
    height: 50px;
    pointer-events: none;
}

.gold-frame-box .corner::before,
.gold-frame-box .corner::after {
    content: '';
    position: absolute;
    background: linear-gradient(135deg, #d4af37 0%, #f0d875 50%, #8b7335 100%);
}

/* Övre vänster */
.gold-frame-box .corner.top-left { top: -2px; left: -2px; }
.gold-frame-box .corner.top-left::before { top: 0; left: 0; width: 35px; height: 3px; }
.gold-frame-box .corner.top-left::after { top: 0; left: 0; width: 3px; height: 35px; }

/* Övre höger */
.gold-frame-box .corner.top-right { top: -2px; right: -2px; }
.gold-frame-box .corner.top-right::before { top: 0; right: 0; width: 35px; height: 3px; }
.gold-frame-box .corner.top-right::after { top: 0; right: 0; width: 3px; height: 35px; }

/* Nedre vänster */
.gold-frame-box .corner.bottom-left { bottom: -2px; left: -2px; }
.gold-frame-box .corner.bottom-left::before { bottom: 0; left: 0; width: 35px; height: 3px; }
.gold-frame-box .corner.bottom-left::after { bottom: 0; left: 0; width: 3px; height: 35px; }

/* Nedre höger */
.gold-frame-box .corner.bottom-right { bottom: -2px; right: -2px; }
.gold-frame-box .corner.bottom-right::before { bottom: 0; right: 0; width: 35px; height: 3px; }
.gold-frame-box .corner.bottom-right::after { bottom: 0; right: 0; width: 3px; height: 35px; }

/* Hörnprickar */
.gold-frame-box .corner-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #f0d875 0%, #d4af37 60%, #8b7335 100%);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}
.gold-frame-box .corner-dot.top-left { top: 10px; left: 10px; }
.gold-frame-box .corner-dot.top-right { top: 10px; right: 10px; }
.gold-frame-box .corner-dot.bottom-left { bottom: 10px; left: 10px; }
.gold-frame-box .corner-dot.bottom-right { bottom: 10px; right: 10px; }

/* Innehåll */
.frame-content {
    text-align: center;
}

.frame-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.gold-text {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.frame-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

/* Tabs */
.frame-tabs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.frame-tab {
    padding: 0.625rem 1.25rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.813rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
}

.frame-tab:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.frame-tab.active {
    background: var(--brand-red);
    color: white;
}

/* Responsiv */
@media (max-width: 768px) {
    .gold-frame-section {
        margin-top: -60px;
        padding: 0 1rem 2rem;
    }
    
    .gold-frame-box {
        padding: 1.5rem;
    }
    
    .frame-title {
        font-size: 1.75rem;
    }
    
    .gold-frame-box .corner::before { width: 25px !important; }
    .gold-frame-box .corner::after { height: 25px !important; }
}
/* ============================================
   OVERVIEW PAGE REDESIGN
   Lägg till denna CSS i slutet av style.css
   ============================================ */

/* ---- Ambient Background for App Pages ---- */
#app {
    position: relative;
}

#app::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 100% 80% at 50% -30%, rgba(26, 29, 36, 0.9) 0%, transparent 60%),
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(212, 175, 55, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ---- Welcome Section with Gold Frame ---- */
.welcome-frame {
    position: relative;
    background: linear-gradient(180deg, #12141a 0%, #0d0f14 100%);
    padding: 2.5rem 3rem;
    margin-bottom: 2.5rem;
    border: 2px solid #8b7335;
    border-radius: 4px;
    text-align: center;
}

.welcome-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 3px;
    pointer-events: none;
}

/* Corner lines */
.welcome-frame .corner {
    position: absolute;
    width: 50px;
    height: 50px;
    pointer-events: none;
}

.welcome-frame .corner::before,
.welcome-frame .corner::after {
    content: '';
    position: absolute;
    background: linear-gradient(135deg, #d4af37 0%, #f0d875 50%, #8b7335 100%);
}

.welcome-frame .corner.top-left { top: -2px; left: -2px; }
.welcome-frame .corner.top-left::before { top: 0; left: 0; width: 35px; height: 3px; }
.welcome-frame .corner.top-left::after { top: 0; left: 0; width: 3px; height: 35px; }

.welcome-frame .corner.top-right { top: -2px; right: -2px; }
.welcome-frame .corner.top-right::before { top: 0; right: 0; width: 35px; height: 3px; }
.welcome-frame .corner.top-right::after { top: 0; right: 0; width: 3px; height: 35px; }

.welcome-frame .corner.bottom-left { bottom: -2px; left: -2px; }
.welcome-frame .corner.bottom-left::before { bottom: 0; left: 0; width: 35px; height: 3px; }
.welcome-frame .corner.bottom-left::after { bottom: 0; left: 0; width: 3px; height: 35px; }

.welcome-frame .corner.bottom-right { bottom: -2px; right: -2px; }
.welcome-frame .corner.bottom-right::before { bottom: 0; right: 0; width: 35px; height: 3px; }
.welcome-frame .corner.bottom-right::after { bottom: 0; right: 0; width: 3px; height: 35px; }

/* Corner dots */
.welcome-frame .corner-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #f0d875 0%, #d4af37 60%, #8b7335 100%);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}

.welcome-frame .corner-dot.top-left { top: 10px; left: 10px; }
.welcome-frame .corner-dot.top-right { top: 10px; right: 10px; }
.welcome-frame .corner-dot.bottom-left { bottom: 10px; left: 10px; }
.welcome-frame .corner-dot.bottom-right { bottom: 10px; right: 10px; }

.welcome-frame h1 {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.welcome-frame .gold-text {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-frame p {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

/* ---- Section Headers ---- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.25rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.section-header .section-link {
    background: none;
    border: none;
    color: var(--accent-gold);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.25rem 0;
    transition: opacity 0.2s;
}

.section-header .section-link:hover {
    opacity: 0.8;
}

.section-header .section-link-muted {
    color: var(--text-muted);
}

/* ---- Card Frame (for characters, groups, etc) ---- */
.card-frame {
    position: relative;
    background: linear-gradient(180deg, #16181f 0%, #0f1115 100%);
    padding: 1.5rem;
    border: 1px solid var(--border-default);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.card-frame:hover {
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(212, 175, 55, 0.1);
}

/* Hover corner accents */
.card-frame::before,
.card-frame::after,
.card-frame .corner-accent::before,
.card-frame .corner-accent::after {
    content: '';
    position: absolute;
    background: linear-gradient(90deg, var(--accent-gold), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.card-frame::before {
    top: -1px;
    left: -1px;
    width: 20px;
    height: 2px;
}

.card-frame::after {
    top: -1px;
    left: -1px;
    width: 2px;
    height: 20px;
    background: linear-gradient(180deg, var(--accent-gold), transparent);
}

.card-frame .corner-accent::before {
    top: -1px;
    right: -1px;
    width: 20px;
    height: 2px;
    background: linear-gradient(270deg, var(--accent-gold), transparent);
}

.card-frame .corner-accent::after {
    top: -1px;
    right: -1px;
    width: 2px;
    height: 20px;
    background: linear-gradient(180deg, var(--accent-gold), transparent);
}

.card-frame:hover::before,
.card-frame:hover::after,
.card-frame:hover .corner-accent::before,
.card-frame:hover .corner-accent::after {
    opacity: 1;
}

/* ---- Character Card (New Style) ---- */
.character-card-new {
    display: flex;
    gap: 1.25rem;
}

.character-card-new .char-portrait-new {
    width: 50px;
    height: 50px;
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.1) 0%, rgba(139, 115, 53, 0.15) 100%);
    border: 2px solid rgba(212, 175, 55, 0.5);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    overflow: hidden;
}

.character-card-new .char-portrait-new img,
.character-card-new .char-portrait-new .race-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.character-card-new .char-portrait-new svg {
    width: 42px;
    height: 42px;
    color: var(--accent-gold);
}

.character-card-new .char-details {
    flex: 1;
    min-width: 0;
}

.character-card-new .char-name {
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.character-card-new .char-meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.875rem;
}

/* Stats bars */
.char-stats-bars {
    display: flex;
    gap: 1.5rem;
}

.stat-bar {
    flex: 1;
}

.stat-bar-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.375rem;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stat-bar-label {
    color: var(--text-muted);
}

.stat-bar-value-kp {
    color: #ef4444;
}

.stat-bar-value-vp {
    color: #a855f7;
}

.stat-bar-track {
    height: 3px;
    background: rgba(0,0,0,0.4);
    border-radius: 1px;
}

.stat-bar-fill {
    height: 100%;
    border-radius: 1px;
    transition: width 0.3s ease;
}

.stat-bar-fill-kp {
    background: linear-gradient(90deg, #dc2626, #ef4444);
}

.stat-bar-fill-vp {
    background: linear-gradient(90deg, #7c3aed, #a855f7);
}

/* Card footer */
.card-frame-footer {
    margin-top: 1rem;
    padding-top: 0.875rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-frame-footer .last-played {
    font-size: 0.6875rem;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.card-frame-footer .continue-link {
    font-size: 0.8125rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.card-frame:hover .continue-link {
    color: var(--accent-gold);
}

/* ---- Party Card ---- */
.party-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.party-card-header h3 {
    font-size: 1.1875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.party-card-header .party-meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.next-session-badge {
    text-align: right;
    padding: 0.625rem 0.875rem;
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 2px;
}

.next-session-badge .badge-label {
    font-size: 0.625rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.1875rem;
}

.next-session-badge .badge-value {
    font-size: 0.8125rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Party members */
.party-members {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.party-member {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 2px;
}

.party-member-avatar {
    width: 28px;
    height: 28px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.12);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.party-member-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.online-indicator {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.online-indicator.online {
    background: #22c55e;
}

.online-indicator.offline {
    background: #4b5563;
}

/* Party actions */
.party-actions {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    gap: 0.75rem;
}

/* ---- Empty State ---- */
.empty-state-card {
    padding: 2.5rem;
    background: linear-gradient(180deg, rgba(18, 20, 26, 0.5) 0%, rgba(13, 15, 20, 0.7) 100%);
    border: 1px dashed var(--border-default);
    border-radius: 2px;
    text-align: center;
}

.empty-state-card .empty-icon {
    font-size: 1.75rem;
    margin-bottom: 0.625rem;
    opacity: 0.4;
}

.empty-state-card h3 {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.empty-state-card p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.empty-state-card .btn {
    border-radius: 2px;
}

/* ---- Button Style Updates ---- */
.btn {
    border-radius: 2px;
}

.btn-primary {
    border-radius: 2px;
}

.btn-outline {
    border-radius: 2px;
}

.btn-gold-outline {
    padding: 0.625rem 1.25rem;
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 2px;
    color: var(--accent-gold);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-gold-outline:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.4);
}

/* ---- Grid for new character cards ---- */
.characters-grid-new {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}

/* ---- Section spacing ---- */
.overview-section {
    margin-bottom: 2.5rem;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .welcome-frame {
        padding: 1.75rem 1.5rem;
    }
    
    .welcome-frame h1 {
        font-size: 1.75rem;
    }
    
    .welcome-frame .corner::before { width: 25px !important; }
    .welcome-frame .corner::after { height: 25px !important; }
    
    .characters-grid-new {
        grid-template-columns: 1fr;
    }
    
    .char-stats-bars {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .party-card-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .next-session-badge {
        text-align: left;
        align-self: flex-start;
    }
}

/* ============================================
   CHARACTER SHEET V2 - EXACT JSX DESIGN
   ============================================ */

/* Gold Frame Component */
.gold-frame {
    position: relative;
    border: 2px solid var(--border-gold);
    border-radius: 4px;
    background: var(--bg-header);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.gold-frame::before {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    bottom: 2px;
    left: 2px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 2px;
    pointer-events: none;
}

/* Gold corner accents */
.gold-frame::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 25px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-primary), var(--gold-light));
}

.gold-frame-corner {
    position: absolute;
    width: 25px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-primary), var(--gold-light));
}

.gold-frame-corner.top-right {
    top: -2px;
    right: -2px;
}

.gold-frame-corner.bottom-left {
    bottom: -2px;
    left: -2px;
    transform: rotate(90deg);
    transform-origin: left bottom;
}

.gold-frame-corner.bottom-right {
    bottom: -2px;
    right: -2px;
    transform: rotate(90deg);
    transform-origin: right bottom;
}

/* Panel Component */
.sheet-panel-v2 {
    background: var(--bg-panel);
    border: 1px solid var(--border-panel);
    border-radius: 2px;
    overflow: hidden;
}

.sheet-panel-v2-header {
    padding: 0.625rem 1rem;
    background: rgba(0, 0, 0, 0.2);
}

.sheet-panel-v2-title {
    font-size: 0.6875rem;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin: 0;
}

.sheet-panel-v2-content {
    padding: 1rem;
}

/* Character Header - Top Section in Gold Frame */
.char-header-v2 {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.char-portrait-v2 {
    width: 100px;
    height: 100px;
    border-radius: 4px;
    background: var(--bg-panel);
    border: 2px solid var(--border-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    overflow: hidden;
    position: relative;
}

.char-portrait-v2 img,
.char-portrait-v2 .race-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portrait-edit-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--accent-gold);
    border-radius: 4px 0 0 0;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    color: var(--accent-gold);
    font-size: 0.75rem;
    transition: all 0.2s;
}

.portrait-edit-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    color: var(--gold-bright);
}

.char-info-v2 {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.char-name-input-v2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.25rem 0;
    transition: border-color 0.2s;
}

.char-name-input-v2:hover {
    border-bottom-color: var(--border-panel);
}

.char-name-input-v2:focus {
    outline: none;
    border-bottom-color: var(--gold-primary);
}

.char-meta-v2 {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.char-select-v2 {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-panel);
    color: var(--text-primary);
    padding: 2px 4px;
    font-size: inherit;
    cursor: pointer;
}

.char-select-v2:hover {
    border-color: var(--accent-gold);
}

.char-select-v2:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.char-details-row-v2 {
    display: flex;
    gap: 1rem;
    font-size: 0.813rem;
    color: var(--text-muted);
}

.char-details-row-v2 span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.char-actions-v2 {
    display: flex;
    align-items: flex-start;
}

/* Attribute Boxes with Conditions */
.attributes-grid-v2 {
    display: grid;
    grid-template-columns: repeat(6, 70px);
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.attr-box-v2 {
    width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.attr-box-v2.condition-active {
    padding: 0.5rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.attr-label-v2 {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.attr-value-input-v2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    background: transparent;
    border: none;
    text-align: center;
    width: 100%;
    padding: 0.25rem;
}

.attr-value-input-v2:focus {
    outline: 2px solid var(--gold-primary);
    border-radius: 2px;
}

/* Diamond Checkbox for Conditions */
.diamond-checkbox {
    width: 14px;
    height: 14px;
    border: 2px solid var(--border-gold);
    background: transparent;
    transform: rotate(45deg);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.diamond-checkbox.checked {
    background: var(--gold-primary);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

.diamond-checkbox:hover {
    border-color: var(--gold-light);
}

.diamond-checkbox.condition {
    border-color: var(--border-gold);
}

.diamond-checkbox.condition.checked {
    background: var(--red-hp);
    border-color: var(--red-hp);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

/* Small diamond for skill cores */
.diamond-checkbox.small {
    width: 12px;
    height: 12px;
    border-width: 1px;
    border-color: #3d4451;
}

.diamond-checkbox.small.checked {
    background: var(--gold-primary);
    border-color: var(--gold-primary);
}

.condition-label-v2 {
    font-size: 0.625rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.25rem;
}

/* Secondary Attributes Row */
.secondary-attrs-v2 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.secondary-attr-v2 {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.secondary-attr-v2 label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.secondary-attr-v2 input {
    background: var(--bg-dark);
    border: 1px solid var(--border-panel);
    border-radius: 2px;
    padding: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-align: center;
}

.secondary-attr-v2 input:focus {
    outline: none;
    border-color: var(--gold-primary);
}

/* Tab Navigation */
.sheet-tabs-v2 {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-panel);
    margin-bottom: 1.5rem;
}

.sheet-tab-v2 {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.sheet-tab-v2:hover {
    color: var(--text-primary);
}

.sheet-tab-v2.active {
    color: var(--gold-primary);
    border-bottom-color: var(--gold-primary);
}

/* Main Layout - Content + Sidebar */
.sheet-layout-v2 {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
}

.sheet-main-v2 {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sheet-sidebar-v2 {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Pip Tracker for KP/VP */
.pip-tracker-v2 {
    padding: 1rem;
}

.pip-tracker-v2.kp {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(197, 48, 48, 0.05));
}

.pip-tracker-v2.vp {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05), rgba(22, 163, 74, 0.05));
}

.pip-tracker-label-v2 {
    font-size: 0.813rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pip-tracker-label-v2 .current-max {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.pips-container-v2 {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pip-v2 {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.pip-v2.kp-pip {
    border-color: var(--red-hp);
}

.pip-v2.vp-pip {
    border-color: var(--green-vp);
}

.pip-v2.filled {
    border-width: 2px;
}

.pip-v2.kp-pip.filled {
    background: var(--red-hp);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.pip-v2.vp-pip.filled {
    background: var(--green-vp);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.pip-v2:hover {
    transform: scale(1.1);
}

/* Death Saves Tracker */
.death-saves-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-panel);
}

.death-save-group-v2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.death-save-group-v2 label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.death-save-pips-v2 {
    display: flex;
    gap: 0.25rem;
}

.death-save-pip-v2 {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.death-save-pip-v2.success {
    border-color: var(--green-vp);
}

.death-save-pip-v2.failure {
    border-color: var(--red-hp);
}

.death-save-pip-v2.success.filled {
    background: var(--green-vp);
}

.death-save-pip-v2.failure.filled {
    background: var(--red-hp);
}

/* Skills Panel */
.skills-grid-v2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.skill-row-v2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.skill-row-v2:hover {
    background: rgba(0, 0, 0, 0.3);
}

.skill-core-checkbox-v2 {
    flex-shrink: 0;
}

.skill-value-v2 {
    width: 40px;
    text-align: center;
    padding: 0.25rem 0.5rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-panel);
    border-radius: 2px;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.skill-value-v2:focus {
    outline: none;
    border-color: var(--gold-primary);
}

.skill-name-v2 {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.skill-attr-v2 {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Weapon Skills with Red Diamonds */
.weapon-skill-row-v2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(239, 68, 68, 0.05);
    border-radius: 2px;
    border-left: 2px solid var(--red-hp);
}

.weapon-skill-row-v2 .diamond-checkbox {
    border-color: var(--red-hp);
}

.weapon-skill-row-v2 .diamond-checkbox.checked {
    background: var(--red-hp);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

/* Weapons Table */
.weapons-table-v2 {
    width: 100%;
    border-collapse: collapse;
}

.weapons-table-v2 th {
    text-align: left;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-panel);
}

.weapons-table-v2 td {
    padding: 0.5rem;
    border-bottom: 1px solid rgba(45, 51, 65, 0.3);
}

.weapons-table-v2 input,
.weapons-table-v2 select {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border-panel);
    border-radius: 2px;
    padding: 0.375rem 0.5rem;
    color: var(--text-primary);
    font-size: 0.813rem;
}

.weapons-table-v2 input:focus,
.weapons-table-v2 select:focus {
    outline: none;
    border-color: var(--gold-primary);
}

/* Currency Display */
.currency-display-v2 {
    display: flex;
    gap: 1rem;
    padding: 1rem;
}

.currency-item-v2 {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

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

.currency-item-v2 .label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.currency-item-v2 input {
    width: 100%;
    text-align: center;
    background: var(--bg-dark);
    border: 1px solid var(--border-panel);
    border-radius: 2px;
    padding: 0.375rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.currency-item-v2 input:focus {
    outline: none;
    border-color: var(--gold-primary);
}

/* Hero Ability Card */
.hero-ability-v2 {
    padding: 1rem;
    text-align: center;
}

.hero-ability-v2 .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hero-ability-v2 .name {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--gold-primary);
    margin-bottom: 0.25rem;
}

.hero-ability-v2 .description {
    font-size: 0.813rem;
    color: var(--text-secondary);
}

/* Armor & Helmet */
.armor-grid-v2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
}

.armor-item-v2 {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.armor-item-v2 label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.armor-item-v2 input {
    background: var(--bg-dark);
    border: 1px solid var(--border-panel);
    border-radius: 2px;
    padding: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.armor-item-v2 input:focus {
    outline: none;
    border-color: var(--gold-primary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sheet-layout-v2 {
        grid-template-columns: 1fr;
    }
    
    .attributes-grid-v2 {
        grid-template-columns: repeat(3, 70px);
    }
    
    .skills-grid-v2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .char-header-v2 {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .char-portrait-v2 {
        margin: 0 auto;
    }
    
    .char-actions-v2 {
        justify-content: center;
    }
    
    .attributes-grid-v2 {
        grid-template-columns: repeat(2, 70px);
    }
    
    .secondary-attrs-v2 {
        grid-template-columns: 1fr 1fr;
    }
}

/* Utility Classes */
.text-center-v2 {
    text-align: center;
}

.mb-1-v2 {
    margin-bottom: 0.5rem;
}

.mb-2-v2 {
    margin-bottom: 1rem;
}

.mt-1-v2 {
    margin-top: 0.5rem;
}

.mt-2-v2 {
    margin-top: 1rem;
}

/* ============================================
   HEMMABRYGGT (HOMEBREW) STYLES
   ============================================ */

/* Homebrew Colors - Exact from JSX mockup */
:root {
    --homebrew-bg-main: linear-gradient(135deg, #0d0d0d 0%, #1a1d24 100%);
    --homebrew-bg-header: rgba(13, 13, 13, 0.95);
    --homebrew-bg-card: linear-gradient(145deg, #1e2128 0%, #22262f 100%);
    --homebrew-bg-input: #0d0d0d;
    --homebrew-bg-dark: #1e2128;
    --homebrew-border-default: #2d3341;
    --homebrew-gold-primary: #d4af37;
    --homebrew-gold-light: #f0d875;
    --homebrew-gold-dark: #8b7335;
    --homebrew-text-primary: #f5f5f5;
    --homebrew-text-secondary: #a0a8b8;
    --homebrew-text-muted: #6b7280;
    --homebrew-red-monster: #dc2626;
    --homebrew-red-monster-bg: rgba(197, 48, 48, 0.1);
}

/* Homebrew Wrapper */
.homebrew-wrapper {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Navigation Buttons */
.homebrew-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--homebrew-border-default);
}

.homebrew-nav-btn {
    background: transparent;
    border: none;
    color: var(--homebrew-text-secondary);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-body);
}

.homebrew-nav-btn:hover {
    background: rgba(212, 175, 55, 0.1);
}

.homebrew-nav-btn.active {
    background: rgba(212, 175, 55, 0.15);
    color: var(--homebrew-gold-primary);
}

/* Browse View */
.homebrew-browse {
    width: 100%;
}

.homebrew-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.homebrew-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--homebrew-text-primary);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.homebrew-search-bar {
    max-width: 600px;
    margin: 0 auto;
}

.homebrew-search-input {
    width: 100%;
    background: var(--homebrew-bg-input);
    border: 1px solid var(--homebrew-border-default);
    border-radius: 10px;
    padding: 0.875rem 1rem;
    color: var(--homebrew-text-primary);
    font-size: 1rem;
    font-family: var(--font-body);
}

.homebrew-search-input::placeholder {
    color: var(--homebrew-text-muted);
}

.homebrew-search-input:focus {
    outline: none;
    border-color: var(--homebrew-gold-primary);
}

/* Category Tabs */
/* Category Carousel */
.category-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2rem;
}

.category-buttons-container {
    overflow: hidden; /* Hide scrollbar */
    flex: 1;
}

.category-buttons-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.category-buttons-track::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.homebrew-category-tab {
    background: var(--homebrew-bg-dark);
    border: 1px solid var(--homebrew-border-default);
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    color: var(--homebrew-text-secondary);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    flex-shrink: 0;
}

.homebrew-category-tab:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--homebrew-gold-dark);
}

.homebrew-category-tab.active {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--homebrew-gold-primary);
    color: var(--homebrew-gold-primary);
}

.category-icon {
    font-size: 1.25rem;
}

.category-label {
    font-weight: 600;
}

/* Filter Bar */
.homebrew-filter-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
    gap: 1rem;
}

.homebrew-sort-select {
    background: var(--homebrew-bg-input);
    border: 1px solid var(--homebrew-border-default);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: var(--homebrew-text-primary);
    font-family: var(--font-body);
    cursor: pointer;
}

.homebrew-sort-select:focus {
    outline: none;
    border-color: var(--homebrew-gold-primary);
}

/* Homebrew Items Grid (NO carousel) */
.homebrew-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 1.5rem;
}

/* Old carousel styles - keeping for backwards compatibility */
.homebrew-grid {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.3s ease;
}

.homebrew-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 1.5rem;
}

.homebrew-cards-container {
    overflow: hidden; /* Hide scrollbar */
    flex: 1;
}

.homebrew-cards-track {
    display: flex;
    gap: 1.5rem; /* 24px gap used in carousel scroll calculation */
    transition: transform 0.3s ease;
}

.carousel-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #d4af37;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    padding: 0;
}

.carousel-arrow:hover:not(:disabled) {
    background: rgba(212, 175, 55, 0.3);
    transform: scale(1.1);
}

.carousel-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-arrow svg {
    width: 20px;
    height: 20px;
}

/* Homebrew card action buttons */
.homebrew-card-actions {
    display: flex;
    gap: 4px;
}

.homebrew-btn-edit {
    background: rgba(212,175,55,0.2);
    border: 1px solid rgba(212,175,55,0.4);
    border-radius: 4px;
    padding: 4px 8px;
    color: #d4af37;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.homebrew-btn-edit:hover {
    background: rgba(212,175,55,0.3);
}

.homebrew-btn-delete {
    background: rgba(220,38,38,0.2);
    border: 1px solid rgba(220,38,38,0.4);
    border-radius: 4px;
    padding: 4px 8px;
    color: #dc2626;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.homebrew-btn-delete:hover {
    background: rgba(220,38,38,0.3);
}

/* Session RSVP buttons */
.session-rsvp-buttons {
    display: flex;
    gap: 0.5rem;
}

.rsvp-btn {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
}

.rsvp-btn.attending {
    border-color: rgba(34,197,94,0.5);
    color: #22c55e;
}

.rsvp-btn.attending.active,
.rsvp-btn.attending:hover {
    background: rgba(34,197,94,0.2);
}

.rsvp-btn.maybe {
    border-color: rgba(250,204,21,0.5);
    color: #facc15;
}

.rsvp-btn.maybe.active,
.rsvp-btn.maybe:hover {
    background: rgba(250,204,21,0.2);
}

.rsvp-btn.not-attending {
    border-color: rgba(239,68,68,0.5);
    color: #ef4444;
}

.rsvp-btn.not-attending.active,
.rsvp-btn.not-attending:hover {
    background: rgba(239,68,68,0.2);
}

/* Homebrew Card */
.homebrew-card {
    background: var(--homebrew-bg-card);
    border: 1px solid var(--homebrew-border-default);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.homebrew-card:hover {
    border-color: var(--homebrew-gold-dark);
    transform: translateY(-2px);
}

.homebrew-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.homebrew-type-badge {
    background: rgba(212, 175, 55, 0.1);
    color: var(--homebrew-gold-primary);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.homebrew-rating {
    color: var(--homebrew-gold-primary);
    font-size: 0.875rem;
    font-weight: 600;
}

.homebrew-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--homebrew-text-primary);
    margin-bottom: 0.75rem;
}

.homebrew-card-description {
    color: var(--homebrew-text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.homebrew-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--homebrew-border-default);
}

/* Author Info */
.homebrew-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.homebrew-author:hover {
    opacity: 0.8;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--homebrew-gold-dark);
    color: var(--homebrew-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.author-avatar-large {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--homebrew-gold-dark);
    color: var(--homebrew-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
}

.author-name {
    font-size: 0.875rem;
    color: var(--homebrew-text-secondary);
    font-weight: 500;
}

.homebrew-stats {
    display: flex;
    gap: 0.75rem;
}

.stat-item {
    font-size: 0.8rem;
    color: var(--homebrew-text-muted);
}

/* Add Button */
.homebrew-add-btn {
    background: linear-gradient(135deg, var(--homebrew-gold-primary), var(--homebrew-gold-light));
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: #1a1a1a;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    font-family: var(--font-body);
}

.homebrew-add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

/* Collection View */
.homebrew-collection {
    width: 100%;
}

.collection-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--homebrew-border-default);
    padding-bottom: 0.5rem;
}

.collection-tab {
    background: transparent;
    border: none;
    color: var(--homebrew-text-secondary);
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.collection-tab:hover {
    color: var(--homebrew-gold-light);
}

.collection-tab.active {
    color: var(--homebrew-gold-primary);
    border-bottom-color: var(--homebrew-gold-primary);
}

.collection-content {
    min-height: 400px;
}

.collection-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.collection-item {
    background: var(--homebrew-bg-card);
    border: 1px solid var(--homebrew-border-default);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
}

.collection-item:hover {
    border-color: var(--homebrew-gold-dark);
}

.collection-item-icon {
    font-size: 2rem;
    min-width: 50px;
    text-align: center;
}

.collection-item-content {
    flex-grow: 1;
}

.collection-item-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--homebrew-text-primary);
    margin-bottom: 0.25rem;
}

.collection-item-type {
    font-size: 0.875rem;
    color: var(--homebrew-text-muted);
}

.collection-item-actions {
    display: flex;
    gap: 0.5rem;
}

.collection-action-btn {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--homebrew-gold-dark);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    color: var(--homebrew-gold-primary);
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-body);
    font-size: 0.875rem;
}

.collection-action-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--homebrew-gold-primary);
}

.collection-empty {
    text-align: center;
    padding: 4rem 2rem;
}

.collection-empty p {
    color: var(--homebrew-text-secondary);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

/* Create View */
.homebrew-create {
    width: 100%;
}

.create-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.type-card {
    background: var(--homebrew-bg-card);
    border: 1px solid var(--homebrew-border-default);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.type-card:hover {
    border-color: var(--homebrew-gold-primary);
    background: rgba(212, 175, 55, 0.05);
    transform: translateY(-4px);
}

.type-icon {
    font-size: 3rem;
}

.type-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--homebrew-text-primary);
}

/* Create Form */
.homebrew-create-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-back {
    background: transparent;
    border: 1px solid var(--homebrew-border-default);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: var(--homebrew-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-body);
}

.btn-back:hover {
    border-color: var(--homebrew-gold-primary);
    color: var(--homebrew-gold-primary);
}

.form-header h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--homebrew-text-primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--homebrew-text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    background: var(--homebrew-bg-input);
    border: 1px solid var(--homebrew-border-default);
    border-radius: 10px;
    padding: 0.875rem 1rem;
    color: var(--homebrew-text-primary);
    font-family: var(--font-body);
    font-size: 0.875rem;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--homebrew-gold-primary);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Visibility Options */
.form-visibility {
    margin-bottom: 2rem;
}

.form-visibility h3 {
    color: var(--homebrew-text-primary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.visibility-options {
    display: flex;
    gap: 1rem;
}

.visibility-option {
    flex: 1;
    cursor: pointer;
}

.visibility-option input[type="radio"] {
    display: none;
}

.visibility-option span {
    display: block;
    background: var(--homebrew-bg-input);
    border: 2px solid var(--homebrew-border-default);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    color: var(--homebrew-text-secondary);
    transition: all 0.2s;
    font-weight: 600;
}

.visibility-option input[type="radio"]:checked + span {
    border-color: var(--homebrew-gold-primary);
    background: rgba(212, 175, 55, 0.1);
    color: var(--homebrew-gold-primary);
}

.visibility-option:hover span {
    border-color: var(--homebrew-gold-dark);
}

.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

/* Form row for side-by-side inputs */
.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Checkbox label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--homebrew-text-primary);
    font-weight: 600;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.form-help-text {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--homebrew-text-secondary);
    font-style: italic;
}

/* Collection action button */
.collection-action-btn {
    background: var(--homebrew-bg-input);
    border: 1px solid var(--homebrew-border-default);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    color: var(--homebrew-text-primary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 0.5rem;
}

.collection-action-btn:hover {
    border-color: var(--homebrew-gold-primary);
    color: var(--homebrew-gold-primary);
}

/* Author Profile Modal */
.homebrew-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

.modal-content {
    background: var(--homebrew-bg-dark);
    border: 1px solid var(--homebrew-border-default);
    border-radius: 16px;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    width: 100%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--homebrew-border-default);
}

.modal-header h2 {
    color: var(--homebrew-text-primary);
    font-family: var(--font-display);
    font-size: 1.25rem;
    letter-spacing: 2px;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--homebrew-text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.modal-close:hover {
    color: var(--homebrew-gold-primary);
}

.modal-body {
    padding: 2rem;
}

.author-profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.author-info h3 {
    color: var(--homebrew-text-primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.author-member-since {
    color: var(--homebrew-text-muted);
    font-size: 0.875rem;
}

.author-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-box {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--homebrew-gold-dark);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--homebrew-gold-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--homebrew-text-secondary);
}

.author-bio {
    color: var(--homebrew-text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.author-homebrews {
    margin-top: 2rem;
}

.author-homebrews h3 {
    color: var(--homebrew-text-primary);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

/* Loading and Empty States */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--homebrew-text-secondary);
}

.homebrew-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--homebrew-text-secondary);
}

.error {
    text-align: center;
    padding: 3rem;
    color: var(--homebrew-red-monster);
}

/* Homebrew Detail Modal */
.homebrew-detail-modal .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
}

.detail-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(145deg, #1e2128 0%, #22262f 100%);
    border: 1px solid #2d3341;
    border-radius: 20px;
    padding: 2rem;
    z-index: 1000;
}

.detail-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #2d3341;
}

.detail-type-badge {
    display: inline-block;
    background: rgba(212, 175, 55, 0.15);
    color: #d4af37;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.detail-title {
    font-family: 'Cinzel', serif;
    font-size: 1.75rem;
    color: #f5f5f5;
    margin-bottom: 0.5rem;
}

.detail-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    color: #a0a8b8;
    font-size: 0.875rem;
}

.detail-fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.detail-fields-grid .field {
    text-align: center;
}

.detail-fields-grid .field-label {
    display: block;
    color: #6b7280;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.detail-description {
    margin-bottom: 1.5rem;
}

.detail-description h3 {
    color: #d4af37;
    font-size: 0.875rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.detail-description p {
    color: #a0a8b8;
    line-height: 1.6;
}

.detail-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.detail-author:hover {
    background: rgba(212, 175, 55, 0.1);
}

.detail-author .author-info {
    display: flex;
    flex-direction: column;
}

.detail-author .author-label {
    color: #6b7280;
    font-size: 0.75rem;
}

/* Star Rating */
.detail-rating-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.detail-rating-section h3 {
    color: #d4af37;
    font-size: 0.875rem;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.star-rating {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.star-rating .star {
    font-size: 2rem;
    color: #3d4451;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

.star-rating .star:hover,
.star-rating .star.filled {
    color: #f0d875;
}

.star-rating .star:hover {
    transform: scale(1.2);
}

.your-rating {
    text-align: center;
    color: #a0a8b8;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Comments */
.detail-comments-section {
    margin-bottom: 1.5rem;
}

.detail-comments-section h3 {
    color: #d4af37;
    font-size: 0.875rem;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.comments-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.comment {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
}

.comment-header {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 600;
    color: #f5f5f5;
}

.comment-rating {
    color: #f0d875;
    font-size: 0.8rem;
}

.comment-date {
    color: #6b7280;
    font-size: 0.75rem;
    margin-left: auto;
}

.comment-text {
    color: #a0a8b8;
    font-size: 0.875rem;
    line-height: 1.5;
}

.no-comments {
    color: #6b7280;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

.add-comment {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.add-comment textarea {
    min-height: 80px;
}

.login-prompt {
    color: #6b7280;
    text-align: center;
    font-style: italic;
}

/* Detail Actions */
.detail-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #2d3341;
}

/* Make homebrew cards have pointer cursor */
.homebrew-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.homebrew-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Author clickable styling */
.homebrew-author {
    cursor: pointer;
    transition: color 0.2s;
}

.homebrew-author:hover .author-name {
    color: #d4af37;
}

/* Responsive */
@media (max-width: 768px) {
    .homebrew-wrapper {
        padding: 1rem;
    }
    
    .homebrew-nav {
        flex-wrap: wrap;
    }
    
    .homebrew-grid {
        grid-template-columns: 1fr;
    }
    
    .homebrew-categories {
        flex-wrap: wrap;
    }
    
    .create-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .author-stats-row {
        grid-template-columns: 1fr;
    }
    
    .visibility-options {
        flex-direction: column;
    }
    
    .homebrew-title {
        font-size: 2rem;
    }
}

/* ============================================
   GAME MODE STYLES
   ============================================ */

/* Game Mode Container */
/* ============================================
   GAME MODE (SPELLÄGE) UI REDESIGN
   Complete redesign for DM interface
   ============================================ */

/* Game Mode Color Variables */
:root {
    --gm-bg: linear-gradient(180deg, #0d0d0d 0%, #1a1d24 100%);
    --gm-card-hero: linear-gradient(145deg, #1e2128 0%, #252a33 100%);
    --gm-card-monster: linear-gradient(145deg, #2a1a1a 0%, #1e1515 100%);
    --gm-gold: #d4af37;
    --gm-gold-light: #f0d875;
    --gm-red: #dc2626;
    --gm-green: #22c55e;
    --gm-text: #f5f5f5;
    --gm-text-muted: #a0a8b8;
    --gm-text-dim: #6b7280;
    --gm-border: #2d3341;
    --gm-border-monster: #3d2020;
}

.game-mode-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gm-bg);
    z-index: 9999;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.game-mode-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
}

.game-mode-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.game-mode-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin: 0;
    color: var(--accent-gold);
}

.game-mode-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.game-mode-header-right {
    display: flex;
    gap: 0.5rem;
}

.game-mode-content {
    margin-top: 1rem;
}

/* Compact Cards Grid */
.compact-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.compact-card {
    background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 1rem;
    transition: all 0.2s;
}

.compact-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-2px);
}

.compact-card.critical {
    border-color: var(--hp-red);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
}

.compact-card.focused {
    border-color: var(--accent-gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.compact-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-default);
}

.character-avatar {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
}

.character-info {
    flex: 1;
}

.character-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.character-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Pip Trackers */
.pip-tracker {
    margin-bottom: 0.75rem;
}

.tracker-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pips {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.pip {
    font-size: 1rem;
    cursor: pointer;
    color: var(--border-default);
    transition: all 0.1s;
    user-select: none;
}

.pip:hover {
    transform: scale(1.2);
}

.kp-tracker .pip.filled {
    color: var(--red-hp);
}

.kp-tracker .pip.critical {
    color: var(--red-dark);
    animation: pulse-critical 2s infinite;
}

.vp-tracker .pip.filled {
    color: var(--green-vp);
}

.vp-tracker .pip.low {
    color: #eab308;
}

@keyframes pulse-critical {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.tracker-value {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Compact Stats */
.compact-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-dark);
    border-radius: var(--radius-md);
}

.stat-item {
    flex: 1;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
}

/* Weapon Skills in Collapsed View */
.compact-weapon-skills {
    padding: 0.5rem;
    background: var(--bg-dark);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.weapon-skills-label {
    font-weight: 600;
    margin-right: 0.25rem;
}

.sidebar-weapons {
    font-size: 0.7rem;
    color: var(--accent-gold);
    margin-top: 0.25rem;
}

/* Conditions */
.condition-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.condition-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.condition-badge.active {
    background: var(--accent-gold);
    color: var(--bg-dark);
    border-color: var(--accent-gold);
    font-weight: 600;
}

/* Initiative Tracker */
.initiative-tracker {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1rem;
}

.initiative-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.initiative-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.initiative-list {
    margin-top: 1rem;
}

.initiative-round {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.initiative-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.initiative-item.current {
    background: var(--bg-elevated);
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.initiative-number {
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 24px;
}

.initiative-icon {
    font-size: 1.25rem;
}

.initiative-name {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
}

.initiative-total {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* DM Toolbar */
.dm-toolbar {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1rem;
}

.dm-toolbar h3 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.dm-toolbar-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dm-tool-btn {
    padding: 0.75rem 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.dm-tool-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent-gold);
    transform: translateY(-2px);
}

/* Quick Notes */
.quick-notes {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1rem;
}

.quick-notes h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.session-notes-textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.875rem;
    resize: vertical;
    margin-bottom: 0.75rem;
}

.session-notes-textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
}

/* Monsters Panel */
.monsters-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1rem;
}

.monsters-header {
    margin-bottom: 1rem;
}

.monsters-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.monsters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.monster-card {
    background: linear-gradient(145deg, var(--bg-elevated) 0%, var(--bg-dark) 100%);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: all 0.2s;
}

.monster-card:hover {
    border-color: var(--brand-red);
    transform: translateY(-2px);
}

.monster-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-default);
}

.monster-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-remove-monster {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.btn-remove-monster:hover {
    background: var(--bg-hover);
    color: var(--brand-red);
}

.monster-hp {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-dark);
    border-radius: var(--radius-sm);
}

.monster-hp label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.monster-hp-value {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--red-hp);
}

.monster-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.monster-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    background: var(--bg-dark);
    border-radius: var(--radius-sm);
}

.monster-stat .stat-icon {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.monster-stat .stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.monster-stat .stat-label {
    font-size: 0.625rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.monster-notes {
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 0.5rem;
    background: var(--bg-dark);
    border-radius: var(--radius-sm);
    font-style: italic;
}

/* Focus Mode */
.focus-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1rem;
}

.focus-main {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.focus-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-card:hover {
    border-color: var(--accent-gold);
    transform: translateX(-4px);
}

.sidebar-card-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.sidebar-card-stats {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Expanded View */
.expanded-view {
    width: 100%;
}

.expanded-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-default);
}

.expanded-header h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.expanded-header .char-identity {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.expanded-header .char-details {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-style: italic;
}

.expanded-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
}

.expanded-section h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-default);
}

.expanded-section h4 {
    font-size: 0.875rem;
    color: var(--accent-gold);
    margin-bottom: 0.75rem;
}

/* Attributes Grid with Conditions */
.attributes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.attribute-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    text-align: center;
}

.attr-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.attr-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.attr-condition-btn {
    width: 100%;
    padding: 0.4rem;
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.attr-condition-btn:hover {
    border-color: var(--accent-gold);
}

.attr-condition-btn.active {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--bg-dark);
    font-weight: 600;
}

/* KP/VP Container */
.kp-vp-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.expanded-tracker {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.tracker-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.pips.large {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.pips.large .pip {
    font-size: 1.25rem;
}

.pip.vp {
    color: var(--green-vp);
}

.tracker-value-large {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 0.75rem;
}

.tracker-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

/* Death Saves */
.death-saves {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
}

.death-saves-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.death-saves-pips {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.death-pip {
    font-size: 1.25rem;
    color: var(--border-default);
}

.death-pip.success {
    color: var(--accent-green);
}

.death-pip.fail {
    color: var(--brand-red);
}

.death-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0 0.5rem;
}

/* Combat Stats */
.combat-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.combat-stat {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
}

.combat-stat label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.combat-stat span {
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* Armor Display */
.armor-display {
    padding: 0.75rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
}

.armor-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.armor-item label {
    color: var(--text-secondary);
    font-weight: 600;
}

.armor-item span {
    color: var(--text-primary);
}

.armor-total {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-default);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-gold);
    text-align: center;
}

/* Weapons Table in Expanded View */
.weapons-table-expanded {
    overflow-x: auto;
}

.weapons-table-expanded table {
    width: 100%;
    border-collapse: collapse;
}

.weapons-table-expanded th {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-default);
}

.weapons-table-expanded td {
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-default);
}

.weapons-table-expanded tr:last-child td {
    border-bottom: none;
}

/* Skills and Weapon Skills Grid */
.skills-weapons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.skills-column {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 0.75rem;
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
}

.skill-item.core {
    border-color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.1);
}

.skill-name {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.skill-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--accent-gold);
}

/* Abilities */
.abilities-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ability-card {
    padding: 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--accent-gold);
    border-radius: var(--radius-md);
}

.ability-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: 0.25rem;
}

/* Inventory and Money */
.inventory-list {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.money-display {
    display: flex;
    gap: 1.5rem;
    padding: 0.75rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    justify-content: center;
}

.money-item {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.empty-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* Notes Display */
.notes-display {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.6;
    padding: 0.75rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    white-space: pre-wrap;
}

.expanded-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    background: var(--bg-dark);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    text-align: center;
}

.stat-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.conditions-section {
    margin-bottom: 1.5rem;
}

.conditions-section h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.condition-toggles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
}

.condition-toggle-btn {
    padding: 0.75rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.condition-toggle-btn:hover {
    border-color: var(--accent-gold);
}

.condition-toggle-btn.active {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--bg-dark);
}

/* ============================================
   NEW GAME MODE LAYOUT - REDESIGNED
   ============================================ */

/* Header Bar - Compact top header */
.gm-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: rgba(13, 13, 13, 0.95);
    border-bottom: 2px solid var(--gm-border);
    backdrop-filter: blur(10px);
}

.gm-header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.gm-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--gm-gold);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gm-round-display {
    font-size: 0.875rem;
    color: var(--gm-text-muted);
    padding: 0.25rem 0.75rem;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.gm-header-actions {
    display: flex;
    gap: 0.75rem;
}

/* Header Button Styles */
.gm-btn-primary {
    background: linear-gradient(135deg, #d4af37, #f0d875);
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    color: #1a1a1a;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.gm-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212,175,55,0.4);
}

.gm-btn-success {
    background: linear-gradient(135deg, #22c55e, #4ade80);
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    color: #1a1a1a;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.gm-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34,197,94,0.4);
}

.gm-btn-decrease {
    background: #dc2626 !important;
    color: white !important;
    border: none !important;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-weight: bold;
}

.gm-btn-increase {
    background: #22c55e !important;
    color: white !important;
    border: none !important;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-weight: bold;
}

/* Initiative Tracker - Horizontal tokens */
.gm-initiative-bar {
    background: rgba(26, 29, 36, 0.8);
    border-bottom: 1px solid var(--gm-border);
    padding: 0.75rem 1.5rem;
    overflow-x: auto;
    flex-shrink: 0;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.gm-init-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--gm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.gm-initiative-tokens {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.gm-init-token {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
    background: rgba(30, 33, 40, 0.9);
    border: 1px solid #2d3341;
    border-radius: 8px;
    position: relative;
    min-width: 80px;
    cursor: pointer;
    transition: all 0.2s;
}

.gm-init-token:hover {
    transform: translateY(-2px);
    border-color: var(--gm-gold);
}

.gm-init-token-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.gm-init-token-name {
    font-size: 11px;
    color: #f5f5f5;
    text-align: center;
}

.gm-init-card-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #d4af37, #f0d875);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    color: #1a1a1a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.gm-init-token.active {
    position: relative;
}

/* Golden corner frame - TOP LEFT */
.gm-init-token.active::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    width: 20px;
    height: 20px;
    border-top: 3px solid #d4af37;
    border-left: 3px solid #d4af37;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

/* Golden corner frame - TOP RIGHT */
.gm-init-token.active::after {
    content: '';
    position: absolute;
    top: -3px;
    right: -3px;
    width: 20px;
    height: 20px;
    border-top: 3px solid #d4af37;
    border-right: 3px solid #d4af37;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

/* Need additional elements for bottom corners */
.gm-init-token.active .corner-bl {
    position: absolute;
    bottom: -3px;
    left: -3px;
    width: 20px;
    height: 20px;
    border-bottom: 3px solid #d4af37;
    border-left: 3px solid #d4af37;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.gm-init-token.active .corner-br {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 20px;
    height: 20px;
    border-bottom: 3px solid #d4af37;
    border-right: 3px solid #d4af37;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

/* Arrow between tokens */
.gm-initiative-arrow {
    color: var(--gm-text-dim);
    font-size: 1.25rem;
    user-select: none;
}

/* Golden corner frames for active elements */
.gm-hero-card.active::before,
.gm-monster-card.active::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    width: 20px;
    height: 20px;
    border-top: 3px solid #d4af37;
    border-left: 3px solid #d4af37;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.gm-hero-card.active::after,
.gm-monster-card.active::after {
    content: '';
    position: absolute;
    top: -3px;
    right: -3px;
    width: 20px;
    height: 20px;
    border-top: 3px solid #d4af37;
    border-right: 3px solid #d4af37;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.gm-hero-card.active .corner-bl,
.gm-monster-card.active .corner-bl {
    position: absolute;
    bottom: -3px;
    left: -3px;
    width: 20px;
    height: 20px;
    border-bottom: 3px solid #d4af37;
    border-left: 3px solid #d4af37;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.gm-hero-card.active .corner-br,
.gm-monster-card.active .corner-br {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 20px;
    height: 20px;
    border-bottom: 3px solid #d4af37;
    border-right: 3px solid #d4af37;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

/* Golden frame for modals */
.golden-frame {
    position: relative;
}

.golden-frame::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 20px;
    height: 20px;
    border-top: 3px solid var(--gm-gold);
    border-left: 3px solid var(--gm-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
    pointer-events: none;
}

.golden-frame::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-top: 3px solid var(--gm-gold);
    border-right: 3px solid var(--gm-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
    pointer-events: none;
}

.golden-frame .gm-frame-bl,
.golden-frame .corner-bl {
    position: absolute;
    bottom: -2px;
    left: -2px;
    width: 20px;
    height: 20px;
    border-bottom: 3px solid var(--gm-gold);
    border-left: 3px solid var(--gm-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.golden-frame .gm-frame-br,
.golden-frame .corner-br {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-bottom: 3px solid var(--gm-gold);
    border-right: 3px solid var(--gm-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

/* Main Grid Layout */
.gm-main-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 200px;
    gap: 12px;
    padding: 1rem 1.5rem;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

/* Heroes Column */
.gm-heroes-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.gm-heroes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.gm-heroes-column::-webkit-scrollbar {
    width: 6px;
}

.gm-heroes-column::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.gm-heroes-column::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 3px;
}

.gm-heroes-column::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}

/* Hero Card */
.gm-hero-card {
    position: relative;
    background: linear-gradient(145deg, #1e2128 0%, #252a33 100%);
    border: 1px solid #2d3341;
    border-radius: 12px;
    padding: 14px;
    transition: all 0.2s;
}

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

.gm-hero-card.active {
    border-color: var(--gm-gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.gm-hero-card.dead {
    opacity: 0.6;
    position: relative;
}

.gm-hero-card.dead::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 3px;
    background: var(--gm-red);
    transform: translateY(-50%) rotate(-5deg);
    pointer-events: none;
    z-index: 1;
}

/* Hero initiative badge (blue badge in top-right) */
.gm-hero-initiative-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #3b82f6;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: white;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.gm-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.gm-card-title {
    flex: 1;
}

.gm-card-name {
    font-family: var(--font-display);
    font-size: 1.125rem;
    color: var(--gm-gold);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.gm-card-meta {
    font-size: 0.75rem;
    color: var(--gm-text-muted);
}

.gm-death-badge {
    background: var(--gm-red);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* KP/VP Compact Display */
.gm-hp-vp-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.gm-stat-box {
    background: rgba(13, 13, 13, 0.5);
    border-radius: 6px;
    padding: 0.5rem;
}

.gm-stat-label {
    font-size: 0.7rem;
    color: var(--gm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.gm-stat-pips {
    display: flex;
    gap: 0.2rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.gm-pip {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.1s;
}

.gm-pip:hover {
    transform: scale(1.2);
}

.gm-pip.filled-kp {
    background: var(--gm-red);
    border-color: var(--gm-red);
    box-shadow: 0 0 4px rgba(220, 38, 38, 0.5);
}

.gm-pip.filled-vp {
    background: var(--gm-green);
    border-color: var(--gm-green);
    box-shadow: 0 0 4px rgba(34, 197, 94, 0.5);
}

.gm-stat-value {
    font-size: 0.875rem;
    color: var(--gm-text);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gm-stat-buttons {
    display: flex;
    gap: 0.25rem;
}

.gm-stat-btn {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: bold;
    transition: all 0.2s;
    padding: 4px 8px;
}

.gm-btn-decrease {
    background: #dc2626 !important;
}

.gm-btn-decrease:hover {
    background: #b91c1c !important;
}

.gm-btn-increase {
    background: #22c55e !important;
}

.gm-btn-increase:hover {
    background: #16a34a !important;
}

/* Combat Stats Row */
.gm-combat-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.gm-combat-stat {
    background: rgba(13, 13, 13, 0.5);
    border-radius: 4px;
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
}

.gm-combat-stat-label {
    color: var(--gm-text-dim);
    margin-right: 0.25rem;
}

.gm-combat-stat-value {
    color: var(--gm-text);
    font-weight: 600;
}

/* Weapons Compact */
.gm-weapons-list {
    margin-bottom: 0.75rem;
}

.gm-weapons-title {
    font-size: 0.7rem;
    color: var(--gm-text-dim);
    text-transform: uppercase;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.gm-weapon-item {
    background: rgba(13, 13, 13, 0.5);
    border-radius: 4px;
    padding: 0.4rem 0.5rem;
    margin-bottom: 0.3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
}

.gm-weapon-name {
    color: var(--gm-text);
    font-weight: 600;
}

.gm-weapon-dmg {
    color: var(--gm-red);
    font-weight: 700;
}

/* Conditions */
.gm-conditions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.gm-condition-badge {
    background: rgba(212, 175, 55, 0.2);
    color: var(--gm-gold);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Card Actions */
.gm-card-actions {
    display: flex;
    gap: 0.5rem;
}

.gm-btn-info {
    flex: 1;
    padding: 0.5rem;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    color: var(--gm-gold);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.gm-btn-info:hover {
    background: var(--gm-gold);
    color: #000;
}

/* Monsters Column */
.gm-monsters-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.gm-monsters-column::-webkit-scrollbar {
    width: 6px;
}

.gm-monsters-column::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.gm-monsters-column::-webkit-scrollbar-thumb {
    background: rgba(220, 38, 38, 0.3);
    border-radius: 3px;
}

.gm-monsters-column::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 38, 38, 0.5);
}

.gm-monsters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.gm-monsters-title {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--gm-red);
    text-transform: uppercase;
}

.gm-btn-add-monster {
    padding: 0.4rem 0.75rem;
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(220, 38, 38, 0.4);
    border-radius: 4px;
    color: var(--gm-red);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.gm-btn-add-monster:hover {
    background: var(--gm-red);
    color: white;
}

/* Monster Card */
.gm-monster-card {
    position: relative;
    background: var(--gm-card-monster);
    border: 2px solid rgba(220, 38, 38, 0.3);
    border-radius: 8px;
    padding: 0.875rem;
    transition: all 0.2s;
}

.gm-monster-card:hover {
    border-color: var(--gm-red);
}

.gm-monster-card.current-turn {
    border-color: var(--gm-gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.gm-monster-card.dead {
    opacity: 0.6;
}

.gm-monster-card.dead::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 3px;
    background: var(--gm-red);
    transform: translateY(-50%) rotate(-5deg);
    pointer-events: none;
}

.gm-monster-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.gm-monster-name {
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--gm-red);
    text-transform: uppercase;
}

.gm-btn-remove {
    background: transparent;
    border: none;
    color: var(--gm-text-dim);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: all 0.2s;
}

.gm-btn-remove:hover {
    color: var(--gm-red);
    transform: scale(1.2);
}

.gm-monster-hp {
    background: rgba(13, 13, 13, 0.5);
    border-radius: 6px;
    padding: 0.5rem;
    margin-bottom: 0.75rem;
}

.gm-monster-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.gm-monster-stat {
    background: rgba(13, 13, 13, 0.5);
    border-radius: 4px;
    padding: 0.4rem;
    text-align: center;
}

.gm-monster-stat-icon {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.gm-monster-stat-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--gm-text);
    margin-bottom: 0.1rem;
}

.gm-monster-stat-label {
    font-size: 0.625rem;
    color: var(--gm-text-dim);
    text-transform: uppercase;
}

.gm-monster-attacks {
    background: rgba(13, 13, 13, 0.5);
    border-radius: 4px;
    padding: 0.5rem;
}

.gm-monster-attack-title {
    font-size: 0.7rem;
    color: var(--gm-text-dim);
    text-transform: uppercase;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.gm-monster-attack {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
    font-size: 0.75rem;
}

.gm-monster-attack:last-child {
    margin-bottom: 0;
}

.gm-monster-attack-name {
    color: var(--gm-text);
    font-weight: 600;
}

.gm-monster-attack-dmg {
    color: var(--gm-red);
    font-weight: 700;
}

/* Sidebar Column */
.gm-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
}

.gm-sidebar::-webkit-scrollbar {
    width: 4px;
}

.gm-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.gm-sidebar::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 2px;
}

/* Sidebar Panel */
.gm-sidebar-panel {
    background: rgba(30, 33, 40, 0.8);
    border: 1px solid var(--gm-border);
    border-radius: 6px;
    padding: 0.75rem;
}

.gm-sidebar-title {
    font-size: 0.75rem;
    color: var(--gm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Stats Panel (HJÄLTAR/MONSTER counts) */
.gm-stats-panel {
    background: rgba(30, 33, 40, 0.8);
    border: 1px solid var(--gm-border);
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.gm-stats-row {
    display: flex;
    justify-content: space-around;
    gap: 0.5rem;
}

.gm-stat-item {
    text-align: center;
}

.gm-stat-item-label {
    font-size: 0.65rem;
    color: var(--gm-text-dim);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    letter-spacing: 0.05em;
}

.gm-stat-item-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.gm-stat-item-value.heroes {
    color: #22c55e;
}

.gm-stat-item-value.monsters {
    color: var(--gm-red);
}

/* Combat Log */
.gm-combat-log {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.gm-log-entries {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.gm-log-entries::-webkit-scrollbar {
    width: 4px;
}

.gm-log-entries::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.gm-log-entries::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 2px;
}

.gm-log-entry {
    padding: 0.4rem 0.5rem;
    background: rgba(13, 13, 13, 0.5);
    border-left: 2px solid var(--gm-border);
    border-radius: 3px;
    font-size: 0.7rem;
    line-height: 1.4;
}

.gm-log-entry.damage,
.gm-log-entry.monster {
    border-left-color: var(--gm-red);
    color: #f87171;
}

.gm-log-entry.heal {
    border-left-color: var(--gm-green);
    color: #86efac;
}

.gm-log-entry.death {
    border-left-color: var(--gm-red);
    color: var(--gm-red);
    font-weight: 700;
}

.gm-log-entry.turn,
.gm-log-entry.hero {
    border-left-color: var(--gm-gold);
    color: #fbbf24;
}

.gm-log-entry.round {
    border-left-color: var(--gm-gold);
    color: var(--gm-gold);
    font-weight: 700;
    text-align: center;
    border-left: none;
    border-top: 2px solid var(--gm-gold);
    border-bottom: 2px solid var(--gm-gold);
}

.gm-log-entry.system {
    border-left-color: var(--gm-text-dim);
    color: var(--gm-text-dim);
}

.gm-log-time {
    color: var(--gm-text-dim);
    font-size: 0.65rem;
    margin-right: 0.25rem;
}

/* Notes Section - Compact */
.gm-notes {
    max-height: 50px;
}

.gm-notes-textarea {
    width: 100%;
    height: 50px;
    background: rgba(13, 13, 13, 0.5);
    border: 1px solid var(--gm-border);
    border-radius: 4px;
    padding: 0.4rem;
    color: var(--gm-text);
    font-size: 0.7rem;
    font-family: var(--font-body);
    resize: none;
}

.gm-notes-textarea:focus {
    outline: none;
    border-color: var(--gm-gold);
}

.gm-notes-textarea::placeholder {
    color: var(--gm-text-dim);
}

/* Expanded Character Modal */
.gm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
}

.gm-modal-content {
    position: relative;
    background: var(--gm-card-hero);
    border: 3px solid var(--gm-gold);
    border-radius: 12px;
    padding: 2rem;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.4);
}

/* Custom scrollbar for webkit browsers */
.gm-modal-content *::-webkit-scrollbar {
    width: 8px;
}

.gm-modal-content *::-webkit-scrollbar-track {
    background: #1a1d24;
}

.gm-modal-content *::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 4px;
}

.gm-modal-content *::-webkit-scrollbar-thumb:hover {
    background: #c49b2a;
}

.gm-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--gm-border);
    border-radius: 4px;
    color: var(--gm-text);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
}

.gm-modal-close:hover {
    background: var(--gm-gold);
    color: #000;
    border-color: var(--gm-gold);
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .gm-main-grid {
        grid-template-columns: 1.5fr 1fr 180px;
    }
}

@media (max-width: 1024px) {
    .gm-main-grid {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }
    
    .gm-sidebar {
        max-height: 300px;
    }
    
    .focus-container {
        grid-template-columns: 1fr;
    }
    
    .focus-sidebar {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .sidebar-card {
        min-width: 200px;
    }
    
    .skills-weapons-grid {
        grid-template-columns: 1fr;
    }
    
    .kp-vp-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .gm-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .gm-header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .compact-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .dm-toolbar-actions {
        flex-direction: column;
    }
    
    .dm-tool-btn {
        width: 100%;
    }
    
    .monsters-grid {
        grid-template-columns: 1fr;
    }
    
    .attributes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .combat-stats {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   FANTASY UI/UX REDESIGN - EXACT JSX MOCKUP
   ============================================ */

/* New color variables from JSX mockup */
:root {
    --site-bg: linear-gradient(180deg, #0d0d0d 0%, #1a1d24 100%);
    --card-bg: linear-gradient(145deg, rgba(30, 33, 40, 0.95) 0%, rgba(25, 28, 35, 0.98) 50%, rgba(20, 23, 28, 0.95) 100%);
    --gold-border: rgba(212, 175, 55, 0.15);
    --gold-border-hover: rgba(212, 175, 55, 0.35);
    --kp-bar: linear-gradient(90deg, #8b0000, #cc0000, #ff2020);
    --kp-bg: #2d1515;
    --kp-text: #ff6b6b;
    --vp-bar: linear-gradient(90deg, #0a3d6e, #1565c0, #2196f3);
    --vp-bg: #152535;
    --vp-text: #64b5f6;
    --heroes-green: #22c55e;
    --monsters-red: #dc2626;
    --text-fantasy: #f5e6c8;
    --text-subtitle: #8b9dc3;
}

/* Fantasy Character Card V2 */
.fantasy-character-card {
    position: relative;
    width: 260px;
    background: var(--card-bg);
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    border: 1px solid var(--gold-border);
}

.fantasy-character-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.7), 0 0 25px rgba(212,175,55,0.15);
}

/* Decorative L-corners SVG */
.decorative-corner-svg {
    position: absolute;
    width: 25px;
    height: 25px;
}

.decorative-corner-svg.top-left {
    top: -1px;
    left: -1px;
}

.decorative-corner-svg.top-right {
    top: -1px;
    right: -1px;
}

.decorative-corner-svg.bottom-left {
    bottom: -1px;
    left: -1px;
}

.decorative-corner-svg.bottom-right {
    bottom: -1px;
    right: -1px;
}

/* Character Card Header with Portrait */
.fantasy-card-header {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.fantasy-portrait {
    position: relative;
    width: 50px;
    height: 50px;
    background: linear-gradient(145deg, #2d3341, #1e2128);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #d4af37;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
    overflow: hidden;
}

.fantasy-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fantasy-portrait-emoji {
    font-size: 28px;
}

/* Mini corner decorations on portrait */
.portrait-corner-deco {
    position: absolute;
    width: 8px;
    height: 8px;
    border: 2px solid #f0d875;
}

.portrait-corner-deco.top-left {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.portrait-corner-deco.top-right {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
}

.portrait-corner-deco.bottom-left {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
}

.portrait-corner-deco.bottom-right {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

.fantasy-card-identity {
    flex: 1;
}

.fantasy-card-name {
    margin: 0 0 3px 0;
    color: #f5e6c8;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Cinzel', 'Times New Roman', serif;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.fantasy-card-subtitle {
    color: #8b9dc3;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.fantasy-card-subtitle .icon {
    color: #d4af37;
}

/* Divider */
.fantasy-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212,175,55,0.5), transparent);
    margin: 10px 0;
}

.fantasy-divider-light {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212,175,55,0.3), transparent);
    margin: 10px 0;
}

/* Attributes Row */
.fantasy-attributes {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 6px 4px;
    background: rgba(0,0,0,0.25);
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.03);
}

.fantasy-attr-box {
    text-align: center;
    flex: 1;
}

.fantasy-attr-label {
    font-size: 8px;
    color: #6b7280;
    margin-bottom: 1px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.fantasy-attr-value {
    font-size: 14px;
    color: #f5e6c8;
    font-weight: bold;
    font-family: 'Cinzel', serif;
}

/* Health Bars - KP & VP */
.fantasy-health-container {
    margin-bottom: 12px;
}

.fantasy-health-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.fantasy-health-icon {
    font-size: 12px;
    width: 18px;
}

.fantasy-health-track {
    flex: 1;
    height: 10px;
    background: var(--kp-bg);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}

.fantasy-health-track.vp {
    background: var(--vp-bg);
}

.fantasy-health-fill {
    height: 100%;
    background: var(--kp-bar);
    border-radius: 5px;
    box-shadow: 0 0 8px rgba(255,0,0,0.3);
    transition: width 0.3s ease;
}

.fantasy-health-fill.vp {
    background: var(--vp-bar);
    box-shadow: 0 0 8px rgba(33,150,243,0.3);
}

.fantasy-health-value {
    font-size: 11px;
    color: var(--kp-text);
    font-weight: bold;
    min-width: 24px;
    text-align: right;
}

.fantasy-health-value.vp {
    color: var(--vp-text);
}

/* Action Buttons */
.fantasy-card-buttons {
    display: flex;
    gap: 6px;
    justify-content: space-between;
}

.fantasy-btn {
    flex: 1;
    padding: 7px 10px;
    background: linear-gradient(145deg, rgba(212,175,55,0.15), rgba(212,175,55,0.08));
    border: 1px solid rgba(212,175,55,0.35);
    border-radius: 5px;
    color: #d4af37;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s;
}

.fantasy-btn:hover {
    background: linear-gradient(145deg, rgba(212,175,55,0.25), rgba(212,175,55,0.15));
}

.fantasy-btn.in-group {
    background: linear-gradient(145deg, rgba(34,197,94,0.15), rgba(34,197,94,0.08));
    border: 1px solid rgba(34,197,94,0.35);
    color: #22c55e;
}

.fantasy-btn.not-in-group {
    background: linear-gradient(145deg, rgba(100,100,100,0.15), rgba(80,80,80,0.08));
    border: 1px solid rgba(150,150,150,0.2);
    color: #888;
}

/* New Character Card - "Starta en ny legend" */
/* ============================================
   FANTASY CHARACTER CARDS - Enhanced Design
   ============================================ */

.fantasy-character-card {
    position: relative;
    width: 260px;
    height: 310px;
    background: linear-gradient(165deg, #1e2128 0%, #12141a 50%, #0d0f14 100%);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 20px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.03);
    border: 2px solid rgba(212, 175, 55, 0.3);
    overflow: hidden;
}

.fantasy-character-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(139, 115, 53, 0.05) 0%, transparent 40%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.fantasy-character-card:hover {
    transform: translateY(-6px);
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 
        0 16px 48px rgba(0,0,0,0.6),
        0 0 40px rgba(212, 175, 55, 0.12),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

.fantasy-character-card:hover::before {
    opacity: 1;
}

/* Corner Ornaments */
.fantasy-character-card .card-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.fantasy-character-card:hover .card-corner {
    opacity: 1;
}

.fantasy-character-card .card-corner::before,
.fantasy-character-card .card-corner::after {
    content: '';
    position: absolute;
    background: linear-gradient(90deg, #d4af37, transparent);
}

.fantasy-character-card .card-corner::before {
    width: 20px;
    height: 2px;
}

.fantasy-character-card .card-corner::after {
    width: 2px;
    height: 20px;
}

.fantasy-character-card .card-corner.top-left { top: 6px; left: 6px; }
.fantasy-character-card .card-corner.top-left::before { top: 0; left: 0; }
.fantasy-character-card .card-corner.top-left::after { top: 0; left: 0; }

.fantasy-character-card .card-corner.top-right { top: 6px; right: 6px; }
.fantasy-character-card .card-corner.top-right::before { top: 0; right: 0; background: linear-gradient(270deg, #d4af37, transparent); }
.fantasy-character-card .card-corner.top-right::after { top: 0; right: 0; }

.fantasy-character-card .card-corner.bottom-left { bottom: 6px; left: 6px; }
.fantasy-character-card .card-corner.bottom-left::before { bottom: 0; left: 0; }
.fantasy-character-card .card-corner.bottom-left::after { bottom: 0; left: 0; background: linear-gradient(0deg, #d4af37, transparent); }

.fantasy-character-card .card-corner.bottom-right { bottom: 6px; right: 6px; }
.fantasy-character-card .card-corner.bottom-right::before { bottom: 0; right: 0; background: linear-gradient(270deg, #d4af37, transparent); }
.fantasy-character-card .card-corner.bottom-right::after { bottom: 0; right: 0; background: linear-gradient(0deg, #d4af37, transparent); }

/* Portrait Section */
.fantasy-card-portrait {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 24px auto 16px;
    border-radius: 50%;
    background: linear-gradient(145deg, #2d3341, #1a1d24);
    padding: 4px;
    box-shadow: 
        0 8px 24px rgba(0,0,0,0.5),
        inset 0 2px 4px rgba(0,0,0,0.3);
}

.fantasy-card-portrait::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(145deg, #d4af37 0%, #8b7335 50%, #d4af37 100%);
    z-index: -1;
}

.fantasy-card-portrait-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(145deg, #1a1d24, #12141a);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fantasy-card-portrait-inner img,
.fantasy-card-portrait-inner .race-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Character Info */
.fantasy-card-info {
    text-align: center;
    padding: 0 16px;
}

.fantasy-card-name {
    font-family: 'Cinzel', serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #f5f5f5;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 0.02em;
}

.fantasy-card-title {
    font-size: 0.75rem;
    color: #d4af37;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

/* Stats Section */
.fantasy-card-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 12px 16px;
    margin: 0 16px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.15);
}

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

.fantasy-stat-label {
    font-size: 0.625rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.fantasy-stat-bar {
    width: 60px;
    height: 4px;
    background: rgba(0,0,0,0.5);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.fantasy-stat-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

.fantasy-stat-fill.kp {
    background: linear-gradient(90deg, #b91c1c, #ef4444);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.fantasy-stat-fill.vp {
    background: linear-gradient(90deg, #7c3aed, #a855f7);
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
}

.fantasy-stat-value {
    font-size: 0.6875rem;
    font-weight: 600;
}

.fantasy-stat-value.kp { color: #ef4444; }
.fantasy-stat-value.vp { color: #a855f7; }

/* Card Footer */
.fantasy-card-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    background: linear-gradient(0deg, rgba(0,0,0,0.4) 0%, transparent 100%);
}

.fantasy-card-footer .btn-ghost {
    font-size: 0.6875rem;
    padding: 0.375rem 0.625rem;
    color: #6b7280;
    transition: all 0.2s;
}

.fantasy-card-footer .btn-ghost:hover {
    color: #d4af37;
    background: rgba(212, 175, 55, 0.1);
}

.fantasy-card-action {
    font-size: 0.75rem;
    color: #6b7280;
    transition: color 0.25s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.fantasy-character-card:hover .fantasy-card-action {
    color: #d4af37;
}

/* Decorative Runes */
.fantasy-card-rune {
    position: absolute;
    font-size: 8px;
    color: rgba(107, 114, 128, 0.4);
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

.fantasy-card-rune.top {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.fantasy-card-rune.bottom {
    bottom: 52px;
    left: 50%;
    transform: translateX(-50%);
}

.fantasy-character-card:hover .fantasy-card-rune {
    color: rgba(212, 175, 55, 0.4);
}

/* Group indicator badge */
.fantasy-group-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: linear-gradient(145deg, #d4af37, #8b7335);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.fantasy-character-card.in-group .fantasy-group-badge {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   END FANTASY CHARACTER CARDS
   ============================================ */

.fantasy-new-character-card {
    position: relative;
    width: 260px;
    height: 310px;
    background: rgba(30, 33, 40, 0.6);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    border: 2px dashed rgba(212,175,55,0.25);
}

.fantasy-new-character-card:hover {
    transform: translateY(-6px);
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 16px 48px rgba(0,0,0,0.6), 0 0 40px rgba(212,175,55,0.12);
}

.fantasy-book-icon {
    width: 80px;
    height: 105px;
    background: linear-gradient(145deg, #2d3341, #1e2128);
    border-radius: 6px 12px 12px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
    border: 2px solid #d4af37;
    position: relative;
}

.fantasy-book-spine {
    position: absolute;
    left: 0;
    top: 10%;
    bottom: 10%;
    width: 6px;
    background: linear-gradient(90deg, #1a1d24, #2d3341);
    border-radius: 4px 0 0 4px;
}

.fantasy-book-plus {
    width: 35px;
    height: 35px;
    background: linear-gradient(145deg, #d4af37, #f0d875);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #1a1510;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(212,175,55,0.4);
}

.fantasy-book-rune {
    position: absolute;
    font-size: 7px;
    color: #6b7280;
    letter-spacing: 1px;
}

.fantasy-book-rune.top {
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
}

.fantasy-book-rune.bottom {
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
}

.fantasy-new-title {
    color: #d4af37;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Cinzel', serif;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.fantasy-new-subtitle {
    color: #6b7280;
    font-size: 10px;
    margin-top: 4px;
}

/* Group Card */
.fantasy-group-card {
    position: relative;
    width: 300px;
    background: var(--card-bg);
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    border: 1px solid var(--gold-border);
}

.fantasy-group-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.7), 0 0 25px rgba(212,175,55,0.15);
}

.fantasy-group-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.fantasy-group-title {
    margin: 0 0 4px 0;
    color: #f5e6c8;
    font-size: 16px;
    font-family: 'Cinzel', serif;
}

.fantasy-group-meta {
    color: #6b7280;
    font-size: 11px;
}

.fantasy-group-badge-active {
    background: linear-gradient(145deg, #22c55e, #16a34a);
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    color: white;
    font-weight: 600;
}

.fantasy-group-avatars {
    display: flex;
    margin-bottom: 14px;
}

.fantasy-group-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(145deg, #2d3341, #1e2128);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #d4af37;
    font-size: 16px;
}

.fantasy-group-avatar:not(:first-child) {
    margin-left: -8px;
}

.fantasy-group-button {
    width: 100%;
    padding: 8px;
    background: linear-gradient(145deg, rgba(212,175,55,0.15), rgba(212,175,55,0.08));
    border: 1px solid rgba(212,175,55,0.35);
    border-radius: 5px;
    color: #d4af37;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Homebrew Card */
.fantasy-homebrew-card {
    position: relative;
    width: 220px;
    background: var(--card-bg);
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    border: 1px solid var(--gold-border);
}

.fantasy-homebrew-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.7), 0 0 25px rgba(212,175,55,0.15);
}

.fantasy-homebrew-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    margin-bottom: 10px;
}

.fantasy-homebrew-type-badge.monster {
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(220, 38, 38, 0.5);
    color: #dc2626;
}

.fantasy-homebrew-type-badge.item {
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: #d4af37;
}

.fantasy-homebrew-type-badge.spell {
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.5);
    color: #8b5cf6;
}

.fantasy-homebrew-type-badge.adventure {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #22c55e;
}

.fantasy-homebrew-title {
    margin: 0 0 6px 0;
    color: #f5e6c8;
    font-size: 14px;
    font-family: 'Cinzel', serif;
}

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

.fantasy-homebrew-author {
    color: #6b7280;
    font-size: 10px;
}

.fantasy-homebrew-rating {
    color: #d4af37;
    font-size: 11px;
}

/* Stats Panel - Game Mode */
.gm-stats-panel {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.gm-stats-row {
    display: flex;
    gap: 12px;
    width: 100%;
}

.gm-stat-item {
    background: rgba(30, 33, 40, 0.8);
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    flex: 1;
}

.gm-stat-item-label {
    color: #6b7280;
    font-size: 10px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.gm-stat-item-value {
    font-size: 24px;
    font-weight: bold;
}

.gm-stat-item-value.heroes {
    color: var(--heroes-green);
}

.gm-stat-item-value.monsters {
    color: var(--monsters-red);
}

.gm-stat-item.heroes {
    border: 1px solid rgba(34,197,94,0.3);
}

.gm-stat-item.monsters {
    border: 1px solid rgba(220,38,38,0.3);
}

/* Back Button */
.fantasy-back-button {
    padding: 8px 16px;
    background: rgba(45, 51, 65, 0.8);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 6px;
    color: #d4af37;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
}

/* Create New Group/Homebrew Card */
.fantasy-create-card {
    background: rgba(30, 33, 40, 0.6);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(212,175,55,0.25);
    cursor: pointer;
    transition: all 0.3s ease;
}

.fantasy-create-card:hover {
    border-color: rgba(212,175,55,0.4);
    transform: translateY(-2px);
}

.fantasy-create-plus {
    width: 40px;
    height: 40px;
    background: linear-gradient(145deg, #d4af37, #f0d875);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #1a1510;
    margin-bottom: 10px;
}

.fantasy-create-text {
    color: #d4af37;
    font-size: 12px;
    font-weight: 600;
}

/* Character Background Images */
.character-page-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.character-page-background::before,
.character-page-background::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 35%;
    pointer-events: none;
}

/* Fade from LEFT side */
.character-page-background::before {
    left: 0;
    background: linear-gradient(90deg, 
        rgba(13, 13, 13, 1) 0%,
        rgba(13, 13, 13, 0.9) 20%,
        rgba(13, 13, 13, 0.6) 50%,
        rgba(13, 13, 13, 0) 100%
    );
}

/* Fade from RIGHT side */
.character-page-background::after {
    right: 0;
    background: linear-gradient(270deg, 
        rgba(13, 13, 13, 1) 0%,
        rgba(13, 13, 13, 0.9) 20%,
        rgba(13, 13, 13, 0.6) 50%,
        rgba(13, 13, 13, 0) 100%
    );
}

/* Background selector */
.background-selector {
    margin: 1.5rem 0;
}

.background-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.background-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.bg-option {
    padding: 0.75rem;
    background: var(--bg-card);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.bg-option:hover {
    border-color: var(--accent-gold);
    transform: scale(1.05);
}

.bg-option.selected {
    border-color: var(--accent-gold);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 2px var(--accent-gold);
}

.bg-option img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.bg-option[data-bg="none"] {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 130px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ============================================
   MOBILE RESPONSIVE IMPROVEMENTS
   ============================================ */

/* Hamburger Menu Button - Hidden on desktop */
.hamburger-menu {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
    min-width: 44px;
    min-height: 44px;
}

/* Profile Page Styles */
.stat-card {
    position: relative;
    background: linear-gradient(165deg, #1e2128 0%, #12141a 50%, #0d0f14 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.06) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.stat-card:hover {
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4), 0 0 24px rgba(212, 175, 55, 0.08);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.stat-value {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.profile-picture-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.quick-link-card {
    position: relative;
    background: linear-gradient(165deg, #1e2128 0%, #12141a 50%, #0d0f14 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    padding: 1.75rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.quick-link-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 30%, rgba(212, 175, 55, 0.08) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.quick-link-card:hover {
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4), 0 0 24px rgba(212, 175, 55, 0.1);
}

.quick-link-card:hover::before {
    opacity: 1;
}

.quick-link-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
    transition: transform 0.3s ease;
}

.quick-link-card:hover .quick-link-icon {
    transform: scale(1.1);
}

.quick-link-title {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
    letter-spacing: 0.02em;
}

.quick-link-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ============================================
   FANTASY HORIZONTAL CHARACTER CARD (for Overview)
   ============================================ */

.fantasy-card-horizontal {
    position: relative;
    background: linear-gradient(165deg, #1e2128 0%, #12141a 50%, #0d0f14 100%);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.fantasy-card-horizontal::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 0% 50%, rgba(212, 175, 55, 0.06) 0%, transparent 50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.fantasy-card-horizontal:hover {
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4), 0 0 20px rgba(212, 175, 55, 0.08);
}

.fantasy-card-horizontal:hover::before {
    opacity: 1;
}

/* Reuse corner styles from vertical cards */
.fantasy-card-horizontal .card-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    pointer-events: none;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.fantasy-card-horizontal:hover .card-corner {
    opacity: 1;
}

.fantasy-card-horizontal .card-corner::before,
.fantasy-card-horizontal .card-corner::after {
    content: '';
    position: absolute;
    background: linear-gradient(90deg, #d4af37, transparent);
}

.fantasy-card-horizontal .card-corner::before { width: 16px; height: 2px; }
.fantasy-card-horizontal .card-corner::after { width: 2px; height: 16px; }

.fantasy-card-horizontal .card-corner.top-left { top: 4px; left: 4px; }
.fantasy-card-horizontal .card-corner.top-left::before { top: 0; left: 0; }
.fantasy-card-horizontal .card-corner.top-left::after { top: 0; left: 0; }

.fantasy-card-horizontal .card-corner.top-right { top: 4px; right: 4px; }
.fantasy-card-horizontal .card-corner.top-right::before { top: 0; right: 0; background: linear-gradient(270deg, #d4af37, transparent); }
.fantasy-card-horizontal .card-corner.top-right::after { top: 0; right: 0; }

.fantasy-card-horizontal .card-corner.bottom-left { bottom: 4px; left: 4px; }
.fantasy-card-horizontal .card-corner.bottom-left::before { bottom: 0; left: 0; }
.fantasy-card-horizontal .card-corner.bottom-left::after { bottom: 0; left: 0; background: linear-gradient(0deg, #d4af37, transparent); }

.fantasy-card-horizontal .card-corner.bottom-right { bottom: 4px; right: 4px; }
.fantasy-card-horizontal .card-corner.bottom-right::before { bottom: 0; right: 0; background: linear-gradient(270deg, #d4af37, transparent); }
.fantasy-card-horizontal .card-corner.bottom-right::after { bottom: 0; right: 0; background: linear-gradient(0deg, #d4af37, transparent); }

/* Portrait */
.fantasy-card-h-portrait {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(145deg, #2d3341, #1a1d24);
    padding: 3px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.fantasy-card-h-portrait::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: linear-gradient(145deg, #d4af37, #8b7335);
    z-index: -1;
}

.fantasy-card-h-portrait-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(145deg, #1a1d24, #12141a);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fantasy-card-h-portrait-inner img,
.fantasy-card-h-portrait-inner .race-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content */
.fantasy-card-h-content {
    flex: 1;
    min-width: 0;
}

.fantasy-card-h-header {
    margin-bottom: 0.625rem;
}

.fantasy-card-h-name {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    color: #f5f5f5;
    margin-bottom: 2px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.fantasy-card-h-title {
    font-size: 0.75rem;
    color: #d4af37;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Stats row */
.fantasy-card-h-stats {
    display: flex;
    gap: 1.5rem;
}

.fantasy-stat-h {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fantasy-stat-h-label {
    font-size: 0.625rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: 20px;
}

.fantasy-stat-h-bar {
    width: 50px;
    height: 4px;
    background: rgba(0,0,0,0.4);
    border-radius: 2px;
    overflow: hidden;
}

.fantasy-stat-h-value {
    font-size: 0.6875rem;
    font-weight: 600;
    min-width: 36px;
}

.fantasy-stat-h-value.kp { color: #ef4444; }
.fantasy-stat-h-value.vp { color: #a855f7; }

/* Footer */
.fantasy-card-h-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.fantasy-card-h-last {
    font-size: 0.625rem;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.fantasy-card-h-action {
    font-size: 0.8125rem;
    color: #6b7280;
    transition: color 0.25s ease;
}

.fantasy-card-horizontal:hover .fantasy-card-h-action {
    color: #d4af37;
}

/* ============================================
   FANTASY PARTY CARD (for Overview)
   ============================================ */

.fantasy-party-card {
    position: relative;
    background: linear-gradient(165deg, #1e2128 0%, #12141a 50%, #0d0f14 100%);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.fantasy-party-card .card-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    pointer-events: none;
    opacity: 0.5;
}

.fantasy-party-card .card-corner::before,
.fantasy-party-card .card-corner::after {
    content: '';
    position: absolute;
    background: linear-gradient(90deg, #d4af37, transparent);
}

.fantasy-party-card .card-corner::before { width: 20px; height: 2px; }
.fantasy-party-card .card-corner::after { width: 2px; height: 20px; }

.fantasy-party-card .card-corner.top-left { top: 6px; left: 6px; }
.fantasy-party-card .card-corner.top-left::before { top: 0; left: 0; }
.fantasy-party-card .card-corner.top-left::after { top: 0; left: 0; }

.fantasy-party-card .card-corner.top-right { top: 6px; right: 6px; }
.fantasy-party-card .card-corner.top-right::before { top: 0; right: 0; background: linear-gradient(270deg, #d4af37, transparent); }
.fantasy-party-card .card-corner.top-right::after { top: 0; right: 0; }

.fantasy-party-card .card-corner.bottom-left { bottom: 6px; left: 6px; }
.fantasy-party-card .card-corner.bottom-left::before { bottom: 0; left: 0; }
.fantasy-party-card .card-corner.bottom-left::after { bottom: 0; left: 0; background: linear-gradient(0deg, #d4af37, transparent); }

.fantasy-party-card .card-corner.bottom-right { bottom: 6px; right: 6px; }
.fantasy-party-card .card-corner.bottom-right::before { bottom: 0; right: 0; background: linear-gradient(270deg, #d4af37, transparent); }
.fantasy-party-card .card-corner.bottom-right::after { bottom: 0; right: 0; background: linear-gradient(0deg, #d4af37, transparent); }

.fantasy-party-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.fantasy-party-name {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #f5f5f5;
    margin: 0 0 4px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.fantasy-party-meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
}

.fantasy-next-session {
    background: linear-gradient(145deg, #2d3341, #1e2128);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    padding: 0.625rem 1rem;
    text-align: right;
}

.fantasy-next-session-label {
    font-size: 0.625rem;
    color: #d4af37;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.fantasy-next-session-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #f5f5f5;
}

.fantasy-party-members {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.fantasy-party-member {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 20px;
    padding: 0.375rem 0.75rem 0.375rem 0.375rem;
}

.fantasy-party-member-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(145deg, #2d3341, #1a1d24);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fantasy-party-member-avatar img,
.fantasy-party-member-avatar .race-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fantasy-party-member-name {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.fantasy-party-actions {
    display: flex;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

/* ============================================
   ENHANCED EMPTY STATE CARD
   ============================================ */

.empty-state-card {
    position: relative;
    background: linear-gradient(165deg, #1e2128 0%, #12141a 100%);
    border: 1px dashed rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
}

/* ============================================
   COMMUNITY FEED SECTION
   ============================================ */

.community-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.community-card {
    position: relative;
    background: linear-gradient(165deg, #1e2128 0%, #12141a 50%, #0d0f14 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.community-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.06) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.community-card:hover {
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4), 0 0 20px rgba(212, 175, 55, 0.08);
}

.community-card:hover::before {
    opacity: 1;
}

.community-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.875rem;
}

.community-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.1), rgba(139, 115, 53, 0.15));
    border: 1px solid rgba(212, 175, 55, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.community-card-icon img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.community-card-info {
    flex: 1;
    min-width: 0;
}

.community-card-type {
    font-size: 0.625rem;
    color: #d4af37;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.community-card-title {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    color: #f5f5f5;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.community-card-author {
    font-size: 0.75rem;
    color: #6b7280;
}

.community-card-author span {
    color: #a0a8b8;
}

.community-card-desc {
    font-size: 0.8125rem;
    color: #9ca3af;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.875rem;
}

.community-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.community-card-meta {
    font-size: 0.6875rem;
    color: #6b7280;
}

.community-card-action {
    font-size: 0.75rem;
    color: #6b7280;
    transition: color 0.25s ease;
}

.community-card:hover .community-card-action {
    color: #d4af37;
}

/* Community card type badges */
.community-card[data-type="adventure"] .community-card-icon {
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.15), rgba(139, 115, 53, 0.2));
}

.community-card[data-type="monster"] .community-card-icon {
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.1), rgba(185, 28, 28, 0.15));
    border-color: rgba(239, 68, 68, 0.3);
}

.community-card[data-type="item"] .community-card-icon {
    background: linear-gradient(145deg, rgba(168, 85, 247, 0.1), rgba(124, 58, 237, 0.15));
    border-color: rgba(168, 85, 247, 0.3);
}

.community-card[data-type="spell"] .community-card-icon {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.15));
    border-color: rgba(59, 130, 246, 0.3);
}

/* ============================================
   Featured Adventure Card
   ============================================ */

.featured-adventure-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.featured-adventure-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-gold);
}

.featured-cover {
    height: 250px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-elevated);
}

.featured-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-info h3 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.featured-subtitle {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.featured-author {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.featured-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.featured-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Community and Featured Sections */
.community-showcase,
.featured-adventure {
    padding: 4rem 0;
}

.community-showcase .container,
.featured-adventure .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .featured-adventure-card {
        grid-template-columns: 1fr;
    }
    
    .featured-cover {
        height: 180px;
    }
    
    .featured-info {
        padding: 1.5rem;
    }
    
    .featured-info h3 {
        font-size: 1.5rem;
    }
    
    .community-showcase,
    .featured-adventure {
        padding: 2rem 0;
    }
    
    .community-showcase .container,
    .featured-adventure .container {
        padding: 0 1rem;
    }
}

/* Mobile Navigation & Header - Max Width 768px */
@media (max-width: 768px) {
    /* Hamburger menu button - visible on mobile */
    .hamburger-menu {
        display: flex;
        align-items: center;
        justify-content: center;
        order: 2;
    }
    
    /* 1. Navigation Improvements */
    .header-content {
        padding: 0.75rem 1rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        position: relative;
    }
    
    .header-brand {
        order: 1;
        flex: 0 0 auto;
    }
    
    .nav-actions {
        order: 3;
        display: flex;
        gap: 0.5rem;
        flex: 0 0 auto;
    }
    
    .nav-actions button {
        flex: 0 1 auto;
        white-space: nowrap;
        font-size: 0.813rem;
        padding: 0.5rem 0.75rem;
    }
    
    .user-menu {
        order: 3;
        display: flex;
        gap: 0.5rem;
        flex: 0 0 auto;
        align-items: center;
    }
    
    .user-name {
        display: none; /* Hide username on mobile to save space */
    }
    
    /* Hide navigation by default on mobile */
    .header-sub {
        display: none;
        width: 100%;
    }
    
    /* Show navigation when expanded */
    .header-sub.mobile-nav-open {
        display: block;
    }
    
    .app-nav {
        flex-direction: column;
        width: 100%;
        padding: 0;
        gap: 0.25rem;
    }
    
    .nav-tab {
        width: 100%;
        text-align: left;
        padding: 1rem 1.5rem;
        border-bottom: none;
        border-left: 3px solid transparent;
    }
    
    .nav-tab.active {
        border-left-color: var(--brand-red);
        border-bottom-color: transparent;
        background: var(--bg-hover);
    }
    
    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        margin-top: 0;
        border-radius: 0;
    }
    
    /* 2. Touch Target Sizing - Minimum 44px */
    .btn,
    .btn-sm,
    .btn-xs,
    .btn-icon-sm {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
    
    .modal-close,
    .close-modal {
        min-width: 44px;
        min-height: 44px;
    }
    
    .carousel-nav,
    .carousel-dot {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Form inputs minimum height */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    textarea,
    select,
    .auth-form input,
    .creator-input,
    .inv-input,
    .skill-input,
    .attr-input,
    .currency-input {
        min-height: 44px;
        padding: 0.75rem;
    }
    
    /* 4. Grid and Layout Fixes */
    .character-cards {
        grid-template-columns: 1fr;
    }
    
    .characters-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .attrs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .attrs-roll-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sheet-body-grid {
        grid-template-columns: 1fr;
    }
    
    .currency-grid {
        grid-template-columns: 1fr;
    }
    
    .card-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .sessions-calendar {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    /* 5. Modal Improvements */
    .modal-content {
        max-width: 95%;
        width: 95%;
        margin: 1rem;
        padding: 1.5rem;
        max-height: 95vh;
    }
    
    .modal-large {
        max-width: 95%;
    }
    
    .modal-fullscreen .modal-content {
        max-width: 100%;
        width: 100%;
        margin: 0;
        border-radius: 0;
    }
    
    /* 6. Character Sheet Mobile Fixes */
    .sheet-header-full {
        flex-direction: column;
        gap: 1rem;
    }
    
    .sheet-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .sheet-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .hp-vp-progress-bar {
        min-height: 44px;
    }
    
    /* 7. Form and Input Improvements - Prevent zoom on iOS */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    /* 8. Character Creator Mobile Optimizations */
    .kin-grid, .profession-grid, .age-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .kin-card, .profession-card, .age-card {
        padding: 1rem;
    }
    
    .creator-progress {
        gap: 0.375rem;
        margin: 1rem 0;
    }
    
    .progress-dot {
        width: 10px;
        height: 10px;
    }
    
    .creator-nav {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .creator-nav .btn {
        width: 100%;
    }
    
    .icon-grid {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        gap: 0.75rem;
    }
    
    /* 9. Groups/Parties Mobile Optimizations */
    .group-select-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .party-card-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .party-members {
        flex-wrap: wrap;
    }
    
    .join-request-item {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .join-request-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .join-request-actions .btn {
        width: 100%;
    }
    
    /* 10. Overflow and Scroll Fixes */
    body {
        overflow-x: hidden;
    }
    
    .container {
        overflow-x: hidden;
    }
    
    .app-main {
        overflow-x: hidden;
    }
    
    /* 11. Carousel and Video Background */
    .carousel-controls {
        bottom: 4rem;
        gap: 0.5rem;
    }
    
    .bg-video-carousel {
        height: 100vh;
    }
    
    .carousel-indicators {
        bottom: 2rem;
    }
    
    /* Additional mobile fixes */
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-cta .btn {
        width: 100%;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .gold-frame-box {
        padding: 1.5rem;
    }
    
    .frame-tabs {
        flex-direction: column;
    }
    
    .frame-tab {
        width: 100%;
    }
}

/* Very Small Screens - Max Width 480px */
@media (max-width: 480px) {
    /* 3. Typography and Readability */
    .hero-title-main {
        font-size: 2rem;
    }
    
    .hero-title-sub {
        font-size: 1.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section-heading {
        font-size: 1.5rem;
    }
    
    .feature-card h3 {
        font-size: 1.125rem;
    }
    
    /* Further optimize grids for very small screens */
    .attrs-grid {
        grid-template-columns: 1fr;
    }
    
    .attrs-roll-grid {
        grid-template-columns: 1fr;
    }
    
    /* Reduce padding on small screens */
    .container {
        padding: 0 1rem;
    }
    
    .features {
        padding: 2rem 1rem;
    }
    
    .modal-content {
        padding: 1rem;
    }
    
    .feature-card {
        padding: 1rem;
    }
    
    /* Make buttons slightly smaller on very small screens */
    .btn-xl {
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
    }
    
    /* Optimize carousel for very small screens */
    .carousel-controls {
        bottom: 2rem;
    }
    
    .carousel-nav {
        min-width: 40px;
        min-height: 40px;
    }
}

/* Notification Center Styles */
.notification-bell {
    position: relative;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.2s;
}

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

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--red-hp);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.625rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-badge.hidden {
    display: none;
}

.notification-center {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
}

.notification-center.hidden {
    display: none;
}

.notification-panel {
    width: 400px;
    max-width: 100%;
    background: var(--bg-primary);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.notification-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-default);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.notification-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.close-notification {
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.close-notification:hover {
    color: var(--text-primary);
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.notification-item {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.notification-item:hover {
    border-color: var(--accent-gold);
    background: var(--bg-elevated);
}

.notification-item.unread {
    border-left: 3px solid var(--accent-gold);
    background: var(--bg-elevated);
}

.notification-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
}

.notification-item-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.notification-item-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.notification-item-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.notification-item-from {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.notification-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.notification-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .notification-panel {
        width: 100%;
    }
}

/* ============================================
   Global Search Styles
   ============================================ */

.global-search-container {
    position: relative;
    flex: 1;
    padding-top: 3px;
    max-width: 500px;
    margin: 0 1rem;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.global-search-input {
    width: 100%;
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: var(--font-body);
    transition: all 0.2s;
}

.global-search-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.global-search-input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    opacity: 0.5;
    pointer-events: none;
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
}

.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-default);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.search-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.search-category {
    padding: 0.5rem 0;
}

.search-category:not(:last-child) {
    border-bottom: 1px solid var(--border-default);
}

.search-category-title {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.15s;
}

.search-result-item:hover,
.search-result-item.selected {
    background: var(--bg-hover);
}

.search-result-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-arrow {
    font-size: 1.25rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-invite-btn {
    margin-left: auto;
    margin-right: 0.5rem;
}

/* Party Selection Modal */
.party-selection-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
}

.party-selection-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.party-selection-item:hover {
    border-color: var(--accent-gold);
    background: var(--bg-hover);
}

.party-selection-info {
    flex: 1;
}

.party-selection-name {
    font-size: 0.938rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.party-selection-meta {
    font-size: 0.813rem;
    color: var(--text-secondary);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .global-search-container {
        display: none; /* Hide on mobile, show in mobile menu instead */
    }
}

/* Public Character View */
.public-character-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-default);
}

.public-character-header h1 {
    font-family: var(--font-display);
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.public-character-cta h3 {
    font-family: var(--font-display);
    color: var(--accent-gold);
}

/* ============================================
   Character Sharing Styles
   ============================================ */

.share-url-container {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.share-url-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: var(--font-body);
}

.share-url-input:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.share-info {
    font-size: 0.875rem;
}

.share-info strong {
    color: var(--accent-gold);
}

.share-info ul li {
    margin-bottom: 0.25rem;
}

/* ============================================
   Homebrew Remix Credit
   ============================================ */

.remix-credit {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent-gold);
    font-size: 0.875rem;
}

.remix-credit a {
    color: var(--accent-gold);
    text-decoration: none;
}

.remix-credit a:hover {
    text-decoration: underline;
}

/* ============================================
   ADVENTURE SYSTEM STYLES
   ============================================ */

/* Adventure Grid & Cards */
.adventures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.adventure-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.adventure-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-gold);
}

.adventure-cover {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.adventure-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 1rem;
}

.adventure-info {
    padding: 1.5rem;
}

.adventure-info h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.adventure-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.adventure-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.meta-item {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.adventure-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tag {
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-gold);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.tag-large {
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-gold);
    padding: 0.5rem 1rem;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 500;
}

.adventure-author {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding-top: 1rem;
    border-top: 1px solid var(--border-default);
}

/* Adventure Tabs */
.adventure-tabs {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    border-bottom: 2px solid var(--border-default);
}

.adventure-tab {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.adventure-tab:hover {
    color: var(--text-primary);
}

.adventure-tab.active {
    color: var(--accent-gold);
    border-bottom-color: var(--accent-gold);
}

/* Adventure View */
.adventure-view {
    max-width: 1200px;
    margin: 0 auto;
}

.adventure-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-default);
}

.adventure-view-actions {
    display: flex;
    gap: 0.5rem;
}

.adventure-content {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 1rem;
}

.adventure-cover-section {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-default);
}

.adventure-cover-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.adventure-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.adventure-subtitle-large {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.adventure-metadata {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
}

.metadata-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.metadata-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metadata-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.adventure-tags-section {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.adventure-section {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-default);
}

.adventure-section:last-child {
    border-bottom: none;
}

.adventure-section h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.adventure-section h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem;
}

/* Fixa padding för Situationen-sektionen */
.situation-section,
.adventure-situation {
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.situation-section .formatted-content,
.adventure-situation .formatted-content {
    padding: 0;
    margin: 0;
}

.adventure-text {
    color: var(--text-primary);
    padding: 5px;
    padding-left: 12px;
    padding-right: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.badge-secondary {
    background: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
}

/* Adventure Editor */
.adventure-editor {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-default);
}

.editor-header h1 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
}

.editor-actions {
    display: flex;
    gap: 0.5rem;
}

.editor-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    flex: 1;
}

.editor-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 1rem;
    height: fit-content;
    position: sticky;
    top: 1rem;
}

.editor-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.editor-nav-item {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    text-align: left;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background 0.2s, color 0.2s;
    font-size: 0.9375rem;
}

.editor-nav-item:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--text-primary);
}

.editor-nav-item.active {
    background: rgba(212, 175, 55, 0.2);
    color: var(--accent-gold);
    font-weight: 600;
}

.editor-main {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.editor-section h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.places-list,
.npcs-list,
.enemies-list,
.items-list,
.handouts-list,
.events-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.place-card,
.npc-card,
.enemy-card,
.item-card,
.handout-card,
.event-table-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.place-card h3,
.npc-card h3,
.enemy-card h3,
.item-card h3,
.handout-card h3,
.event-table-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.place-card p,
.npc-card p,
.enemy-card p,
.item-card p,
.handout-card p,
.event-table-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-default);
}

/* Drag and drop styles for place cards */
.place-card[draggable="true"] {
    cursor: grab;
}

.place-card[draggable="true"]:active {
    cursor: grabbing;
}

.place-card.dragging {
    opacity: 0.5;
    border: 2px dashed var(--accent-gold);
}

/* Responsive adjustments for editor */
@media (max-width: 768px) {
    .editor-layout {
        grid-template-columns: 1fr;
    }
    
    .editor-sidebar {
        position: static;
    }
    
    .editor-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .editor-nav-item {
        flex: 1;
        min-width: 120px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .places-list,
    .npcs-list,
    .enemies-list,
    .items-list,
    .handouts-list,
    .events-list {
        grid-template-columns: 1fr;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .adventures-grid {
        grid-template-columns: 1fr;
    }
    
    .adventure-title {
        font-size: 2rem;
    }
    
    .adventure-view-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .adventure-view-actions {
        flex-direction: column;
    }
    
    .adventure-metadata {
        grid-template-columns: 1fr;
    }
}

/* ==================== Image Uploader Styles ==================== */
.image-uploader {
    margin-bottom: 1.5rem;
}

.image-uploader-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.image-preview {
    position: relative;
    width: 100%;
    max-width: 400px;
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.image-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.image-remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--error) !important;
    color: white !important;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
}

.image-remove-btn:hover {
    opacity: 0.9;
}

.image-upload-placeholder {
    padding: 3rem 2rem;
    border: 2px dashed var(--border);
    border-radius: 8px;
    text-align: center;
    color: var(--text-secondary);
    background: var(--bg-secondary);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.image-upload-placeholder p {
    margin: 0.5rem 0;
    font-weight: 500;
}

.image-upload-placeholder small {
    color: var(--text-muted);
}

/* ==================== Adventure View Grids ==================== */
.npcs-grid,
.enemies-grid,
.items-grid,
.handouts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.npc-card,
.enemy-card,
.item-card,
/* Handout-kort - samma stil som andra entity-kort */
.handout-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.handout-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-gold, #d4af37);
}

.handout-card.clickable {
    cursor: pointer;
}

.event-table-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    margin: 5px;
}

.handout-card-content {
    padding: 1rem;
}

.npc-portrait,
.enemy-image,
.item-image,
.handout-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0;
    margin-bottom: 0;
}

.handout-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.npc-portrait-placeholder,
.enemy-image-placeholder,
.item-image-placeholder,
.handout-image-placeholder {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: var(--bg-tertiary);
    border-radius: 0;
    margin-bottom: 0;
}

.npc-card h4,
.enemy-card h4,
.item-card h4,
.handout-card h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-family: 'Cinzel', serif;
}

.npc-role,
.enemy-size,
.item-value,
.handout-type {
    color: var(--accent-gold, #d4af37);
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.handout-preview {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.npc-appearance,
.item-description,
.handout-preview {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0.5rem 0;
}

.enemy-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.place-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.place-section h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
}

.place-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.place-description {
    margin: 1rem 0;
    line-height: 1.6;
    color: var(--text-primary);
}

.place-map {
    margin-top: 2rem;
}

.place-map img {
    width: 100%;
    max-width: 1000px;
    height: auto;
    border: 2px solid var(--border);
    border-radius: 8px;
}

/* ==================== GM and Player View Modes ==================== */
.gm-mode .gm-compact {
    max-width: 1400px;
    margin: 0 auto;
}

.gm-quick-info {
    background: var(--bg-secondary);
    border: 2px solid var(--gold);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.gm-quick-info h3 {
    margin-top: 0;
    color: var(--gold);
}

.gm-quick-info p {
    margin: 0.5rem 0;
}

.gm-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.gm-section.collapsed .section-content {
    display: none;
}

.gm-section.collapsed .section-toggle::before {
    content: '▶ ';
}

.gm-section:not(.collapsed) .section-toggle::before {
    content: '▼ ';
}

.section-toggle {
    margin: 0;
    padding: 1rem;
    cursor: pointer;
    user-select: none;
    background: var(--bg-tertiary);
}

.section-toggle:hover {
    background: var(--bg-secondary);
}

.section-content {
    padding: 1rem;
}

.player-mode .player-info {
    text-align: center;
    padding: 2rem;
}

.player-mode .player-notice {
    text-align: left;
}

.player-mode h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.player-mode .subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.btn.active {
    background: var(--gold);
    color: black;
}

/* ============================================
   ADVENTURE PREVIEW - DESIGN TOOLS
   ============================================ */

/* Design Panel */
.preview-design-panel {
    width: 280px;
    background: #16213e;
    border-right: 1px solid #2a2a4a;
    padding: 20px;
    overflow-y: auto;
}

.preview-design-panel h3 {
    margin-top: 0;
    color: #e0e0e0;
    font-family: 'Cinzel', serif;
    padding-bottom: 12px;
    border-bottom: 1px solid #2a2a4a;
}

.design-section {
    margin-bottom: 24px;
}

.design-section h4 {
    color: #a0a0a0;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.design-section label {
    display: block;
    color: #c0c0c0;
    font-size: 0.85rem;
    margin-bottom: 8px;
    cursor: pointer;
}

.design-section input[type="radio"],
.design-section input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #e94560;
}

.design-section select {
    width: 100%;
    background: #1a1a2e;
    border: 1px solid #2a2a4a;
    color: #e0e0e0;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Tema-knappar */
.theme-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.theme-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: #1a1a2e;
    border: 2px solid #2a2a4a;
    border-radius: 8px;
    color: #a0a0a0;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-btn:hover {
    border-color: #3a3a5a;
}

.theme-btn.active {
    border-color: #e94560;
    color: #e0e0e0;
}

.theme-preview {
    width: 40px;
    height: 56px;
    border-radius: 4px;
    border: 1px solid #3a3a5a;
}

.theme-preview.parchment {
    background: url('../charbgs/a4Paper_01.png') center/cover;
}

.theme-preview.classic {
    background: #fff;
}

.theme-preview.modern {
    background: linear-gradient(#fafafa, #f0f0f0);
}

.theme-preview.dark {
    background: #1a1a1f;
}

/* A4 Preview Container */
.preview-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    background: var(--fantasy-bg-dark) !important;
    overflow-y: auto;
}

.preview-navigation {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    color: #a0a0a0;
}

/* A4 dimensioner: 210mm × 297mm, skalat för skärm */
.a4-preview {
    width: 595px;  /* A4 vid 72 DPI */
    min-height: 842px;
    max-height: 842px; /* Prevent overflow beyond A4 height */
    background-image: url('../charbgs/a4Paper_01.png');
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    padding: 48px;
    box-sizing: border-box;
    overflow-y: auto; /* Allow scrolling if content is too long */
}

/* Tema-varianter */
.a4-preview.theme-parchment {
    background-image: url('../charbgs/a4Paper_01.png');
    color: #2c1810;
}

.a4-preview.theme-classic {
    background: #fff;
    color: #333;
}

.a4-preview.theme-modern {
    background: #fafafa;
    color: #222;
}

.a4-preview.theme-dark {
    background: var(--fantasy-bg-dark) !important;
    color: var(--fantasy-text) !important;
    border: 1px solid var(--border-color);
}

/* Innehåll i A4 */
.a4-content {
    font-family: var(--font-body, 'Inter'), sans-serif;
}

.a4-content h1 {
    font-family: var(--font-headings, 'Cinzel'), serif;
    font-size: 28px;
    text-align: center;
    margin-bottom: 8px;
    border-bottom: 2px solid currentColor;
    padding-bottom: 8px;
}

.a4-content h2 {
    font-family: var(--font-headings, 'Cinzel'), serif;
    font-size: 18px;
    margin-top: 24px;
    margin-bottom: 8px;
}

.a4-content h3 {
    font-family: var(--font-headings, 'Cinzel'), serif;
    font-size: 14px;
    margin-top: 16px;
    margin-bottom: 4px;
}

.a4-content h4 {
    font-family: var(--font-headings, 'Cinzel'), serif;
    font-size: 12px;
    margin-top: 8px;
    margin-bottom: 4px;
}

.a4-content p {
    font-size: 11px;
    line-height: 1.6;
    margin-bottom: 8px;
}

/* Plats-kort i A4 */
.a4-place-card {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 16px;
}

.a4-place-card h3 {
    margin-top: 0;
}

/* NPC-kort i A4 */
.a4-npc-card {
    display: flex;
    gap: 12px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
    margin-bottom: 8px;
}

.a4-npc-portrait {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    object-fit: cover;
}

.a4-npc-info h4 {
    margin: 0 0 4px 0;
    font-size: 12px;
}

.a4-npc-info p {
    margin: 0;
    font-size: 10px;
    color: #555;
}

/* Fiende-varning */
.a4-enemy-warning {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid #ef4444;
    padding: 8px 12px;
    margin-bottom: 8px;
}

/* Föremål-lista */
.a4-item-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.a4-item-list li {
    padding: 4px 0;
    font-size: 11px;
    border-bottom: 1px dotted rgba(0, 0, 0, 0.1);
}

/* Rum */
.a4-room {
    margin-bottom: 12px;
}

.a4-room h4 {
    margin-bottom: 4px;
}

/* Sidnummer */
.a4-page-number {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #666;
}

/* Två-kolumn layout */
.a4-preview.layout-two-column .a4-content {
    column-count: 2;
    column-gap: 24px;
}

/* Magazine layout */
.a4-preview.layout-magazine .a4-content {
    column-count: 2;
    column-gap: 20px;
}

.a4-preview.layout-magazine h2 {
    column-span: all;
}

/* Title page */
.title-page {
    text-align: center;
    padding-top: 100px;
}

.title-page .subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 40px;
}

.title-page .introduction {
    text-align: left;
    margin-top: 60px;
}

/* Preview actions */
.preview-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

.preview-actions .btn {
    flex: 1;
}

/* Print styles */
@media print {
    .a4-preview {
        width: 210mm;
        min-height: 297mm;
        box-shadow: none;
        margin: 0;
        padding: 15mm;
    }
    
    .preview-navigation,
    .preview-actions,
    .preview-design-panel {
        display: none !important;
    }
    
    /* Page break styles */
    .pdf-page-container {
        page-break-after: always;
        page-break-inside: avoid;
    }
    
    .pdf-page-container:last-child {
        page-break-after: auto;
    }
}

/* ========================================
   PDF PAGE BREAK STYLES
   ======================================== */

/* Förhindra att element delas över sidor */
.pdf-section,
.pdf-page-container {
    page-break-inside: avoid;
    break-inside: avoid;
}

/* Tvinga sidbrytning före stora sektioner */
.pdf-chapter,
.pdf-page-container {
    page-break-before: always;
    break-before: page;
}

.pdf-page-container:first-child {
    page-break-before: auto;
    break-before: auto;
}

/* Håll ihop rubriker med efterföljande innehåll */
h2, h3, h4,
.dod-section-title,
.dod-title-banner {
    page-break-after: avoid;
    break-after: avoid;
}

/* Bilder ska inte delas */
.pdf-image,
img,
.cover-image,
.place-image,
.npc-portrait {
    page-break-inside: avoid;
    break-inside: avoid;
    max-height: 80vh;
    object-fit: contain;
}

/* DoD-specifika element */
.dod-stat-block,
.dod-info-box,
.dod-gm-only-box,
.monster-stat-box,
.npc-card,
.item-box {
    page-break-inside: avoid;
    break-inside: avoid;
}

/* Tabeller ska inte delas */
table,
.table-wrapper,
.random-event-table {
    page-break-inside: avoid;
    break-inside: avoid;
}

/* ========================================
   DoD-STIL PDF LAYOUT
   ======================================== */

/* Två-kolumn layout som standard */
.a4-preview.layout-two-column .a4-content {
    column-count: 2;
    column-gap: 20px;
    text-align: justify;
}

/* Dekorativ rubrik-banner */
.dod-title-banner {
    background: linear-gradient(135deg, #2d4a3e 0%, #1a2f26 100%);
    color: #f0d875;
    text-align: center;
    padding: 16px 24px;
    margin: 0 -48px 24px -48px;
    font-family: 'Cinzel', serif;
    font-size: 28px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-top: 3px solid #d4af37;
    border-bottom: 3px solid #d4af37;
    position: relative;
}

.dod-title-banner::before,
.dod-title-banner::after {
    content: '✦';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #f0d875;
}

.dod-title-banner::before { left: 20px; }
.dod-title-banner::after { right: 20px; }

/* Sektion-rubrik */
.dod-section-title {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    color: #2d4a3e;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid #2d4a3e;
    padding-bottom: 8px;
    margin-top: 24px;
    margin-bottom: 16px;
}

/* PDF Table of Contents */
.pdf-toc-page {
    padding: 40px 20px;
}

.toc-title {
    font-family: 'Cinzel', serif;
    font-size: 28px;
    text-align: center;
    margin-bottom: 30px;
    color: #2c1810;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.pdf-toc-page .toc-list {
    margin: 0;
    padding: 0;
}

.toc-item {
    display: flex;
    align-items: baseline;
    margin: 8px 0;
    font-size: 14px;
}

.toc-item-title {
    white-space: nowrap;
}

.toc-dots {
    flex: 1;
    border-bottom: 1px dotted #666;
    margin: 0 8px;
    min-width: 20px;
}

.toc-page {
    white-space: nowrap;
    font-weight: bold;
}

.toc-indent-1 {
    padding-left: 20px;
    font-size: 12px;
}

.toc-section {
    font-weight: bold;
    margin-top: 16px;
    font-size: 16px;
    color: #2d4a3e;
}

.toc-section .toc-item-title {
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* "Enbart för SL"-ruta */
.dod-gm-only-box {
    background: #f5f0e6;
    border: 2px solid #2d4a3e;
    border-radius: 0;
    padding: 16px;
    margin: 16px 0;
    break-inside: avoid;
}

.dod-gm-only-box .box-title {
    background: #2d4a3e;
    color: #d4af37;
    font-family: 'Cinzel', serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 12px;
    margin: -16px -16px 12px -16px;
    text-align: center;
}

.dod-gm-only-box p {
    font-style: italic;
    margin: 0;
    font-size: 10px;
    line-height: 1.5;
}

/* Info-ruta (Karta & Platser, etc.) */
.dod-info-box {
    background: #f5f0e6;
    border: 1px solid #8b7355;
    padding: 12px;
    margin: 12px 0;
    break-inside: avoid;
}

.dod-info-box .box-title {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    color: #2d4a3e;
    margin-bottom: 8px;
    text-align: center;
    border-bottom: 1px solid #8b7355;
    padding-bottom: 6px;
}

/* Slumphändelse-tabell */
.dod-random-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9px;
    margin: 12px 0;
    break-inside: avoid;
}

.dod-random-table th {
    background: #2d4a3e;
    color: #d4af37;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    padding: 8px;
    text-align: left;
}

.dod-random-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #ccc;
    vertical-align: top;
}

.dod-random-table td:first-child {
    font-weight: bold;
    width: 30px;
    text-align: center;
}

/* Plats-sektion */
.dod-place {
    margin-bottom: 20px;
    break-inside: avoid;
}

.dod-place-title {
    font-family: 'Cinzel', serif;
    font-size: 13px;
    font-weight: bold;
    color: #2d4a3e;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.dod-place-description {
    font-size: 10px;
    line-height: 1.5;
    margin-bottom: 8px;
}

/* Punktlista med ✦ */
.dod-detail-list {
    list-style: none;
    padding: 0;
    margin: 8px 0;
}

.dod-detail-list li {
    font-size: 10px;
    line-height: 1.5;
    margin-bottom: 6px;
    padding-left: 16px;
    position: relative;
}

.dod-detail-list li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: #8b7355;
}

.dod-detail-list li strong {
    color: #2d4a3e;
}

/* Monster/Fiende-kort */
.dod-monster-card {
    break-inside: avoid;
    margin: 16px 0;
    border: 2px solid #2d4a3e;
    background: #faf8f3;
}

.dod-monster-header {
    background: linear-gradient(135deg, #2d4a3e 0%, #1a2f26 100%);
    color: #d4af37;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    text-transform: uppercase;
    text-align: center;
    padding: 10px;
    letter-spacing: 2px;
}

.dod-monster-image {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    background: #e8e4dc;
}

.dod-monster-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 10px;
    font-size: 9px;
    border-bottom: 1px solid #ccc;
}

.dod-monster-stats .stat {
    display: flex;
    justify-content: space-between;
}

.dod-monster-stats .stat-label {
    font-weight: bold;
    color: #2d4a3e;
}

.dod-monster-description {
    padding: 10px;
    font-size: 10px;
    line-height: 1.5;
    font-style: italic;
    border-bottom: 1px solid #ccc;
}

/* Monster-attacker tabell */
.dod-attack-table {
    width: 100%;
    font-size: 9px;
}

.dod-attack-table th {
    background: #e8e4dc;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    padding: 6px;
    text-align: center;
    font-size: 10px;
    color: #2d4a3e;
}

.dod-attack-table td {
    padding: 6px;
    border-bottom: 1px solid #ddd;
    vertical-align: top;
}

.dod-attack-table td:first-child {
    font-weight: bold;
    text-align: center;
    width: 25px;
}

.dod-attack-table .attack-name {
    font-weight: bold;
    color: #2d4a3e;
}

/* NPC-kort */
.dod-npc-card {
    break-inside: avoid;
    margin: 12px 0;
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #faf8f3;
    border: 1px solid #8b7355;
}

.dod-npc-portrait {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border: 2px solid #2d4a3e;
}

.dod-npc-info {
    flex: 1;
}

.dod-npc-name {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    font-weight: bold;
    color: #2d4a3e;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.dod-npc-role {
    font-size: 10px;
    color: #666;
    margin-bottom: 8px;
}

.dod-npc-description {
    font-size: 10px;
    line-height: 1.5;
}

/* Footer */
.dod-page-footer {
    position: absolute;
    bottom: 20px;
    left: 48px;
    right: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    font-family: 'Cinzel', serif;
    font-size: 9px;
    color: #2d4a3e;
}

.dod-page-footer .chapter-name {
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dod-page-footer .page-number {
    background: #2d4a3e;
    color: #d4af37;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Ornament-dekorationer */
.dod-ornament {
    text-align: center;
    color: #8b7355;
    font-size: 18px;
    margin: 16px 0;
    letter-spacing: 8px;
}

.dod-ornament::before {
    content: '— ✦ ';
}

.dod-ornament::after {
    content: ' ✦ —';
}

/* Preview layout */
.preview-layout {
    display: flex;
    height: calc(100vh - 200px);
    min-height: 600px;
}

.btn-icon {
    padding: 0.5rem 1rem;
    font-size: 1.2rem;
}

/* ========================================
   HANDOUT STYLES - Enhanced flexibility
   ======================================== */

/* Base handout preview styles */
.handout-preview {
    padding: 20px;
    border-radius: 4px;
    margin: 10px 0;
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
}

/* Parchment style */
.handout-preview.parchment {
    background: linear-gradient(to bottom, #f5e6c8, #e8d5a9);
    border: 1px solid #c9a959;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
    color: #3d2817;
}

/* Modern style */
.handout-preview.modern {
    background: var(--bg-elevated);
    border: 2px solid var(--accent-gold);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Burned/damaged style */
.handout-preview.burned {
    background: linear-gradient(to bottom, #d4c4a8, #a89070);
    border: 2px solid #654321;
    position: relative;
    color: #2d1810;
}

.handout-preview.burned::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0,0,0,0.05) 10px,
        rgba(0,0,0,0.05) 20px
    );
    opacity: 0.3;
    pointer-events: none;
    border-radius: 4px;
}

/* Elegant style */
.handout-preview.elegant {
    background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%);
    border: 1px solid #d4af37;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    color: #1a1a1a;
}

/* Rustic style */
.handout-preview.rustic {
    background: #8b7355;
    background-image: linear-gradient(90deg, rgba(139,115,85,0.1) 1px, transparent 1px),
                      linear-gradient(rgba(139,115,85,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    border: 3px solid #5d4e37;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
    color: #f5f5dc;
}

/* Font styles */
.handout-preview .handwritten {
    font-family: 'Caveat', 'Comic Sans MS', cursive;
    font-size: 18px;
    line-height: 1.8;
}

.handout-preview .serif {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 16px;
    line-height: 1.7;
}

.handout-preview .sans {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

.handout-preview .runic {
    font-family: 'Norse', 'Old English Text MT', fantasy;
    font-size: 17px;
    letter-spacing: 2px;
    line-height: 1.8;
}

/* Handout content */
.handout-preview .handout-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: center;
}

.handout-preview .handout-content {
    margin: 1rem 0;
    white-space: pre-wrap;
}

.handout-preview .handout-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: 4px;
}

/* GM-only indicator */
.handout-preview .gm-only-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-gold);
    color: var(--bg-primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

/* ================================
   FANTASY THEME - ADVENTURE SECTION
   ================================ */

/* Fantasy color palette - LOW SATURATION DARK THEME */
:root {
    /* Mörkt tema - LÅG SATURATION (ingen lila!) */
    --fantasy-bg-dark: #1a1a1f;        /* Nästan svart, minimal färg */
    --fantasy-bg-darker: #141417;      /* Mörkaste */
    --fantasy-bg-card: #2a2a30;        /* Kortbakgrund */
    --fantasy-gold: #c9a227;           /* Guld-accent (behålls) */
    --fantasy-gold-dim: #a08020;       /* Dämpad guld */
    --fantasy-gold-bright: #e8c040;    /* Ljus guld */
    --fantasy-text: #f0f0f0;           /* Ljus text - primär */
    --fantasy-text-dim: #b0b0b0;       /* Sekundär text */
    --fantasy-border: rgba(58, 58, 66, 1);  /* Mörk border utan guld-tint */
    --fantasy-border-gold: rgba(201, 162, 39, 0.3);
    
    /* Extra variabler för konsistens */
    --bg-hover: #35353d;               /* Hover-state */
    --bg-secondary: #242428;           /* Mörkgrå */
    --text-muted: #808080;             /* Dämpad text */
    --border-color: #3a3a42;
}

/* Huvudcontainer för äventyrssektionen */
.adventure-section,
.adventure-editor,
.adventure-list,
.adventure-view,
.adventures-grid {
    background: var(--fantasy-bg-dark);
    color: var(--fantasy-text);
}

/* Rubriker - fantasy-stil med kapitäler */
.adventure-section h1,
.adventure-section h2,
.adventure-section h3,
.adventure-title,
.adventure-editor h1,
.adventure-editor h2,
.adventure-editor h3 {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-variant: small-caps;
    letter-spacing: 0.1em;
    font-size: 1.5rem;
    padding-left: 12px;
    color: var(--fantasy-gold);
}

/* Kort/Cards - med mörk bakgrund och tydlig border */
.adventure-card,
.entity-card,
.place-card,
.npc-card,
.enemy-card,
.item-card {
    background: var(--fantasy-bg-card) !important;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    color: var(--fantasy-text) !important;
}

.adventure-card:hover,
.entity-card:hover,
.npc-card:hover,
.enemy-card:hover,
.item-card:hover {
    border-color: var(--fantasy-gold);
    box-shadow: 0 0 20px rgba(201, 162, 39, 0.2);
    cursor: pointer;
    background: var(--bg-hover) !important;
}

/* Guldram med hörn - för viktiga sektioner */
.fantasy-frame {
    position: relative;
    border: 2px solid var(--fantasy-gold);
    padding: 30px;
    background: var(--fantasy-bg-darker);
}

.fantasy-frame::before,
.fantasy-frame::after {
    content: '✦';
    position: absolute;
    color: var(--fantasy-gold);
    font-size: 12px;
}

.fantasy-frame::before {
    top: -6px;
    left: 10px;
}

.fantasy-frame::after {
    top: -6px;
    right: 10px;
}

/* Header med guldlinje */
.adventure-header,
.editor-header,
.adventure-view-header {
    border-bottom: 2px solid var(--fantasy-gold);
    padding: 30px;
    position: relative;
}

.adventure-header::before,
.adventure-header::after {
    content: '◆';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--fantasy-gold);
}

.adventure-header::before { left: 20px; }
.adventure-header::after { right: 20px; }

/* Knappar - fantasy-stil */
.btn-fantasy {
    background: transparent;
    border: 1px solid var(--fantasy-gold);
    color: var(--fantasy-gold);
    font-family: 'Cinzel', serif;
    font-variant: small-caps;
    letter-spacing: 0.05em;
    padding: 10px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-fantasy:hover {
    background: var(--fantasy-gold);
    color: var(--fantasy-bg-dark);
}

.btn-fantasy-primary {
    background: var(--fantasy-gold);
    color: var(--fantasy-bg-dark);
}

.btn-fantasy-primary:hover {
    background: var(--fantasy-gold-bright);
    box-shadow: 0 0 15px rgba(201, 162, 39, 0.4);
}

/* Form inputs - fantasy-stil */
.fantasy-input,
.adventure-section .form-input,
.adventure-editor .form-input {
    background: var(--fantasy-bg-darker);
    border: 1px solid var(--fantasy-border);
    color: var(--fantasy-text);
    padding: 12px 16px;
    border-radius: 4px;
}

.fantasy-input:focus,
.adventure-section .form-input:focus,
.adventure-editor .form-input:focus {
    border-color: var(--fantasy-gold);
    outline: none;
    box-shadow: 0 0 10px rgba(201, 162, 39, 0.2);
}

/* Tabs/Navigation */
.adventure-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--fantasy-border);
    background: var(--fantasy-bg-darker);
}

.adventure-tab {
    background: transparent;
    border: none;
    color: var(--fantasy-text-dim);
    padding: 15px 25px;
    font-family: 'Cinzel', serif;
    font-variant: small-caps;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.adventure-tab:hover {
    color: var(--fantasy-gold);
    background: rgba(201, 162, 39, 0.1);
}

.adventure-tab.active {
    color: var(--fantasy-gold);
}

.adventure-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--fantasy-gold);
}

/* Sektioner med dekorativa linjer */
.adventure-section-divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
}

.adventure-section-divider::before,
.adventure-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--fantasy-gold), transparent);
}

.adventure-section-divider span {
    padding: 0 20px;
    color: var(--fantasy-gold);
    font-family: 'Cinzel', serif;
}

/* Sidebar/Navigation för editor */
.adventure-sidebar,
.editor-sidebar {
    background: var(--fantasy-bg-darker);
    border-right: 1px solid var(--fantasy-border);
}

.sidebar-item,
.editor-nav-item {
    padding: 12px 20px;
    color: var(--fantasy-text-dim);
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    background: transparent;
    border-top: none;
    border-right: none;
    border-bottom: none;
}

.sidebar-item:hover,
.editor-nav-item:hover {
    background: rgba(201, 162, 39, 0.1);
    color: var(--fantasy-text);
}

.sidebar-item.active,
.editor-nav-item.active {
    border-left-color: var(--fantasy-gold);
    color: var(--fantasy-gold);
    background: rgba(201, 162, 39, 0.1);
}

/* Modaler - fantasy-stil */
.modal.fantasy-modal .modal-content {
    background: var(--fantasy-bg-dark);
    border: 2px solid var(--fantasy-gold);
}

.modal.fantasy-modal .modal-header {
    border-bottom: 1px solid var(--fantasy-border);
}

.modal.fantasy-modal .modal-header h2 {
    font-family: 'Cinzel', serif;
    color: var(--fantasy-gold);
}

/* Pergament-bakgrund för vissa element */
.parchment-bg {
    background: 
        linear-gradient(to bottom, 
            rgba(245, 230, 200, 0.05), 
            rgba(232, 213, 169, 0.05)
        ),
        var(--fantasy-bg-dark);
}

/* Monster/Enemy kort - DoD-stil */
.monster-card {
    background: var(--fantasy-bg-darker);
    border: 2px solid var(--fantasy-gold-dim);
    border-radius: 0;
    position: relative;
    padding: 20px;
}

.monster-card::before {
    content: '⚔';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--fantasy-bg-dark);
    padding: 0 10px;
    color: var(--fantasy-gold);
}

.monster-card .monster-name {
    font-family: 'Cinzel', serif;
    font-size: 1.3em;
    text-align: center;
    margin-bottom: 15px;
    color: var(--fantasy-gold);
}

.monster-card .stats-row {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid var(--fantasy-border);
    border-bottom: 1px solid var(--fantasy-border);
}

.monster-card .stat {
    text-align: center;
}

.monster-card .stat-value {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--fantasy-gold);
}

.monster-card .stat-label {
    font-size: 0.8em;
    color: var(--fantasy-text-dim);
    text-transform: uppercase;
}

/* Adventure content styling */
.adventure-content {
    background: var(--fantasy-bg-card);
    border: 1px solid var(--fantasy-border);
}

.adventure-section {
    border-bottom-color: var(--fantasy-border);
}

/* Empty state with fantasy styling */
.empty-state-card {
    background: var(--fantasy-bg-darker);
    border: 1px solid var(--fantasy-border);
}

/* Section header bar */
.section-header-bar {
    background: #14141700;
    border-bottom: 1px solid var(--fantasy-border);
}

/* Adventure metadata */
.adventure-metadata .metadata-label {
    color: var(--fantasy-gold);
    font-family: 'Cinzel', serif;
    font-variant: small-caps;
}

/* Tags */
.adventure-tags-section .tag-large {
    background: var(--fantasy-gold);
    color: var(--fantasy-bg-dark);
}

/* Cover section */
.adventure-cover-section {
    background: var(--fantasy-bg-darker);
    border: 1px solid var(--fantasy-border);
    padding: 2rem;
    border-radius: 8px;
}

/* Entity details modal */
.entity-details {
    background: var(--fantasy-bg-darker);
    padding: 24px;
    border-radius: 8px;
    max-width: 600px;
}

/* Fixa entity-modal storlek */
.entity-modal .modal-content,
/* Entity modal - anpassad storlek */
.modal-content.entity-details-modal,
.entity-modal .modal-content {
    max-width: 550px;
    width: fit-content;
    min-width: 350px;
    padding: 0;
    overflow: hidden;
}

.entity-details-modal .modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-default, #2a2a4a);
}

.entity-details-modal .modal-body {
    padding: 0;
    max-height: 70vh;
    overflow-y: auto;
}

.entity-details {
    padding: 1.5rem;
    max-height: none;
    overflow: visible;
}

.entity-details .detail-image {
    max-width: 100%;
    max-height: 350px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto 1rem;
    border-radius: 8px;
}

.entity-details p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.entity-details p strong {
    color: var(--fantasy-gold, #d4af37);
    min-width: 100px;
    display: inline-block;
}

/* Ta bort extra padding/margin som skapar onödigt utrymme */
.entity-details > *:first-child {
    margin-top: 0;
}

.entity-details > *:last-child {
    margin-bottom: 0;
}

.entity-details h4 {
    font-family: 'Cinzel', serif;
    color: var(--fantasy-gold);
    font-variant: small-caps;
    letter-spacing: 0.1em;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--fantasy-border);
}

.entity-details ul {
    margin: 0;
    padding-left: 1.25rem;
}

.entity-details ul li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.entity-details ul li::marker {
    color: var(--fantasy-gold);
}

.entity-details .detail-image {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto 1rem;
    display: block;
    border: 2px solid var(--fantasy-border);
    border-radius: 8px;
}

/* Ta bort onödig scrollbar om innehållet är litet */
.entity-details-modal .modal-body::-webkit-scrollbar {
    width: 6px;
}

.entity-details-modal .modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.entity-details-modal .modal-body::-webkit-scrollbar-thumb {
    background: var(--border-default, #2a2a4a);
    border-radius: 3px;
}

/* Modal footer för entity modals */
.entity-details-modal .modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-default, #2a2a4a);
    display: flex;
    justify-content: flex-end;
}

/* Notes styling for places and rooms */
.place-notes, .room-notes {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent-gold);
    border-radius: 4px;
}

.place-notes strong, .room-notes strong {
    color: var(--accent-gold);
}

.place-notes span, .room-notes span {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Stats grid for enemies */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin: 1rem 0;
}

.stats-grid .stat {
    background: var(--fantasy-bg-card);
    border: 1px solid var(--fantasy-border);
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

/* Weapons table */
.weapons-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.weapons-table th {
    background: var(--fantasy-gold);
    color: var(--fantasy-bg-dark);
    padding: 8px;
    text-align: left;
    font-family: 'Cinzel', serif;
    font-variant: small-caps;
}

.weapons-table td {
    padding: 8px;
    border-bottom: 1px solid var(--fantasy-border);
}

/* Clickable cards hint */
.click-hint {
    display: none;
    font-size: 0.75rem;
    color: var(--fantasy-gold);
    font-style: italic;
    margin-top: 8px;
}

.entity-card:hover .click-hint,
.npc-card:hover .click-hint,
.enemy-card:hover .click-hint,
.item-card:hover .click-hint {
    display: block;
}

/* Klickbara fiende-kort */
.enemy-card.clickable {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.enemy-card.clickable:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: var(--fantasy-gold-dim, #8b7355);
}

/* ==================== INNEHÅLLSFÖRTECKNING - REN STYLING ==================== */

/* Innehållsförteckning - Ren styling */
.toc-container {
    background: var(--bg-secondary, #1a1a2e);
    border: 1px solid var(--border-default, #2a2a4a);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.toc-title {
    font-family: 'Cinzel', serif;
    color: var(--fantasy-gold, #d4af37);
    font-size: 1.1rem;
    margin: 0 0 1rem 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toc-title:hover {
    color: var(--fantasy-gold-bright, #f0d875);
}

.toc-toggle-icon {
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.toc-content {
    /* Synlig by default - ingen display: none */
}

.toc-section {
    margin-bottom: 1rem;
}

.toc-section-title {
    font-family: 'Cinzel', serif;
    color: var(--text-primary, #f0f0f5);
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.toc-section-title a {
    color: var(--text-primary, #f0f0f5);
    text-decoration: none;
}

.toc-section-title a:hover {
    color: var(--fantasy-gold, #d4af37);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-place-item {
    margin: 0.5rem 0;
    padding-left: 0.5rem;
}

.toc-expand {
    cursor: pointer;
    color: var(--fantasy-gold, #d4af37);
    font-size: 0.75rem;
    user-select: none;
    display: inline-block;
    width: 1rem;
    text-align: center;
}

.toc-expand:hover {
    color: var(--fantasy-gold-bright, #f0d875);
}

.toc-link {
    color: var(--text-primary, #f0f0f5);
    text-decoration: none;
    transition: color 0.2s;
}

.toc-link:hover {
    color: var(--fantasy-gold, #d4af37);
}

.toc-subitems {
    list-style: none;
    padding-left: 1.5rem;
    margin: 0.25rem 0 0 0;
    border-left: 1px solid var(--border-default, #2a2a4a);
    /* Synlig by default - ingen display: none */
}

.toc-room-item {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.toc-entities {
    list-style: none;
    padding-left: 1rem;
    margin: 0.25rem 0 0 0;
    font-size: 0.85rem;
}

.toc-entity {
    color: var(--text-secondary, #a0a0b0);
}

.toc-entity:hover {
    color: var(--fantasy-gold, #d4af37);
}

/* Legacy TOC styles for backwards compatibility */
.adventure-toc-section {
    margin: 2rem 0;
}

.toc-toggle {
    background: var(--fantasy-bg-darker);
    border: 1px solid var(--fantasy-border);
    color: var(--fantasy-text);
    padding: 12px 20px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Cinzel', serif;
    font-variant: small-caps;
    font-size: 16px;
    letter-spacing: 0.05em;
    transition: all 0.2s;
}

.toc-toggle:hover {
    background: rgba(201, 162, 39, 0.1);
    border-color: var(--fantasy-gold);
}

.toc-toggle .toggle-icon {
    color: var(--fantasy-gold);
    font-size: 0.8em;
}

.toc-toggle .toggle-text {
    flex: 1;
}

/* Credits section */
.adventure-credits {
    background: var(--fantasy-bg-darker);
    border: 1px solid var(--fantasy-border);
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.adventure-credits h3 {
    font-family: 'Cinzel', serif;
    color: var(--fantasy-gold);
    font-variant: small-caps;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.credits-grid {
    display: grid;
    gap: 1rem;
}

.credit-item {
    display: flex;
    gap: 1rem;
}

.credit-label {
    color: var(--fantasy-gold);
    font-family: 'Cinzel', serif;
    font-variant: small-caps;
    min-width: 120px;
}

/* Adventure TOC Section */
.adventure-toc-section {
    margin: 2rem 0;
}

/* Entity preview in cards */
.entity-preview {
    color: var(--fantasy-text-dim);
    font-size: 0.9rem;
    line-height: 1.4;
}

.entity-name {
    font-family: 'Cinzel', serif;
    color: var(--fantasy-gold);
    font-variant: small-caps;
    letter-spacing: 0.05em;
}

.entity-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--fantasy-border);
    margin-bottom: 10px;
}


/* ========================================
   TEXT CONTRAST & READABILITY FIXES
   ======================================== */

/* FIXA: Text ska ALLTID vara läsbar - ljus text på mörk bakgrund */
.adventure-section *,
.adventure-editor *,
.preview-container *,
.adventure-list *,
.adventure-view * {
    color: inherit;
}

/* Specifik fix för text i preview och PDF */
.preview-content p,
.preview-content span,
.preview-content div:not(.section-header):not(.dod-title-banner),
.pdf-content p,
.pdf-content span,
.pdf-content div:not(.section-header):not(.dod-title-banner),
.a4-content p,
.a4-content span,
.a4-content div:not(.section-header):not(.dod-title-banner) {
    color: var(--fantasy-text) !important;
}

/* Rubriker ska vara guldiga */
.adventure-section h1,
.adventure-section h2,
.adventure-section h3,
.adventure-section h4,
.adventure-section h5,
.adventure-section h6,
.adventure-editor h1,
.adventure-editor h2,
.adventure-editor h3,
.adventure-editor h4,
.preview-container h1,
.preview-container h2,
.preview-container h3,
.preview-container h4 {
    color: var(--fantasy-gold) !important;
}

/* Labels och metadata */
.label, .meta, .stat-label,
.npc-role, .enemy-size, .item-value {
    color: var(--fantasy-text-dim) !important;
}

/* ========================================
   FIX: 2-KOLUMNSLÄGE - Rubrik-överlappning
   ======================================== */

/* FIXA: Rubriker i kolumner ska inte ha för bred bakgrund */
.a4-preview.layout-two-column .a4-content h2,
.a4-preview.layout-two-column .a4-content h3,
.a4-preview.layout-two-column .section-header,
.layout-two-column .section-header,
.two-columns .section-header,
.two-columns h2,
.two-columns h3 {
    /* Begränsa bredd till kolumnens bredd */
    max-width: 100%;
    box-sizing: border-box;
    
    /* Ta bort bakgrund som kan överlappa */
    background: transparent !important;
    
    /* Om bakgrund behövs, begränsa den */
    display: inline-block;
    padding: 5px 0;
    margin-bottom: 10px;
}

/* Alternativt: gör rubriker span över båda kolumner */
.a4-preview.layout-two-column .a4-content .full-width-header,
.layout-two-column .full-width-header,
.two-columns .full-width-header {
    column-span: all;
    background: var(--bg-secondary);
    padding: 10px 20px;
    margin: 20px 0;
}

/* Fixa column-break för att undvika klippta element */
.a4-preview.layout-two-column .entity-card,
.a4-preview.layout-two-column .place-section,
.a4-preview.layout-two-column .npc-section,
.a4-preview.layout-two-column .dod-npc-card,
.a4-preview.layout-two-column .dod-stat-block,
.layout-two-column .entity-card,
.layout-two-column .place-section,
.layout-two-column .npc-section,
.two-columns .entity-card,
.two-columns .place-section,
.two-columns .npc-section {
    break-inside: avoid;
    page-break-inside: avoid;
    -webkit-column-break-inside: avoid;
}

/* ========================================
   PDF/LAYOUT - Overflow prevention
   ======================================== */

/* FIXA: Förhindra overflow */
.pdf-page,
.preview-page,
.a4-preview {
    overflow: visible;
    box-sizing: border-box;
    max-width: 210mm;  /* A4 bredd */
    max-height: 297mm; /* A4 höjd */
}

.pdf-content,
.preview-content,
.a4-content {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

/* Bilder ska inte gå utanför */
.pdf-content img,
.preview-content img,
.a4-content img {
    max-width: 100%;
    height: auto;
}

/* Text i kolumner */
.two-columns,
.layout-two-column .a4-content {
    column-count: 2;
    column-gap: 30px;
    column-rule: 1px solid var(--border-color);
}

.two-columns p,
.two-columns div,
.layout-two-column .a4-content p,
.layout-two-column .a4-content div {
    break-inside: avoid;
    page-break-inside: avoid;
}

/* ========================================
   PDF EXPORT STYLING
   ======================================== */

/* PDF-specifik styling */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .pdf-page {
        page-break-after: always;
        page-break-inside: avoid;
    }
    
    /* Reset margins för print */
    body {
        margin: 0;
        padding: 0;
    }
}

/* För html2pdf/jsPDF */
.pdf-export-container {
    width: 210mm;
    min-height: 297mm;
    background: white;
    color: #333;
    font-size: 11pt;
    line-height: 1.5;
}

.pdf-export-container .pdf-page {
    width: 210mm;
    min-height: 297mm;
    padding: 20mm;
    box-sizing: border-box;
    background: white;
    position: relative;
}

/* Pergament-tema för PDF (DoD-stil) */
.pdf-export-container.parchment {
    background: #f5e6c8;
}

.pdf-export-container.parchment .pdf-page {
    background: linear-gradient(to bottom, #f5e6c8, #e8d5a9);
}

/* Text ska vara mörk i PDF */
.pdf-export-container,
.pdf-export-container * {
    color: #2c2c2c !important;
}

.pdf-export-container h1,
.pdf-export-container h2,
.pdf-export-container h3 {
    color: #1a472a !important;  /* Mörkgrön för DoD-känsla */
}

/* Titelsida */
.pdf-export-container .title-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 297mm;
}

.pdf-export-container .adventure-title {
    font-family: 'Cinzel', serif;
    font-size: 38pt;
    color: #1a472a !important;
    margin-bottom: 20px;
}

/* Metadata-box */
.pdf-export-container .metadata-box {
    background: rgba(0,0,0,0.05);
    border: 1px solid #8b7355;
    padding: 15px 25px;
    margin-top: 30px;
}

/* Två kolumner i PDF */
.pdf-export-container .two-columns {
    column-count: 2;
    column-gap: 20px;
    column-rule: 1px solid #ccc;
}

/* ========================================
   SIDEBAR FIXES
   ======================================== */

.adventure-sidebar,
.editor-sidebar {
    background: var(--bg-secondary) !important;
    border-right: 1px solid var(--border-color);
}

/* ==================== HIERARCHICAL ADVENTURE OVERVIEW STYLES ==================== */

/* Nested TOC Structure - Legacy support */
.toc-nested,
.toc-rooms {
    list-style: none;
    padding-left: 20px;
    margin-top: 8px;
}

.toc-nested > li {
    margin: 12px 0;
}

.toc-rooms {
    padding-left: 25px;
    margin-top: 8px;
}

.toc-rooms > li {
    margin: 6px 0;
    font-size: 0.9em;
}

.toc-rooms a {
    color: var(--fantasy-text-dim);
    padding: 6px 12px;
}

.toc-rooms a:hover {
    color: var(--fantasy-gold-bright);
}

.toc-section > a {
    font-family: 'Cinzel', serif;
    font-variant: small-caps;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: var(--fantasy-gold);
}

/* Expanderbar innehållsförteckning - Legacy */
.toc-expandable {
    position: relative;
}

.toc-room {
    margin: 0.25rem 0;
}

/* Enhanced Place Section Styling */
.place-section {
    margin-bottom: 4rem;
    padding: 2.5rem;
    background: linear-gradient(145deg, rgba(30, 30, 36, 0.9), rgba(20, 20, 26, 0.95));
    border: 2px solid var(--fantasy-border-gold);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0);
    position: relative;
}

.place-section::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--fantasy-gold), transparent);
}

.place-section h3 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: var(--fantasy-gold);
    margin: 0 0 1.5rem 0;
    text-align: center;
    font-variant: small-caps;
    letter-spacing: 0.1em;
    text-shadow: 0 2px 8px rgba(201, 162, 39, 0.3);
}

.place-description {
    margin: 1.5rem 0;
    line-height: 1.8;
    color: var(--fantasy-text);
    font-size: 1.05rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid var(--fantasy-gold-dim);
    border-radius: 4px;
}

/* Room/Scene Sections */
.place-rooms {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--fantasy-border);
}

.room-section {
    margin: 1.5rem 0;
    background: rgba(42, 42, 48, 0.6);
    border: 1px solid var(--fantasy-border);
    border-radius: 8px;
    overflow: hidden;
}

.room-toggle {
    width: 100%;
    background: linear-gradient(145deg, rgba(50, 50, 56, 0.8), rgba(35, 35, 41, 0.9));
    border: none;
    padding: 1rem 1.5rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.room-toggle:hover {
    background: linear-gradient(145deg, rgba(60, 60, 66, 0.9), rgba(45, 45, 51, 0.95));
    box-shadow: inset 0 0 20px rgba(201, 162, 39, 0.1);
}

.room-toggle .toggle-icon {
    color: var(--fantasy-gold);
    font-size: 0.9em;
    transition: transform 0.3s ease;
}

.room-title {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: var(--fantasy-gold-bright);
    margin: 0;
    font-variant: small-caps;
    letter-spacing: 0.05em;
}

.room-content {
    padding: 1.5rem;
    background: rgba(20, 20, 26, 0.5);
}

.room-description {
    margin: 1rem 0;
    line-height: 1.7;
    color: var(--fantasy-text);
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-left: 2px solid var(--fantasy-gold-dim);
    border-radius: 4px;
}

.room-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border: 2px solid var(--fantasy-border-gold);
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Room Entities */
.room-entities {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.room-entities h5 {
    font-family: 'Cinzel', serif;
    color: var(--fantasy-gold);
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-variant: small-caps;
    letter-spacing: 0.05em;
}

/* Place Level Entities */
.place-level-entities {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(20, 20, 26, 0.4);
    border: 1px solid var(--fantasy-border);
    border-radius: 8px;
}

.place-level-entities h4 {
    font-family: 'Cinzel', serif;
    color: var(--fantasy-gold);
    margin: 0 0 1.5rem 0;
    font-size: 1.3rem;
    font-variant: small-caps;
    letter-spacing: 0.05em;
}

.entity-subsection {
    margin: 1.5rem 0;
}

.entity-subsection h5 {
    font-family: 'Cinzel', serif;
    color: var(--fantasy-gold-dim);
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-variant: small-caps;
    letter-spacing: 0.05em;
}

/* Room Information Boxes */
.room-key-info,
.room-hidden,
.room-rolls,
.room-interactive {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(201, 162, 39, 0.05);
    border-left: 3px solid var(--fantasy-gold-dim);
    border-radius: 4px;
    color: var(--fantasy-text);
}

.room-key-info {
    border-left-color: var(--fantasy-gold);
    background: rgba(201, 162, 39, 0.1);
}

.room-hidden {
    border-left-color: #8b7335;
}

.room-rolls {
    border-left-color: #c9a227;
}

.room-interactive {
    border-left-color: #e8c040;
}

.room-hidden ul,
.room-rolls ul,
.room-interactive ul {
    margin: 0.5rem 0 0 1.5rem;
    padding: 0;
}

.room-hidden li,
.room-rolls li,
.room-interactive li {
    margin: 0.3rem 0;
    color: var(--fantasy-text);
}

/* Enhanced Entity Card Styling */
.entity-card,
.npc-card,
.enemy-card,
.item-card {
    background: linear-gradient(145deg, rgba(42, 42, 48, 0.9), rgba(30, 30, 36, 0.95)) !important;
    border: 1px solid var(--fantasy-border) !important;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    color: var(--fantasy-text) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.entity-card:hover,
.npc-card:hover,
.enemy-card:hover,
.item-card:hover {
    border-color: var(--fantasy-gold) !important;
    box-shadow: 0 8px 24px rgba(201, 162, 39, 0.2), 0 0 30px rgba(201, 162, 39, 0.1);
    cursor: pointer;
    background: linear-gradient(145deg, rgba(52, 52, 58, 0.95), rgba(40, 40, 46, 1)) !important;
    transform: translateY(-2px);
}

/* Remove harsh purple gradients */
.progress-bar-fill.vp {
    background: linear-gradient(90deg, #7c3aed 0%, #a855f7 50%, #9333ea 100%) !important;
}

/* Adventure Section Headers */
.adventure-section h2 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    color: var(--fantasy-gold);
    margin: 3rem 0 2rem 0;
    text-align: center;
    font-variant: small-caps;
    letter-spacing: 0.1em;
    position: relative;
    padding-bottom: 1rem;
}

.adventure-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--fantasy-gold), transparent);
}

/* Grids for entity cards */
.npcs-grid,
.enemies-grid,
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Decorative dividers */
.adventure-section::before {
    content: '⚔';
    display: block;
    text-align: center;
    font-size: 1.5rem;
    color: var(--fantasy-gold-dim);
    margin: 2rem 0 1rem 0;
}

.adventure-section:first-of-type::before {
    display: none;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Better spacing and margins */
.adventure-section {
    margin-bottom: 4rem;
}

/* Entity name styling */
.entity-name {
    font-family: 'Cinzel', serif;
    color: var(--fantasy-gold-bright);
    font-size: 1.1rem;
    margin: 0.5rem 0;
    font-variant: small-caps;
    letter-spacing: 0.05em;
}

/* Click hint styling */
.click-hint {
    display: block;
    text-align: center;
    color: var(--fantasy-gold-dim);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    opacity: 0.7;
    font-style: italic;
}

.entity-card:hover .click-hint {
    opacity: 1;
    color: var(--fantasy-gold-bright);
}

/* Portrait and image placeholders */
.npc-portrait-placeholder,
.enemy-image-placeholder,
.item-image-placeholder {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.1), rgba(139, 115, 53, 0.15));
    border-radius: 8px;
    margin-bottom: 1rem;
}

.npc-portrait,
.enemy-image,
.item-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--fantasy-border);
}

/* Markdown-renderad text i Översikt */
.markdown-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.markdown-content strong {
    color: var(--accent-gold);
    font-weight: 600;
}

.markdown-content em {
    font-style: italic;
    color: var(--text-secondary);
}

.markdown-content h4.md-heading,
.markdown-content h5.md-heading {
    font-family: 'Cinzel', serif;
    color: var(--accent-gold);
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-variant: small-caps;
    letter-spacing: 0.05em;
}

.markdown-content h5.md-heading {
    font-size: 1rem;
    margin-top: 1.25rem;
}

.markdown-content ul {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.markdown-content ul li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.markdown-content ul li::marker {
    color: var(--accent-gold);
}

/* Markdown content spacing adjustments */
.place-notes strong,
.room-notes strong,
.room-key-info strong {
    display: block;
    margin-bottom: 0.5rem;
}

/* ============================================
   WYSIWYG Editor - Quill anpassningar
   ============================================ */
.wysiwyg-container {
    background: var(--bg-elevated, #1a1a2e);
    border: 1px solid var(--border-default, #2a2a4a);
    border-radius: 8px;
    overflow: hidden;
}

.wysiwyg-container .ql-toolbar {
    background: var(--bg-secondary, #12121f);
    border: none;
    border-bottom: 1px solid var(--border-default, #2a2a4a);
    padding: 8px 12px;
}

.wysiwyg-container .ql-toolbar .ql-stroke {
    stroke: var(--text-secondary, #a0a0b0);
}

.wysiwyg-container .ql-toolbar .ql-fill {
    fill: var(--text-secondary, #a0a0b0);
}

.wysiwyg-container .ql-toolbar .ql-picker {
    color: var(--text-secondary, #a0a0b0);
}

.wysiwyg-container .ql-toolbar button:hover .ql-stroke,
.wysiwyg-container .ql-toolbar button.ql-active .ql-stroke {
    stroke: var(--accent-gold, #d4af37);
}

.wysiwyg-container .ql-toolbar button:hover .ql-fill,
.wysiwyg-container .ql-toolbar button.ql-active .ql-fill {
    fill: var(--accent-gold, #d4af37);
}

.wysiwyg-container .ql-toolbar .ql-picker-label:hover,
.wysiwyg-container .ql-toolbar .ql-picker-label.ql-active {
    color: var(--accent-gold, #d4af37);
}

.wysiwyg-container .ql-container {
    border: none;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 1rem;
    min-height: 150px;
}

.wysiwyg-container .ql-editor {
    padding: 16px;
    color: var(--text-primary, #f0f0f5);
    line-height: 1.7;
}

.wysiwyg-container .ql-editor.ql-blank::before {
    color: var(--text-muted, #6a6a7a);
    font-style: italic;
}

/* Formaterad text i editorn */
.wysiwyg-container .ql-editor h3 {
    font-family: 'Cinzel', serif;
    color: var(--accent-gold, #d4af37);
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-variant: small-caps;
}

.wysiwyg-container .ql-editor h4 {
    font-family: 'Cinzel', serif;
    color: var(--accent-gold, #d4af37);
    font-size: 1.1rem;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.wysiwyg-container .ql-editor strong {
    color: var(--accent-gold, #d4af37);
    font-weight: 600;
}

.wysiwyg-container .ql-editor em {
    font-style: italic;
}

.wysiwyg-container .ql-editor ul,
.wysiwyg-container .ql-editor ol {
    padding-left: 1.5rem;
    margin: 0.75rem 0;
}

.wysiwyg-container .ql-editor li {
    margin-bottom: 0.5rem;
}

.wysiwyg-container .ql-editor p {
    margin-bottom: 1rem;
}

/* Dropdown-menyer för rubriker etc */
.wysiwyg-container .ql-picker-options {
    background: var(--bg-elevated, #1a1a2e);
    border: 1px solid var(--border-default, #2a2a4a);
}

.wysiwyg-container .ql-picker-item {
    color: var(--text-secondary, #a0a0b0);
}

.wysiwyg-container .ql-picker-item:hover {
    color: var(--accent-gold, #d4af37);
}

/* Textjustering i WYSIWYG */
.wysiwyg-container .ql-editor .ql-align-center {
    text-align: center;
}

.wysiwyg-container .ql-editor .ql-align-right {
    text-align: right;
}

.wysiwyg-container .ql-editor .ql-align-justify {
    text-align: justify;
}

/* Tabeller i WYSIWYG */
.wysiwyg-container .ql-editor table {
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0;
}

.wysiwyg-container .ql-editor td,
.wysiwyg-container .ql-editor th {
    border: 1px solid var(--border-default, #2a2a4a);
    padding: 8px 12px;
    text-align: left;
}

.wysiwyg-container .ql-editor th {
    background: var(--bg-secondary, #12121f);
    color: var(--accent-gold, #d4af37);
    font-weight: 600;
}

.wysiwyg-container .ql-editor tr:nth-child(even) td {
    background: rgba(0, 0, 0, 0.2);
}

/* ============================================
   Formaterad text i Översikt
   ============================================ */
.formatted-content {
    line-height: 1.7;
}

.formatted-content > p:first-child {
    margin-top: 0;
}

.formatted-content > p:last-child {
    margin-bottom: 0;
}

.formatted-content p {
    margin-bottom: 0.75rem;
}

/* Textjustering i översikt */
.formatted-content .ql-align-center {
    text-align: center;
}

.formatted-content .ql-align-right {
    text-align: right;
}

.formatted-content .ql-align-justify {
    text-align: justify;
}

/* Tabeller i översikt */
.formatted-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0;
}

.formatted-content td,
.formatted-content th {
    border: 1px solid var(--border-default, #2a2a4a);
    padding: 8px 12px;
    text-align: left;
}

.formatted-content th {
    background: var(--bg-secondary, #12121f);
    color: var(--accent-gold, #d4af37);
    font-weight: 600;
}

.formatted-content tr:nth-child(even) td {
    background: rgba(0, 0, 0, 0.2);
}

.formatted-content h3 {
    font-family: 'Cinzel', serif;
    color: var(--accent-gold, #d4af37);
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-variant: small-caps;
    letter-spacing: 0.05em;
}

.formatted-content h4 {
    font-family: 'Cinzel', serif;
    color: var(--accent-gold, #d4af37);
    font-size: 1.05rem;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.formatted-content strong {
    color: var(--accent-gold, #d4af37);
    font-weight: 600;
}

.formatted-content em {
    font-style: italic;
}

.formatted-content ul,
.formatted-content ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.formatted-content ul li,
.formatted-content ol li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.formatted-content ul li::marker {
    color: var(--accent-gold, #d4af37);
}

/* Ending Section Styling */
.ending-subsection {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent-gold);
}

.ending-subsection h3 {
    color: var(--accent-gold);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.ending-content {
    color: var(--text-primary);
    line-height: 1.6;
}

/* Drag and Drop for Places */
.draggable-place {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: grab;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    user-select: none;
}

.draggable-place:active {
    cursor: grabbing;
}

.draggable-place.dragging {
    opacity: 0.5;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.draggable-place.drag-over {
    border-top: 3px solid var(--accent-gold);
    margin-top: -3px;
}

.drag-handle {
    color: var(--text-secondary);
    font-size: 1.25rem;
    padding: 0.5rem;
    cursor: grab;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.drag-handle:hover {
    opacity: 1;
}

.draggable-place:hover .drag-handle {
    opacity: 0.8;
}

.place-card-content {
    flex: 1;
    min-width: 0;
}

.place-card-content h3 {
    margin: 0 0 0.25rem 0;
}

.place-card-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Centrera kartor och platsbilder */
.place-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 8px;
    margin: 1rem auto;      /* auto centrerar horisontellt */
    display:  block;         /* krävs för att margin auto ska funka */
}

.place-map {
    margin-top: 2rem;
    text-align: center;     /* centrerar innehållet */
}

. place-map img {
    width: 100%;
    max-width: 1000px;
    height: auto;
    border: 2px solid var(--border);
    border-radius:  8px;
    display: inline-block;  /* respekterar text-align: center */
}

/* ============================================
   ADVENTURE VIEW ENHANCEMENTS - v4
   Book-inspired fantasy styling for adventure viewing
   Note: These styles enhance the adventure view without
   breaking PDF export (which uses .pdf-export-container)
   ============================================ */

/* Main adventure view container */
.adventure-view {
    max-width: 1120px;
    margin: 0 auto;
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 1.0625rem;
    line-height: 1.75;
}

/* Header Bar */
.adventure-view .adventure-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0.875rem 1.25rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(212, 175, 55, 0.12);
    border-radius: 6px;
}

.adventure-view .btn-outline {
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #d4af37;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.adventure-view .btn-outline:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.6);
}

.adventure-view .adventure-view-actions {
    display: flex;
    gap: 0.375rem;
}

.adventure-view .btn-ghost {
    background: transparent;
    border: none;
    color: #8a8578;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.adventure-view .btn-ghost:hover {
    color: #d4af37;
}

/* Content Container */
.adventure-view .adventure-content {
    background: #17181e;
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 4px;
    overflow: hidden;
}

/* Cover Section */
.adventure-view .adventure-cover-section {
    text-align: center;
    padding: 0;
}

.adventure-view .adventure-cover-img {
    width: 100%;
    max-height: 100%;
    object-fit: cover;
    display: block;
}

.adventure-view .adventure-title {
    font-family: 'Cinzel Decorative', 'Cinzel', serif;
    font-size: 2.75rem;
    font-weight: 700;
    color: #f5f3f0;
    margin: 2rem 0 0.5rem 0;
    letter-spacing: 0.03em;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.adventure-view .adventure-subtitle-large {
    font-family: 'Crimson Text', serif;
    font-size: 1.375rem;
    color: #d4af37;
    font-style: italic;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* Metadata */
.adventure-view .adventure-metadata {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    padding: 1.25rem 2rem;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    background: rgba(212, 175, 55, 0.03);
}

.adventure-view .metadata-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
}

.adventure-view .metadata-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.625rem;
    color: #a89f8a;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.adventure-view .metadata-value {
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
    color: #f5f3f0;
    font-weight: 600;
}

/* Tags */
.adventure-view .adventure-tags-section {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 1.25rem 2rem 2rem;
}

.adventure-view .tag-large {
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.25);
    color: #d4af37;
    padding: 0.25rem 0.875rem;
    border-radius: 2px;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
}

.adventure-view .tag-large:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.4);
}

/* Section Styling */
.adventure-view .adventure-section {
    padding: 2.5rem 3rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.adventure-view .adventure-section h2 {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    font-weight: 600;
    color: #d4af37;
    text-align: center;
    margin: 0 0 2rem 0;
    letter-spacing: 0.06em;
}

.adventure-view .adventure-section h2::after {
    content: '◆';
    display: block;
    font-size: 0.5rem;
    margin-top: 0.75rem;
    color: rgba(212, 175, 55, 0.4);
    letter-spacing: 0.5em;
}

.adventure-view .adventure-section h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.1875rem;
    font-weight: 600;
    color: #f5f3f0;
    margin: 2.5rem 0 1rem;
    letter-spacing: 0.02em;
}

.adventure-view .adventure-section h4 {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    color: #c9b97a;
    margin: 2rem 0 0.75rem;
}

.adventure-view .adventure-section p {
    color: #d5d1ca;
    margin-bottom: 1.125rem;
}

.adventure-view .adventure-section ul,
.adventure-view .adventure-section ol {
    margin: 1rem 0;
    padding-left: 1.25rem;
    color: #d5d1ca;
}

.adventure-view .adventure-section li {
    margin-bottom: 0.625rem;
}

.adventure-view .adventure-section strong {
    color: #f5f3f0;
    font-weight: 600;
}

.adventure-view .adventure-section em {
    color: #e0dcd5;
}

/* Read-aloud / Blockquote (if used) */
.adventure-view blockquote {
    margin: 1.75rem 0;
    margin-left: 0;
    padding: 1.25rem 1.5rem;
    background: rgba(212, 175, 55, 0.04);
    border-left: 3px solid rgba(212, 175, 55, 0.4);
    border-radius: 0 4px 4px 0;
    font-style: italic;
    color: #ccc7be;
}

.adventure-view blockquote::first-letter {
    float: left;
    font-family: 'Cinzel Decorative', 'Cinzel', serif;
    font-size: 2.75rem;
    line-height: 0.85;
    padding-right: 0.4rem;
    padding-top: 0.15rem;
    color: #d4af37;
    font-weight: 400;
    font-style: normal;
}

/* Info Box */
.adventure-view .info-box {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 4px;
}

/* GM Info Section */
.adventure-view .gm-info-section,
.adventure-view .spelledarinformation {
    margin: 2rem 0;
    padding: 1.5rem 1.75rem;
    background: rgba(139, 119, 86, 0.08);
    border: 1px solid rgba(139, 119, 86, 0.2);
    border-radius: 4px;
    position: relative;
}

.adventure-view .gm-info-section::before {
    content: '🎲';
    position: absolute;
    top: -0.75rem;
    left: 1.25rem;
    background: #17181e;
    padding: 0 0.5rem;
    font-size: 1rem;
}

.adventure-view .gm-info-section h4,
.adventure-view .spelledarinformation h4 {
    font-family: 'Inter', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #a89a7a;
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.adventure-view .gm-info-section p {
    font-size: 0.9375rem;
    color: #b8b3a8;
}

.adventure-view .gm-info-section ul {
    font-size: 0.9375rem;
    color: #b8b3a8;
}

.adventure-view .gm-info-section li {
    margin-bottom: 0.5rem;
}

/* TOC Container */
.adventure-view .toc-container {
    margin: 2rem 3rem;
    padding: 1.5rem 2rem;
    background: rgba(255,255,255,0.015);
    border: 1px solid rgba(212, 175, 55, 0.12);
    border-radius: 4px;
}

.adventure-view .toc-title {
    font-family: 'Cinzel', serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #d4af37;
    margin: 0 0 1.25rem 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.04em;
    transition: color 0.2s ease;
}

.adventure-view .toc-title:hover {
    color: #e8c95a;
}

.adventure-view .toc-section-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #8a8578;
    margin: 1.25rem 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.adventure-view .toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.adventure-view .toc-list > li {
    margin: 0.375rem 0;
}

.adventure-view .toc-link {
    color: #c9c4bb;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.15s ease;
}

.adventure-view .toc-link:hover {
    color: #d4af37;
}

.adventure-view .toc-subitems {
    list-style: none;
    padding-left: 1.25rem;
    margin: 0.25rem 0 0.5rem;
}

.adventure-view .toc-subitems li {
    margin: 0.125rem 0;
}

.adventure-view .toc-subitems .toc-link {
    font-size: 0.8125rem;
    color: #7a756c;
}

.adventure-view .toc-subitems .toc-link:hover {
    color: #d4af37;
}

/* Credits Section */
.adventure-view .credits-section {
    margin: 2rem 3rem;
    padding: 1.5rem 2rem;
    background: rgba(255,255,255,0.015);
    border: 1px solid rgba(212, 175, 55, 0.12);
    border-radius: 4px;
}

.adventure-view .credits-section h3 {
    font-family: 'Cinzel', serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #d4af37;
    margin: 0 0 1rem 0;
    letter-spacing: 0.04em;
}

.adventure-view .credits-table {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.375rem 1.5rem;
    margin: 0;
    font-size: 0.9375rem;
}

.adventure-view .credits-table dt {
    color: #7a756c;
    font-family: 'Inter', sans-serif;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-top: 0.1875rem;
}

.adventure-view .credits-table dd {
    color: #d5d1ca;
    margin: 0;
}

/* ===== PLACE SECTION - Enhanced Headers ===== */
.adventure-view .place-section {
    margin: 3rem 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.adventure-view .place-section:first-of-type {
    margin-top: 0;
}

/* Place Header with decorative elements */
.adventure-view .place-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem 0;
    position: relative;
}

.adventure-view .place-header::before,
.adventure-view .place-header::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
}

.adventure-view .place-header::before {
    top: 0;
}

.adventure-view .place-header::after {
    bottom: 0;
}

.adventure-view .place-number {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    color: #8a8578;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 0.5rem;
}

.adventure-view .place-header h3 {
    font-family: 'Cinzel Decorative', 'Cinzel', serif;
    font-size: 1.625rem;
    font-weight: 700;
    color: #d4af37;
    margin: 0;
    letter-spacing: 0.04em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.adventure-view .place-tagline {
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
    font-style: italic;
    color: #a89f8a;
    margin-top: 0.5rem;
}

.adventure-view .place-header .ornament {
    color: rgba(212, 175, 55, 0.4);
    font-size: 0.875rem;
    margin-top: 0.75rem;
    letter-spacing: 0.3em;
}

/* Place content area */
.adventure-view .place-content {
    padding: 0 1rem;
}

/* Headings inside place content (from WYSIWYG) */
.adventure-view .place-content h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #c9b97a;
    margin: 2rem 0 0.75rem;
    text-align: center;
}

.adventure-view .place-content h4 {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    color: #a89f8a;
    margin: 1.5rem 0 0.5rem;
}

/* Read-aloud text (italic paragraphs) */
.adventure-view .place-content .read-aloud-text,
.adventure-view .place-content p.read-aloud-text {
    display: block;
    margin: 1.75rem 0;
    padding: 1.25rem 1.5rem;
    background: rgba(212, 175, 55, 0.04);
    border-left: 3px solid rgba(212, 175, 55, 0.4);
    border-radius: 0 4px 4px 0;
    font-style: italic;
    color: #ccc7be;
}

/* Drop cap for read-aloud text */
.adventure-view .place-content .read-aloud-text::first-letter {
    float: left;
    font-family: 'Cinzel Decorative', 'Cinzel', serif;
    font-size: 2.75rem;
    line-height: 0.85;
    padding-right: 0.4rem;
    padding-top: 0.15rem;
    color: #d4af37;
    font-weight: 400;
    font-style: normal;
}

/* GM Info heading */
.adventure-view .place-content .gm-info-heading {
    font-family: 'Inter', sans-serif !important;
    font-size: 0.6875rem !important;
    font-weight: 600 !important;
    color: #a89a7a !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: left !important;
    margin: 0 0 1rem 0 !important;
}

/* GM Info box wrapper */
.adventure-view .place-content .gm-info-box {
    margin: 2rem 0;
    padding: 1.5rem 1.75rem;
    background: rgba(139, 119, 86, 0.08);
    border: 1px solid rgba(139, 119, 86, 0.2);
    border-radius: 4px;
    position: relative;
}

.adventure-view .place-content .gm-info-box::before {
    content: '🎲';
    position: absolute;
    top: -0.75rem;
    left: 1.25rem;
    background: #17181e;
    padding: 0 0.5rem;
    font-size: 1rem;
}

.adventure-view .place-content .gm-info-box p {
    font-size: 0.9375rem;
    color: #b8b3a8;
}

.adventure-view .place-content .gm-info-box ul,
.adventure-view .place-content .gm-info-box ol {
    font-size: 0.9375rem;
    color: #b8b3a8;
}

.adventure-view .place-content .gm-info-box li {
    margin-bottom: 0.5rem;
}

/* Tables used as info boxes in WYSIWYG */
.adventure-view .place-content table,
.adventure-view .place-content table.info-table {
    width: 100%;
    margin: 1.5rem 0;
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 4px;
    border-collapse: collapse;
}

.adventure-view .place-content table td {
    padding: 1rem 1.25rem;
    color: #d5d1ca;
}

/* Drop cap class (added by JS) */
.adventure-view .drop-cap::first-letter {
    float: left;
    font-family: 'Cinzel Decorative', 'Cinzel', serif;
    font-size: 3.5rem;
    line-height: 0.8;
    padding-right: 0.5rem;
    padding-top: 0.25rem;
    color: #d4af37;
    font-weight: 700;
}

/* Entity section */
.adventure-view .place-level-entities {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.adventure-view .place-level-entities > h4 {
    font-family: 'Cinzel', serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #a89f8a;
    margin-bottom: 1.25rem;
    letter-spacing: 0.02em;
}

.adventure-view .entity-subsection h5 {
    font-family: 'Inter', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #8a8578;
    margin: 1.5rem 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Entity Cards - balanced styling */
.adventure-view .entities-grid,
.adventure-view .npcs-grid,
.adventure-view .enemies-grid,
.adventure-view .items-grid,
.adventure-view .handouts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.adventure-view .entity-card,
.adventure-view .npc-card,
.adventure-view .enemy-card,
.adventure-view .item-card,
.adventure-view .handout-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(212, 175, 55, 0.12);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.25s ease;
    cursor: pointer;
}

.adventure-view .entity-card:hover,
.adventure-view .npc-card:hover,
.adventure-view .enemy-card:hover,
.adventure-view .item-card:hover,
.adventure-view .handout-card:hover {
    border-color: rgba(212, 175, 55, 0.35);
    background: rgba(212, 175, 55, 0.04);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.adventure-view .entity-image,
.adventure-view .npc-portrait,
.adventure-view .enemy-image,
.adventure-view .item-image,
.adventure-view .handout-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    background: rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #5a564e;
    transition: color 0.2s ease;
}

.adventure-view .entity-card:hover .entity-image,
.adventure-view .npc-card:hover .npc-portrait,
.adventure-view .enemy-card:hover .enemy-image,
.adventure-view .item-card:hover .item-image {
    color: #8a8578;
}

.adventure-view .npc-portrait-placeholder,
.adventure-view .enemy-image-placeholder,
.adventure-view .item-image-placeholder,
.adventure-view .handout-image-placeholder {
    width: 100%;
    height: 100px;
    background: rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #5a564e;
}

.adventure-view .entity-card h4,
.adventure-view .npc-card h4,
.adventure-view .enemy-card h4,
.adventure-view .item-card h4,
.adventure-view .handout-card h4 {
    font-family: 'Cinzel', serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #e8e4df;
    margin: 0;
    padding: 0.75rem 0.875rem 0.25rem;
}

.adventure-view .entity-role,
.adventure-view .npc-role,
.adventure-view .enemy-size,
.adventure-view .item-value {
    color: #a89f8a;
    font-family: 'Inter', sans-serif;
    font-size: 0.6875rem;
    padding: 0 0.875rem 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.adventure-view .entity-stats,
.adventure-view .enemy-stats {
    display: flex;
    gap: 1rem;
    padding: 0 0.875rem 0.75rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #7a756c;
}

.adventure-view .entity-preview {
    font-size: 0.8125rem;
    color: #8a8578;
    padding: 0 0.875rem 0.75rem;
    line-height: 1.4;
}

.adventure-view .click-hint {
    display: block;
    font-size: 0.625rem;
    color: #5a564e;
    text-align: center;
    padding: 0.5rem 0.875rem;
    border-top: 1px solid rgba(212, 175, 55, 0.08);
    transition: color 0.2s ease;
}

.adventure-view .entity-card:hover .click-hint,
.adventure-view .npc-card:hover .click-hint,
.adventure-view .enemy-card:hover .click-hint,
.adventure-view .item-card:hover .click-hint {
    color: #a89f8a;
}

/* Place image and map */
.adventure-view .place-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1.5rem 0;
    border: 1px solid rgba(212, 175, 55, 0.15);
}

.adventure-view .place-map {
    margin: 2rem 0;
    text-align: center;
}

.adventure-view .place-map img {
    max-width: 100%;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Room/Scene styling */
.adventure-view .room-section {
    background: rgba(255,255,255,0.015);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 4px;
    margin: 1.25rem 0;
    overflow: hidden;
}

.adventure-view .room-toggle {
    width: 100%;
    background: rgba(212, 175, 55, 0.03);
    border: none;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.adventure-view .room-toggle:hover {
    background: rgba(212, 175, 55, 0.06);
}

.adventure-view .room-title {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    color: #e8e4df;
    margin: 0;
}

.adventure-view .toggle-icon {
    color: #d4af37;
    font-size: 0.75rem;
}

.adventure-view .room-content {
    padding: 1.25rem;
    border-top: 1px solid rgba(212, 175, 55, 0.08);
}

/* Ending section */
.adventure-view .ending-subsection {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 4px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.adventure-view .ending-subsection h3 {
    font-family: 'Cinzel', serif;
    color: #c9b97a;
    font-size: 1rem;
    margin: 0 0 1rem 0;
}

/* Notes styling */
.adventure-view .place-notes,
.adventure-view .room-notes {
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 4px;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
}

.adventure-view .room-key-info {
    background: rgba(234, 179, 8, 0.06);
    border: 1px solid rgba(234, 179, 8, 0.15);
    border-radius: 4px;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
}

.adventure-view .room-hidden {
    background: rgba(168, 85, 247, 0.06);
    border: 1px solid rgba(168, 85, 247, 0.15);
    border-radius: 4px;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
}

/* Random Event Tables */
.adventure-view .random-table-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 4px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.adventure-view .random-table-header {
    background: rgba(212, 175, 55, 0.06);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.adventure-view .random-table-header h4 {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    color: #d4af37;
    margin: 0;
}

.adventure-view .random-table-interval {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #a89f8a;
    margin: 0.25rem 0 0 0;
}

.adventure-view .random-table {
    width: 100%;
    border-collapse: collapse;
}

.adventure-view .random-table thead {
    background: rgba(212, 175, 55, 0.04);
}

.adventure-view .random-table th {
    font-family: 'Inter', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #a89f8a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.adventure-view .random-table th.roll-column {
    width: 60px;
    text-align: center;
}

.adventure-view .random-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.06);
    vertical-align: top;
}

.adventure-view .random-table tr:last-child td {
    border-bottom: none;
}

.adventure-view .random-table tr:hover {
    background: rgba(212, 175, 55, 0.03);
}

.adventure-view .random-table .roll-cell {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    color: #d4af37;
    text-align: center;
    font-size: 0.9375rem;
}

.adventure-view .random-table .event-cell strong {
    font-family: 'Cinzel', serif;
    color: #e8e4df;
    font-size: 0.9375rem;
}

.adventure-view .random-table .event-cell p {
    font-family: 'Crimson Text', serif;
    color: #b8b3a8;
    font-size: 0.9375rem;
    margin: 0.375rem 0 0 0;
    line-height: 1.5;
}

.adventure-view .event-rolls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.5rem;
}

.adventure-view .roll-tag {
    background: rgba(139, 119, 86, 0.15);
    border: 1px solid rgba(139, 119, 86, 0.25);
    color: #a89a7a;
    font-family: 'Inter', sans-serif;
    font-size: 0.625rem;
    font-weight: 500;
    padding: 0.125rem 0.5rem;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .adventure-view .adventure-title {
        font-size: 2rem;
    }
    
    .adventure-view .adventure-section {
        padding: 1.5rem;
    }
    
    .adventure-view .adventure-metadata {
        gap: 1.5rem;
        padding: 1rem;
    }
    
    .adventure-view .toc-container,
    .adventure-view .credits-section {
        margin: 1rem;
        padding: 1rem;
    }
    
    .adventure-view .adventure-view-header {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .adventure-view .entities-grid,
    .adventure-view .npcs-grid,
    .adventure-view .enemies-grid,
    .adventure-view .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .adventure-view .place-header h3 {
        font-size: 1.375rem;
    }
    
    .adventure-view .situation-content > p:first-child::first-letter,
    .adventure-view .place-content > p:first-child::first-letter,
    .adventure-view .drop-cap::first-letter {
        font-size: 2.75rem;
    }
    
    .adventure-view blockquote::first-letter {
        font-size: 2.25rem;
    }
}

/* Legacy credits support (for backwards compatibility) */
.adventure-credits {
    background: linear-gradient(165deg, #1e2128 0%, #12141a 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    margin: 2rem 2.5rem;
    padding: 1.5rem 2rem;
}

.adventure-credits h3 {
    font-family: 'Cinzel', serif;
    color: #d4af37;
    font-size: 1rem;
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.credits-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1.5rem;
}

.credit-item {
    display: contents;
}

.credit-label {
    color: #6b7280;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.credit-item:not(.credit-label) {
    color: #f5f5f5;
}

/* ============================================================
   STICKY TOC SIDEBAR - Adventure Navigation
   ============================================================ */

/* Wrapper for adventure view with sticky ToC */
.adventure-view-wrapper {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* Sticky ToC Container */
.sticky-toc {
    position: sticky;
    top: 120px;
    width: 250px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 1rem;
    overflow-y: auto;
    flex-shrink: 0;
    z-index: 10;
}

/* Progress bar on left edge */
.sticky-toc-progress {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.sticky-toc-progress-bar {
    width: 100%;
    height: 0%;
    background: var(--accent-gold);
    transition: height 0.2s ease;
    border-radius: var(--radius-lg) 0 0 0;
}

/* ToC Title */
.sticky-toc-title {
    font-family: var(--font-display);
    font-size: 0.875rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-default);
}

/* ToC Items */
.sticky-toc-items {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sticky-toc-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.813rem;
    transition: all 0.2s;
    cursor: pointer;
}

.sticky-toc-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sticky-toc-item.active {
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-gold);
    font-weight: 600;
}

.sticky-toc-item.active .sticky-toc-indicator {
    color: var(--accent-gold);
    transform: scale(1.2);
}

/* Indicator dot */
.sticky-toc-indicator {
    font-size: 0.5rem;
    color: var(--text-muted);
    transition: all 0.2s;
    flex-shrink: 0;
}

/* Sub-items (scenes) */
.sticky-toc-item-sub {
    padding-left: 1.5rem;
    font-size: 0.75rem;
}

.sticky-toc-item-sub .sticky-toc-indicator {
    font-size: 0.4rem;
}

/* Text truncation */
.sticky-toc-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Adjust main adventure view when sticky ToC is present */
.adventure-view-wrapper .adventure-view {
    flex: 1;
    min-width: 0; /* Allow flex shrinking */
}

/* Hide sticky ToC on mobile and tablets */
@media (max-width: 1024px) {
    .sticky-toc {
        display: none;
    }
    
    .adventure-view-wrapper {
        display: block;
    }
    
    .adventure-view-wrapper .adventure-view {
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* Scrollbar styling for sticky ToC */
.sticky-toc::-webkit-scrollbar {
    width: 6px;
}

.sticky-toc::-webkit-scrollbar-track {
    background: transparent;
}

.sticky-toc::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 3px;
}

.sticky-toc::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* ============================================
   PARTY PAGE REDESIGN - Hero & Layout
   ============================================ */

/* Party Hero Section */
.party-hero {
    position: relative;
    background: linear-gradient(165deg, #1e2128 0%, #12141a 50%, #0d0f14 100%);
    border-radius: 16px;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    border: 2px solid rgba(212, 175, 55, 0.3);
    box-shadow: 
        0 8px 32px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.03);
    overflow: hidden;
}

.party-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(139, 115, 53, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.party-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.party-hero-title {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #f5e6c8;
    margin-bottom: 0.75rem;
    text-shadow: 
        0 2px 8px rgba(0,0,0,0.7),
        0 0 30px rgba(212, 175, 55, 0.3);
    letter-spacing: 0.05em;
}

.party-hero-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Character Medallions in Hero */
.party-hero-medallions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.character-medallion {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(145deg, #2d3341, #1a1d24);
    padding: 3px;
    box-shadow: 
        0 4px 16px rgba(0,0,0,0.5),
        inset 0 1px 2px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.character-medallion::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: linear-gradient(145deg, #d4af37 0%, #8b7335 50%, #d4af37 100%);
    z-index: -1;
}

.character-medallion:hover {
    transform: scale(1.1) translateY(-4px);
    box-shadow: 
        0 8px 24px rgba(0,0,0,0.6),
        0 0 20px rgba(212, 175, 55, 0.3);
}

.character-medallion-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(145deg, #1a1d24, #12141a);
    display: flex;
    align-items: center;
    justify-content: center;
}

.character-medallion-inner img,
.character-medallion-inner .race-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    font-size: 2.5rem;
}

/* Next Session Teaser in Hero */
.party-hero-next {
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.party-hero-next-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}

.party-hero-next-date {
    font-family: 'Cinzel', serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #d4af37;
}

/* Party Content Layout */
.party-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .party-content {
        grid-template-columns: 1fr;
    }
}

/* Party Main Content */
.party-main {
    min-width: 0; /* Prevent overflow */
}

/* Party Sidebar */
.party-sidebar {
    min-width: 0; /* Prevent overflow */
}

/* Party Notes Card */
.party-notes-card {
    background: linear-gradient(165deg, #1e2128 0%, #12141a 50%, #0d0f14 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 
        0 4px 20px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.03);
}

.party-notes-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    color: #d4af37;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.party-notes-content {
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Drop cap for notes */
.party-notes-content::first-letter {
    font-size: 3.5rem;
    font-weight: 700;
    float: left;
    line-height: 0.85;
    margin-right: 0.5rem;
    color: #d4af37;
    font-family: 'Cinzel', serif;
}

.party-notes-textarea {
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-primary);
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    padding: 1rem;
    width: 100%;
    min-height: 150px;
    resize: vertical;
}

/* Party Invite Box */
.party-invite-box {
    background: linear-gradient(165deg, #1e2128 0%, #12141a 50%, #0d0f14 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: center;
    box-shadow: 
        0 4px 16px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.03);
}

.party-invite-box-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.party-invite-box-code {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: #d4af37;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
}

/* Party Session Card */
.party-session-card {
    background: linear-gradient(165deg, #1e2128 0%, #12141a 50%, #0d0f14 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 
        0 4px 16px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.03);
}

.party-session-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: #d4af37;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.party-session-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.party-session-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Party Chat Card */
.party-chat-card {
    background: linear-gradient(165deg, #1e2128 0%, #12141a 50%, #0d0f14 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 
        0 4px 16px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.03);
}

.party-chat-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: #d4af37;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.party-chat-messages {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
}

.party-chat-message {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.party-chat-message:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.party-chat-message-author {
    font-size: 0.875rem;
    font-weight: 600;
    color: #d4af37;
    margin-bottom: 0.25rem;
}

.party-chat-message-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.party-chat-message-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Party Admin Actions */
.party-admin-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.party-admin-actions .btn {
    font-size: 0.875rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.party-admin-actions .btn:hover {
    opacity: 1;
}

/* Characters Grid Fantasy */
.characters-grid-fantasy {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Played Adventures Section */
.party-adventures-card {
    background: #12141a;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.party-adventure-item {
    display: flex;
    justify-content: space-between;
    align-items: start;
    padding: 0.75rem;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border-left: 3px solid #d4af37;
}

.party-adventure-info {
    flex: 1;
}

.party-adventure-name {
    font-weight: 600;
    color: #f5f5f5;
    margin-bottom: 0.25rem;
}

.party-adventure-date {
    font-size: 0.75rem;
    color: #6b7280;
}

.party-adventure-notes {
    font-size: 0.8125rem;
    color: #a0a0a0;
    margin-top: 0.5rem;
    font-style: italic;
}

.add-adventure-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.add-adventure-row {
    display: flex;
    gap: 0.5rem;
}

.add-adventure-row input {
    flex: 1;
    background: #1e2128;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    color: #f5f5f5;
    font-size: 0.875rem;
}

.add-adventure-row input:focus {
    outline: none;
    border-color: rgba(212, 175, 55, 0.5);
}
