/* ==========================================================================
   Compendium D&D Character Manager - PDF & Print System Stylesheet
   Vectorial CSS Print Engine: 50/50 Combat Sheet, Poker Spell Cards, Dossier
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Reset & Global Print Root Wrappers (Hidden on regular screen)
   -------------------------------------------------------------------------- */
.compendium-print-landscape-root,
.compendium-print-cards-root,
.compendium-print-dossier-root,
.compendium-print-all-root {
    display: none;
}

/* --------------------------------------------------------------------------
   2. Screen Modal: Centro de Impresión y Exportación
   -------------------------------------------------------------------------- */
.compendium-export-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.compendium-export-modal {
    background: #ffffff;
    border-radius: 14px;
    width: 100%;
    max-width: 1280px;
    height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #1e293b;
}

.compendium-export-header {
    background: #1e1e24;
    color: #f8fafc;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #b45309;
}

.compendium-export-header h2 {
    margin: 0;
    font-family: 'Cinzel', serif;
    font-size: 19px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fbbf24;
}

.compendium-export-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #f8fafc;
    font-size: 20px;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.compendium-export-close-btn:hover {
    background: #ef4444;
}

/* Toolbar Controls */
.compendium-export-toolbar {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.compendium-export-tabs {
    display: flex;
    gap: 8px;
    background: #e2e8f0;
    padding: 4px;
    border-radius: 8px;
}

.compendium-tab-btn {
    border: none;
    background: transparent;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    color: #475569;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.compendium-tab-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.compendium-export-options {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.compendium-option-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
}

.compendium-option-item select,
.compendium-option-item input[type="checkbox"] {
    cursor: pointer;
}

.compendium-option-item select {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    font-size: 12px;
    font-weight: 500;
}

.compendium-print-action-btn {
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(180, 83, 9, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.15s, box-shadow 0.15s;
}

.compendium-print-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px -2px rgba(180, 83, 9, 0.4);
}

/* Modal Body / Live Preview Area */
.compendium-export-preview-viewport {
    flex: 1;
    background: #334155;
    overflow-y: auto;
    overflow-x: auto;
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.compendium-preview-scale-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

/* --------------------------------------------------------------------------
   3. A4 Format Dimensions & Common Components
   -------------------------------------------------------------------------- */
.sheet-page-landscape {
    width: 297mm;
    min-height: 210mm;
    max-height: 210mm;
    background: #ffffff;
    box-sizing: border-box;
    padding: 6mm;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    page-break-after: always;
    break-after: page;
}

.sheet-page-portrait {
    width: 210mm;
    min-height: 297mm;
    background: #ffffff;
    box-sizing: border-box;
    padding: 7mm;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    position: relative;
    page-break-after: always;
    break-after: page;
}

/* Theme: Parchment / Fantasy */
.theme-parchment {
    background-color: #fcf9f2;
    color: #1e1b18;
}

.theme-parchment .print-border-box {
    border: 1px solid #78350f;
    background: rgba(255, 255, 255, 0.6);
}

.theme-parchment .print-header-badge {
    background: #78350f;
    color: #fef3c7;
}

.theme-parchment .print-section-title {
    font-family: 'Cinzel', Georgia, serif;
    color: #78350f;
    border-bottom: 1.5px solid #b45309;
}

/* Theme: Economic (Ink Saver) */
.theme-eco {
    background-color: #ffffff !important;
    color: #000000 !important;
}

.theme-eco .print-border-box {
    border: 1px solid #333333 !important;
    background: #ffffff !important;
}

.theme-eco .print-header-badge {
    background: #333333 !important;
    color: #ffffff !important;
}

.theme-eco .print-section-title {
    font-family: 'Cinzel', Georgia, serif;
    color: #111111 !important;
    border-bottom: 1px solid #333333 !important;
}

/* --------------------------------------------------------------------------
   4. Format 1: Hoja de Combate A4 Horizontal (50/50 Layout)
   -------------------------------------------------------------------------- */
.sheet-50-50-container {
    display: flex;
    width: 100%;
    height: 100%;
    gap: 5mm;
    box-sizing: border-box;
    font-size: 8.5pt;
    line-height: 1.15;
}

.sheet-col-left,
.sheet-col-right {
    flex: 1;
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: 3mm;
    box-sizing: border-box;
}

/* Left Column Header */
.print-char-header {
    display: flex;
    flex-direction: column;
    border-bottom: 1.5px solid #78350f;
    padding-bottom: 2mm;
    margin-bottom: 1mm;
}

.print-char-name-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.print-char-name {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 15pt;
    font-weight: 800;
    color: #78350f;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.print-player-name {
    font-size: 7.5pt;
    color: #555555;
    font-style: italic;
}

.print-char-meta-grid {
    display: grid;
    grid-template-columns: 1.4fr 1.2fr 1fr 1fr;
    gap: 2mm;
    margin-top: 1mm;
    font-size: 7.5pt;
}

.print-meta-cell {
    border-bottom: 1px solid #ccc;
    padding-bottom: 1px;
}

.print-meta-label {
    font-size: 6pt;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    display: block;
}

.print-meta-val {
    font-weight: 600;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Attributes & Saves (Compact Row of 6) */
.print-stats-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5mm;
}

.print-stat-card {
    border: 1px solid #78350f;
    border-radius: 4px;
    text-align: center;
    padding: 1.5mm 0.5mm;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
}

.print-stat-label {
    font-family: 'Cinzel', serif;
    font-size: 6pt;
    font-weight: 800;
    color: #78350f;
    text-transform: uppercase;
}

.print-stat-mod {
    font-size: 13pt;
    font-weight: 900;
    color: #111;
    line-height: 1.1;
    margin: 0.5mm 0;
}

.print-stat-score-bubble {
    border: 1px solid #999;
    border-radius: 3px;
    font-size: 6.5pt;
    padding: 0.5px 3px;
    background: #f8f8f8;
    color: #333;
}

.print-stat-save {
    font-size: 6.5pt;
    margin-top: 1mm;
    display: flex;
    align-items: center;
    gap: 1.5px;
    color: #444;
}

.print-save-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    border: 1px solid #78350f;
}

.print-save-dot.proficient {
    background: #78350f;
}

/* Vitality & Defense Strip */
.print-vitality-grid {
    display: grid;
    grid-template-columns: 46px 46px 46px 1fr 1fr;
    gap: 2mm;
    align-items: stretch;
}

.print-badge-box {
    border: 1.5px solid #78350f;
    border-radius: 5px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1mm;
    background: #fff;
}

.print-badge-box.shield-badge {
    border-radius: 4px 4px 14px 14px;
    background: #fffdfa;
}

.print-badge-val {
    font-size: 12pt;
    font-weight: 900;
    color: #78350f;
    line-height: 1;
}

.print-badge-lbl {
    font-size: 5.5pt;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    margin-top: 1px;
}

.print-hp-box {
    border: 1px solid #78350f;
    border-radius: 4px;
    padding: 1.5mm 2mm;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.print-hp-row {
    display: flex;
    justify-content: space-between;
    font-size: 7pt;
}

.print-death-saves {
    border: 1px solid #78350f;
    border-radius: 4px;
    padding: 1.5mm 2mm;
    background: #fff;
    font-size: 6.5pt;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1mm;
}

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

.print-ds-circles {
    display: flex;
    gap: 2.5px;
}

.print-ds-circle {
    width: 6.5px;
    height: 6.5px;
    border-radius: 50%;
    border: 1px solid #78350f;
    background: #fff;
    display: inline-block;
}

/* Skills Block (3-column dense grid) */
.print-skills-container {
    border: 1px solid #78350f;
    border-radius: 4px;
    padding: 1.5mm 2mm;
    background: #fff;
}

.print-skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 3mm;
    row-gap: 0.8mm;
    font-size: 6.8pt;
}

.print-skill-item {
    display: flex;
    align-items: center;
    gap: 1.5px;
}

.print-skill-mod {
    font-weight: 800;
    width: 14px;
    text-align: right;
    color: #111;
}

.print-skill-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #222;
}

.print-skill-stat {
    font-size: 5.5pt;
    color: #777;
    margin-left: 1px;
}

/* Attacks Table */
.print-attacks-container {
    border: 1px solid #78350f;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.print-attacks-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 7pt;
}

.print-attacks-table th {
    background: #78350f;
    color: #fef3c7;
    font-family: 'Cinzel', serif;
    font-size: 6pt;
    text-align: left;
    padding: 1.2mm 1.5mm;
    text-transform: uppercase;
}

.print-attacks-table td {
    padding: 1.2mm 1.5mm;
    border-bottom: 1px solid #eee;
    color: #111;
}

.print-attacks-table tr:last-child td {
    border-bottom: none;
}

/* Spell Slots & Class Resources */
.print-slots-resources-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2mm;
}

.print-slots-box {
    border: 1px solid #78350f;
    border-radius: 4px;
    padding: 1.5mm 2mm;
    background: #fff;
}

.print-slots-title {
    font-family: 'Cinzel', serif;
    font-size: 6.5pt;
    font-weight: 700;
    color: #78350f;
    margin-bottom: 1mm;
}

.print-slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1mm;
    font-size: 6.5pt;
}

.print-slot-level-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

.print-slot-bubble {
    width: 6.5px;
    height: 6.5px;
    border-radius: 50%;
    border: 1px solid #78350f;
    display: inline-block;
    background: #fff;
}

.print-prof-senses-box {
    border: 1px solid #78350f;
    border-radius: 4px;
    padding: 1.5mm 2mm;
    background: #fff;
    font-size: 6.5pt;
    display: flex;
    flex-direction: column;
    gap: 0.8mm;
}

/* --------------------------------------------------------------------------
   5. Right Column: Spells Table & Combat Features
   -------------------------------------------------------------------------- */
.print-spells-table-wrap {
    border: 1px solid #78350f;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    flex: 1.2;
}

.print-spells-combat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 6.8pt;
}

.print-spells-combat-table th {
    background: #78350f;
    color: #fef3c7;
    font-family: 'Cinzel', serif;
    font-size: 6pt;
    text-align: left;
    padding: 1mm 1.2mm;
    text-transform: uppercase;
}

.print-spells-combat-table td {
    padding: 0.9mm 1.2mm;
    border-bottom: 1px solid #f0eae1;
    color: #111;
    line-height: 1.1;
}

.print-spells-combat-table tr:nth-child(even) {
    background: #faf8f5;
}

.print-features-combat-box {
    border: 1px solid #78350f;
    border-radius: 4px;
    padding: 2mm;
    background: #fff;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.print-features-title {
    font-family: 'Cinzel', serif;
    font-size: 7.5pt;
    font-weight: 700;
    color: #78350f;
    border-bottom: 1px solid #b45309;
    padding-bottom: 0.8mm;
    margin-bottom: 1.5mm;
}

.print-features-scroll-list {
    display: flex;
    flex-direction: column;
    gap: 1.2mm;
    font-size: 6.8pt;
    line-height: 1.2;
}

.print-feature-compact-item {
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 1mm;
}

.print-feature-compact-name {
    font-weight: 700;
    color: #78350f;
}

.print-feature-compact-tag {
    font-size: 5.5pt;
    background: #fef3c7;
    color: #92400e;
    padding: 0.5px 3px;
    border-radius: 2px;
    margin-left: 2px;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   6. Format 2: Tarjetas de Conjuros Recortables (Poker Size 3x3 Grid)
   -------------------------------------------------------------------------- */
.spell-cards-a4-page {
    width: 210mm;
    min-height: 297mm;
    max-height: 297mm;
    box-sizing: border-box;
    padding: 6.5mm;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    page-break-after: always;
    break-after: page;
    display: flex;
    flex-direction: column;
}

.spell-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 63.5mm);
    grid-template-rows: repeat(3, 88.9mm);
    gap: 1.5mm;
    justify-content: center;
    align-content: center;
    box-sizing: border-box;
}

/* Individual Poker Card */
.spell-poker-card {
    width: 63.5mm;
    height: 88.9mm;
    border: 1px solid #78350f;
    border-radius: 4mm;
    box-sizing: border-box;
    padding: 2.5mm;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    font-size: 6.5pt;
    line-height: 1.2;
    color: #1e1b18;
}

/* Crop Marks for Scissors */
.spell-poker-card::before {
    content: '';
    position: absolute;
    top: 1mm;
    left: 1mm;
    right: 1mm;
    bottom: 1mm;
    border: 0.5px dashed rgba(120, 53, 15, 0.3);
    border-radius: 3mm;
    pointer-events: none;
}

.spell-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1.2px solid #78350f;
    padding-bottom: 1mm;
    margin-bottom: 1mm;
}

.spell-card-title {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 8pt;
    font-weight: 800;
    color: #78350f;
    text-transform: uppercase;
    line-height: 1.1;
    max-width: 44mm;
    white-space: normal;
}

.spell-card-badge {
    background: #78350f;
    color: #fef3c7;
    font-family: 'Cinzel', serif;
    font-size: 5.5pt;
    font-weight: 700;
    padding: 0.8px 3px;
    border-radius: 3px;
    white-space: nowrap;
    text-align: right;
}

.spell-card-school-row {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 5.8pt;
    color: #92400e;
    font-weight: 600;
    margin-bottom: 1mm;
}

.spell-card-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8mm;
    background: #faf8f5;
    border: 0.5px solid #e8e2d5;
    border-radius: 2px;
    padding: 1mm;
    margin-bottom: 1mm;
    font-size: 5.8pt;
}

.spell-card-meta-item {
    display: flex;
    flex-direction: column;
}

.spell-card-meta-lbl {
    font-size: 4.8pt;
    color: #78350f;
    font-weight: 700;
    text-transform: uppercase;
}

.spell-card-meta-val {
    font-weight: 600;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Quick Combat Highlight Strip */
.spell-card-combat-strip {
    background: #fef3c7;
    border: 0.5px solid #d97706;
    border-radius: 2px;
    padding: 0.8mm 1.5mm;
    margin-bottom: 1mm;
    display: flex;
    justify-content: space-between;
    font-size: 6pt;
    font-weight: 700;
    color: #78350f;
}

.spell-card-body {
    flex: 1;
    overflow: hidden;
    font-size: 5.8pt;
    line-height: 1.25;
    color: #222;
    text-align: justify;
}

.spell-card-body p {
    margin: 0 0 1mm 0;
}

.spell-card-higher {
    border-top: 0.5px dashed #78350f;
    padding-top: 0.8mm;
    margin-top: 0.8mm;
    font-size: 5.4pt;
    color: #444;
    font-style: italic;
    background: #fcfbf9;
}

/* --------------------------------------------------------------------------
   7. Format 3: Dossier de Referencia Completa (A4 Vertical)
   -------------------------------------------------------------------------- */
.dossier-a4-page {
    width: 210mm;
    min-height: 297mm;
    box-sizing: border-box;
    padding: 8mm;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    page-break-after: always;
    break-after: page;
    font-size: 8pt;
    line-height: 1.3;
}

.dossier-header {
    border-bottom: 2px solid #78350f;
    padding-bottom: 3mm;
    margin-bottom: 4mm;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.dossier-title {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 16pt;
    font-weight: 800;
    color: #78350f;
    margin: 0;
    text-transform: uppercase;
}

.dossier-2col-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6mm;
}

.dossier-section {
    margin-bottom: 4mm;
}

.dossier-section-title {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 9.5pt;
    font-weight: 700;
    color: #78350f;
    border-bottom: 1px solid #b45309;
    padding-bottom: 1mm;
    margin-bottom: 2mm;
    text-transform: uppercase;
}

.dossier-feature-card {
    margin-bottom: 2.5mm;
    padding-bottom: 2mm;
    border-bottom: 0.5px solid #e2e8f0;
}

.dossier-feature-name {
    font-weight: 700;
    color: #78350f;
    font-size: 8.5pt;
}

.dossier-feature-desc {
    color: #334155;
    margin-top: 1mm;
    text-align: justify;
}

/* Inventory Table in Dossier */
.dossier-inventory-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 7.5pt;
}

.dossier-inventory-table th {
    background: #78350f;
    color: #fef3c7;
    font-family: 'Cinzel', serif;
    font-size: 6.5pt;
    text-align: left;
    padding: 1.2mm;
}

.dossier-inventory-table td {
    padding: 1.2mm;
    border-bottom: 1px solid #e2e8f0;
}

/* --------------------------------------------------------------------------
   8. NATIVE BROWSER PRINT ENGINE (@media print & @page)
   -------------------------------------------------------------------------- */
@media print {
    /* Hide all browser / CMS wrapper elements */
    html, body {
        background: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Hide all browser / CMS wrapper elements and interactive screen UI */
    #wpadminbar,
    #adminmenumain,
    #adminmenuback,
    #adminmenuwrap,
    #wpfooter,
    #wpbody-content > .wrap > h1,
    .dnd-sheet-container > .dnd-top-bar,
    .dnd-sheet-container > .dnd-header,
    .dnd-sheet-container > .dnd-nav-tabs,
    .dnd-sheet-container > .dnd-tab-content,
    .dnd-sheet-container > .dnd-modal-overlay,
    .dnd-modal-overlay,
    .compendium-export-modal-overlay,
    .site-header,
    .site-footer,
    .nav,
    .sidebar {
        display: none !important;
    }

    /* Keep sheet container transparent & unconstrained for print */
    .dnd-sheet-container {
        display: block !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
        width: 100% !important;
    }

    /* Print Root Displays based on active target or print mode */
    .compendium-print-landscape-root.active-print-target,
    body[data-compendium-print-mode="landscape"] .compendium-print-landscape-root {
        display: block !important;
    }

    .compendium-print-cards-root.active-print-target,
    body[data-compendium-print-mode="cards"] .compendium-print-cards-root {
        display: block !important;
    }

    .compendium-print-dossier-root.active-print-target,
    body[data-compendium-print-mode="dossier"] .compendium-print-dossier-root {
        display: block !important;
    }

    .compendium-print-all-root.active-print-target,
    body[data-compendium-print-mode="all"] .compendium-print-all-root {
        display: block !important;
    }

    /* Reset shadow and layout for print pages */
    .sheet-page-landscape,
    .sheet-page-portrait,
    .spell-cards-a4-page,
    .dossier-a4-page {
        box-shadow: none !important;
        margin: 0 !important;
        width: 100% !important;
    }

    /* Page size & break rules */
    body[data-compendium-print-mode="landscape"] {
        @page {
            size: 297mm 210mm landscape;
            margin: 5mm;
        }
    }

    body[data-compendium-print-mode="cards"],
    body[data-compendium-print-mode="dossier"] {
        @page {
            size: 210mm 297mm portrait;
            margin: 6mm;
        }
    }

    /* Eco theme overrides during print */
    body[data-compendium-print-theme="eco"] * {
        background-color: transparent !important;
        box-shadow: none !important;
        color: #000000 !important;
    }

    body[data-compendium-print-theme="eco"] .print-border-box,
    body[data-compendium-print-theme="eco"] .spell-poker-card,
    body[data-compendium-print-theme="eco"] .print-stat-card,
    body[data-compendium-print-theme="eco"] .print-badge-box,
    body[data-compendium-print-theme="eco"] .print-hp-box,
    body[data-compendium-print-theme="eco"] .print-skills-container,
    body[data-compendium-print-theme="eco"] .print-attacks-container,
    body[data-compendium-print-theme="eco"] .print-slots-box,
    body[data-compendium-print-theme="eco"] .print-prof-senses-box,
    body[data-compendium-print-theme="eco"] .print-spells-table-wrap,
    body[data-compendium-print-theme="eco"] .print-features-combat-box {
        border-color: #000000 !important;
        background: #ffffff !important;
    }

    body[data-compendium-print-theme="eco"] .print-attacks-table th,
    body[data-compendium-print-theme="eco"] .print-spells-combat-table th,
    body[data-compendium-print-theme="eco"] .dossier-inventory-table th {
        background: #333333 !important;
        color: #ffffff !important;
    }

    body[data-compendium-print-theme="eco"] .spell-card-combat-strip {
        background: #f0f0f0 !important;
        border-color: #333333 !important;
        color: #000000 !important;
    }

    /* CorelDraw Eco Mode Overrides */
    body[data-compendium-print-theme="eco"] .corel-page-frame {
        border-color: #000000 !important;
        outline-color: #000000 !important;
        background: #ffffff !important;
    }
    body[data-compendium-print-theme="eco"] .corel-campaign-ribbon,
    body[data-compendium-print-theme="eco"] .corel-box-header,
    body[data-compendium-print-theme="eco"] .corel-spell-level-banner {
        background: #222222 !important;
        color: #ffffff !important;
        border-color: #000000 !important;
    }
    body[data-compendium-print-theme="eco"] .corel-stat-capsule,
    body[data-compendium-print-theme="eco"] .corel-level-crest,
    body[data-compendium-print-theme="eco"] .corel-ac-shield-shape,
    body[data-compendium-print-theme="eco"] .corel-hp-card,
    body[data-compendium-print-theme="eco"] .corel-pill-card,
    body[data-compendium-print-theme="eco"] .corel-box,
    body[data-compendium-print-theme="eco"] .corel-coin-pouch {
        border-color: #000000 !important;
        background: #ffffff !important;
        color: #000000 !important;
    }
    body[data-compendium-print-theme="eco"] .corel-slot-bubble.spent,
    body[data-compendium-print-theme="eco"] .corel-ammo-pip.spent,
    body[data-compendium-print-theme="eco"] .corel-skill-dot.proficient,
    body[data-compendium-print-theme="eco"] .corel-attune-pip.active,
    body[data-compendium-print-theme="eco"] .corel-sp-prep-circle.prepared {
        background: #000000 !important;
        border-color: #000000 !important;
    }
}

/* ==========================================================================
   9. CORELDRAW SPREAD LAYOUT SYSTEM (PÁGINA 1: COMBATE & PÁGINA 2: CONJUROS)
   Diseño inspirado en la hoja apaisada artesanal de CorelDraw (A4 Horizontal)
   ========================================================================== */

.corel-sheet-wrapper {
    width: 100%;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #2b1d0c;
}

/* Barra de Herramientas de Pantalla Interactiva */
.corel-screen-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1c1917;
    border: 1.5px solid #78350f;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    flex-wrap: wrap;
    gap: 12px;
}

.corel-toolbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.corel-toolbar-title {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 700;
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.corel-page-tabs {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    padding: 3px;
    border-radius: 6px;
}

.corel-tab-btn {
    background: transparent;
    border: none;
    color: #d6d3d1;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.corel-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.corel-tab-btn.active {
    background: #b45309;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.corel-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Hoja A4 Apaisada (297mm × 210mm) */
.corel-a4-page {
    width: 297mm;
    min-height: 210mm;
    max-height: 210mm;
    background: #fcf9f2;
    box-sizing: border-box;
    padding: 5mm;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
    margin: 0 auto 25px auto;
    page-break-after: always;
    break-after: page;
}

/* Marco Fantasía con doble filete estilo Corel */
.corel-page-frame {
    border: 2px solid #5c3d1e;
    outline: 1px solid #78350f;
    outline-offset: -4px;
    padding: 3.5mm;
    background: rgba(255, 255, 255, 0.7);
    box-sizing: border-box;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 1. Cabecera Superior */
.corel-header-strip {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2mm;
    border-bottom: 1.5px solid #78350f;
    padding-bottom: 1.5mm;
}

.corel-campaign-ribbon {
    display: inline-block;
    background: #2b1d0c;
    color: #fef3c7;
    font-family: 'Cinzel', serif;
    font-size: 7.5pt;
    font-weight: 800;
    letter-spacing: 2px;
    padding: 1.5px 24px;
    border-radius: 3px;
    border: 1px solid #b45309;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 1.5mm;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.corel-ribbon-input {
    background: transparent;
    border: none;
    color: #fef3c7;
    font-family: 'Cinzel', serif;
    font-size: 7.5pt;
    font-weight: 800;
    text-align: center;
    letter-spacing: 2px;
    outline: none;
}

.corel-identity-grid {
    display: grid;
    grid-template-columns: 185px 65px 235px 1fr;
    gap: 3mm;
    align-items: center;
    width: 100%;
}

.corel-name-box {
    display: flex;
    flex-direction: column;
}

.corel-name-banner {
    background: #ffffff;
    border: 1.5px solid #78350f;
    border-radius: 4px;
    padding: 1.5px 8px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.corel-name-text {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 13pt;
    font-weight: 900;
    color: #78350f;
    margin: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.corel-name-input {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 13pt;
    font-weight: 900;
    color: #78350f;
    text-align: center;
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
}

.corel-inspiration-strip {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 1.5mm;
}

.corel-insp-pill {
    border: 1px solid #78350f;
    border-radius: 12px;
    font-size: 6pt;
    font-weight: 700;
    padding: 1.5px 6px;
    display: flex;
    align-items: center;
    gap: 3px;
    background: #ffffff;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}

.corel-insp-pill.active {
    background: #fef08a;
    border-color: #ca8a04;
    color: #854d0e;
    box-shadow: 0 0 5px rgba(202, 138, 4, 0.4);
}

.corel-pb-badge {
    font-size: 5.5pt;
    color: #555555;
    display: flex;
    align-items: center;
    gap: 3px;
    line-height: 1;
}

.corel-pb-val {
    font-size: 8.5pt;
    font-weight: 900;
    color: #78350f;
}

.corel-pb-lbl {
    font-size: 5pt;
    text-transform: uppercase;
    font-weight: 600;
}

/* Escudo Central de Nivel */
.corel-level-crest {
    border: 2px solid #78350f;
    border-radius: 4px 4px 18px 18px;
    background: #fffdf9;
    text-align: center;
    padding: 1.5mm 1mm;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.corel-level-lbl {
    font-family: 'Cinzel', serif;
    font-size: 5.5pt;
    font-weight: 800;
    color: #78350f;
}

.corel-level-val {
    font-size: 15pt;
    font-weight: 900;
    color: #111;
    line-height: 1;
    margin-top: 1px;
}

/* Píldoras de Metadatos */
.corel-meta-pills {
    display: flex;
    flex-direction: column;
    gap: 1.5mm;
    font-size: 6.5pt;
}

.corel-meta-pill {
    border: 1px solid #78350f;
    border-radius: 4px;
    padding: 1.5px 6px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.corel-pill-label {
    font-size: 5pt;
    font-weight: 700;
    color: #78350f;
    text-transform: uppercase;
}

.corel-pill-val {
    font-weight: 700;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Vitalidad Cluster */
.corel-vitals-cluster {
    display: flex;
    gap: 2mm;
    align-items: center;
    justify-content: flex-end;
}

.corel-ac-shield-unit {
    display: flex;
    align-items: center;
    gap: 1.5mm;
}

.corel-ac-sub-badges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    font-size: 5pt;
    text-align: center;
}

.corel-ac-sub {
    border: 0.8px solid #78350f;
    border-radius: 2px;
    padding: 0.5px 2px;
    background: #ffffff;
    min-width: 18px;
}

.corel-ac-sub .lbl {
    color: #666;
    font-size: 4.5pt;
    display: block;
}

.corel-ac-sub .val {
    font-weight: 700;
    color: #111;
}

.corel-ac-shield-shape {
    width: 36px;
    height: 40px;
    border: 2px solid #78350f;
    border-radius: 4px 4px 18px 18px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.corel-ac-num {
    font-size: 13.5pt;
    font-weight: 900;
    color: #78350f;
    line-height: 1;
}

.corel-ac-tag {
    font-family: 'Cinzel', serif;
    font-size: 5.5pt;
    font-weight: 800;
    color: #666;
}

.corel-hp-card {
    border: 1.5px solid #78350f;
    border-radius: 5px;
    padding: 1.5mm 3mm;
    background: #ffffff;
    text-align: center;
    min-width: 65px;
}

.corel-hp-crest {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 3px;
}

.corel-hp-val {
    font-size: 13pt;
    font-weight: 900;
    color: #b91c1c;
    line-height: 1;
}

.corel-hp-max {
    font-size: 6.5pt;
    font-weight: 700;
    color: #666;
}

.corel-hp-sub {
    font-size: 5.5pt;
    color: #b45309;
    margin-top: 1px;
}

.corel-hp-quick-row {
    display: flex;
    gap: 2px;
    justify-content: center;
    margin-top: 2px;
}

.corel-hp-quick-row button {
    border: 0.8px solid #cbd5e1;
    background: #f8fafc;
    border-radius: 2px;
    font-size: 5pt;
    padding: 0.5px 3px;
    cursor: pointer;
}

.corel-pill-card {
    border: 1.5px solid #78350f;
    border-radius: 4px;
    padding: 1.5mm 2.5mm;
    background: #ffffff;
    text-align: center;
    min-width: 40px;
    cursor: pointer;
}

.corel-card-val {
    font-size: 11pt;
    font-weight: 900;
    color: #2b1d0c;
    line-height: 1;
    display: block;
}

.corel-card-lbl {
    font-size: 5pt;
    font-weight: 700;
    color: #78350f;
    text-transform: uppercase;
    margin-top: 1px;
    display: block;
}

.corel-ds-card {
    border: 1px solid #78350f;
    border-radius: 4px;
    padding: 1.2mm 2mm;
    background: #ffffff;
    font-size: 5.5pt;
    display: flex;
    flex-direction: column;
    gap: 1.5px;
}

.corel-ds-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
}

.ds-lbl {
    font-size: 4.8pt;
    font-weight: 700;
}

.ds-lbl.ds-ok { color: #15803d; }
.ds-lbl.ds-fail { color: #dc2626; }

.corel-ds-pips {
    display: flex;
    gap: 2px;
}

.corel-ds-pip {
    width: 6.5px;
    height: 6.5px;
    border: 1px solid #78350f;
    border-radius: 50%;
    cursor: pointer;
    background: #ffffff;
}

.corel-ds-pip.ok.active { background: #15803d; border-color: #15803d; }
.corel-ds-pip.fail.active { background: #dc2626; border-color: #dc2626; }

/* 2. Distribución en 3 Columnas */
.corel-body-columns {
    display: flex;
    gap: 3.5mm;
    flex: 1;
    box-sizing: border-box;
    align-items: stretch;
}

.corel-col-left {
    width: 30.5%;
    display: flex;
    flex-direction: column;
    gap: 2mm;
}

.corel-col-center {
    width: 37.5%;
    display: flex;
    flex-direction: column;
    gap: 2mm;
}

.corel-col-right {
    width: 32%;
    display: flex;
    flex-direction: column;
    gap: 2mm;
}

/* Atributos emparejados con Habilidades */
.corel-abilities-block {
    display: flex;
    flex-direction: column;
    gap: 1.2mm;
}

.corel-ability-row {
    display: flex;
    gap: 2mm;
    align-items: center;
}

.corel-stat-capsule {
    width: 44px;
    border: 1.5px solid #78350f;
    border-radius: 5px;
    background: #ffffff;
    padding: 1mm 0.5mm;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    cursor: pointer;
    flex-shrink: 0;
}

.corel-stat-name {
    font-family: 'Cinzel', serif;
    font-size: 5.5pt;
    font-weight: 800;
    color: #78350f;
    line-height: 1;
}

.corel-stat-mod {
    font-size: 11pt;
    font-weight: 900;
    color: #111;
    line-height: 1.1;
    margin: 1px 0;
}

.corel-stat-score-bubble {
    border: 0.8px solid #bbb;
    border-radius: 2px;
    font-size: 5.5pt;
    font-weight: 700;
    padding: 0.5px 3px;
    background: #fdfaf4;
}

.corel-stat-save-pip {
    margin-top: 1mm;
    font-size: 5.5pt;
    display: flex;
    align-items: center;
    gap: 1.5px;
}

.corel-save-dot {
    width: 5px;
    height: 5px;
    border: 1px solid #78350f;
    border-radius: 50%;
    background: #ffffff;
}

.corel-stat-save-pip.proficient .corel-save-dot {
    background: #78350f;
}

.corel-save-val {
    font-weight: 700;
    color: #333;
}

.corel-stat-skills-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    font-size: 6pt;
}

.corel-skill-entry {
    display: flex;
    align-items: center;
    gap: 2.5px;
    padding: 0.6px 2px;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.15s;
}

.corel-skill-entry:hover {
    background: rgba(180, 83, 9, 0.08);
}

.corel-skill-dot {
    width: 5.5px;
    height: 5.5px;
    border: 1px solid #78350f;
    border-radius: 50%;
    background: #ffffff;
    flex-shrink: 0;
}

.corel-skill-dot.proficient { background: #78350f; }
.corel-skill-dot.expert { background: #b45309; border-width: 1.5px; }
.corel-skill-dot.half { background: linear-gradient(90deg, #78350f 50%, #ffffff 50%); }

.corel-skill-mod {
    font-weight: 800;
    font-size: 6.5pt;
    color: #2b1d0c;
    width: 14px;
    text-align: right;
}

.corel-skill-title {
    font-weight: 600;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sentidos Pasivos */
.corel-passive-senses-row {
    display: flex;
    gap: 1.5mm;
    margin: 0.5mm 0;
}

.corel-passive-pill {
    flex: 1;
    border: 1px solid #78350f;
    border-radius: 4px;
    padding: 1mm 0.5mm;
    background: #ffffff;
    text-align: center;
}

.corel-p-num {
    font-size: 8.5pt;
    font-weight: 900;
    color: #78350f;
    display: block;
    line-height: 1;
}

.corel-p-lbl {
    font-size: 4.5pt;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    margin-top: 1px;
    display: block;
}

/* Cajas Genéricas con Borde y Encabezado */
.corel-box {
    border: 1px solid #78350f;
    border-radius: 4px;
    background: #ffffff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.corel-box-header {
    background: #78350f;
    color: #fef3c7;
    font-family: 'Cinzel', serif;
    font-size: 6pt;
    font-weight: 700;
    padding: 1px 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.corel-box-content {
    padding: 1.5mm 2mm;
    font-size: 6.2pt;
    color: #2b1d0c;
    line-height: 1.25;
}

.corel-fam-stats-row {
    display: flex;
    justify-content: space-between;
    font-size: 6.2pt;
}

.corel-fam-substats {
    font-size: 5.2pt;
    color: #777;
    margin-top: 0.5mm;
}

.corel-notes-clip {
    font-size: 6pt;
    line-height: 1.3;
}

/* Columna Central: Espacios & Aptitud */
.corel-magic-hub-content {
    display: flex;
    gap: 3mm;
    padding: 1.5mm 2mm;
    align-items: center;
}

.corel-slots-ladder {
    flex: 1.3;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.corel-slot-ladder-row {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 6pt;
}

.corel-lvl-tag {
    font-weight: 800;
    color: #78350f;
    width: 12px;
}

.corel-slot-bubbles-strip {
    display: flex;
    gap: 2px;
}

.corel-slot-bubble {
    width: 7.5px;
    height: 7.5px;
    border: 1px solid #78350f;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
}

.corel-slot-bubble.spent {
    background: #78350f;
}

.corel-spell-dc-badges {
    flex: 1;
    display: flex;
    gap: 2mm;
    justify-content: flex-end;
}

.corel-hex-badge {
    width: 38px;
    border: 1.5px solid #78350f;
    border-radius: 4px;
    background: #fffdf9;
    text-align: center;
    padding: 1mm 0.5mm;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.corel-hex-val {
    font-size: 11pt;
    font-weight: 900;
    color: #78350f;
    line-height: 1;
}

.corel-hex-lbl {
    font-size: 4.5pt;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    margin-top: 1px;
}

/* Tabla de Ataques & Armas */
.corel-attacks-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 6.2pt;
}

.corel-attacks-table th {
    background: #fdfaf4;
    color: #78350f;
    font-family: 'Cinzel', serif;
    font-size: 5.5pt;
    text-align: left;
    padding: 1mm;
    border-bottom: 1px solid #78350f;
}

.corel-attacks-table td {
    padding: 1mm;
    border-bottom: 0.5px solid #eee;
}

.corel-atk-clickable {
    cursor: pointer;
    font-weight: 700;
    color: #78350f;
}

.corel-atk-clickable:hover {
    text-decoration: underline;
}

.corel-ammo-tracker-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 1mm 2mm;
    background: #fbf8f2;
    border-top: 1px solid #ddd;
    font-size: 5.5pt;
    font-weight: 700;
}

.corel-ammo-pips {
    display: flex;
    gap: 2px;
}

.corel-ammo-pip {
    width: 6.5px;
    height: 6.5px;
    border: 1px solid #78350f;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
}

.corel-ammo-pip.spent {
    background: #78350f;
}

.corel-stone-checks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5mm;
    margin-top: 1mm;
    font-size: 5.8pt;
}

/* Monedas / Riqueza */
.corel-coins-row {
    display: flex;
    gap: 2mm;
    padding: 1.5mm 2mm;
    justify-content: space-between;
}

.corel-coin-pouch {
    flex: 1;
    border: 1px solid #78350f;
    border-radius: 4px;
    background: #ffffff;
    text-align: center;
    padding: 1mm;
}

.corel-coin-pouch.gold {
    background: #fffbeb;
    border-color: #d97706;
}

.corel-coin-pouch.plat {
    background: #f8fafc;
    border-color: #64748b;
}

.corel-coin-pouch .val {
    font-size: 8pt;
    font-weight: 800;
    color: #2b1d0c;
    display: block;
    line-height: 1;
}

.corel-coin-pouch .lbl {
    font-size: 4.5pt;
    font-weight: 700;
    color: #78350f;
    text-transform: uppercase;
    display: block;
    margin-top: 1px;
}

/* Columna Derecha: Sintonización & Rasgos */
.corel-attune-slot-row {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 1mm;
    font-size: 6pt;
}

.corel-attune-pip {
    width: 7px;
    height: 7px;
    border: 1px solid #78350f;
    border-radius: 50%;
    background: #ffffff;
    flex-shrink: 0;
}

.corel-attune-pip.active {
    background: #78350f;
}

.corel-attune-name {
    font-weight: 600;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.corel-trait-line {
    margin-bottom: 1.2mm;
    font-size: 6pt;
    line-height: 1.3;
}

.corel-scroll-text {
    max-height: 48mm;
    overflow-y: auto;
}

/* ==========================================================================
   PÁGINA 2: LIBRO DE CONJUROS EN 3 COLUMNAS
   ========================================================================== */
.spells-header {
    border-bottom: 2px solid #78350f;
    padding-bottom: 2mm;
    margin-bottom: 2mm;
}

.corel-spells-page-title {
    font-family: 'Cinzel', serif;
    font-size: 13pt;
    font-weight: 900;
    color: #78350f;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.corel-spells-3col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 3.5mm;
    flex: 1;
    align-items: start;
}

.corel-spell-col {
    display: flex;
    flex-direction: column;
    gap: 2.2mm;
}

.corel-spell-level-section {
    border: 1px solid #78350f;
    border-radius: 4px;
    background: #ffffff;
    overflow: hidden;
}

.corel-spell-level-banner {
    background: #78350f;
    color: #fef3c7;
    font-family: 'Cinzel', serif;
    font-size: 6.2pt;
    font-weight: 700;
    padding: 1mm 2mm;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
}

.corel-banner-slots {
    display: flex;
    gap: 2px;
}

.corel-banner-slot-bubble {
    width: 6.5px;
    height: 6.5px;
    border: 1px solid #fef3c7;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.corel-banner-slot-bubble.spent {
    background: #fef3c7;
}

.corel-spell-list-items {
    display: flex;
    flex-direction: column;
}

.corel-spell-row {
    display: flex;
    gap: 2.5px;
    padding: 0.8mm 1.5mm;
    border-bottom: 0.5px solid #f0eae1;
    align-items: baseline;
    cursor: pointer;
    transition: background 0.15s;
}

.corel-spell-row:hover {
    background: #fffdf9;
}

.corel-sp-prep-circle {
    width: 5.5px;
    height: 5.5px;
    border: 1px solid #78350f;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 1.5px;
    background: #ffffff;
}

.corel-sp-prep-circle.prepared {
    background: #78350f;
}

.corel-sp-text {
    flex: 1;
    line-height: 1.15;
}

.corel-sp-title-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.corel-sp-name {
    font-size: 6pt;
    font-weight: 800;
    color: #2b1d0c;
    text-transform: uppercase;
}

.corel-sp-meta-pill {
    font-size: 4.8pt;
    color: #666;
}

.corel-sp-desc-line {
    font-size: 5.2pt;
    color: #444;
    margin-top: 0.5px;
}

.corel-sp-empty {
    font-size: 5.5pt;
    color: #888;
    font-style: italic;
    padding: 1.5mm 2mm;
    text-align: center;
}

/* Custom Resources & Trackers in Corel View */
.corel-resources-container {
    display: flex;
    flex-direction: column;
    gap: 1.2mm;
}
.corel-resource-item {
    background: #fbf9f4;
    border: 1px solid #e0dacf;
    border-radius: 3px;
    padding: 1mm 1.5mm;
}
.corel-res-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 6.2pt;
    margin-bottom: 0.8mm;
    color: #443c33;
}
.corel-res-counter {
    font-weight: 800;
    color: #78350f;
    font-size: 6pt;
}
.corel-res-pips {
    display: flex;
    gap: 1.5mm;
    flex-wrap: wrap;
}
.corel-res-pip {
    width: 6.5px;
    height: 6.5px;
    border-radius: 50%;
    border: 1px solid #78350f;
    background: #78350f;
    cursor: pointer;
    transition: all 0.15s ease;
}
.corel-res-pip.spent {
    background: #fff;
    border-color: #a8a29e;
}

/* Notes Textareas for Screen Interactive Mode */
.corel-notes-textarea {
    width: 100%;
    min-height: 22mm;
    background: #faf7f2;
    border: 1px solid #e0d8cc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 6.5pt;
    padding: 1.5mm;
    box-sizing: border-box;
    resize: vertical;
    color: #2b1d0c;
}
.corel-notes-textarea:focus {
    outline: none;
    border-color: #78350f;
    background: #fff;
}

/* ==========================================================================
   COMPENDIUM PANORAMA SHEET - REORGANIZACIÓN HORIZONTAL ESTILO ESTÁNDAR
   ========================================================================== */
.panorama-interactive-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    font-family: inherit;
    color: #2b1d0c;
}

.panorama-main-sheet {
    margin-bottom: 24px;
}

.panorama-ac-breakdown {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 11px;
    color: #666;
    background: #ffffff;
    border: 1px solid #e2ded4;
    border-radius: 12px;
    padding: 2px 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.panorama-ac-breakdown strong {
    color: #8b0000;
    font-weight: 800;
}

.panorama-3col-grid {
    display: grid;
    grid-template-columns: 280px 1.15fr 1fr;
    gap: 16px;
    align-items: start;
}
@media (max-width: 860px) {
    .panorama-3col-grid {
        grid-template-columns: 1fr;
    }
}

.panorama-col {
    display: flex;
    flex-direction: column;
}

.panorama-col textarea {
    width: 100%;
    background: #fdfbf7;
    border: 1px solid #dcd7cc;
    border-radius: 6px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 12px;
    box-sizing: border-box;
    resize: vertical;
    color: #333;
    transition: border-color 0.2s;
}
.panorama-col textarea:focus {
    outline: none;
    border-color: #8b0000;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(139,0,0,0.1);
}

.panorama-abilities-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.panorama-ability-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    background: #fdfbf7;
    border: 1px solid #e5dfd2;
    border-radius: 8px;
    padding: 8px 10px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.panorama-ability-row:hover {
    border-color: #c5a059;
    background: #ffffff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}
.panorama-stat-capsule {
    width: 68px;
    background: linear-gradient(180deg, #ffffff 0%, #f4ede1 100%);
    border: 2px solid #8b0000;
    border-radius: 8px 8px 18px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 4px 5px;
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    user-select: none;
    transition: transform 0.15s ease;
    text-align: center;
}
.panorama-stat-capsule:hover {
    transform: translateY(-1px);
}
.panorama-stat-name {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    color: #8b0000;
    letter-spacing: 0.5px;
    line-height: 1;
}
.panorama-stat-mod {
    font-size: 20px;
    font-weight: 900;
    color: #222;
    line-height: 1.1;
    margin: 2px 0;
}
.panorama-stat-score {
    font-size: 10.5px;
    font-weight: bold;
    color: #555;
    background: #fff;
    padding: 0 5px;
    border-radius: 4px;
    border: 1px solid #ddd;
    line-height: 1.4;
}
.panorama-stat-save {
    margin-top: 5px;
    width: 100%;
    font-size: 9.5px;
    font-weight: 700;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: #fff;
    padding: 2px 4px;
    border-radius: 4px;
    border: 1px solid #e0dacf;
    box-sizing: border-box;
    cursor: pointer;
    transition: all 0.15s ease;
}
.panorama-stat-save:hover {
    border-color: #8b0000;
    color: #8b0000;
}
.panorama-stat-save.proficient {
    background: #fdf5e6;
    border-color: #d4af37;
    color: #8b0000;
    font-weight: 800;
}
.save-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1.5px solid #8b0000;
    display: inline-block;
    flex-shrink: 0;
}
.panorama-stat-save.proficient .save-dot {
    background: #8b0000;
}
.panorama-stat-skills {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-width: 0;
}
.panorama-skill-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 6px;
    background: #ffffff;
    border: 1px solid #eee7da;
    border-radius: 4px;
    font-size: 11.5px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.panorama-skill-item:hover {
    background: #fffdfa;
    border-color: #c5a059;
}
.panorama-skill-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
}
.panorama-skill-name {
    font-weight: 600;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.panorama-skill-mod {
    font-weight: 800;
    font-size: 12px;
    color: #8b0000;
    min-width: 22px;
    text-align: right;
    flex-shrink: 0;
}
.panorama-skill-item.con-note {
    background: #fffdf9;
    border-style: dashed;
}
.panorama-skill-left .skill-prof-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid #8b0000;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: bold;
    flex-shrink: 0;
    transition: all 0.15s ease;
}
.panorama-skill-left .skill-prof-indicator.none {
    background: #ffffff;
    border-color: #ccc;
    color: transparent;
}
.panorama-skill-left .skill-prof-indicator.half {
    background: #e3f2fd;
    border-color: #1976d2;
    color: #1976d2;
}
.panorama-skill-left .skill-prof-indicator.prof {
    background: #8b0000;
    border-color: #8b0000;
    color: #ffffff;
}
.panorama-skill-left .skill-prof-indicator.exp {
    background: #c5a059;
    border-color: #b38b2d;
    color: #ffffff;
    box-shadow: 0 0 4px rgba(197,160,89,0.5);
}

.panorama-passive-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    font-size: 11.5px;
}
.sense-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fbf9f4;
    padding: 5px 8px;
    border-radius: 5px;
    border: 1px solid #eee7da;
}
.sense-item strong {
    color: #8b0000;
    font-weight: 800;
}
.defense-chip {
    background: #eef2f6;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.panorama-slots-ladder {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.panorama-slot-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    background: #fbf9f4;
    border: 1px solid #eee7da;
    border-radius: 5px;
    font-size: 11.5px;
}
.panorama-slot-lvl {
    font-weight: 700;
    color: #444;
    width: 58px;
    flex-shrink: 0;
}
.panorama-slot-bubbles {
    display: flex;
    gap: 5px;
    align-items: center;
    flex: 1;
    margin: 0 8px;
}
.panorama-slot-bubble {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid #8b0000;
    background: #fff;
    cursor: pointer;
    display: inline-block;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.panorama-slot-bubble:hover {
    transform: scale(1.15);
}
.panorama-slot-bubble.spent {
    background: #8b0000;
    box-shadow: inset 0 0 2px rgba(0,0,0,0.4);
}

.panorama-ammo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fbf9f4;
    border: 1px solid #eee7da;
    border-radius: 6px;
    padding: 6px 10px;
    margin-top: 6px;
}
.panorama-ammo-pips {
    display: flex;
    gap: 4px;
    align-items: center;
}
.panorama-ammo-pip {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 1.5px solid #d97706;
    background: #ffffff;
    cursor: pointer;
    display: inline-block;
    transition: all 0.15s ease;
}
.panorama-ammo-pip:hover {
    transform: scale(1.15);
}
.panorama-ammo-pip.spent {
    background: #d97706;
}

.panorama-resources-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.panorama-res-card {
    background: #fbf9f4;
    border: 1px solid #eee7da;
    border-radius: 6px;
    padding: 6px 10px;
}
.panorama-res-pips {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.panorama-res-pip {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1.5px solid #8b0000;
    background: #8b0000;
    cursor: pointer;
    display: inline-block;
    transition: all 0.15s ease;
}
.panorama-res-pip.spent {
    background: #ffffff;
    border-color: #bbb;
}

.panorama-coins-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}
.panorama-coins-grid .coin-input-group {
    background: #fbf9f4;
    border: 1px solid #eee7da;
    border-radius: 6px;
    padding: 6px 4px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.panorama-coins-grid .coin-input-group input {
    width: 100%;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 3px 0;
    background: #fff;
    box-sizing: border-box;
}

.panorama-feat-row {
    background: #fbf9f4;
    border: 1px solid #eee7da;
    border-radius: 5px;
    padding: 5px 8px;
    line-height: 1.4;
}
.panorama-attune-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.panorama-attune-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fbf9f4;
    border: 1px solid #eee7da;
    border-radius: 5px;
    padding: 6px 10px;
}
.panorama-attune-pip {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1.5px solid #8b0000;
    background: #fff;
    display: inline-block;
    flex-shrink: 0;
}
.panorama-attune-pip.active {
    background: #8b0000;
}

.panorama-spells-container {
    background: #ffffff;
    border: 1px solid #e2ded4;
    border-radius: 10px;
    padding: 16px;
    margin-top: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.panorama-spells-meta-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #555;
    background: #fbf9f4;
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid #eee7da;
}
.panorama-spells-3col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
    align-items: start;
    margin-top: 8px;
}
@media (max-width: 860px) {
    .panorama-spells-3col-grid {
        grid-template-columns: 1fr;
    }
}
.panorama-spell-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.panorama-level-block {
    background: #fdfbf7;
    border: 1px solid #e5dfd2;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.panorama-level-banner {
    background: #8b0000;
    color: #ffffff;
    padding: 6px 10px;
    font-family: 'Cinzel', serif;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: 0.5px;
}
.panorama-level-banner.with-slots {
    background: linear-gradient(90deg, #8b0000 0%, #a02828 100%);
}
.banner-slots-wrap {
    display: flex;
    gap: 4px;
    align-items: center;
}
.banner-slot-bubble {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 1.5px solid #ffffff;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    display: inline-block;
    transition: all 0.15s ease;
}
.banner-slot-bubble:hover {
    transform: scale(1.15);
}
.banner-slot-bubble.spent {
    background: #ffffff;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.9);
}
.panorama-level-spells-list {
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 38px;
}
.panorama-spell-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 6px;
    background: #ffffff;
    border: 1px solid #eee7da;
    border-radius: 5px;
    font-size: 11.5px;
    transition: all 0.15s ease;
}
.panorama-spell-item:hover {
    background: #fffdfa;
    border-color: #c5a059;
}
.panorama-sp-name {
    font-weight: 600;
    color: #8b0000;
    cursor: pointer;
    font-size: 12px;
}
.panorama-sp-name:hover {
    text-decoration: underline;
}
.panorama-sp-meta {
    font-size: 10px;
    color: #777;
    margin-top: 1px;
}
.corel-sp-prep-circle {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1.5px solid #8b0000;
    display: inline-block;
    flex-shrink: 0;
}
.corel-sp-prep-circle.prepared {
    background: #8b0000;
}
.panorama-sp-empty {
    font-size: 11px;
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 10px 0;
}




/* ==========================================================================
   PANORAMA COCKPIT 50/50 - ESTILO NATIVO COMPENDIUM INTEGRAL
   ========================================================================== */
.panorama-cockpit-wrapper {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #2b1d0c;
    box-sizing: border-box;
}

.panorama-cockpit-grid {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 14px;
    align-items: start;
}

@media (max-width: 1100px) {
    .panorama-cockpit-grid {
        grid-template-columns: 1fr;
    }
}

/* Base de Cajas Temáticas */
.cockpit-box {
    background: #ffffff;
    border: 1px solid #e8e2d5;
    border-radius: 8px;
    padding: 8px 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    margin-bottom: 8px;
    box-sizing: border-box;
}

.cockpit-box:last-child {
    margin-bottom: 0;
}

.cockpit-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 4px;
    margin-bottom: 6px;
    border-bottom: 1.5px solid #f0eae1;
}

.cockpit-box-title {
    font-family: 'Cinzel', serif;
    font-size: 11.5px;
    font-weight: 700;
    color: #8b0000;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* ==========================================================================
   MITAD IZQUIERDA: HOJA DE PERSONAJE
   ========================================================================== */
.cockpit-char-half {
    display: flex;
    flex-direction: column;
}

/* 1. Header de Identidad y Vitales */
.cockpit-identity-strip {
    background: linear-gradient(180deg, #ffffff 0%, #faf6ee 100%);
    border: 1.5px solid #dcd5c7;
    border-radius: 6px;
    padding: 3px 6px;
    margin-bottom: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.cockpit-identity-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 3px;
    border-bottom: 1px dashed #e2ded4;
    padding-bottom: 2px;
}

.cockpit-char-name-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cockpit-name-input {
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 800;
    color: #8b0000;
    border: none;
    border-bottom: 1.5px solid transparent;
    background: transparent;
    padding: 0 3px;
    width: 180px;
    outline: none;
    transition: border-color 0.2s;
}
.cockpit-name-input:focus {
    border-bottom-color: #8b0000;
    background: #fff;
}

.cockpit-level-badge {
    background: #8b0000;
    color: #fff;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.cockpit-meta-badges {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    font-size: 10.5px;
}

.cockpit-meta-select {
    font-size: 10.5px;
    border: 1px solid #dcd5c7;
    border-radius: 4px;
    background: #fff;
    padding: 1px 5px;
    color: #443c33;
    font-weight: 600;
    max-width: 135px;
}

.cockpit-insp-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    border: 1px solid #d4af37;
    background: #fff;
    color: #8a6d3b;
    cursor: pointer;
    transition: all 0.2s;
}
.cockpit-insp-btn.active {
    background: #d4af37;
    color: #fff;
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}

.cockpit-pb-chip {
    background: #fdf5e6;
    border: 1px solid #dcd5c7;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 10.5px;
    font-weight: 700;
    color: #8b0000;
}

.cockpit-bio-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    border: 1px solid #cdc4b3;
    background: #f4efe6;
    color: #554838;
    cursor: pointer;
    transition: all 0.2s;
}
.cockpit-bio-toggle-btn.active {
    background: #8b0000;
    color: #fff;
    border-color: #700000;
}

/* Cajón Colapsable de Rol y Bio */
.cockpit-bio-drawer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 6px;
    margin-bottom: 4px;
    background: #fffdf9;
    border: 1px solid #e5dfd2;
    border-radius: 5px;
    font-size: 10px;
    flex-wrap: wrap;
}
.cockpit-bio-field {
    display: flex;
    align-items: center;
    gap: 3px;
}
.cockpit-bio-field label {
    font-size: 9px;
    font-weight: 800;
    color: #8b0000;
    text-transform: uppercase;
}
.cockpit-bio-field input {
    font-size: 10.5px;
    padding: 1px 5px;
    border: 1px solid #dcd5c7;
    border-radius: 3px;
    background: #fff;
    max-width: 120px;
}

/* Dashboard de Vitales Integrado */
.cockpit-vitals-strip {
    display: grid;
    grid-template-columns: 85px 1.25fr 68px 68px 100px 120px;
    gap: 6px;
    align-items: center;
}

@media (max-width: 1400px) {
    .cockpit-vitals-strip {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }
}

.cockpit-vital-unit {
    background: #ffffff;
    border: 1px solid #dcd5c7;
    border-radius: 5px;
    padding: 1.5px 3px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 34px;
    box-sizing: border-box;
}

.cockpit-vital-val {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 800;
    color: #2b1d0c;
    line-height: 1.1;
}

.cockpit-vital-lbl {
    font-size: 7.5px;
    font-weight: 800;
    color: #8a7a68;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 0px;
}

/* Escudo de CA */
.cockpit-ac-card {
    background: linear-gradient(135deg, #8b0000 0%, #600000 100%);
    color: #ffffff;
    border: 1.5px solid #4a0000;
    box-shadow: 0 1px 3px rgba(139,0,0,0.25);
    padding: 1.5px 3px;
    min-height: 34px;
}
.cockpit-ac-card .cockpit-ac-num {
    font-family: 'Cinzel', serif;
    font-size: 15px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
}
.cockpit-ac-card .cockpit-ac-tag {
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fef08a;
    text-transform: uppercase;
}
.cockpit-ac-card .cockpit-ac-breakdown-sub {
    font-size: 6.5px;
    color: rgba(255,255,255,0.85);
    margin-top: 1px;
    white-space: nowrap;
}

/* Barra de PG */
.cockpit-hp-card {
    background: #ffffff;
    border: 1.5px solid #dcd5c7;
    border-radius: 5px;
    padding: 1.5px 5px;
    min-height: 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cockpit-hp-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cockpit-hp-inputs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cockpit-hp-input {
    width: 48px;
    font-size: 16px;
    font-weight: 800;
    color: #8b0000;
    text-align: center;
    border: 1px solid #e0dacf;
    border-radius: 4px;
    padding: 2px 0;
    background: #fffdf9;
}

.cockpit-hp-max-label {
    font-size: 13px;
    font-weight: 700;
    color: #777;
}

.cockpit-hp-temp-input {
    width: 32px;
    font-size: 10px;
    font-weight: 700;
    color: #0369a1;
    text-align: center;
    border: 1px solid #bae6fd;
    border-radius: 3px;
    padding: 1px 0;
    background: #f0f9ff;
}

.cockpit-hp-buttons {
    display: flex;
    gap: 2px;
}

.cockpit-hp-btn {
    border: none;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 5px;
    cursor: pointer;
    line-height: 1;
    transition: filter 0.15s;
}
.cockpit-hp-btn.dmg {
    background: #fee2e2;
    color: #991b1b;
}
.cockpit-hp-btn.heal {
    background: #dcfce7;
    color: #166534;
}
.cockpit-hp-btn:hover {
    filter: brightness(0.92);
}

/* Salvaciones de Muerte */
.cockpit-ds-box {
    padding: 2px 6px;
}
.cockpit-ds-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: 8px;
    font-weight: 800;
    margin: 1px 0;
}
.cockpit-ds-dots {
    display: flex;
    gap: 3px;
}
.cockpit-ds-dots input {
    margin: 0;
    cursor: pointer;
    width: 11px;
    height: 11px;
}

/* Defensas y Resistencias Chips */
.cockpit-defenses-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
    padding-top: 4px;
    border-top: 1px dashed #e8e2d5;
}
.cockpit-defense-chip {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* 2. Cuerpo de 2 Sub-Columnas */
.cockpit-char-body-grid {
    display: grid;
    grid-template-columns: 245px 1fr;
    gap: 10px;
    align-items: start;
}

@media (max-width: 1280px) {
    .cockpit-char-body-grid {
        grid-template-columns: 220px 1fr;
    }
}

/* Sub-columna 1A: Atributos y Habilidades */
.cockpit-stat-row {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #fdfbf7;
    border: 1px solid #e5dfd2;
    border-radius: 5px;
    padding: 2px 4px;
    margin-bottom: 2.5px;
    transition: all 0.15s ease;
}

.cockpit-stat-row:hover {
    border-color: #c5a059;
    background: #ffffff;
}

.cockpit-stat-pill {
    width: 48px;
    background: linear-gradient(180deg, #ffffff 0%, #f5efe4 100%);
    border: 1.5px solid #8b0000;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5px 2px;
    flex-shrink: 0;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.cockpit-stat-abbr {
    font-size: 7.5px;
    font-weight: 800;
    color: #8b0000;
    text-transform: uppercase;
    line-height: 1;
}

.cockpit-stat-mod {
    font-size: 14.5px;
    font-weight: 900;
    color: #222;
    line-height: 1.05;
    margin: 0;
}

.cockpit-stat-score {
    font-size: 8.5px;
    font-weight: 700;
    color: #555;
    background: #fff;
    padding: 0 2px;
    border-radius: 2px;
    border: 1px solid #ddd;
    line-height: 1.1;
}

.cockpit-stat-save {
    margin-top: 1.5px;
    width: 100%;
    font-size: 7.5px;
    font-weight: 700;
    color: #444;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: #fff;
    padding: 0px 2px;
    border-radius: 2px;
    border: 1px solid #ddd;
    cursor: pointer;
    line-height: 1.2;
}
.cockpit-stat-save.proficient {
    background: #fdf5e6;
    border-color: #d4af37;
    color: #8b0000;
    font-weight: 800;
}
.cockpit-stat-save .save-pip {
    width: 3.5px;
    height: 3.5px;
    border-radius: 50%;
    border: 1px solid #8b0000;
    background: transparent;
}
.cockpit-stat-save.proficient .save-pip {
    background: #8b0000;
}

/* Lista de Habilidades vinculadas */
.cockpit-skills-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5px;
}

.cockpit-skill-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 9px;
    color: #333;
    padding: 0px 1px;
    border-radius: 2px;
    cursor: pointer;
    line-height: 1.1;
}
.cockpit-skill-item:hover {
    background: #f5f0e6;
}

.cockpit-skill-left {
    display: flex;
    align-items: center;
    gap: 2.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cockpit-skill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid #999;
    background: #fff;
    flex-shrink: 0;
    display: inline-block;
    cursor: pointer;
}
.cockpit-skill-dot.prof {
    background: #8b0000;
    border-color: #8b0000;
}
.cockpit-skill-dot.expert {
    background: #d4af37;
    border-color: #8b0000;
    box-shadow: 0 0 2px #d4af37;
}

.cockpit-skill-title {
    font-weight: 500;
}

.cockpit-skill-mod {
    font-weight: 700;
    color: #222;
    margin-left: 2px;
    font-size: 9px;
}

.cockpit-adv-mini-badge {
    font-size: 7px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 700;
}

/* Sentidos Pasivos */
.cockpit-senses-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    margin-top: 2px;
    padding-top: 2px;
    border-top: 1px dashed #dcd4c5;
}

.cockpit-sense-chip {
    background: #faf6ee;
    border: 1px solid #e0dacf;
    border-radius: 3px;
    padding: 1.5px 1px;
    text-align: center;
}
.cockpit-sense-chip .num {
    font-family: 'Cinzel', serif;
    font-size: 10px;
    font-weight: 800;
    color: #8b0000;
    display: block;
    line-height: 1;
}
.cockpit-sense-chip .lbl {
    font-size: 6.5px;
    font-weight: 700;
    color: #777;
    text-transform: uppercase;
}

/* ==========================================================================
   SUB-COLUMNA 1B: CENTRO DE OPERACIONES CON PESTAÑAS (TABS)
   ========================================================================== */
.cockpit-subcol-combat {
    display: flex;
    flex-direction: column;
}

/* Barra de Pestañas de la Sub-columna 1B */
.cockpit-tabs-bar {
    display: flex;
    gap: 4px;
    background: #e8e2d5;
    padding: 3px;
    border-radius: 7px;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.cockpit-tab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 6px;
    border: 1px solid transparent;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    background: #fdfbf7;
    color: #554838;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.cockpit-tab-btn:hover {
    background: #ffffff;
    color: #8b0000;
}
.cockpit-tab-btn.active {
    background: #8b0000;
    color: #ffffff !important;
    border-color: #700000;
    box-shadow: 0 1px 3px rgba(139,0,0,0.25);
}

/* Contenedor con Scroll Interno para Tabs */
.cockpit-tab-scroll {
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    padding-right: 2px;
    box-sizing: border-box;
}
.cockpit-tab-scroll::-webkit-scrollbar {
    width: 4px;
}
.cockpit-tab-scroll::-webkit-scrollbar-track {
    background: #faf6ee;
}
.cockpit-tab-scroll::-webkit-scrollbar-thumb {
    background: #c5a059;
    border-radius: 2px;
}

/* 1. TAB COMBATE: Tabla de Ataques y Armas */
.cockpit-attacks-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10.5px;
    margin-bottom: 6px;
}
.cockpit-attacks-table th {
    background: #faf6ee;
    color: #8a7a68;
    font-size: 8.5px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 4px;
    border-bottom: 1px solid #dcd5c7;
    text-align: left;
}
.cockpit-attacks-table td {
    padding: 4px;
    border-bottom: 1px solid #f0eae1;
    color: #333;
}
.cockpit-atk-clickable {
    cursor: pointer;
    font-weight: 700;
    color: #8b0000;
}
.cockpit-atk-clickable:hover {
    text-decoration: underline;
}

/* Munición */
.cockpit-ammo-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #faf6ee;
    border: 1px dashed #dcd5c7;
    border-radius: 5px;
    padding: 3px 6px;
    font-size: 10px;
    font-weight: 700;
    color: #665;
    margin-top: 4px;
}
.cockpit-ammo-pips {
    display: flex;
    gap: 3px;
}
.cockpit-ammo-pip {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1.5px solid #8b0000;
    background: #8b0000;
    cursor: pointer;
    transition: transform 0.1s;
}
.cockpit-ammo-pip.spent {
    background: #ffffff !important;
}

/* Recursos de Clase */
.cockpit-res-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 6px;
    background: #faf6ee;
    border: 1px solid #e8e2d5;
    border-radius: 5px;
    margin-bottom: 3px;
    font-size: 10.5px;
}
.cockpit-res-btn {
    border: 1px solid #dcd5c7;
    background: #fff;
    border-radius: 3px;
    font-weight: 700;
    font-size: 9px;
    padding: 1px 4px;
    cursor: pointer;
}

/* Sintonizados & Monedas */
.cockpit-attuned-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.cockpit-attuned-tag {
    background: #fdf5e6;
    border: 1px solid #d4af37;
    color: #8b0000;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.cockpit-attuned-tag .dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #8b0000;
}

.cockpit-coins-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    margin-top: 6px;
    padding-top: 4px;
    border-top: 1px dashed #e8e2d5;
}
.cockpit-coin-box {
    background: #faf6ee;
    border: 1px solid #dcd5c7;
    border-radius: 4px;
    padding: 2px;
    text-align: center;
}
.cockpit-coin-box.gold {
    border-color: #d4af37;
    background: #fffdf5;
}
.cockpit-coin-box.plat {
    border-color: #7c3aed;
    background: #faf5ff;
}
.cockpit-coin-box .val {
    font-weight: 800;
    font-size: 10.5px;
    display: block;
    line-height: 1;
}
.cockpit-coin-box .lbl {
    font-size: 7.5px;
    font-weight: 800;
    color: #777;
    text-transform: uppercase;
}

/* 2. TAB RASGOS & DOTES */
.cockpit-feat-filters {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.cockpit-filter-chip {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    border: 1px solid #dcd5c7;
    background: #fff;
    cursor: pointer;
    color: #555;
}
.cockpit-filter-chip.active {
    background: #8b0000;
    color: #fff;
    border-color: #8b0000;
}
.cockpit-feat-card {
    background: #fdfbf7;
    border: 1px solid #e2ded4;
    border-radius: 5px;
    margin-bottom: 4px;
    padding: 4px 6px;
    font-size: 10.5px;
}
.cockpit-feat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}
.cockpit-feat-title {
    font-weight: 700;
    color: #8b0000;
}
.cockpit-feat-body {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px dashed #eee;
    font-size: 10px;
    color: #444;
    line-height: 1.35;
}

/* 3. TAB INVENTARIO & MOCHILA */
.cockpit-inv-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 6px;
    border-bottom: 1px solid #f0eae1;
    font-size: 10.5px;
}
.cockpit-inv-item:hover {
    background: #faf6ee;
}
.cockpit-inv-qty-input {
    width: 34px;
    font-size: 10px;
    text-align: center;
    border: 1px solid #dcd5c7;
    border-radius: 3px;
    padding: 1px;
}

/* 4. TAB ACCIONES 5E */
.cockpit-act-subtabs {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
}
.cockpit-act-subtab {
    flex: 1;
    text-align: center;
    padding: 3px;
    border-radius: 4px;
    font-size: 9.5px;
    font-weight: 700;
    background: #f4efe6;
    border: 1px solid #dcd5c7;
    cursor: pointer;
}
.cockpit-act-subtab.active {
    background: #8b0000;
    color: #fff;
    border-color: #700000;
}

/* ==========================================================================
   MITAD DERECHA: LOS CONJUROS (50%)
   ========================================================================== */
.cockpit-spells-half {
    display: flex;
    flex-direction: column;
}

.cockpit-magic-hub {
    background: #ffffff;
    border: 1.5px solid #dcd5c7;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.cockpit-magic-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    padding-bottom: 6px;
    border-bottom: 1px dashed #e2ded4;
    margin-bottom: 6px;
}

.cockpit-magic-title {
    font-family: 'Cinzel', serif;
    font-size: 13px;
    font-weight: 800;
    color: #8b0000;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
}

.cockpit-magic-stats-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cockpit-magic-badge {
    background: #faf6ee;
    border: 1px solid #dcd5c7;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    color: #443c33;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.cockpit-magic-badge strong {
    color: #8b0000;
    font-size: 12px;
}

.cockpit-slots-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 10px;
    padding-top: 2px;
}

.cockpit-slot-group {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #fdfbf7;
    border: 1px solid #e8e2d5;
    border-radius: 4px;
    padding: 2px 4px;
}
.cockpit-slot-group span {
    font-weight: 800;
    font-size: 9px;
    color: #8b0000;
}

.cockpit-slot-bubbles {
    display: inline-flex;
    gap: 2.5px;
}

.cockpit-slot-bubble {
    width: 8.5px;
    height: 8.5px;
    border-radius: 50%;
    border: 1.5px solid #8b0000;
    background: #8b0000;
    cursor: pointer;
    display: inline-block;
    transition: transform 0.1s;
}
.cockpit-slot-bubble.spent {
    background: #ffffff !important;
}

/* Cuadrícula de Conjuros en 2 Columnas */
.cockpit-spells-scroll {
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    padding-right: 2px;
    box-sizing: border-box;
}
.cockpit-spells-scroll::-webkit-scrollbar {
    width: 4px;
}
.cockpit-spells-scroll::-webkit-scrollbar-track {
    background: #faf6ee;
}
.cockpit-spells-scroll::-webkit-scrollbar-thumb {
    background: #c5a059;
    border-radius: 2px;
}

.cockpit-spells-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: start;
}

@media (max-width: 1350px) {
    .cockpit-spells-2col {
        grid-template-columns: 1fr;
    }
}

.cockpit-spell-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cockpit-level-card {
    background: #ffffff;
    border: 1px solid #e8e2d5;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.cockpit-level-banner {
    background: #faf6ee;
    border-bottom: 1px solid #e2ded4;
    padding: 3px 6px;
    font-family: 'Cinzel', serif;
    font-size: 10px;
    font-weight: 800;
    color: #8b0000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    letter-spacing: 0.3px;
}

.cockpit-level-banner.with-slots {
    background: linear-gradient(90deg, #faf6ee 0%, #fdf5e6 100%);
}

.cockpit-spell-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 6px;
    border-bottom: 1px solid #f6f2ea;
    font-size: 10px;
    transition: background 0.15s;
    gap: 4px;
}
.cockpit-spell-row:last-child {
    border-bottom: none;
}
.cockpit-spell-row:hover {
    background: #fdfbf7;
}

.cockpit-sp-left {
    display: flex;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    flex: 1;
}

.cockpit-sp-prep-check {
    margin: 0;
    cursor: pointer;
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

.cockpit-sp-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    line-height: 1.15;
}

.cockpit-sp-name {
    font-weight: 700;
    color: #8b0000;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10.5px;
}
.cockpit-sp-name:hover {
    text-decoration: underline;
}

.cockpit-sp-meta-line {
    font-size: 8.5px;
    color: #777;
    display: flex;
    gap: 3px;
}

.cockpit-sp-right {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.cockpit-sp-mech-badge {
    background: #f4efe6;
    border: 1px solid #e0dacf;
    color: #554838;
    border-radius: 3px;
    font-size: 8.5px;
    font-weight: 700;
    padding: 1px 4px;
    white-space: nowrap;
}

.cockpit-sp-btn-cast {
    background: #8b0000;
    color: #ffffff;
    border: none;
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 9.5px;
    cursor: pointer;
    transition: background 0.15s;
}
.cockpit-sp-btn-cast:hover {
    background: #a30000;
}

.cockpit-sp-btn-del {
    background: transparent;
    color: #dc2626;
    border: none;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}

.cockpit-sp-empty {
    padding: 6px;
    text-align: center;
    font-size: 9.5px;
    font-style: italic;
    color: #888;
}

/* ==========================================================================
   ESTILOS DE IMPRESIÓN (A4 APAISADA)
   ========================================================================== */
@media print {
    @page {
        size: A4 landscape;
        margin: 6mm;
    }
    .panorama-cockpit-wrapper {
        max-width: 100% !important;
        margin: 0 !important;
    }
    .panorama-cockpit-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 6mm !important;
    }
    .cockpit-spells-scroll,
    .cockpit-tab-scroll {
        max-height: none !important;
        overflow: visible !important;
    }
    .cockpit-sp-btn-cast,
    .cockpit-sp-btn-del,
    .cockpit-hp-buttons,
    .cockpit-tabs-bar,
    button {
        display: none !important;
    }
}
