/* 52ta.top 优化版样式
   目标：首屏无阻塞、对比度全部 ≥ AA、触控目标 ≥ 44px、键盘完全可达、尊重 prefers-reduced-motion
   主题：data-theme 五套配色（墨金/青瓷/黛蓝/豆沙/素描）× data-mode 深浅，localStorage 持久化 */

/* ═══════════════ 主题 token：浅色 ═══════════════ */
:root,
:root[data-theme="ink-gold"] {
  color-scheme: light dark;

  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --ink: #1b1f24;          /* 对白 16.1:1 */
  --ink-2: #55606d;        /* 对白 5.9:1 */
  --ink-3: #6b7684;        /* 对白 4.6:1 */
  --line: #dfe3e8;
  --accent: #8a6a2f;       /* 对白 5.0:1 */
  --accent-soft: #f3ead9;
  --brand-a: #c9a96e;      /* 品牌渐变（纯装饰） */
  --brand-b: #a8853f;
  --focus: #1a56db;
  --err: #b3261e;
  --radius: 10px;
  --tap: 44px;             /* WCAG 2.2 AA 2.5.8 最小触控目标 */
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .04);
  --pattern-o: .75;
}

:root[data-theme="celadon"] {
  --bg: #f3f7f5;
  --surface: #ffffff;
  --surface-2: #ecf2ef;
  --ink: #1c2420;
  --ink-2: #52605a;
  --ink-3: #66756e;
  --line: #dde5e1;
  --accent: #2e6b58;
  --accent-soft: #e0efe8;
  --brand-a: #6fae9a;
  --brand-b: #3d7a68;
  --focus: #0f7a5c;
}

:root[data-theme="indigo"] {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #ebf0f6;
  --ink: #1b2129;
  --ink-2: #505c6b;
  --ink-3: #657181;
  --line: #dce2ea;
  --accent: #2b5a8c;
  --accent-soft: #e2ebf5;
  --brand-a: #5f88bb;
  --brand-b: #2b5a8c;
  --focus: #1a56db;
}

:root[data-theme="rouge"] {
  --bg: #faf6f4;
  --surface: #ffffff;
  --surface-2: #f4ebe8;
  --ink: #251d1b;
  --ink-2: #5f514d;
  --ink-3: #74655f;
  --line: #e9deda;
  --accent: #96453f;
  --accent-soft: #f5e4e1;
  --brand-a: #cf8b83;
  --brand-b: #96453f;
  --focus: #a8322a;
}

:root[data-theme="sketch"] {
  --bg: #f6f5f1;
  --surface: #fcfbf8;
  --surface-2: #efece4;
  --ink: #262420;
  --ink-2: #565248;
  --ink-3: #6b665a;
  --line: #e2ded2;
  --accent: #55503f;
  --accent-soft: #ece8da;
  --brand-a: #857f6d;
  --brand-b: #55503f;
  --focus: #7a6a30;
  --pattern-o: 1;          /* 素描主题纹理更明显 */
}

/* 「无」：不套任何色调，纯中性灰阶 */
:root[data-theme="none"] {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-2: #f1f1f3;
  --ink: #1c1c1e;          /* 对白 16.5:1 */
  --ink-2: #57575c;
  --ink-3: #6e6e73;
  --line: #e3e3e6;
  --accent: #4a4a52;       /* 对白 8.6:1 */
  --accent-soft: #ececef;
  --brand-a: #a3a3ab;
  --brand-b: #6c6c74;
  --focus: #1a56db;
  --pattern-o: .45;
}

/* ═══════════════ 主题 token：深色（共享中性色 + 各主题点缀色） ═══════════════ */
:root[data-mode="dark"] {
  color-scheme: dark;
  --bg: #14161a;
  --surface: #1c1f25;
  --surface-2: #23272e;
  --ink: #e9ebee;
  --ink-2: #a9b2bd;
  --ink-3: #8b95a1;
  --line: #2c313a;
  --focus: #7aa5ff;
  --err: #ff8a80;
  --shadow: none;
  --pattern-o: .6;
}

:root[data-theme="ink-gold"][data-mode="dark"] { --accent: #e8c88a; --accent-soft: #2c2718; --brand-a: #e8c88a; --brand-b: #a8853f; }
:root[data-theme="celadon"][data-mode="dark"]  { --accent: #8fd0bb; --accent-soft: #17271f; --brand-a: #8fd0bb; --brand-b: #3d7a68; }
:root[data-theme="indigo"][data-mode="dark"]   { --accent: #9cc3f0; --accent-soft: #182334; --brand-a: #9cc3f0; --brand-b: #2b5a8c; }
:root[data-theme="rouge"][data-mode="dark"]    { --accent: #e8a8a1; --accent-soft: #2b1a18; --brand-a: #e8a8a1; --brand-b: #96453f; }
:root[data-theme="sketch"][data-mode="dark"]   { --accent: #cdc7b6; --accent-soft: #26241e; --brand-a: #cdc7b6; --brand-b: #6b665a; }
:root[data-theme="none"][data-mode="dark"]     { --accent: #d7d7dc; --accent-soft: #26262a; --brand-a: #b9b9c0; --brand-b: #7c7c85; }

/* 深色 + **没点过任何配色**（data-theme 缺失）。
   这时按选择器的口径就是「墨金」（site.js 的 syncThemeBtns 把「无 data-theme」当 ink-gold，
   那个按钮默认 aria-pressed="true"），但上面六条只覆盖「显式写了 data-theme」的情况，
   于是 --accent 落回浅色的 #8a6a2f —— 对深底只有 3.4:1，金链接、金图标发暗。
   （下面第 131 行的 @media 块处理的是「跟随系统且还没手动切过」；一旦手动切到深色，
     那块的 :not([data-mode]) 就失效了，所以这里必须单独补一条。）
   实测：深色未点配色 3.4:1 → 补这条后 10.7:1。取值与 [data-theme="ink-gold"][data-mode="dark"] 一致。 */
:root[data-mode="dark"]:not([data-theme]) {
  --accent: #e8c88a; --accent-soft: #2c2718;
  --brand-a: #e8c88a; --brand-b: #a8853f;
}

/* 深浅模式跟随系统时补一个 dark 默认（未手动切换 data-mode 之前） */
@media (prefers-color-scheme: dark) {
  :root:not([data-mode]):not([data-theme]) {
    --bg: #14161a; --surface: #1c1f25; --surface-2: #23272e;
    --ink: #e9ebee; --ink-2: #a9b2bd; --ink-3: #8b95a1; --line: #2c313a;
    --accent: #e8c88a; --accent-soft: #2c2718; --focus: #7aa5ff; --err: #ff8a80;
    --shadow: none; --pattern-o: .6;
  }
}

/* ═══════════════ 动态田园背景（fixed 装饰层，不参与交互） ═══════════════
   思路来自 meijiecao.com 的 ambient 场景：太阳呼吸、云朵飘移、飞鸟掠过、草地摆动、
   稻草人晃、风车匀速旋转。全部纯 CSS 绘制 —— 无图片、无网络请求、不依赖 JS。
   颜色一律由主题 --brand-a / --brand-b 派生，所以五套配色各成一景，深浅模式自动适配。 */
:root {
  --amb-o: .88;                                       /* 场景整体透明度 */
  --amb-sky-h: clamp(120px, 26vh, 240px);             /* 云所在的天际带高度（贴视口底，随视口高伸缩） */
  --amb-sun-warm: #e8bd5e;                            /* 太阳本色（各主题各写一行） */
  --amb-sun-core: color-mix(in srgb, #fff 34%, var(--amb-sun-warm));
  --amb-sun-mid: color-mix(in srgb, transparent 4%, var(--amb-sun-warm));
  --amb-sun-edge: color-mix(in srgb, transparent 42%, var(--amb-sun-warm));
  --amb-sun-halo: color-mix(in srgb, transparent 68%, var(--amb-sun-warm));
  --amb-cloud: color-mix(in srgb, #ffffff 34%, var(--brand-a));
  --amb-cloud-sh: color-mix(in srgb, transparent 62%, var(--brand-b));
  --amb-bird: color-mix(in srgb, transparent 34%, var(--brand-b));
  --amb-grass-a: color-mix(in srgb, transparent 56%, var(--brand-a));
  --amb-grass-b: color-mix(in srgb, transparent 66%, var(--brand-b));
  --amb-grass-c: color-mix(in srgb, transparent 76%, var(--brand-b));
  --amb-ground-a: color-mix(in srgb, transparent 62%, var(--brand-a));
  --amb-ground-b: color-mix(in srgb, transparent 76%, var(--brand-b));
  --amb-cloth-a: color-mix(in srgb, transparent 12%, var(--brand-a));
  --amb-cloth-b: color-mix(in srgb, transparent 30%, var(--brand-b));
  /* 降水色给一套通用默认值：春季细雨、冬季飞雪各自再覆盖；
     天气联动时任何季节都可能下雨或下雪，缺了默认值图案会整个消失 */
  --amb-rain: color-mix(in srgb, var(--brand-b) 34%, #7fb0d4);
  --amb-snow: color-mix(in srgb, #ffffff 30%, #7f9cbe);
  /* 雪花形状：六角枝晶描边做成 mask，用 background 上色 —— 雪花随主题/明暗变色，0 图片 0 请求 */
  --snowflake: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M12%2012L12%201.8M12%208L9.55%206.35M12%208L14.45%206.35M12%205.1L10.22%203.9M12%205.1L13.78%203.9M12%2012L20.83%206.9M15.46%2010L15.67%207.06M15.46%2010L18.12%2011.29M17.98%208.55L18.13%206.41M17.98%208.55L19.91%209.49M12%2012L20.83%2017.1M15.46%2014L18.12%2012.71M15.46%2014L15.67%2016.94M17.98%2015.45L19.91%2014.51M17.98%2015.45L18.13%2017.59M12%2012L12%2022.2M12%2016L14.45%2017.65M12%2016L9.55%2017.65M12%2018.9L13.78%2020.1M12%2018.9L10.22%2020.1M12%2012L3.17%2017.1M8.54%2014L8.33%2016.94M8.54%2014L5.88%2012.71M6.02%2015.45L5.87%2017.59M6.02%2015.45L4.09%2014.51M12%2012L3.17%206.9M8.54%2010L5.88%2011.29M8.54%2010L8.33%207.06M6.02%208.55L4.09%209.49M6.02%208.55L5.87%206.41%22%20fill%3D%22none%22%20stroke%3D%22%23fff%22%20stroke-width%3D%221.3%22%20stroke-linecap%3D%22round%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%221.45%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E");
  --amb-wood-1: #8c6848;
  --amb-wood-2: #a2794f;
  --amb-wood-3: #6f5136;
  /* 降水强度（data-wx-level）派生的两个量：落得多快、显示多少。
     缺省取中雨/中雪档，保证没写 data-wx-level 时也不会只剩几滴。 */
  --spd: 1;                 /* 时长倍率：档位越高落得越快 */
  --dens: .68;              /* 可见粒子占比提示（给地面效果的浓淡用） */
}
/* 各配色的太阳：墨金＝暖金秋阳、青瓷＝青玉日、黛蓝＝冷白月、豆沙＝夕照、素描＝铅灰 */
:root[data-theme="celadon"] { --amb-o: .84; --amb-sun-warm: #cfe8d0; }
:root[data-theme="indigo"]  { --amb-sun-warm: #c3d6f0; }
:root[data-theme="rouge"]   { --amb-sun-warm: #f0b78c; }
:root[data-theme="sketch"]  { --amb-o: .64; --amb-sun-warm: #c9c2ad; }  /* 素描底色本就灰，场景稍淡一点 */
:root[data-theme="none"]    { --amb-o: .72; --amb-sun-warm: #cfcfd6; }  /* 无色调：太阳也去色 */

:root[data-mode="dark"] {
  --amb-o: .64;
  --amb-sun-warm: var(--brand-a);                     /* 深色下各主题的亮色 accent 当月亮用 */
  --amb-sun-core: color-mix(in srgb, transparent 8%, var(--brand-a));
  --amb-sun-mid: color-mix(in srgb, transparent 30%, var(--brand-a));
  --amb-sun-edge: color-mix(in srgb, transparent 60%, var(--brand-a));
  --amb-sun-halo: color-mix(in srgb, transparent 82%, var(--brand-a));
  --amb-cloud: color-mix(in srgb, var(--brand-a) 30%, transparent);
  --amb-cloud-sh: color-mix(in srgb, transparent 86%, var(--brand-b));
  --amb-bird: color-mix(in srgb, var(--brand-a) 62%, transparent);
  --amb-wood-1: #6b5238; --amb-wood-2: #7c5f42; --amb-wood-3: #523d2b;
}

/* ═══════════════ 落英（前景飘花）：花瓣色 ═══════════════
   固定樱花粉，与配色解耦 —— 不再由 --brand-a 派生，五套配色下都是同一片粉
   （墨金下原先飘香槟金、青瓷下飘浅青玉，已统一改成粉）。
   两档取值：浅色底上太淡看不见，用偏深一档的粉；深色底上要够亮，提亮一档。
   未手动切 data-mode 时跟随系统，所以系统深色那条媒体查询不能省。
   实际纹理由 js/petals.js 现场读这个值画出来（0 图片请求），换明暗即时生效。 */
:root {
  --petal: #e888a8;
}
:root[data-mode="dark"] {
  --petal: #f2a8c3;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-mode]) { --petal: #f2a8c3; }
}

/* 前景飘花画布：正文之上、吸顶栈与弹层之下。pointer-events:none 保证不吃点击；
   不写 display，交给 [hidden] 属性控制显隐（UA 样式表的 [hidden]{display:none} 才不会被顶掉）。
   窄屏不启动这件事由 js/petals.js 的 want() 判断（那里才是唯一开关）——
   只在 CSS 里藏起来会让 rAF 白白空转。 */
.petals-canvas {
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
}

/* ═══════════════ 四季款式（data-season 切换） ═══════════════
   春·细雨花瓣 / 夏·蜻蜓浓荫 / 秋·落叶雁阵 / 冬·飞雪素裹 / 落英·前景飘花。
   季节色统一与主题品牌色混合（约四成品牌色），所以五套配色换过去，
   四季仍各带各的微差；深浅模式由既有的 --amb-o 与 dark 规则统一压低。 */
:root:not([data-season]), :root[data-season="summer"] {   /* 夏＝原田园场景，也是无 JS 时的兜底 */
  --amb-sun-warm: #f3c948;
  --amb-grass-a: color-mix(in srgb, transparent 56%, color-mix(in srgb, var(--brand-a) 42%, #46a05a));
  --amb-grass-b: color-mix(in srgb, transparent 66%, color-mix(in srgb, var(--brand-b) 34%, #2a7a44));
  --amb-grass-c: color-mix(in srgb, transparent 76%, color-mix(in srgb, var(--brand-b) 28%, #1f6538));
  --amb-ground-a: color-mix(in srgb, transparent 62%, color-mix(in srgb, var(--brand-a) 38%, #3d8f52));
  --amb-ground-b: color-mix(in srgb, transparent 76%, color-mix(in srgb, var(--brand-b) 30%, #1d6437));
  --amb-dragon: color-mix(in srgb, var(--brand-b) 40%, #3f93a8);
}
:root[data-season="spring"] {                             /* 春：嫩绿新芽、细雨如丝、花瓣轻扬 */
  --amb-sun-warm: #efd98f;
  --amb-grass-a: color-mix(in srgb, transparent 54%, color-mix(in srgb, var(--brand-a) 38%, #7cc050));
  --amb-grass-b: color-mix(in srgb, transparent 64%, color-mix(in srgb, var(--brand-b) 30%, #4f9c3d));
  --amb-grass-c: color-mix(in srgb, transparent 74%, color-mix(in srgb, var(--brand-b) 24%, #3d8535));
  --amb-ground-a: color-mix(in srgb, transparent 60%, color-mix(in srgb, var(--brand-a) 34%, #6cb348));
  --amb-ground-b: color-mix(in srgb, transparent 74%, color-mix(in srgb, var(--brand-b) 26%, #428a3a));
  --amb-cloud: color-mix(in srgb, #ffffff 46%, var(--brand-a));
  --amb-rain: color-mix(in srgb, var(--brand-b) 40%, #8fc6dc);
  --amb-petal-a: #f9cfe0; --amb-petal-b: #e88bb0;
  --amb-cloth-a: color-mix(in srgb, transparent 10%, color-mix(in srgb, var(--brand-a) 36%, #8fcf6a));
  --amb-cloth-b: color-mix(in srgb, transparent 28%, color-mix(in srgb, var(--brand-b) 30%, #4f9c3d));
}
:root[data-season="autumn"] {                             /* 秋：金黄草场、落叶纷飞、雁阵南去 */
  --amb-sun-warm: #ef9440;
  --amb-grass-a: color-mix(in srgb, transparent 54%, color-mix(in srgb, var(--brand-a) 36%, #d9a63f));
  --amb-grass-b: color-mix(in srgb, transparent 64%, color-mix(in srgb, var(--brand-b) 30%, #b4731f));
  --amb-grass-c: color-mix(in srgb, transparent 74%, color-mix(in srgb, var(--brand-b) 24%, #8f5a16));
  --amb-ground-a: color-mix(in srgb, transparent 60%, color-mix(in srgb, var(--brand-a) 32%, #c8912f));
  --amb-ground-b: color-mix(in srgb, transparent 74%, color-mix(in srgb, var(--brand-b) 26%, #94581a));
  --amb-cloud: color-mix(in srgb, #ffffff 30%, color-mix(in srgb, var(--brand-a) 55%, #e8c48a));
  --amb-leaf-a: #e8b445; --amb-leaf-b: #b8551c; --amb-leaf-c: #d98b28;
  --amb-cloth-a: color-mix(in srgb, transparent 10%, color-mix(in srgb, var(--brand-a) 34%, #e0b053));
  --amb-cloth-b: color-mix(in srgb, transparent 28%, color-mix(in srgb, var(--brand-b) 28%, #a8661d));
}
:root[data-season="winter"] {                             /* 冬：素裹银装、飞雪缓落 */
  --amb-sun-warm: #c9dcee;
  --amb-grass-a: color-mix(in srgb, transparent 58%, color-mix(in srgb, var(--brand-a) 24%, #d3dfea));
  --amb-grass-b: color-mix(in srgb, transparent 68%, color-mix(in srgb, var(--brand-b) 20%, #a8b9c9));
  --amb-grass-c: color-mix(in srgb, transparent 78%, color-mix(in srgb, var(--brand-b) 16%, #8ea0b3));
  --amb-ground-a: color-mix(in srgb, transparent 54%, color-mix(in srgb, var(--brand-a) 18%, #eef4f9));
  --amb-ground-b: color-mix(in srgb, transparent 70%, color-mix(in srgb, var(--brand-b) 16%, #b9c8d6));
  --amb-cloud: color-mix(in srgb, #ffffff 58%, var(--brand-a));
  --amb-snow: color-mix(in srgb, #ffffff 30%, #7f9cbe);   /* 浅色底上纯白会隐形，掺一点冷调 */
  --amb-cloth-a: color-mix(in srgb, transparent 10%, color-mix(in srgb, var(--brand-a) 22%, #e6eef5));
  --amb-cloth-b: color-mix(in srgb, transparent 26%, color-mix(in srgb, var(--brand-b) 18%, #b3c3d2));
}
/* 深色模式下太阳/月亮统一回到品牌亮色（夜景不按季节变色）；雪花回到纯白并微微发光 */
:root[data-mode="dark"][data-season] { --amb-sun-warm: var(--brand-a); }
:root[data-mode="dark"] .ambient-snow i {
  background: #ffffff;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, .55));
}

/* 场景本体：负层，永远在正文与页头之下，只在页面空白处透出来 */
.ambient-scene {
  position: fixed; inset: 0; z-index: -1;
  overflow: hidden; pointer-events: none;
  opacity: var(--amb-o);
  contain: layout paint;            /* 把动画重绘圈定在自身内部 */
  transition: opacity .3s ease;
}
:root[data-ambient="off"] .ambient-scene { display: none; }

/* 云另起一层（和太阳同理），只留视口底部一条「天际带」，overflow 裁掉带外部分。
   原来是放在整屏的场景层里 —— 云会飘到正文卡片上，卡片是半透明白，
   浅米色的云透出来像个污点，窄屏（内容占满整宽）尤其明显。
   收到这一层后云永远贴着地平线，顶上再用 mask 渐隐，既保住「低云压地平线」的田园意境，
   又彻底不进内容区。层序：它排在 .ambient-scene 之前，草地 / 地面会盖住云的底部，
   观感上就是云在地平线之后。 */
.ambient-sky {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: var(--amb-sky-h);
  z-index: -1;
  overflow: hidden; pointer-events: none;
  opacity: var(--amb-o);
  contain: layout paint;            /* 把动画重绘圈定在自身内部 */
  transition: opacity .3s ease;
  -webkit-mask-image: linear-gradient(to top, #000 0 62%, transparent 100%);
          mask-image: linear-gradient(to top, #000 0 62%, transparent 100%);
}
:root[data-ambient="off"] .ambient-sky { display: none; }
/* 视口不够宽时，内容列会把两侧留白吃光，云就落到卡片上了 —— 卡片是半透明白，
   浅米色的云透出来像个污点。1400px 是按「最大那朵 + 左右漂移 ±24px + 贴边 14px」
   倒推出来的：内容列 1140px + 两侧各 130px 留白才够放。
   再窄就整层收掉：宁可少几朵云，也不让它进正文（手机 / 平板 / 小笔记本都是这一档）。 */
@media (max-width: 1400px) {
  .ambient-sky { display: none; }
}

/* 太阳：呼吸式起伏。单独成层（不在 .ambient-scene 里），
   宽屏时浮到页头之上 —— 否则会被半透明页头底纹糊住；
   窄屏内容区两侧没有留白，太阳退回装饰层之下，免得压住卡片文字。 */
.ambient-sun {
  position: fixed;
  /* 顶边必须让开吸顶栈：状态栏是整屏宽的 sticky 条（z-index 25，高于太阳的 22），
     原来写死 21vh —— 视口高 < 1080 时太阳上缘就钻到状态栏底下被切平
     （1536×864 实测切掉 45px ≈ 43%，看着只剩半个太阳）。
     取「欢迎条 + 状态栏下沿 + 22px」与 21vh 的较大者：高屏维持原来的比例位置，
     矮屏自动下移让开。只算这两条不算页头 —— 太阳本就该浮在页头之上（z-index 22 > 20）。
     JS 的 syncStickyVars() 会把「欢迎条 + 状态栏」的等效高度写进 --stack-h；
     窄屏（≤1100px）与矮窗（is-thin-head）下整块不吸附，记 0，自动退回 21vh。 */
  top: max(calc(var(--stack-h, 0px) + 22px), 21vh);
  right: max(6px, calc((100vw - 1180px) / 2 - 122px));
  width: 104px; height: 104px; border-radius: 50%;
  z-index: -1;
  opacity: var(--amb-o);
  pointer-events: none;
  background: radial-gradient(circle at 36% 34%,
    var(--amb-sun-core) 0 9%, var(--amb-sun-mid) 38%, var(--amb-sun-edge) 72%);
  box-shadow: 0 0 0 22px var(--amb-sun-halo), 0 0 82px 20px var(--amb-sun-halo);
  animation: ambient-sun-breathe 8s ease-in-out infinite;
  transition: opacity .3s ease;
}
:root[data-ambient="off"] .ambient-sun { display: none; }
@media (min-width: 1440px) {
  .ambient-sun { z-index: 22; }   /* 高于页头 20，低于状态栏 25 / 欢迎条 26 */
}

/* 云：三个 pill + 两个圆头堆出来。三朵都停在天际带里，bottom 用百分比随带高伸缩，
   左 / 左下 / 右错落；越靠带顶越吃 mask 的渐隐，自然化成「远处低云」。 */
.ambient-cloud {
  position: absolute; width: 104px; height: 23px; border-radius: 999px;
  background: var(--amb-cloud);
  box-shadow: 0 10px 28px -16px var(--amb-cloud-sh);
}
.ambient-cloud::before, .ambient-cloud::after {
  content: ""; position: absolute; bottom: 4px; border-radius: 50%;
  background: inherit;
}
.ambient-cloud::before { left: 20px; width: 38px; height: 38px; }
.ambient-cloud::after { right: 17px; width: 51px; height: 51px; }
.ambient-cloud-one {          /* 左：贴屏幕左缘，避开宽屏下的左侧悬浮菜单 */
  bottom: 58%; left: 14px;
  transform: scale(.86);
  animation: ambient-cloud-drift 16s ease-in-out -4s infinite alternate;
}
.ambient-cloud-two {          /* 左下：压得最低，下半被草地挡住，像贴着地平线的远云 */
  bottom: 40%; left: 22px;
  opacity: .74;
  transform: scale(.6);
  animation: ambient-cloud-drift 22s ease-in-out -10s infinite alternate-reverse;
}
.ambient-cloud-three {        /* 右：带子里最高的一朵，落在渐隐区，天然淡出去 */
  bottom: 76%; right: 22px;
  opacity: .82;
  transform: scale(.72);
  animation: ambient-cloud-drift 19s ease-in-out -7s infinite alternate;
}
/* 1520px 以上左侧悬浮菜单回归，它占住整条左侧留白，左边两朵云就从玻璃面板底下透出来
   （面板 88% 不透明压不干净，看得出两条淡米色印子）。
   一号云改到右侧、与三号云上下错开，二号云收起 —— 天际带只留右半边两朵。
   （这条必须写在云的定位之后：媒体查询不提升优先级，同权重还是按源序比。） */
@media (min-width: 1520px) {
  .ambient-cloud-one { left: auto; right: 30px; bottom: 58%; }
  .ambient-cloud-two { display: none; }
}

/* 飞鸟：一只领头、两只跟随，整体横掠视口 */
.ambient-birds {
  position: absolute; top: 33vh; left: -160px;
  width: 132px; height: 54px;
  color: var(--amb-bird);
  animation: ambient-birds-fly 28s linear -9s infinite;
}
.ambient-bird {
  position: absolute; width: 27px; height: 12px;
  animation: ambient-bird-bob 1.6s ease-in-out infinite alternate;
}
.ambient-bird::before, .ambient-bird::after {
  content: ""; position: absolute; top: 2px;
  width: 15px; height: 8px;
  border-top: 2.4px solid currentcolor; border-radius: 50%;
}
.ambient-bird::before { right: 50%; transform: rotate(12deg); }
.ambient-bird::after { left: 50%; transform: rotate(-12deg); }
.ambient-bird-one { top: 6px; left: 0; }
.ambient-bird-two { top: 26px; left: 50px; transform: scale(.8); animation-delay: -.6s; }
.ambient-bird-three { top: 10px; left: 96px; transform: scale(.64); animation-delay: -1.1s; }

/* 草地：两组斜向重复渐变叠出草叶，顶端用 mask 渐隐 */
.ambient-grass {
  position: absolute; left: -3%; bottom: 0; width: 106%; height: 94px;
  transform-origin: center bottom;
  background:
    repeating-linear-gradient(76deg, transparent 0 13px,
      var(--amb-grass-b) 14px 16px, transparent 17px 30px),
    repeating-linear-gradient(104deg, transparent 0 18px,
      var(--amb-grass-c) 19px 21px, transparent 22px 35px),
    linear-gradient(to top, var(--amb-grass-a), var(--amb-grass-c) 48%, transparent 76%);
  -webkit-mask-image: linear-gradient(to top, #000 0 56%, transparent 100%);
  mask-image: linear-gradient(to top, #000 0 56%, transparent 100%);
}
.ambient-grass-back {
  bottom: 11px; height: 80px; opacity: .62;
  animation: ambient-grass-sway 9s ease-in-out infinite;
}
.ambient-grass-front {
  animation: ambient-grass-sway 6.5s ease-in-out -2s infinite reverse;
}

/* 地面：视口底部的浅浅弧面 */
.ambient-ground {
  position: absolute; right: -5%; bottom: -22px; left: -5%; height: 56px;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(to bottom, var(--amb-ground-a), var(--amb-ground-b));
  filter: blur(1px);
}

/* 雨 · 地面的积水：一摊摊带高光的浅水洼，中心有扩散的涟漪；档位越高水洼越多越大。
   这是"落下的水"落到地上的落点 —— 雨滴本身在 .ambient-rain 里下到底部，水洼接住它。
   水色走「天空倒影」而不是深水：比湿地面更亮更冷，否则在绿草地上根本看不清。 */
.ambient-puddles {
  position: absolute; left: 0; right: 0; bottom: 2px; height: 62px;
  display: none;
}
:root:not([data-wxmode="manual"])[data-precip="rain"] .ambient-puddles { display: block; }
.ambient-puddles i {
  position: absolute;
  left: calc(var(--x) * 1.02% - 2%);
  bottom: var(--y);
  width: var(--w); height: var(--h);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 34% 24%,
      rgba(255, 255, 255, .92), rgba(255, 255, 255, 0) 58%),
    linear-gradient(to bottom,
      color-mix(in srgb, #eef6ff 72%, var(--amb-rain)),
      color-mix(in srgb, #9fbcd8 58%, #4f6a86));
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .85),
    0 1px 3px rgba(38, 58, 82, .3);
  opacity: .9;
}
/* 涟漪：一圈从水洼中心荡开的浅色细环 */
.ambient-puddles i::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 46%; height: 46%; margin: -23% 0 0 -23%;
  border-radius: 50%;
  border: 1.2px solid rgba(255, 255, 255, .9);
  animation: ambient-ripple 2.6s ease-out infinite;
  animation-delay: var(--d, 0s);
}
@keyframes ambient-ripple {
  0%   { transform: scale(.24); opacity: .95; }
  100% { transform: scale(1.85); opacity: 0; }
}
/* 档位：小雨只有零星几洼，大雨才满地积水 */
:root[data-wx-level="1"] .ambient-puddles { opacity: .62; }
:root[data-wx-level="2"] .ambient-puddles { opacity: .82; }
:root[data-wx-level="1"] .ambient-puddles i:nth-child(n+5) { display: none; }
:root[data-wx-level="2"] .ambient-puddles i:nth-child(n+8) { display: none; }
/* 春 · 细雨：虽然不算"真实降水"，但地上也是湿的，给前几洼浅水。
   真的下雨/下雪时这两条被 :not() 排除，交给上面的 [data-precip] 规则。 */
:root[data-season="spring"]:not([data-precip="rain"]):not([data-precip="snow"]) .ambient-puddles {
  display: block; opacity: .5;
}
:root[data-season="spring"]:not([data-precip="rain"]):not([data-precip="snow"]) .ambient-puddles i:nth-child(n+5) {
  display: none;
}

/* 雪 · 地面的积雪：一条边缘柔和的雪被，厚度随档位变（小雨小雪薄、大雨大雪厚）。
   雪被盖在地面弧与草根之上，所以它"落在草地上"而不是飘在天上。 */
.ambient-snowpack {
  position: absolute; left: -3%; right: -3%; bottom: 0; height: 22px;
  border-radius: 50% 50% 0 0 / 32px 32px 0 0;
  background: linear-gradient(to bottom, #ffffff, #e6f0fa 58%, #d3e2f1);
  filter: blur(.7px);
  transition: height .8s ease;
  display: none;
}
:root:not([data-wxmode="manual"])[data-precip="snow"] .ambient-snowpack { display: block; }
:root:not([data-wxmode="manual"])[data-wx-level="1"][data-precip="snow"] .ambient-snowpack { height: 12px; }
:root:not([data-wxmode="manual"])[data-wx-level="3"][data-precip="snow"] .ambient-snowpack { height: 40px; }

/* 稻草人：摆在内容区左侧的空白里（宽屏侧栏出现时贴屏幕最左） */
.ambient-scarecrow {
  position: absolute;
  left: max(6px, calc((100vw - 1180px) / 2 - 96px));
  bottom: 13px; width: 104px; height: 132px;
  opacity: .84; transform-origin: 52px 128px;
  animation: ambient-scarecrow-sway 5.5s ease-in-out infinite;
}
.scarecrow-pole {
  position: absolute; top: 42px; left: 50px; width: 4px; height: 90px;
  border-radius: 3px; background: var(--amb-wood-1);
}
.scarecrow-arm {
  position: absolute; top: 61px; left: 13px; width: 78px; height: 5px;
  border-radius: 5px; background: var(--amb-wood-2);
  transform: rotate(-4deg);
}
.scarecrow-arm::before, .scarecrow-arm::after {
  content: ""; position: absolute; top: -5px; width: 13px; height: 14px;
  border-top: 2px solid var(--amb-wood-2);
  border-bottom: 2px solid var(--amb-wood-2);
}
.scarecrow-arm::before { left: -7px; transform: rotate(-18deg); }
.scarecrow-arm::after { right: -7px; transform: rotate(18deg); }
.scarecrow-body {
  position: absolute; top: 54px; left: 32px; width: 40px; height: 53px;
  border-radius: 8px 8px 13px 13px;
  background: linear-gradient(145deg, var(--amb-cloth-a), var(--amb-cloth-b));
  clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%);
}
.scarecrow-head {
  position: absolute; top: 25px; left: 38px; width: 29px; height: 31px;
  border-radius: 46% 54% 50% 48%;
  background: #d7aa70;
  box-shadow: inset -4px -3px 0 rgba(117, 79, 43, .08);
}
.scarecrow-head::before {
  content: ""; position: absolute; top: 12px; left: 7px;
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(75, 55, 39, .72);
  box-shadow: 12px 1px 0 rgba(75, 55, 39, .72);
}
.scarecrow-head::after {
  content: ""; position: absolute; left: 9px; bottom: 7px;
  width: 11px; height: 4px; border-radius: 50%;
  border-bottom: 1.5px solid rgba(75, 55, 39, .55);
}
.scarecrow-hat {
  position: absolute; top: 20px; left: 27px; width: 52px; height: 7px;
  border-radius: 50%; background: var(--amb-wood-3);
  transform: rotate(-5deg);
}
.scarecrow-hat::before {
  content: ""; position: absolute; left: 13px; bottom: 3px;
  width: 28px; height: 19px; border-radius: 5px 5px 2px 2px;
  background: linear-gradient(145deg, var(--amb-wood-2), var(--amb-wood-3));
  clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%);
}

/* 风车：三叶片绕轴匀速旋转，摆在内容区右侧空白 */
.ambient-windmill {
  position: absolute;
  right: max(6px, calc((100vw - 1180px) / 2 - 104px));
  bottom: -9px; width: 96px; height: 146px; opacity: .9;
}
.ambient-windmill > * { position: absolute; box-sizing: border-box; }
.windmill-stick {
  left: 50%; top: 42px; width: 20px; height: 102px; margin-left: -10px; z-index: 0;
  background: linear-gradient(90deg, #d2dbd5 0%, #fdfefd 42%, #ffffff 55%, #c8d3cc 100%);
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
  box-shadow: 3px 0 6px -4px rgba(60, 84, 75, .25);
}
.windmill-nacelle {
  top: 40px; left: 50%; width: 17px; height: 9px; margin-left: -8.5px; z-index: 1;
  border-radius: 60% 45% 45% 60% / 50%;
  background: linear-gradient(180deg, #ffffff, #dbe4de);
  border: 1px solid rgba(150, 168, 159, .55);
  box-shadow: 0 1px 3px rgba(60, 84, 75, .2);
}
.windmill-head {
  top: -2px; left: 50%; width: 92px; height: 92px; margin-left: -46px; z-index: 2;
  transform-origin: 50% 50%; will-change: transform;
  animation: windmill-spin 7s linear infinite;
}
.windmill-blade {
  position: absolute;   /* 漏了这句：<i> 是行内元素，不定位则 width/height 失效，扇叶画不出来 */
  left: 50%; top: 2px; width: 9px; height: 44px; margin-left: -4.5px;
  border-radius: 50% 50% 45% 45% / 78% 78% 18% 18%;
  /* 两端 + 描边都加深：原先近乎纯白，铺在浅色背景上根本看不见扇叶 */
  background: linear-gradient(90deg, #7d968b 0%, #c6d5cd 34%, #eef4f1 58%, #6d887c 100%);
  transform-origin: 50% 100%;
  box-shadow: inset -1px 0 1px rgba(44, 68, 57, .62), inset 0 0 0 1px rgba(88, 112, 101, .3), 0 0 3px rgba(255, 255, 255, .8);
}
.blade-a { transform: rotate(0deg); }
.blade-b { transform: rotate(120deg); }
.blade-c { transform: rotate(240deg); }
.windmill-hub {
  position: absolute;   /* 同上：轴心也漏了定位 */
  top: 50%; left: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #d4ddd7 75%);
  border: 1.5px solid #aebbb3;
  box-shadow: 0 1px 2px rgba(60, 84, 75, .28);
}
.windmill-grass {
  left: 50%; bottom: 4px; z-index: 1;
  width: 30px; height: 11px; margin-left: -15px;
}
.windmill-grass i {
  position: absolute; bottom: 0; left: 50%;
  width: 4px; height: 8px;
  border-radius: 70% 70% 0 0 / 100% 100% 0 0;
  background: linear-gradient(to top, var(--amb-grass-b), var(--amb-grass-a));
  transform-origin: 50% 100%;
}
.windmill-grass i:nth-child(1) { margin-left: -9px; transform: rotate(-15deg); }
.windmill-grass i:nth-child(2) { margin-left: -2px; height: 11px; }
.windmill-grass i:nth-child(3) { margin-left: 5px; height: 7px; transform: rotate(14deg); }

@keyframes windmill-spin { to { transform: rotate(360deg); } }
@keyframes ambient-sun-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-4px) scale(1.04); }
}
@keyframes ambient-grass-sway {
  0%, 100% { transform: skewX(-.7deg) translateX(0); }
  50%      { transform: skewX(.9deg) translateX(3px); }
}
@keyframes ambient-cloud-drift {
  0%   { translate: -16px 0; }
  100% { translate: 24px 4px; }
}
@keyframes ambient-birds-fly {
  0%   { transform: translateX(0) translateY(8px); }
  45%  { transform: translateX(calc(50vw + 120px)) translateY(-9px); }
  100% { transform: translateX(calc(100vw + 260px)) translateY(4px); }
}
@keyframes ambient-bird-bob {
  0%   { translate: 0 0; }
  100% { translate: 0 3px; }
}
@keyframes ambient-scarecrow-sway {
  0%, 100% { transform: rotate(-1.5deg); }
  50%      { transform: rotate(1.8deg); }
}

/* ═══════════ 四季专属元素（常驻 DOM，按 data-season 显隐） ═══════════
   全部是 <i> 造的小粒子，用独立 translate/rotate 做位移，
   transform 留给 scale，两者互不覆盖；0 图片、0 请求。 */
.ambient-rain, .ambient-drizzle, .ambient-petals, .ambient-dragonflies, .ambient-leaves,
.ambient-snow, .ambient-lightning { display: none; }
:root:not([data-season]) .ambient-dragonflies,
:root[data-season="summer"] .ambient-dragonflies,
:root[data-season="spring"] .ambient-drizzle,
:root[data-season="spring"] .ambient-petals,
:root[data-season="autumn"] .ambient-leaves,
:root[data-season="winter"] .ambient-snow { display: block; }

/* ── 天气联动（「跟随天气」为开＝未标 manual 时生效）：降水类型改由实时温度决定 ——
     0 ℃ 及以下落雪、0 ℃ 以上落雨；夏季遇降水再加雷电。优先级高于季节默认。 ── */
:root:not([data-wxmode="manual"])[data-precip="snow"] .ambient-snow,
:root:not([data-wxmode="manual"])[data-precip="rain"] .ambient-rain,
:root[data-thunder="on"] .ambient-lightning { display: block; }
/* 只有「真实正在下」的那一种降水会顶掉另一种；此刻无降水（data-precip="none"）
   不回退、也不抹掉季节默认降水 —— 否则冬季的「听雪」在下雪天之外会一片雪都没有。
   rain 本身只在 [data-precip="rain"] 下才显示，所以 none 无需再补一条隐藏。 */
:root:not([data-wxmode="manual"])[data-precip="snow"] .ambient-rain,
:root:not([data-wxmode="manual"])[data-precip="rain"] .ambient-snow,
:root:not([data-wxmode="manual"])[data-precip="rain"] .ambient-drizzle,
:root:not([data-wxmode="manual"])[data-precip="snow"] .ambient-drizzle { display: none; }

/* ── 降水强度分级：小雨/小雪、中雨/中雪、大雨/大雪 ──
   粒子是按「上限」生成的（雨 48 / 雪 42），档位只决定显示到第几个：
   nth-child(n+K) 砍掉尾号。位置是黄金比低差异序列，所以砍完依然均匀撒满整幅。
   顺带把「落多快」和「多明显」也交给档位 —— 大雨又密又快，小雨稀疏飘忽。
   窄屏另有固定上限（见文件末尾的 @media），所以这套分级只在 ≥961px 生效，避免特异度打架。 */
:root[data-wx-level="1"] { --spd: 1.28; --dens: .34; }
:root[data-wx-level="2"] { --spd: 1;    --dens: .68; }
:root[data-wx-level="3"] { --spd: .78;  --dens: 1;   }
@media (min-width: 961px) {
  /* 1/3 档（小雨/小雪）：雨 64→21、雪 54→18 */
  :root[data-wx-level="1"] .ambient-rain i:nth-child(n+22),
  :root[data-wx-level="1"] .ambient-snow i:nth-child(n+19) { display: none; }
  /* 2/3 档（中雨/中雪）：雨 64→42、雪 54→36 */
  :root[data-wx-level="2"] .ambient-rain i:nth-child(n+43),
  :root[data-wx-level="2"] .ambient-snow i:nth-child(n+37) { display: none; }
}
/* 档位越高，雨越实、雪越亮 */
:root[data-wx-level="1"][data-precip="rain"] .ambient-rain { opacity: .52; }
:root[data-wx-level="2"][data-precip="rain"] .ambient-rain { opacity: .74; }
:root[data-wx-level="3"][data-precip="rain"] .ambient-rain { opacity: .92; }
:root[data-wx-level="1"][data-precip="snow"] .ambient-snow { opacity: .72; }
:root[data-wx-level="2"][data-precip="snow"] .ambient-snow { opacity: .88; }
:root[data-wx-level="3"][data-precip="snow"] .ambient-snow { opacity: 1; }

/* 雷电：整屏柔光闪烁 + 一道劈落的闪电。
   位置要落在「欢迎条 + 状态栏 + 页头」三条吸顶带之下、内容区右侧留白里，
   否则会被那三条不透明底完全盖住。窄屏没有侧边留白，直接不画。 */
.ambient-lightning { position: absolute; inset: 0; pointer-events: none; }
.ambient-lightning::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 48% at 82% 30%,
    rgba(255, 255, 255, .92), rgba(255, 252, 226, .34) 46%, transparent 72%);
  opacity: 0;
  animation: ambient-flash 9s linear infinite;
}
.ambient-lightning::after {
  content: ""; position: absolute; top: 37vh; left: 84%;
  width: 27px; height: 92px;
  background: linear-gradient(180deg, #fffdf2 0%, #ffe680 52%, #ffd54a 100%);
  clip-path: polygon(56% 0, 100% 0, 63% 40%, 92% 40%, 26% 100%, 44% 55%, 12% 55%);
  filter: drop-shadow(0 0 12px rgba(255, 226, 120, .95));
  opacity: 0;
  animation: ambient-bolt 9s linear infinite;
}
@media (max-width: 1440px) {
  .ambient-lightning::after { display: none; }
}
@keyframes ambient-flash {
  0%, 72.5%, 100% { opacity: 0; }
  73%   { opacity: .95; }
  74.2% { opacity: .12; }
  75.4% { opacity: .8; }
  77%   { opacity: .06; }
  79%   { opacity: .5; }
  81%   { opacity: 0; }
}
@keyframes ambient-bolt {
  0%, 72.5%, 100% { opacity: 0; transform: scaleY(.6); }
  73%   { opacity: 1; transform: scaleY(1); }
  74.2% { opacity: .2; }
  75.4% { opacity: 1; }
  77%   { opacity: .1; }
  79%   { opacity: .85; }
  80.5% { opacity: 0; transform: scaleY(1.04); }
}

/* 降水 · 真实雨滴：细长带锥度的水滴（上端透明、下端实色），快速近垂直落下。
   天气联动下雨时任何季节都可能出现，所以单独成型，不再是春天专属的斜纹。
   位置由 --x、相位/时长由 --d 给出（两个互不相关的低差异序列），
   所以「按强度隐藏尾号粒子」不会让雨只落在左半边，也不会连成一条斜带。 */
.ambient-rain { position: absolute; inset: 0; opacity: .72; }
.ambient-rain i {
  position: absolute; top: -16vh; width: 2.2px; height: 30px;
  border-radius: 999px;
  left: calc(var(--x) * 1.02% - 2%);
  background: linear-gradient(to bottom,
    transparent 0, color-mix(in srgb, var(--amb-rain) 40%, transparent) 30%,
    var(--amb-rain) 100%);
  animation: ambient-rain-fall calc((.62s + var(--d) * .004s) * var(--spd, 1)) linear infinite;
  animation-delay: calc(var(--d) * -.014s);
}
.ambient-rain i:nth-child(3n)   { height: 39px; width: 2.6px; opacity: .82; }
.ambient-rain i:nth-child(4n+1) { height: 22px; opacity: .55; }
.ambient-rain i:nth-child(5n)   { height: 33px; opacity: .72; }
@keyframes ambient-rain-fall {
  0%   { translate: 0 -16vh; }
  100% { translate: -15px 118vh; }
}

/* 春 · 蒙蒙细雨：更细、更密、更轻、更缓 —— 像雾一样的斜丝，落得慢、几乎无声 */
.ambient-drizzle { position: absolute; inset: 0; opacity: .46; }
.ambient-drizzle::before {           /* 一点雨雾，让春雨"蒙蒙"而不是零星几根线 */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--amb-rain) 18%, transparent), transparent 62%);
}
.ambient-drizzle i {
  position: absolute; top: -12vh; width: 1.3px; height: 17px;
  border-radius: 999px;
  left: calc(var(--i) * 2.3% - 2%);
  background: linear-gradient(to bottom,
    transparent 0, color-mix(in srgb, var(--amb-rain) 62%, transparent) 34%,
    var(--amb-rain) 100%);
  animation: ambient-drizzle-fall calc(1.55s + var(--i) * .035s) linear infinite;
  animation-delay: calc(var(--i) * -.08s);
}
.ambient-drizzle i:nth-child(4n)   { height: 11px; opacity: .6; }
.ambient-drizzle i:nth-child(3n+1) { height: 22px; }
@keyframes ambient-drizzle-fall {
  0%   { translate: 0 -12vh; }
  100% { translate: -10px 118vh; }
}

/* 春 · 花瓣：位置 / 时长 / 相位全由内联 --i 推导 —— 加片数只改 build.py，CSS 不动 */
.ambient-petals { position: absolute; inset: 0; z-index: 2; }
.ambient-petals i {
  position: absolute; top: -8vh; width: 10px; height: 8px;
  left: calc(var(--i) * 9.6% - 4%);
  border-radius: 62% 38% 55% 45% / 58% 62% 38% 42%;
  background: linear-gradient(135deg, var(--amb-petal-a), var(--amb-petal-b));
  opacity: .85;
  animation: ambient-petal-fall calc(10s + var(--i) * .8s) linear infinite;
  animation-delay: calc(var(--i) * -1.9s);
}
.ambient-petals i:nth-child(3n)   { transform: scale(.76); }
.ambient-petals i:nth-child(3n+1) { transform: scale(1.1); }
@keyframes ambient-petal-fall {
  0%   { translate: 0 -10vh;   rotate: 0deg; }
  50%  { translate: 30px 46vh; rotate: 190deg; }
  100% { translate: -18px 112vh; rotate: 360deg; }
}

/* 夏 · 蜻蜓：整体横掠视口，翅膀高频扇动 */
.ambient-dragonflies {
  position: absolute; top: 41vh; left: -130px;
  width: 140px; height: 54px;
  color: var(--amb-dragon);
  animation: ambient-birds-fly 46s linear -14s infinite;
}
.ambient-dragonflies i {
  position: absolute; width: 36px; height: 4px; border-radius: 999px;
  background: currentcolor;
  animation: ambient-bird-bob 1.3s ease-in-out infinite alternate;
}
.ambient-dragonflies i::before, .ambient-dragonflies i::after {
  content: ""; position: absolute; top: -6px; left: 5px;
  width: 16px; height: 11px; border-radius: 46% 54% 40% 60%;
  background: color-mix(in srgb, currentcolor 42%, transparent);
  transform-origin: 10% 100%;
  animation: ambient-wing .24s ease-in-out infinite alternate;
}
.ambient-dragonflies i::after { left: 16px; animation-delay: -.09s; }
.ambient-dragonflies i:nth-child(1) { top: 8px;  left: 4px; }
.ambient-dragonflies i:nth-child(2) { top: 30px; left: 60px; scale: .8;  animation-delay: -.55s; }
.ambient-dragonflies i:nth-child(3) { top: 20px; left: 100px; scale: .66; animation-delay: -1.05s; }
@keyframes ambient-wing {
  from { transform: scaleY(.3) rotate(-8deg); }
  to   { transform: scaleY(1)  rotate(6deg); }
}

/* 秋 · 落叶 */
.ambient-leaves { position: absolute; inset: 0; z-index: 2; }
.ambient-leaves i {
  position: absolute; top: -8vh; width: 13px; height: 10px;
  left: calc(var(--i) * 6.2% - 4%);
  border-radius: 62% 12% 62% 14%;
  background: linear-gradient(135deg, var(--amb-leaf-a), var(--amb-leaf-b));
  opacity: .9;
  animation: ambient-leaf-fall calc(11s + var(--i) * .55s) linear infinite;
  animation-delay: calc(var(--i) * -2.3s);
}
.ambient-leaves i:nth-child(even) { background: linear-gradient(135deg, var(--amb-leaf-c), var(--amb-leaf-b)); }
.ambient-leaves i:nth-child(3n)   { transform: scale(.78); }
@keyframes ambient-leaf-fall {
  0%   { translate: 0 -10vh;    rotate: -40deg; }
  35%  { translate: 38px 34vh;  rotate: 150deg; }
  70%  { translate: -26px 72vh; rotate: 300deg; }
  100% { translate: 20px 112vh; rotate: 430deg; }
}

/* 冬 · 飞雪：真实六角雪花形状（mask 上色），缓落并轻微自转 */
.ambient-snow { position: absolute; inset: 0; z-index: 2; }
.ambient-snow i {
  position: absolute; top: -8vh; width: 16px; height: 16px;
  left: calc(var(--x) * 1.02% - 2%);
  background: var(--amb-snow); opacity: .92;
  -webkit-mask: var(--snowflake) center / contain no-repeat;
  mask: var(--snowflake) center / contain no-repeat;
  /* 浅色底上雪花会隐形：一圈冷色描边（drop-shadow 跟随 mask 轮廓），把雪片"托"出来 */
  filter: drop-shadow(0 0 1px rgba(72, 104, 146, .9))
          drop-shadow(0 1px 2px rgba(110, 142, 180, .45));
  animation: ambient-snow-fall calc((11s + var(--d) * .06s) * var(--spd, 1)) ease-in-out infinite;
  animation-delay: calc(var(--d) * -.18s);
}
.ambient-snow i:nth-child(3n)   { width: 11px; height: 11px; opacity: .7; }
.ambient-snow i:nth-child(4n+1) { width: 21px; height: 21px; opacity: 1; }
.ambient-snow i:nth-child(5n+2) { width: 14px; height: 14px; opacity: .85; }
@keyframes ambient-snow-fall {
  0%   { translate: 0 -10vh;   rotate: 0deg; }
  50%  { translate: 30px 50vh; rotate: 155deg; }
  100% { translate: -22px 114vh; rotate: 340deg; }
}

/* 夏·浓荫 / 秋·雁阵 / 冬·银装：季节对既有骨架的额外修饰 */
:root[data-season="summer"] .ambient-grass { filter: saturate(1.12); }
:root[data-season="autumn"] .ambient-bird-one   { top: 0;    left: 44px; transform: scale(1.05); }
:root[data-season="autumn"] .ambient-bird-two   { top: 22px; left: 74px; transform: scale(.84); }
:root[data-season="autumn"] .ambient-bird-three { top: 22px; left: 14px; transform: scale(.84); }
:root[data-season="winter"] .ambient-grass { filter: saturate(.28) brightness(1.07); }
:root[data-season="winter"] .ambient-ground {
  background: linear-gradient(to bottom, #fbfdff, #cddced); filter: blur(1.6px);
}
:root[data-season="winter"] .scarecrow-hat,
:root[data-season="winter"] .scarecrow-hat::before {
  background: linear-gradient(145deg, #fbfdff, #c9d6e2);
}

/* 降水对地面的修饰（与季节无关，任何季节真实下雨/下雪都会生效，优先级高于季节修饰）：
   雨 → 草叶压暗提饱和（湿）、地面转湿；雪 → 草叶褪色发白（覆霜）、地面转雪色 */
:root:not([data-wxmode="manual"])[data-precip="rain"] .ambient-grass {
  filter: saturate(1.35) brightness(.9);
}
:root:not([data-wxmode="manual"])[data-precip="rain"] .ambient-ground {
  /* 湿地面：整体压暗提饱和，上缘抹一道天光反光 —— 湿的地会泛亮 */
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, .36), rgba(255, 255, 255, 0) 46%),
    linear-gradient(to bottom, var(--amb-ground-a), var(--amb-ground-b));
  filter: blur(1px) saturate(1.25) brightness(.78);
}
:root:not([data-wxmode="manual"])[data-precip="snow"] .ambient-grass {
  filter: saturate(.42) brightness(1.08);
}
:root:not([data-wxmode="manual"])[data-precip="snow"] .ambient-ground {
  background: linear-gradient(to bottom, #fbfdff, #cddced);
  filter: blur(1.6px);
}

/* 性能：常驻无限动画统一提到合成层，避免每帧重新光栅化 */
.ambient-sun, .ambient-grass, .ambient-scarecrow {
  will-change: transform;
}
.ambient-cloud { will-change: translate; }   /* 云用 translate 飘，scale 留在 transform 上 */
/* 标签页切到后台时暂停全部装饰动画（site.js 用 visibilitychange 切换） */
:root.app-idle .ambient-scene *,
:root.app-idle .ambient-sky *,
:root.app-idle .ambient-sun { animation-play-state: paused !important; }

/* 窄屏：稻草人与风车不再整个收起，改成「小一号 + 贴边 + 站在页脚外的草地上」。
   为什么不直接放在页脚后面：页脚是 48% 白玻璃 + blur(8px)，草地那种大片饱和绿还能透出来，
   稻草人这点浅色细笔画会被糊成一团，等于看不见（宽屏靠的是内容区两侧的空白，手机没有）。
   所以窄屏改成在页脚之后补一条 104px 的留白 —— 滚到页底时，这一条正是固定草地层所在的位置，
   稻草人 / 风车完整落在草地上，没有玻璃挡着，和宽屏是同一幅景。
   缩放必须写进 keyframes：稻草人的 transform 被摇摆动画占着，写进基础规则会被动画覆盖
   （reduced-motion 关掉动画时，再退回基础规则里的静态 scale）。 */
@media (max-width: 960px) {
  .ambient-scarecrow { left: 4px; bottom: 6px; opacity: .84; transform: scale(.7); }
  .ambient-windmill {
    right: 2px; bottom: -6px; opacity: .9;
    transform: scale(.72); transform-origin: 100% 100%;
  }
  @keyframes ambient-scarecrow-sway {
    0%, 100% { transform: scale(.7) rotate(-1.5deg); }
    50%      { transform: scale(.7) rotate(1.8deg); }
  }
  /* 页脚之后补一条等高留白：滚到页底时，这一条正好落在固定草地层上，且没有玻璃盖着。
     用 body::after 而不是给页脚加 margin-bottom —— 后者会和 body 的底边做外边距合并，
     文档高度不一定跟着长，实测只多出 68px，位置不可控。 */
  body::after { content: ""; display: block; height: 104px; }
  /* 手机少画几片：雪 / 落叶 / 花瓣 / 雨 / 水洼各留一半以内。
     这里是「固定上限」，与 ≥961px 的强度分级互不打扰 —— 强度分级整段包在 min-width 里，
     所以手机上不会出现「大雨 48 滴全下」的重负载。 */
  .ambient-snow i:nth-child(n+15),
  .ambient-leaves i:nth-child(n+9),
  .ambient-petals i:nth-child(n+6),
  .ambient-rain i:nth-child(n+17),
  .ambient-drizzle i:nth-child(n+18),
  .ambient-puddles i:nth-child(n+6) { display: none; }
}
/* 横屏手机（视口很矮）不铺这条草地：104px 要吃掉近三成屏高，
   宁可退回「装饰层被玻璃盖住」的默认状态，也不占正文的地方。 */
@media (max-width: 960px) and (max-height: 520px) {
  body::after { height: 0; }
}
@media (max-width: 620px) {
  .ambient-birds { display: none; }
  .ambient-sun { width: 62px; height: 62px; top: 34vh; right: 8vw; }
  /* 手机：草地 / 地面按窄屏整体收一档，并用 clamp 跟着屏宽走 —— 小屏（320）到
     大屏手机（430）之间自然缩放，不会在短视口底部压出厚厚一条盖住内容。
     桌面那套 94 / 80 / 56px 原样保留（本段只在 ≤620px 生效，桌面不受影响）。 */
  .ambient-grass { height: clamp(60px, 19vw, 74px); }
  .ambient-grass-back { height: clamp(50px, 16vw, 62px); bottom: 9px; }
  .ambient-ground { height: clamp(38px, 12vw, 46px); bottom: -18px; }
}
/* 宽屏出现左侧悬浮菜单时，稻草人让位贴屏幕最左（断点与 .cat-nav 的 1520 保持一致） */
@media (min-width: 1520px) {
  .ambient-scarecrow { left: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-scene *, .ambient-sky *, .ambient-sun { animation: none !important; }
}
@media print {
  .ambient-scene, .ambient-sky, .ambient-sun { display: none; }
}

/* ═══════════════ 素描纹理底稿（fixed 装饰层，不参与交互） ═══════════════ */
:root {
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cg fill='none' stroke='rgba(64,58,40,0.055)' stroke-width='1'%3E%3Cpath d='M-24 48 L72 -48 M-24 128 L152 -48 M8 180 L180 8 M68 180 L180 68 M128 180 L180 128'/%3E%3C/g%3E%3Cg fill='rgba(64,58,40,0.05)'%3E%3Ccircle cx='34' cy='132' r='1.3'/%3E%3Ccircle cx='142' cy='74' r='1.3'/%3E%3Ccircle cx='92' cy='20' r='1'/%3E%3Ccircle cx='160' cy='158' r='1'/%3E%3C/g%3E%3C/svg%3E");
}
:root[data-mode="dark"] {
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='1'%3E%3Cpath d='M-24 48 L72 -48 M-24 128 L152 -48 M8 180 L180 8 M68 180 L180 68 M128 180 L180 128'/%3E%3C/g%3E%3Cg fill='rgba(255,255,255,0.035)'%3E%3Ccircle cx='34' cy='132' r='1.3'/%3E%3Ccircle cx='142' cy='74' r='1.3'/%3E%3Ccircle cx='92' cy='20' r='1'/%3E%3Ccircle cx='160' cy='158' r='1'/%3E%3C/g%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-mode]):not([data-theme]) {
    --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='1'%3E%3Cpath d='M-24 48 L72 -48 M-24 128 L152 -48 M8 180 L180 8 M68 180 L180 68 M128 180 L180 128'/%3E%3C/g%3E%3Cg fill='rgba(255,255,255,0.035)'%3E%3Ccircle cx='34' cy='132' r='1.3'/%3E%3Ccircle cx='142' cy='74' r='1.3'/%3E%3Ccircle cx='92' cy='20' r='1'/%3E%3Ccircle cx='160' cy='158' r='1'/%3E%3C/g%3E%3C/svg%3E");
  }
}

/* ═══════════════ 全局图案：每套配色一种淡雅纹理（换配色即换图案） ═══════════════
   墨金=斜向排线 / 青瓷=冰裂细网格 / 黛蓝=细点阵 / 豆沙=菱格锦纹 / 素描=交叉铅笔排线
   图案随 data-theme 与 data-mode 自动切换，铺设于 body、状态栏、页头与悬浮菜单。 */
:root { --pattern-size: 180px 180px; }

/* 青瓷 · 冰裂细网格 */
:root[data-theme="celadon"] {
  --pattern-size: 26px 26px;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Cg fill='none' stroke='rgba(34,78,64,0.07)' stroke-width='1'%3E%3Cpath d='M0 0H26M0 0V26'/%3E%3C/g%3E%3Cg fill='rgba(34,78,64,0.055)'%3E%3Ccircle cx='13' cy='13' r='1.1'/%3E%3C/g%3E%3C/svg%3E");
}

/* 黛蓝 · 错位细点阵 */
:root[data-theme="indigo"] {
  --pattern-size: 20px 20px;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cg fill='rgba(36,60,96,0.075)'%3E%3Ccircle cx='4' cy='4' r='1.2'/%3E%3Ccircle cx='14' cy='14' r='1.2'/%3E%3C/g%3E%3C/svg%3E");
}

/* 豆沙 · 菱格锦纹 */
:root[data-theme="rouge"] {
  --pattern-size: 28px 28px;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cg fill='none' stroke='rgba(104,52,46,0.06)' stroke-width='1'%3E%3Cpath d='M14 0L28 14L14 28L0 14Z'/%3E%3C/g%3E%3C/svg%3E");
}

/* 素描 · 交叉铅笔排线 + 纸感噪点 */
:root[data-theme="sketch"] {
  --pattern-size: 170px 170px;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='170' height='170'%3E%3Cg fill='none' stroke='rgba(74,68,52,0.085)' stroke-width='1'%3E%3Cpath d='M-20 30L50 -40M-20 90L120 -40M-20 150L170 -20M20 190L170 40M80 190L170 100M140 190L170 160'/%3E%3C/g%3E%3Cg fill='none' stroke='rgba(74,68,52,0.055)' stroke-width='1'%3E%3Cpath d='M-20 140L120 0M-20 80L60 0M30 170L170 30M90 170L170 90M150 170L170 150'/%3E%3C/g%3E%3Cg fill='rgba(74,68,52,0.07)'%3E%3Ccircle cx='40' cy='40' r='1.2'/%3E%3Ccircle cx='120' cy='110' r='1.2'/%3E%3Ccircle cx='20' cy='112' r='1'/%3E%3Ccircle cx='138' cy='30' r='1'/%3E%3C/g%3E%3C/svg%3E");
}

/* 深色模式：形状不变，描边换成浅色并保留各配色色相 */
:root[data-theme="ink-gold"][data-mode="dark"] {
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cg fill='none' stroke='rgba(232,200,138,0.05)' stroke-width='1'%3E%3Cpath d='M-24 48L72 -48M-24 128L152 -48M8 180L180 8M68 180L180 68M128 180L180 128'/%3E%3C/g%3E%3Cg fill='rgba(232,200,138,0.045)'%3E%3Ccircle cx='34' cy='132' r='1.3'/%3E%3Ccircle cx='142' cy='74' r='1.3'/%3E%3Ccircle cx='92' cy='20' r='1'/%3E%3Ccircle cx='160' cy='158' r='1'/%3E%3C/g%3E%3C/svg%3E");
}
:root[data-theme="celadon"][data-mode="dark"] {
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Cg fill='none' stroke='rgba(143,208,187,0.07)' stroke-width='1'%3E%3Cpath d='M0 0H26M0 0V26'/%3E%3C/g%3E%3Cg fill='rgba(143,208,187,0.055)'%3E%3Ccircle cx='13' cy='13' r='1.1'/%3E%3C/g%3E%3C/svg%3E");
}
:root[data-theme="indigo"][data-mode="dark"] {
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cg fill='rgba(156,195,240,0.08)'%3E%3Ccircle cx='4' cy='4' r='1.2'/%3E%3Ccircle cx='14' cy='14' r='1.2'/%3E%3C/g%3E%3C/svg%3E");
}
:root[data-theme="rouge"][data-mode="dark"] {
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cg fill='none' stroke='rgba(232,168,161,0.07)' stroke-width='1'%3E%3Cpath d='M14 0L28 14L14 28L0 14Z'/%3E%3C/g%3E%3C/svg%3E");
}
:root[data-theme="sketch"][data-mode="dark"] {
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='170' height='170'%3E%3Cg fill='none' stroke='rgba(205,199,182,0.075)' stroke-width='1'%3E%3Cpath d='M-20 30L50 -40M-20 90L120 -40M-20 150L170 -20M20 190L170 40M80 190L170 100M140 190L170 160'/%3E%3C/g%3E%3Cg fill='none' stroke='rgba(205,199,182,0.05)' stroke-width='1'%3E%3Cpath d='M-20 140L120 0M-20 80L60 0M30 170L170 30M90 170L170 90M150 170L170 150'/%3E%3C/g%3E%3Cg fill='rgba(205,199,182,0.06)'%3E%3Ccircle cx='40' cy='40' r='1.2'/%3E%3Ccircle cx='120' cy='110' r='1.2'/%3E%3Ccircle cx='20' cy='112' r='1'/%3E%3Ccircle cx='138' cy='30' r='1'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--sticky-h, 0px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 素描纹理层：整站极淡的斜线排线 + 纸感噪点 */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none;
  background-image: var(--pattern);
  background-size: var(--pattern-size);
  opacity: var(--pattern-o, .75);
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

/* ── 焦点样式：只在键盘操作时出现，且对比度足够 ── */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

/* ── 跳转到主内容（键盘用户第一个可聚焦元素） ── */
.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--focus);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 8px; }

/* 统一图标尺寸 */
.ic { width: 20px; height: 20px; fill: currentColor; flex: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* hidden 属性在任何 display 值下都生效（口令表单解锁后要靠它收起） */
[hidden] { display: none !important; }

/* ── 顶部装饰欢迎条：最外层，随主题换色；右侧放主题配色 + 明暗切换 ── */
.welcomebar {
  position: sticky; top: 0; z-index: 26;    /* 欢迎条也吸附顶部，状态栏贴在它下沿 */
  padding: 11px 20px 12px;
  color: var(--ink);
  background-color: var(--accent-soft);
  background-image:
    linear-gradient(90deg,
      color-mix(in srgb, var(--brand-a) 34%, transparent),
      transparent 26%, transparent 74%,
      color-mix(in srgb, var(--brand-b) 34%, transparent)),
    var(--pattern);
  background-size: auto, var(--pattern-size);
  border-bottom: 1px solid var(--line);
}
/* 顶部一道主题渐变装饰线 */
.welcomebar::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg,
    var(--brand-a), var(--brand-b), var(--brand-a));
  opacity: .85;
}
/* 文案左对齐 | 右侧一条向右渐隐的装饰横线占满空档 | 主题控件贴右 */
.wb-inner {
  position: relative;
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px;
}
.wb-inner .pref { flex: none; }
/* 只留文案右侧那一条：从文字一侧实色，向右渐隐到控件前 */
.wb-line {
  flex: 1 1 auto; height: 1px; min-width: 20px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--accent) 55%, transparent), transparent);
}
.wb-line:first-child { display: none; }   /* 左对齐后不需要前置装饰线 */
.wb-mid { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.wb-ico { flex: none; color: var(--accent); line-height: 0; opacity: .9; }
.wb-ico svg { display: block; }
.wb-text {
  font-size: clamp(14px, 2.6vw, 16.5px);
  font-weight: 500; letter-spacing: .06em; line-height: 1.5;
}
.wb-text b {
  font-weight: 700; color: var(--accent);
  font-size: 1.1em; letter-spacing: .04em;
  padding: 0 2px;
}
/* 欢迎条里的控件收小一号（带文字后靠内边距和字号控制宽度），不把条撑高 */
.welcomebar .theme-pop summary,
.welcomebar .amb-pop summary,
.welcomebar #amb-toggle,
.welcomebar #mode-toggle { min-height: 40px; padding: 0 12px; gap: 6px; font-size: 13.5px; }
.welcomebar .theme-pop summary .ic,
.welcomebar .amb-pop summary .ic,
.welcomebar #amb-toggle .ic,
.welcomebar #mode-toggle .ic { width: 18px; height: 18px; }

/* 窄屏：去掉装饰线，文案仍靠左，控件放不下时自动换到第二行右侧 */
@media (max-width: 860px) {
  .wb-inner { flex-wrap: wrap; gap: 10px 12px; }
  .wb-line { display: none; }
  .wb-mid { flex: 1 1 auto; }
  .wb-inner .pref { margin-left: auto; }
}
@media (max-width: 560px) {
  .welcomebar { padding: 10px 14px 11px; }
  .wb-ico { display: none; }
  .wb-text { font-size: 14px; letter-spacing: .02em; }
  .welcomebar .theme-pop summary,
  .welcomebar .amb-pop summary,
  .welcomebar #amb-toggle,
  .welcomebar #mode-toggle { min-height: 36px; padding: 0 10px; gap: 5px; font-size: 12.5px; }
  .welcomebar .theme-pop summary .ic,
  .welcomebar .amb-pop summary .ic,
  .welcomebar #amb-toggle .ic,
  .welcomebar #mode-toggle .ic { width: 16px; height: 16px; }
}
/* 尊重减少动效偏好（本条约零动效，仅裁掉装饰闪烁可能） */
@media (prefers-reduced-motion: reduce) {
  .welcomebar::before { opacity: 1; }
}

/* ── 顶部实时状态栏：北京时间 / 农历 / 天气 / 今日限行 ── */
.statusbar {
  position: sticky; top: var(--wb-h, 0px); z-index: 25;   /* 贴欢迎条下沿（页头再贴它下沿） */
  background-color: var(--surface);
  background-image: var(--pattern);          /* 与全站同一张图案，不做纯色补丁 */
  background-size: var(--pattern-size);
  border-bottom: 1px solid var(--line);
}
/* 窄屏（手机 / 小平板）：只让搜索页头吸顶。
   实测 390×780：欢迎条 91 + 状态栏 483 + 页头 195 = 769px，几乎等于整屏——三块一起吸顶会把
   内容区挤到只剩十几像素，分类菜单永远露不出来。改为这两块随页面滚走（position 用 relative
   而非 static，`::before` 装饰线要靠它定位；`top` 一并复位，免得 relative 又按变量下移）。
   页头仍吸顶，JS 量到它们不是 sticky 就会把 --wb-h / --sb-h 记 0。
   这里是「无 JS 兜底」；矮窗口（宽屏但窗口矮）由 JS 打 html.is-thin-head 走同一套复位。 */
@media (max-width: 1100px) {
  .welcomebar, .statusbar { position: relative; top: auto; }
}
html.is-thin-head .welcomebar,
html.is-thin-head .statusbar { position: relative; top: auto; }
.status-inner {
  max-width: 1180px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 20px;
}
/* logo 位于状态栏最左侧，与统计区之间加一道分隔线 */
.statusbar .brand { flex: none; padding-right: 20px; border-right: 1px solid var(--line); }

/* ── 下滚折叠：整条向上收窄成「迷你总览栏」（2026-10-16 第二次改版） ──
   折叠后**不是**缩到某个角上的小胶囊，也**不是**把信息折没，而是**整条保持全宽、
   高度收到 logo 那一档（上下内边距 6 + logo 46 + 6 = 58px）**，同时把四段信息压成
   一行可读的迷你栏：
       [logo] 吾爱导航 ｜ 北京时间 / 16:42:05 ｜ 天气 · 北京 / ☀ 22° ｜ 今日限行 · 北京 / 4 和 9
   即每栏只保留「小字标签 + 主读数」两行，日期 / 农历 / 三天预报 / 体感 / 限行说明 /
   「查看完整说明」全部收起；站名保留（2026-10-16 用户要求：折叠后要看得见站名）。
   下面那条搜索页头同步压矮（收起引擎切换、收紧内边距，见「页头折叠」一节）。
   两层都还在，只是都变矮 —— 展开约 226px，折叠约 118px（各视口实测见 _cdp_logofold.js）。
   触发是**方向驱动**：下滑折叠 / 上划展开 / 贴顶必展开，见 site.js 的 onScrollFold()。
   状态栏本身不透明、带底边线，所以收起时读起来是「横条变矮」而不是「缩成一个角」。

   折叠高度怎么来的：.status-inner 的高度 = max(logo 块 46, 三栏迷你栈 ~43) + 上下内边距 12
   = 58。**由 logo 定高**，所以三栏怎么排都不影响这条数；折叠态实测在 _cdp_logofold.js 里
   同时断言「栏高 ≤ 46」和「整条 = logo + 12」。
   行高的过渡靠 `grid-template-rows`：每栏是一个 4 行（天气 3 行）的小网格，折叠时把
   标签与主读数之后的行改成 `0fr`，行高连续收下去，外面的 .status-inner 跟着连续变矮 ——
   这是唯一能过渡「自动高度」又不用让 JS 去量一个会随天气/限行文案变化的 max-height 的办法
   （量小了会把展开态的统计裁掉）。展开态 `1fr` 在不定高容器里就等于内容高，与改版前一致。
   三个状态切换（栏高、字号、标签行）都在同一 0.3s 里走完，读起来是一次收拢而不是跳变。
   ⚠️ 折叠高度 58px = 6 + 46(logo) + 6，改任一处都要同步 site.js 的 SB_FOLD_C 与
      _cdp_logofold.js / _chk_live_logofold.js 的几何断言。 */
.status-inner {
  overflow: hidden;
  transition: padding .3s cubic-bezier(.22, .68, .36, 1);
}
.statusbar .brand {
  transition: min-height .3s cubic-bezier(.22, .68, .36, 1);
}
/* 每栏内部的「行高过渡」（行模板见下方 .stat-time / .stat-weather / .stat-limit） */
.stat {
  transition: grid-template-rows .3s cubic-bezier(.22, .68, .36, 1);
}
/* 折叠时要收掉的那一块（时间=日期+农历 / 天气=三天预报 / 限行=说明+展开全文）：
   ① 三栏统一成「三行」结构 —— 标签 / 主读数 / .stat-extra，行数一一对应，
      折叠就只是 `1fr → 0fr` 一条轨道，插值干净；
   ② `min-height: 0` —— `0fr` 实际是 minmax(auto, 0fr)，auto 最小值＝子项最小内容高度，
      不清零行高会被内容顶住收不动；
   ③ `margin-top` 也要跟过渡 —— 外边距会在网格里独立撑出几像素，行收到 0 后仍留一条空档，
      迷你栏会被顶高。
   ⚠️ 行模板必须是 `auto auto 1fr` 这种**每栏只有一个 fr 轨道**的形式：同一列里出现两个
      fr 轨道时，空着的那个会被拉平到有内容那个的高度（`.stat-limit` 的「查看完整说明」
      按钮 hidden 时就是这样，实测展开态整条凭空高 40px）。 */
.stat-extra {
  min-height: 0;
  transition: margin-top .3s cubic-bezier(.22, .68, .36, 1), opacity .22s ease,
              visibility 0s linear 0s;
}
/* 折叠时缩字号的那几处：字号一并过渡，否则点开折叠的瞬间大字会先「跳」成小字再收 */
.stat-label, .stat-main, .stat-city, .wx-now, .wx-now-temp, .wx-now-ico {
  transition: font-size .3s cubic-bezier(.22, .68, .36, 1),
              margin-top .3s cubic-bezier(.22, .68, .36, 1),
              width .3s cubic-bezier(.22, .68, .36, 1),
              height .3s cubic-bezier(.22, .68, .36, 1);
}
@media (min-width: 1101px) {
  html.is-headfold:not(.is-thin-head) .status-inner { padding: 6px 20px; }
  /* logo 块收到 46px（＝ logo 高）—— 整条的高度由它决定。站名**保留**，只是字号不动。 */
  html.is-headfold:not(.is-thin-head) .statusbar .brand { min-height: 46px; }

  /* 三栏各自把「标签 + 主读数」之后的第三行收到 0fr（行数与展开态一一对应才能插值） */
  html.is-headfold:not(.is-thin-head) .stat-time,
  html.is-headfold:not(.is-thin-head) .stat-weather,
  html.is-headfold:not(.is-thin-head) .stat-limit { grid-template-rows: auto auto 0fr; }

  /* 收掉的那一行：真的裁掉 + 对读屏与 Tab 隐藏（延迟 0.3s 等淡出走完再隐藏）。
     网格行收到 0fr 只是把**行高**归零，子项因为 `align-content: start` 仍保持自身内容高度
     （实测农历 24 / 三天预报 78 / 限行说明 48px）并溢出到容器外 —— 只靠外层裁剪遮住，
     一旦有人去掉 opacity 就会在迷你栏里露出一截字，所以这里收敛成「裁掉 + 不可见」。 */
  html.is-headfold:not(.is-thin-head) .stat-extra {
    margin-top: 0; opacity: 0; visibility: hidden; overflow: hidden;
    transition: margin-top .3s cubic-bezier(.22, .68, .36, 1), opacity .22s ease,
                visibility 0s linear .3s;
  }

  /* 迷你栏排版：标签 12px 灰、读数 18px 粗；标签行不折行不换行，超长直接裁掉
     （城市名很长时宁可少几个字，也不能把三栏挤变形）。 */
  html.is-headfold:not(.is-thin-head) .stat-label {
    font-size: 12px; line-height: 1.35; flex-wrap: nowrap; white-space: nowrap; overflow: hidden;
  }
  html.is-headfold:not(.is-thin-head) .stat-city { font-size: 12px; }
  html.is-headfold:not(.is-thin-head) .stat-main {
    font-size: 18px; line-height: 1.2; margin-top: 1px;
  }
  html.is-headfold:not(.is-thin-head) .wx-now { margin-top: 1px; gap: 6px; }
  html.is-headfold:not(.is-thin-head) .wx-now-ico { width: 18px; height: 18px; }
  html.is-headfold:not(.is-thin-head) .wx-now-temp { font-size: 18px; }
  html.is-headfold:not(.is-thin-head) .stat-weather { min-width: 0; }
  /* 迷你栏不留「体感」与「多源校准」角标：挤不下，展开态还在 */
  html.is-headfold:not(.is-thin-head) .wx-now-feel,
  html.is-headfold:not(.is-thin-head) .wx-src { display: none; }
}
/* 老浏览器不认 `grid-template-rows` 的可过渡语法时，上面两条会退化成「瞬间折起」——
   结果仍然正确，只是没有动画，比量一个会过期的 max-height 安全得多。 */
/* 中间三栏统计 */
.status-stats {
  flex: 1 1 auto; min-width: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  align-items: start;   /* 限行列文案较长时，不让时间/天气列被拉伸出大片空白 */
}

.stat { padding: 2px 22px; min-width: 0; display: grid; align-content: start; }
/* 每栏的行模板：第 1 行标签、第 2 行主读数、第 3 行「折叠时要收掉的那一块」
   （时间：日期 + 农历；天气：三天预报；限行：说明 + 展开全文）。
   展开态 `1fr` 在不定高容器里按内容定高，与块级堆叠观感一致；折叠态换成 `0fr` ——
   **两态行数必须一致**，否则 grid-template-rows 无法插值、折叠会变成瞬跳。
   三栏都用同一个模板，是因为只有**一条** fr 轨道时不会出现「空轨道被拉平」的问题。 */
.stat-time    { grid-template-rows: auto auto 1fr; }
.stat-weather { grid-template-rows: auto auto 1fr; }
.stat-limit   { grid-template-rows: auto auto 1fr; }
.stat:first-child { padding-left: 0; }
.stat:last-child { padding-right: 0; }
.stat + .stat { border-left: 1px solid var(--line); }

.stat-label {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--ink-3); letter-spacing: .04em;
}
.stat-city {
  appearance: none; -webkit-appearance: none;
  border: 0; background: transparent; color: var(--accent);
  font: inherit; font-size: 13.5px; font-weight: 600;
  padding: 0 2px; cursor: pointer; border-radius: 4px;
}
.stat-city:hover { background: var(--accent-soft); }

.stat-main {
  display: block; margin-top: 2px;
  font-size: clamp(26px, 2.6vw, 34px); font-weight: 700; line-height: 1.2;
  color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.stat-unit { font-size: 18px; font-weight: 600; color: var(--ink-2); margin-left: 3px; }
.stat-sub { display: block; margin-top: 3px; font-size: 14.5px; color: var(--ink-2); }
.stat-sub a { color: var(--accent); }

/* 未收录城市给的「最近已收录」入口：行内文字链，不跟主信息抢注意力 */
.limit-pick {
  border: 0; background: none; padding: 0; margin: 0;
  font: inherit; color: var(--accent); cursor: pointer;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}
.limit-pick:hover { border-bottom-color: var(--accent); }
.limit-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* 在线兜底数据（内置表未收录的城市）加一枚小圆点，与公告表数据区分开 */
.stat-sub.is-online::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px;
  border-radius: 50%; background: var(--accent); vertical-align: 1px;
}

/* ── 限行说明最多 3 行 ──
   长沙 / 贵阳 / 南宁这类「没有尾号限行、但有区域与路段管制」的城市，note 全文可达百余字
   （橘子洲大桥、南京长江大桥、过江隧道……）。原样铺开会把整个状态栏顶得很高，
   左侧 logo 那一列随之出现一大片空白。这里截到 3 行，超出的部分交给下方的
   「查看完整说明」按钮开弹窗看全文（弹窗内保留全部来源链接，可直接跳交管局官网）。 */
#sb-limitnote {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
/* 只在真的被截断时才出现（site.js 按 scrollHeight > clientHeight 判定后移除 hidden） */
.limit-more {
  display: block; margin-top: 5px; padding: 0;
  border: 0; background: none; font: inherit; font-size: 13px;
  color: var(--accent); cursor: pointer; text-align: left;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}
.limit-more[hidden] { display: none; }
.limit-more:hover { border-bottom-color: var(--accent); }
.limit-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* 限行用强调色，一眼看见 */
.stat-limit .stat-main { color: var(--accent); }

/* ── 天气：当前实况（温度 + 体感）一行，其下未来三天 ── */
.stat-weather { min-width: 254px; }
.wx-now { display: flex; align-items: baseline; gap: 7px; margin-top: 1px; }
.wx-now-ico { width: 22px; height: 22px; flex: none; align-self: center; }
.wx-now-temp {
  font-size: 22px; font-weight: 700; line-height: 1.15; color: var(--ink);
  font-variant-numeric: tabular-nums; letter-spacing: .01em;
}
.wx-now-feel { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.wx-now-feel b {
  font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums;
}
/* 体感与气温差 ≥3° 时点亮，提示「该多穿一件」 */
.wx-now-feel.is-diff { color: var(--accent); }
.wx-now-feel.is-diff b { color: var(--accent); }
.wx-days { display: flex; align-items: stretch; margin-top: 3px; }
.wx-day {
  flex: 1 1 0; min-width: 0;
  display: grid; justify-items: center; gap: 1px;
  padding: 3px 2px; border-radius: 9px;
}
.wx-day + .wx-day { box-shadow: inset 1px 0 0 var(--line); }
.wx-name { font-size: 12.5px; color: var(--ink-3); letter-spacing: .06em; }
.wx-temp {
  font-size: 14.5px; font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: .01em;
}
.wx-ico { width: 24px; height: 24px; display: block; line-height: 0; }
.wx-ico svg { display: block; width: 100%; height: 100%; }
/* 第一天（今天）底色略提，方便一眼定位 */
.wx-day:first-child { background: var(--surface-2); }

/* 多源校准角标：显式告诉访客「这个温度是几个源比对出来的」，点开看每家的读数。
   2026-10-14 从「三天卡片下方独占一行」挪到城市行（.stat-label）末尾 —— 那一行本来就只有
   22px 高、右侧空着，角标塞进去不撑高，整块天气列省下「24px 角标 + 5px 外边距」= 29px。
   限行文案短的城市（北京 32 字）状态栏是由天气列定高的，实测 192 → 163px。
   ⚠️ padding / line-height 是按「角标高 ≤ 标签行 22px」配的（12×1.5 + 2 边框 = 20），
      改完用 build-cache/_cdp_wx_badge.js 量，别让它把标签行顶高。 */
.wx-src {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  border-radius: 999px; background: none;
  font: inherit; font-size: 12px; line-height: 1.5;
  color: var(--ink-3); cursor: pointer;
  transition: color .16s ease, border-color .16s ease;
}
.wx-src[hidden] { display: none; }
.wx-src:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.wx-src:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* 各源温差 ≥3° 时点亮：这条值得点开看一眼 */
.wx-src.is-diff { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }

/* 中等宽度：logo 一行，三栏统计换到下一行整行铺开 */
@media (max-width: 1100px) {
  .status-inner {
    flex-wrap: wrap; gap: 12px 18px; padding: 12px 20px;
    align-items: center;
  }
  .statusbar .brand { order: 1; padding-right: 0; border-right: 0; }
  .status-stats { order: 2; flex-basis: 100%; }
}
@media (max-width: 860px) {
  .status-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 12px;
  }
  .stat { padding: 0 18px; }
  .stat:first-child { padding-left: 0; }
  .stat:nth-child(odd) { padding-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .stat:nth-child(3) { border-left: 0; }
}
@media (max-width: 560px) {
  .status-stats { grid-template-columns: 1fr; row-gap: 10px; }
  .status-inner { padding: 12px 14px; }
  .stat, .stat:nth-child(even) { padding: 0; border-left: 0; }
  .stat + .stat { border-top: 1px solid var(--line); padding-top: 10px; }
  .stat-main { font-size: 28px; }
  .stat-weather { min-width: 0; }
  .wx-now-temp { font-size: 20px; }
  .wx-now-feel { font-size: 12.5px; }
  .wx-now-ico { width: 20px; height: 20px; }
  .wx-day { padding: 3px 0; }
  .wx-name { font-size: 12px; }
  .wx-temp { font-size: 13.5px; }

  /* 手机端：logo 与「北京时间」同行 —— logo 居左、时间块居右，填掉 logo 右侧大片空白 */
  .status-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 14px; row-gap: 12px;
    align-items: center;
  }
  .status-stats { display: contents; }   /* 让三块统计成为 .status-inner 的网格子项 */
  .brand { justify-self: start; }
  .stat-time {
    grid-column: 2; grid-row: 1;
    justify-self: end; text-align: right;
    padding-left: 0; padding-right: 0; border-left: 0;
    min-width: 0;
  }
  .stat-weather { grid-column: 1 / -1; grid-row: 2; }
  .stat-limit  { grid-column: 1 / -1; grid-row: 3; }

  .header-inner { padding: 16px 14px; }
  .engine { padding: 6px 12px; font-size: 14px; }
}

/* ── 顶栏吸附栈（2026-10-17 重构） ──
   欢迎条 / 状态栏 / 搜索页头放进**同一个 sticky 容器**，三者按正常文档流依次排列。
   为什么不再各自 sticky：页头的 top 原本写 `calc(--wb-h + --sb-h)` —— 两个由 JS 写进去的
   高度快照。而折叠过渡的那 300ms 里，状态栏高度是「padding + max(logo 高, 三栏迷你高)」
   的**非线性**合成，页头 top 却是**线性**插值，两者永远对不上：实测过渡中页头会掉到状态栏
   下沿之下 17~35px（折叠）/ 叠上去 17~33px（展开），用户看到的就是「滚动时迷你搜索框下移」。
   rAF 轮询和 ResizeObserver 都试过 —— 写 CSS 变量与这一帧的绘制之间至少差一帧，只要差一帧
   就一定会露出来。放进同一个吸附容器后，状态栏高度变化与页头位置出自**同一次布局**，
   天然零误差，而且完全不需要任何高度变量参与定位（探针 _cdp_foldgap.js 逐帧核验 gap=0）。
   容器高度随折叠一起变（展开 391 / 折叠 184），吸顶位置始终是 top: 0。 */
.topstack {
  position: sticky; top: 0; z-index: 26;
}
/* 三层自己不再吸顶。用 relative 而不是 static：欢迎条 ::before 的装饰线靠定位，
   状态栏底边线与 z-index 也要保留层叠顺序。top 一并复位，免得又按变量下移。 */
.topstack > .welcomebar,
.topstack > .statusbar,
.topstack > .site-header {
  position: relative; top: auto;
}
/* 窄屏（手机 / 小平板）与极矮窗：整块不吸附，只让搜索页头单独吸顶 ——
   与重构前完全一致（390×780 下三层共 769px 一起吸顶会把内容挤到只剩十几像素）。
   ⚠️ 必须用 `display: contents` 而不是 `position: static`：sticky 子元素只能在自己的
   **父容器**高度内滑动，而 .topstack 的高度恰好等于三层之和 —— 父容器没有可滑动的余量，
   页头就完全不吸顶、跟着一起滚走（实测 390 宽滚到 700 时 hdTop = −192）。
   contents 让容器不生成盒子，子元素各回文档流，sticky 退回到相对 body 生效。 */
@media (max-width: 1100px) {
  .topstack { display: contents; }
  .topstack > .site-header { position: sticky; top: 0; z-index: 20; }
}
html.is-thin-head .topstack { display: contents; }
html.is-thin-head .topstack > .site-header { position: sticky; top: 0; z-index: 20; }

/* ── 页头 ── */
.site-header {
  /* 叠在「欢迎条 + 状态栏」之下，三块吸顶元素自上而下依次排列 */
  position: sticky; top: calc(var(--wb-h, 0px) + var(--sb-h, 0px)); z-index: 20;
  background-color: color-mix(in srgb, var(--surface) 88%, transparent);
  background-image: var(--pattern);          /* 图案同样覆盖页头 */
  background-size: var(--pattern-size);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(1px)) {
  .site-header { background-color: var(--surface); }
}

.header-inner {
  max-width: 1180px; margin: 0 auto; padding: 18px 20px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
}

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 58px;
  font-weight: 700; font-size: 23px; color: var(--ink); text-decoration: none;
  letter-spacing: .2px; white-space: nowrap;
}
/* 品牌标记「指北」：墨底罗盘，指针色跟随主题；形状与配色都在 SVG 里，这里只负责尺寸 */
.brand-mark { flex: none; display: block; width: 46px; height: 46px; }
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-logo { transition: transform .35s cubic-bezier(.22, .68, .36, 1); }
.brand:hover .brand-logo { transform: rotate(22deg); }

/* ── 搜索（原生表单，无 JS 也能用） ── */
.search { flex: 1 1 440px; min-width: 280px; }
.search form { display: flex; gap: 10px; align-items: center; }
.search input {
  flex: 1; min-height: 58px;
  padding: 15px 24px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface-2); color: var(--ink);
  font-size: 17px; /* < 16px 会触发 iOS 自动放大 */
}
.search input::placeholder { color: var(--ink-3); }
.search button {
  min-height: 58px; min-width: 58px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink-2); cursor: pointer;
}
.search button .ic { width: 23px; height: 23px; }
.search button:hover { background: var(--accent-soft); color: var(--accent); }

/* ── 多引擎切换 chips ── */
.engines {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 12px; padding: 0 2px;
}
.engine {
  min-height: 38px; padding: 6px 17px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink-2);
  font: inherit; font-size: 14.5px; cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.engine:hover { background: var(--surface-2); color: var(--ink); }
.engine.is-active {
  background: var(--accent-soft); color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  font-weight: 600;
}

/* ── 页头折叠：页面下滑后搜索区压矮（收起引擎切换、收紧内边距，输入框仍在） ──
   与状态栏折叠同一套开关（html.is-headfold），两层一起变矮：状态栏 162 → 58、
   页头 144 → 60，整条顶栏 226 → 118px（欢迎条不参与折叠，照旧吸在更上面）。
   --engines-h 由 JS 量出引擎条的当前高度（含换行），height:auto 无法过渡，故用 max-height */
.engines {
  max-height: var(--engines-h, 220px);
  overflow: hidden;
}
.header-inner, .search input, .search button, .engines {
  transition: padding .3s cubic-bezier(.22, .68, .36, 1),
              padding-block .3s cubic-bezier(.22, .68, .36, 1),
              min-height .3s cubic-bezier(.22, .68, .36, 1),
              max-height .3s cubic-bezier(.22, .68, .36, 1),
              margin-top .3s cubic-bezier(.22, .68, .36, 1),
              opacity .2s ease, visibility 0s linear 0s;
}
html.is-headfold .header-inner { padding-block: 8px; }
html.is-headfold .search input { min-height: 44px; padding: 8px 20px; }
html.is-headfold .search button { min-height: 44px; min-width: 44px; }
html.is-headfold .search button .ic { width: 20px; height: 20px; }
html.is-headfold .engines {
  max-height: 0; margin-top: 0; opacity: 0; visibility: hidden;
  pointer-events: none;
  transition: padding .3s cubic-bezier(.22, .68, .36, 1),
              padding-block .3s cubic-bezier(.22, .68, .36, 1),
              min-height .3s cubic-bezier(.22, .68, .36, 1),
              max-height .3s cubic-bezier(.22, .68, .36, 1),
              margin-top .3s cubic-bezier(.22, .68, .36, 1),
              opacity .16s ease, visibility 0s linear .3s;
}
/* 折叠后页头变矮会让文档高度跟着少一截，浏览器滚动锚定会把 scrollY 往回带等量
   距离——内容视觉位置不动（页头收起，视口多露出内容），这正是要的效果，所以这里
   不做 margin 补偿（补了反而会顶住文档高度，让视口露不出更多内容）。
   只要求折叠阈值大于这个回退量，见 site.js 的 foldThreshold()。 */

/* ── 主题偏好（动态背景面板 + 配色面板 + 深浅切换） ── */
.pref { display: flex; align-items: center; gap: 10px; }
.theme-pop, .amb-pop { position: relative; }
/* ── 主题偏好（背景开关 + 背景款式 + 配色 + 明暗，四颗「图标＋文字」胶囊） ── */
.pref { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.theme-pop, .amb-pop { position: relative; }
.theme-pop summary, .amb-pop summary,
#amb-toggle, #mode-toggle {
  list-style: none;
  min-height: 44px; padding: 0 15px;
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink-2); cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 500; white-space: nowrap;
}
.theme-pop summary .ic, .amb-pop summary .ic,
#amb-toggle .ic, #mode-toggle .ic { width: 20px; height: 20px; flex: none; }
.theme-pop summary::-webkit-details-marker,
.amb-pop summary::-webkit-details-marker { display: none; }
.theme-pop summary:hover, .amb-pop summary:hover,
#amb-toggle:hover, #mode-toggle:hover { background: var(--accent-soft); color: var(--accent); }
/* 动态背景开关（顶层独立按钮）：开＝主题色 + 淡底，一眼看出背景在跑；
   关＝与背景一起灰掉。和「背景款式」面板是两个各管一摊的控件。
   position:relative 是提示气泡（#amb-hint）的定位参照。 */
#amb-toggle {
  position: relative;
  color: var(--accent); background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 38%, transparent);
}
:root[data-ambient="off"] #amb-toggle {
  color: var(--ink-3); background: var(--surface); border-color: var(--line);
}
:root[data-ambient="off"] #amb-toggle .ic { opacity: .45; }
:root[data-ambient="off"] #amb-toggle:hover { background: var(--accent-soft); color: var(--accent); }
.theme-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30;
  min-width: 176px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 8px 28px rgba(16, 24, 40, .14);
}
.theme-menu button {
  width: 100%; display: flex; align-items: center; gap: 9px;
  min-height: 40px; padding: 8px 12px;
  border: 0; border-radius: 8px; background: transparent;
  color: var(--ink); font: inherit; font-size: 14.5px; cursor: pointer;
  text-align: left;
}
.theme-menu button:hover { background: var(--surface-2); }
.theme-menu button[aria-pressed="true"] {
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
}
.sw { width: 15px; height: 15px; border-radius: 50%; flex: none; border: 1px solid rgba(0,0,0,.12); }
.sw-gold    { background: linear-gradient(135deg, #c9a96e, #8a6a2f); }
.sw-celadon { background: linear-gradient(135deg, #6fae9a, #2e6b58); }
.sw-indigo  { background: linear-gradient(135deg, #5f88bb, #2b5a8c); }
.sw-rouge   { background: linear-gradient(135deg, #cf8b83, #96453f); }
.sw-sketch  { background: linear-gradient(135deg, #b5af9d, #55503f); }
.sw-none    { background: linear-gradient(135deg, #f4f4f6 0 46%, #7a7a82 47% 100%); }
.sw-auto    { background: linear-gradient(135deg, #bfe3ff 0 36%, #8fd0a0 37% 68%, #f5c65a 69% 100%); }
.sw-spring  { background: linear-gradient(135deg, #a8dd7c, #4f9c3d); }
.sw-summer  { background: linear-gradient(135deg, #63c072, #1f6538); }
.sw-autumn  { background: linear-gradient(135deg, #f0c65a, #b8551c); }
.sw-winter  { background: linear-gradient(135deg, #f2f8fd, #7d9ab5); }
/* 落英的色点跟着 --petal 走，等于实时预览当前明暗下的花瓣色（别的色点都是写死的） */
.sw-sakura  { background: linear-gradient(135deg, color-mix(in srgb, #fff 40%, var(--petal)), var(--petal)); }

/* 动态背景 / 跟随天气：两枚并排的胶囊按钮（开＝主题色描边 + 实色圆点，关＝灰化压暗） */
.theme-menu .switch-row { display: flex; gap: 6px; margin: 2px; }
.theme-menu .switch-row button {
  width: auto; flex: 1; min-height: 38px; padding: 6px 8px;
  justify-content: center; gap: 6px; font-size: 13.5px;
  border: 1px solid var(--line); border-radius: 999px;
}
.theme-menu .switch-row button .sw { width: 12px; height: 12px; }
.theme-menu .switch-row button[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--accent) 58%, transparent);
}
.theme-menu .switch-row button[aria-pressed="false"] { color: var(--ink-3); }
.theme-menu .switch-row button[aria-pressed="false"] .sw { filter: grayscale(1); opacity: .5; }

/* 四季款式：竖排列表，雅名在左、季节字淡显在右 */
.theme-menu .season-list { list-style: none; margin: 2px; padding: 0; }
.theme-menu .season-list button { gap: 9px; }
.theme-menu .season-hint {
  margin-left: auto; font-size: 12px; font-weight: 400;
  color: var(--ink-3); letter-spacing: .04em;
}
.theme-menu .season-list button[aria-pressed="true"] .season-hint { color: var(--accent); }

/* 主题菜单里的开关行不再用旧的行式样式 */
.theme-sep { display: block; height: 1px; margin: 6px 4px; background: var(--line); }
.theme-menu.amb-menu { min-width: 208px; }

#mode-toggle .sun { display: none; }
#mode-toggle .moon { display: block; }
:root[data-mode="dark"] #mode-toggle .sun { display: block; }
:root[data-mode="dark"] #mode-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-mode]):not([data-theme]) #mode-toggle .sun { display: block; }
  :root:not([data-mode]):not([data-theme]) #mode-toggle .moon { display: none; }
}

/* ── 分类菜单栏：宫格卡片（位于吸顶头之下，随页面滚动） ── */
.cat-nav { padding: 4px 0 10px; }
.cat-grid-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 20px;
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
}
/* 菜单底色基底（.cat-tile 用）。
   浅色：直接用 accent-soft，88% 掺进 surface 就是一格淡米金。
   深色：**必须提亮一档** —— 四套配色的 accent-soft 都很暗（#2c2718 / #17271f /
         #182334 / #2b1a18），和 surface #1c1f25 亮度几乎相同：朱砂实测只差 1.007、
         天青 1.039，纯靠色相根本分不出「块」和「面板」。
         掺 10% accent（深色下 accent 本身就是浅色）把亮度拉开到 1.14~1.21。 */
:root { --tile-base: var(--accent-soft); }
:root[data-mode="dark"] {
  --tile-base: color-mix(in srgb, var(--accent-soft) 90%, var(--accent));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-mode]) {
    --tile-base: color-mix(in srgb, var(--accent-soft) 90%, var(--accent));
  }
}

.cat-tile {
  display: flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 10px 14px;
  /* 菜单项自带一层淡金底：原来 12 个条目只有「面板本身」这一层背景，
     挨在一起没有分区，视线得一行行找。
     --tile-tint 是浓度旋钮：0% = 纯 surface（原来的样子），100% = --tile-base 原色。
     顶部宫格与左侧悬浮栏共用这一个值，嫌深/嫌浅只改这里。 */
  --tile-tint: 88%;
  background: color-mix(in srgb, var(--tile-base) var(--tile-tint), var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
  border-radius: 10px; box-shadow: var(--shadow);
  color: inherit; text-decoration: none; min-width: 0;
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}
.cat-tile:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  /* 悬停掺 accent 而不是继续推 tint：常态已经 88%，再往上只剩 12% 的余量，
     肉眼看不出变化（试过 92%，几乎和常态一样）。掺 accent 才有明确的按压感。 */
  background: color-mix(in srgb, var(--accent) 14%, var(--tile-base));
}
.cat-tile .tile-icon {
  color: var(--accent); line-height: 0; flex: none;
  display: grid; place-items: center;
}
.cat-tile .tile-icon .ic { width: 22px; height: 22px; }
.cat-tile .tile-name {
  font-weight: 600; font-size: 15px; color: var(--ink);
  /* 桌面宫格每格 148px，扣掉图标与内边距只剩 92px；6 字分类名实测要 105px，
     原来的 nowrap 会把它截成省略号。改为允许折行 + keep-all（中文不随意断字），
     只在长名里用 <wbr> 标出的语义断点换行，短名仍是一行、字号与其他项一致。 */
  line-height: 1.2; white-space: normal; word-break: keep-all;
  overflow: hidden; text-overflow: ellipsis;
}
.cat-tile > .ic { color: var(--ink-3); flex: none; }

/* ── 宽屏：菜单栏移到左侧空白区，悬浮玻璃面板（竖排单列） ──
   断点 1520 而不是 1600：1920×1080 的笔记本若系统缩放 125%，CSS 视口只剩 1536px，
   1600 的闸门会把它挡在外面（用户实测就是这样）。
   面板宽改成跟着留白走：留白 = (100vw - 1180) / 2，要求 left ≥ 8px、右缘离内容列 ≥ 16px
   ⇒ 面板宽 ≤ 留白 - 24，上限仍是 180、下限 146（再窄「网站与开发」这类 5 字名就会截断）。
   1520 时留白 170 → 面板 146、left 8、缝 16；1536 时面板 154；1600 以上回到 180。 */
@media (min-width: 1520px) {
  .cat-nav {
    position: fixed;
    --rail-w: clamp(160px, calc((100vw - 1180px) / 2 - 20px), 180px);
    /* 顶边贴 logo 区域下沿，不越到顶栏之上；有 JS 时按实际 header 高度动态校正 */
    top: var(--rail-top, 300px);
    left: max(8px, calc((100vw - 1180px) / 2 - var(--rail-w) - 10px));
    width: var(--rail-w);
    /* 底边由 JS 逐帧写 max-height：既不越视口底，也不越页脚上沿 */
    max-height: var(--rail-max-h, calc(100vh - 316px));
    overflow-y: auto;
    z-index: 15;
    padding: 10px;
    background-color: color-mix(in srgb, var(--surface) 88%, transparent);
    background-image: var(--pattern);        /* 悬浮面板同样铺全局图案 */
    background-size: var(--pattern-size);
    backdrop-filter: saturate(180%) blur(12px);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(16, 24, 40, .06), 0 10px 30px rgba(16, 24, 40, .06);
    /* 淡出程度由 JS 逐帧写（0~1）：越贴近页脚越透，滚回上方自然回实。
       max-height 也是逐帧写的，两者都不加 transition —— 加了反而跟不上滚动。 */
    opacity: var(--rail-fade, 1);
  }
  @supports not (backdrop-filter: blur(1px)) {
    .cat-nav { background-color: var(--surface); }
  }
  /* 淡到几乎不可见时关掉命中（JS 同时置 inert），免得点到看不见的链接 */
  .cat-nav.rail-hidden { pointer-events: none; }

  .cat-nav .cat-grid-inner {
    grid-template-columns: 1fr;
    padding: 0;
    gap: 6px;
  }
  .cat-nav .cat-tile {
    min-height: 48px; padding: 8px 12px;
    box-shadow: none; border-color: transparent;
  }
  .cat-nav .cat-tile:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  }
  .cat-nav .cat-tile .tile-icon .ic { width: 20px; height: 20px; }
  /* 侧栏比顶部宫格窄得多（160~180px），5 字分类名（「网站与开发」）会被 ellipsis 截成「网站与…」。
     两处让位：① 名字后那枚 12px 的「口令保护」小锁不显示 —— 它加 gap 要吃掉 22px；
     ② 字号降到 13.5，并允许折两行（line-clamp 兜底），最窄的一档也能把名字看全。 */
  .cat-nav .cat-tile .tile-name {
    font-size: 13.5px;
    white-space: normal; line-height: 1.22;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  }
  .cat-nav .cat-tile > .ic { display: none; }
  /* 悬浮面板不参与打印与滚动锚点偏移冲突 */
  .cat { scroll-margin-top: 100px; }
}

/* ── 主体 ── */
.wrap { max-width: 1180px; margin: 0 auto; padding: 24px 20px 72px; }

/* 顶部极简标题行：替代原来的大段介绍 */
.topline { margin: 0 0 24px; }
.topline h1 {
  margin: 0; font-size: clamp(26px, 4vw, 34px); line-height: 1.25;
  letter-spacing: -.3px;
}
.topline-meta {
  margin: 8px 0 0; color: var(--ink-3); font-size: 14.5px;
}
.topline-meta b { color: var(--ink); font-variant-numeric: tabular-nums; }

.intro { margin: 0 0 28px; }
.intro h1 {
  margin: 0 0 8px; font-size: clamp(26px, 4vw, 34px); line-height: 1.3;
  letter-spacing: -.3px;
  display: flex; align-items: center; gap: 10px;
}
.intro p { margin: 0; color: var(--ink-2); max-width: 68ch; }

.stats {
  display: flex; gap: 18px; flex-wrap: wrap;
  margin: 18px 0 0; padding: 0; list-style: none;
  font-size: 14.5px; color: var(--ink-3);
}
.stats b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ── 分类区块 ── */
.cat { margin: 0 0 36px; scroll-margin-top: 92px; }
.cat-head {
  display: flex; align-items: baseline; gap: 10px;
  padding-bottom: 10px; margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.cat-head h2 { margin: 0; font-size: 20px; letter-spacing: -.1px; }
.cat-head h2 a { color: var(--ink); text-decoration: none; }
.cat-head h2 a:hover { color: var(--accent); text-decoration: underline; }
.cat-head .count {
  color: var(--ink-3); font-size: 14px;
  display: inline-flex; align-items: center; gap: 5px;
}
.cat-locked .count { color: var(--accent); }

.grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  list-style: none; margin: 0; padding: 0;
}

/* ── 站点卡片：只保留图标 + 名称，垂直居中 ── */
.site-card {
  display: flex; align-items: center; gap: 13px;
  min-height: 68px; padding: 13px 16px;
  /* 半透明玻璃卡片：滚动时把身后的田园场景透出来（底部草地一带最明显） */
  background-color: color-mix(in srgb, var(--surface) 40%, transparent);
  backdrop-filter: saturate(165%) blur(6px);
  -webkit-backdrop-filter: saturate(165%) blur(6px);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: var(--radius); box-shadow: var(--shadow);
  color: inherit; text-decoration: none;
  transition: transform .14s ease, border-color .14s ease, background-color .14s ease;
}
/* 不支持毛玻璃时退回近乎不透明，保证可读性 */
@supports not (backdrop-filter: blur(1px)) {
  .site-card { background-color: color-mix(in srgb, var(--surface) 84%, transparent); }
}
.site-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background-color: color-mix(in srgb, var(--accent-soft) 55%, transparent);
}
/* 「站内自托管安装包」角标：官网已下线的软件（如 360压缩）指向本地 exe，
   点下去是下载而不是开网页，给个不误导的标记。绝对定位，不进网格流，
   不影响 5 列/2 列排布。 */
.site-card.is-download { position: relative; }
.site-card.is-download::after {
  content: "下载"; position: absolute; top: 7px; right: 8px;
  padding: 2px 6px; border-radius: 6px;
  font-size: 10.5px; line-height: 1.35; letter-spacing: .02em;
  color: var(--accent); background: var(--accent-soft);
  pointer-events: none;
}
.site-card .logo {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 9px; overflow: hidden;
  background: var(--surface-2); color: var(--ink-2); font-weight: 700; font-size: 16px;
}
.site-card .logo img { width: 100%; height: 100%; object-fit: contain; }
.site-card .logo svg { display: block; fill: currentColor; }
.logo-fallback { line-height: 1; }

.site-meta { min-width: 0; flex: 1; }
.site-name {
  display: block; font-weight: 600; font-size: 16px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 简介保留为屏幕阅读器文本（搜索索引与 SEO 用），视觉上不展示 */

/* ── 加密分类解锁面板 ── */
.vault-panel { max-width: 520px; }
/* 首页内联解锁：与分类区块同宽，卡片式容器，口令表单下方就地展开站点 */
.vault-panel.vault-inline {
  max-width: none;
  padding: 18px 20px 16px;
  /* 与站点卡片同一套玻璃配方，让加密分类也透出背后的场景 */
  background: color-mix(in srgb, var(--surface) 46%, transparent);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
@supports not (backdrop-filter: blur(1px)) {
  .vault-panel.vault-inline { background: color-mix(in srgb, var(--surface) 86%, transparent); }
}
.vault-inline .field { margin-bottom: 0; }
.vault-row { display: flex; gap: 10px; flex-wrap: wrap; }
.vault-row input {
  flex: 1; min-width: 200px; min-height: var(--tap);
  padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface-2); color: var(--ink);
  font: inherit; font-size: 16px; letter-spacing: .1em;
}
.vault-msg { margin: 10px 0 0; font-size: 14.5px; color: var(--accent); min-height: 1.4em; }
.vault-msg:empty { min-height: 0; margin: 0; }
/* 解锁后就地渲染的站点表格 */
.vault-out { margin-top: 4px; }
.vault-out .cat { margin: 0; }
.vault-out .cat-head { margin-bottom: 12px; }
.vault-out .cat-head h2 { font-size: 18px; color: var(--ink); }

/* ── 表格视图（全站索引，SEO/GEO 友好） ── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.index { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--surface); }
table.index caption { text-align: left; padding: 14px 16px; color: var(--ink-2); font-size: 14.5px; }
table.index th, table.index td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.index thead th { background: var(--surface-2); position: sticky; top: 0; font-size: 14px; }
table.index tbody tr:last-child td { border-bottom: 0; }
table.index td:first-child { white-space: nowrap; }

/* ── 说明块 ── */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; margin: 0 0 20px;
}
.panel h2 { margin: 0 0 10px; font-size: 18px; }
.panel h3 { margin: 20px 0 8px; font-size: 16px; }
.panel p, .panel li { color: var(--ink-2); font-size: 15px; }
.panel ul { padding-left: 20px; }
.panel :last-child { margin-bottom: 0; }

.faq dt { font-weight: 600; margin-top: 14px; color: var(--ink); font-size: 15.5px; }
.faq dd { margin: 4px 0 0; color: var(--ink-2); font-size: 15px; }

/* ── 表单 ── */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field .hint { display: block; font-weight: 400; color: var(--ink-3); font-size: 13.5px; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 11px 13px; min-height: var(--tap);
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface-2); color: var(--ink);
  font: inherit; font-size: 16px;
}
.field textarea { min-height: 130px; resize: vertical; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 11px 22px;
  border: 1px solid transparent; border-radius: 8px;
  background: var(--accent); color: var(--bg);
  font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn-note { margin-top: 12px; font-size: 13.5px; color: var(--ink-3); }

/* ── 页脚 ── */
.site-footer {
  border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  /* 玻璃页脚：与站点卡片同一套配方，滚到底时草地仍从页脚后透出来 */
  background-color: color-mix(in srgb, var(--surface) 48%, transparent);
  background-image: var(--pattern);
  background-size: var(--pattern-size);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  padding: 30px 20px; margin-top: 40px;
}
@supports not (backdrop-filter: blur(1px)) {
  .site-footer { background-color: color-mix(in srgb, var(--surface) 86%, transparent); }
}
.footer-inner {
  max-width: 1180px; margin: 0 auto;
  /* 栏间距 32（原 40）：四栏要排成一行，实测需 1135px，容器 1180 —— 间距再大就掉回两行。
     详见 .join-hint 处的说明。 */
  display: flex; flex-wrap: wrap; gap: 20px 32px; justify-content: space-between;
  font-size: 14.5px; color: var(--ink-2);
}
.footer-inner h2 { font-size: 15px; margin: 0 0 8px; color: var(--ink); }
.footer-inner a { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; }

/* 本站信息三条（关于本站 · 申请收录 · 全部站点）：原「关于」栏取消后合并成一行，
   跟在「加入交流群」卡片下面 —— 这三条是 /about/ /apply/ /all/ 在页面上唯一的入口，
   改动页脚时别顺手删掉。 */
.footer-links {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px;
  margin: 10px 0 0; font-size: 13.5px;
}
.footer-links .sep { color: color-mix(in srgb, var(--ink-3) 55%, transparent); }
.footer-links a { color: var(--ink-3); }
.footer-links a:hover { color: var(--accent); }

/* 最底部：备案号 + 版权（视觉上与上方分栏隔开） */
.footer-bottom {
  max-width: 1180px; margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--line) 62%, transparent);
  text-align: center;
}
.beian-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 6px 20px; margin: 0;
}
.beian {
  flex: none; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; color: var(--ink-3) !important; text-decoration: none;
  transition: color .16s ease;
}
.beian:hover { color: var(--accent) !important; }
.beian-badge { flex: none; display: block; width: 16px; height: 16px; }
.copyright {
  margin: 8px 0 0; font-size: 12.5px; color: var(--ink-3); text-align: center;
}
.copyright a { display: inline; color: var(--ink-2) !important; text-decoration: none; }
.copyright a:hover { color: var(--accent) !important; }

/* 吾爱主站 / 音乐 / Nova 推荐卡：图标 + 一句话介绍，整卡可点，跳各自站点。
   宽度由内容撑开（文案每行 ~142px 起），min-width 让三张卡看起来是一套 ——
   否则文案最短的那张（主站）会明显窄一截。 */
.promo-card {
  display: flex; align-items: center; gap: 12px;
  min-width: 250px; max-width: 330px; padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 42%, transparent);
  backdrop-filter: saturate(150%) blur(6px);
  -webkit-backdrop-filter: saturate(150%) blur(6px);
  text-decoration: none; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
@supports not (backdrop-filter: blur(1px)) {
  .promo-card { background: color-mix(in srgb, var(--surface) 90%, transparent); }
}
.promo-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 52%, transparent);
  box-shadow: 0 12px 26px -16px color-mix(in srgb, var(--accent) 80%, transparent);
}
/* 吾爱音乐官方 logo（紫色光晕圆盘 + 白色音符），自带透明软边，不额外加底色 */
.promo-logo {
  flex: none; display: block;
  width: 48px; height: 48px;
}
.promo-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.35; min-width: 0; }
.promo-text b { font-size: 15px; color: var(--ink); }
.promo-text > span { font-size: 12.5px; color: var(--ink-3); }
.promo-go {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--accent) !important; font-weight: 600;
}

/* 进群：QQ 群卡片（二维码整卡可点，落地 qm.qq.com 加群页） */
.join-group { margin-top: 0; }
.join-card {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 42%, transparent);
  backdrop-filter: saturate(150%) blur(6px);
  -webkit-backdrop-filter: saturate(150%) blur(6px);
  text-decoration: none; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
@supports not (backdrop-filter: blur(1px)) {
  .join-card { background: color-mix(in srgb, var(--surface) 90%, transparent); }
}
.join-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 52%, transparent);
  box-shadow: 0 12px 26px -16px color-mix(in srgb, var(--accent) 80%, transparent);
}
.join-qr {
  flex: none; width: 96px; height: 96px; box-sizing: border-box;
  padding: 4px; border-radius: 10px; background: #fff;
  box-shadow: 0 3px 12px -8px rgba(16, 24, 40, .5);
}
.join-meta { display: flex; flex-direction: column; gap: 3px; line-height: 1.4; min-width: 0; }
.join-meta b { font-size: 14.5px; color: var(--ink); }
.join-meta > span { font-size: 12.5px; color: var(--ink-3); }
.join-hint { color: var(--accent) !important; font-weight: 500; }

/* ── 全站信息弹窗（限行完整说明 / 天气多源读数）──
   用原生 <dialog>：自带焦点陷阱、Esc 关闭与顶层渲染，不必自己写遮罩层与键盘处理。
   内容由 site.js 的 openInfoDialog(title, html) 填进 .info-dialog-body。 */
.info-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: min(78vh, 640px);
  padding: 0; margin: auto;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); color: var(--ink);
  box-shadow: 0 28px 64px -26px rgba(16, 24, 40, .5);
  overflow: hidden;
}
.info-dialog[open] { display: flex; flex-direction: column; }
.info-dialog::backdrop { background: rgba(16, 24, 40, .44); }
@supports (backdrop-filter: blur(1px)) {
  .info-dialog::backdrop { backdrop-filter: blur(2px); }
}
.info-dialog-head {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 0; padding: 13px 14px 11px 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.info-dialog-head h2 { margin: 0; font-size: 17px; line-height: 1.35; }
.info-dialog-close {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0;
  border: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  border-radius: 10px; background: none; color: var(--ink-2); cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background-color .16s ease;
}
.info-dialog-close:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  background: var(--accent-soft);
}
.info-dialog-close:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.info-dialog-body {
  min-height: 0; padding: 15px 16px 18px; overflow-y: auto;
  font-size: 14.5px; line-height: 1.78; color: var(--ink-2);
}
.info-dialog-body > :first-child { margin-top: 0; }
.info-dialog-body p { margin: 0 0 10px; }
.info-dialog-body strong { color: var(--ink); }
.info-dialog-body a { color: var(--accent); word-break: break-all; }
.info-dialog-body .dl-main {
  display: block; margin: 0 0 10px; font-size: 15px; color: var(--ink);
}
.info-dialog-body .dl-main b { color: var(--accent); font-size: 19px; }
.info-dialog-body .dl-src { margin: 0; font-size: 13.5px; color: var(--ink-3); }
/* 天气源读数表 */
.wx-table { width: 100%; border-collapse: collapse; margin: 4px 0 12px; }
.wx-table th, .wx-table td {
  padding: 7px 8px; text-align: left; vertical-align: top;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
}
.wx-table th { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.wx-table td.num { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.wx-table tr.is-out td { color: var(--err); }
.wx-table tr.is-main td:first-child::after {
  content: "采用"; margin-left: 6px; padding: 0 5px;
  border-radius: 6px; background: var(--accent-soft); color: var(--accent);
  font-size: 11.5px; font-weight: 600; vertical-align: 1px;
}
.wx-tip { margin: 0; font-size: 13px; color: var(--ink-3); }

/* ── 响应式 ── */
@media (max-width: 720px) {
  .header-inner { gap: 12px; padding: 14px 20px; }
  .search { min-width: 0; }
  .search input { min-height: 52px; padding: 13px 20px; }
  .search button { min-height: 52px; min-width: 52px; }
  .brand { font-size: 19px; gap: 10px; }
  .brand-mark { width: 42px; height: 42px; }
  .cat-grid-inner { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }

  /* ── 站点卡片改两列 ──
     窄屏上原来是一条一行，两百来张卡片纵向拉得很长、读起来也散。
     这里改成两列自适应：卡片本身只放「图标 + 名称」，半屏宽足够。
     名称过长的卡片带 is-wide（构建时按字宽预估，脚本再按实际渲染校正），
     跨满整行，免得名称被省略号吞掉——即「文字多的一行一个」。
     注意 .grid 同时被口令解锁后的结果列表复用，这里一改两边都受益。 */
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid > li.is-wide { grid-column: 1 / -1; }
  .site-card { min-height: 60px; padding: 10px 12px; gap: 10px; }
  .site-card .logo { width: 30px; height: 30px; border-radius: 8px; font-size: 14px; }
  .site-name { font-size: 15px; }
  /* 跨整行仍然放不下的超长名称（带副标题那种），折成两行而不是再截一次 */
  .grid > li.is-wide .site-name {
    white-space: normal; display: -webkit-box; -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  }
  /* 窄屏下二维码与说明改上下排，读起来更舒展 */
  .join-card { flex-direction: column; align-items: flex-start; }
  .join-qr { width: 132px; height: 132px; }
  .topline h1 { font-size: 24px; }
  .intro h1 { font-size: 24px; }

  /* ── 底栏（页脚）适配手机 ──
     逐段纵排后，桌面那套 30px 上下留白 + 40px 列间距在手机上会把页脚撑到近一整屏。
     这里只收间距、不删内容：外距从 40 收到 28，内距从 30/20 收到 22/16；底部备案条同步收紧。 */
  .site-footer { padding: 22px 16px 18px; margin-top: 28px; }
  .footer-inner { gap: 18px 16px; }
  .footer-bottom { margin-top: 18px; padding-top: 14px; }
}

/* ≤380px（小屏安卓）：两列的可用宽度已经很紧，把图标与内边距再收一档，
   让 6 个字以内的名称仍能两列并排 —— 否则大半卡片都要退化成整行。 */
@media (max-width: 380px) {
  .grid { gap: 8px; }
  .site-card { min-height: 56px; padding: 9px 10px; gap: 8px; }
  .site-card .logo { width: 26px; height: 26px; border-radius: 7px; font-size: 13px; }
  .site-name { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .site-card:hover { transform: none; }
}

@media print {
  .site-header, .cat-nav, .search, .btn, .pref, .engines, .statusbar, .welcomebar { display: none; }
  body::before { display: none; }
  .site-card { break-inside: avoid; box-shadow: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   动态背景提示气泡（首次访问询问「是否打开背景」）
   ⚠️ 定位由 JS（placeAmbHint）按 #amb-toggle 的矩形算好、写成行内 left/top。
   纯 CSS 的 `left:50%; translate(-50%)` 在这里是错的：#amb-hint 是按钮的
   兄弟节点，百分比参照的是最近的「已定位祖先」（页头栈），实测会飘到页头
   正中、跟按钮完全脱钩。所以这里只留一个 0,0 的起点，别写死坐标。
   --amb-arrow / --amb-origin 由 JS 写入，箭头始终指向按钮中心。
   ═══════════════════════════════════════════════════════════════════ */
#amb-hint {
  position: absolute; top: 0; left: 0;   /* 真实坐标由 JS 写入 */
  z-index: 40;
  display: inline-flex; align-items: center; gap: 10px;
  max-width: calc(100vw - 20px);
  padding: 9px 10px 9px 14px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .18);
  font-size: 13.5px; line-height: 1.45; white-space: nowrap;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-6px) scale(.96);
  transform-origin: var(--amb-origin, 50%) 0;
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
#amb-hint.show {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateY(0) scale(1);
}
#amb-hint::before {
  content: ""; position: absolute; top: -5px; left: var(--amb-arrow, 50%);
  width: 10px; height: 10px; margin-left: -5px;
  background: var(--surface); border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: rotate(45deg);
}
.amb-hint-text { color: var(--ink-2); }
.amb-hint-btn {
  flex: none; min-height: 28px; padding: 0 12px;
  border: 0; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink, #fff);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  white-space: nowrap;
}
.amb-hint-btn:hover { filter: brightness(1.08); }
.amb-hint-x {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; padding: 0;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-3); cursor: pointer;
}
.amb-hint-x:hover { background: var(--surface-2); color: var(--ink); }
/* 窄屏：文本换行，宽度不再死撑（左右边界由 JS 夹住） */
@media (max-width: 640px) {
  .amb-hint-text { max-width: 46vw; white-space: normal; }
  #amb-hint::before { display: none; }
}
/* 打印时不要气泡 */
@media print { #amb-hint { display: none !important; } }

/* ═══════════════════════════════════════════════════════════════════
   邮箱统一登录面板（#mail 区块顶部）
   ⚠️ 不做「代填密码」：163 直提返回 LOGINONE_ILLEGAL，QQ/Gmail 走 JS 加密或 OAuth，
   静态站无法提交。这里改成就地内嵌各邮箱官网登录页 —— 密码输在官网框里，
   提交是真提交，二维码也天然带。不可内嵌的（SOHO/Gmail/Outlook/阿里/通厦）走新窗口。
   ═══════════════════════════════════════════════════════════════════ */
.mail-unified {
  margin: 0 0 12px; padding: 14px 16px 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  backdrop-filter: saturate(165%) blur(6px);
  -webkit-backdrop-filter: saturate(165%) blur(6px);
}
@supports not (backdrop-filter: blur(1px)) {
  .mail-unified { background: var(--surface); }
}
.mu-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.mu-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.mu-note { font-size: 12.5px; color: var(--ink-3); }
.mu-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mu-field { display: flex; align-items: center; gap: 8px; }
.mu-lb { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.mu-user, .mu-dom {
  height: 36px; padding: 0 12px; font: inherit; font-size: 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink);
}
.mu-user { width: 190px; }
.mu-dom { min-width: 148px; cursor: pointer; }
.mu-user::placeholder { color: var(--ink-3); }
.mu-user:focus, .mu-dom:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 65%, transparent);
  outline-offset: 1px;
}
.mu-at { color: var(--ink-3); font-size: 14px; }
.mu-go {
  height: 36px; padding: 0 20px; border: 0; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink, #fff);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.mu-go:hover { filter: brightness(1.07); }
.mu-open {
  height: 36px; display: inline-flex; align-items: center; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink-2); font-size: 13.5px; text-decoration: none;
}
.mu-open:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--accent); }
.mu-tip { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-3); }
.mu-sub { margin: 0 0 8px; font-size: 12.5px; color: var(--ink-3); }
.mu-stage {
  margin-top: 12px; border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; background: var(--surface);
}
.mu-stage[hidden] { display: none; }
.mu-frame { display: block; width: 100%; height: 560px; border: 0; background: #fff; }
/* AI 对话台沿用同一套面板骨架（HTML 上是 .mail-unified.ai-desk），
   只有对话区要更高一点 —— 官方聊天页的输入框常贴在视口底部，560 会把它裁掉。 */
.ai-desk .mu-frame { height: 640px; }
.mu-block { padding: 30px 20px; text-align: center; }
.mu-block[hidden] { display: none; }
.mu-block-t { margin: 0 0 14px; color: var(--ink-2); font-size: 14px; }
.mu-block-a {
  display: inline-flex; height: 36px; align-items: center; padding: 0 16px;
  border-radius: 10px; background: var(--accent); color: var(--accent-ink, #fff);
  font-size: 14px; font-weight: 600; text-decoration: none;
}
/* 面板下方那排「直达官网」：比普通卡片小一号，避免抢走统一登录的注意力 */
.mail-links .site-card { min-height: 52px; padding: 9px 12px; gap: 10px; }
.mail-links .site-card .logo { width: 26px; height: 26px; border-radius: 7px; }
.mail-links .site-card .site-name { font-size: 14.5px; }
@media (max-width: 720px) {
  .mail-unified { padding: 12px 12px 14px; }
  .mu-form { gap: 8px; }
  /* 窄屏每项独占一行：flex:1 + min-width:0 只会「挤压」不会换行，必须给死 basis */
  .mu-field { flex: 1 1 100%; }
  .mu-field + .mu-at { display: none; }        /* 下拉里已带 @域名，分隔符多余 */
  .mu-lb { display: none; }                    /* 占位符已说明用途，标签让位给输入框 */
  .mu-field .mu-user, .mu-field .mu-dom { width: 100%; }
  .mu-go { flex: 1 1 auto; }
  .mu-open { flex: 0 0 auto; }
  .mu-frame { height: 480px; }
  .ai-desk .mu-frame { height: 520px; }
}

/* >>> NOVA_TIP_CSS >>> */
/* ══════════════════════════════════════════════════════════════════
   Nova 浏览器引流浮层（右下角）
   ──────────────────────────────────────────────────────────────────
   驱动：全站 17 页 body 末尾的 #nova-tip + site.js 里的 novaTip 段。
   节奏：1.5s 后浮出；关闭写 localStorage 冷却 30 天；同一会话只弹一次
        （sessionStorage），避免在分类页之间跳转时反复打扰。
   已是 Nova 用户（UA 含 NovaBrowser）不显示。

   ⚠️ z-index 取 2147483000：本站自身最高只到 100（.skip-link），
      以后再加全局 toast / 提示条，记得回来确认层级，别被浮层压住。
   ⚠️ 深色主题必须提亮底色：原 rgba(23,25,32,.94) 与深色页面同调，
      卡片边界会糊掉，只剩文字浮着。
   ⚠️ 关闭按钮与下载按钮都补到 ≥32px 命中区（本站无障碍基线是 44px，
      但浮层头部只有 20px 高，做到 32px 是视觉与可点性的折中）。
   ══════════════════════════════════════════════════════════════════ */
#nova-tip {
  position: fixed;
  right: 16px;
  /* iOS 底部 Home 条 / 浏览器工具条会吃掉这 16px，垫一层安全区 */
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 2147483000;
  /* 300px 时描述句会在「更省内 / 存。」处断行，末行只剩一个孤字；
     320 刚好整句一行，配合 text-wrap:pretty 兜住其它断行 */
  max-width: 320px;
  display: none;
  box-sizing: border-box;
  font: 13px/1.55 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: rgba(23, 25, 32, .94);
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .28);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  animation: novaTipIn .35s ease both;
  text-align: left;
  text-wrap: pretty;
}
#nova-tip.nova-tip-on { display: block; }

/* 深色主题：提亮一档 + 内侧描边，保住卡片边界 */
:root[data-mode="dark"] #nova-tip {
  background: rgba(40, 43, 53, .96);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .5),
              inset 0 0 0 1px rgba(255, 255, 255, .08);
}

@keyframes novaTipIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

#nova-tip .nova-tip-h { display: flex; align-items: flex-start; gap: 8px; }
#nova-tip .nova-tip-t { flex: 1; font-weight: 600; font-size: 13px; }
#nova-tip .nova-tip-x {
  /* 视觉仍是小叉，命中区靠 padding + 负 margin 撑到 ~30px */
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; min-height: 30px;
  margin: -8px -8px 0 0;
  border: 0; background: transparent; color: rgba(255, 255, 255, .55);
  font-size: 16px; line-height: 1; cursor: pointer; border-radius: 8px;
}
#nova-tip .nova-tip-x:hover { color: #fff; background: rgba(255, 255, 255, .12); }
#nova-tip .nova-tip-x:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
#nova-tip .nova-tip-d { margin-top: 6px; color: rgba(255, 255, 255, .78); font-size: 12px; }
#nova-tip .nova-tip-a {
  display: inline-flex; align-items: center; min-height: 32px;
  margin-top: 10px; padding: 0 14px; border-radius: 9px;
  background: linear-gradient(135deg, #2D6BF5, #5B8BFF); color: #fff;
  text-decoration: none; font-weight: 600; font-size: 12.5px;
}
#nova-tip .nova-tip-a:hover { filter: brightness(1.06); }
#nova-tip .nova-tip-a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* 窄屏改通栏贴底：max-width 300 在 390px 视口里会缩在角落，字被挤成三行 */
@media (max-width: 560px) {
  #nova-tip {
    left: 12px; right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    max-width: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  #nova-tip { animation: none; }
}
/* <<< NOVA_TIP_CSS <<< */
