/* 课搭子 · 樱花登录页
   底片：富士山下的樱花动图；进场：一片花瓣由大变小飘落，背景随之由虚转实。 */

:root {
  color-scheme: light;
  --ink: #26313f;
  --ink-2: #48566a;
  --ink-3: #77869a;
  --line: rgba(38, 49, 63, .13);
  --sakura: #e2879f;
  --sakura-deep: #a84963;
  --paper: #fdfcfb;
  --ease: cubic-bezier(.22, .61, .24, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #dfe9f1; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: #dfe9f1;
  color: var(--ink);
  font: 14px/1.7 "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: rgba(226, 135, 159, .26); }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------------- 背景动图 ---------------- */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #dfe9f1;
}
.scene-media {
  position: absolute;
  inset: 0;
  transform: scale(1.16);
  filter: blur(16px) saturate(.92);
  translate: calc(var(--sx, 0) * 1px) calc(var(--sy, 0) * 1px);
  transition: translate 1.1s var(--ease-out);
  animation: sceneFocus 2.9s .3s cubic-bezier(.45, 0, .25, 1) forwards;
}
/* 底片：静态图。以前这里是 <video autoplay loop>，叠上本层的 blur 和上面两处
   backdrop-filter，等于每帧整屏重算模糊；换成静态图后这两处 backdrop-filter
   只在首帧算一次，之后完全免费。 */
.scene-pic {
  position: absolute;
  inset: 0;
  background: url("login-bg.jpg") 58% 50% / cover no-repeat;
}
.scene-haze {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(86% 96% at 6% 50%, rgba(255, 255, 255, .84), rgba(255, 255, 255, .50) 38%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .24) 0%, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0) 74%, rgba(255, 255, 255, .28) 100%);
}
/* 左侧文字区做局部柔焦：樱花变成朦胧底纹，文字保持锐利 */
.scene-soft {
  position: absolute;
  inset: 0;
  pointer-events: none;
  backdrop-filter: blur(9px) saturate(1.04);
  -webkit-backdrop-filter: blur(9px) saturate(1.04);
  -webkit-mask-image: radial-gradient(74% 90% at 10% 50%, #000 0%, rgba(0, 0, 0, .82) 32%, rgba(0, 0, 0, 0) 66%);
  mask-image: radial-gradient(74% 90% at 10% 50%, #000 0%, rgba(0, 0, 0, .82) 32%, rgba(0, 0, 0, 0) 66%);
}
.scene-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(124% 124% at 52% 44%, rgba(0, 0, 0, 0) 40%, rgba(34, 56, 78, .18) 100%);
}
.scene-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------- 主角花瓣 ---------------- */
.petal-fall {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  perspective: 1500px;
  overflow: hidden;
}
.petal-fall__body {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120px;
  height: 154px;
  margin: -77px 0 0 -60px;
  transform-origin: 50% 50%;
  will-change: transform, opacity, filter;
  animation: petalFall 2.7s .15s cubic-bezier(.4, 0, .55, 1) forwards;
}
.petal-fall__body svg { display: block; width: 100%; height: 100%; }
/* 花瓣背后一圈极淡的光晕，让它不像贴纸一样贴在虚焦背景上 */
.petal-fall__body::after {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 216, 230, .55), rgba(255, 216, 230, .16) 58%, rgba(255, 216, 230, 0) 76%);
}

/* 背景里持续飘落的小花瓣 */
.petal-drift {
  position: fixed;
  inset: 0;
  z-index: 12;
  overflow: hidden;
  pointer-events: none;
}
.petal-drift i {
  position: absolute;
  top: -10vh;
  display: block;
  width: var(--w, 18px);
  height: calc(var(--w, 18px) * 1.28);
  opacity: 0;
  /* 2026-10-28：原来这里是 infinite。这 8 片花瓣飘在 .panel 底下，而 .panel 有
     backdrop-filter —— 花瓣每动一下，面板就得把背后整片重新高斯模糊一次，
     永远停不下来。这是登录页「打开就卡」的最后一个源头（视频换成静态图之后）。
     改成只飘一轮（forwards）：首屏仍有落花动感，飘完即静止，毛玻璃随后可被缓存。
     will-change 也一并去掉，静止元素不需要它，留着反而常驻一层合成纹理。 */
  animation: driftFall var(--dur, 20s) var(--delay, 0s) linear forwards;
}
.petal-drift i svg { display: block; width: 100%; height: 100%; }

/* ---------------- 顶栏 ---------------- */
.masthead {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px clamp(20px, 4vw, 56px);
  animation: fadeIn 1s 1.25s var(--ease-out) backwards;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .95);
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 8px 20px -12px rgba(31, 52, 74, .5);
  backdrop-filter: blur(10px);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: .04em;
}
.brand-text b { display: block; color: var(--ink); font-size: 14px; font-weight: 600; letter-spacing: .06em; }
.brand-text i { display: block; margin-top: 1px; color: var(--ink-3); font-size: 8.5px; font-style: normal; letter-spacing: .22em; }
.quiet-link {
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(10px);
  color: var(--ink-2);
  font-size: 12px;
  text-decoration: none;
  transition: background .25s, color .25s, transform .25s var(--ease-out);
}
.quiet-link:hover { background: rgba(255, 255, 255, .92); color: var(--ink); transform: translateY(-1px); }

/* ---------------- 主舞台 ---------------- */
.stage {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(40px, 6vw, 104px);
  width: min(1400px, 100%);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 118px clamp(20px, 4vw, 56px) 96px;
}

/* ---------------- 左侧文案 ---------------- */
.pitch { max-width: 560px; }
.pitch-eyebrow {
  margin: 0 0 26px;
  color: #6b7a8c;
  font-size: 11px;
  letter-spacing: .30em;
  animation: riseIn .9s .95s var(--ease-out) backwards;
}
.pitch-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(42px, 5.3vw, 74px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -.035em;
}
.pitch-title .line { display: block; overflow: hidden; }
.pitch-title .line > span {
  display: block;
  transform: translateY(112%);
  animation: lineUp 1.25s var(--ease-out) forwards;
}
.pitch-title .line:nth-child(1) > span { animation-delay: 1.02s; }
.pitch-title .line:nth-child(2) > span { animation-delay: 1.16s; }
.pitch-title em {
  font-style: normal;
  color: var(--sakura-deep);
}
.pitch-body {
  max-width: 34em;
  margin: 26px 0 0;
  color: #35414f;
  font-size: 14.5px;
  line-height: 1.9;
  animation: riseIn 1s 1.34s var(--ease-out) backwards;
}
.pitch-notes {
  display: flex;
  gap: clamp(24px, 3.4vw, 52px);
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  animation: riseIn 1s 1.46s var(--ease-out) backwards;
}
.pitch-notes li { display: flex; flex-direction: column; gap: 4px; }
.pitch-notes b { color: var(--ink); font-size: 13px; font-weight: 500; }
.pitch-notes span { color: #5d6b7c; font-size: 11.5px; }

/* ---------------- 登录面板 ---------------- */
.panel {
  position: relative;
  isolation: isolate;
  justify-self: end;
  width: min(100%, 398px);
  padding: 32px 30px 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .94);
  border-radius: 26px;
  background: linear-gradient(158deg, rgba(255, 254, 253, .93), rgba(255, 251, 251, .80) 60%, rgba(255, 253, 252, .87));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .55),
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 0 rgba(255, 255, 255, .55),
    0 30px 70px -34px rgba(31, 52, 74, .46),
    0 10px 24px -14px rgba(31, 52, 74, .22);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .3s var(--ease-out), box-shadow .4s, border-color .4s;
  animation: panelRise 1.35s 1.28s var(--ease-out) backwards;
}
.panel-sheen {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  opacity: .45;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 66%);
}
.panel:focus-within {
  border-color: rgba(255, 255, 255, 1);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .7),
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgba(255, 255, 255, .55),
    0 34px 80px -34px rgba(31, 52, 74, .52),
    0 10px 24px -14px rgba(31, 52, 74, .24);
}
.panel-head { margin-bottom: 24px; }
.panel-kicker {
  margin: 0 0 9px;
  color: var(--sakura-deep);
  font-size: 11px;
  letter-spacing: .26em;
}
.panel-head h2 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -.02em;
}
.panel-sub { margin: 0; color: #66758a; font-size: 12.5px; }

.saved-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -6px 0 16px;
  padding: 8px 11px;
  border: 1px solid rgba(150, 190, 175, .38);
  border-radius: 10px;
  background: rgba(240, 250, 246, .78);
  color: #4d7a68;
  font-size: 11px;
}
.saved-status[hidden] { display: none; }
.saved-status i { width: 5px; height: 5px; border-radius: 50%; background: #6fb79b; }

.field { display: block; margin-bottom: 15px; }
.field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 2px 8px;
  color: var(--ink-2);
  font-size: 12px;
}
.field-label i { color: var(--ink-3); font-size: 11px; font-style: normal; }
/* 邀请码的「选填」标签与说明文字：不填也不影响注册，所以要显得轻 */
.field-label .field-opt {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(38, 49, 63, .06);
  color: var(--ink-3);
  font-size: 10.5px;
  font-style: normal;
  letter-spacing: .02em;
}
.field-note {
  display: block;
  margin: 6px 2px 0;
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.5;
}
.field-note b { color: var(--sakura-deep); font-weight: 600; }
.field input {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 1px solid rgba(38, 49, 63, .17);
  border-radius: 12px;
  outline: none;
  background: rgba(255, 255, 255, .9);
  color: var(--ink);
  font-size: 14px;
  transition: border-color .22s, background .22s, box-shadow .22s;
}
.field input::placeholder { color: #98a5b4; }
.field input:hover { border-color: rgba(38, 49, 63, .24); }
.field input:focus {
  border-color: rgba(201, 96, 127, .62);
  background: #fff;
  box-shadow: 0 0 0 3.5px rgba(226, 135, 159, .15);
}
.field input:-webkit-autofill { -webkit-text-fill-color: var(--ink); transition: background-color 9999s ease-out; }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 62px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  min-width: 46px;
  min-height: 36px;
  padding: 6px 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-3);
  font-size: 11.5px;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background .2s, color .2s;
}
.password-toggle:hover { background: rgba(38, 49, 63, .06); color: var(--ink); }

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 1px 18px;
}
.remember { display: flex; align-items: center; gap: 8px; min-height: 32px; color: var(--ink-2); font-size: 12px; cursor: pointer; }
.remember input {
  appearance: none;
  width: 15px;
  height: 15px;
  margin: 0;
  border: 1px solid rgba(38, 49, 63, .28);
  border-radius: 4px;
  background: #fff;
  transition: background .2s, border-color .2s;
}
.remember input:checked { border-color: var(--sakura-deep); background: var(--sakura-deep); }
.remember input:checked::after {
  content: "";
  display: block;
  width: 3px;
  height: 6px;
  margin: 2px 0 0 4px;
  border: solid #fff;
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(42deg);
}
.form-hint { color: var(--ink-3); font-size: 11px; }

.submit-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 52px;
  padding: 0 15px 0 20px;
  border: 0;
  border-radius: 13px;
  background: #2a3344;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .05em;
  cursor: pointer;
  box-shadow: 0 14px 30px -16px rgba(26, 38, 54, .72);
  transition: transform .28s var(--ease-out), background .25s, box-shadow .25s;
}
.submit-button:hover { background: #1f2735; box-shadow: 0 18px 38px -16px rgba(26, 38, 54, .82); }
.submit-button:active { transform: scale(.99); }
.submit-button:disabled { cursor: wait; opacity: .8; }
.submit-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  font-size: 13px;
  transition: transform .3s var(--ease-out), background .3s;
}
.submit-button:hover .submit-icon { transform: translateX(3px); background: rgba(255, 255, 255, .22); }
.submit-button.loading .submit-icon {
  border: 2px solid rgba(255, 255, 255, .26);
  border-top-color: #fff;
  border-radius: 50%;
  background: transparent;
  color: transparent;
  animation: spin .8s linear infinite;
}
.submit-button.success { background: #2f6f57; }
.submit-button.success .submit-icon { background: rgba(255, 255, 255, .2); }

.login-message { min-height: 18px; margin: 10px 2px 0; color: var(--ink-3); font-size: 11.5px; }
.login-message.error { color: #bf4b56; }
.login-message.success { color: #2f7a5d; }

.panel.shake { animation: shake .36s ease both; }
.login-success .panel { border-color: rgba(130, 200, 172, .8); }

/* 表单逐项浮现 */
#login-form > * { animation: riseIn .85s var(--ease-out) backwards; }
#login-form > *:nth-child(1) { animation-delay: 1.58s; }
#login-form > *:nth-child(2) { animation-delay: 1.66s; }
#login-form > *:nth-child(3) { animation-delay: 1.74s; }
#login-form > *:nth-child(4) { animation-delay: 1.82s; }
#login-form > *:nth-child(5) { animation-delay: 1.90s; }
#login-form > *:nth-child(6) { animation-delay: 1.98s; }
.panel-head { animation: riseIn .9s 1.46s var(--ease-out) backwards; }
.saved-status { animation: riseIn .8s 1.5s var(--ease-out) backwards; }

/* ---------------- 页脚 ---------------- */
.colophon {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 56px);
  color: rgba(38, 49, 63, .58);
  font-size: 11px;
  letter-spacing: .1em;
  pointer-events: none;
  animation: fadeIn 1s 1.5s var(--ease-out) backwards;
}

button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--sakura-deep); outline-offset: 3px; }

/* 与控制台互跳时做一次同源淡入淡出；两端都 opt-in，避免转场被中断 */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vtOut .26s ease both; }
::view-transition-new(root) { animation: vtIn .52s var(--ease-out) both; }
@keyframes vtOut { to { opacity: 0; } }
@keyframes vtIn { from { opacity: 0; } }

/* ---------------- 动画 ---------------- */
@keyframes sceneFocus {
  to { transform: scale(1); filter: blur(0) saturate(1.02); }
}
@keyframes sceneBreath {
  from { transform: scale(1.01); }
  to { transform: scale(1.07); }
}
/* 花瓣：占满画面 → 一片小花瓣。翻转集中在开头（此时面积最大），
   中后段保持正面朝外，避免出现“一条细线”的侧脸帧。 */
@keyframes petalFall {
  0% {
    transform: translate3d(-4vw, -48vh, 0) scale(8.6) rotate(-14deg) rotateX(10deg) rotateY(-30deg);
    opacity: 0;
    filter: blur(3.2px);
  }
  6% { opacity: 1; }
  14% {
    transform: translate3d(4vw, -20vh, 0) scale(4.6) rotate(9deg) rotateX(8deg) rotateY(26deg);
    filter: blur(1.9px);
  }
  32% {
    transform: translate3d(-6vw, 0vh, 0) scale(2.6) rotate(-15deg) rotateX(7deg) rotateY(96deg);
    filter: blur(1px);
  }
  56% {
    transform: translate3d(7vw, 20vh, 0) scale(1.35) rotate(12deg) rotateX(5deg) rotateY(152deg);
    filter: blur(.4px);
  }
  82% {
    transform: translate3d(-3vw, 36vh, 0) scale(.75) rotate(-6deg) rotateX(3deg) rotateY(198deg);
    filter: blur(0);
    opacity: 1;
  }
  100% {
    transform: translate3d(1vw, 46vh, 0) scale(.45) rotate(4deg) rotateX(0deg) rotateY(224deg);
    opacity: 0;
  }
}
@keyframes driftFall {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  9% { opacity: var(--op, .5); }
  50% { transform: translate3d(var(--sway, 42px), 56vh, 0) rotate(190deg); opacity: var(--op, .5); }
  88% { opacity: var(--op, .5); }
  100% { transform: translate3d(calc(var(--sway, 42px) * -.65), 122vh, 0) rotate(430deg); opacity: 0; }
}
@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } }
@keyframes lineUp { to { transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes panelRise {
  from { opacity: 0; transform: perspective(1200px) translateY(44px) scale(.962); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 25% { transform: translateX(-5px); } 55% { transform: translateX(4px); } 80% { transform: translateX(-2px); } }

/* ---------------- 自适应 ---------------- */
@media (max-width: 1080px) {
  .stage {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 34px;
    padding-top: 104px;
    padding-bottom: 88px;
  }
  .pitch { max-width: 640px; }
  .panel { justify-self: start; width: min(100%, 460px); }
  .scene-pic { background-position: 54% 46%; }
}

@media (max-width: 600px) {
  .masthead { padding: 16px 16px; }
  .brand-text i { display: none; }
  .quiet-link { padding: 8px 13px; font-size: 11.5px; }
  .stage { gap: 18px; padding: 78px 16px 44px; }
  .pitch-eyebrow { margin-bottom: 12px; font-size: 10px; letter-spacing: .24em; }
  .pitch-title { font-size: clamp(29px, 8.6vw, 35px); line-height: 1.2; }
  .pitch-body { margin-top: 11px; color: var(--ink-2); font-size: 12px; line-height: 1.8; }
  .pitch-notes { display: none; }
  .panel { width: 100%; padding: 22px 18px 16px; border-radius: 22px; }
  /* 手机上背景更亮，面板提白一些，避免透出天空的冷调 */
  .panel {
    background: linear-gradient(158deg, rgba(255, 254, 253, .97), rgba(255, 252, 252, .92) 60%, rgba(255, 253, 252, .95));
  }
  .panel-head { margin-bottom: 16px; }
  .panel-head h2 { font-size: 22px; }
  .field { margin-bottom: 11px; }
  .field input { height: 46px; font-size: 16px; }
  .form-foot { margin-bottom: 13px; }
  .submit-button { min-height: 49px; }
  .colophon { display: none; }
  .scene-pic { background-position: 50% 40%; }
  .scene-soft { display: none; }
  .scene-haze {
    background:
      radial-gradient(132% 62% at 26% 2%, rgba(255, 255, 255, .88), rgba(255, 255, 255, .46) 44%, rgba(255, 255, 255, 0) 74%),
      linear-gradient(180deg, rgba(255, 255, 255, .40) 0%, rgba(255, 255, 255, .08) 34%, rgba(255, 255, 255, .22) 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .petal-fall { display: none; }
  .petal-drift { display: none; }
  .scene-media { transform: none; filter: none; }
  .pitch-title .line > span { transform: none; }
}

/* ---------------- 低配模式（perf.js 量出掉帧 / 弱机时挂上 .low-power） ----------------
   背景视频已经换成静态图，正常机器上两处 backdrop-filter 只在首帧算一次；
   但浏览器没开硬件加速时，它们仍会在每次重绘时走 CPU 高斯模糊，所以低配下直接
   换成半透明实底 + 径向渐变，视觉上只是少了一层透光。 */
.low-power .scene-soft {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: radial-gradient(74% 90% at 10% 50%,
    rgba(255, 255, 255, .50), rgba(255, 255, 255, .32) 32%, rgba(255, 255, 255, 0) 66%);
}
.low-power .panel {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(253, 252, 251, .95);
}
.low-power .scene-grain { mix-blend-mode: normal; opacity: .03; }
.low-power .petal-drift { display: none; }
.low-power .scene-media { filter: saturate(.92); }

/* ================================================================
   注册 / 重置密码页
   与登录页共用同一套玻璃面板与表单控件，这里只补「登录页没有的零件」：
   验证码行、切换链接、离线验证码提示。
   ================================================================ */

/* 表单底部的「去注册 / 去登录」 */
.switch-line {
  margin: 14px 0 0;
  text-align: center;
  color: var(--ink-3);
  font-size: 12px;
}
.switch-link {
  color: var(--sakura-deep);
  text-decoration: none;
  border-bottom: 1px solid rgba(168, 73, 99, .28);
  padding-bottom: 1px;
  transition: border-color .2s, color .2s;
}
.switch-link:hover { color: #8d3550; border-bottom-color: rgba(141, 53, 80, .62); }
.switch-sep { margin: 0 8px; color: rgba(38, 49, 63, .26); }
.switch-line--urgent { color: var(--sakura-deep); }
.switch-line--urgent .switch-link {
  font-weight: 600;
  border-bottom-color: currentColor;
}

/* 「忘记密码？」——和「记住我」同一行，视觉上退到次要位置 */
.form-link {
  color: var(--ink-3);
  font-size: 11.5px;
  text-decoration: none;
  transition: color .2s;
}
.form-link:hover { color: var(--sakura-deep); }

/* 验证码：输入框 + 发送按钮同行 */
.code-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.code-row input { flex: 1; min-width: 0; }
.code-button {
  flex: 0 0 auto;
  min-width: 108px;
  padding: 0 12px;
  border: 1px solid rgba(38, 49, 63, .16);
  border-radius: 10px;
  background: rgba(255, 255, 255, .82);
  color: var(--ink-2);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.code-button:hover:not(:disabled) {
  border-color: rgba(168, 73, 99, .42);
  color: var(--sakura-deep);
  background: #fff;
}
.code-button:disabled { cursor: default; color: var(--ink-3); background: rgba(38, 49, 63, .04); }

/* 离线模式：没配 SMTP 时把验证码直接摆出来 */
.offline-note {
  margin: -4px 0 15px;
  padding: 11px 13px;
  border: 1px dashed rgba(168, 73, 99, .34);
  border-radius: 11px;
  background: rgba(253, 244, 247, .78);
  color: var(--ink-2);
  font-size: 11.5px;
  line-height: 1.7;
}
.offline-note[hidden] { display: none; }
.offline-note b { color: var(--sakura-deep); font-weight: 600; }
.offline-code {
  margin-top: 6px;
  font: 700 22px/1.2 "SF Mono", Consolas, monospace;
  letter-spacing: .28em;
  color: var(--sakura-deep);
}
.offline-code:empty { display: none; }

/* 注册页比登录页多两个字段，进场动画按实际子元素数量铺开 */
#register-form > * { animation: riseIn .85s var(--ease-out) backwards; }
#register-form > *:nth-child(1) { animation-delay: 1.58s; }
#register-form > *:nth-child(2) { animation-delay: 1.64s; }
#register-form > *:nth-child(3) { animation-delay: 1.70s; }
#register-form > *:nth-child(4) { animation-delay: 1.76s; }
#register-form > *:nth-child(5) { animation-delay: 1.82s; }
#register-form > *:nth-child(6) { animation-delay: 1.88s; }
#register-form > *:nth-child(7) { animation-delay: 1.94s; }
#register-form > *:nth-child(8) { animation-delay: 2.00s; }
#register-form > *:nth-child(9) { animation-delay: 2.06s; }
/* 加了「邀请码」之后多了一个字段，末尾两项的延迟也要跟上，
   否则它们会在其它字段还在淡入时就已经落位，看起来像页面错位。 */
#register-form > *:nth-child(10) { animation-delay: 2.12s; }
#register-form > *:nth-child(11) { animation-delay: 2.18s; }
#reset-form > * { animation: riseIn .85s var(--ease-out) backwards; }
#reset-form > *:nth-child(1) { animation-delay: 1.58s; }
#reset-form > *:nth-child(2) { animation-delay: 1.64s; }
#reset-form > *:nth-child(3) { animation-delay: 1.70s; }
#reset-form > *:nth-child(4) { animation-delay: 1.76s; }
#reset-form > *:nth-child(5) { animation-delay: 1.82s; }
#reset-form > *:nth-child(6) { animation-delay: 1.88s; }
#reset-form > *:nth-child(7) { animation-delay: 1.94s; }
#reset-form > *:nth-child(8) { animation-delay: 2.00s; }

/* 注册页内容更高，小屏上把面板内边距收一点，避免一屏塞不下要滚很久 */
@media (max-height: 760px) and (min-width: 881px) {
  #register-form .field { margin-bottom: 12px; }
  #register-form .form-foot { margin-bottom: 12px; }
}

/* ---------------- 注册页的纵向节奏 ----------------
   注册页比登录页多三个字段（邮箱、验证码、确认密码），按登录页的间距
   在 900px 高的屏幕上会把「已有账号？去登录」顶到视口外面，还被固定页脚压住。
   这里做两件事：把字段间距收紧一档；让页脚回到文档流，滚动时不再遮挡内容。 */
body[data-page="register"] .stage {
  padding-top: 96px;
  padding-bottom: 56px;
}
body[data-page="register"] .panel {
  padding: 26px 28px 22px;
}
body[data-page="register"] .panel-head { margin-bottom: 18px; }
body[data-page="register"] .panel-head h2 { font-size: 21px; }
body[data-page="register"] .field { margin-bottom: 11px; }
body[data-page="register"] .field-label { margin-bottom: 6px; }
body[data-page="register"] .field input { height: 46px; }
body[data-page="register"] .form-foot { margin: 0 1px 14px; }
body[data-page="register"] .submit-button { min-height: 48px; }
body[data-page="register"] .switch-line { margin-top: 12px; }

/* 页脚改静态：固定定位在内容超过一屏时会盖住表单最后一行，
   而注册页恰恰是最容易超过一屏的那一个。 */
body[data-page="register"] .colophon {
  position: static;
  padding-top: 4px;
  padding-bottom: 22px;
}

/* 小屏（笔记本 768px 高）再收一档，尽量把「创建并进入」留在首屏 */
@media (max-height: 820px) {
  body[data-page="register"] .stage { padding-top: 78px; }
  body[data-page="register"] .panel { padding: 22px 26px 18px; }
  body[data-page="register"] .panel-head { margin-bottom: 14px; }
  body[data-page="register"] .field { margin-bottom: 9px; }
  body[data-page="register"] .field input { height: 43px; }
  body[data-page="register"] .offline-note { margin-bottom: 11px; }
}

/* 离线验证码提示是「点一下才出现」的元素，不能套用表单的进场延迟：
   #register-form > * 的 animation-delay 到了 1.76s，元素从 hidden 变可见时
   动画会从头重放，那 1.7 秒里 opacity 还停在 0 —— 用户点了「获取验证码」，
   却看不见验证码，只有一句「验证码就在上面」。这里给它一条独立的短淡入。 */
#register-form > .offline-note,
#reset-form > .offline-note {
  animation: fadeIn .32s var(--ease-out) both;
}

/* Edge / IE 会在密码框右侧自动塞一个「眼睛」按钮，和我们自己的「显示」文字按钮
   重复，位置还会压到文字上（确认密码那栏尤其明显）。这里统一关掉浏览器自带的。 */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
  width: 0;
  height: 0;
}
