/* ===== HEADSHOT — страница входа / регистрации ===== */

.hs-page-login.hs-body {
  --auth-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --auth-shell-max: min(440px, 100%);
  --auth-accent: var(--primary, #6236ff);
  --auth-accent-2: var(--primary-2, #4520c0);
  --auth-accent-soft: rgba(98, 54, 255, 0.28);
  --auth-accent-hover: #7c5cff;
}

.hs-page-login .hs-main {
  padding-top: calc(84px + env(safe-area-inset-top, 0));
  padding-bottom: 0;
}

.hs-page-login.hs-body:has(.hs-auth--centered) .hs-footer {
  display: none;
}

@media (min-width: 981px) {
  .hs-page-login.hs-body {
    --auth-shell-max: min(460px, 100%);
  }
}

@media (max-width: 980px) {
  .hs-page-login .hs-main {
    padding-top: calc(72px + env(safe-area-inset-top, 0));
  }

  .hs-page-login.hs-body {
    --auth-shell-max: min(420px, 100%);
  }
}

.hs-page-login .hs-orb--one {
  opacity: 0.55;
  top: -8%;
  left: -12%;
}

.hs-page-login .hs-orb--two {
  opacity: 0.4;
  bottom: -5%;
  right: -8%;
}

/* --- Section --- */
.hs-auth {
  position: relative;
  min-height: calc(100vh - 84px - env(safe-area-inset-top, 0));
  min-height: calc(100dvh - 84px - env(safe-area-inset-top, 0));
  display: flex;
  align-items: center;
  padding: clamp(1.25rem, 3vh, 2rem) 0 clamp(2rem, 5vh, 3rem);
  font-family: var(--auth-font);
  overflow-x: clip;
  overflow-y: visible;
}

@media (max-width: 980px) {
  .hs-auth {
    min-height: calc(100vh - 72px - env(safe-area-inset-top, 0));
    min-height: calc(100dvh - 72px - env(safe-area-inset-top, 0));
  }
}

.hs-auth__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hs-auth__mesh {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
}

.hs-auth__mesh--a {
  width: min(52vw, 520px);
  height: min(52vw, 520px);
  top: 10%;
  left: 50%;
  transform: translateX(-55%);
  background: radial-gradient(circle, rgba(98, 54, 255, 0.45) 0%, transparent 68%);
}

.hs-auth__mesh--b {
  width: min(40vw, 400px);
  height: min(40vw, 400px);
  bottom: 8%;
  right: 50%;
  transform: translateX(45%);
  background: radial-gradient(circle, rgba(69, 32, 192, 0.35) 0%, transparent 70%);
}

.hs-auth__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 75%);
  opacity: 0.5;
}

.hs-auth__layout {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-inline: auto;
}

.hs-auth__panel-lead {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(245, 242, 255, 0.62);
}

.hs-auth__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(98, 54, 255, 0.35);
  border-radius: 14px;
  --hs-btn-vfill-bg: linear-gradient(120deg, var(--primary), var(--primary-2));
  --hs-btn-vfill-rest: 1;
  --hs-btn-vfill-hover: 0;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(69, 32, 192, 0.35);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.hs-auth__submit:hover,
.hs-auth__submit:focus-visible {
  filter: brightness(1.1);
  background: transparent;
  color: #fff;
}

.hs-auth__divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(245, 242, 255, 0.45);
}

.hs-auth__divider::before,
.hs-auth__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

#login-panel .hs-auth__steam {
  margin-top: 0;
}

.hs-auth__shell-title {
  margin: 0 0 1.35rem;
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #fff;
}

.hs-auth__shell-title span {
  background: linear-gradient(120deg, #c4b5fd 0%, #8b5cf6 45%, #6236ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Shell card (login) --- */
.hs-auth__shell {
  width: 100%;
  max-width: var(--auth-shell-max);
  margin-inline: auto;
  position: relative;
  padding: clamp(1.5rem, 2.5vw, 2rem) clamp(1.35rem, 3vw, 2rem);
  border-radius: 28px;
  background: rgba(14, 16, 26, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.hs-auth__shell-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(98, 54, 255, 0.35), transparent 40%, rgba(69, 32, 192, 0.2));
  z-index: -1;
  opacity: 0.65;
  pointer-events: none;
}

/* Tabs */
.hs-auth__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  padding: 0.35rem;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.hs-auth__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.72rem 0.65rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: rgba(245, 242, 255, 0.55);
  transition:
    color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.hs-auth__tab svg {
  width: 1rem;
  height: 1rem;
  opacity: 0.85;
}

.hs-auth__tab:hover,
.hs-auth__tab:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.hs-auth__tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(98, 54, 255, 0.55), rgba(69, 32, 192, 0.45));
  box-shadow: 0 4px 20px rgba(98, 54, 255, 0.35);
}

/* Messages */
.hs-auth__messages {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.hs-auth__message {
  margin: 0 0 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.hs-auth__message--error,
.hs-auth__messages .error {
  color: #fecaca;
  background: rgba(220, 38, 38, 0.18);
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.hs-auth__message--success,
.hs-auth__messages .success {
  color: #bbf7d0;
  background: rgba(22, 163, 74, 0.18);
  border: 1px solid rgba(74, 222, 128, 0.35);
}

.hs-auth__message--info,
.hs-auth__message--warning,
.hs-auth__messages .info,
.hs-auth__messages .warning {
  color: #fde68a;
  background: rgba(217, 119, 6, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.hs-auth__message code {
  font-size: 0.85em;
  opacity: 0.9;
}

/* Panels */
.hs-auth__panel[hidden] {
  display: none !important;
}

.hs-auth__panel-head {
  margin-bottom: 1.35rem;
}

.hs-auth__panel-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

/* Steam CTA — login */
.hs-auth__steam {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(98, 54, 255, 0.35);
  border-radius: 14px;
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  box-shadow: 0 16px 34px rgba(69, 32, 192, 0.35);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.hs-auth__steam:hover,
.hs-auth__steam:focus-visible {
  filter: brightness(1.1);
  border-color: rgba(196, 181, 253, 0.55);
  background: linear-gradient(120deg, #7c5cff 0%, var(--primary) 52%, var(--primary-2) 100%);
  color: #fff;
}

.hs-auth__steam-badge {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
}

.hs-auth__steam-badge svg {
  width: 1.35rem;
  height: auto;
}

.hs-auth__steam-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.hs-auth__steam-label {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hs-auth__steam-arrow {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  opacity: 0.7;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hs-auth__steam:hover .hs-auth__steam-arrow,
.hs-auth__steam:focus-visible .hs-auth__steam-arrow {
  transform: translateX(3px);
  opacity: 1;
}

/* Form */
.hs-auth__form {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hs-auth__field {
  margin-bottom: 0.85rem;
}

.hs-auth__field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.hs-auth__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(245, 242, 255, 0.9);
}

.hs-auth__label-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.hs-auth__field-icon {
  width: 1.1rem;
  height: 1.1rem;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.hs-auth__req {
  color: var(--auth-accent);
  font-weight: 700;
}

.hs-auth__field input {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.hs-auth__field input::placeholder {
  color: rgba(245, 242, 255, 0.35);
}

.hs-auth__field input:hover {
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(0, 0, 0, 0.4);
}

.hs-auth__field input:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.75);
  box-shadow: 0 0 0 3px rgba(98, 54, 255, 0.25);
  background: rgba(0, 0, 0, 0.45);
}

.hs-auth__password-wrap {
  position: relative;
}

.hs-auth__password-wrap input {
  padding-right: 2.75rem;
}

.hs-auth__password-toggle {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(245, 242, 255, 0.45);
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 0.15s ease, background 0.15s ease;
}

.hs-auth__password-toggle:hover,
.hs-auth__password-toggle:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.hs-auth__password-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
}

/* Switch link */
.hs-auth__switch {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: rgba(245, 242, 255, 0.5);
}

.hs-auth__switch a {
  color: #c4b5fd;
  font-weight: 600;
  text-decoration: none;
}

.hs-auth__switch a:hover,
.hs-auth__switch a:focus-visible {
  color: #ede9fe;
  text-decoration: underline;
}

/* Footer */
.hs-auth__foot {
  margin-top: 1.5rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hs-auth__foot-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(245, 242, 255, 0.45);
  text-decoration: none;
  transition: color 0.15s ease;
}

.hs-auth__foot-link svg {
  width: 1rem;
  height: 1rem;
}

.hs-auth__foot-link:hover,
.hs-auth__foot-link:focus-visible {
  color: #fff;
}

.hs-auth__legal {
  display: grid;
  gap: 8px;
  margin: 14px 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.hs-auth__legal-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.hs-auth__legal-item input {
  margin-top: 3px;
  flex-shrink: 0;
}

.hs-auth__legal-item a {
  color: #c4b5fd;
  text-decoration: underline;
}

.hs-auth__legal-note {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.68);
}

/* ===== Auth: centered card ===== */
.hs-auth--centered {
  width: 100%;
  min-height: calc(100vh - 84px - env(safe-area-inset-top, 0));
  min-height: calc(100dvh - 84px - env(safe-area-inset-top, 0));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 3vh, 2.5rem) clamp(1rem, 3vw, 1.5rem);
  box-sizing: border-box;
}

@media (max-width: 980px) {
  .hs-auth--centered {
    min-height: calc(100vh - 72px - env(safe-area-inset-top, 0));
    min-height: calc(100dvh - 72px - env(safe-area-inset-top, 0));
  }
}

.hs-auth--centered .hs-auth__mesh--a {
  background: radial-gradient(circle, rgba(98, 54, 255, 0.4) 0%, transparent 68%);
  opacity: 0.7;
}

.hs-auth--centered .hs-auth__mesh--b {
  background: radial-gradient(circle, rgba(69, 32, 192, 0.32) 0%, transparent 70%);
  opacity: 0.55;
}

.hs-auth--centered .hs-auth__grid {
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: none;
  opacity: 0.28;
}

.hs-auth__dots {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 1;
}

.hs-auth--dots-live .hs-auth__grid {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .hs-auth__dots {
    display: none;
  }

  .hs-auth--dots-live .hs-auth__grid {
    opacity: 0.28;
  }
}

.hs-auth--centered .hs-auth__panel-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 440px;
  margin-inline: auto;
  padding: clamp(1.5rem, 3vh, 2.25rem) clamp(1.25rem, 3vw, 2rem);
  border-radius: 24px;
  background: rgba(17, 17, 17, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 28px 64px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  animation: hs-auth-card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  box-sizing: border-box;
}

@keyframes hs-auth-card-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hs-auth--centered .hs-auth__panel-card > .hs-auth__back,
.hs-auth--centered .hs-auth__panel-card > .hs-auth__tabs,
.hs-auth--centered .hs-auth__panel-card > .hs-auth__panel-head,
.hs-auth--centered .hs-auth__panel-card > .hs-auth__messages,
.hs-auth--centered .hs-auth__panel-card > .hs-auth__message,
.hs-auth--centered .hs-auth__panel-card > .hs-auth__panel {
  width: 100%;
}

.hs-auth__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  align-self: flex-start;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: color 0.15s ease;
}

.hs-auth__back svg {
  width: 1rem;
  height: 1rem;
}

.hs-auth__back:hover,
.hs-auth__back:focus-visible {
  color: #fff;
}

.hs-auth--centered .hs-auth__tabs {
  margin-bottom: 1.25rem;
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.08);
}

.hs-auth--centered .hs-auth__tab.is-active {
  background: linear-gradient(120deg, var(--auth-accent), var(--auth-accent-2, #6236ff));
  box-shadow: 0 8px 22px rgba(98, 54, 255, 0.28);
}

.hs-auth--centered .hs-auth__panel-head {
  margin-bottom: 1.15rem;
  text-align: center;
}

.hs-auth--centered .hs-auth__panel-title {
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hs-auth--centered .hs-auth__panel-lead {
  margin-top: 0.4rem;
  color: rgba(255, 255, 255, 0.48);
}

.hs-auth--centered .hs-auth__label {
  justify-content: flex-start;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
}

.hs-auth--centered .hs-auth__field {
  margin-bottom: 0.75rem;
}

.hs-auth--centered .hs-auth__field input {
  min-height: 46px;
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.08);
  background: #1a1a1a;
}

.hs-auth--centered .hs-auth__field input:hover {
  border-color: rgba(139, 92, 246, 0.45);
  background: #1d1d1d;
}

.hs-auth--centered .hs-auth__field input:focus {
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 2px var(--auth-accent-soft);
  background: #1d1d1d;
}

.hs-auth--centered .hs-auth__submit--primary {
  margin-top: 0.15rem;
  padding: 0.9rem 1rem;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(120deg, var(--auth-accent), var(--auth-accent-2));
  color: #fff;
  box-shadow: 0 14px 32px rgba(69, 32, 192, 0.35);
  --hs-btn-vfill-bg: transparent;
  --hs-btn-vfill-rest: 0;
  --hs-btn-vfill-hover: 0;
}

.hs-auth--centered .hs-auth__submit--primary:hover,
.hs-auth--centered .hs-auth__submit--primary:focus-visible {
  filter: brightness(1.1);
  background: linear-gradient(120deg, var(--auth-accent), var(--auth-accent-2));
  color: #fff;
  border-color: transparent;
}

.hs-auth__divider--soft {
  margin: 1.1rem 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.38);
}

.hs-auth__divider--soft::before,
.hs-auth__divider--soft::after {
  display: none;
}

.hs-auth__oauth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #1a1a1a;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}

.hs-auth__oauth:hover,
.hs-auth__oauth:focus-visible {
  border-color: rgba(255, 255, 255, 0.22);
  background: #222;
  color: #fff;
  filter: brightness(1.1);
}

.hs-auth__oauth-icon {
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  color: #fff;
}

.hs-auth__oauth-icon svg {
  width: 1.15rem;
  height: auto;
}

.hs-auth--centered .hs-auth__switch {
  margin-top: 1.15rem;
  color: rgba(255, 255, 255, 0.48);
}

.hs-auth--centered .hs-auth__switch a {
  color: #c4b5fd;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hs-auth--centered .hs-auth__switch a:hover,
.hs-auth--centered .hs-auth__switch a:focus-visible {
  color: #ede9fe;
}

.hs-auth--centered .hs-auth__legal {
  margin: 0.2rem 0 0.6rem;
  padding: 0.4rem 0.55rem;
  gap: 4px;
  border-radius: 9px;
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.hs-auth--centered .hs-auth__legal-item {
  gap: 5px;
  font-size: 10px;
  line-height: 1.3;
}

.hs-auth--centered .hs-auth__legal-item input {
  margin-top: 1px;
  transform: scale(0.85);
  transform-origin: top left;
}

.hs-auth--centered .hs-auth__legal-note {
  margin-top: 1px;
  font-size: 9px;
  line-height: 1.3;
}

/* --- Responsive --- */
@media (max-width: 860px) {
  .hs-page-login.hs-body:has(.hs-auth--centered) {
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
  }

  .hs-page-login.hs-body:has(.hs-auth--centered) .hs-header,
  .hs-page-login.hs-body:has(.hs-auth--centered) .hs-orb,
  .hs-page-login.hs-body:has(.hs-auth--centered) .hs-support-chat-widget {
    display: none !important;
  }

  .hs-page-login.hs-body:has(.hs-auth--centered) .hs-main {
    padding-top: 0;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .hs-auth--centered {
    height: 100%;
    min-height: 0;
    max-height: none;
    padding: 0;
    align-items: stretch;
    overflow: hidden;
  }

  .hs-auth--centered .hs-auth__panel-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: 100%;
    max-width: none;
    min-height: 0;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    background: #111111;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding:
      calc(1.25rem + env(safe-area-inset-top, 0))
      max(1.25rem, env(safe-area-inset-right, 0px))
      calc(1.25rem + env(safe-area-inset-bottom, 0))
      max(1.25rem, env(safe-area-inset-left, 0px));
    animation: none;
  }

  .hs-auth--centered .hs-auth__panel-card::before,
  .hs-auth--centered .hs-auth__panel-card::after {
    content: "";
    flex: 1 1 0;
    width: 100%;
    min-height: 0;
    pointer-events: none;
  }

  .hs-auth--centered .hs-auth__panel-card > .hs-auth__back,
  .hs-auth--centered .hs-auth__panel-card > .hs-auth__tabs,
  .hs-auth--centered .hs-auth__panel-card > .hs-auth__panel-head,
  .hs-auth--centered .hs-auth__panel-card > .hs-auth__messages,
  .hs-auth--centered .hs-auth__panel-card > .hs-auth__message,
  .hs-auth--centered .hs-auth__panel-card > .hs-auth__panel {
    flex: 0 0 auto;
    max-width: 400px;
    width: 100%;
    margin-inline: auto;
    overflow: visible;
  }

  .hs-auth__back {
    margin-bottom: 1rem;
    font-size: 0.9rem;
  }

  .hs-auth--centered .hs-auth__tabs {
    margin-bottom: 1.15rem;
    padding: 0.28rem;
    gap: 0.28rem;
    border-radius: 14px;
  }

  .hs-auth--centered .hs-auth__tab {
    min-height: 44px;
    padding: 0.6rem 0.5rem;
    font-size: 0.9rem;
    border-radius: 11px;
  }

  .hs-auth--centered .hs-auth__panel-head {
    margin-bottom: 1.15rem;
  }

  .hs-auth--centered .hs-auth__panel-title {
    font-size: clamp(1.45rem, 6.5vw, 1.75rem);
    line-height: 1.2;
  }

  .hs-auth--centered .hs-auth__panel-lead {
    margin-top: 0.4rem;
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .hs-auth--centered .hs-auth__messages {
    margin-bottom: 0.75rem;
  }

  .hs-auth--centered .hs-auth__message {
    margin-bottom: 0.5rem;
    padding: 0.7rem 0.85rem;
    font-size: 0.86rem;
  }

  .hs-auth--centered .hs-auth__form {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .hs-auth--centered .hs-auth__label {
    margin-bottom: 0.3rem;
    font-size: 0.82rem;
  }

  .hs-auth--centered .hs-auth__field {
    margin-bottom: 0.85rem;
  }

  .hs-auth--centered .hs-auth__field input {
    min-height: 48px;
    padding: 0.7rem 0.9rem;
    font-size: 1rem;
    border-radius: 12px;
  }

  .hs-auth--centered .hs-auth__password-toggle {
    width: 2.75rem;
    height: 2.75rem;
  }

  .hs-auth--centered .hs-auth__legal {
    margin: 0.1rem 0 0.6rem;
    padding: 0.4rem 0.55rem;
    border-radius: 9px;
  }

  .hs-auth--centered .hs-auth__legal-item {
    gap: 0.35rem;
    font-size: 0.68rem;
    line-height: 1.28;
  }

  .hs-auth--centered .hs-auth__legal-item + .hs-auth__legal-item {
    margin-top: 0.15rem;
  }

  .hs-auth--centered .hs-auth__legal-note {
    margin-top: 0.2rem;
    font-size: 0.6rem;
    line-height: 1.28;
  }

  .hs-auth--centered .hs-auth__submit--primary {
    margin-top: 0.15rem;
    min-height: 48px;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(69, 32, 192, 0.3);
  }

  .hs-auth--centered .hs-auth__divider--soft {
    margin: 1rem 0 0.75rem;
    font-size: 0.78rem;
  }

  .hs-auth--centered .hs-auth__oauth {
    min-height: 48px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border-radius: 12px;
  }

  .hs-auth--centered .hs-auth__switch {
    margin-top: 1.15rem;
    font-size: 0.9rem;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .hs-page-login.hs-body {
    --auth-shell-max: 100%;
  }

  .hs-auth:not(.hs-auth--centered) {
    min-height: auto;
    padding-top: 1.25rem;
  }

  .hs-auth__field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hs-auth__steam-label {
    font-size: 0.92rem;
  }

  .hs-auth--centered .hs-auth__panel-card {
    padding-inline: max(1rem, env(safe-area-inset-left, 0px)) max(1rem, env(safe-area-inset-right, 0px));
  }
}

/* Короткие экраны: плотнее, центрирование через spacers сохраняется */
@media (max-width: 860px) and (max-height: 700px) {
  .hs-auth--centered .hs-auth__panel-card {
    padding-top: calc(0.85rem + env(safe-area-inset-top, 0));
    padding-bottom: calc(0.85rem + env(safe-area-inset-bottom, 0));
  }

  .hs-auth--centered .hs-auth__panel-card::before,
  .hs-auth--centered .hs-auth__panel-card::after {
    min-height: 0;
  }

  .hs-auth--centered .hs-auth__panel-lead {
    display: none;
  }

  .hs-auth--centered .hs-auth__back {
    margin-bottom: 0.65rem;
  }

  .hs-auth--centered .hs-auth__tabs {
    margin-bottom: 0.75rem;
  }

  .hs-auth--centered .hs-auth__panel-head {
    margin-bottom: 0.75rem;
  }

  .hs-auth--centered .hs-auth__field {
    margin-bottom: 0.55rem;
  }

  .hs-auth--centered .hs-auth__field input {
    min-height: 44px;
  }

  .hs-auth--centered .hs-auth__legal {
    margin: 0.1rem 0 0.55rem;
    padding: 0.5rem 0.65rem;
  }

  .hs-auth--centered .hs-auth__submit--primary,
  .hs-auth--centered .hs-auth__oauth {
    min-height: 44px;
    padding: 0.65rem 0.85rem;
  }

  .hs-auth--centered .hs-auth__divider--soft {
    margin: 0.7rem 0 0.55rem;
  }

  .hs-auth--centered .hs-auth__switch {
    margin-top: 0.85rem;
  }
}

@media (min-width: 981px) {
  .hs-auth__steam {
    background: linear-gradient(120deg, var(--primary), var(--primary-2));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 16px 34px rgba(69, 32, 192, 0.35);
  }

  .hs-auth__steam:hover,
  .hs-auth__steam:focus-visible {
    filter: brightness(1.1);
    color: #fff;
    border-color: transparent;
    background: linear-gradient(120deg, var(--primary), var(--primary-2));
  }
}

@media (prefers-reduced-motion: reduce) {
  .hs-auth--centered .hs-auth__panel-card {
    animation: none;
  }

  .hs-auth__steam:hover,
  .hs-auth__steam:focus-visible,
  .hs-auth__oauth:hover,
  .hs-auth__oauth:focus-visible,
  .hs-auth--centered .hs-auth__submit--primary:hover,
  .hs-auth--centered .hs-auth__submit--primary:focus-visible {
    transform: none;
  }
}
