/* «Звёздная астролябия» — тот же мир, что у лаунчера (src/PW.Launcher): ночное небо цвета индиго, золото небесных
   колец, нефрит — успех, киноварь — ошибки и опасные действия. Шрифт: Unbounded (свой
   файл) — единственный шрифт сайта: и надписи, и текст. Внешних ресурсов нет — их запрещает CSP. */

/* Unbounded (SIL OFL, fonts/Unbounded-OFL.txt) — надписи и заголовки, как в лаунчере; свои файлы, внешние ресурсы запрещает CSP */
@font-face {
    font-family: "Unbounded";
    font-style: normal;
    font-weight: 300 900;
    font-display: swap;
    src: url("../fonts/unbounded-cyrillic-300-900.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Unbounded";
    font-style: normal;
    font-weight: 300 900;
    font-display: swap;
    src: url("../fonts/unbounded-latin-300-900.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --night-0: #03040a;
    --night-1: #090d20;
    --night-2: #121a3b;
    --indigo: #1b2450;
    --glass: rgba(10, 13, 28, .72);
    --glass-strong: rgba(11, 14, 30, .9);
    --glass-hover: rgba(20, 26, 54, .85);
    --field: rgba(5, 7, 16, .7);
    --line: rgba(255, 255, 255, .13);
    --line-soft: rgba(255, 255, 255, .07);
    --text: #eee8da;
    --text-strong: #fff8ea;
    --text-2: #c4c6d4;
    --muted: #9095ae;
    --faint: #6b7192;
    --gold: #e2be72;
    --gold-light: #f7e6b5;
    --gold-deep: #9b7434;
    --gold-line: rgba(226, 190, 114, .42);
    --gold-soft: rgba(226, 190, 114, .12);
    --jade: #6fe0b9;
    --jade-soft: rgba(111, 224, 185, .12);
    --cinnabar: #f0735b;
    --cinnabar-soft: rgba(240, 115, 91, .12);
    --azure: #8cb8ff;
    --gold-text: linear-gradient(180deg, #fffbef 0%, #f6dfa6 55%, #c99a4c 100%);
    --gold-fill: linear-gradient(180deg, #fff0c8 0%, #e6be6c 50%, #a9792f 100%);
    --gold-fill-hover: linear-gradient(180deg, #fff6dc 0%, #f0cb7e 50%, #b8873a 100%);
    --font-display: Unbounded, "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
    --font-heading: Unbounded, "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
    --font-ui: Unbounded, "Segoe UI", system-ui, sans-serif;
    --font-caps: Unbounded, "Segoe UI", system-ui, sans-serif;
    --font-glyph: SimSun, "Noto Serif SC", "Songti SC", serif;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 30px 60px -30px rgba(0, 0, 0, .8);
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --header-h: 68px;
}

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

html {
    color-scheme: dark;
    -webkit-text-size-adjust: 100%;
    scrollbar-color: rgba(255, 255, 255, .2) var(--night-0);
    scroll-padding-top: calc(var(--header-h) + 16px);
    /* Фон — у корня: звёзды (.sky) и туманности (body::before) лежат под содержимым, но над ним */
    background: linear-gradient(180deg, var(--night-0) 0%, var(--night-1) 40%, #0c1230 75%, var(--night-1) 100%) fixed var(--night-0);
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: transparent;
    color: var(--text);
    font: 340 15px/1.75 var(--font-ui);
    font-kerning: normal;
    caret-color: var(--gold);
    -webkit-tap-highlight-color: rgba(226, 190, 114, .18);
}

/* Небо: туманности — неподвижный слой, звёзды и искры рисует js/scene.js на холсте .sky */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(55% 40% at 22% 8%, rgba(58, 44, 120, .36), transparent 70%),
        radial-gradient(45% 38% at 82% 14%, rgba(30, 61, 134, .32), transparent 70%),
        radial-gradient(60% 34% at 70% 100%, rgba(31, 100, 112, .22), transparent 72%),
        radial-gradient(120% 22% at 40% 30%, rgba(122, 107, 216, .07), transparent 70%);
}
.sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

::selection { background: rgba(226, 190, 114, .32); color: #fffaf0; }

a { color: var(--gold-light); text-decoration: none; text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: #fff; text-decoration: underline; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 {
    margin: 0 0 .5em;
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.12;
    color: var(--text-strong);
    text-wrap: balance;
}
h1 { font-family: var(--font-display); font-size: clamp(1.9rem, 3.8vw, 2.8rem); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 1.4rem; letter-spacing: -.01em; }
h3 { font-size: 1.06rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
strong { font-weight: 650; color: var(--text-strong); }
code { font-family: inherit; font-size: .86em; padding: .1em .35em; border-radius: 4px; background: rgba(140, 184, 255, .1); color: var(--azure); }
svg { max-width: 100%; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 860px; }
@media (min-width: 720px) { .container { padding: 0 32px; } }

.muted { color: var(--muted); }
.num { font-family: var(--font-caps); font-variant-numeric: lining-nums tabular-nums; }
.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 8px 14px; border-radius: 8px; background: var(--gold); color: #241604; }
.skip-link:focus { top: 12px; }

/* Подписи капителью с разрядкой: «ЛЕТОПИСЬ МИРА» */
.kicker {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 10px;
    font-family: var(--font-caps);
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold);
}
.kicker::after {
    content: "";
    width: 64px;
    height: 1px;
    background: linear-gradient(90deg, var(--gold-line), transparent);
}
.gold-text {
    background: var(--gold-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- кнопки ---------- */

.btn {
    --btn-h: 44px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: var(--btn-h);
    padding: 0 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .05);
    color: var(--text);
    font: 600 .86rem/1 var(--font-ui);
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s, transform .15s var(--ease-out), box-shadow .3s;
    -webkit-user-select: none;
    user-select: none;
}
.btn:hover { text-decoration: none; background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold-light); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled] { opacity: .5; cursor: default; pointer-events: none; }
.btn .icon { width: 18px; height: 18px; flex: none; }
.btn-gold {
    border-color: #fff4d2;
    background: var(--gold-fill);
    color: #241604;
    box-shadow: 0 10px 30px -10px rgba(226, 190, 114, .6), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.btn-gold:hover { background: var(--gold-fill-hover); color: #241604; border-color: #fff; box-shadow: 0 14px 36px -10px rgba(226, 190, 114, .8), inset 0 1px 0 rgba(255, 255, 255, .6); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-danger { border-color: rgba(240, 115, 91, .45); color: #ffb3a4; background: var(--cinnabar-soft); }
.btn-danger:hover { border-color: var(--cinnabar); background: rgba(240, 115, 91, .2); color: #ffd3ca; }
.btn-sm { --btn-h: 36px; padding: 0 14px; border-radius: 10px; font-size: .86rem; }
.btn-lg { --btn-h: 56px; padding: 0 30px; border-radius: 14px; font-size: 1.05rem; }
.btn-block { display: flex; width: 100%; }

.link-btn {
    padding: 0;
    border: 0;
    background: none;
    color: var(--gold-light);
    font: inherit;
    cursor: pointer;
}
.link-btn:hover { color: #fff; text-decoration: underline; }
.link-danger { color: #ffb3a4; }

/* ---------- шапка ---------- */

/* Шапка без подложки, прямо на небе: не прилипает при прокрутке (текст не наезжает на содержимое),
   читаемость — светлый текст и мягкая тень под ним */
.site-header {
    position: relative;
    z-index: 50;
    text-shadow: 0 1px 14px rgba(3, 4, 10, .9), 0 0 2px rgba(3, 4, 10, .6);
}
.header-row { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text-strong); text-decoration: none; flex: none; }
.brand:hover { text-decoration: none; color: #fff; }
.emblem { width: 34px; height: 34px; flex: none; }
.emblem .spin { transform-box: view-box; transform-origin: 50% 50%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-size: 1rem; font-weight: 600; letter-spacing: -.01em; color: var(--gold-light); }
.brand-sub { font-family: var(--font-caps); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-top: 3px; }

.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav > a, .nav-link-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--text);
    font: 500 .86rem/1 var(--font-ui);
    text-decoration: none;
    cursor: pointer;
    transition: color .2s, background .2s;
}
.site-nav > a:hover, .nav-link-btn:hover { color: var(--text-strong); background: rgba(255, 255, 255, .07); text-decoration: none; }
.site-nav > a.active { color: var(--gold-light); }
.site-nav > a.active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 3px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.site-nav .btn { margin-left: 8px; }
.nav-form { margin: 0; }
.nav-user { padding-left: 6px !important; }

.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .04); cursor: pointer; }
.nav-toggle span { display: block; width: 18px; height: 1.6px; margin: 4px auto; border-radius: 2px; background: var(--text); transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .site-nav {
        text-shadow: none;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 12px 16px 18px;
        border-bottom: 1px solid var(--line-soft);
        background: rgba(5, 6, 14, .96);
        display: none;
    }
    .site-nav.open { display: flex; }
    .site-nav > a, .nav-link-btn { height: 46px; width: 100%; }
    .site-nav > a.active::after { left: 14px; right: auto; width: 40px; }
    .site-nav .btn { margin: 8px 0 0; }
}

/* ---------- аватары и значки ---------- */

.avatar {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1.5px solid transparent;
    background:
        radial-gradient(circle at 35% 30%, #2e2a4a, #0b0d1c) padding-box,
        linear-gradient(180deg, #fffbef, #c99a4c) border-box;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1;
    color: var(--gold-light);
}
.avatar-sm { width: 28px; height: 28px; font-size: .85rem; }
.avatar-lg { width: 76px; height: 76px; font-size: 2.1rem; }
.avatar-admin {
    background:
        radial-gradient(circle at 35% 30%, #5a1d14, #1d0906) padding-box,
        linear-gradient(180deg, #ffd3ca, #c0412b) border-box;
    color: #ffd3ca;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(255, 255, 255, .05);
    color: var(--text-2);
    font: 600 .6rem/1 var(--font-caps);
    letter-spacing: .06em;
    text-transform: uppercase;
    vertical-align: .15em;
    white-space: nowrap;
}
.badge-gold { border-color: var(--gold-line); background: var(--gold-soft); color: var(--gold-light); }
.badge-seal, .badge-danger { border-color: rgba(240, 115, 91, .45); background: var(--cinnabar-soft); color: #ffbfb1; }
.badge-jade { border-color: rgba(111, 224, 185, .45); background: var(--jade-soft); color: var(--jade); }

/* ---------- стекло, карточки, списки ---------- */

.card, .glass {
    position: relative;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background:
        linear-gradient(var(--glass), var(--glass)) padding-box,
        linear-gradient(135deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .05) 45%, rgba(226, 190, 114, .26)) border-box;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}
.card { padding: clamp(20px, 3vw, 32px); }
.card > h2:first-child, .card > h1:first-child { margin-top: 0; }

.page { padding-top: clamp(32px, 6vw, 64px); padding-bottom: 72px; }
.page-head { margin-bottom: 28px; }
.page-head h1 { margin-bottom: .2em; }
.page-head .lead { margin: 0; }
.page-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }

.lead { color: var(--text-2); font-size: 1rem; line-height: 1.7; }
.hint { margin: 6px 0 0; color: var(--faint); font-size: .86rem; }
.meta { color: var(--muted); font-size: .9rem; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; font-size: .9rem; color: var(--muted); }
.crumbs svg { width: 12px; height: 12px; color: var(--faint); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--gold-light); }

.empty {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 40px 24px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: rgba(10, 13, 28, .45);
    text-align: center;
    color: var(--text-2);
}
.empty p { margin: 0; }
.empty .constellation { width: 120px; height: 70px; margin-bottom: 6px; }

.alert { margin: 0 0 20px; padding: 13px 16px 13px 44px; border-radius: 12px; border: 1px solid var(--line); position: relative; }
.alert::before { content: ""; position: absolute; left: 16px; top: 16px; width: 14px; height: 14px; border-radius: 50%; border: 1.6px solid currentColor; }
.alert-ok { border-color: rgba(111, 224, 185, .4); background: var(--jade-soft); color: #c3f5e3; }
.alert-error { border-color: rgba(240, 115, 91, .45); background: var(--cinnabar-soft); color: #ffd0c6; }
.alert-info { border-color: rgba(140, 184, 255, .4); background: rgba(140, 184, 255, .1); color: #d3e3ff; }
.alert-error:empty, .validation-summary-valid { display: none; }
.alert ul { margin: 0; padding-left: 18px; }

.stats { margin: 0; display: grid; }
.stats > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.stats > div:last-child { border-bottom: 0; }
.stats dt { color: var(--text-2); }
.stats dd { margin: 0; text-align: right; font-family: var(--font-caps); font-weight: 600; font-variant-numeric: lining-nums tabular-nums; color: var(--text-strong); overflow-wrap: anywhere; }

/* Шаги «как начать»: звёзды на нити */
.steps { list-style: none; margin: 0 0 22px; padding: 0; counter-reset: step; display: grid; gap: 4px; }
.steps li { counter-increment: step; position: relative; display: flex; gap: 14px; padding: 10px 0; }
.steps li::before {
    content: counter(step);
    flex: none;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--gold-line);
    background: var(--gold-soft);
    font: 700 .9rem/1 var(--font-caps);
    color: var(--gold-light);
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 42px; bottom: -8px; width: 1px; background: linear-gradient(var(--gold-line), transparent); }
.steps li > span { padding-top: 4px; }

.check-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 30px; }
.check-list li::before { content: ""; position: absolute; left: 4px; top: .5em; width: 10px; height: 10px; transform: rotate(45deg); border: 1.5px solid var(--gold); border-radius: 2px; }

/* ---------- формы ---------- */

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; align-content: start; }
.field label { font-size: .9rem; color: var(--muted); }
input[type="text"], input[type="password"], input[type="email"], input:not([type]), textarea, select {
    width: 100%;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--field);
    color: var(--text-strong);
    font: 340 .95rem/1.5 var(--font-ui);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
textarea { min-height: 140px; resize: vertical; }
input:hover, textarea:hover { border-color: rgba(255, 255, 255, .24); }
input:focus, textarea:focus {
    outline: none;
    border-color: var(--gold-line);
    background: rgba(5, 7, 16, .9);
    box-shadow: 0 2px 0 -0px var(--gold), 0 0 0 4px rgba(226, 190, 114, .1);
}
input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--gold); }
.check { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); cursor: pointer; }
.field-error { color: #ffb3a4; font-size: .86rem; }
.field-error:empty { display: none; }
.input-validation-error { border-color: rgba(240, 115, 91, .6) !important; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.toolbar form { margin: 0; }

/* ---------- текст сообщений ---------- */

.prose { overflow-wrap: anywhere; }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }
.prose blockquote {
    margin: 0 0 1em;
    padding: 10px 16px;
    border-left: 2px solid var(--gold);
    border-radius: 0 10px 10px 0;
    background: var(--gold-soft);
    color: var(--text-2);
}
.prose blockquote p { margin: 0; }

/* ---------- главная: небесные врата ---------- */

.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: min(820px, calc(100svh - var(--header-h)));
    display: flex;
    align-items: center;
    padding: 48px 0 120px;
}
.hero-ridges { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 62%; z-index: -1; pointer-events: none; }
.hero-glow {
    position: absolute;
    z-index: -1;
    right: 4%;
    top: 4%;
    width: 760px;
    height: 760px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(226, 190, 114, .16), rgba(226, 190, 114, .05) 40%, transparent 68%);
    pointer-events: none;
}
.hero-row { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 32px; width: 100%; }
.hero-title {
    margin: 0 0 .14em;
    font-family: var(--font-display);
    font-size: clamp(2.7rem, 6.4vw, 5.6rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.03em;
    filter: drop-shadow(0 0 30px rgba(226, 190, 114, .28));
}
.hero-sub { max-width: 30em; margin: 0 0 30px; font-size: clamp(.98rem, 1.5vw, 1.12rem); line-height: 1.7; color: var(--text-2); }
.hero-lead { max-width: 34em; margin: 0 0 30px; color: var(--muted); font-size: 1.05rem; }

/* Астролябия: кольца — SVG (Astrolabe.cs), вращение — CSS; в центре — печать «Играть» */
.astro { position: relative; width: min(560px, 100%); aspect-ratio: 1; margin-left: auto; }
.astro svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.astro .ring { transform-box: view-box; transform-origin: 50% 50%; }
.astro .ring-ticks { animation: spin 160s linear infinite; }
.astro .ring-branches { animation: spin 110s linear infinite reverse; }
.astro .ring-trigrams { animation: spin 60s linear infinite; }
.astro .ring-rays { animation: spin 420s linear infinite; }
.astro .hoop-a { animation: hoop 9s ease-in-out infinite alternate; }
.astro .hoop-b { animation: hoop-b 13s ease-in-out infinite alternate; }
.astro .stroke, .auth-ring .stroke { stroke: var(--gold); fill: none; }
.astro .fill, .auth-ring .fill { fill: var(--gold); }
.astro .glyph, .auth-ring .glyph { fill: var(--gold); font-family: var(--font-glyph); font-size: 15px; }
.astro .trigram { fill: var(--gold); font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", sans-serif; font-size: 17px; } /* знаки колец — рисунок, не текст */
.astro .planet { fill: #fff3d2; filter: drop-shadow(0 0 6px #ffd98a); }
.astro .orbit { transform-box: view-box; transform-origin: 50% 50%; animation: spin 26s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes hoop { from { transform: rotate(-24deg) scaleY(.32); } to { transform: rotate(-24deg) scaleY(.96); } }
@keyframes hoop-b { from { transform: rotate(38deg) scaleY(.9); } to { transform: rotate(38deg) scaleY(.2); } }
.astro-halo {
    position: absolute;
    inset: -10%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(226, 190, 114, .26) 0%, rgba(226, 190, 114, .08) 34%, transparent 62%);
    animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(1.04); opacity: .8; } }

.orb {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 37%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 2px;
    border-radius: 50%;
    border: 2px solid #ffe9b0;
    background:
        radial-gradient(60% 34% at 50% 20%, rgba(255, 255, 255, .55), transparent 70%),
        radial-gradient(circle at 38% 28%, #fff6d8 0%, #ebc878 42%, #9c6e2c 100%);
    box-shadow: 0 0 0 10px rgba(226, 190, 114, .06), 0 0 60px 6px rgba(226, 190, 114, .45), inset 0 -8px 20px rgba(80, 50, 10, .35);
    color: #2a1903;
    text-decoration: none;
    transition: transform .35s var(--ease-out), box-shadow .35s;
}
.orb::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .2); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.orb:hover { transform: translate(-50%, -50%) scale(1.045); color: #2a1903; text-decoration: none; box-shadow: 0 0 0 14px rgba(226, 190, 114, .08), 0 0 90px 12px rgba(226, 190, 114, .6), inset 0 -8px 20px rgba(80, 50, 10, .35); }
.orb:active { transform: translate(-50%, -50%) scale(.97); }
.orb-mark { font-size: .55rem; opacity: .55; }
.orb-label { font-family: var(--font-display); font-size: clamp(1.05rem, 2.3vw, 1.6rem); font-weight: 800; letter-spacing: .02em; line-height: 1; }
.orb-caption { font-family: var(--font-caps); font-size: clamp(.5rem, .9vw, .6rem); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #5e4115; }
@media (max-width: 560px) { .orb-caption { font-size: .5rem; letter-spacing: .1em; } }

@media (max-width: 900px) {
    .hero { padding-top: 24px; padding-bottom: 96px; min-height: 0; }
    .hero-ridges { height: 34%; }
    .hero-title { font-size: clamp(2.5rem, 12vw, 3.8rem); }
    .hero-row { grid-template-columns: 1fr; }
    .astro { width: min(420px, 92%); margin: 10px auto 0; order: -1; }
    .hero-glow { right: 50%; transform: translateX(50%); width: 520px; height: 520px; }
}

/* Выход на сцену */
@media (prefers-reduced-motion: no-preference) {
    .reveal { animation: rise 1s var(--ease-out) both; }
    .reveal-1 { animation-delay: .1s; }
    .reveal-2 { animation-delay: .22s; }
    .reveal-3 { animation-delay: .34s; }
    .reveal-4 { animation-delay: .46s; }
    .astro { animation: astro-in 1.8s var(--ease-out) both; }
}
@media (prefers-reduced-motion: reduce) {
    .astro *, .astro-halo { animation: none !important; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes astro-in { from { opacity: 0; transform: scale(.86) rotate(-20deg); } }

/* ---------- полоса сервера и раскладка главной ---------- */

.stat-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: -64px;
    position: relative;
    z-index: 2;
}
.stat-strip > div { padding: 20px 24px; border-right: 1px solid var(--line-soft); }
.stat-strip > div:last-child { border-right: 0; }
.stat-value { display: block; font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; line-height: 1.1; color: var(--text-strong); font-variant-numeric: lining-nums; }
.stat-label { font-family: var(--font-caps); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 760px) {
    .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: -40px; }
    .stat-strip > div:nth-child(2) { border-right: 0; }
    .stat-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
}

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; padding-top: 56px; padding-bottom: 72px; }
.layout-plain { padding-top: clamp(32px, 6vw, 64px); }
@media (max-width: 1000px) { .layout { grid-template-columns: 1fr; } }

.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 22px; }
.section-head h1, .section-head h2 { margin: 0; }

/* Летопись: карточки новостей с датой, как в лаунчере */
.news-list { display: grid; gap: 14px; }
.news-item {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 20px;
    padding: 20px 22px;
    transition: transform .3s var(--ease-out), border-color .3s;
}
.news-item:hover { transform: translateX(4px); }
.news-date { display: grid; align-content: start; justify-items: center; padding-right: 18px; border-right: 1px solid var(--gold-line); }
.news-day { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; line-height: 1; font-variant-numeric: lining-nums; background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.news-month { margin-top: 4px; font-family: var(--font-caps); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.news-year { font-family: var(--font-caps); font-size: .7rem; color: var(--faint); }
.news-main h3 { margin: 0 0 6px; font-size: 1.12rem; line-height: 1.3; }
.news-main h3 a { color: var(--text-strong); }
.news-main h3 a:hover { color: var(--gold-light); text-decoration: none; }
.news-excerpt { margin: 10px 0 12px; color: var(--text-2); }
.news-item-lead { padding: 28px 30px; }
.news-item-lead h3 { font-size: 1.45rem; }
.news-item-lead .news-day { font-size: 2.5rem; }
.more { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .92rem; }
.more svg { width: 16px; height: 16px; transition: transform .25s var(--ease-out); }
.more:hover { text-decoration: none; }
.more:hover svg { transform: translateX(4px); }

.sidebar { display: grid; gap: 18px; }
.sidebar .card { padding: 24px; }
.sidebar h3 { font-size: 1.15rem; margin-bottom: 14px; }
.latest { list-style: none; margin: 0; padding: 0; display: grid; }
.latest li { display: grid; gap: 2px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.latest li:last-child { border-bottom: 0; }
.latest a { color: var(--text-strong); font-weight: 550; }
.latest a:hover { color: var(--gold-light); }
.latest .muted { font-size: .85rem; }

/* ---------- статья ---------- */

.article h1 { margin-bottom: .3em; }
.article .meta { margin-bottom: 26px; padding-bottom: 18px; border-bottom: 1px solid var(--line-soft); }
.article .prose { font-size: 1.06rem; line-height: 1.75; }
.article .toolbar { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; color: var(--muted); }
.back-link svg { width: 16px; height: 16px; }

/* ---------- форум ---------- */

.board { display: grid; gap: 12px; }
.board-row {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 90px 100px minmax(0, 260px);
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    transition: transform .3s var(--ease-out);
}
.board-row:hover { transform: translateX(4px); }
.board-sigil {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid var(--gold-line);
    background: radial-gradient(circle at 35% 30%, rgba(226, 190, 114, .2), rgba(226, 190, 114, .03) 70%);
    font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", sans-serif;
    font-size: 1.6rem;
    color: var(--gold-light);
}
.board-sigil-official { border-color: rgba(240, 115, 91, .5); background: radial-gradient(circle at 35% 30%, rgba(240, 115, 91, .22), rgba(240, 115, 91, .03) 70%); color: #ffc7ba; }
.board-link { font-family: var(--font-heading); font-size: 1.02rem; font-weight: 600; color: var(--text-strong); }
.board-link:hover { color: var(--gold-light); text-decoration: none; }
.board-title p { margin: 3px 0 0; font-size: .92rem; }
.board-num { text-align: center; }
.board-num strong { display: block; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.1; font-variant-numeric: lining-nums; }
.board-num span { font-family: var(--font-caps); font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.board-last { display: grid; gap: 2px; min-width: 0; padding-left: 18px; border-left: 1px solid var(--line-soft); font-size: .9rem; }
.board-last a { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-last a:hover { color: var(--gold-light); }
.board-last .muted { font-size: .82rem; }

.board-topics .board-row { grid-template-columns: 44px minmax(0, 1fr) 90px minmax(0, 220px); padding: 14px 20px; }
.topic-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--muted); }
.topic-icon svg { width: 20px; height: 20px; }
.board-row-pinned { box-shadow: inset 3px 0 0 var(--gold), var(--shadow); }
.board-row-pinned .topic-icon { border-color: var(--gold-line); color: var(--gold-light); background: var(--gold-soft); }
.board-topics .board-link { font-family: var(--font-ui); font-size: 1.04rem; }
.board-topics .board-title p { font-size: .85rem; }
.topic-flags { display: inline-flex; gap: 6px; margin-right: 6px; }

@media (max-width: 860px) {
    .board-row, .board-topics .board-row { grid-template-columns: 48px minmax(0, 1fr); gap: 12px 16px; }
    .board-sigil { width: 48px; height: 48px; font-size: 1.3rem; }
    .board-num, .board-last { grid-column: 2; text-align: left; padding-left: 0; border-left: 0; }
    .board-num { display: flex; align-items: baseline; gap: 8px; }
    .board-num strong { display: inline; font-size: 1.1rem; }
}

/* Тема: сообщения */
.posts { display: grid; gap: 16px; margin-bottom: 20px; }
.post { display: grid; grid-template-columns: 190px minmax(0, 1fr); padding: 0; overflow: hidden; }
.post-author { display: grid; justify-items: center; align-content: start; gap: 10px; padding: 24px 16px; border-right: 1px solid var(--line-soft); background: rgba(255, 255, 255, .02); text-align: center; }
.post-author .avatar { width: 64px; height: 64px; font-size: 1.7rem; }
.post-author-info { display: grid; justify-items: center; gap: 6px; }
.post-author-name { font-weight: 650; color: var(--text-strong); overflow-wrap: anywhere; }
.post-author-count { font-size: .82rem; }
.post-main { display: flex; flex-direction: column; min-width: 0; padding: 18px 26px 16px; }
.post-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); font-size: .86rem; }
.post-time { font-family: var(--font-caps); color: var(--muted); }
.post-body { flex: 1; font-size: 1rem; line-height: 1.7; }
.post-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px; margin-top: 16px; font-size: .88rem; }
.post-actions form { margin: 0; }
.post-first { box-shadow: inset 0 3px 0 var(--gold-line), var(--shadow); }
.reply-form h2 { font-size: 1.3rem; }
@media (max-width: 720px) {
    .post { grid-template-columns: 1fr; }
    .post-author { grid-auto-flow: column; justify-content: start; justify-items: start; align-items: center; padding: 14px 18px; border-right: 0; border-bottom: 1px solid var(--line-soft); text-align: left; }
    .post-author .avatar { width: 42px; height: 42px; font-size: 1.15rem; }
    .post-author-info { justify-items: start; grid-auto-flow: column; align-items: center; }
    .post-main { padding: 16px 18px; }
}

/* ---------- скачать ---------- */

.download-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: center; margin-bottom: 40px; }
.download-hero h1 { font-size: clamp(2.1rem, 4.2vw, 3.3rem); }
.download-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0 0; font-family: var(--font-caps); font-size: .85rem; }
.download-astro { width: min(440px, 100%); margin-inline: auto; }
.download-astro .orb-label { font-size: clamp(.95rem, 1.7vw, 1.2rem); }
.orb-off, .orb-off:hover { cursor: default; filter: saturate(.35) brightness(.8); transform: translate(-50%, -50%); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 900px) {
    .download-hero, .two-col { grid-template-columns: 1fr; }
}

/* ---------- вход и регистрация ---------- */

/* Карточка целиком в первом экране: по центру между шапкой и низом окна */
.auth { position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; min-height: calc(100svh - 96px); padding: 24px 16px 48px; }
/* Вход и регистрация — горизонтально: слева приветствие, справа форма */
.auth-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    width: min(940px, 100%);
    padding: 0;
    overflow: hidden;
}
.auth-side {
    display: flex;
    flex-direction: column;
    padding: 34px 36px 26px;
    border-right: 1px solid var(--line-soft);
    background: radial-gradient(90% 70% at 20% 10%, rgba(226, 190, 114, .12), transparent 70%);
}
.auth-side .emblem { width: 44px; height: 44px; margin-bottom: 14px; }
.auth-side h1 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); margin-bottom: .3em; }
.auth-side > .muted { margin-bottom: 16px; font-size: .92rem; line-height: 1.6; }
.auth-perks { margin: 0 0 18px; font-size: .92rem; }
.auth-perks.steps li { padding: 6px 0; }
.auth-perks.steps li:not(:last-child)::after { top: 36px; bottom: -6px; }
.auth-form { align-content: center; gap: 14px; padding: 32px 36px; }
.auth-form input { padding-block: 10px; }
.auth-form .hint { margin-top: 2px; font-size: .78rem; }
.auth-note { display: grid; justify-items: start; gap: 12px; }
.auth-note h2 { margin: 0; font-size: 1.25rem; }
.auth-note p { margin: 0; }
.form-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.form-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; font-size: .9rem; }
.security-next { margin-top: 28px; }
.auth-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: .86rem; }
.auth-foot p { margin: 0 0 6px; }
@media (max-width: 820px) {
    .auth-card { grid-template-columns: minmax(0, 1fr); }
    .auth { min-height: 0; }
    .auth-side { border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 26px 22px 20px; }
    .auth-form { padding: 24px 22px 28px; }
    .auth-perks { display: none; }
    .auth-foot { margin-top: 0; }
}
@media (max-width: 560px) { .form-pair { grid-template-columns: minmax(0, 1fr); } }
.auth-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: -1;
    width: 1100px;
    height: 1100px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: .4;
}
.auth-ring .ring { transform-box: view-box; transform-origin: 50% 50%; animation: spin 140s linear infinite; }

/* ---------- кабинет ---------- */

.cabinet { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 18px; align-items: start; }
.cabinet .profile { grid-row: span 2; }
.cabinet .characters { grid-column: 2; }
.profile-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.profile-head h2 { margin: 0 0 6px; font-size: 1.35rem; }
.profile-admin { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.char { padding: 18px; border: 1px solid var(--line-soft); border-radius: 14px; background: rgba(255, 255, 255, .03); transition: border-color .25s, transform .3s var(--ease-out); }
.char:hover { border-color: var(--gold-line); transform: translateY(-2px); }
.char-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.char-head h3 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .98rem; }
.char-head p { margin: 0; font-size: .86rem; }
.char-class { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--gold-line); background: var(--gold-soft); font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--gold-light); }
.char-gender { width: 15px; height: 15px; color: var(--muted); }
.char-stats { margin: 0; display: grid; gap: 4px; font-size: .88rem; }
.char-stats > div { display: flex; justify-content: space-between; }
.char-stats dt { color: var(--muted); }
.char-stats dd { margin: 0; font-family: var(--font-caps); color: var(--text-strong); }
@media (max-width: 960px) {
    .cabinet { grid-template-columns: 1fr; }
    .cabinet .profile { grid-row: auto; }
    .cabinet .characters { grid-column: auto; }
}

/* ---------- таблица (пользователи) ---------- */

.table-wrap { overflow-x: auto; padding: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { padding: 14px 16px; text-align: left; font-family: var(--font-caps); font-size: .62rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(255, 255, 255, .03); }
.table td:first-child { font-family: var(--font-caps); color: var(--muted); }
.row-banned td { opacity: .55; }
.table-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 14px; }
.table-actions form { margin: 0; }

/* ---------- страницы ошибок ---------- */

.status { position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; padding: clamp(40px, 9vw, 110px) 16px 90px; text-align: center; }
.status-card { width: min(560px, 100%); padding: 44px 36px; }
.status-code { margin: 0; font-variant-numeric: lining-nums; font-family: var(--font-display); font-size: clamp(4rem, 12vw, 6.6rem); font-weight: 700; line-height: 1; background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 30px rgba(226, 190, 114, .3)); }
.status-card h1 { font-size: 1.6rem; margin: 10px 0 8px; }
.status-card .muted { margin-bottom: 26px; }

/* ---------- страницы ---------- */

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 28px; }
.pager a, .pager span {
    display: grid;
    place-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    background: rgba(10, 13, 26, .6);
    font-family: var(--font-caps);
    color: var(--text-2);
}
.pager a:hover { border-color: var(--gold-line); color: var(--gold-light); text-decoration: none; }
.pager svg { width: 16px; height: 16px; }
.pager .pager-current { border-color: #fff4d2; background: var(--gold-fill); color: #241604; font-weight: 700; }
.pager .pager-gap { border: 0; background: none; }

/* ---------- подвал ---------- */

.site-main { flex: 1; }
.site-footer { position: relative; margin-top: auto; border-top: 1px solid var(--line-soft); background: linear-gradient(180deg, rgba(5, 6, 14, .4), rgba(3, 4, 10, .92)); }
.site-footer::before { content: ""; position: absolute; left: 50%; top: -1px; width: min(520px, 70%); height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.footer-row { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 32px; padding-top: 44px; padding-bottom: 28px; }
.footer-brand { display: flex; gap: 14px; }
.footer-brand .emblem { width: 40px; height: 40px; }
.footer-name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; color: var(--gold-light); margin-bottom: 4px; }
.footer-brand p { margin: 0; color: var(--faint); font-size: .88rem; max-width: 30em; }
.footer-col h4 { margin: 0 0 12px; font-family: var(--font-caps); font-size: .64rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.footer-col a { display: block; padding: 4px 0; color: var(--text-2); font-size: .94rem; }
.footer-col a:hover { color: var(--gold-light); }
.footer-base { padding-top: 16px; padding-bottom: 26px; border-top: 1px solid var(--line-soft); color: var(--faint); font-size: .82rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
@media (max-width: 760px) { .footer-row { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
