/* ═══════════════════════════════════════════════════════
   BIRTH ALIGNMENT — Celestial Birth Sky Calculator
   Full-screen Three.js experience with glass input form
   and floating result panels
   ═══════════════════════════════════════════════════════ */

:root {
    --ba-gold: #d4af37;
    --ba-gold-dim: rgba(212, 175, 55, 0.4);
    --ba-gold-glow: rgba(212, 175, 55, 0.15);
    --ba-blue: #64b4ff;
    --ba-blue-dim: rgba(100, 180, 255, 0.4);
    --ba-red: #ff6464;
    --ba-teal: #64c8be;
    --ba-violet: #a870d0;
    --ba-bg: #000000;
    --ba-glass: rgba(8, 10, 18, 0.55);
    --ba-glass-border: rgba(255, 255, 255, 0.08);
    --ba-glass-border-hover: rgba(212, 175, 55, 0.25);
    --ba-text: #e4e6ed;
    --ba-text-muted: rgba(255, 255, 255, 0.45);
    --ba-serif: 'Cormorant Garamond', 'Georgia', serif;
    --ba-display: 'Cinzel', serif;
    --ba-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --ba-nav-h: 44px;
}

/* ═══ PAGE CLASS ═══ */
.ba-page {
    background: var(--ba-bg);
    color: var(--ba-text);
}

/* ═══ PHASE CONTAINER ═══ */
.ba-phase {
    position: fixed;
    inset: 0;
    z-index: 10;
}

/* ═══ BASE RESET ═══ */
html, body {
    margin: 0;
    padding: 0;
    background: var(--ba-bg);
    color: var(--ba-text);
    font-family: var(--ba-serif);
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    -webkit-font-smoothing: antialiased;
}

/* Hide footer — full-screen canvas */
.magna-footer, #magna-site-footer, footer,
.magna-footer--collapsed, .magna-footer__collapsed-bar {
    display: none !important;
}

/* ═══ THREE.JS CANVAS ═══ */
#ba-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
}
#ba-canvas canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* ═══ INPUT PHASE ═══ */
#ba-input-phase {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 60px;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: opacity 1.2s ease, transform 1.2s ease;
}
#ba-input-phase.ba-hidden {
    opacity: 0;
    transform: translateY(-40px) scale(0.95);
    pointer-events: none;
}

.ba-input-inner {
    text-align: center;
    max-width: 480px;
    width: 90%;
}

.ba-input-eyebrow {
    font-family: var(--ba-mono);
    font-size: 0.6rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--ba-gold);
    margin-bottom: 12px;
    opacity: 0;
    animation: ba-fade-in 1.5s ease 0.3s forwards;
}

.ba-input-title {
    font-family: var(--ba-display);
    font-size: clamp(1.2rem, 3.5vw, 2.2rem);
    font-weight: 400;
    letter-spacing: 0.1em;
    line-height: 1.4;
    color: var(--ba-text);
    text-shadow: 0 0 40px rgba(212, 175, 55, 0.3);
    margin-bottom: 12px;
    text-align: center;
    opacity: 0;
    animation: ba-fade-in 2s ease 0.5s forwards;
}

.ba-input-sub {
    font-size: 0.85rem;
    color: var(--ba-text-muted);
    margin-bottom: 32px;
    opacity: 0;
    animation: ba-fade-in 2s ease 0.8s forwards;
}

@keyframes ba-fade-in {
    to { opacity: 1; }
}

.ba-form {
    background: var(--ba-glass);
    border: 1px solid var(--ba-glass-border);
    border-radius: 16px;
    padding: 40px 48px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    max-width: 440px;
    width: 90%;
    opacity: 0;
    animation: ba-fade-in 2s ease 1s forwards;
}

.ba-field {
    margin-bottom: 20px;
}
.ba-field:last-of-type {
    margin-bottom: 24px;
}

.ba-label {
    display: block;
    font-family: var(--ba-mono);
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    color: var(--ba-text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
    text-align: left;
}
.ba-optional {
    color: rgba(255, 255, 255, 0.2);
    font-weight: 400;
}

.ba-form-row {
    margin-bottom: 24px;
}
.ba-form-row:last-child {
    margin-bottom: 0;
}

.ba-form-label {
    display: block;
    font-family: var(--ba-mono);
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    color: var(--ba-text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.ba-input-field, .ba-form-input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 14px 16px;
    color: var(--ba-text);
    font-family: var(--ba-serif);
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.ba-input-field:focus,
.ba-form-input:focus {
    border-color: var(--ba-gold-dim);
    box-shadow: 0 0 20px var(--ba-gold-glow);
    outline: none;
}
.ba-input-field::placeholder,
.ba-form-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* Date/time row side by side */
.ba-form-row-split {
    display: flex;
    gap: 16px;
}
.ba-form-row-split .ba-form-row {
    flex: 1;
}

/* City autocomplete */
.ba-city-wrapper {
    position: relative;
}
.ba-city-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: rgba(12, 14, 24, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    backdrop-filter: blur(20px);
}
.ba-city-dropdown.ba-visible {
    display: block;
}
.ba-city-option {
    padding: 10px 16px;
    cursor: pointer;
    font-family: var(--ba-serif);
    font-size: 0.95rem;
    color: var(--ba-text);
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.ba-city-option:hover,
.ba-city-option.ba-active {
    background: rgba(212, 175, 55, 0.1);
}
.ba-city-option .ba-city-country {
    color: var(--ba-text-muted);
    font-size: 0.8rem;
    margin-left: 8px;
}

/* Compute button */
.ba-compute-btn {
    display: block;
    width: 100%;
    padding: 16px;
    margin-top: 32px;
    background: transparent;
    border: 1px solid var(--ba-gold-dim);
    border-radius: 8px;
    color: var(--ba-gold);
    font-family: var(--ba-display);
    font-size: 0.95rem;
    letter-spacing: 0.3em;
    cursor: pointer;
    transition: all 0.4s ease;
    text-transform: uppercase;
}
.ba-compute-btn:hover {
    background: rgba(212, 175, 55, 0.08);
    box-shadow: 0 0 30px var(--ba-gold-glow);
    border-color: var(--ba-gold);
}
.ba-compute-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Time optional hint */
.ba-time-hint {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.25);
    margin-top: 4px;
    font-family: var(--ba-mono);
}

/* ═══ COMPUTING TRANSITION ═══ */
#ba-computing {
    position: fixed;
    inset: 0;
    z-index: 15;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}
#ba-computing.ba-active {
    opacity: 1;
}
.ba-computing-inner {
    text-align: center;
}
.ba-computing-ring {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-top-color: var(--ba-gold);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: ba-spin 1.2s linear infinite;
}
@keyframes ba-spin {
    to { transform: rotate(360deg); }
}
.ba-computing-text {
    font-family: var(--ba-mono);
    font-size: 0.75rem;
    letter-spacing: 0.4em;
    color: var(--ba-gold);
    animation: ba-pulse 1.5s ease-in-out infinite;
}
@keyframes ba-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* ═══ RESULT PHASE ═══ */
#ba-result-phase {
    position: fixed;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.5s ease;
}
#ba-result-phase.ba-active {
    opacity: 1;
    pointer-events: auto;
}

/* Result header */
.ba-result-header {
    text-align: center;
    margin-bottom: 32px;
    opacity: 0;
    animation: ba-slide-up 1.2s ease 0.3s forwards;
}
.ba-result-date {
    font-family: var(--ba-display);
    font-size: clamp(1.4rem, 4vw, 2.4rem);
    font-weight: 400;
    letter-spacing: 0.3em;
    color: var(--ba-text);
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}
.ba-result-location {
    font-family: var(--ba-mono);
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: var(--ba-text-muted);
    margin-top: 6px;
}

@keyframes ba-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Result cards container */
.ba-result-cards {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 0 16px;
    flex-wrap: wrap;
}

.ba-result-card {
    background: var(--ba-glass);
    border: 1px solid var(--ba-glass-border);
    border-radius: 12px;
    padding: 16px 20px;
    text-align: center;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    min-width: 140px;
    max-width: 180px;
    opacity: 0;
    animation: ba-card-in 0.8s ease forwards;
}
.ba-result-card:nth-child(1) { animation-delay: 0.5s; }
.ba-result-card:nth-child(2) { animation-delay: 0.7s; }
.ba-result-card:nth-child(3) { animation-delay: 0.9s; }
.ba-result-card:nth-child(4) { animation-delay: 1.1s; }
.ba-result-card:nth-child(5) { animation-delay: 1.3s; }
.ba-result-card:nth-child(6) { animation-delay: 1.5s; }
.ba-result-card:nth-child(7) { animation-delay: 1.7s; }

@keyframes ba-card-in {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.ba-card-label {
    font-family: var(--ba-mono);
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    color: var(--ba-text-muted);
    text-transform: uppercase;
    margin-bottom: 6px;
}
.ba-card-value {
    font-family: var(--ba-display);
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    line-height: 1.2;
}
.ba-card-sub {
    font-size: 0.7rem;
    color: var(--ba-text-muted);
    margin-top: 4px;
    font-family: var(--ba-serif);
}

/* Card color variants */
.ba-result-card[data-type="sun"] { border-color: rgba(255, 200, 100, 0.15); }
.ba-result-card[data-type="sun"] .ba-card-value { color: #ffc864; }

.ba-result-card[data-type="moon"] { border-color: rgba(200, 210, 230, 0.15); }
.ba-result-card[data-type="moon"] .ba-card-value { color: #c8d2e6; }

.ba-result-card[data-type="rising"] { border-color: rgba(212, 175, 55, 0.15); }
.ba-result-card[data-type="rising"] .ba-card-value { color: var(--ba-gold); }

.ba-result-card[data-type="pleiades"] { border-color: rgba(100, 180, 255, 0.15); }
.ba-result-card[data-type="pleiades"] .ba-card-value { color: var(--ba-blue); }

.ba-result-card[data-type="orion"] { border-color: rgba(255, 100, 100, 0.15); }
.ba-result-card[data-type="orion"] .ba-card-value { color: var(--ba-red); }

.ba-result-card[data-type="lifepath"] { border-color: rgba(168, 112, 208, 0.15); }
.ba-result-card[data-type="lifepath"] .ba-card-value { color: var(--ba-violet); }

.ba-result-card[data-type="guide"] { border-color: rgba(212, 175, 55, 0.2); }
.ba-result-card[data-type="guide"] .ba-card-value { color: var(--ba-gold); }

/* Entity guide section (larger, prominent) */
.ba-guide-section {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    text-align: right;
    opacity: 0;
    animation: ba-slide-up 1.2s ease 2s forwards;
}
.ba-guide-number {
    font-family: var(--ba-display);
    font-size: 5rem;
    font-weight: 100;
    color: rgba(212, 175, 55, 0.12);
    line-height: 1;
}
.ba-guide-name {
    font-family: var(--ba-display);
    font-size: 1.2rem;
    letter-spacing: 0.25em;
    color: var(--ba-gold);
    margin-top: 4px;
}
.ba-guide-role {
    font-family: var(--ba-mono);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    color: var(--ba-text-muted);
    margin-top: 4px;
}
.ba-guide-cta {
    display: inline-block;
    margin-top: 16px;
    padding: 8px 20px;
    border: 1px solid var(--ba-gold-dim);
    border-radius: 20px;
    color: var(--ba-gold);
    font-family: var(--ba-mono);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-decoration: none;
    transition: all 0.3s ease;
}
.ba-guide-cta:hover {
    background: rgba(212, 175, 55, 0.1);
    box-shadow: 0 0 20px var(--ba-gold-glow);
}

/* Precessional position (left side) */
.ba-precession-section {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    text-align: left;
    opacity: 0;
    animation: ba-slide-up 1.2s ease 1.8s forwards;
}
.ba-precession-label {
    font-family: var(--ba-mono);
    font-size: 0.55rem;
    letter-spacing: 0.25em;
    color: var(--ba-text-muted);
    text-transform: uppercase;
}
.ba-precession-value {
    font-family: var(--ba-display);
    font-size: 2rem;
    color: var(--ba-teal);
    margin-top: 4px;
}
.ba-precession-sub {
    font-size: 0.7rem;
    color: var(--ba-text-muted);
    margin-top: 2px;
    max-width: 180px;
}

/* Grid resonance (left side, below precession) */
.ba-grid-section {
    position: absolute;
    left: 24px;
    bottom: 200px;
    text-align: left;
    opacity: 0;
    animation: ba-slide-up 1.2s ease 2.2s forwards;
}
.ba-grid-label {
    font-family: var(--ba-mono);
    font-size: 0.55rem;
    letter-spacing: 0.25em;
    color: var(--ba-text-muted);
    text-transform: uppercase;
}
.ba-grid-name {
    font-family: var(--ba-serif);
    font-size: 1rem;
    color: var(--ba-gold);
    margin-top: 4px;
}
.ba-grid-distance {
    font-family: var(--ba-mono);
    font-size: 0.65rem;
    color: var(--ba-text-muted);
    margin-top: 2px;
}

/* ═══ RESULT ACTIONS (top right) ═══ */
.ba-result-actions {
    position: absolute;
    top: 60px;
    right: 24px;
    display: flex;
    gap: 10px;
    opacity: 0;
    animation: ba-fade-in 1s ease 2.5s forwards;
}
.ba-action-btn {
    padding: 8px 18px;
    background: var(--ba-glass);
    border: 1px solid var(--ba-glass-border);
    border-radius: 20px;
    color: var(--ba-text-muted);
    font-family: var(--ba-mono);
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
}
.ba-action-btn:hover {
    border-color: var(--ba-gold-dim);
    color: var(--ba-gold);
}

/* ═══ SHARE OVERLAY (old rules — kept for ID specificity, z-index unified) ═══ */
#ba-share-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
#ba-share-overlay.ba-active {
    opacity: 1;
    pointer-events: auto;
}
#ba-share-canvas {
    border-radius: 8px;
    max-width: 90vw;
    max-height: 70vh;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}
.ba-share-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}
.ba-share-btn {
    padding: 12px 28px;
    border-radius: 24px;
    font-family: var(--ba-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}
.ba-share-btn-primary {
    background: var(--ba-gold);
    border: none;
    color: #000;
}
.ba-share-btn-primary:hover {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
}
.ba-share-btn-secondary {
    background: transparent;
    border: 1px solid var(--ba-glass-border);
    color: var(--ba-text-muted);
}
.ba-share-btn-secondary:hover {
    border-color: var(--ba-gold-dim);
    color: var(--ba-gold);
}
.ba-share-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    color: var(--ba-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
    .ba-guide-section {
        right: 16px;
    }
    .ba-guide-number {
        font-size: 3.5rem;
    }
    .ba-precession-section,
    .ba-grid-section {
        left: 16px;
    }
}

@media (max-width: 768px) {
    .ba-form {
        padding: 28px 24px;
    }
    .ba-form-row-split {
        flex-direction: column;
        gap: 0;
    }
    .ba-result-cards {
        gap: 8px;
        padding: 0 8px;
        bottom: 16px;
    }
    .ba-result-card {
        min-width: 100px;
        max-width: 130px;
        padding: 12px 14px;
    }
    .ba-card-value {
        font-size: 1rem;
    }
    .ba-guide-section {
        position: absolute;
        right: auto;
        left: 50%;
        top: auto;
        bottom: 200px;
        transform: translateX(-50%);
        text-align: center;
    }
    .ba-guide-number {
        font-size: 3rem;
    }
    .ba-precession-section {
        top: 120px;
        transform: none;
    }
    .ba-grid-section {
        bottom: auto;
        top: 200px;
    }
    .ba-result-header {
        margin-bottom: 24px;
    }
    .ba-result-actions {
        top: auto;
        bottom: 250px;
        right: 50%;
        transform: translateX(50%);
    }
}

@media (max-width: 480px) {
    .ba-result-cards {
        gap: 6px;
        padding: 0 6px;
        bottom: 10px;
    }
    .ba-result-card {
        min-width: 85px;
        max-width: 110px;
        padding: 10px 10px;
    }
    .ba-card-value {
        font-size: 0.85rem;
    }
    .ba-card-label {
        font-size: 0.5rem;
    }
    .ba-guide-section {
        bottom: 170px;
    }
    .ba-guide-number {
        font-size: 2.5rem;
    }
    .ba-guide-name {
        font-size: 0.9rem;
    }
    .ba-precession-section {
        display: none;
    }
    .ba-grid-section {
        display: none;
    }
    .ba-input-title {
        letter-spacing: 0.2em;
    }
}

/* ═══════════════════════════════════════════════════════
   RESULT SCROLL MODE — scrollable result panels over the sky
   (overrides the original fixed-position layout to support
    Hebrew profile + Omer + expanded data)
   ═══════════════════════════════════════════════════════ */

.ba-result-scroll {
    position: relative;
    z-index: 15;
    max-width: 640px;
    margin: 0 auto;
    padding: 120px 24px 60px;
}

.ba-section {
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(24px);
    animation: ba-section-in 0.7s ease forwards;
}
.ba-section:nth-child(1) { animation-delay: 0.3s; }
.ba-section:nth-child(2) { animation-delay: 0.6s; }
.ba-section:nth-child(3) { animation-delay: 0.9s; }
.ba-section:nth-child(4) { animation-delay: 1.2s; }
@keyframes ba-section-in {
    to { opacity: 1; transform: translateY(0); }
}

.ba-section-label {
    font-family: var(--ba-mono);
    font-size: 0.6rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--ba-gold);
    margin-bottom: 16px;
}

.ba-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* Override old fixed positioning when in scroll mode */
.ba-result-scroll .ba-result-card {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    top: auto;
    transform: none;
    max-width: none;
    min-width: auto;
    opacity: 1;
}

/* ═══ HEBREW PROFILE SECTION ═══ */
.ba-hebrew-grid {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.ba-hebrew-letter-display {
    flex-shrink: 0;
    text-align: center;
    min-width: 90px;
}

.ba-hebrew-char {
    font-size: 4rem;
    color: var(--ba-gold);
    line-height: 1;
    text-shadow: 0 0 30px var(--ba-gold-glow);
    margin-bottom: 8px;
}

.ba-hebrew-letter-name {
    font-family: var(--ba-mono);
    font-size: 0.7rem;
    color: var(--ba-text-muted);
    letter-spacing: 0.1em;
}

.ba-hebrew-details {
    flex: 1;
}

.ba-hebrew-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.ba-hebrew-row:last-child { border-bottom: none; }

.ba-hebrew-label {
    font-family: var(--ba-mono);
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
}

.ba-hebrew-value {
    font-size: 0.85rem;
    color: var(--ba-text);
}

/* ═══ OMER SECTION ═══ */
.ba-omer {
    margin-top: 20px;
    padding: 16px 20px;
    background: var(--ba-glass);
    border: 1px solid var(--ba-glass-border);
    border-radius: 10px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.ba-omer-label {
    font-family: var(--ba-mono);
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--ba-gold);
    margin-bottom: 8px;
}

.ba-omer-day {
    font-family: var(--ba-display);
    font-size: 1.1rem;
    color: var(--ba-text);
    margin-bottom: 4px;
}

.ba-omer-combo {
    font-size: 0.8rem;
    color: var(--ba-text-muted);
    font-style: italic;
}

/* ═══ GUIDE CARD (in scroll mode) ═══ */
.ba-result-scroll .ba-guide-section {
    position: relative;
    inset: auto;
    transform: none;
    text-align: left;
}

.ba-guide-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--ba-glass);
    border: 1px solid rgba(212, 175, 55, 0.12);
    border-radius: 12px;
    padding: 20px 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.ba-result-scroll .ba-guide-number {
    font-family: var(--ba-display);
    font-size: 2.5rem;
    color: var(--ba-gold);
    position: static;
    text-shadow: 0 0 20px var(--ba-gold-glow);
}

.ba-guide-info { flex: 1; }

.ba-result-scroll .ba-guide-name {
    font-family: var(--ba-display);
    font-size: 1.1rem;
    letter-spacing: 0.2em;
    color: var(--ba-text);
    position: static;
    margin-bottom: 4px;
}

.ba-result-scroll .ba-guide-role {
    font-family: var(--ba-mono);
    font-size: 0.65rem;
    color: var(--ba-text-muted);
    position: static;
}

.ba-result-scroll .ba-guide-cta {
    position: static;
    font-family: var(--ba-mono);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ba-gold);
    border: 1px solid var(--ba-gold-dim);
    border-radius: 4px;
    padding: 8px 16px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
}
.ba-result-scroll .ba-guide-cta:hover {
    background: rgba(212, 175, 55, 0.08);
    border-color: var(--ba-gold);
}

/* ═══ PRECESSION (in scroll mode) ═══ */
.ba-precession {
    text-align: center;
    margin-bottom: 20px;
}
.ba-result-scroll .ba-precession-value {
    font-family: var(--ba-display);
    font-size: 2rem;
    color: var(--ba-gold);
    position: static;
}
.ba-result-scroll .ba-precession-sub {
    font-family: var(--ba-mono);
    font-size: 0.65rem;
    color: var(--ba-text-muted);
    position: static;
    margin-top: 4px;
}

.ba-grid-resonance {
    text-align: center;
    padding: 12px;
    background: var(--ba-glass);
    border: 1px solid var(--ba-glass-border);
    border-radius: 8px;
}
.ba-grid-label {
    font-family: var(--ba-mono);
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 6px;
}
.ba-grid-name {
    font-size: 0.9rem;
    color: var(--ba-text);
}
.ba-grid-distance {
    font-family: var(--ba-mono);
    font-size: 0.65rem;
    color: var(--ba-text-muted);
    margin-top: 4px;
}

/* ═══ ACTIONS ═══ */
.ba-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
    padding-bottom: 40px;
    opacity: 0;
    animation: ba-section-in 0.7s ease 1.5s forwards;
}

.ba-starmap-btn {
    font-family: var(--ba-mono);
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    border: 1px solid var(--ba-gold);
    border-radius: 4px;
    padding: 14px 32px;
    cursor: pointer;
    transition: all 0.4s ease;
    background: transparent;
    color: var(--ba-gold);
    position: relative;
    overflow: hidden;
}
.ba-starmap-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(100, 180, 255, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
}
.ba-starmap-btn:hover::before {
    opacity: 1;
}
.ba-starmap-btn:hover {
    box-shadow:
        0 0 20px rgba(212, 175, 55, 0.15),
        0 0 40px rgba(212, 175, 55, 0.08);
    border-color: var(--ba-gold);
}
.ba-starmap-btn:disabled {
    opacity: 0.5;
    cursor: wait;
}
.ba-share-btn, .ba-reset-btn {
    font-family: var(--ba-mono);
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    border: none;
    border-radius: 4px;
    padding: 12px 28px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.ba-share-btn {
    background: var(--ba-gold);
    color: #000;
}
.ba-share-btn:hover {
    background: var(--ba-gold-dim);
    box-shadow: 0 0 16px var(--ba-gold-glow);
}
.ba-reset-btn {
    background: transparent;
    color: var(--ba-text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.ba-reset-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--ba-text);
}
/* ═══ COUPLES SECTION ═══ */
.ba-couples-toggle {
    display: block;
    width: 100%;
    padding: 14px;
    background: transparent;
    border: 1px dashed rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    color: var(--ba-gold-dim);
    font-family: var(--ba-mono);
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}
.ba-couples-toggle:hover {
    border-color: var(--ba-gold);
    color: var(--ba-gold);
    border-style: solid;
}
.ba-couples-form {
    margin-top: 16px;
    padding: 20px;
    background: var(--ba-glass);
    border: 1px solid var(--ba-glass-border);
    border-radius: 10px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ═══ PURCHASE MODAL TIERS ═══ */
.ba-purchase-tiers {
    display: flex;
    gap: 10px;
    margin: 20px 0 16px;
    justify-content: center;
}
.ba-purchase-tier {
    flex: 1;
    max-width: 160px;
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}
.ba-purchase-tier:hover {
    border-color: var(--ba-gold-dim);
    background: rgba(212, 175, 55, 0.04);
}
.ba-purchase-tier.featured {
    border-color: rgba(212, 175, 55, 0.25);
    background: rgba(212, 175, 55, 0.04);
}
.ba-purchase-tier-name {
    font-family: var(--ba-mono);
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    color: var(--ba-text-muted);
    text-transform: uppercase;
    margin-bottom: 6px;
}
.ba-purchase-tier-price {
    font-family: var(--ba-display);
    font-size: 1.3rem;
    color: var(--ba-gold);
    margin-bottom: 4px;
}
.ba-purchase-tier-desc {
    font-family: var(--ba-mono);
    font-size: 0.45rem;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.05em;
}
.ba-purchase-or {
    font-family: var(--ba-mono);
    font-size: 0.55rem;
    color: var(--ba-text-muted);
    text-align: center;
    margin-bottom: 16px;
}
.ba-purchase-sheet {
    max-width: 560px;
}
@media (max-width: 480px) {
    .ba-purchase-tiers {
        flex-direction: column;
        align-items: center;
    }
    .ba-purchase-tier {
        max-width: 100%;
        width: 100%;
    }
}

.ba-gates-link {
    font-family: var(--ba-mono);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ba-gold);
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.3s;
}
.ba-gates-link:hover { opacity: 1; }

/* ═══ SCROLL MODE OVERRIDES FOR RESULT PHASE ═══ */
#ba-result-phase.ba-active {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#ba-result-phase.ba-active::-webkit-scrollbar {
    display: none;
}

/* ═══ MICRO BURNING STARS — Info triggers ═══ */
.ba-info-star {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #fff;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 2;
    will-change: transform, box-shadow;
    /* Blue-white star (131Å default) */
    box-shadow:
        0 0 2px 1px rgba(255, 255, 255, 0.95),
        0 0 5px 2px rgba(160, 212, 255, 0.7),
        0 0 10px 3px rgba(100, 180, 255, 0.35),
        0 0 18px 5px rgba(100, 180, 255, 0.15);
    animation: ba-star-burn-blue 4s ease-in-out infinite;
}
/* Gold star (193Å) — every 2nd card */
.ba-result-card:nth-child(2n) .ba-info-star {
    box-shadow:
        0 0 2px 1px rgba(255, 255, 255, 0.95),
        0 0 5px 2px rgba(212, 175, 55, 0.7),
        0 0 10px 3px rgba(212, 175, 55, 0.35),
        0 0 18px 5px rgba(212, 175, 55, 0.15);
    animation-name: ba-star-burn-gold;
}
/* White-hot star — every 3rd card */
.ba-result-card:nth-child(3n) .ba-info-star {
    box-shadow:
        0 0 2px 1px rgba(255, 255, 255, 0.95),
        0 0 5px 2px rgba(220, 230, 255, 0.7),
        0 0 10px 3px rgba(200, 215, 240, 0.4),
        0 0 18px 5px rgba(200, 215, 240, 0.18);
    animation-name: ba-star-burn-white;
}
/* Stagger so they don't pulse in sync */
.ba-result-card:nth-child(1) .ba-info-star { animation-delay: 0s; }
.ba-result-card:nth-child(2) .ba-info-star { animation-delay: 0.7s; }
.ba-result-card:nth-child(3) .ba-info-star { animation-delay: 1.4s; }
.ba-result-card:nth-child(4) .ba-info-star { animation-delay: 0.3s; }
.ba-result-card:nth-child(5) .ba-info-star { animation-delay: 1.1s; }
.ba-result-card:nth-child(6) .ba-info-star { animation-delay: 1.8s; }

@keyframes ba-star-burn-blue {
    0%, 100% {
        box-shadow:
            0 0 2px 1px rgba(255, 255, 255, 0.95),
            0 0 5px 2px rgba(160, 212, 255, 0.7),
            0 0 10px 3px rgba(100, 180, 255, 0.35),
            0 0 18px 5px rgba(100, 180, 255, 0.15);
        transform: scale(1);
    }
    50% {
        box-shadow:
            0 0 3px 1px rgba(255, 255, 255, 1),
            0 0 7px 3px rgba(160, 212, 255, 0.85),
            0 0 14px 4px rgba(100, 180, 255, 0.45),
            0 0 24px 6px rgba(100, 180, 255, 0.2);
        transform: scale(1.15);
    }
}
@keyframes ba-star-burn-gold {
    0%, 100% {
        box-shadow:
            0 0 2px 1px rgba(255, 255, 255, 0.95),
            0 0 5px 2px rgba(212, 175, 55, 0.7),
            0 0 10px 3px rgba(212, 175, 55, 0.35),
            0 0 18px 5px rgba(212, 175, 55, 0.15);
        transform: scale(1);
    }
    50% {
        box-shadow:
            0 0 3px 1px rgba(255, 255, 255, 1),
            0 0 7px 3px rgba(212, 175, 55, 0.85),
            0 0 14px 4px rgba(212, 175, 55, 0.45),
            0 0 24px 6px rgba(212, 175, 55, 0.2);
        transform: scale(1.15);
    }
}
@keyframes ba-star-burn-white {
    0%, 100% {
        box-shadow:
            0 0 2px 1px rgba(255, 255, 255, 0.95),
            0 0 5px 2px rgba(220, 230, 255, 0.7),
            0 0 10px 3px rgba(200, 215, 240, 0.4),
            0 0 18px 5px rgba(200, 215, 240, 0.18);
        transform: scale(1);
    }
    50% {
        box-shadow:
            0 0 3px 1px rgba(255, 255, 255, 1),
            0 0 7px 3px rgba(220, 230, 255, 0.85),
            0 0 14px 4px rgba(200, 215, 240, 0.5),
            0 0 24px 6px rgba(200, 215, 240, 0.25);
        transform: scale(1.15);
    }
}

.ba-info-star:hover {
    transform: scale(1.6) !important;
    box-shadow:
        0 0 3px 2px rgba(255, 255, 255, 1),
        0 0 8px 3px rgba(160, 212, 255, 0.9),
        0 0 16px 5px rgba(100, 180, 255, 0.5),
        0 0 28px 8px rgba(100, 180, 255, 0.25) !important;
}
.ba-result-card:nth-child(2n) .ba-info-star:hover {
    box-shadow:
        0 0 3px 2px rgba(255, 255, 255, 1),
        0 0 8px 3px rgba(212, 175, 55, 0.9),
        0 0 16px 5px rgba(212, 175, 55, 0.5),
        0 0 28px 8px rgba(212, 175, 55, 0.25) !important;
}

/* Inline star variant — smaller, next to labels */
.ba-info-star-inline {
    position: relative;
    top: auto;
    right: auto;
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-left: 8px;
    vertical-align: middle;
    box-shadow:
        0 0 2px 1px rgba(255, 255, 255, 0.9),
        0 0 4px 2px rgba(212, 175, 55, 0.6),
        0 0 8px 2px rgba(212, 175, 55, 0.25);
    animation: ba-star-burn-gold 5s ease-in-out infinite;
}
.ba-info-star-inline:nth-of-type(2n) {
    animation-name: ba-star-burn-blue;
    animation-delay: 0.5s;
    box-shadow:
        0 0 2px 1px rgba(255, 255, 255, 0.9),
        0 0 4px 2px rgba(100, 180, 255, 0.6),
        0 0 8px 2px rgba(100, 180, 255, 0.25);
}

.ba-result-card {
    position: relative;
}

/* ═══ ZODIAC SVG SYMBOLS ═══ */
.ba-zodiac-svg {
    display: inline-block;
    width: 1.15em;
    height: 1.15em;
    vertical-align: -0.12em;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ═══ INFO MODAL — Flies in from deep space ═══ */
.ba-info-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}
.ba-info-modal.ba-active {
    pointer-events: auto;
    opacity: 1;
}
.ba-info-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.6) 40%,
        rgba(0, 0, 0, 0.35) 100%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.ba-info-sheet {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transform-origin: center center;
    max-width: 520px;
    width: calc(100% - 48px);
    background: rgba(8, 10, 20, 0.96);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 12px;
    padding: 32px 32px 28px;
    opacity: 0;
    transition:
        transform 0.55s cubic-bezier(0.16, 1.11, 0.36, 1),
        opacity 0.35s ease;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow:
        0 0 40px rgba(100, 180, 255, 0.06),
        0 0 80px rgba(0, 0, 0, 0.4),
        inset 0 0 60px rgba(0, 0, 0, 0.3);
}
.ba-info-modal.ba-active .ba-info-sheet {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}
/* Tiny star at top center of modal — like the star that spawned it */
.ba-info-sheet::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff;
    box-shadow:
        0 0 3px 1px rgba(255, 255, 255, 0.9),
        0 0 8px 2px rgba(212, 175, 55, 0.6),
        0 0 16px 4px rgba(212, 175, 55, 0.2);
}
.ba-info-title {
    font-family: var(--ba-display);
    font-size: 1.05rem;
    letter-spacing: 0.18em;
    color: var(--ba-gold);
    margin-bottom: 14px;
    text-shadow: 0 0 24px rgba(212, 175, 55, 0.35);
    text-align: center;
}
.ba-info-body {
    font-family: var(--ba-serif);
    font-size: 0.9rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.72);
    text-align: center;
}
.ba-info-close {
    display: block;
    margin: 24px auto 0;
    padding: 8px 28px;
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 4px;
    color: rgba(212, 175, 55, 0.6);
    font-family: var(--ba-mono);
    font-size: 0.55rem;
    letter-spacing: 0.3em;
    cursor: pointer;
    transition: all 0.3s ease;
}
.ba-info-close:hover {
    border-color: var(--ba-gold);
    color: var(--ba-gold);
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.15);
}
@media (max-width: 480px) {
    .ba-info-sheet {
        width: calc(100% - 32px);
        padding: 24px 20px 22px;
    }
    .ba-info-body {
        font-size: 0.85rem;
    }
}

/* ═══ RESPONSIVE — SCROLL MODE ═══ */
@media (max-width: 768px) {
    .ba-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ba-hebrew-grid {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .ba-hebrew-row {
        flex-direction: column;
        gap: 2px;
        text-align: center;
    }
    .ba-guide-card {
        flex-direction: column;
        text-align: center;
    }
    .ba-result-scroll .ba-guide-cta {
        align-self: center;
    }
    .ba-result-scroll {
        padding: 100px 16px 40px;
    }
}

@media (max-width: 480px) {
    .ba-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .ba-hebrew-char {
        font-size: 3rem;
    }
    .ba-result-scroll {
        padding: 90px 12px 32px;
    }
}

/* ═══ SHARE OVERLAY ═══ */
.ba-share-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.ba-share-overlay.ba-active {
    opacity: 1;
    pointer-events: all;
}
.ba-share-inner {
    text-align: center;
    max-width: 90vw;
}
#ba-share-canvas {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}
.ba-share-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}
.ba-share-action-btn {
    font-family: var(--ba-mono);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: var(--ba-text);
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}
.ba-share-action-btn:hover {
    border-color: var(--ba-gold);
    color: var(--ba-gold);
}
.ba-share-close {
    color: var(--ba-text-muted);
}

/* ═══ SCROLLBAR (for autocomplete dropdown) ═══ */
.ba-city-dropdown::-webkit-scrollbar {
    width: 4px;
}
.ba-city-dropdown::-webkit-scrollbar-track {
    background: transparent;
}
.ba-city-dropdown::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.2);
    border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════
   PLANETARIUM HUD — glass panels at screen edges
   ═══════════════════════════════════════════════════════ */
.ba-hud {
    position: fixed;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease 0.3s;
}
#ba-result-phase.ba-active .ba-hud {
    opacity: 1;
}

.ba-hud-panel {
    position: absolute;
    background: rgba(8, 10, 18, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px 14px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    pointer-events: auto;
}
.ba-hud-tl { top: 56px; left: 14px; }
.ba-hud-tr { top: 56px; right: 14px; text-align: right; }
.ba-hud-bl { bottom: 64px; left: 14px; }
.ba-hud-br { bottom: 64px; right: 14px; display: flex; gap: 8px; }

.ba-hud-date {
    font-family: var(--ba-display);
    font-size: 0.7rem;
    color: rgba(212, 175, 55, 0.7);
    letter-spacing: 0.12em;
}
.ba-hud-location {
    font-family: var(--ba-mono);
    font-size: 0.55rem;
    color: var(--ba-text-muted);
    letter-spacing: 0.06em;
    margin-top: 2px;
}

.ba-hud-item {
    font-family: var(--ba-mono);
    font-size: 0.65rem;
    color: rgba(228, 220, 200, 0.7);
    line-height: 1.6;
}
.ba-hud-symbol {
    font-size: 0.85rem;
    margin-right: 4px;
}

.ba-hud-guide-num {
    font-family: var(--ba-display);
    font-size: 1.4rem;
    color: var(--ba-gold);
    line-height: 1;
    text-shadow: 0 0 16px rgba(212, 175, 55, 0.3);
}
.ba-hud-guide-name {
    font-family: var(--ba-display);
    font-size: 0.6rem;
    color: rgba(212, 175, 55, 0.5);
    letter-spacing: 0.18em;
    margin-top: 2px;
}

/* HUD Buttons */
.ba-hud-btn {
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 6px;
    color: rgba(212, 175, 55, 0.6);
    font-family: var(--ba-mono);
    font-size: 0.55rem;
    letter-spacing: 0.08em;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}
.ba-hud-btn:hover {
    background: rgba(212, 175, 55, 0.12);
    color: var(--ba-gold);
    border-color: rgba(212, 175, 55, 0.3);
}

/* ═══ Layer Toggle Controls ═══ */
.ba-hud-controls {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    pointer-events: auto;
}
.ba-ctrl {
    width: 36px;
    height: 36px;
    background: rgba(8, 10, 18, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: rgba(212, 175, 55, 0.25);
    font-size: 0.8rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}
.ba-ctrl.active {
    color: var(--ba-gold);
    border-color: rgba(212, 175, 55, 0.25);
    background: rgba(212, 175, 55, 0.08);
}
.ba-ctrl:hover {
    border-color: rgba(212, 175, 55, 0.3);
}

/* ═══ SKY INFO PANEL (click-to-inspect) ═══ */
.ba-sky-info {
    position: fixed;
    z-index: 25;
    background: rgba(8, 10, 18, 0.85);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-left: 3px solid rgba(212, 175, 55, 0.4);
    border-radius: 8px;
    padding: 10px 14px;
    min-width: 160px;
    max-width: 240px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    pointer-events: none;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.2s, transform 0.2s;
}
.ba-sky-info.visible {
    opacity: 1;
    transform: scale(1);
}
.ba-sky-info-name {
    font-family: var(--ba-display);
    font-size: 0.75rem;
    color: var(--ba-gold);
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}
.ba-sky-info-body {
    font-family: var(--ba-mono);
    font-size: 0.6rem;
    color: rgba(228, 220, 200, 0.6);
    line-height: 1.6;
}

/* ═══ REPORT PANEL (slide-in sidebar) ═══ */
.ba-report-panel {
    position: fixed;
    top: 0;
    right: -400px;
    bottom: 0;
    width: 380px;
    background: rgba(8, 10, 18, 0.94);
    border-left: 1px solid rgba(212, 175, 55, 0.06);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 30;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    pointer-events: auto;
    scrollbar-width: none;
}
.ba-report-panel::-webkit-scrollbar { display: none; }
.ba-report-panel.open {
    right: 0;
}
.ba-report-close {
    position: sticky;
    top: 8px;
    float: right;
    margin: 8px 12px 0 0;
    background: none;
    border: none;
    color: rgba(212, 175, 55, 0.4);
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 31;
    transition: color 0.2s;
}
.ba-report-close:hover { color: var(--ba-gold); }

/* Override result-scroll inside report panel */
.ba-report-panel .ba-result-scroll {
    position: relative;
    max-width: 100%;
    padding: 48px 20px 40px;
    overflow: visible;
}

/* ═══ MOBILE HUD ADJUSTMENTS ═══ */
@media (max-width: 640px) {
    .ba-hud-panel { padding: 8px 10px; }
    .ba-hud-tl, .ba-hud-tr { top: 48px; }
    .ba-hud-bl, .ba-hud-br { bottom: 56px; }
    .ba-hud-date { font-size: 0.6rem; }
    .ba-hud-item { font-size: 0.58rem; }
    .ba-hud-btn { font-size: 0.5rem; padding: 5px 8px; }
    .ba-ctrl { width: 32px; height: 32px; font-size: 0.7rem; }
    .ba-report-panel {
        width: 100%;
        right: -100%;
    }
    .ba-report-panel .ba-result-scroll {
        padding: 48px 14px 32px;
    }
}
@media (max-width: 380px) {
    .ba-hud-tr { display: none; }
    .ba-hud-br .ba-hud-btn:not(:first-child) { display: none; }
}

/* ═══════════════════════════════════════════════════════
   INVITE LANDING OVERLAY
   ═══════════════════════════════════════════════════════ */
.ba-invite-overlay {
    position: fixed;
    inset: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.ba-invite-overlay.ba-active {
    pointer-events: auto;
    opacity: 1;
}

.ba-invite-card {
    background: rgba(8, 10, 18, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.12);
    border-radius: 16px;
    padding: 36px 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5), 0 0 40px rgba(212, 175, 55, 0.03);
    transform: scale(0);
    transition: transform 0.6s cubic-bezier(0.16, 1.11, 0.36, 1);
}
.ba-invite-overlay.ba-active .ba-invite-card {
    transform: scale(1);
}

.ba-invite-header {
    font-family: var(--ba-display);
    font-size: clamp(0.85rem, 2.5vw, 1.1rem);
    color: var(--ba-gold);
    letter-spacing: 0.06em;
    line-height: 1.4;
    margin-bottom: 8px;
}

.ba-invite-info {
    font-family: var(--ba-mono);
    font-size: 0.65rem;
    color: var(--ba-text-muted);
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.ba-invite-divider {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
    margin: 0 auto 16px;
}

.ba-invite-prompt {
    font-family: var(--ba-serif);
    font-size: 1rem;
    color: var(--ba-text);
    margin-bottom: 20px;
    font-style: italic;
}

.ba-invite-form .ba-field {
    margin-bottom: 12px;
    text-align: left;
}
.ba-invite-form .ba-input-field {
    font-size: 16px; /* Prevent iOS zoom */
}

/* ═══════════════════════════════════════════════════════
   SYNASTRY SUMMARY PANEL (bottom sheet)
   ═══════════════════════════════════════════════════════ */
.ba-synastry-panel {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    max-height: 55vh;
    background: rgba(8, 10, 18, 0.94);
    border-top: 1px solid rgba(212, 175, 55, 0.08);
    border-radius: 16px 16px 0 0;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 28;
    overflow-y: auto;
    padding: 24px 20px 32px;
    transition: bottom 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    scrollbar-width: none;
    pointer-events: auto;
}
.ba-synastry-panel::-webkit-scrollbar { display: none; }
.ba-synastry-panel.open {
    bottom: 0;
}

.ba-synastry-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: rgba(212, 175, 55, 0.4);
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 29;
}

/* Harmony score */
.ba-syn-score {
    text-align: center;
    margin-bottom: 20px;
}
.ba-syn-score-num {
    font-family: var(--ba-display);
    font-size: 2.5rem;
    color: var(--ba-gold);
    text-shadow: 0 0 24px rgba(212, 175, 55, 0.3);
    line-height: 1;
}
.ba-syn-score-label {
    font-family: var(--ba-display);
    font-size: 0.7rem;
    color: rgba(212, 175, 55, 0.6);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 4px;
}
.ba-syn-score-detail {
    font-family: var(--ba-mono);
    font-size: 0.55rem;
    color: var(--ba-text-muted);
    margin-top: 6px;
}

/* Aspect list */
.ba-syn-aspects {
    margin-bottom: 20px;
}
.ba-syn-aspect {
    margin-bottom: 14px;
}
.ba-syn-aspect-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid var(--ba-gold);
    padding-left: 10px;
    margin-bottom: 4px;
}
.ba-syn-aspect-bodies {
    font-family: var(--ba-display);
    font-size: 0.75rem;
    color: var(--ba-text);
    letter-spacing: 0.06em;
}
.ba-syn-aspect-orb {
    font-family: var(--ba-mono);
    font-size: 0.55rem;
    color: var(--ba-text-muted);
}
.ba-syn-aspect-text {
    font-size: 0.75rem;
    color: rgba(224, 216, 200, 0.55);
    line-height: 1.6;
    padding-left: 13px;
}

/* Element balance */
.ba-syn-elements {
    margin-bottom: 16px;
}
.ba-syn-elements-title {
    font-family: var(--ba-display);
    font-size: 0.6rem;
    color: rgba(212, 175, 55, 0.5);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.ba-syn-el-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.ba-syn-el-name {
    font-family: var(--ba-mono);
    font-size: 0.6rem;
    width: 40px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.ba-syn-el-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ba-syn-el-bar {
    height: 4px;
    border-radius: 2px;
    transition: width 1s ease-out;
}

/* Partner HUD items (rose) */
.ba-hud-partner {
    color: rgba(232, 140, 165, 0.8) !important;
}
.ba-hud-divider {
    width: 100%;
    height: 1px;
    background: rgba(212, 175, 55, 0.1);
    margin: 4px 0;
}

@media (max-width: 640px) {
    .ba-invite-card { padding: 28px 20px; }
    .ba-synastry-panel { max-height: 65vh; padding: 20px 16px 24px; }
    .ba-syn-score-num { font-size: 2rem; }
}
