@import url('/assets/tokens.css');

:root {
    /* Component-level overrides if needed */
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: transparent;
    color: var(--fg);
    font-family: var(--font);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Cosmos Atmosphere Backdrop & Parallax */
#cosmos-backdrop {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.cosmos-bg {
    position: absolute;
    inset: -20px;
    background-image: var(--current-bg, url('/assets/images/bg_mystic_nebula.jpg'));
    background-size: cover;
    background-position: center;
    transition: opacity 0.8s ease;
    filter: brightness(0.65) contrast(1.1);
}

.celestial-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.7;
}

.parallax-layer {
    position: absolute;
    inset: -40px;
    pointer-events: none;
    will-change: transform;
}

.parallax-deep {
    transform: translate3d(calc(var(--px-x, 0) * 8px), calc(var(--px-y, 0) * 8px), 0);
    background-image: radial-gradient(1px 1px at 25px 35px, rgba(255, 255, 255, 0.6), transparent),
                      radial-gradient(1.5px 1.5px at 120px 80px, rgba(255, 255, 255, 0.8), transparent),
                      radial-gradient(1px 1px at 220px 180px, rgba(160, 200, 255, 0.7), transparent);
    background-size: 300px 300px;
    opacity: 0.7;
}

.parallax-mid {
    background-image: var(--current-mid, url('/assets/images/px_mid_astrolabe.jpg'));
    background-repeat: no-repeat;
    background-position: 85% 15%;
    background-size: min(480px, 65vw) auto;
    mix-blend-mode: screen;
    opacity: 0.38;
    transition: opacity 0.8s ease, filter 0.8s ease;
    transform: translate3d(calc(var(--px-x, 0) * 20px), calc(var(--px-y, 0) * 20px), 0);
}

.parallax-fore {
    background-image: var(--current-fore, url('/assets/images/px_fore_orbs.jpg'));
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    mix-blend-mode: screen;
    opacity: 0.28;
    transition: opacity 0.8s ease, filter 0.8s ease;
    transform: translate3d(calc(var(--px-x, 0) * 35px), calc(var(--px-y, 0) * 35px), 0);
}

#app {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 20px 80px;
}

.brand {
    text-align: center;
    margin-bottom: 32px;
}

.brand h1 {
    font-size: 44px;
    letter-spacing: 0.06em;
    margin: 0;
    background: linear-gradient(120deg, var(--fg), var(--accent) 55%, var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

.tagline {
    color: var(--fg-muted);
    margin: 8px 0 0;
    font-size: 15px;
}

/* Atmosphere Picker */
.atmosphere-picker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 4px 6px;
    background: rgba(18, 22, 34, 0.7);
    border: 1px solid rgba(124, 156, 255, 0.18);
    border-radius: 9999px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.atmo-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--fg-muted);
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.atmo-btn:hover {
    color: var(--fg);
    background: rgba(124, 156, 255, 0.1);
    border-color: rgba(124, 156, 255, 0.25);
    box-shadow: 0 0 12px rgba(124, 156, 255, 0.2);
}

.atmo-btn.active {
    color: #ffffff;
    background: rgba(124, 156, 255, 0.2);
    border-color: var(--accent);
    box-shadow: 0 0 14px rgba(124, 156, 255, 0.35);
    font-weight: 600;
}

.phase {
    display: none;
    animation: fade 0.4s ease;
}

.phase.active {
    display: block;
}

@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
.seed-card,
.computing-card,
.ask-card {
    background: var(--surface-glass-bg);
    backdrop-filter: var(--surface-glass-blur);
    -webkit-backdrop-filter: var(--surface-glass-blur);
    border: 1px solid var(--surface-glass-border);
    box-shadow: var(--surface-glass-shadow);
    border-radius: var(--radius);
    padding: var(--card-pad);
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 560px) {
    .field-row {
        grid-template-columns: 1fr;
    }
}

.field {
    display: block;
    margin: 14px 0;
}

.field span {
    display: block;
    font-size: 13px;
    color: var(--fg-muted);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.field em {
    color: var(--fg-faint);
    font-style: normal;
    font-weight: 400;
}

input,
select {
    width: 100%;
    background: var(--card-2);
    border: 1px solid var(--border);
    color: var(--fg);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

input::placeholder {
    color: var(--fg-faint);
}

input[type="date"],
input[type="time"] {
    color-scheme: dark;
}

.city-wrap {
    position: relative;
}

.city-list {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--card-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.city-list button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border-soft);
    color: var(--fg);
    padding: 11px 14px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
}

.city-list button:last-child {
    border-bottom: none;
}

.city-list button:hover,
.city-list button.active {
    background: var(--accent-soft);
}

.city-list .tz {
    color: var(--fg-faint);
    font-size: 12px;
    font-family: var(--mono);
    white-space: nowrap;
}

.hint {
    color: var(--fg-faint);
    font-size: 13px;
    margin: 8px 0 0;
    min-height: 1em;
}

.error {
    color: var(--bad);
    font-size: 14px;
    margin: 12px 0 0;
}

button.primary {
    width: 100%;
    margin-top: 18px;
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    border: none;
    color: #0b0d12;
    font-weight: 700;
    font-size: 16px;
    padding: 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.08s, filter 0.15s;
}

button.primary:hover:not(:disabled) {
    filter: brightness(1.08);
}

button.primary:active:not(:disabled) {
    transform: translateY(1px);
}

button.primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Computing */
.computing-card {
    text-align: center;
    padding: 48px 28px;
}

.computing-card h2 {
    margin: 18px 0 8px;
    font-size: 24px;
}

.computing-card p {
    color: var(--fg-muted);
    max-width: 420px;
    margin: 0 auto;
}

.pulse {
    width: 54px;
    height: 54px;
    margin: 0 auto;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--accent), var(--accent-2));
    animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(0.9);
        opacity: 0.85;
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}

/* Ask */
.ask-card h2 {
    margin: 0 0 6px;
    font-size: 26px;
    letter-spacing: -0.01em;
}

/* Synthesis Profile Card */
.synthesis-profile {
    margin: 16px 0 12px;
    padding: 14px 18px;
    background: rgba(26, 31, 48, 0.6);
    border: 1px solid rgba(124, 156, 255, 0.22);
    border-radius: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: fade 0.4s ease;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-icon {
    font-size: 20px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--accent-soft);
    border: 1px solid rgba(124, 156, 255, 0.35);
}

.profile-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--fg);
}

.profile-meta {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--fg-muted);
}

.profile-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.profile-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: rgba(124, 156, 255, 0.12);
    border: 1px solid rgba(124, 156, 255, 0.25);
    border-radius: 999px;
    font-size: 12px;
    color: var(--accent);
    letter-spacing: 0.02em;
    font-weight: 500;
}

/* Starter Prompts */
.starter-prompts {
    margin: 14px 0 18px;
    animation: fade 0.4s ease;
}

.prompts-label {
    display: block;
    font-size: 12px;
    color: var(--fg-faint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    font-weight: 600;
}

.prompt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.prompt-chip {
    background: rgba(25, 30, 46, 0.7);
    border: 1px solid var(--border);
    color: var(--fg-muted);
    padding: 7px 13px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    line-height: 1.3;
}

.prompt-chip:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--fg);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(124, 156, 255, 0.2);
}

/* Transcript Toolbar */
.transcript-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    margin-top: 10px;
    border-bottom: 1px solid var(--border-soft);
}

.toolbar-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fg-faint);
}

.ghost-mini {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--fg-muted);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ghost-mini:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--fg);
}

.transcript {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 55vh;
    overflow-y: auto;
    padding-right: 4px;
}

.msg {
    max-width: 88%;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 15px;
    animation: fade 0.3s ease;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.msg.user {
    align-self: flex-end;
    background: var(--accent-soft);
    border: 1px solid rgba(124, 156, 255, 0.3);
    border-bottom-right-radius: 4px;
}

.msg.oracle,
.bubble.oracle {
    position: relative;
    align-self: flex-start;
    background: var(--card-2);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
    padding-bottom: 28px;
}

.msg-actions {
    position: absolute;
    bottom: 6px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-btn {
    background: transparent;
    border: none;
    color: var(--fg-faint);
    font-size: 11px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.copy-btn:hover {
    color: var(--fg);
    background: rgba(255, 255, 255, 0.08);
}

.bubble.oracle.error-bubble {
    border-color: rgba(255, 107, 107, 0.4);
    background: rgba(45, 20, 24, 0.85);
    padding-bottom: 12px;
}

.msg-error-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.msg-error-text {
    font-size: 14px;
    color: #ff9b9b;
    line-height: 1.4;
}

.msg-error-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.msg-error-actions button {
    font-size: 12px;
    padding: 4px 10px;
    cursor: pointer;
}

.copy-btn.copied {
    color: var(--good);
}

.bubble.oracle strong,
.msg.oracle strong {
    font-weight: 600;
}

.bubble.oracle em,
.msg.oracle em {
    font-style: italic;
    opacity: 0.9;
}

.bubble.oracle code,
.msg.oracle code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
}

.bubble.oracle ul,
.bubble.oracle ol,
.msg.oracle ul,
.msg.oracle ol {
    margin: 0.5em 0;
    padding-left: 1.5em;
}

.bubble.oracle li,
.msg.oracle li {
    margin: 0.25em 0;
}

.bubble.oracle p,
.msg.oracle p {
    margin: 0.5em 0;
}

.bubble.oracle p:first-child,
.msg.oracle p:first-child {
    margin-top: 0;
}

.bubble.oracle p:last-child,
.msg.oracle p:last-child {
    margin-bottom: 0;
}

.msg .model {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    color: var(--fg-faint);
    font-family: var(--mono);
}

.question-form {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    align-items: flex-end;
}

.question-form textarea {
    flex: 1;
    resize: none;
    overflow-y: auto;
    min-height: 44px;
    max-height: 160px;
    line-height: 1.4;
    font-family: inherit;
    font-size: inherit;
}

.question-form button.primary {
    width: auto;
    margin-top: 0;
    padding: 12px 26px;
    align-self: flex-end;
}

.foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
    color: var(--fg-faint);
    font-size: 12px;
    font-family: var(--mono);
    gap: 16px;
    flex-wrap: wrap;
}

.foot-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.foot-links {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.foot-links a {
    color: var(--fg-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.foot-links a:hover {
    color: var(--accent);
    text-decoration: underline;
}

button.ghost {
    background: none;
    border: 1px solid var(--border);
    color: var(--fg-muted);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}

button.ghost:hover {
    border-color: var(--accent);
    color: var(--fg);
}

button.ghost-mini {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-soft);
    color: var(--fg-muted);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-family: var(--mono);
    cursor: pointer;
    transition: all var(--motion-fast);
}

button.ghost-mini:hover {
    color: var(--fg);
    border-color: var(--color-cosmic-border);
    background: var(--color-cosmic-glow);
}

button.ghost-mini.active {
    color: var(--good);
    border-color: rgba(52, 211, 153, 0.4);
    background: rgba(52, 211, 153, 0.1);
}

/* Follow-up suggestions */
.followup-container {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed rgba(124, 156, 255, 0.15);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.followup-label {
    font-size: 11px;
    font-family: var(--mono);
    color: var(--fg-faint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.followup-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.followup-chip {
    background: rgba(124, 156, 255, 0.08);
    border: 1px solid rgba(124, 156, 255, 0.18);
    color: var(--fg-muted);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    cursor: pointer;
    text-align: left;
    transition: all var(--motion-fast);
    line-height: 1.3;
}

.followup-chip:hover {
    color: var(--fg);
    background: rgba(124, 156, 255, 0.18);
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(124, 156, 255, 0.2);
    transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
    .parallax-layer,
    .parallax-deep,
    .parallax-mid,
    .parallax-fore {
        transform: none !important;
        transition: none !important;
    }
}

.foot-link-btn {
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    font-size: 11px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
    opacity: 0.8;
    transition: opacity var(--motion-fast);
}

.foot-link-btn:hover {
    opacity: 1;
    color: var(--accent);
}

.glass-modal {
    border: none;
    padding: 0;
    background: transparent;
    max-width: 540px;
    width: 90vw;
    margin: auto;
}

.glass-modal::backdrop {
    background: rgba(4, 7, 15, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.glass-modal .modal-card {
    background: rgba(14, 18, 28, 0.94);
    border: 1px solid rgba(124, 156, 255, 0.25);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
    padding: var(--space-6);
    color: var(--fg);
}

.glass-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: var(--space-3);
}

.glass-modal .modal-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--fg);
    font-weight: 600;
}

.glass-modal .modal-body {
    font-size: 13px;
    line-height: 1.6;
    color: var(--fg-muted);
    max-height: 70vh;
    overflow-y: auto;
}

.glass-modal .modal-body h4 {
    color: var(--fg);
    font-size: 14px;
    margin: var(--space-4) 0 var(--space-2);
}

.glass-modal .modal-body h4:first-child {
    margin-top: 0;
}

.glass-modal .modal-body hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: var(--space-4) 0;
}

.glass-modal .modal-body a {
    color: var(--accent);
    text-decoration: underline;
}

/* -------------------------------------------------------------------------
 * Accessibility: Screen-reader only announcer
 * ---------------------------------------------------------------------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* -------------------------------------------------------------------------
 * Universal Focus-Visible Rings
 * ---------------------------------------------------------------------- */
:focus-visible {
    outline: 2px solid var(--accent) !important;
    outline-offset: 2px !important;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

.toolbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* -------------------------------------------------------------------------
 * Mobile Responsive Layout & Touch Targets
 * ---------------------------------------------------------------------- */
@media (max-width: 600px) {
    :root {
        --card-pad: 18px;
    }

    #app {
        padding: 24px 12px 64px;
    }

    input, select, textarea {
        font-size: 16px !important; /* Prevents iOS Safari involuntary zoom */
    }

    .atmosphere-picker {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        width: 100%;
    }

    .atmo-btn {
        flex: 1 1 calc(50% - 10px);
        min-height: 44px;
        justify-content: center;
    }

    .prompt-chip, .followup-chip, .ghost-mini, .foot-link-btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .question-form {
        flex-direction: column;
    }

    .question-form button.primary {
        width: 100%;
        min-height: 48px;
    }
}

/* -------------------------------------------------------------------------
 * Clean Print Stylesheet (@media print)
 * ---------------------------------------------------------------------- */
@media print {
    #cosmos-backdrop,
    .atmosphere-picker,
    .question-form,
    .foot,
    #starter-prompts,
    .transcript-toolbar,
    .msg-actions,
    .followup-container,
    #a11y-announcer {
        display: none !important;
    }

    body {
        background: #ffffff !important;
        color: #111111 !important;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    }

    #app {
        max-width: 100% !important;
        padding: 0 !important;
    }

    .card, .ask-card, .seed-card, .synthesis-profile {
        border: 1px solid #ddd !important;
        background: #fafafa !important;
        box-shadow: none !important;
        break-inside: avoid;
        margin-bottom: 24px;
        color: #111 !important;
    }

    .msg.user {
        background: #f0f4ff !important;
        border: 1px solid #ccd9ff !important;
        color: #0b1e59 !important;
        break-inside: avoid;
    }

    .msg.oracle {
        background: #ffffff !important;
        border: 1px solid #e0e0e0 !important;
        color: #222222 !important;
        break-inside: avoid;
    }
}

/* -------------------------------------------------------------------------
 * Comprehensive Prefers-Reduced-Motion Killswitch
 * ---------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .parallax-layer,
    .parallax-deep,
    .parallax-mid,
    .parallax-fore {
        transform: none !important;
        transition: none !important;
    }

    .pulse, .phase, .msg, .synthesis-profile {
        animation: none !important;
        transition: none !important;
    }
}

/* -------------------------------------------------------------------------
 * Header Tools & Vault Button
 * ---------------------------------------------------------------------- */
.header-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: var(--space-4);
    gap: var(--space-2);
    flex-wrap: wrap;
}

.vault-toggle-btn {
    border-color: rgba(212, 175, 55, 0.4);
    color: var(--accent-gold, #d4af37);
}

.vault-toggle-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.6);
}

/* -------------------------------------------------------------------------
 * SVG Natal Chart Visualizer
 * ---------------------------------------------------------------------- */
.natal-chart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: var(--space-3) 0;
    padding: var(--space-3);
    background: rgba(10, 14, 26, 0.45);
    border-radius: 12px;
    border: 1px solid rgba(124, 156, 255, 0.15);
}

.natal-chart-svg {
    width: 100%;
    max-width: 320px;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.5));
}

.chart-radar-poly {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.chart-axis-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.chart-placements-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: var(--space-3);
    width: 100%;
}

.placement-pill {
    background: rgba(124, 156, 255, 0.08);
    border: 1px solid rgba(124, 156, 255, 0.18);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    color: var(--fg-muted);
}

.placement-pill em {
    font-style: normal;
    color: var(--fg-faint);
    margin-right: 2px;
}

.placement-pill strong {
    color: var(--fg-bright);
}

/* -------------------------------------------------------------------------
 * Saved Syntheses Vault Drawer
 * ---------------------------------------------------------------------- */
.vault-drawer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
}

.vault-drawer[hidden] {
    display: none;
}

.vault-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.vault-drawer-panel {
    position: relative;
    width: 100%;
    max-width: 440px;
    height: 100%;
    background: rgba(15, 19, 32, 0.95);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    border-left: 1px solid rgba(124, 156, 255, 0.22);
    box-shadow: -16px 0 48px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    padding: var(--space-4);
    box-sizing: border-box;
    overflow-y: auto;
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.vault-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--space-3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: var(--space-4);
}

.vault-title-group {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.vault-title-group h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--fg-bright);
}

.vault-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    flex: 1;
}

.vault-empty {
    color: var(--fg-faint);
    text-align: center;
    padding: var(--space-8) var(--space-2);
    font-size: 13px;
    line-height: 1.6;
}

.vault-card {
    background: rgba(26, 31, 48, 0.7);
    border: 1px solid rgba(124, 156, 255, 0.18);
    border-radius: 10px;
    padding: var(--space-3);
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vault-card:hover {
    border-color: rgba(124, 156, 255, 0.45);
    background: rgba(36, 43, 66, 0.85);
    transform: translateY(-1px);
}

.vault-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vault-card-name {
    font-weight: 600;
    color: var(--fg-bright);
    font-size: 14px;
}

.vault-card-meta {
    font-size: 11px;
    color: var(--fg-faint);
}

.vault-card-focus {
    font-size: 12px;
    color: var(--accent-gold, #d4af37);
}

.vault-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.vault-turn-count {
    font-size: 10px;
    color: var(--fg-faint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vault-del-btn {
    background: transparent;
    border: none;
    color: #ff6b6b;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
}

.vault-del-btn:hover {
    background: rgba(255, 107, 107, 0.15);
}