/* ============================================================
   个人门户 · 样式
   Aurora 极光背景 / 噪点颗粒 / 鼠标光斑 / 3D 卡片倾斜流光
   玻璃拟态 + 固定暗色主题 + 丝滑过渡
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  --radius: 18px;
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI",
          "Microsoft YaHei", -apple-system, BlinkMacSystemFont,
          "Segoe UI", Roboto, sans-serif;
}

/* ---------- 主题变量 ---------- */
[data-theme="dark"] {
  --bg-base: #0a0e1f;
  --text: #eef1ff;
  --text-dim: #97a0c4;
  --card: rgba(255, 255, 255, 0.055);
  --card-solid: #141b36;
  --card-border: rgba(255, 255, 255, 0.09);
  --glass-hi: rgba(255, 255, 255, 0.10);
  --card-hover: rgba(255, 255, 255, 0.09);
  --shadow: 0 24px 55px -24px rgba(0, 0, 0, 0.65);
  --kbd: rgba(255, 255, 255, 0.09);
  --fav-bg: rgba(255, 255, 255, 0.92);
  /* 页脚正文色：0.45 实测仅 4.14:1，不达 WCAG AA(4.5:1)。
     ⚠️ 光调字号救不了它（13px 与 14px 阈值相同，要大字号豁免得 ≥18.66px 粗体 / ≥24px）。
     脚本反推最小达标 alpha ≈ 0.476，取 0.52 → 5.16:1，留约 15% 余量（背景有极光，实际底色会浮动） */
  --footer: rgba(238, 241, 255, 0.52);
  --spot: rgba(124, 108, 255, 0.10);
  --spot-2: rgba(56, 189, 248, 0.06);
  color-scheme: dark;
}

html { font-family: var(--font); scroll-behavior: smooth; }

::selection { background: rgba(124, 108, 255, 0.45); color: #fff; text-shadow: 0 0 8px rgba(124, 108, 255, 0.35); }

/* ---------- 点击彩蛋：问候语橡胶放大 / 名字放大弹跳 ---------- */
#greetingWord { display: inline-block; }
#greetingWord.rubber {
  animation: rubberZoom 0.8s cubic-bezier(.22, .85, .35, 1);
}
@keyframes rubberZoom {
  0% { transform: scale(1) rotate(0deg); }
  30% { transform: scale(1.25) rotate(-2.5deg); }
  45% { transform: scale(1.18) rotate(2deg); }
  58% { transform: scale(1.24) rotate(-1.5deg); }
  72% { transform: scale(1.16) rotate(1deg); }
  100% { transform: scale(1) rotate(0deg); }
}
#ownerName.bigpop {
  display: inline-block;
  animation: bigPop 0.55s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes bigPop {
  0% { transform: scale(1); }
  30% { transform: scale(1.5); }
  55% { transform: scale(0.92); }
  75% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
#dateText .dw { display: inline-block; }
#dateText .dw i { font-style: normal; display: inline-block; }
/* 与 .dw 同理：整块不拆行，免得极窄屏把「闰六月初一」断成两行 */
#dateText .dl { display: inline-block; }
#dateText .dw.burst i {
  animation: charPop 0.42s cubic-bezier(.34, 1.56, .64, 1) both;
}
#dateText .dw.burst i:nth-child(2) { animation-delay: 0.08s; }
#dateText .dw.burst i:nth-child(3) { animation-delay: 0.16s; }
@keyframes charPop {
  0% { transform: scale(0.1); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
#dateText .dt-y, #dateText .dt-m, #dateText .dt-d { font-variant-numeric: tabular-nums; }
#dateText .spin-active {
  color: #a78bfa;
  text-shadow: 0 0 10px rgba(167, 139, 250, 0.8), 0 0 24px rgba(124, 108, 255, 0.45);
}
.wc-ico.spin { animation: wcSpin 0.7s linear infinite; }
@keyframes wcSpin { to { transform: rotate(360deg); } }

body {
  min-height: 100vh;
  background: var(--bg-base);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.45s ease, color 0.45s ease;
}

/* ============================================================
   背景层：Aurora 光斑
   ============================================================ */
.bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; --px: 0; --py: 0; }

.orb {
  position: absolute; border-radius: 50%;
  filter: blur(70px);
  transform: translateZ(0);
  /* 必须把 translate 也列进提升提示：否则视差位移会触发每帧重跑 70px 高斯模糊 */
  will-change: transform, translate;
  pointer-events: none;
}
.orb-1 { width: 46vw; height: 46vw; left: -13vw; top: -16vh;
  background: radial-gradient(circle at 35% 35%, #6d5cff, transparent 62%); opacity: 0.55;
  animation: drift1 26s ease-in-out infinite; }
.orb-2 { width: 40vw; height: 40vw; right: -11vw; top: -10vh;
  background: radial-gradient(circle at 60% 40%, #0ea5e9, transparent 62%); opacity: 0.5;
  animation: drift2 30s -8s ease-in-out infinite; }
.orb-3 { width: 52vw; height: 52vw; left: 26vw; bottom: -26vh;
  background: radial-gradient(circle at 50% 50%, #d946ef, transparent 62%); opacity: 0.42;
  animation: drift1 34s -16s ease-in-out infinite; }
.orb-4 { width: 34vw; height: 34vw; right: 18vw; bottom: -15vh;
  background: radial-gradient(circle at 50% 50%, #22d3ee, transparent 62%); opacity: 0.45;
  animation: drift2 28s -22s ease-in-out infinite; }

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, -4vh) scale(1.12); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-5vw, 5vh) scale(0.9); }
}

/* ---------- 星光闪烁 ---------- */
.stars { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.star {
  position: absolute; border-radius: 50%; background: #fff;
  animation: twinkle var(--d, 3s) ease-in-out var(--dd, 0s) infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.12; }
  50% { opacity: var(--o, 0.9); }
}

/* ---------- 漂浮颗粒 ---------- */
.particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.pt {
  position: absolute; bottom: -12px; left: var(--x, 50%); width: var(--s, 3px); height: var(--s, 3px);
  border-radius: 50%; opacity: var(--o, 0.4);
  animation: floatUp var(--d, 12s) linear var(--dd, 0s) infinite;
}
@keyframes floatUp {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  10% { opacity: var(--o, 0.4); }
  90% { opacity: var(--o, 0.4); }
  100% { transform: translate3d(0, -112vh, 0); opacity: 0; }
}

/* ---------- 鼠标视差 ----------
   用独立的 translate 属性而非 transform：.orb 的 transform 已被 drift 关键帧占用，
   两者是分开合成的属性，相乘生效、互不覆盖。
   --n 是该层的"深度"系数(px)：越大越靠前、位移越明显（越远动得越少）。

   量级参考（1440×900 实测口径）：orb 的自动漂移幅度约 85~94px，
   视差取漂移的 45%~70% 才有"跟手"的辨识度。此前 30/18/40/12 只有漂移的 14%~43%，
   再叠加鼠标日常只在屏幕中段活动（见 app.js 的 curve），实际位移被压到个位数像素。
   ⚠️ 调大时注意：.stars / .particles 是 inset:0 铺满 .bg 的点阵，位移过大（>约 20px）
   会让边缘露出"无星带"；.orb 尺寸 34~52vw、远超视口，不受此限制。 */
.orb, .stars, .particles {
  translate: calc(var(--px, 0) * var(--n, 0) * 1px) calc(var(--py, 0) * var(--n, 0) * 1px);
}
.orb-1 { --n: 48; }
.orb-2 { --n: 28; }
.orb-3 { --n: 64; }
.orb-4 { --n: 20; }
.stars { --n: 12; }
.particles { --n: 24; }

/* ---------- 胶片噪点 ---------- */
.noise {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ---------- 鼠标光斑 ---------- */
.spotlight {
  position: fixed; left: 0; top: 0; z-index: 5; pointer-events: none;
  width: 700px; height: 700px; margin-left: -350px; margin-top: -350px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--spot), var(--spot-2) 40%, transparent 68%);
  mix-blend-mode: soft-light;
  opacity: 0; will-change: translate, opacity;
  transition: opacity 0.5s ease;
}
.on .spotlight { opacity: 1; }

/* ---------- 卡片色相晕染 ----------
   hover 卡片时，背景径向染上该卡片对应的色相。
   --tint-c 必须用 @property 注册成 <color>，色相变化才会走 transition；否则是硬切。 */
@property --tint-c {
  syntax: "<color>";
  inherits: false;
  initial-value: rgba(0, 0, 0, 0);
}
.tint {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(130% 105% at 50% 32%, var(--tint-c, transparent), transparent 68%);
  opacity: 0; transition: opacity 0.55s ease, --tint-c 0.7s ease;
}
.bg.tinted .tint { opacity: 1; }

/* ============================================================
   页面容器
   ============================================================ */
.page {
  position: relative; z-index: 2; max-width: 1120px; margin: 0 auto; padding: 30px 24px 40px;
  /* 列向 flex + 最小视口高：内容很少时（如「最近访问」还空着）让页脚也贴着视口底部，
     而不是悬在半空、下面留一大片背景。内容多时页脚照常被推到页面末尾 */
  display: flex; flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh; /* 移动端地址栏会变，dvh 才不会多出一截；老浏览器忽略这行 */
}

/* ---------- Hero ---------- */
.hero { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; animation: rise 0.7s ease both; }

.hero-eyebrow {
  color: var(--text-dim); font-size: 14px; letter-spacing: 2px; margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
  /* 行盒钉死在 18px：月相彩蛋会把农历段换成带 emoji 的文字，而 emoji 的行盒比汉字高 1px。
     不钉住的话 hero 会在彩蛋期间从 79px 长到 80px、结束后又弹回 —— 一次 1px 的布局跳动（浏览器实测） */
  line-height: 18px;
}
.hero-eyebrow .dw {
  color: #cfc2ff; font-weight: 600; letter-spacing: 1px;
  animation: dwGlow 3.2s ease-in-out infinite;
}
/* 农历与公历日期完全同规格：14px / 400 / --text-dim / 字距 2px，一律继承 .hero-eyebrow，不再单独调色。
   （2026-09-20 前这里曾刻意取 75% 不透明≈4.6:1，好"把视线留给公历与星期"；用户要求两者一致后取消。
    取消后对比度回到 --text-dim 的 7.4:1，无障碍反而更好 —— 想恢复层次请改字重/颜色，别再降不透明度。） */
/* 农历点击彩蛋：月相。平时是 75% 的暗字，演出时提亮到满色 + 银白月光晕呼吸一次 —— 像"被月光照亮"。
   2.4s 后 tick 重写整行 DOM，文字与类名随旧元素一起消失，不用手动收尾 */
.hero-eyebrow .dl.moonglow {
  color: var(--text);
  animation: moonGlow 2.4s ease-in-out both;
}
@keyframes moonGlow {
  0%   { opacity: 0; }
  10%  { opacity: 1; text-shadow: 0 0 12px rgba(226, 232, 240, 0.6); }
  55%  { text-shadow: 0 0 16px rgba(226, 232, 240, 0.32); }
  100% { opacity: 1; text-shadow: none; }
}
@keyframes dwGlow {
  0%, 100% { text-shadow: 0 0 10px rgba(124, 108, 255, 0.28); }
  50% { text-shadow: 0 0 20px rgba(124, 108, 255, 0.6); }
}
.hero-title { font-size: 44px; font-weight: 800; line-height: 1.15; letter-spacing: 1px; }.hero-name {
  background: linear-gradient(90deg, #7c6cff, #38bdf8, #ec4899, #7c6cff);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shimmer 7s linear infinite;
  /* 2026-11-10 用户：龚仔往左一点点。用 relative+left 而不是 margin —— 不动布局，
     后面小景的位置不受影响（margin 会把灯一起左推）。 */
  position: relative; left: -8px;
}
@keyframes shimmer { to { background-position: -300% 0; } }

/* ---------- 桌面小台灯（扁平微光，2026-09-20 取代像素马里奥场景） ----------
   基于时辰四态切换"灯光色温 + 光晕强度"（复用 setGreeting 的每秒 tick：dawn 05-08 /
   day 08-17 / dusk 17-19 / night 19-05）。刻意一直亮着、只变光色，保证任何时段都有氛围。
   ⚠️ 空间预算：容器与原 .mario 完全同尺寸（26×26 inline-block、vertical-align:-4px、
   margin-left:10px、margin-top:3px），hero 高度/行宽零变化；光晕/光锥全在容器内或绝对定位，
   绝不影响布局。三支颜色变量用 @property 注册 <color> 才能走 transition（同 --tint-c 手法）。 */
@property --lamp-halo { syntax: "<color>"; inherits: false; initial-value: rgba(255, 233, 176, 0.3); }
@property --lamp-cone { syntax: "<color>"; inherits: false; initial-value: rgba(255, 233, 176, 0.1); }
@property --lamp-bulb { syntax: "<color>"; inherits: false; initial-value: #ffe9b0; }
.hero-title .lamp {
  position: relative; display: inline-block; width: 26px; height: 26px;
  vertical-align: -4px; margin-top: 3px; margin-left: 10px; font-size: 0;
  --lamp-halo: rgba(255, 233, 176, 0.34);
  --lamp-cone: rgba(255, 233, 176, 0.19);
  --lamp-bulb: #ffe9b0;
  transition: --lamp-halo 1.5s ease, --lamp-cone 1.5s ease, --lamp-bulb 1.5s ease;
}
.hero-title .lamp.t-dawn  { --lamp-halo: rgba(255, 233, 176, 0.34); --lamp-cone: rgba(255, 233, 176, 0.19); --lamp-bulb: #ffe9b0; }
.hero-title .lamp.t-day   { --lamp-halo: rgba(226, 238, 255, 0.22); --lamp-cone: rgba(226, 238, 255, 0.11); --lamp-bulb: #eaf2ff; }
.hero-title .lamp.t-dusk  { --lamp-halo: rgba(255, 178, 87, 0.5);   --lamp-cone: rgba(255, 178, 87, 0.26);  --lamp-bulb: #ffb257; }
.hero-title .lamp.t-night { --lamp-halo: rgba(255, 157, 60, 0.68);  --lamp-cone: rgba(255, 157, 60, 0.34);  --lamp-bulb: #ff9d3c; }
/* 场景化 + 再放大（2026-09-20 用户 A：①太小 ②加地面/街景）——
   垂直已近天花板（灯顶上方约 15px 就是农历行），故不硬拔高，改用"铺开体量"：
   96×44 的夜景街角（地面 + 光斑 + 小树 + 远处亮窗楼宇 + 灯）。
   换算：场景 96×44、left:-5px/bottom:-4px（容器仍 26×26，layout 零影响）；
   灯泡落在场景 x18/y10 → 容器 (13, 0) 即容器水平中心、容器顶 → 光晕 left:50%/top:0。 */
/* 2026-11-11 用户拍板 C 方案：先试过缩到 87×40 换两侧 15.1/12.8px 匀称间距，
   实拍对比后判"场景偏小偏扁"（40px 比 44px 标题/胶囊矮、楼宇窗格糊成 2px 点），
   改回 96×44 体量，left -22 保住两侧 10.1/8.8px（均 >8px，不贴）。
   ⚠️ 可用跨度恒 115px（龚仔右缘→胶囊左缘），场景每大 1px 两侧各少 0.5px ——
   这是"场景优先"的定稿点，别再往大调；要再大就得动龚仔或胶囊列的位置。 */
.hero-title .lamp-svg {
  position: absolute; left: -22px; bottom: -4px;
  width: 96px; height: 44px; overflow: hidden; /* 雨雪靠溢出下落，必须裁在格子里 */
}
.hero-title .lamp-halo {
  position: absolute; left: 50%; top: 0; width: 64px; height: 64px;
  transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, var(--lamp-halo) 0%, transparent 68%);
}
/* 氛围灯化（2026-09-20 用户拍板 A：太像普通台灯、不够氛围）——
   核心：灯罩不再是"暗板"，而是"会透光的暖罩"（罩体 = 灯色 50% 半透明）；
   再叠罩口亮边、灯下飘尘、光晕缓慢呼吸。飘尘 keyframe 首尾同态，
   reduce-motion（全局把时长压到 0.001s×1 次）后停在首帧仍是可见淡点，不会消失。 */
.hero-title .lamp-cone  { fill: var(--lamp-cone); }
.hero-title .lamp-pool  { fill: var(--lamp-bulb); fill-opacity: 0.18; }
.hero-title .lamp-shade { fill: var(--lamp-bulb); fill-opacity: 0.5; }
.hero-title .lamp-rim   { fill: var(--lamp-bulb); fill-opacity: 0.9; }
.hero-title .lamp-bulb  { fill: var(--lamp-bulb); }
.hero-title .lamp-stand { fill: #3a4463; }
.hero-title .lamp-base  { fill: #2b3350; }
/* 街景件：地面/路缘/小树/楼宇 = 固定剪影（深色，在暗底上站得住、不跟时段变）；
   窗 = 灯色 75%，跟着四态一起变色（夜里暖橙、白天冷白），复用已有变量不新增。 */
/* 雾带（氛围 + 纵深的分层器）：贴着地面往上渐隐的一层冷白雾，近景剪影"切"进雾里才显层次 */
.hero-title .lamp-haze   { fill: url(#lampHaze); }
.hero-title .lamp-haze0  { stop-color: rgba(168, 190, 240, 0.075); }
.hero-title .lamp-haze1  { stop-color: rgba(168, 190, 240, 0); }
.hero-title .lamp-ground { fill: rgba(255, 255, 255, 0.035); }
.hero-title .lamp-edge   { fill: rgba(255, 255, 255, 0.1); }
.hero-title .lamp-curb   { fill: rgba(255, 255, 255, 0.06); }
/* ⚠️ 空气透视方向修正（2026-09-20，用户："层次感不强"）：远景要"更亮更雾"、近景要"更暗"。
   上一版把远景楼压暗是反的——远近都一个调子，所以糊成一片没有纵深 */
.hero-title .lamp-bldg   { fill: #2f3a62; }
/* 树 / 长椅（2026-09-21 用户："晚上树和凳子不仔细看就看不见"）：夜里原 #1c2442 与背景
   #141a2e 只差一线几乎隐形；提到 #2e3054——比雾带底色略亮、带一点暖紫（它们就在街灯旁，
   会被余光扫到，物理上也说得通）。白天/晨昏另有更亮的覆盖值（见上方天光联动段）。 */
.hero-title .lamp-tree   { fill: #2e3054; }
.hero-title .lamp-bench  { fill: #2e3054; }
/* 街灯余光扫到近处的树/长椅：在它们**身后**垫一层暖紫"背光"，往灯的方向多探出一点，
   轮廓就能从暗底里读出来（2026-09-21 用户反馈：只调色还不够，夜里仍然几乎看不见）。
   只在天黑出现——白天有日光，不需要这层人造背光。 */
.hero-title .lamp-warmrim .wr { fill: #45416b; opacity: 0; transition: opacity 1.8s ease; }
.hero-title .lamp.t-night .lamp-warmrim .wr { opacity: 1; }
.hero-title .lamp-win    { fill: var(--lamp-bulb); fill-opacity: 0.75; }
/* 天光联动（2026-09-21 用户："白天的树/房子/椅子就不是黑色了吧"）——
   近景剪影不再固定：白天=被日光打亮的中间调（树带一点绿）、晨昏=偏暖、夜里=暗剪影（默认值）。
   窗反过来——白天灭、夜里亮（沿用 --lamp-bulb），晨昏半亮；地面白天也亮一档。全程 1.8s 过渡。 */
.hero-title .lamp-tree, .hero-title .lamp-bench, .hero-title .lamp-bldg { transition: fill 1.8s ease; }
.hero-title .lamp-haze0, .hero-title .lamp-ground, .hero-title .lamp-edge,
.hero-title .lamp-curb, .hero-title .lamp-win { transition: fill 1.8s ease, fill-opacity 1.8s ease, stop-color 1.8s ease; }
.hero-title .lamp.t-dawn .lamp-tree,
.hero-title .lamp.t-dawn .lamp-bench { fill: #3a4250; }
.hero-title .lamp.t-dawn .lamp-bldg { fill: #545a80; }
.hero-title .lamp.t-dusk .lamp-tree,
.hero-title .lamp.t-dusk .lamp-bench { fill: #3f3a4a; }
.hero-title .lamp.t-dusk .lamp-bldg { fill: #57517f; }
.hero-title .lamp.t-dusk .lamp-win { fill-opacity: 0.4; }
.hero-title .lamp.t-day .lamp-tree { fill: #5d8a66; } /* 从 #4e7355 提亮：深绿贴在深蓝底上会糊成一片 */
.hero-title .lamp.t-day .lamp-bench { fill: #8593bd; } /* 从 #6d7691 提到与楼同色，否则看不见 */
.hero-title .lamp.t-day .lamp-bldg { fill: #8593bd; }
.hero-title .lamp.t-day .lamp-win { fill: #5c6580; fill-opacity: 1; }
.hero-title .lamp.t-day .lamp-ground { fill: rgba(255, 255, 255, 0.08); }
.hero-title .lamp.t-day .lamp-edge { fill: rgba(255, 255, 255, 0.2); }
/* 白天 = 灯关着（2026-09-21 用户："白天灯怎么还会开"）——
   灯罩从"透光暖罩"变回一块普通的不透光灰罩，灯泡变暗，光晕/光锥/落光斑/光尘/倒影全撤；
   灯杆底座按"日光照到"提亮。夜里 + 晨昏照旧点灯。⚠️ 光晕/光尘带 animation，
   必须 `animation: none` 才能真的关掉（否则动画的 opacity 会盖过我们的 0）。 */
.hero-title .lamp-shade, .hero-title .lamp-rim, .hero-title .lamp-bulb,
.hero-title .lamp-stand, .hero-title .lamp-base, .hero-title .lamp-cone,
.hero-title .lamp-pool, .hero-title .lamp-refl, .hero-title .lamp-halo,
.hero-title .lamp-mote { transition: fill 1.8s ease, fill-opacity 1.8s ease, opacity 1.8s ease; }
.hero-title .lamp.t-day .lamp-halo,
.hero-title .lamp.t-day .lamp-mote { animation: none; opacity: 0; }
.hero-title .lamp.t-day .lamp-cone,
.hero-title .lamp.t-day .lamp-pool,
.hero-title .lamp.t-day .lamp-refl { fill-opacity: 0; }
.hero-title .lamp.t-day .lamp-shade { fill: #cfc9ba; fill-opacity: 1; }
.hero-title .lamp.t-day .lamp-rim { fill: #e4dfd0; fill-opacity: 0.75; }
.hero-title .lamp.t-day .lamp-bulb { fill: #b6b0a0; }
.hero-title .lamp.t-day .lamp-stand { fill: #7b8299; }
.hero-title .lamp.t-day .lamp-base { fill: #666d84; }
/* ===== 自然光影（2026-09-21 用户："白天该是太阳照射的光影；白天阴天就该是阴天的效果"）=====
   暗底上"压暗"当不了阴影（根本看不见），所以反过来：先铺一层**太阳照到地面的光斑**
   （`#lampSunPatch` 径向渐变、用太阳色），再把影子压在这层光上 → 才有对比、才读得出"光与影"。
   晴 → 有影：白天短影（太阳高）/ 晨昏长影（太阳低）；阴/雨/雪/雾 → 漫射无影 + 整体降饱和压暗
   ＝阴天的平光；夜 → 无太阳影（那儿的光该来自街灯自己）。 */
.hero-title .lamp-patch0 { stop-color: var(--lamp-bulb); stop-opacity: 0.45; }
.hero-title .lamp-patch1 { stop-color: var(--lamp-bulb); stop-opacity: 0.2; }
.hero-title .lamp-patch2 { stop-color: var(--lamp-bulb); stop-opacity: 0; }
.hero-title .lamp-sunpatch { fill: url(#lampSunPatch); opacity: 0; transition: opacity 1.8s ease; }
/* 阳光的"证据"（2026-09-21 用户："白天晴再加些太阳照射的光影"）——
   ① 天光：右上一片柔亮的天（径向渐变、取日光色）；② 受光面高光：物体朝太阳（右）一侧的
   顶边/右缘加一道亮边、树冠右上加一点高光（高光色 = 日光色，晨昏会自动变暖）；
   ③ 影子加重（见下）。三者只在"晴 + 白天/晨昏"现身，阴天/夜里全撤。 */
.hero-title .lamp-glow0 { stop-color: var(--lamp-bulb); stop-opacity: 0.5; }
.hero-title .lamp-glow1 { stop-color: var(--lamp-bulb); stop-opacity: 0.22; }
.hero-title .lamp-glow2 { stop-color: var(--lamp-bulb); stop-opacity: 0; }
.hero-title .lamp-dayglow { fill: url(#lampDayGlow); opacity: 0; transition: opacity 1.8s ease; }
.hero-title .lamp-lit { opacity: 0; transition: opacity 1.8s ease; }
.hero-title .lamp-lit-st { fill: var(--lamp-bulb); fill-opacity: 0.85; }
.hero-title .lamp-lit-tr { fill: #b9d69a; fill-opacity: 0.8; }
/* 光影"在动"（2026-09-21 用户："白天黑夜都加光影动效，才有时间在流逝的感觉"）——
   ⚠️ 实话：真按实时算，太阳 4 分钟才走 1°，96px 的小景里影子一分钟挪不到 0.1px，
   **实时太阳位移根本看不见**。所以"时间感"靠两层：① 状态随时辰/天气自动切换（已有，是真跟时间走）；
   ② 一层**缓慢的光影微动**——影子缓慢伸缩＝太阳高度的推移、光斑缓慢摆动＝光向的推移。
   ⚠️ 这些元素的 opacity 已被"状态门控"占用，动画**只能动 transform**，动 opacity 会把门控盖掉。 */
.hero-title .lamp-sunpatch {
  transform-box: fill-box; transform-origin: center;
  animation: sunDrift 56s ease-in-out infinite;
}
@keyframes sunDrift {
  0%, 100% { transform: translateX(-1.5px) scale(1); }
  50%      { transform: translateX(1.5px) scale(1.035); }
}
.hero-title .lamp-short ellipse,
.hero-title .lamp-long ellipse {
  transform-box: fill-box; transform-origin: right center; /* 从物体底部那头缩放＝影长变化 */
  animation: shadowDrift 68s ease-in-out infinite;
}
@keyframes shadowDrift {
  0%, 100% { transform: scaleX(1); }
  50%      { transform: scaleX(1.16); }
}
.hero-title .lamp-dayglow-e { animation: skyBreathe 44s ease-in-out infinite; }
@keyframes skyBreathe { 0%, 100% { opacity: 0.85; } 50% { opacity: 1; } }
.hero-title .lamp-pool {
  transform-box: fill-box; transform-origin: center;
  animation: poolBreathe 34s ease-in-out infinite;
}
@keyframes poolBreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.hero-title .lamp-short ellipse,
.hero-title .lamp-long ellipse { fill: #04060f; fill-opacity: 0.5; }
.hero-title .lamp-short, .hero-title .lamp-long { opacity: 0; transition: opacity 1.8s ease; }
.hero-title .lamp.w-clear.t-day .lamp-sunpatch { opacity: 1; }
.hero-title .lamp.w-clear.t-day .lamp-short { opacity: 1; }
.hero-title .lamp.w-clear.t-day .lamp-dayglow { opacity: 1; }
.hero-title .lamp.w-clear.t-day .lamp-lit,
.hero-title .lamp.w-clear.t-dawn .lamp-lit,
.hero-title .lamp.w-clear.t-dusk .lamp-lit { opacity: 1; }
.hero-title .lamp.w-clear.t-dawn .lamp-dayglow,
.hero-title .lamp.w-clear.t-dusk .lamp-dayglow { opacity: 0.5; }
.hero-title .lamp.w-clear.t-dawn .lamp-sunpatch,
.hero-title .lamp.w-clear.t-dusk .lamp-sunpatch { opacity: 1; }
.hero-title .lamp.w-clear.t-dawn .lamp-long,
.hero-title .lamp.w-clear.t-dusk .lamp-long { opacity: 1; }
.hero-title .lamp.w-cloudy.t-day .lamp-sunpatch,
.hero-title .lamp.w-rain.t-day .lamp-sunpatch,
.hero-title .lamp.w-snow.t-day .lamp-sunpatch,
.hero-title .lamp.w-fog.t-day .lamp-sunpatch { opacity: 0.3; }
.hero-title .lamp.w-cloudy .lamp-svg,
.hero-title .lamp.w-rain .lamp-svg,
.hero-title .lamp.w-snow .lamp-svg,
.hero-title .lamp.w-fog .lamp-svg { filter: saturate(0.86) brightness(0.94); }
/* 猫已移除（2026-09-20 用户："不仔细看看不出来，可以去除"）——
   小场景里 ~10px 的动物剪影读了半天也不确定是猫，收益 < 辨识成本，撤掉。
   ⚠️ 若重启"细节件"，优先选小尺度也认得出的（邮筒/路牌），别选需要姿态才能辨认的动物 */

/* ========== 天气层（2026-09-20 首版：晴 / 雨 / 雪，含晨昏丁达尔光柱） ==========
   数据源：app.js setupWeather() 已拿到的 WMO weather_code → setSceneWeather() 挂 .w-*，
   与时段类 .t-* 叠加（时间管"灯"、天气管"天"，两轴独立可组合）。拿不到天气 → 不加类 =
   中性态。所有天气件默认 opacity:0，靠 .w-* 显隐；.lamp-svg 已 overflow:hidden 裁住雨雪。
   ⚠️ reduce-motion 会把动画压到 0.001s×1 次并停在尾帧——所以每个 keyframe 首尾都设成
   "不可见/复位"态（停住不露馅），显隐一律靠 opacity 过渡、不依赖动画本身。 */

/* —— 天空层：太阳/光柱只在"晴 + 晨/暮"出现（正午太阳高照不进街景框、夜里没有太阳） ——
   2026-09-21 重做（用户："丁达尔效应感觉怪怪的"）：原来是三块**硬边纯色楔形**，糊在天空上像半透明贴纸。
   改法：① 三束共用一枚**以太阳为圆心的 radialGradient**，从光源向外渐隐（近亮远化）；
   ② 整组加 `blur(1.2px)` 柔化边缘；③ 呼吸动画挪到**整组**——同频呼吸比各自乱闪自然。 */
.hero-title .lamp-sky { opacity: 0; transition: opacity 2s ease; }
.hero-title .lamp.w-clear.t-dawn .lamp-sky,
.hero-title .lamp.w-clear.t-dusk .lamp-sky { opacity: 1; }
/* 云（2026-11-08）：原来只有太阳（晴·晨暮）和雨雪，多云天天空是空的 —— 补两朵静态像素云，
   阴/雾/雨/雪时显示，晴天不出现（晴天留给太阳）。颜色随时段略变，夜里压暗不抢戏 */
.hero-title .lamp-clouds { opacity: 0; transition: opacity 2s ease; }
.hero-title .lamp.w-cloudy .lamp-clouds,
.hero-title .lamp.w-fog .lamp-clouds,
.hero-title .lamp.w-rain .lamp-clouds,
.hero-title .lamp.w-snow .lamp-clouds { opacity: 1; }
.hero-title .lamp-cloud { fill: rgba(133, 147, 189, 0.45); transition: fill 1.8s ease; }
.hero-title .lamp.t-dawn .lamp-cloud { fill: rgba(255, 218, 185, 0.34); }
.hero-title .lamp.t-dusk .lamp-cloud { fill: rgba(206, 176, 206, 0.34); }
.hero-title .lamp.t-night .lamp-cloud { fill: rgba(120, 130, 170, 0.26); }
.hero-title .lamp-sun { fill: var(--lamp-bulb); }
.hero-title .lamp-sun-glow { fill: var(--lamp-bulb); fill-opacity: 0.2; }
/* 太阳盘与暖光也柔化：硬边圆盘会读成"悬空的亮球"（2026-09-21 用户指出），
   并把它压到地平线上、塞进楼后 —— 只露半个盘 + 一圈暖光，才是"日落楼后" */
.hero-title .lamp-sun, .hero-title .lamp-sun-glow { filter: blur(1.3px); }
.hero-title .lamp-ray { fill: url(#lampRayFade); }
.hero-title .lamp-ray0 { stop-color: var(--lamp-bulb); stop-opacity: 0.55; }
.hero-title .lamp-ray1 { stop-color: var(--lamp-bulb); stop-opacity: 0.26; }
.hero-title .lamp-ray2 { stop-color: var(--lamp-bulb); stop-opacity: 0; }
.hero-title .lamp-rays { opacity: 0; transition: opacity 2s ease; filter: blur(1.2px); }
.hero-title .lamp.w-clear.t-dawn .lamp-rays,
.hero-title .lamp.w-clear.t-dusk .lamp-rays { animation: rayShimmer 8s ease-in-out infinite; }
@keyframes rayShimmer { 0%, 100% { opacity: 0.75; } 50% { opacity: 1; } }

/* —— 雨：7 条斜线错峰下落 —— */
.hero-title .lamp-rain { opacity: 0; transition: opacity 1.2s ease; }
.hero-title .lamp.w-rain .lamp-rain,
.hero-title .lamp.w-storm .lamp-rain { opacity: 1; }
.hero-title .rr {
  fill: none; stroke: #bcd2ff; stroke-width: 0.85; stroke-linecap: round;
  animation: rainFall 0.95s linear infinite;
}
.hero-title .lamp-rain .rr:nth-child(2) { animation-duration: 0.78s; animation-delay: -0.16s; }
.hero-title .lamp-rain .rr:nth-child(3) { animation-duration: 1.05s; animation-delay: -0.42s; }
.hero-title .lamp-rain .rr:nth-child(4) { animation-duration: 0.86s; animation-delay: -0.6s; }
.hero-title .lamp-rain .rr:nth-child(5) { animation-duration: 1.12s; animation-delay: -0.3s; }
.hero-title .lamp-rain .rr:nth-child(6) { animation-duration: 0.82s; animation-delay: -0.72s; }
.hero-title .lamp-rain .rr:nth-child(7) { animation-duration: 1s; animation-delay: -0.5s; }
.hero-title .lamp-rain .rr:nth-child(8) { animation-duration: 0.9s; animation-delay: -0.24s; }
.hero-title .lamp-rain .rr:nth-child(9) { animation-duration: 1.08s; animation-delay: -0.66s; }
.hero-title .lamp-rain .rr:nth-child(10) { animation-duration: 0.84s; animation-delay: -0.38s; }
.hero-title .lamp-rain .rr:nth-child(11) { animation-duration: 1.02s; animation-delay: -0.54s; }
@keyframes rainFall {
  0%   { transform: translateY(-14px); opacity: 0.25; }
  18%  { opacity: 0.9; }
  82%  { opacity: 0.9; }
  100% { transform: translateY(28px); opacity: 0.25; }
}

/* —— 雪：7 粒缓慢飘落 + 横向轻摆 —— */
.hero-title .lamp-snow { opacity: 0; transition: opacity 1.6s ease; }
.hero-title .lamp.w-snow .lamp-snow { opacity: 1; }
.hero-title .sf { fill: #ffffff; animation: snowFall 6.4s linear infinite; }
.hero-title .lamp-snow .sf:nth-child(2) { animation-duration: 7.6s; animation-delay: -1.4s; }
.hero-title .lamp-snow .sf:nth-child(3) { animation-duration: 5.8s; animation-delay: -3.1s; }
.hero-title .lamp-snow .sf:nth-child(4) { animation-duration: 8.2s; animation-delay: -2.2s; }
.hero-title .lamp-snow .sf:nth-child(5) { animation-duration: 6.8s; animation-delay: -4.6s; }
.hero-title .lamp-snow .sf:nth-child(6) { animation-duration: 7.2s; animation-delay: -0.9s; }
.hero-title .lamp-snow .sf:nth-child(7) { animation-duration: 6s; animation-delay: -5.2s; }
@keyframes snowFall {
  0%   { transform: translate(0, -12px); opacity: 0.4; }
  16%  { opacity: 1; }
  84%  { opacity: 1; }
  100% { transform: translate(-5px, 26px); opacity: 0.4; }
}

/* —— 湿地面（雨 / 雷暴）：光斑更亮 + 灯在地面拉出倒影 + 两圈涟漪 —— */
.hero-title .lamp-wet { opacity: 0; transition: opacity 1.6s ease; }
.hero-title .lamp.w-rain .lamp-wet,
.hero-title .lamp.w-storm .lamp-wet { opacity: 1; }
.hero-title .lamp.w-rain .lamp-pool,
.hero-title .lamp.w-storm .lamp-pool { fill-opacity: 0.34; }
.hero-title .lamp-refl { fill: var(--lamp-bulb); fill-opacity: 0.3; }
.hero-title .lamp-ripple {
  fill: none; stroke: var(--lamp-bulb); stroke-width: 0.6;
  transform-box: fill-box; transform-origin: center;
  animation: rippleOut 2.8s ease-out infinite;
}
.hero-title .lamp-ripple.k2 { animation-duration: 3.6s; animation-delay: -1.3s; }
@keyframes rippleOut {
  0%   { transform: scale(0.35); opacity: 0.45; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* —— "空气"浓淡：晴=通透、雨/雷=略浑、雾=最厚且把远景双塔洗淡 —— */
.hero-title .lamp.w-clear .lamp-haze0 { stop-color: rgba(168, 190, 240, 0.045); }
.hero-title .lamp.w-fog .lamp-haze0 { stop-color: rgba(168, 190, 240, 0.17); }
.hero-title .lamp.w-fog .lamp-bldg { fill: #3c4776; }
.hero-title .lamp.w-rain .lamp-haze0,
.hero-title .lamp.w-storm .lamp-haze0 { stop-color: rgba(168, 190, 240, 0.12); }
.hero-title .lamp-mote  { fill: var(--lamp-bulb); fill-opacity: 0.8; animation: moteDrift 5.6s ease-in-out infinite; }
.hero-title .lamp-mote.m2 { animation-duration: 7.2s; animation-delay: -2.4s; }
.hero-title .lamp-mote.m3 { animation-duration: 6.4s; animation-delay: -4.1s; }
@keyframes moteDrift {
  0%, 100% { transform: translateY(0); opacity: 0.2; }
  45%      { transform: translateY(-3px); opacity: 0.85; }
}
/* 光晕缓慢"呼吸"，让暖光有生命感（不是死图） */
.hero-title .lamp-halo { animation: lampBreathe 4.8s ease-in-out infinite; }
@keyframes lampBreathe { 0%, 100% { opacity: 0.78; } 50% { opacity: 1; } }

/* align-items 由 center 改为 flex-end：行内所有胶囊都是 44px，两种对齐的渲染结果本来就一致；
   改成 flex-end 是为了让 .hero-actions（按钮 + 社交链接的竖排块）底边与其他胶囊齐平，
   于是搜索按钮"浮"在社交链接正上方，而这一行不会被撑高 */
.hero-side { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; } /* 14：约等于胶囊高度的 1/3，12 在 44px 胶囊之间偏挤 */
/* 搜索按钮在上、社交链接在下；按钮水平居中于社交链接玻璃框的正上方 */
.hero-actions { display: flex; flex-direction: column; align-items: center; gap: 5px; margin-left: auto; } /* 窄屏 hero-side 换行后，让「搜索+社交」这一行贴右，与第二层搜索胶囊右缘对齐 */

/* 三枚胶囊单独成组，给上方的每日一言提供宽度基准。
   实测（1440 视口）：胶囊 44px 高，而右侧"搜索+社交"竖排 72.4px 高，
   于是胶囊上方空出一条 30px 的横带，横向正好是"天气框最左 → 节日框最右"（539px）。
   这句话就铺在那条横带里 */
.hero-chips { position: relative; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
/* 窄屏（hero 必然换行）时让 hero-side 撑满整行：否则它只有内容那么宽，
   .hero-actions 靠到 side 右缘就停住，比第二层的搜索胶囊缩进一大截（960 实测差 280px）。
   ⚠️ 断点 999 → 1003（2026-11-08 逐像素实测）：1000~1003 这 4px 里 hero-side 已经换行，
   旧断点却还没生效，hero-actions 右缘停在 655、内容右缘 966 → 上下胶囊差 311px。
   （原来这里把同一条 media 块重复写了两遍，已合并）
   ⚠️ 断点最终 1070（2026-11-11 第三次定稿）：1129 太宽，把 iPad 9 横屏（1080）也卷进
   换行档 → 用户实拍反馈"iPad 变成三排了"。实测物理分界：主列(含小景伸出 44px)+胶囊列
   在 <1056px 时塞不进同一行（1040 实测重叠 16px），>1056 同排成立但间距随视口线性变
   （1080=24px、1100=44px、1129=7.8px）。取 1070 留 14px 余量：
   ≥1071 同排（含 iPad 1080 与桌面 ≥1130），≤1070 换行。
   iPad 9 横屏与桌面同为"标题+胶囊同排"两排布局，不再三排。 */
@media (max-width: 1070px) {
  .hero-side { width: 100%; }
}

/* ---------- 首屏信息条（热点轮播 / 每日一言兜底） ----------
   2026-09-21 用户："左边可以延到农历日期的边界"→ **挂到 .hero 上**，以内容区左右缘为对齐基准
   （左=农历眉题左缘、右=内容右缘），热点标题长也能放得下。
   ⚠️ 实测（无头量几何）：胶囊组右缘比内容右缘**缩进 123px**、宽度随内容变——所以**不能**锚在
   胶囊组上写死宽度/负偏移；left/bottom 由 app.js fitQuoteBar() 按胶囊组实测写入 CSS 变量，
   resize 时重算。JS 未跑时的默认值（--q-bottom:48px）= 胶囊顶上方 4px 的理论位置，只是起步值。

   ⚠️ 排版规格是量过周边才定的（改前是 12.5px/400/无字距，实测观感"悬空、发虚"）：
   首屏文字规格已收敛为 14 / 16 / 19·20 / 44 四档（城市名也已从 13px 提到 14px），所以取 14px；
   字距 1px（左上日期眉题是 2px，同族取一半）；
   颜色 #b3bcdb 对 --bg-base(#0a0e1f) 的对比度 10.1:1，夹在 --text-dim(7.4:1) 与 --text 之间——
   比日期亮，所以读得出"这是内容"；比胶囊白暗，所以不跟玻璃胶囊抢。
   注意 font-weight 取 500 在 Windows 上会落到 Regular（YaHei UI 无 Medium），
   与 mac 上落到 PingFang Medium 略有差异，但两边都在"说明文字"的量级内，不会失衡 */
.hero-quote {
  /* 位置全部由 fitQuoteBar() 实测写入（2026-09-21 用户框选定稿）：
     left = 日期文字右缘(#dateText)+44（2026-11-11 用户："热搜左边距往左靠一点点"，
            +56 → +44，实测间距 56.3→44.3px、条宽同时 +12px；量外层眉题盒子会多 80px，见 app.js 注释）；
     right = hero-side（搜索按钮列）左缘-16，同带才算，窄屏 side 换行时=内容区右缘；
     bottom = 胶囊组上方 4px。默认值仅是 JS 未跑时的理论起步 */
  position: absolute; left: var(--q-left, 0px); right: var(--q-right, 0px); bottom: var(--q-bottom, 48px);
  text-align: left;
  height: 26px; line-height: 26px;
  overflow: hidden; white-space: nowrap;
  font-size: 14px; font-weight: 500; letter-spacing: 1px; color: #b3bcdb;
}
.hero-quote .quote-run { display: inline-block; white-space: nowrap; color: inherit; text-decoration: none; }
/* 热点轮播（2026-09-21）：条目是链接 —— 悬停只提亮不加下划线（用户明确不要下划线）；
   标题超长先静置再横向滚动、播完一整遍才进下一条（滚动态由下方 .run 规则放开 hot 的裁剪）；装得下则 9s 直接换条。 */
.hero-quote.hot .quote-run { max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.hero-quote.hot .quote-run:hover { color: var(--text); }
/* 换条淡入（替代原来的打字机）：轻微上浮，比纯淡入更有"换了条"的提示 */
.hero-quote.fade .quote-run { animation: quoteFade 0.75s ease both; }
@keyframes quoteFade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}
/* 出处落款："—— 李火旺" 与正文同字号（不打破行高节奏），但字重降 400、透明度 0.62——
   读作"落款"而不是句子的延续；用透明度而非换色，滚动经过时亮度跟随整体，不会突兀 */
.hero-quote .quote-from { font-weight: 400; opacity: 0.62; }
.hero-quote.run .quote-run { animation: quoteRun var(--qdur, 30s) linear infinite; max-width: none; overflow: visible; text-overflow: clip; }
/* 渐隐只在滚动时挂：静置时若也挂，第一个字会被拆成半透明（踩过） */
.hero-quote.run {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
}
/* 内容在 JS 里被复制成两份，滚半程正好接上，循环无缝 */
@keyframes quoteRun { from { transform: translateX(0); } to { transform: translateX(-50%); } }
/* 热点超长（2026-09-21）：单份内容只滚一遍，滚到条尾完整露出即停（both 定格），不停留循环——
   复制双份的 -50% 循环会在换条前让"下一份开头"从右侧闪现，像下一条提前进场没演完。
   滚动距离由 JS 写入 --q-shift（条宽-可见宽+24px+16 起始内缩）。放在 .run 规则之后，同特异性靠后者胜 */
.hero-quote.once .quote-run { animation: quoteOnce var(--qdur, 30s) linear var(--q-delay, 0s) both; }
/* 起始 translateX(16px)：静止停顿展示开头时，第一个字要清出左缘 16px 渐隐遮罩区（JS 侧 INSET=16 配对） */
@keyframes quoteOnce { from { transform: translateX(16px); } to { transform: translateX(var(--q-shift, -100%)); } }
/* ---------- 右上角：翻牌时钟 ---------- */
.clock-chip {
  position: relative; flex-shrink: 0;
  display: flex; align-items: center; gap: 6px;
  height: 44px; box-sizing: border-box;
  padding: 0 12px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--card-border);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-hi);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
/* 2026-10-05 去 3D：原 3D 翻牌（preserve-3d + perspective + backface-visibility）在
   Safari 下会被外层 backdrop-filter 胶囊带乱、连累同排卡片一起翻；改纯 2D 竖直滚动。
   overflow:hidden 用来裁掉滚出卡片的那一片。 */
.flip-card {
  position: relative; width: 42px; height: 32px; overflow: hidden; border-radius: 8px;
}
.fc-front, .fc-back {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  border-radius: 8px;
  background: linear-gradient(180deg, #1d2440 0%, #151a30 100%);
  border: 1px solid var(--card-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.fc-front::after, .fc-back::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: rgba(0, 0, 0, 0.45);
}
.fc-front span, .fc-back span {
  font-size: 19px; font-weight: 700; letter-spacing: 1px;
  color: #e8ecf8; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(124, 108, 255, 0.35);
  position: relative; z-index: 1;
}
/* 换值滚动（对齐节日胶囊的 hcSlideIn 手法）：back 带新值从下方滚入、front 向上滚出。
   用 animation 而非 transition —— 摘 .roll 即回原位、不存在“倒转”，Safari 也稳 */
.flip-card.roll .fc-front { animation: fcRollOut 0.42s cubic-bezier(.16, 1, .3, 1) both; }
.flip-card.roll .fc-back  { animation: fcRollIn  0.42s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes fcRollOut { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-100%); opacity: 0; } }
@keyframes fcRollIn  { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.fc-back { opacity: 0; }
@property --spin {
  syntax: "<angle>"; initial-value: 0deg; inherits: false; /* Safari<16.4 无 @property → 光边靠 var 的 0deg 兜底退成静态，不再整圈消失 */
}
.clock-chip::before, .avatar-btn::before, .holiday-chip::before, .weather-chip::before, .search-btn::before,
.pv-chip::before, .site-filter::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--spin, 0deg),
    transparent 0deg, rgba(124, 108, 255, 0.6) 80deg, rgba(34, 211, 238, 0.5) 160deg,
    transparent 240deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: borderSpin 5s linear infinite;
}
@keyframes borderSpin { to { --spin: 360deg; } }
/* 冒号比数字大 1px（20 vs 19）是刻意的：冒号字形小、重心低，放大做光学补偿。
   别在"统一字号"时顺手改成 19 */
.clock-colon {
  color: #8b93b8; font-weight: 700; font-size: 20px;
  margin-top: -6px;
}
.avatar-group { display: flex; align-items: center; gap: 14px; }
.avatar-btn {
  position: relative; flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
  height: 44px; box-sizing: border-box;
  padding: 0 12px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--card-border);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-hi);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  -webkit-tap-highlight-color: transparent;
  transition: background 0.3s ease, border-color 0.3s ease, scale 0.3s ease, box-shadow 0.3s ease;
}
.avatar-link {
  display: grid; place-items: center; padding: 4px 2px;
}
.avatar-link img {
  height: 20px; width: auto; object-fit: contain;
  transition: transform 0.45s cubic-bezier(.22, .85, .35, 1);
}
.avatar-link.platform-xhs img { height: 20px; }
.avatar-link.platform-douyin img { height: 20px; filter: drop-shadow(0 0 6px rgba(0, 243, 233, 0.35)); }
.avatar-link:hover img { transform: scale(1.12); }
.avatar-btn:hover { border-color: hsl(var(--brand-hue, 225) 90% 62% / 0.55); }
.avatar-btn:active { scale: 0.94; }
.avatar-btn:focus-visible { outline: 2px solid #7c6cff; outline-offset: 3px; }
.avatar-glyph { font-size: 15px; font-weight: 800; line-height: 1; font-family: var(--font); }

.holiday-chip {
  position: relative; flex-shrink: 0; overflow: hidden;
  display: grid; place-items: center;
  height: 44px; box-sizing: border-box;
  /* 宽度由 JS 按文案实测写入（style.width = 最长文案 + 24 = padding 20 + border 2 + 2px 余量），这里只兜一个下限：
     文案长短会让胶囊在 139~198px 之间变，hero 又是 space-between —— 胶囊一变窄，
     标题与右侧胶囊组之间就多出一块空白（2026-11-08 用户截图发现）。
     锁定 180px：吃掉一部分空隙（129→~88），再宽就会让天气胶囊贴上小景的楼（210 时直接压上去）
     ⚠️ 2026-11-15 用户："里面还有一些空余空间" —— 内边距 14→10（宽度同步 28→20），
     每边留白从 24.6~35.4px 收到 20.6~31.4px。**再窄就必须让宽度跟随文案**，而那样
     每 2s 轮播宽度会变 ~43px、桌面中缝 8.8→52px 反复抖（11-08 已否），所以别再减了 */
  min-width: 180px;
  padding: 0 10px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--card-border);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-hi);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
/* 窄视口别让下限把 hero 挤成两排：1024 实测会从 74 变成 146（换行） */
@media (max-width: 1100px) {
  .holiday-chip { min-width: 170px; }
}
.hc-back { display: none; }

.weather-chip {
  position: relative; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
  min-width: 96px; height: 44px; box-sizing: border-box; padding: 0 14px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--card-border);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-hi);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.weather-chip .wc-ico { font-size: 16px; line-height: 1; }
.weather-chip .wc-temp { font-size: 14px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
/* 城市名与 .wc-temp 同取 14px，让"24° 杭州市"读成一整行，而不是"一个大字 + 一行小注解"。
   层级不靠字号拉开：温度是 700/var(--text)，城市是 500/var(--text-dim)，字重 + 颜色两层区分已经够。
   与 .search-btn 当初 12px→14px 同一口径（"让首屏各玻璃框的文字规格统一"）。
   宽度后果实测过：胶囊 +3px（126→129），一言条子随之宽 3px（右沿不动、左沿外扩），hero 高度 79px 不变 */
.weather-chip .wc-city { font-size: 14px; font-weight: 500; color: var(--text-dim); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* color 也进 transition：搜索按钮 hover 时要从 --text-dim 平滑提亮到 --text；
   另外三个玻璃框没有颜色变化，多这一项对它们无视觉影响 */
.clock-chip, .holiday-chip, .weather-chip, .search-btn { transition: border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease; }
.clock-chip:hover, .holiday-chip:hover, .weather-chip:hover, .search-btn:hover {
  border-color: rgba(124, 108, 255, 0.45);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-hi), 0 0 22px -6px rgba(124, 108, 255, 0.5);
}
.avatar-btn:hover { box-shadow: var(--shadow), inset 0 1px 0 var(--glass-hi), 0 0 22px -6px rgba(124, 108, 255, 0.5); }
/* 静态是压暗的（不与首屏抢戏），hover 提亮回主文字色 —— 安静但没消失 */
.search-btn:hover { color: var(--text); }
.hc-front {
  grid-area: 1 / 1;
  display: flex; align-items: center; justify-content: center; white-space: nowrap;
  pointer-events: none;
}
.hc-front span {
  display: inline-block;
  font-size: 14px; font-weight: 600; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.hc-front.slider span {
  animation: hcSlideIn 0.55s cubic-bezier(.16, 1, .3, 1) both;
}
/* 节日 emoji 单独包一层：系统 emoji（Win 的 Segoe / mac 的 Apple）偏暗偏小，
   在深色底上不够跳；提亮 + 放大 1px。
   ⚠️ `.hc-front` 是 flex 容器，子元素是 flex item —— `vertical-align` 在这里**不生效**（写了也没用），
   对齐只能靠位移：实测 emoji 中线比文字低 1.5px（88.1 vs 86.6），用 relative + top 提回来。
   也别用 <span> —— `.hc-front.slider span` 是整句滑入动画，嵌套 span 会让 emoji 多滑一次 */
.hc-front .hc-emoji {
  display: inline-block;
  position: relative; top: 1px; /* 光学居中：实测中线差，1px 时 emoji 与文字中线只差 0.5px（2px 会偏下 1.5px） */
  font-size: 15px; font-weight: 400; line-height: 1;
  margin-right: 4px;
  filter: brightness(1.12) saturate(1.08);
}
@keyframes hcSlideIn {
  from { transform: translate3d(110%, 0, 0); opacity: 0; }
  to   { transform: translate3d(0, 0, 0); opacity: 1; }
}
.neon {
  color: #7ee7ff; font-weight: 800; font-style: normal;
  animation: neonPulse 1.8s ease-in-out infinite;
}
@keyframes neonPulse {
  0%, 100% { text-shadow: 0 0 6px rgba(34, 211, 238, 0.85), 0 0 14px rgba(34, 211, 238, 0.5), 0 0 24px rgba(124, 108, 255, 0.45); }
  50% { text-shadow: 0 0 9px rgba(34, 211, 238, 1), 0 0 20px rgba(34, 211, 238, 0.75), 0 0 34px rgba(124, 108, 255, 0.65); }
}

/* ============================================================
   站点卡片：3D 倾斜 + 流光
   ============================================================ */
.site-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 16px;
  margin-top: 12px; margin-bottom: 10px; /* 下边距：页脚改成 margin-top:auto 后，内容撑满时靠它保住这 10px */
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(.22, .85, .35, 1);
}
.site-grid.in { opacity: 1; transform: none; }
/* 入场节奏（2026-10-19 加速）：原来每张 +35ms、116 张要 4s 才出完。
   现在步长 16ms、且延迟封顶 420ms（min()）→ 约 0.8s 全部到位；
   封顶后余下卡片同时淡入，但它们都在视口外，观感就是"首屏很快"。
   min() 不被支持时该声明失效、延迟退化为 0（直接出现，仍是快的那一侧）。 */
.site-grid .site-card { animation: cardIn 0.4s ease both; animation-delay: min(calc(var(--i, 0) * 16ms), 420ms); }
/* 入场只演一次（2026-10-19）：display:none → 显示会**重放** CSS 动画。
   首屏结束后给 grid 加 .settled 摘掉动画，筛选新出现的卡片只走 JS 的那一次淡入，
   否则 cardIn 重放 + 淡入会叠成"闪两遍"。 */
.site-grid.settled .site-card { animation: none; }
/* 分类筛选条（2026-10-19）：卡片墙保持一整面连续，分类只在顶部 chips 上体现。
   皮肤与首屏玻璃胶囊完全同配方（--card / --card-border / --shadow / inset 高光 / blur14），
   并**共用那圈旋转描边光**（.site-filter::before 挂在上方那一组里）——
   这圈光才是"玻璃"的辨识来源：它背后是一整片平滑渐变，只给半透明底 + blur 的话，
   糊完和背景几乎一样，看着就是一块平板，所以必须补上。
   外壳用 fit-content 收成一条"大胶囊"、不再铺满整行 —— 铺满会像外挂工具栏。
   2026-10-20：搜索胶囊从条内挪到条后（用户定稿"两枚并排的玻璃胶囊"）。
   2026-10-20 终稿：**不吸顶** —— 条子待在页面顶部原位，随内容一起滚走。
   （sticky 吸顶 / 下滑收起上滑露出 / 常驻吸顶三版都被否，用户原话"下滑的时候也是固定到这里"。）
   条子不再与卡片重叠，backdrop blur 糊的是极光背景而非卡片。 */
.site-filter-row {
  display: flex; align-items: center; gap: 6px; /* 8→6（2026-10-20）：给 chips 的 12px 间距让出 4px 余量 */
  /* 2026-11-08：fit-content → 100%。原来整行只有 chips 那么宽，最右的搜索胶囊缩在 1209，
     而首屏社交胶囊在 1240 —— 两层右缘差 31px。撑满后由下面的 margin-left:auto 把搜索胶囊推到右缘 */
  width: 100%;
  margin: 18px 0 0;
}
/* 玻璃条本身仍贴合 chips（不铺满），只把搜索胶囊顶到内容右缘，与首屏社交胶囊对齐 */
/* 不参与收缩：只让左边的 chips 外壳被挤（它内层 overflow-x:auto 会横滚）。
   少了 flex-shrink:0 时 group 会被压到 124px，而不收缩的两枚胶囊会溢出右缘 12px ——
   1024 以下实测「访问胶囊右缘比首屏社交胶囊多 12px」，上下两层就不齐了（2026-11-08 修） */
.site-filter-row .search-group { margin-left: auto; flex: 0 0 140px; }
.site-filter {
  /* max-width 必须预留出搜索组：140(group) + 6(gap) = 146。
     原来写 100%，一旦 chips 总宽超过「行宽 - 146」，整行就溢出，
     .search-group 的 margin-left:auto 会被 flex 压缩成 0 → 搜索胶囊不再贴右，
     与首屏社交胶囊对不齐。Mac 的苹方/SF 比微软雅黑宽，正是踩到这个的点。
     留出 146 后：chips 最多到 926，超出走内层 overflow-x 横滚，group 永远贴右。 */
  min-width: 0; max-width: calc(100% - 146px);
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-hi);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  /* 入场：与 hero 同一套 rise（上提 18px + 淡入）。两枚胶囊错开 0.09s 依次落位 ——
     整块一起上提会显得它们焊死了，错一点才有"依次到位"的手感 */
  animation: rise 0.7s ease both;
}
/* chips 的横滚放到内层：可滚动容器里绝对定位的伪元素会跟着内容一起滚走，
   光边就会偏到一边露不出来；外壳不滚，光边永远贴合整条。 */
.site-filter-in {
  position: relative; /* chips 与指示条共用同一定位参照，moveInd() 的 offsetLeft 才对得上 */
  display: flex; gap: 10px; /* 2026-11-08：12 → 10，同时芯片内边距 8 → 9 —— 变成「内松外紧」，更像一组按钮；总宽只 +2px */
  padding: 5px;
  overflow-x: auto;
  /* 2026-10-20：试过 justify-content:space-between 均匀摊平，空隙被拉到 14~25px、用户嫌太散 ——
     改回自然排布（chips 贴 2px 正常间距靠左），不再强行对齐边框；放不下时窄屏自动横滚。 */
  scrollbar-width: none;
}
.site-filter-in::-webkit-scrollbar { display: none; }
/* 选中指示条：绝对定位在按钮层之下，靠 transform/width 过渡滑过去 */
.site-filter-ind {
  position: absolute; top: 5px; bottom: 5px; left: 0; width: 0;
  border-radius: 13px;
  background: rgba(124, 108, 255, 0.20);
  pointer-events: none;
  transition: transform 0.26s cubic-bezier(.22, .85, .35, 1), width 0.26s cubic-bezier(.22, .85, .35, 1);
}
/* .is-stuck / .tuck 均已于 2026-10-20 移除：条子不吸顶，随内容滚走，无需滚动监听 */
.site-filter-btn {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 9px; border-radius: 13px;
  /* 间距 2 → 12（与首屏 .hero-chips 一致，2026-10-20 用户要求）；为把整条控制在内容区 1072 内
     不触发横滚，芯片内边距 11 → 8 让出预算（实测 gap12+padding10 会溢出 43px） */
  border: 0; background: transparent;
  color: var(--text-dim); font: inherit; font-size: 12px; letter-spacing: 0.3px;
  white-space: nowrap; cursor: pointer;
  position: relative; z-index: 1; /* 压在指示条之上 */
  transition: color 0.2s ease, background 0.2s ease;
}
.site-filter-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.site-filter-btn.on { color: var(--text); background: transparent; }
.site-filter-btn.on:hover { background: transparent; }
.site-filter-btn span { font-size: 11px; opacity: 0.55; font-variant-numeric: tabular-nums; }
.site-filter-btn.on span { opacity: 0.75; }
/* 搜索胶囊（2026-10-20 从右上角挪来、先在条内后定稿到条后）：与分类条并排的同高玻璃胶囊，
   自己的玻璃+旋转光边就是与首屏胶囊同款，不需要额外皮肤 —— 只把几何从 24px 小药丸
   撑到 42px 与条子齐高（radius 用全局 --radius，两枚胶囊外形一致）。 */
.site-filter-row .search-btn {
  /* 固定宽度，不用 flex 分配（这套嵌套里 flex:1 会被内容撑开）：78 + 6 + 56 = 140 */
  flex: 0 0 auto;
  height: 42px; padding: 0 14px;
  justify-content: center;
  border-radius: var(--radius);
  animation: rise 0.7s ease 0.09s both; /* 紧跟分类条之后落位（见 .site-filter 的注释） */
}
/* 访问胶囊同步入场（2026-11-08）：与搜索按钮同 0.09s 延迟，两枚像一组依次落位。
   选择器限定在 .site-filter-row —— render() 把 .search-group 从 hero-actions 搬进筛选条时
   才开始匹配、才开始播，和 .search-btn 完全同拍；否则搬节点会重启动画，闪两次。
   ⚠️ 填充模式必须是 backwards 不能照抄 both：both 会把 rise 终帧的 transform:translateY(0)
   以 fill-forwards 一直压在元素上（animation 优先级高于普通声明），把 :hover 的 scale(1.04) 吃掉。
   backwards 只在 0.09s 延迟期间显示起始帧，播完把 transform 控制权交还 CSS，hover 照常放大。 */
.site-filter-row .pv-chip { animation: rise 0.7s ease 0.09s backwards; }
.site-card.is-off { display: none; }
@keyframes cardIn { from { opacity: 0; } }

.site-card {
  /* 兜底色相；实际每张卡的值由 siteCard() 按序号均分色环后写进内联 --tint */
  --tint: 225;
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 24px 12px 18px; text-align: center; text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-hi);
  transform-style: preserve-3d;
  /* ⚠️ 别再用 content-visibility 省视口外卡片的绘制（2026-11-01 实测否掉）：
     未渲染卡按 contain-intrinsic-size 占位，Chrome 的实际占位与真实高度（149）不符（实测 193~200），
     滚动经过时每一行收缩，整页高度从 5001 一路缩到 4385（-616px）—— 滚动条抖、内容往上跑，
     比它能省下的那点布局计算更伤。浏览器本身就不绘制视口外内容，收益本来就有限。
     弱 GPU 的滚动白板化由 body.no-glass 自动降级兜底（见下方 ~L1280）。 */
  /* 2026-10-20：透视从 .site-grid 下放到每张卡自己的 transform 里。
     之前 900px 挂在 grid 上，perspective-origin 默认=整面墙的中心 —— "全部"墙高 3284px，
     首行卡片离原点近 1600px，同样 rx-8°/ry8°/tz14px 的投影 H 被吹到 229px（原始 149，虚胖 54%），
     而分类视图墙矮、卡片贴着原点，H 只有 156px → 用户实测"全部里点一下幅度好大、分类里正常"。
     perspective() 写进卡自身 transform 后每张卡以自己中心为消失点，任何位置手感一致。 */
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(var(--tz, 0px)) scale(var(--sc, 1));
  transition: transform 0.18s cubic-bezier(.22, .85, .35, 1),
              scale 0.18s cubic-bezier(.22, .85, .35, 1),
              box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.site-card:hover { will-change: transform; }
.site-card:active { scale: 0.97; }
.site-card:focus-visible { outline: 2px solid #7c6cff; outline-offset: 3px; }

/* 点击涟漪 */
.card-rip { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; z-index: 2; }
.ripple {
  position: absolute; border-radius: 50%;
  background: var(--ripple, rgba(255, 255, 255, 0.35));
  transform: scale(0); opacity: 0.9;
  animation: rip 0.6s ease-out forwards;
}
@keyframes rip { to { transform: scale(1); opacity: 0; } }
.site-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(340px circle at var(--gx, 50%) var(--gy, 50%),
              hsl(var(--tint) 95% 62% / 0.16), transparent 62%);
  opacity: 0; transition: opacity 0.3s ease;
}
.site-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  border: 1px solid hsl(var(--tint) 95% 62% / 0);
  transition: border-color 0.3s ease;
}
.site-card:hover { border-color: hsl(var(--tint) 90% 62% / 0.5); }
.site-card:hover::before { opacity: 1; }
.site-card:hover { box-shadow: 0 24px 50px -20px hsl(var(--tint) 90% 60% / 0.55), inset 0 1px 0 var(--glass-hi); }

.site-fav {
  width: 54px; height: 54px; border-radius: 15px; overflow: hidden; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--fav-bg); border: 1px solid var(--card-border);
  transform: translateZ(26px);
  transition: box-shadow 0.3s ease, transform 0.45s cubic-bezier(.22, .85, .35, 1);
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.25);
}
.site-card:hover .site-fav {
  box-shadow: 0 0 0 1px hsl(var(--tint) 90% 62% / 0.4), 0 14px 30px -10px hsl(var(--tint) 90% 60% / 0.55);
}
.site-fav img {
  width: 30px; height: 30px; object-fit: contain; opacity: 0;
  transition: opacity 0.35s ease, transform 0.4s cubic-bezier(.22, .85, .35, 1);
}
.site-fav img.loaded { opacity: 1; }
/* 加载占位（2026-10-19）：图标没到之前先垫一枚淡色首字母，避免"白块 + 图标慢慢冒"。
   与 img 同占一格叠放；图标 30×30 比 18px 字大，加载完会自然盖住。 */
.site-fav .ph, .site-fav img { grid-area: 1 / 1; }
.site-fav .ph {
  font-size: 18px; font-weight: 700; line-height: 1; letter-spacing: 0.5px;
  color: rgba(16, 22, 44, 0.28);
}
.site-fav .ph.two { font-size: 13px; letter-spacing: 0; }
.site-card:hover .site-fav img { transform: scale(1.16) rotate(-4deg); }
/* 兜底"字母牌"（2026-09-21 用户："没 logo 的能不能生成个好看的配色/logo"）：色仍取卡片色相
   --tint（与卡片辉光、搜索行同源，不另起一套），但改成**果冻质感**——左上柔光高光 +
   收紧的色阶（+34 而非 +50）、端点压深一档 + 文字投影，像一枚 app 图标而不是一块纯色牌。
   两字符编号（SL/ZT）缩字号，避免在 54px 盒子里顶边。 */
.site-fav .letter {
  font-size: 20px; font-weight: 700; color: #fff; line-height: 1; letter-spacing: 0.5px;
  width: 100%; height: 100%; display: grid; place-items: center;
  text-shadow: 0 1px 2px hsl(var(--tint) 62% 20% / 0.5);
  background:
    radial-gradient(120% 92% at 26% 12%, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0) 60%),
    linear-gradient(145deg, hsl(var(--tint) 76% 63%), hsl(calc(var(--tint) + 34) 66% 44%));
}
.site-fav .letter.two { font-size: 15px; letter-spacing: 0; }

/* 卡片名 14.5 → 14：原是全站唯一带小数的正文字号、且无任何释义，
   与 hero 收敛出的"正文只有 14 一档"对不上。代价：长英文名比原先略早触发截断 */
.site-name { margin-top: 6px; font-size: 14px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transform: translateZ(18px); transition: color 0.25s ease; }
.site-desc { font-size: 12px; color: var(--text-dim); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transform: translateZ(10px); transition: color 0.25s ease; }
.site-card:hover .site-name { color: hsl(var(--tint) 92% 72%); }
.site-card:hover .site-desc { color: var(--text); }
.site-name { position: relative; }
.site-name::after {
  content: ""; position: absolute; left: 0; bottom: -3px;
  height: 1.5px; width: 100%; opacity: 0.85;
  background: linear-gradient(90deg, transparent, hsl(var(--tint) 92% 72%), transparent);
  background-size: 200% 100%;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s ease;
}
.site-card:hover .site-name::after { transform: scaleX(1); }

/* ---------- 页脚 ---------- */
/* 页脚等 JS 渲染完再现身（2026-10-20）：偶发刷新时浏览器抢先画了第一帧，
   此时 #content 还是空的，页脚被顶到 hero 正下方，"· 许可协议"会在页面中部闪一下；
   render() 填完 120 张卡片后给 body 加 .ready 才显示。<noscript> 里给无 JS 环境兜底还原。 */
.footer { visibility: hidden; }
body.ready .footer { visibility: visible; }
/* 整行居中：内容很短（署名 + 许可协议），两端对齐会在宽屏下拉出近千 px 的空档，
   看起来像"两个孤立的东西"。居中的 gap 按 8px 排，与组内间距一致，读起来是一条完整的元信息链 */
.footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  /* margin-top: auto —— 在 .page 这个列向 flex 里把页脚推到底部；内容撑满时自动退化为 0 */
  gap: 10px 8px; margin-top: auto; padding-top: 26px;
  border-top: 1px solid var(--card-border); color: var(--footer); font-size: 14px; /* 13→14：消灭 13px 孤值，并进全站正文 14 档 */
}
.footer-meta { display: inline-flex; align-items: center; gap: 8px; }
/* gap 8px 是为了让前置的分隔点与链接、以及点与左组之间间距一致 */
.footer-links { display: inline-flex; align-items: center; gap: 8px; }
.footer .footer-sep { opacity: 0.55; }
/* 链接取 --text-dim 而不是 color:inherit + opacity：
   父级 --footer 本身只有 0.52 透明度，再叠 0.85 会掉到 0.44 —— 看起来像禁用态。
   可交互元素必须显式取一个更亮的色，与周围只读文字拉开层次。
   另给一条常驻的极淡下划线：只靠颜色区分链接，在弱视/强光下会失效，
   上划线是"不依赖颜色"的第二重线索。下划线常驻（而非 hover 才出现）才能被平滑过渡 */
.footer a {
  color: var(--text-dim); text-decoration: underline;
  text-decoration-color: rgba(151, 160, 196, 0.42);  /* 即 --text-dim 的 42% */
  text-decoration-thickness: 1px; text-underline-offset: 3px;
  transition: color 0.25s ease, text-decoration-color 0.25s ease;
}
.footer a:hover { color: #a99bff; text-decoration-color: currentColor; }
.footer a:focus-visible { outline: 2px solid #7c6cff; outline-offset: 3px; border-radius: 2px; }

/* ---------- 回到顶部（2026-10-20） ---------- */
/* 皮肤沿用首屏玻璃胶囊（--card / --card-border / --shadow / inset 高光 / blur14），圆形常驻右下角。
   默认 opacity:0 + 下移 12px 藏起来，滚过一屏加 .on 淡入上滑 ——
   ⚠️ 位移用独立的 `translate` 属性而不是 transform（站点统一规矩：transform 留给别的动效）。
   层级 30 < 搜索浮层的 40，开搜索时它被遮罩盖住，不会飘在浮层上面。 */
.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 30;
  display: grid; place-items: center;
  width: 42px; height: 42px; padding: 0;
  border-radius: 50%;
  background: var(--card); border: 1px solid var(--card-border);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-hi);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--text-dim); cursor: pointer;
  opacity: 0; translate: 0 12px; pointer-events: none;
  transition: opacity 0.26s ease, translate 0.26s cubic-bezier(.22, .85, .35, 1),
              color 0.2s ease, box-shadow 0.3s ease;
}
.to-top.on { opacity: 1; translate: 0 0; pointer-events: auto; }
.to-top:hover { color: var(--text); box-shadow: var(--shadow), inset 0 1px 0 var(--glass-hi), 0 0 22px -6px rgba(124, 108, 255, 0.5); }
.to-top:focus-visible { outline: 2px solid #7c6cff; outline-offset: 3px; }
/* 箭头：笔画 2.2 与站内其它 stroke 图标同一手感 */
.to-top-ico {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
@media (max-width: 640px) { .to-top { right: 16px; bottom: 16px; } }

/* ============================================================
   搜索：Ctrl/Cmd+K、/ 或点胶囊唤出的浮层（桌面与触屏都启用）
   ============================================================ */
.search { position: fixed; inset: 0; z-index: 40; display: flex; justify-content: center; }
.search-mask {
  position: absolute; inset: 0;
  background: rgba(4, 7, 18, 0.66);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.search-panel {
  position: relative; align-self: flex-start; margin-top: 11vh;
  width: min(580px, calc(100vw - 40px));
  background: var(--card-solid); border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-hi);
  overflow: hidden;
  animation: searchIn 0.22s cubic-bezier(.22, .85, .35, 1) both;
}
@keyframes searchIn { from { opacity: 0; translate: 0 -10px; } }
.search-head {
  display: flex; align-items: center; gap: 11px; padding: 0 18px;
  border-bottom: 1px solid var(--card-border);
}
.search-ico {
  flex: none; width: 17px; height: 17px;
  fill: none; stroke: var(--text-dim); stroke-width: 2; stroke-linecap: round;
}
.search-input {
  flex: 1; min-width: 0; padding: 18px 0;
  background: transparent; border: 0; outline: 0;
  color: var(--text); font: inherit; font-size: 16px;
}
.search-input::placeholder { color: var(--text-dim); }
.search-list { max-height: 46vh; overflow-y: auto; padding: 6px; }
.search-list::-webkit-scrollbar { width: 9px; }
.search-list::-webkit-scrollbar-track { background: transparent; }
.search-list::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 999px; }

.search-item {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 9px 12px 9px 15px; border-radius: 12px;
  color: var(--text); text-decoration: none; cursor: pointer;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}
/* 选中标记用四重叠加，而不是只靠一层几乎看不见的灰底：
   ① 左侧色相竖条 ② 同色底 ③ 同色描边 ④ 文字与图标提亮 */
.search-item::before {
  content: ""; position: absolute; left: 5px; top: 50%; translate: 0 -50%;
  width: 3px; height: 0; border-radius: 999px;
  background: hsl(var(--tint, 225) 92% 68%);
  transition: height 0.18s cubic-bezier(.22, .85, .35, 1);
}
.search-item.on {
  background: hsl(var(--tint, 225) 72% 64% / 0.22);
  box-shadow: inset 0 0 0 1px hsl(var(--tint, 225) 88% 74% / 0.5);
}
.search-item.on::before { height: 21px; }
.search-item.on .si-name { color: hsl(var(--tint, 225) 95% 86%); font-weight: 500; }
.search-item.on .si-desc { color: hsl(var(--tint, 225) 50% 80%); }
.search-item.on .si-ico {
  scale: 1.07;
  box-shadow: 0 0 0 2px hsl(var(--tint, 225) 88% 74% / 0.6);
}
.si-ico {
  flex: none; width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 8px; background: var(--fav-bg);
  font-size: 13px; font-weight: 600; color: #1a2140;
  transition: scale 0.16s cubic-bezier(.22, .85, .35, 1), box-shadow 0.16s ease;
}
.si-ico img { width: 17px; height: 17px; object-fit: contain; }
.si-name { min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-desc { flex: none; margin-left: auto; font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.search-empty { padding: 26px 0; text-align: center; font-size: 12px; color: var(--text-dim); } /* 13→12：并入辅助 12 档 */
.search-tip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 16px; border-top: 1px solid var(--card-border);
  font-size: 12px; color: var(--text-dim);
}
.search-count { font-variant-numeric: tabular-nums; }
.search-keys { display: inline-flex; align-items: center; gap: 6px; }
kbd {
  display: inline-block; min-width: 20px; padding: 1px 5px; text-align: center;
  font: inherit; font-size: 11px; line-height: 16px; color: var(--text-dim);
  background: var(--kbd); border: 1px solid var(--card-border); border-radius: 5px;
}
/* 玻璃皮肤与 .clock-chip / .weather-chip / .holiday-chip 同款：毛玻璃 + 顶部高光 + 旋转描边光，
   hover 也走同一套光晕（见上方 .clock-chip:hover 分组）——保证首屏几个玻璃框质感一致。
   字体（2026-09-20 两步降调）：不再对齐 .wc-temp 的 14/700/--text，改为 **12 / 400 / --text-dim，与键帽 Ctrl K 同色同重**。
   原因一：搜索不是必需功能，不该在首屏跟标题和几个玻璃胶囊抢戏 —— 压暗 + 减重后它退到背景里。
   原因二：用户反馈"搜索比键帽大、突兀"—— 14 vs 键帽 10.5 差 33%，且中文方块字视觉更满，突兀感被放大；
   压到 12 后与键帽 11 只差不到 10%，观感齐平。12 也是站内现成的"辅助档"。
   hover 再提亮回 --text：安静但没消失，鼠标一碰就知道可点，补回可发现性。
   ⚠️ 图标是 stroke: currentColor，会自动跟随这里的颜色，别再单独给它设色。
   ⚠️ 高度预算重算（浏览器实测）：行盒 12×1.1=13.2、图标 14、键帽 16 → 最高是键帽 16，
      按钮高 = 6+16+2 = 24px（原 23.4）。hero-side 合计 24+5+44 = 73px ≤ 79，仍安全。
   尺寸仍刻意压紧：它和社交链接竖排后是 .hero-side 里最高的元素，
   总高必须留在左侧标题块高度以内，否则会把整个 hero 撑高（详见文件末尾的"页脚/首屏"注释）。
   所以行高压到 1.1 —— 14×1.1=15.4px，与改前的 12×1.3=15.6px 基本等值：
   字号变大，按钮总高反而不变，hero 高度预算不受影响。调字号时务必同步调整行高 */
.search-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px;
  font: inherit; font-size: 12px; font-weight: 400; line-height: 1.1;
  color: var(--text-dim); cursor: pointer;
  background: var(--card); border: 1px solid var(--card-border); border-radius: 999px;
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-hi);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
/* 键帽不再单独设字号/行高：直接继承全局 kbd 的 11px / 16px ——
   这样按钮键帽和浮层底部键帽永远一致，不会再各漂各的（10.5 那个孤值已消灭）。
   只保留按钮特有的内边距与"不加粗"（全局 kbd 的 font:inherit 会把按钮字重带进来） */
/* 访问量独立成一枚小玻璃胶囊（2026-11-08 用户要求）：点它不会再触发搜索。
   皮肤与 .search-btn 同款：同一圈 conic 旋转光边（见上方 ::before 组）、hover 光晕、图标微动。
   宽度固定 56px：数字涨到 4 位也不会把右缘顶出去，上下两层胶囊右缘恒 0 差（实测 4 位会溢出 7~8px）。
   宽度必须 > 圆角×2（18×2=36），否则左右圆角相接退化成竖椭圆 */
.search-group { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 140px; }
.pv-chip {
  position: relative; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  height: 42px; width: 56px; padding: 0 6px; box-sizing: border-box;
  border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--card-border);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-hi);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--text-dim); font-size: 12px; line-height: 1;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, transform 0.25s ease;
}
/* 数字吃掉剩余空间并居中：占位「···」→ 真实数字、以及位数增长时，图标位置与胶囊宽度都不跳 */
.pv-chip .pv-n {
  flex: 1 1 auto; min-width: 0; text-align: center; white-space: nowrap;
  line-height: 1; font-variant-numeric: tabular-nums;
  transition: letter-spacing 0.25s ease;
}
.pv-chip .pv-ico {
  width: 14px; height: 14px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  flex: 0 0 auto; transition: transform 0.3s ease;
}
/* 加载中：占位点呼吸 + 光边转速加快（和搜索胶囊同一颗光边，只是"忙"起来） */
.pv-chip.is-loading .pv-n { animation: pvPulse 1.1s ease-in-out infinite; }
.pv-chip.is-loading::before { animation-duration: 1.6s; }
@keyframes pvPulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
/* 数字到位：一次轻微上浮淡入，别让「···」硬切成数字 */
.pv-chip.is-ready .pv-n { animation: pvIn 0.34s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes pvIn { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: translateY(0); } }
.pv-chip:hover {
  border-color: rgba(124, 108, 255, 0.45);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-hi), 0 0 22px -6px rgba(124, 108, 255, 0.5);
  color: var(--text);
  transform: scale(1.04);
}
.pv-chip:hover .pv-n { font-weight: 600; letter-spacing: 0.04em; }
.pv-chip:hover .pv-ico { transform: scale(1.1) translateY(-1px); }
/* 写在 hover 之后：4 位 /「1.2万」即使在 hover 也保持收紧字距，不挤到图标；不改字号（体系只有 14/13/12） */
.pv-chip.is-long .pv-n { letter-spacing: -0.3px; }
@media (prefers-reduced-motion: reduce) {
  .pv-chip:hover { transform: none; }
  .pv-chip.is-loading .pv-n, .pv-chip.is-ready .pv-n { animation: none; }
  .pv-chip.is-loading::before { animation-duration: 5s; }
}
/* 旧 kbd 内的访问图标规则已随"拆成两枚胶囊"一并删除（2026-11-08） */
/* 图标盒按公式 盒 ≈ 字号 ÷ 图形占比 × 0.9 取值：
   放大镜的圆在 viewBox 里只占约 79%（circle r=7 在 24×24 中四周留白多），
   12px 字号 → 盒 ≈ 12 ÷ 0.79 × 0.9 ≈ 13.7 → 取 14px，图形约 11px（字号的 92%），笔画约 1.17px。
   注意图标(14)已低于键帽(16)：按钮高度改由键帽决定，图标不再是最高元素 */
.search-btn-ico {
  flex: none; width: 14px; height: 14px;
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round;
  transition: transform 0.3s ease; /* 配合下面的 hover：撤 hover 时平滑回位，别硬弹 */
}
/* 放大镜动效（2026-10-20）：hover 时"探头"（放大 + 歪一点，像凑近看），
   按住不放也保持这个姿势（forwards）；点击/快捷键唤出时左右扫一下。
   手法：摘类 + 强制回流 + 加类重启动画，定时清理。
   ⚠️ .pop 那条必须写在 hover 那条后面：特异性同为 (0,3,0)，靠源顺序让"扫"盖过"探头" */
.search-btn:hover .search-btn-ico { animation: lensPeer 0.35s ease forwards; }
@keyframes lensPeer {
  from { transform: scale(1) rotate(0deg); }
  to { transform: scale(1.14) rotate(-8deg); }
}
.search-btn.pop .search-btn-ico { animation: lensScan 0.45s cubic-bezier(.3, .7, .4, 1); }
@keyframes lensScan {
  0% { transform: translateX(0) rotate(0deg) scale(1); }
  30% { transform: translateX(-1.5px) rotate(-12deg) scale(1.16); }
  65% { transform: translateX(1.5px) rotate(7deg) scale(1.16); }
  100% { transform: translateX(0) rotate(0deg) scale(1); }
}
.search-btn:focus-visible { outline: 2px solid #7c6cff; outline-offset: 3px; }

/* ============================================================
   入场动画 / 响应式 / 滚动条
   ============================================================ */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 平板横竖屏：压缩字号与胶囊留白，尽量一排；
   放不下时自动换行，行距拉大防止草皮与玻璃框贴碰 */
@media (min-width: 641px) and (max-width: 1104px) {
  .hero { gap: 28px 20px; }
  .hero-title { font-size: 40px; }
  .hero-side, .hero-chips { gap: 6px; }
  .clock-chip, .weather-chip, .holiday-chip, .avatar-btn { padding: 0 10px; }
}

/* 窄屏垂直堆叠 */
@media (max-width: 640px) {
  .page { padding: 24px 16px 34px; }
  .hero { flex-direction: column; align-items: flex-start; }
  .hero-title { font-size: 32px; }
  .hero-side, .hero-chips { gap: 8px; }
  /* 窄屏 hero 是竖排，再绝对定位条子会压到标题上；改回正常流，独占一行铺在胶囊上方 */
  .hero-quote { position: static; flex: 1 1 100%; min-width: 0; margin: 0 0 6px; }
  .clock-chip { padding: 0 10px; }
  .flip-card { width: 36px; height: 28px; }
  .fc-front span, .fc-back span { font-size: 16px; }
  .avatar-btn { padding: 0 10px; }
  .weather-chip { padding: 0 10px; }
  .site-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 30px; }
  .site-card { padding: 13px 6px 11px; gap: 5px; }
  .site-fav { width: 42px; height: 42px; border-radius: 12px; }
  .site-fav img { width: 23px; height: 23px; }
  .site-fav .letter { font-size: 16px; }
  .site-fav .letter.two { font-size: 12px; }
  .site-name { font-size: 12px; margin-top: 4px; }
  .site-desc { display: none; }
  .orb { filter: blur(60px); opacity: 0.35; }
  .particles { display: none; }
  /* 搜索入口在窄屏同样保留（与桌面一致）。
     软键盘会占掉屏幕下半部，面板顶部略上移 + 列表压矮，给它让位，
     否则底部提示条和末行结果会被键盘盖住 */
  .search-panel { margin-top: 8vh; }
  .search-list { max-height: 38vh; }
}

/* 触屏设备：关闭 3D 倾斜，避免误触 */
@media (pointer: coarse) {
  .site-card { transform: none; }
  .site-fav, .site-name, .site-desc { transform: none; }
}

/* 关闭毛玻璃、改用纯色底，避免滚动卡顿：
   ① 用户在系统里开启"减少透明度"（Safari / Firefox 不支持该特性，故并列 prefers-contrast: more 作替代信号）
   ② 窄屏移动端 —— 按屏幕宽度兜底，覆盖上面不支持的浏览器，且移动端 GPU 本就最吃紧 */
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more), (max-width: 640px) {
  .site-card { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--card-solid); }
  .clock-chip, .holiday-chip, .avatar-btn, .weather-chip, .search-btn, .pv-chip { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--card-solid); }
  .search-mask { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .orb { filter: blur(40px); }
}

/* 弱 GPU 自动降级（app.js 的 initGlassGuard 实测滚动掉帧后给 body 挂 .no-glass）：
   整墙卡片每帧都要重算 backdrop-blur，软渲染 / 弱核显机器光栅化跟不上，
   滚动方向上大片区域白板化（公司 arm64 Chrome 150 实测）。复用上面的纯色卡底，
   一次性生效、本会话不回退 —— 稍扁平但至少能流畅滚 */
body.no-glass .site-card {
  backdrop-filter: none; -webkit-backdrop-filter: none;
  background: var(--card-solid);
  transform: none; /* 3D 倾斜同样是逐帧重光栅化，一并摘掉 */
}
body.no-glass .site-fav, body.no-glass .site-name, body.no-glass .site-desc { transform: none; }
body.no-glass .orb { animation: none; } /* 70px 大模糊层的常驻漂移也停掉 */
body.no-glass .spotlight { display: none; } /* soft-light 混合层在软渲染上开销大 */

/* 减少动态效果偏好 */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
  html { scroll-behavior: auto; } /* 平滑滚动也是动效，尊重"减少动态效果" */
  .spotlight { display: none; }
  .site-card { transform: none; }
  .site-fav, .site-name, .site-desc { transform: none; }
  .flip-card { transform: none !important; }
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }