/* ═══════════════════════════════════════════════════════════════
   ЛИЧНЫЙ КАБИНЕТ v2 — «Аура». Герой с путём посвящения, липкая
   навигация, световое пятно под курсором, ритуал и ладонь с магией.
   Подключается после futurist.css. Логика и id/классы account.js
   не затронуты: здесь только оформление.
   ═══════════════════════════════════════════════════════════════ */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.page-cabinet {
    --ion: #5ee2f0; --volt: #5580f7; --solar: #ffb347;
    --cab-line: rgba(110, 200, 255, .16);
    --cab-hot: rgba(94, 226, 240, .46);
}
.page-cabinet .cabinet-main { padding: 30px 0 70px; }
.page-cabinet .reveal-up { animation: none; }

/* ── Общие карточки ──────────────────────────────────────────── */

.cabinet-main .section-card {
    position: relative;
    max-width: none;
    margin: 0 0 20px;
    padding: 28px 30px;
    scroll-margin-top: calc(var(--hdr, 60px) + 78px);
}
.cabinet-main .card-glass { position: relative; }
.cabinet-main .card-glass::before {
    content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(440px circle at var(--mx, 50%) var(--my, 0%), rgba(94, 226, 240, .11), transparent 55%);
    opacity: 0; transition: opacity .35s;
}
.cabinet-main .card-glass:hover::before { opacity: 1; }
.cabinet-main .card-glass > * { position: relative; z-index: 1; }
.cabinet-main .card-glass > .ritual-month,
.cabinet-main .card-glass > .lock-overlay { z-index: 1; }

.cabinet-main .card-title {
    display: flex; align-items: center; gap: 14px;
    margin: 0 0 12px;
    font-family: var(--font-display, 'Unbounded', sans-serif);
    font-size: 19px; font-weight: 600; color: var(--ink, #e8f1ff);
}
.cabinet-main .card-title::after {
    content: ''; flex: 1; height: 1px;
    background: linear-gradient(90deg, var(--cab-hot), transparent);
}
.cab-flow, .cab-extras { margin-top: 2px; }
.cab-extras { column-width: 480px; column-gap: 20px; }
.cab-extras > section { break-inside: avoid; display: block; margin-bottom: 20px; }

/* Фокус-вспышка, когда на секцию ведёт ссылка пути */
.cabinet-main .section-card.cab-flash { animation: cab-flash 1.6s ease-out; }
@keyframes cab-flash {
    0% { box-shadow: 0 0 0 2px var(--solar), 0 0 60px rgba(255, 179, 71, .5); }
    100% { box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
}

/* ── Герой ───────────────────────────────────────────────────── */

.cab-hero {
    position: relative; isolation: isolate; overflow: hidden;
    display: grid; grid-template-columns: auto minmax(0, 1fr) 320px;
    gap: 22px 30px; align-items: center;
    margin: 0 0 16px; padding: 30px 32px 22px;
    border: 1px solid rgba(94, 226, 240, .3); border-radius: 6px;
    background:
        radial-gradient(520px circle at var(--mx, 78%) var(--my, 0%), rgba(94, 226, 240, .16), transparent 62%),
        radial-gradient(640px 320px at 0% 100%, rgba(85, 128, 247, .22), transparent 70%),
        radial-gradient(420px 260px at 100% 100%, rgba(255, 179, 71, .08), transparent 70%),
        linear-gradient(180deg, rgba(14, 24, 46, .82), rgba(6, 10, 20, .9));
    box-shadow: 0 24px 70px rgba(0, 0, 0, .4), inset 0 0 80px rgba(85, 128, 247, .08);
}
.cab-hero .page-title {
    margin: 0 0 10px;
    font-family: var(--font-display, 'Unbounded', sans-serif);
    font-size: clamp(26px, 3.4vw, 38px); font-weight: 600; line-height: 1.15;
    color: var(--ink, #e8f1ff); text-shadow: 0 0 28px rgba(94, 226, 240, .4);
}
.cab-day { margin: 0 0 14px; max-width: 62ch; font-size: 15.5px; line-height: 1.6; color: var(--text, #dfe9fb); }
.cab-day-tag {
    display: inline-block; margin-right: 10px; padding: 2px 10px;
    font-size: 12.5px; font-weight: 600; color: #ffd9a0;
    border: 1px solid rgba(255, 179, 71, .55); border-radius: 2px; background: rgba(255, 179, 71, .08);
}
.cab-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cab-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 13px; font-size: 13.5px; font-weight: 500;
    color: var(--text, #dfe9fb); text-decoration: none;
    border: 1px solid var(--cab-line); border-radius: 3px; background: rgba(8, 14, 28, .6);
    transition: border-color .2s, box-shadow .2s;
}
a.cab-chip:hover { border-color: var(--cab-hot); box-shadow: 0 0 22px rgba(94, 226, 240, .25); }
.cab-chip i { font-style: normal; color: var(--ion); }
.cab-chip.hot { border-color: rgba(255, 138, 76, .5); }
.cab-chip.hot i { color: #ff9a5c; animation: cab-flicker 2.4s ease-in-out infinite; }
.cab-chip.gold { border-color: rgba(255, 179, 71, .5); color: #ffd9a0; }
.cab-chip.gold i { color: var(--solar); }

.cab-hero .hello-link { flex: none; padding: 16px 18px; align-self: center; }

/* Сигил: инициал в двойном вращающемся кольце, вокруг идут спутники */
.cab-sigil { position: relative; width: 138px; height: 138px; display: grid; place-items: center; }
.cab-sigil-ring {
    position: absolute; inset: 0; border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0, rgba(94, 226, 240, .95) 14%, transparent 34%, rgba(255, 179, 71, .9) 58%, transparent 76%, rgba(85, 128, 247, .95) 90%, transparent);
    -webkit-mask: radial-gradient(circle, transparent 66%, #000 67%, #000 72%, transparent 73%);
            mask: radial-gradient(circle, transparent 66%, #000 67%, #000 72%, transparent 73%);
    filter: drop-shadow(0 0 8px rgba(94, 226, 240, .55));
    animation: cab-spin 14s linear infinite;
}
.cab-sigil-ring.r2 { inset: 13px; opacity: .65; animation-duration: 22s; animation-direction: reverse; }
.cab-sigil-core {
    width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center;
    font-family: var(--font-display, 'Unbounded', sans-serif); font-size: 38px; font-weight: 600; color: #fff;
    background: radial-gradient(circle at 34% 28%, #a8f6ff, #5580f7 52%, #0a1230);
    box-shadow: 0 0 44px rgba(94, 226, 240, .5), inset -9px -11px 22px rgba(0, 0, 0, .5);
}
.cab-sat {
    position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px;
    border-radius: 50%; background: var(--solar); box-shadow: 0 0 12px var(--solar);
    animation: cab-orbit 9s linear infinite;
}
.cab-sat.s2 { --r: 54px; width: 6px; height: 6px; margin: -3px; background: var(--ion); box-shadow: 0 0 10px var(--ion); animation-duration: 6s; animation-direction: reverse; }

/* Путь посвящения */
.cab-path {
    grid-column: 1 / -1; margin: 4px 0 0; padding: 18px 0 0; list-style: none;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 10px; align-items: start;
    border-top: 1px solid var(--cab-line);
}
.cab-step { position: relative; }
.cab-step a { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; text-decoration: none; color: inherit; padding: 2px 4px 4px; }
.cab-step-orb {
    position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%;
    display: grid; place-items: center; font-size: 18px; color: var(--muted, #8b9dbd);
    background: rgba(8, 14, 28, .9); border: 1px solid var(--cab-line);
    transition: transform .3s, box-shadow .3s;
}
.cab-step a:hover .cab-step-orb { transform: scale(1.1); }
.cab-step b { font-size: 14px; font-weight: 600; color: var(--ink, #e8f1ff); }
.cab-step .m { font-size: 12.5px; color: var(--muted, #8b9dbd); }
.cab-step:not(:last-of-type)::after {
    content: ''; position: absolute; top: 22px; height: 2px; z-index: 0;
    left: calc(50% + 28px); right: calc(-50% - 10px + 28px);
    background: var(--cab-line);
}
.cab-step.done:not(:last-of-type)::after {
    background: linear-gradient(90deg, var(--ion), var(--volt), var(--ion)); background-size: 200% 100%;
    box-shadow: 0 0 10px rgba(94, 226, 240, .5); animation: cab-flow 3s linear infinite;
}
.cab-step.done .cab-step-orb {
    color: #04202a; border-color: var(--ion);
    background: radial-gradient(circle at 34% 28%, #d8fbff, var(--ion) 52%, #0b4452);
    box-shadow: 0 0 24px rgba(94, 226, 240, .6);
}
.cab-step.now .cab-step-orb { color: var(--solar); border-color: var(--solar); animation: cab-ping 2.2s ease-out infinite; }
.cab-step.todo { opacity: .65; }
.cab-next-wrap { align-self: center; }
.cab-next {
    display: grid; gap: 2px; min-width: 210px; padding: 12px 20px; text-decoration: none; text-align: left;
    color: #04202a; border-radius: 3px;
    background: linear-gradient(135deg, #a8f6ff, var(--ion) 45%, #7aa6ff);
    box-shadow: 0 0 34px rgba(94, 226, 240, .45);
    transition: transform .25s, box-shadow .25s;
}
.cab-next:hover { transform: translateY(-2px); box-shadow: 0 0 54px rgba(94, 226, 240, .7); }
.cab-next-t { font-size: 15px; font-weight: 700; }
.cab-next-m { font-size: 12.5px; opacity: .78; }

/* ── Липкая навигация ────────────────────────────────────────── */

.cab-nav {
    position: sticky; top: var(--hdr, 60px); z-index: 40;
    display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
    margin: 0 0 20px; padding: 6px;
    border: 1px solid var(--cab-line); border-radius: 6px;
    background: rgba(5, 9, 18, .8);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.cab-nav::-webkit-scrollbar { display: none; }
.cab-nav a {
    flex: none; display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 4px; text-decoration: none;
    font-size: 14px; font-weight: 500; color: var(--muted, #8b9dbd);
    transition: color .2s, background .2s, box-shadow .2s;
}
.cab-nav a i { font-style: normal; }
.cab-nav a:hover { color: var(--ink, #e8f1ff); background: rgba(94, 226, 240, .08); }
.cab-nav a.on { color: #04202a; background: var(--ion); box-shadow: 0 0 24px rgba(94, 226, 240, .45); }
.cab-nav b { padding: 1px 8px; font-size: 11.5px; font-weight: 600; color: #ffd9a0; border-radius: 9px; background: rgba(255, 179, 71, .18); }
.cab-nav a.on b { color: #04202a; background: rgba(4, 32, 42, .22); }
.cab-nav b[hidden] { display: none; }

/* ── Ритуал дня ──────────────────────────────────────────────── */

@media (min-width: 900px) {
    #ritualCard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 36px; align-items: start; }
    #ritualCard > * { grid-column: 1; }
    #ritualCard > .ritual-month { grid-column: 2; grid-row: 1 / span 6; margin: 0; }
}
#ritualCard {
    background:
        radial-gradient(520px 260px at 100% 0%, rgba(255, 138, 76, .1), transparent 70%),
        linear-gradient(180deg, rgba(21, 32, 55, .66), rgba(9, 15, 26, .82));
}
.ritual-flame { border-color: rgba(255, 138, 76, .45); background: rgba(255, 138, 76, .08); }
.ritual-flame-ico { animation: cab-flicker 2.4s ease-in-out infinite; filter: drop-shadow(0 0 12px rgba(255, 138, 76, .7)); }
.ritual-flame-num { color: #ffd0a0; text-shadow: 0 0 18px rgba(255, 138, 76, .6); }
.ritual-day.checked { box-shadow: inset 0 0 14px rgba(94, 226, 240, .2), 0 0 12px rgba(94, 226, 240, .12); }
.ritual-day.today { animation: cab-ping 2.6s ease-out infinite; }
#ritualCheckin:not(.is-done) { animation: cab-glow 2.8s ease-in-out infinite; }

/* ── Фото ладони: фото всегда целиком ───────────────────────── */

.palm-progress-bar { position: relative; height: 12px; }
.palm-progress-bar::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: repeating-linear-gradient(90deg, transparent 0, transparent calc(20% - 2px), rgba(4, 7, 13, .9) calc(20% - 2px), rgba(4, 7, 13, .9) 20%);
}
.palm-progress-bar i { background-size: 200% 100%; background-image: linear-gradient(90deg, #5580f7, #5ee2f0, #5580f7); animation: cab-flow 3s linear infinite; }
.palm-zones { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.zone-card { position: relative; overflow: hidden; }
.zone-card:not(.filled) { animation: cab-dash 3s ease-in-out infinite; }
.zone-card.filled::after {
    content: '✓'; position: absolute; top: 10px; right: 10px; z-index: 2;
    width: 24px; height: 24px; display: grid; place-items: center;
    font-size: 13px; font-weight: 700; color: #04202a; border-radius: 50%;
    background: var(--ion); box-shadow: 0 0 16px rgba(94, 226, 240, .7);
}
.zone-preview {
    width: 100%; height: 132px; border-radius: 4px; background: #050a14;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, .6);
}
.zone-preview::before { display: none; }
.zone-preview img { object-fit: contain; filter: none; }
.zone-empty { animation: cab-float 3.4s ease-in-out infinite; }

/* ── Вопросы ─────────────────────────────────────────────────── */

.questions-grid { gap: 16px; }
.question-btn { padding: 22px 14px 16px; overflow: hidden; }
.question-btn::before {
    content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
    background: radial-gradient(180px circle at 50% 0%, rgba(94, 226, 240, .28), transparent 70%);
}
.question-btn:hover::before { opacity: 1; }
.q-rune { font-size: 34px; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.question-btn:hover .q-rune { transform: scale(1.18) rotate(8deg); }
.lock-overlay { font-size: 15px; line-height: 1.5; background: rgba(5, 8, 14, .55); }

/* ── v1.40: картинка сферы — магическая тема кабинета ─────────── */

.question-btn.has-img { padding: 8px 8px 16px; }
.q-img { border-radius: 6px; border-color: rgba(94, 226, 240, .4); }
.question-btn.has-img:hover .q-img {
    box-shadow: 0 0 26px rgba(94, 226, 240, .32), inset 0 0 22px rgba(6, 10, 22, .55);
    border-color: rgba(94, 226, 240, .75);
}
.q-rune-badge {
    font-size: 21px;
    border-radius: 4px;
    background: rgba(7, 5, 22, .74);
    box-shadow: 0 0 14px rgba(94, 226, 240, .25);
}
@media (prefers-reduced-motion: reduce) {
    .q-img img { transition: none; }
    .question-btn.has-img:hover .q-img img { transform: none; }
}

/* ── Мои вопросы: заказ показывает свой путь ─────────────────── */

.order-card { position: relative; padding-bottom: 20px; overflow: hidden; }
.order-card::before, .order-card::after { content: ''; position: absolute; left: 0; bottom: 0; height: 3px; }
.order-card::before { right: 0; background: rgba(110, 200, 255, .1); }
.order-card::after { width: var(--p, 15%); background: linear-gradient(90deg, var(--volt), var(--ion)); box-shadow: 0 0 12px rgba(94, 226, 240, .6); transition: width .6s; }
.order-card[data-status="pending_payment"] { --p: 15%; }
.order-card[data-status="awaiting_confirm"] { --p: 40%; }
.order-card[data-status="paid"] { --p: 60%; }
.order-card[data-status="draft"] { --p: 82%; }
.order-card[data-status="sent"] { --p: 100%; }
.order-card[data-status="sent"]::after { background: linear-gradient(90deg, #4ade80, #a7f3b8); box-shadow: 0 0 12px rgba(74, 222, 128, .6); }
.order-card:hover { border-color: var(--cab-hot); }

/* ── Игра, сертификаты, карта ───────────────────────────────── */

.gt-row:nth-child(1) .gt-pos { color: #ffd76a; }
.gt-row:nth-child(2) .gt-pos { color: #d6e2f5; }
.gt-row:nth-child(3) .gt-pos { color: #e0a272; }
.gt-row:nth-child(-n+3) { background: linear-gradient(90deg, rgba(255, 215, 106, .07), transparent 60%); }
.certgal-card { position: relative; overflow: hidden; }
.certgal-card::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .13) 50%, transparent 62%);
    transform: translateX(-120%); transition: transform .9s;
}
.certgal-card:hover::after { transform: translateX(120%); }
.pcard-frame { transition: transform .25s ease-out, box-shadow .3s; transform: perspective(900px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)); will-change: transform; }
.pcard-frame:hover { box-shadow: 0 0 60px rgba(94, 226, 240, .35); }

/* ── Экран входа: портал ─────────────────────────────────────── */

.auth-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 40px; align-items: center; max-width: 1040px; margin: 20px auto 0; }
.auth-stage .auth-wrap { margin: 0; max-width: none; border: 1px solid rgba(94, 226, 240, .3); border-radius: 6px; background: linear-gradient(180deg, rgba(21, 32, 55, .72), rgba(9, 15, 26, .86)); box-shadow: 0 24px 70px rgba(0, 0, 0, .45), 0 0 80px rgba(85, 128, 247, .12); }
.auth-portal { text-align: left; }
.portal-orrery { position: relative; width: min(300px, 70vw); aspect-ratio: 1; margin: 0 0 26px; display: grid; place-items: center; }
.po-ring { position: absolute; border-radius: 50%; border: 1px solid rgba(94, 226, 240, .3); }
.po-ring.r1 { inset: 0; border-style: dashed; animation: cab-spin 40s linear infinite; }
.po-ring.r2 { inset: 16%; border-color: rgba(255, 179, 71, .32); animation: cab-spin 28s linear infinite reverse; }
.po-ring.r3 { inset: 32%; border-color: rgba(85, 128, 247, .5); animation: cab-spin 18s linear infinite; }
.po-core {
    width: 28%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: 34px;
    background: radial-gradient(circle at 34% 28%, #a8f6ff, #5580f7 55%, #0a1230);
    box-shadow: 0 0 60px rgba(94, 226, 240, .6), inset -8px -10px 20px rgba(0, 0, 0, .5);
}
.po-glyph { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px; display: grid; place-items: center; font-style: normal; font-size: 16px; color: #fff; border-radius: 50%; background: rgba(8, 14, 28, .9); border: 1px solid var(--cab-hot); box-shadow: 0 0 16px rgba(94, 226, 240, .5); }
.po-glyph.g1 { --r: 150px; animation: cab-orbit 30s linear infinite; }
.po-glyph.g2 { --r: 120px; animation: cab-orbit 22s linear infinite reverse; }
.po-glyph.g3 { --r: 90px;  animation: cab-orbit 16s linear infinite; }
.po-glyph.g4 { --r: 150px; animation: cab-orbit 30s linear infinite -15s; }
.portal-title { margin: 0 0 16px; font-family: var(--font-display, 'Unbounded', sans-serif); font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; color: var(--ink, #e8f1ff); }
.portal-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.portal-list li { display: flex; gap: 14px; align-items: flex-start; }
.portal-list i { flex: none; width: 38px; height: 38px; display: grid; place-items: center; font-style: normal; font-size: 17px; border: 1px solid var(--cab-hot); border-radius: 50%; background: rgba(94, 226, 240, .08); }
.portal-list b { display: block; font-size: 15px; color: var(--ink, #e8f1ff); }
.portal-list span { font-size: 13.5px; color: var(--muted, #8b9dbd); }

/* ── Искры ───────────────────────────────────────────────────── */

.cab-spark { position: fixed; z-index: 1500; width: 7px; height: 7px; margin: -3.5px; pointer-events: none; color: var(--ion); font-size: 12px; line-height: 7px; text-align: center; text-shadow: 0 0 10px currentColor; }

/* ── Анимации ────────────────────────────────────────────────── */

@keyframes cab-spin { to { transform: rotate(360deg); } }
@keyframes cab-orbit { from { transform: rotate(0) translateX(var(--r, 72px)); } to { transform: rotate(360deg) translateX(var(--r, 72px)); } }
@keyframes cab-flow { to { background-position: 200% 0; } }
@keyframes cab-ping { 0% { box-shadow: 0 0 0 0 rgba(255, 179, 71, .55); } 70%, 100% { box-shadow: 0 0 0 14px rgba(255, 179, 71, 0); } }
@keyframes cab-flicker { 0%, 100% { transform: scale(1) rotate(0); } 25% { transform: scale(1.1) rotate(-3deg); } 55% { transform: scale(.96) rotate(2deg); } 80% { transform: scale(1.06) rotate(-1deg); } }
@keyframes cab-glow { 0%, 100% { box-shadow: 0 0 18px rgba(94, 226, 240, .35); } 50% { box-shadow: 0 0 44px rgba(94, 226, 240, .75); } }
@keyframes cab-dash { 0%, 100% { border-color: rgba(94, 226, 240, .26); } 50% { border-color: rgba(94, 226, 240, .7); } }
@keyframes cab-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

@media (prefers-reduced-motion: reduce) {
    .cab-hero *, .cab-hero *::before, .cab-hero *::after, .auth-portal *, .zone-card, .zone-empty,
    #ritualCard *, #ritualCheckin, .palm-progress-bar i, .cab-step-orb { animation: none !important; }
}

/* ── Адаптив ─────────────────────────────────────────────────── */

@media (max-width: 960px) {
    .cab-hero { grid-template-columns: auto minmax(0, 1fr); }
    .cab-hero .hello-link { grid-column: 1 / -1; }
    .auth-stage { grid-template-columns: 1fr; gap: 28px; }
    .auth-portal { display: grid; grid-template-columns: auto 1fr; gap: 6px 24px; align-items: center; }
    .portal-orrery { grid-row: 1 / span 2; width: 190px; margin: 0; }
    .po-glyph.g1, .po-glyph.g4 { --r: 95px; }
    .po-glyph.g2 { --r: 76px; } .po-glyph.g3 { --r: 57px; }
    .portal-list { grid-column: 1 / -1; margin-top: 10px; }
}
@media (max-width: 700px) {
    .cab-path { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
    .cab-step:not(:last-of-type)::after { display: none; }
    .cab-next-wrap { grid-column: 1 / -1; }
    .cab-next { min-width: 0; }
}
@media (max-width: 560px) {
    .cabinet-main .section-card { padding: 22px 18px; }
    .cab-hero { grid-template-columns: 1fr; padding: 24px 18px 18px; justify-items: start; }
    .cab-sigil { width: 104px; height: 104px; }
    .cab-sigil-core { width: 66px; height: 66px; font-size: 28px; }
    .cab-sat { --r: 52px; } .cab-sat.s2 { --r: 40px; }
    .auth-portal { display: block; }
    .portal-orrery { width: 200px; margin: 0 auto 18px; }
    .zone-preview { height: 120px; }
}

/* ═══ v1.41–1.42: Терраформер — живая планета в кабинете (все постройки) ═══ */
.tf-cab { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 22px; align-items: center; margin-top: 14px; }
.tf-cab-visual { position: relative; width: 300px; height: 300px; margin: 0 auto; }
.tf-cab-visual canvas {
  width: 100%; height: 100%; display: block;
  filter: drop-shadow(0 10px 34px rgba(94, 226, 240, .18));
  animation: tfcab-float 7s ease-in-out infinite;
}
@keyframes tfcab-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.tf-cab-glyph {
  position: absolute; right: 2px; bottom: 2px; font-size: 15px; opacity: .85;
  background: rgba(8, 16, 30, .8); border: 1px solid rgba(94, 226, 240, .25);
  border-radius: 999px; padding: 4px 9px; backdrop-filter: blur(4px);
}
.tf-cab-name { font-size: 15.5px; color: var(--text, #dfe9fb); margin: 0 0 12px; }
.tf-cab-name b { color: var(--ion, #5ee2f0); }
.tf-cab-info .pay-stats { margin-bottom: 16px; }
.tf-cab-info .btn-magic { display: inline-block; }
@media (max-width: 720px) {
  .tf-cab { grid-template-columns: 1fr; gap: 12px; }
  .tf-cab-visual { width: 240px; height: 240px; }
  .tf-cab-visual canvas { width: 240px; height: 240px; }
}
@media (prefers-reduced-motion: reduce) {
  .tf-cab-visual canvas { animation: none; }
}
#terraCard .pay-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
#terraCard .pay-chip { flex: 0 1 auto; min-width: 0; }

/* ═══ v1.43 «Космический итог года» — тизер в кабинете ═══ */
.wrap-teaser {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(120deg, rgba(43, 26, 82, .5), rgba(13, 10, 28, .35));
  border: 1px solid rgba(240, 199, 94, .28);
  border-radius: 16px; padding: 14px 18px; margin-bottom: 16px;
}
.wrap-teaser-orb {
  flex: 0 0 auto; width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; font-size: 30px;
  background: radial-gradient(circle at 35% 30%, #35206b, #170b33 70%);
  box-shadow: 0 0 30px rgba(240, 199, 94, .3), inset 0 0 18px rgba(240, 199, 94, .15);
  animation: wrteaser-float 3.4s ease-in-out infinite;
}
@keyframes wrteaser-float { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(3px); } }
.wrap-teaser-text b { display: block; font-family: 'Unbounded', sans-serif; font-size: 15px; color: #f0c75e; margin-bottom: 4px; }
.wrap-teaser-text span { font-size: 13.5px; line-height: 1.5; color: var(--text, #dfe9fb); opacity: .85; }
@media (prefers-reduced-motion: reduce) { .wrap-teaser-orb { animation: none; } }

/* ═══ v1.43 «Чары судьбы» — карточка кабинета ═══ */
.charm-cast { margin-bottom: 16px; }
.charm-charges {
  display: flex; align-items: center; gap: 12px;
  background: rgba(20, 14, 40, .5); border: 1px solid rgba(240, 199, 94, .25);
  border-radius: 14px; padding: 10px 16px; margin-bottom: 14px; font-size: 14.5px;
}
.charm-charges b { color: #f0c75e; font-size: 17px; }
.charm-orb {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-size: 18px; color: #1c1206;
  background: radial-gradient(circle at 35% 30%, #ffe9b8, #d9a521 60%, #7c5c0e);
  box-shadow: 0 0 22px rgba(240, 199, 94, .45);
  animation: charmorb-pulse 2.6s ease-in-out infinite;
}
@keyframes charmorb-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.charm-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.charm-btns .ch-cast-btn {
  cursor: pointer; border-radius: 16px; padding: 18px 14px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: rgba(22, 15, 44, .55); color: var(--text, #dfe9fb);
  border: 1px solid rgba(240, 199, 94, .35);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  font: inherit;
}
.charm-btns .ch-cast-btn .ch-cast-glyph { font-size: 30px; color: #f0c75e; text-shadow: 0 0 14px rgba(240, 199, 94, .6); }
.charm-btns .ch-cast-btn b { font-family: 'Unbounded', sans-serif; font-size: 14px; }
.charm-btns .ch-cast-btn i { font-style: normal; font-size: 12.5px; opacity: .7; }
.charm-btns .ch-cast-btn:hover { transform: translateY(-3px); border-color: #f0c75e; box-shadow: 0 0 26px rgba(240, 199, 94, .3); }
.charm-btns .ch-cast-btn.curse { border-color: rgba(255, 90, 90, .35); }
.charm-btns .ch-cast-btn.curse .ch-cast-glyph { color: #ff5a5a; text-shadow: 0 0 14px rgba(255, 90, 90, .55); }
.charm-btns .ch-cast-btn.curse:hover { border-color: #ff5a5a; box-shadow: 0 0 26px rgba(255, 90, 90, .25); }
.charm-btns .ch-cast-btn:disabled { opacity: .55; cursor: wait; transform: none; }
.charm-link-out {
  margin-top: 14px; padding: 14px 16px; border-radius: 14px;
  background: rgba(22, 15, 44, .6); border: 1px solid rgba(240, 199, 94, .4);
  animation: charmout-in .5s cubic-bezier(.2, 1.3, .3, 1) both;
}
@keyframes charmout-in { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
.charm-sealed { margin: 0 0 10px; font-size: 13.5px; color: #ffd88a; }
.charm-hint { margin: 9px 0 0; font-size: 12.5px; }
.charm-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.charm-stats .pay-chip { flex: 0 1 auto; min-width: 0; }
.charm-row {
  display: flex; align-items: center; gap: 12px;
  background: rgba(20, 14, 40, .45); border: 1px solid rgba(239, 233, 255, .12);
  border-radius: 12px; padding: 9px 14px; margin-bottom: 8px; font-size: 14px;
}
.charm-row-glyph { font-size: 20px; color: #f0c75e; }
.charm-row.curse .charm-row-glyph { color: #ff5a5a; }
.charm-row-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.charm-row-info b { font-size: 13.5px; }
.charm-row-info i { font-style: normal; font-size: 12.5px; opacity: .7; }
.charm-sparkle { position: fixed; z-index: 90; pointer-events: none; }
.charm-sparkle i {
  position: absolute; width: 7px; height: 7px; border-radius: 50%;
  animation: charmspark .9s ease-out forwards;
}
@keyframes charmspark {
  from { transform: translate(0, 0) scale(1); opacity: 1; }
  to   { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; }
}
@media (max-width: 620px) {
  .charm-btns { grid-template-columns: 1fr; }
  .wrap-teaser { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .charm-orb { animation: none; }
  .charm-link-out { animation: none; }
  .charm-sparkle { display: none; }
}

/* ═══ v1.48: «Ответ Оракула» — переписка с администратором в кабинете ═══ */

.fb-cab { margin-top: 14px; }
.fbc-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(94, 226, 240, 0.18);
  border-left: 3px solid rgba(94, 226, 240, 0.4);
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  padding: 10px 14px;
  margin-bottom: 10px;
}
.fbc-card.has-unread {
  border-left-color: #ffb347;
  background: rgba(255, 179, 71, 0.05);
  animation: fbcAttention 2.4s ease-in-out infinite;
}
@keyframes fbcAttention {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 179, 71, 0); }
  50%      { box-shadow: 0 0 22px rgba(255, 179, 71, 0.28); }
}
.fbc-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: 0;
  padding: 2px 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: left;
}
.fbc-snippet {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #dfe9fb;
  font-size: 14px;
}
.fbc-card.has-unread .fbc-snippet { color: #ffd98a; }
.fbc-meta { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; }
.fbc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffb347;
  box-shadow: 0 0 10px rgba(255, 179, 71, 0.8);
  animation: fbcPulse 1.6s ease-in-out infinite;
}
@keyframes fbcPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.35); opacity: 0.7; }
}
.fbc-chip {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8b9dbd;
  border: 1px solid rgba(139, 157, 189, 0.35);
  padding: 2px 7px;
  white-space: nowrap;
}
.fbc-chip.is-answered {
  color: #ffd98a;
  border-color: rgba(255, 179, 71, 0.45);
  background: rgba(255, 179, 71, 0.08);
}
.fbc-count { font-style: normal; font-size: 11px; color: #8b9dbd; white-space: nowrap; }

.fbc-thread {
  margin-top: 10px;
  border-top: 1px dashed rgba(94, 226, 240, 0.25);
  padding-top: 10px;
  display: grid;
  gap: 10px;
}
.fbc-loading {
  color: #8b9dbd;
  font-size: 13px;
  text-align: center;
  padding: 12px 0;
  animation: fbcFade 1.2s ease-in-out infinite alternate;
}
.fbc-loading.is-err { color: #ff9db0; animation: none; }
@keyframes fbcFade { from { opacity: 0.55; } to { opacity: 1; } }

.fbc-msgs {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: 340px;
  overflow-y: auto;
  padding: 2px 6px 6px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(94, 226, 240, 0.35) transparent;
}
.fbc-msg {
  max-width: 86%;
  padding: 9px 12px 7px;
  animation: fbcIn 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
}
.fbc-msg.is-user {
  align-self: flex-end;
  background: rgba(85, 128, 247, 0.1);
  border: 1px solid rgba(85, 128, 247, 0.35);
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}
.fbc-msg.is-admin {
  align-self: flex-start;
  background: rgba(255, 179, 71, 0.08);
  border: 1px solid rgba(255, 179, 71, 0.4);
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}
.fbc-msg.is-admin .fbc-who { color: #ffd98a; }
.fbc-msg.is-fresh {
  box-shadow: 0 0 22px rgba(255, 179, 71, 0.35), inset 0 0 16px rgba(255, 179, 71, 0.05);
  animation: fbcIn 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.15) both, fbcGlow 2.2s 0.5s ease-in-out infinite;
}
@keyframes fbcGlow {
  0%, 100% { box-shadow: 0 0 14px rgba(255, 179, 71, 0.22); }
  50%      { box-shadow: 0 0 34px rgba(255, 179, 71, 0.5), inset 0 0 20px rgba(255, 179, 71, 0.09); }
}
.fbc-who {
  display: block;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ion-soft, #5ee2f0);
  margin-bottom: 4px;
}
.fbc-text { margin: 0; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: break-word; }
.fbc-time { display: block; margin-top: 4px; font-size: 10.5px; color: #8b9dbd; }
@keyframes fbcIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fbc-reply { display: grid; gap: 6px; }
.fbc-reply textarea {
  width: 100%;
  resize: vertical;
  min-height: 60px;
  background: rgba(8, 16, 32, 0.78);
  color: inherit;
  border: 1px solid rgba(94, 226, 240, 0.3);
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.fbc-reply textarea:focus {
  outline: none;
  border-color: rgba(94, 226, 240, 0.65);
  box-shadow: 0 0 0 1px rgba(94, 226, 240, 0.3), 0 0 24px rgba(94, 226, 240, 0.12);
}
.fbc-reply .form-error { color: #ff9db0; font-size: 12.5px; min-height: 14px; margin: 0; }
.fbc-reply .btn-magic { justify-self: start; }

@media (max-width: 560px) {
  .fbc-msg { max-width: 94%; }
  .fbc-count { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fbc-card.has-unread, .fbc-dot, .fbc-msg.is-fresh, .fbc-loading, .fbc-msg { animation: none; }
}
