/* CRY SPACE PRIME HOME — главная, вход, регистрация и другие публичные страницы.
 * Только оформление: поля форм, их имена и адреса отправки не меняются.
 */
html[data-home-prime] {
  --hp-bg: #02040b;
  --hp-ink: #f1f5ff;
  --hp-soft: #c9d3ee;
  --hp-muted: #8f9cbd;
  --hp-dim: #5c6889;
  --hp-line: rgba(150, 175, 255, .14);
  --hp-line-2: rgba(150, 185, 255, .26);
  --hp-cyan: #5be6ff;
  --hp-violet: #a07bff;
  --hp-gold: #ffd27d;
  --hp-good: #45f0b1;
  --hp-bad: #ff6b88;
  --hp-grad: linear-gradient(120deg, #5be6ff 0%, #7f9bff 45%, #b07bff 100%);
  --hp-glass: linear-gradient(160deg, rgba(28, 38, 78, .62), rgba(9, 13, 30, .72));
  --hp-shadow: 0 40px 90px -40px rgba(0, 0, 0, .95), 0 2px 12px -4px rgba(0, 0, 0, .6);
  --hp-r: 24px;
  --hp-ease: cubic-bezier(.2, .8, .2, 1);
  --hp-font: "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --hp-display: "Exo 2", "Manrope", "Segoe UI", system-ui, sans-serif;
  --hp-wrap: 1240px;
  --mx: 0; --my: 0; --sy: 0;
  color-scheme: dark;
  background: var(--hp-bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
html[data-home-prime] *, html[data-home-prime] *::before, html[data-home-prime] *::after { box-sizing: border-box; }
html[data-home-prime] body {
  margin: 0; min-height: 100vh; min-height: 100dvh; overflow-x: hidden;
  background: var(--hp-bg); color: var(--hp-ink);
  font: 500 16px/1.6 var(--hp-font); letter-spacing: .005em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
html[data-home-prime] a { color: var(--hp-cyan); text-decoration: none; transition: color .2s; }
html[data-home-prime] a:hover { color: #fff; }
html[data-home-prime] img { max-width: 100%; display: block; }
html[data-home-prime] :focus-visible { outline: 2px solid var(--hp-cyan); outline-offset: 3px; border-radius: 8px; }
html[data-home-prime] ::selection { background: rgba(91, 230, 255, .3); color: #fff; }
html[data-home-prime] h1, html[data-home-prime] h2, html[data-home-prime] h3 { font-family: var(--hp-display); line-height: 1.12; margin: 0; color: var(--hp-ink); letter-spacing: .005em; }

/* Сцена: холст на весь экран + плёночное зерно */
.hp-space { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: 0; display: block; pointer-events: none; background: var(--hp-bg); }
.hp-grain { position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: hp-grain 1.2s steps(6) infinite; }
.hp-shell, .ui-public-shell { position: relative; z-index: 2; min-height: 100vh; display: flex; flex-direction: column; }
.hp-main { flex: 1; }

/* Навигация */
.hp-nav, html[data-home-prime] .ui-public-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(14px + env(safe-area-inset-top)) clamp(16px, 4vw, 48px) 14px;
  transition: background .4s, border-color .4s, padding .4s var(--hp-ease), backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
html.hp-scrolled .hp-nav, html.hp-scrolled .ui-public-header {
  background: rgba(4, 7, 18, .72); border-bottom-color: var(--hp-line);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  padding-top: calc(10px + env(safe-area-inset-top)); padding-bottom: 10px;
}
.hp-brand { display: flex; align-items: center; gap: 12px; color: var(--hp-ink) !important; }
.hp-brand-mark { position: relative; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: radial-gradient(circle at 30% 25%, rgba(91, 230, 255, .4), rgba(160, 123, 255, .2) 55%, rgba(8, 12, 28, .9));
  box-shadow: inset 0 0 0 1px rgba(150, 190, 255, .3), 0 10px 30px -8px rgba(91, 230, 255, .6); }
.hp-brand-mark img { width: 32px; height: 32px; border-radius: 10px; }
.hp-brand-mark::after { content: ""; position: absolute; inset: -4px; border-radius: 17px; border: 1px solid rgba(91, 230, 255, .35); animation: hp-breathe 4s ease-in-out infinite; }
.hp-brand-text { display: flex; flex-direction: column; font: 800 18px/1 var(--hp-display); letter-spacing: .16em; text-transform: uppercase; }
.hp-brand-text small { margin-top: 6px; font: 700 10px/1 var(--hp-font); letter-spacing: .24em; color: var(--hp-muted); }
.hp-nav-links { display: flex; align-items: center; gap: 6px; }
.hp-nav-link { padding: 10px 14px; border-radius: 12px; color: var(--hp-soft) !important; font-weight: 600; font-size: 14.5px; transition: background .2s, color .2s; }
.hp-nav-link:hover { background: rgba(120, 150, 255, .1); color: #fff !important; }

/* Кнопки */
.hp-btn, html[data-home-prime] .ui-button, html[data-home-prime] .ui-primary-action {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: 14px; border: 1px solid var(--hp-line-2);
  background: rgba(20, 28, 60, .55); color: var(--hp-ink) !important;
  font: 800 15px/1 var(--hp-font); letter-spacing: .01em; cursor: pointer; white-space: nowrap; text-decoration: none;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform .3s var(--hp-ease), box-shadow .35s var(--hp-ease), border-color .25s, background .3s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.hp-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--hp-ease); }
.hp-btn:hover svg { transform: translateX(4px); }
.hp-btn:hover, html[data-home-prime] .ui-button:hover { transform: translateY(-2px); border-color: rgba(91, 230, 255, .6); color: #fff !important; }
.hp-btn:active, html[data-home-prime] .ui-primary-action:active { transform: translateY(0) scale(.98); }
.hp-btn-primary, html[data-home-prime] .ui-primary-action, html[data-home-prime] input[type="submit"] {
  border-color: transparent !important; color: #050c1f !important;
  background: var(--hp-grad); background-size: 180% 180%; animation: hp-flow 8s ease infinite;
  box-shadow: 0 14px 40px -14px rgba(91, 230, 255, .8), inset 0 1px 0 rgba(255, 255, 255, .55);
}
.hp-btn-primary::after, html[data-home-prime] .ui-primary-action::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); transform: translateX(-120%);
}
.hp-btn-primary:hover::after { transform: translateX(120%); transition: transform .9s var(--hp-ease); }
.hp-btn-primary:hover, html[data-home-prime] .ui-primary-action:hover { color: #02060f !important; box-shadow: 0 20px 50px -14px rgba(160, 123, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .6); }
.hp-btn-ghost { background: rgba(255, 255, 255, .04); }
.hp-btn-lg { min-height: 56px; padding: 0 28px; font-size: 16px; border-radius: 16px; }
.hp-btn-sm { min-height: 40px; padding: 0 18px; font-size: 14px; border-radius: 12px; }
.hp-btn-block, html[data-home-prime] .hp-form input[type="submit"] { width: 100%; }

/* Герой */
.hp-hero {
  position: relative; min-height: 100vh; min-height: 100svh; max-width: var(--hp-wrap); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 560px) minmax(120px, 1fr) minmax(340px, 400px); align-items: center; gap: clamp(20px, 3vw, 48px);
  padding: calc(110px + env(safe-area-inset-top)) clamp(16px, 4vw, 48px) 90px;
}
.hp-hero-copy { transform: translate3d(calc(var(--mx) * -8px), calc(var(--my) * -6px + var(--sy) * .2px), 0); will-change: transform; }
.hp-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 8px 14px; border-radius: 999px;
  background: rgba(91, 230, 255, .08); border: 1px solid rgba(91, 230, 255, .25);
  font: 800 12px/1 var(--hp-font); letter-spacing: .22em; text-transform: uppercase; color: var(--hp-cyan); }
.hp-live { width: 8px; height: 8px; border-radius: 50%; background: var(--hp-good); box-shadow: 0 0 0 0 rgba(69, 240, 177, .6); animation: hp-ping 2.2s ease-out infinite; }
.hp-title { font-size: clamp(40px, 4.4vw, 66px); font-weight: 900; letter-spacing: -.015em; line-height: 1; margin-bottom: 24px; text-shadow: 0 6px 40px rgba(2, 4, 11, .8); }
.hp-title-line { white-space: nowrap; }
.hp-title-line { display: block; }
.hp-title-accent { background: var(--hp-grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: hp-flow 9s ease infinite; filter: drop-shadow(0 10px 40px rgba(91, 160, 255, .35)); padding-bottom: .08em; }
.hp-lead { max-width: 560px; margin: 0 0 32px; font-size: clamp(16px, 1.35vw, 19px); color: var(--hp-soft); text-shadow: 0 2px 18px rgba(2, 4, 11, .9); }
.hp-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hp-cta-center { justify-content: center; }
.hp-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 34px 0 0; padding: 0; list-style: none; }
.hp-chips li { padding: 10px 16px; border-radius: 14px; background: rgba(10, 15, 34, .55); border: 1px solid var(--hp-line); color: var(--hp-muted); font-size: 14px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hp-chips b { color: var(--hp-ink); font-family: var(--hp-display); margin-right: 4px; }
.hp-scroll { position: absolute; left: 50%; bottom: 26px; width: 28px; height: 46px; margin-left: -14px; border-radius: 16px; border: 2px solid rgba(200, 215, 255, .35); }
.hp-scroll span { position: absolute; left: 50%; top: 8px; width: 4px; height: 9px; margin-left: -2px; border-radius: 4px; background: var(--hp-cyan); animation: hp-scroll 2s var(--hp-ease) infinite; }

/* Карточка входа */
.hp-login {
  grid-column: 3;
  --rx: 0deg; --ry: 0deg;
  position: relative; z-index: 3; padding: 28px; border-radius: 28px;
  background: linear-gradient(160deg, rgba(30, 42, 86, .66), rgba(8, 12, 28, .8));
  border: 1px solid var(--hp-line-2);
  box-shadow: var(--hp-shadow), inset 0 1px 0 rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
  transform: perspective(1200px) rotateX(var(--rx)) rotateY(var(--ry)) translate3d(calc(var(--mx) * 6px), calc(var(--my) * 4px), 0);
  transition: transform .5s var(--hp-ease), box-shadow .4s;
  scroll-margin-top: 110px;
}
.hp-login::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--hp-angle, 0deg), rgba(91, 230, 255, .0), rgba(91, 230, 255, .9), rgba(160, 123, 255, .8), rgba(91, 230, 255, 0) 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: hp-angle 6s linear infinite; opacity: .8; }
.hp-login-glow { position: absolute; inset: -40% -30% auto auto; width: 300px; height: 300px; border-radius: 50%; pointer-events: none; z-index: -1;
  background: radial-gradient(circle, rgba(91, 160, 255, .35), transparent 65%); filter: blur(10px); }
.hp-login.is-flash { box-shadow: var(--hp-shadow), 0 0 0 2px rgba(91, 230, 255, .7), 0 0 60px -10px rgba(91, 230, 255, .8); }
.hp-login-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.hp-login-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; background: rgba(91, 230, 255, .1); box-shadow: inset 0 0 0 1px rgba(91, 230, 255, .3); }
.hp-login-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--hp-cyan); stroke-width: 1.7; animation: hp-spin 14s linear infinite; }
.hp-login-head small { display: block; font: 800 11px/1 var(--hp-font); letter-spacing: .22em; text-transform: uppercase; color: var(--hp-muted); margin-bottom: 6px; }
.hp-login-head h2 { font-size: 26px; font-weight: 800; }
.hp-status { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: rgba(69, 240, 177, .1); color: var(--hp-good); font: 800 11px/1 var(--hp-font); letter-spacing: .12em; text-transform: uppercase; }
.hp-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.hp-form { display: grid; gap: 14px; }
.hp-form-links { display: flex; justify-content: center; }
.hp-login-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--hp-line); color: var(--hp-muted); font-size: 14.5px; }
.hp-link-strong { font-weight: 800; }

/* Поля форм (все публичные страницы) */
html[data-home-prime] .ui-field { display: grid; gap: 7px; margin: 0; }
html[data-home-prime] .ui-field label { font: 700 12px/1.2 var(--hp-font); letter-spacing: .12em; text-transform: uppercase; color: var(--hp-muted); }
html[data-home-prime] input[type="text"], html[data-home-prime] input[type="password"], html[data-home-prime] input[type="email"],
html[data-home-prime] input[type="number"], html[data-home-prime] select, html[data-home-prime] textarea {
  width: 100%; min-height: 50px; padding: 12px 16px; margin: 0;
  border-radius: 14px; border: 1px solid var(--hp-line-2); background: rgba(3, 6, 16, .62); color: var(--hp-ink);
  font: 600 16px/1.3 var(--hp-font); box-shadow: inset 0 2px 8px rgba(0, 0, 0, .4);
  transition: border-color .2s, box-shadow .25s, background .2s; -webkit-appearance: none; appearance: none;
}
html[data-home-prime] select { padding-right: 42px; cursor: pointer;
  background: rgba(3, 6, 16, .62) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f9cbd' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center / 18px no-repeat; }
html[data-home-prime] select option { background: #0b1020; color: var(--hp-ink); }
html[data-home-prime] input::placeholder { color: var(--hp-dim); }
html[data-home-prime] input:focus, html[data-home-prime] select:focus, html[data-home-prime] textarea:focus {
  outline: none; border-color: rgba(91, 230, 255, .75); background-color: rgba(6, 12, 30, .8);
  box-shadow: 0 0 0 4px rgba(91, 230, 255, .15), inset 0 2px 8px rgba(0, 0, 0, .4);
}
html[data-home-prime] input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--hp-cyan); flex: none; margin: 2px 0 0; }
.hp-pass { position: relative; }
.hp-pass input { padding-right: 52px !important; }
.hp-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--hp-muted); cursor: pointer; display: grid; place-items: center; }
.hp-eye:hover, .hp-eye[aria-pressed="true"] { color: var(--hp-cyan); background: rgba(91, 230, 255, .08); }
.hp-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
html[data-home-prime] .ui-forgot { font-size: 14px; color: var(--hp-muted); font-weight: 600; }
html[data-home-prime] .ui-forgot:hover { color: #fff; }
html[data-home-prime] .ui-field-note, html[data-home-prime] .cry-hint { margin: 0; font-size: 13px; color: var(--hp-muted); }
html[data-home-prime] .cry-captcha { min-height: 78px; display: flex; justify-content: center; }
html[data-home-prime] .cry-notice { margin: 0; padding: 12px 14px; border-radius: 14px; font-size: 14px; }
html[data-home-prime] .cry-notice-error { background: rgba(255, 107, 136, .08); border: 1px solid rgba(255, 107, 136, .4); color: #ffd2db; }
html[data-home-prime] .ui-honeypot { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Разделы */
.hp-section { position: relative; max-width: var(--hp-wrap); margin: 0 auto; padding: clamp(70px, 10vw, 130px) clamp(16px, 4vw, 48px); }
.hp-section-head { max-width: 760px; margin: 0 auto clamp(36px, 5vw, 64px); text-align: center; }
.hp-section-head h2 { font-size: clamp(32px, 4.4vw, 58px); font-weight: 900; margin-bottom: 16px; }
.hp-section-head p:not(.hp-eyebrow) { margin: 0; color: var(--hp-soft); font-size: 18px; }
.hp-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.hp-feature, .hp-faction {
  --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 50%;
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; min-height: 360px;
  border-radius: var(--hp-r); background: rgba(9, 13, 30, .7); border: 1px solid var(--hp-line);
  box-shadow: var(--hp-shadow);
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .6s var(--hp-ease), border-color .4s, box-shadow .5s;
}
.hp-feature-wide { grid-column: span 2; }
.hp-feature::after, .hp-faction::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit;
  background: radial-gradient(500px circle at var(--gx) var(--gy), rgba(91, 230, 255, .16), transparent 45%); opacity: 0; transition: opacity .4s; }
.hp-feature:hover, .hp-faction:hover { border-color: rgba(120, 170, 255, .38); box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .95), 0 0 70px -30px rgba(91, 230, 255, .55); }
.hp-feature:hover::after, .hp-faction:hover::after { opacity: 1; }
.hp-feature-art, .hp-faction-art { position: absolute; inset: -8% 0; z-index: -1; transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }
.hp-feature-art img, .hp-faction-art img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 1.4s var(--hp-ease), filter .6s; filter: saturate(1.1) brightness(.9); }
.hp-feature:hover .hp-feature-art img, .hp-faction:hover .hp-faction-art img { transform: scale(1.14); filter: saturate(1.25) brightness(1); }
.hp-feature-art::after, .hp-faction-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(2, 4, 11, .05) 20%, rgba(2, 4, 11, .55) 55%, rgba(4, 6, 16, .96) 100%); }
.hp-feature-body { margin-top: auto; padding: 28px; }
.hp-num { display: inline-block; margin-bottom: 12px; font: 800 13px/1 var(--hp-display); letter-spacing: .2em; color: var(--hp-cyan); }
.hp-feature h3 { font-size: clamp(22px, 2vw, 28px); font-weight: 800; margin-bottom: 10px; }
.hp-feature p { margin: 0; color: var(--hp-soft); max-width: 46ch; }
/* Расы */
.hp-faction-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.hp-faction { min-height: 460px; color: var(--hp-ink) !important; }
.hp-faction-body { margin-top: auto; padding: 34px; }
.hp-faction-sigil { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 18px; border-radius: 18px; font-size: 26px;
  background: rgba(5, 8, 20, .6); border: 1px solid var(--hp-line-2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--hp-cyan); }
.hp-faction-b .hp-faction-sigil { color: var(--hp-gold); }
.hp-faction h3 { font-size: clamp(34px, 4vw, 52px); font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.hp-faction p { margin: 6px 0 22px; color: var(--hp-soft); font-size: 17px; }
.hp-faction-go { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid var(--hp-line-2); font-weight: 800; transition: background .3s, border-color .3s, transform .3s var(--hp-ease); }
.hp-faction:hover .hp-faction-go { background: var(--hp-grad); color: #050c1f; border-color: transparent; transform: translateX(4px); }
.hp-faction-b:hover .hp-faction-go { background: linear-gradient(120deg, #ffe3a3, #ffb65c); }
/* Шаги */
.hp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; position: relative; }
.hp-steps::before { content: ""; position: absolute; left: 8%; right: 8%; top: 34px; height: 2px; background: linear-gradient(90deg, transparent, rgba(91, 230, 255, .5), rgba(160, 123, 255, .5), transparent); }
.hp-steps li { position: relative; padding: 28px; border-radius: var(--hp-r); background: var(--hp-glass); border: 1px solid var(--hp-line); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: var(--hp-shadow); }
.hp-step-n { position: relative; display: grid; place-items: center; width: 52px; height: 52px; margin: -8px 0 18px; border-radius: 16px; font: 900 22px/1 var(--hp-display); color: #050c1f; background: var(--hp-grad); box-shadow: 0 12px 30px -10px rgba(91, 230, 255, .8); }
.hp-steps h3 { font-size: 22px; margin-bottom: 8px; }
.hp-steps p { margin: 0; color: var(--hp-soft); }
.hp-final { position: relative; overflow: hidden; margin-top: clamp(60px, 8vw, 110px); padding: clamp(40px, 7vw, 90px) clamp(20px, 5vw, 60px); border-radius: 32px; text-align: center;
  background: radial-gradient(800px 300px at 50% 120%, rgba(91, 160, 255, .35), transparent 70%), linear-gradient(160deg, rgba(28, 38, 78, .7), rgba(8, 12, 28, .85));
  border: 1px solid var(--hp-line-2); box-shadow: var(--hp-shadow); }
.hp-final h2 { position: relative; font-size: clamp(32px, 4.6vw, 60px); font-weight: 900; margin-bottom: 14px; }
.hp-final p { position: relative; margin: 0 auto 30px; max-width: 560px; color: var(--hp-soft); font-size: 18px; }
.hp-final .hp-cta { position: relative; }
.hp-final-orb { position: absolute; left: 50%; bottom: -380px; width: 760px; height: 760px; margin-left: -380px; border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, rgba(140, 200, 255, .5), rgba(70, 90, 220, .25) 40%, transparent 68%); filter: blur(6px); animation: hp-breathe 7s ease-in-out infinite; }

/* Подвал */
.hp-footer, html[data-home-prime] .ui-public-footer { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  max-width: var(--hp-wrap); width: 100%; margin: 0 auto; padding: 34px clamp(16px, 4vw, 48px) calc(34px + env(safe-area-inset-bottom)); border-top: 1px solid var(--hp-line); color: var(--hp-muted); font-size: 14px; }
.hp-footer-brand { display: flex; align-items: center; gap: 14px; }
.hp-footer-brand p, html[data-home-prime] .ui-public-footer p { margin: 0; }
.hp-footer-brand strong { color: var(--hp-ink); }
html[data-home-prime] .ui-public-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
html[data-home-prime] .ui-public-footer a { color: var(--hp-soft); font-weight: 600; }
.hp-toast { position: fixed; z-index: 100; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(560px, calc(100vw - 28px));
  padding: 16px 20px; border-radius: 18px; background: rgba(36, 14, 24, .92); border: 1px solid rgba(255, 107, 136, .5); color: #ffe1e7; font-weight: 600;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .9); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); animation: hp-toast .6s var(--hp-ease) both; }
.hp-music { position: fixed; z-index: 60; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); max-width: 260px; opacity: .75; }

/* Остальные публичные страницы: регистрация, восстановление пароля, правила, сообщения */
html[data-home-prime] .ui-registration-layout, html[data-home-prime] .ui-centered-page, html[data-home-prime] .ui-legal {
  width: 100%; max-width: var(--hp-wrap); margin: 0 auto; padding: calc(120px + env(safe-area-inset-top)) clamp(16px, 4vw, 48px) 70px; }
html[data-home-prime] .ui-registration-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: clamp(28px, 5vw, 70px); align-items: start; }
html[data-home-prime] .ui-centered-page { display: grid; place-items: center; min-height: 80vh; }
html[data-home-prime] .ui-auth-panel, html[data-home-prime] .ui-legal {
  position: relative; width: 100%; padding: clamp(22px, 3vw, 34px); border-radius: 28px;
  background: linear-gradient(160deg, rgba(30, 42, 86, .66), rgba(8, 12, 28, .84)); border: 1px solid var(--hp-line-2);
  box-shadow: var(--hp-shadow), inset 0 1px 0 rgba(255, 255, 255, .08); -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
}
html[data-home-prime] .ui-centered-page .ui-auth-panel { max-width: 500px; }
html[data-home-prime] .ui-legal { max-width: 900px; margin-top: calc(110px + env(safe-area-inset-top)); margin-bottom: 70px; padding-top: clamp(28px, 4vw, 48px); }
html[data-home-prime] .ui-legal h1 { font-size: clamp(30px, 4vw, 46px); margin-bottom: 22px; }
html[data-home-prime] .ui-legal h2 { font-size: 21px; margin: 26px 0 10px; color: var(--hp-cyan); }
html[data-home-prime] .ui-legal section, html[data-home-prime] .ui-legal div, html[data-home-prime] .ui-legal p { color: var(--hp-soft); }
html[data-home-prime] .ui-auth-panel h1, html[data-home-prime] .ui-auth-panel h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 800; margin: 0 0 12px; }
html[data-home-prime] .ui-auth-panel form { display: grid; gap: 14px; }
html[data-home-prime] .ui-auth-panel .ui-primary-action { width: 100%; min-height: 52px; }
html[data-home-prime] .ui-auth-lead, html[data-home-prime] .ui-message { color: var(--hp-soft); margin: 0 0 18px; }
html[data-home-prime] .ui-eyebrow { display: inline-block; margin: 0 0 14px; font: 800 12px/1 var(--hp-font); letter-spacing: .22em; text-transform: uppercase; color: var(--hp-cyan); }
html[data-home-prime] .ui-registration-intro { position: sticky; top: 120px; }
html[data-home-prime] .ui-registration-intro h1 { font-size: clamp(40px, 5.6vw, 76px); font-weight: 900; line-height: 1; margin-bottom: 18px;
  background: linear-gradient(180deg, #fff 30%, #b8c8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-home-prime] .ui-registration-intro > p { color: var(--hp-soft); font-size: 18px; max-width: 520px; margin: 0 0 26px; }
html[data-home-prime] .ui-registration-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
html[data-home-prime] .ui-agreement { display: flex; align-items: flex-start; gap: 12px; color: var(--hp-soft); font-size: 14px; }
html[data-home-prime] .ui-agreement label { text-transform: none; letter-spacing: 0; font: 500 14px/1.5 var(--hp-font); color: var(--hp-soft); }
html[data-home-prime] .c2-auth-identity { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
html[data-home-prime] .c2-auth-identity > span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: rgba(91, 230, 255, .1); color: var(--hp-cyan); font-size: 22px; box-shadow: inset 0 0 0 1px rgba(91, 230, 255, .3); }
html[data-home-prime] .c2-auth-identity small { display: block; font: 800 11px/1 var(--hp-font); letter-spacing: .22em; color: var(--hp-muted); margin-bottom: 4px; }
html[data-home-prime] .c2-auth-identity strong { font: 800 18px/1.2 var(--hp-display); }
/* Окно с планетой на странице регистрации */
html[data-home-prime] .c2-space-window { position: relative; height: 300px; margin: 0 0 26px; border-radius: 26px; overflow: hidden; border: 1px solid var(--hp-line);
  background: radial-gradient(circle at 70% 40%, rgba(91, 160, 255, .2), transparent 60%), rgba(5, 8, 20, .5); }
html[data-home-prime] .c2-planet { position: absolute; left: 50%; top: 50%; width: 170px; height: 170px; margin: -85px 0 0 -85px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #bfe9ff, #3f8dff 32%, #3626a8 66%, #0b0a2a 100%);
  box-shadow: inset -26px -20px 60px rgba(0, 0, 0, .75), 0 0 80px -10px rgba(91, 160, 255, .7); animation: hp-float 8s ease-in-out infinite; }
html[data-home-prime] .c2-orbit-ring { position: absolute; left: 50%; top: 50%; width: 360px; height: 120px; margin: -60px 0 0 -180px; border-radius: 50%; border: 1px solid rgba(91, 230, 255, .4); transform: rotate(-16deg); animation: hp-ring 12s linear infinite; }
html[data-home-prime] .c2-orbital-note { position: absolute; left: 16px; right: 16px; bottom: 16px; padding: 12px 14px; border-radius: 14px; background: rgba(3, 6, 16, .65); border: 1px solid var(--hp-line); font-size: 13px; color: var(--hp-soft); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
html[data-home-prime] .c2-orbital-note b { display: block; color: var(--hp-cyan); letter-spacing: .18em; font-size: 11px; margin-bottom: 4px; }

/* Появление */
html.hp-js [data-hp-reveal] { opacity: 0; transform: translate3d(0, 40px, 0) perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
html.hp-js [data-hp-reveal].is-in { opacity: 1; transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: opacity 1s var(--hp-ease), transform 1.1s var(--hp-ease); transition-delay: var(--d, 0ms); }
html.hp-js [data-hp-reveal].is-done { transition: transform .6s var(--hp-ease), border-color .4s, box-shadow .5s; transition-delay: 0ms; }
html.hp-js .hp-title-line, html.hp-js .hp-lead, html.hp-js .hp-cta, html.hp-js .hp-chips, html.hp-js .hp-hero .hp-eyebrow { animation: hp-rise 1.1s var(--hp-ease) both; }
html.hp-js .hp-title-line:nth-child(2) { animation-delay: .12s; }
html.hp-js .hp-lead { animation-delay: .24s; }
html.hp-js .hp-cta { animation-delay: .36s; }
html.hp-js .hp-chips { animation-delay: .48s; }
html.hp-js .hp-login { animation: hp-card-in 1.2s .2s var(--hp-ease) both; }
html.hp-js .hp-nav { animation: hp-fade 1s ease both; }

@keyframes hp-rise { from { opacity: 0; transform: translateY(34px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes hp-card-in { from { opacity: 0; transform: perspective(1200px) rotateY(-14deg) translateX(40px); } to { opacity: 1; } }
@keyframes hp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hp-flow { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes hp-spin { to { transform: rotate(360deg); } }
@property --hp-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes hp-angle { to { --hp-angle: 360deg; } }
@keyframes hp-breathe { 0%, 100% { opacity: .45; transform: scale(1); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes hp-ping { 0% { box-shadow: 0 0 0 0 rgba(69, 240, 177, .55); } 70%, 100% { box-shadow: 0 0 0 10px rgba(69, 240, 177, 0); } }
@keyframes hp-scroll { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(16px); } }
@keyframes hp-grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-5%, 3%); } 40% { transform: translate(3%, -6%); } 60% { transform: translate(-7%, 2%); } 80% { transform: translate(5%, 5%); } 100% { transform: translate(0, 0); } }
@keyframes hp-toast { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes hp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes hp-ring { to { transform: rotate(344deg); } }

/* Адаптив */
@media (max-width: 1080px) {
  .hp-hero { grid-template-columns: 1fr; padding-top: calc(120px + env(safe-area-inset-top)); gap: 40px; min-height: 0; }
  .hp-login { grid-column: auto; }
  .hp-hero-copy { text-align: center; }
  .hp-lead { margin-left: auto; margin-right: auto; }
  .hp-cta, .hp-chips { justify-content: center; }
  .hp-login { max-width: 520px; width: 100%; margin: 0 auto; }
  .hp-scroll { display: none; }
  .hp-feature-grid { grid-template-columns: 1fr 1fr; }
  .hp-feature-wide { grid-column: span 2; }
  html[data-home-prime] .ui-registration-layout { grid-template-columns: 1fr; }
  html[data-home-prime] .ui-registration-intro { position: static; text-align: center; }
  html[data-home-prime] .ui-registration-intro > p { margin-left: auto; margin-right: auto; }
}
@media (max-width: 760px) {
  html[data-home-prime] body { font-size: 15.5px; }
  .hp-nav-link { display: none; }
  .hp-nav-link.hp-nav-login { display: inline-flex; padding: 10px 12px; }
  .hp-brand-text small { display: none; }
  .hp-brand-text { font-size: 16px; }
  .hp-brand-mark { width: 40px; height: 40px; }
  .hp-hero { padding-left: 16px; padding-right: 16px; padding-top: calc(46vh + env(safe-area-inset-top)); }
  .hp-title { font-size: clamp(32px, 9.4vw, 50px); }
  .hp-brand-text { white-space: nowrap; letter-spacing: .12em; }
  .hp-status { display: none; }
  .hp-chips li { padding: 8px 12px; font-size: 13px; }
  .hp-title-line { white-space: normal; }
  .hp-cta .hp-btn { flex: 1 1 100%; }
  .hp-login { padding: 22px; border-radius: 24px; transform: none !important; }
  .hp-feature-grid, .hp-faction-grid, .hp-steps { grid-template-columns: 1fr; }
  .hp-feature-wide { grid-column: auto; }
  .hp-feature { min-height: 320px; }
  .hp-faction { min-height: 380px; }
  .hp-steps::before { display: none; }
  .hp-feature, .hp-faction { transform: none !important; }
  html[data-home-prime] .ui-registration-fields { grid-template-columns: 1fr; }
  html[data-home-prime] .c2-space-window { height: 220px; }
  .hp-footer, html[data-home-prime] .ui-public-footer { flex-direction: column; text-align: center; }
  html[data-home-prime] .ui-public-footer nav { justify-content: center; }
}
@media (hover: none) { .hp-feature::after, .hp-faction::after { display: none; } }
@media (prefers-reduced-motion: reduce) {
  html[data-home-prime] *, html[data-home-prime] *::before, html[data-home-prime] *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  html.hp-js [data-hp-reveal] { opacity: 1; transform: none; }
  .hp-grain { display: none; }
}

/* PRIME4: фон — живой арт с чёрной дырой. Под текстом героя мягкая тень, чтобы корабли не мешали читать. */
.hp-hero-copy { position: relative; isolation: isolate; }
.hp-hero-copy::before {
  content: ""; position: absolute; z-index: -1; inset: -12% -18% -14% -30%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(2, 4, 12, .78), rgba(2, 4, 12, .5) 55%, transparent);
  filter: blur(6px);
}
.hp-title, .hp-eyebrow { text-shadow: 0 4px 30px rgba(2, 4, 11, .85); }
.hp-chips > *, .hp-cta > a:not(:first-child) { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); background-color: rgba(5, 8, 20, .55) !important; }
@media (max-width: 760px) { .hp-hero-copy::before { inset: -6% -10%; } }

/* PRIME5: телефон и сенсорные экраны — без размытия стекла поверх живого фона, без полноэкранного зерна,
   без бесконечных анимаций в мелочах. Карточки плотнее, чтобы текст читался без blur. */
@media (max-width: 760px), (hover: none), (pointer: coarse) {
  .hp-grain { display: none; }
  html[data-home-prime] *, html[data-home-prime] *::before, html[data-home-prime] *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  html.hp-scrolled .hp-nav, html.hp-scrolled .ui-public-header { background: rgba(4, 7, 18, .94); }
  .hp-login { background: linear-gradient(160deg, rgba(22, 32, 68, .94), rgba(6, 9, 22, .96)); }
  .hp-login::before, .hp-login-icon svg, .hp-brand-mark::after, .hp-live, .hp-btn-primary, html[data-home-prime] .ui-primary-action,
  html[data-home-prime] input[type="submit"], .hp-title-line, .hp-scroll span { animation: none !important; }
  .hp-login-glow, .hp-hero-copy::before { filter: none; }
  .hp-hero-copy, .hp-feature-art, .hp-faction-art { will-change: auto; }
  .hp-chips li, .hp-chips > *, .hp-cta > a:not(:first-child), .hp-steps li, html[data-home-prime] .c2-orbital-note { background-color: rgba(8, 12, 28, .88) !important; }
  .hp-btn:not(.hp-btn-primary), html[data-home-prime] .ui-button { background-color: rgba(14, 20, 44, .9); }
  .hp-toast { background-color: rgba(8, 12, 28, .96); }
  html.hp-js .hp-title-line, html.hp-js .hp-lead, html.hp-js .hp-cta, html.hp-js .hp-chips, html.hp-js .hp-hero .hp-eyebrow { animation-name: hp-rise-lite; }
}
@keyframes hp-rise-lite { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* PRIME5: шапка на телефоне всегда в одну строку и в ширину экрана */
@media (max-width: 760px) {
  .hp-nav, html[data-home-prime] .ui-public-header { gap: 8px; padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .hp-brand { gap: 9px; min-width: 0; flex: 0 1 auto; }
  .hp-brand-mark { width: 36px; height: 36px; border-radius: 12px; }
  .hp-brand-mark img { width: 28px; height: 28px; }
  .hp-brand-text { font-size: 15px; letter-spacing: .1em; }
  .hp-nav-links { gap: 4px; flex: none; }
  .hp-nav-link.hp-nav-login { padding: 9px 10px; font-size: 14px; }
  .hp-nav .hp-btn-sm, html[data-home-prime] .ui-public-join { min-height: 40px; padding: 0 14px; border-radius: 12px; font-size: 14px; }
}
@media (max-width: 380px) {
  .hp-brand-text { font-size: 13.5px; letter-spacing: .06em; }
  .hp-nav-link.hp-nav-login { padding: 9px 8px; font-size: 13.5px; }
  .hp-nav .hp-btn-sm, html[data-home-prime] .ui-public-join { padding: 0 11px; font-size: 13.5px; }
}
@media (max-width: 340px) {
  .hp-brand-text { display: none; }
}

/* PRIME5: никакой горизонтальной прокрутки — декоративные свечения не расширяют страницу */
html[data-home-prime], html[data-home-prime] body { max-width: 100%; overflow-x: hidden; }
@supports (overflow: clip) { html[data-home-prime], html[data-home-prime] body { overflow-x: clip; } }
.hp-space { width: 100%; }
@media (max-width: 760px) {
  .hp-login-glow { inset: -30% 0 auto auto; width: 240px; height: 240px; max-width: 100%; }
  .hp-nav, html[data-home-prime] .ui-public-header { max-width: 100%; box-sizing: border-box; }
  .hp-nav-links { min-width: 0; }
}
@media (max-width: 420px) {
  .hp-brand-text { display: none; }
}
