:root {
  --al-bg: #0a0a0c;
  --al-card: rgba(20, 20, 25, 0.88);
  --al-line: rgba(255, 255, 255, 0.08);
  --al-red: #ff003c;
  --al-red-glow: rgba(255, 0, 60, 0.45);
  --al-muted: #a3a3b5;
  --al-font: 'Montserrat', sans-serif;
  --al-radius-sm: 8px;
  --al-radius-md: 14px;
  --al-radius-lg: 18px;
  --al-section-gap: 36px;
}

* { box-sizing: border-box; }

body.auth-landing-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--al-font);
  color: #fff;
  background: #050508;
  overflow-x: hidden;
}

/* --- Ambient background (mesh + grid, без canvas/орбов) --- */
.al-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  --al-parallax-x: 0px;
  --al-parallax-y: 0px;
}

.al-bg__base {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(168deg, #0c0609 0%, #050508 38%, #08080c 72%, #030304 100%);
}

.al-bg__mesh {
  position: absolute;
  inset: -20%;
  transform: translate3d(var(--al-parallax-x), var(--al-parallax-y), 0);
  transition: transform 0.35s ease-out;
  will-change: transform;
}

.al-bg__bloom {
  position: absolute;
  filter: blur(90px);
  opacity: 0.55;
  mix-blend-mode: screen;
  will-change: transform;
}

.al-bg__bloom--1 {
  width: 55vmax;
  height: 38vmax;
  top: -8%;
  left: -12%;
  border-radius: 42% 58% 64% 36% / 48% 42% 58% 52%;
  background: radial-gradient(ellipse at 40% 40%, rgba(255, 0, 60, 0.55) 0%, rgba(255, 0, 60, 0.08) 42%, transparent 68%);
  animation: alBgBloom1 22s ease-in-out infinite alternate;
}

.al-bg__bloom--2 {
  width: 48vmax;
  height: 42vmax;
  bottom: -14%;
  right: -10%;
  border-radius: 58% 42% 36% 64% / 52% 58% 42% 48%;
  background: radial-gradient(ellipse at 55% 55%, rgba(139, 0, 33, 0.5) 0%, rgba(80, 0, 24, 0.12) 45%, transparent 70%);
  animation: alBgBloom2 26s ease-in-out infinite alternate;
}

.al-bg__bloom--3 {
  width: 36vmax;
  height: 28vmax;
  top: 38%;
  left: 42%;
  border-radius: 64% 36% 52% 48% / 44% 56% 44% 56%;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 77, 121, 0.22) 0%, rgba(255, 0, 60, 0.06) 50%, transparent 72%);
  animation: alBgBloom3 19s ease-in-out infinite alternate;
}

.al-bg__grid {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 35%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 35%, #000 20%, transparent 78%);
}

.al-bg__scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0,
    transparent 3px,
    rgba(255, 255, 255, 0.012) 3px,
    rgba(255, 255, 255, 0.012) 4px
  );
  opacity: 0.45;
  mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 55%, transparent 100%);
}

.al-bg__beam {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 0, 60, 0.25) 18%,
    rgba(255, 0, 60, 0.85) 50%,
    rgba(255, 0, 60, 0.25) 82%,
    transparent 100%
  );
  box-shadow: 0 0 28px rgba(255, 0, 60, 0.35);
}

.al-bg__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 80% at 50% -10%, transparent 42%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, transparent 28%, transparent 72%, rgba(0, 0, 0, 0.65) 100%);
}

@keyframes alBgBloom1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4%, 3%, 0) scale(1.06); }
}

@keyframes alBgBloom2 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-3%, -2%, 0) scale(1.05); }
}

@keyframes alBgBloom3 {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: 0.45; }
  to { transform: translate3d(2%, -3%, 0) scale(1.08); opacity: 0.62; }
}

.auth-shell {
  position: relative;
  z-index: 10;
  min-height: calc(100vh - 72px);
  display: block;
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 24px 40px;
}

.auth-landing-with-nav #portal-navbar-root {
  position: relative;
  z-index: 1000;
}

.auth-landing-with-nav #portal-navbar-root .navbar {
  margin-bottom: 0;
}

.auth-showcase {
  display: flex;
  flex-direction: column;
  gap: var(--al-section-gap);
  animation: alFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.al-showcase-stage {
  position: relative;
  min-width: 0;
  padding-left: 52px;
}

/* --- Vertical page nav (01 / 02) --- */
.al-nav-rail {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 44px;
  z-index: 150;
  pointer-events: none;
}

.al-nav-numbers {
  position: sticky;
  top: clamp(72px, 38vh, 320px);
  display: flex;
  flex-direction: column;
  gap: 30px;
  pointer-events: auto;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.al-nav-marker {
  position: absolute;
  left: -10px;
  top: 10px;
  width: 2px;
  height: 20px;
  background: var(--al-red);
  box-shadow: 0 0 10px var(--al-red);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.al-nav-numbers.is-on-back .al-nav-marker {
  transform: translateY(70px);
}

.al-showcase-stage.is-animating.is-to-back .al-nav-numbers {
  transform: translateY(10px);
}

.al-showcase-stage.is-animating.is-to-front .al-nav-numbers {
  transform: translateY(-10px);
}

.al-nav-num-btn {
  font-size: 20px;
  font-weight: 900;
  font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
  color: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: color 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), text-shadow 0.55s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
}

.al-nav-num-btn.is-active {
  color: var(--al-red);
  text-shadow: 0 0 15px var(--al-red-glow);
  transform: scale(1.15);
}

.al-nav-num-btn::before {
  display: none;
}

.al-nav-num-btn:hover:not(.is-active) {
  color: rgba(255, 255, 255, 0.6);
}

.al-nav-num-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 0, 60, 0.28);
  border-radius: 6px;
}

.al-nav-numbers::after {
  content: '';
  position: absolute;
  left: 19px;
  top: 45px;
  bottom: 45px;
  width: 1px;
  background: rgba(255, 255, 255, 0.05);
  z-index: -1;
}

/* --- Lightweight page wipe (no backdrop-filter) --- */
.al-fx-wipe {
  position: absolute;
  inset: 0;
  z-index: 110;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 0, 60, 0.05) 46%,
    rgba(10, 10, 12, 0.28) 50%,
    rgba(255, 0, 60, 0.05) 54%,
    transparent 100%
  );
}

.al-showcase-stage.is-animating .al-fx-wipe {
  visibility: visible;
  animation: alFxWipe 0.72s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes alFxWipe {
  0%, 100% { opacity: 0; }
  42%, 58% { opacity: 1; }
}

@keyframes alPageInSmooth {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes alPageOutSmooth {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}

.al-book {
  position: relative;
  min-width: 0;
  width: 100%;
}

.al-book-inner {
  position: relative;
  display: block;
  overflow: visible;
}

.al-book-face {
  will-change: opacity, transform;
}

.al-book:not(.is-flipped) .al-book-face--front {
  position: relative;
  opacity: 1;
  transform: none;
  z-index: 2;
}

.al-book:not(.is-flipped) .al-book-face--back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  z-index: 1;
}

.al-book.is-flipped .al-book-face--front {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  z-index: 1;
}

.al-book.is-flipped .al-book-face--back {
  position: relative;
  opacity: 1;
  transform: none;
  z-index: 2;
}

.al-book.is-flipping .al-book-face--front,
.al-book.is-flipping .al-book-face--back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto !important;
  overflow: visible !important;
  pointer-events: none;
}

.al-book.is-flipping .al-book-face.al-face-out {
  animation: alPageOutSmooth 0.48s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  z-index: 1;
}

.al-book.is-flipping .al-book-face.al-face-in {
  opacity: 0;
  transform: translateY(8px);
  z-index: 2;
  animation: alPageInSmooth 0.58s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

.auth-showcase--back {
  padding-bottom: 8px;
}

.al-back-empty-hint {
  padding: 16px 18px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--al-muted);
}

.al-back-empty-hint a {
  color: #ff4d6d;
  text-decoration: none;
}

.al-back-empty-hint a:hover {
  text-decoration: underline;
}

.auth-aside {
  position: sticky;
  top: 24px;
  align-self: start;
  z-index: 25;
  animation: alFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

@keyframes alFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.al-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 0, 60, 0.35);
  background: rgba(255, 0, 60, 0.1);
  color: var(--al-red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  width: fit-content;
}

.al-hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--al-red);
  box-shadow: 0 0 10px var(--al-red);
  animation: alPulse 2s infinite;
}

@keyframes alPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.al-hero-title {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.08;
  margin: 0;
}

.al-hero-title span { color: var(--al-red); text-shadow: 0 0 18px var(--al-red-glow); }

.al-hero-tagline {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
}

.al-hero-lead {
  margin: 0;
  color: var(--al-muted);
  font-size: 15px;
  line-height: 1.65;
  max-width: 640px;
  font-weight: 500;
}

.al-oauth-error-banner {
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 77, 109, 0.35);
  background: rgba(255, 0, 60, 0.08);
  color: #ff8fa3;
  font-size: 13px;
  line-height: 1.5;
}

.al-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 4px;
}

.al-section-title-row {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.al-section-title-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.al-section-title svg { width: 18px; height: 18px; fill: var(--al-red); flex-shrink: 0; }

.al-section-link {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--al-red);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 0, 60, 0.28);
  background: rgba(255, 0, 60, 0.08);
  transition: 0.25s ease;
}

.al-section-link:hover {
  background: rgba(255, 0, 60, 0.16);
  transform: translateY(-1px);
}

.al-tools-wrap {
  --ft-line: var(--al-line);
  --ft-muted: var(--al-muted);
  --ft-red: var(--al-red);
  margin-top: -8px;
}

.al-tools-wrap .family-tools {
  margin: 0;
}

.al-tools-wrap .extension-showcase {
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  padding: 22px 20px;
}

@media (min-width: 900px) {
  .al-tools-wrap .extension-showcase.is-active {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  }
}

.al-tools-wrap .extension-lead {
  font-size: 13px;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.al-tools-wrap .extension-steps {
  gap: 8px;
  margin-bottom: 16px;
}

.al-tools-wrap .extension-steps li:nth-child(n + 4) {
  display: none;
}

.al-tools-wrap .extension-steps li {
  font-size: 12px;
}

.al-tools-wrap .extension-frame {
  transform: none;
  animation: none;
  width: min(100%, 100%);
}

.al-tools-wrap .extension-showcase.theme-blue .extension-frame {
  transform: none;
  width: min(100%, 100%);
}

.al-tools-wrap .family-tools-nav {
  display: none;
}

.al-section-title-main .family-tools-nav--header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 0 4px;
  padding: 0;
}

.al-section-title-main .family-tools-nav--header .family-tools-arrow {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.72);
}

.al-section-title-main .family-tools-nav--header .family-tools-arrow:hover {
  color: #fff;
  border-color: rgba(255, 0, 60, 0.35);
  background: rgba(255, 0, 60, 0.1);
}

.al-section-title-main .family-tools-nav--header .family-tools-arrow svg {
  width: 16px;
  height: 16px;
}

.al-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.al-tool-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--al-line);
  background: rgba(18, 18, 24, 0.72);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.al-tool-card:hover {
  border-color: rgba(255, 0, 60, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(255, 0, 60, 0.12);
}

.al-tool-card.theme-blue:hover {
  border-color: rgba(0, 242, 254, 0.4);
  box-shadow: 0 14px 32px rgba(0, 180, 216, 0.12);
}

.al-tool-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 0, 60, 0.12);
  border: 1px solid rgba(255, 0, 60, 0.28);
  flex-shrink: 0;
}

.al-tool-card.theme-blue .al-tool-icon {
  background: rgba(0, 242, 254, 0.1);
  border-color: rgba(0, 242, 254, 0.28);
}

.al-tool-icon svg { width: 20px; height: 20px; fill: #fff; }

.al-tool-name {
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.al-tool-desc {
  font-size: 12px;
  color: var(--al-muted);
  line-height: 1.45;
  font-weight: 600;
}

.al-wiki-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 16px;
  padding: 18px;
  border-radius: var(--al-radius-lg);
  border: 1px solid rgba(255, 0, 60, 0.2);
  background: linear-gradient(135deg, rgba(255, 0, 60, 0.08), rgba(14, 14, 18, 0.92));
  overflow: hidden;
  position: relative;
}

.al-wiki-card::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 0, 60, 0.2), transparent 70%);
  pointer-events: none;
}

.al-wiki-copy { position: relative; z-index: 1; }

.al-wiki-title {
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.al-wiki-title span { color: var(--al-red); }

.al-wiki-text {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--al-muted);
  line-height: 1.55;
  font-weight: 600;
}

.al-wiki-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 0, 60, 0.15);
  transition: 0.25s ease;
}

.al-wiki-link:hover {
  background: rgba(255, 0, 60, 0.28);
  transform: translateY(-1px);
}

.al-wiki-preview {
  position: relative;
  z-index: 1;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 10, 14, 0.8);
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.al-wiki-item {
  aspect-ratio: 1;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  position: relative;
  transition: opacity 0.45s ease, transform 0.45s ease, box-shadow 0.45s ease;
}

.al-wiki-item.is-swapping {
  opacity: 0.35;
  transform: scale(0.96);
}

.al-wiki-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 6px;
  background: rgba(8, 8, 12, 0.55);
  transition: opacity 0.45s ease;
}

.al-wiki-item--placeholder {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.al-recruit-box {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(15, 15, 20, 0.8);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.al-recruit-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 0, 60, 0.5), transparent);
}

.al-recruit-lead {
  margin: 0 0 20px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--al-muted);
  font-weight: 500;
}

.al-recruit-hint {
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

.al-recruit-hint strong {
  color: #fff;
}

.al-recruit-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.lb2-modal-open {
  overflow: hidden;
}

/* Наша Лидерка — метки на фото (hover) */
.al-leader-tags {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.al-leader-tag {
  position: absolute;
  left: calc(var(--tag-x) * 1%);
  top: calc(var(--tag-y) * 1%);
  width: calc(var(--tag-w) * 1%);
  height: calc(var(--tag-h) * 1%);
  pointer-events: auto;
  z-index: 3;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  outline: none;
}

.al-leader-tag-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.al-leader-tag-hit {
  position: absolute;
  inset: 0;
  border-radius: 999px;
}

.al-leader-tag-frame {
  position: absolute;
  inset: -4px;
  pointer-events: none;
}

.al-leader-tag-orbit {
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  opacity: 0;
  background: conic-gradient(from 0deg, rgba(255, 0, 60, 0.95), rgba(255, 255, 255, 0.95), rgba(255, 0, 60, 0.35), rgba(255, 255, 255, 0.95), rgba(255, 0, 60, 0.95));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  transform: scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.al-leader-tag-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.al-leader-tag-path {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.al-leader-tag-path--track {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1.5px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.al-leader-tag-path--draw {
  stroke: url(#alLeaderTagStroke);
  stroke-width: 2.5px;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
  filter: drop-shadow(0 0 8px rgba(255, 0, 60, 0.45));
}

.al-leader-tag-spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.95), 0 0 18px rgba(255, 0, 60, 0.65);
  opacity: 0;
  transform: scale(0.4);
}

.al-leader-tag-spark--1 { top: 0; left: 50%; margin-left: -3px; }
.al-leader-tag-spark--2 { bottom: 0; left: 50%; margin-left: -3px; }
.al-leader-tag-spark--3 { left: 0; top: 50%; margin-top: -3px; }
.al-leader-tag-spark--4 { right: 0; top: 50%; margin-top: -3px; }

.al-leader-tag-card {
  position: absolute;
  left: 50%;
  top: calc(100% + 14px);
  transform: translateX(-50%) translateY(10px) scale(0.96);
  width: min(220px, calc(100vw - 32px));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 5;
  transition:
    opacity 0.28s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.28s ease;
}

.al-leader-tag-card-glow {
  position: absolute;
  inset: -16px -8px -8px;
  background: radial-gradient(circle at 50% 0%, rgba(255, 0, 60, 0.22), transparent 62%);
  opacity: 0.8;
  pointer-events: none;
}

.al-leader-tag-card-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(28, 28, 34, 0.96) 0%, rgba(12, 12, 16, 0.94) 100%);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 0, 60, 0.08) inset;
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.al-leader-tag-card-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  max-width: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 40px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(255, 0, 60, 0.18);
}

.al-leader-tag-card-avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 0, 60, 0.35), rgba(255, 255, 255, 0.08));
}

.al-leader-tag-card-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.al-leader-tag-card-kicker {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--al-red);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.al-leader-tag-card-name {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  overflow: hidden;
}

.al-leader-tag-card-name span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.al-leader-tag-card-discord {
  font-size: 10px;
  font-weight: 600;
  color: var(--al-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.al-leader-tag-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 3px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.al-leader-tag-card-cta svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.al-leader-tag:hover,
.al-leader-tag:focus-visible,
.al-leader-tag.is-active {
  z-index: 12;
}

.al-leader-tag:hover .al-leader-tag-orbit,
.al-leader-tag:focus-visible .al-leader-tag-orbit,
.al-leader-tag.is-active .al-leader-tag-orbit {
  opacity: 1;
  transform: scale(1);
  animation: al-leader-orbit-spin 2.4s linear infinite;
}

.al-leader-tag:hover .al-leader-tag-path--track,
.al-leader-tag:focus-visible .al-leader-tag-path--track,
.al-leader-tag.is-active .al-leader-tag-path--track {
  opacity: 1;
}

.al-leader-tag:hover .al-leader-tag-path--draw,
.al-leader-tag:focus-visible .al-leader-tag-path--draw,
.al-leader-tag.is-active .al-leader-tag-path--draw {
  opacity: 1;
  animation: al-leader-stroke-draw 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.al-leader-tag:hover .al-leader-tag-spark,
.al-leader-tag:focus-visible .al-leader-tag-spark,
.al-leader-tag.is-active .al-leader-tag-spark {
  animation: al-leader-spark-pulse 1.6s ease-in-out infinite;
}

.al-leader-tag:hover .al-leader-tag-spark--1,
.al-leader-tag:focus-visible .al-leader-tag-spark--1,
.al-leader-tag.is-active .al-leader-tag-spark--1 { animation-delay: 0s; opacity: 1; }
.al-leader-tag:hover .al-leader-tag-spark--2,
.al-leader-tag:focus-visible .al-leader-tag-spark--2,
.al-leader-tag.is-active .al-leader-tag-spark--2 { animation-delay: 0.2s; opacity: 1; }
.al-leader-tag:hover .al-leader-tag-spark--3,
.al-leader-tag:focus-visible .al-leader-tag-spark--3,
.al-leader-tag.is-active .al-leader-tag-spark--3 { animation-delay: 0.4s; opacity: 1; }
.al-leader-tag:hover .al-leader-tag-spark--4,
.al-leader-tag:focus-visible .al-leader-tag-spark--4,
.al-leader-tag.is-active .al-leader-tag-spark--4 { animation-delay: 0.6s; opacity: 1; }

.al-leader-tag:hover .al-leader-tag-card,
.al-leader-tag:focus-visible .al-leader-tag-card,
.al-leader-tag.is-active .al-leader-tag-card {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
}

.al-leader-tag--flip-up .al-leader-tag-card {
  top: auto;
  bottom: calc(100% + 14px);
  transform: translateX(-50%) translateY(-10px) scale(0.96);
}

.al-leader-tag--flip-up:hover .al-leader-tag-card,
.al-leader-tag--flip-up:focus-visible .al-leader-tag-card,
.al-leader-tag--flip-up.is-active .al-leader-tag-card {
  transform: translateX(-50%) translateY(0) scale(1);
}

@keyframes al-leader-orbit-spin {
  to { transform: rotate(360deg); }
}

@keyframes al-leader-stroke-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes al-leader-spark-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.55); }
  50% { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .al-leader-tag-orbit,
  .al-leader-tag-path--draw,
  .al-leader-tag-spark {
    animation: none !important;
  }

  .al-leader-tag:hover .al-leader-tag-path--draw,
  .al-leader-tag:focus-visible .al-leader-tag-path--draw,
  .al-leader-tag.is-active .al-leader-tag-path--draw {
    stroke-dashoffset: 0;
  }
}

/* --- Animated action buttons --- */
.al-icon-anim {
  width: 24px;
  height: 24px;
  overflow: visible;
  transition: 0.3s;
}

.al-btn-icon {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.al-btn-label {
  position: relative;
  z-index: 2;
}

.al-apply-btn,
.auth-primary-btn,
.discord-btn {
  width: 100%;
  background: rgba(255, 0, 60, 0.1);
  border: 1px solid rgba(255, 0, 60, 0.4);
  color: #fff;
  padding: 16px;
  border-radius: 12px;
  font-family: var(--al-font);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  letter-spacing: 1px;
  text-decoration: none;
}

.al-apply-btn::after,
.auth-primary-btn::after,
.discord-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--al-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 1;
  pointer-events: none;
}

.al-apply-btn:hover,
.auth-primary-btn:hover,
.discord-btn:hover {
  border-color: var(--al-red);
  box-shadow: 0 0 25px rgba(255, 0, 60, 0.4);
  transform: translateY(-2px);
}

.al-apply-btn:hover::after,
.auth-primary-btn:hover::after,
.discord-btn:hover::after {
  transform: scaleX(1);
}

.al-apply-btn:focus-visible,
.auth-primary-btn:focus-visible,
.discord-btn:focus-visible,
.al-codex-link-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 0, 60, 0.28);
}

.al-apply-btn .al-icon-anim,
.auth-primary-btn .al-icon-anim {
  color: #fff;
}

@keyframes alDashUp {
  0% { stroke-dashoffset: 20; }
  100% { stroke-dashoffset: 0; }
}

.al-uplink-beam {
  stroke-dasharray: 4 6;
  animation: alDashUp 3s linear infinite;
  transition: 0.3s;
}

.al-uplink-arrow {
  transition: 0.3s;
  transform-origin: center;
}

.al-apply-btn:hover .al-uplink-beam,
.auth-primary-btn:hover .al-uplink-beam {
  animation-duration: 0.4s;
  stroke: #fff;
  filter: drop-shadow(0 0 5px #fff);
}

.al-apply-btn:hover .al-uplink-arrow,
.auth-primary-btn:hover .al-uplink-arrow {
  transform: translateY(-4px);
  stroke: #fff;
  filter: drop-shadow(0 0 5px #fff);
}

.al-apply-btn-link {
  text-decoration: none;
}

.al-codex-link-btn {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--al-muted);
  padding: 16px;
  border-radius: 12px;
  font-family: var(--al-font);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
}

.al-codex-link-btn .al-icon-anim {
  color: var(--al-muted);
}

.al-codex-link-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.al-codex-link-btn:hover .al-icon-anim {
  color: #fff;
}

@keyframes alChevPulse {
  0% { stroke: var(--al-muted); transform: translateX(0); }
  50% { stroke: #fff; transform: translateX(4px); filter: drop-shadow(0 0 5px #fff); }
  100% { stroke: var(--al-muted); transform: translateX(0); }
}

.al-chev {
  transition: 0.3s;
}

.al-codex-link-btn:hover .al-chev-1 {
  animation: alChevPulse 0.9s infinite 0s;
}

.al-codex-link-btn:hover .al-chev-2 {
  animation: alChevPulse 0.9s infinite 0.15s;
}

.al-codex-link-btn:hover .al-chev-3 {
  animation: alChevPulse 0.9s infinite 0.3s;
}

.auth-card {
  background: var(--al-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 0, 60, 0.3);
  border-radius: 20px;
  padding: 34px 28px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), inset 0 0 30px rgba(255, 0, 60, 0.05);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--al-red), transparent);
  opacity: 0.65;
}

.bg-watermark {
  position: absolute;
  right: -24px;
  bottom: -36px;
  font-size: 130px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.015);
  pointer-events: none;
  transform: rotate(-10deg);
}

.content-z { position: relative; z-index: 1; }

.logo-container { margin-bottom: 22px; display: flex; flex-direction: column; align-items: center; }

.logo-shield {
  width: 68px;
  height: 68px;
  background: rgba(255, 0, 60, 0.1);
  border: 2px solid var(--al-red);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 0 20px var(--al-red-glow);
  transform: rotate(45deg);
}

.logo-shield svg {
  width: 30px;
  height: 30px;
  fill: #fff;
  transform: rotate(-45deg);
}

.brand-text {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.brand-text span {
  color: var(--al-red);
  text-shadow: 0 0 10px var(--al-red-glow);
}

.auth-user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: 14px;
  border: 1px solid var(--al-line);
  background: rgba(255, 255, 255, 0.03);
}

.auth-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 0, 60, 0.45);
  flex-shrink: 0;
}

.auth-user-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.auth-user-meta strong {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-user-meta span {
  font-size: 11px;
  color: var(--al-muted);
  font-weight: 600;
}

.auth-steps {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.auth-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--al-muted);
}

.auth-step.is-done {
  color: rgba(255, 255, 255, 0.88);
}

.auth-step-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
}

.auth-step.is-done .auth-step-dot {
  border-color: #7dffb0;
  background: #7dffb0;
  box-shadow: 0 0 10px rgba(125, 255, 176, 0.45);
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}

.auth-secondary-link {
  font-size: 11px;
  font-weight: 700;
  color: var(--al-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-secondary-link:hover {
  color: #fff;
}

.auth-oauth-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 0, 60, 0.35);
  background: rgba(255, 0, 60, 0.1);
  color: #ff9aaa;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  text-align: left;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--al-muted);
  line-height: 1.55;
  margin-bottom: 28px;
  font-weight: 500;
}

.discord-icon {
  width: 22px;
  height: 22px;
  fill: #fff;
  position: relative;
  z-index: 2;
}

.auth-primary-btn-link {
  text-decoration: none;
}

.al-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.82);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.al-modal-overlay.is-open { display: flex; }

.al-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 0, 60, 0.5) rgba(255, 255, 255, 0.06);
}

.al-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.al-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
}
.al-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 0, 60, 0.55), rgba(255, 0, 60, 0.35));
  border-radius: 999px;
}

.al-modal {
  width: min(520px, 100%);
  max-height: calc(100vh - 32px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #151519;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.al-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.al-modal-title {
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.al-modal-close,
.al-apply-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #1b1b21;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.al-modal-close:hover,
.al-apply-close:hover {
  border-color: var(--al-red);
  color: var(--al-red);
}

/* ── Форма заявки (компактная, без скролла) ── */
.al-apply-modal {
  width: min(560px, 100%);
  border-color: rgba(255, 0, 60, 0.22);
  --al-apply-field-bg: rgba(12, 12, 18, 0.9);
  --al-apply-field-border: rgba(255, 255, 255, 0.1);
}

.al-apply-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.al-apply-body {
  padding: 14px 22px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.al-apply-hint {
  margin: 0 0 2px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--al-muted);
  font-weight: 600;
}

.al-apply-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.al-apply-footer .al-btn-secondary,
.al-apply-footer .al-btn-primary {
  flex: 0 1 auto;
  min-width: 120px;
  padding: 12px 18px;
  font-size: 12px;
}

.al-field--compact { margin: 0; }
.al-field--last { margin-bottom: 0; }

.al-field-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--al-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.al-input,
.al-textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #2a2a31;
  background: #1b1b21;
  color: #fff;
  font-family: var(--al-font);
  font-size: 14px;
  padding: 11px 13px;
  outline: none;
  transition: border-color 0.2s ease;
}

/* Поля формы заявки — один цвет везде */
.al-apply-body .al-field .al-input,
.al-apply-body .al-field .al-textarea,
.al-apply-body .al-tags-box {
  background: var(--al-apply-field-bg);
  border: 1px solid var(--al-apply-field-border);
  font-size: 13px;
}

.al-apply-body .al-field .al-input,
.al-apply-body .al-field .al-textarea {
  padding: 11px 12px;
}

.al-apply-body .al-tags-box {
  padding: 7px 10px;
  min-height: 42px;
}

.al-apply-body .al-tags-input {
  background: transparent;
  font-size: 13px;
  padding: 4px 2px;
}

.al-apply-body .al-tags-input:-webkit-autofill,
.al-apply-body .al-tags-input:-webkit-autofill:hover,
.al-apply-body .al-tags-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(12, 12, 18, 1) inset;
  -webkit-text-fill-color: #fff;
}

.al-textarea {
  min-height: 56px;
  max-height: 56px;
  resize: none;
  line-height: 1.35;
}

.al-input:focus,
.al-textarea:focus {
  border-color: rgba(255, 0, 60, 0.5);
}

.al-age-indicator { margin-top: 8px; }

.al-age-bars {
  display: flex;
  gap: 5px;
  height: 5px;
}

.al-age-bar {
  flex: 1;
  border-radius: 3px;
  background: #2a2a31;
  transition: background 0.2s ease;
}

.al-age-bar.fill-red { background: #ff3b3b; }
.al-age-bar.fill-yellow { background: #ffc93b; }
.al-age-bar.fill-green { background: #38d97a; }

.al-age-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  gap: 8px;
}

.al-age-status {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--al-muted);
}

.al-age-status.red { color: #ff3b3b; }
.al-age-status.yellow { color: #ffc93b; }
.al-age-status.green { color: #38d97a; }

.al-age-hint {
  font-size: 10px;
  color: var(--al-muted);
}

.al-tags-box {
  width: 100%;
  background: var(--al-apply-field-bg, #1b1b21);
  border: 1px solid var(--al-apply-field-border, #2a2a31);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 42px;
  cursor: text;
  transition: border-color 0.2s ease;
}

.al-tags-box:focus-within { border-color: rgba(255, 0, 60, 0.5); }

.al-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--al-apply-field-border, #2a2a31);
  border-radius: 20px;
  padding: 4px 6px 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.al-tag-remove {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: #25252d;
  color: var(--al-muted);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.al-tag-remove:hover {
  background: var(--al-red);
  color: #fff;
}

.al-tags-input {
  flex: 1;
  min-width: 90px;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font-family: var(--al-font);
  font-size: 14px;
  padding: 3px 4px;
  box-shadow: none;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}

.al-tags-input:-webkit-autofill,
.al-tags-input:-webkit-autofill:hover,
.al-tags-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(12, 12, 18, 1) inset;
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
}

.al-tags-input::placeholder { color: var(--al-muted); }
.al-tags-input:disabled { opacity: 0.45; }

.al-field-hint.limit { color: #ff9aaa; }

.al-field-hint--validate:empty {
  display: none;
  margin: 0;
  min-height: 0;
}

.al-modal-body {
  padding: 8px 20px 20px;
  display: grid;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.al-select {
  position: relative;
}

.al-select.is-open .al-select-trigger {
  border-color: rgba(255, 0, 60, 0.45);
  box-shadow: 0 0 0 1px rgba(255, 0, 60, 0.12);
}

.al-select.is-disabled { opacity: 0.55; pointer-events: none; }

.al-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 12, 18, 0.92);
  color: #fff;
  font-family: var(--al-font);
  padding: 11px 12px;
  cursor: pointer;
  transition: 0.22s ease;
}

.al-select-value {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.al-select-prefix {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--al-muted);
}

.al-select-label {
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  width: 100%;
}

.al-select-placeholder {
  font-size: 13px;
  font-weight: 700;
  color: var(--al-muted);
}

.al-select-picked {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.al-server-picked-name {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.al-select-label .al-server-emoji,
.al-select-picked .al-server-emoji,
.al-select-option .al-server-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.al-select-label img,
.al-select-picked img,
.al-select-option img,
.al-select-label .server-emoji-img,
.al-select-option .server-emoji-img {
  width: 22px;
  height: 22px;
  max-width: 22px;
  max-height: 22px;
  object-fit: contain;
  display: block;
}

.al-select-option .al-server-emoji {
  width: 20px;
  height: 20px;
}

.al-select-option img,
.al-select-option .server-emoji-img {
  width: 20px;
  height: 20px;
  max-width: 20px;
  max-height: 20px;
}

.al-select-chevron {
  width: 18px;
  height: 18px;
  fill: var(--al-muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.al-select.is-open .al-select-chevron {
  transform: rotate(180deg);
  fill: var(--al-red);
}

.al-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  max-height: 220px;
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(14, 14, 20, 0.98);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  padding: 6px;
}

.al-select-option {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  font-family: var(--al-font);
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  transition: 0.2s ease;
}

.al-select-option:hover,
.al-select-option.is-active {
  background: rgba(255, 0, 60, 0.1);
  border-color: rgba(255, 0, 60, 0.22);
}

.al-select-option.theme-orlando:hover,
.al-select-option.theme-orlando.is-active {
  background: rgba(255, 140, 0, 0.1);
  border-color: rgba(255, 140, 0, 0.25);
}

.al-select-option.theme-portland:hover,
.al-select-option.theme-portland.is-active {
  background: rgba(0, 180, 216, 0.1);
  border-color: rgba(0, 180, 216, 0.25);
}

.al-select-option.theme-washington:hover,
.al-select-option.theme-washington.is-active {
  background: rgba(120, 90, 255, 0.1);
  border-color: rgba(120, 90, 255, 0.25);
}

.al-server-name {
  font-size: 13px;
  font-weight: 800;
}

.al-server-meta {
  font-size: 10px;
  font-weight: 700;
  color: var(--al-muted);
  white-space: nowrap;
}

.al-field label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: var(--al-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.al-field input:not(.al-tags-input),
.al-field select,
.al-field textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 12, 18, 0.9);
  color: #fff;
  font-family: var(--al-font);
  font-size: 13px;
  padding: 11px 12px;
  outline: none;
  transition: border-color 0.2s ease;
}

.al-field textarea { min-height: 88px; resize: vertical; }

.al-field input:not(.al-tags-input):focus,
.al-field select:focus,
.al-field textarea:focus {
  border-color: rgba(255, 0, 60, 0.45);
}

.al-apply-body .al-field .al-input,
.al-apply-body .al-field .al-textarea,
.al-apply-body .al-tags-box {
  background: var(--al-apply-field-bg);
  border-color: var(--al-apply-field-border);
}

.al-apply-body .al-tags-input {
  background: transparent;
}

.al-modal-note {
  font-size: 11px;
  color: var(--al-muted);
  line-height: 1.5;
  font-weight: 600;
}

.al-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.al-btn-secondary {
  flex: 1;
  min-width: 120px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--al-line);
  background: transparent;
  color: #fff;
  font-family: var(--al-font);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  cursor: pointer;
}

.al-btn-primary {
  flex: 1.4;
  min-width: 140px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 0, 60, 0.45);
  background: linear-gradient(135deg, #ff003c, #c8002f);
  color: #fff;
  font-family: var(--al-font);
  font-weight: 900;
  font-size: 11px;
  text-transform: uppercase;
  cursor: pointer;
}

.al-form-status {
  font-size: 12px;
  font-weight: 700;
  min-height: 18px;
}

.al-form-status.ok { color: #7dffb0; }
.al-form-status.err { color: #ff9aaa; }

.al-field-hint {
  margin: 6px 0 0;
  min-height: 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--al-muted);
}

.al-field-hint.is-ok { color: #7dffb0; }
.al-field-hint.is-err { color: #ff9aaa; }
.al-field-hint.is-checking { color: var(--al-muted); }

.al-guide-modal,
.al-acc-modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 32px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.al-acc-head {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.al-acc-close {
  background: #1b1b21;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--al-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.al-acc-close:hover {
  border-color: var(--al-red);
  color: var(--al-red);
}

.al-acc-modal-body {
  padding: 14px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.al-acc-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.al-acc-item.is-completed {
  border-color: rgba(255, 0, 60, 0.18);
}

.al-acc-item.is-active {
  border-color: rgba(255, 0, 60, 0.45);
  background: rgba(255, 0, 60, 0.04);
}

.al-acc-header {
  width: 100%;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

.al-acc-header:hover {
  background: rgba(255, 255, 255, 0.02);
}

.al-acc-num {
  width: 28px;
  height: 28px;
  background: #1a1a24;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  color: var(--al-muted);
  border: 1px solid transparent;
  flex-shrink: 0;
}

.al-acc-item.is-active .al-acc-num {
  background: rgba(255, 0, 60, 0.12);
  color: var(--al-red);
  border-color: rgba(255, 0, 60, 0.28);
}

.al-acc-item.is-completed .al-acc-num {
  background: var(--al-red);
  color: #fff;
  border-color: var(--al-red);
}

.al-acc-title {
  flex: 1;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--al-muted);
  letter-spacing: 0.4px;
  line-height: 1.25;
}

.al-acc-item.is-active .al-acc-title { color: #fff; }
.al-acc-item.is-completed .al-acc-title { color: rgba(255, 255, 255, 0.75); }

.al-acc-icon {
  color: var(--al-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.al-acc-item.is-active .al-acc-icon {
  transform: rotate(180deg);
  color: var(--al-red);
}

.al-acc-panel {
  display: none;
}

.al-acc-item.is-active .al-acc-panel {
  display: block;
}

.al-acc-panel-inner {
  overflow: hidden;
}

.al-acc-pad {
  padding: 0 14px 12px 54px;
}

.al-acc-text {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--al-muted);
  line-height: 1.5;
  font-weight: 500;
}

.al-acc-text-muted {
  margin-bottom: 0;
  font-size: 11px;
}

.al-acc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.al-acc-list li {
  font-size: 12px;
  color: #ccc;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.02);
  padding: 8px 10px;
  border-radius: 7px;
  line-height: 1.4;
}

.al-acc-list li::before {
  content: '■';
  color: var(--al-red);
  font-size: 8px;
  margin-top: 3px;
  flex-shrink: 0;
}

.al-acc-footer {
  padding: 14px 22px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.al-acc-footer-left {
  display: flex;
  gap: 12px;
}

.al-acc-btn-ghost,
.al-acc-btn-primary {
  padding: 12px 18px;
  border-radius: 8px;
  font-family: var(--al-font);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  letter-spacing: 0.4px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.al-acc-btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--al-muted);
  display: none;
}

.al-acc-btn-ghost.is-visible { display: block; }

.al-acc-btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.al-acc-btn-primary {
  background: linear-gradient(135deg, #ff003c, #c8002f);
  border: 1px solid rgba(255, 0, 60, 0.45);
  color: #fff;
  min-width: 160px;
}

.al-acc-btn-primary:hover {
  background: #e60036;
}

@media (max-width: 640px) {
  .al-acc-head,
  .al-acc-modal-body,
  .al-acc-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .al-acc-pad {
    padding-left: 20px;
  }

  .al-acc-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .al-acc-footer-left {
    width: 100%;
    justify-content: space-between;
  }

  .al-acc-btn-primary {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 1024px) {
  .auth-shell {
    max-width: 680px;
  }

  .al-showcase-stage {
    padding-left: 0;
  }

  .al-nav-rail {
    position: relative;
    top: auto;
    bottom: auto;
    width: auto;
    height: auto;
    margin-bottom: 16px;
  }

  .al-nav-numbers {
    position: relative;
    top: auto;
    flex-direction: row;
    gap: 12px;
    padding-bottom: 2px;
    transform: none !important;
  }

  .al-nav-marker {
    left: 10px;
    top: auto;
    bottom: -6px;
    width: 20px;
    height: 2px;
    transform: translateX(0);
  }

  .al-nav-numbers.is-on-back .al-nav-marker {
    transform: translateX(52px);
  }

  .al-nav-numbers::after {
    display: none;
  }

  .auth-aside {
    order: -1;
    position: static;
  }

  .al-wiki-card { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .auth-shell { padding: 18px 14px 28px; }
  .auth-card { padding: 32px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-showcase,
  .auth-aside,
  .al-wiki-item,
  .al-bg__bloom,
  .al-bg__mesh,
  .auth-card::before,
  .al-showcase-stage.is-animating .al-fx-wipe,
  .al-book.is-flipping .al-book-face.al-face-in,
  .al-book.is-flipping .al-book-face.al-face-out {
    animation-duration: 0.2s !important;
    animation-delay: 0s !important;
  }

  .al-book-face {
    will-change: auto;
  }

  .al-bg__bloom,
  .al-bg__mesh {
    animation: none !important;
    transition: none !important;
  }

  .al-uplink-beam,
  .al-codex-link-btn:hover .al-chev-1,
  .al-codex-link-btn:hover .al-chev-2,
  .al-codex-link-btn:hover .al-chev-3 {
    animation: none !important;
  }
}

/* --- Codex and preview (DEVIANT style) --- */

.al-block-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--al-red);
  margin-bottom: 8px;
}

.al-block-title {
  margin: 0 0 10px;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.al-block-lead {
  margin: 0 0 18px;
  max-width: 720px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--al-muted);
  font-weight: 500;
}

.al-codex-block {
  padding: 18px 0 4px;
}

.al-rules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.al-rule-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--al-radius-sm);
  background: rgba(16, 16, 20, 0.96);
  padding: 18px 16px 16px;
  min-height: 132px;
}

.al-rule-index {
  position: absolute;
  top: 6px;
  right: 10px;
  font-size: clamp(46px, 5.5vw, 68px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(255, 0, 60, 0.11);
  pointer-events: none;
  user-select: none;
}

.al-rule-title {
  position: relative;
  margin: 0 0 10px;
  padding: 0 36px 10px 0;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.35px;
  line-height: 1.35;
  border-bottom: 2px solid var(--al-red);
}

.al-rule-text {
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
}

.al-preview-body .auth-shell { display: none; }

.al-preview-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(12px);
}

.al-preview-bar-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
}

.al-preview-bar-inner strong {
  font-size: 13px;
  text-transform: uppercase;
}

.al-preview-bar-inner span {
  color: var(--al-muted);
}

.al-preview-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

.al-preview-link {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.al-preview-link:hover {
  border-color: rgba(255, 0, 60, 0.35);
  color: var(--al-red);
}

.al-preview-main {
  position: relative;
  z-index: 10;
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.al-preview-main--book {
  max-width: 860px;
}

.al-showcase-stage--solo {
  max-width: 760px;
  margin: 0 auto;
}

@media (max-width: 980px) {
  .al-rules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .al-rules-grid {
    grid-template-columns: 1fr;
  }
}

.al-apply-modal .al-select-trigger {
  padding: 11px 12px;
  border-color: var(--al-apply-field-border);
  background: var(--al-apply-field-bg);
  border-radius: 10px;
  font-size: 13px;
}

@media (max-height: 740px) {
  .al-apply-body {
    gap: 8px;
    padding: 10px 18px 8px;
  }

  .al-apply-hint {
    font-size: 11px;
    margin-bottom: 0;
  }

  .al-field-label {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .al-input,
  .al-textarea,
  .al-apply-modal .al-select-trigger {
    padding: 9px 11px;
    font-size: 13px;
  }

  .al-textarea {
    min-height: 48px;
    max-height: 48px;
  }

  .al-tags-box { min-height: 40px; }

  .al-apply-footer {
    padding: 12px 18px 14px;
  }

  .al-acc-modal-body {
    padding: 10px 18px;
    gap: 6px;
  }

  .al-acc-pad {
    padding: 0 12px 10px 46px;
  }

  .al-acc-list li {
    font-size: 11px;
    padding: 6px 8px;
  }
}