/* =====================================================================
   CMI LifeTech — Chapel 4: Companions (同路尋道 · Astrolabe & Tree of Jesse)
   ===================================================================== */

.companions-container {
    max-width: 960px;
    margin: 0 auto;
}

/* ── 1. Scribe's Covenant Inscription Deck (Profile Builder) ─ */
.setup-box {
    background: var(--card-bg-elevated);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 34px 28px;
    box-shadow: var(--shadow-holy), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    margin-bottom: 34px;
    position: relative;
}
.setup-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: radial-gradient(circle, var(--holy-gold-bright) 0%, transparent 80%);
}
.setup-title {
    font-family: var(--font-holy);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--holy-gold-bright);
    margin-bottom: 10px;
    text-align: center;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.setup-desc {
    font-size: 0.94rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 28px;
    line-height: 1.6;
}

.match-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 20px;
}
.match-chip {
    background: var(--card-bg);
    border: 1px solid var(--border-engraved);
    border-radius: var(--radius-full);
    padding: 7px 16px;
    font-family: var(--font-holy);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-processional);
}
.match-chip:hover {
    border-color: var(--border-gold);
    color: var(--holy-gold-bright);
}
.match-chip.selected {
    background: linear-gradient(135deg, rgba(226, 186, 77, 0.25) 0%, rgba(232, 155, 81, 0.35) 100%);
    border-color: var(--holy-gold-bright);
    color: var(--holy-gold-bright);
    font-weight: 700;
    box-shadow: 0 0 14px var(--holy-gold-glow);
}
body:not(.dark-theme) .match-chip.selected {
    color: var(--holy-dark);
}

/* ── 2. Celestial Astrolabe (Constellation Radar Map) ─────── */
.constellation-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 24px 0;
    background: radial-gradient(circle at 50% 50%, rgba(226, 186, 77, 0.08) 0%, rgba(4, 2, 7, 0.95) 100%);
    border: 1px solid var(--border-gold);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8), 0 0 25px var(--holy-gold-glow);
}
.constellation-wrapper::before {
    content: '';
    position: absolute;
    inset: 15px;
    border: 1px dashed rgba(226, 186, 77, 0.25);
    border-radius: 50%;
    pointer-events: none;
}
.constellation-wrapper::after {
    content: '';
    position: absolute;
    inset: 40px;
    border: 1px solid rgba(226, 186, 77, 0.15);
    border-radius: 50%;
    pointer-events: none;
}
#constellationCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ── 3. Pilgrim Inscription Cards Grid (Showcase) ────────── */
.seeker-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 24px;
    margin-top: 24px;
}
.seeker-card {
    background: var(--card-bg-elevated);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: var(--shadow-holy);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-processional);
    position: relative;
}
@media (hover: hover) {
    .seeker-card:hover {
        transform: translateY(-4px);
        border-color: var(--holy-gold-bright);
        box-shadow: var(--shadow-holy), 0 0 32px var(--holy-gold-glow);
    }
}
.seeker-resonance-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(226, 186, 77, 0.12);
    color: var(--holy-gold-bright);
    font-family: var(--font-holy);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-gold);
    letter-spacing: 0.05em;
}

/* ── 4. Covenant Tree of Jesse & Intercession Chancel ─────── */
.buddy-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}
@media (min-width: 768px) {
    .buddy-dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.covenant-tree-card {
    background: var(--card-bg-elevated);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 30px 24px;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-holy);
}
.covenant-tree-visual {
    width: 240px;
    height: 240px;
    margin: 0 auto;
    display: block;
    filter: drop-shadow(0 0 16px var(--holy-gold-glow));
}
.tree-leaves-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(226, 186, 77, 0.15);
    color: var(--holy-gold-bright);
    border: 1px solid var(--holy-gold);
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-family: var(--font-holy);
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.06em;
}

/* Private Intercession Thread (Oratory) */
.buddy-chat-card {
    background: var(--card-bg-elevated);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 26px;
    display: flex;
    flex-direction: column;
    height: 460px;
    box-shadow: var(--shadow-holy);
}
.buddy-prayer-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
}
.buddy-prayer-bubble {
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    max-width: 85%;
    font-size: 0.94rem;
    line-height: 1.68;
    color: var(--text-primary);
}
.buddy-prayer-bubble.my-prayer {
    align-self: flex-end;
    border-color: var(--border-gold);
    background: rgba(226, 186, 77, 0.08);
}
.buddy-prayer-bubble.peer-prayer {
    align-self: flex-start;
}

/* ── 5. Synced Breathing Oratory ─────────────────────────── */
.synced-breathing-panel {
    background: var(--card-bg-elevated);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-top: 24px;
    text-align: center;
    box-shadow: var(--shadow-holy);
}
.breathing-circles-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 48px;
    margin: 28px 0;
}
.breathing-orb {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--holy-gold-bright) 0%, rgba(226, 186, 77, 0.25) 70%, transparent 100%);
    box-shadow: 0 0 35px var(--holy-gold-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-holy);
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    transition: transform 4s cubic-bezier(0.4, 0, 0.2, 1);
}
.breathing-orb.inhale {
    transform: scale(1.4);
    box-shadow: 0 0 60px var(--holy-gold-bright);
}
.breathing-orb.exhale {
    transform: scale(0.9);
}

/* ── 6. Radio Inscription Chips ──────────────────────────── */
.setup-radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
    margin-top: 8px;
}
.setup-radio-card {
    background: var(--card-bg);
    border: 1px solid var(--border-engraved);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    min-height: 44px;
    cursor: pointer;
    transition: var(--transition-processional);
    user-select: none;
}
.setup-radio-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-2px);
    background: rgba(226, 186, 77, 0.05);
}
.setup-radio-card.active {
    background: linear-gradient(135deg, rgba(226, 186, 77, 0.16) 0%, rgba(232, 155, 81, 0.22) 100%);
    border-color: var(--holy-gold-bright);
    box-shadow: 0 0 16px var(--holy-gold-glow);
}

/* ── 7. Pilgrim Avatar & Details ─────────────────────────── */
.seeker-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
    gap: 10px;
}
.seeker-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, var(--holy-gold-bright) 50%, var(--holy-gold-deep) 100%);
    border: 2px solid var(--border-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: var(--font-holy);
    color: #100a1c;
    font-size: 1.15rem;
    box-shadow: 0 0 14px var(--holy-gold-glow);
    flex-shrink: 0;
}
.seeker-role-title {
    font-size: 0.82rem;
    color: var(--holy-gold-bright);
    font-family: var(--font-holy);
    letter-spacing: 0.06em;
}
.seeker-tags-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
}
.seeker-season-tag {
    background: rgba(30, 85, 125, 0.18);
    border: 1px solid rgba(75, 163, 227, 0.35);
    color: var(--accent-hebrew);
    font-size: 0.78rem;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-family: var(--font-holy);
}
.seeker-covenant-tag {
    background: rgba(226, 186, 77, 0.12);
    border: 1px solid var(--border-gold);
    color: var(--holy-gold);
    font-size: 0.78rem;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-family: var(--font-holy);
}
.seeker-bio-reflection {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.68;
    margin: 12px 0;
    font-style: italic;
    background: rgba(226, 186, 77, 0.03);
    padding: 12px;
    border-radius: var(--radius-sm);
    border-left: 2px solid var(--holy-gold);
}
.compatibility-insight {
    background: rgba(226, 186, 77, 0.06);
    border: 1px dashed var(--border-gold);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.84rem;
    color: var(--text-secondary);
    margin-bottom: 14px;
}
.seeker-stats-mini {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 14px 0;
    background: rgba(0, 0, 0, 0.25);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
}
.seeker-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.seeker-stat-bar-bg {
    width: 96px;
    height: 5px;
    background: rgba(226, 186, 77, 0.15);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-left: 8px;
}
.seeker-stat-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--holy-gold), var(--holy-gold-bright));
}

