/* B 暖纸手账：一本摊开的、有人用过的手账，写出去的事要盖章。
   结构：令牌 → 页面骨架 → 桌面与模块 → 待拍板整页 → 模块库 → 反馈与动效 → 手机 → 降级。
   规则：亮色没有一块纯白；纸纹只铺在内容上，不铺在弹出的面板外；签名装置只有印章（signature.js），
   手账细节只留一处（随手记的横线）。 */

:root {
  --paper: #F1ECE2;
  --paper-deep: #E7E0D2;
  --card: #FAF7F1;
  --card-2: #F2EDE3;
  --slip: #ECE5D7;
  --line: rgba(84, 64, 36, .13);
  --line-strong: rgba(84, 64, 36, .26);
  --ink: #2A2620;
  --ink-2: #554E43;
  --ink-3: #736A5C;
  --accent: #2D4B73;
  --accent-hover: #233D5F;
  --on-accent: #F8F4EC;
  --accent-soft: rgba(45, 75, 115, .09);
  --ok: #3B6A4E;
  --ok-soft: rgba(59, 106, 78, .12);
  --warn: #934A14;
  --warn-soft: rgba(147, 74, 20, .10);
  --mark: rgba(170, 120, 40, .55);
  --stamp: #2D4B73;
  --stamp-blend: multiply;
  --stamp-alpha: .86;
  --scrim: rgba(52, 40, 22, .26);
  --toast-bg: #2A2620;
  --toast-fg: #F4EFE5;
  --grain-blend: multiply;
  --grain-alpha: .55;
  --sh-1: 0 0 0 1px var(--line), 0 1px 1px rgba(70, 50, 20, .04), 0 8px 20px -14px rgba(70, 50, 20, .30);
  --sh-2: 0 0 0 1px var(--line), 0 2px 3px rgba(70, 50, 20, .05), 0 14px 28px -16px rgba(70, 50, 20, .38);
  --sh-lift: 0 0 0 1px var(--line), 0 6px 12px -6px rgba(70, 50, 20, .18), 0 28px 48px -20px rgba(70, 50, 20, .45);
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "Source Han Serif", serif;
  --num: "Iowan Old Style", "New York", ui-serif, Georgia, "Songti SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --r-card: 14px;
  --r-in: 8px;
  --r-chip: 6px;
  --ease-smooth: linear(0, 0.04, 0.134, 0.254, 0.381, 0.502, 0.61, 0.704, 0.781, 0.843, 0.892, 0.929, 0.956, 0.976, 0.989, 0.998, 1.003, 1.006, 1.007, 1.008, 1.007, 1.006, 1.006, 1.005, 1);
  --ease-snappy: linear(0, 0.035, 0.116, 0.218, 0.325, 0.428, 0.522, 0.605, 0.677, 0.737, 0.788, 0.83, 0.864, 0.892, 0.914, 0.932, 0.947, 0.958, 0.967, 0.974, 0.98, 0.984, 0.988, 0.991, 1);
  --ease-bouncy: linear(0, 0.086, 0.282, 0.512, 0.727, 0.898, 1.016, 1.084, 1.111, 1.11, 1.091, 1.066, 1.041, 1.019, 1.003, 0.993, 0.988, 0.987, 0.989, 0.991, 0.994, 0.997, 0.999, 1, 1);
  color-scheme: light;
}
[data-theme="dark"] {
  --paper: #1B1915;
  --paper-deep: #141310;
  --card: #25221D;
  --card-2: #2D2A24;
  --slip: #33302A;
  --line: rgba(236, 222, 196, .10);
  --line-strong: rgba(236, 222, 196, .20);
  --ink: #EEE7DA;
  --ink-2: #C4BBAB;
  --ink-3: #A0978A;
  --accent: #A3BBDD;
  --accent-hover: #B9CCE8;
  --on-accent: #142033;
  --accent-soft: rgba(163, 187, 221, .13);
  --ok: #95C4A5;
  --ok-soft: rgba(149, 196, 165, .13);
  --warn: #E2A877;
  --warn-soft: rgba(226, 168, 119, .13);
  --mark: rgba(226, 178, 96, .6);
  --stamp: #AFC5E6;
  --stamp-blend: normal;
  --stamp-alpha: .82;
  --scrim: rgba(0, 0, 0, .52);
  --toast-bg: #EEE7DA;
  --toast-fg: #1B1915;
  --grain-blend: screen;
  --grain-alpha: .16;
  --sh-1: 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 240, 210, .035), 0 10px 22px -14px rgba(0, 0, 0, .7);
  --sh-2: 0 0 0 1px var(--line-strong), inset 0 1px 0 rgba(255, 240, 210, .05), 0 14px 28px -14px rgba(0, 0, 0, .8);
  --sh-lift: 0 0 0 1px var(--line-strong), 0 6px 14px -6px rgba(0, 0, 0, .5), 0 30px 50px -18px rgba(0, 0, 0, .85);
  color-scheme: dark;
}

/* ---------- 骨架 ---------- */
* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 14px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-feature-settings: "tnum" 0;
}
/* 纸纹：盖在内容上、顶栏之下；混合对象就是下面的纸与卡 */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 45; pointer-events: none; mix-blend-mode: var(--grain-blend); opacity: var(--grain-alpha);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .34 0 0 0 0 .22 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="dark"] body::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .95 0 0 0 0 .9 0 0 0 0 .8 0 0 0 .2 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
mark { background: none; color: inherit; text-decoration: underline 2px var(--mark); text-underline-offset: 4px; text-decoration-skip-ink: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* 样张控制条：不属于产品，刻意做成中性的一条 */
.sample {
  display: flex; align-items: center; gap: 14px; height: 34px; padding: 0 20px; font-size: 12px; color: var(--ink-3);
  border-bottom: 1px dashed var(--line-strong); white-space: nowrap; overflow-x: auto; scrollbar-width: none;
  position: sticky; top: 0; z-index: 60; background: var(--paper);
}
.sample-n { color: var(--ink-2); font-weight: 600; }
.sample-seg { display: inline-flex; gap: 2px; }
.sample-seg button, .sample-reset { padding: 3px 9px; border-radius: 6px; color: var(--ink-3); }
.sample-seg button[aria-current="page"], .sample-seg button[aria-pressed="true"] { background: var(--card-2); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.sample-reset { margin-left: auto; }

.top {
  position: sticky; top: 34px; z-index: 46; display: flex; align-items: center; gap: 18px; height: 60px;
  padding: 0 max(32px, calc((100vw - 1272px) / 2 + 32px));
  background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(12px) saturate(1.1); -webkit-backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 16px/1 var(--serif); letter-spacing: .06em; }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--ink); position: relative; box-shadow: inset 0 0 0 1px var(--line); }
.brand-mark::after { content: ""; position: absolute; left: 6px; right: 6px; top: 7px; height: 8px; border-top: 1.5px solid var(--paper); border-bottom: 1.5px solid var(--paper); }
.top-date { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.ib { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 9px; color: var(--ink-2); transition: background-color .3s var(--ease-snappy), color .3s; }
.ib:hover { background: var(--card-2); color: var(--ink); }
.ib .i-moon, [data-theme="dark"] .ib .i-sun { display: none; }
[data-theme="dark"] .ib .i-moon { display: block; }
.top-wait { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 12px; border-radius: 9px; color: var(--ink-2); font-size: 13.5px; box-shadow: inset 0 0 0 1px var(--line-strong); transition: background-color .3s var(--ease-snappy); }
.top-wait:hover { background: var(--card-2); color: var(--ink); }
.count { min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 10px; background: var(--accent); color: var(--on-accent); font: 600 12px/1 var(--num); }
.me { width: 32px; height: 32px; margin-left: 6px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--slip); color: var(--ink); font: 600 14px/1 var(--serif); box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- 桌面 ---------- */
.desk { max-width: 1272px; margin: 0 auto; padding: 0 32px 72px; }
.hello { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 500px); gap: 24px 48px; align-items: end; padding: 34px 0 26px; }
.hello-d { margin: 0 0 6px; color: var(--ink-3); font-size: 13px; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.hello-h { margin: 0; font: 600 34px/1.2 var(--serif); letter-spacing: .03em; }
.hello-s { margin: 10px 0 0; color: var(--ink-2); font-size: 15px; }
.hello-s a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; font-weight: 600; }
.ask { display: flex; align-items: center; gap: 4px; height: 50px; padding: 0 7px 0 6px; border-radius: 12px; background: var(--card); box-shadow: var(--sh-1); transition: box-shadow .3s var(--ease-snappy); }
.ask:focus-within { box-shadow: 0 0 0 1px var(--line-strong), 0 0 0 4px var(--accent-soft), 0 8px 20px -14px rgba(70, 50, 20, .3); }
.ask-b { width: 38px; height: 38px; display: grid; place-items: center; color: var(--ink-3); border-radius: 8px; }
.ask-b:hover { color: var(--ink); background: var(--card-2); }
.ask-i { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 14.5px; }
.ask-i::placeholder { color: var(--ink-3); }
.ask-go { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; background: var(--accent); color: var(--on-accent); transition: transform .3s var(--ease-snappy), background-color .3s; }
.ask-go:hover { background: var(--accent-hover); }
.ask-go:active { transform: scale(.94); }
.legend { display: none; }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 168px; gap: 16px; grid-auto-flow: dense; }
.tile {
  position: relative; order: var(--o); min-width: 0; padding: 15px 18px 16px; border-radius: var(--r-card); background: var(--card); box-shadow: var(--sh-1);
  cursor: pointer; overflow: hidden; touch-action: manipulation; user-select: none;
  transition: box-shadow .3s var(--ease-snappy), translate .3s var(--ease-snappy), rotate .3s var(--ease-snappy), scale .3s var(--ease-snappy);
}
.tile[data-w="2"] { grid-column: span 2; }
.tile[data-h="2"] { grid-row: span 2; }
.tile:hover { box-shadow: var(--sh-2); translate: 0 -1px; }
.tile-in { position: relative; height: 100%; display: flex; flex-direction: column; min-height: 0; }
.tile-flood { display: none; }
.tile.is-lift { z-index: 44; cursor: grabbing; box-shadow: var(--sh-lift); transform: translate(var(--dx, 0), var(--dy, 0)); rotate: -1.2deg; scale: 1.025; transition: box-shadow .3s var(--ease-snappy), rotate .3s var(--ease-snappy), scale .3s var(--ease-snappy); }
.tile.is-drop { transition: transform .46s var(--ease-smooth), rotate .3s var(--ease-snappy), scale .3s var(--ease-snappy), box-shadow .3s; }
.tile.is-target { box-shadow: 0 0 0 1.5px var(--accent), var(--sh-1); }
.is-dragging, .is-dragging * { cursor: grabbing !important; }
.tile-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: transparent; box-shadow: none; border: 1.5px dashed var(--line-strong); color: var(--ink-3); }
.tile-add:hover { box-shadow: none; color: var(--ink); border-color: var(--ink-3); }
.tile-add .ic { width: 22px; height: 22px; margin-bottom: 4px; }
.tile-add span { font: 600 14px/1.3 var(--serif); color: var(--ink-2); }
.tile-add em { font-style: normal; font-size: 12px; }

.t-head { display: flex; align-items: center; gap: 7px; height: 22px; margin-bottom: 10px; flex: none; }
.t-ic { color: var(--ink-3); display: inline-flex; }
.t-ic .ic { width: 16px; height: 16px; }
.t-name { margin: 0; font: 600 15px/1 var(--serif); letter-spacing: .04em; white-space: nowrap; }
.t-meta { margin-left: auto; color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.kick { color: var(--ink-3); font-size: 12px; letter-spacing: .02em; }
.num { font-family: var(--num); font-variant-numeric: lining-nums tabular-nums; font-weight: 500; letter-spacing: -.01em; color: var(--ink); }
.num.xl { font-size: 44px; line-height: 1; }
.num.lg { font-size: 30px; line-height: 1.05; }
.hero-t { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.hero-t.lg { font: 600 19px/1.3 var(--serif); letter-spacing: .02em; }
.sub { color: var(--ink-2); font-size: 12.5px; line-height: 1.45; }
.t-hero { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 4px; }
.t-hero > :first-child { margin-top: auto; }
.t-hero .num.xl { margin: 2px 0 2px; }
.t-more { margin: auto 0 0; padding-top: 6px; color: var(--ink-3); font-size: 12px; }
.t-fill { flex: 1; min-height: 0; position: relative; }
.t-split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); gap: 20px; align-items: end; }
.t-next { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.t-next.row { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; }
.t-next.row .avs { margin-left: auto; }
.t-foot span { white-space: nowrap; }
.t-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--ink-2); font-size: 12px; }

.chip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: var(--r-chip); font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--card-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.chip[data-st="late"] { background: var(--warn-soft); color: var(--warn); box-shadow: none; }
.chip[data-st="today"] { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.chip[data-st="done"] { background: var(--ok-soft); color: var(--ok); box-shadow: none; }

/* 时间轴（竖） */
.tl { position: absolute; inset: 6px 0 2px 0; }
.tl-h { position: absolute; left: 0; right: 0; top: calc(var(--t) * 100%); border-top: 1px solid var(--line); }
.tl-h span { position: absolute; left: 0; top: -8px; width: 20px; text-align: right; font: 11px/1 var(--num); color: var(--ink-3); background: var(--card); padding-right: 2px; }
.panel .tl-h span { background: var(--card); }
.tl-ev {
  position: absolute; left: 30px; right: 0; top: calc(var(--a) * 100% + 1px); height: calc((var(--b) - var(--a)) * 100% - 2px);
  display: flex; align-items: center; gap: 8px; padding: 0 9px; border-radius: 2px 6px 6px 2px; overflow: hidden; font-size: 12px; line-height: 1.2; min-height: 18px;
  background: var(--slip); border-left: 2px solid var(--ink-2);
}
.tl-ev b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tl-ev span { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; font-variant-numeric: tabular-nums; flex: none; max-width: 45%; }
.tl-ev em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.tl-ev[data-k="focus"] { background: var(--ok-soft); border-left-color: var(--ok); }
.tl-ev[data-ev="pending"] { background: var(--accent-soft); border: 1px dashed var(--accent); border-radius: 6px; }
.tl-ev[data-ev="pending"] b { color: var(--ink-2); }
.tl-ev[data-ev="pending"] span { display: none; }
.tl-now { position: absolute; left: 26px; right: 0; top: calc(var(--t) * 100%); border-top: 1.5px solid var(--ink); }
.tl-now i { position: absolute; left: -4px; top: -4.5px; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.tl-now span { position: absolute; right: 0; top: -17px; font: 600 11px/1 var(--num); color: var(--ink); background: var(--card); padding: 2px 0 2px 4px; }
.tl-compact .tl-ev span { display: none; }

/* 时间轴（横） */
.tlh { min-width: 0; }
.tlh-track { position: relative; height: 38px; border-radius: 8px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); }
.tlh-ev { position: absolute; top: 7px; bottom: 7px; left: calc(var(--a) * 100% + 1px); width: calc((var(--b) - var(--a)) * 100% - 2px); border-radius: 4px; background: var(--ink-2); opacity: .55; }
.tlh-ev[data-k="focus"] { background: var(--ok); opacity: .7; }
.tlh-ev[data-ev="pending"] { background: transparent; opacity: 1; box-shadow: inset 0 0 0 1px var(--accent); }
.tlh-now { position: absolute; top: -3px; bottom: -3px; left: calc(var(--t) * 100%); width: 2px; border-radius: 1px; background: var(--ink); }
.tlh-ticks { position: relative; height: 16px; margin-top: 5px; }
.tlh-ticks span { position: absolute; left: calc(var(--t) * 100%); transform: translateX(-50%); font: 10.5px/1 var(--num); color: var(--ink-3); }
.tlh-ticks span:first-child { transform: none; }
.tlh-ticks span:last-child { transform: translateX(-100%); }

/* 待拍板行 */
.ap-list { list-style: none; margin: 0; padding: 0; min-height: 0; }
.ap-row { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "tg t w st" ". why why why"; align-items: center; gap: 2px 10px; padding: 8px 3px 8px 0; border-top: 1px solid var(--line); }
.ap-row:first-child { border-top: 0; padding-top: 2px; }
.ap-tg { grid-area: tg; display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); font-size: 11.5px; white-space: nowrap; }
.ap-tg .ic { width: 13px; height: 13px; }
.ap-t { grid-area: t; font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-w { grid-area: w; color: var(--ink-2); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ap-why { grid-area: why; color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-row .mini-stamp { grid-area: st; display: none; }
.ap-row:not([data-st="pending"]) .ap-t { color: var(--ink-3); }
.ap-row:not([data-st="pending"]) .ap-w { color: var(--ok); }
.ap-row:not([data-st="pending"]) .mini-stamp { display: inline-grid; }
.ap-narrow .ap-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "tg st" "t t"; }
.mini-stamp {
  width: 24px; height: 24px; place-items: center; border-radius: 50%; color: var(--stamp); opacity: var(--stamp-alpha); mix-blend-mode: var(--stamp-blend);
  border: 1.6px solid currentColor; outline: 0.8px solid currentColor; outline-offset: -4.6px; filter: url(#ink); transform: rotate(-10deg); font: 700 11px/1 var(--serif);
}
.mini-stamp::before { content: "定"; }
.mini-stamps { display: flex; gap: 2px; margin-top: 6px; }
.mini-stamps .mini-stamp { display: inline-grid; }
.mini-stamps .mini-stamp:nth-child(2) { transform: rotate(6deg); }

/* 待办 */
.td-list { list-style: none; margin: 0; padding: 0; min-height: 0; }
.td-list.cols2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
.td { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.td-list > .td:first-child, .td-list.cols2 > .td:nth-child(2) { border-top: 0; padding-top: 2px; }
.ck { flex: none; width: 18px; height: 18px; margin-top: 1px; display: grid; place-items: center; border-radius: 5px; box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--accent); transition: box-shadow .3s var(--ease-snappy); }
.ck:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.ck .ic { width: 14px; height: 14px; stroke-width: 2.2; opacity: 0; transition: opacity .2s; }
.td[data-done="true"] .ck .ic { opacity: 1; }
.td[data-done="true"] .td-t { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--ink-3); }
.td-b { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.td-t { font-size: 13.5px; line-height: 1.4; }
.td-m { display: flex; align-items: center; gap: 8px; min-width: 0; }
.src { color: var(--ink-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 随手记：全页唯一的手账细节，横线纸 */
.nt-wrap { flex: 1; min-height: 0; display: flex; }
.nt { margin: 0; min-width: 0; display: flex; flex-direction: column; }
.nt blockquote { text-wrap: pretty; margin: 0; font-size: 13.5px; line-height: 24px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nt-big { flex: 1; }
.nt-big blockquote {
  flex: 1; font-size: 14.5px; line-height: 26px; -webkit-line-clamp: 3; padding-top: 1px;
  background: repeating-linear-gradient(to bottom, transparent 0 25px, var(--line-strong) 25px 26px);
}
.nt figcaption { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 11.5px; color: var(--ink-3); }
.tag { color: var(--ink-2); }
.nt .at { margin-left: auto; font-variant-numeric: tabular-nums; }
.nt-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 12px 18px; min-height: 0; }
.nt-grid .nt { padding-top: 8px; border-top: 1px solid var(--line); }
.nt-grid .nt:nth-child(-n + 2) { border-top: 0; padding-top: 0; }
.nt-grid[data-n="4"] { grid-template-rows: 1fr 1fr; flex: 1; }
.nt-grid[data-n="4"] .nt blockquote { -webkit-line-clamp: 3; }
.nt-grid[data-n="4"] .nt figcaption { margin-top: auto; padding-top: 6px; }

/* 文件 */
.fbadge { flex: none; display: inline-grid; place-items: center; width: 44px; height: 20px; border-radius: 4px; font: 700 11px/1 var(--sans); letter-spacing: .06em; background: var(--card-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.fbadge[data-ext="docx"] { color: var(--accent); }
.fbadge[data-ext="xlsx"] { color: var(--ok); }
.fbadge[data-ext="pdf"] { color: var(--warn); }
.t-hero .fbadge { width: 46px; height: 56px; align-content: end; padding-bottom: 8px; border-radius: 4px 12px 4px 4px; margin-bottom: 6px; font-size: 11px; }
.fname { word-break: break-all; }
.f-list { list-style: none; margin: 0; padding: 0; }
.f-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; height: 31px; border-top: 1px solid var(--line); }
.f-list li:first-child { border-top: 0; height: 26px; }
.f-n { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-at { color: var(--ink-3); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.f-sum { margin: auto 0 0; padding: 9px 11px; border-radius: var(--r-in); background: var(--card-2); color: var(--ink-2); font-size: 12.5px; line-height: 1.55; }
.f-sum b { color: var(--ink); font-weight: 600; }

/* 会议、联系人 */
.avs { display: inline-flex; }
.av { width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--slip); color: var(--ink-2); font: 600 11px/1 var(--serif); font-style: normal; box-shadow: 0 0 0 2px var(--card); flex: none; }
.avs .av + .av { margin-left: -5px; }
.av.sm { width: 20px; height: 20px; font-size: 11px; }
.av.lg { width: 44px; height: 44px; font-size: 18px; margin-bottom: 6px; }
.carry { list-style: none; margin: 0; padding: 0; min-width: 0; }
.carry li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.carry li:first-child { border-top: 0; }
.carry li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carry em { font-style: normal; color: var(--ink-3); font-size: 12px; }
.last { margin-top: auto; padding: 10px 12px; border-radius: var(--r-in); background: var(--card-2); }
.last p { margin: 3px 0 0; color: var(--ink-2); font-size: 12.5px; }
.ct { list-style: none; margin: 0; padding: 0; }
.ct.cols2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
.ct li { display: flex; align-items: center; gap: 10px; padding: 6px 0; min-width: 0; }
.ct li > span { display: flex; flex-direction: column; min-width: 0; }
.ct b { font-size: 13px; font-weight: 600; }
.ct em { font-style: normal; color: var(--ink-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 项目 */
.seg-bar { display: flex; gap: 3px; height: 6px; margin: 8px 0 6px; }
.seg-bar i { flex: 1; border-radius: 3px; background: var(--line-strong); }
.seg-bar i[data-st="today"] { background: var(--accent); opacity: .7; }
.seg-bar i[data-st="late"] { background: var(--warn); }
.seg-bar i[data-st="done"] { background: var(--ok); }
.steps { list-style: none; margin: 0; padding: 0; min-width: 0; }
.steps li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 4px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.steps li:first-child { border-top: 0; }
.steps li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(150px, 38%) minmax(0, 1fr); gap: 22px; align-items: center; }
.pj-h { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pj-v { flex: none; display: block; padding-bottom: 10px; }
.pj-v + .pj-v { padding-top: 10px; border-top: 1px solid var(--line); }

/* 收件箱：仿截图 */
.shot { display: flex; flex-direction: column; gap: 6px; padding: 9px 11px; border-radius: 10px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.shot-h { font-size: 11px; color: var(--ink-3); }
.shot-m { display: flex; gap: 7px; align-items: flex-start; font-size: 12px; line-height: 1.5; }
.shot-m > span { text-wrap: pretty; padding: 5px 9px; border-radius: 4px 10px 10px 10px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.ib-wrap { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: 0; }
.ib-wrap .shot-m > span { text-wrap: pretty; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ib-r { margin: 0; display: inline-flex; align-items: center; gap: 5px; color: var(--ok); font-size: 12.5px; font-weight: 600; }
.ib-r .ic { width: 14px; height: 14px; }
.shot-lg { padding: 12px; }
.shot-lg .shot-m { font-size: 13px; }

/* 本周、文档、表格 */
.wk { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.wk-d { display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: var(--r-in); min-width: 0; box-shadow: inset 0 0 0 1px var(--line); }
.wk-d[data-today="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.wk-n { font-size: 11px; color: var(--ink-3); display: flex; align-items: baseline; justify-content: space-between; }
.wk-n b { font: 500 16px/1 var(--num); color: var(--ink); }
.wk-e { font-size: 11px; line-height: 1.35; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-dots { display: flex; gap: 3px; margin-top: auto; }
.wk-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.dc { display: flex; flex-direction: column; gap: 2px; min-height: 0; }
.dc .hero-t { font-family: var(--serif); }
.dc-p { margin: 8px 0 0; padding-left: 10px; box-shadow: inset 2px 0 0 var(--line-strong); color: var(--ink-2); font-size: 12.5px; }
.dc-p .src { margin-left: 6px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.tb { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tb th { text-align: left; color: var(--ink-3); font-weight: 500; font-size: 11.5px; padding: 0 0 6px; border-bottom: 1px solid var(--line-strong); }
.tb td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.tb td:last-child, .tb th:last-child { text-align: right; }

/* ---------- 待拍板整页 ---------- */
.page-in { max-width: 1200px; margin: 0 auto; padding: 22px 32px 88px; }
.back { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px 4px 2px; margin-left: -2px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 13.5px; }
.back:hover { color: var(--ink); background: var(--card-2); }
.back .ic { width: 16px; height: 16px; }
.p-head { margin: 18px 0 28px; }
.p-head .kick { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--accent); font-weight: 600; letter-spacing: .06em; }
.p-head .kick .ic { width: 16px; height: 16px; }
.p-h { margin: 8px 0 0; font: 600 32px/1.25 var(--serif); letter-spacing: .03em; }
.p-s { margin: 10px 0 0; max-width: 640px; color: var(--ink-2); font-size: 15px; }
.p-grid { display: grid; grid-template-columns: minmax(0, 1fr) 348px; gap: 28px; align-items: start; }
.drafts { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.draft { position: relative; border-radius: var(--r-card); background: var(--card); box-shadow: var(--sh-1); }
.draft .flood { display: none; }
.d-in { position: relative; padding: 20px 24px 18px; }
.d-top { display: flex; align-items: center; gap: 10px; }
.d-tg { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 7px; border-radius: 6px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font-size: 12px; font-weight: 600; }
.d-tg .ic { width: 14px; height: 14px; }
.d-verb { color: var(--ink-3); font-size: 12.5px; }
.d-st { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--accent); }
.draft[data-st="confirmed"] .d-st { color: var(--ink-2); }
.draft[data-st="sent"] .d-st { color: var(--ok); }
.d-title { margin: 14px 0 14px; font: 600 19px/1.45 var(--serif); letter-spacing: .02em; }
.d-kv { display: grid; gap: 8px; margin: 0; max-width: calc(100% - 120px); }
.d-kv > div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; }
.d-kv dt { color: var(--ink-3); font-size: 12.5px; line-height: 1.7; }
.d-kv dd { text-wrap: pretty; margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.7; }
.d-kv > div:first-child dd { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.d-act { display: flex; align-items: center; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); min-height: 53px; }
.d-done { display: none; margin: 0; align-items: center; gap: 6px; color: var(--ok); font-size: 13.5px; font-weight: 600; }
.d-done .ic { width: 16px; height: 16px; stroke-width: 2; }
.d-link { margin-left: 8px; color: var(--accent); font-weight: 500; font-size: 13px; text-underline-offset: 3px; }
.draft:not([data-st="pending"]) .btn { display: none; }
.draft[data-st="sent"] .d-done { display: inline-flex; }
.draft[data-st="confirmed"] .d-act::before { content: "正在写入…"; color: var(--ink-3); font-size: 13px; }
.draft[data-kind="local"][data-st="confirmed"] .d-act::before { content: "正在改…"; }

/* 印章 */
.stamp-slot { position: absolute; right: 26px; bottom: 12px; width: 112px; height: 112px; pointer-events: none; transform: rotate(var(--r, -8deg)); }
.stamp { width: 100%; height: 100%; display: block; overflow: visible; color: var(--stamp); opacity: var(--stamp-alpha); mix-blend-mode: var(--stamp-blend); stroke: currentColor; fill: none; }
.stamp text { fill: currentColor; stroke: none; }
.st-arc { font: 600 9.6px/1 var(--sans); letter-spacing: .08em; }
.st-date { font: 600 21px/1 var(--num); letter-spacing: .02em; }
.stamp-slot.is-in .stamp { animation: stamp-drop .56s var(--ease-bouncy) both; }
.stamp-slot.is-in::before { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: radial-gradient(circle, transparent 60%, var(--stamp) 64%, transparent 74%); opacity: 0; mix-blend-mode: var(--stamp-blend); animation: stamp-ink .9s .16s ease-out forwards; }
@keyframes stamp-drop {
  0% { opacity: 0; transform: translateY(-14px) scale(1.5) rotate(-6deg); filter: blur(3px); }
  45% { opacity: var(--stamp-alpha); filter: blur(0); }
  100% { opacity: var(--stamp-alpha); transform: none; filter: blur(0); }
}
@keyframes stamp-ink { 0% { opacity: .22; transform: scale(.94); } 100% { opacity: 0; transform: scale(1.1); } }

.p-aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 112px; }
.panel { padding: 16px 18px 18px; border-radius: var(--r-card); background: var(--card); box-shadow: var(--sh-1); }
.panel-h { margin: 0 0 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font: 600 15px/1.3 var(--serif); letter-spacing: .03em; }
.panel-h span { font: 400 12px/1.3 var(--sans); color: var(--ink-3); letter-spacing: 0; }
.panel-tl { position: relative; height: 360px; }
.hist { margin-top: 40px; }
.hist .panel-h { justify-content: flex-start; }
.h-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.h-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 96px minmax(120px, auto) 28px; gap: 16px; align-items: center; padding: 13px 4px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.h-at { color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.h-t em { margin-left: 8px; font-style: normal; color: var(--ink-3); font-size: 12px; }
.h-tg { color: var(--ink-2); font-size: 12px; }
.h-r { color: var(--ink-3); font-size: 12px; }
.h-row[data-res="ok"] .h-r { color: var(--ok); font-weight: 600; }
.h-row .mini-stamp { display: none; }
.h-row[data-res="ok"] .mini-stamp { display: inline-grid; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 9px; font-size: 14px; font-weight: 600; position: relative; transition: background-color .3s var(--ease-snappy), box-shadow .3s var(--ease-snappy), transform .3s var(--ease-snappy), color .3s; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 1px 2px rgba(30, 40, 60, .2); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-ghost:hover { background: var(--card-2); }
.btn-text { color: var(--ink-2); padding: 0 10px; }
.btn-text:hover { color: var(--ink); background: var(--card-2); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn[aria-busy="true"] { color: transparent; pointer-events: none; }
.btn[aria-busy="true"]::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--on-accent); border-right-color: transparent; animation: spin .7s linear infinite; }
.btn:disabled:not([aria-busy]) { opacity: .45; }
@keyframes spin { to { transform: rotate(1turn); } }

/* ---------- 模块库 ---------- */
.lib { position: fixed; inset: 34px 0 0 0; z-index: 50; }
.scrim { position: absolute; inset: 0; background: var(--scrim); }
.lib-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(580px, 100%); display: flex; flex-direction: column; background-color: var(--paper);
  box-shadow: -1px 0 0 var(--line), -30px 0 60px -30px rgba(40, 28, 10, .35);
}
.lib-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 24px 6px 28px; }
.lib-head h2 { margin: 0; font: 600 24px/1.2 var(--serif); letter-spacing: .04em; }
.lib-head p { margin: 4px 0 0; color: var(--ink-3); font-size: 12.5px; }
.lib-search { display: flex; align-items: center; gap: 8px; height: 42px; margin: 12px 28px 4px; padding: 0 12px; border-radius: 10px; background: var(--card); box-shadow: var(--sh-1); color: var(--ink-3); }
.lib-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font-size: 14px; }
.lib-search input::placeholder { color: var(--ink-3); }
.lib-body { flex: 1; overflow: auto; padding: 0 28px 48px; overscroll-behavior: contain; }
.lib-g h3 { margin: 26px 0 12px; display: flex; align-items: baseline; gap: 10px; font: 600 15px/1.3 var(--serif); letter-spacing: .04em; }
.lib-g h3 span { font: 400 12px/1 var(--sans); color: var(--ink-3); letter-spacing: 0; }
.lib-card { padding: 16px; border-radius: 16px; background: var(--paper-deep); margin-bottom: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.lib-stage { position: relative; }
.lib-frame { position: absolute; left: 0; top: 0; transform-origin: 0 0; display: grid; }
.lib-frame .tile { cursor: default; pointer-events: none; }
.lib-info { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-top: 14px; }
.lib-t { min-width: 0; }
.lib-t b { font: 600 15px/1.3 var(--serif); letter-spacing: .03em; }
.lib-t span { display: block; margin-top: 3px; color: var(--ink-2); font-size: 12.5px; line-height: 1.5; }
.lib-ctl { display: flex; align-items: center; gap: 10px; flex: none; }
.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { height: 26px; padding: 0 10px; border-radius: 7px; color: var(--ink-3); font-size: 12.5px; transition: background-color .3s var(--ease-snappy), color .3s; }
.seg button[aria-checked="true"] { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(70, 50, 20, .1); }
.lib-on { display: inline-flex; align-items: center; gap: 4px; height: 30px; color: var(--ok); font-size: 13px; font-weight: 600; }
.lib-on .ic { width: 15px; height: 15px; stroke-width: 2; }

/* ---------- 反馈 ---------- */
.morph { position: fixed; z-index: 40; pointer-events: none; background: var(--card); box-shadow: var(--sh-2); }
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 70; max-width: min(520px, calc(100vw - 32px)); padding: 10px 16px; border-radius: 10px;
  background: var(--toast-bg); color: var(--toast-fg); font-size: 13.5px; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .4);
  translate: -50% 10px; opacity: 0; pointer-events: none; visibility: hidden;
  transition: opacity .26s var(--ease-snappy), translate .42s var(--ease-smooth), visibility 0s .42s;
}
.toast.is-in { opacity: 1; translate: -50% 0; visibility: visible; transition: opacity .26s var(--ease-snappy), translate .42s var(--ease-smooth); }
.toast.is-in.is-out { opacity: 0; translate: -50% 6px; }
.tabbar { display: none; }

/* 卡片入场：上移 8px 渐显，40ms 错峰，最多 8 个 */
.grid.is-entering .tile { animation: enter .52s var(--ease-smooth) backwards; animation-delay: calc(min(var(--i), 8) * 40ms + 60ms); }
.hello { animation: enter .52s var(--ease-smooth) backwards; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .32s; animation-timing-function: ease; }

/* ---------- 中屏 ---------- */
@media (max-width: 1100px) {
  .hello { grid-template-columns: 1fr; }
  .ask { max-width: 640px; }
  .p-grid { grid-template-columns: 1fr; }
  .p-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; }
}

/* ---------- 手机 ---------- */
@media (max-width: 640px) {
  .sample { padding: 0 12px; gap: 8px; font-size: 11.5px; }
  .sample-n { display: none; }
  .top { height: 54px; padding: 0 16px; gap: 10px; }
  .top-date { font-size: 12.5px; }
  .hide-m { display: none !important; }
  .desk { padding: 0 16px 104px; }
  .hello { padding: 18px 0 18px; gap: 14px; }
  .hello-d { display: none; }
  .hello-h { font-size: 26px; }
  .hello-s { font-size: 14px; margin-top: 6px; }
  .ask { height: 48px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; gap: 12px; }
  .tile { order: var(--mo); padding: 13px 14px 14px; }
  .tile-add { order: 99; }
  .t-name { font-size: 14px; }
  .num.xl { font-size: 36px; }
  .num.lg { font-size: 26px; }
  .hero-t { font-size: 14px; }
  .t-split { grid-template-columns: minmax(96px, 36%) minmax(0, 1fr); gap: 14px; }
  .pj { grid-template-columns: 1fr; gap: 6px; }
  .pj .steps { display: none; }
  .tile[data-w="2"][data-h="1"] .carry { display: none; }
  .tile[data-id="meeting"][data-w="2"][data-h="1"] .t-split { grid-template-columns: 1fr; }
  .ap-row { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "tg t st"; }
  .ap-row .ap-w { display: none; }
  .tile[data-w="1"] .t-foot .av:nth-child(n + 3) { display: none; }
  .ib-wrap .shot-m > span { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tile[data-h="2"] .td-list .td:nth-child(n + 4) { display: none; }
  .nt-big blockquote { font-size: 13.5px; line-height: 24px; background-size: 100% 24px; background-image: repeating-linear-gradient(to bottom, transparent 0 23px, var(--line-strong) 23px 24px); -webkit-line-clamp: 2; }
  .page-in { padding: 14px 16px 104px; }
  .p-h { font-size: 24px; }
  .p-s { font-size: 14px; }
  .p-aside { display: flex; }
  .d-in { padding: 16px 16px 14px; }
  .d-title { font-size: 17px; margin: 12px 0; }
  .d-kv { max-width: none; }
  .d-kv > div { grid-template-columns: 1fr; gap: 0; }
  .d-kv dt { font-size: 12px; line-height: 1.5; }
  .stamp-slot { width: 84px; height: 84px; right: 14px; bottom: 10px; }
  .d-done { flex-wrap: wrap; max-width: calc(100% - 96px); }
  .d-link { margin-left: 22px; }
  .d-act { flex-wrap: wrap; }
  .h-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t st" "at r"; gap: 4px 12px; }
  .h-row .h-t { grid-area: t; }
  .h-row .h-at { grid-area: at; }
  .h-row .h-r { grid-area: r; text-align: right; }
  .h-row .h-tg { display: none; }
  .h-row .mini-stamp { grid-area: st; }
  .lib-panel { top: 5vh; width: 100%; border-radius: 18px 18px 0 0; box-shadow: 0 -1px 0 var(--line), 0 -24px 60px -24px rgba(40, 28, 10, .4); }
  .lib-head { padding: 22px 20px 4px; }
  .lib-head::before { content: ""; position: absolute; left: 50%; top: 8px; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--line-strong); }
  .lib-search { margin: 10px 20px 4px; }
  .lib-body { padding: 0 20px 40px; }
  .lib-info { flex-direction: column; align-items: stretch; }
  .lib-ctl { justify-content: space-between; }
  .toast { bottom: 92px; }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 47; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center;
    height: calc(66px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  }
  .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--ink-3); font-size: 11px; }
  .tabbar button .ic { width: 22px; height: 22px; }
  .tabbar button[aria-current="page"] { color: var(--ink); }
  .tabbar .count { position: absolute; top: -4px; left: calc(50% + 6px); min-width: 17px; height: 17px; font-size: 11px; padding: 0 4px; }
  .tabbar .tab-add { justify-self: center; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
}

/* ---------- 降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .12s !important; }
  .btn[aria-busy="true"]::after { animation: none; border-right-color: transparent; }
  .tile.is-lift { rotate: none; scale: none; }
  .tile:hover { translate: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .top, .tabbar { background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
