/* =====================================================================
   CMI LifeTech — Chapel 2: Eternity (永恆之約 · Rose Window & Bound Quires)
   ===================================================================== */

/* ── 1. Gothic Rose Window Mandorla Hero ─────────────────── */
.rpg-hero-card {
    background: var(--card-bg-elevated);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: var(--shadow-holy), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    margin-bottom: 36px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 36px;
    position: relative;
    overflow: hidden;
}
.rpg-hero-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(226, 186, 77, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.mandala-visualizer-container {
    width: 160px;
    height: 160px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 0 auto;
}
.mandala-svg {
    width: 100%;
    height: 100%;
    transform-origin: center;
    animation: rotateRoseWindow 90s linear infinite;
    filter: drop-shadow(0 0 18px var(--holy-gold-glow));
}
@keyframes rotateRoseWindow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.mandala-level-center {
    position: absolute;
    text-align: center;
    pointer-events: none;
}
.mandala-level-num {
    font-family: var(--font-gothic-deco);
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--holy-gold-bright);
    line-height: 1;
    text-shadow: 0 0 15px var(--holy-gold-glow);
}
.mandala-level-label {
    font-family: var(--font-holy);
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 4px;
}

.rpg-stats-overview {
    flex: 1;
    min-width: 280px;
}
.rpg-title-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 8px;
}
.rpg-role-title {
    font-family: var(--font-holy);
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--holy-gold-bright);
    letter-spacing: 0.08em;
}
.rpg-lifetime-xp {
    font-family: var(--font-holy);
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
}
.rpg-lifetime-xp strong {
    color: var(--holy-gold);
}

/* ── 2. Stained-Glass Lancet Windows (4 Soul Dimension Bars 0–9999) ── */
.soul-stat-bars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.soul-bar-item {
    background: rgba(226, 186, 77, 0.03);
    border: 1px solid var(--border-engraved);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: var(--transition-processional);
}
.soul-bar-item:hover {
    border-color: var(--border-gold);
    background: rgba(226, 186, 77, 0.06);
}
.soul-bar-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    font-family: var(--font-holy);
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.04em;
}
.soul-bar-label-row span:last-child {
    color: var(--holy-gold-bright);
}
.soul-progress-track {
    width: 100%;
    height: 8px;
    background: rgba(226, 186, 77, 0.12);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}
.soul-progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}
.soul-progress-fill.holiness {
    background: linear-gradient(90deg, var(--holy-gold-deep), var(--holy-gold-bright));
    box-shadow: 0 0 10px var(--holy-gold-glow);
}
.soul-progress-fill.joy {
    background: linear-gradient(90deg, #c46816, #ffa851);
    box-shadow: 0 0 10px rgba(255, 115, 0, 0.4);
}
.soul-progress-fill.peace {
    background: linear-gradient(90deg, #0d839e, #48cae4);
    box-shadow: 0 0 10px rgba(0, 180, 216, 0.4);
}
.soul-progress-fill.wisdom {
    background: linear-gradient(90deg, #235ca8, #5390d9);
    box-shadow: 0 0 10px rgba(58, 134, 255, 0.4);
}

/* ── 3. Bound Quire of Leaves (Eternity Journal Grid) ─────── */
.eternity-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 14px;
    border-bottom: 1px solid var(--border-gold);
    padding-bottom: 14px;
}

.eternity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 18px;
    min-height: 240px;
}

.eternity-card {
    background: var(--card-bg-elevated);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow-holy);
    position: relative;
    transition: var(--transition-processional);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.eternity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: radial-gradient(circle, var(--holy-gold) 0%, transparent 80%);
}
@media (hover: hover) {
    .eternity-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-holy), 0 0 35px var(--holy-gold-glow);
        border-color: var(--holy-gold-bright);
    }
}

.eternity-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.eternity-card-date {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-family: var(--font-holy);
    letter-spacing: 0.05em;
}
.eternity-card-ref {
    font-family: var(--font-gothic-deco);
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--holy-gold);
    letter-spacing: 0.12em;
}

.eternity-card-verse {
    font-family: var(--font-holy);
    font-size: 1.2rem;
    line-height: 1.68;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-weight: 600;
}

.eternity-card-insight {
    font-size: 0.94rem;
    line-height: 1.78;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.eternity-card-notes {
    background: rgba(226, 186, 77, 0.05);
    border-left: 3px solid var(--holy-gold);
    padding: 10px 14px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.92rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-style: italic;
}

.eternity-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-subtle);
    padding-top: 12px;
    margin-top: auto;
}

