/* =====================================================================
   app.css —— 共用样式（科技感皮肤）
   T1–T7 七个页面共用。分四层：
     ① 设计变量（配色、圆角、阴影、字体）
     ② 基础与页面骨架（.wrap / .page-title / .card / .btn / .hint ...）
     ③ 各页面自用组件（转盘、清单、打卡日历、照片分类、问卷录入、图表框）
     ④ 响应式 + 打印（打印稿只留正文，横竖都以 A4 为准）
   ---------------------------------------------------------------------
   配色说明：变量名沿用原来的叫法（--green / --amber / --orange），
   但取值换成了科技感的青绿、琥珀、橙红，这样每个页面自己的 <style>
   里的写法不用改也能一起变。
   默认深色（深空底 + 青色霓虹）；点右上角「配色」可切到浅色。
   ===================================================================== */

/* ==========================================================
   ① -1 字体：全部镜像回本站，不引任何外链
   原来是 Google Fonts 的用法。本站要离线可用（安卓 pad、打印），
   所以 woff2 放在 assets/fonts/ 里，由 lighttpd 跟着站点一起发。
   unicode-range 只声明拉丁区：中文不在这个范围，浏览器直接落到
   后面的系统中文字体，既不会去下载、也不会出现"字体没到先空白"。
   许可：两者都是 SIL OFL 1.1（assets/fonts/OFL-*.txt）。
   ========================================================== */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================
   ① 设计变量
   ========================================================== */
:root {
  /* ============================================================
     配色：深海蓝 + 明快糖色（"海洋馆"）
     给小学低年级用，所以：
       · 底色是中调深蓝，不是纯黑也不是白纸——不刺眼、不发闷
       · 卡片比底色亮约 1.6:1，边界一眼看得出（太接近会让人眼睛累）
       · 每个工具一个明快实色，圆胖色块，像玩具
       · 文字一律暖白 #f2f7fd，不用纯白
     ============================================================ */
  --bg:          #1b3350;
  --bg-2:        #213c5c;
  --card:        #28496e;
  --card-2:      #315a84;
  --card-solid:  #28496e;
  --panel:       #28496e;
  --line:        rgba(13, 29, 49, .55);
  --line-2:      rgba(13, 29, 49, .8);
  --edge:        #0d1d31;              /* 粗描边：整套"积木感"的骨架 */

  /* —— 中性面（页面里原来写死浅色的地方，统一由这几个变量接管）—— */
  --surface:   #213c5c;                /* 输入区、小块 */
  --surface-2: #1a3048;                /* 输入框（比卡片略深，读起来像"凹陷"）*/
  --surface-3: #213c5c;                /* 表格、图片池 */
  --chrome:    #213c5c;                /* 提示条、弹窗 */
  /* 照片 / 画布底：始终压白，免得深色底把图画糊了 */
  --white:     #ffffff;
  /* 打印时覆盖上面几个 */
  --print-solid: #fff;
  --print-tint:  #f2f5f3;
  --print-line:  #9aa5a0;

  /* —— 文字 —— */
  --ink:   #f2f7fd;
  --ink-2: #d3e2f2;
  --ink-3: #b4c9e0;
  /* 压在"最暗底色"上的次要文字。
     底色越暗，灰字越糊：实测网页说明用 --ink-2 只有 4.36、
     页脚那段更只有 3.38，都不到 4.5。这两处单独用更亮的一档。 */
  --ink-soft: #e4eff9;
  --grey:  #b4c9e0;

  /* —— 语义色 —— */
  /* --green 是"成功/进行中"的老名字，保留以免页面里的写法失效 */
  --green:    #4fd0c2;
  --green-d:  #6fe0d3;
  --green-l:  #1c4a48;
  --accent:   #5cc0e8;
  --accent-d: #9ad9f2;
  --accent-l: #1f4d5f;
  /* 琥珀：提醒 */
  --amber:   #f2c14e;
  --amber-l: #5a4a1e;
  --amber-d: #f7d689;
  /* 橙红：警示 */
  --orange:   #f0975c;
  --orange-l: #553522;
  --orange-d: #f7bd94;
  --grey-l:   #213c5c;
  /* 深色文字（压在明快实色块上用）—— 对 7 个实色实测 5.9–9.3:1 */
  --on-solid:  #16262b;
  --on-accent: #16262b;
  --on-amber:  #16262b;
  --on-orange: #16262b;

  /* —— 7 个工具的主题色（首页卡片和阶段徽标用）—— */
  --s1:#f07a8e; --s2:#5cc0e8; --s3:#f2c14e; --s4:#79cf85;
  --s5:#b295ea; --s6:#f0975c; --s7:#4fd0c2;

  /* —— 阴影：实心厚投影（像贴纸/积木），不是柔光 —— */
  --sh:      0 4px 0 var(--edge);
  --sh-2:    0 6px 0 var(--edge);
  --sh-up:   0 9px 0 var(--edge);
  --glow:    0 4px 0 var(--edge);
  --glow-g:  0 4px 0 var(--edge);
  --glow-a:  0 4px 0 var(--edge);

  /* —— 字体 ——
     --font   正文：中文为主，走系统字族（不引外链、不下载）
     --display 标题/品牌/标签：拉丁走 Space Grotesk（本站镜像），
               中文因为不在它的 unicode-range 里，自动接系统中文字体
     --mono   数字、序号、代码：JetBrains Mono，数据类必须等宽 */
  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB",
          "Noto Sans SC", "Source Han Sans SC", system-ui, -apple-system, sans-serif;
  --display: "Space Grotesk", "Microsoft YaHei", "PingFang SC",
             "Hiragino Sans GB", "Noto Sans SC", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas,
          "SFMono-Regular", "Courier New", monospace;

  /* —— 层级（.card 有 4 档，原来全是同一个值和同一个阴影，分不出主次）—— */
  --r:    28px;   /* 外层卡片（大圆角=积木感） */
  --r-md: 20px;   /* 卡片里的小块 */
  --r-sm: 12px;   /* 控件 */
  --r-xs: 10px;   /* 最小的徽标、编号 */
  --top:  58px;

  /* —— z-index 阶梯（原来弹窗直接用 9999）—— */
  --z-rail:   40;
  --z-top:    60;
  --z-mask:   800;
  --z-toast:  900;
}

/* 浅色配色：点「配色」切换，落在 <html data-theme="light"> 上 */
:root[data-theme="light"] {
  /* 浅色版：浅天蓝底 + 近白卡片 + 同一套深色描边（保持"积木"骨架） */
  --bg:          #dfebf6;
  --bg-2:        #d3e3f2;
  --card:        #f4f8fc;
  --card-2:      #e9f2fa;
  --card-solid:  #f4f8fc;
  --panel:       #f4f8fc;
  --surface:     #e9f2fa;
  --surface-2:   #ffffff;
  --surface-3:   #e9f2fa;
  --chrome:      #ffffff;
  --line:        rgba(20, 38, 60, .5);
  --line-2:      rgba(20, 38, 60, .72);
  --edge:        #14263c;
  --ink:   #14263c;
  --ink-2: #3f5570;
  --ink-3: #566d88;
  --ink-soft: #33485f;
  --grey:  #566d88;
  /* 语义色在浅底上要压深，才能当文字用 */
  --green:    #1f7a72;
  --green-d:  #17615a;
  --green-l:  #d3eeec;
  --accent:   #1b6690;
  --accent-d: #14506f;
  --accent-l: #d7eaf6;
  --amber:   #8a5f14;
  --amber-l: #f7e8c9;
  --amber-d: #6d4a0f;
  --orange:   #9c5220;
  --orange-l: #f7e0cd;
  --orange-d: #7a3f18;
  --grey-l:   #e9f2fa;
  /* 浅色下实色块配白字 */
  --on-solid:  #ffffff;
  --on-accent: #ffffff;
  --on-amber:  #ffffff;
  --on-orange: #ffffff;
  --sh:    0 4px 0 var(--edge);
  --sh-2:  0 6px 0 var(--edge);
  --sh-up: 0 9px 0 var(--edge);
  --glow:  0 4px 0 var(--edge);
  --glow-g:0 4px 0 var(--edge);
  --glow-a:0 4px 0 var(--edge);
}

/* ==========================================================
   ② 基础
   ========================================================== */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--ink);
  background-color: var(--bg);
  /* ============================================================
     深海背景：三层叠出来，不用任何图片文件（离线可用、打印不上纸）
       ① 水体：上浅下深的垂直渐变 —— 读起来就是"越往下越暗"
       ② 光束：四条不同角度的斜向亮带（水面透下来的光）
       ③ 海底：底部两条沙脊
     全用渐变画：不增加请求，也不会因为图片挂了变成一片空白。
     ============================================================ */
  background-image:
    /* ③ 海底沙脊 */
    radial-gradient(120% 130px at 20% 101%, rgba(126, 172, 205, .24), transparent 70%),
    radial-gradient(95% 100px at 76% 102%, rgba(108, 152, 190, .20), transparent 72%),
    /* ② 光束 */
    linear-gradient(102deg, transparent 7%,  rgba(150, 215, 245, .11) 13%, transparent 21%),
    linear-gradient(96deg,  transparent 29%, rgba(150, 215, 245, .075) 36%, transparent 45%),
    linear-gradient(108deg, transparent 57%, rgba(150, 215, 245, .095) 64%, transparent 74%),
    linear-gradient(99deg,  transparent 81%, rgba(150, 215, 245, .065) 87%, transparent 96%),
    /* ① 水体 */
    linear-gradient(180deg, #26496f 0%, #1f3c5f 30%, #19314e 64%, #122540 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-attachment: fixed;
}
/* 光束极慢地"晃"一下，让背景有呼吸感；只动 background-position，开销很低。
   周期 26s，几乎察觉不到在动，但静止久了不会那么死。 */
@keyframes seaLight {
  0%   { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
  50%  { background-position: 0 0, 0 0, 28px 0, -20px 0, 32px 0, -24px 0, 0 0; }
  100% { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
}
@media (prefers-reduced-motion: no-preference) {
  body { animation: seaLight 26s ease-in-out infinite; }
}

/* ==========================================================
   ② -0 上浮的水泡（整页背景装饰）
   只有这一层、全部会动——所以永远不会出现"卡住不动的气泡"。
   深度感靠四件事一起做，不是只改透明度：
     尺寸 22→76px（小的多、大的少）
     透明度 小的淡(.30) → 大的浓(.86)
     模糊   小的先就带点虚(--b)，大的清晰
     速度   小的飘得快（像近处）、大的慢（像远处）——透视主要靠这个
   每颗两段动画：rise 从下往上飘并轻微左右摆，pop 让透明度呼吸。
   周期 22–44s 加负 delay 错开：一进页面就是"已经在飘"的状态。 */
.bubbles {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0;
  overflow: hidden; pointer-events: none; z-index: 0;
}
.bubbles i {
  position: absolute; bottom: -22vh; display: block; width: 76px; height: 76px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='17' fill='none' stroke='%23eaf6ff' stroke-opacity='.78' stroke-width='2.2'/%3E%3Ccircle cx='21' cy='18' r='14' fill='%23bfe2ff' fill-opacity='.28'/%3E%3Ccircle cx='13.5' cy='13' r='4.4' fill='%23ffffff' fill-opacity='.88'/%3E%3C/svg%3E") center/contain no-repeat;
  animation: rise linear infinite, pop ease-in-out infinite alternate;
}
@keyframes rise {
  0%  { transform: translate3d(0,0,0) scale(var(--s,.6)); opacity: 0; filter: blur(var(--b,0px)); }
  9%  { opacity: var(--o,.7); }
  50% { transform: translate3d(20px,-58vh,0) scale(var(--s,.6)); }
  86% { opacity: var(--o,.7); }
  100%{ transform: translate3d(-12px,-116vh,0) scale(var(--s,.6)); opacity: 0; filter: blur(var(--b,0px)); }
}
/* pop 只动 opacity：和 rise 里的 filter 分开写，否则同一个属性两边会互相覆盖 */
@keyframes pop {
  from { opacity: calc(var(--o,.7) * .72); }
  to   { opacity: var(--o,.7); }
}
/* 小泡（远）：淡 + 虚 + 飘得快 */
.bubbles i:nth-child(1) { left:5%;  --s:.30;--o:.34;--b:1.5px;animation-duration:22s,3.4s;animation-delay:-3s,-1s }
.bubbles i:nth-child(2) { left:13%; --s:.34;--o:.38;--b:1.3px;animation-duration:24s,3.8s;animation-delay:-17s,-2s }
.bubbles i:nth-child(3) { left:21%; --s:.28;--o:.30;--b:1.7px;animation-duration:20s,3.2s;animation-delay:-9s,-.6s }
.bubbles i:nth-child(4) { left:29%; --s:.40;--o:.44;--b:1.1px;animation-duration:27s,4.2s;animation-delay:-23s,-2.6s }
.bubbles i:nth-child(5) { left:38%; --s:.32;--o:.36;--b:1.4px;animation-duration:23s,3.6s;animation-delay:-6s,-1.4s }
/* 中泡（中景）：半透、轻微虚 */
.bubbles i:nth-child(6) { left:46%; --s:.56;--o:.58;--b:.6px;animation-duration:31s,4.8s;animation-delay:-13s,-2s }
.bubbles i:nth-child(7) { left:54%; --s:.62;--o:.64;--b:.5px;animation-duration:33s,5.2s;animation-delay:-27s,-3s }
.bubbles i:nth-child(8) { left:62%; --s:.52;--o:.55;--b:.7px;animation-duration:30s,4.6s;animation-delay:-19s,-1.2s }
.bubbles i:nth-child(9) { left:70%; --s:.66;--o:.66;--b:.4px;animation-duration:34s,5.4s;animation-delay:-8s,-2.4s }
.bubbles i:nth-child(10){ left:78%; --s:.58;--o:.60;--b:.6px;animation-duration:32s,5s;  animation-delay:-25s,-3.4s }
/* 大泡（近）：浓、清晰、飘得慢 */
.bubbles i:nth-child(11){ left:86%; --s:.92;--o:.80;--b:0px;animation-duration:40s,6s;  animation-delay:-11s,-1.6s }
.bubbles i:nth-child(12){ left:94%; --s:1.00;--o:.86;--b:0px;animation-duration:44s,6.6s;animation-delay:-31s,-3.2s }
.bubbles i:nth-child(13){ left:10%; --s:.84;--o:.76;--b:0px;animation-duration:38s,5.6s;animation-delay:-21s,-2.2s }
.bubbles i:nth-child(14){ left:66%; --s:.96;--o:.84;--b:0px;animation-duration:42s,6.2s;animation-delay:-35s,-1s }
.bubbles i:nth-child(15){ left:44%; --s:.78;--o:.72;--b:.2px;animation-duration:36s,5.8s;animation-delay:-15s,-2.8s }
/* 极淡的噪点：纯平色块看着"塑料"，加一层颗粒就有质感了。
   用 SVG 内联（feTurbulence），不引任何外部图片 */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0;
  pointer-events: none; opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
}
:root[data-theme="light"] body::before { opacity: .22; mix-blend-mode: multiply; }
.wrap { position: relative; z-index: 1; }
/* 浅色版不需要那层水泡（浅底上白泡看不见，反而显得脏） */
:root[data-theme="light"] .bubbles { display: none; }
::selection { background: rgba(92, 192, 232, .38); }

a { color: var(--accent-d); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 滚动条也一起换掉 */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--line-2); border-radius: 99px;
  border: 3px solid transparent; background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--green); background-clip: content-box; }

/* 页面骨架 */
.wrap { max-width: 1020px; margin: 0 auto; padding: 18px 18px 56px; }

/* ==========================================================
   ② -1 顶部导航条（由 store.js 生成）
   ========================================================== */
/* 顶栏：就是页面最上面的一条**普通元素**。
   这块我连着改错三次，把结论写在这儿，免得再绕：
     ① 胶囊 + sticky → 滚动时内容从圆角两侧钻出来（遮挡）
     ② 改成通栏 → 胶囊形态丢了
     ③ 胶囊 + 负外边距 / 固定顶部区 + 独立滚动区 → 越搞越复杂，都不是要的东西
   要的其实很简单：**丢在页面顶上，不要浮层**。
   所以：position: static（正常文档流）、不吸顶、不固定、不加负边距、
   不需要遮盖层、也不需要 JS 去同步任何高度。滚动时它跟着页面一起走。 */
/* （这里曾有一份重复的 #topZone 规则，落在窄屏媒体查询里，已删；
   顶部区的参数统一在文件前部那份里定义 —— 注意要和 .wrap 用同一组数字：
   max-width 1020px + 左右 18px 内边距，否则会差 20px 错位） */

/* 顶部区：**就是页面顶部的普通元素**（不吸顶、不浮动、不固定）。
   里面按顺序平铺：主标题栏 → 导航条（工具页才有）→ 内容。
   order 用来把导航条排在标题栏下面，这样它插进插出都不会撑破布局：
   在首页时导航条不在里面，在工具页时插进来。
   限宽和 .wrap 一致（1020px + auto），所以三段左右边界是同一条线。 */
#topZone {
  position: static;
  display: flex; flex-direction: column;
  max-width: 1020px; margin: 0 auto;
  padding: 0 18px;
  box-sizing: border-box;
}
#topZone > .sca-top { order: 1; }
#topZone > #homeFlow { order: 2; }
.sca-top {
  position: static;
  display: flex; align-items: center; gap: 13px;
  margin: 0 0 22px; padding: 9px 12px 9px 9px;
  background: var(--card);
  border: 3px solid var(--edge); border-radius: 999px;
  box-shadow: 0 4px 0 var(--edge);
}
.sca-top-mid { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.sca-top-act { display: flex; gap: 10px; flex: none; }
/* scaFlow 关键帧已删：它只服务于那条已去掉的顶栏流动细光 */

.sca-brand {
  display: flex; align-items: center; gap: 13px;
  color: var(--ink); text-decoration: none; flex: none;
}
.sca-brand:hover { text-decoration: none; }
.sca-brand-t { display: flex; flex-direction: column; line-height: 1.15; }
.sca-brand-t b { font-size: 18px; font-weight: 900; letter-spacing: .03em; }
.sca-brand-t em {
  font-style: normal; font-family: var(--mono); font-size: 11px;
  letter-spacing: .14em; color: var(--ink-soft); font-weight: 700;
}
/* 品牌标记：大圆盘 + 实色底 + 深色图标 + 内圈白环（对齐示例页的图标处理） */
.sca-logo {
  display: grid; place-items: center;
  width: 52px; height: 52px; flex: none;
  color: var(--on-solid);
  border: 3px solid var(--edge); border-radius: 50%;
  background: var(--s2);
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.34), 0 2px 0 var(--edge);
}
/* 自绘细线图标（store.js 的 SCA.icon / BRAND）：统一跟着文字颜色走 */
.sca-glyph, .sca-logo svg { display: block; }
.sca-top-name {
  display: flex; flex-direction: column; line-height: 1.12;
  font-family: var(--display);
  font-weight: 900; font-size: 18px; letter-spacing: -.01em;
}
.sca-top-name em {
  font-style: normal; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .16em; color: var(--ink-soft); font-weight: 700;
}

.sca-top-mid { display: flex; align-items: center; gap: 10px; margin-left: auto; min-width: 0; }
.sca-stepn {
  font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: .04em;
  color: var(--ink-soft); padding: 6px 14px;
  border: 2.5px solid var(--edge); border-radius: 99px; background: var(--card);
  white-space: nowrap;
}
.sca-stepn b { color: var(--ink); font-size: 14.5px; }
.sca-steplab {
  font-size: 13.5px; font-weight: 700; color: var(--ink-soft);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.sca-top-act { display: flex; gap: 8px; flex: none; }
/* 顶栏右侧按钮：照示例页 —— 琥珀实底 + 深字 + 粗描边 + 厚底影，54px 高 */
.sca-icobtn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font); font-size: 15px; font-weight: 900;
  color: var(--on-solid); background: var(--s3); cursor: pointer;
  border: 3px solid var(--edge); border-radius: 999px;
  padding: 12px 19px; min-height: 54px;
  box-shadow: 0 4px 0 var(--edge);
  transition: transform .1s, box-shadow .1s, filter .16s;
}
.sca-icobtn:hover { filter: brightness(1.06); }
.sca-icobtn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge); }

/* ==========================================================
   ② -2 步骤条：7 个工具一条线
   ========================================================== */
.sca-rail {
  display: flex; align-items: center; flex-wrap: wrap; gap: 9px 5px;
  /* 左右各多让出 18px（等于 .wrap 的内边距）：七个工具片才排得下一行 */
  margin: 0 -18px 22px; padding: 10px 18px; overflow-x: visible;
  background: var(--card); border: 3px solid var(--edge); border-radius: 26px;
  box-shadow: var(--sh);
}
/* 原来是一条横向滚动条：窗口不够宽时最后一个工具被切掉一半，
   而且没有任何"这里还能滑"的提示。改成自动换行，七个都在。
   连接线只占固定宽度，不抢空间，否则会把前面的小片推得疏密不均。 */
/* hidden 属性必须真的生效。
   .sca-rail / .sca-foot 都写了 display:flex|block，优先级高于浏览器默认的
   [hidden]{display:none}，所以 JS 设了 hidden=true 元素照样显示 ——
   这就是"首页明明设了隐藏、导航条还在"的原因。显式补一条。 */
[hidden] { display: none !important; }
.sca-rail::-webkit-scrollbar { display: none; }
.sca-rail-line { flex: 0 1 14px; min-width: 6px; }
.sca-chip {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  padding: 4px 14px 4px 5px; border-radius: 99px;
  border: 2.5px solid var(--edge); color: var(--ink-2);
  background: var(--card-2);
  font-size: 15px; font-weight: 900; white-space: nowrap; text-decoration: none;
  box-shadow: 0 2px 0 var(--edge);
  transition: transform .12s, color .16s, background .16s, box-shadow .12s;
}
.sca-chip:hover { color: var(--ink); background: var(--card); transform: translateY(-1px); text-decoration: none; }
.sca-chip:active { transform: translateY(2px); box-shadow: none; }
/* 序号圆盘：和首页卡片"同款色"——每个工具用自己的主题色。
   用 store.js 打的 i-t1…i-t7 类名，不用 nth-child（rail 里夹着连接线元素，
   nth-child 会数错、整体错位）。原来七个都是同一个青色，跟卡片对不上。 */
.sca-chip i {
  font-style: normal; font-family: var(--mono); font-size: 13px; font-weight: 700;
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 50%; border: 2.5px solid var(--edge);
  color: var(--on-solid);
  box-shadow: inset 0 0 0 2.5px rgba(255,255,255,.38);
}
.sca-chip.i-t1 i { background: var(--s1); }
.sca-chip.i-t2 i { background: var(--s2); }
.sca-chip.i-t4 i { background: var(--s4); }
.sca-chip.i-t5 i { background: var(--s6); }
.sca-chip.i-t3 i { background: var(--s5); }
.sca-chip.i-t6 i { background: var(--s7); }
.sca-chip.i-t7 i { background: var(--s3); }
/* 当前在哪个工具：不换底色，改用"描边 + 泛光"来表示选中 */
.sca-chip.on {
  color: var(--ink); font-weight: 900;
  background: var(--card);
  border-color: var(--s2);
  box-shadow: 0 2px 0 var(--edge), 0 0 0 4px rgba(92,192,232,.38), 0 0 20px rgba(92,192,232,.5);
}
.sca-chip.on i { box-shadow: inset 0 0 0 2.5px rgba(255,255,255,.55), 0 0 10px rgba(255,255,255,.35); }
/* 泛光跟着该工具自己的颜色走 */
.sca-chip.on.i-t1 { border-color: var(--s1); box-shadow: 0 2px 0 var(--edge), 0 0 0 4px rgba(240,122,142,.38), 0 0 20px rgba(240,122,142,.5); }
.sca-chip.on.i-t2 { border-color: var(--s2); box-shadow: 0 2px 0 var(--edge), 0 0 0 4px rgba(92,192,232,.38),  0 0 20px rgba(92,192,232,.5); }
.sca-chip.on.i-t4 { border-color: var(--s4); box-shadow: 0 2px 0 var(--edge), 0 0 0 4px rgba(121,207,133,.38), 0 0 20px rgba(121,207,133,.5); }
.sca-chip.on.i-t5 { border-color: var(--s6); box-shadow: 0 2px 0 var(--edge), 0 0 0 4px rgba(240,151,92,.38),  0 0 20px rgba(240,151,92,.5); }
.sca-chip.on.i-t3 { border-color: var(--s5); box-shadow: 0 2px 0 var(--edge), 0 0 0 4px rgba(178,149,234,.38), 0 0 20px rgba(178,149,234,.5); }
.sca-chip.on.i-t6 { border-color: var(--s7); box-shadow: 0 2px 0 var(--edge), 0 0 0 4px rgba(79,208,194,.38),  0 0 20px rgba(79,208,194,.5); }
.sca-chip.on.i-t7 { border-color: var(--s3); box-shadow: 0 2px 0 var(--edge), 0 0 0 4px rgba(242,193,78,.38),  0 0 20px rgba(242,193,78,.5); }
.sca-rail-line {
  /* 保留这条规则：万一以后又在片之间加连接线，不至于没样式 */
  flex: 0 1 8px; min-width: 4px; height: 1px; font-style: normal;
  background: linear-gradient(90deg, transparent, var(--line-2), transparent);
}

/* ==========================================================
   ② -3 标题区
   ========================================================== */
.page-title {
  position: relative;
  font-family: var(--display);
  font-size: 26px; font-weight: 700; letter-spacing: -.015em;
  padding: 0 0 12px 16px; margin-bottom: 6px;
}
.page-title::before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 15px; width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent), var(--green));
  box-shadow: 0 0 16px rgba(56, 189, 248, .6);
}
.page-title::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, rgba(56, 189, 248, .55), rgba(46, 230, 168, .28) 38%, transparent 82%);
}
.pt-ico {
  font-size: 14px; font-weight: 700; vertical-align: 3px;
  letter-spacing: .04em; font-family: var(--mono);
  color: var(--green-d); padding: 3px 9px; margin-right: 6px;
  border: 1px solid rgba(46, 230, 168, .38); border-radius: var(--r-xs);
  background: var(--green-l);
  box-shadow: inset 0 0 16px rgba(46, 230, 168, .12);
}
.page-sub {
  font-size: 15px; color: var(--ink-soft); line-height: 1.85;
  margin: 10px 0 22px; max-width: 62ch;
}
.page-sub b { color: var(--green-d); }

/* ==========================================================
   ② -4 卡片
   ========================================================== */
.card {
  position: relative;
  background: var(--card);
  border: 3px solid var(--edge);
  border-radius: var(--r);
  padding: 20px 22px;
  margin: 16px 0;
  box-shadow: var(--sh);
  transition: box-shadow .18s;
}
/* 卡片顶部那条主题色细带（每个工具的卡片用自己的色，见下面的 i- 类）。
.card::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 4px;
  /* 圆角这里刻意写像素值、不用 var(--r)：CSS 圆角是"外半径 = 内半径 + 边框宽"，
     写成 28px 且边框 3px 时内弧度自动算成 25px，正好贴住外框内侧。
     用变量的话弧度对不上，细带两端就会从圆角处"冒"出去
     （原来那条 1px 渐变高光就是这么溢出的，已删）。 */
  border-radius: 28px 28px 0 0;
  background: var(--hdr, var(--s2));
}
/* 每个工具的卡片用自己那个色：顶部细带 + 卡片标题同一色系 */
body.t1 .card { --hdr: var(--s1); }
body.t2 .card { --hdr: var(--s2); }
body.t4 .card { --hdr: var(--s4); }
body.t5 .card { --hdr: var(--s6); }
body.t3 .card { --hdr: var(--s5); }
body.t6 .card { --hdr: var(--s7); }
body.t7 .card { --hdr: var(--s3); }

.card:hover { border-color: var(--edge); }

.card h3 {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 12px; font-family: var(--display);
  font-size: 16.5px; font-weight: 800; letter-spacing: -.01em;
  color: var(--hdr, var(--ink));
}
.card h3 .no {
  display: grid; place-items: center; flex: none;
  min-width: 34px; height: 34px; padding: 0 8px;
  font-family: var(--mono); font-size: 13px; font-weight: 800; line-height: 1;
  color: var(--on-solid);
  border: 3px solid var(--edge); border-radius: 50%;
  background: var(--s2);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.34), 0 2px 0 var(--edge);
}
.card h3 .no.amber { color: var(--on-solid); background: var(--s3); }

/* ==========================================================
   ② -5 按钮
   ========================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-size: 14.5px; font-weight: 900; line-height: 1;
  color: var(--on-solid); cursor: pointer;
  padding: 12px 19px; border: 3px solid var(--edge); border-radius: 99px;
  background: var(--s2);
  box-shadow: var(--sh);
  transition: transform .12s, box-shadow .12s, filter .18s, opacity .18s;
}
.btn:hover { filter: brightness(1.06); box-shadow: var(--sh-2); transform: translateY(-2px); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge); }
.btn:focus-visible { outline: 2px solid var(--accent-d); outline-offset: 2px; }
/* 键盘焦点统一可见（无障碍要求，不是可选项） */
.opt:focus-visible, .obtn:focus-visible, .pill:focus-visible, .sca-chip:focus-visible,
.sca-icobtn:focus-visible, a:focus-visible, .ph .mv:focus-visible, .del:focus-visible {
  outline: 2px solid var(--accent-d); outline-offset: 2px; border-radius: var(--r-xs);
}
.btn[disabled], .btn:disabled {
  cursor: not-allowed; opacity: .42; filter: grayscale(.55);
  transform: none; box-shadow: none;
}

.btn.amber { color: var(--on-solid); background: var(--s3); box-shadow: var(--sh); }
.btn.amber:hover { box-shadow: var(--sh-2); }

.btn.ghost {
  color: var(--ink); background: var(--card-2);
  border-color: var(--edge); box-shadow: var(--sh);
}
.btn.ghost:hover { background: var(--card); box-shadow: var(--sh-2); }

.btn.grey { color: var(--ink-2); background: var(--card-2); border-color: var(--edge); box-shadow: var(--sh); }
.btn.grey:hover { color: var(--ink); background: var(--card); box-shadow: var(--sh-2); }

.btn.sm { padding: 9px 15px; font-size: 13.5px; }

/* ==========================================================
   ② -6 表单
   ========================================================== */
input[type=text], input[type=number], input[type=date], input[type=search],
select, textarea {
  width: 100%; padding: 9px 12px;
  font-family: inherit; font-size: 13.5px; line-height: 1.5;
  color: var(--ink); background: var(--surface-2);
  border: 2.5px solid var(--edge); border-radius: var(--r-sm);
  transition: border-color .16s, box-shadow .16s, background .16s;
}
:root[data-theme="light"] input[type=text], :root[data-theme="light"] input[type=number],
:root[data-theme="light"] input[type=date], :root[data-theme="light"] input[type=search],
:root[data-theme="light"] select, :root[data-theme="light"] textarea {
  background: var(--surface-2);
}

input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 1; }

input[type=text]:focus, input[type=number]:focus, input[type=date]:focus,
input[type=search]:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: var(--glow); background: var(--surface-2);
}

textarea { min-height: 92px; resize: vertical; }

select {
  appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238fa3b4' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
:root[data-theme="light"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2346596a' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}
select option { color: var(--ink); background: var(--card-solid); }

/* 日期框里的小图标在深色下要提亮 */
input[type=date]::-webkit-calendar-picker-indicator { filter: invert(.75) brightness(1.4); cursor: pointer; }
:root[data-theme="light"] input[type=date]::-webkit-calendar-picker-indicator { filter: none; }

/* 勾选框 / 圆点：统一换成青色 */
input[type=checkbox], input[type=radio] {
  width: 16px; height: 16px; flex: none; margin: 0;
  accent-color: var(--green); cursor: pointer;
  vertical-align: -3px;
}

/* 字段标签 */
.fld {
  display: block; margin: 12px 0 5px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .4px;
  color: var(--green-d);
}
.fld:first-child { margin-top: 0; }

/* 点选式勾选（T2 的清单） */
.chk {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; user-select: none;
}
.chk input { flex: none; }
.chk:hover { color: var(--green-d); }

/* 横排布局 */
.row {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end;
}
.row > div { flex: 1 1 0; min-width: 0; }
.row > div[style*="flex:none"] { flex: none; }

/* 手写横线（打印稿上填字用） */
.handline {
  display: inline-block; min-width: 220px; height: 20px;
  border-bottom: 1.5px solid var(--line-2);
}

/* ==========================================================
   ② -7 提示条
   ========================================================== */
.hint {
  position: relative; margin-top: 12px; padding: 10px 15px 10px 33px;
  font-size: 12.5px; line-height: 1.7; color: var(--ink-2);
  background: var(--grey-l); border-radius: var(--r-md);
  border-left: 2px solid var(--line-2);
}
.hint::before {
  content: '›'; position: absolute; left: 12px; top: 9px;
  font-family: var(--mono); font-weight: 800; color: var(--accent);
}
.hint b { color: var(--ink); }
.hint.ok {
  color: var(--green-d); background: var(--green-l); border-left-color: var(--green);
}
.hint.ok::before { content: '✓'; color: var(--green); }
/* 旧的 .hint.warn 收敛掉：原来是整块芥末黄实心，压在深海蓝上又闷又土。
   统一改成"琥珀只用在图标/左条上 + 条身半透明深色"，
   和新的 .warnbar 组件同一思路（.warnbar 见 ③ -3 一节）。 */
.hint.warn {
  color: var(--ink); background: rgba(242, 193, 78, .10);
  border-left: 7px solid var(--s3);
}
.hint.warn::before { content: '!'; color: var(--s3); }
.hint.bad {
  color: var(--orange-d); background: var(--orange-l); border-left-color: var(--orange);
}
.hint.bad::before { content: '×'; color: var(--orange); }

/* ==========================================================
   ② -8 表格
   ========================================================== */
table.grid {
  width: 100%; border-collapse: separate; border-spacing: 0;
  margin: 10px 0; font-size: 13px;
  border: 2px solid var(--edge); border-radius: var(--r-md);
  overflow: hidden; background: var(--surface-3);
}
table.grid th, table.grid td {
  padding: 8px 11px; text-align: left; vertical-align: top;
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--line);
}
table.grid tr:last-child th, table.grid tr:last-child td { border-bottom: none; }
table.grid th {
  font-size: 12px; font-weight: 800; letter-spacing: .5px;
  color: var(--green-d); background: var(--green-l);
  position: sticky; top: 0; z-index: 1;
}
table.grid tr:hover td { background: rgba(56, 189, 248, .06); }
table.grid td b { color: var(--green-d); }
table.grid td.mark, table.grid .mark {
  background: var(--amber-l) !important; color: var(--amber-d); font-weight: 700;
}

/* ==========================================================
   ② -9 底部
   ========================================================== */

/* 做完这一步，去哪。
   第四次改。前几版的问题：
     1) 第一版两个大块 70px 高、字才 15.5px —— 按钮大字小
     2) 第二版把上一步做成**没有底也没有边的纯文字**，看着不像能点
     3) 又把「上一步 / 下一步」小字和工具名大字用 baseline 挤在同一行，
        字号差 4.5px、颜色还不一样，读起来很别扭
   现在两边都是**结构相同的真按钮**，只分轻重：
     同高 60px、同圆角、同样是「上一步 / 下一步」小字 + 工具名大字；
     上一步用卡片底 + 描边（明确是按钮），下一步用主题实色（主操作）。
   层级靠颜色区分，不靠"一个有边框一个没有"。 */
.sca-nav {
  display: flex; align-items: stretch; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin: 28px 0 6px;
}
.sca-nav a {
  display: inline-flex; align-items: center; gap: 13px;
  min-width: 200px; min-height: 60px;
  text-decoration: none;
  transition: transform .12s, box-shadow .12s, background .16s, filter .16s;
}
/* 两行文字：上行「上一步 / 下一步」小字，下行工具名大字 */
.sca-nav .tx { display: block; min-width: 0; }
.sca-nav .tx em,
.sca-nav .tx b { display: block; }
.sca-nav .tx em {
  font-style: normal; font-family: var(--mono); font-size: 11.5px;
  font-weight: 700; letter-spacing: .05em; line-height: 1.25;
}
.sca-nav .tx b {
  font-size: 16.5px; font-weight: 900; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sca-nav .arw { flex: none; font-size: 19px; font-weight: 900; line-height: 1; }

/* 上一步：卡片底 + 描边，明确是个按钮，但不跟主操作抢注意力 */
.sca-nav .navback {
  padding: 11px 20px; border-radius: 99px;
  color: var(--ink-2); background: var(--card);
  border: 2.5px solid var(--edge); box-shadow: 0 3px 0 var(--edge);
}
.sca-nav .navback .tx em { color: var(--ink-3); }
.sca-nav .navback .arw { color: var(--ink-3); }
.sca-nav .navback:hover {
  color: var(--ink); background: var(--card-2);
  transform: translateY(-2px); box-shadow: 0 5px 0 var(--edge);
}
.sca-nav .navback:hover .tx em,
.sca-nav .navback:hover .arw { color: var(--ink-2); }
.sca-nav .navback:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--edge); }

/* 下一步：主题实色 + 高对比文字（默认青，各工具页各自覆盖） */
.sca-nav .navnext {
  padding: 11px 20px; border-radius: 99px;
  color: var(--on-solid); background: var(--navc, var(--s2));
  border: 2.5px solid var(--edge); box-shadow: 0 3px 0 var(--edge);
}
.sca-nav .navnext .tx em { color: rgba(22, 38, 43, .70); }
.sca-nav .navnext .arw { color: var(--on-solid); }
.sca-nav .navnext:hover {
  transform: translateY(-2px); box-shadow: 0 5px 0 var(--edge); filter: brightness(1.05);
}
.sca-nav .navnext:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--edge); }
/* 下一步按钮用"该工具自己的色"，和顶部步骤条、卡片细带是同一个色 */
body.t1 .sca-nav { --navc: var(--s1); }
body.t2 .sca-nav { --navc: var(--s2); }
body.t4 .sca-nav { --navc: var(--s4); }
body.t5 .sca-nav { --navc: var(--s6); }
body.t3 .sca-nav { --navc: var(--s5); }
body.t6 .sca-nav { --navc: var(--s7); }
body.t7 .sca-nav { --navc: var(--s3); }

/* 卡片里的"接着去哪"引导块（T1 转盘出结果后出现） */
.cta {
  margin-top: 12px; padding: 14px 16px;
  background: linear-gradient(120deg, var(--green-l), var(--accent-l));
  border: 1px solid rgba(46, 230, 168, .38); border-radius: var(--r-md);
  box-shadow: inset 0 0 30px rgba(46, 230, 168, .08);
  animation: ctaIn .32s ease-out;
}
@keyframes ctaIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cta .cta-t { font-size: 14.5px; font-weight: 800; color: var(--green-d); margin-bottom: 4px; }
.cta .cta-d { font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }
.cta .cta-b { margin-top: 11px; }

.sca-foot {
  margin-top: 28px; padding-top: 16px;
  font-size: 13px; color: var(--ink-soft); font-weight: 700; text-align: center;
  border-top: 2px dashed var(--line-2);
}
.sca-dot {
  display: inline-block; width: 7px; height: 7px; margin-right: 7px;
  border-radius: 50%; background: var(--green); vertical-align: 1px;
  box-shadow: 0 0 10px var(--green);
  animation: scaPulse 2.4s ease-in-out infinite;
}
@keyframes scaPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.sca-foot-sep { margin: 0 8px; opacity: .6; }

/* 尊重系统的"减少动态效果"：滚动、脉冲、入场动画全部关掉。
   这是无障碍要求，也让低端平板省电、不卡。 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ==========================================================
   ② -10 提示条 / 弹窗（store.js 生成）
   ========================================================== */
#scaToast {
  position: fixed; right: 20px; bottom: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
  pointer-events: none;
}
.sca-toast {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-start; gap: 9px;
  max-width: 380px; padding: 12px 16px;
  font-size: 13px; line-height: 1.6; color: var(--ink);
  background: var(--chrome);
  border: 2.5px solid var(--edge); border-left: 3px solid var(--green);
  border-radius: var(--r-md); box-shadow: var(--sh-2);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transform: translateY(10px) scale(.98); opacity: 0;
  transition: transform .28s cubic-bezier(.2, .9, .3, 1.2), opacity .28s;
  pointer-events: auto;
}

.sca-toast.in { transform: none; opacity: 1; }
.sca-toast.warn { border-left-color: var(--amber); }
.sca-toast.bad  { border-left-color: var(--orange); }
.sca-toast-ico { flex: none; line-height: 1.5; }
.sca-toast-bar {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--green));
  transform-origin: left; animation: scaBar 3.2s linear forwards;
}
@keyframes scaBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

.sca-mask {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;   /* 不用 inset：老一点的安卓 WebView 不认 */
  z-index: 9998;
  display: grid; place-items: center; padding: 20px;
  background: rgba(2, 5, 10, .66);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .2s;
}
.sca-mask.in { opacity: 1; }
.sca-modal {
  width: 100%; max-width: 620px;          /* 不用 min()：老 WebView 不认会把宽度丢掉 */
  max-height: 86vh; display: flex; flex-direction: column;
  background: var(--chrome);
  border: 2.5px solid var(--edge); border-radius: var(--r);
  box-shadow: var(--sh-2), 0 0 0 1px rgba(56, 189, 248, .12);
  transform: translateY(12px) scale(.985); transition: transform .22s;
}

.sca-mask.in .sca-modal { transform: none; }
.sca-modal-h {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.sca-modal-h b { flex: 1; letter-spacing: .3px; }
.sca-modal-x {
  flex: none; width: 27px; height: 27px; display: grid; place-items: center;
  font-size: 18px; line-height: 1; color: var(--ink-3); cursor: pointer;
  border-radius: var(--r-xs); transition: color .15s, background .15s;
}
.sca-modal-x:hover { color: var(--orange); background: var(--orange-l); }
.sca-modal-b { padding: 16px 18px; overflow: auto; font-size: 13.5px; }
.sca-modal-f {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 13px 18px; border-top: 1px solid var(--line);
}
.sca-bigta {
  width: 100%; min-height: 240px; resize: vertical;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.8;
}
.sca-datarow {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; margin: 6px 0;
  background: var(--grey-l); border-radius: var(--r-sm); font-size: 13px;
}
.sca-datarow span { flex: 1; }
.sca-datarow em { font-style: normal; font-family: var(--mono); font-size: 11.5px; color: var(--green-d); }

/* ==========================================================
   ③ 各页面自用组件
   ========================================================== */

/* —— T1 选题筛选 + 转盘 —— */
.qcard {
  background: var(--surface);
  border: 2px solid var(--edge); border-radius: var(--r-md);
  padding: 13px 15px; margin: 9px 0;
}

.qcard > b { display: block; margin-bottom: 4px; font-size: 13.5px; }

.opt:active { transform: scale(.97); }
.opt {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 15px; margin: 5px 7px 0 0;
  font-size: 13px; color: var(--ink-2); cursor: pointer;
  background: var(--surface-2);
  border: 2.5px solid var(--edge); border-radius: 99px;
  transition: all .16s;
}

.opt::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--line-2); transition: background .16s, box-shadow .16s;
}
.opt:hover { color: var(--ink); border-color: var(--accent); }
.opt.on {
  color: var(--green-d); font-weight: 700;
  border-color: var(--green); background: var(--green-l);
  box-shadow: var(--glow-g);
}
.opt.on::before { background: var(--green); box-shadow: 0 0 8px var(--green); }

.theme-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; margin: 4px 6px 0 0;
  font-size: 12.5px; color: var(--green-d);
  background: var(--green-l); border: 1px solid rgba(46, 230, 168, .3);
  border-radius: var(--r-sm);
}
.theme-chip::before { content: '◆'; font-size: 8px; opacity: .7; }

.excl {
  margin-top: 12px; padding: 11px 15px;
  font-size: 12.5px; line-height: 1.85; color: var(--ink-2);
  background: var(--grey-l); border-radius: var(--r-md);
  border-left: 2px solid var(--line-2);
}
.excl b { color: var(--ink); }

/* 左转盘、右结果 —— 这一版**不折行**。
   上一版 flex-wrap:wrap + 画布 440px + 结果区 min-width:260px，
   卡片内宽不够时结果区就掉到下一行，看上去像"结果从右边飞到下面"。
   现在：不折行、画布 380px、结果区用 flex:1，两者始终并排。 */
.wheelbox {
  display: flex; gap: 26px; align-items: flex-start;
  flex-wrap: nowrap; margin-top: 8px;
}
.wheelbox > div:first-child { flex: 0 0 auto; }
.wheelbox > div:last-child { flex: 1 1 auto; min-width: 0; }
/* 画布不描边、不铺底：盘子和投影都由脚本画（和 T6 的图一个做法）。
   原来写死 background: var(--white)，深色主题下就是一块刺眼的白板。 */
#wheel {
  display: block;
  width: 380px; height: 380px; max-width: 100%;
  background: transparent;
  border: none;
}
.wheelres {
  min-height: 52px; margin: 8px 0 6px;
  font-family: var(--display);
  font-size: 26px; font-weight: 900; letter-spacing: -.01em;
  color: var(--ink);
  text-shadow: 0 3px 0 rgba(22, 38, 43, .45);
}
/* 转出来时弹一下 */
.wheelres.pop { animation: wheelPop .55s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes wheelPop {
  0%   { transform: scale(.82); opacity: .3; }
  60%  { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .wheelres.pop { animation: none; }
}

/* —— T2 流程图 + 出发前清单 —— */
.step-item {
  padding: 11px 15px; margin: 9px 0;
  background: var(--surface);
  border: 2.5px solid var(--edge); border-radius: var(--r-md);
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.step-item.on {
  border-color: rgba(46, 230, 168, .55); background: var(--green-l);
  box-shadow: inset 0 0 22px rgba(46, 230, 168, .07);
}
.step-item .t { font-weight: 700; font-size: 14px; }
.step-item .d { margin: 3px 0 0 24px; font-size: 12.5px; color: var(--ink-2); }
.step-item.on .t { color: var(--green-d); }

/* 清单里的每一行：勾选框 / 物品名 / 删除，三段分开，间距给足。
   原来这里有一份重复定义（迁移页面样式时又写了一份，且没带 padding-left），
   把缩进覆盖掉了——复选框贴到卡片边框上、和输入框之间也没了间隔感，
   看着就像"控件挤在一起"。现在只留这一份。 */
.items { display: none; margin-top: 12px; padding-left: 26px; }
.step-item.on .items { display: block; }
.items .it {
  display: flex; align-items: center; gap: 11px;
  margin: 0 0 9px; font-size: 14px; color: var(--ink-2);
}
.items .it:last-child { margin-bottom: 0; }
/* 勾选框单独给一块底色，和输入框在视觉上分开，不会糊成一条 */
.items .it input[type=checkbox] {
  width: 20px; height: 20px; flex: none;
  accent-color: var(--s4); cursor: pointer;
  background: var(--surface-2); border-radius: 5px;
}
.items .it input[type=text] { flex: 1; min-width: 0; padding: 7px 10px; font-size: 13.5px; }
.items .it .del {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; font-size: 18px; line-height: 1;
  color: var(--orange-d); cursor: pointer; border-radius: 50%;
  transition: background .15s;
}
.items .it .del:hover { background: var(--orange-l); }

/* 打印稿里才出现的填写行 */
.print-only { display: none; }

/* —— T3 每日打卡 —— */
.streak {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 14px; padding: 13px 18px;
  background: linear-gradient(120deg, var(--green-l), var(--accent-l));
  border: 1px solid rgba(46, 230, 168, .3); border-radius: var(--r-md);
  box-shadow: inset 0 0 34px rgba(46, 230, 168, .08);
}
.streak .n {
  font-family: var(--mono); font-size: 30px; font-weight: 800; line-height: 1;
  color: var(--green-d); text-shadow: 0 0 24px rgba(46, 230, 168, .45);
}

.photoBox {
  margin-top: 4px; padding: 18px; text-align: center;
  font-size: 13px; color: var(--ink-2); cursor: pointer;
  background: var(--surface);
  border: 3px dashed var(--edge); border-radius: var(--r-md);
  transition: all .18s;
}
.photoBox:hover {
  color: var(--green-d); border-color: var(--green);
  background: var(--green-l); box-shadow: var(--glow-g);
}
#photoPrev {
  display: none; max-width: 100%; max-height: 220px;
  margin-top: 10px; border-radius: var(--r-md);
  border: 2.5px solid var(--edge); background: var(--white);
}

.hist {
  display: grid; gap: 12px; margin-top: 12px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.hcard {
  padding: 11px; font-size: 12.5px; line-height: 1.7;
  background: var(--surface);
  border: 2px solid var(--edge); border-radius: var(--r-md);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.hcard:hover { border-color: var(--accent); box-shadow: var(--glow); transform: translateY(-2px); }
.hcard img {
  width: 100%; height: 110px; object-fit: cover;
  margin-bottom: 7px; border-radius: var(--r-sm); background: var(--white);
}
.hcard .d {
  font-family: var(--mono); font-size: 12.5px; font-weight: 700;
  color: var(--green-d); letter-spacing: .5px;
}
.hcard .del {
  display: inline-block; margin-top: 5px;
  font-size: 12px; color: var(--orange); cursor: pointer;
}
.hcard .del:hover { text-decoration: underline; }

.calgrid {
  display: grid; gap: 7px; margin-top: 12px;
  grid-template-columns: repeat(7, 1fr);
}
.calgrid .c {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1; font-variant-numeric: tabular-nums;
  min-height: 30px;                 /* aspect-ratio 不生效时（老 WebView）兜个底 */
  font-size: 11px; font-family: var(--mono);
  color: var(--ink-3); background: var(--surface);
  border: 2px solid var(--edge); border-radius: var(--r-sm);
  transition: all .18s;
}
.calgrid .c.on {
  font-weight: 800; color: var(--on-accent);
  background: linear-gradient(140deg, var(--green), var(--accent));
  border-color: transparent;
  box-shadow: 0 0 16px rgba(46, 230, 168, .45);
}

/* —— T4 照片分类 + 排序归档 —— */
.cats {
  display: grid; gap: 12px; margin-top: 12px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.cat {
  min-height: 150px; padding: 11px;
  background: var(--surface);
  border: 3px dashed var(--edge); border-radius: var(--r-md);
  transition: all .18s;
}
.cat.over {
  border-color: var(--green); border-style: solid;
  background: var(--green-l); box-shadow: var(--glow-g);
}
.cat h4 {
  display: flex; align-items: center; gap: 7px;
  margin: 0 0 9px; font-size: 13.5px;
}
.cat h4 .cnt {
  font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--ink-2);
}
.cat .ph {
  position: relative; display: inline-block;
  width: 64px; margin: 0 6px 6px 0; cursor: grab;
}
.cat .ph img {
  display: block; width: 100%; height: 48px; object-fit: cover;
  border: 2.5px solid var(--edge); border-radius: var(--r-xs); background: var(--white);
}
.cat .ph .x, .pool .ph .x {
  position: absolute; top: -7px; right: -5px; display: none;
  width: 17px; height: 17px; font-size: 11px; line-height: 17px; text-align: center;
  color: #fff; cursor: pointer; border-radius: 50%;
  background: var(--orange); box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}
.cat .ph:hover .x, .pool .ph:hover .x { display: block; }

.pool {
  display: flex; flex-wrap: wrap; gap: 9px;
  min-height: 62px; margin-top: 10px; padding: 9px;
  background: rgba(4, 9, 16, .28);
  border: 2px solid var(--edge); border-radius: var(--r-md);
}
.pool .ph {
  position: relative; width: 78px; cursor: grab;
}
.pool .ph img {
  display: block; width: 100%; height: 58px; object-fit: cover;
  border: 2.5px solid var(--edge); border-radius: var(--r-sm); background: var(--white);
}

.bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px;
}
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 13px; font-size: 12.5px; cursor: pointer;
  color: var(--green-d); background: var(--green-l);
  border: 1px solid rgba(46, 230, 168, .32); border-radius: 99px;
  transition: all .16s;
}
.pill:hover { border-color: var(--orange); color: var(--orange-d); background: var(--orange-l); }
.pill.x { color: var(--orange-d); background: var(--orange-l); border-color: rgba(255, 107, 74, .32); }

/* —— T5 问卷录入 —— */
.qrow {
  display: flex; gap: 15px; align-items: flex-start;
  margin: 10px 0; padding: 13px;
  background: var(--surface);
  border: 2px solid var(--edge); border-radius: var(--r-md);
}
.qrow .shot { flex: none; width: 200px; }
.qrow .shot img {
  width: 200px; border: 2.5px solid var(--edge); border-radius: var(--r-sm);
  cursor: zoom-in; background: var(--white);
}
.qrow .grow { flex: 1; min-width: 0; }

.qline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  margin: 6px 0; font-size: 13px;
}
.qline .qn { flex: none; width: 48px; font-family: var(--mono); font-size: 12px; color: var(--ink-2); }

.obtn {
  padding: 4px 13px; font-size: 12.5px; cursor: pointer;
  color: var(--ink-2); background: var(--surface-2);
  border: 2.5px solid var(--edge); border-radius: var(--r-sm);
  transition: all .15s;
}

.obtn:hover { color: var(--ink); border-color: var(--accent); }
.obtn:active { transform: scale(.95); }
.obtn.on {
  font-weight: 700; color: var(--green-d);
  background: var(--green-l); border-color: var(--green); box-shadow: var(--glow-g);
}
.obtn.flag {
  font-weight: 700; color: var(--amber-d);
  background: var(--amber-l); border-color: var(--amber); box-shadow: var(--glow-a);
}

.prog {
  height: 9px; margin: 9px 0; overflow: hidden;
  background: var(--grey-l); border-radius: 99px;
  border: 2px solid var(--edge);
}
.prog i {
  display: block; width: 0; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--green));
  box-shadow: 0 0 14px rgba(46, 230, 168, .55);
  transition: width .3s ease-out;
}

.keyhint {
  display: inline-block; padding: 2px 8px; margin: 0 2px;
  font-family: var(--mono); font-size: 11.5px; color: var(--accent-d);
  background: var(--accent-l); border: 1px solid rgba(56, 189, 248, .32);
  border-radius: var(--r-xs);
}

.dropzone {
  padding: 26px 18px; text-align: center;
  font-size: 13.5px; color: var(--ink-2); cursor: pointer;
  background: var(--surface);
  border: 3px dashed var(--edge); border-radius: var(--r-md);
  transition: all .18s;
}
.dropzone:hover {
  color: var(--accent-d); border-color: var(--accent);
  background: var(--accent-l); box-shadow: var(--glow);
}

.thumbgrid {
  display: grid; gap: 10px; margin-top: 12px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.thumb {
  padding: 8px; cursor: pointer;
  background: var(--surface);
  border: 2.5px solid var(--edge); border-radius: var(--r-md);
  transition: all .16s;
}
.thumb:hover { border-color: var(--accent); box-shadow: var(--sh-2); }
.thumb.bad { border-color: var(--amber); background: var(--amber-l); }
.thumb img {
  display: block; width: 100%; height: 92px; object-fit: cover;
  border-radius: var(--r-xs); background: var(--white);
}
.thumb .tinfo {
  margin-top: 6px; font-size: 11.5px; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* —— T6 数据表 → 自动画图 —— */
.tblwrap {
  max-height: 280px; margin-top: 10px; overflow: auto;
  border: 2px solid var(--edge); border-radius: var(--r-md);
  background: rgba(4, 9, 16, .3);
}
table.dt { width: 100%; min-width: 100%; border-collapse: collapse; font-size: 12.5px;
  font-variant-numeric: tabular-nums; }
table.dt th, table.dt td {
  padding: 5px 7px; white-space: nowrap;
  border: 2px solid var(--edge);
}
table.dt th {
  position: sticky; top: 0; z-index: 1;
  font-size: 12px; color: var(--green-d);
  background: var(--card-solid);
  box-shadow: inset 0 -1px 0 var(--line-2);
}

table.dt td input {
  width: 88px; padding: 3px 5px;
  font-family: inherit; font-size: 12.5px; color: var(--ink);
  background: transparent; border: none; border-radius: var(--r-xs);
}
table.dt td input:focus {
  outline: none; background: var(--accent-l); box-shadow: var(--glow);
}
/* 画布：不描边、不铺底。面板由脚本自己画（半透明深色 + 圆角 + 高光带），
   CSS 再给边框就会和画出来的面板重叠成两层框。
   注意必须显式写 border:none / background:transparent ——
   否则会被下面的旧规则和打印规则里的 background:var(--white) 盖回去。 */
#chart {
  display: block;
  max-width: 100%;
  border: none;
  background: transparent;
  box-shadow: none;
}

/* —— T7 结论参谋 —— */
.col3 { display: grid; gap: 12px; margin-top: 12px; grid-template-columns: repeat(3, 1fr); }
.col {
  padding: 13px 15px; font-size: 13px; line-height: 1.75;
  border: 2px solid var(--edge); border-radius: var(--r-md);
}
.col h4 { margin: 0 0 9px; font-size: 14px; }
.col ol, .col ul { margin: 0; padding-left: 20px; }
.col li { margin: 6px 0; }
.col.c1 { background: var(--green-l); }
.col.c2 { background: var(--amber-l); }
.col.c3 { background: var(--grey-l); }
.col.c1 h4 { color: var(--green-d); }
.col.c2 h4 { color: var(--amber-d); }
.col.c3 h4 { color: var(--ink); }

.banword { color: var(--orange); font-weight: 700; text-decoration: line-through; }
.fixword { color: var(--green-d); font-weight: 700; }

/* T7 数据表的列名：和 .mrow 一样三列 + 末尾一个删除位，
   这样表头和下面的输入框是一条竖线对齐的。
   第三列的字是动态的（人数 / 重复次数 / 记了几天…），见 t7 的 setUnit()。 */
/* 用和 .mrow 一样的 flex + 同样的字段宽度（150 / 90 / 90），
   所以窄屏下 .mrow 的输入框变 100% 时，表头也跟着变 —— 两边始终对齐。
   用 grid 写死列宽是不行的：.mrow 是 flex，窄屏媒体查询里会把宽度改成 100%。 */
.rowhead {
  display: flex; align-items: center; gap: 8px;
  padding: 0 0 6px; margin: 0 0 2px;
  font-size: 12px; font-weight: 700; color: var(--ink-soft);
  border-bottom: 2px solid var(--line-2);
}
.rowhead span { display: block; }
.rowhead span:nth-child(1) { width: 150px; }
.rowhead span:nth-child(2), .rowhead span:nth-child(3) { width: 90px; text-align: center; }
.rowhead span:nth-child(4) { width: 10px; }
.mrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 7px 0; }
.mrow input { width: 150px; }
.mrow input.num { width: 90px; }

/* ==========================================================
   ④ 响应式
   ========================================================== */
@media (max-width: 900px) {
  .col3 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 14px; }
  .wrap { padding: 12px 12px 44px; }
  /* 窄屏：顶栏和导航条仍然只是页面顶部的普通元素，只是收窄内边距 */
  #topZone { padding: 0 12px; }
  .sca-top { padding: 8px 10px 8px 8px; gap: 10px; flex-wrap: wrap; }
  .sca-logo { width: 44px; height: 44px; }
  .sca-brand-t b { font-size: 16px; }
  .sca-icobtn { padding: 10px 15px; min-height: 46px; font-size: 14px; }
  .sca-steplab { display: none; }
  .page-title { font-size: 20px; }
  .card { padding: 15px 14px; }
  /* 窄屏仍然并排：画布缩到 240px，结果区占剩下的 */
  .wheelbox { gap: 14px; }
  #wheel { width: 240px; height: 240px; }
  .calgrid { gap: 5px; }
  .calgrid .c { font-size: 9.5px; border-radius: var(--r-xs); }
  .qrow { flex-direction: column; }
  .qrow .shot, .qrow .shot img { width: 100%; }
  .row > div { flex: 1 1 100%; }
  .items { padding-left: 6px; }
}

/* ==========================================================
   ④ -2 触控友好（安卓平板 / 手机）
   手指比鼠标粗得多：可点区域至少 44px 高、字至少 16px
   （安卓 Chrome 在小于 16px 的输入框上会自动放大页面），
   拖动一律补上"点一下再选"的等价操作。
   ========================================================== */
html {
  -webkit-tap-highlight-color: transparent;   /* 去掉安卓上那层灰蓝色方块 */
  scroll-behavior: smooth;
}
body { overscroll-behavior-y: none; }

/* 能滚的地方不要连带把整页拖着滚 */
.sca-rail, .tblwrap, .hist, .pool, .cats, .thumbgrid {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

@media (pointer: coarse), (max-width: 900px) {
  /* 输入框统一 16px：避免安卓聚焦时自动放大整个页面 */
  input[type=text], input[type=number], input[type=date], input[type=search],
  select, textarea { font-size: 16px; padding: 11px 13px; }
  .items .it input[type=text] { font-size: 16px; }
  table.dt td input { font-size: 16px; width: 78px; padding: 6px 5px; }

  /* 可点区域够大 */
  .btn { min-height: 46px; padding: 12px 20px; font-size: 15px; }
  .btn.sm { min-height: 40px; padding: 9px 15px; font-size: 14px; }
  .opt { min-height: 44px; padding: 10px 18px; font-size: 15px; }
  .obtn { min-height: 44px; min-width: 46px; padding: 9px 15px; font-size: 15px; }
  .pill { min-height: 36px; padding: 8px 15px; font-size: 14px; }
  .sca-chip { padding: 9px 14px; font-size: 13.5px; }
  .sca-icobtn { min-height: 40px; }
  .sca-modal-x { width: 40px; height: 40px; font-size: 22px; }
  .card h3 .no { min-width: 30px; height: 30px; font-size: 15px; }
  .hcard .del { min-height: 40px; display: inline-flex; align-items: center; font-size: 14px; }
  .items .it .del {
    font-size: 22px; min-width: 40px; min-height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
  }

  /* 勾选框做大，手指点得中 */
  input[type=checkbox], input[type=radio] { width: 22px; height: 22px; }
  .chk { min-height: 40px; gap: 10px; }
  .chk input { width: 22px; height: 22px; }

  /* 行距放宽，避免点错行 */
  .items .it { padding: 3px 0; }
  .qline { gap: 9px; margin: 9px 0; }
  /* T7 数据表的列名：和 .mrow 一样三列 + 末尾一个删除位，
   这样表头和下面的输入框是一条竖线对齐的。
   第三列的字是动态的（人数 / 重复次数 / 记了几天…），见 t7 的 setUnit()。 */
/* 用和 .mrow 一样的 flex + 同样的字段宽度（150 / 90 / 90），
   所以窄屏下 .mrow 的输入框变 100% 时，表头也跟着变 —— 两边始终对齐。
   用 grid 写死列宽是不行的：.mrow 是 flex，窄屏媒体查询里会把宽度改成 100%。 */
.rowhead {
  display: flex; align-items: center; gap: 8px;
  padding: 0 0 6px; margin: 0 0 2px;
  font-size: 12px; font-weight: 700; color: var(--ink-soft);
  border-bottom: 2px solid var(--line-2);
}
.rowhead span { display: block; }
.rowhead span:nth-child(1) { width: 150px; }
.rowhead span:nth-child(2), .rowhead span:nth-child(3) { width: 90px; text-align: center; }
.rowhead span:nth-child(4) { width: 10px; }
.mrow { gap: 10px; }
  .mrow input, .mrow input.num { width: 100%; }

  /* 横排字段在窄屏上各占一行；
     按钮有时直接放在 .row 里（外面没包 div），也要一起铺满 */
  .row { gap: 14px; align-items: stretch; }
  .row > div { flex: 1 1 100%; }
  .row > div[style*="flex:none"] { flex: 1 1 100%; }
  .row > div[style*="max-width"] { max-width: none !important; }
  .row > .btn, .row > button { flex: 1 1 100%; width: 100%; }
  .row > input, .row > select, .row > textarea { flex: 1 1 100%; width: 100%; }

  /* 上一步 / 下一步：窄屏改成上下两行。
     容器是 flex（不是 grid），所以这里改 flex-direction；整条都能点。 */
  .sca-nav { flex-direction: column-reverse; align-items: stretch; gap: 12px; }
  .sca-nav a { width: 100%; }
  /* 下一步铺满一行：文字靠左、箭头推到最右，比全挤在中间自然 */
  .sca-nav .navnext { justify-content: space-between; padding: 13px 18px 13px 20px; }
  .sca-nav .navback { justify-content: flex-start; }
  .cta .cta-b .btn { width: 100%; }
  /* 打印稿里导航条要去掉（已经在 body 里，和 .btn 一起隐藏） */
}

/* 照片上的「移动」按钮：拖动之外的第二条路，手指也能用 */
.ph { position: relative; }
.ph .mv {
  position: absolute; left: 50%; bottom: 5px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px; font-family: var(--font); font-size: 11.5px; line-height: 1;
  color: var(--ink); cursor: pointer; white-space: nowrap;
  background: rgba(8, 14, 24, .82); border: 2.5px solid var(--edge);
  border-radius: 99px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.ph .mv svg { width: 13px; height: 13px; display: block; }
.ph .mv:hover, .ph .mv:focus-visible {
  color: var(--on-accent); border-color: transparent; outline: none;
  background: linear-gradient(135deg, var(--accent), var(--green));
}
.ph .mv:active { transform: translateX(-50%) scale(.94); }

body.touch-mode .ph, body.touch-mode .cat { cursor: pointer; }

@media (pointer: coarse) {
  .ph .mv { padding: 6px 11px; font-size: 12.5px; bottom: 6px; }
  .cat .ph { width: 74px; }
  .cat .ph img { height: 56px; }
  .pool .ph { width: 88px; }
  .pool .ph img { height: 66px; }
  /* 平板上没有 hover：删单张照片的 × 必须一直露着，否则根本删不掉单张 */
  .cat .ph .x, .pool .ph .x { display: block; width: 20px; height: 20px; line-height: 20px; font-size: 13px; }
}

/* 双击缩放会抢走"双击移回未分类"的手势：交给浏览器别做双击缩放 */
.ph, .btn, .opt, .obtn, .pill, .sca-chip, .tool, .cat, .hcard { touch-action: manipulation; }

/* 选环节的弹窗：按钮铺开，一行一行排 */
.sca-optgrid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.sca-optgrid .btn { width: 100%; justify-content: center; }


/* ==========================================================
   ③ -3 提醒 / 警告条（.warnbar）
   原来的 .hint.warn 是整块芥末黄实心，压在深海蓝上又闷又土。
   现在做成和整套一致的"实色圆盘图标 + 粗描边卡片"：
   琥珀只用在图标圆盘和左侧粗条上（小面积高饱和，够醒目），
   条身用半透明暖色 + 深色描边，文字用亮色。
   深色主题下大面积暖色会又脏又抢眼，所以刻意不做成整块实色。
   ========================================================== */
.warnbar {
  display: flex; align-items: flex-start; gap: 11px;
  margin: 0 0 12px; padding: 11px 15px;
  background: rgba(242, 193, 78, .10);
  border: 3px solid var(--edge); border-left: 7px solid var(--s3);
  border-radius: var(--r-sm);
  color: var(--ink); font-size: 14px; font-weight: 700; line-height: 1.7;
}
.warnbar .wb-ic {
  flex: none; display: grid; place-items: center;
  width: 26px; height: 26px; margin-top: 2px;
  font-family: var(--mono); font-size: 15px; font-weight: 800; line-height: 1;
  color: var(--on-solid); background: var(--s3);
  border: 2.5px solid var(--edge); border-radius: 50%;
  box-shadow: inset 0 0 0 2.5px rgba(255,255,255,.36);
}
.warnbar .wb-tx { min-width: 0; }
/* 更重一档（加 .strong） */
.warnbar.strong {
  background: rgba(240, 151, 92, .12);
  border-left-color: var(--s6);
}
.warnbar.strong .wb-ic { background: var(--s6); }

/* ==========================================================
   ③ -4 T3 打卡日历（真正的月历）
   从周一开始排，带星期表头；周六周日单独配色；
   有记录的当天实心圆，今天亮边圈；前后补位的日子变淡不可点。
   ========================================================== */
.calbar {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  margin: 4px 0 14px;
}
/* 月份标题独占第一行：窄屏上切换按钮和统计会自己换到第二行，不会挤成一团 */
.calmonth {
  order: -1; flex: 1 1 100%; text-align: left; margin-bottom: 2px;
  font-size: 20px; font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.calbarsum {
  font-size: 13px; font-weight: 800; color: var(--ink-soft);
  background: var(--surface); border: 2px solid var(--edge); border-radius: 99px;
  padding: 5px 14px; white-space: nowrap;
}
.calbar .btn { margin-left: 0; }
.calbar #calToggle { margin-left: auto; }

/* 星期表头：和下面的日子同一套网格，保证竖列严格对齐 */
.calwdl, .cal {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px;
}
.calwdl { margin-bottom: 7px; }
.calwdl .wd {
  text-align: center; font-size: 13px; font-weight: 800; color: var(--ink-2);
  padding: 5px 0; border-radius: var(--r-xs);
}
/* 周六周日：表头就给颜色，一眼看出哪两列是周末 */
.calwdl .wd5 { color: var(--s2); background: rgba(92,192,232,.14); }
.calwdl .wd6 { color: var(--s1); background: rgba(240,122,142,.14); }

.cal .cc {
  position: relative; aspect-ratio: 1; min-height: 42px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: var(--card); border: 2.5px solid var(--edge); border-radius: var(--r-sm);
  color: var(--ink); font-family: var(--inherit, inherit);
  font-variant-numeric: tabular-nums;
  transition: transform .12s, box-shadow .12s, background .16s;
}
.cal .cc b { font-size: 15.5px; font-weight: 800; line-height: 1; }
/* 周末列：底色比平日暖/亮一点 */
.cal .cc.wd5 { background: rgba(92,192,232,.12); }
.cal .cc.wd6 { background: rgba(240,122,142,.12); }
.cal .cc.wd5 b { color: var(--s2); }
.cal .cc.wd6 b { color: var(--s1); }
/* 上/下月补位：变淡，而且不可点 */
.cal .cc.out {
  background: transparent; border-color: transparent;
  color: var(--ink-3); opacity: .38;
}
.cal .cc.out b { font-size: 13.5px; font-weight: 700; }
/* 打过卡的当天 */
.cal .cc.on { background: var(--s4); border-color: var(--edge); }
.cal .cc.on b { color: var(--on-solid); }
.cal .cc .dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--on-solid); opacity: .85;
}
.cal .cc.on .dot { background: var(--on-solid); opacity: 1; }
/* 今天：亮边圈（叠加在别的状态上也要看得见） */
.cal .cc.today {
  box-shadow: 0 0 0 3px var(--s3), 0 0 16px rgba(242,193,78,.55);
}
/* 被点中的那天 */
.cal .cc.sel { box-shadow: 0 0 0 3px var(--s2), 0 0 16px rgba(92,192,232,.5); }
.cal .cc.sel.today { box-shadow: 0 0 0 3px var(--s3), 0 0 0 6px var(--s2); }
.cal button.cc { cursor: pointer; }
.cal button.cc:hover { transform: translateY(-2px); }
.cal button.cc:active { transform: translateY(1px); }

/* 日历下面：某一天的记录 */
.daybox {
  margin-top: 14px; padding: 13px 16px;
  background: var(--surface); border: 2.5px solid var(--edge);
  border-radius: var(--r-md);
}
.daybox-h { font-size: 14.5px; color: var(--ink-soft); font-weight: 700; }
.daybox-h b { font-size: 17px; color: var(--ink); font-weight: 900; }
.daybox-h .wkend {
  font-size: 12px; font-weight: 800; color: var(--s1);
  background: rgba(240,122,142,.16); border-radius: 99px; padding: 2px 9px;
}
.daybox-h .isToday {
  font-size: 12px; font-weight: 800; color: var(--on-solid);
  background: var(--s3); border-radius: 99px; padding: 2px 9px;
}
.db-mood { margin-top: 9px; font-size: 14px; color: var(--ink-soft); }
.db-what { margin-top: 5px; font-size: 14.5px; line-height: 1.8; }
.db-photo {
  display: block; margin-top: 10px; max-width: 260px; max-height: 180px;
  border-radius: var(--r-sm); border: 2.5px solid var(--edge);
}
.db-none { margin-top: 8px; font-size: 14px; color: var(--ink-soft); }

/* 按周查看：一周一行 */
.wrow {
  border: 2.5px solid var(--edge); border-radius: var(--r-md);
  padding: 11px 13px; margin: 12px 0; background: var(--card);
}
.wrow-h {
  display: flex; align-items: center; gap: 10px;
  font-size: 14.5px; font-weight: 900; margin-bottom: 9px;
}
.wrow-h em {
  font-style: normal; font-size: 12.5px; font-weight: 800;
  color: var(--on-solid); background: var(--s4);
  border-radius: 99px; padding: 2px 10px;
}
.wrow-h em.none { color: var(--ink-soft); background: var(--surface-2); }
.wrow-d { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.dc {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0; cursor: pointer;
  background: var(--surface-2); border: 2.5px solid var(--edge);
  border-radius: var(--r-sm); color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.dc-w { font-size: 11.5px; font-weight: 700; }
.dc-n { font-size: 16px; font-weight: 900; }
.dc.on { background: var(--s4); color: var(--on-solid); }
.dc.today { box-shadow: 0 0 0 3px var(--s3); }
.dc:active { transform: translateY(1px); }

@media (max-width: 640px) {
  .cal .cc b { font-size: 14px; }
  .cal .cc { min-height: 36px; gap: 2px; }
  .calmonth { font-size: 17px; min-width: 7em; }
  .calbar #calToggle { margin-left: 0; }
  .dc-w { font-size: 10px; }
  .dc-n { font-size: 14px; }
}
@media print {
  /* 纸面上不需要月份切换按钮；日历本身照印（填过的日子看得出） */
  .calbar .btn { display: none !important; }
  .cal .cc { border-color: #9aa5a0 !important; background: #fff !important; }
  .cal .cc.on { background: #cfe8dc !important; }
  .cal .cc.on b { color: #0d5b43 !important; }
  .cal .cc.today { box-shadow: none !important; outline: 2px solid #1F7A5C; }
  .cal .cc.wd5, .cal .cc.wd6 { background: #f2f5f3 !important; }
  .daybox, .wrow { background: #fff !important; border-color: #9aa5a0 !important; }
}

/* ==========================================================
   ④ 打印：只留正文，横竖都按 A4 排
   ========================================================== */
@media print {
  @page { margin: 12mm; }

  /* 打印时把变量整体换成纸面配色：注入的那些 var() 覆盖规则会自动跟着变白，
     不需要再加一堆 !important，也不会出现"深色块印在黑纸上" */
  :root, :root[data-theme="light"] {
    --bg: #fff; --bg-2: #fff;
    --card: #fff; --card-solid: #fff; --panel: #fff;
    --surface: #fff; --surface-2: #fff; --surface-3: #fff; --chrome: #fff;
    --white: #fff;
    --print-solid: #fff; --print-tint: #f2f5f3;
    --ink: #000; --ink-2: #333; --ink-3: #555; --grey: #555;
    --line: #c2cbc6; --line-2: #9aa5a0;
    --green: #1F7A5C; --green-d: #0d5b43; --green-l: #eef6f2;
    --accent: #1F7A5C; --accent-d: #0d5b43; --accent-l: #eef6f2;
    --amber: #c98a2b; --amber-l: #fdf3e0; --amber-d: #6b4a08;
    --orange: #b8492a; --orange-l: #fdeee8; --orange-d: #7a2b14;
    --grey-l: #f2f5f3;
    --on-accent: #fff; --on-amber: #6b4a08; --on-orange: #fff;
  }

  html, body {
    background: var(--print-solid) !important;
    background-image: none !important;
    color: #000 !important;
    font-size: 11.5pt;
  }
  * {
    box-shadow: none !important;
    text-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    animation: none !important;
  }
  /* 噪点层是屏幕上的质感，纸上不要（会整页泛灰） */
  body::before { display: none !important; }

  .wrap { max-width: none; padding: 0; }
  .no-print,
  .sca-top, .sca-rail, .sca-foot, .sca-nav, .cta,
  #scaToast, .sca-mask { display: none !important; }
  .print-only { display: block !important; }

  .card {
    break-inside: avoid;
    margin: 0 0 8mm; padding: 5mm 6mm;
    background: var(--print-solid) !important; border: 1px solid var(--print-line) !important;
  }
  .card::before { display: none !important; }
  .card:hover { border-color: var(--print-line) !important; }

  .page-title { font-size: 17pt; padding-left: 10px; }
  .page-title::before { background: var(--green) !important; }
  .page-title::after { background: #9aa5a0 !important; }
  .pt-ico {
    color: #0d5b43 !important; background: var(--print-tint) !important;
    border-color: var(--print-line) !important;
  }
  .page-sub { color: #333 !important; }

  /* 编号圆盘：屏幕上是"实色底 + 深字"，纸上实色会变很淡，
     所以打印时改成"深底 + 白字"，保证数字一眼看得清 */
  .card h3 .no, .card h3 .no.amber {
    color: #fff !important; background: #1F7A5C !important;
    border-color: #1F7A5C !important;
    box-shadow: none !important;
  }
  /* 工具卡和换页片上的序号圆盘同理 */
  .sca-chip i, .sca-logo, .tool .ic, .tool .tstep {
    color: #fff !important; background: #1F7A5C !important;
    border-color: #1F7A5C !important; box-shadow: none !important;
  }
  .tool .ic svg, .sca-logo svg { stroke: #fff !important; }
  .hint {
    color: #333 !important; background: var(--print-tint) !important;
    border-left: 2px solid var(--print-line) !important;
  }
  .hint.ok   { color: #14543d !important; background: var(--print-tint) !important; border-left-color: #1F7A5C !important; }
  /* 警告条：纸上用浅暖底 + 深字 + 琥珀左条，不再是整块芥末黄 */
  .warnbar, .hint.warn {
    color: #4a3406 !important; background: #fdf4e0 !important;
    border-color: #c9ad78 !important; border-left-color: #d9a02b !important;
    border-left-width: 7px !important;
  }
  .warnbar .wb-ic { background: #d9a02b !important; color: #fff !important; border-color: #a97c14 !important; }
  .hint.bad  { color: #7a2b14 !important; background: var(--orange-l) !important; border-left-color: #b8492a !important; }

  /* 屏幕上的按钮、照片上的小控件在纸上没意义，印出来只会占地方 */
  .btn, .sca-icobtn, .opt, .obtn, .pill, .photoBox, .dropzone,
  .ph .mv, .cat .ph .x, .pool .ph .x, .hcard .del { display: none !important; }

  /* T6 的数据表原来是 280px 高带滚动条的，纸上要整张摊开 */
  .tblwrap { max-height: none !important; overflow: visible !important; }
  table.dt th { position: static !important; }
  /* 屏幕上的"删一行"那一列，纸上不需要 */
  table.dt .delcol { display: none !important; }
  /* 首页大标题是渐变文字（文字本身是透明的），纸上要还原成黑字 */
  .hero h1 {
    -webkit-text-fill-color: #000 !important;
    background: none !important; color: #000 !important;
  }

  input[type=text], input[type=number], input[type=date], select, textarea {
    color: #000 !important; background: var(--print-solid) !important;
    border: 1px solid var(--print-line) !important;
  }
  .handline { border-bottom: 1.5px solid #333 !important; }

  table.grid { background: var(--print-solid) !important; border-color: var(--print-line) !important; }
  table.grid th, table.grid td { border-color: var(--line) !important; }
  table.grid th { color: #0d5b43 !important; background: var(--print-tint) !important; position: static; }
  table.grid tr:hover td { background: transparent !important; }
  table.grid td.mark, table.grid .mark { color: #6b4a08 !important; background: var(--amber-l) !important; }
  table.grid tr { break-inside: avoid; }

  .theme-chip { color: #0d5b43 !important; background: var(--print-tint) !important; border-color: var(--print-line) !important; }
  .excl { color: #333 !important; background: var(--print-tint) !important; }

  .col { border-color: var(--print-line) !important; break-inside: avoid; }
  .col.c1 { background: var(--print-tint) !important; }
  .col.c2 { background: var(--amber-l) !important; }
  .col.c3 { background: var(--print-tint) !important; }
  .col.c1 h4 { color: #0d5b43 !important; }
  .col.c2 h4 { color: #6b4a08 !important; }
  .dare, .col.dare { background: var(--orange-l) !important; }
  .banword { color: #7a2b14 !important; }
  .fixword { color: #0d5b43 !important; }

  .photoBox, .dropzone, .pool, .cat, .qrow, .hcard, .thumb, .step-item, .qcard {
    background: var(--print-solid) !important; border-color: var(--print-line) !important;
  }
  .step-item.on { background: var(--print-tint) !important; }
  .items { display: block !important; }
  .items .it .del, .items .it.no-print { display: none !important; }

  .streak { background: var(--print-tint) !important; border-color: var(--print-line) !important; }
  .streak .n { color: #0d5b43 !important; }

  .calgrid .c { color: #666 !important; background: var(--print-solid) !important; border-color: var(--line) !important; }
  .calgrid .c.on { color: #fff !important; background: var(--green) !important; }

  .hcard img, .thumb img, .cat .ph img, .pool .ph img, #photoPrev {
    background: var(--print-solid) !important; border-color: var(--line) !important;
  }
  /* 画布上印的是脚本画的面板（它自己会画成白底深字），
     CSS 这里不要再铺一层白，否则白底会盖掉画面的留白 */
  #chart { max-width: 100% !important; height: auto !important; background: transparent !important; }
  .qrow { break-inside: avoid; }

  .prog { border-color: var(--line) !important; background: #eee !important; }
  .prog i { background: var(--green) !important; }

  a { color: #000 !important; text-decoration: none !important; }
}


/* ==========================================================
   ③ -1 各页面组件（从各页 <style> 迁入，2026-10 重构）
   说明：这一节原来分散在 t1–t7 每个页面的 <style> 里，配色写死成浅色、
   圆角各写各的，导致"改了 app.css 却不生效"。现在统一收在这里，
   配色一律走令牌，页面只留标记。
   ========================================================== */

/* —— T1 选题筛选 + 转盘 —— */
.qcard {
  background: var(--surface); border: 2.5px solid var(--edge);
  border-radius: var(--r-md); padding: 15px 17px; margin: 10px 0;
}
.qcard > b { display: block; margin-bottom: 6px; font-size: 14.5px; }
.opt {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); border: 2.5px solid var(--edge); border-radius: 999px;
  padding: 9px 17px; margin: 5px 7px 0 0; cursor: pointer;
  font-size: 14px; font-weight: 700; color: var(--ink-2);
  box-shadow: 0 2px 0 var(--edge); transition: transform .12s, box-shadow .12s, background .16s;
}
.opt::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--line-2); transition: background .16s;
}
.opt:hover { color: var(--ink); background: var(--card-2); }
.opt:active { transform: translateY(2px); box-shadow: none; }
.opt.on {
  color: var(--on-solid); background: var(--s4); border-color: var(--edge);
  box-shadow: 0 2px 0 var(--edge);
}
.opt.on::before { background: var(--on-solid); opacity: .55; }
.theme-chip {
  display: inline-block; background: var(--card); color: var(--ink);
  border: 2.5px solid var(--edge); border-radius: 999px;
  padding: 5px 14px; margin: 4px 6px 0 0; font-size: 13.5px; font-weight: 700;
  box-shadow: 0 2px 0 var(--edge);
}
.excl {
  background: var(--surface); border: 2.5px solid var(--edge); border-radius: var(--r-md);
  padding: 12px 16px; margin-top: 12px; font-size: 13.5px;
  line-height: 1.8; color: var(--ink-2);
}
.excl b { color: var(--ink); }

/* —— T2 流程图 + 出发前清单 —— */
.step-item {
  border: 2.5px solid var(--edge); border-radius: var(--r-md);
  padding: 13px 16px; margin: 10px 0; background: var(--card);
  box-shadow: 0 2px 0 var(--edge);
}
.step-item.on { background: var(--surface); box-shadow: 0 2px 0 var(--edge); }
.step-item .t { font-weight: 800; font-size: 15px; }
/* .d 已经在前面的规则里给了 24px 左缩进（和标题对齐），这里不再覆盖 */
.step-item .d { font-size: 13px; color: var(--ink-2); }
/* 清单行的样式统一放在前面的「T2 流程图 + 出发前清单」一节里，
   这里不再重复定义 —— 之前就是因为重复定义把缩进覆盖掉了。 */
.handline {
  border-bottom: 2px solid var(--ink-3); display: inline-block;
  min-width: 220px; height: 20px;
}

/* —— T3 每日打卡 —— */
.streak {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 2.5px solid var(--edge); border-radius: var(--r-md);
  padding: 13px 18px; margin-bottom: 14px; box-shadow: 0 2px 0 var(--edge);
}
.streak .n { font-size: 30px; font-weight: 900; color: var(--green-d); line-height: 1; }
.photoBox {
  border: 3px dashed var(--edge); border-radius: var(--r-md); padding: 20px;
  text-align: center; color: var(--ink-2); cursor: pointer; background: var(--surface);
  transition: background .16s, border-color .16s;
}
.photoBox:hover { background: var(--surface-2); }
#photoPrev { max-width: 100%; max-height: 220px; border-radius: var(--r-sm); margin-top: 10px; display: none; }
.hist { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 12px; }
.hcard {
  background: var(--card); border: 2.5px solid var(--edge); border-radius: var(--r-md);
  padding: 12px; font-size: 13.5px; box-shadow: 0 2px 0 var(--edge);
}
.hcard img { width: 100%; height: 110px; object-fit: cover; border-radius: var(--r-xs); }
.hcard .d { color: var(--green-d); font-weight: 800; }
.hcard .del { color: var(--orange-d); cursor: pointer; font-size: 13px; }
.calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; margin-top: 10px; }
.calgrid .c {
  aspect-ratio: 1; border: 2.5px solid var(--edge); border-radius: var(--r-xs);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--ink-3); background: var(--card); font-weight: 700;
}
.calgrid .c.on { background: var(--s4); border-color: var(--edge); color: var(--on-solid); }

/* —— T4 照片分类 + 排序归档 —— */
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 12px; }
.cat {
  border: 3px dashed var(--edge); border-radius: var(--r-md);
  padding: 12px; min-height: 150px; background: var(--surface);
}
.cat.over { background: var(--surface-2); border-style: solid; }
.cat h4 { margin: 0 0 9px; font-size: 15px; display: flex; align-items: center; gap: 7px; }
.cat h4 .cnt { font-size: 12px; color: var(--ink-2); font-weight: 400; }
.cat .ph { display: inline-block; width: 64px; margin: 0 6px 6px 0; position: relative; cursor: grab; }
.cat .ph img {
  width: 64px; height: 48px; object-fit: cover; border-radius: var(--r-xs);
  display: block; border: 2px solid var(--edge); background: var(--white);
}
.cat .ph .x, .pool .ph .x {
  position: absolute; top: -7px; right: -5px; background: var(--orange); color: #fff;
  border-radius: 50%; width: 19px; height: 19px; font-size: 12px; line-height: 19px;
  text-align: center; display: none; border: 2px solid var(--edge); cursor: pointer;
}
.cat .ph:hover .x, .pool .ph:hover .x { display: block; }
.pool { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 10px; min-height: 60px; }
.pool .ph { width: 78px; position: relative; cursor: grab; }
.pool .ph img {
  width: 78px; height: 58px; object-fit: cover; border-radius: var(--r-xs);
  border: 2px solid var(--edge); display: block; background: var(--white);
}
.bar { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.pill {
  background: var(--card); color: var(--ink); border: 2.5px solid var(--edge);
  border-radius: 999px; padding: 6px 14px; font-size: 13.5px; font-weight: 700;
  cursor: pointer; box-shadow: 0 2px 0 var(--edge);
}
.pill.x { background: var(--orange-l); color: var(--orange-d); border-color: var(--edge); }

/* —— T5 问卷拍照 → 数据表 —— */
.qrow {
  display: flex; gap: 15px; align-items: flex-start;
  border: 2.5px solid var(--edge); border-radius: var(--r-md);
  padding: 14px; margin: 12px 0; background: var(--card); box-shadow: 0 2px 0 var(--edge);
}
.qrow .shot { width: 200px; flex: none; }
.qrow .shot img {
  width: 200px; border-radius: var(--r-sm); border: 2px solid var(--edge);
  cursor: pointer; background: var(--white);
}
.qrow .grow { flex: 1; min-width: 0; }
.qline { display: flex; align-items: center; gap: 8px; margin: 7px 0; font-size: 14px; flex-wrap: wrap; }
.qline .qn { width: 52px; color: var(--ink-2); flex: none; font-weight: 700; }
.obtn {
  border: 2.5px solid var(--edge); border-radius: var(--r-sm);
  padding: 7px 15px; cursor: pointer; font-size: 13.5px; font-weight: 700;
  background: var(--card); color: var(--ink-2); box-shadow: 0 2px 0 var(--edge);
  transition: transform .12s, box-shadow .12s;
}
.obtn:hover { color: var(--ink); background: var(--card-2); }
.obtn:active { transform: translateY(2px); box-shadow: none; }
.obtn.on { background: var(--s4); border-color: var(--edge); color: var(--on-solid); }
.obtn.flag { background: var(--s3); border-color: var(--edge); color: var(--on-solid); }
.prog {
  height: 12px; background: var(--surface-2); border: 2.5px solid var(--edge);
  border-radius: 99px; overflow: hidden; margin: 10px 0;
}
.prog i { display: block; height: 100%; background: var(--s2); width: 0; }
.keyhint {
  font-size: 12.5px; color: var(--ink); background: var(--card); border: 2px solid var(--edge);
  border-radius: var(--r-xs); padding: 4px 11px; display: inline-block; font-weight: 700;
}

/* —— T6 数据表 → 自动画图 —— */
.tblwrap {
  overflow: auto; max-height: 300px; border: 2.5px solid var(--edge);
  border-radius: var(--r-sm); background: var(--surface);
}
table.dt { border-collapse: collapse; font-size: 13.5px; min-width: 100%; }
table.dt th, table.dt td { border: 2px solid var(--edge); padding: 6px 8px; white-space: nowrap; }
table.dt th { background: var(--surface-2); color: var(--ink); position: sticky; top: 0; font-weight: 800; }
table.dt td input { width: 88px; border: none; padding: 3px 5px; font-size: 13.5px; font-family: inherit; background: transparent; color: var(--ink); }
table.dt td input:focus { outline: 2px solid var(--accent); border-radius: 6px; }
/* 画布本身透明：背景由脚本画的"半透明面板"负责。
   原来写死 background: var(--white)，深色主题下就是一块刺眼的白板。 */
#chart { border: none; background: transparent; max-width: 100%; }

/* —— T7 结论参谋 —— */
.col3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-top: 12px; }
@media (max-width: 900px) { .col3 { grid-template-columns: 1fr; } }
.col {
  border: 2.5px solid var(--edge); border-radius: var(--r-md);
  padding: 14px 16px; font-size: 14px; box-shadow: 0 2px 0 var(--edge);
}
.col h4 { margin: 0 0 9px; font-size: 15px; }
.col.c1 { background: var(--surface); }
.col.c2 { background: var(--surface); }
.col.c3 { background: var(--surface); }
.col.dare { background: var(--orange-l); }
.col li { margin: 6px 0; }
.banword { color: var(--orange-d); font-weight: 800; text-decoration: line-through; }
.fixword { color: var(--green-d); font-weight: 800; }
/* T7 数据表的列名：和 .mrow 一样三列 + 末尾一个删除位，
   这样表头和下面的输入框是一条竖线对齐的。
   第三列的字是动态的（人数 / 重复次数 / 记了几天…），见 t7 的 setUnit()。 */
/* 用和 .mrow 一样的 flex + 同样的字段宽度（150 / 90 / 90），
   所以窄屏下 .mrow 的输入框变 100% 时，表头也跟着变 —— 两边始终对齐。
   用 grid 写死列宽是不行的：.mrow 是 flex，窄屏媒体查询里会把宽度改成 100%。 */
.rowhead {
  display: flex; align-items: center; gap: 8px;
  padding: 0 0 6px; margin: 0 0 2px;
  font-size: 12px; font-weight: 700; color: var(--ink-soft);
  border-bottom: 2px solid var(--line-2);
}
.rowhead span { display: block; }
.rowhead span:nth-child(1) { width: 150px; }
.rowhead span:nth-child(2), .rowhead span:nth-child(3) { width: 90px; text-align: center; }
.rowhead span:nth-child(4) { width: 10px; }
.mrow { display: flex; gap: 9px; align-items: center; margin: 7px 0; flex-wrap: wrap; }
.mrow input { width: 150px; }
.mrow input.num { width: 90px; }

/* ==========================================================
   卡片 → 导航条的形变动画
   节奏放慢到能看清：卡片先"拿起来"，再飞向工具条缩成一片，
   落地后这一片闪一下，最后才换内容。总时长约 1.1s。
   ========================================================== */
/* 飞行中的那条流程条（morph-ghost）。
   这里踩过两个坑，都是这层自己造成的：
     · overflow:hidden —— 飞行中高度在收，里面的胶囊还没缩完，被裁掉了半截
     · 给它加背景色 —— 首页那条本来没有底色，飞起来凭空多出一大块，
       把里面七个胶囊罩住，看着就是"按钮有了奇怪的背景"
   所以：不裁剪、不加背景，让它只是"整条平移+缩放"，
   每一格保持自己原来的样子。 */
.morph-ghost {
  overflow: visible;
  background: transparent;
  box-shadow: none;
}
@keyframes railEnter {
  0%   { opacity: 0; transform: translateY(-10px) scale(.96); }
  100% { opacity: 1; transform: none; }
}
.sca-rail.rail-enter { animation: railEnter .42s cubic-bezier(.2,1.3,.4,1); }
@keyframes chipPulse {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.14); }
  100% { transform: scale(1); }
}
.sca-chip.pulse { animation: chipPulse .7s cubic-bezier(.2,1.4,.4,1); z-index: 2; }
@media (prefers-reduced-motion: reduce) {
  .sca-rail.rail-enter, .sca-chip.pulse { animation: none; }
  .morph-ghost { transition-duration: 1ms !important; }
}