/* ── Astrocartography (ac) ── */

.ac-shell {
    padding-top: 1rem;
    padding-bottom: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.ac-form-wrap {
    max-width: 480px;
    margin: 0 auto;
}

/* ── Map ── */
.ac-map-outer {
    position: relative;
    width: 100%;
    aspect-ratio: 1024 / 599;
    margin: 0 auto 1rem;
    border-radius: 1.5rem;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.ac-map-outer:active {
    cursor: grabbing;
}

.ac-map-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.ac-map-controls {
    position: absolute;
    bottom: 0.6rem;
    right: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 3;
}

.ac-map-controls button {
    width: 32px;
    height: 32px;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(10, 10, 20, 0.75);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.15s ease;
}

.ac-map-controls button:hover {
    background: rgba(30, 30, 60, 0.85);
}

/* ── Legend ── */
.ac-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: center;
    margin-bottom: 0.75rem;
    padding: 0 0.5rem;
}

.ac-legend-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    cursor: pointer;
    opacity: 0.3;
    transition: opacity 0.2s ease, background 0.2s ease;
    user-select: none;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ac-legend-chip.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.06);
}

.ac-legend-chip:hover {
    opacity: 0.8;
}

.ac-legend-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ac-legend-meta {
    text-align: center;
    font-size: 0.62rem;
    color: var(--body-color-faded);
    margin-bottom: 1rem;
    opacity: 0.6;
}

/* ── Report ── */
.ac-report-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

.ac-report-card {
    padding: 1rem 1.15rem;
    border-radius: 1rem;
    border-left: 3px solid var(--planet-color, #555);
}

.ac-report-planet {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.ac-report-planet-glyph {
    font-size: 1.2rem;
}

.ac-report-lines {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 0.75rem;
}

.ac-line-info {
    margin-bottom: 0.25rem;
}

.ac-line-label {
    font-weight: 600;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.6;
    margin-bottom: 0.1rem;
}

.ac-line-region {
    font-size: 0.78rem;
}

.ac-line-desc {
    color: var(--body-color-faded);
    font-size: 0.7rem;
    margin-top: 0.1rem;
    line-height: 1.4;
}

.ac-influence-badge {
    display: inline-block;
    padding: 0.12rem 0.55rem;
    border-radius: 1rem;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.4rem;
}

.ac-influence--good {
    background: rgba(80, 220, 140, 0.12);
    color: rgba(80, 220, 140, 0.9);
}

.ac-influence--mixed {
    background: rgba(255, 200, 60, 0.12);
    color: rgba(255, 200, 60, 0.9);
}

.ac-influence--hard {
    background: rgba(255, 100, 100, 0.12);
    color: rgba(255, 100, 100, 0.9);
}

/* ── Summary ── */
.ac-summary {
    padding: 1.15rem;
    border-radius: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.ac-summary-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.ac-summary-text {
    font-size: 0.76rem;
    color: var(--body-color-faded);
    line-height: 1.6;
}

/* ── Remember toggle ── */
.ac-remember-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.78rem;
    color: var(--body-color-faded);
}

/* ── Section fade ── */
.ac-fade {
    transition: opacity 0.3s ease;
}

.ac-fade.ac-out {
    opacity: 0;
}

/* ── Responsive ── */
@media (min-width: 768px) {
    .ac-shell {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .ac-report-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ac-legend-chip {
        font-size: 0.73rem;
        padding: 0.28rem 0.7rem;
    }
}

@media (max-width: 575px) {
    .ac-report-lines {
        grid-template-columns: 1fr;
    }

    .ac-legend-chip {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }
}
