/* 册集 — auth */

.auth-page {
  min-height: 100dvh;
  background: #efe8db;
}

.auth-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(480px, 1.05fr) minmax(460px, 0.95fr);
}

.auth-aside {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 38px clamp(34px, 5vw, 76px) 32px;
  background:
    radial-gradient(70% 55% at 82% 8%, rgba(180, 81, 46, 0.2), transparent 62%),
    radial-gradient(80% 70% at 4% 100%, rgba(9, 22, 14, 0.75), transparent 68%),
    linear-gradient(145deg, #344c3b 0%, #223529 52%, #17251b 100%);
  color: var(--cream);
}

.auth-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
  opacity: 0.12;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.auth-aside::after {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  left: -330px;
  bottom: -360px;
  border-radius: 50%;
  border: 1px solid rgba(246, 239, 226, 0.1);
  pointer-events: none;
}

.auth-brand {
  position: relative;
  z-index: 2;
  width: fit-content;
}

.auth-brand .brand-mark {
  background: rgba(246, 239, 226, 0.1);
  color: var(--cream);
  border: 1px solid rgba(246, 239, 226, 0.2);
}

.auth-brand .brand-word {
  color: var(--cream);
}

.auth-brand .brand-latin {
  color: rgba(246, 239, 226, 0.4);
}

.auth-aside-body {
  position: relative;
  z-index: 2;
  margin: auto 0;
  padding: 58px 0 40px;
  max-width: 580px;
}

.auth-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(246, 239, 226, 0.52);
}

.auth-eyebrow span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d9a575;
  box-shadow: 0 0 0 4px rgba(217, 165, 117, 0.12);
}

.auth-aside h1 {
  margin-top: 24px;
  font-size: clamp(40px, 4.1vw, 58px);
  line-height: 1.36;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: #f8f0e1;
}

.auth-aside-lead {
  max-width: 430px;
  margin-top: 22px;
  font-size: 13px;
  line-height: 1.9;
  color: rgba(246, 239, 226, 0.54);
}

.auth-shelf {
  position: relative;
  max-width: 470px;
  margin-top: 36px;
  padding: 0 22px;
}

.auth-books {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
  padding: 0 12px;
}

.auth-book {
  position: relative;
  width: 31%;
  max-width: 126px;
  transform: rotate(-1.4deg) translateY(2px);
  transition: transform 0.6s var(--ease);
}

.auth-book:nth-child(2) {
  transform: rotate(0.8deg) translateY(-6px);
  z-index: 2;
}

.auth-book:nth-child(3) {
  transform: rotate(1.8deg) translateY(1px);
}

.auth-shelf:hover .auth-book {
  transform: translateY(-6px) rotate(0deg);
}

.auth-book img {
  width: 100%;
  aspect-ratio: 794 / 1123;
  object-fit: cover;
  border-radius: 2px 4px 4px 2px;
  box-shadow: 8px 14px 24px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.auth-book span {
  display: block;
  margin-top: 10px;
  font-size: 7.5px;
  letter-spacing: 0.02em;
  line-height: 1.5;
  color: rgba(246, 239, 226, 0.45);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-rail {
  height: 9px;
  margin-top: 14px;
  border-radius: 1px;
  background: linear-gradient(180deg, #9b7250, #5a3b27 45%, #3a2618);
  box-shadow: 0 17px 24px -12px rgba(0, 0, 0, 0.65), 0 1px 0 rgba(255, 255, 255, 0.18) inset;
}

.auth-rail::after {
  content: "";
  display: block;
  height: 3px;
  background: rgba(0, 0, 0, 0.25);
  filter: blur(2px);
}

.auth-shelf-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.05em;
  color: rgba(246, 239, 226, 0.32);
}

.auth-sound {
  position: absolute;
  right: -12px;
  top: 30%;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(246, 239, 226, 0.16);
  background: rgba(23, 37, 27, 0.78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 8px;
  color: rgba(246, 239, 226, 0.65);
  transform: rotate(2deg);
}

.auth-sound svg {
  width: 12px;
  height: 12px;
}

.auth-points {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin-top: 28px;
  font-size: 9px;
  color: rgba(246, 239, 226, 0.44);
}

.auth-points li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-points span {
  font-family: var(--mono);
  font-size: 7px;
  color: rgba(226, 196, 141, 0.7);
}

.auth-aside-foot {
  position: relative;
  z-index: 2;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  color: rgba(246, 239, 226, 0.28);
}

.auth-main {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px clamp(28px, 5vw, 86px);
  background:
    radial-gradient(50% 40% at 100% 0%, rgba(180, 81, 46, 0.07), transparent 65%),
    #f4efe5;
}

.auth-main-top {
  position: absolute;
  top: 34px;
  right: clamp(28px, 5vw, 78px);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.auth-main-top a {
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-kicker {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.auth-card h2 {
  margin-top: 14px;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.25;
  letter-spacing: -0.035em;
  font-weight: 650;
}

.auth-sub {
  margin-top: 9px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--muted);
}

#authForm {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 27px;
}

.auth-form .form-error {
  margin-bottom: 0;
}

.auth-form .field-row {
  gap: 12px;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
}

.password-toggle:hover {
  color: var(--ink);
  background: rgba(33, 30, 24, 0.05);
}

.password-toggle svg {
  width: 17px;
  height: 17px;
}

.slug-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(251, 248, 241, 0.7);
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.slug-wrap:focus-within {
  border-color: rgba(33, 30, 24, 0.55);
  background: #fffdf8;
  box-shadow: 0 0 0 3px rgba(33, 30, 24, 0.055);
}

.slug-wrap > span {
  padding-left: 13px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted-light);
  white-space: nowrap;
}

.slug-wrap input {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding-left: 2px;
  font-family: var(--mono);
  font-size: 12px;
}

.auth-submit {
  margin-top: 4px;
  justify-content: space-between;
  padding: 0 20px;
}

.auth-submit svg {
  width: 17px;
  height: 17px;
}

.auth-or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 15px;
  color: var(--muted-light);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}

.demo-login {
  gap: 9px;
  font-size: 12px;
}

.demo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(180, 81, 46, 0.1);
}

.auth-demo-hint {
  margin-top: 10px;
  text-align: center;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--muted-light);
}

.auth-free-note {
  margin-top: 18px;
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--muted-light);
}

.auth-back {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.auth-back svg {
  width: 12px;
  height: 12px;
}

.auth-back:hover {
  color: var(--ink);
}

.register-only.is-hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-aside {
    min-height: 0;
    padding: 24px var(--gutter) 26px;
  }

  .auth-aside-body {
    margin: 0;
    padding: 26px 0 0;
    max-width: 620px;
  }

  .auth-aside h1 {
    margin-top: 16px;
    font-size: clamp(31px, 6vw, 42px);
  }

  .auth-aside h1 br:nth-child(2) {
    display: none;
  }

  .auth-aside-lead {
    margin-top: 12px;
    max-width: 540px;
    font-size: 12px;
  }

  .auth-shelf,
  .auth-points,
  .auth-aside-foot {
    display: none;
  }

  .auth-main {
    padding: 54px var(--gutter) 60px;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .auth-main-top {
    display: none;
  }

  .auth-card {
    max-width: 540px;
    margin: 0 auto;
    width: 100%;
  }

  .auth-back {
    display: none;
  }
}

@media (max-width: 520px) {
  .auth-aside {
    padding-top: 20px;
    padding-bottom: 22px;
  }

  .auth-aside-body {
    padding-top: 22px;
  }

  .auth-eyebrow {
    font-size: 9px;
  }

  .auth-aside h1 {
    font-size: 30px;
    line-height: 1.32;
  }

  .auth-aside h1 br {
    display: none;
  }

  .auth-aside-lead {
    display: none;
  }

  .auth-main {
    padding-top: 38px;
  }

  .auth-card h2 {
    font-size: 28px;
  }

  .auth-sub {
    font-size: 12px;
  }

  #authForm {
    gap: 13px;
    margin-top: 23px;
  }

  .auth-submit {
    height: 48px;
  }
}
