/* ==========================================================================
   拾光 FocusBoard — 6 套冷暖双极设计系统（3 暗 3 亮 · 克制微染）
   ========================================================================== */

:root {
  --font-sans: "Inter", "SF Pro Display", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei UI", "Segoe UI", system-ui, sans-serif;
  --font-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "Georgia", serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Cascadia Mono", "Consolas", ui-monospace, monospace;

  /* 1. 暗夜微光 Obsidian Glow（默认 · 暗暖） */
  --bg-canvas: #09090c;
  --bg-card: linear-gradient(180deg, rgba(24, 25, 31, 0.88) 0%, rgba(15, 16, 21, 0.94) 100%);
  --bg-card-solid: #13141a;
  --bg-elevated: rgba(255, 255, 255, 0.045);
  --bg-elevated-hover: rgba(255, 255, 255, 0.08);
  --bg-input: rgba(9, 10, 14, 0.62);
  --bg-pill: rgba(255, 255, 255, 0.055);
  --bg-modal: #14151c;

  --border-subtle: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.16);
  --card-top-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --card-shadow: 0 22px 50px -18px rgba(0, 0, 0, 0.72), 0 2px 10px rgba(0, 0, 0, 0.35);

  --text-primary: #f4f4f6;
  --text-secondary: #a1a1aa;
  --text-muted: #8e8e98;
  --text-on-accent: #140c03;

  /* 动态模式色（随 body[data-mode] 切换） */
  --accent: #f59e0b;
  --accent-2: #fb923c;
  --accent-soft: rgba(245, 158, 11, 0.14);
  --accent-border: rgba(245, 158, 11, 0.34);
  --accent-glow: rgba(245, 158, 11, 0.24);
  --orb-primary: rgba(245, 158, 11, 0.14);
  --orb-secondary: rgba(99, 102, 241, 0.08);

  --success: #34d399;
  --danger: #fb7185;
  --gold: #fbbf24;
  --dial-track: rgba(255, 255, 255, 0.075);
  --dial-tick: rgba(255, 255, 255, 0.16);
  --dial-tick-major: rgba(255, 255, 255, 0.36);

  --radius-card: 22px;
  --radius-inner: 14px;
  --radius-pill: 999px;
  --transition-fast: 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --transition-smooth: 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* 默认暗色模式切换：短休薄荷绿 / 长休星雾紫 */
body[data-mode="short"] {
  --accent: #34d399;
  --accent-2: #2dd4bf;
  --accent-soft: rgba(52, 211, 153, 0.14);
  --accent-border: rgba(52, 211, 153, 0.34);
  --accent-glow: rgba(52, 211, 153, 0.22);
  --orb-primary: rgba(52, 211, 153, 0.12);
  --orb-secondary: rgba(45, 212, 191, 0.07);
}

body[data-mode="long"] {
  --accent: #818cf8;
  --accent-2: #a78bfa;
  --accent-soft: rgba(129, 140, 248, 0.15);
  --accent-border: rgba(129, 140, 248, 0.35);
  --accent-glow: rgba(129, 140, 248, 0.24);
  --orb-primary: rgba(129, 140, 248, 0.14);
  --orb-secondary: rgba(167, 139, 250, 0.08);
}

/* 2. 深海午夜 Midnight Ocean（暗冷） */
html[data-theme="ocean"] {
  --bg-canvas: #070d16;
  --bg-card: linear-gradient(180deg, rgba(16, 26, 42, 0.9) 0%, rgba(11, 19, 32, 0.95) 100%);
  --bg-card-solid: #0f1929;
  --bg-elevated: rgba(148, 197, 255, 0.05);
  --bg-elevated-hover: rgba(148, 197, 255, 0.09);
  --bg-input: rgba(7, 13, 22, 0.66);
  --bg-pill: rgba(148, 197, 255, 0.06);
  --bg-modal: #101b2c;

  --border-subtle: rgba(148, 197, 255, 0.1);
  --border-strong: rgba(148, 197, 255, 0.19);
  --card-top-highlight: inset 0 1px 0 rgba(186, 230, 253, 0.08);

  --text-primary: #eef6ff;
  --text-secondary: #98aec8;
  --text-muted: #7f97b4;
  --text-on-accent: #04131f;

  --accent: #38bdf8;
  --accent-2: #60a5fa;
  --accent-soft: rgba(56, 189, 248, 0.14);
  --accent-border: rgba(56, 189, 248, 0.34);
  --accent-glow: rgba(56, 189, 248, 0.24);
  --orb-primary: rgba(56, 189, 248, 0.14);
  --orb-secondary: rgba(99, 102, 241, 0.09);
}

html[data-theme="ocean"] body[data-mode="short"] {
  --accent: #f59e0b;
  --accent-2: #fbbf24;
  --accent-soft: rgba(245, 158, 11, 0.14);
  --accent-border: rgba(245, 158, 11, 0.34);
  --accent-glow: rgba(245, 158, 11, 0.22);
  --orb-primary: rgba(245, 158, 11, 0.12);
}

html[data-theme="ocean"] body[data-mode="long"] {
  --accent: #a78bfa;
  --accent-2: #c084fc;
  --accent-soft: rgba(167, 139, 250, 0.15);
  --accent-border: rgba(167, 139, 250, 0.35);
  --accent-glow: rgba(167, 139, 250, 0.24);
  --orb-primary: rgba(167, 139, 250, 0.13);
}

/* 3. 幽林墨翠 Deep Forest（暗冷·自然） */
html[data-theme="forest"] {
  --bg-canvas: #080f0c;
  --bg-card: linear-gradient(180deg, rgba(16, 29, 23, 0.9) 0%, rgba(11, 21, 17, 0.95) 100%);
  --bg-card-solid: #101e18;
  --bg-elevated: rgba(167, 243, 208, 0.048);
  --bg-elevated-hover: rgba(167, 243, 208, 0.088);
  --bg-input: rgba(7, 15, 11, 0.66);
  --bg-pill: rgba(167, 243, 208, 0.06);
  --bg-modal: #11201a;

  --border-subtle: rgba(167, 243, 208, 0.095);
  --border-strong: rgba(167, 243, 208, 0.18);
  --card-top-highlight: inset 0 1px 0 rgba(209, 250, 229, 0.08);

  --text-primary: #effaf4;
  --text-secondary: #98b5a7;
  --text-muted: #7f9e8f;
  --text-on-accent: #041911;

  --accent: #34d399;
  --accent-2: #2dd4bf;
  --accent-soft: rgba(52, 211, 153, 0.14);
  --accent-border: rgba(52, 211, 153, 0.34);
  --accent-glow: rgba(52, 211, 153, 0.22);
  --orb-primary: rgba(52, 211, 153, 0.13);
  --orb-secondary: rgba(56, 189, 248, 0.07);
}

html[data-theme="forest"] body[data-mode="short"] {
  --accent: #fbbf24;
  --accent-2: #f59e0b;
  --accent-soft: rgba(251, 191, 36, 0.14);
  --accent-border: rgba(251, 191, 36, 0.34);
  --accent-glow: rgba(251, 191, 36, 0.22);
  --orb-primary: rgba(251, 191, 36, 0.12);
}

html[data-theme="forest"] body[data-mode="long"] {
  --accent: #60a5fa;
  --accent-2: #818cf8;
  --accent-soft: rgba(96, 165, 250, 0.15);
  --accent-border: rgba(96, 165, 250, 0.35);
  --accent-glow: rgba(96, 165, 250, 0.22);
  --orb-primary: rgba(96, 165, 250, 0.13);
}

/* 浅色系通用基础（温润暖纸 / 晴空雾蓝 / 绯樱暮粉共享） */
html[data-scheme="light"] {
  --text-on-accent: #ffffff;
  --success: #2b7a58;
  --danger: #c44354;
  --gold: #c78319;
}

/* 4. 温润暖纸 Warm Editorial（亮暖） */
html[data-theme="light"] {
  --bg-canvas: #f4efe6;
  --bg-card: linear-gradient(180deg, rgba(253, 251, 246, 0.96) 0%, rgba(250, 246, 238, 0.94) 100%);
  --bg-card-solid: #fcfaf4;
  --bg-elevated: rgba(42, 33, 23, 0.04);
  --bg-elevated-hover: rgba(42, 33, 23, 0.075);
  --bg-input: rgba(242, 236, 224, 0.78);
  --bg-pill: rgba(42, 33, 23, 0.05);
  --bg-modal: #fcfaf5;

  --border-subtle: rgba(42, 33, 23, 0.09);
  --border-strong: rgba(42, 33, 23, 0.17);
  --card-top-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --card-shadow: 0 18px 40px -20px rgba(68, 48, 24, 0.18), 0 2px 8px rgba(68, 48, 24, 0.06);

  --text-primary: #1f1a15;
  --text-secondary: #5c5347;
  --text-muted: #6e6457;
  --text-on-accent: #fffcf7;

  --accent: #c85a2b;
  --accent-2: #df7744;
  --accent-soft: rgba(200, 90, 43, 0.11);
  --accent-border: rgba(200, 90, 43, 0.28);
  --accent-glow: rgba(200, 90, 43, 0.16);
  --orb-primary: rgba(217, 119, 68, 0.12);
  --orb-secondary: rgba(71, 128, 102, 0.08);

  --dial-track: rgba(42, 33, 23, 0.08);
  --dial-tick: rgba(42, 33, 23, 0.14);
  --dial-tick-major: rgba(42, 33, 23, 0.34);
}

html[data-theme="light"] body[data-mode="short"] {
  --accent: #2b7a58;
  --accent-2: #3b966e;
  --accent-soft: rgba(43, 122, 88, 0.11);
  --accent-border: rgba(43, 122, 88, 0.28);
  --accent-glow: rgba(43, 122, 88, 0.15);
  --orb-primary: rgba(43, 122, 88, 0.11);
}

html[data-theme="light"] body[data-mode="long"] {
  --accent: #4d5c96;
  --accent-2: #6979b8;
  --accent-soft: rgba(77, 92, 150, 0.11);
  --accent-border: rgba(77, 92, 150, 0.28);
  --accent-glow: rgba(77, 92, 150, 0.15);
  --orb-primary: rgba(77, 92, 150, 0.11);
}

/* 5. 晴空雾蓝 Clear Mist（亮冷） */
html[data-theme="mist"] {
  --bg-canvas: #edf2f7;
  --bg-card: linear-gradient(180deg, rgba(252, 254, 255, 0.96) 0%, rgba(246, 249, 253, 0.94) 100%);
  --bg-card-solid: #fafcff;
  --bg-elevated: rgba(23, 37, 61, 0.042);
  --bg-elevated-hover: rgba(23, 37, 61, 0.078);
  --bg-input: rgba(232, 239, 247, 0.8);
  --bg-pill: rgba(23, 37, 61, 0.052);
  --bg-modal: #fbfdff;

  --border-subtle: rgba(23, 37, 61, 0.095);
  --border-strong: rgba(23, 37, 61, 0.175);
  --card-top-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --card-shadow: 0 18px 40px -20px rgba(25, 48, 82, 0.15), 0 2px 8px rgba(25, 48, 82, 0.05);

  --text-primary: #131d2b;
  --text-secondary: #4a5a70;
  --text-muted: #5f7087;
  --text-on-accent: #f8fbff;

  --accent: #2563eb;
  --accent-2: #3b82f6;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --accent-border: rgba(37, 99, 235, 0.28);
  --accent-glow: rgba(37, 99, 235, 0.16);
  --orb-primary: rgba(59, 130, 246, 0.12);
  --orb-secondary: rgba(14, 165, 233, 0.08);

  --dial-track: rgba(23, 37, 61, 0.085);
  --dial-tick: rgba(23, 37, 61, 0.14);
  --dial-tick-major: rgba(23, 37, 61, 0.34);
}

html[data-theme="mist"] body[data-mode="short"] {
  --accent: #1f8a65;
  --accent-2: #2ea37a;
  --accent-soft: rgba(31, 138, 101, 0.11);
  --accent-border: rgba(31, 138, 101, 0.28);
  --accent-glow: rgba(31, 138, 101, 0.15);
  --orb-primary: rgba(31, 138, 101, 0.11);
}

html[data-theme="mist"] body[data-mode="long"] {
  --accent: #c86d28;
  --accent-2: #de8540;
  --accent-soft: rgba(200, 109, 40, 0.11);
  --accent-border: rgba(200, 109, 40, 0.28);
  --accent-glow: rgba(200, 109, 40, 0.15);
  --orb-primary: rgba(200, 109, 40, 0.11);
}

/* 6. 绯樱暮粉 Rosy Blush（亮暖·柔和） */
html[data-theme="blush"] {
  --bg-canvas: #f7f0f1;
  --bg-card: linear-gradient(180deg, rgba(254, 251, 252, 0.96) 0%, rgba(251, 246, 247, 0.94) 100%);
  --bg-card-solid: #fdfafb;
  --bg-elevated: rgba(66, 33, 42, 0.042);
  --bg-elevated-hover: rgba(66, 33, 42, 0.078);
  --bg-input: rgba(244, 234, 236, 0.78);
  --bg-pill: rgba(66, 33, 42, 0.052);
  --bg-modal: #fefbfc;

  --border-subtle: rgba(66, 33, 42, 0.095);
  --border-strong: rgba(66, 33, 42, 0.175);
  --card-top-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --card-shadow: 0 18px 40px -20px rgba(96, 42, 56, 0.15), 0 2px 8px rgba(96, 42, 56, 0.05);

  --text-primary: #26171b;
  --text-secondary: #684f56;
  --text-muted: #7c6269;
  --text-on-accent: #fffafc;

  --accent: #c0526c;
  --accent-2: #d96b82;
  --accent-soft: rgba(192, 82, 108, 0.11);
  --accent-border: rgba(192, 82, 108, 0.28);
  --accent-glow: rgba(192, 82, 108, 0.16);
  --orb-primary: rgba(217, 107, 130, 0.13);
  --orb-secondary: rgba(234, 158, 120, 0.09);

  --dial-track: rgba(66, 33, 42, 0.085);
  --dial-tick: rgba(66, 33, 42, 0.14);
  --dial-tick-major: rgba(66, 33, 42, 0.34);
}

html[data-theme="blush"] body[data-mode="short"] {
  --accent: #2a8268;
  --accent-2: #3b9c7f;
  --accent-soft: rgba(42, 130, 104, 0.11);
  --accent-border: rgba(42, 130, 104, 0.28);
  --accent-glow: rgba(42, 130, 104, 0.15);
  --orb-primary: rgba(42, 130, 104, 0.11);
}

html[data-theme="blush"] body[data-mode="long"] {
  --accent: #5b67a8;
  --accent-2: #7683c4;
  --accent-soft: rgba(91, 103, 168, 0.11);
  --accent-border: rgba(91, 103, 168, 0.28);
  --accent-glow: rgba(91, 103, 168, 0.15);
  --orb-primary: rgba(91, 103, 168, 0.11);
}

/* 基础重置 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
  overflow-x: hidden;
}

button,
input,
textarea {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   环境光晕与微纹理背景
   ========================================================================== */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  transition: background var(--transition-smooth), transform 1.2s ease, opacity 0.6s ease;
}

.ambient-orb-primary {
  width: 620px;
  height: 620px;
  top: -210px;
  left: -130px;
  background: radial-gradient(circle, var(--orb-primary) 0%, transparent 70%);
}

.ambient-orb-secondary {
  width: 560px;
  height: 560px;
  bottom: -220px;
  right: -120px;
  background: radial-gradient(circle, var(--orb-secondary) 0%, transparent 72%);
}

body.is-running .ambient-orb-primary {
  animation: orbBreath 7.5s ease-in-out infinite;
}

@keyframes orbBreath {
  0%, 100% {
    transform: scale(1) translate(0, 0);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.12) translate(22px, 16px);
    opacity: 1;
  }
}

.ambient-noise {
  position: absolute;
  inset: 0;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

html[data-scheme="light"] .ambient-noise {
  opacity: 0.025;
}

/* ==========================================================================
   应用外框与顶栏
   ========================================================================== */
.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 2px 2px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--card-top-highlight);
  display: grid;
  place-items: center;
  color: var(--accent);
  flex-shrink: 0;
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand-name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.brand-tag {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-pill);
}

.brand-sub {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
}

/* 日期导航胶囊 */
.date-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--card-top-highlight), 0 8px 24px -14px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
}

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.icon-btn:hover {
  background: var(--bg-elevated-hover);
  color: var(--text-primary);
}

.icon-btn:active {
  transform: scale(0.93);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.date-center {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
}

.date-main {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.date-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--bg-pill);
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.date-badge.is-today {
  background: var(--bg-elevated-hover);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.today-jump-btn {
  margin-left: 2px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-elevated-hover);
  border: 1px solid var(--border-strong);
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.today-jump-btn:hover {
  background: var(--text-primary);
  color: var(--bg-card-solid);
}

/* 顶栏右侧操作 */
.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
}

.theme-picker {
  position: relative;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--card-top-highlight);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover,
.theme-toggle-btn[aria-expanded="true"] {
  border-color: var(--border-strong);
  background: var(--bg-elevated-hover);
  transform: translateY(-1px);
}

.theme-current-swatch {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-canvas) 44%, var(--accent) 46%);
  border: 1.5px solid var(--border-strong);
  flex-shrink: 0;
}

.theme-chevron {
  width: 13px;
  height: 13px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.theme-toggle-btn[aria-expanded="true"] .theme-chevron {
  transform: rotate(180deg);
}

/* 2×3 主题色卡浮层 */
.theme-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 376px;
  z-index: 40;
  background: var(--bg-modal);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 24px 52px -14px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: popIn 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

html[data-scheme="light"] .theme-popover {
  box-shadow: 0 22px 46px -16px rgba(32, 24, 18, 0.22);
}

.theme-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.theme-group-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding-left: 2px;
}

.theme-swatch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.theme-swatch-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding: 9px 10px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  text-align: left;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.theme-swatch-card:hover {
  background: var(--bg-elevated-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.theme-swatch-card.is-selected {
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.swatch-orb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.16);
  position: relative;
}

.theme-swatch-card.is-selected .swatch-orb::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
}

.swatch-dark   { background: linear-gradient(135deg, #13141a 48%, #f59e0b 50%); }
.swatch-ocean  { background: linear-gradient(135deg, #0f1929 48%, #38bdf8 50%); }
.swatch-forest { background: linear-gradient(135deg, #101e18 48%, #34d399 50%); }
.swatch-light  { background: linear-gradient(135deg, #f4efe6 48%, #c85a2b 50%); border-color: rgba(42, 33, 23, 0.2); }
.swatch-mist   { background: linear-gradient(135deg, #edf2f7 48%, #2563eb 50%); border-color: rgba(23, 37, 61, 0.2); }
.swatch-blush  { background: linear-gradient(135deg, #f7f0f1 48%, #c0526c 50%); border-color: rgba(66, 33, 42, 0.2); }

.swatch-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.swatch-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
}

.swatch-tone {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.25;
}

/* 导出按钮降级为精致描边次级按钮，主色留给开始专注 */
.export-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: var(--card-top-highlight);
  transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.export-cta-btn svg {
  width: 15px;
  height: 15px;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.export-cta-btn:hover {
  transform: translateY(-1px);
  background: var(--bg-elevated-hover);
  border-color: var(--text-secondary);
}

.export-cta-btn:hover svg {
  color: var(--text-primary);
}

.export-cta-btn:active {
  transform: translateY(0) scale(0.98);
}

/* ==========================================================================
   Bento 主网格与卡片通用质感
   ========================================================================== */
.bento-grid {
  display: grid;
  grid-template-columns: 392px minmax(330px, 1.08fr) minmax(320px, 1fr);
  gap: 16px;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--card-top-highlight), var(--card-shadow);
  backdrop-filter: blur(18px);
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  transition: opacity var(--transition-smooth), filter var(--transition-smooth), border-color var(--transition-fast), background var(--transition-smooth), box-shadow var(--transition-smooth);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 32px;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.count-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--bg-pill);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   左列：番茄钟主卡 + 统计三联子格
   ========================================================================== */
.col-timer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.timer-card {
  flex: 1;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px 20px;
}

.timer-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mode-tabs {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
}

.mode-tab {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.mode-tab:hover {
  color: var(--text-primary);
}

.mode-tab.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--accent-border);
}

.mode-tab.is-confirming {
  background: rgba(251, 113, 133, 0.16);
  color: var(--danger);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(251, 113, 133, 0.48);
}

.zen-exit-btn {
  display: none;
  position: fixed;
  top: 24px;
  right: 28px;
  z-index: 30;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  backdrop-filter: blur(12px);
  transition: all var(--transition-fast);
}

.zen-exit-btn svg {
  width: 15px;
  height: 15px;
}

.zen-exit-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.timer-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn-soft {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.icon-btn-soft svg {
  width: 16px;
  height: 16px;
}

.icon-btn-soft:hover {
  background: var(--bg-elevated-hover);
  color: var(--text-primary);
}

.icon-btn-soft.is-muted {
  color: var(--text-muted);
}

.icon-btn-soft .sound-off-icon {
  display: none;
}

.icon-btn-soft.is-muted .sound-on-icon {
  display: none;
}

.icon-btn-soft.is-muted .sound-off-icon {
  display: block;
}

/* 自定义时长弹层 */
.duration-popover {
  position: absolute;
  top: 60px;
  right: 18px;
  left: 18px;
  z-index: 20;
  background: var(--bg-modal);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 20px 44px -12px rgba(0, 0, 0, 0.55);
  animation: popIn 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.duration-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.dur-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dur-field span {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.dur-field input {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  outline: none;
  transition: border-color var(--transition-fast);
}

.dur-field input:focus {
  border-color: var(--accent);
}

.duration-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.ghost-xs-btn,
.primary-xs-btn {
  padding: 6px 12px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.ghost-xs-btn {
  color: var(--text-secondary);
  background: var(--bg-elevated);
}

.ghost-xs-btn:hover {
  color: var(--text-primary);
  background: var(--bg-elevated-hover);
}

.primary-xs-btn {
  background: var(--accent);
  color: var(--text-on-accent);
}

/* 精密 SVG 仪表盘 */
.dial-wrap {
  position: relative;
  width: 266px;
  height: 266px;
  display: grid;
  place-items: center;
  margin: 6px 0;
}

.dial-glow-halo {
  position: absolute;
  width: 196px;
  height: 196px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.45;
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
  pointer-events: none;
}

body.is-running .dial-glow-halo {
  opacity: 0.85;
  transform: scale(1.06);
}

.dial-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.grad-stop-start {
  stop-color: var(--accent);
}

.grad-stop-end {
  stop-color: var(--accent-2);
}

.dial-tick {
  stroke: var(--dial-tick);
  stroke-width: 1.3;
  stroke-linecap: round;
  transition: stroke var(--transition-fast);
}

.dial-tick.is-major {
  stroke: var(--dial-tick-major);
  stroke-width: 1.8;
}

.dial-track {
  fill: none;
  stroke: var(--dial-track);
  stroke-width: 7;
}

.dial-progress {
  fill: none;
  stroke: url(#dialGrad);
  stroke-width: 7.5;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 140px 140px;
  transition: stroke-dashoffset 260ms linear;
}

.dial-tip {
  fill: var(--text-primary);
  stroke: var(--accent);
  stroke-width: 2.5;
  filter: drop-shadow(0 0 6px var(--accent));
  transition: opacity 200ms ease;
}

.dial-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  pointer-events: none;
}

.timer-status-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}

.timer-digits {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 54px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-shadow: 0 4px 24px var(--accent-glow);
}

html[data-scheme="light"] .timer-digits {
  text-shadow: none;
}

.timer-sub-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* 当前绑定任务胶囊 */
.active-task-pill {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 13px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 12.5px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.active-task-pill.has-task {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--text-primary);
}

.active-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.active-task-pill.has-task .active-dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

body.is-running .active-task-pill.has-task .active-dot {
  animation: pulseDot 1.6s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.45);
    opacity: 0.55;
  }
}

.active-task-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-task-pomos {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
  flex-shrink: 0;
}

html[data-scheme="light"] .active-task-pomos {
  background: rgba(255, 255, 255, 0.72);
}

.pomo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.6px solid currentColor;
  display: inline-block;
  flex-shrink: 0;
}

.clear-bind-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.clear-bind-btn:hover {
  background: var(--bg-elevated-hover);
  color: var(--text-primary);
}

.clear-bind-btn svg {
  width: 13px;
  height: 13px;
}

/* 控制栏 */
.timer-controls {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 10px;
}

.ctrl-round-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.ctrl-round-btn svg {
  width: 18px;
  height: 18px;
}

.ctrl-round-btn:hover {
  background: var(--bg-elevated-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.ctrl-round-btn.is-confirming {
  width: auto;
  padding: 0 13px;
  border-radius: var(--radius-pill);
  background: rgba(251, 113, 133, 0.16);
  border-color: rgba(251, 113, 133, 0.5);
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
  gap: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ctrl-round-btn.is-confirming::after {
  content: "再点重置";
  white-space: nowrap;
}

.ctrl-main-btn {
  height: 46px;
  min-width: 152px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: var(--text-on-accent);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 28px -10px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

.ctrl-main-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.ctrl-main-btn:active {
  transform: scale(0.97);
}

.ctrl-main-icon {
  display: grid;
  place-items: center;
}

.ctrl-main-icon svg {
  width: 16px;
  height: 16px;
}

.ctrl-main-btn .pause-icon {
  display: none;
}

body.is-running .ctrl-main-btn .play-icon {
  display: none;
}

body.is-running .ctrl-main-btn .pause-icon {
  display: grid;
}

/* 复盘内嵌数据概览三联子格 */
.stats-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1.3fr;
  gap: 8px;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.stat-tile {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
}

.stat-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-tile-progress {
  gap: 8px;
}

.stat-top-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.stat-tile-progress .stat-value {
  font-size: 14.5px;
}

.stat-bar-track {
  width: 100%;
  height: 5px;
  border-radius: var(--radius-pill);
  background: var(--dial-track);
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   中列：今日待办
   ========================================================================== */
.todo-card {
  min-height: 520px;
}

.filter-tabs {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
}

.filter-tab {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.filter-tab:hover {
  color: var(--text-primary);
}

.filter-tab.is-active {
  background: var(--bg-card-solid);
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
}

/* 跨日顺延提示条（克制中性强调，不与计时主色抢戏） */
.carry-over-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  font-size: 12.5px;
  animation: popIn 200ms ease;
}

.carry-over-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text-primary);
}

.carry-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: var(--text-secondary);
  flex-shrink: 0;
}

.carry-over-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.carry-btn {
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--text-primary);
  color: var(--bg-card-solid);
  font-size: 11.5px;
  font-weight: 600;
  transition: opacity var(--transition-fast);
}

.carry-btn:hover {
  opacity: 0.88;
}

.carry-dismiss-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
}

.carry-dismiss-btn:hover {
  background: var(--bg-elevated-hover);
  color: var(--text-primary);
}

.carry-dismiss-btn svg {
  width: 13px;
  height: 13px;
}

/* 快速输入行 */
.todo-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 5px 5px 14px;
  border-radius: 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  margin-bottom: 12px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  flex-shrink: 0;
}

.todo-input-row:focus-within {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.todo-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-size: 13.5px;
  height: 32px;
}

.todo-input::placeholder {
  color: var(--text-muted);
}

.input-star-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.input-star-btn svg {
  width: 16px;
  height: 16px;
}

.input-star-btn:hover {
  color: var(--gold);
  background: var(--bg-elevated);
}

.input-star-btn.is-starred {
  color: var(--gold);
}

.input-star-btn.is-starred svg {
  fill: var(--gold);
}

.add-todo-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--bg-elevated-hover);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.add-todo-btn svg {
  width: 17px;
  height: 17px;
}

.add-todo-btn:hover {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--bg-card-solid);
  transform: scale(1.03);
}

/* 待办列表滚动容器 */
.todo-list-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  margin-right: -4px;
}

.todo-list-wrap::-webkit-scrollbar,
.markdown-preview::-webkit-scrollbar {
  width: 5px;
}

.todo-list-wrap::-webkit-scrollbar-thumb,
.markdown-preview::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 99px;
}

.todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 13px;
  background: var(--bg-elevated);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.todo-item:hover {
  background: var(--bg-elevated-hover);
  border-color: var(--border-subtle);
}

.todo-item.is-focused {
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.todo-item.is-done {
  opacity: 0.58;
}

/* 勾选完成 600ms 延迟过渡动画 */
.todo-item.is-completing {
  opacity: 0.65;
  transform: scale(0.99);
  transition: opacity 420ms ease, transform 420ms ease, background 260ms ease;
}

.todo-item.is-completing .todo-check-btn {
  background: var(--success);
  border-color: var(--success);
  transform: scale(1.08);
}

.todo-item.is-completing .todo-check-btn svg {
  opacity: 1;
  transform: scale(1);
}

.todo-item.is-completing .todo-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* 自定义复选框 */
.todo-check-btn {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.7px solid var(--border-strong);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--text-on-accent);
  transition: all var(--transition-fast);
}

.todo-check-btn svg {
  width: 12px;
  height: 12px;
  opacity: 0;
  transform: scale(0.6);
  transition: all var(--transition-fast);
}

.todo-check-btn:hover {
  border-color: var(--accent);
}

.todo-item.is-done .todo-check-btn {
  background: var(--success);
  border-color: var(--success);
}

.todo-item.is-done .todo-check-btn svg {
  opacity: 1;
  transform: scale(1);
}

.todo-body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.todo-text {
  font-size: 13.5px;
  line-height: 1.45;
  word-break: break-word;
  cursor: text;
}

.todo-item.is-done .todo-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.todo-edit-input {
  width: 100%;
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--bg-input);
  font-size: 13.5px;
  outline: none;
}

.todo-pomo-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.todo-item.is-focused .todo-pomo-badge {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}

.todo-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.todo-action-btn {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  opacity: 0.72;
  transition: all var(--transition-fast);
}

.todo-item:hover .todo-action-btn,
.todo-action-btn.is-active {
  opacity: 1;
}

.todo-action-btn svg {
  width: 14.5px;
  height: 14.5px;
}

.todo-action-btn:hover {
  background: var(--bg-elevated-hover);
  color: var(--text-primary);
}

.todo-action-btn.star-btn.is-active {
  color: var(--gold);
}

.todo-action-btn.star-btn.is-active svg {
  fill: var(--gold);
}

.todo-action-btn.focus-btn.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.todo-action-btn.delete-btn:hover {
  color: var(--danger);
}

/* 空状态与底部 */
.todo-empty {
  height: 100%;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 12px;
}

.empty-glyph svg {
  width: 44px;
  height: 44px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.empty-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.empty-sub {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.todo-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.todo-footer-left {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.shortcut-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 8px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.shortcut-trigger-btn svg {
  width: 13.5px;
  height: 13.5px;
}

.shortcut-trigger-btn:hover {
  background: var(--bg-elevated-hover);
  color: var(--text-primary);
}

.kbd-inline,
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 5px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
}

.kbd {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  font-size: 11.5px;
  color: var(--text-primary);
  box-shadow: inset 0 -1px 0 var(--border-subtle);
}

.clear-done-btn {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 3px 9px;
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.clear-done-btn:hover {
  background: var(--bg-elevated-hover);
  color: var(--danger);
}

/* ==========================================================================
   右列：每日复盘
   ========================================================================== */
.review-card {
  min-height: 520px;
}

.save-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.save-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
}

.mood-section {
  margin-bottom: 16px;
  flex-shrink: 0;
}

.section-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.section-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.mood-hint {
  font-size: 11.5px;
  color: var(--text-muted);
}

.mood-pills {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.mood-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 34px;
  border-radius: 11px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.mood-pill:hover {
  background: var(--bg-elevated-hover);
  color: var(--text-primary);
}

.mood-pill.is-selected {
  background: var(--bg-card-solid);
  border-color: var(--text-secondary);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.22);
}

.mood-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.mood-1 { background: #94a3b8; }
.mood-2 { background: #60a5fa; }
.mood-3 { background: #34d399; }
.mood-4 { background: #f59e0b; }
.mood-5 { background: #a78bfa; }

html[data-scheme="light"] .mood-5 {
  background: #7c5cdb;
}

.review-prompts {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-height: 0;
}

.prompt-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

.prompt-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.prompt-accent {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  display: inline-block;
}

.accent-gold { background: var(--gold); }
.accent-coral { background: #fb7185; }
.accent-sage { background: var(--success); }

.prompt-textarea {
  flex: 1;
  width: 100%;
  min-height: 68px;
  resize: none;
  padding: 11px 13px;
  border-radius: 13px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  font-size: 13px;
  line-height: 1.6;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.prompt-textarea::placeholder {
  color: var(--text-muted);
}

.prompt-textarea:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ==========================================================================
   导出 Markdown 模态弹窗
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 10, 0.68);
  backdrop-filter: blur(8px);
}

html[data-scheme="light"] .modal-backdrop {
  background: rgba(30, 24, 16, 0.36);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(740px, 100%);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-modal);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  box-shadow: 0 28px 70px -16px rgba(0, 0, 0, 0.6);
  padding: 22px 24px;
  animation: popIn 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-title {
  margin: 0 0 3px;
  font-size: 17px;
  font-weight: 700;
}

.modal-sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 13px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  margin-bottom: 12px;
}

.switch-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.switch-label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  width: 36px;
  height: 20px;
  border-radius: 99px;
  background: var(--border-strong);
  padding: 2px;
  display: inline-flex;
  align-items: center;
  transition: background var(--transition-fast);
}

.switch-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform var(--transition-fast);
}

.switch-label input:checked + .switch-track {
  background: var(--accent);
}

.switch-label input:checked + .switch-track .switch-thumb {
  transform: translateX(16px);
}

.modal-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-pill);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

/* 快捷键速查弹窗 */
.modal-panel-sm {
  width: min(480px, 100%);
}

.shortcut-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 11px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
}

.shortcut-desc {
  font-size: 13px;
  color: var(--text-primary);
}

.shortcut-keys {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  font-size: 11.5px;
  color: var(--text-muted);
}

.shortcut-note {
  font-size: 12px;
  color: var(--text-secondary);
}

/* 数据备份与恢复弹窗 */
.backup-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.backup-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 13px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  margin-bottom: 10px;
}

.backup-section-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.backup-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.backup-section-hint {
  font-size: 11.5px;
  color: var(--text-muted);
}

.backup-full-btn {
  width: 100%;
  justify-content: center;
}

.backup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.backup-actions .ghost-btn {
  justify-content: center;
}

.backup-danger-btn:hover {
  color: var(--danger);
  border-color: rgba(251, 113, 133, 0.45);
}

.backup-danger-btn.is-confirming {
  background: rgba(251, 113, 133, 0.14);
  border-color: rgba(251, 113, 133, 0.5);
  color: var(--danger);
}

.pwa-install-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 13px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  margin-top: 2px;
}

.pwa-install-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pwa-install-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.pwa-install-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.pwa-install-btn {
  background: var(--text-primary);
  color: var(--bg-card-solid);
  flex-shrink: 0;
}

.pwa-install-btn:hover {
  opacity: 0.9;
  background: var(--text-primary);
  color: var(--bg-card-solid);
}

.meta-count {
  font-size: 12px;
  color: var(--text-muted);
}

.modal-preview-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
}

.markdown-preview {
  width: 100%;
  margin: 0;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.68;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-y: auto;
  max-height: 44vh;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.ghost-btn,
.primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.ghost-btn svg,
.primary-btn svg {
  width: 16px;
  height: 16px;
}

.ghost-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.ghost-btn:hover {
  background: var(--bg-elevated-hover);
  border-color: var(--border-strong);
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: var(--text-on-accent);
  box-shadow: 0 8px 20px -8px var(--accent-glow);
}

.primary-btn:hover {
  filter: brightness(1.06);
}

/* ==========================================================================
   Toast 轻提示
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-modal);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 14px 32px -10px rgba(0, 0, 0, 0.55);
  animation: toastIn 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.toast-action-btn {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.toast-action-btn:hover {
  background: var(--accent);
  color: var(--text-on-accent);
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(6px);
  transition: all 220ms ease;
}

/* ==========================================================================
   运行即沉浸 & 全屏专注视图（Zen Mode）
   ========================================================================== */
body.is-running:not(.is-zen) .todo-card,
body.is-running:not(.is-zen) .review-card {
  opacity: 0.4;
  filter: saturate(0.25);
}

body.is-running:not(.is-zen) .todo-card:hover,
body.is-running:not(.is-zen) .todo-card:focus-within,
body.is-running:not(.is-zen) .review-card:hover,
body.is-running:not(.is-zen) .review-card:focus-within {
  opacity: 1;
  filter: saturate(1);
}

body.is-running:not(.is-zen) .topbar-actions {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
}

body.is-running:not(.is-zen) .topbar:hover .topbar-actions,
body.is-running:not(.is-zen) .topbar:focus-within .topbar-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

body.is-running:not(.is-zen) .date-nav {
  opacity: 0.55;
  transition: opacity var(--transition-smooth);
}

body.is-running:not(.is-zen) .date-nav:hover {
  opacity: 1;
}

/* 全屏沉浸专注视图：只保留超大倒计时、当前任务名、主暂停/开始键 */
body.is-zen .topbar,
body.is-zen .stats-strip,
body.is-zen .todo-card,
body.is-zen .review-card,
body.is-zen .timer-head,
body.is-zen .duration-popover,
body.is-zen .ctrl-round-btn {
  display: none !important;
}

body.is-zen .zen-exit-btn {
  display: inline-flex;
}

body.is-zen .app-shell {
  justify-content: center;
  align-items: center;
  padding: 28px 20px;
}

body.is-zen .bento-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1;
}

body.is-zen .col-timer {
  width: min(460px, 100%);
  align-items: center;
  justify-content: center;
}

body.is-zen .timer-card {
  width: 100%;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  padding: 20px 16px;
  gap: 22px;
  justify-content: center;
}

body.is-zen .dial-wrap {
  width: min(340px, 78vw);
  height: min(340px, 78vw);
  margin: 0;
}

body.is-zen .dial-glow-halo {
  width: 268px;
  height: 268px;
}

body.is-zen .timer-digits {
  font-size: 72px;
}

body.is-zen .timer-status-label {
  font-size: 13px;
}

body.is-zen .timer-sub-label {
  font-size: 13px;
}

body.is-zen .active-task-pill {
  max-width: 380px;
  justify-content: center;
  padding: 10px 16px;
}

body.is-zen .active-task-pill:not(.has-task) {
  opacity: 0.6;
}

body.is-zen .ctrl-main-btn {
  height: 50px;
  min-width: 176px;
  font-size: 15px;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   2K / 4K 超高桌面屏纵向收紧居中 + 响应式适配
   ========================================================================== */
@media (min-width: 1180px) and (min-height: 980px) {
  body:not(.is-zen) {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
  }

  body:not(.is-zen) .app-shell {
    width: 100%;
    min-height: 0;
    height: clamp(780px, 76vh, 920px);
    padding-top: 12px;
    padding-bottom: 12px;
  }
}

@media (max-width: 1179px) {
  .bento-grid {
    grid-template-columns: 370px 1fr;
    grid-template-areas:
      "timer todo"
      "timer review";
  }

  .col-timer {
    grid-area: timer;
  }

  .todo-card {
    grid-area: todo;
    min-height: 360px;
  }

  .review-card {
    grid-area: review;
    min-height: 360px;
  }
}

@media (max-width: 859px) {
  .app-shell {
    padding: 14px 16px 24px;
  }

  .topbar {
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 12px;
  }

  .date-nav {
    justify-content: center;
  }

  .topbar-actions {
    justify-content: space-between;
  }

  .theme-popover {
    left: 0;
    right: auto;
    width: min(360px, calc(100vw - 32px));
  }

  .bento-grid {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }

  .col-timer,
  .todo-card,
  .review-card {
    grid-area: auto;
    min-height: auto;
  }

  .todo-list-wrap {
    max-height: 360px;
  }
}
