.auth-locked { overflow: hidden; }

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--canvas);
}
.auth-screen[hidden] { display: none; }

.auth-card {
  width: min(440px, 100%);
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.auth-brand > span {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 10px;
  color: #fff; background: var(--primary);
  font-family: var(--serif); font-size: 18px; font-weight: 600;
  box-shadow: none;
}
.auth-brand div { display: grid; gap: 4px; }
.auth-brand strong { color: var(--ink); font: 600 20px/1.2 var(--serif); }
.auth-brand small { color: var(--weak); font-size: 12px; }

.auth-heading p { margin: 0 0 8px; color: var(--muted); font-weight: 500; font-size: 12px; }
.auth-heading h1 { margin: 0; color: var(--ink); font: 600 28px/1.3 var(--serif); }
.auth-heading > span { display: block; margin: 8px 0 24px; color: var(--muted); font-size: 13px; }

.auth-card form > label { display: grid; gap: 8px; margin-bottom: 16px; }
.auth-card label > span { color: var(--muted); font-size: 12px; font-weight: 500; }
.auth-card input {
  width: 100%; height: 44px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 10px;
  outline: none; color: var(--ink); background: var(--surface-2);
  font: inherit; font-size: 14px; box-sizing: border-box;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.auth-card input:focus { border-color: var(--primary); box-shadow: var(--focus-ring); background: var(--surface); }

.auth-error { min-height: 20px; margin: 12px 0 8px; color: var(--red); font-size: 13px; }
.auth-submit {
  width: 100%; height: 44px;
  border: 0; border-radius: 10px;
  color: #fff; background: var(--primary);
  font: 600 15px/1 inherit; cursor: pointer;
  transition: background-color var(--dur) var(--ease);
}
.auth-submit:hover { background: var(--primary-deep); }
.auth-submit:disabled { cursor: wait; opacity: .65; }
.auth-cancel {
  width: 100%; height: 40px; margin-top: 8px;
  border: 1px solid var(--border); border-radius: 10px;
  color: var(--muted); background: transparent;
  font: 500 14px/1 inherit; cursor: pointer;
}
.auth-cancel:hover { background: var(--surface-2); }
.auth-error.auth-success { color: var(--green); }

.auth-help { margin: 16px 0 0; color: var(--weak); text-align: center; font-size: 12px; }
.auth-help .auth-link { margin-left: 8px; color: var(--primary); text-decoration: none; }
.auth-help .auth-link:hover { text-decoration: underline; }

.learner-user { display: flex; align-items: center; gap: 8px; padding-left: 12px; border-left: 1px solid var(--border); }
.learner-user[hidden] { display: none; }
.learner-avatar {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  color: #fff; background: var(--primary);
  font-size: 13px; font-weight: 600;
}
.learner-user-copy { display: grid; min-width: 72px; }
.learner-user-copy strong { color: var(--ink); font-size: 13px; line-height: 1.2; }
.learner-user-copy small { color: var(--weak); font-size: 11px; line-height: 1.2; }
.learner-logout {
  padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--muted); background: transparent; cursor: pointer;
}
.learner-logout:hover { color: var(--red); border-color: var(--border-strong); background: var(--red-soft); }

.auth-card input:focus-visible,
.auth-submit:focus-visible,
.auth-cancel:focus-visible,
.learner-logout:focus-visible,
.auth-help .auth-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

html[data-theme="dark"] .auth-screen { background: var(--canvas); }
html[data-theme="dark"] .auth-help .auth-link { color: var(--primary-ink); }
html[data-theme="dark"] .auth-brand > span { background: var(--primary); }

@media (max-width: 700px) {
  .auth-card { padding: 24px; }
  .learner-user-copy { display: none; }
  .learner-logout { padding: 6px; }
}

/* ============================================================
   登录页：左侧产品实景 + 右侧毛玻璃表单
   ============================================================ */
.auth-login {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(340px, 1fr);
  place-items: stretch;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 12% 8%, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, 0) 55%),
    radial-gradient(42% 38% at 74% 30%, rgba(100, 116, 139, .22) 0%, rgba(100, 116, 139, 0) 70%),
    radial-gradient(48% 42% at 82% 78%, rgba(148, 163, 184, .2) 0%, rgba(148, 163, 184, 0) 72%),
    var(--canvas);
}
.auth-login[hidden] { display: none; }

/* 左侧舞台：柔和光斑垫底，产品截图悬浮其上 */
.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 64px 56px;
  overflow: hidden;
}
.auth-visual::before {
  content: "";
  position: absolute;
  inset: -12% -6%;
  pointer-events: none;
  background:
    radial-gradient(50% 45% at 38% 38%, rgba(148, 163, 184, .22), transparent 70%),
    radial-gradient(45% 40% at 70% 72%, rgba(203, 213, 225, .34), transparent 72%);
  filter: blur(44px);
}

.auth-shot-wrap { position: relative; width: min(900px, 100%); }
.auth-slides { position: relative; display: grid; align-items: center; }
.auth-slide {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  filter: blur(6px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease), filter 1.1s var(--ease);
}
.auth-slide.is-active { opacity: 1; transform: none; filter: none; }
.auth-visual-foot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(900px, 100%);
}
.auth-slide-dots { display: flex; align-items: center; gap: 5px; }
.auth-slide-dots i {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: var(--border-strong);
  opacity: .55;
  transition: width .35s var(--ease), background-color .35s var(--ease), opacity .35s var(--ease);
}
.auth-slide-dots i.is-active { width: 18px; background: var(--primary); opacity: 1; }
.auth-shot {
  position: relative;
  width: 100%;
  /* 整体放大但保持内部比例，避免变宽后文字和控件被拉稀 */
  zoom: 1.28;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
  transform: rotate(-1.4deg);
  box-shadow:
    0 48px 90px -46px rgba(15, 23, 42, .45),
    0 18px 40px -28px rgba(15, 23, 42, .3);
}
.auth-shot-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.auth-shot-dots { display: flex; gap: 5px; }
.auth-shot-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); }
.auth-shot-timer { margin-left: auto; color: var(--weak); font-variant-numeric: tabular-nums; }
.auth-shot-body { display: grid; grid-template-columns: minmax(0, 1fr) 96px; }
.auth-shot-q { padding: 20px 20px 18px; }
.auth-shot-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.auth-shot-meta b {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-weight: 500;
}
.auth-shot-stem { margin: 12px 0 14px; color: var(--ink); font: 600 15px/1.6 var(--serif); }
.auth-shot-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  margin-bottom: 6px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}
.auth-shot-opt i {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--weak);
  font-style: normal;
  font-size: 10px;
}
.auth-shot-opt.is-right { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.auth-shot-opt.is-right i { border-color: var(--green); background: var(--green); color: #fff; }
.auth-shot-exp {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
}
.auth-shot-exp b { color: var(--green); font-size: 11px; }
.auth-shot-side { padding: 16px 12px; border-left: 1px solid var(--border); background: var(--surface-2); }
.auth-shot-side > b { display: block; margin-bottom: 10px; color: var(--weak); font-size: 10px; font-weight: 500; }
.auth-shot-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.auth-shot-nums span {
  display: grid;
  place-items: center;
  height: 22px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  color: var(--weak);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.auth-shot-nums .is-done { border-color: transparent; background: var(--primary-soft); color: var(--primary-deep); }
.auth-shot-nums .is-now { border-color: var(--primary); background: var(--primary); color: #fff; }

/* 实景二：知识点阅读 */
.auth-reader { display: grid; grid-template-columns: 172px minmax(0, 1fr); }
.auth-reader-tree {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 12px;
  border-right: 1px solid var(--border);
  background: var(--surface-2);
}
.auth-reader-tree b { margin-bottom: 8px; color: var(--ink); font-size: 11px; }
.auth-reader-tree span { padding: 7px 8px; border-radius: 6px; color: var(--muted); font-size: 11px; }
.auth-reader-tree .is-done { color: var(--weak); }
.auth-reader-tree .is-now { background: var(--primary-soft); color: var(--primary-deep); }
.auth-reader-body { padding: 18px 22px 20px; }
.auth-reader-title { margin: 10px 0 10px; color: var(--ink); font: 600 16px/1.5 var(--serif); }
.auth-reader-body p { margin: 0 0 10px; color: var(--muted); font-size: 11.5px; line-height: 1.8; }
.auth-reader-quote {
  margin: 10px 0;
  padding: 10px 12px;
  border-left: 2px solid var(--primary);
  border-radius: 0 8px 8px 0;
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-size: 11px;
  line-height: 1.7;
}

/* 实景三：错题本 */
.auth-wrong { display: grid; grid-template-columns: minmax(0, 1fr) 180px; }
.auth-wrong-list { padding: 10px 16px; }
.auth-wrong-row { display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.auth-wrong-row:last-child { border-bottom: 0; }
.auth-wrong-row > b {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 10px;
  font-weight: 500;
}
.auth-wrong-row div { display: grid; gap: 3px; min-width: 0; }
.auth-wrong-row span { overflow: hidden; color: var(--ink); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.auth-wrong-row em { color: var(--weak); font-size: 10px; font-style: normal; }
.auth-wrong-side { padding: 14px 12px; border-left: 1px solid var(--border); background: var(--surface-2); }
.auth-wrong-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.auth-wrong-stats div { display: grid; gap: 3px; }
.auth-wrong-stats span { color: var(--weak); font-size: 10px; }
.auth-wrong-stats b { color: var(--ink); font: 600 19px/1.1 var(--serif); }
.auth-side-label { display: block; margin: 10px 0 8px; color: var(--weak); font-size: 10px; font-weight: 500; }
.auth-mini-bar { display: grid; grid-template-columns: 1fr auto; gap: 3px 6px; margin-bottom: 8px; }
.auth-mini-bar span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.auth-mini-bar em { color: var(--weak); font-size: 10px; font-style: normal; }
.auth-mini-bar i { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: var(--border); overflow: hidden; }
.auth-mini-bar u { display: block; height: 100%; border-radius: 3px; background: var(--primary); }

/* 实景四：学习统计 */
.auth-stats { padding: 16px 20px 14px; }
.auth-stats-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.auth-stats-cards div { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.auth-stats-cards span { display: block; margin-bottom: 5px; color: var(--weak); font-size: 10px; }
.auth-stats-cards b { color: var(--ink); font: 600 19px/1.1 var(--serif); }
.auth-stats-cards small { margin-left: 3px; color: var(--weak); font: 500 10px var(--sans); }
.auth-chart-head { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--muted); font-size: 10px; }
.auth-chart-head em { color: var(--weak); font-style: normal; }
.auth-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 118px;
  padding-top: 6px;
  border-bottom: 1px solid var(--border);
}
.auth-chart-bars i { flex: 1; border-radius: 4px 4px 0 0; background: var(--border-strong); opacity: .5; }
.auth-chart-bars i.is-now { background: var(--primary); opacity: 1; }
.auth-chart-axis { display: flex; gap: 12px; margin-top: 7px; }
.auth-chart-axis span { flex: 1; color: var(--weak); font-size: 9px; text-align: center; }

/* 实景五：首页 */
.auth-home { display: grid; grid-template-columns: 200px minmax(0, 1fr); }
.auth-home-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border-right: 1px solid var(--border);
  background: var(--surface-2);
}
.auth-home-left > span { color: var(--muted); font-size: 10px; }
.auth-home-left b { color: var(--ink); font: 600 42px/1 var(--serif); }
.auth-home-left b em { margin-left: 4px; color: var(--muted); font: 500 10px var(--sans); font-style: normal; }
.auth-home-left small { color: var(--weak); font-size: 10px; }
.auth-home-right { display: grid; align-content: start; gap: 10px; padding: 16px 18px; }
.auth-home-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.auth-home-metric { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.auth-home-metric span { display: block; margin-bottom: 5px; color: var(--weak); font-size: 10px; }
.auth-home-metric b { color: var(--ink); font: 600 19px/1.1 var(--serif); }
.auth-home-metric small { margin-left: 3px; color: var(--weak); font: 500 10px var(--sans); }
.auth-home-review { display: grid; gap: 7px; }
.auth-home-review b { color: var(--weak); font-size: 10px; font-weight: 500; }
.auth-home-review span {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 10.5px;
}
.auth-brandline { position: relative; margin: 0; color: var(--weak); font-size: 12px; }
.auth-brandline i { margin: 0 6px; color: var(--border-strong); font-style: normal; }

/* 右侧表单区：光斑 + 玻璃卡片 + 顶部渐隐蒙版 */
.auth-form-side {
  position: relative;
  display: grid;
  place-items: center;
  padding: 48px 20px;
  border-left: 1px solid var(--border);
  overflow: hidden;
}
.auth-form-side::before {
  content: "";
  position: absolute;
  inset: 4% -6% 8% -10%;
  pointer-events: none;
  background:
    radial-gradient(40% 36% at 74% 26%, rgba(100, 116, 139, .38), transparent 70%),
    radial-gradient(46% 42% at 28% 36%, rgba(100, 116, 139, .3), transparent 70%),
    radial-gradient(44% 40% at 70% 72%, rgba(148, 163, 184, .38), transparent 72%),
    radial-gradient(34% 30% at 16% 78%, rgba(203, 213, 225, .55), transparent 74%);
  filter: blur(46px);
}
.auth-form-side::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(15, 23, 42, .035), transparent 26%, transparent 74%, rgba(15, 23, 42, .045));
}

/* 表单直接落在右侧蒙版背景上，不再套玻璃卡 */
.auth-glass {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
}
/* 浮动标签输入框：标签平时在框内，聚焦/有内容时移到边框上 */
.auth-field { position: relative; margin-bottom: 18px; }
.auth-field input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, .62);
  font: inherit;
  font-size: 15px;
  box-sizing: border-box;
  transition: background-color var(--dur) var(--ease);
}
.auth-field input::placeholder { color: transparent; }
.auth-field fieldset {
  position: absolute;
  inset: -1px;
  min-width: 0;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  pointer-events: none;
  transition: border-color var(--dur) var(--ease);
}
.auth-field legend {
  height: 11px;
  max-width: 0;
  padding: 0;
  visibility: hidden;
  font-size: 11px;
  line-height: 1;
  transition: max-width .12s var(--ease);
}
.auth-field legend span {
  display: inline-block;
  padding: 0 4px;
  opacity: 0;
  transition: opacity .12s var(--ease);
}
.auth-field label {
  position: absolute;
  left: 14px;
  top: 50%;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-50%);
  transition: top .16s var(--ease), font-size .16s var(--ease), color .16s var(--ease);
}
.auth-field.is-filled label,
.auth-field:focus-within label { top: 0; font-size: 11px; }
.auth-field:focus-within label { color: var(--primary); }
.auth-field.is-filled legend,
.auth-field:focus-within legend { max-width: 100%; }
.auth-field.is-filled legend span,
.auth-field:focus-within legend span { opacity: 1; }
.auth-field:focus-within fieldset { border-color: var(--primary); border-width: 2px; }
.auth-field:focus-within input { background: #fff; }
.auth-field.is-error fieldset,
.auth-field.is-error:focus-within fieldset { border-color: var(--red); border-width: 2px; }
.auth-field.is-error label,
.auth-field.is-error:focus-within label { color: var(--red); }
.auth-field.is-error input,
.auth-field.is-error:focus-within input { background: var(--red-soft); }
.auth-glass .auth-submit { height: 46px; font-size: 15px; }
.auth-glass .auth-error { min-height: 20px; margin: 0 0 12px; color: var(--red); font-size: 13px; }
.auth-glass .auth-help { margin-top: 14px; text-align: center; }

.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-submit.is-loading::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin .7s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }

html[data-theme="dark"] .auth-login {
  background:
    radial-gradient(120% 90% at 12% 8%, rgba(255, 255, 255, .05) 0%, rgba(255, 255, 255, 0) 55%),
    radial-gradient(90% 80% at 78% 88%, rgba(90, 108, 184, .12) 0%, rgba(90, 108, 184, 0) 62%),
    var(--canvas);
}
html[data-theme="dark"] .auth-form-side::before {
  background:
    radial-gradient(55% 45% at 35% 30%, rgba(90, 108, 184, .2), transparent 70%),
    radial-gradient(50% 45% at 75% 75%, rgba(255, 255, 255, .06), transparent 72%);
}
html[data-theme="dark"] .auth-field fieldset { border-color: rgba(255, 255, 255, .1); }
html[data-theme="dark"] .auth-field input { background: rgba(255, 255, 255, .06); }
html[data-theme="dark"] .auth-field:focus-within input { background: rgba(255, 255, 255, .1); }
html[data-theme="dark"] .auth-field:focus-within fieldset { border-color: var(--primary); border-width: 2px; }
html[data-theme="dark"] .auth-field.is-error input,
html[data-theme="dark"] .auth-field.is-error:focus-within input { background: rgba(220, 38, 38, .14); }

@media (prefers-reduced-motion: reduce) {
  .auth-submit.is-loading::before { animation-duration: 1.6s; }
  .auth-slide { transform: none; transition: opacity .01s linear; }
}
@media (max-width: 980px) {
  .auth-login { grid-template-columns: 1fr; overflow-y: auto; }
  .auth-visual { display: none; }
  .auth-form-side { padding: 40px 24px; border-left: 0; }
}

/* 登录页备案号 */
.auth-icp{
  position:absolute;
  right:0;
  bottom:18px;
  left:0;
  margin:0;
  color:var(--weak);
  font-size:11px;
  text-align:center;
}
.auth-icp a{color:inherit;text-decoration:none}
.auth-icp a:hover{color:var(--muted);text-decoration:underline}
