/* 时间簿 · 纸本手账：暖白纸面、墨色文字、清晰格线、柔和分类色 */
:root {
  --paper: #F3EFE6; --paper-2: #ECE7DB; --sheet: #FBF9F4; --white: #FFFEFB;
  --ink: #2A2925; --ink-2: #57534A; --ink-3: #8C877B;
  --rule: #E0D9CB; --rule-2: #EAE5D9; --rule-3: #F1EDE4;
  --accent: #2F4A3E; --accent-2: #263D33; --accent-ink: #F5F1E6; --accent-soft: #E4EAE1;
  --warn: #A9553C; --warn-ink: #6D3424; --warn-soft: #F5E5DC; --note: #F1EBDD;
  --serif: "Iowan Old Style", "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --num: "Iowan Old Style", "Palatino", Georgia, serif;
  --shadow: 0 1px 2px rgba(48, 40, 22, .05);
  color-scheme: light;
  font: 14px/1.6 var(--sans); color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
/* 分类色：底色 / 色条 / 文字 */
.c0 { --cb: #E3EADD; --cs: #7D9878; --ct: #2F3F2B; }  /* 研究 鼠尾草 */
.c1 { --cb: #F2E6CC; --cs: #C39A4B; --ct: #4F3C17; }  /* 学习 赭黄 */
.c2 { --cb: #DFE6ED; --cs: #6E879B; --ct: #263646; }  /* 工作 灰蓝 */
.c3 { --cb: #F0E0DC; --cs: #B57E73; --ct: #55302B; }  /* 阅读 豆沙 */
.c4 { --cb: #DCE9E5; --cs: #5D8E84; --ct: #213F39; }  /* 生活 青瓷 */
.c5 { --cb: #E8E5DE; --cs: #9B968B; --ct: #403D37; }  /* 临时 石灰 */
.c6 { --cb: #E6E2EE; --cs: #8B80A8; --ct: #362F4B; }
.c7 { --cb: #F0E2D5; --cs: #BF8358; --ct: #52321C; }

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .2 0 0 0 .045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 12px; }
.muted { color: var(--ink-3); font-size: 12.5px; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; }
.warn { color: var(--warn); }
.soft { color: var(--ink-3); }
.spacer { flex: 1; }

/* 图标与形状 */
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.glyph { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.35; flex: none; }
.glyph .f { fill: currentColor; stroke: none; }
.glyph .t { stroke: var(--sheet); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.g-todo { color: var(--ink-3); } .g-doing { color: var(--accent); } .g-done { color: var(--accent); } .g-blocked { color: var(--warn); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--cs, var(--ink-3)); flex: none; }
.pulse { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #D99A6C; box-shadow: 0 0 0 0 rgba(217, 154, 108, .6); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(217, 154, 108, .55); } 70% { box-shadow: 0 0 0 7px rgba(217, 154, 108, 0); } 100% { box-shadow: 0 0 0 0 rgba(217, 154, 108, 0); } }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 8px; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--white); border-color: #CCC4B3; }
.btn:disabled, .chip:disabled { opacity: .4; cursor: not-allowed; }
.btn .i { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-2); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.quiet:hover { background: rgba(60, 50, 30, .05); color: var(--ink); }
.btn.quiet.is-on { color: var(--accent); }
.btn.small { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn.danger { color: var(--warn); }
.btn.link { all: unset; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; cursor: pointer; font-size: inherit; }
.btn.light { background: var(--accent-ink); color: var(--accent); border-color: transparent; }
.btn.light:hover { background: #fff; }
.btn.on-dark { background: transparent; color: var(--accent-ink); border-color: rgba(245, 241, 230, .26); }
.btn.on-dark:hover { background: rgba(245, 241, 230, .08); border-color: rgba(245, 241, 230, .45); }
.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--ink-2); cursor: pointer; flex: none; transition: background .15s, color .15s, border-color .15s; }
.icon-btn:hover { background: rgba(60, 50, 30, .06); color: var(--ink); }
.icon-btn.go { border-color: var(--rule); }
.icon-btn.go:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.icon-btn .i { width: 17px; height: 17px; }
.chip { height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--rule); background: transparent; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.chip:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.chips, .nudges { display: flex; gap: 6px; flex-wrap: wrap; }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--paper-2); border: 1px solid var(--rule-2); border-radius: 9px; }
.seg > button, .seg label > span { height: 28px; padding: 0 12px; border: 0; background: none; border-radius: 6px; font-size: 12.5px; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 5px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.seg > button:hover, .seg label > span:hover { color: var(--ink); }
.seg > button[aria-pressed="true"], .seg label:has(input:checked) > span { background: var(--white); color: var(--ink); font-weight: 500; box-shadow: 0 0 0 1px var(--rule), 0 1px 2px rgba(48, 40, 22, .06); }
.seg label { position: relative; display: flex; }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:focus-visible) > span { outline: 2px solid var(--accent); }
.seg .i { width: 14px; height: 14px; }
.seg.wide { display: flex; width: 100%; }
.seg.wide label { flex: 1; }
.seg.wide label > span { width: 100%; height: 32px; }

/* 外框 */
.shell { display: grid; grid-template-columns: 212px minmax(0, 1fr); min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 26px 14px 18px; border-right: 1px solid var(--rule); background: rgba(236, 231, 219, .7); }
.wordmark { display: flex; align-items: center; gap: 10px; padding: 0 10px; margin-bottom: 30px; font: 600 19px/1 var(--serif); letter-spacing: .2em; color: var(--ink); }
.wordmark svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; }
.wordmark .ribbon { fill: #C9774F; stroke: none; }
.rail nav { display: grid; gap: 2px; }
.rail nav button, .rail-foot button { display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font-size: 14px; cursor: pointer; text-align: left; transition: background .15s, color .15s; }
.rail nav button:hover, .rail-foot button:hover { background: rgba(60, 50, 30, .05); color: var(--ink); }
.rail [aria-current="page"] { background: var(--sheet); color: var(--ink); font-weight: 500; box-shadow: 0 0 0 1px var(--rule), var(--shadow); }
.rail [aria-current="page"] .i { color: var(--accent); }
.rail-timer { margin-top: 20px; display: grid; gap: 2px; padding: 12px 14px; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-ink); text-align: left; cursor: pointer; }
.rail-timer > span:first-child { display: flex; align-items: center; gap: 7px; font-size: 11.5px; opacity: .8; }
.rail-timer strong { font-weight: 500; font-size: 13.5px; }
.rail-timer .num { font-size: 20px; }
.rail-foot { margin-top: auto; display: grid; gap: 8px; }
.save-state { font-size: 11.5px; color: var(--ink-3); padding: 0 12px; line-height: 1.55; }
.save-state.warn { color: var(--warn); }
main { padding: 34px 44px 72px; max-width: 1380px; width: 100%; margin: 0 auto; min-width: 0; }
.tabbar, .float-timer, .pane-switch { display: none; }

/* 页面标题 */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 24px; flex-wrap: wrap; margin-bottom: 20px; }
.kicker { font-size: 12.5px; color: var(--ink-3); letter-spacing: .04em; margin-bottom: 4px; }
.kicker b { color: var(--accent); font-weight: 600; }
h1 { font: 500 34px/1.15 var(--serif); letter-spacing: .01em; }
.head-tools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.sep { width: 1px; height: 20px; background: var(--rule); margin: 0 6px; }
.sec-head { display: flex; align-items: baseline; gap: 10px; margin: 30px 0 6px; }
.sec-head h2 { font: 500 17px/1.3 var(--serif); }
.sec-head h3 { font-size: 13px; font-weight: 600; }
.sec-head.sub { margin-top: 20px; }
.sec-head .dot { align-self: center; }
.count { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.blank { color: var(--ink-3); font-size: 13px; padding: 14px 0; }
.blank.big { padding: 56px 0; text-align: center; }
.blank.big h2 { font: 500 22px var(--serif); color: var(--ink); margin-bottom: 8px; }
.mini-h { font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: .04em; margin: 14px 0 4px; }

.banner { display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 14px; margin-bottom: 14px; border-radius: 10px; background: var(--note); border: 1px solid #E5DAC3; font-size: 13px; color: var(--ink-2); }
.banner > span { flex: 1; }
.banner > .i { width: 16px; height: 16px; color: #A88748; }
.banner.warn { background: var(--warn-soft); border-color: #EAD0C3; color: var(--warn-ink); }
.banner.warn > .i { color: var(--warn); }
.banner.demo { background: transparent; border: 1px dashed #D4C8AE; }

.goal { display: flex; align-items: center; gap: 16px; padding: 11px 0 12px; margin-bottom: 22px; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--rule); }
.goal label { font-size: 12px; color: var(--ink-3); letter-spacing: .08em; white-space: nowrap; }
.goal input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 2px 0; font: 17px/1.4 var(--serif); color: var(--ink); }
.goal input::placeholder { color: #B3AC9C; }
.goal input:focus { outline: none; }
.goal:focus-within { border-bottom-color: var(--accent); }
.goal-sum { font: 12px var(--num); color: var(--ink-3); white-space: nowrap; }

/* 今日 */
.today { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 420px); gap: 40px; align-items: start; }
.today-cal { position: sticky; top: 20px; }
.today-cal > .sec-head { margin-top: 0; margin-bottom: 10px; align-items: center; }
.legend { display: flex; gap: 18px; font-size: 12px; color: var(--ink-3); margin: -2px 0 8px; }
.cal-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }

.focus { position: relative; display: grid; gap: 12px; padding: 22px 24px 20px; border: 1px solid var(--rule); border-radius: 14px; background: var(--sheet); box-shadow: var(--shadow); }
.focus-top { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--ink-3); }
.focus-label { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-weight: 600; letter-spacing: .08em; font-size: 12px; }
.focus-title { font: 500 26px/1.3 var(--serif); letter-spacing: .01em; }
.focus-title button { all: unset; cursor: pointer; }
.focus-title button:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: var(--rule); }
.focus-title button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.focus-notes { display: grid; grid-template-columns: auto 1fr; gap: 3px 16px; font-size: 13.5px; }
.focus-notes dt { color: var(--ink-3); }
.focus-notes dd { color: var(--ink-2); }
.focus-note { font-size: 13.5px; color: var(--ink-2); }
.focus-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.focus-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.focus.running { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 18px 40px -24px rgba(31, 52, 43, .7); }
.focus.running .focus-top, .focus.running .focus-label { color: rgba(245, 241, 230, .72); }
.focus.running .focus-note { color: rgba(245, 241, 230, .82); }
.focus-clock { font: 400 56px/1 var(--num); font-variant-numeric: tabular-nums; letter-spacing: .01em; margin: 2px 0 2px; }
.focus.empty { border-style: dashed; background: transparent; box-shadow: none; }
.quick { display: flex; gap: 8px; }
.quick input { flex: 1; min-width: 0; }
.quick.big { margin-bottom: 14px; }
.quick.big input { height: 44px; font-size: 15px; }
.quick.big select { width: auto; height: 44px; }
.quick.big .btn { height: 44px; padding: 0 20px; }

.row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 56px; padding: 8px 4px; border-bottom: 1px solid var(--rule-2); }
.row.slim { grid-template-columns: auto minmax(0, 1fr) auto; min-height: 46px; }
.row-time { display: flex; flex-direction: column; align-items: flex-end; gap: 0; min-width: 46px; padding: 3px 4px; border: 0; border-radius: 6px; background: none; font: 12.5px/1.3 var(--num); color: var(--ink); font-variant-numeric: tabular-nums; cursor: pointer; }
.row-time span + span { color: var(--ink-3); }
.row-time .i { width: 12px; height: 12px; color: var(--ink-3); margin-top: 1px; }
.row-time:hover { background: rgba(60, 50, 30, .05); }
.row-time.free { align-items: flex-end; font: 11.5px var(--sans); color: var(--ink-3); cursor: default; }
.glyph-btn { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.glyph-btn:hover { background: var(--accent-soft); }
.glyph-btn:hover .g-todo { color: var(--accent); }
.row-main { min-width: 0; }
.row-title { all: unset; display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 500; cursor: pointer; }
.row-title:hover { color: var(--accent); }
.row-title:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.row-title.plain { cursor: default; }
.row-title.plain:hover { color: inherit; }
.row-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 1px; font-size: 12px; color: var(--ink-3); }
.row-next { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-act { display: flex; gap: 4px; align-items: center; }
.row.is-done .row-title { color: var(--ink-3); text-decoration: line-through; text-decoration-color: #BDB5A5; }
.row.is-running { background: linear-gradient(90deg, var(--accent-soft), transparent 70%); border-radius: 8px; }
.live-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--accent); font-weight: 500; padding: 0 6px; }
.block-sec > .sec-head { margin-bottom: 4px; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
summary.sec-head .i { width: 16px; height: 16px; color: var(--ink-3); align-self: center; transition: transform .2s; }
details[open] > summary.sec-head .i { transform: rotate(180deg); }
summary.sec-head:hover h2 { color: var(--accent); }
.done-fold { margin-top: 6px; }
.done-fold > summary { font-size: 12.5px; color: var(--ink-3); padding: 8px 4px; }
.inbox .quick { margin: 8px 0 6px; }
.outcome { all: unset; display: grid; gap: 2px; padding: 10px 12px; margin: 6px 0; border-left: 2px solid var(--accent); background: var(--sheet); border-radius: 0 8px 8px 0; cursor: pointer; font-size: 13.5px; }
.outcome strong { font-weight: 500; font-size: 12px; color: var(--ink-3); }
.outcome:hover { background: var(--white); }

/* 日历 */
.cal { --hw: 52px; position: relative; border: 1px solid var(--rule); border-radius: 12px; background: var(--sheet); overflow: hidden; box-shadow: var(--shadow); }
.cal-scroll { max-height: min(70vh, 760px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #D6CEBD transparent; }
.cal.single .cal-scroll { max-height: min(74vh, 820px); }
.cal-head { position: sticky; top: 0; z-index: 8; display: grid; grid-template-columns: var(--hw) repeat(var(--days), minmax(0, 1fr)); background: var(--sheet); border-bottom: 1px solid var(--rule); }
.corner { border-right: 1px solid transparent; }
.cal-day { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 10px 2px 9px; border: 0; border-left: 1px solid var(--rule-2); background: transparent; cursor: pointer; min-width: 0; }
.cal-day:hover { background: var(--white); }
.cal-day .wd { font-size: 12px; color: var(--ink-3); }
.cal-day .dn { font: 500 23px/1.15 var(--num); font-variant-numeric: lining-nums; }
.cal-day .sum { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cal-day.is-today .wd, .cal-day.is-today .dn { color: var(--accent); }
.cal-day.is-today .wd { font-weight: 600; }
.cal-day.is-today::after { content: ""; position: absolute; left: 50%; bottom: -1px; width: 22px; height: 2px; margin-left: -11px; background: var(--accent); border-radius: 2px; }
.cal-day.is-sel { background: rgba(228, 234, 225, .55); }
.clash-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
.cal-body { position: relative; display: grid; grid-template-columns: var(--hw) repeat(var(--days), minmax(0, 1fr)); height: calc(1440px * var(--ppm)); }
.hours { position: relative; }
.hours span { position: absolute; right: 9px; top: calc(var(--s) * var(--ppm) * 1px); transform: translateY(-50%); font: 11px var(--num); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.col { position: relative; border-left: 1px solid var(--rule-2);
  background-image: linear-gradient(to bottom, var(--rule-2) 1px, transparent 1px), linear-gradient(to bottom, var(--rule-3) 1px, transparent 1px);
  background-size: 100% calc(60px * var(--ppm)), 100% calc(30px * var(--ppm)); background-position: 0 0, 0 calc(30px * var(--ppm)); }
.col.is-today { background-color: rgba(243, 239, 230, .65); }
.col.is-sel { background-color: rgba(228, 234, 225, .32); }
.track { position: absolute; inset: 0; }
.track.plan { cursor: copy; }
.col.is-split .track.plan { right: 50%; }
.col.is-split .track.actual { left: 50%; border-left: 1px dashed var(--rule); }
.cal.actual .track.actual, .col:not(.is-split) .track.actual { left: 0; }

.ev { position: absolute; z-index: 1; container-type: inline-size;
  top: calc(var(--s) * var(--ppm) * 1px + 1px); height: calc(var(--d) * var(--ppm) * 1px - 2px); min-height: 13px;
  left: calc(var(--lane) / var(--lanes) * 100% + 3px); width: calc(100% / var(--lanes) - 5px);
  display: flex; flex-direction: column; align-items: stretch; gap: 1px; padding: 4px 6px 3px 7px; overflow: hidden;
  border: 0; border-left: 3px solid var(--cs); border-radius: 5px; background: var(--cb); color: var(--ct);
  font-size: 12px; line-height: 1.3; text-align: left; cursor: grab; box-shadow: 0 0 0 1px var(--sheet);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: box-shadow .15s, opacity .15s, filter .15s; }
.ev:hover { z-index: 3; filter: saturate(1.1) brightness(.985); }
.ev:focus-visible { z-index: 4; outline: 2px solid var(--accent); outline-offset: 1px; }
.ev-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 500; word-break: break-all; }
.ev-name .i { width: 11px; height: 11px; margin-right: 3px; vertical-align: -1px; stroke-width: 2; }
.ev-time { font: 11px var(--num); opacity: .72; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev.sm { flex-direction: row; align-items: center; gap: 6px; padding-top: 1px; padding-bottom: 1px; }
.ev.sm .ev-name, .ev.xs .ev-name { display: block; white-space: nowrap; text-overflow: ellipsis; flex: 1; min-width: 0; }
.ev.xs { flex-direction: row; align-items: center; padding: 0 5px; font-size: 11px; line-height: 1.1; }
.ev.xs .ev-time { display: none; }
@container (max-width: 74px) { .ev-time { display: none; } .ev-name { display: block; white-space: nowrap; text-overflow: ellipsis; word-break: normal; } }
@container (max-width: 120px) { .ev.sm .ev-time { display: none; } }
.ev.is-locked { cursor: pointer; background-image: repeating-linear-gradient(135deg, transparent 0 5px, rgba(70, 55, 25, .07) 5px 6px); }
.ev.is-clash { box-shadow: 0 0 0 1px var(--sheet), inset 0 0 0 1.5px var(--warn); }
.ev.is-clash::after { content: ""; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
.ev.is-done .ev-name { text-decoration: line-through; opacity: .62; }
.ev.is-dim { opacity: .32; }
.ev.is-focus { box-shadow: 0 0 0 1px var(--sheet), 0 0 0 3px var(--accent); z-index: 2; }
.ev.is-source { opacity: .3; }
.ev-grip { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; cursor: ns-resize; }
.ev-grip::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 16px; height: 2px; margin-left: -8px; border-radius: 2px; background: var(--cs); opacity: 0; transition: opacity .15s; }
.ev:hover .ev-grip::after { opacity: .9; }
.ev.act { border-left: 0; border-radius: 4px; background: color-mix(in srgb, var(--cs) 46%, var(--sheet)); cursor: pointer; }
.ev.act.is-agent { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--cs) 22%, var(--sheet)) 0 4px, color-mix(in srgb, var(--cs) 36%, var(--sheet)) 4px 8px); }
.ev.live { border-left: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.ev.live::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #D99A6C; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .2; } }
.now { position: absolute; left: -1px; right: 0; z-index: 6; top: calc(var(--s) * var(--ppm) * 1px); border-top: 1.5px solid var(--warn); pointer-events: none; }
.now::before { content: ""; position: absolute; left: -4px; top: -4.5px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.now span { position: absolute; right: 3px; top: -17px; font: 10.5px var(--num); color: var(--warn); background: var(--sheet); padding: 0 3px; border-radius: 3px; }
.ghost { position: absolute; left: 3px; right: 3px; z-index: 7; top: calc(var(--s) * var(--ppm) * 1px + 1px); height: calc(var(--d) * var(--ppm) * 1px - 2px); border: 1.5px dashed var(--cs); border-radius: 5px; background: color-mix(in srgb, var(--cb) 80%, transparent); pointer-events: none; }
.ghost span { position: absolute; left: -2px; top: -25px; padding: 3px 7px; border-radius: 5px; background: var(--ink); color: var(--paper); font: 11.5px var(--num); white-space: nowrap; box-shadow: 0 4px 10px rgba(0, 0, 0, .15); }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.cal-help { font-size: 12px; color: var(--ink-3); margin-top: 10px; }

.loose { margin-top: 14px; padding: 4px 14px 8px; border: 1px dashed var(--rule); border-radius: 10px; }
.loose h3 { display: flex; gap: 8px; align-items: baseline; font-size: 13px; font-weight: 600; padding: 8px 0 4px; }
.loose h3 span { font-weight: 400; font-size: 12px; color: var(--ink-3); }
.loose-row { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 0; border: 0; border-top: 1px solid var(--rule-3); background: none; text-align: left; font-size: 13px; cursor: pointer; }
.loose-row > span:nth-child(2) { flex: 1; }
.loose-row em, .rec-row em { font-style: normal; font-size: 11px; color: var(--ink-3); border: 1px solid var(--rule); border-radius: 4px; padding: 0 4px; margin-left: 4px; }
.loose-row:hover { color: var(--accent); }

/* 周表 */
.week { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 26px; align-items: start; }
.backlog { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow: auto; padding-right: 2px; scrollbar-width: thin; }
.backlog > .sec-head:first-child { margin-top: 2px; }
.backlog-tip { margin-bottom: 10px; }
.chipcard { display: flex; align-items: center; gap: 9px; padding: 9px 9px 9px 8px; margin-bottom: 6px; border: 1px solid var(--rule); border-radius: 9px; background: var(--sheet); cursor: grab; user-select: none; -webkit-user-select: none; transition: border-color .15s, box-shadow .15s; }
.chipcard:hover { border-color: #CCC4B3; box-shadow: var(--shadow); }
.chipcard.is-focus { box-shadow: 0 0 0 2px var(--accent); }
.handle { align-self: stretch; width: 4px; border-radius: 3px; background: var(--cs); }
.chip-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.chip-main .row-title { font-size: 13.5px; }
.chip-main small { font-size: 11.5px; color: var(--ink-3); line-height: 1.4; }
.chip-main small.warn { color: var(--warn); }
.warn-row { all: unset; display: grid; gap: 1px; width: 100%; padding: 8px 10px; margin-bottom: 4px; border-radius: 8px; background: var(--warn-soft); cursor: pointer; font-size: 13px; box-sizing: border-box; }
.warn-row small { font-size: 11.5px; }
.backlog .quick { margin-top: 16px; }
.backlog .quick input { height: 32px; font-size: 13px; }
.focus-strip { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; margin-bottom: 14px; border-radius: 10px; background: var(--accent-soft); font-size: 13px; }
.day-strip, .strip-tools { display: none; }

/* 任务页 */
.filter-bar { margin-bottom: 4px; overflow-x: auto; scrollbar-width: none; }
.task-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 0 44px; }
.tgroup .sec-head { margin-top: 26px; }
.trow { grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; }
.trow .glyph-btn { margin-top: -2px; }
.trow.is-sub { padding-left: 34px; min-height: 46px; }
.trow.is-sub .row-title { font-size: 13.5px; font-weight: 400; }
.trow .row-act { opacity: .55; transition: opacity .15s; }
.trow:hover .row-act, .trow:focus-within .row-act { opacity: 1; }
.meter { height: 4px; border-radius: 2px; background: var(--rule-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.meter.thin { height: 2px; margin-top: 7px; max-width: 220px; }

/* 回顾 */
.summary { display: flex; flex-wrap: wrap; margin-bottom: 22px; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--rule); }
.summary > div { flex: 1 1 160px; display: grid; gap: 1px; padding: 14px 20px 16px 0; }
.summary > div + div { padding-left: 20px; border-left: 1px solid var(--rule-2); }
.summary span { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-3); }
.summary span .i { width: 14px; height: 14px; }
.summary strong { font: 400 36px/1.15 var(--num); font-variant-numeric: lining-nums tabular-nums; }
.summary small { font-size: 12px; color: var(--ink-3); }
.summary .agent strong { color: var(--ink-2); }
.panel { padding: 4px 20px 18px; margin-bottom: 18px; border: 1px solid var(--rule); border-radius: 14px; background: var(--sheet); box-shadow: var(--shadow); }
.panel > .sec-head { margin-top: 16px; align-items: center; }
.review-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; }
.bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; height: 230px; padding-top: 6px; }
.bar-col { display: grid; grid-template-rows: 18px 1fr auto; height: 100%; padding: 4px 0 6px; border: 0; border-radius: 8px; background: none; cursor: pointer; justify-items: center; transition: background .15s; }
.bar-col:hover { background: var(--paper); }
.bar-col.is-on { background: var(--accent-soft); }
.bar-num { font: 11px var(--num); color: var(--ink-2); }
.bar-pair { display: flex; align-items: flex-end; justify-content: center; gap: 3px; width: 100%; height: 100%; border-bottom: 1px solid var(--rule); }
.bar-pair i { width: min(15px, 32%); height: calc(var(--h) * 100%); border-radius: 3px 3px 0 0; }
.bar-pair .plan { border: 1.5px solid #BEB6A5; border-bottom: 0; }
.bar-pair .act { background: var(--accent); }
.bar-d { margin-top: 6px; font-size: 12px; color: var(--ink-2); text-align: center; line-height: 1.25; }
.bar-d small { display: block; font: 11px var(--num); color: var(--ink-3); }
.bar-col.is-today .bar-d { color: var(--accent); font-weight: 600; }
.legend .lg { display: inline-block; width: 9px; height: 9px; margin: 0 5px 0 12px; border-radius: 2px; vertical-align: -1px; }
.legend .lg.plan { border: 1.5px solid #BEB6A5; }
.legend .lg.act { background: var(--accent); }
.panel .legend { margin: 0; font-size: 12px; color: var(--ink-3); }
.stack { display: flex; gap: 2px; height: 12px; margin: 10px 0 8px; border-radius: 3px; overflow: hidden; }
.stack i { background: var(--cs); }
.cat-row { display: grid; grid-template-columns: auto 1fr auto 40px auto; gap: 10px; align-items: center; width: 100%; padding: 9px 4px; border: 0; border-bottom: 1px solid var(--rule-3); background: none; text-align: left; font-size: 13.5px; cursor: pointer; }
.cat-row:hover, .cat-row.is-on { color: var(--accent); }
.cat-row .num { font-size: 13px; }
.cat-row .pct { font: 12px var(--num); color: var(--ink-3); text-align: right; }
.cat-row .i { width: 14px; height: 14px; color: var(--ink-3); }
.drill { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.rec-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; width: 100%; padding: 10px 2px; border: 0; border-bottom: 1px solid var(--rule-3); background: none; text-align: left; font-size: 13.5px; cursor: pointer; }
.rec-row:hover strong { color: var(--accent); }
.rec-row strong { font-weight: 500; }
.rec-when { font: 12px var(--num); color: var(--ink-3); white-space: nowrap; }
.rec-row .num { font-size: 13px; }
.rec-out { grid-column: 3 / -1; font-size: 12.5px; color: var(--ink-2); }
.yield { padding: 12px 0; border-bottom: 1px solid var(--rule-3); }
.yield:last-child { border-bottom: 0; }
.yield-head { display: flex; align-items: center; gap: 10px; }
.yield-head .row-title { display: inline-flex; align-items: center; gap: 8px; }
.yield-head .num small { color: var(--ink-3); font-size: 11.5px; }
.yield ul { margin-top: 6px; display: grid; gap: 4px; padding-left: 16px; }
.yield li { position: relative; font-size: 13.5px; color: var(--ink-2); }
.yield li::before { content: ""; position: absolute; left: -12px; top: .72em; width: 5px; height: 1px; background: var(--ink-3); }
.yield li small { color: var(--ink-3); margin-right: 8px; font-size: 12px; }
.yield .muted { margin-top: 4px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--accent); }
.tag .glyph { width: 13px; height: 13px; }
.notes textarea { background: var(--white); }

/* 数据页 */
.honest { border-top: 3px solid var(--accent); }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 18px; margin: 4px 0 14px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); }
.kv dd.off { color: var(--warn); }
.kv dd.off::before { content: "○ "; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.grid-2.top { align-items: start; gap: 18px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--rule-3); font-size: 13.5px; }
.list-row > span { display: flex; flex-direction: column; min-width: 0; }
.list-row > span .dot { display: none; }
.list-row small { font-size: 11.5px; color: var(--ink-3); }

/* 对话框 */
dialog { padding: 0; border: 0; background: transparent; color: inherit; max-width: none; max-height: none; overflow: visible; }
dialog::backdrop { background: rgba(42, 38, 30, .3); }
dialog.modal { width: min(540px, calc(100vw - 32px)); margin: auto; }
dialog.drawer { width: min(470px, 100vw); height: 100vh; height: 100dvh; margin: 0 0 0 auto; }
dialog[open].modal { animation: pop .18s ease-out; }
dialog[open].drawer { animation: slide .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.sheet { display: flex; flex-direction: column; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); background: var(--sheet); border-radius: 16px; box-shadow: 0 30px 70px -25px rgba(40, 32, 15, .45), 0 0 0 1px var(--rule); }
dialog.drawer .sheet { height: 100%; max-height: none; border-radius: 16px 0 0 16px; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 6px 24px; }
.sheet-head h2 { font: 500 20px/1.35 var(--serif); }
.sheet-head p { margin-top: 2px; font: 12.5px var(--num); color: var(--ink-3); }
.sheet-body { flex: 1; align-content: start; display: grid; gap: 14px; padding: 10px 24px 20px; overflow: auto; overscroll-behavior: contain; }
.sheet-foot { display: flex; align-items: center; gap: 8px; padding: 14px 20px 14px 24px; border-top: 1px solid var(--rule-2); padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.form-error { color: var(--warn); font-size: 13px; }
.form-error:empty { display: none; }
.lede { font-size: 14px; color: var(--ink-2); }
.lede strong { color: var(--ink); }
.field { display: grid; gap: 6px; min-width: 0; }
.field-label { font-size: 12px; color: var(--ink-3); letter-spacing: .03em; }
.field small { font-size: 11.5px; color: var(--ink-3); }
input, select, textarea { width: 100%; min-width: 0; height: 38px; padding: 0 11px; border: 1px solid var(--rule); border-radius: 8px; background: var(--white); font-size: 14px; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
textarea { height: auto; padding: 9px 11px; line-height: 1.55; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 74, 62, .12); }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; padding: 0; accent-color: var(--accent); flex: none; box-shadow: none; }
input:disabled { background: var(--paper); color: var(--ink-3); }
.title-input { height: auto; padding: 2px 0 10px; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; background: transparent; font: 500 22px/1.35 var(--serif); }
.title-input:focus { box-shadow: none; border-bottom-color: var(--accent); }
.unit { display: flex; align-items: center; gap: 8px; }
.unit span { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; line-height: 1.45; }
.check input { margin-top: 2px; }
.field .check { min-height: 38px; align-items: center; }
.note { display: flex; align-items: flex-start; gap: 8px; padding: 9px 12px; border-radius: 8px; font-size: 13px; line-height: 1.5; }
.note .i { width: 15px; height: 15px; margin-top: 2px; }
.note.warn { background: var(--warn-soft); color: var(--warn-ink); }
.note.soft { background: var(--note); color: var(--ink-2); }
.crumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); margin-top: -6px; }
.crumb .i { width: 13px; height: 13px; }
.status-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.status-pick label { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 10px; border: 1px solid var(--rule); border-radius: 999px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.status-pick input { position: absolute; opacity: 0; pointer-events: none; }
.status-pick label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.status-pick label:has(input:focus-visible) { outline: 2px solid var(--accent); }
.drawer-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.drawer-sec { display: grid; gap: 6px; padding-top: 14px; border-top: 1px solid var(--rule-2); }
.drawer-sec h3 { display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 600; }
.drawer-sec h3 span { font-weight: 400; font-size: 12px; color: var(--ink-3); }
.mini-row, .pick-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 1px solid var(--rule-2); border-radius: 8px; background: var(--white); text-align: left; font-size: 13px; cursor: pointer; }
.mini-row > span, .pick-row > span:nth-child(2) { flex: 1; min-width: 0; }
.mini-row em { font-style: normal; color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45%; }
.mini-row .i, .pick-row .i { width: 14px; height: 14px; color: var(--ink-3); }
.mini-row:hover, .pick-row:hover { border-color: var(--accent); }
.pick-row { padding: 11px 12px; margin-bottom: 6px; font-size: 14px; }
.pick-row small { display: block; color: var(--ink-3); font-size: 12px; }
.sub-row { display: flex; align-items: center; gap: 4px; padding: 2px 0; font-size: 13.5px; }
.sub-row > span { flex: 1; }
.sub-row.is-done > span { color: var(--ink-3); text-decoration: line-through; }
.inline-add { display: flex; gap: 6px; margin-top: 4px; }
.inline-add input { height: 34px; font-size: 13px; }
.kbd-hint { font-size: 11.5px; }
.revs summary { font-size: 12.5px; color: var(--ink-3); }
.revs p { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.preview { width: 100%; border-collapse: collapse; font-size: 13px; }
.preview th { font-weight: 400; font-size: 12px; color: var(--ink-3); text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--rule); }
.preview td { padding: 9px 4px; border-bottom: 1px solid var(--rule-3); font-variant-numeric: tabular-nums; }
.preview td:first-child { display: flex; align-items: center; gap: 7px; }
.preview .was { color: var(--ink-3); text-decoration: line-through; }
.preview .i { width: 13px; height: 13px; color: var(--ink-3); }
.preview tr.held td { color: var(--ink-3); background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(70, 55, 25, .04) 5px 6px); }
.tpl-row { display: flex; align-items: center; gap: 9px; padding: 7px 2px; border-bottom: 1px solid var(--rule-3); font-size: 13px; cursor: pointer; }
.tpl-row > span:nth-of-type(2) { flex: 1; }
.tpl-row .i { width: 13px; height: 13px; color: var(--ink-3); }

#toast { position: fixed; left: 50%; bottom: 26px; z-index: 300; display: flex; align-items: center; gap: 6px; max-width: min(600px, calc(100vw - 32px)); padding: 9px 8px 9px 16px; border-radius: 11px; background: var(--ink); color: var(--paper); font-size: 13px; box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .4); opacity: 0; transform: translate(-50%, 14px); pointer-events: none; transition: opacity .2s, transform .2s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast > span { padding-right: 6px; }
#toast button { flex: none; height: 30px; padding: 0 10px; border: 0; border-radius: 7px; background: rgba(255, 255, 255, .07); color: #EBCB9C; font-size: 13px; font-weight: 600; cursor: pointer; }
#toast button:hover { background: rgba(255, 255, 255, .14); }

/* 平板：窄侧栏 */
@media (max-width: 1180px) {
  .shell { grid-template-columns: 76px minmax(0, 1fr); }
  .rail { padding: 22px 8px 16px; align-items: stretch; }
  .wordmark { justify-content: center; padding: 0; }
  .wordmark span { display: none; }
  .rail nav button, .rail-foot button { flex-direction: column; justify-content: center; gap: 2px; height: 56px; padding: 0; font-size: 11px; }
  .rail-timer { padding: 10px 6px; text-align: center; }
  .rail-timer strong { font-size: 11px; }
  .rail-timer .num { font-size: 14px; }
  .rail-timer > span:first-child { justify-content: center; font-size: 10px; }
  .save-state { padding: 0 2px; font-size: 10px; text-align: center; }
  main { padding: 28px 30px 64px; }
  .today { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 28px; }
  .week { grid-template-columns: 200px minmax(0, 1fr); gap: 18px; }
}
@media (max-width: 960px) and (min-width: 761px) {
  .today { grid-template-columns: 1fr; }
  .today-cal { position: static; }
  .week { grid-template-columns: 1fr; }
  .backlog { position: static; max-height: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 10px; }
  .backlog > :not(.chipcard) { grid-column: 1 / -1; }
  .review-grid { grid-template-columns: 1fr; }
}

/* 手机 */
@media (max-width: 760px) {
  :root { font-size: 15px; }
  .shell { display: block; }
  .rail { display: none; }
  main { padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px max(6px, env(safe-area-inset-bottom)); background: rgba(246, 243, 236, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--rule); }
  .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; height: 50px; justify-content: center; border: 0; background: none; border-radius: 10px; color: var(--ink-3); font-size: 11px; cursor: pointer; }
  .tabbar [aria-current="page"] { color: var(--accent); font-weight: 600; }
  .tabbar .i { width: 22px; height: 22px; }
  .float-timer { position: fixed; left: 16px; right: 16px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 49; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-size: 14px; box-shadow: 0 12px 28px -12px rgba(31, 52, 43, .8); cursor: pointer; }
  .float-timer span:nth-child(2) { flex: 1; text-align: left; }
  .float-timer .num { font-size: 17px; }
  #toast { bottom: calc(80px + env(safe-area-inset-bottom)); width: calc(100vw - 24px); justify-content: space-between; }
  h1 { font-size: 28px; }
  .page-head { margin-bottom: 14px; align-items: flex-start; gap: 12px; }
  .head-tools { width: 100%; }
  .head-tools > .btn.primary { margin-left: auto; }
  .head-tools .seg { order: 5; }
  .head-tools .sep { display: none; }
  .icon-btn { width: 38px; height: 38px; }
  .btn { height: 38px; }
  .btn.small { height: 32px; }
  .goal { flex-wrap: wrap; gap: 4px 12px; margin-bottom: 16px; }
  .goal input { flex-basis: 100%; order: 3; font-size: 16px; }
  .goal-sum { margin-left: auto; }
  .pane-switch { display: block; margin-bottom: 14px; }
  .pane-switch .seg { display: flex; }
  .pane-switch .seg > button { flex: 1; height: 34px; font-size: 14px; }
  .today { display: block; }
  .today[data-pane="tasks"] .today-cal, .today[data-pane="timeline"] .today-main { display: none; }
  .today-cal { position: static; }
  .today-cal > .sec-head h2 { display: none; }
  .today-cal > .sec-head .spacer { display: none; }
  .today-cal > .sec-head .seg { flex: 1; display: flex; }
  .today-cal > .sec-head .seg button { flex: 1; }
  .focus { padding: 18px 18px 16px; border-radius: 14px; }
  .focus-title { font-size: 23px; }
  .focus-clock { font-size: 48px; }
  .focus-actions .btn { flex: 1 1 auto; height: 42px; }
  .row { gap: 6px; padding: 8px 0; }
  .row-time { min-width: 42px; }
  .cal { --hw: 44px; }
  .cal-scroll, .cal.single .cal-scroll { max-height: calc(100vh - 290px); max-height: calc(100dvh - 290px); min-height: 360px; }
  .hours span { right: 6px; font-size: 10.5px; }
  .ev { font-size: 12.5px; }
  .cal.scroll-x .cal-head, .cal.scroll-x .cal-body { min-width: calc(var(--hw) + 7 * 92px); }
  .cal.scroll-x .cal-head .corner { position: sticky; left: 0; background: var(--sheet); }
  .cal.scroll-x .hours { position: sticky; left: 0; z-index: 7; background: var(--sheet); border-right: 1px solid var(--rule-2); }
  .cal.scroll-x .cal-head .corner { z-index: 9; }
  .week { display: flex; flex-direction: column-reverse; align-items: stretch; gap: 22px; }
  main.has-timer { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
  .strip-tools { gap: 2px; }
  .strip-tools .seg > button { height: 30px; }
  .backlog { position: static; max-height: none; overflow: visible; }
  .day-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 10px; }
  .day-strip button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0; height: 60px; padding: 6px 0 10px; border: 1px solid transparent; border-radius: 10px; background: none; cursor: pointer; }
  .day-strip span { font-size: 11.5px; color: var(--ink-3); }
  .day-strip strong { font: 500 19px/1.2 var(--num); }
  .day-strip i { position: absolute; left: 30%; right: 30%; bottom: 6px; height: 3px; border-radius: 2px; background: var(--rule); }
  .day-strip i::after { content: ""; position: absolute; inset: 0; right: calc((1 - var(--h)) * 100%); border-radius: 2px; background: var(--accent); }
  .day-strip .is-today span, .day-strip .is-today strong { color: var(--accent); }
  .day-strip [aria-pressed="true"] { background: var(--sheet); border-color: var(--rule); box-shadow: var(--shadow); }
  .strip-tools { display: flex; align-items: center; margin-bottom: 8px; }
  .focus-strip { flex-wrap: wrap; }
  .quick.big { flex-wrap: wrap; }
  .quick.big input { flex-basis: 100%; }
  .quick.big select { flex: 1; }
  .trow .row-act { opacity: 1; }
  .trow.is-sub { padding-left: 22px; }
  .task-groups { display: block; }
  .summary > div { flex-basis: 44%; padding: 12px 10px 12px 0; }
  .summary > div + div { padding-left: 0; border-left: 0; }
  .summary > div:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--rule-2); }
  .summary strong { font-size: 30px; }
  .review-grid { display: block; }
  .panel { padding: 2px 14px 14px; }
  .bars { height: 190px; }
  .rec-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .rec-when { grid-column: 2 / -1; grid-row: 2; }
  .rec-out { grid-column: 2 / -1; grid-row: 3; }
  .grid-2, .grid-2.top { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-3 > :first-child { grid-column: 1 / -1; }
  .kv { grid-template-columns: 96px 1fr; }
  dialog.modal, dialog.drawer { width: 100vw; height: auto; max-height: 92vh; max-height: 92dvh; margin: auto 0 0; }
  dialog.drawer .sheet, .sheet { max-height: 92vh; max-height: 92dvh; height: auto; border-radius: 18px 18px 0 0; }
  dialog[open].modal, dialog[open].drawer { animation: rise .24s cubic-bezier(.2, .8, .2, 1); }
  @keyframes rise { from { transform: translateY(30px); opacity: .4; } }
  .sheet-head { padding: 18px 16px 4px 20px; }
  .sheet-body { padding: 10px 20px 18px; }
  .sheet-foot { padding-left: 16px; padding-right: 16px; }
  .sheet-foot .btn { height: 42px; }
  input, select, textarea { font-size: 16px; height: 42px; }
  textarea { height: auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
