/* Login gate — single-purpose surface, no escape nav */

.auth-body-gate {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
}

.auth-body-gate .site-banner,
.auth-body-gate .site-header {
  display: none;
}

.auth-body {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #eef7f4;
}

.auth-scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.auth-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
}

.auth-glow-a {
  width: min(70vw, 420px);
  height: min(70vw, 420px);
  top: -12%;
  right: -8%;
  background: rgba(255, 210, 140, 0.75);
}

.auth-glow-b {
  width: min(80vw, 480px);
  height: min(80vw, 480px);
  bottom: -18%;
  left: -12%;
  background: rgba(130, 220, 200, 0.55);
}

.auth-star {
  position: absolute;
  color: #e8a020;
  font-size: 1.1rem;
  opacity: 0.85;
  animation: authTwinkle 4s ease-in-out infinite;
}

.auth-star.s1 {
  top: 14%;
  left: 12%;
}

.auth-star.s2 {
  top: 22%;
  right: 16%;
  animation-delay: 1.2s;
  font-size: 0.85rem;
  color: #0d8a7f;
}

.auth-star.s3 {
  bottom: 18%;
  right: 10%;
  animation-delay: 2s;
  font-size: 1.35rem;
}

.auth-book {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: 5.5rem;
  height: 4rem;
  transform: translateX(-50%) rotate(-8deg);
  opacity: 0.35;
}

.auth-book-spine {
  position: absolute;
  inset: 0;
  border-radius: 6px 14px 14px 6px;
  background: linear-gradient(135deg, #0d6b62, #0d8a7f);
  box-shadow: 0 8px 24px rgba(13, 60, 50, 0.15);
}

.auth-book-page {
  position: absolute;
  top: 0.35rem;
  right: 0.45rem;
  bottom: 0.35rem;
  left: 0.9rem;
  border-radius: 2px 8px 8px 2px;
  background: #fffef8;
  border: 1px solid rgba(13, 138, 127, 0.12);
}

.auth-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem max(1.5rem, env(safe-area-inset-bottom));
}

.auth-panel {
  width: min(400px, 100%);
  padding: clamp(1.5rem, 4vw, 2rem);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 28px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 20px 50px rgba(13, 60, 50, 0.1);
  animation: authRise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-mark {
  position: relative;
  text-align: center;
  margin-bottom: 1.75rem;
  padding: 0.5rem 0 0.25rem;
}

.auth-mark-halo {
  position: absolute;
  left: 50%;
  top: 38%;
  width: min(18rem, 88%);
  height: 7.5rem;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(ellipse 70% 100% at 50% 50%, rgba(255, 220, 150, 0.35), transparent 68%),
    radial-gradient(ellipse 90% 80% at 50% 60%, rgba(13, 138, 127, 0.12), transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.auth-mark-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.auth-mark-spark {
  position: absolute;
  color: #e8a020;
  font-size: 0.72rem;
  opacity: 0.9;
  animation: authMarkSpark 3.6s ease-in-out infinite;
}

.auth-mark-spark.sp1 {
  top: 0.15rem;
  left: 18%;
  animation-delay: 0s;
}

.auth-mark-spark.sp2 {
  top: 1.1rem;
  right: 14%;
  color: #0d8a7f;
  font-size: 0.62rem;
  animation-delay: 1.1s;
}

.auth-mark-spark.sp3 {
  top: 3.6rem;
  left: 10%;
  font-size: 0.95rem;
  animation-delay: 2s;
}

.auth-mark-core {
  position: relative;
  z-index: 2;
}

.auth-logo {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.02em;
  margin: 0 0 0.85rem;
  font-family: 'Fredoka', var(--font-kid, 'Fredoka'), sans-serif;
  font-size: clamp(2.15rem, 8.5vw, 2.65rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.auth-logo-ll {
  color: var(--brand-ll);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.85);
}

.auth-logo-spark {
  color: var(--brand-spark);
}

.auth-slogan-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.auth-slogan-line {
  flex: 0 1 2.2rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(13, 138, 127, 0.35), transparent);
}

.auth-slogan {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.02rem, 3.6vw, 1.15rem);
  font-weight: 700;
  font-style: italic;
  color: #0d6b62;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.auth-slogan-shine {
  font-style: normal;
  font-weight: 800;
  color: var(--brand-spark);
  position: relative;
}

.auth-slogan-shine::after {
  content: " ✦";
  font-size: 0.72em;
  vertical-align: super;
  color: var(--brand-spark);
}

.auth-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #3d6b63;
  line-height: 1.35;
  background: linear-gradient(180deg, rgba(232, 247, 242, 0.95), rgba(255, 249, 239, 0.9));
  border: 1px solid rgba(13, 138, 127, 0.14);
  box-shadow: 0 2px 0 rgba(13, 60, 50, 0.04);
}

.auth-tag-icon {
  display: inline-flex;
  font-size: 0.72rem;
  color: #e8a020;
  animation: authMarkSpark 2.8s ease-in-out infinite;
}

@keyframes authMarkSpark {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.92) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.08) rotate(12deg);
  }
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-field-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #6b8480;
  letter-spacing: 0.04em;
}

.auth-field input {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  border: 1.5px solid rgba(13, 138, 127, 0.14);
  background: #fff;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-field input:focus {
  outline: none;
  border-color: #0d8a7f;
  box-shadow: 0 0 0 3px rgba(13, 138, 127, 0.14);
}

.auth-field input::placeholder {
  color: #a8b5b2;
  font-weight: 600;
}

.auth-submit {
  margin-top: 0.25rem;
  min-height: 3.1rem;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 0 rgba(13, 60, 50, 0.12);
}

.auth-submit:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 2px 0 rgba(13, 60, 50, 0.12);
}

.auth-alt {
  margin-top: 0.25rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.15rem 0;
  color: #8aa39e;
  font-size: 0.72rem;
  font-weight: 800;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(13, 138, 127, 0.12);
}

.auth-wechat {
  width: 100%;
  min-height: 3rem;
  border-radius: 999px;
  font-weight: 800;
  background: #07c160;
  border-color: #07c160;
}

.auth-wechat:hover:not(:disabled) {
  background: #06ad56;
  border-color: #06ad56;
}

.auth-status {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.auth-status-title {
  margin: 0 0 0.35rem;
  font-weight: 800;
  font-size: var(--text-sm);
}

.auth-status-message {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--muted);
  font-weight: 600;
}

.auth-status-failed,
.auth-status-binding,
.auth-status-role,
.auth-status-locked {
  border-color: rgba(232, 93, 76, 0.35);
  background: #fff5f3;
}

.auth-status-failed .auth-status-title,
.auth-status-binding .auth-status-title,
.auth-status-role .auth-status-title,
.auth-status-locked .auth-status-title {
  color: var(--coral);
}

.auth-status-unavailable {
  border-color: #f0c56a;
  background: #fff8eb;
}

.auth-status-ok {
  border-color: rgba(13, 138, 127, 0.35);
  background: var(--mint);
}

.auth-status-ok .auth-status-title {
  color: var(--sea-deep);
}

@keyframes authRise {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes authTwinkle {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-panel,
  .auth-star,
  .auth-mark-spark,
  .auth-tag-icon {
    animation: none;
  }
}

/* Legacy / callback shared utilities */
.auth-section {
  margin-bottom: var(--space-4);
}

.auth-section:last-child {
  margin-bottom: 0;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.auth-actions .btn {
  width: 100%;
}

.auth-hint {
  margin: var(--space-2) 0 0;
  font-size: var(--text-xs);
  color: var(--muted);
  font-weight: 600;
  line-height: 1.45;
}

.auth-admin-note {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--line);
  font-size: var(--text-xs);
  color: var(--muted);
  font-weight: 600;
}

.auth-admin-note a {
  font-weight: 800;
}
