/* ══════════════════════════════════════════════════════════════════
   monet.css —— 2026-10-11 用户要求：
     ① 色彩与背景参考莫奈画作的色调
     ② 内容不要都挤在屏幕中间（像只为手机设计），宽屏要用满
     ③ 各模块之间的间距拉大
     ④ 保险箱、日记的外观补到和其他板块一个水平
   最后加载，覆盖前面几层样式。想回到旧外观，删掉 index.html 里这一行 <link> 即可。
   ══════════════════════════════════════════════════════════════════ */

/* ---------- 莫奈色板 ----------
   取色来源（都调深到能当标题渐变用，浅色版本留给背景）：
     睡莲        水面青 #3f6e9c · 丁香紫 #7d68ad · 睡莲粉 #b7637f
     吉维尼花园   柳绿 #3d7d63
     印象·日出    晨橙 #c7793d · 雾中红 #c25d4f
     罂粟花田    罂粟红 #c96f55
     干草堆      麦秸金 #a57f3e
     塞纳河清晨   河青 #3f8c8f                                                 */
:root {
  --g1: #3f6e9c; --g2: #7d68ad; --g3: #b7637f;

  /* 画布：暖白底，面板是半透明的奶白，让背景色团透出来一点 */
  --canvas: #fbf8f2;
  --panel: rgba(255, 253, 249, 0.66);
  --panel-hover: rgba(255, 253, 249, 0.86);
  --fill: rgba(255, 253, 249, 0.72);
  --surface: #fffdf9;
  --text: #2a2833;
  --text-secondary: #75727f;
  --text-tertiary: #a29fab;
  --line: rgba(60, 50, 80, 0.08);
  --hairline: rgba(60, 50, 80, 0.10);

  /* 面板的柔和投影：带一点紫调，像画布上的阴影而不是灰色 */
  --monet-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 18px 40px -26px rgba(70, 55, 110, 0.32), 0 2px 8px -4px rgba(70, 55, 110, 0.08);

  /* 宽屏版心 */
  --wide: 1320px;
  --gap-xl: 32px;
}
.theme-quant  { --g1: #3d7d63; --g2: #3a7891; --g3: #4b6aa0; }   /* 吉维尼的柳与水 */
.theme-flight { --g1: #3b74a8; --g2: #5a6fb0; --g3: #8a6aac; }   /* 阿让特伊的帆船 */
.theme-words  { --g1: #7a62ad; --g2: #9d65a2; --g3: #b9677e; }   /* 紫藤 */
.theme-news   { --g1: #c7793d; --g2: #c25d4f; --g3: #a8577a; }   /* 印象·日出 */
.theme-diary  { --g1: #c96f55; --g2: #b85f78; --g3: #7e68ad; }   /* 罂粟花田 */
.theme-vault  { --g1: #a57f3e; --g2: #8c6b45; --g3: #6a5a48; }   /* 干草堆 */
.theme-server { --g1: #3f8c8f; --g2: #4579a8; --g3: #5b65a6; }   /* 塞纳河清晨 */

/* ---------- 画布与背景 ----------
   底色是暖白画布，加一层很淡的颗粒（像画布纹理），
   上面铺五团大而软的色块，模仿《睡莲》里水面、天光、花与倒影交叠的感觉。
   三团跟着板块变色（--bg-a/b/c），两团（丁香紫、鼠尾草绿）常驻，保证全站是一幅画。 */
html {
  background-color: var(--canvas);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .45 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#app::before {
  inset: -14%;
  background:
    radial-gradient(44% 40% at 12% 14%, color-mix(in srgb, var(--bg-a) 62%, transparent), transparent 70%),
    radial-gradient(40% 36% at 88% 20%, color-mix(in srgb, var(--bg-b) 58%, transparent), transparent 70%),
    radial-gradient(50% 42% at 62% 98%, color-mix(in srgb, var(--bg-c) 52%, transparent), transparent 70%),
    radial-gradient(36% 32% at 28% 72%, rgba(196, 178, 224, 0.50), transparent 70%),
    radial-gradient(32% 30% at 94% 64%, rgba(176, 204, 166, 0.48), transparent 70%),
    radial-gradient(60% 18% at 50% 46%, rgba(255, 250, 240, 0.55), transparent 75%);   /* 水面中间那道反光 */
  filter: saturate(0.95) blur(8px);
}
#app::before { --bg-a: #a9c9d6; --bg-b: #efc6cf; --bg-c: #f3d1a8; }                  /* 首页：水、花、日光 */
body[data-mod="quant"]  #app::before { --bg-a: #b8cfae; --bg-b: #a9c9d6; --bg-c: #c9d3e8; }
body[data-mod="news"]   #app::before { --bg-a: #f3cfa6; --bg-b: #efb9a8; --bg-c: #e6bccd; }
body[data-mod="words"]  #app::before { --bg-a: #cbbbe3; --bg-b: #e3bfd8; --bg-c: #efc6cf; }
body[data-mod="diary"]  #app::before { --bg-a: #f1c2ae; --bg-b: #efc6cf; --bg-c: #cbbbe3; }
body[data-mod="vault"]  #app::before { --bg-a: #ead7aa; --bg-b: #e2cba8; --bg-c: #d6cbb8; }
body[data-mod="server"] #app::before { --bg-a: #a9d0cd; --bg-b: #a9c3dc; --bg-c: #c3c3e6; }
body[data-mod="contact"] #app::before { --bg-a: #a9c9d6; --bg-b: #cbbbe3; --bg-c: #efc6cf; }

/* 标题光晕跟着变柔：莫奈的光是散的，不是聚光灯 */
.glow, .h-hero .h-glow { filter: blur(6px) saturate(0.9); opacity: 0.95; }

/* 面板：半透明奶白 + 轻微虚化，背景色块会隐约透过来 */
.card, .h-grid .tile, .sv-panel, .sv-usage, .sv-tile, .vt-card, .ct-card, .dy-profile, .vt-head, .vt-list, .vt-facts {
  background: var(--panel);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--monet-shadow);
}
.topnav, .topnav.scrolled { background: rgba(251, 248, 242, 0.62); }

/* ══════════════ 宽屏布局：版心从 720 / 1180 放到 1320 ══════════════ */
@media (min-width: 1068px) {
  .topnav-inner { max-width: var(--wide); }
  .page, .page-wide { max-width: var(--wide); padding-left: 40px; padding-right: 40px; }
  #mod-contact .page { max-width: 1040px; }
  .h-grid { max-width: var(--wide); padding: 0 40px 8px; }
  .h-foot { max-width: var(--wide); }

  /* 板块之间、卡片之间拉开 */
  .hero { padding: 88px 0 52px; }
  .grid { gap: 24px; margin-bottom: 28px; }
  .page-wide > .card, .page > .card, section > .card { margin-bottom: 28px; }

  /* ---- 首页：三栏。第一行 量化(占两栏)+航班，第二行 单词/新闻/日记 ---- */
  .h-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
  .h-grid > #t-quant { grid-column: span 2; }
  .h-grid .tile { padding: 34px 34px 30px; }
  .h-grid #tq-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 22px; margin-top: 18px; }
  .h-grid #tq-kpis b { font-size: 36px; }

  /* ---- 单词本：左栏统计与每日新增，右栏搜索与词条 ---- */
  .w-cols { display: grid; grid-template-columns: minmax(340px, 400px) minmax(0, 1fr); gap: var(--gap-xl); align-items: start; }
  .w-side { position: sticky; top: 76px; }
  .w-side .stats-section .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 0; }
  .w-side > .card { margin-top: 22px !important; }
  .w-main > .list-toolbar { margin-top: 0 !important; max-width: none; }
  .w-main .entry-list, .w-main .result-meta { max-width: none; }

  /* ---- 云服务器：两栏，左右成对 ---- */
  #mod-server .page { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; row-gap: 28px; align-items: start; }
  #mod-server .hero, #mod-server .sv-top, #mod-server .sv-msg, #mod-server .sv-note { grid-column: 1 / -1; }
  #mod-server .sv-msg { margin: -14px 0 0; }
  #mod-server .sv-usage, #mod-server .sv-tiles, #mod-server .sv-panel { margin: 0; }
  #mod-server .sv-usage { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
  #mod-server .sv-tiles { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  #mod-server .sv-p-sub, #mod-server .sv-proxy { align-self: stretch; }
  #mod-server .sv-info { grid-template-columns: 1fr; }

  /* ---- 量化 / 新闻：多给一点呼吸 ---- */
  #mod-quant .grid-4 { gap: 20px; }
}

/* ══════════════ 日记 ══════════════ */
.dy-profile {
  max-width: none; margin: 0 auto 30px; padding: 26px 34px; border-radius: 30px;
  gap: 34px;
}
.dy-profile .dy-ring.lg { flex: none; }
.dy-counts { gap: 48px; }
.dy-counts b { font-size: 34px; }
.dy-counts span { font-size: 13px; letter-spacing: 0.02em; }
.dy-bar { max-width: none; border-top: 0; padding: 0 4px; margin: 0 auto 20px; }

/* 照片：四列圆角卡片，留出缝隙，悬停时浮起 */
.dy-grid { max-width: none; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.dy-cell {
  border-radius: 22px; aspect-ratio: 4 / 5;
  box-shadow: 0 18px 36px -26px rgba(70, 55, 110, 0.55);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.dy-cell:hover { transform: translateY(-4px); box-shadow: 0 26px 46px -24px rgba(70, 55, 110, 0.6); }
.dy-cell:hover img { transform: scale(1.04); }
.dy-hover { border-radius: inherit; }
.dy-textcell { padding: 22px; font-size: 15px; line-height: 1.6; }
.dy-feed { max-width: 640px; }
.dy-card { border-radius: 26px; overflow: hidden; background: var(--panel); box-shadow: var(--monet-shadow); }
.dy-empty { padding: 70px 20px; }

@media (max-width: 1067px) { .dy-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
@media (max-width: 734px) {
  .dy-profile { padding: 18px; gap: 16px; border-radius: 22px; flex-wrap: wrap; }
  .dy-counts { gap: 18px; }
  .dy-counts b { font-size: 22px; }
  .dy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dy-cell { border-radius: 14px; }
}

/* ══════════════ 保险箱 ══════════════ */
/* 锁屏：键盘卡片 + 旁边一块「怎么保护文件」的说明（宽屏才显示） */
.vt-lock { gap: 28px; align-items: stretch; }
.vt-card { border-radius: 30px; }
.vt-facts { display: none; }
@media (min-width: 1068px) {
  .vt-lock { padding-top: 10px; }
  .vt-facts {
    display: flex; flex-direction: column; justify-content: flex-start;
    width: 400px; padding: 34px 36px; border-radius: 30px;
  }
  .vt-facts h3 { margin: 0 0 22px; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
  .vt-facts ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
  .vt-facts li { display: grid; grid-template-columns: 10px 1fr; column-gap: 14px; }
  .vt-facts li::before {
    content: ""; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%;
    background: linear-gradient(135deg, var(--g1), var(--g3)); grid-row: span 2;
  }
  .vt-facts b { font-size: 15px; font-weight: 600; }
  .vt-facts span { font-size: 13.5px; line-height: 1.6; color: var(--text-secondary); margin-top: 3px; }
}

/* 打开后：宽屏左右两栏，左边用量/操作/文件夹，右边文件列表 */
.vt-main { max-width: none; }
.vt-head { border-radius: 26px; padding: 24px 26px; }
.vt-list { border: 0; border-radius: 26px; overflow: hidden; }
.vt-row { border-top: 1px solid var(--line); padding-top: 14px; padding-bottom: 14px; transition: background 0.3s var(--ease); }
.vt-row:hover { background: rgba(255, 255, 255, 0.55); }
.vt-ic { border-radius: 12px; }
.vt-chip { background: var(--fill); border-color: transparent; }
.vt-search .inp { background: var(--panel); border-color: transparent; box-shadow: var(--monet-shadow); border-radius: 18px; }

@media (min-width: 1068px) {
  .vt-main {
    display: grid; grid-template-columns: 340px minmax(0, 1fr); column-gap: var(--gap-xl);
    grid-template-areas: "queue queue" "head list" "tools list" "more list" ". list";
    grid-template-rows: auto auto auto auto 1fr; align-items: start;
  }
  .vt-head { grid-area: head; flex-direction: column; align-items: stretch; gap: 22px; margin: 0; }
  .vt-head .vt-actions { flex-direction: column; align-items: stretch; }
  .vt-head .vt-actions > * { width: 100%; justify-content: center; }
  .vt-queue { grid-area: queue; }
  .vt-tools { grid-area: tools; margin: 20px 0 0; }
  .vt-folders { flex-direction: column; flex-wrap: nowrap; gap: 4px; }
  .vt-chip { text-align: left; border-radius: 12px; padding: 9px 14px; }
  .vt-list { grid-area: list; }
  .vt-more { grid-area: more; margin: 18px 0 0; }
  .vt-row { padding-left: 22px; padding-right: 18px; }
}

/* ══════════════ 手机端：间距也稍放大一点，但不改单栏 ══════════════ */
@media (max-width: 734px) {
  .grid { gap: 14px; margin-bottom: 18px; }
  .page-wide > .card, .page > .card, section > .card { margin-bottom: 18px; }
}

/* 原来写死的亮橙色（航班风险条、流量接近上限）换成《印象·日出》的晨橙与雾中红 */
.rt-bar.hot { background: linear-gradient(90deg, #d9955a, #c25d4f); }
.sv-bar i[data-level="near"] { background: linear-gradient(90deg, #d9955a, #c7793d); }

/* 每天流量图改成半宽后，31 个日期挤不下：只标 1、5、10、15… 其余隐藏（悬停柱子仍能看到日期） */
.sv-day span.minor { visibility: hidden; }

/* ══════════════ 画作背景（2026-10-11 用户要求「背景也换成画作」） ══════════════
   每个板块一幅莫奈原作（公有领域，来自维基共享资源，压成 WebP 放在 /art/，手机用 /art/m/ 小图）。
   分三层：最底下是画（body::before）→ 上面一层奶白薄纱（#app::before，中间浓、四周淡，
   保证标题和正文清楚）→ 最上面是半透明面板，透过它能看到虚化的画。
   只有当前板块那一幅会被下载。 */
body::before {
  content: ""; position: fixed; inset: -4%; z-index: -3; pointer-events: none;   /* 往外撑 4%，裁掉扫描件的画框边 */
  background: var(--art, none) center / cover no-repeat;
  filter: saturate(0.94);
}
body[data-mod="home"]    { --art: url("/art/home.webp"); }      /* 睡莲 */
body[data-mod="quant"]   { --art: url("/art/quant.webp"); }     /* 睡莲池上的桥（日本桥），1899 */
body[data-mod="news"]    { --art: url("/art/news.webp"); }      /* 印象·日出，1872 */
body[data-mod="words"]   { --art: url("/art/words.webp"); }     /* 紫藤 */
body[data-mod="diary"]   { --art: url("/art/diary.webp"); }     /* 阿让特伊的罂粟花田，1873 */
body[data-mod="vault"]   { --art: url("/art/vault.webp"); }     /* 干草堆（夏末） */
body[data-mod="server"]  { --art: url("/art/server.webp"); }    /* 吉维尼附近塞纳河的早晨，1897 */
body[data-mod="contact"] { --art: url("/art/contact.webp"); }   /* 撑阳伞的女人，1875 */
@media (max-width: 734px) {
  body[data-mod="home"]    { --art: url("/art/m/home.webp"); }
  body[data-mod="quant"]   { --art: url("/art/m/quant.webp"); }
  body[data-mod="news"]    { --art: url("/art/m/news.webp"); }
  body[data-mod="words"]   { --art: url("/art/m/words.webp"); }
  body[data-mod="diary"]   { --art: url("/art/m/diary.webp"); }
  body[data-mod="vault"]   { --art: url("/art/m/vault.webp"); }
  body[data-mod="server"]  { --art: url("/art/m/server.webp"); }
  body[data-mod="contact"] { --art: url("/art/m/contact.webp"); }
}

/* 薄纱：原来的五团色块退到很淡，主要靠画本身出色 */
#app::before {
  background:
    radial-gradient(120% 90% at 50% 40%, rgba(251, 248, 242, 0.70) 0%, rgba(251, 248, 242, 0.56) 55%, rgba(251, 248, 242, 0.34) 100%),
    radial-gradient(44% 40% at 12% 14%, color-mix(in srgb, var(--bg-a) 22%, transparent), transparent 70%),
    radial-gradient(40% 36% at 88% 20%, color-mix(in srgb, var(--bg-b) 20%, transparent), transparent 70%);
  filter: none;
  animation: none;
  inset: 0;
}
/* 画面上直接压字的地方（板块大标题、首页欢迎语）加一圈很淡的光，防止和笔触打架 */
.hero h1, .h-title { text-shadow: 0 1px 18px rgba(251, 248, 242, 0.85); }
.hero h1 .grad, .h-title .grad { text-shadow: none; filter: drop-shadow(0 1px 14px rgba(251, 248, 242, 0.9)); }
/* 面板透出的画要更虚一点，正文才稳 */
.card, .h-grid .tile, .sv-panel, .sv-usage, .sv-tile, .vt-card, .ct-card, .dy-profile, .vt-head, .vt-list, .vt-facts {
  background: rgba(255, 253, 249, 0.74);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  backdrop-filter: blur(22px) saturate(130%);
}

/* ══════════════ 第二轮（2026-10-11 用户要求）══════════════
   ① 薄纱再薄：画要更清楚
   ② 面板是液态玻璃：白色只留两三成，靠强虚化 + 上缘高光 + 细白边分层
   ③ 登录页不要黑客风：换成莫奈《艺术家在吉维尼的花园》+ 玻璃卡片 */
:root { --text-secondary: #625f6c; }

#app::before {
  background:
    radial-gradient(90% 70% at 50% 30%, rgba(251, 248, 242, 0.42) 0%, rgba(251, 248, 242, 0.26) 60%, rgba(251, 248, 242, 0.10) 100%);
}

.card, .h-grid .tile, .sv-panel, .sv-usage, .sv-tile, .vt-card, .ct-card, .dy-profile, .vt-head, .vt-list, .vt-facts,
.dy-card, .ai-form {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.24));
  -webkit-backdrop-filter: blur(28px) saturate(175%);
  backdrop-filter: blur(28px) saturate(175%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),          /* 上缘高光 */
    inset 0 -1px 0 rgba(255, 255, 255, 0.25),         /* 下缘反光 */
    inset 0 0 0 1px rgba(255, 255, 255, 0.42),        /* 细白边 */
    0 22px 48px -28px rgba(55, 40, 85, 0.42),
    0 2px 8px -4px rgba(55, 40, 85, 0.10);
}
.vt-row:hover { background: rgba(255, 255, 255, 0.30); }
.vt-search .inp { background: rgba(255, 255, 255, 0.40); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.topnav, .topnav.scrolled { background: rgba(251, 248, 242, 0.40); }

/* ---------- 登录页 ---------- */
#gate {
  background: #dcd8c4 url("/art/login.webp") center / cover no-repeat;
  font-family: var(--font);
}
@media (max-width: 734px) { #gate { background-image: url("/art/m/login.webp"); } }
#gate::before {                                   /* 中间一圈很淡的光，让卡片周围安静一点 */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(46% 42% at 50% 50%, rgba(251, 248, 242, 0.32), transparent 72%);
}
#gate .crt, #gate .pfx { display: none; }
#gate form {
  width: min(380px, 86vw); padding: 30px 26px 14px; border-radius: 30px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.50), rgba(255, 255, 255, 0.22));
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  backdrop-filter: blur(30px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 0 0 1px rgba(255, 255, 255, 0.45),
              0 30px 70px -30px rgba(40, 30, 70, 0.55);
  animation: gateIn 0.9s var(--ease-out) both;
}
@keyframes gateIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
#gate .gline { border: 0; padding: 0; margin-bottom: 12px; }
#gate input {
  height: 50px; padding: 0 18px; text-align: left;
  background: rgba(255, 255, 255, 0.46); border: 1px solid rgba(255, 255, 255, 0.65); border-radius: 16px;
  color: #2a2833; caret-color: #7d68ad; text-shadow: none;
  font-family: var(--font); font-size: 16px; letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
#gate input:focus { background: rgba(255, 255, 255, 0.68); border-color: rgba(125, 104, 173, 0.55);
  box-shadow: 0 0 0 4px rgba(125, 104, 173, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.8); }
#gate input::placeholder { color: rgba(42, 40, 51, 0.42); letter-spacing: 0.02em; }
#gate input[type="password"] { letter-spacing: 0.14em; }
#gate input:-webkit-autofill, #gate input:-webkit-autofill:hover, #gate input:-webkit-autofill:focus {
  -webkit-text-fill-color: #2a2833; caret-color: #7d68ad;
  -webkit-box-shadow: 0 0 0 60px #f3eee6 inset;
}
#gate #login-err { color: #a8344a; text-shadow: none; font-size: 13px; letter-spacing: 0; margin-top: 4px; }
#gate.busy input { opacity: 0.6; }

/* 画透得多了以后，直接压在画上的小控件和玻璃里的灰色注释要补强 */
:root { --text-tertiary: #6c6877; }
.sv-tile small, .sv-state small, .sv-legend, .sv-note, .sv-tile span, .kpis span, .dy-bar .sec { color: var(--text-secondary); }

/* 直接放在画面上的控件：套一层玻璃药丸底 */
.seg, .ai-chip, .sv-state, .sv-note, .fold > summary, .vt-more > summary, .h-cue, .h-langs, #dy-since, .result-meta:not(:empty) {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.34));
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.4),
              0 8px 22px -16px rgba(55, 40, 85, 0.4);
}
.ai-chip { border-radius: 999px; padding: 5px 12px; color: var(--text); }
.sv-state { border-radius: 18px; padding: 10px 16px 10px 14px; }
.sv-note { border-radius: 16px; padding: 12px 16px; }
.fold > summary { border-radius: 16px; padding-left: 16px; padding-right: 14px; }
.vt-more > summary { display: inline-block; border-radius: 999px; padding: 6px 14px; }
#dy-since, .result-meta:not(:empty) { display: inline-block; border-radius: 999px; padding: 4px 12px; }
.seg { border-radius: 999px; }
/* 板块内的标签条（量化的 总览/策略/记录）也套玻璃底；顶栏里的 .tabs 已有自己的底，不动 */
.tabs-wrap .tabs {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.34));
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.4), 0 8px 22px -16px rgba(55, 40, 85, 0.4);
}
.tabs-wrap .tab { color: var(--text); }

/* ══════════════ 第三轮（2026-10-11 用户要求）══════════════
   面板更实、画更清楚，并且两者都能在顶栏「外观」里自己调。
   所有玻璃都读这几个变量，滑块只改变量：
     --g-hi / --g-lo   面板玻璃左上/右下的白色浓度（越大越不透明）
     --v-c / --v-e     画上薄纱中间/边缘的浓度（越小画越清楚）                         */
:root {
  --g-hi: 0.66; --g-lo: 0.44;
  --v-c: 0.30;  --v-e: 0.05;
  --glass-bg: linear-gradient(150deg, rgba(255, 255, 255, var(--g-hi)), rgba(255, 255, 255, var(--g-lo)));
  --pill-bg: linear-gradient(150deg, rgba(255, 255, 255, calc(var(--g-hi) + 0.06)), rgba(255, 255, 255, calc(var(--g-lo) + 0.06)));
  --glass-filter: blur(28px) saturate(175%);
  /* 2026-10-12：玻璃边改成立体倒角——左上一道亮边、右下一道淡暗边、上沿内发光，和背景的画拉开对比 */
  --glass-ring: inset 1.5px 1.5px 0 -0.5px rgba(255, 255, 255, 0.95), inset -1px -1px 0 rgba(80, 60, 120, 0.13),
                inset 0 0 0 1px rgba(255, 255, 255, 0.40), inset 0 12px 22px -18px rgba(255, 255, 255, 0.85),
                0 24px 50px -28px rgba(45, 32, 78, 0.50), 0 3px 10px -6px rgba(45, 32, 78, 0.18);
}
#app::before {
  background: radial-gradient(90% 70% at 50% 30%, rgba(251, 248, 242, var(--v-c)) 0%,
              rgba(251, 248, 242, calc((var(--v-c) + var(--v-e)) / 2)) 60%, rgba(251, 248, 242, var(--v-e)) 100%);
}

/* 所有承载内容的块都是玻璃（含单词条目、新闻条目、统计卡、弹窗、AI 回答、首页页脚） */
.card, .h-grid .tile, .sv-panel, .sv-usage, .sv-tile, .vt-card, .ct-card, .dy-profile, .vt-head, .vt-list, .vt-facts,
.dy-card, .ai-form, .metric, .entry-row, .ai-ans, .ai-card, .w-leitner, .vt-q {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-filter);
  backdrop-filter: var(--glass-filter);
  box-shadow: var(--glass-ring);
}
.seg, .ai-chip, .sv-state, .sv-note, .fold > summary, .vt-more > summary, .h-cue, .h-langs, #dy-since,
.result-meta:not(:empty), .tabs-wrap .tabs, .list-toolbar .inp, .ext-meta-note, .h-foot .h-foot-inner {
  background: var(--pill-bg);
}

/* ---------- 顶栏「外观」按钮与面板 ---------- */
.look-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.look-pop {
  position: fixed; top: 58px; right: max(16px, calc((100vw - var(--wide)) / 2 + 40px)); z-index: 60;
  width: 280px; padding: 18px 18px 14px; border-radius: 22px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.70));
  -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  box-shadow: var(--glass-ring);
  transform-origin: top right; animation: lookIn 0.35s var(--ease-out);
}
.look-pop[hidden] { display: none; }
@keyframes lookIn { from { opacity: 0; transform: scale(0.94) translateY(-6px); } }
.look-pop h4 { margin: 0 0 14px; font-size: 15px; font-weight: 700; }
.look-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; margin-bottom: 14px; }
.look-row label { font-size: 13px; color: var(--text); }
.look-row output { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.look-row input[type="range"] { grid-column: 1 / -1; width: 100%; accent-color: #7d68ad; }
.look-reset { width: 100%; }
@media (max-width: 734px) { .look-pop { top: 54px; right: 12px; left: 12px; width: auto; } }

/* ---------- 首页卡片标题：英文/法文用手写体（中文仍是系统字体，按用户之前的要求） ---------- */
html[lang="en"] .h-grid .cover-title, html[lang="fr"] .h-grid .cover-title,
html[lang="en"] .h-foot .cover-title, html[lang="fr"] .h-foot .cover-title {
  font-family: 'KuchaHand', var(--font-display);
  font-weight: 400; letter-spacing: 0; line-height: 1.15;
}
html[lang="en"] .h-grid .cover-title, html[lang="fr"] .h-grid .cover-title { font-size: 46px; }
html[lang="en"] .h-grid .cover-title .grad, html[lang="fr"] .h-grid .cover-title .grad,
html[lang="en"] .h-foot .cover-title .grad, html[lang="fr"] .h-foot .cover-title .grad {
  display: inline-block; padding: 0 0.08em 0.18em; margin-bottom: -0.18em;
}
/* 卡片滚进视口时，标题也像大标题一样一笔笔写出来 */
.h-grid .cover-title span, .h-foot .cover-title span {
  -webkit-mask-image: linear-gradient(100deg, #000 var(--hp), transparent calc(var(--hp) + 12%));
  mask-image: linear-gradient(100deg, #000 var(--hp), transparent calc(var(--hp) + 12%));
}
.h-grid .cover-title .write, .h-foot .cover-title .write { animation: handWrite 1.1s cubic-bezier(0.45, 0.08, 0.35, 1) both; }

/* 单词条目原来是一条条直接压在背景上的列表，改成独立的玻璃条 */
.entry-row { border-radius: 18px; margin-bottom: 10px; border-bottom: 0 !important; padding-left: 18px; padding-right: 18px; }
.w-leitner { border-radius: 22px; padding: 18px 20px 12px; margin-top: 4px; }
.ai-ans:empty { display: none; }

/* 标题区背后垫一层柔和奶白光（跟着「画作清晰度」滑块变），画再花也压得住标题和小字 */
.hero::after, .h-hero-inner::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 50%; top: 50%; width: min(980px, 96vw); height: 120%;
  transform: translate(-50%, -50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(251, 248, 242, calc(var(--v-c) + 0.30)), transparent 72%);
  filter: blur(10px);
}
.h-hero-inner { position: relative; isolation: isolate; }
.h-hero-inner::before {   /* 首页欢迎语更大更浓：画面中间花叶最密 */
  width: min(1200px, 100vw); height: 150%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(251, 248, 242, calc(var(--v-c) + 0.42)), rgba(251, 248, 242, calc(var(--v-c) + 0.18)) 45%, transparent 75%);
}

/* 首页向下的提示箭头：圆形玻璃，不是方块 */
.h-cue { border-radius: 50%; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; }

/* 单词本标题区的小字：安装包状态、说明、怎么安装 */
.ext-meta:not(:empty), .ext-meta-note, .ext-steps > summary {
  display: inline-block; border-radius: 999px; padding: 5px 14px;
  background: var(--pill-bg); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  color: var(--text);
}
.ext-meta-note { color: var(--text-secondary); }

/* 新闻类别筛选：被筛掉的行 */
#nw-list .hit[hidden] { display: none !important; }
.nw-cats { margin-left: 14px; }
@media (max-width: 734px) { .nw-cats { order: 9; margin: 8px 0 0; width: 100%; overflow-x: auto; } }

/* ══════════════ 2026-10-12 首页：加保险箱、云服务器两张卡；欢迎语放大 ══════════════ */
.h-title { font-size: clamp(56px, 8.4vw, 132px); }
html[lang="en"] .h-title, html[lang="fr"] .h-title { font-size: clamp(56px, 8.6vw, 140px); }

@media (min-width: 1068px) {
  .h-grid > #t-server { grid-column: span 2; }      /* 第三行：保险箱 1 栏 + 云服务器 2 栏 */
}
.tv-lock {
  flex: 1; display: grid; place-items: center; min-height: 120px; margin: 10px 0 18px;
}
.tv-lock svg {
  width: 64px; height: 64px; padding: 16px; border-radius: 22px; box-sizing: content-box;
  fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  background: linear-gradient(140deg, var(--g1), var(--g3));
  box-shadow: 0 18px 34px -18px color-mix(in srgb, var(--g2) 80%, transparent);
}
.ts-bar { height: 8px; border-radius: 5px; background: rgba(60, 50, 80, 0.10); overflow: hidden; margin: 18px 0 12px; }
.ts-bar i { display: block; height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--g1), var(--g2)); transition: width 1s var(--ease-out); }
.ts-bar i[data-level="near"] { background: linear-gradient(90deg, #d9955a, #c7793d); }
.ts-bar i[data-level="over"] { background: linear-gradient(90deg, #c25d4f, #a8344a); }
.ts-state { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 18px; color: var(--text-secondary); }
.ts-state b { font-weight: 600; color: var(--text); }
.ts-state .sv-dot { width: 8px; height: 8px; border-radius: 50%; background: #9aa0a6; }
.ts-state[data-state="on"] .sv-dot { background: #34c759; box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.18); }
.h-grid #t-server .tile-cta, .h-grid #t-vault .tile-cta { margin-top: auto; align-self: flex-start; }

/* ---------- 菜单栏收起 / 全屏 / 外观面板新增项（2026-10-12） ---------- */
.topnav { transition: transform 0.45s var(--ease-out), background 0.3s var(--ease), box-shadow 0.3s var(--ease); }
body.nav-hidden .topnav { transform: translateY(calc(-100% - 2px)); }
.nav-peek { position: fixed; top: 0; left: 0; right: 0; height: 10px; z-index: 11; display: none; }
body.nav-hidden .nav-peek { display: block; }
.fs-btn .fs-out { display: none; }
body.is-fs .fs-btn .fs-in { display: none; }
body.is-fs .fs-btn .fs-out { display: inline; }
.fs-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.look-check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 2px 0 14px; cursor: pointer; }
.look-check input { accent-color: #7d68ad; width: 16px; height: 16px; }

/* 2026-10-12 用户要求：首页暂时移除「航班延误险」卡片。只隐藏不删（flightTail/flightRoutes 还会往里填数），
   想恢复就删掉下面第一行。去掉它后：量化独占第一行，单词/新闻/日记第二行，保险箱 + 云服务器第三行 */
.h-grid > #t-flight { display: none; }
@media (min-width: 1068px) { .h-grid > #t-quant { grid-column: 1 / -1; } }

/* ══════════════ 2026-10-12 顶栏与交互 ══════════════ */

/* 全屏、语言、刷新：任何宽度都只留图标 */
#fs-btn, #refresh, #lang-btn { width: 34px; padding: 0 !important; justify-content: center; }
#fs-btn span, #refresh span, #lang-cur { display: none !important; }
#fs-btn svg, #refresh svg, #lang-btn svg { display: block; width: 16px; height: 16px; }

/* ---------- 菜单栏：拖拽把手 ---------- */
.topnav { position: sticky; }
.nav-grip {
  position: absolute; left: 50%; bottom: -13px; z-index: 2;
  width: 56px; height: 14px; padding: 0; border: 0; background: none; cursor: ns-resize;
  transform: translate(-50%, var(--nav-drag, 0px)); touch-action: none;
}
.nav-grip i {
  display: block; width: 40px; height: 5px; margin: 0 auto; border-radius: 3px;
  background: rgba(60, 50, 80, 0.28); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: background 0.25s var(--ease), width 0.3s var(--spring);
}
.nav-grip:hover i, body.nav-dragging .nav-grip i { background: rgba(60, 50, 80, 0.55); width: 52px; }
body:not(.nav-dragging) .nav-grip { transition: transform 0.35s var(--spring-soft); }

/* ---------- 展开：大导航，每个板块一幅画 ---------- */
/* 高度由脚本按内容实际高度写进 max-height（写死 520 会让收起先「空转」一段；grid 0fr→1fr 在这里算不对高度） */
.nav-big { max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.5s var(--ease-out), opacity 0.3s var(--ease); }
.nav-big > .nb-grid { padding-top: 6px; padding-bottom: 26px; }
body.nav-expanded .nav-big { opacity: 1; }
.nb-grid {
  max-width: var(--wide, 1320px); margin: 0 auto; padding: 0 40px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
}
.nb-card {
  position: relative; height: 112px; border: 0; border-radius: 20px; overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 2px;
  padding: 14px 16px; text-align: left; color: #fff;
  background: var(--art) center / cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 14px 30px -20px rgba(40, 30, 70, 0.6);
  transition: transform 0.45s var(--spring-soft), box-shadow 0.4s var(--ease);
}
.nb-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(20, 16, 30, 0.55)); }
.nb-card b, .nb-card small { position: relative; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35); }
.nb-card b { font-size: 17px; font-weight: 700; }
.nb-card small { font-size: 12px; opacity: 0.85; }
.nb-card:hover { transform: translateY(-3px) scale(1.02); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55), 0 22px 40px -22px rgba(40, 30, 70, 0.7); }
body[data-mod="home"] .nb-card[data-mod="home"], body[data-mod="words"] .nb-card[data-mod="words"],
body[data-mod="news"] .nb-card[data-mod="news"], body[data-mod="quant"] .nb-card[data-mod="quant"],
body[data-mod="diary"] .nb-card[data-mod="diary"], body[data-mod="vault"] .nb-card[data-mod="vault"],
body[data-mod="server"] .nb-card[data-mod="server"], body[data-mod="contact"] .nb-card[data-mod="contact"] {
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.95), 0 14px 30px -20px rgba(40, 30, 70, 0.6);
}
@media (max-width: 734px) {
  .nb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 14px; }
  .nb-card { height: 84px; border-radius: 16px; }
}

/* ---------- 收起：整条菜单栏藏到屏幕上面，顶端留一个唤出按钮 ---------- */
body.nav-closed .topnav { transform: translateY(calc(-100% - 16px)); }
body.nav-closed .nav-peek { display: block; }
.nav-tab {
  position: fixed; top: 0; left: 50%; z-index: 12;
  width: 64px; height: 28px; padding: 0; border: 0; cursor: pointer; border-radius: 0 0 16px 16px;
  display: grid; place-items: center; color: var(--text);
  background: var(--pill-bg, rgba(255, 255, 255, 0.7));
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.8), 0 8px 20px -12px rgba(40, 30, 70, 0.5);
  transform: translate(-50%, -110%); transition: transform 0.4s var(--spring-soft);
}
.nav-tab svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
body.nav-closed.peek-tab .nav-tab, body.nav-closed .nav-tab:hover { transform: translate(-50%, 0); }
@media (hover: none) { body.nav-closed .nav-tab { transform: translate(-50%, -40%); } }   /* 触屏没有悬停：一直露出一截 */

/* ---------- 下拉刷新 ---------- */
.ptr {
  position: fixed; left: 50%; top: 56px; z-index: 40; pointer-events: none;
  display: flex; align-items: center; gap: 8px; padding: 8px 16px 8px 12px; border-radius: 999px;
  font-size: 13px; color: var(--text);
  background: var(--pill-bg, rgba(255, 255, 255, 0.75));
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 26px -14px rgba(40, 30, 70, 0.5);
  opacity: 0; transform: translate(-50%, calc(var(--pull, 0px) * 0.6 - 30px));
  transition: opacity 0.2s var(--ease);
}
.ptr.on, .ptr.spin { opacity: 1; }
.ptr svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round;
  transform: rotate(calc(var(--pull, 0px) * 3deg)); }
.ptr.ready svg { color: #7d68ad; }
.ptr.spin svg { animation: ptrSpin 0.8s linear infinite; }
@keyframes ptrSpin { to { transform: rotate(360deg); } }
body.nav-closed .ptr { top: 18px; }

/* ══════════ 首页背景画「活」起来（用户问有没有莫奈的动图：没有原作动图，这里让《睡莲》自己动）══════════
   ① 画面极慢地推拉漂移（像镜头在水面上缓缓移动）  ② 叠一层水面反光：几团柔光在画上慢慢游走。
   都只用 transform / background-position，不碰布局，开销很小；外观里可以关；系统「减少动态效果」时自动停。 */
body[data-mod="home"]::before { animation: monetDrift 70s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate; will-change: transform; }
@keyframes monetDrift {
  0%   { transform: scale(1.00) translate3d(0, 0, 0); }
  50%  { transform: scale(1.06) translate3d(-1.2%, 0.8%, 0); }
  100% { transform: scale(1.10) translate3d(1.4%, -1.0%, 0); }
}
body[data-mod="home"]::after {
  content: ""; position: fixed; inset: -10%; z-index: -3; pointer-events: none;
  background:
    radial-gradient(18% 10% at 30% 40%, rgba(255, 255, 240, 0.42), transparent 70%),
    radial-gradient(14% 8% at 70% 62%, rgba(255, 250, 255, 0.36), transparent 70%),
    radial-gradient(22% 12% at 52% 82%, rgba(240, 250, 255, 0.34), transparent 70%),
    radial-gradient(12% 7% at 18% 74%, rgba(255, 255, 245, 0.30), transparent 70%);
  mix-blend-mode: soft-light; filter: blur(6px);
  animation: monetShimmer 26s ease-in-out infinite alternate;
}
@keyframes monetShimmer {
  0%   { transform: translate3d(0, 0, 0) scale(1); opacity: 0.75; }
  33%  { transform: translate3d(3%, -2%, 0) scale(1.05); opacity: 1; }
  66%  { transform: translate3d(-2%, 2.5%, 0) scale(0.98); opacity: 0.85; }
  100% { transform: translate3d(2%, 1%, 0) scale(1.04); opacity: 1; }
}
body.art-still::before, body.art-still::after { animation: none !important; }
body.art-still[data-mod="home"]::after { display: none; }
@media (prefers-reduced-motion: reduce) {
  body[data-mod="home"]::before, body[data-mod="home"]::after { animation: none; }
}

/* ══════════ 背景全站动态（2026-10-12 用户要求「背景要动态」：原先只有首页，且 70 秒一个来回几乎看不出）══════════
   所有板块的画都动：36 秒一轮推拉漂移，幅度加大；上面一层光斑像水面反光一样游走；
   另有一层很慢的明暗呼吸。全部只动 transform / opacity，交给显卡，不触发重排。 */
body[data-mod]::before { animation: monetDrift2 36s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate; will-change: transform; }
@keyframes monetDrift2 {
  0%   { transform: scale(1.02) translate3d(0, 0, 0)        rotate(0deg); }
  25%  { transform: scale(1.09) translate3d(-2.2%, 1.2%, 0) rotate(-0.4deg); }
  50%  { transform: scale(1.14) translate3d(1.6%, -1.8%, 0) rotate(0.3deg); }
  75%  { transform: scale(1.08) translate3d(2.4%, 1.4%, 0)  rotate(0.5deg); }
  100% { transform: scale(1.12) translate3d(-1.4%, -1.2%, 0) rotate(-0.2deg); }
}
body[data-mod]::after {
  content: ""; position: fixed; inset: -12%; z-index: -3; pointer-events: none;
  background:
    radial-gradient(20% 11% at 30% 38%, rgba(255, 255, 240, 0.55), transparent 70%),
    radial-gradient(16% 9% at 72% 60%, rgba(255, 250, 255, 0.48), transparent 70%),
    radial-gradient(24% 13% at 52% 84%, rgba(240, 250, 255, 0.45), transparent 70%),
    radial-gradient(14% 8% at 16% 72%, rgba(255, 255, 245, 0.42), transparent 70%),
    radial-gradient(18% 10% at 86% 24%, rgba(255, 245, 235, 0.40), transparent 70%);
  mix-blend-mode: soft-light; filter: blur(5px);
  animation: monetShimmer2 18s ease-in-out infinite alternate, monetBreath 11s ease-in-out infinite alternate;
}
@keyframes monetShimmer2 {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  33%  { transform: translate3d(5%, -3%, 0) scale(1.08); }
  66%  { transform: translate3d(-4%, 4%, 0) scale(0.96); }
  100% { transform: translate3d(3%, 2%, 0) scale(1.06); }
}
@keyframes monetBreath { from { opacity: 0.55; } to { opacity: 1; } }
body.art-still[data-mod]::before, body.art-still[data-mod]::after { animation: none !important; }
body.art-still[data-mod]::after { display: none; }
@media (prefers-reduced-motion: reduce) { body[data-mod]::before, body[data-mod]::after { animation: none; } }

/* ══════════ WebGL 活画（art-gl.js）接管时：CSS 背景层让位 ══════════ */
#art-gl { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -3; pointer-events: none; display: block; }
body.gl-on::before, body.gl-on::after { display: none !important; }
body.gl-on #gate { background: transparent; }          /* 登录页的《吉维尼花园》也由画布来画，会动 */
body:not(.gl-on) #art-gl { display: none; }

/* ══════════ 首页欢迎语：不闪，边缘发光（2026-10-12） ══════════
   去掉每次回首页重播的放大模糊入场、笔刷扫出遮罩，以及背后光晕的变色动画；
   字本身静止，靠多层柔光让字的边缘从画里「亮」出来。 */
.h-title, .h-title.big-in { animation: none !important; }
.h-title span, .h-title .write { animation: none !important; -webkit-mask-image: none !important; mask-image: none !important; }
.h-hero .h-glow { animation: glowDrift 16s var(--ease-io) infinite alternate !important; filter: blur(6px) saturate(0.9) !important; }
.h-title .h-l1 {
  text-shadow:
    0 0 1px rgba(255, 255, 255, 0.95),
    0 0 6px rgba(255, 255, 255, 0.85),
    0 0 18px rgba(255, 250, 238, 0.75),
    0 0 42px rgba(214, 196, 245, 0.55),
    0 0 80px rgba(190, 210, 240, 0.35);
}
/* 渐变字是背景裁出来的，text-shadow 会盖在渐变上面，只能用 drop-shadow 叠光 */
.h-title .grad {
  text-shadow: none;
  filter:
    drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.95))
    drop-shadow(0 0 7px rgba(255, 252, 244, 0.85))
    drop-shadow(0 0 20px rgba(220, 205, 250, 0.65))
    drop-shadow(0 0 44px rgba(170, 195, 240, 0.45));
}

/* ══════════ 下拉刷新时菜单栏不跟着被拽下来（2026-10-12） ══════════
   页面在顶部继续下拉时，浏览器自带「橡皮筋」回弹会把整页连同菜单栏一起往下拖。
   关掉原生回弹，下拉只显示自己的「下拉刷新」提示。原先只在手机上关了，这里全宽度都关。 */
html, body { overscroll-behavior-y: none; }

/* ══════════ 登录 → 主页 过场（2026-10-12） ══════════ */
#gate.leaving form { animation: gateOut 0.56s cubic-bezier(0.55, 0, 0.75, 0.2) forwards; }
@keyframes gateOut {
  to { opacity: 0; transform: translateY(-10px) scale(1.06); filter: blur(10px); }
}
#gate.leaving::before { transition: opacity 0.5s var(--ease); opacity: 0; }

/* 主页从屏幕中心「晕开」：圆形遮罩由小到大，边缘带一圈柔光 */
body.app-enter #app { animation: appBloom 1.25s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes appBloom {
  from { clip-path: circle(0% at 50% 46%); opacity: 0.4; }
  60%  { opacity: 1; }
  to   { clip-path: circle(150% at 50% 46%); opacity: 1; }
}
/* 欢迎语：从下方浮起，光慢慢亮起来（只播这一次，之后静止） */
body.app-enter .h-title { animation: titleRise 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both !important; }
@keyframes titleRise {
  from { opacity: 0; transform: translateY(26px); letter-spacing: 0.04em; }
  to   { opacity: 1; transform: none; }
}
body.app-enter .h-title .h-l1 { animation: glowIn 1.8s var(--ease) 0.35s both !important; }
body.app-enter .h-title .grad { animation: glowIn 1.8s var(--ease) 0.55s both !important; }
@keyframes glowIn { from { opacity: 0; } to { opacity: 1; } }
body.app-enter .h-langs, body.app-enter .h-cue { animation: titleRise 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.7s both; }
body.app-enter .topnav { animation: navDrop 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both; }
@keyframes navDrop { from { transform: translateY(-110%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  #gate.leaving form, body.app-enter #app, body.app-enter .h-title, body.app-enter .topnav { animation: none !important; }
}

/* ══════════ 联系：五种联系方式（2026-10-12） ══════════ */
.ct-list { max-width: 1180px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
#mod-contact .page { max-width: 1260px; }
.ct-card .ct-value { word-break: break-all; }
.ct-card .ct-value .grad { font-size: clamp(19px, 2vw, 24px); }
.ct-save { grid-column: 1 / -1; display: flex; justify-content: center; margin-top: 4px; }
.ct-save .btn { background: var(--pill-bg); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.4); }

/* ══════════ 访客模式（2026-10-12：首页公开，进板块要登录） ══════════ */
.guest-only, .tile-guest, .gate-x { display: none; }
body.guest .guest-only { display: inline-flex; }
body.guest #refresh, body.guest #logout, body.guest .h-ai, body.guest .h-doc, body.guest .h-doc + * { display: none !important; }
/* 首页「个人」卡片：访客只看标题和锁，数据区一律藏起来（本来也不会去请求）。「我的项目」卡片公开，不受影响 */
body.guest .h-grid:not(.pj-grid) .tile > :not(.cover):not(.tile-guest):not(.tile-cta):not(.cta-row):not(.tv-lock):not(.glow):not(.tile-art):not(.tile-rim):not(.js-tilt-glare) { display: none !important; }
body.guest .h-grid:not(.pj-grid) .cta-row .ghost { display: none !important; }
body.guest .tile-guest {
  display: flex; align-items: center; gap: 10px; margin: 18px 0 22px; flex: 1;
  font-size: 14px; color: var(--text-secondary);
}
.tile-guest svg {
  width: 22px; height: 22px; padding: 9px; border-radius: 14px; box-sizing: content-box; flex: none;
  fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  background: linear-gradient(140deg, var(--g1), var(--g3));
  box-shadow: 0 12px 24px -14px color-mix(in srgb, var(--g2) 80%, transparent);
}
body.guest .h-grid .tile .tile-cta { margin-top: auto; }

/* 登录框：访客模式下是浮在首页上的一层，背后的首页虚化变暗；可以关掉 */
body.guest #gate {
  background: rgba(28, 22, 40, 0.22) !important;
  -webkit-backdrop-filter: blur(12px) saturate(120%); backdrop-filter: blur(12px) saturate(120%);
  animation: gateFade 0.35s var(--ease) both;
}
@keyframes gateFade { from { opacity: 0; } }
body.guest #gate:not([hidden]) form { animation: gateCardIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes gateCardIn { from { opacity: 0; transform: translateY(16px) scale(0.97); } }
body.guest .gate-x {
  display: grid; place-items: center; position: absolute; top: 18px; right: 18px; z-index: 2;
  width: 40px; height: 40px; border: 0; border-radius: 50%; cursor: pointer; color: #2a2833;
  background: rgba(255, 255, 255, 0.6); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 22px -14px rgba(20, 14, 30, 0.6);
}
.gate-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
body.guest #gate.leaving { animation: gateFadeOut 0.56s var(--ease) forwards; }
@keyframes gateFadeOut { to { opacity: 0; } }

/* ══════════ 背景画作标注：右下角白字（2026-10-12） ══════════ */
.art-cap {
  display: block; margin-top: auto; padding: 36px 20px 22px; text-align: center; pointer-events: none;
  font-size: 12.5px; letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 1px 2px rgba(20, 14, 30, 0.6), 0 0 14px rgba(20, 14, 30, 0.5);
}
.art-cap:empty { display: none; }
/* #app 撑满一屏，内容短的板块里标注也落在画的下沿 */
#app:not([hidden]) { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
#app > * { flex-shrink: 0; }
.gate-cap { position: absolute; left: 0; right: 0; bottom: 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
@media (max-width: 734px) {
  .art-cap { font-size: 11px; padding: 28px 16px 14px; }
  #app:not([hidden]) { min-height: calc(100svh - var(--bar-h) - env(safe-area-inset-bottom)); }
}

/* 运行原理：下载 Markdown（贴着关闭按钮，滚动时一直在） */
.doc-dl { position: sticky; top: 14px; float: right; margin: 14px 8px 0 0; z-index: 2; display: inline-flex; align-items: center; gap: 6px; }
.doc-dl svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.doc-body a { color: var(--accent, #3d6f9e); text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
@media (max-width: 640px) { .doc-dl span { display: none; } .doc-dl { width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 50%; } }

/* 手机：联系方式改成紧凑的一行一条；二维码是给电脑屏幕让手机扫的，手机上不显示 */
@media (max-width: 734px) {
  .ct-list { gap: 12px; }
  .ct-card { display: grid; grid-template-columns: 46px 1fr; column-gap: 14px; align-items: center; text-align: left; padding: 16px 16px 14px; border-radius: 20px; }
  .ct-card .ct-icon { grid-row: span 2; width: 46px; height: 46px; border-radius: 14px; margin: 0; animation: none; }
  .ct-card .ct-icon svg { width: 22px; height: 22px; }
  .ct-card .ct-label { font-size: 12.5px; }
  .ct-card .ct-value { margin: 2px 0 0; min-width: 0; }
  .ct-card .ct-value .grad { font-size: 17px; }
  .ct-card .ct-actions { grid-column: 1 / -1; justify-content: flex-start; margin-top: 12px; padding-left: 60px; }
  .ct-card .ct-actions .btn { height: 36px; padding: 0 16px; font-size: 14px; }
  .ct-card .ct-qr { display: none; }
  .ct-save { margin-top: 6px; }
}

/* 手机：插件只能装在电脑浏览器上，下载按钮换成一句说明；云服务器顶部状态独占一行、两个按钮平分 */
.ext-phone { display: none; }
@media (max-width: 734px) {
  #mod-words .ext-dls, #mod-words .ext-meta, #mod-words .ext-meta-note, #mod-words .ext-steps { display: none; }
  #mod-words .ext-phone { display: block; max-width: 340px; margin: 4px auto 0; padding: 10px 16px; border-radius: 16px; font-size: 13px; line-height: 1.55; text-align: center;
    color: var(--text-secondary); background: var(--pill-bg, rgba(255,255,255,.5)); -webkit-backdrop-filter: var(--glass-filter, blur(20px)); backdrop-filter: var(--glass-filter, blur(20px)); }
  .sv-top { display: grid; grid-template-columns: 1fr; gap: 12px; }
  .sv-top .sv-state { width: 100%; box-sizing: border-box; }
  .sv-top .sv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .sv-top .sv-actions .btn { width: 100%; height: 44px; justify-content: center; }
}

/* 直接落在画上的说明小字（量化免责声明等）也垫一层玻璃，否则在花丛上看不清 */
.foot-note { padding: 12px 18px; border-radius: 16px; background: var(--pill-bg); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  box-shadow: var(--glass-ring); color: var(--text-secondary); width: fit-content; max-width: 100%; box-sizing: border-box; }

/* 电脑：联系方式排成「两个邮箱一行、两个电话 + GitHub 一行」，不留空格；地址不折行 */
@media (min-width: 1100px) {
  .ct-list { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ct-list .ct-card { grid-column: span 2; }
  .ct-list .ct-card[data-key="email"], .ct-list .ct-card[data-key="gmail"] { grid-column: span 3; }
}
@media (min-width: 735px) and (max-width: 1099px) {
  .ct-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-list .ct-card[data-key="github"] { grid-column: 1 / -1; }
}
@media (min-width: 735px) {
  .ct-card .ct-value { word-break: normal; overflow-wrap: normal; white-space: nowrap; max-width: 100%; }
  .ct-card .ct-value .grad { font-size: clamp(18px, 1.75vw, 24px); }
}

/* 空状态提示（单词本、新闻、保险箱没有内容时）垫玻璃，别直接写在画上 */
#w-list > .empty-state, #dy-grid > .empty-state {
  padding: 28px 24px; border-radius: 20px; background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  box-shadow: var(--glass-ring); color: var(--text-secondary); line-height: 1.7;
}

/* 画上的次要按钮、空状态也要能看清 */
.sv-actions .btn:not(.btn-primary), .vt-actions .btn:not(.btn-primary) { background: var(--pill-bg); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.4); }
.dy-empty { max-width: 420px; margin: 24px auto; padding: 30px 28px 26px; border-radius: 24px; background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); box-shadow: var(--glass-ring); }
#dy-since:empty { display: none; }

/* 没有 WebGL（静态背景）时，访客登录框后面也换成《艺术家在吉维尼的花园》，和底部标注对得上 */
body.guest:not(.gl-on) #gate {
  background: linear-gradient(rgba(28, 22, 40, 0.18), rgba(28, 22, 40, 0.18)), #dcd8c4 url("/art/login.webp") center / cover no-repeat !important;
}
@media (max-width: 734px) {
  body.guest:not(.gl-on) #gate { background-image: linear-gradient(rgba(28, 22, 40, 0.18), rgba(28, 22, 40, 0.18)), url("/art/m/login.webp") !important; }
}
/* 有 WebGL 时画布会自己换成《吉维尼花园》：把首页内容淡出，不再模糊，让会动的画清楚露出来 */
body.guest.gl-on #gate { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(28, 22, 40, 0.10) !important; }
body.guest #app { transition: opacity 0.35s var(--ease); }
body.guest.gl-on:has(#gate:not([hidden])) #app { opacity: 0; pointer-events: none; }

/* 窄屏（尤其法语标签长）：底栏 8 个按钮必须都在屏幕内；分段按钮放不下就横向滑动，不被裁掉 */
@media (max-width: 734px) {
  .bottombar button { min-width: 0; }
  .seg, .tabs { max-width: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .seg::-webkit-scrollbar, .tabs::-webkit-scrollbar { display: none; }
  .seg .seg-btn, .tabs .tab { flex: 0 0 auto; }
  .list-toolbar .seg { flex: 0 1 auto; }
  .result-head, .nw-head { min-width: 0; }
}
@media (max-width: 380px) {
  .bottombar button { font-size: 9.5px; gap: 2px; }
  .bottombar button svg { width: 22px; height: 22px; }
  html[lang="fr"] .bottombar button span, html[lang="en"] .bottombar button span { letter-spacing: -0.02em; }
  .dy-counts { flex-wrap: wrap; row-gap: 10px; justify-content: center; }
  .dy-counts > div { min-width: 0; }
}

/* 大导航收起时不加载卡片上的 8 张小画，展开时再取（访客首屏少下 ~0.8MB） */
body:not(.nav-expanded) .nb-card { background-image: none; }

/* 运行原理里的代码：语言标签 + 轻量高亮（暗底） */
.doc-body pre { position: relative; }
.doc-body pre[data-lang]::before { content: attr(data-lang); position: absolute; top: 8px; right: 12px; font: 600 10.5px/1 var(--font); letter-spacing: 0.06em;
  text-transform: uppercase; color: rgba(230, 230, 230, 0.42); }
.doc-body pre[data-lang] { padding-top: 26px; }
.doc-body .tk-c { color: #8b93a7; font-style: italic; }
.doc-body .tk-s { color: #a8d8a0; }
.doc-body .tk-k { color: #c9a7ff; }
.doc-body .tk-n { color: #f4c27a; }
@media (max-width: 640px) { .doc-body pre { font-size: 11.5px; padding: 14px 14px; } .doc-body pre[data-lang] { padding-top: 24px; } }

/* 手机：单词本搜索栏与下面的卡片对齐；搜索框独占一行，筛选和排序并排 */
@media (max-width: 734px) {
  #mod-words .list-toolbar { flex-wrap: wrap; padding-left: 0; padding-right: 0; max-width: none; margin-left: 0; margin-right: 0; }
  #mod-words .list-toolbar #w-search { flex: 1 1 100%; }
  #mod-words .list-toolbar .seg { flex: 1 1 auto; }
  #mod-words .list-toolbar #w-sort { flex: 0 0 auto; }
}

/* 电脑宽屏：词条两列排，不再一条条横贯整行；搜索栏左边和列表对齐 */
#mod-words .w-main > .list-toolbar { padding-left: 0; padding-right: 0; }
@media (min-width: 1100px) {
  #w-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
  #w-list > .entry-row { margin: 0; height: 100%; box-sizing: border-box; }
  #w-list > .empty-state { grid-column: 1 / -1; }
}

/* 首页单词卡：60 天小柱状图压矮，下面列最近 3 个词 */
.h-grid #tw-latest { display: block !important; margin: 0 0 22px; }
.h-grid #tw-bars { height: 46px; margin-top: 10px; }
.tw-list { margin-top: 14px !important; }
.tw-list b { display: block; font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.35; }
.tw-list span { font-family: inherit !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 手机：持仓 / 止损表压紧，7 列一屏放下（止损那列不能藏在屏幕外） */
@media (max-width: 734px) {
  #positions .tbl, #stops .tbl { font-size: 12px; }
  #positions .tbl th, #positions .tbl td, #stops .tbl th, #stops .tbl td { padding-left: 4px; padding-right: 4px; white-space: nowrap; }
  #positions .tbl th:first-child, #positions .tbl td:first-child { padding-left: 0; }
  #positions .tbl th:last-child, #positions .tbl td:last-child { padding-right: 0; }
  #positions .tbl td .sec { display: none; }           /* 「·实时」小字 */
  #positions .tbl td .badge { display: block; width: fit-content; margin-top: 3px; font-size: 10px; }
  #positions, #stops, #trades { -webkit-mask-image: none; }
  #trades { overflow-x: auto; }
  #trades .tbl { font-size: 12px; }
}
/* 手机：成交记录只留 标的 / 离场 / 盈亏 / 持有 / 原因，盈亏不再滑出屏幕 */
@media (max-width: 734px) {
  #trades .tbl th:nth-child(2), #trades .tbl td:nth-child(2), #trades .tbl th:nth-child(4), #trades .tbl td:nth-child(4),
  #trades .tbl th:nth-child(5), #trades .tbl td:nth-child(5), #trades .tbl th:nth-child(6), #trades .tbl td:nth-child(6) { display: none; }
  #trades .tbl th, #trades .tbl td { padding-left: 4px; padding-right: 4px; }
  #trades .tbl td:nth-child(7) b { display: block; }
  #trades .tbl td.wrap { max-width: 110px !important; white-space: normal; }
}

/* 登录框下方的「以访客身份浏览」：一打开网站的登录页有；访客点了要登录的板块弹出的登录框里也有（2026-10-19 用户要求），点了就关掉登录框、继续当访客 */
#gate { flex-direction: column; gap: 18px; }
.gate-guest { display: none; }
:is(body.landing, body.guest) .gate-guest {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer;
  font: 500 15px/1 var(--font); color: #2a2833; letter-spacing: 0.02em;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.28));
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 0 0 1px rgba(255, 255, 255, 0.45), 0 16px 36px -20px rgba(40, 30, 70, 0.5);
  animation: gateIn 0.9s var(--ease-out) 0.15s both;
  transition: transform 0.35s var(--spring-soft, ease), background 0.25s;
}
:is(body.landing, body.guest) .gate-guest svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s; }
:is(body.landing, body.guest) .gate-guest:hover { transform: translateY(-1px); background: linear-gradient(150deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.4)); }
:is(body.landing, body.guest) .gate-guest:hover svg { transform: translateX(3px); }
:is(body.landing, body.guest) .gate-guest:focus-visible { outline: 2px solid #2a2833; outline-offset: 3px; }
#gate.leaving .gate-guest { opacity: 0; transition: opacity 0.3s; }

/* 静态背景的 CSS 闪光：12 颗光点错开节奏一闪一闪；WebGL 在跑、关了动态、或系统要求减少动态时都不显示 */
.twinkles { position: fixed; inset: 0; z-index: -2; pointer-events: none; display: none; }
body:not(.gl-on):not(.art-still) .twinkles { display: block; }
.twinkles i {
  position: absolute; left: var(--x); top: var(--y); width: 30px; height: 30px; margin: -15px; opacity: 0;
  transform: scale(calc(var(--s) * 0.4)); will-change: opacity, transform;
  background: radial-gradient(circle, rgba(255, 252, 240, 0.95) 0 14%, rgba(255, 248, 225, 0.35) 30%, transparent 62%),
              linear-gradient(90deg, transparent 46%, rgba(255, 250, 235, 0.8) 50%, transparent 54%),
              linear-gradient(0deg, transparent 46%, rgba(255, 250, 235, 0.8) 50%, transparent 54%);
  animation: twinkle 9s var(--d) ease-in-out infinite;
}
@keyframes twinkle {
  0%, 62%, 100% { opacity: 0; transform: scale(calc(var(--s) * 0.4)); }
  70% { opacity: 1; transform: scale(var(--s)) rotate(12deg); }
  78% { opacity: 0; transform: scale(calc(var(--s) * 0.6)); }
}
@media (prefers-reduced-motion: reduce) { .twinkles { display: none !important; } }

/* ══════════ 首页卡片：每张卡是对应板块的画，大小相近、形状不规整（2026-10-12）══════════ */
#t-quant  { --tart: url("/art/t/quant.webp");  --a: 46px; --b: 18px; --c: 40px; --d: 24px; }
#t-words  { --tart: url("/art/t/words.webp");  --a: 20px; --b: 48px; --c: 22px; --d: 42px; }
#t-news   { --tart: url("/art/t/news.webp");   --a: 40px; --b: 38px; --c: 16px; --d: 50px; }
#t-diary  { --tart: url("/art/t/diary.webp");  --a: 18px; --b: 42px; --c: 48px; --d: 20px; }
#t-vault  { --tart: url("/art/t/vault.webp");  --a: 48px; --b: 22px; --c: 18px; --d: 44px; }
#t-server { --tart: url("/art/t/server.webp"); --a: 26px; --b: 50px; --c: 38px; --d: 16px; }
.h-grid > .tile {
  --rk: 1;
  border-radius: calc(var(--a, 30px) * var(--rk)) calc(var(--b, 30px) * var(--rk)) calc(var(--c, 30px) * var(--rk)) calc(var(--d, 30px) * var(--rk)) !important;
  overflow: hidden; position: relative;
}
.h-grid > .tile > :not(.tile-art):not(.tile-rim):not(.js-tilt-glare) { position: relative; z-index: 2; }
/* 画层：比卡片大一圈，指针移动时反方向挪（--px/--py 来自 vanilla-tilt），像隔着玻璃看画 */
.tile-art {
  position: absolute !important; inset: -7%; z-index: 0 !important; pointer-events: none;
  background: var(--tart) center / cover no-repeat; opacity: 0; filter: saturate(1.08);
  transform: translate3d(calc(var(--px, 0) * -16px), calc(var(--py, 0) * -16px), 0) scale(1.04);
  transition: opacity 0.9s var(--ease), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), scale 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}
/* 鼠标停在卡片上，画慢慢放大一点，像走近画框 */
@media (hover: hover) { .h-grid > .tile:hover .tile-art { scale: 1.07; } }
.h-grid > .tile:not(.art-on) .tile-art { background-image: none; }
.h-grid > .tile.art-on .tile-art { opacity: 1; }
/* 画上一层奶白：上面三成画看得清（标题压在画上），往下渐渐变成磨砂玻璃，数字和列表照样好读 */
.tile-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(251, 248, 242, 0.05) 0%, rgba(251, 248, 242, 0.24) 14%,
              rgba(251, 248, 242, 0.62) 32%, rgba(251, 248, 242, 0.70) 100%);
}
.h-grid > .tile .cover-title { filter: drop-shadow(0 1px 10px rgba(255, 253, 248, 0.85)) drop-shadow(0 0 2px rgba(255, 253, 248, 0.9)); }
.h-grid > .tile::before, .h-grid > .tile::after { z-index: 1; }
.h-grid > .tile .js-tilt-glare { z-index: 3; border-radius: inherit; }

/* 排版：6 张卡大小相近，量化不再独占一行 */
.h-grid > .tile { grid-column: auto !important; }
@media (min-width: 1068px) {
  .h-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; grid-auto-rows: 1fr; row-gap: 40px; }
  .h-grid > .tile { min-height: 430px; }
  .h-grid > #t-words, .h-grid > #t-vault { margin-top: 44px; margin-bottom: -44px; }   /* 中间一列错开，像画廊里挂的画 */
  .h-grid #tq-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (min-width: 735px) and (max-width: 1067px) {
  .h-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; grid-auto-rows: 1fr; }
  .h-grid > .tile { min-height: 400px; --rk: 0.85; }
  .h-grid > #t-words, .h-grid > #t-diary, .h-grid > #t-server { margin-top: 36px; margin-bottom: -36px; }
}
@media (max-width: 734px) {
  .h-grid > .tile { --rk: 0.62; min-height: 0; }
}
@media (prefers-reduced-motion: reduce) { .tile-art { transition: none; transform: scale(1.04); } }
@media (min-width: 1068px) { .h-grid #tq-kpis b { font-size: 28px !important; } }
/* 画上的数字和小字加一圈很淡的白光，奶白层变薄以后依然好读 */
.h-grid > .tile .big-stat small, .h-grid > .tile .tn-list, .h-grid > .tile .tw-list, .h-grid > .tile #tq-kpis, .h-grid > .tile .ts-state,
.h-grid > .tile .tile-empty, .h-grid > .tile .tile-guest { text-shadow: 0 0 10px rgba(255, 253, 248, 0.9), 0 0 2px rgba(255, 253, 248, 0.8); }
.h-grid > .tile .big-stat .count { filter: drop-shadow(0 0 6px rgba(255, 253, 248, 0.9)); }   /* 渐变字不能用 text-shadow，会透出来发白 */

/* ══════════ 卡片第二版（2026-10-12 用户要求）：画上浓下淡，露出背景；边缘一圈立体亮光，和背景拉开对比 ══════════ */
/* 画：顶部最浓，往下用遮罩渐隐成透明，下半张卡透出页面背景的画 */
.tile-art {
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 18%, rgba(0, 0, 0, 0.62) 42%, rgba(0, 0, 0, 0.18) 70%, transparent 92%);
          mask-image: linear-gradient(180deg, #000 0%, #000 18%, rgba(0, 0, 0, 0.62) 42%, rgba(0, 0, 0, 0.18) 70%, transparent 92%);
}
/* 奶白只薄薄压在中段（数字、列表所在），顶部的画保持最深 */
.tile-art::after {
  background: linear-gradient(180deg, rgba(251, 248, 242, 0) 0%, rgba(251, 248, 242, 0.10) 16%,
              rgba(251, 248, 242, 0.42) 36%, rgba(251, 248, 242, 0.30) 70%, rgba(251, 248, 242, 0) 100%);
}
/* 卡片本身更透：下半部分主要看到的是背景，用强虚化压住细节，字照样清楚 */
.h-grid > .tile {
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.10), rgba(255, 253, 249, 0.34)) !important;
  -webkit-backdrop-filter: blur(22px) saturate(160%) !important; backdrop-filter: blur(22px) saturate(160%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(70, 50, 100, 0.10),
    inset 0 0 18px rgba(255, 255, 255, 0.28),            /* 内发光：边缘有厚度 */
    inset 0 14px 24px -18px rgba(255, 255, 255, 0.95),
    0 1px 0 rgba(255, 255, 255, 0.35),
    0 26px 54px -26px rgba(38, 26, 66, 0.62),
    0 6px 16px -10px rgba(38, 26, 66, 0.35) !important;
}
/* 立体亮边：渐变描边（左上亮、右下暗）用遮罩只留 1.6px 一圈；光的角度跟着指针转，倾斜时像玻璃倒角在反光 */
.tile-rim {
  position: absolute !important; inset: 0; z-index: 3 !important; pointer-events: none; border-radius: inherit; padding: 1.6px;
  background: linear-gradient(calc(150deg + var(--px, 0) * 40deg),
              rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.55) 18%, rgba(255, 255, 255, 0.08) 42%,
              rgba(90, 70, 130, 0.22) 62%, rgba(255, 255, 255, 0.10) 80%, rgba(255, 255, 255, 0.75) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  transition: background 0.4s;
}
/* 访客卡片上的「登录后查看」：做成一枚玻璃小标签，压在画上也看得清 */
body.guest .h-grid .tile-guest { flex: 0 0 auto; align-self: flex-start; width: fit-content; margin: 18px 0 auto; padding: 5px 16px 5px 5px; border-radius: 999px;
  background: rgba(255, 253, 248, 0.62); -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.9), 0 8px 20px -12px rgba(45, 32, 78, 0.45);
  color: #3a3644; font-weight: 500; text-shadow: none; }
body.guest .h-grid .tile-guest svg { width: 18px; height: 18px; padding: 8px; border-radius: 999px; }
body.guest .h-grid .cta-row { border-top: 0 !important; padding-top: 0 !important; margin-top: auto; }

/* ══════════ 保险箱：在线编辑文本（2026-10-12）══════════ */
.ve-modal { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 28px;
  background: rgba(32, 24, 48, 0.28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: gateFade 0.25s var(--ease) both; }
.ve-modal[hidden] { display: none; }
.ve-sheet { width: min(1180px, 100%); height: min(860px, 100%); display: flex; flex-direction: column; border-radius: 28px 18px 30px 20px; overflow: hidden;
  background: linear-gradient(160deg, rgba(255, 253, 249, 0.86), rgba(255, 253, 249, 0.74));
  -webkit-backdrop-filter: blur(30px) saturate(170%); backdrop-filter: blur(30px) saturate(170%); box-shadow: var(--glass-ring);
  animation: gateCardIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both; }
.ve-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px 12px 24px; border-bottom: 1px solid rgba(80, 60, 120, 0.10); }
.ve-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ve-name { border: 0; background: transparent; font: 650 19px/1.3 var(--font); color: var(--text); padding: 4px 6px; margin-left: -6px; border-radius: 8px; min-width: 0; }
.ve-name:focus { outline: none; background: rgba(255, 255, 255, 0.7); box-shadow: inset 0 0 0 1px rgba(125, 104, 173, 0.35); }
.ve-title small { font-size: 12px; color: var(--text-secondary); font-family: var(--mono); }
.ve-tools { display: flex; align-items: center; gap: 10px; }
.ve-x { position: static; float: none; margin: 0; flex: none; }
.ve-confirm { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 24px; background: rgba(255, 236, 200, 0.7); font-size: 14px; color: #6b4a14; }
.ve-confirm[hidden] { display: none; }
.ve-confirm span { flex: 1; font-weight: 600; }
.ve-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr; }
.ve-body[data-view="split"] { grid-template-columns: 1fr 1fr; }
.ve-body textarea { width: 100%; height: 100%; box-sizing: border-box; resize: none; border: 0; outline: none; padding: 22px 26px;
  background: rgba(255, 255, 255, 0.35); color: #24212d; font: 14.5px/1.7 var(--mono); tab-size: 2; caret-color: #7d68ad; }
.ve-body textarea:disabled { opacity: 0.5; }
.ve-preview { overflow: auto; padding: 22px 28px; border-left: 1px solid rgba(80, 60, 120, 0.10); }
.ve-body[data-view="edit"] .ve-preview { display: none; }
.ve-body[data-view="preview"] textarea { display: none; }
.ve-body[data-view="preview"] .ve-preview { border-left: 0; }
.ve-foot { display: flex; justify-content: space-between; gap: 12px; padding: 9px 24px 11px; font-size: 12px; color: var(--text-secondary); border-top: 1px solid rgba(80, 60, 120, 0.08); }
.ve-foot .bad { color: #c2332f; font-weight: 600; }
@media (max-width: 734px) {
  .ve-modal { padding: 0; }
  .ve-sheet { width: 100%; height: 100%; border-radius: 0; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  .ve-head { flex-wrap: wrap; padding: 12px 14px 10px; gap: 8px; }
  .ve-title { flex-basis: 100%; order: 2; }
  .ve-tools { width: 100%; justify-content: flex-end; order: 1; }
  .ve-view { margin-right: auto; }
  .ve-view .seg-btn[data-v="split"] { display: none; }        /* 手机上分屏太挤 */
  .ve-body[data-view="split"] { grid-template-columns: 1fr; }
  .ve-body[data-view="split"] .ve-preview { display: none; }
  .ve-body textarea { padding: 16px; font-size: 16px; }        /* 16px：iPhone 聚焦时不自动放大 */
  .ve-foot { padding: 8px 14px 10px; }
}

/* 量化：持仓离止损的距离（小风险条）+ 指令复制按钮（2026-10-12） */
.q-room { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-style: normal; }
.q-room i { display: block; width: 46px; height: 4px; border-radius: 4px; background: rgba(120, 110, 140, 0.18); overflow: hidden; flex: none; }
.q-room b { display: block; height: 100%; border-radius: inherit; background: var(--room-c); }
.q-room em { font-style: normal; font-size: 11px; font-weight: 600; }
.q-room.ok   { --room-c: #2f9e62; } .q-room.ok em { color: #2f7d52; }
.q-room.near { --room-c: #d9952b; } .q-room.near em { color: #a8691a; }
.q-room.hit  { --room-c: #d6453d; } .q-room.hit em { color: #c2332f; }
.order .h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.order .q-copy { margin-left: auto; height: 28px; padding: 0 12px; font-size: 12.5px; }
.order .q-copy.done { background: color-mix(in srgb, #34c759 18%, transparent); color: #1a8f3c; }
@media (max-width: 734px) { .q-room { flex-direction: column; align-items: flex-end; gap: 2px; } .q-room i { width: 40px; } .q-room em { font-size: 10px; } }
.q-room { justify-content: flex-end; }

/* ══════════ 去「AI 味」（2026-10-12 用户反馈：AI 味很重、颜色太艳、内容太多不简洁）══════════
   原则：一种颜色一个意思，不用渐变字和彩虹边；装饰只留画本身；每张卡只说一件事。
   每个板块保留一点自己的色调（--ink：主题色混进七成深墨），但饱和度压下来。 */
:root, [class*="theme-"] { --ink: color-mix(in srgb, var(--g2) 55%, #2b2833); }

/* 1. 渐变字 → 单色。首页欢迎语的边缘发光是用户点名要的，保留 */
.grad { background: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important;
  -webkit-text-fill-color: currentColor !important; color: var(--ink) !important; animation: none !important; text-shadow: none !important; }
.grad:not(.h-title .grad) { filter: none !important; }
.h-grid > .tile .cover-title, .h-grid > .tile .big-stat .count { filter: none !important; }
.h-grid > .tile .cover-title { text-shadow: none; }
/* 标题做成一枚磨砂小标牌（像展签）：压在深色的画上也清楚，不用光晕 */
.h-grid > .tile .cover { align-self: flex-start; }
.h-grid > .tile .cover-title { display: inline-block; width: fit-content; padding: 4px 14px 6px; margin-left: -6px; border-radius: 12px;
  background: rgba(255, 253, 248, 0.72); -webkit-backdrop-filter: blur(10px) saturate(140%); backdrop-filter: blur(10px) saturate(140%);
  box-shadow: 0 4px 14px -10px rgba(30, 24, 44, 0.45); }
.big-stat .count, .kpis b { color: var(--ink); -webkit-text-fill-color: currentColor; background: none; }

/* 2. 按钮：渐变 → 实色深墨，阴影收小 */
.tile-cta:not(.ghost) { background: var(--ink) !important; background-image: none !important; box-shadow: 0 6px 14px -10px rgba(30, 24, 44, 0.5) !important; }
.btn-primary { background: #3d3948 !important; background-image: none !important; border-color: #3d3948 !important; color: #fff !important; }
.ai-send { background: #2f2c38 !important; background-image: none !important; }
.ct-icon, .tile-guest svg, .vt-badge, .tv-lock svg, .dy-ring { background: var(--ink) !important; background-image: none !important; box-shadow: none !important; animation: none !important; }

/* 3. AI 输入框：去掉旋转的彩虹边和光晕，就是一条安静的玻璃输入框 */
.ai-form::before { display: none !important; }
.ai-form { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55), 0 8px 24px -18px rgba(30, 24, 44, 0.5) !important; }
.ai-form:focus-within { box-shadow: inset 0 0 0 1.5px rgba(61, 57, 72, 0.45), 0 8px 24px -18px rgba(30, 24, 44, 0.5) !important; }
.ai-form .ai-spark svg { fill: #6b6577; }
.h-ai .ai-chips { display: none !important; }

/* 4. 卡片：亮边改成一道细白线，画不额外提饱和 */
.tile-rim { background: rgba(255, 255, 255, 0.55) !important; padding: 1px !important; }
.tile-art { filter: saturate(0.92) !important; }
.h-grid > .tile::before { display: none !important; }        /* 鼠标经过时滑过的斜向反光 */

/* 5. 首页卡片只说一件事：标题、一个数字、一行、打开 */
.h-grid #tw-bars, .h-grid .tf-cap { display: none !important; }
.h-grid .tw-list li:nth-child(n+2), .h-grid .tn-list li:nth-child(n+2) { display: none !important; }
.h-grid #tq-kpis > *:nth-child(n+3) { display: none !important; }
.h-grid .tw-list li, .h-grid .tn-list li { border-top: 0 !important; }

/* ══════════ 首页卡片改回液态玻璃 + 标题艺术字（2026-10-12 用户：「卡片还是换成液态玻璃吧，不然太乱；小标题还是艺术字」）══════════ */
.h-grid > .tile .tile-art, .h-grid > .tile .tile-rim { display: none !important; }
.h-grid > .tile {
  background: var(--glass-bg) !important;
  -webkit-backdrop-filter: var(--glass-filter) !important; backdrop-filter: var(--glass-filter) !important;
  box-shadow: var(--glass-ring) !important;
}
/* 标题：去掉展签，回到艺术字——同色系的压暗渐变（主题色混进深墨），有笔墨的层次但不艳 */
.h-grid > .tile .cover-title { display: block; padding: 0; margin-left: 0; background: none; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none; }
.h-grid > .tile .cover-title .grad, .h-foot .cover-title .grad {
  background: linear-gradient(115deg, color-mix(in srgb, var(--g1) 72%, #2b2833) 0%, color-mix(in srgb, var(--g2) 78%, #2b2833) 50%,
              color-mix(in srgb, var(--g3) 72%, #2b2833) 100%) !important;
  -webkit-background-clip: text !important; background-clip: text !important;
  -webkit-text-fill-color: transparent !important; color: transparent !important;
}
.h-grid > .tile .cover-title { font-weight: 700; letter-spacing: 0.01em; }
/* 2026-10-14 用户要求「中文不要用书法」：去掉马善政楷书，中文标题回到系统字体（苹方）粗体；
   英文、法文标题照旧用手写体。下面只保留大标题的同色系压暗渐变 */
html[lang="zh-CN"] .hero h1 .grad {
  display: inline-block; padding: 0 0.06em 0.08em;
  background: linear-gradient(115deg, color-mix(in srgb, var(--g1) 72%, #2b2833), color-mix(in srgb, var(--g2) 78%, #2b2833) 50%,
              color-mix(in srgb, var(--g3) 72%, #2b2833)) !important;
  -webkit-background-clip: text !important; background-clip: text !important; -webkit-text-fill-color: transparent !important; color: transparent !important;
}
.h-grid > .tile .cover .glow, .h-grid > .tile > .glow { display: none !important; }   /* 标题后面的彩色光团，去 AI 味时漏掉的 */

/* ══════════ 动画第三版：少而精（2026-10-12）══════════
   去掉放大、模糊、翻转这类「炫技」，统一成三种安静的动作：墨色晕开、轻轻浮起、按下回弹。 */

/* 1. 板块大标题：像毛笔落墨——墨色从淡到浓，笔刷从左到右柔和显现（遮罩边缘放宽，不再是硬切） */
.hero h1.big-in { animation: inkIn 1.1s cubic-bezier(0.25, 0.8, 0.3, 1) both !important; }
@keyframes inkIn {
  from { opacity: 0.15; translate: 0 8px; filter: saturate(0.3); }
  to   { opacity: 1;    translate: 0 0;   filter: none; }
}
.hero h1 span, .h-grid .cover-title span, .h-foot .cover-title span {
  -webkit-mask-image: linear-gradient(100deg, #000 var(--hp), transparent calc(var(--hp) + 26%));
          mask-image: linear-gradient(100deg, #000 var(--hp), transparent calc(var(--hp) + 26%));
}
.hero h1 .write, .h-grid .cover-title .write, .h-foot .cover-title .write {
  animation: handWrite 1.3s cubic-bezier(0.45, 0.05, 0.3, 1) both !important;
}

/* 2. 首页卡片：滚进来时轻轻浮起淡入（原来是 130px 翻转 + 模糊），三列略微错开 */
@supports (animation-timeline: view()) {
  .h-grid > .tile { animation: tileSoft linear both !important; animation-timeline: view() !important; animation-range: entry 0% cover 22% !important; }
  .h-grid > #t-words, .h-grid > #t-vault { animation-range: entry 6% cover 26% !important; }
  .h-grid > #t-news, .h-grid > #t-server { animation-range: entry 12% cover 30% !important; }
}
@keyframes tileSoft { from { opacity: 0; top: 36px; } to { opacity: 1; top: 0; } }   /* 用 top 而不是 translate：translate 留给悬停抬起 */

/* 3. 切换板块：页面里的面板依次浮现，每块晚 50ms，最多排 8 块 */
.mod-enter .page > *:not(.hero) { animation: panelUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards; }   /* backwards：播完不占着 translate */
.mod-enter .page > *:nth-child(2) { animation-delay: 0.05s; } .mod-enter .page > *:nth-child(3) { animation-delay: 0.10s; }
.mod-enter .page > *:nth-child(4) { animation-delay: 0.15s; } .mod-enter .page > *:nth-child(5) { animation-delay: 0.20s; }
.mod-enter .page > *:nth-child(6) { animation-delay: 0.25s; } .mod-enter .page > *:nth-child(7) { animation-delay: 0.30s; }
.mod-enter .page > *:nth-child(n+8) { animation-delay: 0.35s; }
@keyframes panelUp { from { opacity: 0; translate: 0 16px; } to { opacity: 1; translate: 0 0; } }

/* 4. 触感：电脑悬停时卡片微微抬起、影子加深；手机按下时轻轻下压，松手回弹 */
.h-grid > .tile, .card, .sv-tile, .sv-panel, .ct-card { transition: translate 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1), scale 0.25s ease; }
@media (hover: hover) and (pointer: fine) {
  .h-grid > .tile:hover, .sv-tile:hover, .ct-card:hover { translate: 0 -4px;
    box-shadow: var(--glass-ring), 0 34px 60px -30px rgba(45, 32, 78, 0.55) !important; }
}
@media (hover: none) {
  .h-grid > .tile:active, .sv-tile:active, .ct-card:active, .tile-cta:active, .vt-row:active { scale: 0.985; transition-duration: 0.12s; }
}
/* 按钮里的箭头：悬停时往前挪一点，提示可以点 */
.tile-cta svg { transition: translate 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
@media (hover: hover) { .tile-cta:hover svg { translate: 3px 0; } }

@media (prefers-reduced-motion: reduce) {
  .hero h1.big-in, .mod-enter .page > *, .h-grid > .tile { animation: none !important; }
  .h-grid > .tile:hover { translate: none; }
}


/* ══════════════ 2026-10-14 重新规划：「我的项目」公开，个人板块要登录 ══════════════ */

/* 新板块配色和背景画：圣拉扎尔火车站（1877）的铁灰蓝、蒸汽的蓝紫、站台的赭色 */
.theme-projects { --g1: #4f6789; --g2: #6a74ad; --g3: #a3825a; }
body[data-mod="projects"] { --art: url("/art/projects.webp"); }
@media (max-width: 734px) { body[data-mod="projects"] { --art: url("/art/m/projects.webp"); } }
body[data-mod="projects"] #app::before { --bg-a: #4f6789; --bg-b: #6a74ad; --bg-c: #a3825a; }

/* 顶栏：公开 | 个人 | 联系 之间的细分隔线；访客看到个人板块后面的小锁 */
.tabs .tab-sep { flex: none; width: 1px; height: 16px; margin: 0 6px; align-self: center; background: rgba(60, 50, 80, 0.18); }
body.guest .tab.priv::after, body.guest .nb-card.priv b::after {
  content: ""; display: inline-block; width: 10px; height: 10px; margin-left: 4px; vertical-align: -1px; opacity: 0.55;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Crect x='4.5' y='10.5' width='15' height='10' rx='2.5'/%3E%3Cpath d='M8 10.5V7.5a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Crect x='4.5' y='10.5' width='15' height='10' rx='2.5'/%3E%3Cpath d='M8 10.5V7.5a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
}
body.guest .bottombar button.priv { opacity: 0.6; }

/* 首页分组标题 */
.h-sec {
  max-width: var(--wide); margin: 34px auto 16px; padding: 0 40px; box-sizing: border-box;
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 600; letter-spacing: 0.06em; color: var(--text-secondary);
}
.h-sec::after { content: ""; flex: 1; height: 1px; background: rgba(60, 50, 80, 0.14); }
.h-sec-lock { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; opacity: 0.6; }
body:not(.guest) .h-sec-lock { display: none; }
.h-sec + .h-grid { margin-top: 0; }
@media (max-width: 734px) { .h-sec { padding: 0 22px; margin: 26px auto 12px; } }

/* 两组卡片都是三列等宽，取消之前「量化独占一行」「云服务器占两栏」的跨列 */
@media (min-width: 1068px) {
  .h-grid.pj-grid > #t-quant, .h-grid.priv-grid > #t-server { grid-column: auto; }
}
.h-grid > #t-flight { display: flex; }   /* 之前首页藏起来的航班卡，作为项目卡恢复 */
.h-grid.pj-grid #tq-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
.h-grid.pj-grid #tq-kpis b { font-size: 30px; }
.h-grid #t-flight .kpis-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 0 22px; }
.pj-line { margin: 4px 0 22px; font-size: 14px; line-height: 1.6; color: var(--text-secondary); }

/* ---------- 我的项目页 ---------- */
#mod-projects .tabs-wrap { display: flex; justify-content: center; }
.pj-tabs { margin: 0 0 30px; }
.pj-pane { display: grid; gap: 20px; }
.pj-pane[hidden] { display: none; }
.pj-lead { text-align: center; max-width: 820px; margin: 0 auto 8px; }
.pj-lead h2 { font-size: clamp(26px, 3.2vw, 38px); margin: 0 0 12px; letter-spacing: -0.02em; }
.pj-lead p { margin: 0 auto; font-size: 16.5px; line-height: 1.75; color: var(--text-secondary); max-width: 680px; }
.pj-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.pj-nums div { padding: 16px 12px; border-radius: 18px; background: rgba(255, 255, 255, 0.42); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8); }
.pj-nums b { display: block; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; color: var(--g1); font-variant-numeric: tabular-nums; }
.pj-nums span { display: block; margin-top: 4px; font-size: 13px; line-height: 1.45; color: var(--text-secondary); }

.pj-demo { padding: 26px 28px; }
.pj-demo-cap { margin: 0 0 14px; font-size: 13px; color: var(--text-secondary); text-align: center; }
.pj-wcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.pj-wcard {
  padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 28px -18px rgba(40, 30, 70, 0.45), 0 0 0 1px rgba(60, 50, 80, 0.06);
  font-size: 14px; line-height: 1.55; transition: translate 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
@media (hover: hover) { .pj-wcard:hover { translate: 0 -3px; box-shadow: 0 16px 34px -18px rgba(40, 30, 70, 0.5), 0 0 0 1px rgba(60, 50, 80, 0.08); } }
.pj-wtop { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 8px; margin-bottom: 6px; }
.pj-wtop b { font-size: 18px; }
.pj-wbase, .pj-wp { color: var(--text-secondary); font-size: 13px; }
.pj-wtop em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 6px;
  color: var(--g1); background: color-mix(in srgb, var(--g1) 12%, transparent); }
.pj-wd { font-weight: 500; }
.pj-ws { margin-top: 6px; font-size: 13px; color: var(--text-secondary); font-style: italic; }
#pj-words .ext-cta { margin: 0 auto; text-align: center; }

.pj-chart-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 12px; }
.pj-chart-head h3 { margin: 0; font-size: 16px; }
.pj-legend { display: flex; gap: 16px; font-size: 13px; color: var(--text-secondary); }
.pj-legend .lg { display: inline-block; width: 18px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.lc-grid.lc-base { stroke-dasharray: 3 4; stroke-opacity: 0.9; }
.pj-kpis:empty { display: none; }
#pj-flight .tf-grid { margin-top: 0; }
#pj-flight .tf-fig { background: rgba(255, 255, 255, 0.55); }

.pj-secs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pj-sec { padding: 24px 26px; }
.pj-sec h3 { margin: 0 0 12px; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.pj-sec h3::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: linear-gradient(var(--g1), var(--g3)); }
.pj-sec ul { margin: 0; padding-left: 18px; }
.pj-sec li { margin: 0 0 8px; font-size: 15px; line-height: 1.7; }
.pj-sec li:last-child { margin-bottom: 0; }
.pj-stack { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.pj-stack span { font-size: 12.5px; padding: 5px 12px; border-radius: 999px; color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.5); box-shadow: inset 0 0 0 1px rgba(60, 50, 80, 0.1); }

@media (max-width: 1067px) { .pj-wcards { grid-template-columns: 1fr; } }
@media (max-width: 734px) {
  .pj-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pj-nums b { font-size: 24px; }
  .pj-secs { grid-template-columns: 1fr; gap: 14px; }
  .pj-demo, .pj-sec { padding: 20px 18px; }
  .pj-lead p { font-size: 15.5px; }
}
/* 首页航班卡每个数字下只留一句短说明；旧规则「藏掉最后一个 span」会把它误藏，这里放出来 */
.h-grid #t-flight .kpis .k-short { display: block !important; margin-top: 4px; }
/* 项目开头那段介绍压在画上看不清：给它一层和卡片一样的毛玻璃底 */
.pj-lead {
  max-width: 900px; padding: 26px 30px 24px; border-radius: 28px;
  background: rgba(251, 248, 242, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 18px 40px -26px rgba(40, 30, 60, 0.45);
}
.pj-lead p { color: var(--text); opacity: 0.78; }
.pj-nums div { background: rgba(255, 255, 255, 0.6); }
@media (max-width: 734px) { .pj-lead { padding: 20px 18px; border-radius: 22px; } }

/* ══════════════ 2026-10-14 第二版：首页只分「我的项目」「个人」两个大板块；导航只剩 首页 / 我的项目 / 个人 / 联系 ══════════════ */

/* 首页两个大板块：各是一整块磨砂面板，标题放大，里面装各自的卡片 */
.h-block {
  max-width: calc(var(--wide) + 40px); margin: 44px auto 0; padding: 34px 0 40px; box-sizing: border-box;
  border-radius: 44px; background: rgba(251, 248, 242, 0.42);
  -webkit-backdrop-filter: blur(16px) saturate(1.15); backdrop-filter: blur(16px) saturate(1.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 34px 70px -50px rgba(40, 30, 60, 0.55);
}
.h-block + .h-block { margin-top: 28px; }
.h-block .h-sec { margin: 0 auto 24px; font-size: 28px; font-weight: 700; letter-spacing: 0.01em; color: var(--text); }
.h-block .h-sec::after { display: none; }
.h-block .h-sec-lock { width: 20px; height: 20px; }
.h-block .h-grid { padding-bottom: 0; }
@media (max-width: 734px) {
  .h-block { margin: 28px 8px 0; padding: 24px 0 26px; border-radius: 30px; }
  .h-block .h-sec { font-size: 22px; margin-bottom: 16px; }
}

/* 顶栏「个人」：带小箭头的下拉按钮 */
.tab-drop { display: inline-flex; align-items: center; gap: 2px; }
.tab-chev { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: rotate 0.3s var(--ease-out); }
.tab-drop[aria-expanded="true"] .tab-chev { rotate: 180deg; }
body.guest .tab-drop.priv::after { order: 3; }

/* 「个人」列表：电脑上是下拉菜单 */
.priv-menu {
  position: fixed; z-index: 70; translate: -50% 0; min-width: 228px; padding: 8px; box-sizing: border-box;
  border-radius: 22px; background: rgba(251, 248, 242, 0.9);
  -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3);
  box-shadow: 0 26px 60px -26px rgba(30, 20, 50, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.65);
  opacity: 0; scale: 0.96; transform-origin: top center;
  transition: opacity 0.2s var(--ease), scale 0.3s var(--spring-soft), translate 0.3s var(--spring-soft);
}
.priv-menu.open { opacity: 1; scale: 1; }
.priv-menu[hidden] { display: none !important; }
.pm-head { display: flex; align-items: center; gap: 6px; padding: 6px 12px 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--text-secondary); }
.pm-lock { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
body:not(.guest) .pm-lock { display: none; }
.pm-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 13px;
  background: none; font: inherit; font-size: 15px; color: var(--text); text-align: left; cursor: pointer;
  transition: background 0.2s var(--ease);
}
.pm-item svg { width: 20px; height: 20px; flex: none; color: var(--text-secondary); }
@media (hover: hover) { .pm-item:hover { background: rgba(60, 50, 80, 0.07); } }
.pm-item.active { background: rgba(60, 50, 80, 0.1); font-weight: 600; }
.pm-item.active svg { color: var(--text); }

/* 手机上是从底栏上方弹出的面板，三列图标 */
.priv-menu.as-sheet {
  left: 10px !important; right: 10px; top: auto !important; min-width: 0;
  bottom: calc(var(--bar-h, 60px) + env(safe-area-inset-bottom) + 12px);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 12px; border-radius: 26px;
  translate: 0 18px; transform-origin: bottom center;
}
.priv-menu.as-sheet.open { translate: 0 0; }
.priv-menu.as-sheet .pm-head { grid-column: 1 / -1; padding: 2px 6px 6px; }
.priv-menu.as-sheet .pm-item { flex-direction: column; gap: 6px; padding: 12px 4px; font-size: 13px; text-align: center; }
.priv-menu.as-sheet .pm-item svg { width: 24px; height: 24px; }
.bottombar button span { font-size: 11px; }

/* 展开菜单（往下拉出的大导航）：上排 首页 / 我的项目 / 联系，下面一栏「个人」 */
.nav-big > .nb-pub { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-bottom: 4px; }
.nav-big > .nb-priv { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 0; }
.nb-sec { max-width: var(--wide, 1320px); margin: 12px auto 10px; padding: 0 40px; box-sizing: border-box;
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; color: var(--text-secondary); }
body[data-mod="projects"] .nb-card[data-mod="projects"] { box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.95), 0 14px 30px -20px rgba(40, 30, 70, 0.6); }
@media (max-width: 734px) {
  .nb-sec { padding: 0 14px; margin: 8px auto 8px; }
  .nb-card { height: 74px; }
}
/* 卡片装进大板块后不再上下错开（原来写死在单词本、保险箱两张卡上，换了位置后会戳出面板） */
.h-block .h-grid > .tile { margin-top: 0 !important; margin-bottom: 0 !important; }

/* ══════════ 登录动画：莫奈（2026-10-19 用户要求「设计一个登录动画，和莫奈的画有关」） ══════════
   画面本身的动画在 art-gl.js（作画开场、水波、云影），这里只管登录卡和没有 WebGL 时的兜底。 */
/* 等着「作画」开场：登录页先是一张空白画布（和着色器里的亚麻布同色），CSS 的静态画先不露 */
body.paint-pending #gate { background: #ece5d5 !important; }
/* 画还在一笔笔画的时候，底下的画作标注先不出来，画完再淡入（像画家落款） */
.gate-cap { transition: opacity 1.4s var(--ease); }
body.paint-pending .gate-cap, body.painting .gate-cap { opacity: 0; transition-duration: 0s; }
/* 登录成功：卡片像落进池塘 —— 缩小、往下沉、虚化，水波从它中心荡开 */
#gate.leaving.sink form { animation: gateSink 0.62s cubic-bezier(0.45, 0, 0.7, 0.25) forwards; }
@keyframes gateSink {
  to { opacity: 0; transform: translateY(18px) scale(0.86); filter: blur(8px); }
}
#gate.leaving.sink .gate-guest { transition: opacity 0.3s, transform 0.62s cubic-bezier(0.45, 0, 0.7, 0.25); opacity: 0; transform: translateY(12px) scale(0.9); }
#gate.leaving.sink .gate-cap { opacity: 0; transition-duration: 0.4s; }
/* 主页从水波中心晕开（中心由 JS 写进 --ox/--oy；没写就是屏幕中间） */
@keyframes appBloom {
  from { clip-path: circle(0% at var(--ox, 50%) var(--oy, 46%)); opacity: 0.4; }
  60%  { opacity: 1; }
  to   { clip-path: circle(150% at var(--ox, 50%) var(--oy, 46%)); opacity: 1; }
}
/* 密码错了、又没有 WebGL：用一层斜着的淡影代替云影 */
#gate::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, rgba(38, 50, 84, 0) 5%, rgba(38, 50, 84, 0.26) 42%, rgba(38, 50, 84, 0.18) 68%, rgba(38, 50, 84, 0) 95%);
  transition: opacity 0.9s var(--ease);
}
#gate.cloud::after { opacity: 1; transition-duration: 0.3s; }
