/* 页间小岛 · 站点页（主页 / 登录）
   独立样式表：只服务 home.html 与 login.html，不参与阅读器外壳。
   配色沿用纸本阅读的墨绿与纸白，标题用衬线体，读起来像一本刊物的扉页。 */

:root {
  --bg: #f4f2ee;
  --paper: #fffdf9;
  --paper-2: #faf8f3;
  --ink: #2c2b28;
  --ink-2: #56534d;
  --ink-3: #8b867d;
  --line: #e5e0d6;
  --line-soft: #efeae0;
  --accent: #7d8b7c;
  --accent-ink: #46523f;
  --accent-soft: #eef1ea;
  --pine: #22453a;
  --pine-2: #2f5e4c;
  --amber: #d9782e;
  --danger: #a9554c;
  --shadow-sm: 0 1px 2px rgba(44, 43, 40, 0.05), 0 2px 8px rgba(44, 43, 40, 0.04);
  --shadow-md: 0 2px 6px rgba(44, 43, 40, 0.05), 0 18px 40px rgba(44, 43, 40, 0.09);
  --shadow-lg: 0 30px 70px -30px rgba(38, 48, 40, 0.35), 0 4px 12px rgba(44, 43, 40, 0.06);
  --display: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Songti SC', 'Noto Serif CJK SC', 'Source Han Serif SC', Georgia, serif;
  --ui: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  --en: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }

/* 组件自带的 display 会盖掉 [hidden]，这里统一补回来 */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  background-image:
    radial-gradient(1100px 520px at 88% -12%, rgba(125, 139, 124, 0.13), transparent 62%),
    radial-gradient(760px 460px at -6% 4%, rgba(217, 120, 46, 0.06), transparent 58%);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; }

::selection { background: rgba(125, 139, 124, 0.26); }

.wrap { width: min(1140px, 100% - 48px); margin-inline: auto; }

/* ---------------- 通用按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.12s ease, box-shadow 0.18s ease;
}

.btn:hover { border-color: #d6d0c3; background: #fff; }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--pine);
  border-color: var(--pine);
  color: #fdfbf4;
  box-shadow: 0 6px 16px -8px rgba(34, 69, 58, 0.7);
}

.btn--primary:hover { background: var(--pine-2); border-color: var(--pine-2); color: #fff; }

.btn--ghost { background: transparent; border-color: transparent; color: var(--ink-2); }

.btn--ghost:hover { background: rgba(44, 43, 40, 0.05); border-color: transparent; }

.btn--lg { height: 44px; padding-inline: 22px; font-size: 14px; border-radius: 11px; }

.btn--block { width: 100%; }

.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------------- 顶部导航 ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  backdrop-filter: saturate(1.15) blur(12px);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand img { width: auto; height: 34px; display: block; }

.nav__links { display: flex; align-items: center; gap: 22px; }

.nav__links a {
  position: relative;
  color: var(--ink-2);
  font-size: 13px;
  padding-block: 6px;
}

.nav__links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--accent-ink);
  transition: right 0.2s ease;
}

.nav__links a:hover { color: var(--accent-ink); }
.nav__links a:hover::after { right: 0; }

.nav__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav__actions .btn { height: 34px; padding-inline: 14px; font-size: 13px; }

/* ---------------- 首屏 ---------------- */
/* 首页背景画：只铺首屏，向上顶到吸顶导航后面，向下在区块交界处收干净 */
.hero-stage { position: relative; }

.home-art {
  position: absolute;
  top: -66px;
  left: 0;
  right: 0;
  bottom: -76px;
  background: url('/assets/home-hero.jpg') right center / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 0 70%, rgba(0, 0, 0, 0.5) 88%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0 70%, rgba(0, 0, 0, 0.5) 88%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  align-items: center;
  gap: 60px;
  padding: 74px 0 70px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--accent-ink);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.hero h1 {
  margin: 20px 0 0;
  font-family: var(--display);
  font-size: clamp(34px, 4.1vw, 52px);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.015em;
}

.hero h1 em {
  font-style: normal;
  color: var(--pine);
  box-shadow: inset 0 -0.32em 0 color-mix(in srgb, var(--accent) 26%, transparent);
}

.lede {
  margin: 20px 0 0;
  max-width: 32em;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.86;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

.hero__points {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-3);
  font-size: 12px;
}

.hero__points li { display: inline-flex; align-items: center; gap: 7px; }

.hero__points li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------------- 首屏预览（三栏阅读的速写） ---------------- */
.preview { position: relative; }

.preview__card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: rotate(-0.35deg);
}

.preview__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper-2);
  font-size: 11px;
  color: var(--ink-3);
}

.preview__dots { display: inline-flex; gap: 4px; margin-right: 2px; }

.preview__dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ddd6c8;
}

.preview__name { color: var(--ink-2); font-weight: 500; }

.preview__body { display: grid; grid-template-columns: 0.92fr 1.28fr; min-height: 306px; }

.pv-pdf {
  padding: 12px 11px 14px;
  border-right: 1px solid var(--line-soft);
  background: var(--paper-2);
}

.pv-label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-3);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pv-page {
  padding: 10px 9px;
  border: 1px solid #e9e4d9;
  border-radius: 3px;
  background: #fff;
  color: #6d6a63;
  font-family: var(--en);
  font-size: 7.4px;
  line-height: 1.62;
  text-align: justify;
  column-count: 2;
  column-gap: 8px;
  max-height: 246px;
  overflow: hidden;
  box-shadow: 0 8px 18px -14px rgba(44, 43, 40, 0.5);
}

.pv-page p { margin: 0 0 5px; }

.pv-page b { display: block; font-size: 9px; letter-spacing: -0.01em; color: #3c3a35; }

.pv-page mark {
  background: color-mix(in srgb, var(--accent) 26%, transparent);
  box-shadow: inset 0 -1px 0 var(--accent);
}

.pv-read { padding: 14px 16px 16px; background: var(--paper); }

.pv-sentence {
  margin: 0;
  color: #33312c;
  font-family: var(--en);
  font-size: 12.5px;
  line-height: 1.72;
}

.pv-sentence mark {
  background: none;
  padding-bottom: 1px;
  border-bottom: 1.5px solid color-mix(in srgb, var(--amber) 70%, transparent);
  color: inherit;
}

.pv-zh { margin: 8px 0 0; color: var(--ink-3); font-size: 11px; line-height: 1.75; }

.pv-divider { height: 1px; margin: 13px 0 11px; background: var(--line-soft); }

.pv-note { display: flex; gap: 9px; }

.pv-note__tag {
  flex: 0 0 auto;
  height: 17px;
  padding: 0 6px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--amber) 16%, transparent);
  color: #a05a1f;
  font-size: 9px;
  font-weight: 600;
  line-height: 17px;
}

.pv-note__text { color: var(--ink-2); font-size: 10.5px; line-height: 1.7; }

.pv-note__text b { color: var(--ink); font-family: var(--en); font-size: 11px; }

.pv-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }

.pv-chips span {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink-3);
  font-size: 9.5px;
}

/* 贴在预览卡边上的一枚小纸条 */
.preview__slip {
  position: absolute;
  left: -18px;
  bottom: -22px;
  width: 176px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf4;
  box-shadow: var(--shadow-md);
  transform: rotate(-2deg);
}

.preview__slip strong { display: block; font-size: 11.5px; color: var(--accent-ink); }

.preview__slip span { display: block; margin-top: 3px; color: var(--ink-3); font-size: 10.5px; line-height: 1.6; }

/* ---------------- 学习动线 ---------------- */
.section { padding: 74px 0; }

.section--flow { border-top: 1px solid transparent; }

.section__head { display: flex; align-items: flex-end; gap: 24px; margin-bottom: 34px; }

.section__head h2 {
  margin: 10px 0 0;
  font-family: var(--display);
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section__head p { margin: 0 0 6px auto; max-width: 26em; color: var(--ink-3); font-size: 13px; line-height: 1.8; }

.flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  overflow: hidden;
}

.flow__step { position: relative; padding: 24px 22px 26px; }

.flow__step + .flow__step { border-left: 1px solid var(--line-soft); }

.flow__step::after {
  content: '→';
  position: absolute;
  top: 26px;
  right: -8px;
  z-index: 1;
  width: 16px;
  text-align: center;
  color: var(--ink-3);
  font-size: 11px;
  opacity: 0.55;
}

.flow__step:last-child::after { display: none; }

.flow__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
}

.flow__step h3 { margin: 0; font-size: 14px; font-weight: 650; letter-spacing: 0.01em; }

.flow__step p { margin: 7px 0 0; color: var(--ink-3); font-size: 12px; line-height: 1.75; }

/* ---------------- 功能（每个页面一张卡） ---------------- */
.feature-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }

.feature {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  padding: 22px 22px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  transition: border-color 0.18s ease, box-shadow 0.22s ease, transform 0.18s ease;
}

.feature--wide { grid-column: span 3; }

.feature:hover { border-color: #d3ddcd; box-shadow: var(--shadow-md); transform: translateY(-2px); }

.feature__top { display: flex; align-items: center; gap: 10px; }

.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-2);
  color: var(--accent-ink);
}

.feature__icon svg { width: 17px; height: 17px; }

.feature__num {
  margin-left: auto;
  color: #c6c9bd;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.feature h3 { margin: 16px 0 0; font-family: var(--display); font-size: 17px; font-weight: 600; }

.feature h3 small { margin-left: 6px; color: var(--ink-3); font-family: var(--ui); font-size: 11px; font-weight: 400; letter-spacing: 0.02em; }

.feature p { margin: 8px 0 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.8; }

.feature ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }

.feature li {
  position: relative;
  padding-left: 14px;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.7;
}

.feature li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: color-mix(in srgb, var(--accent) 70%, #fff);
  transform: rotate(45deg);
}

.feature__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  padding-top: 16px;
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 500;
}

.feature__link::after { content: '→'; transition: transform 0.18s ease; }

.feature:hover .feature__link::after { transform: translateX(3px); }

/* ---------------- 收尾 CTA ---------------- */
.cta {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 40px;
  margin: 10px 0 84px;
  padding: 44px 46px;
  border-radius: 18px;
  background: #2b4a3f url('/assets/cta-watercolor.jpg') center / cover no-repeat;
  color: #f6f3e7;
  overflow: hidden;
}

/* 左侧压一层深色，白字才不会压在水彩的亮部上 */
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(96deg, rgba(17, 42, 35, 0.86) 0%, rgba(17, 42, 35, 0.62) 44%, rgba(17, 42, 35, 0.12) 78%, rgba(17, 42, 35, 0.26) 100%);
  pointer-events: none;
}

.cta h2 {
  position: relative;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.cta p { position: relative; margin: 10px 0 0; max-width: 42em; color: rgba(244, 241, 229, 0.78); font-size: 13px; line-height: 1.8; }

.cta__actions { position: relative; display: flex; gap: 10px; }

.cta .btn { border-color: rgba(255, 255, 255, 0.34); background: rgba(19, 43, 36, 0.38); color: #f6f3e7; backdrop-filter: blur(2px); }

.cta .btn:hover { background: rgba(19, 43, 36, 0.58); border-color: rgba(255, 255, 255, 0.5); }

.cta .btn--primary { background: #f6f3e7; border-color: #f6f3e7; color: #22453a; box-shadow: none; }

.cta .btn--primary:hover { background: #fffdf4; border-color: #fffdf4; color: #22453a; }

/* ---------------- 页脚 ---------------- */
.foot { border-top: 1px solid var(--line); padding: 30px 0 40px; }

.foot__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; color: var(--ink-3); font-size: 12px; }

.foot__brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-family: var(--display); font-size: 14px; }

.foot__brand img { width: auto; height: 23px; }

.foot__links { display: flex; gap: 18px; margin-left: auto; }

.foot__links a:hover { color: var(--accent-ink); }

/* ============================================================
   登录 / 注册页
   ============================================================ */
/* 整页水彩背景 + 左偏卡片：不再有左侧绿色大块，卡片也不再压在画面主体上 */
.auth-body {
  --auth-art: url('/assets/auth-window.jpg');
  min-height: 100vh;
  background: #f4f0e4;
}

/* 背景独立成一层：桌面铺满整屏、主体靠右，卡片落在左侧留白里 */
.auth__art {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--auth-art) right 46% / cover no-repeat;
}

/* 左侧压一层米色，让卡片边缘化进纸里，也保证“返回首页”按钮可读 */
.auth__art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(250, 247, 237, 0.94) 0%,
    rgba(250, 247, 237, 0.88) 22%,
    rgba(250, 247, 237, 0.34) 40%,
    rgba(250, 247, 237, 0) 54%
  );
}

.auth {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: start;
  min-height: 100vh;
  /* 左边距跟站点的 .wrap 对齐，卡片与导航、页脚落在同一条竖线上 */
  padding: 74px max(24px, calc((100% - 1140px) / 2)) 56px;
}

.auth__main {
  display: flex;
  justify-content: flex-start;
  width: 100%;
}

.auth__card {
  width: min(412px, 100%);
  padding: 32px 34px 30px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  background: rgba(255, 253, 247, 0.94);
  box-shadow: 0 30px 66px -36px rgba(31, 68, 56, 0.4);
  backdrop-filter: blur(6px);
}

.auth__card.account { width: min(556px, 100%); }

.auth__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: 0.01em;
}

.auth__brand img { width: auto; height: 40px; }

.auth__tagline {
  margin: 9px 0 22px;
  color: var(--ink-3);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-align: center;
}

.auth__back {
  position: fixed;
  top: 22px;
  left: 24px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.82);
  box-shadow: 0 10px 22px -16px rgba(31, 68, 56, 0.6);
  color: var(--ink-2);
  font-size: 12.5px;
  backdrop-filter: blur(6px);
}

.auth__back:hover { color: var(--accent-ink); border-color: #d6d0c3; }

.auth__card h2 { margin: 0; font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -0.01em; }

.auth__sub { margin: 8px 0 0; color: var(--ink-3); font-size: 12.5px; }

.auth__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin: 22px 0 20px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-2);
}

.auth__tab {
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-3);
  font-size: 13px;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

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

.auth__tab.is-active { background: var(--paper); color: var(--accent-ink); font-weight: 600; box-shadow: var(--shadow-sm); }

.field { display: block; margin-bottom: 13px; }

.field[hidden] { display: none; }

.field__label { display: block; margin-bottom: 6px; color: var(--ink-2); font-size: 12px; }

.field__box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field__box:focus-within { border-color: color-mix(in srgb, var(--accent) 62%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }

.field__box.is-error { border-color: color-mix(in srgb, var(--danger) 55%, var(--line)); }

.field__box input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 13.5px;
  outline: none;
}

.field__box input::placeholder { color: #b3aea3; }

.field__box svg { flex: 0 0 auto; width: 15px; height: 15px; color: #a9a49a; }

.field__reveal {
  flex: 0 0 auto;
  height: 24px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper-2);
  color: var(--ink-3);
  font-size: 11px;
}

.field__reveal:hover { color: var(--accent-ink); border-color: #d3cdc0; }

.auth__hint { margin: 2px 0 0; color: var(--ink-3); font-size: 11.5px; line-height: 1.7; }

.auth__error {
  display: none;
  align-items: flex-start;
  gap: 7px;
  margin: 12px 0 0;
  padding: 9px 11px;
  border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, var(--danger) 7%, var(--paper));
  color: #8f463f;
  font-size: 12px;
  line-height: 1.65;
}

.auth__error.is-on { display: flex; }

.auth__submit { margin-top: 16px; height: 44px; font-size: 14px; border-radius: 11px; }

.auth__submit .spinner {
  width: 13px;
  height: 13px;
  border: 1.6px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.auth__legal { margin: 14px 0 0; color: var(--ink-3); font-size: 11px; line-height: 1.75; }

.auth__switch { margin: 18px 0 0; color: var(--ink-3); font-size: 12.5px; text-align: center; }

.auth__switch button { border: 0; background: none; color: var(--accent-ink); font-size: 12.5px; font-weight: 600; padding: 0 2px; }

.auth__switch button:hover { text-decoration: underline; text-underline-offset: 3px; }

.auth__done { display: none; }

.auth__done.is-on { display: block; }

.auth__done .card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.auth__done strong { display: block; font-size: 14px; }

.auth__done span { display: block; margin-top: 4px; color: var(--ink-3); font-size: 12px; }

.auth__done-note { margin: 10px 0 0; color: var(--ink-3); font-size: 12px; line-height: 1.75; }

.auth__done .btn { margin-top: 16px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .hero { gap: 40px; padding: 56px 0 58px; }
  .feature-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .feature, .feature--wide { grid-column: span 2; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow__step:nth-child(2)::after { display: none; }
  .flow__step:nth-child(3), .flow__step:nth-child(4) { border-top: 1px solid var(--line-soft); }
  .flow__step:nth-child(3) { border-left: 0; }
}

@media (max-width: 900px) {
  .nav__links { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 42px; }
  .preview__card { transform: none; }
  .preview__slip { left: auto; right: 8px; bottom: -20px; }
  .section__head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .section__head p { margin: 0; }
  .cta { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 32px 26px; }
  /* 窄屏：背景图退成顶部一条画带，卡片落在下方，两者互不遮挡 */
  .auth-body { display: flex; flex-direction: column; }
  .auth__art {
    position: relative;
    inset: auto;
    flex: none;
    height: clamp(184px, 30vh, 264px);
    background-position: 74% center;
  }
  .auth__art::after {
    background: linear-gradient(
      180deg,
      rgba(250, 247, 237, 0) 42%,
      rgba(250, 247, 237, 0.72) 86%,
      rgba(250, 247, 237, 1) 100%
    );
  }
  .auth {
    flex: 1;
    min-height: 0;
    align-content: start;
    justify-items: center;
    padding: 14px 16px 44px;
  }
  .auth__main { justify-content: center; }
  .auth__back { position: absolute; top: 14px; left: 14px; }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .hero { padding: 40px 0 46px; }
  .preview__body { grid-template-columns: minmax(0, 1fr); }
  .pv-pdf { display: none; }
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .feature, .feature--wide { grid-column: span 1; }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow__step + .flow__step { border-left: 0; border-top: 1px solid var(--line-soft); }
  .flow__step::after { display: none; }
  .section { padding: 52px 0; }
  .cta { margin-bottom: 56px; }
  .preview__slip { display: none; }
  .foot__links { margin-left: 0; }
}

/* ---------------- 账号页 ---------------- */
.account { width: min(464px, 100%); }

.account__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0 20px;
}

.account__avatar {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--pine);
  color: #fdfbf4;
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(255, 253, 247, 0.9), 0 10px 22px -16px rgba(31, 68, 56, 0.7);
}

.account__avatar-inner {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
  background: var(--avatar, var(--pine));
  background-size: cover;
  background-position: center;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.account__avatar-inner svg { width: 68%; height: 68%; }

.account__avatar-inner.is-photo { font-size: 0; }

.account__avatar-edit {
  position: absolute;
  right: -1px;
  bottom: -1px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fffdf7;
  box-shadow: 0 2px 6px rgba(31, 68, 56, 0.2);
  color: var(--accent-ink);
  font-size: 11px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.account__avatar:hover .account__avatar-edit,
.account__avatar:focus-visible .account__avatar-edit { opacity: 1; }

.account__tip { margin: -8px 0 16px 72px; color: var(--ink-3); font-size: 11.5px; line-height: 1.7; }

.account__name-input {
  width: 100%;
  padding: 2px 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 46%, var(--line));
  border-radius: 8px;
  background: #fffdf7;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--ink);
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  outline: none;
}

/* 头像选择面板 */
.avatar-panel {
  margin: 0 0 18px;
  padding: 14px 16px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(250, 247, 238, 0.86);
}

.avatar-panel[hidden] { display: none; }

.avatar-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
  color: var(--ink-3);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.avatar-panel__close {
  border: 0;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
  font-size: 11.5px;
  padding: 2px 4px;
}

.avatar-panel__close:hover { color: var(--accent-ink); }

.avatar-panel__grid { display: flex; flex-wrap: wrap; gap: 10px; }

.avatar-choice {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.avatar-choice svg { width: 70%; height: 70%; }

.avatar-choice:hover { transform: translateY(-1px); }

.avatar-choice.is-active { box-shadow: 0 0 0 2px #fffdf7, 0 0 0 4px var(--accent); }

.avatar-panel__upload {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--accent-ink);
  font-size: 12.5px;
  cursor: pointer;
}

.avatar-panel__upload small { color: var(--ink-3); font-size: 11px; }

.account__ident { min-width: 0; }
.account__ident h2 { margin: 0; font-size: 22px; }
.account__ident p {
  margin: 3px 0 0;
  color: var(--ink-3);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-bottom: 20px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  overflow: hidden;
}

.account__stat {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 12px 6px 11px;
  background: var(--paper);
  color: var(--ink-2);
  text-decoration: none;
  transition: background 0.14s ease;
}

.account__stat:hover { background: var(--paper-2); }
.account__stat strong {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.account__stat span { font-size: 11.5px; color: var(--ink-3); letter-spacing: 0.02em; }

/* 单词本是入口，给一格淡淡的主题绿，一眼找得到 */
.account__stat--words { background: var(--accent-soft); }
.account__stat--words:hover { background: #e6ebe1; }
.account__stat--words strong { color: var(--accent-ink); }

.account__meta {
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 9px;
}

.account__meta > div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.account__meta dt { color: var(--ink-3); font-size: 12px; }
.account__meta dd { margin: 0; display: flex; align-items: center; gap: 8px; min-width: 0; }
.account__meta code {
  font-family: var(--en);
  font-size: 12px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account__copy {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  padding: 2px 8px;
  font: inherit;
  font-size: 11.5px;
  color: var(--ink-3);
  cursor: pointer;
}
.account__copy:hover { border-color: #d6d0c3; color: var(--ink); }

.account__block {
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.account__block h3 { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--ink); }
.account__hint { margin: 0 0 10px; font-size: 11.5px; color: var(--ink-3); line-height: 1.6; }

.account__row { display: flex; gap: 8px; }
.account__row .btn { flex: 0 0 auto; }
.account__stack { display: grid; gap: 8px; }
.account__stack .btn { justify-self: start; }

.account .input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
}
.account .input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.account .input::placeholder { color: #b4aea2; }

.account__block--foot { border-top: 0; padding-top: 6px; }

/* ---------- 我的单词本（整页 /wordbook） ---------- */
/* 比账号卡宽一档（.auth__card.account 的宽度要压过去，所以写全三级） */
.auth__card.account.wb {
  width: min(760px, 100%);
  height: min(760px, calc(100vh - 132px));
  min-height: 420px;
  padding: 26px 30px 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wb__head { display: flex; align-items: flex-start; gap: 16px; }

.wb__ident { min-width: 0; }

.wb__head h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.wb__summary { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-3); }

.wb__go { margin-left: auto; flex: none; white-space: nowrap; }

.wb__search { margin-top: 16px; }

.wb__search .input { width: 100%; }

/* 首字母速跳：只列存在的字母 */
.wb__letters { display: flex; flex-wrap: wrap; gap: 2px; margin: 12px 0 0; }

.wb__letter-btn {
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--ink-3);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.wb__letter-btn:hover { background: var(--paper-2); color: var(--ink); }
.wb__letter-btn.is-active { background: var(--accent-soft); color: var(--accent-ink); }

.wb__list {
  flex: 1;
  min-height: 0;
  margin: 10px -10px 0 0;
  padding-right: 10px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.wb__group { margin-top: 14px; }
.wb__group:first-child { margin-top: 0; }

/* 字母做小标题，滚的时候贴住列表顶部 */
.wb__letter {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 0;
  padding: 6px 2px 7px;
  /* 必须是实底：吸顶时下面的行要从它身下滑过去，半透明会把字透出来 */
  background: var(--paper);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent-ink);
}

.wb__letter-count {
  font-family: var(--ui);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-3);
}

.wb__rows { list-style: none; margin: 0; padding: 0; }

.wb__row {
  position: relative;
  display: grid;
  gap: 3px;
  padding: 10px 60px 11px 6px;
  border-top: 1px solid var(--line-soft);
  border-radius: 0;
  transition: background 0.14s ease;
}

.wb__group:first-child .wb__row:first-child { border-top: 0; }
.wb__row:hover { background: var(--paper-2); }

.wb__word {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  justify-self: start;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: var(--en);
  font-size: 17.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.wb__word:hover { color: var(--accent-ink); }

.wb__lemma { font-family: var(--ui); font-size: 10.5px; font-weight: 400; color: var(--ink-3); }

.wb__meaning {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-2);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.wb__context {
  margin: 2px 0 0;
  padding-left: 8px;
  border-left: 2px solid var(--line);
  font-size: 11.5px;
  font-style: italic;
  line-height: 1.7;
  color: var(--ink-3);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.wb__meta { font-size: 10.5px; color: #a8a297; letter-spacing: 0.02em; }

.wb__remove {
  position: absolute;
  top: 9px;
  right: 2px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: none;
  color: var(--ink-3);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.wb__row:hover .wb__remove,
.wb__remove:focus-visible { opacity: 1; }

.wb__remove:hover { border-color: var(--line); background: var(--paper); color: var(--danger); }

/* 触屏没有 hover，移除按钮一直露着 */
@media (hover: none) {
  .wb__remove { opacity: 1; }
}

@media (max-width: 640px) {
  .wb__remove { opacity: 1; top: 6px; right: 0; }
  .wb__row { padding-right: 54px; }
}

.wb__empty { margin: auto 0; padding: 44px 10px; text-align: center; }

.wb__empty-title { margin: 0; font-family: var(--display); font-size: 17px; color: var(--ink); }

.wb__empty-hint { margin: 8px auto 0; max-width: 360px; font-size: 12px; line-height: 1.85; color: var(--ink-3); }

.wb__foot {
  margin: 0;
  padding: 10px 2px 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px;
  color: var(--ink-3);
}

@media (max-width: 900px) {
  /* 窄屏不再把列表塞进固定高度，整页滚更顺手 */
  .auth__card.account.wb { height: auto; min-height: 0; padding: 22px 18px 4px; }
  .wb__list { flex: none; overflow: visible; margin: 10px 0 0; padding-right: 0; }
  .wb__letter { position: static; }
}

/* ---------- 账号页的折叠块（密码） ---------- */
.account__foldhead {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 2px 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.account__foldtitle { font-size: 13px; font-weight: 600; color: var(--ink); }
.account__foldhint { font-size: 11.5px; color: var(--ink-3); }
.account__foldchevron {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 1.6px solid var(--ink-3);
  border-bottom: 1.6px solid var(--ink-3);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.18s ease;
}
.account__foldhead[aria-expanded="true"] .account__foldchevron { transform: rotate(-135deg) translateY(-2px); }
.account__foldbody { padding-top: 10px; }

@media (max-width: 640px) {
  .account__meta > div { grid-template-columns: 68px minmax(0, 1fr); }
  .account__stats { grid-template-columns: repeat(2, 1fr); }
}
