/* Лендинг и страницы правил. Грузится последним, берёт токены theme.css. Без inline-стилей: размеры - классы и CSS-переменные. */
.ld { min-height: 100%; background: var(--bg); color: var(--text); }
.ld-skip { position: absolute; left: 8px; top: -64px; z-index: 6000; padding: 10px 16px; border-radius: 3px; background: var(--gold); color: #1b1006; font-weight: 700; text-decoration: none; }
.ld-skip:focus { top: 8px; }
.ld a:focus-visible, .ld button:focus-visible, .ld summary:focus-visible, .ld-ov button:focus-visible, .ld-ov input:focus-visible, .ld-ssr a:focus-visible, .ld-top a:focus-visible, .doc a:focus-visible { outline: 3px solid #ffd27a; outline-offset: 2px; }
.ld-wrap { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.ld-wrap.narrow { width: min(760px, calc(100% - 40px)); }

/* кристалл-знак */
.ld-gem { display: block; flex: none; }
.ld-gem.sm { width: 16px; height: 24px; filter: drop-shadow(0 0 6px rgba(111, 227, 255, 0.7)); }
.ld-gem.md { width: 30px; height: 45px; margin: 0 auto 10px; filter: drop-shadow(0 0 12px rgba(111, 227, 255, 0.8)); }
.ld-gem.lg { width: 46px; height: 69px; margin: 0 auto 12px; filter: drop-shadow(0 0 16px rgba(111, 227, 255, 0.85)); }

/* верхняя панель: лежит поверх героя, при прокрутке темнеет */
.ld-top { position: sticky; top: 0; z-index: 30; height: 64px; margin-bottom: -64px; background: linear-gradient(rgba(5, 4, 8, 0.85), rgba(5, 4, 8, 0)); transition: background-color 0.2s; }
.ld-top.solid { background: rgba(11, 10, 13, 0.97); box-shadow: 0 1px 0 var(--line); }
.ld-bar-in { display: flex; align-items: center; gap: 16px; height: 100%; width: min(1280px, 100%); margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
.ld-logo { display: inline-flex; align-items: center; gap: 10px; font: 800 18px var(--serif); letter-spacing: 0.04em; color: var(--gold); text-decoration: none; text-shadow: 0 2px 6px #000; white-space: nowrap; min-height: 44px; }
.ld-logo:hover { color: #f0c46e; }
.ld-nav { display: flex; flex: 1; justify-content: center; gap: 6px; }
.ld-nav a { padding: 10px 12px; color: #d9ccb0; font-size: 14px; text-decoration: none; border-radius: 3px; }
.ld-nav a:hover { color: var(--gold); }
.ld-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.ld-nav + .ld-tools { margin-left: 0; }
.ld .lang-sw button { min-height: 32px; padding: 4px 10px; }

/* кнопки */
.ld-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; box-sizing: border-box; font: 700 15px system-ui, 'Segoe UI', Roboto, sans-serif; letter-spacing: 0.02em; color: var(--text); text-decoration: none; cursor: pointer;
  background: var(--iron); border: 1px solid var(--trim); border-radius: 3px; box-shadow: inset 0 1px rgba(255, 255, 255, 0.06), 0 2px 0 #000; transition: transform 0.12s, filter 0.15s, border-color 0.15s; }
.ld-btn:hover { filter: brightness(1.12); border-color: var(--trim-hi); transform: translateY(-1px); }
.ld-btn:active { transform: none; }
.ld-btn.primary { color: #1b1006; border-color: #f6d58f; background: linear-gradient(#f0c46e, #c0862c 55%, #9b6a1f); text-shadow: 0 1px rgba(255, 255, 255, 0.35); box-shadow: 0 0 0 1px #3a2a08, 0 6px 24px rgba(216, 166, 74, 0.35); }
.ld-btn.big { min-height: 54px; padding: 0 32px; font-size: 17px; }
.ld-btn.sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.ld-btn.ghost { background: rgba(14, 11, 8, 0.55); }
.ld-hero .ld-btn.big:not(.primary) { background: rgba(14, 11, 8, 0.7); }

/* герой: фиксированная высота - страница не прыгает, пока грузится сцена */
.ld-hero { position: relative; isolation: isolate; height: clamp(620px, 94vh, 880px); height: clamp(620px, 94svh, 880px); overflow: hidden; background: linear-gradient(#05041a, #17123d 55%, #3a2456); }
.ld-scene { position: absolute; inset: 0; }
.bg-canvas.in-host { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.ld-shade { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse 62% 48% at 50% 36%, rgba(5, 4, 10, 0.66), rgba(5, 4, 10, 0) 72%), linear-gradient(rgba(0, 0, 0, 0) 76%, var(--bg)); }
.ld-hero-in { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; max-width: 820px; margin: 0 auto; padding: 100px 20px 0; text-align: center; }
.ld-mark { display: flex; flex-direction: column; align-items: center; margin: 0; }
.ld-mark-name { font: 800 clamp(40px, 9vw, 92px) / 1.04 var(--serif); letter-spacing: 0.03em; overflow-wrap: anywhere; text-wrap: balance;
  background: linear-gradient(#fff3cf 0%, #f0c46e 38%, #c0862c 62%, #f0c46e 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 #3a2a08) drop-shadow(0 0 22px rgba(224, 120, 43, 0.45)); }
.ld-mark-en { margin-top: 10px; padding-left: 0.5em; font: 600 clamp(12px, 2vw, 15px) var(--serif); letter-spacing: 0.5em; text-transform: uppercase; color: #9fe9ff; text-shadow: 0 0 12px rgba(111, 227, 255, 0.5); }
.ld-tag { margin: 16px 0 6px; font: 600 clamp(16px, 2.6vw, 22px) / 1.3 var(--serif); letter-spacing: 0.04em; color: #f1e2bd; text-shadow: 0 2px 8px #000; text-wrap: balance; }
.ld-lead { max-width: 56ch; margin: 0 0 22px; font-size: clamp(14px, 1.8vw, 17px); line-height: 1.6; color: #e6dac0; text-shadow: 0 1px 6px #000, 0 0 14px #000; }
.ld-maint { max-width: 560px; margin: 0 0 16px; padding: 8px 14px; font-size: 14px; border: 1px solid var(--ember); border-radius: 3px; background: rgba(40, 16, 8, 0.88); }
.ld-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.ld-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.ld-chips li { padding: 4px 12px; font-size: 12.5px; color: #f1e2bd; border: 1px solid rgba(216, 166, 74, 0.5); border-radius: 14px; background: rgba(14, 11, 8, 0.65); }
/* то же, что отдаёт сервер до загрузки скриптов */
.ld-ssr { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 94vh; padding: 0 20px; box-sizing: border-box; text-align: center; background: linear-gradient(#05041a, #17123d 55%, #3a2456); }

/* цифры сервера */
.ld-statbar { background: var(--bg); border-bottom: 1px solid var(--line); }
.ld-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); min-height: 92px; margin: 0; padding: 0; list-style: none; }
.ld-stats li { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 14px 8px; }
.ld-stats li + li { border-left: 1px solid var(--line); }
.ld-stats b { font: 800 clamp(24px, 4vw, 36px) / 1.1 var(--serif); color: var(--gold); font-variant-numeric: tabular-nums; }
.ld-stats span { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }

/* разделы */
.ld-sec { padding: clamp(48px, 8vw, 92px) 0; scroll-margin-top: 64px; }
.ld-sec.alt { background: linear-gradient(#110e0b, #0b0a0d); border-block: 1px solid #1d1711; }
.ld-head { margin-bottom: 34px; text-align: center; }
.ld-h2 { margin: 0; font: 800 clamp(26px, 4.5vw, 40px) / 1.15 var(--serif); letter-spacing: 0.04em; color: var(--gold); text-shadow: 0 2px 0 #2a1c08, 0 0 24px rgba(216, 166, 74, 0.25); text-wrap: balance; }
.ld-orn { position: relative; display: block; width: 140px; height: 14px; margin: 12px auto; background: linear-gradient(90deg, transparent, var(--trim) 35%, var(--trim) 65%, transparent) center / 100% 1px no-repeat; }
.ld-orn::after { content: ''; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; transform: rotate(45deg); background: var(--gold); box-shadow: 0 0 8px rgba(216, 166, 74, 0.7); }
.ld-sub { margin: 0 auto; max-width: 60ch; font-size: 16px; line-height: 1.6; color: var(--dim); }

/* возможности */
.ld-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.ld-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 2px 16px; align-items: start; padding: 20px; background: linear-gradient(#211a14, #120e0b); border: 1px solid #050403; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(138, 106, 58, 0.35); transition: transform 0.15s, box-shadow 0.15s; }
.ld-card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--trim-hi), 0 8px 24px rgba(0, 0, 0, 0.5); }
.ld-stage { grid-row: 1 / span 2; display: grid; place-items: end center; width: 72px; height: 72px; border-radius: 50%; background: radial-gradient(circle at 50% 60%, rgba(216, 166, 74, 0.28), rgba(14, 11, 8, 0.9) 72%); border: 1px solid #3b2f23; overflow: hidden; }
.ld-spr { display: block; width: 72px; height: 72px; image-rendering: pixelated; }
.ld-card h3 { margin: 2px 0 6px; font: 700 19px var(--serif); letter-spacing: 0.03em; color: #f1e2bd; }
.ld-card p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--dim); }

/* классы */
.ld-cls { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.ld-cc { --glow: 216, 166, 74; padding-bottom: 22px; text-align: center; overflow: hidden; background: linear-gradient(#1c1610, #110d0a); border: 1px solid #050403; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(138, 106, 58, 0.35); }
.ld-cc.cls-warrior { --glow: 224, 96, 64; } .ld-cc.cls-ranger { --glow: 120, 190, 80; } .ld-cc.cls-mage { --glow: 110, 140, 240; }
.ld-cstage { position: relative; display: grid; place-items: end center; height: 226px; padding-bottom: 14px; box-sizing: border-box; overflow: hidden; background: radial-gradient(ellipse 80% 70% at 50% 55%, rgba(var(--glow), 0.32), transparent 72%), linear-gradient(#1b1510, #0b0907); }
.ld-cstage::before { content: ''; position: absolute; top: 0; left: 50%; width: 70%; height: 86%; transform: translateX(-50%); clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%); background: linear-gradient(rgba(var(--glow), 0.26), transparent); pointer-events: none; }
.ld-floor { position: absolute; left: 50%; bottom: 10px; width: 70%; height: 36px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(var(--glow), 0.55), rgba(var(--glow), 0.1) 62%, transparent 75%); border: 1px solid rgba(var(--glow), 0.3); }
.ld-cstage .ld-spr { position: relative; z-index: 1; width: 176px; height: 176px; }
.ld-cc h3 { margin: 16px 0 6px; font: 800 24px var(--serif); letter-spacing: 0.04em; color: var(--gold); }
.ld-role { display: inline-block; padding: 2px 14px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: rgb(var(--glow)); border: 1px solid rgba(var(--glow), 0.6); border-radius: 12px; background: rgba(14, 11, 8, 0.6); }
.ld-cc p { min-height: 66px; margin: 12px 0; padding: 0 22px; font-size: 14.5px; line-height: 1.55; color: var(--dim); }
.ld-stats-b { display: grid; gap: 6px; padding: 0 22px; }
.ld-stat { display: grid; grid-template-columns: 104px minmax(0, 1fr) 22px; align-items: center; gap: 8px; font-size: 12.5px; text-align: left; color: var(--dim); }
.ld-stat b { color: var(--text); text-align: right; }
.ld-bar { height: 8px; overflow: hidden; background: #0b0907; border: 1px solid #000; border-radius: 2px; }
.ld-bar i { display: block; height: 100%; width: calc(var(--w, 0) * 1%); background: linear-gradient(90deg, rgba(var(--glow), 0.5), rgb(var(--glow))); }

/* новости (колонка из news.js) */
.ld-news:not(:has(.nw-col)) { display: none; }
.ld-news .nw-col { padding: 0; background: none; border: 0; box-shadow: none; }
.ld-news .nw-h { margin: 0 0 28px; text-align: center; font: 800 clamp(26px, 4.5vw, 40px) / 1.15 var(--serif); letter-spacing: 0.04em; color: var(--gold); text-shadow: 0 2px 0 #2a1c08; }
.ld-news .nw-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }

/* FAQ */
.ld-q { margin-bottom: 10px; background: linear-gradient(#1c1610, #120e0b); border: 1px solid #050403; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(138, 106, 58, 0.3); }
.ld-q summary { position: relative; display: block; min-height: 44px; box-sizing: border-box; padding: 14px 48px 14px 18px; list-style: none; cursor: pointer; font: 700 16px / 1.35 var(--serif); letter-spacing: 0.02em; color: #f1e2bd; }
.ld-q summary::-webkit-details-marker { display: none; }
.ld-q summary::after { content: ''; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; margin-top: -7px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg); transition: transform 0.15s; }
.ld-q[open] summary::after { margin-top: -2px; transform: rotate(-135deg); }
.ld-q p { margin: 0; padding: 0 18px 18px; font-size: 15px; line-height: 1.65; color: var(--dim); }

/* призыв и подвал */
.ld-final { padding: 72px 0; text-align: center; background: radial-gradient(ellipse 60% 100% at 50% 100%, rgba(94, 116, 201, 0.24), transparent), var(--bg); }
.ld-final .ld-sub { margin-bottom: 26px; }
.ld-foot { padding: 28px 0 34px; background: #070608; border-top: 1px solid var(--line); }
.ld-foot-in { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 20px 40px; }
.ld-foot-brand { display: flex; flex-direction: column; gap: 8px; }
.ld-logo.static { font-size: 17px; min-height: 0; }
.ld-foot small { color: var(--dim); font-size: 12.5px; }
.ld-foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.ld-foot a { color: #d9ccb0; font-size: 14px; text-decoration: none; padding: 6px 0; }
.ld-foot a:hover { color: var(--gold); text-decoration: underline; }
.ld-foot-mail { display: flex; flex-direction: column; }

/* панель входа */
.ld-ov { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: 14px; background: rgba(5, 4, 6, 0.84); }
.ld-ov.hidden { display: none; }
.ld-panel { position: relative; width: min(420px, 100%); max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px); overflow: auto; box-sizing: border-box; padding: 26px 24px 24px; background: var(--win-bg); border: 1px solid var(--trim); border-radius: 4px; box-shadow: 0 0 0 1px #000, 0 24px 80px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(216, 166, 74, 0.2); }
.ld-panel::before { content: ''; position: absolute; left: 24px; right: 24px; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.ld-x { position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; font-size: 26px; line-height: 1; color: var(--text); cursor: pointer; background: rgba(10, 8, 6, 0.7); border: 1px solid var(--line); border-radius: 50%; }
.ld-x:hover { border-color: var(--trim-hi); color: var(--gold); }
.ld-pt { margin: 0; padding: 0 30px; text-align: center; font: 800 24px / 1.2 var(--serif); letter-spacing: 0.04em; color: var(--gold); overflow-wrap: anywhere; }
.ld-ptop .ld-sub { margin-top: 4px; font-size: 13px; text-align: center; }
.ld-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 18px 0 16px; border-bottom: 1px solid var(--line); }
.ld-tab { min-height: 44px; padding: 0 8px; font: 700 15px var(--serif); letter-spacing: 0.05em; color: var(--dim); cursor: pointer; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.ld-tab:hover { color: var(--text); }
.ld-tab.on { color: var(--gold); border-bottom-color: var(--gold); }
.ld-form { display: flex; flex-direction: column; gap: 10px; }
.ld-form input:not(.hp-field) { min-height: 46px; box-sizing: border-box; font-size: 16px; }
.ld-form .ld-btn { margin-top: 4px; width: 100%; }
.ld-hint { margin: 0; font-size: 13px; line-height: 1.45; text-align: center; color: var(--dim); }
.ld-hint:empty { display: none; }
/* v0.53: почта - восстановление доступа, окно подтверждения, плашки */
.ld-link { align-self: center; background: none; border: 0; padding: 6px 4px; font: 600 14px var(--serif); color: var(--gold); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ld-link:hover { color: var(--text); }
.mail-reset { display: flex; flex-direction: column; gap: 10px; }
.mail-reset input { min-height: 46px; box-sizing: border-box; font-size: 16px; }
.mail-msg { margin: 0; padding: 10px 12px; font-size: 14px; line-height: 1.45; text-align: left; color: var(--text); background: rgba(216, 166, 74, .1); border: 1px solid var(--gold2); border-radius: 10px; }
.mail-box h2 { margin: 0; }
.mail-box p { margin: 0; line-height: 1.45; }
.mail-box .row { justify-content: center; flex-wrap: wrap; }
.mail-flash { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 100010; max-width: min(520px, calc(100vw - 24px)); padding: 12px 18px; border-radius: 12px; font-size: 14px; line-height: 1.4; text-align: center;
  color: #ecf6e4; background: #1f3a22; border: 1px solid #4f8a52; box-shadow: 0 10px 30px rgba(0, 0, 0, .55); }
.mail-flash.bad { color: #ffe6e1; background: #4a1c1c; border-color: #a8242a; }
.mail-plaque { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 0 0 10px; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.4;
  background: rgba(216, 166, 74, .09); border: 1px solid var(--gold2); color: var(--text); }
.mail-plaque.gate { background: rgba(168, 36, 42, .16); border-color: var(--blood); }
.mail-pl-t { flex: 1 1 260px; }
.mail-set .tfa-head { text-align: left; }

/* страницы правил */
body.doc-page { height: auto; min-height: 100%; overflow: auto; }
.doc-page .ld-top { margin-bottom: 0; }
.ld-nav.always { display: flex; }
.doc { width: min(780px, calc(100% - 40px)); margin: 36px auto 56px; line-height: 1.7; color: var(--text); }
.doc h1 { margin: 0 0 6px; font: 800 clamp(26px, 5vw, 38px) / 1.15 var(--serif); color: var(--gold); }
.doc h2 { margin: 28px 0 8px; font: 700 20px var(--serif); color: var(--trim-hi); }
.doc p, .doc li { font-size: 15.5px; }
.doc .dim { color: var(--dim); }
.doc mark { padding: 0 5px; color: #ffd9a0; background: rgba(224, 120, 43, 0.25); border-radius: 2px; }
.doc a { color: var(--ember); }
.doc-todo { padding: 10px 14px; border: 1px dashed var(--ember); border-radius: 3px; background: rgba(40, 16, 8, 0.5); font-size: 14px; }
.doc-todo code { color: #f1e2bd; }

@keyframes ldPulse { 50% { transform: translateY(-4px); filter: drop-shadow(0 0 24px rgba(111, 227, 255, 1)); } }
@keyframes ldGlow { 50% { box-shadow: 0 0 0 1px #3a2a08, 0 6px 34px rgba(224, 120, 43, 0.6); } }
@media (prefers-reduced-motion: no-preference) {
  #app { scroll-behavior: smooth; }
  .ld-gem.lg { animation: ldPulse 3.4s ease-in-out infinite; }
  .ld-btn.primary.big { animation: ldGlow 2.8s ease-in-out infinite; }
}
@media (prefers-reduced-motion: reduce) { .ld-btn, .ld-card, .ld-top { transition: none; } .ld-btn:hover, .ld-card:hover { transform: none; } }
@media (forced-colors: active) { .ld-mark-name { background: none; color: CanvasText; filter: none; } }

@media (max-width: 860px) { .ld-nav:not(.always) { display: none; } .ld-tools { margin-left: auto; } }
@media (max-width: 560px) {
  .ld-bar-in { padding: 0 12px; gap: 8px; }
  .ld-logo { font-size: 16px; gap: 7px; }
  .ld-hero-in { padding-top: 84px; }
  .ld-btn.big { padding: 0 22px; min-height: 52px; font-size: 16px; }
  .ld-cta { width: 100%; flex-direction: column; align-items: stretch; gap: 10px; }
  .ld-card { gap: 2px 12px; padding: 16px 14px; }
  .ld-stats span { font-size: 11px; letter-spacing: 0.06em; }
  .ld-panel { padding: 22px 16px 18px; }
}
