/* E 冷静工具 · 命令条
   一句话：一间安静的工作室，东西都在手边；一句话交代的事，以确认卡的形式落回桌面。
   唯一签名装置：命令条（⌘K）。其余一律中性：发丝线分层、等宽数字、短而干脆的过渡，没有弹跳。
   色值在 OKLCH 里定：中性色统一色相 255、彩度 ≤ .016；唯一彩色是电蓝（色相 260，比调研提案的 265 往青挪，离紫远一点）。 */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;

  /* 亮色 */
  --bg: #F2F4F6;          /* oklch(.965 .004 255) */
  --surface: #FBFCFD;     /* oklch(.99 .002 255)，不用纯白 */
  --inset: #EEF0F3;       /* oklch(.955 .005 255) */
  --hover: rgb(15 23 42 / .04);
  --line: rgb(15 23 42 / .08);
  --line-2: rgb(15 23 42 / .14);
  --edge: rgb(255 255 255 / .9);   /* 卡片内顶高光 */
  --t1: #171B20;          /* oklch(.22 .012 255) */
  --t2: #4F565E;          /* oklch(.45 .016 255) */
  --t3: #636A72;          /* oklch(.52 .016 255) */
  --acc: #1368E9;         /* oklch(.55 .21 260) 文字与填充同一个 */
  --acc-fill: #1368E9;
  --on-acc: #FFFFFF;
  --acc-soft: rgb(19 104 233 / .10);
  --acc-line: rgb(19 104 233 / .45);
  --ok: #057558;          /* oklch(.50 .10 168) */
  --ok-soft: rgb(5 117 88 / .10);
  --warn: #995B03;        /* oklch(.53 .12 65) 逾期用琥珀，不用红 */
  --warn-soft: rgb(196 120 10 / .12);
  --dot: rgb(15 23 42 / .07);
  --shadow: 0 1px 0 rgb(15 23 42 / .03), 0 1px 3px rgb(15 23 42 / .04);
  --shadow-lift: 0 2px 4px rgb(15 23 42 / .06), 0 24px 48px -16px rgb(15 23 42 / .22);
  --shadow-pop: 0 0 0 1px rgb(15 23 42 / .08), 0 30px 80px -20px rgb(15 23 42 / .35);
  --scrim: rgb(15 20 28 / .28);
  --kbd-bg: #FFFFFF;

  --r: 10px; --r-sm: 7px; --r-lg: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-fast: 140ms; --t: 220ms; --t-slow: 320ms;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0B0F13;          /* oklch(.165 .010 255) */
  --surface: #14171D;     /* oklch(.205 .012 255) */
  --inset: #1A1E24;       /* oklch(.235 .013 255) */
  --hover: rgb(255 255 255 / .03);
  --line: rgb(255 255 255 / .07);
  --line-2: rgb(255 255 255 / .12);
  --edge: rgb(255 255 255 / .05);
  --t1: #E8EBF1;          /* oklch(.94 .008 255) */
  --t2: #ABB2BA;          /* oklch(.76 .014 255) */
  --t3: #858C95;          /* oklch(.64 .016 255) */
  --acc: #629DFE;         /* oklch(.70 .156 260) 暗底上的文字与图标 */
  --acc-fill: #1368E9;    /* 按钮填充仍用 .55 档，白字 5.0:1 */
  --acc-soft: rgb(98 157 254 / .12);
  --acc-line: rgb(98 157 254 / .5);
  --ok: #4FC39C;          /* oklch(.74 .12 168) */
  --ok-soft: rgb(79 195 156 / .12);
  --warn: #EEB154;        /* oklch(.80 .13 75) */
  --warn-soft: rgb(238 177 84 / .12);
  --dot: rgb(255 255 255 / .045);
  --shadow: 0 1px 0 rgb(0 0 0 / .2);
  --shadow-lift: 0 2px 6px rgb(0 0 0 / .3), 0 28px 56px -18px rgb(0 0 0 / .7);
  --shadow-pop: 0 0 0 1px rgb(255 255 255 / .08), 0 40px 100px -20px rgb(0 0 0 / .8);
  --scrim: rgb(4 6 9 / .55);
  --kbd-bg: #20252C;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--t1);
  -webkit-font-smoothing: antialiased;
  /* 台面：20px 点阵，像一张有刻度的工作垫；只在页底，卡片上没有 */
  background-image: radial-gradient(circle at 1px 1px, var(--dot) 1px, transparent 1.5px);
  background-size: 20px 20px; background-position: -1px -1px;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
svg.i { width: 1em; height: 1em; display: block; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; font: 500 11px/1 var(--mono); color: var(--t2); background: var(--kbd-bg); box-shadow: inset 0 0 0 1px var(--line-2), 0 1px 0 var(--line-2); }
mark { background: var(--acc-soft); color: var(--t1); border-radius: 3px; padding: 0 2px; box-shadow: inset 0 -1px 0 var(--acc-line); white-space: nowrap; }
mark.w { background: var(--warn-soft); box-shadow: inset 0 -1px 0 color-mix(in oklab, var(--warn) 50%, transparent); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- 顶栏 ---------- */
.bar {
  position: sticky; top: 0; z-index: 20; height: 56px; display: grid; grid-template-columns: 1fr minmax(0, 560px) 1fr; align-items: center; gap: 16px; padding: 0 20px;
  background: color-mix(in oklab, var(--bg) 88%, transparent); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.bar-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; min-width: 0; }
.crumb button { color: var(--t1); border-radius: 6px; padding: 2px 6px; margin: -2px -6px; }
.crumb button:hover { background: var(--hover); }
.crumb-sep { color: var(--t3); font-weight: 400; }
.crumb-cur { color: var(--t2); }
.bar-r { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.clock { font-size: 12.5px; color: var(--t3); white-space: nowrap; }
.clock b { font: 500 12.5px var(--mono); color: var(--t2); }
.ibtn { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; font-size: 17px; color: var(--t2); transition: background var(--t-fast), color var(--t-fast); }
.ibtn:hover { background: var(--hover); color: var(--t1); box-shadow: inset 0 0 0 1px var(--line); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--inset); color: var(--t1); box-shadow: inset 0 0 0 1px var(--line-2); }

/* 命令条（收起态） */
.cmd {
  height: 36px; display: flex; align-items: center; gap: 10px; padding: 0 8px 0 12px; border-radius: 9px; text-align: left;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); color: var(--t3);
  transition: box-shadow var(--t-fast), background var(--t-fast);
}
.cmd:hover { box-shadow: inset 0 0 0 1px var(--acc-line), 0 0 0 3px var(--acc-soft); }
.cmd-ico { font-size: 16px; color: var(--acc); flex: none; }
.cmd-ph { position: relative; flex: 1; height: 20px; overflow: hidden; font-size: 13.5px; color: var(--t2); }
.cmd-ph span { position: absolute; inset: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 20px; }
.cmd-ph .ph-b { transform: translateY(100%); opacity: 0; }
.cmd-ph.roll .ph-a { animation: ph-out 420ms var(--ease) forwards; }
.cmd-ph.roll .ph-b { animation: ph-in 420ms var(--ease) forwards; }

/* ---------- 桌面 ---------- */
.desk { max-width: 1240px; margin: 0 auto; padding: 28px 32px 40px; }
.hello { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.hello h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.sum { margin: 0; display: flex; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--t2); }
.sum span { display: inline-flex; align-items: baseline; gap: 4px; height: 24px; align-items: center; padding: 0 9px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); }
.sum b { font: 600 12.5px var(--mono); color: var(--t1); }
.sum .w b { color: var(--warn); }
.sum .a b { color: var(--acc); }
.grid { margin-top: 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 156px; gap: 12px; }

/* ---------- 模块：不透明面＋发丝线＋内顶高光 ---------- */
.tile {
  position: relative; min-width: 0; border-radius: var(--r); background: var(--surface); overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 var(--edge), var(--shadow);
  display: flex; flex-direction: column; touch-action: none; user-select: none; -webkit-user-select: none;
  transition: box-shadow var(--t-fast);
}
.tile:hover { box-shadow: inset 0 0 0 1px var(--line-2), inset 0 1px 0 var(--edge), var(--shadow); }
.tile.can-open { cursor: pointer; }
.tile.is-lift { z-index: 5; cursor: grabbing; box-shadow: inset 0 0 0 1px var(--acc-line), inset 0 1px 0 var(--edge), var(--shadow-lift); }
.tile.is-target { box-shadow: inset 0 0 0 1px var(--acc-line), 0 0 0 3px var(--acc-soft); }
.tile.got { animation: got 900ms var(--ease); }
.t-head { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 14px; border-bottom: 1px solid var(--line); flex: none; font-size: 12.5px; font-weight: 500; color: var(--t2); }
.t-head .ico { font-size: 15px; color: var(--t3); flex: none; }
.t-head .nm { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-head .meta { margin-left: auto; font: 500 11.5px var(--mono); color: var(--t3); white-space: nowrap; }
.t-head .go { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--acc); font-weight: 500; }
.t-body { flex: 1; min-height: 0; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.stat { display: flex; align-items: baseline; gap: 8px; }
.big { font: 500 34px/1 var(--mono); letter-spacing: -.03em; color: var(--t1); font-variant-numeric: tabular-nums; }
.unit { font-size: 13px; color: var(--t2); }
.sub { font-size: 12.5px; color: var(--t2); line-height: 1.5; }
.sub b { color: var(--t1); font-weight: 600; }
.warn { color: var(--warn); }
.ok { color: var(--ok); }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.pill.acc { background: var(--acc-soft); color: color-mix(in oklab, var(--acc) 82%, var(--t1)); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.mute { background: var(--inset); color: var(--t2); box-shadow: inset 0 0 0 1px var(--line); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* 今日 2×2：刻度尺 ＋ 表格式日程 */
.today-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.today-top .k { display: flex; gap: 18px; }
.today-top .k div { font-size: 11.5px; color: var(--t3); }
.today-top .k b { display: block; font: 500 17px/1.2 var(--mono); color: var(--t1); }
.ruler { position: relative; height: 40px; margin-top: 4px; flex: none; }
.ruler .ticks { position: absolute; left: 0; right: 0; top: 0; height: 22px; border-radius: 5px; background: var(--inset); box-shadow: inset 0 0 0 1px var(--line);
  background-image: repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px calc(100% / 18)); }
.ruler .blk { position: absolute; top: 3px; height: 16px; border-radius: 3px; background: var(--t3); opacity: .4; }
.ruler .blk.focus { background: transparent; opacity: 1; box-shadow: inset 0 0 0 1px var(--acc); background-image: repeating-linear-gradient(135deg, var(--acc-soft) 0 3px, transparent 3px 6px); }
.ruler .now { position: absolute; top: -3px; height: 28px; width: 2px; background: var(--t1); border-radius: 1px; }
.ruler .now::after { content: "09:05"; position: absolute; top: -14px; left: -2px; font: 600 10px var(--mono); color: var(--t2); }
.ruler .hr { position: absolute; top: 26px; font: 500 10.5px var(--mono); color: var(--t3); transform: translateX(-50%); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 10px; height: 27px; font-size: 13px; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.rows .tm { font: 500 12px var(--mono); color: var(--t3); }
.rows .tt { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows .tt small { color: var(--t3); font-size: 12px; margin-left: 6px; }
.rows .r { font: 500 11.5px var(--mono); color: var(--t3); }

/* 待拍板 2×1 */
.ap-split { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: start; }
.ap-rows { list-style: none; margin: 0; padding: 0; min-width: 0; }
.ap-rows li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 8px; align-items: center; height: 28px; font-size: 13px; border-top: 1px solid var(--line); }
.ap-rows li:first-child { border-top: 0; }
.ap-rows li .ico { font-size: 14px; color: var(--acc); }
.ap-rows li .t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-rows li .w { font: 500 11.5px var(--mono); color: var(--t3); }
.ap-rows li.new { animation: row-in 420ms var(--ease) both; }
.ap-rows li.new .t::before { content: "新"; display: inline-block; margin-right: 6px; padding: 0 4px; border-radius: 3px; font-size: 10.5px; line-height: 16px; color: var(--on-acc); background: var(--acc-fill); vertical-align: 1px; }

/* 待办 1×2 */
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); overflow: hidden; }
.todo li:first-child { border-top: 0; padding-top: 0; }
.todo .ck { width: 16px; height: 16px; margin-top: 2px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px var(--line-2); display: grid; place-items: center; color: var(--on-acc); transition: background var(--t-fast), box-shadow var(--t-fast); }
.todo .ck:hover { box-shadow: inset 0 0 0 1.5px var(--acc); }
.todo .ck svg { font-size: 12px; stroke-width: 2.6; stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset 220ms var(--ease) 40ms; }
.todo .tx { font-size: 13px; line-height: 1.4; transition: color var(--t-fast); }
.todo .mt { margin-top: 2px; font-size: 11.5px; color: var(--t3); display: flex; gap: 6px; align-items: center; }
.todo .mt .num { font-size: 11px; }
.todo li.is-done .ck { background: var(--acc-fill); box-shadow: none; }
.todo li.is-done .ck svg { stroke-dashoffset: 0; }
.todo li.is-done .tx { color: var(--t3); text-decoration: line-through; }

/* 随手记 1×2 */
.note-main { font-size: 14.5px; line-height: 1.55; color: var(--t1); padding-left: 10px; box-shadow: inset 2px 0 0 var(--acc); }
.note-meta { margin-top: 4px; display: flex; gap: 8px; align-items: center; font-size: 11.5px; color: var(--t3); }
.notes { list-style: none; margin: 4px 0 0; padding: 0; }
.notes li { padding: 7px 0; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--t2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 文件 2×1 */
.ftable { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12.5px; }
.ftable td { height: 26px; border-top: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ftable tr:first-child td { border-top: 0; }
.ftable .e { width: 44px; }
.ftable .e span { font: 600 10px var(--mono); text-transform: uppercase; color: var(--t3); }
.ftable .d { width: 92px; text-align: right; font: 500 11.5px var(--mono); color: var(--t3); }
.ftable .m { color: var(--t3); }

/* 项目 2×1 */
.projects { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.proj .pn { font-size: 13.5px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.proj .pn span { font: 500 11.5px var(--mono); color: var(--t3); font-weight: 500; }
.proj .ps { font-size: 12px; color: var(--t3); }
.segs { display: flex; gap: 3px; margin: 10px 0 6px; }
.segs i { flex: 1; height: 4px; border-radius: 2px; background: var(--inset); box-shadow: inset 0 0 0 1px var(--line-2); }
.segs i.run { background: var(--acc); box-shadow: none; opacity: .55; }
.segs i.late { background: var(--warn); box-shadow: none; }
.proj .pst { font-size: 12px; color: var(--t2); }

/* 通用预览 */
.pv-rows { list-style: none; margin: 0; padding: 0; }
.pv-rows li { display: flex; justify-content: space-between; gap: 10px; height: 26px; align-items: center; border-top: 1px solid var(--line); font-size: 12.5px; }
.pv-rows li:first-child { border-top: 0; }
.pv-rows li span:first-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-rows li span:last-child { font: 500 11.5px var(--mono); color: var(--t3); white-space: nowrap; }
.empty { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 7px; font-size: 12.5px; color: var(--t3); box-shadow: inset 0 0 0 1px var(--line-2); background-image: repeating-linear-gradient(135deg, var(--hover) 0 4px, transparent 4px 8px); }

/* ---------- 按钮 ---------- */
.btn { height: 32px; padding: 0 12px; border-radius: 8px; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; white-space: nowrap;
  background: var(--surface); color: var(--t1); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); transition: background var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast); }
.btn:hover { background: var(--inset); }
.btn:active { transform: translateY(1px); }
.btn kbd { height: 18px; min-width: 18px; font-size: 10.5px; }
.btn.primary { background: var(--acc-fill); color: var(--on-acc); box-shadow: inset 0 1px 0 rgb(255 255 255 / .16), 0 1px 2px rgb(0 0 0 / .2); }
.btn.primary:hover { background: color-mix(in oklab, var(--acc-fill) 88%, black); }
.btn.primary kbd { background: rgb(0 0 0 / .22); color: var(--on-acc); box-shadow: none; }
.btn.ghost { background: none; box-shadow: none; color: var(--t2); }
.btn.ghost:hover { background: var(--hover); color: var(--t1); }
.btn[aria-busy="true"] { pointer-events: none; }
.btn[aria-busy="true"] .lb { opacity: .0; }
.btn[aria-busy="true"]::after { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--on-acc); border-right-color: transparent; animation: spin .7s linear infinite; }
.btn { position: relative; justify-content: center; }
.btn:disabled { opacity: .45; pointer-events: none; }

/* ---------- 命令面板 ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); }
.scrim.is-in { animation: fade 200ms var(--ease) both; }
.palette {
  position: fixed; z-index: 41; top: 76px; left: 50%; width: min(680px, calc(100vw - 32px)); translate: -50% 0; border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-pop); display: flex; flex-direction: column;
}
.pal-in { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.pal-in .cmd-ico { font-size: 18px; }
.pal-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; color: var(--t1); }
.pal-in input::placeholder { color: var(--t3); }
.pal-body { max-height: 420px; overflow: auto; padding: 8px; }
.pal-sec { padding: 8px 10px 4px; font-size: 11.5px; font-weight: 500; color: var(--t3); }
.pal-row { width: 100%; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; height: 40px; padding: 0 10px; border-radius: 8px; text-align: left; font-size: 13.5px; color: var(--t1); }
.pal-row .ri { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; font-size: 15px; color: var(--t2); background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); }
.pal-row .rt { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-row .rt small { color: var(--t3); margin-left: 8px; font-size: 12.5px; }
.pal-row[aria-selected="true"] { background: var(--acc-soft); }
.pal-row[aria-selected="true"] .ri { color: var(--acc); }
.parse { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 10px 10px; }
.tok { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 8px; border-radius: 7px; font-size: 13px; background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); animation: tok-in 260ms var(--ease) both; animation-delay: calc(var(--i) * 70ms); }
.tok small { font: 500 10.5px var(--mono); color: var(--t3); text-transform: uppercase; letter-spacing: .04em; }
.tok b { font-weight: 500; }
.tok .num { font-size: 12.5px; }
.pal-foot { display: flex; gap: 16px; align-items: center; height: 40px; padding: 0 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--t3); }
.pal-foot span { display: inline-flex; gap: 4px; align-items: center; }
.pal-foot .sp { margin-left: auto; }
.scan { height: 2px; margin: 0 10px 8px; border-radius: 1px; background: linear-gradient(90deg, transparent, var(--acc), transparent) no-repeat; background-size: 40% 100%; animation: scan 700ms linear infinite; }
.flyer { position: fixed; z-index: 50; pointer-events: none; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 8px; font-size: 13px; white-space: nowrap;
  background: var(--surface); color: var(--t1); box-shadow: inset 0 0 0 1px var(--acc-line), var(--shadow-lift); }
.flyer .ico { color: var(--acc); font-size: 15px; }

/* ---------- 模块库：右侧抽屉 ---------- */
.drawer { position: fixed; z-index: 41; top: 8px; right: 8px; bottom: 8px; width: min(520px, calc(100vw - 16px)); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-pop); display: flex; flex-direction: column; overflow: hidden; }
.drawer.is-in { animation: dr-in 280ms var(--ease) both; }
.drawer.is-out { animation: dr-out 200ms var(--ease) both; }
.dr-head { display: flex; align-items: baseline; gap: 10px; padding: 16px 12px 12px 20px; }
.dr-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.dr-sub { font-size: 12px; color: var(--t3); }
.dr-head .ibtn { margin-left: auto; align-self: center; }
.dr-search { margin: 0 20px; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 12px; border-radius: 8px; background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); color: var(--t3); font-size: 15px; }
.dr-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 13.5px; color: var(--t1); }
.dr-search input::placeholder { color: var(--t3); }
.dr-tabs { display: flex; gap: 2px; padding: 12px 20px 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.dr-tabs button { position: relative; height: 34px; padding: 0 10px; font-size: 13px; color: var(--t2); white-space: nowrap; }
.dr-tabs button span { font: 500 11px var(--mono); color: var(--t3); margin-left: 4px; }
.dr-tabs button[aria-selected="true"] { color: var(--t1); font-weight: 500; }
.dr-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 1px; background: var(--acc); }
.dr-pv { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; flex: none; }
.pv-top { display: flex; align-items: center; gap: 10px; }
.pv-top .ri { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 17px; color: var(--acc); background: var(--acc-soft); }
.pv-top h3 { margin: 0; font-size: 15px; font-weight: 600; }
.pv-top .seg2 { margin-left: auto; }
.pv-desc { margin: 0; font-size: 12.5px; color: var(--t2); line-height: 1.55; }
.stage { position: relative; display: grid; place-items: center; padding: 16px; border-radius: 10px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line);
  background-image: radial-gradient(circle at 1px 1px, var(--dot) 1px, transparent 1.5px); background-size: 20px 20px; min-height: 180px; }
.pv-act { display: flex; gap: 8px; }
.pv-act .btn { flex: 1; height: 34px; }
.seg2 { display: inline-flex; padding: 2px; border-radius: 7px; background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); }
.seg2 button { height: 24px; padding: 0 9px; border-radius: 5px; font: 500 11.5px var(--mono); color: var(--t2); }
.seg2 button[aria-pressed="true"] { background: var(--surface); color: var(--t1); box-shadow: 0 0 0 1px var(--line-2), 0 1px 2px rgb(0 0 0 / .08); }
.dr-list { flex: 1; min-height: 0; overflow: auto; padding: 6px 8px 12px; }
.dr-row { width: 100%; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 8px; text-align: left; }
.dr-row:hover { background: var(--hover); }
.dr-row[aria-selected="true"] { background: var(--acc-soft); }
.dr-row .ri { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 16px; color: var(--t2); background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); }
.dr-row[aria-selected="true"] .ri { color: var(--acc); }
.dr-row .rn { font-size: 13.5px; font-weight: 500; }
.dr-row .rd { font-size: 12px; color: var(--t3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-row .rs { font-size: 11.5px; color: var(--t3); }

/* ---------- 展开整页：待拍板 ---------- */
.page { display: grid; grid-template-columns: 360px minmax(0, 1fr); height: calc(100vh - 56px); }
.page.is-in { animation: page-in 260ms var(--ease) both; }
.pl { border-right: 1px solid var(--line); background: color-mix(in oklab, var(--surface) 70%, transparent); display: flex; flex-direction: column; min-height: 0; }
.pl-head { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 16px 0 20px; border-bottom: 1px solid var(--line); }
.pl-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.pl-head .n { font: 600 11.5px/20px var(--mono); min-width: 22px; text-align: center; padding: 0 6px; border-radius: 5px; color: var(--on-acc); background: var(--acc-fill); }
.pl-head .n.bump { animation: bump 300ms var(--ease); }
.pl-head .kh { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--t3); }
.pl-list { overflow: auto; padding: 8px; }
.pl-sec { padding: 12px 12px 6px; font-size: 11.5px; color: var(--t3); }
.pl-row { width: 100%; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border-radius: 8px; text-align: left; }
.pl-row:hover { background: var(--hover); }
.pl-row[aria-selected="true"] { background: var(--acc-soft); box-shadow: inset 2px 0 0 var(--acc); }
.pl-row .ico { font-size: 15px; color: var(--acc); margin-top: 2px; }
.pl-row .pt { font-size: 13.5px; line-height: 1.4; }
.pl-row .pm { margin-top: 3px; display: flex; gap: 8px; font-size: 11.5px; color: var(--t3); }
.pl-row .pm .num { font-size: 11px; }
.pl-row.done .pt { color: var(--t3); }
.pl-row.done .ico { color: var(--ok); }
.pl-row.no .ico { color: var(--t3); }
.pl-row.enter { animation: row-in 300ms var(--ease) both; }
.pd { overflow: auto; padding: 28px 40px 40px; }
.pd-in { max-width: 760px; }
.pd-in.swap { animation: swap 220ms var(--ease) both; }
.pd-kind { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--t3); }
.pd h3 { margin: 10px 0 0; font-size: 22px; line-height: 30px; font-weight: 600; letter-spacing: -.01em; }
.props { margin: 20px 0 0; display: grid; grid-template-columns: 96px minmax(0, 1fr); border-top: 1px solid var(--line); }
.props dt, .props dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.props dt { color: var(--t3); }
.props dd .num { font-size: 12.5px; }
.basis { margin-top: 20px; border-radius: 10px; background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); }
.basis .bh { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--t3); }
.basis .bh .num { margin-left: auto; font-size: 11.5px; }
.basis p { margin: 0; padding: 12px 14px; font-size: 13.5px; line-height: 1.65; color: var(--t2); }
.diff { margin-top: 16px; }
.diff .dh { font-size: 12px; color: var(--t3); margin-bottom: 8px; }
.slot { position: relative; height: 54px; border-radius: 8px; background: var(--inset); box-shadow: inset 0 0 0 1px var(--line);
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px calc(100% / 9)); }
.slot i { position: absolute; top: 8px; bottom: 22px; border-radius: 4px; background: var(--t3); opacity: .4; }
.slot i.other { background: transparent; opacity: .45; background-image: repeating-linear-gradient(135deg, var(--acc-soft) 0 3px, transparent 3px 6px); }
.slot i.gone { display: none; }
.slot i.new { opacity: 1; background: transparent; box-shadow: inset 0 0 0 1.5px var(--acc); background-image: repeating-linear-gradient(135deg, var(--acc-soft) 0 3px, transparent 3px 6px); }
.slot i.new.solid { background: var(--acc-fill); background-image: none; box-shadow: none; animation: solid 360ms var(--ease); }
.slot span { position: absolute; bottom: 4px; font: 500 10px var(--mono); color: var(--t3); transform: translateX(-50%); }
.pd-act { margin-top: 24px; display: flex; gap: 8px; align-items: center; }
.pd-act .btn.primary { padding: 0 10px 0 14px; }
.pd-done { margin-top: 24px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--ok-soft); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ok) 30%, transparent); font-size: 13.5px; }
.pd-done.no { background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); }
.pd-done .okc { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: #FFFFFF; background: var(--ok); font-size: 13px; flex: none; }
:root[data-theme="dark"] .pd-done .okc { color: #08130F; }
.pd-done.no .okc { background: var(--t3); }
.pd-done .okc svg { stroke-width: 2.6; }
.pd-done .okc.pop { animation: pop 300ms var(--ease) both; }
.pd-done .btn { margin-left: auto; height: 28px; }
.log { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 14px; }
.log .lh { font-size: 12px; color: var(--t3); margin-bottom: 8px; }
.log ol { list-style: none; margin: 0; padding: 0; }
.log li { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; padding: 5px 0 5px 14px; font-size: 12.5px; color: var(--t2); }
.log li::before { content: ""; position: absolute; left: 0; top: 12px; width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); }
.log li:not(:last-child)::after { content: ""; position: absolute; left: 2px; top: 20px; bottom: -9px; width: 1px; background: var(--line); }
.log li .num { color: var(--t3); font-size: 11.5px; }
.log li.me::before { background: var(--acc); }
.pd-empty { padding: 80px 0; text-align: center; color: var(--t3); font-size: 14px; }

/* ---------- toast ---------- */
.toast { position: fixed; z-index: 60; left: 50%; bottom: 24px; translate: -50% 0; display: none; align-items: center; gap: 10px; height: 40px; padding: 0 16px 0 12px; border-radius: 9px;
  background: var(--surface); box-shadow: var(--shadow-pop); font-size: 13px; }
.toast .tk { color: var(--ok); font-size: 16px; }
.toast.is-in { display: flex; animation: toast-in 240ms var(--ease) both; }
.toast.is-out { display: flex; animation: toast-out 180ms var(--ease) both; }

/* ---------- 样张控制（非产品界面） ---------- */
.sample { position: fixed; z-index: 70; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 12px; background: rgb(18 20 24 / .9); color: #F2F4F5; font-size: 12px; box-shadow: 0 8px 24px rgb(0 0 0 / .3), inset 0 0 0 1px rgb(255 255 255 / .08); }
.sample-toggle { height: 28px; padding: 0 10px; border-radius: 8px; font-weight: 600; color: #F2F4F5; background: rgb(255 255 255 / .1); }
.sample-body { display: flex; gap: 8px; }
.seg { display: flex; padding: 2px; border-radius: 8px; background: rgb(255 255 255 / .08); }
.seg button { height: 26px; padding: 0 9px; border-radius: 6px; color: #C9CED1; }
.seg button[aria-pressed="true"] { background: #F2F4F5; color: #141618; }
@media (min-width: 721px) { .sample-toggle { display: none; } }

/* ---------- 动效 ---------- */
.tile.enter { animation: rise 360ms var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes ph-out { to { transform: translateY(-100%); opacity: 0; } }
@keyframes ph-in { from { transform: translateY(100%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tok-in { from { opacity: 0; transform: translateY(4px); } }
@keyframes scan { from { background-position: -60% 0; } to { background-position: 160% 0; } }
@keyframes dr-in { from { transform: translateX(24px); opacity: 0; } }
@keyframes dr-out { to { transform: translateX(24px); opacity: 0; } }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes row-in { from { opacity: 0; transform: translateX(-6px); } }
@keyframes swap { from { opacity: 0; transform: translateY(4px); } }
@keyframes got { 0% { box-shadow: inset 0 0 0 1px var(--acc-line), 0 0 0 0 var(--acc-soft); } 30% { box-shadow: inset 0 0 0 1px var(--acc), 0 0 0 6px var(--acc-soft); } }
@keyframes bump { 50% { transform: scale(1.2); } }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }
@keyframes solid { from { transform: scaleY(.6); } }
@keyframes spin { to { transform: rotate(1turn); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(4px); } }

/* ---------- 手机：命令条下沉到拇指区 ---------- */
@media (max-width: 720px) {
  /* 顶栏的 backdrop-filter 会成为 fixed 子元素的包含块，手机上命令条要钉到屏幕底，所以这里改实底 */
  .bar { grid-template-columns: 1fr auto; height: 52px; padding: 0 12px 0 16px; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .clock { display: none; }
  .cmd { position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); height: 48px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-lift); }
  .cmd kbd { display: none; }
  .desk { padding: 18px 12px 88px; }
  .hello { gap: 10px; }
  .hello h1 { font-size: 20px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 152px; gap: 10px; grid-auto-flow: row dense; }
  .grid .tile { grid-column: auto / span 1 !important; grid-row: auto / span 1 !important; }
  .grid .tile[data-w="2"] { grid-column: auto / span 2 !important; }
  .grid .tile[data-h="2"] { grid-row: auto / span 2 !important; }
  .big { font-size: 30px; }
  .today-top .k { display: none; }
  .ap-split { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; }
  .ftable .m { display: none; }
  .ftable .d { width: 64px; }
  .todo li:nth-child(n + 4) { display: none; }
  .palette { top: auto; bottom: 0; width: 100vw; border-radius: 16px 16px 0 0; max-height: calc(100dvh - 40px); }
  .pal-foot { display: none; }
  .drawer { top: 40px; left: 0; right: 0; bottom: 0; width: 100vw; border-radius: 16px 16px 0 0; }
  .drawer.is-in { animation-name: dr-up; }
  .page { grid-template-columns: minmax(0, 1fr); height: auto; min-height: calc(100vh - 52px); }
  .pl { border-right: 0; border-bottom: 1px solid var(--line); }
  .pl-head .kh { display: none; }
  .pl-list { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px; scrollbar-width: none; }
  .pl-sec { display: none; }
  .pl-row { flex: none; width: 240px; box-shadow: inset 0 0 0 1px var(--line); }
  .pd { padding: 20px 16px 96px; }
  .pd h3 { font-size: 19px; line-height: 27px; }
  .props { grid-template-columns: 72px minmax(0, 1fr); }
  .pd-act { flex-wrap: wrap; }
  .pd-act .btn.primary { flex: 1 1 100%; height: 40px; }
  .pd-act .btn:not(.primary) { flex: 1; height: 36px; }
  .btn kbd { display: none; }
  .sample { right: 8px; bottom: 70px; flex-wrap: wrap; justify-content: flex-end; max-width: calc(100vw - 16px); }
  .sample:not(.is-open) .sample-body { display: none; }
}
@keyframes dr-up { from { transform: translateY(40px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 100ms !important; }
  .btn[aria-busy="true"]::after { border-bottom-color: transparent; }
}
