/* Static Mercury / Зеркало – design system */

:root {
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --bg-void: #010408;
    --bg-deep: #0c1019;
    --glass: rgba(14, 18, 28, 0.72);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 220, 180, 0.06);

    --text: #e8eaf0;
    --text-soft: rgba(232, 234, 240, 0.65);
    --text-faint: rgba(232, 234, 240, 0.42);

    --gold: #e8b87a;
    --gold-bright: #f5d4a8;
    --gold-dim: rgba(232, 184, 122, 0.25);
    --violet: #9b8ec4;
    --blue: #6b8fd4;

    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --shadow-card: 0 24px 64px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--glass-border);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    min-height: 100vh;
    background: var(--bg-void);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: var(--gold-bright); }

/* ─── Home page ─── */
.page-home {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px 48px;
    position: relative;
    overflow-x: hidden;
}

.cosmos-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(120, 90, 180, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 90% 80%, rgba(232, 184, 122, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 40% 35% at 5% 70%, rgba(80, 120, 200, 0.1) 0%, transparent 50%),
        var(--bg-void);
    pointer-events: none;
}
.cosmos-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.35) 0%, transparent 100%),
                      radial-gradient(1px 1px at 60% 70%, rgba(255,255,255,0.25) 0%, transparent 100%),
                      radial-gradient(1px 1px at 80% 20%, rgba(255,255,255,0.3) 0%, transparent 100%),
                      radial-gradient(1.5px 1.5px at 40% 50%, rgba(255,220,180,0.4) 0%, transparent 100%),
                      radial-gradient(1px 1px at 10% 80%, rgba(255,255,255,0.2) 0%, transparent 100%),
                      radial-gradient(1px 1px at 70% 40%, rgba(255,255,255,0.22) 0%, transparent 100%);
    opacity: 0.7;
}

.shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
}
.sigil {
    font-size: 1.1rem;
    color: var(--gold);
    opacity: 0.9;
}
.sigil-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.hero-block {
    text-align: center;
    margin-bottom: 32px;
}
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 8vw, 3.2rem);
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 6px;
}
.hero-tagline {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--violet);
    margin-bottom: 16px;
}
.hero-quote {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-style: italic;
    color: var(--text-soft);
    line-height: 1.6;
    max-width: 380px;
    margin: 0 auto;
}

/* Glass card */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-card);
    padding: 28px;
}
.card-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 24px;
    color: var(--text);
}
.card-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-soft);
}

/* Dashboard */
.user-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--glass-border);
}
.avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-dim), rgba(155, 142, 196, 0.2));
    border: 1px solid rgba(232, 184, 122, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--gold-bright);
    flex-shrink: 0;
}
.user-greeting {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 2px;
}
.user-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
}
.user-detail {
    font-size: 0.8rem;
    color: var(--text-soft);
    margin-top: 4px;
}

/* Test CTA card */
.test-card {
    background: var(--glass-highlight);
    border: 1px solid rgba(232, 184, 122, 0.15);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
}
.test-card-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}
.test-icon {
    font-size: 1.6rem;
    line-height: 1;
    opacity: 0.9;
}
.test-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.test-card-desc {
    font-size: 0.8rem;
    color: var(--text-soft);
}

/* Form fields */
.stack-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-soft);
}
.field-hint {
    font-size: 0.75rem;
    color: var(--text-faint);
    margin-top: 2px;
}

input, select, textarea {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
}
input::placeholder { color: var(--text-faint); }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: rgba(232, 184, 122, 0.45);
    box-shadow: 0 0 0 3px rgba(232, 184, 122, 0.1);
}
.select-modern {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e8b87a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

/* Buttons */
button, .btn {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}
.btn:active { transform: scale(0.98); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 24px; font-size: 0.95rem; }
.btn-gold {
    background: linear-gradient(135deg, #c9954e 0%, #a67a3d 100%);
    color: #1a1208;
    box-shadow: 0 4px 20px rgba(201, 149, 78, 0.3);
}
.btn-gold:hover {
    background: linear-gradient(135deg, #dbaa62 0%, #b88a4a 100%);
    box-shadow: 0 6px 28px rgba(201, 149, 78, 0.4);
    color: #1a1208;
}
.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    color: var(--text-soft);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

/* Action grid */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}
.action-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-soft);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.action-tile:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(232, 184, 122, 0.2);
    color: var(--text);
}
.action-tile-muted:hover {
    border-color: rgba(255, 255, 255, 0.12);
}
.action-icon {
    font-size: 1.2rem;
    color: var(--gold);
    opacity: 0.85;
}
.action-label {
    font-size: 0.78rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.875rem;
}
.alert-error {
    background: rgba(220, 80, 80, 0.12);
    border: 1px solid rgba(220, 80, 80, 0.3);
    color: #f0a0a0;
}

/* Legacy compat – other pages */
.container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    padding: 28px;
}
body:not(.page-home) {
    padding: 20px;
    background: linear-gradient(135deg, var(--bg-void) 0%, var(--bg-deep) 100%);
}
h1, h2, h3 { font-weight: 400; letter-spacing: 0.02em; }
h1 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 5vw, 2.4rem);
    color: var(--text);
    margin-bottom: 0.5rem;
}
h2 {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    margin: 1.5rem 0 1rem;
    color: var(--text);
}
.subtitle, .lead { color: var(--text-soft); }
.lead { margin: 12px 0 20px; }
.small-text { font-size: 0.85rem; color: var(--text-soft); }
.error, .alert-error {
    background: rgba(220, 80, 80, 0.12);
    border: 1px solid rgba(220, 80, 80, 0.3);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    color: #f0a0a0;
}
.button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    color: var(--text-soft);
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
    transition: 0.2s;
}
.button:hover {
    background: rgba(255, 255, 255, 0.09);
    color: var(--text);
    box-shadow: none;
}
.btn-primary { background: linear-gradient(135deg, #c9954e, #a67a3d); color: #1a1208; border: none; }
.btn-primary:hover { box-shadow: 0 4px 20px rgba(201, 149, 78, 0.35); }
.btn-muted { background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); color: var(--text-soft); }
.btn-accent { background: #8a5a3a; width: 100%; margin-top: 8px; }

/* Test page */
.test-page { max-width: 640px; }
.test-header { text-align: center; margin-bottom: 24px; }
.progress-container { margin-bottom: 24px; }
.progress-meta { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-soft); margin-bottom: 8px; }
.progress-bar-track { height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); width: 0%; transition: width 0.3s; }
.question-block {
    background: rgba(0,0,0,0.25);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--glass-border);
}
.question-text { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 16px; line-height: 1.5; }
.timer-bar {
    height: 3px;
    background: linear-gradient(90deg, var(--gold), #c06040);
    width: 0%;
    transition: width 0.1s linear;
    margin-bottom: 1rem;
    border-radius: 2px;
}
.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}
.options-grid {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
}
.option-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s;
    text-align: center;
    flex: 1 1 auto;
}
.options-grid .option-card {
    flex: 1 1 calc(33.333% - 12px);
    min-width: 88px;
    min-height: 72px;
    padding: 16px 12px;
}
.option-card input { display: none; }
.option-text {
    font-size: 0.95rem;
    line-height: 1.35;
    color: var(--text);
    font-weight: 500;
}
.options-grid .option-text {
    font-size: 1.25rem;
    font-family: var(--font-display);
    letter-spacing: 0.02em;
}
.option-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(232, 184, 122, 0.25);
}
.option-card.selected,
.option-card:has(input:checked) {
    border-color: rgba(232, 184, 122, 0.55);
    background: rgba(232, 184, 122, 0.1);
    box-shadow: 0 0 0 1px rgba(232, 184, 122, 0.2), 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}
.tarot-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
    gap: 14px;
    justify-content: center;
    margin-top: 8px;
}
.tarot-card {
    text-align: center;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.tarot-card.selected, .tarot-card:has(input:checked) {
    border-color: rgba(232, 184, 122, 0.55);
    background: rgba(232, 184, 122, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px);
}
.tarot-card input { display: none; }
.tarot-card img {
    width: 100%;
    max-width: 120px;
    height: auto;
    aspect-ratio: 2 / 3.4;
    object-fit: contain;
    border-radius: 6px;
    display: block;
    margin: 0 auto 8px;
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
.tarot-card span {
    font-size: 0.72rem;
    color: var(--text-soft);
    line-height: 1.2;
    display: block;
}
.test-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; justify-content: center; }

/* Result page */
.result-body { margin: 0; padding: 0; overflow: hidden; background: var(--bg-void); }
.result-info {
    position: absolute; top: 20px; left: 20px;
    background: rgba(10, 14, 24, 0.65); backdrop-filter: blur(16px);
    padding: 8px 18px; border-radius: 40px; font-size: 13px; z-index: 10;
    border: 1px solid rgba(232, 184, 122, 0.15); pointer-events: none;
    color: var(--text-soft);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.result-info span { font-size: 0.7rem; opacity: 0.7; }

.result-panel {
    position: absolute; bottom: 20px; right: 20px;
    width: 360px; max-height: 88vh; overflow-y: auto;
    overflow-x: hidden;
    background: linear-gradient(165deg, rgba(16, 20, 34, 0.88) 0%, rgba(8, 10, 18, 0.92) 100%);
    backdrop-filter: blur(24px);
    border-radius: var(--radius-lg);
    padding: 0 0 18px;
    border: 1px solid rgba(232, 184, 122, 0.14);
    z-index: 20;
    font-size: 14px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55), 0 0 40px rgba(120, 90, 180, 0.08);
    scrollbar-width: thin;
    scrollbar-color: rgba(232,184,122,0.25) transparent;
}
.result-panel::-webkit-scrollbar { width: 5px; }
.result-panel::-webkit-scrollbar-thumb { background: rgba(232,184,122,0.25); border-radius: 4px; }

.result-hero {
    position: relative;
    padding: 22px 22px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
}
.result-hero-glow {
    position: absolute;
    top: -40px; right: -20px;
    width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(232,184,122,0.22) 0%, transparent 70%);
    pointer-events: none;
}
.result-hero-kicker {
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.85;
    margin-bottom: 6px;
}
.result-panel h3 {
    font-family: var(--font-display);
    color: var(--gold-bright);
    font-size: 1.55rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 10px;
}
.result-hero-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.result-chip {
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(232, 184, 122, 0.1);
    border: 1px solid rgba(232, 184, 122, 0.22);
    color: var(--gold-bright);
}

.result-stats {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 8px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.result-stat {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-sm);
    padding: 10px 10px 8px;
}
.result-stat-label {
    display: block;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-faint);
    margin-bottom: 4px;
}
.result-stat-value {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--text);
    line-height: 1;
}
.result-stat-value small { font-size: 0.65rem; color: var(--text-soft); margin-left: 1px; }
.harmony-bar {
    margin-top: 8px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
    overflow: hidden;
}
.harmony-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #6b8fd4, #e8b87a);
    box-shadow: 0 0 8px rgba(232,184,122,0.4);
}

.result-block {
    padding: 14px 18px 0;
}
.result-block-title {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text-soft);
    margin-bottom: 8px;
}
.result-mantra {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--gold-bright);
    line-height: 1.45;
    padding: 10px 12px;
    border-left: 2px solid var(--gold);
    background: rgba(232,184,122,0.05);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.result-text-soft { color: var(--text-soft); font-size: 0.88rem; line-height: 1.5; }
.result-text-tiny { font-size: 0.75rem; margin-bottom: 10px; }
.result-accent {
    margin-top: 12px;
    font-size: 0.75rem;
    color: var(--text-faint);
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.activity-grid-compact { display: flex; flex-direction: column; gap: 8px; }
.activity-card {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-left: 2px solid rgba(232,184,122,0.5);
}
.activity-name { font-weight: 600; color: var(--gold-bright); font-size: 0.88rem; margin-bottom: 3px; }

.spectrum-row { margin-bottom: 12px; }
.spectrum-row:last-child { margin-bottom: 0; }
.spectrum-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    color: var(--text-faint);
    margin-bottom: 6px;
}
.spectrum-track {
    position: relative;
    height: 8px;
    border-radius: 8px;
    background: linear-gradient(90deg, #5a7fd4 0%, #3a4a6a 50%, #88aaff 100%);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}
.spectrum-track-warm {
    background: linear-gradient(90deg, #c47850 0%, #5a4038 50%, #ffaa88 100%);
}
.spectrum-thumb {
    position: absolute;
    top: 50%;
    width: 14px; height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 12px rgba(255,255,255,0.8), 0 2px 6px rgba(0,0,0,0.4);
    border: 2px solid rgba(232,184,122,0.6);
}

.companion-list { display: flex; flex-direction: column; gap: 8px; }
.companion-item {
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
}
.companion-item--lead {
    background: linear-gradient(135deg, rgba(232,184,122,0.12) 0%, rgba(120,90,180,0.08) 100%);
    border-color: rgba(232,184,122,0.25);
}
.companion-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}
.companion-name { font-size: 0.82rem; color: var(--text); }
.companion-item--lead .companion-name { color: var(--gold-bright); font-weight: 600; }
.companion-pct {
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--gold);
    flex-shrink: 0;
}
.companion-bar {
    height: 4px;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
    overflow: hidden;
}
.companion-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(155,142,196,0.6), rgba(232,184,122,0.9));
    transition: width 0.8s ease;
}
.companion-item--lead .companion-fill {
    background: linear-gradient(90deg, #9b8ec4, #f5d4a8);
    box-shadow: 0 0 10px rgba(232,184,122,0.35);
}

.result-actions {
    padding: 16px 18px 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.result-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.btn-horoscope {
    position: relative;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    overflow: hidden;
    background: linear-gradient(135deg, #7c5cbf 0%, #4a3580 40%, #c9954e 100%);
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 32px rgba(124, 92, 191, 0.35), 0 0 0 1px rgba(255,255,255,0.1) inset;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-horoscope:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(124, 92, 191, 0.45), 0 0 24px rgba(201,149,78,0.2);
}
.btn-horoscope-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.18) 50%, transparent 60%);
    animation: horoscopeShine 4s ease-in-out infinite;
}
@keyframes horoscopeShine {
    0%, 100% { transform: translateX(-120%); }
    50% { transform: translateX(120%); }
}
.btn-horoscope-icon { font-size: 1.3rem; position: relative; z-index: 1; }
.btn-horoscope-text { position: relative; z-index: 1; }

.btn-result-secondary {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--text-soft);
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.btn-result-secondary:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text);
}

.universe-nav {
    position: fixed;
    top: 18px;
    left: calc(var(--cosmos-width, 100vw) / 2);
    transform: translateX(-50%);
    z-index: 15;
    display: flex;
    gap: 6px;
    padding: 6px;
    border-radius: 28px;
    background: rgba(8, 10, 18, 0.72);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(232, 184, 122, 0.14);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.universe-nav-btn {
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-soft);
    font-size: 0.72rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
}
.universe-nav-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}
.universe-nav-btn.active {
    background: rgba(232, 184, 122, 0.14);
    border-color: rgba(232, 184, 122, 0.35);
    color: var(--gold-bright);
}
@media (max-width: 700px) {
    .universe-nav { top: 56px; max-width: calc(100vw - 24px); flex-wrap: wrap; justify-content: center; }
    .universe-nav-btn { padding: 6px 10px; font-size: 0.65rem; }
}

.constellation-nav {
    position: fixed;
    top: 62px;
    left: calc(var(--cosmos-width, 100vw) / 2);
    transform: translateX(-50%);
    z-index: 14;
    display: flex;
    gap: 5px;
    padding: 5px;
    border-radius: 22px;
    background: rgba(6, 8, 16, 0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    max-width: calc(var(--cosmos-width, 100vw) - 24px);
    flex-wrap: wrap;
    justify-content: center;
}
.constellation-nav-btn {
    padding: 5px 11px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-faint);
    font-size: 0.65rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}
.constellation-nav-btn:hover {
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.06);
}
.constellation-nav-btn.active {
    color: #f0e8dc;
    border-color: color-mix(in srgb, var(--zone-color, var(--gold)) 45%, transparent);
    background: color-mix(in srgb, var(--zone-color, var(--gold)) 18%, transparent);
    box-shadow: 0 0 20px color-mix(in srgb, var(--zone-color, var(--gold)) 25%, transparent);
}
@media (max-width: 700px) {
    .constellation-nav { top: 108px; }
}

.star-read-card { max-width: 440px; }
.star-read-progress {
    position: relative;
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.star-read-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    transition: background 0.25s, transform 0.25s;
}
.star-read-dot.filled { background: rgba(232, 184, 122, 0.35); }
.star-read-dot.active {
    background: var(--gold);
    transform: scale(1.2);
}
.star-read-layer-label {
    position: relative;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--violet);
    margin-bottom: 8px;
}
.star-read-actions {
    position: relative;
    display: flex;
    gap: 10px;
    margin-top: 18px;
    justify-content: flex-end;
}
.star-read-actions .btn-result-secondary { flex: 0 0 auto; }
.star-read-actions .btn-my-star { flex: 1; max-width: 200px; }

.shell-narrow { max-width: 520px; }
.page-star-vignette .star-vignette-hero {
    text-align: center;
    margin-bottom: 20px;
}
.star-vignette-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--violet);
    margin-bottom: 8px;
}
.star-vignette-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 5vw, 2.4rem);
    color: var(--gold-bright);
    line-height: 1.2;
    margin-bottom: 14px;
}
.star-vignette-tags {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.star-vignette-card { margin-bottom: 16px; }
.star-vignette-mantra {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-style: italic;
    color: var(--gold);
    border-left: 2px solid var(--gold);
    padding-left: 14px;
    margin: 0 0 16px;
    line-height: 1.5;
}
.star-vignette-desc {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text);
}
.star-vignette-note {
    margin-top: 14px;
    font-size: 0.75rem;
    color: var(--text-faint);
}
.star-vignette-actions { margin-top: 8px; }

.doctrine-hint {
    position: absolute; bottom: 20px; left: 20px;
    max-width: min(480px, calc(100vw - 400px));
    background: rgba(10, 14, 24, 0.65); backdrop-filter: blur(12px);
    padding: 8px 16px; border-radius: 20px; font-size: 11px;
    color: var(--text-faint); z-index: 10;
    border: 1px solid rgba(232, 184, 122, 0.12);
    line-height: 1.4;
}
@media (max-width: 900px) {
    .doctrine-hint { max-width: calc(100vw - 40px); font-size: 10px; }
}

/* 3D звёзды — подписи */
.star-label {
    padding: 4px 11px;
    border-radius: 14px;
    font-size: 10px;
    font-weight: 500;
    color: #f0e8dc;
    background: rgba(8, 12, 22, 0.8);
    border: 1px solid rgba(232, 184, 122, 0.35);
    white-space: nowrap;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.star-label.visible { opacity: 1; transform: translateY(0); }

/* Модалка звезды */
.star-modal[hidden] { display: none; }
.star-modal {
    position: fixed; inset: 0; z-index: 100;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.star-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(2, 4, 12, 0.72);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}
.cosmic-card {
    position: relative;
    max-width: 400px; width: 100%;
    padding: 28px 28px 24px;
    background: linear-gradient(160deg, rgba(18, 22, 38, 0.96) 0%, rgba(10, 12, 22, 0.98) 100%);
    border: 1px solid rgba(232, 184, 122, 0.25);
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 60px rgba(120,90,180,0.12);
    animation: starModalIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}
.cosmic-card-stars {
    position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
    background-image:
        radial-gradient(1px 1px at 15% 25%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 75% 15%, rgba(255,220,180,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 55% 75%, rgba(255,255,255,0.35) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 85% 60%, rgba(155,142,196,0.5) 0%, transparent 100%);
}
.cosmic-card-badge {
    position: relative;
    display: inline-block;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--violet);
    margin-bottom: 10px;
}
.cosmic-card h4 {
    position: relative;
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--gold-bright);
    margin-bottom: 12px;
    padding-right: 28px;
    line-height: 1.25;
}
.star-modal-meta {
    position: relative;
    font-size: 0.88rem;
    color: var(--gold);
    margin-bottom: 14px;
    padding: 8px 12px;
    background: rgba(232,184,122,0.08);
    border-radius: 10px;
    border-left: 2px solid var(--gold);
}
.cosmic-card-body {
    position: relative;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text);
}
.star-modal-close {
    position: absolute; top: 14px; right: 16px; z-index: 2;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    width: 32px; height: 32px;
    color: var(--text-soft);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.star-modal-close:hover { background: rgba(232,184,122,0.15); color: var(--gold); }

@keyframes starModalIn {
    from { opacity: 0; transform: scale(0.92) translateY(16px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; } to { opacity: 1; }
}

/* Гороскоп — отдельная модалка */
.horoscope-modal[hidden] { display: none; }
.horoscope-modal {
    position: fixed; inset: 0; z-index: 110;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.horoscope-modal-backdrop {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at center, rgba(60,40,100,0.35) 0%, rgba(2,4,10,0.88) 70%);
    backdrop-filter: blur(12px);
    animation: fadeIn 0.4s ease;
}
.horoscope-card {
    position: relative;
    max-width: 420px; width: 100%;
    padding: 32px 28px 28px;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(165deg, #1a1430 0%, #0d0f1a 45%, #12101c 100%);
    border: 1px solid rgba(201, 149, 78, 0.35);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.05) inset,
        0 32px 100px rgba(0,0,0,0.65),
        0 0 80px rgba(124, 92, 191, 0.2);
    animation: horoscopeIn 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    text-align: center;
}
@keyframes horoscopeIn {
    from { opacity: 0; transform: scale(0.88) translateY(24px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.horoscope-nebula {
    position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 20% 10%, rgba(124,92,191,0.35) 0%, transparent 55%),
        radial-gradient(ellipse 60% 40% at 85% 80%, rgba(201,149,78,0.2) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 50% 50%, rgba(107,143,212,0.12) 0%, transparent 60%);
    animation: nebulaPulse 8s ease-in-out infinite alternate;
}
@keyframes nebulaPulse {
    from { opacity: 0.7; } to { opacity: 1; }
}
.horoscope-stars {
    position: absolute; inset: 0; pointer-events: none;
    background-image:
        radial-gradient(1.5px 1.5px at 10% 20%, rgba(255,255,255,0.7) 0%, transparent 100%),
        radial-gradient(1px 1px at 30% 65%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 70% 25%, rgba(255,220,180,0.6) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 88% 45%, rgba(255,255,255,0.55) 0%, transparent 100%),
        radial-gradient(1px 1px at 50% 88%, rgba(155,142,196,0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 15% 80%, rgba(255,255,255,0.4) 0%, transparent 100%);
    animation: starsTwinkle 6s ease-in-out infinite alternate;
}
@keyframes starsTwinkle {
    from { opacity: 0.6; } to { opacity: 1; }
}
.horoscope-close {
    position: absolute; top: 14px; right: 16px; z-index: 3;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    width: 34px; height: 34px;
    color: var(--text-soft);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.horoscope-close:hover { background: rgba(255,255,255,0.12); color: #fff; }
.horoscope-date {
    position: relative;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(232,184,122,0.85);
    margin-bottom: 12px;
}
.horoscope-icon {
    position: relative;
    font-size: 2.4rem;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 16px rgba(124,92,191,0.6));
    animation: iconFloat 3s ease-in-out infinite;
}
@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.horoscope-title {
    position: relative;
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 600;
    color: var(--gold-bright);
    line-height: 1.25;
    margin-bottom: 4px;
    text-shadow: 0 0 30px rgba(232,184,122,0.25);
}
.horoscope-divider {
    position: relative;
    margin: 16px 0 20px;
    color: rgba(232,184,122,0.5);
    font-size: 0.75rem;
    letter-spacing: 0.5em;
}
.horoscope-divider span { opacity: 0.8; }
.horoscope-block {
    position: relative;
    text-align: left;
    padding: 14px 16px;
    border-radius: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,0.06);
}
.horoscope-block--prophecy {
    background: linear-gradient(135deg, rgba(124,92,191,0.15) 0%, rgba(124,92,191,0.05) 100%);
    border-color: rgba(155,142,196,0.2);
}
.horoscope-block--today {
    background: linear-gradient(135deg, rgba(201,149,78,0.12) 0%, rgba(201,149,78,0.04) 100%);
    border-color: rgba(232,184,122,0.2);
}
.horoscope-block-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-bottom: 8px;
}
.horoscope-block p {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-style: italic;
    line-height: 1.55;
    color: var(--text);
}
.horoscope-dismiss {
    position: relative;
    margin-top: 8px;
    width: 100%;
    padding: 13px 20px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    background: linear-gradient(135deg, rgba(232,184,122,0.25) 0%, rgba(201,149,78,0.15) 100%);
    border: 1px solid rgba(232,184,122,0.35);
    color: var(--gold-bright);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s, transform 0.2s;
}
.horoscope-dismiss:hover {
    background: linear-gradient(135deg, rgba(232,184,122,0.35) 0%, rgba(201,149,78,0.25) 100%);
    transform: translateY(-1px);
}

.result-body canvas { display: block; touch-action: none; }

.cosmos-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--cosmos-width, 100vw);
    height: 100vh;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, rgba(20,16,40,0.5) 0%, rgba(2,4,10,0.85) 70%);
    color: var(--gold-bright);
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 0.08em;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

/* Daily card (home) */
.daily-card {
    margin-bottom: 16px;
    padding: 20px 22px !important;
    border: 1px solid rgba(107, 143, 212, 0.2);
    background: linear-gradient(145deg, rgba(12, 18, 32, 0.85) 0%, rgba(8, 12, 22, 0.9) 100%);
}
.daily-card-kicker {
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 8px;
}
.daily-card-doctrine {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--gold-bright);
    margin-bottom: 8px;
}
.daily-card-text {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 10px;
}
.daily-card-affirm {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--text-soft);
    font-size: 0.88rem;
    padding-left: 10px;
    border-left: 2px solid rgba(232, 184, 122, 0.35);
}
.daily-card-link {
    display: inline-block;
    margin-top: 14px;
    font-size: 0.82rem;
    font-weight: 500;
}

/* My star button */
.btn-my-star {
    width: 100%;
    padding: 12px 18px;
    border: 1px solid rgba(255, 208, 128, 0.45);
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(255, 200, 100, 0.18) 0%, rgba(232, 184, 122, 0.1) 100%);
    color: var(--gold-bright);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-my-star:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(232, 184, 122, 0.2);
}
.btn-result-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    text-align: center;
}

.star-label--mine {
    border-color: rgba(255, 208, 128, 0.65);
    background: rgba(20, 16, 8, 0.88);
    color: #ffe8c0;
    opacity: 1;
    box-shadow: 0 0 16px rgba(255, 200, 100, 0.25);
}

/* Share toast */
.share-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    padding: 10px 20px;
    border-radius: 24px;
    background: rgba(8, 12, 22, 0.92);
    border: 1px solid rgba(232, 184, 122, 0.3);
    color: var(--gold-bright);
    font-size: 0.85rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.3s ease;
}
.share-toast[hidden] { display: none; }

/* Cosmos onboarding */
.cosmos-tour[hidden] { display: none; }
.cosmos-tour {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.cosmos-tour-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 4, 12, 0.65);
    backdrop-filter: blur(6px);
}
.cosmos-tour-card {
    position: relative;
    width: min(400px, 100%);
    padding: 24px 22px;
    border-radius: var(--radius-lg);
    background: linear-gradient(165deg, rgba(14, 18, 30, 0.95) 0%, rgba(6, 8, 16, 0.98) 100%);
    border: 1px solid rgba(232, 184, 122, 0.2);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}
.cosmos-tour-step {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 10px;
}
.cosmos-tour-card h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--gold-bright);
    margin-bottom: 10px;
}
.cosmos-tour-card p {
    color: var(--text-soft);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 18px;
}
.cosmos-tour-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Atlas page */
.shell-wide { max-width: 560px; }
.back-link {
    font-size: 0.82rem;
    color: var(--text-soft);
}
.back-link:hover { color: var(--gold); }
.hero-block-compact { margin-bottom: 20px; }
.hero-title-sm { font-size: clamp(1.8rem, 6vw, 2.4rem); }

.atlas-summary {
    text-align: center;
    margin-bottom: 16px;
    padding: 20px !important;
}
.atlas-summary-kicker {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-faint);
}
.atlas-summary-value {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--gold-bright);
    line-height: 1.1;
    margin: 6px 0;
}
.atlas-summary-sub {
    font-size: 0.88rem;
    color: var(--text-soft);
}
.atlas-summary-sub strong { color: var(--gold); }

.atlas-timeline { display: flex; flex-direction: column; gap: 10px; }
.atlas-entry {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, transform 0.2s;
}
.atlas-entry:hover {
    border-color: rgba(232, 184, 122, 0.3);
    transform: translateY(-1px);
}
.atlas-entry--current {
    border-color: rgba(232, 184, 122, 0.4);
    background: linear-gradient(135deg, rgba(232,184,122,0.08) 0%, rgba(12,16,28,0.85) 100%);
}
.atlas-entry-orbit {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(170, 200, 238, 0.35);
    flex-shrink: 0;
    position: relative;
}
.atlas-entry-orbit::after {
    content: '✦';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--gold);
}
.atlas-entry-body { flex: 1; min-width: 0; }
.atlas-entry-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.atlas-entry-name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.92rem;
}
.atlas-entry--current .atlas-entry-name { color: var(--gold-bright); }
.atlas-entry-badge {
    font-size: 0.6rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(232, 184, 122, 0.15);
    color: var(--gold);
    border: 1px solid rgba(232, 184, 122, 0.3);
}
.atlas-entry-date {
    font-size: 0.75rem;
    color: var(--text-faint);
    margin-bottom: 6px;
}
.atlas-entry-stats {
    display: flex;
    gap: 12px;
    font-size: 0.7rem;
    color: var(--text-soft);
}
.atlas-entry-arrow {
    color: var(--text-faint);
    font-size: 1rem;
}

/* Кинематографические полосы */
.cinema-bars {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--cosmos-width, 100vw);
    height: 100vh;
    z-index: 6;
    pointer-events: none;
}
.cinema-bar {
    position: absolute;
    left: 0;
    right: 0;
    height: 5.5vh;
    background: linear-gradient(to bottom, rgba(0,0,2,0.95), rgba(0,0,2,0.7));
}
.cinema-bar--top { top: 0; }
.cinema-bar--bottom {
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,2,0.95), rgba(0,0,2,0.7));
}
@media (max-width: 700px) {
    .cinema-bar { height: 4vh; }
}

/* Cosmos tools */
.cosmos-tools {
    pointer-events: auto;
    position: fixed;
    top: 62px;
    left: 16px;
    z-index: 30;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: min(360px, calc(var(--cosmos-width, 100vw) - 32px));
}
.star-search-wrap { position: relative; flex: 1; min-width: 160px; }
.star-search {
    width: 100%;
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(8,12,22,0.8);
    color: var(--text);
    font-size: 0.78rem;
    backdrop-filter: blur(10px);
}
.star-search-list {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    margin-top: 4px;
    background: rgba(8,12,22,0.95);
    border: 1px solid rgba(232,184,122,0.2);
    border-radius: 12px;
    overflow: hidden;
    z-index: 20;
}
.star-search-list button {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: none;
    color: var(--text-soft);
    font-size: 0.75rem;
    text-align: left;
    cursor: pointer;
}
.star-search-list button:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.cosmos-tool-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(8,12,22,0.75);
    color: var(--text-soft);
    font-size: 0.9rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
}
.cosmos-tool-btn:hover, .cosmos-tool-btn.active {
    border-color: rgba(232,184,122,0.4);
    color: var(--gold-bright);
}
.cosmos-tool-btn--mobile { display: none; }
.ambient-music-wrap {
    position: relative;
    display: flex;
    gap: 4px;
}
.cosmos-tool-btn--track {
    font-size: 0.75rem;
    width: 32px;
    height: 36px;
    border-radius: 18px;
}
.ambient-track-list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 200px;
    background: rgba(6, 10, 20, 0.95);
    border: 1px solid rgba(232, 184, 122, 0.25);
    border-radius: 12px;
    overflow: hidden;
    z-index: 40;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.ambient-track-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    color: var(--text-soft);
    font-size: 0.75rem;
    text-align: left;
    cursor: pointer;
}
.ambient-track-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}
.ambient-track-item.active {
    color: var(--gold-bright);
    background: rgba(232, 184, 122, 0.08);
}
.star-minimap {
    position: fixed;
    bottom: 56px;
    left: 16px;
    z-index: 12;
    border-radius: 50%;
    border: 1px solid rgba(120,160,220,0.25);
    cursor: crosshair;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.constellation-label {
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(4,8,18,0.7);
    border: 1px solid rgba(255,255,255,0.08);
    pointer-events: none;
    opacity: 0.65;
}

/* Journal */
.journal-textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.25);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.85rem;
    resize: vertical;
    min-height: 72px;
}
.journal-status {
    display: block;
    margin-top: 6px;
    font-size: 0.72rem;
    color: var(--gold);
}

/* Achievements */
.achievements-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.achievements-row--home { margin-top: 4px; }
.ach-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(232,184,122,0.1);
    border: 1px solid rgba(232,184,122,0.25);
    font-size: 1rem;
    cursor: default;
}
.ach-toast { bottom: 120px; border-color: rgba(255,208,128,0.5); }

/* Tarot result */
.tarot-result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 14px;
}
.tarot-result-item {
    text-align: center;
    padding: 10px 6px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
}
.tarot-result-item img {
    width: 100%;
    max-width: 80px;
    border-radius: 6px;
    margin-bottom: 8px;
}
.tarot-result-role {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-faint);
}
.tarot-result-name {
    font-weight: 600;
    color: var(--gold-bright);
    font-size: 0.82rem;
    margin: 4px 0;
}
.tarot-result-text {
    font-size: 0.72rem;
    color: var(--text-soft);
    line-height: 1.35;
}
.tarot-result-card { max-width: 520px; }
#shareCardCanvas {
    width: 100%;
    border-radius: 12px;
    display: block;
}

/* Weekly report */
.weekly-card { margin-bottom: 16px; padding: 18px 22px !important; }
.weekly-stat { font-size: 0.9rem; color: var(--text); margin-bottom: 6px; }
.weekly-shift { font-size: 0.85rem; color: var(--gold-bright); margin-bottom: 6px; }
.weekly-delta { font-size: 0.78rem; color: var(--text-soft); }
.achievements-card { margin-bottom: 16px; padding: 16px 22px !important; }

/* Compare page */
.compare-form .field { margin-bottom: 12px; }
.compare-share-hint { margin-top: 14px; font-size: 0.75rem; color: var(--text-faint); }
.compare-share-url {
    display: block;
    margin-top: 6px;
    padding: 8px 10px;
    font-size: 0.68rem;
    word-break: break-all;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    color: var(--text-soft);
}
.compare-result { margin-top: 16px; }
.compare-resonance {
    text-align: center;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(107,143,212,0.15), rgba(232,184,122,0.1));
    border: 1px solid rgba(232,184,122,0.2);
    margin-bottom: 14px;
}
.compare-resonance-value {
    display: block;
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--gold-bright);
    line-height: 1;
}
.compare-resonance-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-faint);
}
.compare-stars {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.compare-star-card {
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--glass);
    border: 1px solid var(--glass-border);
}
.compare-star-kicker {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 6px;
}
.compare-star-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--gold-bright);
    margin-bottom: 6px;
}
.compare-stat { font-size: 0.78rem; color: var(--text-soft); margin-top: 8px; }
.compare-note {
    margin-top: 14px;
    text-align: center;
    color: var(--gold);
    font-size: 0.88rem;
}
.atlas-chart-card { margin-bottom: 16px; padding: 16px !important; }
.atlas-chart-card canvas { width: 100%; display: block; }

@media (max-width: 700px) {
    .cosmos-tool-btn--mobile { display: inline-flex; align-items: center; justify-content: center; }
    .tarot-result-grid { grid-template-columns: 1fr; }
    .compare-stars { grid-template-columns: 1fr; }
    .star-minimap { width: 100px; height: 100px; bottom: auto; top: 110px; }
}

/* Admin */
.table-wrapper { overflow-x: auto; margin: 20px 0; }
table { width: 100%; border-collapse: collapse; background: rgba(0,0,0,0.3); border-radius: var(--radius-md); overflow: hidden; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--glass-border); font-size: 0.9rem; }
th { background: rgba(255,255,255,0.04); font-weight: 600; color: var(--text-soft); }
.detail-card { background: rgba(0,0,0,0.25); border-radius: var(--radius-md); padding: 24px; margin-top: 20px; border: 1px solid var(--glass-border); }
.activity-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 20px 0; }
.activity-category { background: rgba(0,0,0,0.2); padding: 16px; border-radius: var(--radius-sm); border-left: 2px solid var(--violet); }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; margin-bottom: 6px; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-soft); }

@media (max-width: 640px) {
    .page-home { padding: 24px 16px 40px; }
    .glass-card { padding: 22px 18px; }
    .action-grid { grid-template-columns: 1fr 1fr; }
    .result-panel { width: auto; right: 12px; bottom: 12px; left: 12px; max-height: 75vh; }
    .result-stats { grid-template-columns: 1fr 1fr 1fr; }
    .horoscope-card { padding: 28px 20px 24px; }
    .horoscope-title { font-size: 1.4rem; }
}

.alert-success {
    background: rgba(80, 160, 120, 0.15);
    border: 1px solid rgba(120, 200, 160, 0.35);
    color: #b8e8d0;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.copy-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.btn-sm { padding: 6px 12px; font-size: 0.75rem; }

.panel-tabs {
    display: flex;
    gap: 4px;
    margin: 12px 0 8px;
    flex-wrap: wrap;
}
.panel-tab-btn {
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid rgba(120, 160, 255, 0.2);
    border-radius: 12px;
    background: rgba(6, 10, 20, 0.5);
    color: var(--text-soft);
    font-size: 0.68rem;
    cursor: pointer;
}
.panel-tab-btn.active {
    color: var(--gold);
    border-color: rgba(232, 184, 122, 0.45);
    background: rgba(232, 184, 122, 0.08);
}

.achievements-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.achievement-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    opacity: 0.65;
}
.achievement-card--unlocked { opacity: 1; }
.achievement-card-icon { font-size: 2rem; }
.achievement-progress {
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}
.achievement-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6b8fd4, var(--gold));
}
.achievement-progress-label { font-size: 0.7rem; color: var(--text-faint); }

.journal-list { display: grid; gap: 12px; }
.journal-entry-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.journal-entry-date { font-size: 0.75rem; color: var(--text-faint); }
.journal-entry-body { line-height: 1.55; color: var(--text-soft); }
.journal-entry-link { display: inline-block; margin-top: 10px; font-size: 0.8rem; color: var(--gold); }

.onboarding-steps {
    margin: 16px 0 24px;
    padding-left: 20px;
    line-height: 1.6;
    color: var(--text-soft);
}
.onboarding-steps li { margin-bottom: 10px; }

.chart-summary { font-size: 0.8rem; color: var(--text-soft); margin-bottom: 10px; }
.weekly-card--empty { opacity: 0.9; }
.self-compare-card { margin-bottom: 12px; }

/* Admin panel */
.page-admin {
    min-height: 100vh;
    padding: 32px 20px 48px;
    background: radial-gradient(ellipse at 50% 0%, rgba(40, 60, 100, 0.15), transparent 60%), var(--bg);
}
.admin-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}
.admin-header h1 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 400;
    margin: 0;
    color: var(--text);
}
.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.admin-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border);
    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.8rem;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.admin-nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text);
}
.admin-nav-link--active {
    background: rgba(201, 149, 78, 0.15);
    border-color: rgba(201, 149, 78, 0.4);
    color: var(--gold-bright);
}
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.admin-stat {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    text-align: center;
}
.admin-stat-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--gold-bright);
}
.admin-stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-faint);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}
.admin-search {
    flex: 1;
    min-width: 200px;
    max-width: 360px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.25);
    color: var(--text);
    font-size: 0.875rem;
}
.admin-search:focus {
    outline: none;
    border-color: rgba(201, 149, 78, 0.5);
}
.admin-section-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    margin: 0 0 16px;
    color: var(--text);
}
.admin-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0,0,0,0.2);
    font-size: 0.85rem;
}
.admin-table th,
.admin-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}
.admin-table th {
    background: rgba(255,255,255,0.04);
    font-weight: 600;
    color: var(--text-soft);
    white-space: nowrap;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table a { color: var(--gold-bright); text-decoration: none; }
.admin-table a:hover { text-decoration: underline; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.false-positive-btn {
    background: rgba(138, 90, 58, 0.5);
    border: 1px solid rgba(201, 149, 78, 0.3);
    padding: 2px 10px;
    border-radius: 16px;
    color: #ffccaa;
    font-size: 0.7rem;
    cursor: pointer;
    margin-left: 8px;
}
.false-positive-btn:hover { background: rgba(138, 90, 58, 0.8); }
.suppression-block {
    background: rgba(0,0,0,0.25);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
}
.admin-globe-container {
    width: 100%;
    height: 500px;
    background: #03050a;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    margin-top: 16px;
    border: 1px solid var(--glass-border);
}
.admin-doctrine-rank {
    display: grid;
    gap: 8px;
    margin: 12px 0;
}
.admin-doctrine-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(0,0,0,0.2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
}
.admin-doctrine-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: hidden;
}
.admin-doctrine-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright));
    border-radius: 3px;
}
.admin-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}
.admin-modal.is-open { display: flex; }
.admin-modal-content {
    background: var(--glass);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    padding: 24px;
    border-radius: var(--radius-lg);
    width: min(400px, 100%);
}
.admin-modal-content textarea {
    width: 100%;
    margin: 10px 0 16px;
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.3);
    color: var(--text);
    resize: vertical;
}
.admin-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    background: rgba(120, 200, 160, 0.15);
    border: 1px solid rgba(120, 200, 160, 0.35);
    color: #b8e8d0;
}
.admin-badge--warn {
    background: rgba(200, 140, 80, 0.15);
    border-color: rgba(200, 140, 80, 0.35);
    color: #ffd4a8;
}
.admin-filters { margin-bottom: 16px; }
.admin-filters-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.admin-select {
    padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.25); color: var(--text); font-size: 0.8rem;
}
.admin-check { font-size: 0.8rem; color: var(--text-soft); display: flex; align-items: center; gap: 6px; }
.admin-pagination { display: flex; gap: 12px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.admin-page-info { font-size: 0.8rem; color: var(--text-soft); }
.admin-analytics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.admin-compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.admin-compare-table .admin-delta-up { color: #88cc88; }
.admin-compare-table .admin-delta-down { color: #cc8888; }
.admin-row-blocked { opacity: 0.65; }
.admin-row-weak td { background: rgba(200, 140, 80, 0.06); }
.admin-form-block { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--glass-border); }
@media (max-width: 800px) {
    .admin-globe-container { height: 350px; }
    .admin-table { font-size: 0.78rem; }
    .admin-table th, .admin-table td { padding: 10px 8px; }
    .admin-compare-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
