/* =====================================================================
   Malgarus — тёмное фэнтези, современная подача
   Палитра: ночь + янтарное золото + тлеющие угли. Шрифты: Cinzel (знак),
   Cormorant (заголовки, кириллица), Manrope (текст и интерфейс).
   ===================================================================== */
:root {
    --bg: #0a090d;
    --bg-2: #100e14;
    --surface: rgba(255, 255, 255, .035);
    --surface-2: rgba(255, 255, 255, .06);
    --panel: #15121a;
    --panel-2: #1b1720;
    --line: rgba(255, 255, 255, .08);
    --line-2: rgba(255, 255, 255, .14);
    --gold: #e2b357;
    --gold-l: #f4d999;
    --gold-d: #8f6d2b;
    --ember: #e0603e;
    --ember-d: #a8331f;
    --ink: #ede7dc;
    --ink-2: #c9c1b3;
    --muted: #958c7e;
    --crimson: #a8331f;
    --crimson-l: #e0603e;
    --emerald: #5fd39a;
    --sapphire: #7fb4e6;
    --danger: #ff7a66;
    --parch: #f3e7c8;
    --parch-2: #e8d6a8;
    --parch-ink: #3a2717;
    --rubric: #7a200d;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 24px 60px -20px rgba(0, 0, 0, .7);
    --glow: 0 0 0 1px rgba(226, 179, 87, .35), 0 10px 40px -10px rgba(226, 179, 87, .35);
    --f-display: 'Cinzel', 'Cormorant', Georgia, serif;
    --f-head: 'Cormorant', 'Cormorant Garamond', Georgia, serif;
    --f-body: 'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --topbar-h: 68px;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body {
    margin: 0;
    background:
        radial-gradient(1100px 700px at 85% -10%, rgba(224, 96, 62, .10), transparent 60%),
        radial-gradient(900px 600px at -10% 20%, rgba(226, 179, 87, .06), transparent 60%),
        var(--bg);
    color: var(--ink);
    font: 400 16px/1.65 var(--f-body);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--gold-l); text-decoration: none; transition: color .2s; }
a:hover { color: #fff1cc; }
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 700; color: #fbf3e2; line-height: 1.1; margin: 0 0 .5em; letter-spacing: .005em; }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
code { font-size: .88em; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }
::selection { background: rgba(226, 179, 87, .35); color: #fff; }
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.inline { display: inline; margin: 0; }
.mt { margin-top: 1.5rem; }
.mb0 { margin-bottom: 0; }
.gold-text {
    background: linear-gradient(180deg, #fff3cf 0%, #f0cd7a 45%, #c48a2c 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font: 700 .76rem/1 var(--f-body); letter-spacing: .22em; text-transform: uppercase; color: var(--gold);
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: currentColor; opacity: .7; }

/* ------------------------------------------------------------ шапка */
.topbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(10, 9, 13, .55);
    backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid transparent;
    transition: background .3s, border-color .3s;
}
.topbar.scrolled, body:not(.has-hero) .topbar { background: rgba(10, 9, 13, .85); border-color: var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 24px; min-height: var(--topbar-h); }
.brand { display: flex; align-items: center; gap: 10px; font: 700 1.3rem/1 var(--f-display); color: var(--gold-l); letter-spacing: .08em; }
.brand:hover { color: #fff1cc; }
.brand-d20 { width: 32px; height: 32px; fill: rgba(224, 96, 62, .22); stroke: var(--gold); stroke-width: 4; stroke-linejoin: round; transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.brand-d20 polyline { fill: none; stroke-width: 2.5; opacity: .7; }
.brand:hover .brand-d20 { transform: rotate(120deg); }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a, .link-btn {
    font: 600 .92rem/1 var(--f-body); color: var(--ink-2);
    padding: 10px 12px; border-radius: 999px; background: none; border: 0; cursor: pointer; white-space: nowrap;
    transition: color .2s, background .2s;
}
.nav a:hover, .link-btn:hover { color: #fff; background: var(--surface-2); }
.nav a.active { color: var(--gold-l); background: rgba(226, 179, 87, .1); }
.nav-sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 8px; }
.nav-user { color: var(--gold-l) !important; }
.nav a.nav-hot { color: var(--gold-l); position: relative; padding-left: 26px; }
.nav a.nav-hot::before {
    content: ''; position: absolute; left: 12px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%;
    background: var(--ember); box-shadow: 0 0 0 0 rgba(224, 96, 62, .6); animation: ping 2s infinite;
}
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(224, 96, 62, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 96, 62, 0); } }
.nav a.btn { padding: 10px 18px; margin-left: 6px; color: #1c1408; }
.nav a.btn-crimson { background: linear-gradient(135deg, #f6d68f 0%, #e2b357 45%, #d07b3a 100%); }
.nav a.btn-crimson:hover { color: #120c04; background: linear-gradient(135deg, #fbe2a8 0%, #ecc06a 45%, #dc8946 100%); }
.nav-toggle, .nav-burger { display: none; }

/* ------------------------------------------------------------ кнопки */
.btn {
    --b: var(--line-2);
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font: 700 .95rem/1 var(--f-body); letter-spacing: .01em;
    padding: 14px 24px; border-radius: 999px; cursor: pointer;
    color: var(--ink); background: var(--surface-2);
    border: 1px solid var(--b);
    transition: transform .18s, box-shadow .25s, border-color .2s, background .2s, color .2s;
}
.btn:hover { color: #fff; border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .09); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible, .input:focus-visible, .chip input:focus-visible + span, .nav a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn-crimson, .btn-primary {
    color: #1c1408; border-color: transparent;
    background: linear-gradient(135deg, #f6d68f 0%, #e2b357 45%, #d07b3a 100%);
    box-shadow: 0 8px 30px -8px rgba(226, 150, 70, .6), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.btn-crimson:hover, .btn-primary:hover { color: #120c04; background: linear-gradient(135deg, #fbe2a8 0%, #ecc06a 45%, #dc8946 100%); box-shadow: 0 12px 36px -8px rgba(226, 150, 70, .75), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-gold { color: #1c1408; border-color: transparent; background: linear-gradient(180deg, #f3d48a, #c99a3e); }
.btn-gold:hover { color: #120c04; background: linear-gradient(180deg, #f8dea0, #d6a84a); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 9px 15px; font-size: .84rem; }
.btn-lg { padding: 18px 30px; font-size: 1.02rem; }
.btn-danger { color: #ffd2c9; background: rgba(224, 96, 62, .12); border-color: rgba(224, 96, 62, .4); }
.btn-danger:hover { background: rgba(224, 96, 62, .22); border-color: var(--ember); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ------------------------------------------------------------ hero */
.hero {
    position: relative; overflow: hidden; isolation: isolate;
    margin-top: calc(-1 * var(--topbar-h));
    min-height: min(100svh, 980px); display: flex; align-items: center;
    padding: calc(var(--topbar-h) + 60px) 0 90px;
}
.hero-bg { position: absolute; inset: 0; z-index: -3; background: center 60% / cover no-repeat; transform: scale(1.06); animation: heroZoom 30s ease-out forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero::before {
    content: ''; position: absolute; inset: 0; z-index: -2;
    background:
        linear-gradient(90deg, rgba(10, 9, 13, .94) 0%, rgba(10, 9, 13, .78) 38%, rgba(10, 9, 13, .25) 75%, rgba(10, 9, 13, .35) 100%),
        linear-gradient(180deg, rgba(10, 9, 13, .6) 0%, transparent 25%, transparent 60%, var(--bg) 100%);
}
.hero-embers { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-embers i {
    position: absolute; bottom: -10px; width: 3px; height: 3px; border-radius: 50%;
    background: #ffc067; box-shadow: 0 0 10px 2px rgba(255, 130, 50, .7);
    animation: ember linear infinite;
}
@keyframes ember {
    0% { transform: translate(0, 0); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translate(60px, -100vh); opacity: 0; }
}
.hero-content { position: relative; max-width: 700px; }
.hero-kicker { margin-bottom: 22px; }
.hero-title {
    font: 800 clamp(3.2rem, 9vw, 6.4rem)/0.95 var(--f-display); letter-spacing: .04em; margin: 0 0 22px;
    background: linear-gradient(180deg, #fff6d8 0%, #f2cf7c 50%, #b9802a 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 10px 40px rgba(226, 179, 87, .25));
}
.hero-title.ru { font-family: var(--f-head); font-weight: 700; letter-spacing: 0; line-height: 1; font-size: clamp(2.8rem, 7vw, 5.2rem); }
.hero-sub { font-size: clamp(1.05rem, 1.8vw, 1.22rem); color: var(--ink-2); max-width: 600px; margin: 0 0 34px; }
.hero-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.server-pill {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 9px 16px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(10, 9, 13, .5);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    font-size: .88rem; color: var(--ink-2);
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: #777; display: inline-block; flex: none; }
.dot.on { background: var(--emerald); box-shadow: 0 0 10px var(--emerald); animation: pulse 2s infinite; }
.dot.off { background: var(--ember); }
@keyframes pulse { 50% { box-shadow: 0 0 2px var(--emerald); } }
.scroll-hint {
    position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
    width: 24px; height: 38px; border: 1.5px solid var(--line-2); border-radius: 14px;
}
.scroll-hint::after { content: ''; position: absolute; left: 50%; top: 8px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--gold); animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ------------------------------------------------------------ секции */
.section { padding: clamp(70px, 10vw, 120px) 0; position: relative; }
.section-alt { background: linear-gradient(180deg, rgba(255, 255, 255, .018), rgba(255, 255, 255, 0)); border-block: 1px solid var(--line); }
.section-title { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-title h2 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); margin: 14px 0 14px; }
.section-title p { color: var(--muted); font-size: 1.06rem; margin: 0 auto; }
.section-title.left { text-align: left; margin-left: 0; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }

/* ------------------------------------------------------------ карточки */
.card {
    position: relative; padding: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
    border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.card h3 { font-size: 1.5rem; }
.card-icon {
    width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.5rem; line-height: 1; margin-bottom: 18px;
    border-radius: 14px; background: linear-gradient(135deg, rgba(226, 179, 87, .22), rgba(224, 96, 62, .12));
    border: 1px solid rgba(226, 179, 87, .3);
}
.feature p { color: var(--muted); margin: 0; }
.hover-lift { transition: transform .3s cubic-bezier(.2, .8, .2, 1), border-color .3s, box-shadow .3s; }
.hover-lift:hover { transform: translateY(-4px); border-color: rgba(226, 179, 87, .35); box-shadow: var(--shadow), 0 0 0 1px rgba(226, 179, 87, .12); }

.race-card, .class-card { transition: transform .3s cubic-bezier(.2, .8, .2, 1), border-color .3s; }
.race-card:hover, .class-card:hover { transform: translateY(-4px); border-color: rgba(226, 179, 87, .35); }
.race-card h3, .class-card h3 { margin-bottom: 8px; }
.race-card .tag { white-space: normal; line-height: 1.35; }
.tag {
    display: inline-flex; align-items: center; gap: 6px; font: 600 .78rem/1 var(--f-body);
    padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--gold-l);
    background: rgba(0, 0, 0, .25); margin: 0 6px 10px 0; white-space: nowrap;
}
.tag-green { color: var(--emerald); border-color: rgba(95, 211, 154, .35); background: rgba(95, 211, 154, .07); }
.tag-red { color: #ff9b8c; border-color: rgba(255, 120, 100, .35); background: rgba(255, 120, 100, .07); }
.tag-blue { color: var(--sapphire); border-color: rgba(127, 180, 230, .35); background: rgba(127, 180, 230, .07); }
.tag-gold { color: var(--gold-l); border-color: rgba(226, 179, 87, .4); background: rgba(226, 179, 87, .08); }
.class-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.class-head h3 { margin: 0; }
.class-icon { width: 44px; height: 44px; display: grid; place-items: center; font-size: 1.25rem; border: 1px solid rgba(226, 179, 87, .3); border-radius: 12px; background: linear-gradient(135deg, rgba(226, 179, 87, .18), rgba(224, 96, 62, .1)); }

.steps { counter-reset: step; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); }
.step { padding-left: 82px; }
.step::before {
    counter-increment: step; content: counter(step, decimal-leading-zero);
    position: absolute; left: 26px; top: 28px; width: 40px; height: 40px; display: grid; place-items: center;
    font: 800 .9rem/1 var(--f-body); color: #1c1408; border-radius: 12px;
    background: linear-gradient(135deg, #f6d68f, #d08a3a);
}
.step h3 { font-size: 1.35rem; }
.step p { margin: 0; color: var(--muted); }

.stats-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; text-align: center; }
.stat-num { font: 700 clamp(2.2rem, 4vw, 3rem)/1.05 var(--f-head); color: var(--gold-l); }
.stat-label { color: var(--muted); font-size: .92rem; }

/* ------------------------------------------------------------ витрина (скриншоты) */
.showcase { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.shot {
    position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line);
    background: var(--panel); min-height: 300px; isolation: isolate; box-shadow: var(--shadow);
}
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.shot::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 9, 13, 0) 15%, rgba(10, 9, 13, .55) 45%, rgba(10, 9, 13, .94) 78%, rgba(10, 9, 13, .98) 100%); }
.shot:hover img { transform: scale(1.04); }
.shot-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px; }
.shot-body h3 { font-size: 1.6rem; margin-bottom: 6px; }
.shot-body p { color: var(--ink-2); margin: 0; max-width: 520px; font-size: .95rem; }
.span-7 { grid-column: span 7; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; }
.span-4 { grid-column: span 4; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.shot.tall { min-height: 420px; }

/* ------------------------------------------------------------ баннер набора */
.recruit {
    position: relative; overflow: hidden; isolation: isolate;
    display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
    padding: clamp(28px, 5vw, 56px); border-radius: 22px;
    border: 1px solid rgba(226, 179, 87, .3);
    background:
        radial-gradient(600px 300px at 0% 0%, rgba(226, 179, 87, .18), transparent 70%),
        radial-gradient(500px 300px at 100% 100%, rgba(224, 96, 62, .18), transparent 70%),
        linear-gradient(180deg, #17131b, #110e14);
    box-shadow: var(--shadow);
}
.recruit h2 { font-size: clamp(2rem, 4vw, 3rem); margin: 14px 0 14px; }
.recruit p { color: var(--ink-2); }
.recruit-art { position: relative; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-2); transform: rotate(1.5deg); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); }
.recruit-art img { width: 100%; height: 100%; object-fit: cover; }
.recruit-art .tag { position: absolute; left: 14px; top: 14px; margin: 0; background: rgba(10, 9, 13, .7); backdrop-filter: blur(6px); }

/* ------------------------------------------------------------ страница тестеров */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fact { padding: 22px 24px; background: rgba(16, 14, 20, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.fact b { display: block; font: 700 1.3rem/1.2 var(--f-head); color: #fbf3e2; margin-top: 6px; }
.fact span { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }

.path { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; margin-top: 10px; }
.path::before { content: ''; position: absolute; left: 10%; right: 10%; top: 27px; height: 2px; background: linear-gradient(90deg, var(--gold-d), var(--gold), var(--ember)); opacity: .6; }
.path-step { text-align: center; padding: 0 10px; position: relative; }
.path-step .node {
    width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; font-size: 1.35rem;
    background: var(--panel-2); border: 1px solid rgba(226, 179, 87, .45); box-shadow: 0 0 0 6px var(--bg), 0 0 30px -6px rgba(226, 179, 87, .5);
}
.path-step h4 { font-size: 1.3rem; margin-bottom: 6px; }
.path-step p { color: var(--muted); font-size: .9rem; margin: 0; }

.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.check-list li { position: relative; padding-left: 34px; color: var(--ink-2); }
.check-list li::before {
    content: ''; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 7px;
    background: rgba(95, 211, 154, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235fd39a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
    border: 1px solid rgba(95, 211, 154, .35);
}
.check-list.gold li::before {
    background: rgba(226, 179, 87, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f4d999'%3E%3Cpath d='M12 2l2.9 6.6 7.1.6-5.4 4.7 1.6 7L12 17.3 5.8 21l1.6-7L2 9.2l7.1-.6z'/%3E%3C/svg%3E") center / 13px no-repeat;
    border-color: rgba(226, 179, 87, .4);
}
.check-list b { color: #fbf3e2; }

.faq { display: grid; gap: 12px; max-width: 860px; margin: 0 auto; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); transition: border-color .2s, background .2s; }
.faq details[open] { border-color: rgba(226, 179, 87, .3); background: rgba(226, 179, 87, .04); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 56px 20px 22px; position: relative; font-weight: 700; color: #fbf3e2; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font: 400 1.6rem/1 var(--f-body); color: var(--gold); transition: transform .25s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 22px 20px; margin: 0; color: var(--ink-2); }

/* форма заявки */
.apply { display: grid; grid-template-columns: 380px 1fr; gap: 28px; align-items: start; }
.apply-aside { position: sticky; top: calc(var(--topbar-h) + 20px); }
.apply-aside h2 { font-size: clamp(2rem, 3.6vw, 2.8rem); margin: 14px 0; }
.apply-form { padding: clamp(22px, 4vw, 40px); }
.form-section + .form-section { margin-top: 30px; padding-top: 28px; border-top: 1px solid var(--line); }
.form-section > h3 { font: 700 .78rem/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
.req { color: var(--ember); margin-left: 2px; }
.hint { display: block; font-size: .82rem; color: var(--muted); margin-top: 6px; }
.field-error { display: block; font-size: .84rem; color: var(--danger); margin-top: 6px; }
.has-error .input { border-color: rgba(255, 122, 102, .6); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px; border-radius: 999px;
    border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: .9rem; font-weight: 500;
    transition: border-color .2s, background .2s, color .2s;
}
.chip:hover span { border-color: rgba(255, 255, 255, .3); color: #fff; }
.chip input:checked + span { border-color: var(--gold); background: rgba(226, 179, 87, .14); color: var(--gold-l); }
.chip input:checked + span::before { content: '✓'; font-weight: 800; }
.choice-list { display: grid; gap: 10px; }
.choice-list .chip span { width: 100%; border-radius: var(--radius-sm); padding: 14px 16px; }
.counter { float: right; font-size: .8rem; color: var(--muted); }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.success-card { text-align: center; padding: clamp(32px, 6vw, 64px); }
.success-seal {
    width: 88px; height: 88px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center; font-size: 2.2rem;
    background: radial-gradient(circle at 35% 30%, #f6d68f, #c9842f 70%); color: #2a1606; box-shadow: 0 0 0 8px rgba(226, 179, 87, .12), 0 20px 50px -10px rgba(226, 150, 70, .6);
}
.closed-note { border: 1px dashed rgba(226, 179, 87, .4); }

/* ------------------------------------------------------------ новости */
.scroll {
    position: relative; padding: 28px 30px; border-radius: var(--radius);
    border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
    transition: border-color .3s;
}
.scroll:hover { border-color: rgba(226, 179, 87, .3); }
.scroll h3 { font-size: 1.65rem; }
.scroll .date { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.scroll p { white-space: pre-line; color: var(--ink-2); }
.news-list { display: grid; gap: 18px; max-width: 860px; margin: 0 auto; }

/* ------------------------------------------------------------ стат-блок D&D (персонаж) */
.statblock {
    position: relative; color: var(--parch-ink); padding: 20px 22px 18px; border-radius: 6px;
    background:
        radial-gradient(ellipse at 15% 0%, rgba(255, 255, 255, .5), transparent 45%),
        linear-gradient(180deg, #f6ebcd, #ead7a6);
    box-shadow: var(--shadow);
    border-top: 5px solid #c9852a; border-bottom: 5px solid #c9852a;
    font-size: .95rem;
}
.statblock h3 { color: var(--rubric); font-size: 1.75rem; margin: 0; font-family: var(--f-head); }
.statblock .sb-sub { font-style: italic; margin: 0 0 6px; }
.tapered { height: 5px; margin: 8px 0; background: linear-gradient(90deg, var(--rubric), var(--rubric) 60%, transparent); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.sb-line { margin: 2px 0; color: var(--rubric); }
.sb-line b { color: var(--rubric); }
.sb-line span { color: var(--parch-ink); }
.abilities { display: grid; grid-template-columns: repeat(6, 1fr); text-align: center; margin: 6px 0; }
.abilities b { display: block; color: var(--rubric); font-family: var(--f-head); }
.abilities span { font-size: .9rem; }
.sb-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.statblock .btn { color: var(--rubric); border-color: rgba(122, 32, 13, .35); background: rgba(122, 32, 13, .06); }
.badge-online { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #1f6b33; }

/* ------------------------------------------------------------ формы */
.auth-wrap { min-height: calc(100vh - var(--topbar-h) - 200px); display: grid; place-items: center; padding: 60px 16px; }
.auth-card { width: min(460px, 100%); padding: 36px; }
.auth-card h1 { text-align: center; font-size: 2.4rem; }
.form-row { margin-bottom: 18px; }
.form-row > label, .form-label { display: block; font-size: .88rem; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.input, select.input, textarea.input {
    width: 100%; padding: 13px 15px; font: inherit; font-size: .97rem; color: var(--ink);
    background: rgba(0, 0, 0, .35); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder { color: #6f685d; }
.input:hover { border-color: rgba(255, 255, 255, .22); }
.input:focus { outline: none; border-color: var(--gold); background: rgba(0, 0, 0, .45); box-shadow: 0 0 0 4px rgba(226, 179, 87, .14); }
select.input {
    appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e2b357' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
select.input option { background: #16131a; color: var(--ink); }
textarea.input { min-height: 150px; resize: vertical; line-height: 1.55; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; color: var(--ink-2); cursor: pointer; }
.check input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--gold); }
.form-foot { text-align: center; margin-top: 18px; color: var(--muted); }
.divider { display: flex; align-items: center; gap: 14px; color: var(--gold-d); margin: 24px 0; font-size: .8rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); }

/* ------------------------------------------------------------ flash */
.flashes { margin-top: 18px; display: grid; gap: 10px; }
.flash { padding: 14px 18px; border-radius: var(--radius-sm); border: 1px solid; font-size: .95rem; font-weight: 500; }
.flash-success { background: rgba(95, 211, 154, .08); border-color: rgba(95, 211, 154, .4); color: #b9f0d2; }
.flash-error { background: rgba(224, 96, 62, .1); border-color: rgba(224, 96, 62, .45); color: #ffc8bc; }
.flash-info { background: rgba(226, 179, 87, .07); border-color: rgba(226, 179, 87, .35); color: var(--gold-l); }

/* ------------------------------------------------------------ кабинет */
.page-head { padding: 56px 0 30px; }
.page-head h1 { font-size: clamp(2.2rem, 4.4vw, 3.2rem); margin: 0 0 8px; }
.cabinet { display: grid; grid-template-columns: 320px 1fr; gap: 26px; align-items: start; padding-bottom: 80px; }
.profile-crest {
    width: 88px; height: 88px; margin: 0 auto 14px; display: grid; place-items: center;
    font: 700 2.2rem/1 var(--f-display); color: #1c1408; border-radius: 24px;
    background: linear-gradient(135deg, #f6d68f, #d08a3a); box-shadow: 0 16px 40px -12px rgba(226, 150, 70, .6);
}
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.role-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; border: 1px solid rgba(226, 179, 87, .4); color: var(--gold-l); background: rgba(226, 179, 87, .08); }
.role-admin { border-color: rgba(224, 96, 62, .5); color: #ffab98; background: rgba(224, 96, 62, .08); }
.role-moderator { border-color: rgba(127, 180, 230, .45); color: var(--sapphire); background: rgba(127, 180, 230, .08); }
.heroes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 26px; }
.empty-slot { display: grid; place-items: center; text-align: center; min-height: 220px; border: 1.5px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); padding: 20px; }
.tabs { display: flex; gap: 6px; padding: 5px; margin-bottom: 24px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); width: fit-content; max-width: 100%; }
.tabs a { font-size: .9rem; font-weight: 600; padding: 9px 18px; color: var(--muted); border-radius: 999px; }
.tabs a:hover { color: #fff; }
.tabs a.active { color: #1c1408; background: linear-gradient(135deg, #f6d68f, #dca050); }

/* ------------------------------------------------------------ таблицы */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: rgba(255, 255, 255, .02); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.actions form { margin: 0; }

/* ------------------------------------------------------------ админка */
.admin { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - var(--topbar-h)); }
.admin-side { background: rgba(255, 255, 255, .015); border-right: 1px solid var(--line); padding: 26px 12px; }
.admin-side h4 { font: 700 .7rem/1 var(--f-body); letter-spacing: .2em; color: var(--muted); padding: 0 12px; margin: 20px 0 10px; }
.admin-side a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--radius-sm); font-size: .93rem; font-weight: 600; color: var(--ink-2); }
.admin-side a:hover { background: var(--surface-2); color: #fff; }
.admin-side a.active { color: var(--gold-l); background: rgba(226, 179, 87, .1); }
.admin-side .count { margin-left: auto; min-width: 22px; padding: 2px 7px; border-radius: 999px; background: var(--ember); color: #fff; font-size: .74rem; text-align: center; }
.admin-main { padding: 36px clamp(16px, 3vw, 44px) 80px; min-width: 0; }
.admin-main h1 { font-size: 2.4rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 26px; }
.kpi { padding: 22px; }
.kpi .stat-num { font-size: 2.4rem; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar .input { width: auto; flex: 1; min-width: 200px; }
.app-details { display: grid; gap: 16px; }
.app-quote { white-space: pre-line; padding: 16px 18px; border-left: 3px solid var(--gold); background: rgba(226, 179, 87, .05); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-2); }

/* ------------------------------------------------------------ подвал */
.footer { border-top: 1px solid var(--line); background: #08070a; padding: 56px 0 26px; margin-top: auto; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-brand { font: 700 1.5rem/1 var(--f-display); color: var(--gold-l); letter-spacing: .08em; margin-bottom: 14px; }
.footer h4 { font: 700 .74rem/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.footer-links { display: grid; gap: 10px; font-size: .94rem; }
.footer-links a { color: var(--ink-2); }
.footer-links a:hover { color: var(--gold-l); }
.footer-copy { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); font-size: .8rem; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ------------------------------------------------------------ появление при прокрутке */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; } .reveal-d2 { transition-delay: .16s; } .reveal-d3 { transition-delay: .24s; }
.no-js .reveal { opacity: 1; transform: none; }

/* ------------------------------------------------------------ адаптив */
@media (max-width: 1080px) {
    .nav a, .link-btn { padding: 10px 9px; font-size: .88rem; }
    .apply { grid-template-columns: 1fr; }
    .apply-aside { position: static; }
}
@media (max-width: 980px) {
    .nav-burger { display: grid; gap: 5px; margin-left: auto; cursor: pointer; padding: 10px; border-radius: 10px; }
    .nav-burger span { width: 22px; height: 2px; border-radius: 2px; background: var(--gold-l); transition: transform .25s, opacity .25s; }
    .nav-toggle:checked + .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle:checked + .nav-burger span:nth-child(2) { opacity: 0; }
    .nav-toggle:checked + .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .nav {
        display: none; position: absolute; top: var(--topbar-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 4px;
        background: rgba(10, 9, 13, .97); border-bottom: 1px solid var(--line); padding: 12px 16px 18px;
    }
    .nav a, .link-btn { padding: 13px 14px; font-size: 1rem; border-radius: 12px; text-align: left; }
    .nav a.nav-hot { padding-left: 32px; }
    .nav a.nav-hot::before { left: 15px; }
    .nav a.btn { margin: 6px 0 0; justify-content: center; }
    .nav-toggle:checked ~ .nav { display: flex; }
    .nav-sep { display: none; }
    .topbar:has(.nav-toggle:checked) { background: rgba(10, 9, 13, .97); }
    .cabinet { grid-template-columns: 1fr; }
    .admin { grid-template-columns: 1fr; }
    .admin-side { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
    .admin-side h4 { display: none; }
    .recruit { grid-template-columns: 1fr; }
    .recruit-art { transform: none; }
    .showcase > * { grid-column: span 12; }
    .facts { grid-template-columns: 1fr 1fr; }
    .path { grid-template-columns: 1fr; gap: 22px; }
    .path::before { left: 27px; right: auto; top: 10px; bottom: 10px; width: 2px; height: auto; background: linear-gradient(180deg, var(--gold-d), var(--gold), var(--ember)); }
    .path-step { display: grid; grid-template-columns: 56px 1fr; gap: 0 18px; text-align: left; padding: 0; }
    .path-step .node { grid-row: span 2; margin: 0; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-inner > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    body { font-size: 15px; }
    .hero { padding-bottom: 70px; }
    .hero::before { background: linear-gradient(180deg, rgba(10, 9, 13, .7) 0%, rgba(10, 9, 13, .82) 50%, var(--bg) 100%); }
    .hero .btn-row .btn { flex: 1 1 100%; }
    .scroll-hint { display: none; }
    .abilities { grid-template-columns: repeat(3, 1fr); row-gap: 6px; }
    .card { padding: 22px; }
    .form-grid { grid-template-columns: 1fr; }
    .facts { grid-template-columns: 1fr; }
    .shot { min-height: 260px; }
    .shot.tall { min-height: 320px; }
    .step { padding-left: 76px; }
    .step::before { left: 22px; top: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
}

/* flash-сообщения поверх hero — всплывающими плашками */
.has-hero .flashes { position: fixed; top: calc(var(--topbar-h) + 12px); right: 16px; z-index: 60; width: min(420px, calc(100% - 32px)); margin: 0; }
.has-hero .flash { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); background-color: rgba(16, 14, 20, .9); }
