/* ═══════════════════════════════════════════════════════════════
   КОСМИЧЕСКИЙ ОРАКУЛ — личный кабинет + страница предсказаний
   (account.php, palm.php). Дополняет базу style.css.
   ═══════════════════════════════════════════════════════════════ */

/* ── Общие элементы страниц ─────────────────────────────────────── */

.page-cabinet, .page-palm {
    min-height: 100vh;
}

.cabinet-main, .palm-main {
    padding: 110px 0 70px;
    position: relative;
    z-index: 1;
}

.page-title {
    font-size: clamp(30px, 5vw, 44px);
    margin: 0 0 8px;
    color: #ffe9a8;
    text-shadow: 0 0 24px rgba(240, 199, 94, 0.35);
}

.page-lead {
    color: #c9bce8;
    max-width: 640px;
    line-height: 1.6;
    margin: 0 0 18px;
}

.muted { color: #9a8fb8; }

.card-glass {
    background: linear-gradient(180deg, rgba(30, 18, 58, 0.66), rgba(13, 8, 28, 0.82));
    border: 1px solid rgba(240, 199, 94, 0.22);
    border-radius: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.section-card {
    padding: 26px 28px;
    margin: 0 auto 26px;
    max-width: 880px;
}

.card-title {
    margin: 0 0 10px;
    font-size: 22px;
    color: #ffe9a8;
}

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

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
    text-align: left;
}

.field > span {
    font-size: 13px;
    color: #b7a8dd;
}

.field input, .field select, .field textarea {
    background: rgba(10, 5, 24, 0.75);
    border: 1px solid rgba(240, 199, 94, 0.28);
    border-radius: 12px;
    color: #f3edff;
    padding: 11px 14px;
    font: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color .25s, box-shadow .25s;
    width: 100%;
    box-sizing: border-box;
}

.field input:focus, .field select:focus {
    border-color: rgba(240, 199, 94, 0.6);
    box-shadow: 0 0 0 3px rgba(240, 199, 94, 0.12);
}

.field input:disabled { opacity: .55; cursor: not-allowed; }

.age-chip {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 10px;
    border-radius: 999px;
    background: rgba(240, 199, 94, 0.14);
    border: 1px solid rgba(240, 199, 94, 0.35);
    color: #ffe9a8;
    font-size: 12px;
}

.form-error { color: #ff9d9d; font-size: 13.5px; min-height: 18px; margin: 8px 0 0; }
.save-ok { color: #b5f0c0; font-size: 13.5px; margin-left: 12px; }

.db-error {
    margin: 30px auto;
    max-width: 620px;
    padding: 18px 22px;
    border-radius: 16px;
    background: rgba(60, 16, 16, 0.4);
    border: 1px solid rgba(255, 120, 120, 0.4);
    color: #ffd9d9;
}

/* ── Гость: вход / регистрация ──────────────────────────────────── */

.auth-wrap {
    max-width: 560px;
    margin: 0 auto;
    padding: 34px 34px 28px;
    text-align: center;
    position: relative;
}

.auth-decor {
    font-size: 22px;
    letter-spacing: 14px;
    color: #f0c75e;
    text-shadow: 0 0 18px rgba(240, 199, 94, .6);
    margin-bottom: 10px;
}

.auth-tabs {
    display: inline-flex;
    gap: 6px;
    padding: 5px;
    border-radius: 999px;
    background: rgba(10, 5, 24, 0.7);
    border: 1px solid rgba(240, 199, 94, 0.25);
    margin: 6px 0 22px;
}

.auth-tab {
    border: 0;
    background: transparent;
    color: #b7a8dd;
    font: inherit;
    padding: 9px 26px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .25s, color .25s;
}

.auth-tab.active {
    background: linear-gradient(135deg, #f0c75e, #d99a2b);
    color: #221503;
    font-weight: 700;
}

.auth-form { text-align: left; }
.auth-wrap .btn-magic { width: 100%; margin-top: 6px; }

/* ── Кабинет: приветствие ───────────────────────────────────────── */

.cabinet-hello {
    max-width: 880px;
    margin: 0 auto 26px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: stretch;
    justify-content: space-between;
}

.cabinet-hello > div:first-child { flex: 1 1 380px; }

.hello-link {
    flex: 0 1 330px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
}

.link-row { display: flex; gap: 8px; }

.link-row input {
    flex: 1;
    min-width: 0;
    background: rgba(10, 5, 24, 0.75);
    border: 1px solid rgba(240, 199, 94, 0.25);
    border-radius: 10px;
    color: #f0c75e;
    font-size: 12.5px;
    padding: 8px 10px;
}

/* ── Зоны фото ладони ───────────────────────────────────────────── */

.palm-progress {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 14px 0 18px;
}

.palm-progress-bar {
    flex: 1;
    height: 10px;
    border-radius: 999px;
    background: rgba(10, 5, 24, 0.8);
    border: 1px solid rgba(240, 199, 94, 0.25);
    overflow: hidden;
}

.palm-progress-bar i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #a855f7, #f0c75e);
    box-shadow: 0 0 14px rgba(240, 199, 94, 0.55);
    transition: width .5s cubic-bezier(.3, .8, .3, 1);
}

#palmCount { color: #ffe9a8; font-size: 14px; white-space: nowrap; }

.palm-zones {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.zone-card {
    border: 1px dashed rgba(240, 199, 94, 0.3);
    border-radius: 16px;
    padding: 14px;
    text-align: center;
    background: rgba(10, 5, 24, 0.45);
    transition: border-color .25s, transform .25s, box-shadow .25s;
}

.zone-card:hover { transform: translateY(-3px); border-color: rgba(240, 199, 94, 0.6); }
.zone-card.filled { border-style: solid; border-color: rgba(168, 85, 247, 0.55); }

.zone-preview {
    width: 96px;
    height: 96px;
    margin: 0 auto 10px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(240, 199, 94, 0.35);
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 32% 28%, rgba(168, 85, 247, .35), rgba(10, 5, 24, .9) 72%);
    box-shadow: inset 0 -8px 18px rgba(0,0,0,.5), 0 0 18px rgba(168, 85, 247, .18);
}

.zone-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* сферический эффект: фото «встроено» в планету */
    filter: saturate(0.92) contrast(1.05);
}

.zone-preview::after {
    content: '';
    position: absolute;
}

.zone-card { position: relative; }
.zone-preview { position: relative; }
.zone-preview::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 24%, rgba(255,255,255,.34), transparent 34%),
        radial-gradient(circle at 72% 88%, rgba(0,0,0,.5), transparent 52%);
    pointer-events: none;
    z-index: 1;
}

.zone-empty { font-size: 30px; color: rgba(240, 199, 94, 0.5); }

.zone-name { font-weight: 700; color: #ffe9a8; font-size: 14.5px; }
.zone-hint { font-size: 12px; color: #9a8fb8; min-height: 30px; margin: 4px 0 8px; line-height: 1.35; }

.zone-actions { display: flex; justify-content: center; gap: 8px; }

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

.questions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
    margin-top: 16px;
    position: relative;
}

.questions-grid.locked .question-btn {
    filter: blur(3px) grayscale(.5);
    pointer-events: none;
    opacity: .55;
}

.lock-overlay {
    position: absolute;
    inset: -4px;
    z-index: 3;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 14px;
    border-radius: 16px;
    background: rgba(7, 4, 15, 0.45);
    border: 1px solid rgba(240, 199, 94, 0.25);
    color: #ffe9a8;
    font-weight: 700;
    backdrop-filter: blur(2px);
}

.question-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(240, 199, 94, 0.28);
    background: linear-gradient(180deg, rgba(38, 22, 70, 0.75), rgba(14, 8, 30, 0.9));
    color: #f3edff;
    font: inherit;
    cursor: pointer;
    transition: transform .25s, border-color .25s, box-shadow .25s;
}

.question-btn:hover {
    transform: translateY(-4px);
    border-color: rgba(240, 199, 94, 0.7);
    box-shadow: 0 12px 30px rgba(168, 85, 247, 0.25);
}

.q-rune {
    font-size: 26px;
    color: #f0c75e;
    text-shadow: 0 0 14px rgba(240, 199, 94, .65);
}

.q-label { font-weight: 700; font-size: 14.5px; line-height: 1.25; }
.q-price {
    font-size: 12.5px;
    color: #0f0a1e;
    background: linear-gradient(135deg, #f0c75e, #d99a2b);
    padding: 3px 12px;
    border-radius: 999px;
    font-weight: 700;
}

/* ── Заказы ─────────────────────────────────────────────────────── */

.orders-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }

.order-card {
    border: 1px solid rgba(240, 199, 94, 0.22);
    border-radius: 16px;
    padding: 14px 16px;
    background: rgba(10, 5, 24, 0.5);
}

.order-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.order-rune { font-size: 22px; color: #f0c75e; }
.order-title { flex: 1; min-width: 180px; display: flex; flex-direction: column; }
.order-title b { color: #ffe9a8; }
.order-question { font-size: 13px; color: #b7a8dd; font-style: italic; }
.order-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.status-chip {
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    white-space: nowrap;
    border: 1px solid transparent;
}

.st-pending_payment  { background: rgba(240, 199, 94, .12); color: #ffe9a8; border-color: rgba(240, 199, 94, .4); }
.st-awaiting_confirm { background: rgba(255, 157, 0, .14);  color: #ffc97a; border-color: rgba(255, 157, 0, .45); }
.st-paid             { background: rgba(168, 85, 247, .16); color: #d9b8ff; border-color: rgba(168, 85, 247, .5); }
.st-draft            { background: rgba(59, 130, 246, .14); color: #a9c9ff; border-color: rgba(59, 130, 246, .45); }
.st-sent             { background: rgba(74, 222, 128, .13); color: #a7f3b8; border-color: rgba(74, 222, 128, .45); }

/* ── QR-модалка ─────────────────────────────────────────────────── */

.qr-modal, .photo-modal {
    position: fixed;
    inset: 0;
    z-index: 130;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    overscroll-behavior: contain;   /* прокрутка не вытекает на страницу под модалкой */
}

.qr-modal[hidden], .photo-modal[hidden] { display: none; }

.qr-backdrop, .photo-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 2, 10, 0.82);
    backdrop-filter: blur(10px);
}

.qr-card {
    position: relative;
    width: min(400px, 94vw);
    max-height: 92vh;
    max-height: min(92vh, 92dvh);   /* dvh: высота без адресной строки/клавиатуры */
    overflow: auto;
    overscroll-behavior: contain;
    padding: 26px 26px 20px;
    text-align: center;
    animation: flipIn .45s cubic-bezier(.2, .9, .3, 1.1) both;
}

.qr-card h3 { margin: 0 0 8px; color: #ffe9a8; }

.qr-box {
    margin: 14px auto;
    width: 228px;
    min-height: 228px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 0 34px rgba(240, 199, 94, 0.35);
}

.qr-box canvas, .qr-box img { display: block; max-width: 100%; }
.qr-box.qr-box-empty { width: 100%; max-width: 300px; box-shadow: none; }

.qr-fallback {
    word-break: break-all;
    font-size: 10.5px;
    color: #222;
    padding: 6px;
}

.qr-meta {
    text-align: left;
    font-size: 13.5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: rgba(10, 5, 24, 0.6);
    border: 1px solid rgba(240, 199, 94, 0.18);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.qr-meta span { color: #9a8fb8; }
.qr-meta b { color: #f3edff; float: right; }

.qr-actions { display: flex; flex-direction: column; gap: 8px; }
.qr-note { font-size: 12px; margin-top: 10px; }

/* ── v1.12: промокод в QR-модалке ─────────────────────────────── */
.qr-promo {
    margin-top: 14px;
    padding: 14px 14px 12px;
    border: 1px dashed rgba(240, 199, 94, 0.45);
    border-radius: 12px;
    background: rgba(240, 199, 94, 0.06);
    text-align: center;
}
.qr-promo-title { font-size: 13.5px; color: #f0c75e; margin-bottom: 10px; font-weight: 700; }
.qr-promo-row { display: flex; gap: 8px; align-items: stretch; }
.promo-input {
    flex: 1;
    min-width: 0;
    background: rgba(10, 5, 24, 0.75);
    border: 1px solid rgba(240, 199, 94, 0.35);
    border-radius: 10px;
    color: #f3edff;
    font: 700 15px/1.2 'Philosopher', Georgia, serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    padding: 10px 12px;
    outline: none;
}
.promo-input:focus { border-color: #f0c75e; box-shadow: 0 0 0 2px rgba(240, 199, 94, 0.2); }
.promo-input::placeholder { letter-spacing: 1px; font-weight: 400; color: #7d70a0; font-size: 12px; }
.qr-promo-hint { font-size: 11.5px; margin: 8px 0 0; }
.qr-promo-ok {
    margin-top: 4px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(94, 199, 140, 0.12);
    border: 1px solid rgba(94, 199, 140, 0.4);
    color: #9fe8c4;
    font-size: 13px;
}
.promo-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #9fe8c4;
    background: rgba(94, 199, 140, 0.14);
    border: 1px solid rgba(94, 199, 140, 0.4);
    border-radius: 20px;
    padding: 2px 9px;
    white-space: nowrap;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(240, 199, 94, 0.4);
    background: rgba(255, 255, 255, 0.06);
    color: #ffe9a8;
    font-size: 16px;
    cursor: pointer;
    z-index: 3;
    transition: transform .25s, background .25s;
}

.modal-close:hover { transform: rotate(90deg); background: rgba(240, 199, 94, 0.16); }

/* ── Palm-страница ──────────────────────────────────────────────── */

.palm-head { text-align: center; margin-bottom: 8px; }

.palm-eyebrow {
    font-size: 13px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #b7a8dd;
    margin-bottom: 12px;
}

.palm-name {
    font-family: 'Philosopher', serif;
    font-weight: 700;
    font-size: clamp(38px, 8vw, 74px);
    line-height: 1.05;
    margin: 0;
    background: linear-gradient(135deg, #ffe9a8 10%, #f0c75e 45%, #d99a2b 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 26px rgba(240, 199, 94, 0.4));
}

.palm-age {
    margin-top: 10px;
    text-align: center;
    font-size: 21px;
    color: #c9bce8;
}

.palm-age span {
    display: inline-block;
    font-size: 30px;
    font-weight: 700;
    color: #ffe9a8;
    text-shadow: 0 0 18px rgba(240, 199, 94, 0.5);
}

.palm-sub { max-width: 620px; margin: 14px auto 0; text-align: center; }

.palm-orbit-wrap { margin: 8px auto 20px; max-width: 900px; }

.palm-orbit {
    height: 430px;
}

.orbit-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; }

.palm-center { cursor: default; }

.palm-planet { cursor: zoom-in; }

/* ── Предсказания (вкладки) ─────────────────────────────────────── */

.palm-answers { max-width: 820px; margin: 0 auto 30px; }

.answer-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 18px 0;
}

.answer-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 20px;
    border-radius: 999px;
    border: 1px solid rgba(240, 199, 94, 0.3);
    background: rgba(10, 5, 24, 0.6);
    color: #c9bce8;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: background .25s, color .25s, border-color .25s;
}

.answer-tab:hover { border-color: rgba(240, 199, 94, 0.65); color: #ffe9a8; }

.answer-tab.active {
    background: linear-gradient(135deg, #f0c75e, #d99a2b);
    color: #221503;
    font-weight: 700;
    border-color: transparent;
}

.at-rune { font-size: 15px; }

.palm-answer-card {
    display: none;
    padding: 26px 30px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(30, 18, 58, 0.72), rgba(13, 8, 28, 0.9));
    border: 1px solid rgba(240, 199, 94, 0.28);
    box-shadow: 0 0 44px rgba(168, 85, 247, 0.12), 0 18px 50px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.palm-answer-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(600px 180px at 50% -40px, rgba(240, 199, 94, 0.12), transparent);
    pointer-events: none;
}

.palm-answer-card.active { display: block; animation: fadeUp .5s ease both; }

.pa-question {
    text-align: center;
    font-family: 'Marck Script', cursive;
    font-size: 24px;
    color: #ffe9a8;
    margin-bottom: 14px;
}

.pa-sign {
    margin-top: 18px;
    text-align: right;
    font-size: 13.5px;
    color: #9a8fb8;
    font-style: italic;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

/* ── BB-текст (красивое форматирование предсказаний) ────────────── */

.bb-text {
    line-height: 1.75;
    font-size: 16.5px;
    color: #efe6ff;
    text-align: left;
}

.bb-text p { margin: 0 0 12px; }
.bb-text p:first-child::first-letter {
    font-family: 'Marck Script', cursive;
    font-size: 34px;
    color: #f0c75e;
    margin-right: 4px;
    line-height: 1;
}

.bb-text .bb-h {
    display: block;
    font-family: 'Philosopher', serif;
    font-size: 22px;
    font-weight: 700;
    color: #ffe9a8;
    margin: 6px 0 8px;
    text-shadow: 0 0 14px rgba(240, 199, 94, 0.35);
}

.bb-text .bb-center { display: block; text-align: center; }

.bb-text .bb-quote {
    display: block;
    border-left: 3px solid rgba(240, 199, 94, 0.55);
    padding: 6px 0 6px 14px;
    margin: 10px 0;
    font-style: italic;
    color: #d8ccf5;
    background: rgba(240, 199, 94, 0.05);
    border-radius: 0 10px 10px 0;
}

.bb-text .bb-list { margin: 8px 0 12px; padding-left: 22px; }
.bb-text .bb-list li { margin-bottom: 6px; }
.bb-text .bb-list li::marker { color: #f0c75e; }

.bb-text .bb-hr {
    border: 0;
    height: 1px;
    margin: 16px auto;
    width: 70%;
    background: linear-gradient(90deg, transparent, rgba(240, 199, 94, 0.6), transparent);
}

.bb-text .bb-link { color: #f0c75e; text-decoration: underline; }
.bb-text .bb-img { max-width: 100%; border-radius: 12px; margin: 8px 0; }

/* ── CTA и пустые состояния palm ────────────────────────────────── */

.notfound-wrap {
    max-width: 520px;
    margin: 40px auto;
    text-align: center;
    padding: 40px 30px;
    border-radius: 22px;
    background: rgba(20, 12, 40, 0.6);
    border: 1px solid rgba(240, 199, 94, 0.25);
}

.nf-glyph { font-size: 26px; letter-spacing: 10px; color: #f0c75e; margin-bottom: 14px; }

.wait-card { text-align: center; padding: 30px; }

.palm-cta { max-width: 760px; margin: 30px auto 0; }

.cta-inner {
    text-align: center;
    padding: 34px 28px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(48, 26, 90, 0.55), rgba(14, 8, 30, 0.85));
    border: 1px solid rgba(240, 199, 94, 0.35);
    box-shadow: 0 0 60px rgba(168, 85, 247, 0.16);
}

.cta-glyphs { font-size: 20px; letter-spacing: 12px; color: #f0c75e; margin-bottom: 10px; }
.palm-cta .btn-magic, .notfound-wrap .btn-magic { margin-top: 16px; }

/* ── Модалка полного фото с зумом ───────────────────────────────── */

.photo-modal { flex-direction: column; }

.photo-stage {
    position: relative;
    width: min(860px, 92vw);
    height: min(72vh, 700px);
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 18px;
    background: radial-gradient(circle at 50% 40%, rgba(38, 22, 70, 0.5), rgba(7, 4, 15, 0.92));
    border: 1px solid rgba(240, 199, 94, 0.3);
    box-shadow: 0 0 70px rgba(168, 85, 247, 0.2);
    cursor: grab;
    touch-action: none;
}

.photo-stage:active { cursor: grabbing; }

#photoFull {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    transform-origin: center center;
    transition: transform .18s ease-out;
    user-select: none;
    -webkit-user-drag: none;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}

.photo-hud {
    margin-top: 12px;
    width: min(860px, 92vw);
    display: flex;
    align-items: center;
    gap: 14px;
}

.photo-caption { color: #ffe9a8; font-weight: 700; }
.photo-hint { flex: 1; text-align: center; font-size: 12px; }
.photo-hud .modal-close { position: static; }

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

@media (max-width: 640px) {
    .field-row { grid-template-columns: 1fr; }
    .section-card { padding: 20px 16px; }
    .cabinet-hello { flex-direction: column; }
    .hello-link { flex-basis: auto; width: 100%; }
    .palm-orbit { height: 360px; }
    .palm-answer-card { padding: 20px 16px; }
    .photo-stage { height: 60vh; }
    .auth-wrap { padding: 26px 18px; }
}

/* Орбита ладоней: пропорции колец */
.palm-orbit { height: 470px; }
.palm-orbit .orbit-center { width: 150px; }
@media (max-width: 640px) { .palm-orbit { height: 400px; } }

/* ═══════════════════════════════════════════════════════════════
   Этап 5. Око судьбы — центральная планета palm.php.
   Веко открывается и закрывается (цикл 7.2s), в момент открытия
   из глаза вспыхивают лучи во все стороны, вокруг всё медленно
   вращается. Все слои синхронизированы одной длительностью.
   ═══════════════════════════════════════════════════════════════ */

.palm-center.eye-planet {
    overflow: visible;                    /* лучи выходят за круг планеты */
    background: transparent;
    box-shadow: none;
    cursor: default;
}

/* мягкое световое кольцо вокруг сферы */
.eye-planet::before {
    content: '';
    position: absolute;
    inset: -7%;
    border-radius: 50%;
    border: 1px solid rgba(240, 199, 94, 0.28);
    box-shadow: 0 0 34px rgba(168, 85, 247, 0.35), inset 0 0 22px rgba(240, 199, 94, 0.12);
    pointer-events: none;
}

/* ── лучи ──────────────────────────────────────────────────────── */
.eye-rays {
    position: absolute;
    inset: -42%;
    animation: eyeSpin 46s linear infinite;
    pointer-events: none;
}

.eye-burst {
    position: absolute;
    inset: 0;
    animation: eyeBurst 7.2s ease-in-out infinite;
}

.eye-burst i {
    position: absolute;
    left: calc(50% - 2.5px);
    bottom: 50%;
    width: 5px;
    height: 46%;
    transform-origin: 50% 100%;
    transform: rotate(var(--a, 0deg));
    background: linear-gradient(0deg, rgba(240, 199, 94, 0.95), rgba(240, 199, 94, 0.35) 55%, rgba(240, 199, 94, 0) 92%);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    filter: drop-shadow(0 0 6px rgba(240, 199, 94, 0.55));
}

.eye-burst i:nth-child(odd)  { height: 46%; }
.eye-burst i:nth-child(even) { height: 31%; width: 3.5px; opacity: .8; }

/* ── сфера планеты ─────────────────────────────────────────────── */
.eye-sphere {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    overflow: hidden;                     /* веко обрезается по кругу */
    background:
        radial-gradient(circle at 32% 26%, #8d6bff 0%, #5a3cc0 26%, #2c1d78 55%, #150d3e 78%, #0c0724 100%);
    box-shadow:
        0 0 0 1px rgba(240, 199, 94, 0.35),
        0 0 46px rgba(168, 85, 247, 0.5),
        0 0 130px rgba(240, 199, 94, 0.22),
        inset 0 -26px 60px rgba(0, 0, 0, 0.75);
    animation: eyeGlow 7.2s ease-in-out infinite;
}

/* сферическая светотень */
.eye-shine {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 32%),
        radial-gradient(circle at 72% 84%, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 46%);
    pointer-events: none;
    z-index: 4;
}

/* ── глаз ──────────────────────────────────────────────────────── */
.eye-ball {
    position: absolute;
    inset: 13% 11%;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 48%, #fff7e2 0%, #ffe3a1 30%, #e9b95f 52%, #b47f36 74%, #6d4a1c 100%);
    box-shadow: inset 0 0 22px rgba(60, 30, 5, 0.6), 0 0 18px rgba(240, 199, 94, 0.35);
    overflow: hidden;
    z-index: 1;
}

.eye-iris {
    position: absolute;
    inset: 16%;
    border-radius: 50%;
    background:
        radial-gradient(circle at 42% 36%, #cdb6ff 0%, #9a76ff 26%, #5d3cd6 52%, #241358 78%, #0e0726 100%);
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.8), inset 0 0 10px rgba(0, 0, 0, 0.55);
    animation: eyeDrift 9.5s ease-in-out infinite alternate;
}

.eye-pupil {
    position: absolute;
    inset: 27%;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 38%, #2a1648 0%, #0a0416 62%, #030109 100%);
    animation: eyePupil 7.2s ease-in-out infinite;
}

.eye-glint {
    position: absolute;
    top: 14%;
    left: 22%;
    width: 20%;
    height: 20%;
    border-radius: 50%;
    background: #ffffff;
    opacity: 0.92;
    filter: blur(1px);
}

/* ── веки ──────────────────────────────────────────────────────── */
.eye-lid {
    position: absolute;
    left: -2%;
    right: -2%;
    height: 54%;
    background: linear-gradient(180deg, #2b1a5e 0%, #1a0f40 55%, #120a30 100%);
    z-index: 3;
}

.eye-lid.top {
    top: -2%;
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.55);
    animation: eyeLidTop 7.2s ease-in-out infinite;
}

.eye-lid.bottom {
    bottom: -2%;
    border-radius: 100% 100% 0 0 / 100% 100% 0 0;
    box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.55);
    animation: eyeLidBottom 7.2s ease-in-out infinite;
}

/* ресницы-штрих на верхнем веке */
.eye-lid.top::after {
    content: '';
    position: absolute;
    left: 18%;
    right: 18%;
    bottom: 3px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, rgba(240, 199, 94, 0.75), transparent);
}

/* ── анимации ──────────────────────────────────────────────────── */
@keyframes eyeLidTop {
    0%   { transform: scaleY(1); }
    10%  { transform: scaleY(0.05); }
    64%  { transform: scaleY(0.05); }
    76%  { transform: scaleY(1); }
    100% { transform: scaleY(1); }
}

@keyframes eyeLidBottom {
    0%   { transform: scaleY(1); }
    10%  { transform: scaleY(0.05); }
    64%  { transform: scaleY(0.05); }
    76%  { transform: scaleY(1); }
    100% { transform: scaleY(1); }
}

@keyframes eyeBurst {
    0%   { transform: scale(0.5); opacity: 0.25; }
    12%  { transform: scale(1.1); opacity: 1; }
    22%  { transform: scale(1);   opacity: 0.85; }
    64%  { transform: scale(1.04); opacity: 0.8; }
    78%  { transform: scale(0.55); opacity: 0.2; }
    100% { transform: scale(0.5); opacity: 0.25; }
}

@keyframes eyeSpin {
    to { transform: rotate(360deg); }
}

@keyframes eyeGlow {
    0%   { filter: brightness(0.72) saturate(0.9); }
    14%  { filter: brightness(1.22) saturate(1.08); }
    64%  { filter: brightness(1.12); }
    80%  { filter: brightness(0.78); }
    100% { filter: brightness(0.72) saturate(0.9); }
}

@keyframes eyeDrift {
    0%   { transform: translate(-6%, -4%); }
    45%  { transform: translate(5%, 3%); }
    100% { transform: translate(-4%, 6%); }
}

@keyframes eyePupil {
    0%   { transform: scale(1.12); }
    14%  { transform: scale(0.86); }
    64%  { transform: scale(0.9); }
    80%  { transform: scale(1.14); }
    100% { transform: scale(1.12); }
}

/* глаз открыт и неподвижен, если анимации отключены */
@media (prefers-reduced-motion: reduce) {
    .eye-rays, .eye-burst, .eye-lid, .eye-iris, .eye-pupil, .eye-sphere { animation: none !important; }
    .eye-lid.top, .eye-lid.bottom { transform: scaleY(0.05); }
    .eye-rays { opacity: 0.5; }
}

/* ── Статистика оплат в кабинете ────────────────────────────────── */

.pay-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 6px 0 16px;
}

.pay-chip {
    flex: 1 1 140px;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 11px 15px;
    border-radius: 13px;
    background: linear-gradient(160deg, rgba(27, 16, 56, 0.65), rgba(12, 7, 30, 0.75));
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.pay-chip span {
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #9a8fb8;
}

.pay-chip b {
    font-size: 19px;
    color: #efe6ff;
    font-variant-numeric: tabular-nums;
}

.pay-chip.gold {
    border-color: rgba(240, 199, 94, 0.45);
    box-shadow: 0 0 16px rgba(240, 199, 94, 0.12);
}
.pay-chip.gold b { color: #ffe9a8; }

.pay-chip.wait {
    border-color: rgba(255, 157, 0, 0.45);
}
.pay-chip.wait b { color: #ffc97a; }

/* ── Готовый QR-код (картинка из банка) в модалке оплаты ───────── */

.qr-box.qr-box-img { width: min(300px, 100%); }
.qr-box .qr-img-real {
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
}

.qr-meta > div { display: flex; align-items: center; gap: 8px; }
.qr-meta b { float: none; margin-left: auto; text-align: right; word-break: break-word; }
.copy-btn {
    flex: none;
    background: transparent;
    color: #ffe9a8;
    border: 1px solid rgba(240, 199, 94, 0.4);
    border-radius: 8px;
    font-size: 11px;
    padding: 3px 8px;
    cursor: pointer;
}
.copy-btn:hover { background: rgba(240, 199, 94, 0.12); }


/* ── Оценка ответа (👍 / 👎) и дополнительный вопрос ───────────── */

.at-dot {
    display: inline-block;
    width: 8px; height: 8px;
    margin-left: 7px;
    border-radius: 50%;
    background: #f0c75e;
    box-shadow: 0 0 8px rgba(240, 199, 94, .9);
    animation: ratePulse 1.6s ease-in-out infinite;
}
@keyframes ratePulse { 50% { opacity: .35; } }

.rate-banner {
    margin: 0 auto 16px;
    max-width: 720px;
    padding: 10px 14px;
    border-radius: 12px;
    text-align: center;
    font-size: 14px;
    color: #ffe9a8;
    background: rgba(240, 199, 94, .1);
    border: 1px solid rgba(240, 199, 94, .4);
}

.pa-rate {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px dashed rgba(240, 199, 94, .3);
    text-align: center;
}
.pa-rate-title { font-size: 17px; color: #ffe9a8; margin-bottom: 12px; }
.pa-req {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    font-size: 11px;
    border-radius: 999px;
    color: #ffc97a;
    border: 1px solid rgba(255, 201, 122, .5);
    vertical-align: middle;
}
.pa-rate-btns { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.rate-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 12px 22px;
    font: inherit; font-size: 16px;
    color: #f3edff;
    background: rgba(10, 5, 24, .6);
    border: 1px solid rgba(240, 199, 94, .35);
    border-radius: 14px;
    cursor: pointer;
    transition: transform .15s, border-color .15s, background .15s;
}
.rate-btn .rate-ico { font-size: 26px; line-height: 1; }
.rate-btn:hover:not(:disabled) { transform: translateY(-2px); }
.rate-btn.up:hover:not(:disabled)   { border-color: #4ade80; background: rgba(74, 222, 128, .12); }
.rate-btn.down:hover:not(:disabled) { border-color: #f87171; background: rgba(248, 113, 113, .12); }
.rate-btn:disabled { opacity: .6; cursor: default; }
.pa-rate-hint { font-size: 12px; margin-top: 10px; }
.pa-rate-done { font-size: 15px; color: #cbbfe6; margin-bottom: 6px; }

.pa-fu-form { margin-top: 14px; text-align: left; }
.pa-fu-form[hidden] { display: none; }
.pa-fu-form label { display: block; margin-bottom: 8px; font-size: 14px; color: #ffe9a8; }
.pa-fu-form textarea {
    width: 100%;
    padding: 10px 12px;
    font: inherit;
    color: #f3edff;
    background: rgba(10, 5, 24, .7);
    border: 1px solid rgba(240, 199, 94, .3);
    border-radius: 12px;
    resize: vertical;
    margin-bottom: 10px;
}
.pa-fu-form .btn-magic { display: inline-block; }

.pa-followup {
    margin-top: 22px;
    padding: 16px;
    border-radius: 14px;
    background: rgba(10, 5, 24, .45);
    border: 1px solid rgba(240, 199, 94, .22);
}
.pa-fu-title { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #ffc97a; margin-bottom: 8px; }

.st-answered { background: rgba(45, 212, 191, .13); color: #99f6e4; border-color: rgba(45, 212, 191, .45); }

/* ═══ v1.6: скриншот чека при оплате ═══ */
.qr-attach {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}
.qr-attach .muted { font-size: 12px; }

/* Файловый input скрыт визуально, но НЕ display:none — старые iOS Safari
   иначе не открывают диалог выбора; метка #receiptBtn открывает его нативно. */
.file-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* Метка ведёт себя как кнопка: без выделения текста, с курсором-рукой */
label#receiptBtn { cursor: pointer; -webkit-user-select: none; user-select: none; }
label#receiptBtn:focus-visible { outline: 2px solid rgba(240, 199, 94, .7); outline-offset: 2px; }
label#receiptBtn.btn-ghost:hover { transform: translateY(-1px); }
.receipt-preview {
    display: block;
    max-width: 180px;
    max-height: 130px;
    margin: 0 auto 12px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid rgba(240, 199, 94, 0.4);
    background: #0b0618;
}
.qr-actions-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ═══ v1.8: игра «Полёт к звёздам» — рекорды в кабинете ═══ */
.game-top-table {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 14px 0 18px;
}
.gt-row {
    display: grid;
    grid-template-columns: 30px 1fr auto auto;
    gap: 10px;
    align-items: baseline;
    padding: 9px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
    font-size: 14px;
}
.gt-row.me {
    background: rgba(240, 199, 94, 0.10);
    border-color: rgba(240, 199, 94, 0.35);
}
.gt-pos {
    color: #f0c75e;
    font-weight: 700;
    font-family: 'Philosopher', sans-serif;
}
.gt-row:first-child .gt-pos { text-shadow: 0 0 10px rgba(240, 199, 94, 0.7); }
.gt-name {
    color: #e8e2ff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gt-meta { color: #8f86b8; font-size: 12px; white-space: nowrap; }
.gt-score {
    color: #f0c75e;
    font-weight: 700;
    white-space: nowrap;
    font-family: 'Philosopher', sans-serif;
}
#gameCard .btn-magic { margin-top: 4px; display: inline-block; }

@media (max-width: 640px) {
    .gt-row { grid-template-columns: 24px 1fr auto; padding: 8px 10px; }
    .gt-meta { display: none; }
}

/* ═══ v1.13: карта личности в кабинете ═══════════════════════════ */
.pcard-stage {
    display: flex;
    justify-content: center;
    padding-top: 6px;
}
.pcard-frame {
    margin: 0;
    width: min(360px, 100%);
    border-radius: 16px;
    padding: 10px;
    background:
        radial-gradient(80% 50% at 50% 0%, rgba(240, 199, 94, 0.10), transparent 70%),
        linear-gradient(160deg, rgba(240, 199, 94, 0.22), rgba(168, 85, 247, 0.12) 45%, rgba(240, 199, 94, 0.18));
    border: 1px solid rgba(240, 199, 94, 0.35);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55), 0 0 26px rgba(240, 199, 94, 0.12);
}
.pcard-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    background: #05070f;
}
/* плейсхолдер, пока Оракул не загрузил саму карту (v1.15) */
.pcard-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 720 / 1000;
    border-radius: 10px;
    background:
        radial-gradient(120% 90% at 50% 0%, rgba(126, 87, 255, .35), transparent 60%),
        #05070f;
    border: 1px solid rgba(255, 255, 255, .08);
}
.pcard-placeholder-num {
    font-size: 72px;
    font-weight: 800;
    color: rgba(255, 255, 255, .88);
    text-shadow: 0 0 30px rgba(126, 87, 255, .9);
}
.pcard-caption {
    margin-top: 9px;
    text-align: center;
    font-family: 'Philosopher', serif;
    font-size: 15px;
    letter-spacing: 0.4px;
    color: #ffe9a8;
}
@media (max-width: 480px) {
    .pcard-frame { width: min(300px, 88%); padding: 7px; }
}

/* ═══════════════════════════════════════════════════════════════
   v1.15 · РУЛЕТКА СОВМЕСТИМОСТИ КАРТ ЛИЧНОСТИ
   ═══════════════════════════════════════════════════════════════ */
.compat-roulette {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px dashed rgba(255, 255, 255, .16);
    text-align: center;
}
.compat-title {
    margin: 0 0 6px;
    font-family: 'Philosopher', serif;
    font-size: 20px;
    letter-spacing: .04em;
    color: #ffe9a8;
}
.compat-hint { max-width: 52ch; margin: 0 auto 16px; }
.compat-slot {
    position: relative;
    width: min(230px, 64vw);
    aspect-ratio: 720 / 1000;
    margin: 0 auto;
    border-radius: 16px;
    perspective: 900px;
}
.compat-card {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, .18);
    background:
        radial-gradient(120% 90% at 50% 0%, rgba(126, 87, 255, .38), transparent 60%),
        radial-gradient(100% 80% at 50% 100%, rgba(0, 191, 255, .18), transparent 55%),
        #0b0f22;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .45), inset 0 0 0 4px rgba(255, 255, 255, .04);
    overflow: hidden;
    transition: transform .12s ease, filter .12s ease;
    transform-style: preserve-3d;
}
.compat-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.compat-card .compat-num {
    font-size: clamp(52px, 15vw, 76px);
    font-weight: 800;
    color: rgba(255, 255, 255, .88);
    text-shadow: 0 0 26px rgba(126, 87, 255, .85);
}
.compat-card.has-img .compat-num { display: none; }
.compat-card.is-flick {
    transform: rotateY(16deg) scale(.95);
    filter: blur(1.6px);
}
.compat-card.is-landed { animation: compatLand .5s cubic-bezier(.2, .9, .3, 1.18); }
@keyframes compatLand {
    0%   { transform: rotateY(12deg) scale(.94); filter: blur(2px); }
    55%  { transform: none; filter: none; }
    70%  { transform: scale(1.045); }
    100% { transform: scale(1); }
}
.compat-cardname {
    margin-top: 12px;
    min-height: 1.4em;
    font-size: 14px;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, .8);
}
.compat-result { margin-top: 14px; }
.compat-result.reveal { animation: compatReveal .45s ease both; }
@keyframes compatReveal {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}
.compat-badge {
    display: inline-block;
    padding: 7px 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .03em;
    border: 1px solid transparent;
}
.compat-badge.s-full {
    color: #67f5a1;
    background: rgba(52, 211, 153, .12);
    border-color: rgba(103, 245, 161, .42);
    box-shadow: 0 0 18px rgba(52, 211, 153, .16);
}
.compat-badge.s-partial {
    color: #ffd479;
    background: rgba(251, 191, 36, .1);
    border-color: rgba(255, 212, 121, .42);
    box-shadow: 0 0 18px rgba(251, 191, 36, .13);
}
.compat-badge.s-none {
    color: #ff8fa3;
    background: rgba(244, 63, 94, .1);
    border-color: rgba(255, 143, 163, .42);
    box-shadow: 0 0 18px rgba(244, 63, 94, .15);
}
.compat-names { margin: 12px 0 6px; font-size: 14px; color: rgba(255, 255, 255, .85); }
.compat-text {
    max-width: 60ch;
    margin: 0 auto;
    text-align: left;
    font-size: 15px;
    line-height: 1.65;
    color: rgba(255, 255, 255, .92);
}
.compat-text p { margin: 0 0 10px; }
.compat-text p:last-child { margin-bottom: 0; }
@media (max-width: 480px) {
    .compat-text { text-align: left; font-size: 14px; }
}

/* ── Ритуал дня (v1.16): чек-ин, серия, календарь ────────────────── */

.ritual-top {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: stretch;
    margin: 16px 0 18px;
}

.ritual-flame {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 16px;
    background: rgba(255, 154, 60, .08);
    border: 1px solid rgba(255, 170, 80, .32);
}

.ritual-flame-ico { font-size: 26px; filter: drop-shadow(0 0 8px rgba(255, 160, 60, .5)); }
.ritual-flame-num { font-size: 30px; font-weight: 700; color: #ffc37e; line-height: 1; }
.ritual-flame-cap { font-size: 12px; color: #9a8fb8; max-width: 64px; line-height: 1.3; }

.ritual-stat {
    flex: 1;
    min-width: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 16px;
    background: rgba(30, 18, 58, .45);
    border: 1px solid rgba(240, 199, 94, .16);
}

.ritual-stat b { font-size: 24px; color: #ffe9a8; line-height: 1.2; }
.ritual-stat span { font-size: 12px; color: #9a8fb8; }

.ritual-month { margin: 6px 0 4px; }

.ritual-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.ritual-dow {
    text-align: center;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #7f74a3;
    padding: 4px 0;
}

.ritual-day {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border-radius: 10px;
    font-size: 13px;
    color: #b9aed8;
    background: rgba(20, 12, 40, .5);
    border: 1px solid rgba(255, 255, 255, .05);
}

.ritual-day.empty { background: transparent; border: none; }
.ritual-day.idle { opacity: .55; }

.ritual-day.checked {
    color: #ffe9a8;
    font-weight: 700;
    background: rgba(240, 199, 94, .12);
    border-color: rgba(240, 199, 94, .35);
    box-shadow: inset 0 0 12px rgba(240, 199, 94, .12);
}

.ritual-day.today {
    border-color: #f0c75e;
    box-shadow: 0 0 14px rgba(240, 199, 94, .35);
}

.ritual-flame-mark {
    position: absolute;
    top: -5px;
    right: -2px;
    font-size: 11px;
    font-style: normal;
}

.ritual-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin: 16px 0 10px;
}

.ritual-actions .btn-magic.is-done {
    filter: none;
    opacity: .75;
    cursor: default;
}

.ritual-hint { margin: 0; font-size: 14px; }

.ritual-milestones {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.ritual-chip {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .14);
    color: #b9aed8;
    background: rgba(255, 255, 255, .03);
}

.ritual-chip.done {
    color: #67f5a1;
    border-color: rgba(103, 245, 161, .4);
    background: rgba(52, 211, 153, .1);
}

#ritualCard.is-lit { animation: ritualPulse 1.2s ease; }

@keyframes ritualPulse {
    0%   { box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
    35%  { box-shadow: 0 0 42px rgba(240, 199, 94, .35); }
    100% { box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
}

@media (max-width: 560px) {
    .ritual-top { gap: 8px; }
    .ritual-flame { flex: 1 1 100%; justify-content: center; }
    .ritual-day { min-height: 34px; font-size: 12px; }
}
