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

body {
    background: #0a0a12 radial-gradient(ellipse at 50% -20%, #1b1030 0%, #0a0a12 60%);
    color: #e8e6f0;
    font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: #b48cff; }
.hidden { display: none !important; }

.top {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 5%;
}
.logo { font-size: 22px; font-weight: 800; text-decoration: none; color: #ffb347; }
.top nav a { margin-left: 18px; text-decoration: none; }
.top nav .soon { opacity: .45; pointer-events: none; }

main { flex: 1; }

.hero { max-width: 720px; margin: 0 auto; padding: 6vh 20px 40px; text-align: center; }
.hero h1 { font-size: clamp(28px, 5vw, 46px); line-height: 1.15; }
.sub { color: #a49fc0; margin: 16px 0 30px; font-size: 17px; }

.burn-box { text-align: left; }
textarea {
    width: 100%; resize: vertical; min-height: 160px;
    background: #14101f; color: #f3f0ff; border: 1px solid #33284f;
    border-radius: 14px; padding: 16px; font-size: 16px; line-height: 1.5;
    outline: none; transition: border-color .2s;
}
textarea:focus { border-color: #ff7a3d; }
.counter { text-align: right; color: #6f6890; font-size: 13px; margin-top: 6px; }

.recipient {
    margin: 18px 0; background: #120e1d; border: 1px solid #2a2140;
    border-radius: 12px; padding: 14px 16px;
}
.recipient summary { cursor: pointer; color: #b48cff; }
.recipient .hint { font-size: 13px; color: #8d86ad; margin: 10px 0; }
.recipient input {
    width: 100%; margin-top: 8px; padding: 11px 14px; font-size: 15px;
    background: #0d0a16; color: #eee; border: 1px solid #33284f; border-radius: 10px;
}

.sky-toggle { display: block; margin: 14px 0; font-size: 14px; color: #b6b0d0; }
.sky-toggle input { margin-right: 8px; transform: scale(1.2); }

#burn-btn {
    width: 100%; margin-top: 10px; padding: 18px; font-size: 20px; font-weight: 800;
    color: #1a0d02; background: linear-gradient(135deg, #ff9a3d, #ff4d00);
    border: none; border-radius: 14px; cursor: pointer;
    box-shadow: 0 0 34px rgba(255, 90, 0, .35); transition: transform .15s;
}
#burn-btn:hover { transform: scale(1.02); }
#burn-btn:disabled { opacity: .5; cursor: wait; }

.error { color: #ff8080; margin-top: 12px; font-size: 14px; }
.total { margin-top: 26px; color: #8d86ad; }

/* Ритуал */
.ritual { position: fixed; inset: 0; background: #05040a; z-index: 50; }
.ritual canvas { width: 100%; height: 100%; display: block; }
.ritual-result {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center;
    padding: 24px; animation: fadein 1.2s ease;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.phrase { font-size: clamp(20px, 3.4vw, 30px); max-width: 640px; line-height: 1.4; }
.ritual-actions { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.ritual-actions button, .btn-link {
    padding: 13px 26px; border-radius: 12px; font-size: 16px; cursor: pointer;
    border: 1px solid #4a3a70; background: #171126; color: #e8e6f0; text-decoration: none;
}
.ritual-actions button:hover, .btn-link:hover { border-color: #ff7a3d; }
.lk-teaser { margin-top: 40px; font-size: 13px; color: #6f6890; max-width: 460px; }
.ritual-achievements { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.ritual-ach {
    background: #1a1226; border: 1px solid #ffb347; border-radius: 12px;
    padding: 10px 18px; font-size: 15px; animation: fadein 1s ease;
}

/* Небо */
.sky-hero { text-align: center; padding: 30px 20px 6px; }
.sky-wrap { position: relative; height: 62vh; margin: 0 3%; }
#sky-canvas { width: 100%; height: 100%; }
.star-popup {
    position: absolute; max-width: 340px; background: #171126f0;
    border: 1px solid #4a3a70; border-radius: 12px; padding: 14px 16px;
    font-size: 14px; pointer-events: none; z-index: 5;
}
.star-date { color: #6f6890; font-size: 12px; margin-top: 8px; }
.center { text-align: center; margin: 18px 0 40px; }

/* Прочее */
.legal { max-width: 720px; margin: 0 auto; padding: 40px 20px; }
.legal h1 { margin-bottom: 14px; }
.legal h2 { margin: 26px 0 10px; font-size: 20px; }
.legal li { margin: 6px 0 6px 22px; }
.legal p { margin: 8px 0; line-height: 1.55; }

footer {
    padding: 22px 5%; text-align: center; color: #6f6890; font-size: 13px;
    border-top: 1px solid #1c1630;
}
footer div { margin: 4px 0; }

.cookie {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    background: #171126; border-top: 1px solid #4a3a70; padding: 14px 5%;
    display: flex; gap: 16px; align-items: center; justify-content: center;
    font-size: 13px; flex-wrap: wrap;
}
.cookie button {
    padding: 9px 20px; border-radius: 10px; border: none; cursor: pointer;
    background: #ff7a3d; color: #1a0d02; font-weight: 700;
}

/* Вход и ЛК */
.auth-box { max-width: 420px; margin: 0 auto; text-align: center; }
.auth-tg { margin-bottom: 8px; }
.auth-tg .hint { margin-top: 8px; font-size: 13px; color: #8d86ad; }
.auth-sep { margin: 18px 0; color: #6f6890; font-size: 13px; }
.auth-phone input {
    width: 100%; margin-top: 10px; padding: 13px 16px; font-size: 15px;
    background: #14101f; color: #eee; border: 1px solid #33284f; border-radius: 12px;
}
.auth-phone button {
    width: 100%; margin-top: 12px; padding: 14px; font-size: 16px; font-weight: 700;
    color: #1a0d02; background: linear-gradient(135deg, #ff9a3d, #ff4d00);
    border: none; border-radius: 12px; cursor: pointer;
}
.auth-phone .hint { margin-top: 10px; font-size: 13px; color: #ffb347; }

.lk { max-width: 760px; margin: 0 auto; padding: 30px 20px 50px; }
.lk h2 { margin: 34px 0 14px; font-size: 20px; }
.lk-head { display: flex; justify-content: space-between; align-items: center; }
.lk-logout { font-size: 13px; color: #8d86ad; }
.lk-stats { display: flex; gap: 14px; margin: 22px 0; flex-wrap: wrap; }
.lk-stat {
    flex: 1; min-width: 140px; background: #120e1d; border: 1px solid #2a2140;
    border-radius: 14px; padding: 18px; text-align: center;
}
.lk-stat-num { font-size: 30px; font-weight: 800; color: #ffb347; }
.lk-stat-num span { font-size: 15px; color: #6f6890; }
.lk-stat-label { color: #a49fc0; font-size: 13px; margin-top: 4px; }
.lk-stat-hint { color: #6f6890; font-size: 12px; margin-top: 6px; }
.lk-notice {
    background: #1a1226; border: 1px solid #4a3a70; border-radius: 12px;
    padding: 14px 18px; font-size: 14px;
}
.lk-warning {
    background: #1a1226; border: 1px solid #6b3a3a; border-radius: 12px;
    padding: 14px 18px; font-size: 14px; color: #d8b8b8;
}
.lk-warning-actions { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.lk-warning-actions button {
    padding: 10px 18px; border-radius: 10px; cursor: pointer; font-size: 14px;
    border: 1px solid #4a3a70; background: #171126; color: #e8e6f0;
}
.lk-warning-actions .danger { border-color: #a33; color: #ff9090; }
.lk-burn {
    background: #120e1d; border: 1px solid #2a2140; border-radius: 12px;
    padding: 14px 18px; margin-bottom: 10px; transition: opacity .4s;
}
.lk-burn-text { font-size: 14px; line-height: 1.5; }
.lk-burn-meta { color: #6f6890; font-size: 12px; margin-top: 8px; }
.lk-hide-btn {
    background: none; border: none; color: #b48cff; cursor: pointer; font-size: 12px;
    padding: 0; margin-left: 6px;
}
.lk-ach { display: flex; flex-wrap: wrap; gap: 10px; }
.lk-ach-item {
    background: #120e1d; border: 1px solid #2a2140; border-radius: 10px;
    padding: 10px 14px; font-size: 13px;
}
.lk-ach-item.locked { opacity: .35; filter: grayscale(1); }
