  :root {
    --paper: #fdfdfa;
    --room: #e8ebf0;
    --frame: #cfd6df;
    --ink: #1f2430;
    --ink-2: #66708a;
    --ink-3: #9aa3b8;
    --line: rgba(31, 36, 48, 0.08);
    --line-2: rgba(31, 36, 48, 0.16);
    --l1: #d0334a; --l1-bg: #ffc9c9;
    --l2: #d97706; --l2-bg: #ffd9a8;
    --l3: #b58500; --l3-bg: #fff3bf;
    --l4: #1971c2; --l4-bg: #a5d8ff;
    --l5: #5f6b7a; --l5-bg: #dee2e6;
    --done: #2b8a3e; --done-bg: #b2f2bb;
    --BH: 132px;
    --rail: 86px;
    --ruler-h: 46px;
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  body {
    font-family: "Inter", "SF Pro Display", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--room); color: var(--ink); height: 100vh; overflow: hidden;
    display: flex; flex-direction: column;
  }

  /* ── 顶栏 ─────────────────────────────── */
  header {
    display: flex; align-items: center; gap: 16px;
    padding: 14px 28px 12px; flex: none;
  }
  .brand { display: flex; align-items: center; gap: 11px; }
  .board-ic {
    width: 38px; height: 38px; border-radius: 10px; flex: none;
    display: grid; place-items: center; cursor: pointer; user-select: none;
    border: 1.5px dashed var(--frame); color: var(--ink-3); font-size: 16px; font-weight: 700;
    transition: all .15s;
  }
  .board-ic:hover { border-color: var(--ink-3); color: var(--ink-2); }
  .board-ic.set { border: none; color: var(--ink); font-size: 27px; }
  .board-ic.set:hover { background: #f1f3f7; }
  .icon-pop {
    position: fixed; z-index: 50; width: 296px; background: #fff; border: 1px solid var(--frame);
    border-radius: 16px; box-shadow: 0 22px 50px -20px rgba(31,36,48,.45); padding: 14px;
  }
  .icon-pop h4 { font-size: 11.5px; color: var(--ink-3); font-weight: 700; letter-spacing: 1px; margin-bottom: 10px; }
  .icon-pop .ip-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
  .icon-pop .ip-grid button { font-size: 21px; line-height: 1; border: none; background: none; cursor: pointer; border-radius: 10px; padding: 7px 0; font-family: inherit; transition: background .12s, transform .12s; }
  .icon-pop .ip-grid button:hover { background: #f1f3f7; transform: scale(1.18); }
  .icon-pop .ip-reset { margin-top: 10px; width: 100%; border: 1px dashed var(--frame); background: none; cursor: pointer; border-radius: 10px; font-size: 12px; font-weight: 700; color: var(--ink-2); padding: 7px; font-family: inherit; }
  .icon-pop .ip-reset:hover { color: var(--ink); border-color: var(--ink-3); }
  .brand h1 { font-size: 21px; font-weight: 800; letter-spacing: .5px; line-height: 1.15; cursor: pointer; user-select: none; padding-bottom: 2px; border-bottom: 1.5px dashed transparent; transition: border-color .15s; }
  body:not(.ro) .brand h1:hover:not(.editing) { border-bottom-color: var(--frame); }
  .brand h1.editing { cursor: text; user-select: text; border-bottom-color: transparent; outline: 2px dashed var(--l3); outline-offset: 5px; border-radius: 3px; }
  .brand h1 .hl { position: relative; }
  .brand h1 .hl::after {
    content: ""; position: absolute; left: -2px; right: -2px; bottom: 1px; height: 8px; z-index: -1;
    background: linear-gradient(90deg, var(--l3-bg), #ffe066); transform: skew(-12deg) rotate(-1deg); border-radius: 2px;
  }
  .head-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
  .seg {
    display: flex; padding: 3px; gap: 2px; border-radius: 12px;
    background: #fff; border: 1px solid var(--frame);
    box-shadow: 0 2px 6px -2px rgba(31,36,48,.08);
  }
  .seg button {
    border: none; background: none; cursor: pointer; font-family: inherit;
    font-size: 12.5px; font-weight: 800; color: var(--ink-2); letter-spacing: 2px;
    padding: 6px 14px; border-radius: 9px; transition: all .15s;
  }
  .seg button:hover { color: var(--ink); }
  .seg button.on { background: var(--ink); color: #fff; }
  .chip {
    display: inline-flex; align-items: center; gap: 7px;
    height: 38px; padding: 0 14px; border-radius: 12px; cursor: pointer;
    background: #fff; border: 1px solid var(--frame); color: var(--ink-2);
    font-size: 13.5px; font-weight: 700; transition: all .16s; user-select: none;
    box-shadow: 0 2px 6px -2px rgba(31,36,48,.08);
  }
  .chip:hover { color: var(--ink); border-color: var(--ink-3); transform: translateY(-1px); }
  .chip svg { width: 16px; height: 16px; }
  .chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
  /* 主题簇内的低调分享键:幽灵式,让位给标题,不与首页导航 chip 争重量 */
  .share-ghost { height: 30px; padding: 0 9px; gap: 5px; border-radius: 9px; border-color: transparent; background: transparent; box-shadow: none; color: var(--ink-3); font-size: 12.5px; font-weight: 600; margin-left: 1px; }
  .share-ghost svg { width: 15px; height: 15px; }
  .share-ghost i { font-style: normal; letter-spacing: .5px; }
  .share-ghost:hover { color: var(--ink-2); background: #eef1f6; border-color: transparent; transform: none; }
  .share-ghost:active { transform: scale(.95); }

  /* ── 白板框架 ─────────────────────────── */
  .stage { flex: 1; display: flex; flex-direction: column; padding: 0 28px; min-height: 0; }
  .frame {
    flex: 1; min-height: 0; background: var(--paper); border: 1px solid var(--frame); border-radius: 20px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 24px 60px -34px rgba(31,36,48,.45);
    display: flex; flex-direction: column; overflow: hidden; position: relative;
  }
  .scroller { flex: 1; overflow-x: hidden; overflow-y: auto; position: relative; scrollbar-width: thin; }
  .sheet { display: grid; grid-template-columns: var(--rail) auto; grid-template-rows: var(--ruler-h) auto; position: relative; }

  .corner {
    grid-column: 1; grid-row: 1; position: sticky; left: 0; top: 0; z-index: 6;
    background: var(--paper); border-right: 2px solid var(--line-2); border-bottom: 1px solid var(--line-2);
    display: grid; place-items: center;
  }
  .corner b {
    background: #eef1f5; color: var(--ink-2); font-size: 11.5px; font-weight: 800;
    padding: 3px 9px; border-radius: 8px; letter-spacing: 1px; border: 1px solid var(--frame);
    font-variant-numeric: tabular-nums;
  }
  .ruler {
    grid-column: 2; grid-row: 1; position: sticky; top: 0; z-index: 4; overflow: hidden;
    background: var(--paper); border-bottom: 1px solid var(--line-2);
  }
  .ruler .tick { position: absolute; top: 0; height: 100%; display: flex; flex-direction: column; justify-content: center; }
  .ruler .tick i { font-style: normal; font-size: 11px; font-weight: 700; color: var(--ink-2); padding-left: 6px; white-space: nowrap; }
  .ruler .tick small { font-size: 9.5px; color: var(--ink-3); padding-left: 6px; font-weight: 600; }
  .ruler .tick.ctr { align-items: center; }
  .ruler .tick.ctr i, .ruler .tick.ctr small { padding-left: 0; }
  .ruler .tick.we { background: rgba(208,51,74,.05); }
  .ruler .tick.today i { color: var(--l1); }
  .ruler .tick.mo i { color: var(--ink); font-size: 12px; }

  .rail {
    grid-column: 1; grid-row: 2; position: sticky; left: 0; z-index: 3;
    background: var(--paper); border-right: 2px solid var(--line-2);
  }
  .rail .lv { height: var(--bh, 132px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-bottom: 1px dashed var(--line-2); }
  .rail .lv b {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    color: #fff; font-size: 15px; font-weight: 800; letter-spacing: .5px;
    box-shadow: 0 6px 14px -6px rgba(31,36,48,.4);
  }
  .rail .lv span { font-size: 10.5px; color: var(--ink-3); font-weight: 600; letter-spacing: 1px; }

  .area {
    grid-column: 2; grid-row: 2; position: relative; overflow: hidden;
    background-image: radial-gradient(rgba(31,36,48,.09) 1px, transparent 1.4px);
    background-size: 26px 26px;
  }
  body.s-month .area {
    background-image:
      radial-gradient(rgba(31,36,48,.09) 1px, transparent 1.4px),
      repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px calc(var(--ppd, 48px) * 7));
    background-size: 26px 26px, auto;
  }
  .band { position: absolute; left: 0; right: 0; height: var(--bh, 132px); border-bottom: 1px dashed var(--line-2); pointer-events: none; }
  .band.b1 { background: rgba(208,51,74,.045); }
  .band.b2 { background: rgba(217,119,6,.05); }
  .band.b3 { background: rgba(245,196,30,.09); }
  .band.b4 { background: rgba(25,113,194,.05); }
  .band.b5 { background: rgba(95,107,122,.05); }
  .wknd { position: absolute; top: 0; bottom: 0; background: rgba(208,51,74,.04); pointer-events: none; }
  .todayline { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--line-2); z-index: 2; pointer-events: none; }
  .edge-pill {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 7; cursor: pointer;
    background: rgba(255,255,255,.94); border: 1px solid var(--frame); border-radius: 999px;
    font-size: 11px; font-weight: 700; color: var(--ink-2); padding: 5px 12px; white-space: nowrap;
    box-shadow: 0 4px 12px -5px rgba(31,36,48,.35);
  }
  .edge-pill:hover { color: var(--ink); border-color: var(--ink-3); background: #fff; }
  .edge-pill.l { left: 10px; } .edge-pill.r { right: 10px; }

  /* ── 便签 ─────────────────────────────── */
  .note {
    position: absolute; width: var(--nw, 152px); min-height: calc(var(--nw, 152px) * 0.63); padding: calc(var(--nw, 152px) * 0.08) calc(var(--nw, 152px) * 0.08) calc(var(--nw, 152px) * 0.07);
    border-radius: 3px; cursor: grab; user-select: none; z-index: 4;
    box-shadow: 0 8px 16px -6px rgba(31,36,48,.35), 0 1px 2px rgba(31,36,48,.15);
    transition: box-shadow .16s, transform .16s;
    display: flex; flex-direction: column; gap: 6px;
    animation: pop .22s cubic-bezier(.3,1.4,.5,1) both;
  }
  @keyframes pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; } }
  .note::before {
    content: ""; position: absolute; top: -11px; left: 50%; width: 16px; height: 18px; margin-left: -8.5px;
    background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><g transform='rotate(-24 12 20)'><line x1='12' y1='10.6' x2='12' y2='19.4' stroke='%231f2430' stroke-opacity='.45' stroke-width='1.7' stroke-linecap='round'/><circle cx='12' cy='7.2' r='4.4' fill='%231f2430' fill-opacity='.45'/><circle cx='12' cy='7.2' r='1.5' fill='%23fff' fill-opacity='.55'/></g></svg>") center/contain no-repeat;
  }
  .note:hover { box-shadow: 0 14px 26px -8px rgba(31,36,48,.45); }
  .note.drag { z-index: 20; cursor: grabbing; box-shadow: 0 26px 46px -14px rgba(31,36,48,.55); transform: scale(1.05) rotate(0.6deg); }
  .note.lv1 { background: var(--l1-bg); }
  .note.lv2 { background: var(--l2-bg); }
  .note.lv3 { background: var(--l3-bg); }
  .note.lv4 { background: var(--l4-bg); }
  .note.lv5 { background: var(--l5-bg); }
  .note.drag { transform: scale(1.05) !important; }
  .n-title {
    font-size: max(11px, calc(var(--nw, 152px) * 0.09)); font-weight: 800; line-height: 1.4; color: var(--ink); flex: 1;
    outline: none; word-break: break-all; border-radius: 4px;
  }
  .n-desc {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; outline: none;
    font-size: max(9px, calc(var(--nw, 152px) * .058)); line-height: 1.55; color: rgba(31,36,48,.6); word-break: break-all;
  }
  .n-desc:not(:empty) { margin-top: 1px; padding-top: 6px; border-top: 1px dashed rgba(31,36,48,.24); }
  .n-desc:empty { margin: 0; border: none; }
  .note:hover .n-desc:empty::before, .note.editing .n-desc:empty::before { content: "＋ 写说明"; color: rgba(31,36,48,.4); }
  body.s-year .n-desc { display: none; }
  .n-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: max(9.5px, calc(var(--nw, 152px) * 0.07)); color: rgba(31,36,48,.62); font-weight: 600; }
  .n-owner { outline: none; padding: 1px 6px; margin-left: -6px; border-radius: 6px; background: rgba(255,255,255,.45); }
  .n-date {
    white-space: nowrap; font-weight: 800; padding: 1.5px 8px; border-radius: 7px; font-variant-numeric: tabular-nums; letter-spacing: .4px;
    background: rgba(255,255,255,.62); border: 1px solid rgba(31,36,48,.10); color: rgba(31,36,48,.68);
  }
  body.s-year .n-owner { display: none; }
  .n-rib {
    --bw: max(24px, calc(var(--nw, 152px) * .185)); --cl: calc(var(--bw) * 1.35);
    position: absolute; right: 0; bottom: 0; width: var(--cl); height: var(--cl);
    overflow: hidden; border-radius: 0 0 3px 0; pointer-events: none;
    filter: drop-shadow(1px 1.5px 2px rgba(31,36,48,.38)); opacity: .78;
  }
  .n-rib .b1 {
    position: absolute; left: calc(50% + var(--cl) * .3); top: calc(50% + var(--cl) * .3);
    width: calc(var(--cl) * 3.2); height: var(--bw);
    transform: translate(-50%, -50%) rotate(-45deg); background-color: var(--rc);
    background-image: linear-gradient(to bottom, rgba(255,255,255,.34), rgba(255,255,255,0) 30%, rgba(0,0,0,.1) 62%, rgba(0,0,0,.36));
  }
  .n-rib .b1 i { position: absolute; top: 18%; height: 64%; width: calc(var(--bw) * .9); background: var(--rc); filter: brightness(.55); }
  .n-rib .b1 i.f1 { left: calc(50% - var(--cl) * .28 - var(--bw) * .9); clip-path: polygon(100% 0, 0 50%, 100% 100%); }
  .n-rib .b1 i.f2 { left: calc(50% + var(--cl) * .28); clip-path: polygon(0 0, 100% 50%, 0 100%); }
  .n-rib .b1::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: calc(var(--bw) * .46); height: calc(var(--bw) * .46);
    border-radius: 50%; transform: translate(-50%, -50%); background: var(--rc); filter: brightness(.58);
    box-shadow: inset 0 1px 1.5px rgba(255,255,255,.3), 0 1px 2px rgba(0,0,0,.3);
  }
  .n-rib .rl {
    position: absolute; left: 80%; top: 80%; transform: translate(-50%, -50%) rotate(-45deg);
    font-size: max(9.5px, calc(var(--nw, 152px) * .072)); font-weight: 800; font-style: normal; line-height: 1;
    color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.45);
  }
  .n-kill {
    position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%;
    border: none; background: var(--l1); color: #fff; font-size: 12px; line-height: 1; cursor: pointer;
    opacity: 0; transition: opacity .15s, transform .15s; display: grid; place-items: center;
  }
  .note:hover .n-kill { opacity: .88; }
  .n-kill:hover { transform: scale(1.15); }
  .n-done {
    position: absolute; top: -8px; right: 16px; width: 22px; height: 22px; border-radius: 50%;
    border: none; background: var(--done); color: #fff; font-size: 12px; line-height: 1; cursor: pointer;
    opacity: 0; transition: opacity .15s, transform .15s; display: grid; place-items: center;
  }
  .note:hover .n-done { opacity: .92; }
  .n-done:hover { transform: scale(1.15); }
  .n-hold {
    position: absolute; top: -8px; right: 40px; width: 22px; height: 22px; border-radius: 50%;
    border: none; background: var(--ink); color: #fff; font-size: 10px; line-height: 1; cursor: pointer;
    opacity: 0; transition: opacity .15s, transform .15s; display: grid; place-items: center;
  }
  .note:hover .n-hold { opacity: .88; }
  .n-hold:hover { transform: scale(1.15); }
  .dchip {
    position: absolute; z-index: 5; display: flex; align-items: center; gap: 5px; height: 26px;
    max-width: calc(var(--nw, 152px) - 14px); padding: 0 9px; border-radius: 13px; box-sizing: border-box;
    background: var(--done-bg); border: 1px solid rgba(43,138,62,.35); color: var(--done);
    font-size: 11.5px; font-weight: 700; box-shadow: 0 4px 10px -6px rgba(31,36,48,.4);
    animation: pop .22s cubic-bezier(.3,1.4,.5,1) both;
  }
  .dchip b { font-size: 11px; flex: none; }
  .dchip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: line-through; text-decoration-color: rgba(43,138,62,.55); }
  .chip-back {
    flex: none; border: none; background: rgba(255,255,255,.75); color: var(--done); width: 17px; height: 17px; border-radius: 50%;
    font-size: 10px; cursor: pointer; display: grid; place-items: center; opacity: 0; transition: opacity .15s; padding: 0;
  }
  .dchip:hover .chip-back { opacity: 1; }
  .dchip.more { background: #eef1f5; border-color: var(--line, #dfe3ea); color: var(--ink-2, #64748b); font-weight: 800; }
  .dchip.hold { background: #343a46; border-color: rgba(31,36,48,.55); color: #dce2ec; box-shadow: 0 4px 10px -6px rgba(31,36,48,.7); }
  .dchip.hold span { text-decoration: none; }
  .dchip.hold .chip-back { background: rgba(255,255,255,.22); color: #fff; }
  .dchip.flash { animation: flash .9s ease 2; }
  .n-over {
    position: absolute; inset: 0; z-index: 7; pointer-events: none;
    display: grid; place-items: center; border-radius: 3px;
  }
  .n-over::before {
    content: ""; position: absolute; inset: 0; border-radius: 3px; z-index: -1;
    background: rgba(185,35,52,.22);
    box-shadow: inset 0 0 0 1.5px rgba(185,35,52,.26);
    mix-blend-mode: multiply;
  }
  .n-over b {
    transform: rotate(-8deg); white-space: nowrap;
    border: 2px solid rgba(170,20,40,.85); border-radius: 9px;
    outline: 1.5px solid rgba(170,20,40,.3); outline-offset: 2px;
    background: #faeef0; color: #a81428;
    box-shadow: 0 2px 6px -2px rgba(150,20,40,.35);
    font-size: max(10px, calc(var(--nw, 152px) * .085)); font-weight: 900; letter-spacing: 1.5px; line-height: 1.15;
    padding: 4px 10px;
  }
  .n-kill, .n-done, .n-hold { z-index: 8; }
  .note.editing { z-index: 21; box-shadow: 0 0 0 3px rgba(31,36,48,.25), 0 14px 26px -8px rgba(31,36,48,.4); }
  .note.editing .n-title, .note.editing .n-desc, .note.editing .n-owner { background: rgba(255,255,255,.75); cursor: text; }
  .note.editing .n-date { cursor: text; user-select: text; box-shadow: 0 0 0 1px var(--frame); }
  .note.flash { animation: flash .9s ease 2; }
  @keyframes flash { 0%,100% { box-shadow: 0 8px 16px -6px rgba(31,36,48,.35);} 50% { box-shadow: 0 0 0 8px rgba(208,51,74,.35);} }

  /* ── 笔迹层 ───────────────────────────── */
  .ink { position: absolute; inset: 0; z-index: 8; pointer-events: none; }
  .area.drawing .ink { pointer-events: auto; cursor: crosshair; }
  .area.drawing .note { pointer-events: none; }

  /* ── 笔托(工具盘) ─────────────────────── */
  .tray {
    flex: none; display: flex; align-items: center; gap: 14px;
    padding: 12px 22px 14px; background: linear-gradient(#f2f4f8, #e6eaf1);
    border-top: 1px solid var(--frame); box-shadow: inset 0 2px 4px rgba(31,36,48,.06);
  }
  .tray .sep { width: 1px; height: 30px; background: var(--frame); }
  .pens { display: flex; gap: 10px; align-items: flex-end; }
  .pen {
    width: 14px; height: 44px; border-radius: 5px 5px 7px 7px; cursor: pointer; border: none; position: relative;
    transition: transform .15s; box-shadow: 0 4px 8px -3px rgba(31,36,48,.4), inset 0 1px 0 rgba(255,255,255,.4);
  }
  .pen::after { content: ""; position: absolute; top: -7px; left: 50%; transform: translateX(-50%); width: 7px; height: 10px; border-radius: 3px 3px 0 0; background: inherit; filter: brightness(.8); }
  .pen:hover { transform: translateY(-5px); }
  .pen.on { transform: translateY(-12px); }
  .pen.on::before {
    content: ""; position: absolute; left: 50%; bottom: -7px; width: 18px; height: 4px; border-radius: 4px;
    transform: translateX(-50%); background: rgba(31,36,48,.45);
  }
  .pads { display: flex; gap: 8px; }
  .pad {
    width: 34px; height: 40px; border-radius: 4px; cursor: grab; position: relative; border: 1px solid rgba(31,36,48,.12);
    box-shadow: 0 3px 6px -2px rgba(31,36,48,.3);
    transition: transform .15s;
  }
  .pad:hover { transform: translateY(-4px) rotate(-2deg); }
  .pad:active { cursor: grabbing; }
  .pad b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 900; color: rgba(31,36,48,.55); }
  .pad::after { content: ""; position: absolute; bottom: 0; right: 0; border: 7px solid transparent; border-bottom-color: rgba(255,255,255,.85); border-right-color: rgba(31,36,48,.06); }
  .ghost:not(.btn) {
    position: fixed; z-index: 99; width: var(--nw, 152px); height: calc(var(--nw, 152px) * .63); border-radius: 3px; pointer-events: none;
    opacity: .85; transform: translate(-50%, -50%) rotate(-3deg);
    box-shadow: 0 20px 36px -10px rgba(31,36,48,.5); display: grid; place-items: center;
    font-size: 13px; font-weight: 800; color: rgba(31,36,48,.5);
  }
  .tray .tip { margin-left: auto; font-size: 11.5px; color: var(--ink-3); font-weight: 600; letter-spacing: .5px; }

  /* ── 统计抽屉(渐进披露) ───────────────── */
  .drawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: 320px; z-index: 40;
    background: #fff; border-left: 1px solid var(--frame); box-shadow: -24px 0 48px -24px rgba(31,36,48,.3);
    transform: translateX(105%); transition: transform .28s cubic-bezier(.3,.9,.3,1);
    padding: 22px 24px; overflow: auto;
  }
  .drawer.open { transform: none; }
  .drawer h3 { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
  .drawer .close { margin-left: auto; cursor: pointer; border: none; background: none; font-size: 18px; color: var(--ink-3); }
  .drawer .close:hover { color: var(--ink); }
  .d-big { font-size: 40px; font-weight: 900; margin: 14px 0 2px; font-variant-numeric: tabular-nums; }
  .d-big small { font-size: 13px; color: var(--ink-3); font-weight: 700; margin-left: 4px; }
  .d-label { font-size: 11px; color: var(--ink-3); letter-spacing: 2px; font-weight: 700; }
  .d-bars { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
  .d-row { display: grid; grid-template-columns: 34px 1fr 30px; gap: 10px; align-items: center; font-size: 12px; font-weight: 800; }
  .d-row .bar { height: 10px; border-radius: 6px; background: #eef1f5; overflow: hidden; }
  .d-row .bar i { display: block; height: 100%; border-radius: 6px; transition: width .5s cubic-bezier(.2,.8,.2,1); }
  .d-row .num { color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; }
  .d-sec { margin-top: 22px; font-size: 12px; font-weight: 800; color: var(--ink-2); letter-spacing: 1px; display: flex; gap: 6px; align-items: center; }
  .d-sec em { font-style: normal; font-size: 10px; color: #fff; padding: 1px 6px; border-radius: 6px; }
  .d-list { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
  .d-item {
    display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 8px 10px;
    background: #f7f8fa; border-radius: 10px; cursor: pointer; transition: background .15s;
  }
  .d-item:hover { background: #eef1f5; }
  .d-item i { width: 8px; height: 8px; border-radius: 3px; flex: none; }
  .d-item span { flex: 1; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .d-item small { color: var(--ink-3); font-weight: 600; font-variant-numeric: tabular-nums; }
  .d-none { font-size: 12px; color: var(--ink-3); padding: 6px 0; }

  /* ── Toast ────────────────────────────── */
  #toast {
    position: fixed; bottom: 84px; left: 50%; transform: translate(-50%, 16px); z-index: 99;
    display: flex; align-items: center; gap: 14px;
    padding: 10px 16px 10px 18px; border-radius: 12px; font-size: 13.5px; font-weight: 700;
    background: var(--ink); color: #fff; box-shadow: 0 16px 36px -8px rgba(31,36,48,.6);
    opacity: 0; pointer-events: none; transition: opacity .22s, transform .22s;
  }
  #toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
  #toast button {
    border: none; cursor: pointer; background: rgba(255,255,255,.16); color: #fff;
    padding: 5px 12px; border-radius: 8px; font-weight: 800; font-size: 12.5px;
  }
  #toast button:hover { background: rgba(255,255,255,.3); }

  .hint {
    position: fixed; bottom: 78px; left: 50%; transform: translateX(-50%); z-index: 98;
    background: rgba(31,36,48,.88); color: #fff; font-size: 12.5px; font-weight: 600; letter-spacing: .5px;
    padding: 10px 20px; border-radius: 40px; opacity: 0; pointer-events: none; transition: opacity .6s;
  }
  .hint.show { opacity: 1; }

  /* ═══════════ 设计 token 补充 ═══════════ */
  :root {
    --surface:#fff; --surface-2:#f6f7fb; --hairline:rgba(31,36,48,.10);
    --shadow-1:0 2px 6px -2px rgba(31,36,48,.10);
    --shadow-2:0 12px 30px -14px rgba(31,36,48,.30);
    --shadow-3:0 30px 64px -28px rgba(31,36,48,.46);
    --ease:cubic-bezier(.2,.8,.2,1); --ease-out:cubic-bezier(.16,1,.3,1);
  }

  /* ═══════════ 视图容器 ═══════════ */
  .view { display:none; }
  .view.active { display:flex; flex-direction:column; flex:1; min-height:0; overflow:hidden; }

  /* ═══════════ 登录口 ═══════════ */
  .gate { position:relative; align-items:center; justify-content:center;
    background: radial-gradient(120% 120% at 50% 0%, #fbfbf6 0%, var(--room) 58%, #dde2ea 100%); }
  .gate::before { content:""; position:absolute; inset:0; pointer-events:none; opacity:.6;
    background-image: radial-gradient(rgba(31,36,48,.07) 1px, transparent 1.4px); background-size:26px 26px; }
  .gate-card { position:relative; width:384px; max-width:calc(100vw - 48px); text-align:center;
    background:rgba(255,255,255,.82); backdrop-filter:blur(14px) saturate(1.2);
    border:1px solid var(--hairline); border-radius:24px; box-shadow:var(--shadow-3);
    padding:38px 36px 34px; animation:gateIn .6s var(--ease-out) both; }
  @keyframes gateIn { from { opacity:0; transform:translateY(18px) scale(.97); } to { opacity:1; } }
  .gate-mark { width:56px; height:56px; margin:0 auto 18px; border-radius:16px; display:grid; place-items:center;
    background:#fff; border:1px solid var(--hairline); box-shadow:var(--shadow-1); }
  .gate-mark svg { width:34px; height:34px; }
  .gate-card h1 { font-size:22px; font-weight:800; letter-spacing:.3px; }
  .gate-card .sub { margin-top:8px; font-size:13px; color:var(--ink-2); line-height:1.6; }
  .pin-row { display:flex; gap:10px; justify-content:center; margin:26px 0 6px; }
  .pin-cell { width:52px; height:60px; border-radius:14px; border:1.5px solid var(--frame); background:#fff;
    font-size:24px; font-weight:800; text-align:center; color:var(--ink); font-family:inherit; font-variant-numeric:tabular-nums;
    transition:border-color .16s, box-shadow .16s, transform .16s; }
  .pin-cell:focus { outline:none; border-color:var(--ink-3); box-shadow:0 0 0 4px rgba(31,36,48,.08); }
  .pin-cell.filled { border-color:var(--ink); transform:translateY(-1px); }
  .row-lbl { margin-top:14px; font-size:12px; font-weight:700; letter-spacing:.6px; color:var(--ink-2); }
  .gate-btn { margin-top:22px; width:100%; height:48px; border:none; border-radius:14px; cursor:pointer;
    background:var(--ink); color:#fff; font-size:15px; font-weight:800; letter-spacing:.5px; font-family:inherit;
    box-shadow:var(--shadow-2); transition:transform .14s var(--ease), background .16s; }
  .gate-btn:hover { transform:translateY(-1px); }
  .gate-btn:active { transform:translateY(1px) scale(.99); }
  .gate-btn:disabled { opacity:.55; cursor:not-allowed; transform:none; }
  .gate-err { min-height:18px; margin-top:12px; font-size:12.5px; font-weight:700; color:var(--l1); opacity:0; transition:opacity .2s; }
  .gate-err.show { opacity:1; }

  /* ═══════════ 首页(工作台) ═══════════ */
  .home { background:
    radial-gradient(120% 90% at 100% 0%, #fbfbf6, transparent 55%),
    radial-gradient(120% 120% at 0% 100%, #eef1f6, transparent 60%), var(--room); }
  .home-bar { display:flex; align-items:center; gap:14px; padding:16px 32px; flex:none;
    border-bottom:1px solid var(--hairline); background:rgba(255,255,255,.62); backdrop-filter:blur(10px); }
  .home-bar .logo { display:flex; align-items:center; gap:10px; font-weight:800; font-size:18px; letter-spacing:.3px; }
  .home-bar .logo svg { width:30px; height:30px; }
  .home-bar .spacer { margin-left:auto; }
  .btn { border:1px solid var(--frame); background:#fff; color:var(--ink); font-family:inherit; font-weight:700;
    font-size:13px; padding:0 16px; height:40px; border-radius:12px; cursor:pointer; display:inline-flex; align-items:center; gap:8px;
    box-shadow:var(--shadow-1); transition:transform .14s var(--ease), border-color .16s, color .16s, background .16s; }
  .btn svg { width:16px; height:16px; }
  .btn:hover { transform:translateY(-1px); border-color:var(--ink-3); }
  .btn:active { transform:translateY(0) scale(.98); }
  .btn.primary { background:var(--ink); color:#fff; border-color:var(--ink); }
  .btn.primary:hover { background:#2a3142; }
  .btn.danger { background:var(--l1); color:#fff; border-color:var(--l1); }
  .btn.ghost { background:transparent; border-color:var(--hairline); box-shadow:none; color:var(--ink-2); }
  .btn.ghost:hover { color:var(--ink); border-color:var(--frame); }
  .home-scroll { flex:1; min-height:0; overflow:auto; padding:30px 32px 48px; }
  .home-hd { max-width:1180px; margin:0 auto 22px; }
  .home-hd h2 { font-size:26px; font-weight:800; letter-spacing:.2px; }
  .home-hd p { margin-top:6px; color:var(--ink-2); font-size:13.5px; }
  .grid { max-width:1180px; margin:0 auto; display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:20px; }
  .card { position:relative; background:var(--surface); border:1px solid var(--hairline); border-radius:18px; overflow:hidden;
    box-shadow:var(--shadow-1); transition:transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
    animation:cardIn .5s var(--ease-out) both; }
  @keyframes cardIn { from { opacity:0; transform:translateY(14px); } to { opacity:1; } }
  .card:hover { transform:translateY(-4px); box-shadow:var(--shadow-2); border-color:var(--frame); }
  .card .prev { display:block; width:100%; height:150px; background:var(--paper); border-bottom:1px solid var(--hairline); }
  .card .prev svg { display:block; width:100%; height:100%; }
  .card .meta { padding:15px 16px 14px; }
  .card .ttl { display:flex; align-items:center; gap:9px; font-size:16px; font-weight:800; color:var(--ink); }
  .card .ttl .ic { width:26px; height:26px; border-radius:8px; display:grid; place-items:center; font-size:16px;
    background:var(--surface-2); border:1px solid var(--hairline); flex:none; }
  .card .ttl .nm { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .card .ttl .upd { margin-left:auto; flex:none; font-size:11px; font-weight:600; color:var(--ink-3); letter-spacing:.2px; font-variant-numeric:tabular-nums; }
  .card .stats { display:flex; gap:6px; margin-top:11px; flex-wrap:wrap; }
  .pill { font-size:11px; font-weight:800; padding:3px 9px; border-radius:8px; letter-spacing:.3px; background:var(--surface-2); color:var(--ink-2); }
  .pill.pend { background:#eef2f7; color:var(--ink); }
  .pill.done { background:var(--done-bg); color:var(--done); }
  .pill.late { background:#ffd9d9; color:var(--l1); }
  .card .acts { position:absolute; top:0; left:0; right:0; height:150px; display:flex; align-items:flex-start; justify-content:flex-end; gap:6px; padding:10px;
    background:linear-gradient(180deg, rgba(31,36,48,.26), transparent); opacity:0; transition:opacity .2s; z-index:3; }
  .card:hover .acts { opacity:1; }
  .card .acts button { width:30px; height:30px; border-radius:9px; border:none; cursor:pointer; background:rgba(255,255,255,.92);
    color:var(--ink-2); display:grid; place-items:center; box-shadow:var(--shadow-1); transition:transform .14s, color .14s, background .14s; }
  .card .acts button svg { width:15px; height:15px; }
  .card .acts button:hover { transform:translateY(-1px); color:var(--ink); background:#fff; }
  .card .acts button.del:hover { color:#fff; background:var(--l1); }
  .card .open-link { position:absolute; inset:0; z-index:1; }
  .new-card { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; min-height:246px;
    border:1.5px dashed var(--frame); border-radius:18px; background:rgba(255,255,255,.42); color:var(--ink-2); cursor:pointer;
    font-weight:800; transition:border-color .2s, background .2s, transform .2s var(--ease), color .2s; }
  .new-card:hover { border-color:var(--ink-3); background:#fff; transform:translateY(-4px); color:var(--ink); }
  .new-card .plus { width:46px; height:46px; border-radius:14px; display:grid; place-items:center; font-size:24px;
    background:var(--surface-2); border:1px solid var(--hairline); transition:transform .3s var(--ease-out), background .2s; }
  .new-card:hover .plus { transform:rotate(90deg) scale(1.05); background:var(--l3-bg); }
  .empty { max-width:1180px; margin:8vh auto 0; text-align:center; }
  .empty .art { width:140px; height:120px; margin:0 auto 8px; }
  .empty h3 { font-size:18px; font-weight:800; }
  .empty p { margin:8px 0 22px; color:var(--ink-2); font-size:13.5px; }

  /* ═══════════ 模态 ═══════════ */
  .modal-scrim { position:fixed; inset:0; z-index:80; display:flex; align-items:center; justify-content:center;
    background:rgba(31,36,48,.32); backdrop-filter:blur(3px); opacity:0; transition:opacity .2s; }
  .modal-scrim.open { opacity:1; }
  .modal { width:min(92vw,460px); background:#fff; border:1px solid var(--hairline); border-radius:22px; box-shadow:var(--shadow-3);
    padding:26px 26px 22px; transform:translateY(12px) scale(.97); transition:transform .24s var(--ease-out); }
  .modal-scrim.open .modal { transform:none; }
  .modal h3 { font-size:18px; font-weight:800; display:flex; align-items:center; gap:8px; }
  .modal .m-body { margin:12px 0 4px; color:var(--ink-2); font-size:14px; line-height:1.6; }
  .m-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:22px; }

  /* 分享模态 */
  .share-link { display:flex; align-items:center; gap:8px; margin-top:8px; }
  .share-input { flex:1; height:40px; line-height:40px; border:1px solid var(--frame); border-radius:11px; background:var(--surface-2);
    padding:0 12px; font-size:12.5px; color:var(--ink-2); font-family:ui-monospace,Menlo,Consolas,monospace; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .opt-group { margin-top:18px; }
  .opt-group .lbl { font-size:11px; font-weight:800; letter-spacing:1px; color:var(--ink-3); margin-bottom:8px; }
  .seg2 { display:flex; padding:3px; gap:2px; border-radius:12px; background:var(--surface-2); border:1px solid var(--hairline); }
  .seg2 button { flex:1; border:none; background:none; cursor:pointer; font-family:inherit; font-size:12.5px; font-weight:800; color:var(--ink-2); padding:8px; border-radius:9px; transition:all .15s; }
  .seg2 button.on { background:#fff; color:var(--ink); box-shadow:var(--shadow-1); }
  .share-list { margin-top:18px; display:flex; flex-direction:column; gap:8px; }
  .share-item { display:flex; align-items:center; gap:10px; padding:11px 12px; border:1px solid var(--hairline); border-radius:13px; background:var(--surface-2); font-size:12.5px; }
  .share-item .tag { font-weight:800; color:var(--ink); }
  .share-item .desc { color:var(--ink-2); }
  .share-item .kill { margin-left:auto; }
  .share-tip { margin-top:14px; font-size:12px; color:var(--ink-3); line-height:1.6; }

  /* ═══════════ 只读外观 ═══════════ */
  #roBadge { display:none; align-items:center; gap:7px; height:32px; padding:0 13px; border-radius:999px;
    background:#eef3ec; border:1px solid rgba(43,138,62,.22); color:var(--done); font-size:12px; font-weight:800; letter-spacing:.3px; }
  #roBadge svg { width:14px; height:14px; }
  body.ro #roBadge { display:inline-flex; }
  body.ro .tray { display:none; }
  body.ro .note, body.ro .dchip { cursor:default; }
  body.ro .brand h1, body.ro .board-ic { cursor:default; }
  body.ro .board-ic:hover { border-color:var(--frame); color:var(--ink-3); background:none; }
  body.ro #btnShare, body.ro #btnBoards { display:none; }
  #roScaleLabel { display:none; font-size:12px; font-weight:700; color:var(--ink-2); padding:0 12px; height:38px; line-height:38px;
    border:1px solid var(--frame); border-radius:12px; background:#fff; }
  body.ro-locked .seg { display:none; }
  body.ro-locked #roScaleLabel { display:block; }
