/* ============================================================
   硅基经纬 — 全局认证模块（登录窗「晨光小窗」+ 头像体系）
   居中精致小窗：140px 场景横幅 + 实底白卡表单，一眼就是「一扇清晰的窗」。
   动画全部 CSS transition / keyframes，不依赖 GSAP，全站一致。
   色值取自 base.css 变量；夜间差异走 body.theme-night 覆盖
   ============================================================ */

/* ============================================================
   背板 + 窗口
   ============================================================ */

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(20, 33, 60, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.15s ease-out,
    visibility 0.15s ease-out;
}

.auth-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* 窗口：实底白卡 + 细腻描边 + 深而柔的投影 */
.am-card {
  position: relative;
  width: 420px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  overflow: hidden auto;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid rgba(20, 33, 60, 0.08);
  box-shadow: 0 24px 64px rgba(20, 33, 60, 0.18);
}

/* 入场：230ms 上浮淡入，轻微回弹 */
.auth-overlay.is-open .am-card {
  animation: amCardIn 0.23s cubic-bezier(0.2, 0.9, 0.25, 1.15);
}

@keyframes amCardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 关闭：150ms 淡出 + 轻微下沉 */
.auth-overlay.is-open.is-closing .am-card {
  animation: none;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.15s ease-out,
    transform 0.15s ease-out;
}

/* ============================================================
   顶部横幅（140px）
   ============================================================ */

.am-banner {
  position: relative;
  height: 140px;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  background: var(--bg-deep);
}

.am-banner img {
  transform: scale(1.08); /* 视差防脱边，位移由 JS lerp 驱动 */
  transition: opacity 0.5s ease;
  will-change: transform;
}

/* 浅渐变罩：底部 30% 从 transparent 到墨色 35%，保证文字清晰 */
.am-banner-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.35));
}

.am-banner-copy {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 1;
}

.am-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

.am-sub {
  margin-top: 5px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

/* reason 提示：横幅上方居中的小白胶囊 */
.am-reason {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  max-width: calc(100% - 96px);
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 8px 24px -10px rgba(20, 33, 60, 0.35);
}

/* 关闭钮：压在横幅右上角的 32px 圆形 */
.am-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink-soft);
  cursor: pointer;
  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

.am-close:hover {
  color: var(--accent);
  transform: rotate(90deg);
}

.am-close svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.8;
}

/* ============================================================
   表单区（全部左对齐）
   ============================================================ */

.am-body {
  padding: 28px 32px 32px;
}

.am-field {
  margin-bottom: 20px;
}

.am-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: rgba(20, 33, 60, 0.7);
}

/* 手机号：48px 圆角浅灰底，+86 + 竖分隔 + 输入 */
.am-control {
  display: flex;
  align-items: center;
  height: 48px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  background: rgba(20, 33, 60, 0.04);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.am-control:focus-within {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46, 107, 255, 0.12);
}

.am-prefix {
  padding: 0 12px 0 14px;
  margin-right: 12px;
  border-right: 1px solid rgba(20, 33, 60, 0.1);
  font-size: 15px;
  color: rgba(20, 33, 60, 0.6);
  white-space: nowrap;
}

.am-control input {
  flex: 1;
  min-width: 0;
  padding: 0 14px 0 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  outline: none;
}

.am-control input::placeholder {
  color: var(--muted);
}

/* 手机号错误摇头 */
.am-control.is-shaking {
  animation: amShake 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  border-color: #d9534f;
}

@keyframes amShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

/* 错误提示：12px 红字，入场轻微下浮淡入 */
.am-error {
  display: none;
  margin-top: 7px;
  font-size: 12px;
  color: #d9534f;
  letter-spacing: 0.04em;
}

.am-error.is-visible {
  display: block;
  animation: amErrIn 0.3s ease-out;
}

/* 限流提示样式预留（「请 xx 秒后重试」） */
.am-error.is-limited {
  color: var(--muted);
}

@keyframes amErrIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------------- 验证码：6 格 44×52 浅灰小格 ---------------- */

.am-code-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.am-code-cells {
  display: flex;
  gap: 7px;
}

.am-code-cell {
  width: 44px;
  height: 52px;
  border: 1.5px solid transparent;
  border-radius: 10px;
  background: rgba(20, 33, 60, 0.04);
  font: inherit;
  font-size: 18px;
  font-weight: 500;
  text-align: center;
  color: var(--ink);
  outline: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.am-code-cell:focus {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46, 107, 255, 0.12);
}

.am-code-cell.is-filled {
  border-color: rgba(46, 107, 255, 0.45);
}

/* 验证码整排摇头 */
.am-code-cells.is-shaking {
  animation: amShake 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.am-code-cells.is-shaking .am-code-cell {
  border-color: #d9534f;
}

/* 数字键入时弹跳落入 */
.am-code-cell.is-pop {
  animation: amCellPop 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes amCellPop {
  0% { transform: translateY(-6px) scale(1.12); }
  60% { transform: translateY(1px) scale(0.97); }
  100% { transform: translateY(0) scale(1); }
}

/* 获取验证码：纯文字按钮；倒计时变灰禁用 */
.am-code-send {
  flex-shrink: 0;
  margin-left: auto;
  padding: 6px 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.25s ease;
}

.am-code-send:hover:not(:disabled) {
  opacity: 0.7;
}

.am-code-send:disabled {
  color: var(--muted);
  cursor: not-allowed;
}

/* ---------------- 协议勾选：16px 方框 + lucide check 描边 ---------------- */

.am-agree {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 2px 0 20px;
  cursor: pointer;
  user-select: none;
}

.am-agree input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.am-agree-box {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border: 1px solid rgba(20, 33, 60, 0.18);
  border-radius: 5px;
  color: var(--accent);
  transition:
    border-color 0.25s ease,
    background-color 0.25s ease;
}

.am-agree-box svg {
  width: 11px;
  height: 11px;
  stroke-width: 2.4;
}

/* lucide check 的 polyline 描边动画 */
.am-agree-box svg * {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  transition: stroke-dashoffset 0.3s ease 0.05s;
}

.am-agree input:checked + .am-agree-box {
  border-color: var(--accent);
}

.am-agree input:checked + .am-agree-box svg * {
  stroke-dashoffset: 0;
}

.am-agree input:focus-visible + .am-agree-box {
  box-shadow: 0 0 0 3px rgba(46, 107, 255, 0.12);
}

.am-agree-text {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.am-agree-text a {
  color: var(--accent);
}

/* ---------------- 提交按钮：全宽胶囊 + hover 光泽 + 三态 ---------------- */

.am-submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  overflow: hidden;
  background: linear-gradient(120deg, #2560e8, #2e6bff 55%, #57b8ff);
  color: #fff;
  box-shadow: 0 12px 32px -12px var(--glow);
  transition:
    opacity 0.3s ease,
    box-shadow 0.5s ease;
}

/* hover 光泽从左扫到右（600ms） */
.am-submit::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 55%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-18deg);
  transition: left 0.6s ease;
}

.am-submit:hover:not(:disabled)::after {
  left: 130%;
}

.am-submit:hover:not(:disabled) {
  box-shadow: 0 18px 42px -14px rgba(46, 107, 255, 0.55);
}

/* 禁用态（未勾协议 / 加载中）：50% 透明度，无 hover 光泽 */
.am-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.am-submit-loader,
.am-submit-check {
  display: none;
}

/* 加载态：三根竖线「丝线缠绕」 */
.am-submit.is-loading .am-submit-label {
  display: none;
}

.am-submit.is-loading .am-submit-loader {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.am-submit-loader i {
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: #fff;
  animation: amThreadWeave 0.9s ease-in-out infinite;
}

.am-submit-loader i:nth-child(2) { animation-delay: 0.15s; }
.am-submit-loader i:nth-child(3) { animation-delay: 0.3s; }

@keyframes amThreadWeave {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1); }
}

/* 成功态：对勾描边 */
.am-submit.is-success .am-submit-label,
.am-submit.is-success .am-submit-loader {
  display: none;
}

.am-submit.is-success .am-submit-check {
  display: block;
  width: 22px;
  height: 22px;
}

.am-submit-check path {
  stroke-dasharray: 26;
  stroke-dashoffset: 26;
}

.am-submit.is-success .am-submit-check path {
  animation: amDrawCheck 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

@keyframes amDrawCheck {
  to { stroke-dashoffset: 0; }
}

/* 表单下方小字 */
.am-terms {
  margin-top: 16px;
  text-align: center;
  font-size: 11px;
  color: rgba(20, 33, 60, 0.4);
}

/* 登录成功：窗口中央一道金色径向闪光（300ms，夜间蓝银） */
.am-flash {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 55%, rgba(255, 210, 140, 0.75), transparent 62%);
}

.auth-overlay.is-flashing .am-flash {
  animation: amFlash 0.3s ease-out;
}

@keyframes amFlash {
  0% { opacity: 0; transform: scale(0.85); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.1); }
}

/* ============================================================
   夜间主题覆盖
   ============================================================ */

body.theme-night .auth-overlay {
  background: rgba(0, 0, 0, 0.6);
}

body.theme-night .am-card {
  background: var(--card);
  border-color: rgba(233, 238, 250, 0.1);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

/* 横幅罩加深 */
body.theme-night .am-banner-veil {
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.5));
}

body.theme-night .am-reason {
  background: rgba(26, 35, 50, 0.92);
  color: var(--ink);
}

body.theme-night .am-close {
  background: rgba(26, 35, 50, 0.9);
}

body.theme-night .am-label {
  color: rgba(233, 238, 250, 0.7);
}

body.theme-night .am-control,
body.theme-night .am-code-cell {
  background: rgba(233, 238, 250, 0.08);
}

body.theme-night .am-control:focus-within,
body.theme-night .am-code-cell:focus {
  background: rgba(233, 238, 250, 0.14);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(111, 157, 255, 0.16);
}

body.theme-night .am-prefix {
  color: rgba(233, 238, 250, 0.6);
  border-right-color: rgba(233, 238, 250, 0.12);
}

body.theme-night .am-agree-box {
  border-color: rgba(233, 238, 250, 0.2);
}

body.theme-night .am-terms {
  color: rgba(233, 238, 250, 0.4);
}

/* 闪光改蓝银 */
body.theme-night .am-flash {
  background: radial-gradient(circle at 50% 55%, rgba(140, 180, 255, 0.65), transparent 62%);
}

/* ============================================================
   头像组件 + 下拉菜单（轻盈实心面板，与小窗同语言）
   ============================================================ */

.auth-avatar {
  position: relative;
  display: inline-flex;
}

/* 未登录：40px 圆形幽灵按钮 */
.auth-avatar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition:
    color 0.35s ease,
    border-color 0.35s ease,
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

.auth-avatar-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.auth-avatar-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.7;
}

/* 已登录：宝蓝 → 浅蓝渐变底 + 白色图标 + 2px 白色描边 + 细投影 */
.auth-avatar-btn.is-logged {
  border: 2px solid #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow:
    0 6px 18px -6px var(--glow),
    0 0 0 1px var(--hairline);
}

.auth-avatar-btn.is-logged:hover {
  color: #fff;
  box-shadow:
    0 10px 24px -8px var(--glow),
    0 0 0 1px var(--accent);
}

/* 下拉菜单：轻盈实心面板 + 细腻描边 + 同款柔投影 */
.auth-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1100;
  width: 180px;
  padding: 6px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid rgba(20, 33, 60, 0.08);
  box-shadow: 0 24px 64px rgba(20, 33, 60, 0.18);
  opacity: 0;
  transform: translateY(-6px);
  visibility: hidden;
  transition:
    opacity 0.18s ease-out,
    transform 0.18s ease-out,
    visibility 0.18s ease-out;
}

.auth-menu.is-open {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.auth-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

.auth-menu-item svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.7;
  color: var(--ink-soft);
}

.auth-menu-item:hover:not(.is-disabled) {
  background: var(--bg-soft);
}

/* 置灰态：不可点，右侧小字「敬请期待」 */
.auth-menu-item.is-disabled {
  color: var(--muted);
  cursor: default;
}

.auth-menu-item.is-disabled svg {
  color: var(--muted);
}

.auth-menu-soon {
  margin-left: auto;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 11px;
  color: var(--muted);
}

/* 退出登录：红色 hover 态 */
.auth-menu-item.is-danger:hover {
  background: rgba(217, 83, 79, 0.08);
  color: #d9534f;
}

.auth-menu-item.is-danger:hover svg {
  color: #d9534f;
}

.auth-menu-sep {
  height: 1px;
  margin: 5px 8px;
  background: var(--hairline);
}

/* 已登录且 avatar 为图片路径：圆形 img 覆盖渐变底 */
.auth-avatar-btn.has-img {
  padding: 0;
  overflow: hidden;
}

.auth-avatar-btn.has-img img {
  border-radius: 50%;
}

/* 菜单顶部脱敏手机号小字 */
.auth-menu-phone {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px 6px;
  font-size: 12px;
  color: var(--muted);
}

.auth-menu-phone svg {
  width: 13px;
  height: 13px;
  stroke-width: 1.7;
}

body.theme-night .auth-avatar-btn.is-logged {
  border-color: rgba(233, 238, 250, 0.85);
}

body.theme-night .auth-menu {
  border-color: rgba(233, 238, 250, 0.1);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

/* ============================================================
   轻量 toast：底部居中胶囊，2s 自动消失
   ============================================================ */

.auth-toast {
  position: fixed;
  left: 50%;
  bottom: 36px;
  z-index: 1300;
  transform: translateX(-50%) translateY(10px);
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  letter-spacing: 0.06em;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s ease-out,
    transform 0.25s ease-out;
}

.auth-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   无障碍：减少动态偏好 —— 入场 / 视差 / 光泽 / 弹入全关，直接显隐
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .auth-overlay,
  .am-card,
  .auth-overlay.is-open.is-closing .am-card,
  .am-control,
  .am-code-cell,
  .am-agree-box,
  .am-agree-box svg *,
  .am-submit,
  .am-submit::after,
  .am-close,
  .auth-menu,
  .auth-toast {
    animation: none;
    transition: none;
  }

  .auth-overlay.is-open .am-card,
  .am-code-cell.is-pop,
  .am-control.is-shaking,
  .am-code-cells.is-shaking,
  .am-error.is-visible,
  .auth-overlay.is-flashing .am-flash {
    animation: none;
  }

  /* 视差关闭：横幅图保持静态 */
  .am-banner img {
    transform: scale(1.08) !important;
  }
}

/* ============================================================
   Auth Overlay 2026-07 重构：沉浸式分栏登录
   仅作用于 #authOverlay，不影响 mine.js 复用的旧 am- 弹窗
   ============================================================ */

#authOverlay {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(87, 184, 255, 0.16), transparent 42%),
    rgba(6, 10, 18, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#authOverlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0, transparent 32%, transparent 68%, rgba(255, 255, 255, 0.02) 100%);
  pointer-events: none;
}

#authOverlay .auth-shell {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(420px, 0.86fr);
  background: #09111f;
  color: #eef4ff;
  overflow: hidden;
}

#authOverlay .auth-shell::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 57%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  pointer-events: none;
}

#authOverlay.is-open .auth-shell {
  animation: authShellIn 0.5s cubic-bezier(0.2, 0.88, 0.2, 1);
}

@keyframes authShellIn {
  from { opacity: 0; transform: scale(1.015); }
  to { opacity: 1; transform: scale(1); }
}

#authOverlay.is-open.is-closing .auth-shell {
  animation: none;
  opacity: 0;
  transform: scale(0.995);
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

#authOverlay .auth-shell-close {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(238, 244, 255, 0.88);
  cursor: pointer;
  transition:
    transform 0.35s var(--ease-out),
    background-color 0.35s var(--ease-out),
    border-color 0.35s var(--ease-out),
    color 0.35s var(--ease-out);
}

#authOverlay .auth-shell-close:hover {
  transform: rotate(90deg);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

#authOverlay .auth-shell-close svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.9;
}

#authOverlay .auth-visual {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #0b1931;
}

#authOverlay .auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 17, 31, 0.08), rgba(9, 17, 31, 0)),
    linear-gradient(180deg, rgba(9, 17, 31, 0.04), rgba(9, 17, 31, 0.46));
  z-index: 3;
  pointer-events: none;
}

#authOverlay .auth-visual-grid {
  position: absolute;
  inset: 0;
  z-index: 4;
  opacity: 0.14;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 28px);
  pointer-events: none;
}

#authOverlay .auth-visual-track {
  position: absolute;
  inset: 0;
}

#authOverlay .al-scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.035);
  transition:
    opacity 0.85s var(--ease-out),
    transform 1s var(--ease-out);
}

#authOverlay .al-scene.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

#authOverlay .al-scene-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06) translate3d(var(--auth-parallax-x, 0px), var(--auth-parallax-y, 0px), 0);
  transition:
    transform 0.75s var(--ease-out),
    filter 0.6s ease;
  will-change: transform;
}

#authOverlay .al-scene:not(.is-active) .al-scene-img {
  filter: saturate(0.9) brightness(0.82);
}

#authOverlay .al-scene-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 17, 31, 0.05) 0%, rgba(9, 17, 31, 0.18) 38%, rgba(9, 17, 31, 0.72) 100%),
    radial-gradient(90% 80% at 15% 20%, rgba(255, 255, 255, 0.1), transparent 50%);
}

#authOverlay .al-scene-copy {
  position: absolute;
  left: clamp(28px, 3vw, 48px);
  right: clamp(28px, 3vw, 48px);
  bottom: clamp(76px, 8vh, 108px);
  z-index: 5;
  max-width: 520px;
}

#authOverlay .al-scene-kicker {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: 0.26em;
  color: rgba(233, 238, 250, 0.72);
}

#authOverlay .al-scene-title {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
}

#authOverlay .al-scene-desc {
  margin: 0;
  max-width: 430px;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(233, 238, 250, 0.82);
}

#authOverlay .auth-visual-progress {
  position: absolute;
  left: clamp(28px, 3vw, 48px);
  bottom: clamp(30px, 3.2vh, 42px);
  width: min(180px, 32vw);
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
  z-index: 5;
}

#authOverlay .auth-visual-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), #ffffff);
  transition: width 0.7s var(--ease-out);
}

#authOverlay .auth-visual-dots {
  position: absolute;
  left: clamp(232px, 18vw, 272px);
  bottom: clamp(20px, 2.6vh, 34px);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
}

#authOverlay .al-scene-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
  transition:
    width 0.35s var(--ease-out),
    background-color 0.35s var(--ease-out),
    transform 0.35s var(--ease-out);
}

#authOverlay .al-scene-dot.is-active {
  width: 28px;
  background: linear-gradient(90deg, var(--accent-2), #ffffff);
}

#authOverlay .al-scene-dot:hover {
  transform: translateY(-1px);
}

#authOverlay .auth-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: clamp(44px, 6vh, 72px) clamp(36px, 4vw, 72px);
  background:
    radial-gradient(80% 60% at 0% 0%, rgba(46, 107, 255, 0.12), transparent 55%),
    linear-gradient(180deg, rgba(10, 16, 28, 0.98), rgba(10, 16, 28, 0.94));
}

#authOverlay .auth-panel::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 24px;
  pointer-events: none;
}

#authOverlay .auth-panel-inner {
  position: relative;
  z-index: 2;
  width: min(430px, 100%);
  opacity: 0;
  transform: translateX(24px);
}

#authOverlay.is-open .auth-panel-inner {
  animation: authPanelIn 0.62s cubic-bezier(0.2, 0.88, 0.2, 1) 0.08s forwards;
}

@keyframes authPanelIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

#authOverlay .al-brand {
  margin: 0 0 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: rgba(233, 238, 250, 0.78);
}

#authOverlay .al-brand span {
  margin-left: 12px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: rgba(188, 215, 255, 0.54);
}

#authOverlay .al-reason {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin: 0 0 18px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(87, 184, 255, 0.18);
  background: rgba(87, 184, 255, 0.08);
  color: rgba(233, 238, 250, 0.9);
  font-size: 12px;
  letter-spacing: 0.05em;
}

#authOverlay .al-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(34px, 3vw, 52px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0.02em;
  color: #fff;
}

#authOverlay .al-title em {
  font-style: normal;
  background: linear-gradient(100deg, #ffffff 0%, #c6e6ff 30%, var(--accent-2) 68%, #ffffff 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: authTitleShine 5s ease-in-out infinite;
}

@keyframes authTitleShine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

#authOverlay .al-sub {
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(233, 238, 250, 0.72);
}

#authOverlay .al-form {
  margin-top: 34px;
}

#authOverlay .al-field + .al-field {
  margin-top: 18px;
}

#authOverlay .al-label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(188, 215, 255, 0.78);
}

#authOverlay .al-control {
  display: flex;
  align-items: center;
  min-height: 58px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  transition:
    border-color 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out),
    background-color 0.35s var(--ease-out),
    transform 0.35s var(--ease-out);
}

#authOverlay .al-control:focus-within {
  border-color: rgba(87, 184, 255, 0.52);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(46, 107, 255, 0.12);
}

#authOverlay .al-control.is-shaking {
  animation: amShake 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

#authOverlay .al-prefix {
  padding: 0 16px 0 18px;
  margin-right: 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  color: rgba(233, 238, 250, 0.6);
}

#authOverlay .al-control input {
  flex: 1;
  min-width: 0;
  padding: 0 18px 0 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: #fff;
  caret-color: #fff;
  outline: none;
}

#authOverlay .al-control input::placeholder {
  color: rgba(233, 238, 250, 0.34);
}

#authOverlay .al-control input:-webkit-autofill,
#authOverlay .al-control input:-webkit-autofill:hover,
#authOverlay .al-control input:-webkit-autofill:focus,
#authOverlay .al-control input:-webkit-autofill:active {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px rgba(24, 31, 45, 0.92) inset;
  box-shadow: 0 0 0 1000px rgba(24, 31, 45, 0.92) inset;
  caret-color: #fff;
  transition: background-color 9999s ease-out 0s;
}

#authOverlay .al-control-code {
  gap: 10px;
  padding-right: 8px;
}

#authOverlay .al-control-code input {
  padding-left: 18px;
}

#authOverlay .al-code-send {
  flex: 0 0 auto;
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(87, 184, 255, 0.22), rgba(46, 107, 255, 0.34));
  color: #f4f8ff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition:
    transform 0.3s var(--ease-out),
    background-color 0.3s var(--ease-out),
    opacity 0.3s ease;
}

#authOverlay .al-code-send:hover:not(:disabled) {
  transform: translateY(-1px);
}

#authOverlay .al-code-send:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

#authOverlay .al-error {
  display: none;
  margin: 9px 0 0;
  font-size: 12px;
  color: #ff8b8b;
  letter-spacing: 0.04em;
}

#authOverlay .al-error.is-visible {
  display: block;
  animation: amErrIn 0.25s ease-out;
}

#authOverlay .al-submit {
  position: relative;
  width: 100%;
  height: 58px;
  margin-top: 24px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(100deg, var(--accent) 0%, #4d95ff 55%, var(--accent-2) 100%);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 18px 36px -20px rgba(46, 107, 255, 0.66);
  transition:
    transform 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out),
    opacity 0.35s ease;
}

#authOverlay .al-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.18) 46%, transparent 64%);
  transform: translateX(-140%);
  transition: transform 0.7s var(--ease-out);
}

#authOverlay .al-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px -20px rgba(46, 107, 255, 0.72);
}

#authOverlay .al-submit:hover:not(:disabled)::before {
  transform: translateX(140%);
}

#authOverlay .al-submit:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
}

#authOverlay .al-submit.is-ready {
  opacity: 1;
}

#authOverlay .al-submit-label,
#authOverlay .al-submit-loader,
#authOverlay .al-submit-check {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#authOverlay .al-submit-loader,
#authOverlay .al-submit-check {
  opacity: 0;
  pointer-events: none;
}

#authOverlay .al-submit-loader {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

#authOverlay .al-submit-loader i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: authDotPulse 0.78s ease-in-out infinite;
}

#authOverlay .al-submit-loader i:nth-child(2) { animation-delay: 0.12s; }
#authOverlay .al-submit-loader i:nth-child(3) { animation-delay: 0.24s; }

@keyframes authDotPulse {
  0%, 80%, 100% { opacity: 0.35; transform: scale(0.72); }
  40% { opacity: 1; transform: scale(1); }
}

#authOverlay .al-submit-check {
  width: 22px;
  height: 22px;
}

#authOverlay .al-submit.is-loading .al-submit-label,
#authOverlay .al-submit.is-success .al-submit-label {
  opacity: 0;
  transform: translate(-50%, -56%);
}

#authOverlay .al-submit.is-loading .al-submit-loader {
  opacity: 1;
}

#authOverlay .al-submit.is-success .al-submit-check {
  opacity: 1;
}

#authOverlay .al-terms {
  margin: 18px 0 0;
  padding: 14px 15px 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 18px;
  align-items: center;
  column-gap: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(8, 16, 28, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

#authOverlay .al-agree {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

#authOverlay .al-agree::after {
  display: none;
}

#authOverlay .al-agree input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

#authOverlay .al-agree-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(148, 190, 255, 0.34);
  background: rgba(255, 255, 255, 0.03);
  color: #dff1ff;
  transition:
    border-color 0.28s ease,
    background-color 0.28s ease,
    box-shadow 0.28s ease,
    transform 0.28s ease;
}

#authOverlay .al-agree-box svg {
  width: 11px;
  height: 11px;
}

#authOverlay .al-agree-box path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  transition: stroke-dashoffset 0.28s cubic-bezier(0.22, 1, 0.36, 1) 0.04s;
}

#authOverlay .al-agree input:checked + .al-agree-box {
  border-color: rgba(87, 184, 255, 0.9);
  background: linear-gradient(135deg, rgba(46, 107, 255, 0.88), rgba(87, 184, 255, 0.82));
  box-shadow: 0 10px 22px -14px rgba(46, 107, 255, 0.78);
}

#authOverlay .al-agree input:checked + .al-agree-box path {
  stroke-dashoffset: 0;
}

#authOverlay .al-agree input:focus-visible + .al-agree-box {
  box-shadow:
    0 0 0 4px rgba(46, 107, 255, 0.16),
    0 10px 22px -14px rgba(46, 107, 255, 0.62);
  transform: translateY(-1px);
}

#authOverlay .al-terms-copy {
  margin: 0;
  grid-column: 2;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(225, 236, 255, 0.72);
  white-space: nowrap;
  text-align: center;
}

#authOverlay .al-terms-copy span {
  margin: 0 2px;
}

#authOverlay .al-terms-link {
  padding: 0;
  border: 0;
  background: none;
  color: #73bcff;
  font: inherit;
  cursor: pointer;
  transition: color 0.28s ease, text-shadow 0.28s ease;
}

#authOverlay .al-terms-link:hover {
  color: #b5e0ff;
  text-shadow: 0 0 18px rgba(115, 188, 255, 0.34);
}

#authOverlay .al-terms-error {
  margin-top: 10px;
}

#authOverlay .al-alt {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
}

#authOverlay .al-alt-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(188, 215, 255, 0.52);
}

#authOverlay .al-alt-link {
  padding: 0;
  border: 0;
  background: none;
  color: rgba(233, 238, 250, 0.84);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease;
}

#authOverlay .al-alt-link:hover {
  color: var(--accent-2);
  transform: translateY(-1px);
}

#authOverlay .al-legal-modal {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.26s ease, visibility 0.26s ease;
}

#authOverlay .al-legal-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#authOverlay .al-legal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 18, 0.58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#authOverlay .al-legal-panel {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(82vh, 920px);
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(87, 184, 255, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(10, 16, 28, 0.98), rgba(10, 16, 28, 0.96));
  box-shadow:
    0 40px 100px -42px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transform: translateY(12px) scale(0.985);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

#authOverlay .al-legal-modal.is-open .al-legal-panel {
  transform: translateY(0) scale(1);
}

#authOverlay .al-legal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

#authOverlay .al-legal-title-wrap {
  min-width: 0;
}

#authOverlay .al-legal-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: rgba(188, 215, 255, 0.56);
}

#authOverlay .al-legal-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #fff;
}

#authOverlay .al-legal-close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(238, 244, 255, 0.82);
  cursor: pointer;
  transition: transform 0.28s ease, background-color 0.28s ease, border-color 0.28s ease;
}

#authOverlay .al-legal-close:hover {
  transform: rotate(90deg);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}

#authOverlay .al-legal-close .lucide {
  width: 16px;
  height: 16px;
}

#authOverlay .al-legal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 24px 28px;
}

#authOverlay .al-legal-state {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  color: rgba(225, 236, 255, 0.72);
}

#authOverlay .al-legal-state.is-error {
  color: #ffb3b3;
}

#authOverlay .al-legal-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-top-color: #73bcff;
  animation: authLegalSpin 0.9s linear infinite;
}

@keyframes authLegalSpin {
  to { transform: rotate(360deg); }
}

#authOverlay .al-legal-paragraph {
  margin: 0;
  font-size: 13px;
  line-height: 1.95;
  color: rgba(232, 240, 252, 0.8);
}

#authOverlay .al-legal-paragraph + .al-legal-paragraph {
  margin-top: 12px;
}

#authOverlay .al-legal-paragraph.is-heading {
  margin-top: 20px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.03em;
}

#authOverlay .al-legal-paragraph.is-meta {
  font-size: 12px;
  color: rgba(188, 215, 255, 0.62);
}

#authOverlay .al-legal-paragraph.is-subheading {
  color: rgba(228, 239, 255, 0.92);
  font-weight: 500;
}

#authOverlay .al-flash {
  position: absolute;
  inset: auto;
  width: 360px;
  height: 360px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.72);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.42) 0%, rgba(87, 184, 255, 0.2) 28%, rgba(46, 107, 255, 0.06) 56%, transparent 72%);
  opacity: 0;
  pointer-events: none;
}

#authOverlay.is-flashing .al-flash {
  animation: authFlash 0.36s ease-out forwards;
}

@keyframes authFlash {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.72); }
  30% { opacity: 0.85; }
  to { opacity: 0; transform: translate(-50%, -50%) scale(1.12); }
}

@media (max-width: 1080px) {
  #authOverlay .auth-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(280px, 42vh) 1fr;
  }

  #authOverlay .auth-shell::after {
    top: auto;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: 1px;
  }

  #authOverlay .auth-visual,
  #authOverlay .auth-panel {
    min-height: auto;
  }

  #authOverlay .auth-panel {
    padding: 34px 22px 36px;
  }

  #authOverlay .auth-panel::before {
    inset: 12px;
    border-radius: 18px;
  }

  #authOverlay .auth-visual-dots {
    left: auto;
    right: 28px;
  }
}

@media (max-width: 720px) {
  #authOverlay .auth-shell-close {
    top: 14px;
    right: 14px;
  }

  #authOverlay .al-scene-copy {
    left: 22px;
    right: 22px;
    bottom: 72px;
  }

  #authOverlay .al-scene-title {
    font-size: clamp(28px, 9vw, 40px);
  }

  #authOverlay .auth-visual-progress {
    left: 22px;
    width: 128px;
  }

  #authOverlay .auth-visual-dots {
    right: 22px;
    gap: 8px;
  }

  #authOverlay .al-control,
  #authOverlay .al-submit {
    min-height: 54px;
    border-radius: 16px;
  }

  #authOverlay .al-code-send {
    height: 38px;
    padding: 0 14px;
    font-size: 11px;
  }

  #authOverlay .al-terms {
    padding: 13px 14px 12px;
    border-radius: 16px;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: flex-start;
  }

  #authOverlay .al-agree {
    align-items: flex-start;
  }

  #authOverlay .al-agree-box {
    margin-top: 1px;
  }

  #authOverlay .al-terms-copy {
    grid-column: 2;
    text-align: left;
    white-space: normal;
    line-height: 1.75;
  }

  #authOverlay .al-legal-modal {
    padding: 16px;
  }

  #authOverlay .al-legal-panel {
    max-height: min(86vh, 920px);
    border-radius: 22px;
  }

  #authOverlay .al-legal-head {
    padding: 20px 18px 16px;
  }

  #authOverlay .al-legal-body {
    padding: 10px 18px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #authOverlay,
  #authOverlay .auth-shell,
  #authOverlay .auth-panel-inner,
  #authOverlay .al-scene,
  #authOverlay .al-scene-img,
  #authOverlay .auth-visual-progress span,
  #authOverlay .al-scene-dot,
  #authOverlay .auth-shell-close,
  #authOverlay .al-control,
  #authOverlay .al-code-send,
  #authOverlay .al-submit,
  #authOverlay .al-submit::before,
  #authOverlay .al-submit-label,
  #authOverlay .al-submit-loader,
  #authOverlay .al-submit-check,
  #authOverlay .al-alt-link,
  #authOverlay .al-flash {
    animation: none;
    transition: none;
  }

  #authOverlay .al-scene-img {
    transform: scale(1.06) !important;
  }
}
