/* ═══════════════════════════════════════════════════════════════════
   启动页 #bootSplash + 登录墙 #authModal
   ───────────────────────────────────────────────────────────────────
   为什么有启动页：登录墙在 index.html 里默认立着，要等存档从 IDB 读完、
   整个界面画完，checkUser() 才开始查登录（14-boot-brain-hub.js）。已经登录的人
   每次开机都会先被登录框晃好几秒。现在开机先盖这张启动页，登录一有结论
   （不论哪种）就淡出 —— 已登录直接看见主界面，没登录才看见登录墙。
   墙自己的 hidden 逻辑一个字没动，那几条盯 .hidden 的浏览器测试照旧成立。

   两边永远是深色，不跟米纸走：这个文件不在 gen-light-patch.js 的 SRC 里，不会被自动翻色。
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --gc-ink: #07070a;
  --gc-amber: #f0a65a;
  --gc-amber-hi: #ffd29a;
  --gc-amber-lo: #d9772f;
  --gc-blue: #4f7bff;      /* logo 上那道蓝色错位 */
  --gc-cyan: #6fe3d6;
  --gc-serif-en: 'Cormorant Garamond', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --gc-serif-zh: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'SimSun', serif;
}

/* ── 启动页 ─────────────────────────────────────────────────────────── */
#bootSplash {
  position: fixed; inset: 0; z-index: 2147483000;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(60vmax 45vmax at 50% 46%, rgba(240,166,90,.10), transparent 62%),
    radial-gradient(80vmax 60vmax at 50% 120%, rgba(79,123,255,.07), transparent 60%),
    var(--gc-ink);
  /* 纯装饰，点击直接穿过去：开机那一秒点不到东西也好过把浏览器测试的坐标点击全吃掉 */
  pointer-events: none;
  overflow: hidden;
  transition: opacity .62s cubic-bezier(.4,0,.2,1) .08s, visibility 0s linear .72s;
}
#bootSplash.boot-leave { opacity: 0; visibility: hidden; }

/* 水底光纹 + 猫脸（js/boot-water.js 画的，多半在 Worker 里）。上面 #bootSplash 的底色 shader 里自己算了一份、
   按 screen 叠好才出画面，所以这里不能挂 mix-blend-mode：挂了合成器每帧多一张全屏离屏图，冷启动时整窗停帧。
   改底色要两边一起改。第一帧出来之前画布是透明的，露的就是这里的底色。
   光纹自己在 shader 里淡入，这里不用再挂 opacity 过渡 */
#bootWater {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
/* 猫脸画在画布里时，HTML 这枚只占位置（画布按它的位置画），不画也不跑动画；
   WebGL 起不来就摘掉 .gl，它的动画从头播，一笔一笔画出来 */
#bootSplash.gl .boot-lens .gc-mark { visibility: hidden; }
#bootSplash.gl .boot-lens .gc-mark * { animation: none; }
/* 字等画布真画出第一帧（.go）再动，不然猫脸还没露面字先升上来了；挂 .go 时 index.html 会把它们的 startTime 对齐到画布的起点 */
#bootSplash.gl:not(.go) .boot-word, #bootSplash.gl:not(.go) .boot-sub,
#bootSplash.gl:not(.go) .boot-line, #bootSplash.gl:not(.go) .boot-line::after { animation-play-state: paused; }

/* 一盏留着的灯：中心那团暖光亮起来就停着。
   不挂 filter: blur、不呼吸：渐变本来就是软边，blur 看不出差别，却让合成器每帧多一张离屏图再糊一遍，
   冷启动 GPU 正挤的时候是白付的账（用户「减少渲染元素」） */
.boot-lamp {
  position: absolute; left: 50%; top: 44%;
  width: 46vmin; height: 46vmin; margin: -23vmin 0 0 -23vmin;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,190,120,.22) 0%, rgba(240,140,60,.08) 38%, transparent 68%);
  animation: bootLampIn 1.4s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes bootLampIn { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }

.boot-center {
  position: relative; display: flex; flex-direction: column; align-items: center;
  transition: opacity .45s ease, transform .6s cubic-bezier(.4,0,.2,1);
}
#bootSplash.boot-leave .boot-center { opacity: 0; transform: translateY(-10px) scale(1.03); }   /* 不带 blur，理由见 bootRise */
.boot-lens { display: flex; flex-direction: column; align-items: center; }

/* 猫脸 <^/^> 一笔一笔画出来 */
.gc-mark { width: min(170px, 38vw); height: auto; overflow: visible; }
.gc-mark path {
  fill: none; stroke-width: 30; stroke-linecap: square; stroke-linejoin: miter;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: gcDraw .5s cubic-bezier(.65,0,.35,1) forwards;
}
.gc-mark .gc-ghost path { stroke: var(--gc-blue); opacity: .55; }
.gc-mark .gc-ghost { transform: translate(-7px, 3px); animation: gcGhost 1.6s ease-out .55s both; }
.gc-mark .gc-ink path { stroke: url(#gcAmber); }
.gc-mark path:nth-child(1) { animation-delay: .05s; }
.gc-mark path:nth-child(2) { animation-delay: .20s; }
.gc-mark path:nth-child(3) { animation-delay: .34s; }
.gc-mark path:nth-child(4) { animation-delay: .48s; }
.gc-mark path:nth-child(5) { animation-delay: .62s; }
@keyframes gcDraw { to { stroke-dashoffset: 0; } }
/* 蓝影先错开一下再回位，跟 logo 上的色差同一个意思，只闪一次 */
@keyframes gcGhost {
  0%   { opacity: 0; transform: translate(-12px, 4px); }
  25%  { opacity: 1; }
  100% { opacity: .55; transform: translate(-4px, 2px); }
}
.gc-mark .gc-ink { filter: drop-shadow(0 0 14px rgba(240,166,90,.45)); }
/* 手机（.lite，index.html 挂的）：不画水，猫脸不一笔一笔画，整枚浮上来。
   笔画的 stroke-dashoffset、蓝影在 SVG 里的 transform 都得主线程每帧重画，冷启动主线程一忙就一顿一顿；
   整枚 SVG 的 opacity / transform 合成器自己推（用户「手机上动画还是卡，删元素吧」） */
#bootSplash.lite #bootWater { display: none; }
#bootSplash.lite .gc-mark { animation: bootMarkIn 1s cubic-bezier(.2,.8,.2,1) .1s both; }
#bootSplash.lite .gc-mark * { animation: none; }
#bootSplash.lite .gc-mark path { stroke-dashoffset: 0; }
#bootSplash.lite .gc-mark .gc-ghost { transform: translate(-4px, 2px); }
@keyframes bootMarkIn { from { opacity: 0; transform: translateY(14px) scale(.94); } to { opacity: 1; transform: none; } }

.boot-word {
  margin-top: 26px;
  font-family: var(--gc-serif-en); font-style: italic; font-weight: 500;
  font-size: clamp(30px, 5.2vw, 46px); letter-spacing: .01em; line-height: 1;
  color: #f6ede2;
  background: linear-gradient(100deg, #fff4e6 20%, var(--gc-amber-hi) 50%, #fff4e6 80%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  background-position: 50% 0;   /* 不扫光了：background-position 动画只能主线程推，开机一卡就停住再跳 */
  animation: bootRise .9s cubic-bezier(.2,.8,.2,1) .55s both;
}
.boot-sub {
  margin-top: 14px;
  font-family: var(--gc-serif-zh); font-size: 13px; letter-spacing: .38em;
  color: rgba(246,237,226,.52);
  animation: bootRise .9s cubic-bezier(.2,.8,.2,1) .78s both;
  padding-left: .38em; /* letter-spacing 让字整体往左偏，补回来才居中 */
}
/* 启动页上的动画只许 opacity / transform：这两样合成器自己推，开机主线程卡住照样走。
   filter: blur 不行——会把像素往外挪的滤镜 Chrome 不交给合成器，整条动画（连 opacity 一起）落回主线程，
   exe 里录到过字卡在半模糊 1 秒多 */
@keyframes bootRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 底下一道细光，开机没结束就一直从中间往两边流 */
.boot-line {
  /* 用 margin 居中，别用 translateX(-50%)：bootRise 收尾的 transform:none 会把它冲掉，线就歪到右半边 */
  position: absolute; left: 0; right: 0; margin: 0 auto; bottom: 12vh; width: min(220px, 50vw); height: 1px;
  background: rgba(255,255,255,.06); overflow: hidden;
  animation: bootRise .8s ease 1s both;
}
.boot-line::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--gc-amber), transparent);
  transform: translateX(-100%);
  animation: bootFlow 1.6s cubic-bezier(.45,0,.55,1) 1s infinite;
}
@keyframes bootFlow { to { transform: translateX(100%); } }

/* ── 登录墙 ─────────────────────────────────────────────────────────── */
#authModal.auth-wall {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 32px 24px;
  overflow-y: auto;
  background: var(--gc-ink);
  color: #f3ece4;
  font-family: var(--gc-serif-zh);
}
/* id 选择器比 output.css 的 .hidden 硬，得手动让位，不然墙永远收不起来 */
#authModal.auth-wall.hidden { display: none !important; }

/* grancyan.css 窄屏段里有条老规则 `#authModal > div { margin:16px; max-width:… }`，
   是给原来那张小卡片的；新结构的直接子 div 是背景层和舞台，得把它顶回去 */
#authModal.auth-wall > .auth-bg { margin: 0; max-width: none; }
#authModal.auth-wall > .auth-stage { margin: auto; max-width: 1040px; }

.auth-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.auth-glow {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55;
  will-change: transform;
}
.auth-glow.g1 { width: 52vmax; height: 52vmax; left: -14vmax; top: -18vmax;
  background: radial-gradient(circle, rgba(240,150,70,.55), transparent 65%); animation: authDrift1 26s ease-in-out infinite alternate; }
.auth-glow.g2 { width: 48vmax; height: 48vmax; right: -16vmax; bottom: -20vmax;
  background: radial-gradient(circle, rgba(79,123,255,.45), transparent 65%); animation: authDrift2 32s ease-in-out infinite alternate; }
.auth-glow.g3 { width: 30vmax; height: 30vmax; left: 46%; top: 30%;
  background: radial-gradient(circle, rgba(111,227,214,.22), transparent 65%); animation: authDrift3 38s ease-in-out infinite alternate; }
@keyframes authDrift1 { to { transform: translate(8vmax, 6vmax) scale(1.08); } }
@keyframes authDrift2 { to { transform: translate(-7vmax, -5vmax) scale(1.1); } }
@keyframes authDrift3 { to { transform: translate(-10vmax, 8vmax) scale(.9); } }
/* 地平线：一道很大的弧，像站在门口往外看 */
.auth-horizon {
  position: absolute; left: 50%; top: 78vh; width: 220vmax; height: 220vmax;
  margin-left: -110vmax; border-radius: 50%;
  border-top: 1px solid rgba(255,210,154,.22);
  box-shadow: 0 -30px 90px -30px rgba(240,166,90,.35), inset 0 40px 120px -40px rgba(240,166,90,.18);
  background: radial-gradient(closest-side, transparent 96%, rgba(0,0,0,.4));
}
.auth-grain {
  position: absolute; inset: -50%; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
#authModal #starCanvas { opacity: .8; }
/* 启动页盖着的时候，墙在底下根本看不见，但三团 blur(70px) 的光、毛玻璃卡片、一直在跳的小圆点照样每帧合成 / 重画，
   跟启动页的水抢冷启动那几秒的 GPU。启动页一开始离场（.boot-leave）就全放回来，动画从那一刻接着播 */
#bootSplash:not(.boot-leave) ~ #authModal .auth-bg { display: none; }
#bootSplash:not(.boot-leave) ~ #authModal .auth-card { backdrop-filter: none; -webkit-backdrop-filter: none; }
#bootSplash:not(.boot-leave) ~ #authModal, #bootSplash:not(.boot-leave) ~ #authModal *,
#bootSplash:not(.boot-leave) ~ #authModal *::before, #bootSplash:not(.boot-leave) ~ #authModal *::after { animation-play-state: paused; }

.auth-stage {
  position: relative; z-index: 1;
  width: 100%; max-width: 1040px; margin: auto;
  display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: clamp(32px, 6vw, 88px);
}

.auth-hero { min-width: 0; }
.auth-hero .gc-mark { width: 74px; margin-left: -4px; }
.auth-hero .gc-mark path { stroke-width: 34; }
.auth-eyebrow {
  margin-top: 26px; display: inline-flex; align-items: center; gap: 10px;
  font-family: ui-sans-serif, system-ui, 'Microsoft YaHei', sans-serif;
  font-size: 11px; font-weight: 600; letter-spacing: .32em; color: rgba(243,236,228,.5);
}
.auth-eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gc-amber); box-shadow: 0 0 0 0 rgba(240,166,90,.6);
  animation: authPulse 2.4s ease-out infinite;
}
@keyframes authPulse { 0% { box-shadow: 0 0 0 0 rgba(240,166,90,.55); } 80%,100% { box-shadow: 0 0 0 10px rgba(240,166,90,0); } }
.auth-display {
  margin: 18px 0 0; font-family: var(--gc-serif-en); font-weight: 500; font-style: italic;
  font-size: clamp(64px, 9vw, 124px); line-height: .9; letter-spacing: -.02em;
  color: #fbf4ec;
}
.auth-display em {
  display: inline-block; padding-right: .08em; font-style: italic;
  background: linear-gradient(95deg, var(--gc-amber-hi), var(--gc-amber) 55%, var(--gc-amber-lo));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
#authModal .auth-title {
  margin: 22px 0 0; font-family: var(--gc-serif-zh); font-weight: 500;
  font-size: clamp(17px, 1.6vw, 20px); letter-spacing: .06em; color: rgba(243,236,228,.86);
}
.auth-greet {
  margin-top: 10px; font-size: 13px; letter-spacing: .12em; color: rgba(243,236,228,.45);
  min-height: 1.4em;
}

/* 卡片：玻璃 + 顶部一道暖色高光 + 跟着鼠标走的柔光 */
.auth-card {
  position: relative; isolation: isolate;
  padding: 30px 28px 24px; border-radius: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 40px 100px -30px rgba(0,0,0,.8);
  backdrop-filter: blur(22px) saturate(1.2); -webkit-backdrop-filter: blur(22px) saturate(1.2);
  overflow: hidden;
}
.auth-card::before {
  content: ''; position: absolute; left: 12%; right: 12%; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,210,154,.6), transparent);
}
.auth-card::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), rgba(240,166,90,.10), transparent 60%);
  opacity: 0; transition: opacity .4s ease;
}
.auth-card:hover::after { opacity: 1; }

.auth-card-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; }
.auth-card-title { font-size: 18px; font-weight: 600; letter-spacing: .08em; color: #fbf4ec; }
.auth-date {
  font-family: var(--gc-serif-en); font-style: italic; font-size: 15px; color: rgba(243,236,228,.42);
}

.auth-fields { display: flex; flex-direction: column; gap: 12px; }
.auth-field { position: relative; }
.auth-field > svg.auth-ico {
  position: absolute; left: 16px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%);
  color: rgba(243,236,228,.35); pointer-events: none; transition: color .2s ease;
}
#authModal .auth-input {
  width: 100%; height: 52px; padding: 0 46px 0 46px;
  border-radius: 14px; border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.38); color: #fbf4ec;
  font-family: ui-sans-serif, system-ui, 'Microsoft YaHei', sans-serif; font-size: 14px; letter-spacing: .02em;
  outline: none; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
#authModal .auth-input::placeholder { color: rgba(243,236,228,.34); letter-spacing: .12em; }
#authModal .auth-input:hover { border-color: rgba(255,255,255,.14); }
#authModal .auth-input:focus {
  border-color: rgba(240,166,90,.6); background: rgba(0,0,0,.5);
  box-shadow: 0 0 0 4px rgba(240,166,90,.12), 0 0 24px -6px rgba(240,166,90,.35);
}
.auth-field:focus-within > svg.auth-ico { color: var(--gc-amber); }
/* 浏览器自动填充会刷一层白底，压回深色 */
#authModal .auth-input:-webkit-autofill {
  -webkit-text-fill-color: #fbf4ec; caret-color: #fbf4ec;
  -webkit-box-shadow: 0 0 0 100px #120f0c inset; transition: background-color 9999s;
}

.auth-eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 0; border-radius: 10px; background: none; cursor: pointer;
  color: rgba(243,236,228,.4); transition: color .2s ease, background .2s ease;
}
.auth-eye:hover { color: #fbf4ec; background: rgba(255,255,255,.06); }
.auth-eye svg { width: 18px; height: 18px; }
.auth-eye .eye-off { display: none; }
.auth-eye.is-on .eye-on { display: none; }
.auth-eye.is-on .eye-off { display: block; }

.auth-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.auth-primary {
  position: relative; height: 52px; border: 0; border-radius: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--gc-serif-zh); font-size: 15px; font-weight: 700; letter-spacing: .3em; padding-left: .3em;
  color: #1a0f05;
  background: linear-gradient(180deg, #ffd9a8, #f0a65a 70%, #e48f43);
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 14px 34px -12px rgba(240,140,60,.7);
  overflow: hidden;
  transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s ease, filter .2s ease;
}
.auth-primary svg { width: 16px; height: 16px; transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.auth-primary:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 18px 40px -12px rgba(240,140,60,.85); }
.auth-primary:hover svg { transform: translateX(4px); }
.auth-primary:active { transform: translateY(0) scale(.985); }
/* handleAuth 在等 Supabase 时会 disabled + opacity .5；给它一道流光，别像按钮坏了 */
.auth-primary:disabled, .auth-ghost:disabled { cursor: progress; }
.auth-primary:disabled::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-100%); animation: authShine 1.1s ease-in-out infinite;
}
@keyframes authShine { to { transform: translateX(100%); } }
.auth-ghost {
  height: 46px; border-radius: 14px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.02);
  font-family: var(--gc-serif-zh); font-size: 14px; font-weight: 600; letter-spacing: .3em; padding-left: .3em;
  color: rgba(243,236,228,.78);
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.auth-ghost:hover { border-color: rgba(255,210,154,.35); background: rgba(240,166,90,.06); color: #fbf4ec; }
/* 「先用本机数据」常驻在墙底下（10-11 起不再等登录失败才露）：做成一行轻的字链，不跟登录/注册抢 */
.auth-offline {
  height: 34px; border-color: transparent; background: transparent;
  font-size: 13px; letter-spacing: .2em; color: rgba(243,196,143,.72);
}
.auth-offline:hover { border-color: transparent; background: transparent; color: #f3c48f; text-decoration: underline; text-underline-offset: 4px; }
.auth-primary:focus-visible, .auth-ghost:focus-visible, .auth-eye:focus-visible {
  outline: 2px solid rgba(240,166,90,.7); outline-offset: 2px;
}

#authModal #authError {
  margin: 12px 0 -6px; min-height: 16px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-family: ui-sans-serif, system-ui, 'Microsoft YaHei', sans-serif;
  font-size: 12px; color: #ff9d8a; text-align: center;
}
#authModal #authError:has(#authErrorText:not(:empty)) { animation: authShake .4s cubic-bezier(.36,.07,.19,.97); }
/* 云端恢复的好消息借这一行说：换个颜色、不抖 */
#authModal #authError.is-ok { color: #9fe3c6; animation: none; }

/* 离线进来之后云端恢复了：顶上一条不自己消失的横条（她可能好半天才回来看） */
.cloud-back {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 99990;
  display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 24px);
  padding: 9px 10px 9px 16px; border-radius: 14px;
  background: rgba(22,16,12,.94); border: 1px solid rgba(240,166,90,.35);
  box-shadow: 0 14px 40px -12px rgba(0,0,0,.7);
  font-family: ui-sans-serif, system-ui, 'Microsoft YaHei', sans-serif; font-size: 13px; color: #f3ece4;
  animation: cloudBackIn .35s cubic-bezier(.2,.8,.2,1) both;
}
.cloud-back span { min-width: 0; }
.cloud-back button { flex: none; border: 0; cursor: pointer; border-radius: 10px; font: inherit; }
.cloud-back-go { padding: 6px 14px; font-weight: 700; color: #1a0f05; background: linear-gradient(180deg, #ffd9a8, #f0a65a); }
.cloud-back-x { width: 28px; height: 28px; background: transparent; color: rgba(243,236,228,.5); }
.cloud-back-x:hover { color: #f3ece4; }
@keyframes cloudBackIn { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes authShake { 20%,60% { transform: translateX(-4px); } 40%,80% { transform: translateX(4px); } }

.auth-foot {
  position: absolute; left: 0; right: 0; bottom: 22px; z-index: 1; text-align: center;
  font-family: var(--gc-serif-en); font-style: italic; font-size: 13px; letter-spacing: .08em;
  color: rgba(243,236,228,.28);
}

/* 进场：墙露出来的那一刻（启动页收起 / 被踢回登录）才播，见 authWallEnter() */
#authModal[data-enter] .auth-rise { animation: authRise .9s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d, 0s); }
#authModal[data-enter] .auth-hero .gc-mark path { animation: gcDraw .5s cubic-bezier(.65,0,.35,1) both; }
#authModal[data-enter] .auth-hero .gc-mark path:nth-child(1) { animation-delay: .05s; }
#authModal[data-enter] .auth-hero .gc-mark path:nth-child(2) { animation-delay: .15s; }
#authModal[data-enter] .auth-hero .gc-mark path:nth-child(3) { animation-delay: .25s; }
#authModal[data-enter] .auth-hero .gc-mark path:nth-child(4) { animation-delay: .35s; }
#authModal[data-enter] .auth-hero .gc-mark path:nth-child(5) { animation-delay: .45s; }
/* 墙没播进场时（比如 JS 没跑到）猫脸也得是画好的 */
#authModal:not([data-enter]) .gc-mark path { animation: none; stroke-dashoffset: 0; }
@keyframes authRise { from { opacity: 0; transform: translateY(16px); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }

/* 窄屏：上下叠，标题缩小，卡片铺满 */
@media (max-width: 860px) {
  #authModal.auth-wall { align-items: flex-start; padding: max(40px, env(safe-area-inset-top)) 16px 64px; }
  #authModal.auth-wall > .auth-stage { grid-template-columns: 1fr; gap: 28px; max-width: 440px; }
  .auth-hero .gc-mark { width: 56px; }
  .auth-eyebrow { margin-top: 18px; }
  .auth-display { font-size: clamp(54px, 16vw, 78px); }
  #authModal .auth-title { margin-top: 16px; }
  .auth-card { padding: 24px 20px 20px; border-radius: 22px; }
  .auth-horizon { top: 88vh; }
}
@media (max-height: 560px) and (min-width: 861px) {
  #authModal.auth-wall { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  #bootSplash *, #bootSplash *::after, #authModal *, #authModal *::before, #authModal *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important;
  }
  .gc-mark .gc-ghost { animation: none; }
}
