/* ===========================================================
   工作台 · Atelier —— 主样式
   =========================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

h1, h2, h3, h4, p, ul, ol, figure {
  margin: 0;
  padding: 0;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

::selection {
  background: rgba(124, 155, 166, 0.28);
}

/* ------------------------------ 背景洗染 ------------------------------ */

.wash {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% -10%, #FFFDF7 0%, var(--bg) 46%, var(--bg-deep) 100%);
  pointer-events: none;
}

.wash::before {
  content: "";
  position: absolute;
  inset: -25%;
  background:
    radial-gradient(26% 22% at 16% 10%, rgba(190, 210, 214, 0.55), transparent 62%),
    radial-gradient(24% 20% at 74% 6%, rgba(235, 212, 197, 0.6), transparent 60%),
    radial-gradient(30% 26% at 88% 62%, rgba(200, 214, 196, 0.45), transparent 64%),
    radial-gradient(24% 22% at 8% 74%, rgba(219, 204, 214, 0.42), transparent 62%),
    radial-gradient(20% 18% at 52% 96%, rgba(240, 226, 200, 0.5), transparent 60%);
  filter: blur(34px) saturate(1.02);
}

.wash::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* -------------------------------- 骨架 -------------------------------- */

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: 14px;
  height: 100vh;
  padding: 14px;
}

.main {
  min-width: 0;
  /* 网格项默认 min-height:auto 会被内容撑高，导致 .view 失去可视高度、整页滚不动 */
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.view {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-bottom: 18px;
  scrollbar-gutter: stable;
}

/* 视图内相邻面板之间始终留出呼吸间距，避免两个玻璃框贴边显得叠在一起 */
.view > * + * { margin-top: 12px; }

/* ------------------------------ 玻璃基底 ------------------------------ */

.glass {
  background: var(--glass);
  backdrop-filter: blur(var(--blur)) saturate(1.22);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.22);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--sh-md);
  border-radius: var(--r-lg);
}

/* ------------------------------- 侧边栏 ------------------------------- */

.sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 16px 12px 14px;
  overflow: hidden;
}

.sb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 8px 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.sb-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  flex: 0 0 auto;
  background:
    radial-gradient(circle at 30% 28%, #F3E3D2 0%, transparent 58%),
    radial-gradient(circle at 72% 66%, #C3D3D6 0%, transparent 60%),
    linear-gradient(140deg, #E7D6C4, #BFD0D3 62%, #C9D3C0);
  box-shadow: var(--sh-sm);
}

.sb-brand-text b {
  display: block;
  font-family: var(--serif);
  font-size: 15.5px;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.sb-brand-text span {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-ghost);
}

.sb-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  margin-right: -4px;
}

.sb-scroll::-webkit-scrollbar { width: 6px; }

.sb-scroll::-webkit-scrollbar-thumb {
  background: rgba(140, 124, 106, 0.22);
  border-radius: 99px;
  border: 1px solid transparent;
  background-clip: content-box;
}

.sb-scroll::-webkit-scrollbar-thumb:hover { background: rgba(140, 124, 106, 0.4); background-clip: content-box; }

.sb-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 6px;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-ghost);
  text-transform: uppercase;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 14px;
  color: var(--ink-soft);
  transition: background var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t-fast) var(--ease), color var(--t);
  margin-bottom: 2px;
  text-align: left;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--sh-xs);
}

.nav-item.active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.66));
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 3px 10px rgba(96, 82, 66, 0.1), inset 0 1px 0 #fff, inset 0 -2px 4px rgba(150, 132, 112, 0.08);
}

.nav-item.drop-above::before,
.nav-item.drop-below::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 155, 166, 0.16);
}

.nav-item.drop-above::before { top: -3px; }
.nav-item.drop-below::after { bottom: -3px; }

.nav-glyph {
  width: 24px;
  height: 24px;
  border-radius: 9px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-size: 13px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6));
  box-shadow: var(--sh-xs);
  color: var(--ink-soft);
}

.nav-main {
  flex: 1;
  min-width: 0;
}

.nav-name {
  display: block;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-mini {
  display: block;
  height: 3px;
  margin-top: 5px;
  border-radius: 3px;
  background: rgba(140, 124, 106, 0.14);
  overflow: hidden;
}

.nav-mini i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--c);
  transition: width 0.4s var(--ease);
}

.nav-more {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--ink-ghost);
  opacity: 0;
  transition: opacity var(--t), background var(--t);
  flex: 0 0 auto;
  font-size: 14px;
}

.nav-item:hover .nav-more { opacity: 1; }
.nav-more:hover { background: rgba(140, 124, 106, 0.12); color: var(--ink); }

.sb-art {
  margin-top: 10px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--sh-sm);
  border: 1px solid rgba(255, 255, 255, 0.8);
  position: relative;
  height: 66px;
  background:
    radial-gradient(circle at 30% 30%, rgba(240, 226, 208, 0.9), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(190, 208, 212, 0.9), transparent 62%),
    linear-gradient(160deg, #F1E5D6, #CBD8DA);
}

.sb-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.94);
}

.sb-foot {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  margin-top: 10px;
  display: flex;
  gap: 6px;
}

/* ------------------------------- 顶栏 -------------------------------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  min-height: var(--topbar-h);
  background: var(--glass);
  backdrop-filter: blur(var(--blur)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
}

.tb-left {
  min-width: 0;
  flex: 1;
}

.tb-title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 9px;
}

.tb-title .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
  flex: 0 0 auto;
}

.tb-sub {
  font-size: 11.5px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  margin-top: 1px;
}

.tb-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

/* ------------------------------- 按钮 -------------------------------- */

.btn {
  --h: 34px;
  height: var(--h);
  padding: 0 15px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.62));
  box-shadow: 0 2px 6px rgba(96, 82, 66, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -2px 3px rgba(150, 132, 112, 0.09);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t) var(--ease), background var(--t), color var(--t);
}

.btn:hover {
  transform: translateY(-1px);
  color: var(--ink);
  box-shadow: 0 5px 14px rgba(96, 82, 66, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -2px 3px rgba(150, 132, 112, 0.09);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(96, 82, 66, 0.14), inset 0 2px 5px rgba(150, 132, 112, 0.16);
}

.btn.primary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.42);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 62%, white), var(--accent));
  box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 34%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -2px 4px rgba(60, 50, 40, 0.16);
  text-shadow: 0 1px 1px rgba(60, 50, 40, 0.16);
}

.btn.primary:hover {
  box-shadow: 0 7px 18px color-mix(in srgb, var(--accent) 40%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -2px 4px rgba(60, 50, 40, 0.16);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.34);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: none;
  color: var(--ink-faint);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--sh-xs);
}

.btn.danger {
  color: #A45B4E;
  border-color: rgba(214, 160, 148, 0.5);
  background: linear-gradient(180deg, rgba(255, 246, 243, 0.98), rgba(250, 232, 226, 0.8));
}

.btn.danger:hover {
  box-shadow: 0 6px 16px rgba(180, 110, 96, 0.22), inset 0 1px 0 #fff;
}

.btn.sm {
  --h: 27px;
  padding: 0 11px;
  font-size: 12px;
}

.btn.icon {
  width: var(--h);
  padding: 0;
}

.btn.block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.45;
  pointer-events: none;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  transition: background var(--t), color var(--t), transform var(--t-fast) var(--ease), box-shadow var(--t);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  box-shadow: var(--sh-xs);
  transform: translateY(-1px);
}

.icon-btn:active { transform: translateY(1px); }

/* 分段控件（视图切换） */
.seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: var(--r-pill);
  background: rgba(140, 124, 106, 0.1);
  box-shadow: inset 0 2px 5px rgba(120, 104, 86, 0.14), inset 0 -1px 0 rgba(255, 255, 255, 0.7);
}

.seg button {
  height: 27px;
  padding: 0 13px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  color: var(--ink-faint);
  transition: all var(--t) var(--ease);
}

.seg button.active {
  color: var(--ink);
  background: linear-gradient(180deg, #fff, rgba(255, 255, 255, 0.82));
  box-shadow: 0 2px 5px rgba(96, 82, 66, 0.14), inset 0 1px 0 #fff;
  font-weight: 600;
}

/* 保存状态 */
.save-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink-ghost);
  padding: 0 4px;
  letter-spacing: 0.03em;
}

.save-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9FB79C;
  box-shadow: 0 0 0 3px rgba(159, 183, 156, 0.18);
  transition: all var(--t);
}

.save-dot.saving { background: #D3B57E; box-shadow: 0 0 0 3px rgba(211, 181, 126, 0.2); }
.save-dot.error { background: #C58A7C; box-shadow: 0 0 0 3px rgba(197, 138, 124, 0.22); }

/* ------------------------------ 页面通用 ------------------------------ */

.page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
}

.page-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  border-radius: var(--r-lg);
  background: var(--glass-2);
  backdrop-filter: blur(var(--blur)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--sh-md);
  position: relative;
  overflow: hidden;
}

.page-head::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -60px;
  width: 260px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 26%, transparent), transparent 68%);
  filter: blur(18px);
  pointer-events: none;
}

.ph-title {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.03em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ph-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-faint);
}

.ph-meta b {
  color: var(--ink-soft);
  font-weight: 600;
}

.ph-prog {
  flex: 1;
  min-width: 160px;
  max-width: 340px;
}

.ph-right {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
  align-items: center;
}

/* --------------------------- 进度条 / 进度环 --------------------------- */

.bar {
  position: relative;
  height: 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 2px 5px rgba(120, 104, 86, 0.16), inset 0 -1px 0 rgba(255, 255, 255, 0.85);
  overflow: hidden;
}

.bar > i {
  display: block;
  height: 100%;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c, var(--accent)) 58%, white), var(--c, var(--accent)));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -2px 4px rgba(60, 50, 40, 0.14);
  transition: width 0.45s var(--ease);
}

.bar > i::after {
  content: "";
  display: block;
  height: 42%;
  margin: 2px 6px 0;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent);
}

.bar.thin { height: 8px; }
.bar.lg { height: 14px; }

.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--ink-faint);
  margin-bottom: 5px;
}

.bar-label b {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.ring {
  --size: 38px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.95) 0 52%, transparent 54%),
    conic-gradient(var(--c, var(--accent)) calc(var(--p, 0) * 1%), rgba(140, 124, 106, 0.14) 0);
  box-shadow: 0 2px 6px rgba(96, 82, 66, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: background 0.4s var(--ease);
  flex: 0 0 auto;
}

/* ------------------------------ 板块页布局 ---------------------------- */

/* 板块页整体不再随页面滚动：头部固定，左右两列各自滚动 */
.view.mode-module {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
}

.view.mode-module > .page-head {
  flex: 0 0 auto;
}

.module-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(620px, 1.06fr);
  gap: 12px;
  align-items: start;
}

.view.mode-module > .module-grid {
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
  margin-bottom: 14px;
}

.module-grid.expanded {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1.4fr);
}

.col-problems {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.col-cal {
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--glass);
  backdrop-filter: blur(var(--blur)) saturate(1.18);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.18);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--sh-md);
}

/* 两列各自滚动：高度锁在可视区里，内容多也不会把整页顶出屏幕 */
.view.mode-module .col-problems {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

/* 这两处是内部滚动区，滚动条稍微显眼一点，让人一眼看出还能往下翻 */
.view.mode-module .col-problems::-webkit-scrollbar,
.view.mode-module .cal-scroll::-webkit-scrollbar {
  width: 11px;
}

.view.mode-module .col-problems::-webkit-scrollbar-track,
.view.mode-module .cal-scroll::-webkit-scrollbar-track {
  background: rgba(150, 134, 114, 0.07);
  border-radius: 999px;
  margin: 4px 0;
}

.view.mode-module .col-problems::-webkit-scrollbar-thumb,
.view.mode-module .cal-scroll::-webkit-scrollbar-thumb {
  background: rgba(140, 124, 106, 0.42);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}

.view.mode-module .col-problems::-webkit-scrollbar-thumb:hover,
.view.mode-module .cal-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(140, 124, 106, 0.62);
  background-clip: content-box;
}

/* 列是 flex 容器，卡片默认会被压扁，这里禁止压缩，超出的部分交给滚动 */
.view.mode-module .col-problems > * {
  flex: 0 0 auto;
}

/* 日历列：标题与待排期抽屉固定，只有日历本体滚动 */
.view.mode-module .col-cal {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.view.mode-module .col-cal > * {
  flex: 0 0 auto;
}

.view.mode-module .cal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 2px;
}

/* 列表滚动时，「问题与解决方法 + 新增问题」这一条留在顶部 */
.view.mode-module .col-problems > .section-head {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 8px 4px 10px;
  margin-top: -8px;
  border-radius: 10px;
  background: rgba(250, 247, 240, 0.96);
  backdrop-filter: blur(16px) saturate(1.12);
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
  box-shadow: 0 10px 12px -12px rgba(96, 82, 66, 0.4);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 4px 4px;
}

.section-title {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.section-count {
  font-size: 11.5px;
  color: var(--ink-ghost);
  font-variant-numeric: tabular-nums;
}

.section-head .spacer { flex: 1; }

.hint {
  font-size: 11.5px;
  color: var(--ink-ghost);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hint kbd {
  font-family: var(--mono);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--sh-xs);
  color: var(--ink-faint);
}

/* ------------------------------ 问题卡片 ------------------------------ */

.pcard {
  border-radius: var(--r-lg);
  background: var(--glass-2);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--sh-sm);
  transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
  overflow: hidden;
}

.pcard:hover {
  box-shadow: 0 10px 26px rgba(96, 82, 66, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.pc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  cursor: default;
}

.twisty {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--ink-ghost);
  transition: transform var(--t) var(--ease), background var(--t);
  flex: 0 0 auto;
}

.twisty:hover { background: rgba(140, 124, 106, 0.1); color: var(--ink); }
.twisty.closed { transform: rotate(-90deg); }

.p-title {
  flex: 1;
  min-width: 0;
  font-size: 14.5px;
  font-weight: 600;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  padding: 4px 8px;
  margin-left: -8px;
  transition: background var(--t), border-color var(--t);
  letter-spacing: 0.01em;
}

.p-title:hover { background: rgba(255, 255, 255, 0.6); }

.p-title:focus {
  outline: none;
  background: #fff;
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.pc-body {
  padding: 0 15px 14px;
  border-top: 1px solid transparent;
}

.pcard.collapsed .pc-body { display: none; }

.p-note {
  font-size: 12.5px;
  color: var(--ink-faint);
  padding: 0 2px 10px 26px;
  line-height: 1.6;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  width: 100%;
  resize: none;
  overflow: hidden;
  transition: background var(--t), border-color var(--t);
}

.p-note:hover { background: rgba(255, 255, 255, 0.45); }

.p-note:focus {
  outline: none;
  background: #fff;
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  font-size: 11px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--sh-xs);
}

.chip.open { background: rgba(238, 228, 220, 0.9); color: #8B7263; }
.chip.doing { background: rgba(232, 236, 226, 0.92); color: #6E7F63; }
.chip.solved { background: rgba(222, 232, 236, 0.92); color: #567181; }

.chip.pick { cursor: pointer; }

/* 解决方法列表 */

.sol-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sol {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 100px 54px 42px 62px;
  align-items: center;
  gap: 9px;
  padding: 8px 10px 8px 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: background var(--t), box-shadow var(--t), border-color var(--t), transform var(--t-fast) var(--ease);
}

.sol:hover {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 3px 10px rgba(96, 82, 66, 0.08), inset 0 1px 0 #fff;
}

.sol.done { background: color-mix(in srgb, var(--accent) 8%, rgba(255, 255, 255, 0.8)); }

.sol.dragging { opacity: 0.45; transform: scale(0.98); }

.grip {
  width: 20px;
  height: 26px;
  display: grid;
  place-items: center;
  cursor: grab;
  border-radius: 7px;
  transition: background var(--t), color var(--t);
  user-select: none;
  background-image:
    radial-gradient(circle at 50% 30%, currentColor 1.5px, transparent 1.6px),
    radial-gradient(circle at 50% 50%, currentColor 1.5px, transparent 1.6px),
    radial-gradient(circle at 50% 70%, currentColor 1.5px, transparent 1.6px);
  color: var(--ink-ghost);
}

.grip:hover { background-color: rgba(140, 124, 106, 0.12); color: var(--ink-soft); }
.grip:active { cursor: grabbing; }

.sol-text {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 3px 7px;
  font-size: 13px;
  color: var(--ink);
  min-width: 0;
  width: 100%;
  transition: background var(--t), border-color var(--t);
}

.sol-text:hover { background: rgba(255, 255, 255, 0.7); }

.sol-text:focus {
  outline: none;
  background: #fff;
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.sol.done .sol-text {
  color: var(--ink-faint);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--accent) 50%, transparent);
}

.sol-bar {
  position: relative;
  min-width: 0;
}

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 11px;
  border-radius: var(--r-pill);
  outline: none;
  cursor: pointer;
  background: linear-gradient(90deg,
    var(--c, var(--accent)) 0 var(--p, 0%),
    rgba(255, 255, 255, 0.62) var(--p, 0%) 100%);
  box-shadow: inset 0 2px 5px rgba(120, 104, 86, 0.18), inset 0 -1px 0 rgba(255, 255, 255, 0.85);
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff 0%, #F4F0E8 72%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 6px rgba(96, 82, 66, 0.24), inset 0 -1px 2px rgba(150, 132, 112, 0.16);
  transition: transform var(--t-fast) var(--ease);
}

.slider::-webkit-slider-thumb:hover { transform: scale(1.14); }
.slider:active::-webkit-slider-thumb { transform: scale(1.05); }

.slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(200, 186, 170, 0.6);
  box-shadow: 0 2px 6px rgba(96, 82, 66, 0.24);
}

.slider:focus-visible {
  box-shadow: inset 0 2px 5px rgba(120, 104, 86, 0.18), 0 0 0 3px color-mix(in srgb, var(--accent) 26%, transparent);
}

.pct {
  font-size: 11.5px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* 自动进度：百分比下面的 x/y 次数 */
.pct small {
  display: block;
  margin-top: 1px;
  font-size: 9.5px;
  letter-spacing: .02em;
  color: var(--ink-ghost);
}

/* 「自动」小徽标：常显，旁边的删除按钮保持低调 */
.sol.auto .sol-actions { opacity: 1; }

.sol.auto .sol-actions .mini-btn {
  opacity: .32;
  transition: opacity var(--t);
}

.sol.auto:hover .sol-actions .mini-btn { opacity: 1; }

.tag-auto {
  display: inline-grid;
  place-items: center;
  height: 17px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  font-size: 9.5px;
  letter-spacing: .05em;
  color: color-mix(in srgb, var(--accent) 72%, #4a4038);
  background: color-mix(in srgb, var(--accent) 15%, rgba(255, 255, 255, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(96, 82, 66, 0.08);
  user-select: none;
  white-space: nowrap;
}

.sol.auto .sol-bar .bar {
  height: 11px;
  cursor: default;
  background: rgba(150, 132, 112, 0.13);
  box-shadow: inset 0 1px 3px rgba(120, 104, 86, 0.2), inset 0 -1px 0 rgba(255, 255, 255, 0.7);
}

/* 自动进度的填充用更实的色，和手动滑块保持同一分量感 */
.sol.auto .bar > i {
  background: linear-gradient(180deg, color-mix(in srgb, var(--c, var(--accent)) 80%, white), var(--c, var(--accent)));
}

.sol.auto .bar > i::after { height: 34%; opacity: .7; }

.sol-actions {
  display: flex;
  gap: 2px;
  justify-content: flex-end;
  opacity: 0.25;
  transition: opacity var(--t);
}

.sol:hover .sol-actions { opacity: 1; }

.mini-btn {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  font-size: 12px;
  transition: all var(--t-fast) var(--ease);
}

.mini-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  box-shadow: var(--sh-xs);
  transform: translateY(-1px);
}

.mini-btn.on { color: #fff; background: var(--c, var(--accent)); box-shadow: 0 2px 6px color-mix(in srgb, var(--accent) 30%, transparent); }

.add-sol {
  margin-top: 8px;
  width: 100%;
  padding: 8px;
  border-radius: 13px;
  border: 1px dashed rgba(140, 124, 106, 0.3);
  color: var(--ink-faint);
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.3);
  transition: all var(--t) var(--ease);
}

.add-sol:hover {
  background: rgba(255, 255, 255, 0.75);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--ink-soft);
  box-shadow: var(--sh-xs);
}

.add-problem {
  padding: 13px;
  border-radius: var(--r-lg);
  border: 1px dashed rgba(140, 124, 106, 0.32);
  background: rgba(255, 255, 255, 0.28);
  color: var(--ink-faint);
  font-size: 13px;
  transition: all var(--t) var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.add-problem:hover {
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink-soft);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: var(--sh-sm);
  transform: translateY(-1px);
}

/* -------------------------------- 日历 -------------------------------- */

.cal-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.cal-title {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  min-width: 96px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.cal-head .spacer { flex: 1; }

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-bottom: 5px;
}

.cal-weekdays span {
  text-align: center;
  font-size: 11px;
  color: var(--ink-ghost);
  letter-spacing: 0.08em;
  padding: 2px 0;
}

.cal-weekdays span.we { color: color-mix(in srgb, #C58A7C 60%, var(--ink-ghost)); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.cal-cell {
  position: relative;
  min-height: 92px;
  padding: 5px 5px 6px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: background var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t);
  overflow: hidden;
}

.cal-cell.wide { min-height: 132px; }
.cal-cell.tall { min-height: 220px; }

.cal-cell.out { opacity: 0.42; }

.cal-cell.today {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 14%, white), rgba(255, 255, 255, 0.5));
  border-color: color-mix(in srgb, var(--accent) 42%, white);
}

.cal-cell.weekend {
  background: rgba(252, 248, 243, 0.55);
}

.cal-cell.hot {
  background: color-mix(in srgb, var(--accent) 22%, white);
  border-color: color-mix(in srgb, var(--accent) 55%, white);
  box-shadow: 0 6px 18px rgba(96, 82, 66, 0.12), inset 0 0 0 2px color-mix(in srgb, var(--accent) 40%, white);
  opacity: 1;
}

.cell-top {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 1px;
  min-height: 18px;
}

.cell-day {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.cal-cell.today .cell-day {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--accent) 40%, transparent);
}

.cell-load {
  font-size: 10px;
  color: var(--ink-ghost);
  margin-left: auto;
}

.cell-more {
  font-size: 10.5px;
  color: var(--ink-faint);
  padding: 2px 4px;
  border-radius: 6px;
  text-align: left;
}

.cell-more:hover { background: rgba(255, 255, 255, 0.85); color: var(--ink); }

/* 任务小条 */

.chip-task {
  --c: #7C9BA6;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 5px 3px 6px;
  border-radius: 8px;
  font-size: 11.5px;
  line-height: 1.35;
  background: color-mix(in srgb, var(--c) 10%, rgba(255, 255, 255, 0.9));
  border-left: 3px solid var(--c);
  box-shadow: 0 1px 3px rgba(96, 82, 66, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  cursor: grab;
  overflow: hidden;
  user-select: none;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t), background var(--t);
}

.chip-task:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(96, 82, 66, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.chip-task:active { cursor: grabbing; }

.chip-task.dragging { opacity: 0.4; }

.chip-task .ct-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}

.chip-task .ct-time {
  font-size: 10px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.chip-task .ct-check {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.4px solid color-mix(in srgb, var(--c) 55%, #fff);
  background: rgba(255, 255, 255, 0.9);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-size: 8px;
  color: transparent;
  transition: all var(--t-fast);
}

.chip-task .ct-check:hover { transform: scale(1.15); border-color: var(--c); }

.chip-task.done {
  background: color-mix(in srgb, var(--c) 6%, rgba(255, 255, 255, 0.7));
  border-left-color: color-mix(in srgb, var(--c) 45%, #fff);
}

.chip-task.done .ct-title {
  color: var(--ink-ghost);
  text-decoration: line-through;
}

.chip-task.done .ct-check {
  background: var(--c);
  border-color: var(--c);
  color: #fff;
}

.chip-task.overdue {
  border: 1px solid rgba(197, 138, 124, 0.5);
  border-left: 3px solid #C58A7C;
}

/* 周 / 日 视图 */
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.week-col {
  min-height: 240px;
  padding: 7px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.55);
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: all var(--t);
}

.week-col.today {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 12%, white), rgba(255, 255, 255, 0.5));
  border-color: color-mix(in srgb, var(--accent) 40%, white);
}

.week-col.hot {
  background: color-mix(in srgb, var(--accent) 20%, white);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 45%, white);
}

.week-col-head {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 1px 2px 3px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2px;
}

.week-col-head b {
  font-family: var(--serif);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.week-col-head span {
  font-size: 10.5px;
  color: var(--ink-ghost);
}

.week-col-head .wd {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--ink-faint);
}

.day-wrap {
  padding: 10px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.6);
  min-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all var(--t);
}

.day-wrap.hot {
  background: color-mix(in srgb, var(--accent) 16%, white);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 40%, white);
}

.day-block {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}

.day-block:last-child { border-bottom: none; }

.day-hour {
  font-size: 11.5px;
  color: var(--ink-ghost);
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
}

.day-tasks {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 26px;
}

.day-tasks:empty::after {
  content: "—";
  color: var(--ink-ghost);
  font-size: 11px;
}

.cal-empty {
  padding: 26px 12px;
  text-align: center;
  color: var(--ink-ghost);
  font-size: 12.5px;
}

.cal-empty .ce-mark {
  font-size: 22px;
  opacity: 0.5;
  margin-bottom: 6px;
}

/* -------------------------------- 总表 -------------------------------- */

.ov-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--r-lg);
  background: var(--glass-2);
  backdrop-filter: blur(var(--blur)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--sh-md);
}

.ov-top {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.stat-row {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.stat {
  min-width: 64px;
}

.stat-num {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.stat-num small {
  font-size: 12px;
  color: var(--ink-faint);
  margin-left: 2px;
}

.stat-num.alert { color: #B4695B; }

.stat-label {
  font-size: 11px;
  color: var(--ink-ghost);
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.fchip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 11px 0 8px;
  border-radius: var(--r-pill);
  font-size: 12px;
  color: var(--ink-faint);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--sh-xs);
  transition: all var(--t) var(--ease);
}

.fchip:hover { transform: translateY(-1px); color: var(--ink-soft); }

.fchip.on {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(96, 82, 66, 0.12), inset 0 1px 0 #fff;
}

.fchip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 16%, transparent);
  transition: all var(--t);
}

.fchip:not(.on) i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); }

.ov-body {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.ov-body.pool-collapsed { grid-template-columns: 46px minmax(0, 1fr); }

.pool {
  border-radius: var(--r-lg);
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--sh-md);
  padding: 12px;
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 220px);
  display: flex;
  flex-direction: column;
  z-index: 2;
}

.pool-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.pool-title {
  font-family: var(--serif);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.pool-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.pool-group + .pool-group { margin-top: 10px; }

.pool-group-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  padding: 2px 2px 5px;
}

.pool-group-head i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
}

.pool-sol {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  margin-bottom: 4px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.6);
  font-size: 12px;
  color: var(--ink-soft);
  cursor: grab;
  transition: all var(--t) var(--ease);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.pool-sol:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(96, 82, 66, 0.1);
  color: var(--ink);
}

.pool-sol:active { cursor: grabbing; }

.pool-sol .ps-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pool-sol .ps-pct {
  font-size: 10.5px;
  color: var(--ink-ghost);
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.pool-empty {
  font-size: 12px;
  color: var(--ink-ghost);
  padding: 14px 6px;
  text-align: center;
  line-height: 1.7;
}

.ov-cal {
  padding: 14px 16px 16px;
  border-radius: var(--r-lg);
  background: var(--glass);
  backdrop-filter: blur(var(--blur)) saturate(1.18);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.18);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--sh-md);
  min-height: 420px;
}

/* ------------------------- 弹窗 / 气泡 / 提示 ------------------------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(74, 62, 50, 0.18);
  backdrop-filter: blur(6px) saturate(1.05);
  -webkit-backdrop-filter: blur(6px) saturate(1.05);
  animation: fade-in 0.18s var(--ease);
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  width: min(560px, 100%);
  max-height: min(86vh, 900px);
  display: flex;
  flex-direction: column;
  border-radius: var(--r-xl);
  background: rgba(255, 253, 248, 0.9);
  backdrop-filter: blur(26px) saturate(1.3);
  -webkit-backdrop-filter: blur(26px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--sh-xl);
  animation: pop-in 0.24s var(--ease);
  overflow: hidden;
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 12px;
}

.modal-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.03em;
  flex: 1;
}

.modal-body {
  padding: 2px 20px 4px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.modal-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px 18px;
  justify-content: flex-end;
}

.modal-foot .spacer { flex: 1; }

.modal-note {
  font-size: 12.5px;
  color: var(--ink-faint);
  line-height: 1.7;
  margin-bottom: 14px;
  padding-left: 2px;
}

/* 表单 */

.field {
  margin-bottom: 13px;
}

.field-label {
  font-size: 11.5px;
  color: var(--ink-ghost);
  letter-spacing: 0.08em;
  margin-bottom: 5px;
  display: block;
}

.input,
.select,
.textarea {
  width: 100%;
  height: 38px;
  padding: 0 13px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--sh-in), 0 1px 2px rgba(96, 82, 66, 0.05);
  color: var(--ink);
  font-size: 13.5px;
  transition: box-shadow var(--t), background var(--t);
}

.textarea {
  height: auto;
  min-height: 74px;
  padding: 9px 13px;
  line-height: 1.6;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent), var(--sh-in);
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%239C9184' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 32px;
  cursor: pointer;
}

.row {
  display: flex;
  gap: 10px;
}

.row > * { flex: 1; min-width: 0; }

/* 选项胶囊 */

.opt-chips,
.wd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.opt-chip {
  height: 29px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  color: var(--ink-faint);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--sh-xs);
  transition: all var(--t) var(--ease);
}

.opt-chip:hover { transform: translateY(-1px); color: var(--ink); }

.opt-chip.on {
  color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 62%, white), var(--accent));
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 3px 9px color-mix(in srgb, var(--accent) 32%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.wd-chip {
  width: 34px;
  height: 29px;
  border-radius: 10px;
  font-size: 12px;
  color: var(--ink-faint);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--sh-xs);
  transition: all var(--t) var(--ease);
}

.wd-chip.on {
  color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 60%, white), var(--accent));
  box-shadow: 0 3px 8px color-mix(in srgb, var(--accent) 30%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* 排期气泡 */

.popover {
  position: fixed;
  z-index: 120;
  width: 322px;
  padding: 15px;
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 60px rgba(78, 64, 50, 0.22), inset 0 1px 0 #fff;
  animation: pop-in 0.2s var(--ease);
}

.pop-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}

.pop-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  flex: 1;
  color: var(--ink);
}

.pop-date {
  font-size: 11.5px;
  color: var(--ink-faint);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.pop-foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* 键值列表 */

.kv {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 8px 12px;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.kv dt { color: var(--ink-ghost); }
.kv dd { margin: 0; }

/* 提示 */

.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  padding: 9px 18px;
  border-radius: var(--r-pill);
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(20px) saturate(1.25);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 32px rgba(78, 64, 50, 0.18), inset 0 1px 0 #fff;
  font-size: 12.5px;
  color: var(--ink-soft);
  animation: toast-in 0.26s var(--ease);
  white-space: nowrap;
  max-width: min(80vw, 520px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.leaving { animation: toast-out 0.22s var(--ease) forwards; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(6px) scale(0.97); }
}

/* 拖拽幽灵 */

.drag-ghost {
  position: fixed;
  top: -1000px;
  left: -1000px;
  padding: 7px 12px;
  border-radius: 11px;
  background: rgba(255, 253, 248, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-left: 3px solid var(--c, var(--accent));
  box-shadow: 0 10px 26px rgba(78, 64, 50, 0.2);
  font-size: 12px;
  color: var(--ink);
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 999;
}

/* 启动遮罩 */

.boot {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}

.boot.hide { opacity: 0; visibility: hidden; }

.boot-inner {
  text-align: center;
  color: var(--ink-ghost);
  font-family: var(--serif);
  letter-spacing: 0.16em;
  font-size: 13px;
}

.boot-dot {
  width: 42px;
  height: 42px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, #F5E6D5, transparent 60%),
    radial-gradient(circle at 70% 68%, #C1D2D6, transparent 62%),
    linear-gradient(150deg, #E9D8C6, #BFD0D3);
  box-shadow: 0 8px 22px rgba(96, 82, 66, 0.16);
  animation: breathe 2.2s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.08); opacity: 1; }
}

/* 空状态 */

.empty {
  padding: 34px 18px;
  text-align: center;
  color: var(--ink-ghost);
  font-size: 12.5px;
  line-height: 1.9;
}

.empty b {
  display: block;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 4px;
  font-weight: 600;
}

/* ------------------------------ 补充细节 ------------------------------ */

/* 顶栏油画装饰 */
.topbar {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.topbar > * {
  position: relative;
  z-index: 1;
}

.topbar.has-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--hero);
  background-size: cover;
  background-position: center 42%;
  opacity: var(--hero-op, 0.26);
  filter: saturate(0.92);
  -webkit-mask-image: linear-gradient(100deg, transparent 20%, rgba(0, 0, 0, 0.4) 48%, #000 84%);
  mask-image: linear-gradient(100deg, transparent 20%, rgba(0, 0, 0, 0.4) 48%, #000 84%);
  pointer-events: none;
  border-radius: inherit;
}

.topbar.has-art::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(100deg, rgba(255, 253, 248, 0.92) 0%, rgba(255, 253, 248, 0.55) 38%, rgba(255, 253, 248, 0.1) 70%);
  pointer-events: none;
  border-radius: inherit;
}

/* 板块名输入 */
.name-input {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 2px 9px;
  margin-left: -9px;
  color: var(--ink);
  width: 210px;
  max-width: 100%;
  transition: background var(--t), border-color var(--t), box-shadow var(--t);
}

.name-input:hover { background: rgba(255, 255, 255, 0.55); }

.name-input:focus {
  outline: none;
  background: #fff;
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* 月视图里隐藏时间，避免挤 */
.cal-grid .ct-time { display: none; }
.cal-grid .chip-task { padding: 2px 4px 2px 5px; font-size: 11px; gap: 3px; }
.cal-grid .ct-check { width: 11px; height: 11px; font-size: 7px; }

/* 周 / 日视图：任务条改成两行（标题 + 时间），窄列也能读 */
.week-col .chip-task,
.day-tasks .chip-task {
  display: grid;
  grid-template-columns: 13px minmax(0, 1fr);
  grid-template-areas:
    "check title"
    "check time";
  align-items: center;
  column-gap: 5px;
  row-gap: 0;
}

.week-col .ct-check,
.day-tasks .ct-check { grid-area: check; }
.week-col .ct-title,
.day-tasks .ct-title {
  grid-area: title;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
  word-break: break-word;
}
.week-col .ct-time,
.day-tasks .ct-time { grid-area: time; font-size: 9.5px; }

/* 板块页日历列在宽屏时的观察舒适度 */
.col-cal .cal-cell { min-height: 90px; }

/* 侧栏油画小画 */
.sb-art {
  transition: opacity var(--t);
}

.sb-art img {
  transition: transform 0.6s var(--ease);
}

.sb-art:hover img {
  transform: scale(1.04);
}

/* 池子里的条目 */
.pool-sol {
  background: color-mix(in srgb, var(--c, #B5AA9B) 10%, rgba(255, 255, 255, 0.8));
  border-left: 2px solid color-mix(in srgb, var(--c, #B5AA9B) 65%, #fff);
  border-top: 1px solid rgba(255, 255, 255, 0.8);
  border-right: 1px solid rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
}

/* 让 stat 按钮看起来像数据块 */
button.stat {
  background: none;
  padding: 0;
  text-align: left;
  transition: transform var(--t-fast) var(--ease);
}

button.stat:hover { transform: translateY(-1px); }

button.stat:hover .stat-label { color: var(--ink-soft); }


/* 快速排期浮条 */
.drop-dock {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px 9px 15px;
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(22px) saturate(1.28);
  -webkit-backdrop-filter: blur(22px) saturate(1.28);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 44px rgba(78, 64, 50, 0.22), inset 0 1px 0 #fff;
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
  max-width: calc(100vw - 60px);
  pointer-events: auto;
  overflow: hidden;
}

.drop-dock.in {
  opacity: 1;
  transform: translate(-50%, 0);
}

.dd-label {
  font-size: 11px;
  color: var(--ink-ghost);
  letter-spacing: 0.08em;
  flex: 0 0 auto;
}

.dd-title {
  font-size: 12.5px;
  color: var(--ink);
  font-weight: 500;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 0 1 auto;
}

.dd-hint {
  font-size: 11px;
  color: var(--ink-ghost);
  padding-left: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.dd-sep {
  width: 1px;
  height: 18px;
  background: var(--line);
  flex: 0 0 auto;
}

.dd-btn {
  height: 30px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  color: var(--ink-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.66));
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 6px rgba(96, 82, 66, 0.1), inset 0 1px 0 #fff;
  transition: all 0.14s var(--ease);
  flex: 0 0 auto;
}

.dd-btn:hover {
  transform: translateY(-1px);
  color: var(--ink);
  box-shadow: 0 5px 12px rgba(96, 82, 66, 0.16), inset 0 1px 0 #fff;
}

.dd-btn.hot {
  color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 62%, white), var(--accent));
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 42%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.dd-hint {
  font-size: 11px;
  color: var(--ink-ghost);
  padding-left: 2px;
  white-space: nowrap;
}

/* 周视图空列的提示 */
.week-empty {
  flex: 1;
  display: grid;
  place-items: center;
  color: var(--ink-ghost);
  font-size: 11px;
  opacity: 0.6;
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track { background: transparent; }

::-webkit-scrollbar-thumb {
  background: rgba(140, 124, 106, 0.28);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover { background: rgba(140, 124, 106, 0.44); background-clip: content-box; }

/* 响应式 */

@media (max-width: 1240px) {
  .module-grid { grid-template-columns: minmax(0, 1fr); }
  .col-cal { position: static; }
  .ov-body { grid-template-columns: 220px minmax(0, 1fr); }
}

@media (max-width: 1400px) {
  .module-grid { grid-template-columns: minmax(0, 1fr); }
  .col-cal { position: static; }
  .ov-body { grid-template-columns: 230px minmax(0, 1fr); }

  /* 单列窄屏下两列上下叠放，改回整页滚动，避免每列只剩半屏高 */
  .view.mode-module { display: block; overflow: auto; padding-bottom: 18px; }
  .view.mode-module .col-problems,
  .view.mode-module .cal-scroll { overflow: visible; }
  .view.mode-module .col-cal { display: block; overflow: visible; }
  .view.mode-module .cal-scroll { padding-right: 0; }
  .view.mode-module .col-problems > .section-head {
    position: static;
    margin: 0;
    padding: 2px 4px 4px;
    background: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (max-width: 1000px) {
  .shell { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar .nav-name,
  .sidebar .nav-mini,
  .sidebar .nav-note,
  .sidebar .sb-brand-text,
  .sidebar .sb-group,
  .sidebar .sb-art,
  .sidebar .sb-fold { display: none; }
  .nav-item { justify-content: center; }
  .nav-item.ind { padding-left: 10px; }
  .nav-item.ind2 { padding-left: 10px; }
  .sidebar .nav-more { display: none; }
  .ov-body { grid-template-columns: minmax(0, 1fr); }
  .pool { position: static; max-height: none; }
}

/* =====================================================================
   追加：拖动排序 · 截止日期 · 总表问题总览
   ===================================================================== */

/* ---------------------------- 拖动排序 ---------------------------- */

.pcard.dragging { opacity: 0.5; }

.p-grip {
  width: 16px;
  height: 24px;
  margin-right: -6px;
  flex: 0 0 auto;
}

.pcard.drop-before::before,
.pcard.drop-after::after,
.sol.drop-before::before,
.sol.drop-after::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  height: 4px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--accent) 68%, #5A4A3A);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 26%, transparent);
  pointer-events: none;
  z-index: 2;
}

.pcard { position: relative; }
.sol { position: relative; }

.pcard.drop-before::before,
.sol.drop-before::before { top: 0; }

.pcard.drop-after::after,
.sol.drop-after::after { bottom: 0; }

/* ---------------------------- 截止日期 ---------------------------- */

.due-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  font-size: 11px;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex: 0 0 auto;
  color: var(--ink-ghost);
  background: rgba(255, 255, 255, 0.38);
  border: 1px dashed rgba(140, 124, 106, 0.32);
  transition: all var(--t-fast) var(--ease);
}

.due-chip:hover {
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.85);
  border-color: color-mix(in srgb, var(--accent) 52%, transparent);
  transform: translateY(-1px);
  box-shadow: var(--sh-xs);
}

.due-chip.set {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.82);
  color: color-mix(in srgb, var(--accent) 62%, #4a4038);
  background: color-mix(in srgb, var(--accent) 15%, rgba(255, 255, 255, 0.88));
  box-shadow: var(--sh-xs);
}

.due-chip.over {
  color: #A5533F;
  background: rgba(242, 222, 214, 0.95);
  border-color: rgba(212, 156, 140, 0.55);
}

.due-chip.sm {
  height: 20px;
  padding: 0 5px;
  font-size: 10px;
  letter-spacing: 0;
}

.due-pop { width: 260px; }
.due-quick { display: flex; flex-wrap: wrap; gap: 5px; }
.due-quick .opt-chip { height: 26px; padding: 0 10px; font-size: 11.5px; }

/* ------------------------ 总表：问题总览 ------------------------- */

.pool-sub {
  font-size: 10.5px;
  color: var(--ink-ghost);
  letter-spacing: 0.04em;
  white-space: nowrap;
  margin-left: 2px;
}

.pool-group-head {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 9px;
  transition: background var(--t), color var(--t);
}

.pool-group-head:hover { background: rgba(255, 255, 255, 0.7); }

.pool-group-head .pgh-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pool-group-head .pgh-n {
  font-size: 9.5px;
  color: var(--ink-ghost);
  flex: 0 0 auto;
}

.pool-empty-line {
  font-size: 11px;
  color: var(--ink-ghost);
  padding: 2px 2px 6px 10px;
}

.pool-problem {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 5px 7px 5px 10px;
  margin: 1px 0 3px;
  border-radius: 9px;
  border: none;
  background: transparent;
  font-family: inherit;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background var(--t), color var(--t);
}

.pool-problem:hover { background: rgba(255, 255, 255, 0.8); color: var(--ink); }

.pool-problem .pp-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pool-problem .pp-pct {
  font-size: 10px;
  font-weight: 400;
  color: var(--ink-ghost);
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.pp-due,
.ps-due {
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: var(--r-pill);
  color: var(--ink-faint);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.85);
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.pp-due.over,
.ps-due.over {
  color: #A5533F;
  background: rgba(242, 222, 214, 0.95);
  border-color: rgba(212, 156, 140, 0.45);
}

.pool-sol {
  margin-left: 8px;
  width: calc(100% - 8px);
}

.pool-sol .ps-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c, var(--accent));
  opacity: 0.5;
  flex: 0 0 auto;
  transition: opacity var(--t), box-shadow var(--t);
}

.pool-sol.sched {
  background: color-mix(in srgb, var(--c) 9%, rgba(255, 255, 255, 0.55));
}

.pool-sol.sched .ps-dot {
  opacity: 1;
  box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--c) 20%, transparent);
}

.pool-sol.done { opacity: 0.62; }

.pool-sol.done .ps-text {
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--c) 55%, transparent);
}

/* 全部板块被隐藏时的提示条 */

.ov-warn {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 13px;
  border-radius: 14px;
  background: rgba(245, 233, 222, 0.92);
  border: 1px solid rgba(206, 178, 155, 0.42);
  color: #8A6A55;
  font-size: 12px;
  box-shadow: var(--sh-xs);
}

.fchip.alert {
  color: #A5533F;
  border-color: rgba(212, 156, 140, 0.5);
  background: rgba(245, 231, 223, 0.94);
}

/* ===========================================================
   首页 · 记录（新增模块）
   =========================================================== */

.nav-note {
  display: block;
  font-size: 10px;
  line-height: 1.4;
  color: var(--ink-ghost);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item.sub { padding-left: 28px; }

/* ------------------------------- 首页 ------------------------------- */

.home-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  border-radius: var(--r-xl);
  background:
    radial-gradient(120% 150% at 0% 0%, rgba(241, 229, 213, 0.9), transparent 56%),
    radial-gradient(95% 130% at 100% 8%, rgba(202, 216, 218, 0.8), transparent 62%),
    linear-gradient(140deg, rgba(255, 253, 248, 0.94), rgba(250, 247, 240, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow: var(--sh-md);
  overflow: hidden;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(closest-side at 82% 84%, rgba(201, 168, 124, 0.26), transparent),
    radial-gradient(closest-side at 92% 22%, rgba(155, 170, 132, 0.2), transparent);
}

.hh-main { position: relative; z-index: 1; flex: 1; min-width: 0; }

.hh-kicker {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
}

.hh-title {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin: 5px 0 7px;
}

.hh-sub {
  font-size: 12.5px;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hh-sep { color: var(--ink-ghost); }

.hh-ring {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.hh-ring-cap {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}

.home-funcs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(226px, 1fr));
  gap: 12px;
}

.func-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-radius: var(--r-lg);
  background: var(--glass-2);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: var(--sh-sm);
  text-align: left;
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.func-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.func-card:active { transform: translateY(0); }

.fc-glyph {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 16px;
  color: color-mix(in srgb, var(--c) 74%, #4a4038);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 24%, white), color-mix(in srgb, var(--c) 54%, white));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 8px color-mix(in srgb, var(--c) 22%, transparent);
}

.fc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fc-title { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.fc-desc {
  font-size: 11.5px;
  color: var(--ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-arrow { color: var(--ink-ghost); font-size: 16px; flex: 0 0 auto; }

.home-dash {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr);
  gap: 12px;
}

.home-panel {
  padding: 15px 17px 16px;
  border-radius: var(--r-lg);
  background: var(--glass-2);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--sh-sm);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
}

.hp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }

.hp-title {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.hp-badge {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--ink-faint);
  padding: 2px 9px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--sh-xs);
  font-variant-numeric: tabular-nums;
}

.hp-list { display: flex; flex-direction: column; gap: 2px; margin-top: 11px; }
.hp-mini-row + .hp-list { margin-top: 10px; }

.hp-task,
.hp-rec {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 9px;
  border-radius: 11px;
  text-align: left;
  transition: background var(--t-fast) var(--ease);
}

.hp-task:hover,
.hp-rec:hover { background: rgba(255, 255, 255, 0.74); }

.hp-check {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-size: 9.5px;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.6);
}

.hp-task.done .hp-check { background: #9BAA84; border-color: transparent; }
.hp-task.done .hp-tname { color: var(--ink-ghost); text-decoration: line-through; }

.hp-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; }

.hp-tname {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-time,
.hp-steps {
  font-size: 10.5px;
  color: var(--ink-ghost);
  font-variant-numeric: tabular-nums;
}

.hp-rec.archived { opacity: 0.6; }
.hp-more { font-size: 10.5px; color: var(--ink-ghost); padding: 4px 0 0 9px; }
.hp-empty { font-size: 12px; color: var(--ink-faint); display: flex; align-items: center; flex-wrap: wrap; }

.hp-mini-row { display: flex; gap: 8px; }

.hp-mini {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--sh-xs);
}

.hp-mini b {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.hp-mini span { font-size: 10.5px; color: var(--ink-faint); }

.hm-rows { display: flex; flex-direction: column; gap: 3px; }

.hm-row {
  display: grid;
  grid-template-columns: 18px 54px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 11px;
  text-align: left;
  transition: background var(--t-fast) var(--ease);
}

.hm-row:hover { background: rgba(255, 255, 255, 0.72); }
.hm-icon { font-size: 13px; text-align: center; }
.hm-name { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-pct { font-size: 10.5px; color: var(--ink-faint); text-align: right; font-variant-numeric: tabular-nums; }
.hm-row .bar { margin: 0; }

/* 五大主线 */

.lines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  align-items: start;
  gap: 10px;
}

.ml-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px 13px 13px;
  border-radius: var(--r-md);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(252, 249, 242, 0.64));
  border: 1px solid rgba(255, 255, 255, 0.84);
  box-shadow: var(--sh-xs);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t);
}

.ml-card:hover { transform: translateY(-1px); box-shadow: var(--sh-sm); }
.ml-card.open { background: rgba(255, 255, 255, 0.96); box-shadow: var(--sh-md); }

.ml-num {
  font-family: var(--serif);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--ink-ghost);
}

.ml-title {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.ml-title::placeholder { color: var(--ink-ghost); font-weight: 400; }
.ml-title:focus { outline: none; }

.ml-toggle {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  font-size: 10.5px;
  color: var(--ink-faint);
  background: rgba(240, 235, 226, 0.72);
  transition: color var(--t-fast), background var(--t-fast);
}

.ml-toggle:hover { color: var(--ink-soft); background: rgba(255, 255, 255, 0.95); }
.ml-toggle.has { color: color-mix(in srgb, var(--accent) 58%, var(--ink-soft)); }
.ml-caret { transition: transform var(--t) var(--ease); }
.ml-card.open .ml-caret { transform: rotate(180deg); }

.ml-note {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 8px 9px;
  font-family: var(--sans);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  background: rgba(250, 247, 240, 0.86);
  box-shadow: var(--sh-in);
  resize: none;
}

.ml-note:focus { outline: none; background: #fff; box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent); }

/* ------------------------------- 记录 ------------------------------- */

.rec-head {
  padding: 16px 18px 15px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 150% at 100% 0%, rgba(226, 216, 232, 0.42), transparent 58%),
    linear-gradient(140deg, rgba(255, 253, 248, 0.94), rgba(250, 247, 240, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.84);
  box-shadow: var(--sh-sm);
}

.rec-kicker { font-size: 10.5px; letter-spacing: 0.14em; color: var(--ink-faint); }

.rec-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin: 4px 0 4px;
}

.rec-sub {
  font-size: 12px;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.rec-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }

.rec-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  font-size: 12px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: var(--sh-xs);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t) var(--ease), background var(--t), color var(--t-fast);
}

.rec-chip:hover { transform: translateY(-1px); box-shadow: var(--sh-sm); }

.rec-chip.on {
  color: color-mix(in srgb, var(--c) 68%, #3B342C);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), color-mix(in srgb, var(--c) 18%, white));
  border-color: color-mix(in srgb, var(--c) 38%, white);
  box-shadow: 0 3px 10px color-mix(in srgb, var(--c) 24%, transparent), inset 0 1px 0 #fff;
}

.rec-chip b {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.rec-chip.on b { color: inherit; opacity: 0.75; }

.rec-chip.add {
  border-style: dashed;
  border-color: var(--line-strong);
  background: transparent;
  box-shadow: none;
  color: var(--ink-ghost);
}

.rec-chip.add:hover { color: var(--ink-soft); background: rgba(255, 255, 255, 0.7); }

.rc-ic { font-size: 13px; }

.rec-bar { display: flex; align-items: center; gap: 10px; padding: 3px 4px 0; }
.rec-bar-l { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex-wrap: wrap; }
.rb-icon { font-size: 15px; }
.rb-name { font-family: var(--serif); font-size: 16px; font-weight: 600; color: var(--ink); }
.rb-count { font-size: 11px; color: var(--ink-ghost); }
.rec-bar-r { margin-left: auto; display: flex; gap: 8px; flex: 0 0 auto; }

.rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 11px;
}

.rec-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px 15px 13px;
  border-radius: var(--r-md);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(252, 249, 242, 0.68));
  border: 1px solid rgba(255, 255, 255, 0.84);
  box-shadow: var(--sh-xs);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.rec-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: color-mix(in srgb, var(--c) 60%, transparent);
}

.rec-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.rec-card.archived { opacity: 0.6; }
.rec-card.archived::before { background: var(--ink-ghost); }

.rc-top { display: flex; align-items: center; gap: 8px; }

.rc-title {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rc-tag {
  font-size: 10px;
  color: var(--ink-ghost);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 1px 7px;
  flex: 0 0 auto;
}

.rc-mid { display: flex; align-items: center; gap: 10px; }
.rc-dots { display: flex; gap: 5px; flex: 1; }

.rc-dot {
  flex: 1;
  max-width: 34px;
  height: 5px;
  border-radius: var(--r-pill);
  background: rgba(150, 138, 122, 0.18);
  transition: background var(--t);
}

.rc-dot.on {
  background: color-mix(in srgb, var(--c) 74%, white);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--c) 32%, transparent);
}

.rc-pct { font-size: 10.5px; color: var(--ink-ghost); font-variant-numeric: tabular-nums; }

.rc-foot2 { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--ink-ghost); }
.rc-open { margin-left: auto; color: color-mix(in srgb, var(--c) 58%, var(--ink-faint)); }

.rec-blank {
  grid-column: 1 / -1;
  padding: 30px 22px;
  border-radius: var(--r-lg);
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.42);
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-faint);
}

.rbl-mark { font-size: 18px; color: var(--ink-ghost); margin-bottom: 7px; }
.rbl-sub { margin-top: 6px; font-size: 11.5px; color: var(--ink-ghost); line-height: 1.7; }

.rec-arch { display: flex; align-items: center; gap: 10px; padding: 1px 2px 0; flex-wrap: wrap; }
.ra-hint { font-size: 11px; color: var(--ink-ghost); }
.btn.on { color: var(--ink); background: rgba(255, 255, 255, 0.92); box-shadow: var(--sh-xs); }

.rec-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 13px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--ink-faint);
}

.rec-flow b { color: var(--ink-soft); font-weight: 600; }
.rec-flow .rf-sep { color: var(--ink-ghost); }

/* --------------------------- 记录详情弹窗 --------------------------- */

.rec-dlg { display: flex; flex-direction: column; gap: 13px; }
.rec-field { display: flex; flex-direction: column; gap: 6px; }
.rec-label { font-size: 10.5px; letter-spacing: 0.1em; color: var(--ink-faint); }

.rec-title-input { font-size: 14.5px; font-weight: 600; }

.step-list { display: flex; flex-direction: column; gap: 7px; }

.step-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
  transition: background var(--t), border-color var(--t), box-shadow var(--t);
}

.step-row.filled { background: rgba(255, 255, 255, 0.76); }

.step-row.next {
  background: rgba(255, 255, 255, 0.96);
  border-color: color-mix(in srgb, var(--accent) 34%, white);
  box-shadow: 0 3px 12px color-mix(in srgb, var(--accent) 14%, transparent);
}

.step-row.locked { background: rgba(248, 245, 239, 0.55); }

.step-no {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10.5px;
  color: var(--ink-faint);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--sh-xs);
}

.step-row.filled .step-no { color: #fff; background: #9BAA84; }
.step-row.next .step-no { color: #fff; background: var(--accent); }

.step-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.step-head { display: flex; align-items: center; gap: 7px; }
.step-name { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.step-row.locked .step-name { color: var(--ink-faint); }
.step-state { font-size: 10px; color: var(--ink-ghost); }
.step-state.lock { letter-spacing: 0.02em; }

.step-text {
  font-size: 12px;
  line-height: 1.72;
  color: var(--ink-soft);
  white-space: pre-wrap;
  max-height: 76px;
  overflow: auto;
}

.step-hint { font-size: 11.5px; color: var(--ink-ghost); }

.rec-tip {
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--ink-ghost);
  padding: 0 2px;
}

.step-edit-head { display: flex; align-items: baseline; gap: 9px; }
.se-no { font-family: var(--serif); font-size: 10.5px; letter-spacing: 0.16em; color: var(--ink-ghost); }
.se-name { font-family: var(--serif); font-size: 17px; font-weight: 600; color: var(--ink); }
.se-hint { font-size: 11.5px; color: var(--ink-faint); margin-top: -8px; }
.se-text { min-height: 152px; line-height: 1.78; resize: vertical; }
.se-counter { font-size: 10.5px; color: var(--ink-ghost); }
.se-foot-hint { font-size: 10.5px; color: var(--ink-ghost); margin-right: auto; }

.icon-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch-row { display: flex; gap: 9px; flex-wrap: wrap; }

.swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 6px rgba(96, 82, 66, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast);
}

.swatch:hover { transform: translateY(-1px); }
.swatch.on { box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(120, 106, 90, 0.42); }

/* ------------------------------ 响应式 ------------------------------ */

@media (max-width: 1080px) {
  .home-row { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .home-hero { flex-direction: column; align-items: flex-start; }
  .hh-side { width: 100%; justify-content: space-around; }
}

/* =====================================================================
   追加：侧栏分组 / 整栏收起 · 首页图表 · 记录每日总结
   ===================================================================== */

/* ------------------------- 侧栏：收起与分组 -------------------------- */

/* 收起整栏：隐藏侧栏后只剩一列，注意不能保留两列定义，
   否则 .main 会被放进第一列（0 宽）里挤成一条竖线 */
.shell.side-off {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.shell.side-off .sidebar { display: none; }

.sb-fold {
  width: 24px;
  height: 24px;
  margin-left: auto;
  flex: 0 0 auto;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 15px;
  line-height: 1;
  color: var(--ink-ghost);
  transition: background var(--t-fast), color var(--t-fast);
}

.sb-fold:hover { background: rgba(255, 255, 255, 0.82); color: var(--ink); }

.tb-fold { flex: 0 0 auto; }

.sb-group {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  margin: 9px 0 2px;
  padding: 4px 9px;
  border-radius: 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  text-align: left;
  transition: background var(--t-fast), color var(--t-fast);
}

.sb-group:first-of-type { margin-top: 4px; }

.sb-group:hover { background: rgba(255, 255, 255, 0.62); color: var(--ink-soft); }

.sg-caret {
  display: inline-block;
  width: 10px;
  font-size: 12px;
  line-height: 1;
  color: var(--ink-faint);
}


.sg-name { flex: 1; min-width: 0; }

.sg-count {
  font-size: 10px;
  letter-spacing: 0;
  color: var(--ink-ghost);
  font-variant-numeric: tabular-nums;
}

.nav-item.ind { padding-left: 15px; }
.nav-item.ind2 { padding-left: 27px; }
.nav-item.ind .nav-glyph { width: 23px; height: 23px; font-size: 12px; }

/* --------------------------- 首页：顶部条 ---------------------------- */

.hh-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
}

.hh-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--sh-xs);
}

.hh-pill-l { font-size: 10.5px; color: var(--ink-faint); }

.hh-pill b {
  font-size: 12.5px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.hh-side {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
}

.hh-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

/* --------------------------- 首页：图表区 ---------------------------- */

.home-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.hc-plot {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 6px 2px 0;
  background:
    repeating-linear-gradient(to top,
      rgba(150, 138, 122, 0.1) 0 1px,
      transparent 1px 25%);
}

.hc-col {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
}

.hc-val {
  height: 13px;
  font-size: 10px;
  line-height: 13px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.hc-track {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 0 0 1px rgba(150, 138, 122, 0.1);
}

.hc-col.today .hc-track {
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(150, 138, 122, 0.2);
}

.hc-bar {
  position: relative;
  width: 100%;
  min-height: 5px;
  border-radius: 9px 9px 5px 5px;
  background: color-mix(in srgb, #9BAA84 30%, white);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  transition: height 0.45s var(--ease);
}

.hc-bar > i {
  display: block;
  width: 100%;
  border-radius: 8px 8px 4px 4px;
  transition: height 0.45s var(--ease);
}

.hc-none {
  width: 100%;
  height: 5px;
  border-radius: 5px;
  background: rgba(150, 138, 122, 0.14);
}

.hc-lab {
  font-size: 10.5px;
  color: var(--ink-ghost);
  line-height: 1.3;
}

.hc-col.today .hc-lab { color: var(--ink); font-weight: 600; }

.hc-heat {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 66px;
  margin-top: 2px;
  padding: 0 1px;
}

.hc-heat-cell {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 3px;
  border-radius: 6px;
  background: transparent;
  transition: background var(--t), box-shadow var(--t);
}

.hc-heat-cell.today {
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 0 1px rgba(150, 138, 122, 0.16);
}

.hc-heat-dot {
  width: 100%;
  min-height: 4px;
  border-radius: 5px;
  background: rgba(150, 138, 122, 0.12);
  transition: height 0.45s var(--ease), background var(--t);
}

.hc-heat-lab {
  height: 11px;
  font-size: 9px;
  line-height: 11px;
  color: var(--ink-ghost);
  font-variant-numeric: tabular-nums;
}

.hc-heat-cell.today .hc-heat-lab { color: var(--ink-soft); font-weight: 600; }

.hc-heat-cell.l1 .hc-heat-dot { background: color-mix(in srgb, var(--hc) 34%, white); }
.hc-heat-cell.l2 .hc-heat-dot { background: color-mix(in srgb, var(--hc) 54%, white); }
.hc-heat-cell.l3 .hc-heat-dot { background: color-mix(in srgb, var(--hc) 76%, white); }
.hc-heat-cell.l4 .hc-heat-dot { background: var(--hc); }

.hc-split {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 13px;
  flex-wrap: wrap;
}

.hc-donut {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 1 auto;
  min-width: 0;
}

.hc-donut-ring {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}

.hc-donut-ring svg { display: block; }

.hc-donut-c {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  pointer-events: none;
}

.hc-donut-c b {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.hc-donut-c span { font-size: 9px; color: var(--ink-ghost); }

.hc-legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 0 1 auto;
  min-width: 92px;
}

.hc-leg {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-faint);
}

.hc-leg i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 3px;
}

.hc-leg span {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hc-leg b {
  min-width: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.hc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  font-size: 10.5px;
  color: var(--ink-ghost);
}

.hc-legend-dot::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: middle;
  background: #9BAA84;
}

.hc-hbar {
  flex: 1;
  min-width: 0;
  height: 6px;
  border-radius: var(--r-pill);
  background: rgba(150, 138, 122, 0.14);
  overflow: hidden;
}

.hc-hbar i {
  display: block;
  height: 100%;
  border-radius: var(--r-pill);
  transition: width 0.45s var(--ease);
}

.hp-mini-row.vert {
  flex-direction: column;
  gap: 5px;
  flex: 1 1 116px;
  min-width: 116px;
  padding-left: 13px;
  border-left: 1px solid var(--line);
}

.hp-mini-row.vert .hp-mini {
  flex-direction: row;
  align-items: baseline;
  gap: 7px;
  padding: 5px 10px;
}

.hp-mini-row.vert .hp-mini b { font-size: 15px; }

.hp-list.compact {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

/* ------------------------ 记录：每日总结 ---------------------------- */

.rec-sum {
  padding: 13px 15px 11px;
  border-radius: var(--r-lg);
  background: var(--glass-2);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: var(--sh-sm);
  backdrop-filter: blur(16px) saturate(1.12);
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
}

.rec-sum-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rsh-l {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.rsh-mark {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: color-mix(in srgb, var(--c) 72%, #4a4038);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 22%, white), color-mix(in srgb, var(--c) 48%, white));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 7px color-mix(in srgb, var(--c) 20%, transparent);
}

.rsh-copy { min-width: 0; }

.rsh-title {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.rsh-note { font-size: 10.5px; color: var(--ink-ghost); }

.rsh-r {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.rsh-badge {
  font-size: 10.5px;
  color: var(--ink-faint);
  padding: 2px 9px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--sh-xs);
  font-variant-numeric: tabular-nums;
}

.rec-sum-scroll {
  margin-top: 10px;
  max-height: 274px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 5px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  scrollbar-gutter: stable;
}

.sum-empty {
  padding: 16px 14px;
  border-radius: 13px;
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.42);
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-faint);
}

.sum-empty b { display: block; margin-bottom: 3px; color: var(--ink-soft); font-weight: 600; }
.sum-empty-sub { margin-top: 4px; font-size: 11px; color: var(--ink-ghost); }

.sum-item {
  padding: 9px 12px 10px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--sh-xs);
}

.sum-item.today {
  background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--c) 9%, white));
  border-color: color-mix(in srgb, var(--c) 26%, white);
}

.sum-meta { display: flex; align-items: center; gap: 7px; }

.sum-date {
  font-family: var(--serif);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.sum-wd {
  font-size: 10px;
  color: var(--ink-ghost);
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: rgba(240, 235, 226, 0.8);
}

.sum-acts {
  margin-left: auto;
  display: flex;
  gap: 2px;
  opacity: 0.5;
  transition: opacity var(--t);
}

.sum-item:hover .sum-acts,
.sum-item:focus-within .sum-acts { opacity: 1; }

.sum-act {
  font-size: 10.5px;
  color: var(--ink-faint);
  padding: 2px 8px;
  border-radius: 8px;
  transition: background var(--t-fast), color var(--t-fast);
}

.sum-act:hover { background: rgba(255, 255, 255, 0.95); color: var(--ink); }
.sum-act.danger:hover { color: #A4564E; }

.sum-text {
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.78;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
}

.sum-editor {
  padding: 10px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--c) 28%, white);
  box-shadow: var(--sh-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sum-ta {
  min-height: 92px;
  line-height: 1.78;
  resize: vertical;
}

.sum-ed-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sum-ed-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--ink-faint);
}

.sum-date-in {
  width: 128px;
  padding: 4px 8px;
  font-size: 11.5px;
}

.sum-ed-hint {
  margin-left: auto;
  font-size: 10px;
  color: var(--ink-ghost);
}

.rec-sum-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  font-size: 10px;
  color: var(--ink-ghost);
}

/* 总结列表：让「这一列能单独滚动」看得出来 */
.rec-sum-scroll::-webkit-scrollbar { width: 9px; }

.rec-sum-scroll::-webkit-scrollbar-track { background: rgba(150, 138, 122, 0.06); border-radius: 99px; }

.rec-sum-scroll::-webkit-scrollbar-thumb {
  background: rgba(140, 124, 106, 0.34);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.rec-sum-scroll::-webkit-scrollbar-thumb:hover { background: rgba(140, 124, 106, 0.5); background-clip: content-box; }

.rec-flow { margin-top: 2px; }

/* 周柱状图的图例：排期 / 已完成 / 今天 */
.hc-legend2 {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
}

.hc-legend2 .lg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--ink-ghost);
}

.hc-legend2 .lg::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: color-mix(in srgb, #9BAA84 16%, white);
  box-shadow: inset 0 0 0 1px rgba(150, 138, 122, 0.12);
}

.hc-legend2 .lg-done::before { background: #9BAA84; box-shadow: none; }

.hc-legend2 .lg-today::before {
  background: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(150, 138, 122, 0.34);
}

/* 列表还有内容时，底部做一点渐隐，提示「下面还有」 */
.rec-sum { position: relative; }

.rec-sum.has-more::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 22px;
  bottom: 27px;
  height: 18px;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(to top, rgba(252, 250, 245, 0.95), rgba(252, 250, 245, 0));
  pointer-events: none;
}

/* 总结列的滚动条再明确一点，配合底部「还有更早的」提示 */
.rec-sum-scroll::-webkit-scrollbar-track {
  background: rgba(150, 138, 122, 0.1);
  border-radius: 99px;
}

.rec-sum-scroll::-webkit-scrollbar-thumb {
  background: rgba(120, 104, 86, 0.42);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: content-box;
}

/* =====================================================================
   云端版新增：登录门禁 · 账号区块
   ===================================================================== */

body.auth-locked .shell { display: none; }

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 22% 18%, rgba(240, 226, 208, 0.85), transparent 58%),
    radial-gradient(circle at 78% 76%, rgba(196, 212, 215, 0.8), transparent 60%),
    #FAF7F0;
}

.auth-card {
  width: min(400px, 100%);
  padding: 32px 30px 26px;
  border-radius: var(--r-xl);
  background: var(--glass-2);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--sh-lg);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
  animation: authIn 0.42s var(--ease) both;
}

@keyframes authIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.auth-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(150deg, #EFDFC9, #C4D4D7 55%, #CBD7C1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 3px 10px rgba(120, 104, 86, 0.16);
  position: relative;
  overflow: hidden;
}

.auth-mark::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(124, 155, 166, 0.42);
}

.auth-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.auth-brand-text b {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.auth-brand-text span {
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-ghost);
}

.auth-lead {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 16px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: var(--r-pill);
  background: rgba(240, 235, 226, 0.85);
  box-shadow: inset 0 1px 3px rgba(120, 104, 86, 0.1);
}

.auth-tab {
  flex: 1;
  height: 30px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  color: var(--ink-faint);
  transition: background var(--t), color var(--t), box-shadow var(--t);
}

.auth-tab.on {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--sh-xs);
}

.auth-form {
  display: grid;
  gap: 13px;
  margin-top: 18px;
}

.auth-input {
  height: 42px;
  font-size: 14px;
}

.auth-submit {
  --h: 42px;
  margin-top: 3px;
  font-size: 14px;
}

.auth-err {
  display: none;
  font-size: 12px;
  line-height: 1.6;
  color: #A4564E;
  padding: 7px 11px;
  border-radius: 10px;
  background: rgba(214, 160, 148, 0.14);
}

.auth-err.on { display: block; }

.auth-foot {
  margin-top: 16px;
  font-size: 11px;
  line-height: 1.85;
  color: var(--ink-ghost);
}

/* ---------------------------- 设置里的账号 ---------------------------- */

.acct-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--sh-xs);
}

.acct-id {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.acct-mail {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acct-note {
  font-size: 10.5px;
  color: var(--ink-ghost);
}

.acct-acts {
  margin-left: auto;
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

@media (max-width: 480px) {
  .auth-card { padding: 26px 20px 20px; }
  .auth-lead { font-size: 19px; }
  .acct-acts { margin-left: 0; width: 100%; }
}

/* 周图没有数据的那一天：不要留一个空盒子，画成一条基线就行 */
.hc-col.zero .hc-track {
  background: transparent;
  box-shadow: none;
}

.hc-col.today.zero .hc-track {
  background: linear-gradient(to top, rgba(155, 170, 132, 0.22), rgba(155, 170, 132, 0) 42%);
  box-shadow: none;
}

.hc-col.zero .hc-none {
  height: 6px;
  background: rgba(150, 138, 122, 0.16);
}
