/* =====================================================================
   CMI LifeTech — Chapel 1: Sanctum (生命聖所 · Heart Strings & Manna Triptych)
   ===================================================================== */

/* ── 1. Heart-String Psaltery (Soul Dimension Sliders 0–9999) ─ */
.soul-dimensions-wrap {
    margin-bottom: 32px;
    background: var(--card-bg-elevated);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-holy), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}
.soul-dimensions-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: radial-gradient(circle, var(--holy-gold-bright) 0%, transparent 80%);
}

.dimension-section-title {
    font-family: var(--font-holy);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--holy-gold);
    letter-spacing: 0.16em;
    text-align: center;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-transform: uppercase;
}

.sliders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 18px;
}

.soul-slider-card {
    background: rgba(226, 186, 77, 0.03);
    border: 1px solid var(--border-engraved);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    transition: var(--transition-processional);
    position: relative;
}
.soul-slider-card:hover {
    border-color: var(--border-gold);
    background: rgba(226, 186, 77, 0.06);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.slider-label {
    font-family: var(--font-holy);
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.05em;
}
.slider-label i {
    color: var(--holy-gold);
}
.slider-value-badge {
    font-family: var(--font-holy);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--holy-gold-bright);
    background: rgba(226, 186, 77, 0.12);
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-gold);
    box-shadow: 0 0 10px rgba(226, 186, 77, 0.15);
    letter-spacing: 0.04em;
    min-width: 2.6em;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Tactile Heart-String Psaltery Range */
.soul-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, rgba(226, 186, 77, 0.15), var(--holy-gold) 60%, var(--holy-gold-bright));
    border-radius: var(--radius-full);
    outline: none;
    transition: var(--transition-smooth);
    cursor: pointer;
}
.soul-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, var(--holy-gold-bright) 50%, var(--holy-gold-deep) 100%);
    box-shadow: 0 0 16px var(--holy-gold-glow), 0 2px 6px rgba(0, 0, 0, 0.6);
    cursor: grab;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s;
    border: 1.5px solid #ffffff;
}
.soul-range::-webkit-slider-thumb:hover, .soul-range:active::-webkit-slider-thumb {
    transform: scale(1.25);
    box-shadow: 0 0 24px var(--holy-gold-bright), 0 3px 10px rgba(0, 0, 0, 0.8);
    cursor: grabbing;
}
.soul-range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, var(--holy-gold-bright) 50%, var(--holy-gold-deep) 100%);
    border: 1.5px solid #ffffff;
    box-shadow: 0 0 16px var(--holy-gold-glow), 0 2px 6px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    transition: transform 0.2s;
}
.soul-range::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, rgba(226, 186, 77, 0.15), var(--holy-gold) 60%, var(--holy-gold-bright));
}
.soul-range::-moz-range-track {
    height: 4px;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, rgba(226, 186, 77, 0.15), var(--holy-gold) 60%, var(--holy-gold-bright));
    border: none;
}

/* ── 2. Mosaic Clerestory Tesserae (12 Pastoral Pillars) ─── */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 30px;
}

.pillar-chip {
    background: var(--card-bg);
    border: 1px solid var(--border-engraved);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-processional);
    font-family: var(--font-holy);
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-height: 48px;
    user-select: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.pillar-chip i {
    font-size: 1.25rem;
    color: var(--holy-gold);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s;
}
.pillar-chip:hover {
    border-color: var(--border-gold);
    transform: translateY(-3px);
    background: rgba(226, 186, 77, 0.08);
    color: var(--text-primary);
}
.pillar-chip.active {
    background: linear-gradient(135deg, rgba(226, 186, 77, 0.22) 0%, rgba(232, 155, 81, 0.3) 100%);
    border-color: var(--holy-gold-bright);
    color: var(--holy-gold-bright);
    font-weight: 700;
    box-shadow: 0 6px 24px var(--holy-gold-glow), inset 0 0 12px rgba(226, 186, 77, 0.15);
}
.pillar-chip.kindled,
.christ-open.kindled,
.mood-label strong.kindled,
.mensa-receive.kindled,
.chosen-dim.kindled {
    animation: chipKindle 0.7s ease;
}
@keyframes chipKindle {
    0% { box-shadow: 0 0 0 0 rgba(255, 214, 120, 0.7); }
    100% { box-shadow: 0 0 0 16px rgba(255, 214, 120, 0); }
}
body:not(.dark-theme) .pillar-chip.active {
    color: var(--holy-dark);
}
.pillar-chip.active i {
    transform: scale(1.35);
    color: var(--holy-gold-bright);
    filter: drop-shadow(0 0 8px var(--holy-gold-glow));
}

/* ── Liturgy of arrival: the word is the mensa, the strings are a vestry ── */
.mensa {
    margin-bottom: 22px;
    background: var(--card-bg-elevated);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 32px 28px 22px;
    box-shadow: var(--shadow-mensa);
    position: relative;
    text-align: center;
}
.mensa::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18%;
    right: 18%;
    height: 1px;
    background: radial-gradient(circle, var(--holy-gold-bright) 0%, transparent 80%);
}
.mensa-kicker {
    font-family: var(--font-holy);
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--holy-gold);
    font-size: 0.78rem;
    margin-bottom: 8px;
}
.mensa-invite {
    font-family: var(--font-holy);
    font-size: clamp(1.45rem, 2.6vw, 2rem);
    line-height: 1.45;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 18em;
    margin: 0 auto 18px;
    white-space: pre-line;
}
.mensa-invite::after {
    content: "\f654";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-style: normal;
    color: var(--holy-gold-bright);
    font-size: 0.62em;
    margin-left: 0.32em;
    vertical-align: 0.08em;
}
.mensa-canon {
    font-family: var(--font-body);
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 28em;
    margin: -6px auto 16px;
}
.manna-triad {
    text-align: center;
    font-family: var(--font-holy);
    letter-spacing: 0.08em;
    color: var(--holy-gold);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 10px auto 0;
    max-width: 26em;
}
.mensa-lection {
    font-family: var(--font-body);
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.mensa .pillars-grid {
    margin-top: 8px;
    margin-bottom: 8px;
    text-align: initial;
}
.chosen-dim {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 4px auto 2px;
    min-height: 1.6em;
    font-family: var(--font-holy);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--holy-gold-bright);
}
.chosen-dim[hidden] {
    display: none !important;
}
.chosen-dim i {
    font-size: 1.55rem;
    color: var(--holy-gold-bright);
    filter: drop-shadow(0 0 8px var(--holy-gold-glow));
}
body:not(.dark-theme) .chosen-dim,
body:not(.dark-theme) .chosen-dim i {
    color: var(--holy-dark);
}
.christ-open {
    margin: 14px auto 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    color: var(--holy-gold);
    font-family: var(--font-holy);
    font-size: 1.05rem;
    line-height: 1.4;
    letter-spacing: 0.03em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
}
.christ-open:hover,
.christ-open:focus-visible {
    border-color: var(--border-gold);
    color: var(--holy-gold-bright);
}
.christ-open:focus-visible {
    outline: 2px solid var(--holy-gold);
    outline-offset: 2px;
}
.christ-open i {
    font-size: 0.78rem;
    transition: transform var(--transition-smooth);
}
.christ-open.open i {
    transform: rotate(180deg);
}
.christ-panel {
    margin-top: 8px;
}
.christ-panel[hidden] {
    display: none !important;
}
.christ-note {
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-secondary);
    max-width: 28em;
    margin: 8px auto;
}
.christ-grid {
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
}
.manna-chosen {
    margin: 12px auto 4px;
}
@media (prefers-reduced-motion: reduce) {
    .christ-open i,
    .pillar-chip,
    .pillar-chip i,
    .soul-range,
    .soul-range::-webkit-slider-thumb,
    .soul-range::-moz-range-thumb {
        transition: none;
    }
    .pillar-chip.kindled,
    .christ-open.kindled,
    .mood-label strong.kindled,
    .mensa-receive.kindled,
    .chosen-dim.kindled {
        animation: none;
    }
}
.mensa-receive {
    min-width: min(100%, 280px);
    min-height: 52px;
    margin-top: 8px;
}
.mood-bar {
    width: min(100%, 520px);
    margin: 16px auto 4px;
    text-align: center;
}
.mood-label {
    font-family: var(--font-holy);
    color: var(--text-primary);
    font-size: 1.05rem;
    margin: 0 0 10px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}
.mood-label strong {
    color: var(--holy-gold-bright);
    font-weight: 700;
    border-radius: var(--radius-sm);
    padding: 0 4px;
}
.mood-num {
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    font-size: 0.92rem;
}
.mood-ends {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 0.78rem;
}
.mood-hint,
.daily-light-hint {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.45;
    margin: 8px auto 0;
}
.daily-light-kicker {
    text-align: center;
    font-family: var(--font-holy);
    letter-spacing: 0.22em;
    color: var(--holy-gold);
    font-size: 0.82rem;
    margin: 0 0 6px;
}
.daily-light-hint {
    text-align: center;
    margin-bottom: 8px;
}
.vestry-desc {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin: -8px auto 16px;
    max-width: 36em;
}
#soul-vestry[hidden] {
    display: none;
}
@media (max-width: 767px) {
    .mensa {
        padding: 22px 14px 16px;
    }
    .pillars-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .christ-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .mensa-kicker {
        letter-spacing: 0.18em;
    }
}

/* ── 3. Illuminated Manuscript Folio (Manna Card Triptych) ─ */
.manna-card {
    background: var(--card-bg-elevated);
    border: 2px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 44px 38px;
    box-shadow: var(--shadow-holy), 0 0 50px var(--holy-gold-glow);
    position: relative;
    overflow: hidden;
    margin-top: 30px;
    margin-bottom: 36px;
    transition: var(--transition-processional);
    min-height: 220px;
}
.manna-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--holy-gold-deep), var(--holy-gold-bright), var(--holy-gold-deep), transparent);
}
.manna-card::after {
    content: '❖';
    position: absolute;
    top: 14px;
    right: 20px;
    font-size: 0.85rem;
    color: var(--holy-gold);
    opacity: 0.6;
}

.manna-verse-text {
    font-family: var(--font-holy);
    font-size: clamp(1.35rem, 3.4vw, 2.05rem);
    line-height: 1.75;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 18px;
    font-weight: 600;
    position: relative;
    padding: 0 16px;
    letter-spacing: 0.04em;
}
.manna-verse-ref {
    font-family: var(--font-gothic-deco);
    font-size: 1.12rem;
    color: var(--holy-gold);
    text-align: center;
    letter-spacing: 0.22em;
    font-weight: bold;
    margin-bottom: 28px;
    text-transform: uppercase;
}

.manna-section-divider {
    height: 1px;
    background: radial-gradient(circle, var(--border-gold) 0%, transparent 80%);
    margin: 26px 0;
}

/* Triptych Layout (Insight, Walk, Exegesis) */
.manna-insight-box, .manna-app-box {
    margin-bottom: 22px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    background: rgba(226, 186, 77, 0.03);
    border-left: 3px solid var(--holy-gold);
}
.manna-box-title {
    font-family: var(--font-holy);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--holy-gold-bright);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.06em;
}
.manna-box-content {
    font-size: 1.02rem;
    line-height: 1.88;
    color: var(--text-secondary);
}

/* Chamber III: Exegesis Box with Strong's Relic Chips */
.exegesis-box {
    background: rgba(226, 186, 77, 0.04);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-top: 24px;
    margin-bottom: 24px;
    position: relative;
}
.exegesis-title {
    font-family: var(--font-holy);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--holy-gold-bright);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.08em;
}
.exegesis-text {
    font-family: "Palatino Linotype", "Times New Roman", "Noto Serif TC", "Segoe UI", serif;
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-primary);
}

/* Lower Register: Deep Contemplation Codex Appendix */
.deep-rev-box {
    background: linear-gradient(135deg, rgba(226, 186, 77, 0.06) 0%, rgba(232, 155, 81, 0.1) 100%);
    border: 1px solid var(--holy-gold);
    border-radius: var(--radius-md);
    padding: 28px;
    margin-top: 24px;
    animation: fadeUpInEpic 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 0 20px rgba(226, 186, 77, 0.08);
}

/* AI Quota Badge (Acolyte Seal) */
.ai-quota-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(226, 186, 77, 0.06);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 5px 16px;
    font-family: var(--font-holy);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 14px;
    letter-spacing: 0.04em;
}
.ai-quota-badge strong {
    color: var(--holy-gold-bright);
}

