/* ============================================================
   不鸽 · Deadline Radar —— 界面样式【四版】
   设计基调：暖纸底 + 墨黑侧栏 + 荧光绿点题；数据用等宽数字。
   四版沿用三版的占比 / 职业规划 / 档案导入样式；二版的音乐、自习室、固定安排样式保留。
   ============================================================ */

/* ---------- 主题：纸感（默认） ---------- */
:root {
  --paper: #F4F1E9;
  --paper-2: #EDE9DE;
  --card: #FFFFFF;
  --rail: #FAF8F2;
  --modal: #FCFAF5;
  --chip: #FCFBF7;
  --input: #FFFFFF;
  --ghost: rgba(255, 255, 255, .45);
  --ghost-btn: rgba(255, 255, 255, .7);

  --ink: #16191D;
  --ink-2: #2B3036;
  --muted: #6C7076;
  --muted-2: #9A9D9F;

  --line: #E5DFD1;
  --line-soft: #EFEAE0;
  --line-strong: #D9D2C1;

  --dark: #14171A;
  --dark-2: #1C2125;
  --side-bg: #14171A;
  --hero-bg: #14171A;
  --on-dark: #F3F1EA;
  --on-dark-muted: rgba(243, 241, 234, .56);
  --side-fg: #E8E5DC;

  --lime: #D9F26B;
  --lime-ink: #1B2110;
  --hl: rgba(217, 242, 107, .85);

  --btn-solid-bg: #16191D;
  --btn-solid-fg: #FFFFFF;

  --bar-a: #9DBFAE;
  --bar-b: #6E9C85;

  --red: #BF452D;
  --amber: #B8761B;
  --green: #2A6B54;
  --blue: #33538C;
  --warn-bg: #FDF6E7;
  --warn-line: #F0E2C4;
  --flash-bg: #FBF7E2;
  --flash-line: #E4D9A8;

  --scroll: #DAD4C5;
  --scroll-hover: #C7C0AF;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --shadow-sm: 0 1px 2px rgba(22, 25, 29, .05);
  --shadow-md: 0 20px 45px -32px rgba(22, 25, 29, .55);
  --num: "Bahnschrift", "DIN Alternate", "Segoe UI", system-ui, sans-serif;
}

/* ---------- 主题：墨黑 + 荧光绿 ---------- */
[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0B0D0F;
  --paper-2: #171B1E;
  --card: #15191C;
  --rail: #101316;
  --modal: #14181B;
  --chip: #1A1F23;
  --input: #171C1F;
  --ghost: rgba(255, 255, 255, .035);
  --ghost-btn: rgba(255, 255, 255, .07);

  --ink: #ECEEEA;
  --ink-2: #D6DAD5;
  --muted: #9AA0A6;
  --muted-2: #767D83;

  --line: #272D32;
  --line-soft: #1F2528;
  --line-strong: #39424A;

  --dark: #12161A;
  --dark-2: #1A2026;
  --side-bg: #000000;
  --hero-bg: #12161A;
  --on-dark: #F3F1EA;
  --on-dark-muted: rgba(243, 241, 234, .55);
  --side-fg: #E8E5DC;

  --lime: #C9F24E;
  --lime-ink: #101400;
  --hl: rgba(201, 242, 78, .7);

  --btn-solid-bg: #ECEEEA;
  --btn-solid-fg: #0C0E10;

  --bar-a: #3F6B57;
  --bar-b: #7FCF9F;

  --red: #E0654A;
  --amber: #D99A3E;
  --green: #5FB08C;
  --blue: #7C9AD6;
  --warn-bg: #2A2317;
  --warn-line: #4A3B1F;
  --flash-bg: #2A2A18;
  --flash-line: #4E4A24;

  --scroll: #2B3136;
  --scroll-hover: #3A4249;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);
  --shadow-md: 0 24px 50px -30px rgba(0, 0, 0, .9);
}

/* ---------- 主题：浅豆绿 + 白 ---------- */
[data-theme="bean"] {
  color-scheme: light;
  --paper: #EDF4E6;
  --paper-2: #E3EDD9;
  --card: #FFFFFF;
  --rail: #F8FBF4;
  --modal: #F7FBF3;
  --chip: #F0F6EB;
  --input: #FFFFFF;
  --ghost: rgba(255, 255, 255, .55);
  --ghost-btn: rgba(255, 255, 255, .72);

  --ink: #1D2A22;
  --ink-2: #2C3B31;
  --muted: #5E7265;
  --muted-2: #84978B;

  --line: #D5E2CB;
  --line-soft: #D8E7D1;
  --line-strong: #A9C29E;

  --dark: #2E5B42;
  --dark-2: #35684C;
  --side-bg: #2E5B42;
  --hero-bg: #2E5B42;
  --on-dark: #F6FAF2;
  --on-dark-muted: rgba(246, 250, 242, .62);
  --side-fg: #E9F2E4;

  --lime: #D8EFA6;
  --lime-ink: #22301C;
  --hl: rgba(190, 225, 160, .9);

  --btn-solid-bg: #1D2A22;
  --btn-solid-fg: #FFFFFF;

  --bar-a: #A9C9B1;
  --bar-b: #5E8E70;

  --red: #B7472F;
  --amber: #A9711F;
  --green: #2F6B4F;
  --blue: #33538C;
  --warn-bg: #F6F3E2;
  --warn-line: #E4DCC0;
  --flash-bg: #EFF6E2;
  --flash-line: #CFE0B2;

  --scroll: #BFD3B4;
  --scroll-hover: #A9C29E;

  --shadow-sm: 0 1px 2px rgba(29, 42, 34, .06);
  --shadow-md: 0 20px 40px -30px rgba(29, 42, 34, .5);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
::selection { background: var(--lime); color: var(--ink); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.sm { width: 14px; height: 14px; stroke-width: 1.8; }
.is-hidden { display: none !important; }
.muted { color: var(--muted); }

/* 滚动条 */
.main::-webkit-scrollbar, .rail::-webkit-scrollbar, .modal-body::-webkit-scrollbar { width: 10px; }
.main::-webkit-scrollbar-thumb, .rail::-webkit-scrollbar-thumb, .modal-body::-webkit-scrollbar-thumb {
  background: var(--scroll); border: 3px solid transparent; background-clip: content-box; border-radius: 99px;
}
.main::-webkit-scrollbar-thumb:hover { background: var(--scroll-hover); background-clip: content-box; }

/* ================= 布局 ================= */
.app {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr) 352px;
  height: 100vh;
  overflow: hidden;
}

/* ================= 左侧栏 ================= */
.side {
  background: var(--side-bg);
  color: var(--side-fg);
  padding: 24px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: relative;
  overflow: hidden;
}
.side::after {
  content: "";
  position: absolute; inset: auto -40% -30% -40%; height: 320px;
  background: radial-gradient(ellipse at center, rgba(217, 242, 107, .10), transparent 65%);
  pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 6px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(217, 242, 107, .55);
  display: grid; place-items: center; position: relative; flex: none;
}
.brand-mark::before {
  content: ""; position: absolute; inset: 6px; border-radius: 50%;
  border: 1px solid rgba(217, 242, 107, .28);
}
.brand-mark span { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px rgba(217, 242, 107, .9); }
.brand-name { font-size: 17px; font-weight: 600; letter-spacing: 3px; line-height: 1.2; }
.brand-sub { font-family: var(--num); font-size: 8.5px; letter-spacing: 2.1px; color: rgba(232, 229, 220, .42); margin-top: 3px; }

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  height: 40px; padding: 0 12px; border-radius: 10px;
  color: rgba(232, 229, 220, .62);
  font-size: 13.5px; text-align: left; position: relative;
  transition: background .18s, color .18s;
}
.nav-item:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav-item.is-active { background: rgba(255, 255, 255, .075); color: #fff; }
.nav-item.is-active::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 2px;
  border-radius: 2px; background: var(--lime);
}
.nav-count {
  margin-left: auto; font-family: var(--num); font-size: 11px;
  background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .8);
  padding: 1px 7px; border-radius: 99px; min-width: 20px; text-align: center;
}
.nav-item.is-active .nav-count { background: var(--lime); color: var(--lime-ink); }

.side-section { display: flex; flex-direction: column; gap: 10px; }
.side-label {
  font-size: 9.5px; letter-spacing: 2.4px; color: rgba(232, 229, 220, .35);
  text-transform: uppercase; padding: 0 12px;
}
.platform-nav { display: flex; flex-direction: column; gap: 1px; }
.pf-item {
  display: flex; align-items: center; gap: 9px; padding: 6px 12px; border-radius: 8px;
  font-size: 12.5px; color: rgba(232, 229, 220, .6); width: 100%; text-align: left;
  transition: background .15s, color .15s;
}
.pf-item:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.pf-item.is-active { color: #fff; background: rgba(255, 255, 255, .07); }
.pf-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pc, #888); flex: none; }
.pf-count { margin-left: auto; font-family: var(--num); font-size: 11px; color: rgba(232, 229, 220, .38); }
.pf-item.is-active .pf-count { color: var(--lime); }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 1; }
.side-note { font-size: 10.5px; line-height: 1.7; color: rgba(232, 229, 220, .34); padding: 0 12px; }
.ghost-link {
  display: flex; align-items: center; gap: 6px; padding: 0 12px; font-size: 11.5px;
  color: rgba(232, 229, 220, .55);
}
.ghost-link:hover { color: var(--lime); }

/* ================= 主区域 ================= */
.main { overflow-y: auto; overflow-x: hidden; padding: 34px 40px 100px; scroll-behavior: smooth; }
.view { max-width: 960px; margin: 0 auto; }
.view.is-entering { animation: view-in .26s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

.head { margin-bottom: 26px; }
.head-meta {
  display: flex; align-items: center; gap: 9px;
  font-size: 11.5px; letter-spacing: .3px; color: var(--muted);
  font-family: var(--num);
}
.sep-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }
.head h1 {
  font-size: 31px; line-height: 1.3; font-weight: 600; letter-spacing: -.6px;
  margin: 10px 0 8px; color: var(--ink);
}
.head h1 em {
  font-style: normal; font-family: var(--num); font-size: 36px; font-weight: 700;
  letter-spacing: -1px; padding: 0 2px;
  background: linear-gradient(180deg, transparent 62%, var(--hl) 62%);
}
.head-sub { color: var(--muted); font-size: 13px; max-width: 620px; }
.head.compact h1 { font-size: 26px; }
.head-actions { display: flex; align-items: center; gap: 10px; margin-top: 18px; }

/* ================= 按钮 ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px; border-radius: 99px;
  font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: transform .16s, background .16s, border-color .16s, box-shadow .16s, color .16s;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn-dark { background: var(--btn-solid-bg); color: var(--btn-solid-fg); box-shadow: 0 10px 24px -16px rgba(22, 25, 29, .9); }
.btn-dark:hover { background: #000; transform: translateY(-1px); }
.btn-ghost { background: var(--ghost-btn); border: 1px solid var(--line); color: var(--ink-2); }
.btn-ghost:hover { background: var(--card); border-color: var(--line-strong); transform: translateY(-1px); }
.btn-icon { width: 38px; padding: 0; background: transparent; border: 1px solid var(--line); color: var(--ink-2); }
.btn-icon:hover { background: var(--card); }
.btn-lime { background: var(--lime); color: var(--lime-ink); font-weight: 600; }
.btn-lime:hover { background: #E4FA85; transform: translateY(-1px); }
.btn-dark-ghost { background: rgba(255, 255, 255, .08); color: #EDEBE4; border: 1px solid rgba(255, 255, 255, .14); }
.btn-dark-ghost:hover { background: rgba(255, 255, 255, .14); }
.btn-danger-ghost { border: 1px solid #E7C9C1; color: var(--red); background: transparent; }
.btn-danger-ghost:hover { background: rgba(191, 69, 45, .10); }
.btn.wide { width: 100%; }
.mini-btn {
  font-size: 11px; color: var(--muted); border: 1px solid var(--line);
  border-radius: 99px; padding: 2px 9px; background: var(--input);
}
.mini-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.link-btn { color: var(--ink-2); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #C9C1B0; }
.link-btn:hover { text-decoration-color: var(--ink); }
.icon-btn {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  color: var(--muted); transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }

/* ================= 雷达 ================= */
.radar-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px 20px 16px; box-shadow: var(--shadow-sm); margin-bottom: 18px;
}
.radar-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.kicker {
  font-size: 9.5px; letter-spacing: 2.2px; text-transform: uppercase;
  color: var(--muted-2); font-family: var(--num); margin-bottom: 4px;
}
.radar-hint { font-size: 13px; color: var(--ink-2); }
.radar-hint b { font-family: var(--num); font-weight: 600; }
.radar-legend { display: flex; gap: 14px; font-size: 10.5px; color: var(--muted-2); padding-top: 2px; }
.radar-legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.lg-dot.today { background: var(--ink); }
.lg-dot.done { background: #BFD8C9; }

.radar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.day {
  position: relative; border: 1px solid var(--line-soft); border-radius: 12px;
  padding: 9px 10px 10px; min-height: 84px; background: var(--chip);
  display: flex; flex-direction: column; gap: 2px;
  transition: border-color .18s, transform .18s, background .18s;
}
.day:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.day-name { font-size: 10.5px; color: var(--muted-2); }
.day-num { font-family: var(--num); font-size: 21px; font-weight: 600; letter-spacing: -.5px; line-height: 1.1; }
.day.is-today { background: var(--dark); border-color: var(--dark); color: var(--on-dark); }
.day.is-today .day-name { color: rgba(255, 255, 255, .5); }
.day.is-today .day-num { color: var(--lime); }
.day.is-weekend .day-name { color: #A88A5E; }
.day.is-today.is-weekend .day-name { color: rgba(255, 255, 255, .5); }
.day-dots { display: flex; flex-wrap: wrap; gap: 3px; margin-top: auto; padding-top: 8px; }
.day-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--pc, #999); }
.day-dot.is-done { opacity: .28; }
.day.is-today .day-dot { box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.day-empty { font-size: 10px; color: var(--muted-2); }
.day.is-today .day-empty { color: rgba(255, 255, 255, .28); }

/* ================= Hero ================= */
.hero-wrap { margin-bottom: 30px; }
.hero {
  position: relative; overflow: hidden;
  background: var(--hero-bg); color: var(--on-dark);
  border-radius: var(--r-xl); padding: 26px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  box-shadow: 0 30px 60px -45px rgba(22, 25, 29, .8);
  min-height: 186px;
}
.hero::before {
  content: ""; position: absolute; right: -80px; top: -140px; width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(217, 242, 107, .16), transparent 62%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 80% 20%, #000, transparent 70%);
  pointer-events: none;
}
.hero-left { position: relative; z-index: 1; min-width: 0; }
.kicker.lime { color: var(--lime); }
.hero h2 {
  font-size: 25px; line-height: 1.35; font-weight: 700; letter-spacing: -.5px;
  margin: 6px 0 8px; color: #FAF8F1; max-width: 560px;
}
.hero h2 .hero-course { color: rgba(255, 255, 255, .5); font-weight: 400; }
.hero-reason { font-size: 12.5px; color: rgba(243, 241, 234, .56); }
.hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.hero-tag {
  font-size: 10.5px; padding: 2px 9px; border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, .14); color: rgba(243, 241, 234, .72);
}
.hero-tag.hot { border-color: rgba(217, 242, 107, .45); color: var(--lime); }
.hero-actions { display: flex; gap: 9px; margin-top: 18px; }
.hero-ring { position: relative; z-index: 1; flex: none; width: 118px; height: 118px; display: grid; place-items: center; }
.hero-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.hero-ring circle { fill: none; stroke-width: 6; }
.ring-track { stroke: rgba(255, 255, 255, .1); }
.ring-fill { stroke: var(--lime); stroke-linecap: round; transition: stroke-dashoffset .8s cubic-bezier(.2, .8, .2, 1); }
.ring-num {
  font-family: var(--num); font-size: 30px; font-weight: 700; color: var(--on-dark);
  line-height: 1; letter-spacing: -1px; margin-top: 2px;
}
.ring-label { font-size: 9.5px; letter-spacing: 1.2px; color: rgba(243, 241, 234, .42); margin-top: 3px; }
.hero.is-empty { min-height: 150px; }
.hero.is-empty h2 { font-size: 21px; }
.hero-empty-mark {
  width: 58px; height: 58px; border-radius: 50%; border: 1px solid rgba(217, 242, 107, .4);
  display: grid; place-items: center; color: var(--lime); flex: none;
}

/* ================= 任务列表 ================= */
.list-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 14px; padding-bottom: 2px;
}
.list-head.sticky { position: sticky; top: 0; z-index: 5; background: linear-gradient(var(--paper) 82%, rgba(244, 241, 233, 0)); padding-top: 8px; }
.list-title { display: flex; align-items: baseline; gap: 8px; }
.list-title h2 { font-size: 16px; font-weight: 600; letter-spacing: -.2px; }
.list-count { font-family: var(--num); font-size: 11px; color: var(--muted-2); }
.filters { display: flex; gap: 4px; flex-wrap: wrap; margin-left: 4px; }
.chip {
  padding: 4px 11px; border-radius: 99px; font-size: 11.5px; color: var(--muted);
  border: 1px solid transparent; transition: background-color .15s ease-out, border-color .15s ease-out, color .15s ease-out;
}
.chip:hover { color: var(--ink); background: var(--ghost-btn); }
.chip.is-active { background: var(--btn-solid-bg); color: var(--btn-solid-fg); }
.chip .n { font-family: var(--num); opacity: .65; margin-left: 4px; font-size: 10.5px; }
.select-wrap { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted-2); }
.select-wrap select {
  appearance: none; border: 1px solid var(--line); background: var(--input); border-radius: 99px;
  padding: 4px 26px 4px 11px; font-size: 11.5px; color: var(--ink-2); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236C7076' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}

.group { margin-bottom: 22px; }
.group-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  font-size: 10.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted-2);
  font-family: var(--num);
}
.group-head .g-line { flex: 1; height: 1px; background: var(--line-soft); }
.group-head .g-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gc, #C9C2B1); }
.group-head .g-n { color: var(--muted-2); }

.task-list { display: flex; flex-direction: column; gap: 8px; }
.task {
  position: relative; display: flex; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 15px 16px 15px 15px;
  transition: border-color .18s ease-out, transform .18s ease-out, box-shadow .18s ease-out;
}
.task:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: 0 16px 34px -30px rgba(22, 25, 29, .7); }
.task:active { transform: translateY(-1px) scale(.997); }
/* 列表进场：只在 .is-enter 时播一次，用 --i 错峰 60ms（手册 §8） */
.task-list.is-enter > .group > .task {
  animation: fade-up .36s cubic-bezier(.2, .7, .3, 1) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}
.task::before {
  content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 2.5px;
  border-radius: 0 3px 3px 0; background: var(--accent, transparent);
}
.task[data-bucket="overdue"] { --accent: var(--red); }
.task[data-bucket="critical"] { --accent: #D2691E; }
.task[data-bucket="soon"] { --accent: #C9A227; }
.task[data-bucket="week"] { --accent: #4C7F68; }
.task[data-bucket="later"] { --accent: #B9B2A1; }
.task.is-flash::after, .pblock.is-flash::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: var(--flash-bg); animation: flash-out 1.2s ease-out forwards;
}
@keyframes flash-out { 0%, 40% { opacity: .9; } 100% { opacity: 0; } }

.check {
  width: 21px; height: 21px; border-radius: 7px; border: 1.5px solid var(--line-strong);
  display: grid; place-items: center; flex: none; margin-top: 2px;
  color: transparent; background: var(--input);
  transition: background-color .16s ease-out, border-color .16s ease-out, color .16s ease-out;
}
.check:hover { border-color: var(--green); color: rgba(42, 107, 84, .35); }
.check .ico { width: 13px; height: 13px; stroke-width: 2.4; transform: scale(.55); transition: transform .18s cubic-bezier(.2, .8, .2, 1); }
.task.is-done .check { background: var(--green); border-color: var(--green); color: #fff; }
.task.is-done .check .ico { transform: none; }

.task-body { flex: 1; min-width: 0; }
.task-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 3px; }
.plat {
  font-size: 9.5px; letter-spacing: .4px; padding: 1px 7px; border-radius: 5px;
  color: var(--pc, #555); background: var(--pb, #EEE); font-weight: 500; white-space: nowrap;
}
.course { font-size: 11.5px; color: var(--muted); }
.type { font-size: 11px; color: var(--muted-2); }
.type::before { content: "·"; margin-right: 6px; color: var(--line-strong); }
.task-title {
  font-size: 14.5px; font-weight: 550; line-height: 1.45; letter-spacing: -.1px;
  margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.task-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--muted-2); font-family: var(--num); }
.task-meta .mi { display: inline-flex; align-items: center; gap: 4px; }
.task-meta .mi svg { width: 12px; height: 12px; }
.bar {
  height: 3px; border-radius: 3px; background: var(--paper-2); margin-top: 10px; overflow: hidden;
  max-width: 320px;
}
.bar i { display: block; width: 100%; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--bar-a), var(--bar-b)); transform-origin: left center; transform: scaleX(var(--p, 0)); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.task.is-done .bar i { background: #C9D6CE; }

.task-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none;
  min-width: 100px;
}
.cd { font-family: var(--num); font-size: 12.5px; font-weight: 600; letter-spacing: -.2px; color: var(--ink-2); white-space: nowrap; }
.cd.hot { color: var(--red); }
.cd.warm { color: #B4661A; }
.cd.cool { color: var(--muted); }
.pri { font-size: 9.5px; color: var(--muted-2); letter-spacing: .4px; }
.pri b { font-family: var(--num); font-size: 11px; color: var(--muted); font-weight: 600; }
.row-actions { display: flex; gap: 1px; opacity: 0; transform: translateY(2px); transition: opacity .16s, transform .16s; margin-top: 1px; }
.task:hover .row-actions, .task:focus-within .row-actions { opacity: 1; transform: none; }
.row-actions .icon-btn { width: 26px; height: 26px; }
.row-actions .icon-btn .ico { width: 14px; height: 14px; }

.task.is-done { opacity: .55; }
.task.is-done .task-title { text-decoration: line-through; text-decoration-color: #B9B2A1; }
.task.is-done .cd { color: var(--muted-2); font-weight: 400; }
.task.is-done .task-right { justify-content: center; }

.empty {
  border: 1px dashed var(--line); border-radius: var(--r-lg); padding: 44px 24px;
  text-align: center; color: var(--muted); background: var(--ghost);
}
.empty b { display: block; color: var(--ink-2); font-size: 14.5px; font-weight: 500; margin-bottom: 4px; }
.empty p { font-size: 12.5px; }

/* ================= 右侧栏 ================= */
.rail {
  border-left: 1px solid var(--line); background: var(--rail);
  overflow-y: auto; padding: 26px 22px 26px;
  display: flex; flex-direction: column; gap: 26px;
}
.rail-card { display: flex; flex-direction: column; gap: 12px; }
.rail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rail-head h3 {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; letter-spacing: .2px; color: var(--ink-2);
}
.rail-head h3 .ico { color: var(--muted-2); }
.pill {
  font-family: var(--num); font-size: 10.5px; padding: 2px 8px; border-radius: 99px;
  background: var(--paper-2); color: var(--muted);
}
.pill.subtle { background: transparent; border: 1px solid var(--line); }

.plan { display: flex; flex-direction: column; }
.plan-item { display: grid; grid-template-columns: 40px 14px 1fr; gap: 8px; position: relative; padding-bottom: 14px; }
.plan-item:last-child { padding-bottom: 0; }
.plan-item:not(:last-child) .plan-axis::after {
  content: ""; position: absolute; left: 6.5px; top: 12px; bottom: 0; width: 1px;
  background: repeating-linear-gradient(to bottom, var(--line) 0 3px, transparent 3px 6px);
}
.plan-time { font-family: var(--num); font-size: 11px; color: var(--muted); padding-top: 1px; letter-spacing: -.2px; }
.plan-axis { position: relative; }
.plan-axis i {
  position: absolute; left: 3px; top: 3px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--pc, #999); box-shadow: 0 0 0 3px var(--rail);
}
.plan-body { min-width: 0; padding-top: -2px; }
.plan-course { font-size: 10px; color: var(--muted-2); letter-spacing: .3px; }
.plan-title {
  font-size: 12.5px; color: var(--ink); line-height: 1.45;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.plan-dur { font-family: var(--num); font-size: 10.5px; color: var(--muted-2); margin-top: 1px; }
.plan-foot {
  margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--line-soft);
  font-size: 10.5px; color: var(--muted-2); line-height: 1.7;
}
.plan-foot b { font-family: var(--num); color: var(--ink-2); font-weight: 600; }
.plan-foot .warn { color: var(--red); }
.plan-empty { font-size: 12px; color: var(--muted); line-height: 1.7; }

.reminders { display: flex; flex-direction: column; gap: 9px; }
.rem { display: grid; grid-template-columns: 62px 1fr; gap: 9px; align-items: baseline; }
.rem-time { font-family: var(--num); font-size: 10.5px; color: var(--muted-2); white-space: nowrap; }
.rem-time.now { color: var(--red); }
.rem-body { font-size: 11.5px; color: var(--ink-2); line-height: 1.5; min-width: 0; }
.rem-task { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rem-label { font-size: 9.5px; color: var(--muted-2); }
.rem-label.due { color: var(--red); }

.load-num { display: flex; align-items: baseline; gap: 5px; }
.load-num b { font-family: var(--num); font-size: 27px; font-weight: 700; letter-spacing: -1px; }
.load-num span { font-size: 11px; color: var(--muted-2); font-family: var(--num); }
.load-bar { height: 5px; border-radius: 5px; background: var(--paper-2); margin: 8px 0 12px; overflow: hidden; }
.load-bar i { display: block; width: 100%; height: 100%; border-radius: 5px; background: var(--ink); transform-origin: left center; transform: scaleX(var(--p, 0)); transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.load-bar i.over { background: linear-gradient(90deg, #C9603F, var(--red)); }
.load-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; align-items: end; height: 34px; }
.load-day { display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; justify-content: flex-end; }
.load-day i { width: 100%; border-radius: 3px 3px 1px 1px; background: var(--line); min-height: 2px; }
.load-day i.has { background: #9FB8A9; }
.load-day i.today { background: var(--ink); }
.load-day span { font-family: var(--num); font-size: 8.5px; color: var(--muted-2); }
.load-note { font-size: 10.5px; color: var(--muted-2); margin-top: 10px; line-height: 1.65; }
.load-note.warn { color: var(--red); }
.rail-foot { margin-top: auto; display: flex; gap: 6px; font-size: 10px; color: var(--muted-2); justify-content: center; padding-top: 8px; }

/* ================= 设置页 ================= */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px 22px; box-shadow: var(--shadow-sm);
}
.panel.wide-panel { grid-column: 1 / -1; }
.panel h2 { font-size: 14px; font-weight: 600; margin-bottom: 6px; letter-spacing: -.1px; }
.panel-sub { font-size: 12px; color: var(--muted); line-height: 1.7; margin-bottom: 14px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); }
.setting-row.mt { margin-top: 18px; margin-bottom: 6px; }
.setting-row output { font-family: var(--num); font-weight: 600; }
.range { width: 100%; margin: 10px 0 2px; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 4px; background: var(--paper-2); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 17px; height: 17px; border-radius: 50%;
  background: var(--btn-solid-bg); border: 3px solid var(--input); box-shadow: 0 0 0 1px var(--btn-solid-bg); cursor: grab;
}
.range-marks { display: flex; justify-content: space-between; font-family: var(--num); font-size: 9.5px; color: var(--muted-2); }
.input {
  width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 9px;
  padding: 0 11px; background: var(--input); font-size: 12.5px; color: var(--ink);
}
.input:focus { outline: 2px solid rgba(217, 242, 107, .9); outline-offset: 1px; border-color: var(--ink); }
.hint { font-size: 10.5px; color: var(--muted-2); margin-top: 8px; line-height: 1.7; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.reminder-preview { margin-top: 14px; display: flex; flex-direction: column; gap: 7px; }
.rp-item { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); border-bottom: 1px dashed var(--line-soft); padding-bottom: 6px; }
.rp-item b { font-family: var(--num); font-weight: 600; color: var(--ink-2); }
.formula { background: var(--chip); border: 1px solid var(--line-soft); border-radius: 12px; padding: 15px 16px; }
.formula-main { font-size: 12.5px; font-weight: 600; line-height: 1.7; }
.formula-list { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.formula-list li { font-size: 11.5px; color: var(--muted); padding-left: 12px; position: relative; line-height: 1.7; }
.formula-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 4px; height: 4px; border-radius: 50%; background: #CDC6B5; }
.formula-list b { color: var(--ink-2); font-weight: 600; }
.chips-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.code-chip {
  font-family: var(--num); font-size: 11px; padding: 3px 9px; border-radius: 6px;
  background: var(--chip); border: 1px solid var(--line-soft); color: var(--ink-2);
}
.about p { font-size: 12.5px; color: var(--muted); line-height: 1.85; margin-bottom: 8px; max-width: 760px; }
.about b { color: var(--ink-2); }
.about-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.about-meta div { display: flex; flex-direction: column; gap: 2px; }
.about-meta span { font-size: 9.5px; letter-spacing: 1.2px; color: var(--muted-2); text-transform: uppercase; }
.about-meta b { font-size: 11.5px; font-weight: 500; }
.page-foot { text-align: center; font-size: 10.5px; color: var(--muted-2); padding: 34px 0 10px; letter-spacing: .3px; }

/* ================= 弹层 ================= */
.modal-mask {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px;
  background: rgba(16, 18, 21, .42); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  opacity: 0; transition: opacity .18s ease-in;
}
.modal-mask.is-in { opacity: 1; transition: opacity .24s cubic-bezier(.2, .8, .2, 1); }
.modal {
  width: min(720px, 100%); max-height: min(90vh, 1000px);
  background: var(--modal); border-radius: 22px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .4) inset;
  opacity: 0; transform: translateY(14px) scale(.985);
  transition: opacity .18s ease-in, transform .18s ease-in;
}
.modal-mask.is-in .modal {
  opacity: 1; transform: none;
  transition: opacity .28s cubic-bezier(.2, .8, .2, 1), transform .28s cubic-bezier(.2, .8, .2, 1);
}
.modal.wide { width: min(780px, 100%); }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 22px 24px 14px;
}
.modal-head h2 { font-size: 21px; font-weight: 600; letter-spacing: -.4px; margin: 2px 0 4px; }
.modal-head p { font-size: 12px; color: var(--muted); line-height: 1.7; }
.modal-body { padding: 4px 24px 8px; overflow-y: auto; }
.modal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 24px 18px; border-top: 1px solid var(--line-soft); background: var(--modal);
}
.foot-note { font-size: 11px; color: var(--muted-2); }
.btn-row-end { display: flex; gap: 9px; margin-left: auto; }

.notice-input {
  width: 100%; min-height: 186px; resize: vertical; padding: 14px 15px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--input);
  font-size: 12.5px; line-height: 1.9; color: var(--ink-2);
  transition: border-color .15s, box-shadow .15s;
}
.notice-input::placeholder { color: var(--muted-2); }
.notice-input:focus { outline: none; border-color: #B9B09B; box-shadow: 0 0 0 3px rgba(217, 242, 107, .35); }
.notice-tools { display: flex; align-items: center; justify-content: space-between; margin: 8px 2px 14px; }
.char-count { font-family: var(--num); font-size: 10.5px; color: var(--muted-2); }

.parse-summary {
  display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted);
  margin: 4px 0 10px; padding-bottom: 8px; border-bottom: 1px dashed var(--line);
}
.parse-summary b { font-family: var(--num); color: var(--ink); font-weight: 600; }
.fail-note { font-size: 11px; color: var(--amber); background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }

.drafts { display: flex; flex-direction: column; gap: 10px; }
.draft {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px 12px;
  display: flex; flex-direction: column; gap: 8px;
  animation: fade-up .3s cubic-bezier(.2, .7, .3, 1) both;
}
.draft-top { display: flex; align-items: center; gap: 8px; }
.draft-idx { font-family: var(--num); font-size: 10px; color: var(--muted-2); width: 16px; }
.draft-course, .draft-title {
  border: 0; border-bottom: 1px dashed transparent; background: transparent; padding: 1px 2px;
  min-width: 0; border-radius: 3px;
}
.draft-course { font-size: 11.5px; color: var(--muted); width: 170px; }
.draft-title { font-size: 14.5px; font-weight: 550; width: 100%; letter-spacing: -.1px; }
.draft-course:hover, .draft-title:hover { border-bottom-color: var(--line); }
.draft-course:focus, .draft-title:focus { outline: none; border-bottom-color: var(--ink); background: var(--chip); }
.draft-fields { display: grid; grid-template-columns: 1.5fr .8fr .8fr 1fr; gap: 8px; }
.draft-fields label { display: flex; flex-direction: column; gap: 3px; font-size: 9.5px; color: var(--muted-2); letter-spacing: .4px; }
.draft-fields input, .draft-fields select {
  height: 30px; border: 1px solid var(--line-soft); border-radius: 7px; padding: 0 8px;
  font-size: 11.5px; background: var(--chip); color: var(--ink-2); width: 100%;
  font-family: var(--num);
}
.draft-fields select { font-family: inherit; }
.draft-fields input:focus, .draft-fields select:focus { outline: none; border-color: var(--line-strong); background: var(--input); }
.draft-raw {
  font-size: 10.5px; color: var(--muted-2); line-height: 1.6;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border-top: 1px dashed var(--line-soft); padding-top: 7px;
}
.conf { display: inline-flex; gap: 3px; margin-left: auto; }
.conf i { width: 5px; height: 5px; border-radius: 50%; background: #E2DCCD; }
.conf i.ok { background: var(--green); }
.conf i.med { background: #C9A227; }
.draft .icon-btn { width: 26px; height: 26px; }

/* 手动 / 编辑表单 */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 10.5px; letter-spacing: .6px; color: var(--muted-2); }
.field .input { height: 38px; font-size: 13px; }
.field textarea.input { height: 66px; padding: 9px 11px; resize: vertical; line-height: 1.6; }
.progress-row { display: flex; align-items: center; gap: 12px; }
.progress-row input[type="range"] { flex: 1; }
.progress-row b { font-family: var(--num); font-size: 12px; width: 38px; text-align: right; }
.seg { display: flex; gap: 4px; flex-wrap: wrap; }
.seg button {
  padding: 4px 10px; border-radius: 7px; font-size: 11.5px; color: var(--muted);
  border: 1px solid var(--line-soft); background: var(--chip);
}
.seg button.is-on { background: var(--btn-solid-bg); color: var(--btn-solid-fg); border-color: var(--btn-solid-bg); }

/* ================= Toast ================= */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px);
  background: var(--dark); color: var(--on-dark); font-size: 12.5px;
  padding: 10px 18px; border-radius: 99px; z-index: 90;
  opacity: 0; pointer-events: none; transition: opacity .16s ease-in, transform .16s ease-in;
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .7);
  display: flex; align-items: center; gap: 8px;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); transition: opacity .24s cubic-bezier(.2, .8, .2, 1), transform .24s cubic-bezier(.2, .8, .2, 1); }
.toast .ico { color: var(--lime); width: 14px; height: 14px; }

/* ================= 修改版：标识 / 四象限 / 学习计划 ================= */
/* 四象限标签：总览卡片 / Hero / 计划块共用 */
.qtag {
  display: inline-block; font-size: 9.5px; letter-spacing: .3px; line-height: 1.5;
  padding: 1px 7px; border-radius: 99px; border: 1px solid transparent; white-space: nowrap;
}
.qtag.q-do { color: var(--red); background: rgba(191, 69, 45, .10); border-color: rgba(191, 69, 45, .26); }
.qtag.q-plan { color: var(--green); background: rgba(42, 107, 84, .10); border-color: rgba(42, 107, 84, .24); }
.qtag.q-quick { color: var(--amber); background: rgba(184, 118, 27, .12); border-color: rgba(184, 118, 27, .28); }
.qtag.q-later { color: #6C7076; background: #F2F0E9; border-color: #E7E3D8; }
.hero-tag.qtag { background: transparent; border-color: rgba(255, 255, 255, .18); color: rgba(243, 241, 234, .78); }
.hero-tag.q-do { color: #F2B7A5; border-color: rgba(240, 140, 110, .42); }
.hero-tag.q-plan { color: #B9E0C6; border-color: rgba(140, 200, 160, .38); }
.hero-tag.q-quick { color: #F0CC93; border-color: rgba(220, 175, 105, .4); }
.hero-tag.q-later { color: rgba(243, 241, 234, .6); }

/* ---------- 右栏：未来七天日期切换 ---------- */
.rail-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.rday {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 5px 0 4px; border-radius: 8px; border: 1px solid transparent;
  color: var(--muted-2); transition: background .15s, color .15s, border-color .15s;
}
.rday b { font-size: 10.5px; font-weight: 500; }
.rday span { font-family: var(--num); font-size: 9.5px; }
.rday:hover { background: var(--card); border-color: var(--line); color: var(--ink-2); }
.rday.is-active { background: var(--btn-solid-bg); color: var(--btn-solid-fg); border-color: var(--btn-solid-bg); }
.rday.is-active span { color: var(--lime); }
.plan-item.is-goal .plan-title { color: var(--ink-2); }
.plan-item.is-goal .plan-course { color: #9A7B2E; }
.plan-item.is-activity { opacity: .75; }
.plan-item.is-activity .plan-title { font-size: 11.5px; }
.plan-item.is-activity .plan-course { color: var(--muted-2); }
.plan-more { margin-top: 8px; display: block; }

/* ---------- 学习计划页 ---------- */
.plan-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 16px; }
.pday {
  position: relative; text-align: left; border: 1px solid var(--line-soft); background: var(--chip);
  border-radius: 12px; padding: 9px 10px 10px; min-height: 94px;
  display: flex; flex-direction: column; gap: 2px;
  transition: border-color .18s, transform .18s, background .18s, box-shadow .18s;
}
.pday:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.pday-name { font-size: 10.5px; color: var(--muted-2); }
.pday-num { font-family: var(--num); font-size: 22px; font-weight: 600; letter-spacing: -.5px; line-height: 1.15; }
.pday-bar { height: 3px; border-radius: 3px; background: var(--paper-2); margin-top: auto; overflow: hidden; }
.pday-bar i { display: block; width: 100%; height: 100%; border-radius: 3px; background: #9FB8A9; transform-origin: left center; transform: scaleX(var(--p, 0)); transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.pday-hours { font-family: var(--num); font-size: 10.5px; color: var(--muted); }
.pday.is-today { background: var(--dark); border-color: var(--dark); color: #fff; }
.pday.is-today .pday-name { color: rgba(255, 255, 255, .5); }
.pday.is-today .pday-num { color: var(--lime); }
.pday.is-today .pday-bar { background: rgba(255, 255, 255, .14); }
.pday.is-today .pday-bar i { background: var(--lime); }
.pday.is-today .pday-hours { color: rgba(255, 255, 255, .62); }
.pday.is-active { box-shadow: 0 0 0 2px var(--lime) inset; }
.pday.is-late .pday-hours { color: var(--red); }
.pday.is-today.is-late .pday-hours { color: #F2B7A5; }

.plan-detail {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px 22px 18px; box-shadow: var(--shadow-sm);
}

/* 周 / 月 / 日目标概览：让计划页和设置页对得上 */
.plan-goals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.pgoal {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--chip); border: 1px solid var(--line-soft); border-radius: 12px;
  padding: 10px 12px; min-width: 0;
}
.pgoal-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pgoal-rem { margin-left: auto; font-size: 9.5px; color: var(--muted-2); font-family: var(--num); white-space: nowrap; }
.pgoal-title { font-size: 12.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pgoal-bar { height: 3px; border-radius: 3px; background: var(--paper-2); overflow: hidden; }
.pgoal-bar i { display: block; width: 100%; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #C9DDBB, #7FA98D); transform-origin: left center; transform: scaleX(var(--p, 0)); transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.pgoal-meta { display: flex; justify-content: space-between; gap: 8px; font-family: var(--num); font-size: 9.5px; color: var(--muted-2); }
.pgoal-empty { grid-column: 1 / -1; font-size: 11.5px; color: var(--muted-2); line-height: 1.7; }
.pdetail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.pdetail-title { font-size: 19px; font-weight: 600; letter-spacing: -.3px; margin: 2px 0 5px; }
.pdetail-today {
  display: inline-block; font-size: 9.5px; letter-spacing: 1px; color: #1B2110;
  background: var(--lime); padding: 1px 7px; border-radius: 99px; margin-left: 8px;
  vertical-align: middle; font-weight: 600;
}
.pdetail-sub { font-size: 11.5px; color: var(--muted); }
.pdetail-meter { width: 208px; flex: none; }
.pdetail-num { display: flex; align-items: baseline; gap: 5px; justify-content: flex-end; }
.pdetail-num b { font-family: var(--num); font-size: 24px; font-weight: 700; letter-spacing: -1px; }
.pdetail-num span { font-size: 10.5px; color: var(--muted-2); }
.pdetail-meter .load-bar { margin: 6px 0; }
.pdetail-cap { font-family: var(--num); font-size: 10px; color: var(--muted-2); text-align: right; }

.plan-timeline { display: flex; flex-direction: column; padding-top: 4px; }
.pblock {
  display: grid; grid-template-columns: 52px 16px minmax(0, 1fr) 30px; gap: 10px;
  align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line-soft);
}
.pblock:last-child { border-bottom: 0; }
.pblock-time { font-family: var(--num); font-size: 11px; color: var(--muted); display: flex; flex-direction: column; line-height: 1.35; }
.pblock-time b { font-weight: 600; color: var(--ink-2); }
.pblock-time span { color: var(--muted-2); font-size: 10px; }
.pblock-axis { position: relative; align-self: stretch; display: flex; align-items: center; justify-content: center; }
.pblock-axis::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px;
  background: var(--line-soft);
}
.pblock-axis i {
  position: relative; z-index: 1; width: 7px; height: 7px; border-radius: 50%;
  background: var(--pc, #999); box-shadow: 0 0 0 3px var(--card);
}
.pblock-axis i.act-dot { background: #B9B2A1; }
.pblock-axis i.goal-dot { background: #C9A227; }
.pblock-body { min-width: 0; }
.pblock-title { font-size: 13.5px; font-weight: 550; line-height: 1.45; }
.pblock-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 10.5px; color: var(--muted-2); margin-top: 2px; }
.pblock-sub .course { font-size: 10.5px; }
.pblock.is-activity { opacity: .78; }
.pblock.is-activity .pblock-title { color: var(--muted); font-size: 12.5px; }
.pblock.is-goal .pblock-title { color: var(--ink-2); font-size: 13px; }
.pblock.is-flash { animation: flash 1.2s ease-out; }
.pcheck { width: 19px; height: 19px; justify-self: end; border-radius: 6px; }
.pcheck .ico { width: 12px; height: 12px; }
.plan-empty-block { border: 1px dashed var(--line); border-radius: 12px; padding: 26px 20px; text-align: center; margin-top: 12px; }
.plan-note {
  font-size: 10.5px; color: var(--muted-2); line-height: 1.7;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft);
}
.plan-warn {
  font-size: 11.5px; color: var(--red); background: rgba(191, 69, 45, .10); border: 1px solid rgba(191, 69, 45, .26);
  border-radius: 10px; padding: 10px 12px; line-height: 1.75; margin-top: 12px;
}
.plan-warn b { font-weight: 600; }
.plan-warn span { color: var(--muted); }

/* ---------- 设置页：目标 / 社团 / 绩点 ---------- */
.goal-list, .act-list { display: flex; flex-direction: column; gap: 8px; }
.goal-item { background: var(--chip); border: 1px solid var(--line-soft); border-radius: 12px; padding: 11px 13px 10px; }
.goal-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gscope { font-size: 9.5px; letter-spacing: .4px; padding: 1px 7px; border-radius: 5px; background: var(--paper-2); color: var(--muted); }
.gscope.g-day { background: #EEF3EA; color: #3F6B4E; }
.gscope.g-month { background: #F5EEDD; color: #8A6B2F; }
.goal-title { font-size: 13px; font-weight: 550; }
.goal-hours { margin-left: auto; font-family: var(--num); font-size: 10.5px; color: var(--muted-2); }
.goal-bar { max-width: none; margin-top: 8px; height: 3px; background: var(--paper-2); }
.goal-bar i { background: linear-gradient(90deg, #C9DDBB, #7FA98D); }
.goal-meta { display: flex; align-items: center; gap: 12px; margin-top: 6px; font-size: 10.5px; color: var(--muted-2); font-family: var(--num); flex-wrap: wrap; }
.goal-meta span { white-space: nowrap; }
.goal-range {
  width: 120px; margin-left: auto; height: 4px; border-radius: 4px;
  -webkit-appearance: none; appearance: none; background: var(--paper-2); cursor: pointer;
}
.goal-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%;
  background: var(--ink); border: 2px solid var(--input); box-shadow: 0 0 0 1px var(--btn-solid-bg); cursor: grab;
}
.goal-range:disabled { opacity: .35; cursor: not-allowed; }
.goal-item .icon-btn, .act-item .icon-btn { width: 26px; height: 26px; }
.goal-empty {
  font-size: 11.5px; color: var(--muted-2); background: var(--chip);
  border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px;
}
.act-item {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--chip); border: 1px solid var(--line-soft); border-radius: 10px;
  padding: 8px 10px; font-size: 11.5px;
}
.act-day { font-family: var(--num); font-size: 10px; background: var(--paper-2); color: var(--muted); padding: 1px 7px; border-radius: 5px; }
.act-title { font-weight: 550; }
.act-time { font-family: var(--num); color: var(--ink-2); }
.act-place { color: var(--muted-2); font-size: 10.5px; }
.act-rep { font-size: 9.5px; color: var(--muted-2); margin-left: auto; }

.mini-form { display: grid; gap: 8px; align-items: center; margin-top: 14px; }
.goal-form { grid-template-columns: minmax(180px, 1fr) 92px 96px 92px auto; }
.act-form { grid-template-columns: minmax(150px, 1fr) 92px 78px 92px 92px auto; }
.mini-form .input { height: 34px; font-size: 11.5px; }
.mini-form .btn { height: 34px; padding: 0 13px; font-size: 12px; white-space: nowrap; }
.form.two { grid-template-columns: 1fr 1fr; gap: 12px; }
.time-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }

/* ================= 二版：返回 / 固定安排 / 音乐 / 自习室 ================= */
.head-actions { flex-wrap: wrap; }
.head-back { margin-bottom: 10px; }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px;
  padding: 0 12px 0 9px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--ghost-btn); color: var(--muted); font-size: 12px;
  transition: color .15s, border-color .15s, background .15s, transform .15s;
}
.back-btn:hover { color: var(--ink); border-color: var(--line-strong); background: var(--card); transform: translateX(-1px); }
.back-btn .ico { width: 15px; height: 15px; }

/* 固定安排卡片：进任务清单 */
.task.is-activity { background: var(--chip); }
.task.is-activity::before { background: var(--line-strong); }
.task.is-activity .task-right { justify-content: center; }
.act-mark {
  width: 21px; height: 21px; border-radius: 7px; flex: none; margin-top: 2px;
  display: grid; place-items: center; background: var(--paper-2); color: var(--muted);
}
.act-mark .ico { width: 13px; height: 13px; }
.act-kind { font-size: 9.5px; padding: 1px 7px; border-radius: 5px; background: var(--paper-2); color: var(--muted); white-space: nowrap; }
.act-kind.k-club { background: #E4F0F4; color: #256E8C; }
.act-kind.k-other { background: #F5EEDD; color: #8A6B2F; }
.group-act .group-head { margin-top: 4px; }

/* 音乐 */
.music-modal { width: min(680px, 100%); }
.music-list { display: flex; flex-direction: column; gap: 6px; }
.mtrack {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; text-align: left;
  border: 1px solid var(--line-soft); background: var(--card); border-radius: 12px;
  transition: border-color .15s, background .15s, transform .15s;
}
.mtrack:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.mtrack.is-active { border-color: var(--ink); background: var(--chip); }
.mtrack-ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--paper-2); color: var(--ink-2); }
.mtrack.is-active .mtrack-ico { background: var(--lime); color: #1B2110; }
.mtrack-ico .ico { width: 14px; height: 14px; }
.mtrack-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mtrack-body b { font-size: 13px; font-weight: 550; }
.mtrack-body span { font-size: 10.5px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtrack-tag { font-size: 9.5px; color: var(--muted-2); border: 1px solid var(--line); border-radius: 99px; padding: 1px 7px; }
.mtrack.is-active .mtrack-tag { color: var(--green); border-color: #CFE0D5; }
.music-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 14px 0 4px; }
.music-credit { font-size: 10px; line-height: 1.6; color: var(--muted-2); margin: 0 0 4px; }
.upload-btn { position: relative; overflow: hidden; cursor: pointer; }
.upload-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.music-settings { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.music-timers { margin-top: 8px; }
.seg-btn { padding: 4px 10px; border-radius: 7px; font-size: 11.5px; color: var(--muted); border: 1px solid var(--line-soft); background: var(--chip); }
.seg-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.seg-btn.is-on { background: var(--btn-solid-bg); color: var(--btn-solid-fg); border-color: var(--btn-solid-bg); }
.music-dock {
  position: fixed; right: 24px; bottom: 88px; z-index: 55; max-width: 330px;
  display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 12px;
  background: var(--dark); color: #F3F1EA; border-radius: 14px;
  box-shadow: 0 20px 40px -22px rgba(0, 0, 0, .7);
}
.music-dock.is-hidden { display: none; }
.music-dock .mdot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .25); flex: none; }
.music-dock .mdot.on { background: var(--lime); box-shadow: 0 0 10px rgba(217, 242, 107, .8); }
.dock-body { display: flex; flex-direction: column; min-width: 0; margin-right: 2px; }
.dock-body b { font-size: 11.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock-body span { font-size: 9.5px; color: rgba(243, 241, 234, .55); white-space: nowrap; }
.music-dock .icon-btn { width: 26px; height: 26px; color: rgba(243, 241, 234, .7); }
.music-dock .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* 自习室 */
.study-modal { width: min(720px, 100%); }
.study-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; margin-bottom: 7px;
  border: 1px solid var(--line-soft); background: var(--chip); border-radius: 11px;
}
.study-item.is-on { background: var(--card); border-color: var(--line); }
.study-check { position: relative; width: 18px; height: 18px; flex: none; }
.study-check input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; }
.study-check span { display: block; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line-strong); background: var(--input); position: relative; }
.study-check input:checked + span { background: var(--green); border-color: var(--green); }
.study-check input:checked + span::after {
  content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.study-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.study-info b { font-size: 13px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.study-info span { font-size: 10.5px; color: var(--muted-2); }
.study-min { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--muted-2); white-space: nowrap; }
.study-min input {
  width: 62px; height: 30px; border: 1px solid var(--line-soft); border-radius: 7px;
  padding: 0 7px; font-family: var(--num); font-size: 11.5px; background: var(--input); text-align: right;
}
.study-min input:disabled { opacity: .4; }
.study-setup { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.study-total { font-size: 11.5px; color: var(--muted); }
.study-total b { font-family: var(--num); color: var(--ink); font-size: 14px; }
.study-session { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.study-session input {
  width: 70px; height: 32px; border: 1px solid var(--line); border-radius: 8px;
  padding: 0 8px; font-family: var(--num); font-size: 12px; background: var(--input); text-align: right;
}
.study-fit { width: 100%; font-size: 10.5px; color: var(--muted-2); }
.study-fit.warn { color: var(--red); }
.study-empty { margin-top: 14px; }
.study-clock-wrap { text-align: center; padding: 10px 0 18px; }
.study-clock { font-family: var(--num); font-size: 64px; font-weight: 700; letter-spacing: -3px; line-height: 1; color: var(--ink); }
.study-clock-label { font-size: 9.5px; letter-spacing: 3px; color: var(--muted-2); margin-top: 6px; }
.study-progress { height: 5px; background: var(--paper-2); border-radius: 5px; margin: 16px auto 10px; max-width: 420px; overflow: hidden; }
.study-progress i { display: block; width: 100%; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--lime), #9DBF5E); transform-origin: left center; transform: scaleX(var(--p, 0)); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.study-run-meta { font-family: var(--num); font-size: 11px; color: var(--muted); }
.study-run-list { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.study-run-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--chip); cursor: pointer; }
.study-run-item.is-done { opacity: .55; }
.study-run-item.is-done .study-run-title { text-decoration: line-through; }
.study-run-item input { width: 16px; height: 16px; accent-color: var(--green); }
.study-run-title { flex: 1; font-size: 12.5px; }
.study-run-min { font-family: var(--num); font-size: 10.5px; color: var(--muted-2); }
.study-note { font-size: 10.5px; color: var(--muted-2); line-height: 1.7; margin-top: 12px; }
.study-result { text-align: center; padding: 8px 0 18px; }
.study-result-num { font-family: var(--num); font-size: 52px; font-weight: 700; color: var(--ink); line-height: 1; }
.study-result-num span { font-size: 20px; color: var(--muted-2); font-weight: 500; }
.study-result-label { font-size: 10.5px; letter-spacing: 2px; color: var(--muted-2); margin-top: 8px; }

/* ================= 三版：占比 / 职业规划 / 档案导入 ================= */
.career-tag {
  display: inline-block; font-size: 9.5px; padding: 1px 7px; border-radius: 99px;
  color: var(--green); background: rgba(42, 107, 84, .10); border: 1px solid rgba(42, 107, 84, .24); white-space: nowrap;
}
.check-line {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2);
  cursor: pointer; min-height: 36px;
}
.check-line input { width: 16px; height: 16px; accent-color: var(--green); }
.career-input { height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.7; }
.profile-import { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.profile-info { font-family: var(--num); font-size: 10.5px; color: var(--muted-2); }
.credit-progress { margin: 14px 0 4px; }
.credit-progress .load-bar { margin: 0 0 6px; }
.credit-meta { font-family: var(--num); font-size: 10.5px; color: var(--muted-2); }
.weight-box {
  margin-top: 14px; padding: 12px 14px 10px; border: 1px solid var(--line-soft);
  border-radius: 12px; background: var(--chip);
}
.weight-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.weight-head b { font-family: var(--num); font-size: 11px; color: var(--muted); font-weight: 500; }
.weight-box .setting-row { margin-top: 8px; }
.weight-box .range { margin: 6px 0 2px; }
.act-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.act-actions .hint { margin: 0; }
.act-rep-inline { font-size: 9.5px; color: var(--muted-2); margin-left: 2px; }
.form.two.mt { margin-top: 12px; }
.field.mt { margin-top: 12px; }
.act-item .icon-btn { width: 26px; height: 26px; }

.setting-explain {
  margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line-soft);
}
.setting-explain summary {
  list-style: none; cursor: pointer; font-size: 10.5px; color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
.setting-explain summary::-webkit-details-marker { display: none; }
.setting-explain summary::before {
  content: "＋"; font-family: var(--num); color: var(--muted-2); font-size: 11px;
}
.setting-explain[open] summary::before { content: "−"; }
.setting-explain summary:hover { color: var(--ink-2); }
.setting-explain p {
  font-size: 10.5px; line-height: 1.75; color: var(--muted-2); margin-top: 7px;
}
.setting-explain p strong { color: var(--ink-2); font-weight: 600; }

/* ================= 最终版：紧急 / 重要占比卡 ================= */
.priority-weights {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 30px; margin-top: 8px;
}
.pw-slider .setting-row { margin: 0 0 4px; }
.pw-slider .range { width: 100%; }
.pw-total {
  grid-column: 1 / -1; text-align: right; font-family: var(--num);
  font-size: 10.5px; color: var(--muted-2);
}
.pw-total b { color: var(--ink-2); }
.priority-note {
  margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line-soft);
  border-radius: 12px; background: var(--chip);
}
.priority-note p { font-size: 10.5px; line-height: 1.75; color: var(--muted-2); margin: 0 0 5px; }
.priority-note p:last-child { margin-bottom: 0; }
.priority-note b { color: var(--ink-2); font-weight: 600; }

/* ================= 响应式 ================= */
[data-theme="dark"] .day.is-today {
  background: rgba(201, 242, 78, .10);
  border-color: rgba(201, 242, 78, .38);
}

[data-theme="dark"] .select-wrap select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239AA0A6' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
}

@media (max-width: 1420px) {
  .app { grid-template-columns: 220px minmax(0, 1fr) 326px; }
  .main { padding: 30px 30px 90px; }
  .rail { padding: 24px 18px; }
}
@media (max-width: 1180px) {
  .app { grid-template-columns: 68px minmax(0, 1fr) 288px; }
  .side { padding: 20px 10px 16px; gap: 18px; align-items: center; }
  .brand { padding: 0; justify-content: center; }
  .brand-text { display: none; }
  .nav { width: 100%; align-items: center; gap: 6px; }
  .nav-item { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .nav-item span { display: none; }
  .nav-item.is-active::before { left: -10px; }
  .side-section, .side-foot { display: none; }
  .rail { padding: 22px 16px; }
  .main { padding: 28px 26px 90px; }
  .settings-grid { grid-template-columns: 1fr; }
  .panel.wide-panel { grid-column: auto; }
  .about-meta { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .app { grid-template-columns: 64px minmax(0, 1fr) 268px; }
  .rail { padding: 20px 13px; }
  .plan-title, .rem-task { white-space: normal; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .side {
    flex-direction: row; align-items: center; gap: 14px; padding: 10px 14px;
    position: sticky; top: 0; z-index: 30; overflow-x: auto;
    scrollbar-width: none;
  }
  .side::-webkit-scrollbar { display: none; }
  .side::after { display: none; }
  .brand { padding: 0; }
  .brand-text { display: block; }
  .brand-sub { display: none; }
  .nav { flex-direction: row; gap: 2px; width: auto; }
  .nav-item { width: auto; height: 34px; padding: 0 10px; font-size: 12px; }
  .nav-item span { display: inline; }
  .nav-item.is-active::before { display: none; }
  .side-section, .side-foot { display: none; }
  .rail { display: none; }
  .main { padding: 20px 16px 80px; }
  .head h1 { font-size: 23px; }
  .head h1 em { font-size: 27px; }
  .radar { gap: 4px; }
  .day { padding: 7px 6px; min-height: 70px; }
  .day-num { font-size: 17px; }
  .hero { flex-direction: column; align-items: flex-start; padding: 20px; }
  .hero-ring { position: absolute; right: 18px; top: 18px; width: 82px; height: 82px; }
  .ring-num { font-size: 22px; }
  .hero h2 { font-size: 19px; padding-right: 70px; }
  .task { padding: 13px 13px; }
  .task-right { min-width: 82px; }
  .task-title { white-space: normal; }
  .draft-fields { grid-template-columns: 1fr 1fr; }
  .form { grid-template-columns: 1fr; }
  .modal { max-height: 92vh; }
}

@media (max-width: 1180px) {
  .plan-strip { gap: 5px; }
  .pday { padding: 8px 7px; min-height: 86px; }
  .goal-form { grid-template-columns: 1fr 86px 88px 86px auto; }
  .act-form { grid-template-columns: 1fr 84px 72px 84px 84px auto; }
}
@media (max-width: 980px) {
  .pday-num { font-size: 19px; }
  .plan-goals { grid-template-columns: 1fr 1fr; }
  .pdetail-head { flex-direction: column; gap: 12px; }
  .pdetail-meter { width: 100%; }
  .pdetail-num { justify-content: flex-start; }
  .pdetail-cap { text-align: left; }
  .goal-form, .act-form { grid-template-columns: 1fr 1fr; }
  .goal-form .btn, .act-form .btn { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .plan-strip { grid-template-columns: repeat(4, 1fr); }
  .plan-goals { grid-template-columns: 1fr; }
  .priority-weights { grid-template-columns: 1fr; }
  .plan-detail { padding: 16px 14px 14px; }
  .pblock { grid-template-columns: 46px 14px minmax(0, 1fr) 28px; gap: 8px; }
  .pblock-title { font-size: 12.5px; white-space: normal; }
  .form.two { grid-template-columns: 1fr; }
  .mini-form { grid-template-columns: 1fr 1fr; }
  .goal-form .btn, .act-form .btn { grid-column: 1 / -1; }
}

@media (max-width: 1420px) {
  .music-dock { right: 20px; }
}
@media (max-width: 1180px) {
  .music-dock { right: 16px; }
}
@media (max-width: 860px) {
  .music-dock { left: 12px; right: 12px; bottom: 76px; max-width: none; }
  .study-clock { font-size: 48px; letter-spacing: -2px; }
  .study-item { flex-wrap: wrap; }
  .study-session { margin-left: 0; }
  .study-setup { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  html, body, .main { scroll-behavior: auto; }
  .task-list.is-enter > .group > .task,
  .view.is-entering { animation: none; }
  .task.is-flash::after, .pblock.is-flash::after { display: none; }
}

/* 保存失败横幅（store.persist 写不进 localStorage 时出现，见 ui.js showSaveBanner） */
.save-warn{position:fixed;left:50%;bottom:20px;transform:translateX(-50%) translateY(140%);opacity:0;transition:transform .24s cubic-bezier(.2,.8,.2,1),opacity .24s ease-out;z-index:120;display:flex;align-items:flex-start;gap:10px;max-width:min(580px,calc(100vw - 32px));padding:12px 14px;border-radius:14px;border:1px solid rgba(190,60,50,.26);background:#FFF8F6;box-shadow:0 14px 34px rgba(60,30,20,.18);color:#7A2E24}
.save-warn .sw-ico{flex:0 0 auto;width:20px;height:20px;line-height:20px;text-align:center;border-radius:50%;background:#C0392B;color:#fff;font-size:13px;font-weight:700}
.save-warn .sw-text{display:flex;flex-direction:column;gap:3px;font-size:13px;line-height:1.45}
.save-warn .sw-text b{font-weight:600}
.save-warn .sw-text i{font-style:normal;color:#9A5A50;font-size:12px}
.save-warn .icon-btn{flex:0 0 auto;opacity:.55}
@media (max-width:640px){.save-warn{bottom:12px;padding:10px 12px}}
.save-warn.is-on{transform:translateX(-50%) translateY(0);opacity:1}

/* ===== 表单错误一次性抖动（§8 配方；配合 .is-shake 使用） ===== */
.is-shake { animation: shake .3s ease-in-out; }

/* ===== 动效组件挂载点：只设 --cl-* 变量，组件内部规则一行不改 ===== */
.study-countdown {
  --cl-size: 150px;
  --cl-color: var(--ink);
  --cl-numbers: 3;
  --cl-step: 1s;
  margin: 0 auto;
}
.empty-glow {
  --cl-size: 92px;
  --cl-color: var(--lime);
  --cl-color-2: var(--green);
  --cl-duration: 6s;
  display: block;
  margin: 0 auto 14px;
  opacity: .6;
}
@media (prefers-reduced-motion: reduce) {
  .empty-glow { display: none; }
}

/* ===== 排版打磨（只动字形/行距/字距/数字对齐，不动任何布局尺寸） ===== */
body {
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, .hero-title, .sec-title, .modal-title {
  letter-spacing: -.015em;
  line-height: 1.28;
  text-wrap: balance;            /* 标题不再出现孤字换行 */
}
.task-title {
  line-height: 1.42;
  text-wrap: pretty;
  overflow-wrap: anywhere;       /* 超长课名/链接不再撑破卡片 */
}
.task-body p, .msg, .empty i, .hero-reason, .modal p {
  text-wrap: pretty;
}
/* 数字一律等宽，列表里的剩余小时/百分比才能竖向对齐 */
.task-meta, .hero-reason, time, .rday b, .pday-bar b, .stat b, .kpi b, .num, .mono {
  font-variant-numeric: tabular-nums;
  letter-spacing: -.005em;
}
.btn, .chip, .nav-item, .tab, .pf-item {
  letter-spacing: .008em;
}
/* 键盘可达性：焦点环统一用主色，鼠标点击不出现 */
:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
  border-radius: 6px;
}
::selection {
  background: var(--lime);               /* 老浏览器的兜底 */
  background: color-mix(in oklab, var(--lime) 45%, transparent);
  color: var(--ink);
}
@media (prefers-reduced-motion: reduce) {
  html, body { scroll-behavior: auto; }
}

/* =====================================================================
   立体感 / 丝滑交互（第三轮）：只用 transform + box-shadow + 颜色过渡。
   光影三层 = 顶部高光(inset) + 接触阴影 + 环境阴影；按下时高光变内凹。
   参数集中在下面这几个 token 里，想整体变"轻"或变"重"只改这里。
   ===================================================================== */
:root {
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-in-out: cubic-bezier(.4, 0, .2, 1);
  --ease-spring: cubic-bezier(.22, 1.35, .36, 1);
  --hi: inset 0 1px 0 rgb(255 255 255 / .55);
  --press: inset 0 2px 6px rgb(26 28 34 / .18), inset 0 -1px 0 rgb(255 255 255 / .22);
  --e1: 0 1px 2px rgb(26 28 34 / .06), 0 1px 1px rgb(26 28 34 / .04);
  --e2: 0 2px 4px rgb(26 28 34 / .07), 0 8px 18px -8px rgb(26 28 34 / .16);
  --e3: 0 4px 10px rgb(26 28 34 / .08), 0 18px 36px -14px rgb(26 28 34 / .24);
}

/* ---- 按钮：悬停浮起 1px，按下压进 2px + 缩小，手感靠三段位移差 ---- */
.btn {
  box-shadow: var(--hi), var(--e1);
  transition:
    transform .16s var(--ease-out),
    box-shadow .22s var(--ease-out),
    background-color .18s var(--ease-out),
    border-color .18s var(--ease-out),
    color .18s var(--ease-out);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--hi), var(--e2); }
.btn:active {
  transform: translateY(1px) scale(.97);
  box-shadow: var(--press);
  transition-duration: .09s, .1s, .12s, .12s, .12s;
}
.btn-dark { box-shadow: inset 0 1px 0 rgb(255 255 255 / .18), var(--e2); }
.btn-dark:hover { box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), var(--e3); }
.btn-dark:active { box-shadow: inset 0 2px 8px rgb(0 0 0 / .45); }
.btn-lime { box-shadow: inset 0 1px 0 rgb(255 255 255 / .5), 0 2px 8px -4px rgb(140 170 40 / .55); }

/* ---- 图标按钮 / 胶囊 / 侧栏项：同样的三段位移，幅度更小 ---- */
.icon-btn {
  transition: background-color .15s var(--ease-out), color .15s var(--ease-out),
              transform .14s var(--ease-out), box-shadow .18s var(--ease-out);
}
.icon-btn:hover { transform: translateY(-1px); box-shadow: var(--e1); }
.icon-btn:active { transform: translateY(1px) scale(.92); box-shadow: var(--press); transition-duration: .08s; }

.chip {
  transition: background-color .15s var(--ease-out), border-color .15s var(--ease-out),
              color .15s var(--ease-out), transform .15s var(--ease-out), box-shadow .18s var(--ease-out);
}
.chip:hover { transform: translateY(-1px); box-shadow: var(--e1); }
.chip:active { transform: translateY(0) scale(.95); }
.chip.is-active { box-shadow: inset 0 1px 0 rgb(255 255 255 / .16), var(--e1); }

.nav-item {
  transition: background-color .16s var(--ease-out), color .16s var(--ease-out),
              transform .16s var(--ease-out), box-shadow .2s var(--ease-out);
}
.nav-item:active { transform: scale(.985); }
.nav-item.is-active { box-shadow: inset 0 1px 0 rgb(255 255 255 / .07), inset 0 -1px 0 rgb(0 0 0 / .2); }

/* ---- 卡片：悬停加深环境阴影，按下轻微回弹，避免"点了没反应" ----
   注意：.pblock 是时间轴里的"行"，没有实体底面，给行加 box-shadow 会糊成一块灰，
   所以它从这份名单里拿掉，单独走下面的"轨道高亮"。 */
.task, .day, .pday, .panel, .radar-card, .goal-card, .music-dock {
  transition: transform .18s var(--ease-out), box-shadow .22s var(--ease-out),
              background-color .2s var(--ease-out), border-color .2s var(--ease-out);
}
.task:hover, .pday:hover, .day:hover { box-shadow: var(--e3); }
.task:active, .day:active { transform: translateY(0) scale(.997); transition-duration: .1s; }

/* ---- 弹层：进场用更"贵"的缓动，退场更快（进慢出快才像实心物体） ---- */
.modal-mask.is-in .modal {
  transition: opacity .3s var(--ease-out), transform .3s cubic-bezier(.16, .84, .28, 1);
}
.modal-mask { transition: opacity .18s var(--ease-out); }

/* ---- 页面转场：淡入 + 6px 上浮，比纯淡入更像"翻过去一页" ---- */
.view.is-entering { animation: view-in .3s cubic-bezier(.16, .84, .28, 1) both; }
/* @keyframes view-in 上面已经定义过一次，这里不再重复声明 */

/* ---- 时间轴行：不"浮起"，改成"轨道高亮" ----
   行的左侧是一根贯穿的竖线 + 时间点，卡片本身没有底面。
   所以悬浮时不位移、不加外阴影，只做四件小事：
   1) 整行铺一层极淡底色（用 ::before 覆盖，不改布局盒）；2) 竖线变实；
   3) 圆点放大一圈，外圈带一点它自己的颜色；4) 标题从灰变实。
   —— 这三处一动，视线自然跟着时间轴走，而不是盯着一个悬空的灰方块。 */
.pblock { position: relative; }
.pblock::before {
  content: ""; position: absolute; inset: 2px -10px; border-radius: 12px;
  background: transparent; pointer-events: none;
  transition: background-color .18s var(--ease-out);
}
.pblock-axis::after, .pblock-axis i { transition: background-color .18s var(--ease-out), transform .18s var(--ease-out), box-shadow .18s var(--ease-out); }
.pblock:hover::before {
  background: rgba(26, 28, 34, .045);                              /* 老浏览器兜底 */
  background: color-mix(in oklab, var(--ink) 4.5%, transparent);
}
.pblock:hover .pblock-title { color: var(--ink); }
.pblock:hover .pblock-sub { color: var(--muted); }
.pblock:hover .pblock-axis::after { background: var(--line-strong); }
.pblock:hover .pblock-axis i {
  transform: scale(1.5);
  box-shadow: 0 0 0 3px var(--card);
  box-shadow: 0 0 0 3px var(--card), 0 0 0 5.5px color-mix(in oklab, var(--pc, var(--muted)) 20%, transparent);
}
.pblock.is-activity:hover { opacity: .95; }

/* 时间轴进场：换天 / 换视图时才播，用 --i 错峰 45ms（定时重绘不重播） */
.plan-timeline.is-enter > .pblock {
  animation: fade-up .34s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

/* ---- 全局动效补充：只动 transform / opacity / 颜色 ----
   焦点环全站已经在上面统一过了，这里只管"手感"。 */
.task::before { transition: transform .2s var(--ease-out); }
.task:hover::before { transform: scaleY(1.12); }
.check { transition: transform .16s var(--ease-spring), border-color .16s var(--ease-out), background-color .16s var(--ease-out); }
.check:active { transform: scale(.9); }
.btn:active, .icon-btn:active, .chip:active { transition-timing-function: var(--ease-spring); }
.pday.is-fresh .pday-num { animation: num-pop .28s var(--ease-spring) both; }
@keyframes num-pop {
  from { transform: translateY(3px) scale(.9); opacity: .5; }
  to { transform: none; opacity: 1; }
}

/* ---- 降级：系统要求减少动态时，一切直接到位 ---- */
@media (prefers-reduced-motion: reduce) {
  .btn:hover, .icon-btn:hover, .chip:hover, .nav-item:active,
  .btn:active, .icon-btn:active, .chip:active,
  .task:hover, .day:hover, .pday:hover, .task:active, .day:active,
  .check:active, .task:hover::before, .pblock:hover .pblock-axis i { transform: none; }
  .plan-timeline.is-enter > .pblock,
  .task-list.is-enter > .group > .task,
  .pday.is-fresh .pday-num,
  .view.is-entering { animation: none; }
  .pblock::before { transition: none; }
}

/* ---- 按下时的柔光：纯 CSS，按下才泛光，松手自动收敛（不需要 JS） ---- */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: "";
  position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, rgb(255 255 255 / .5), rgb(255 255 255 / 0) 65%);
  opacity: 0; transform: scale(.55); pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
.btn:active::after { opacity: 1; transform: scale(1.2); transition-duration: .12s; }
@media (prefers-reduced-motion: reduce) {
  .btn::after { display: none; }
}

/* ===== 以下是原 assets/css-loaders.css（合并成一个请求，层叠顺序不变） ===== */
/* =========================================================================
   css-loaders.css · 十个动效组件（手册 §6 原文，未改动一行）
   来源：D:/dsh文件/css-loaders-handoff.md §6（B 站 BV1SRUYBeEUj 配套）
   约定：组件内部不写 body/* reset；类名统一 .cl- 前缀；只动 transform/opacity。
   站点适配请写在文件末尾「不鸽站适配」一节里，只设 CSS 变量，不改组件规则。
   ========================================================================= */
/*!
 * css-loaders.css — 10 个可参数化的纯 CSS 动效组件
 *
 * 原则：
 *  1. 零依赖，只依赖 CSS 自定义属性；
 *  2. 不做全局 reset，不碰 body / html / *，所有规则都挂在 .cl-* 根元素之下；
 *  3. --cl-size 控制整体尺寸，其余尺寸都是它的倍数，改一个数就整体缩放；
 *  4. 只用 transform / opacity 做动画（例外：倒计时数字与计数器进度条有注释说明）；
 *  5. 全部提供 prefers-reduced-motion 降级，且降级后有"静止但可读"的最终状态。
 *
 * 用法见 README.md，可视化见 index.html。
 */

/* ==========================================================================
   01. cl-glass —— 毛玻璃光球（原 02.毛玻璃效果）
      需要两个 <span>；--ring 变体为"玻璃圆盘 + 旋转色环"
   ========================================================================== */

.cl-glass {
  --cl-size: 150px;
  --cl-color: #5989ff;
  --cl-color-2: #ff6198;
  --cl-duration: 2s;

  position: relative;
  display: inline-block;
  width: var(--cl-size);
  height: var(--cl-size);
}

.cl-glass > span {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 50%;
  background: var(--cl-color);
  animation: cl-glass-slide var(--cl-duration) ease-in-out infinite;
}

.cl-glass > span::after {
  content: "";
  position: absolute;
  left: calc(var(--cl-size) * -.2);
  bottom: calc(var(--cl-size) * -.66);
  width: calc(var(--cl-size) * 1.4);
  height: calc(var(--cl-size) * .27);
  border-radius: 50%;
  background: radial-gradient(rgb(0 0 0 / .08), transparent 70%);
}

.cl-glass > span:nth-child(2) {
  background: color-mix(in srgb, var(--cl-color) 8%, transparent);
  border: 1px solid rgb(255 255 255 / .35);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation-delay: calc(var(--cl-duration) / -2);
}

@keyframes cl-glass-slide {
  0%, 100% { transform: translateX(-53%); }
  50%      { transform: translateX(53%); }
}

/* 变体：玻璃盘 + 旋转色环 */
.cl-glass--ring {
  --cl-size: 180px;
}

.cl-glass--ring > span:first-child {
  inset: 0;
  background: none;
  border: 0;
  overflow: hidden;
  animation: cl-glass-spin 1s linear infinite;
}

.cl-glass--ring > span:first-child::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 100%;
  height: 100%;
  background: var(--cl-color-2);
}

.cl-glass--ring > span:first-child::after {
  display: none;
}

.cl-glass--ring > span:nth-child(2) {
  inset: calc(var(--cl-size) * .055);
  z-index: 2;
  animation: none;
  background: color-mix(in srgb, var(--cl-color) 6%, transparent);
  border: 1px solid rgb(255 255 255 / .45);
}

@keyframes cl-glass-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ==========================================================================
   02. cl-typing —— 描边文字 + 扫描填充 + 光标（原 03.文本填充效果）
      文本同时放在 data-text 上，用于生成填充层
   ========================================================================== */

.cl-typing {
  --cl-size: clamp(2rem, 9vw, 8rem);
  --cl-color: #01fe87;
  --cl-stroke: #383d52;
  --cl-duration: 6s;

  position: relative;
  display: inline-block;
  font-size: var(--cl-size);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: max(1px, calc(var(--cl-size) / 48)) var(--cl-stroke);
}

.cl-typing::before,
.cl-typing::after {
  position: absolute;
  inset: 0;
  clip-path: inset(0 100% 0 0);
  animation: cl-typing-fill var(--cl-duration) linear infinite;
}

.cl-typing::before {
  content: attr(data-text);
  color: var(--cl-color);
  -webkit-text-stroke: 0;
}

/* 光标 = 一条贴着填充边缘的竖线，靠同一个 clip 动画一起走 */
.cl-typing::after {
  content: "";
  border-right: max(2px, calc(var(--cl-size) / 48)) solid var(--cl-color);
}

@keyframes cl-typing-fill {
  0%, 10%, 100% { clip-path: inset(0 100% 0 0); }
  70%, 90%      { clip-path: inset(0 0 0 0); }
}

/* ==========================================================================
   03. cl-water —— 水球（原 47.水球）
      .cl-water__wave 是水面层，两个伪元素反向旋转制造起伏
   ========================================================================== */

.cl-water {
  --cl-size: 150px;
  --cl-color: #4973ff;
  --cl-shell: #fff;
  --cl-glass: #ccc;
  --cl-duration: 5s;

  position: relative;
  width: var(--cl-size);
  height: var(--cl-size);
  overflow: hidden;
  border: calc(var(--cl-size) / 30) solid var(--cl-shell);
  border-radius: 50%;
  background: var(--cl-glass);
  box-shadow: 0 0 calc(var(--cl-size) / 3) var(--cl-color);
}

.cl-water__wave {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--cl-color);
  box-shadow: inset 0 0 calc(var(--cl-size) / 3) rgb(0 0 0 / .5);
}

.cl-water__wave::before,
.cl-water__wave::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 200%;
  height: 200%;
  transform: translate(-50%, -75%);
}

.cl-water__wave::before {
  border-radius: 45%;
  background: rgb(255 255 255 / 1);
  animation: cl-water-spin var(--cl-duration) linear infinite;
}

.cl-water__wave::after {
  border-radius: 40%;
  background: rgb(255 255 255 / .5);
  animation: cl-water-spin calc(var(--cl-duration) * 2) linear infinite;
}

@keyframes cl-water-spin {
  from { transform: translate(-50%, -75%) rotate(0deg); }
  to   { transform: translate(-50%, -75%) rotate(360deg); }
}

/* ==========================================================================
   04. cl-spinner —— 三环彩色微调器（原 62.CSS单元素彩色微调器）
      单元素 + 两个伪元素，三层不同速度反向旋转
   ========================================================================== */

.cl-spinner {
  --cl-size: 100px;
  --cl-color: #fff958;
  --cl-color-2: #b858ff;
  --cl-color-3: #e74c3c;
  --cl-color-4: #3ce7d8;
  --cl-color-5: #39ff8d;
  --cl-color-6: #ff67ad;
  --cl-duration: 2s;

  position: relative;
  width: var(--cl-size);
  height: var(--cl-size);
  border: calc(var(--cl-size) / 25) solid transparent;
  border-top-color: var(--cl-color-2);
  border-bottom-color: var(--cl-color);
  border-radius: 50%;
  animation: cl-spin var(--cl-duration) linear infinite;
}

.cl-spinner::before,
.cl-spinner::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  animation: cl-spin var(--cl-duration) linear infinite;
}

.cl-spinner::before {
  inset: 10%;
  border: calc(var(--cl-size) / 25) solid transparent;
  border-top-color: var(--cl-color-4);
  border-bottom-color: var(--cl-color-3);
}

.cl-spinner::after {
  inset: 24%;
  border: calc(var(--cl-size) / 25) solid transparent;
  border-top-color: var(--cl-color-6);
  border-bottom-color: var(--cl-color-5);
  animation-duration: calc(var(--cl-duration) * 2);
}

@keyframes cl-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ==========================================================================
   05. cl-clip —— Clip-path 上下镜像滚动的文字（原 66）
      两个 <span> 各显示一半，方向相反，拼成"无缝循环"
   ========================================================================== */

.cl-clip {
  --cl-size: 300px;          /* 整体宽度，高度 = 宽度的 20% */
  --cl-color: #000;
  --cl-bg: #ffff3a;
  --cl-duration: 4s;

  position: relative;
  width: var(--cl-size);
  height: calc(var(--cl-size) * .2);
  overflow: hidden;
  border: calc(var(--cl-size) / 60) solid var(--cl-color);
  background: var(--cl-bg);
  font-family: Verdana, sans-serif;
  font-weight: 700;
  font-size: calc(var(--cl-size) * .155);
  line-height: calc(var(--cl-size) * .2);
  text-align: center;
}

.cl-clip > span {
  position: absolute;
  inset: 0;
  color: var(--cl-color);
  text-transform: uppercase;
  white-space: nowrap;
  animation: cl-clip-slide var(--cl-duration) linear infinite;
}

.cl-clip > span:nth-child(1) {
  clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
}

.cl-clip > span:nth-child(2) {
  clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%);
  animation-direction: reverse;
}

@keyframes cl-clip-slide {
  0%   { transform: translateX(100%); }
  40%  { transform: translateX(0); }
  80%  { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ==========================================================================
   06. cl-squares —— 两个方块接力（原 82.CSS方形动画效果）
      悬停整体放大，用 transform，不动布局
   ========================================================================== */

.cl-squares {
  --cl-size: 50px;            /* 单个方块的边长 */
  --cl-color: #63b2ed;
  --cl-color-2: #359dea;
  --cl-line: #262626;
  --cl-duration: 1s;

  position: relative;
  width: calc(var(--cl-size) * 3);
  height: var(--cl-size);
  border-bottom: 2px solid var(--cl-line);
  transform-origin: 50% 100%;
  transition: transform .3s ease;
  cursor: pointer;
}

.cl-squares::before {
  content: "";
  position: absolute;
  top: calc(var(--cl-size) + 2px);
  left: 0;
  width: 100%;
  height: calc(var(--cl-size) * 12);
  background: var(--cl-color-2);
  z-index: 0;
}

.cl-squares:hover {
  transform: scale(1.6);
}

.cl-squares > span {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: var(--cl-size);
  height: var(--cl-size);
  box-sizing: border-box;
  background: var(--cl-color);
  border: calc(var(--cl-size) / 12.5) solid var(--cl-line);
  animation: cl-squares-left var(--cl-duration) linear infinite;
}

.cl-squares > span:nth-child(2) {
  left: auto;
  right: 0;
  animation-name: cl-squares-right;
}

@keyframes cl-squares-left {
  0%   { transform-origin: bottom right; transform: translate(0, 0) rotate(0deg) translateX(0); }
  50%  { transform-origin: bottom right; transform: translate(0, 0) rotate(90deg) translateX(calc(var(--cl-size) / -2)); }
  100% { transform-origin: bottom right; transform: translate(0, 0) rotate(90deg) translateY(calc(var(--cl-size) / 2)); }
}

@keyframes cl-squares-right {
  0%   { transform-origin: bottom left; transform: translate(0, 0) rotate(0deg) translateX(0); }
  50%  { transform-origin: bottom left; transform: translate(0, 0) rotate(-90deg); }
  100% { transform-origin: bottom left; transform: translate(0, 0) rotate(-90deg) translateY(calc(var(--cl-size) / 2)); }
}

/* ==========================================================================
   07. cl-countdown —— 老式电影倒计时（原 85）
      每个数字用 style="--i:n" 指定次序，不再写 nth-child 列表
   ========================================================================== */

.cl-countdown {
  --cl-size: 420px;
  --cl-color: #000;
  --cl-step: 1s;              /* 每个数字停留多久 */
  --cl-numbers: 10;

  position: relative;
  width: var(--cl-size);
  height: var(--cl-size);
  overflow: hidden;
  border-radius: 50%;
  background: radial-gradient(#fff, #9a9a9a);
  font-family: sans-serif;
}

/* 十字准线 */
.cl-countdown::before,
.cl-countdown::after {
  content: "";
  position: absolute;
  background: var(--cl-color);
  opacity: .85;
}

.cl-countdown::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: calc(var(--cl-size) / 84);
}

.cl-countdown::after {
  top: 0;
  left: 50%;
  width: calc(var(--cl-size) / 84);
  height: 100%;
}

.cl-countdown__dial {
  position: absolute;
  inset: 8%;
  border: calc(var(--cl-size) / 84) solid var(--cl-color);
  border-radius: 50%;
}

.cl-countdown__hand {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--cl-size) * 1.05);
  height: calc(var(--cl-size) / 168 + 2px);
  background: var(--cl-color);
  transform-origin: 0 50%;
  animation: cl-countdown-sweep var(--cl-step) linear infinite;
}

.cl-countdown__numbers {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cl-countdown__numbers li {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--cl-size) * .42);
  font-weight: 700;
  color: var(--cl-color);
  opacity: 0;
  animation: cl-countdown-show calc(var(--cl-step) * var(--cl-numbers)) linear infinite;
  animation-delay: calc(var(--cl-step) * var(--i, 0));
}

@keyframes cl-countdown-sweep {
  from { transform: rotate(-90deg); }
  to   { transform: rotate(270deg); }
}

/* 十个数字均分一轮：每个数字只在前 10% 亮着（--cl-numbers = 10 时） */
@keyframes cl-countdown-show {
  0%, 10%    { opacity: 1; }
  10.01%, 100% { opacity: 0; }
}

/* ==========================================================================
   08. cl-text-shadow —— 字母波浪 + 阴影（原 86）
      每个字母 style="--i:n"，延迟用 calc() 算，不再写 8 条 nth-child
   ========================================================================== */

.cl-text-shadow {
  --cl-size: 5rem;
  --cl-color: #fff;
  --cl-shadow: rgb(0 0 0 / .2);
  --cl-duration: 2.4s;

  display: inline-flex;
  align-items: center;
  gap: .15em;
}

.cl-text-shadow > span {
  display: inline-block;
  font: 700 1em / 1 var(--cl-font, sans-serif);
  font-size: var(--cl-size);
  color: var(--cl-color);
  animation: cl-text-shadow-wave var(--cl-duration) linear infinite;
  animation-delay: calc(var(--cl-duration) / 12 * var(--i, 0));
}

@keyframes cl-text-shadow-wave {
  0%        { transform: scale(1);   text-shadow: 0 0 10px transparent; }
  40%       { transform: scale(1.4); text-shadow: 0 10px 20px var(--cl-shadow); }
  80%, 100% { transform: scale(1);   text-shadow: 0 0 10px transparent; }
}

/* ==========================================================================
   09. cl-counter —— 全屏数字计数器（原 87）
      进度条用 scaleX 而不是 width；数字用 mix-blend-mode: difference。
      需要 css-loaders.js（渐进增强：没有 JS 时就停在 0%）
   ========================================================================== */

.cl-counter {
  --cl-duration: 8s;
  --cl-color: #000;
  --cl-track: #fff;
  --cl-num: #fff;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--cl-track);
  transition: opacity .5s linear;
}

.cl-counter__bar {
  position: absolute;
  inset: 0;
  background: var(--cl-color);
  transform: scaleX(var(--cl-progress, 0));
  transform-origin: 0 50%;
}

.cl-counter__num {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  transform: translate(-50%, -50%);
  font: 800 15vw / 1 var(--cl-font, sans-serif);
  text-align: center;
  color: var(--cl-num);
  mix-blend-mode: difference;
}

.cl-counter.is-done {
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   10. cl-ripple —— 错峰涟漪（原 107）
      span 个数就是环数（默认 10 个），style="--i:n" 决定负延迟。
      动画只动 transform: scale 与 opacity，不触发重排。
   ========================================================================== */

.cl-ripple {
  --cl-size: 400px;
  --cl-color: #fff;
  --cl-duration: 5s;
  --cl-line: 2px;

  position: relative;
  width: var(--cl-size);
  height: var(--cl-size);
  display: grid;
  place-items: center;
}

.cl-ripple > span {
  position: absolute;
  inset: 0;
  border: var(--cl-line) solid var(--cl-color);
  border-radius: 50%;
  transform: scale(0);
  opacity: 0;
  animation: cl-ripple-pulse var(--cl-duration) linear infinite;
  animation-delay: calc(var(--cl-duration) / -10 * var(--i, 0));
}

/* 实心版本 */
.cl-ripple--fill > span {
  border: 0;
  background: color-mix(in srgb, var(--cl-color) 25%, transparent);
}

@keyframes cl-ripple-pulse {
  0%   { transform: scale(0);   opacity: 1; }
  50%  { transform: scale(.5);  opacity: 1; }
  100% { transform: scale(1);   opacity: 0; }
}

/* ==========================================================================
   降级：系统开了"减少动态效果"时，所有组件停在"可读的静态帧"
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .cl-glass > span,
  .cl-glass--ring > span:first-child,
  .cl-typing::before,
  .cl-typing::after,
  .cl-water__wave::before,
  .cl-water__wave::after,
  .cl-spinner,
  .cl-spinner::before,
  .cl-spinner::after,
  .cl-clip > span,
  .cl-squares > span,
  .cl-countdown__hand,
  .cl-countdown__numbers li,
  .cl-text-shadow > span,
  .cl-ripple > span {
    animation: none !important;
  }

  .cl-glass > span { transform: none; }
  .cl-glass--ring > span:first-child { transform: rotate(45deg); }

  .cl-typing::before,
  .cl-typing::after { clip-path: inset(0); }

  .cl-water__wave::before { transform: translate(-50%, -75%) rotate(20deg); }
  .cl-water__wave::after { transform: translate(-50%, -75%) rotate(-15deg); }

  .cl-clip > span:nth-child(1) { transform: none; }
  .cl-clip > span:nth-child(2) { transform: none; }

  .cl-squares { transition: none; }

  .cl-countdown__numbers li { opacity: 0; }
  .cl-countdown__numbers li:first-child { opacity: 1; }

  .cl-text-shadow > span { transform: none; }

  .cl-ripple > span { transform: scale(0); }
  .cl-ripple > span:nth-child(1) { opacity: .9; transform: scale(1); }
  .cl-ripple > span:nth-child(2) { opacity: .45; transform: scale(.66); }
  .cl-ripple > span:nth-child(3) { opacity: .2; transform: scale(.33); }

  .cl-counter__bar { transform: scaleX(1); }
  .cl-counter { opacity: 1; }
}

/* =====================================================================
   优化补充（2026-11-21）
   1) 跳转链接 / noscript 兜底 / 视图 hidden 兜底
   2) 导入预览里"日期已经过去"的标记与一键顺延
   全部只引用现有 CSS 变量，四个主题都能各自取色。
   ===================================================================== */
.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 300;
  transform: translateY(-220%);
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 8px 14px; font-size: 14px; line-height: 1;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
}
.skip-link:focus { transform: none; outline: 2px solid var(--amber); outline-offset: 2px; }

.noscript-note {
  max-width: 640px; margin: 28px auto; padding: 16px 18px;
  background: var(--warn-bg); color: var(--ink);
  border: 1px solid var(--warn-line); border-radius: 12px;
  font-size: 14px; line-height: 1.65;
}
.noscript-note p { margin: 6px 0 0; color: var(--ink-2); }

/* 非当前视图：class 之外再补 [hidden]，读屏器/查找行为更一致 */
.view[hidden] { display: none !important; }

/* 导入预览：解析出来的日期早于现在就标出来，并给一键顺延 */
.draft-fields label.is-past input { border-color: var(--red); }
.past-flag {
  margin-left: 6px; padding: 0 6px; border-radius: 99px;
  background: var(--red); color: #fff; font-size: 11px; line-height: 16px;
  vertical-align: 1px; white-space: nowrap;
}
.fld-name { display: inline-flex; align-items: center; }
.shift-week {
  margin-left: 6px; padding: 0 7px; border-radius: 99px;
  border: 1px solid var(--line-strong); background: var(--chip); color: var(--ink-2);
  font-size: 11px; line-height: 16px; cursor: pointer;
  white-space: nowrap; flex: 0 0 auto;
}
.shift-week:hover { background: var(--paper-2); }
.shift-week:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }

@media (prefers-reduced-motion: reduce) {
  .skip-link { transition: none; }
}

/* 搜索框：任务攒到几十条之后，筛选条已经不够用了 */
.search-wrap { display: inline-flex; align-items: center; gap: 4px; color: var(--muted-2); }
.search-input {
  appearance: none; -webkit-appearance: none;
  border: 1px solid var(--line); background: var(--input); border-radius: 99px;
  padding: 4px 12px; font-size: 11.5px; color: var(--ink);
  width: 132px; transition: width .18s ease-out, border-color .15s ease-out;
}
.search-input::placeholder { color: var(--muted-2); }
.search-input:focus { outline: none; border-color: var(--line-strong); width: 184px; }
.search-input::-webkit-search-cancel-button { opacity: .55; }
@media (max-width: 700px) {
  .search-wrap { flex: 1 1 100%; order: 5; }
  .search-input { width: 100%; }
  .search-input:focus { width: 100%; }
}

/* 自习室实际投入 vs 预估工时 */
.task-spent { font-family: var(--num); font-size: 10.5px; color: var(--muted-2); }
.task-spent.is-over { color: var(--amber); }

/* ===== 第三轮：紧急程度胶囊 / 来源标签编辑器 / 截图识别 ===== */
.field-hint { display: block; margin-top: 4px; font-size: 10.5px; line-height: 1.5; color: var(--muted-2); }

.mi-btn {
  background: none; border: 0; padding: 0; font: inherit; color: inherit;
  cursor: pointer; display: inline-flex; align-items: center; gap: 3px;
}
.mi-btn .ico { width: 11px; height: 11px; }
.mi-btn:hover { color: var(--ink); }
.urg-chip {
  border: 1px dashed var(--line-strong); border-radius: 99px;
  padding: 1px 7px 1px 5px; color: var(--muted);
  transition: color .15s ease-out, background-color .15s ease-out, border-color .15s ease-out;
}
.urg-chip.u1 { color: var(--muted); border-style: solid; }
.urg-chip.u2 { color: var(--amber); border-color: var(--amber); border-style: solid; background: var(--warn-bg); }
.urg-chip.u3 { color: #fff; background: var(--red); border-color: var(--red); border-style: solid; }

.ocr-btn { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.ocr-status { font-size: 11px; line-height: 1.6; color: var(--muted); margin-top: 8px; }
.ocr-status:empty { display: none; }
.ocr-status.is-done { color: var(--green); }
.ocr-status.is-err { color: var(--red); }
.ocr-bar { display: block; height: 3px; border-radius: 99px; background: var(--line); margin-top: 6px; overflow: hidden; }
.ocr-bar i { display: block; height: 100%; background: var(--green); transition: width .2s ease-out; }
.notice-input.is-drag { border-color: var(--green); background: var(--warn-bg); }

.pf-editor { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.pf-row { display: flex; align-items: center; gap: 8px; }
.pf-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px var(--chip); }
.pf-dot-new { background: transparent; border: 1px dashed var(--line-strong); box-shadow: none; }
.pf-name { flex: 1 1 150px; min-width: 110px; }
.pf-kw { flex: 1 1 180px; min-width: 110px; font-size: 11.5px; }
.pf-kw-fixed {
  flex: 1 1 180px; min-width: 110px; font-size: 11px; color: var(--muted-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pf-color {
  width: 30px; height: 30px; padding: 0; flex: none;
  border: 1px solid var(--line); border-radius: 8px; background: var(--input); cursor: pointer;
}
.pf-color::-webkit-color-swatch-wrapper { padding: 3px; }
.pf-color::-webkit-color-swatch { border: none; border-radius: 5px; }
.pf-new { padding-top: 10px; border-top: 1px dashed var(--line); }
.btn-sm { padding: 5px 11px; font-size: 11.5px; }
@media (max-width: 700px) {
  .pf-row { flex-wrap: wrap; }
  .pf-name, .pf-kw, .pf-kw-fixed { flex: 1 1 100%; }
}
/* ===== 提醒：形式选择 / 档位 / 右下角弹窗卡片 ===== */
.seg-row { display: flex; gap: 6px; margin: 10px 0 4px; }
.seg-btn {
  flex: 1; padding: 8px 10px; font-size: 12.5px; font-family: inherit; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--card); color: var(--ink-2);
  transition: background-color .15s var(--ease-out), color .15s var(--ease-out),
              border-color .15s var(--ease-out), transform .12s var(--ease-spring);
}
.seg-btn:hover { border-color: var(--ink-2); color: var(--ink); }
.seg-btn:active { transform: scale(.975); }
.seg-btn.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.remind-grid { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.remind-chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 5px 11px; font-size: 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--card); color: var(--muted);
  transition: background-color .15s var(--ease-out), color .15s var(--ease-out), border-color .15s var(--ease-out);
}
.remind-chip input { display: none; }
.remind-chip.is-on { background: var(--chip); border-color: var(--ink-2); color: var(--ink); }
.remind-chip:hover { border-color: var(--ink-2); }

.remind-dock {
  position: fixed; right: 20px; bottom: 172px; z-index: 70; /* 让开底部音乐卡（24px+卡片高） */
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.remind-card {
  pointer-events: auto; width: 300px; padding: 13px 14px 12px;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 14px;
  box-shadow: var(--e3);
  animation: remind-in .26s var(--ease-spring) both;
}
.remind-card.is-late { border-left: 3px solid var(--amber); }
.rc-top { display: flex; align-items: center; gap: 8px; }
.rc-kicker {
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.rc-when { font-size: 11px; color: var(--muted); margin-left: auto; }
.rc-x { margin-left: 2px; }
.rc-title { margin: 7px 0 3px; font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.rc-sub { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.rc-acts { display: flex; gap: 8px; margin-top: 11px; }
@keyframes remind-in {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to { opacity: 1; transform: none; }
}

/* 优先级按钮：点一下可以自己定分 */
.pri-btn {
  font-family: inherit; cursor: pointer; text-align: right;
  background: none; border: 0; padding: 2px 4px; border-radius: 6px;
  color: var(--muted); font-size: 11.5px;
  transition: background-color .15s var(--ease-out), color .15s var(--ease-out);
}
.pri-btn:hover { background: var(--chip); color: var(--ink); }
.pri-fix {
  margin-left: 4px; padding: 0 5px; border-radius: 5px; font-size: 10px;
  background: var(--chip); color: var(--ink-2);
}

@media (max-width: 860px) {
  .remind-dock { right: 12px; left: 12px; bottom: 152px; }
  .remind-card { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .seg-btn, .remind-chip, .pri-btn { transition: none; }
  .remind-card { animation: none; }
}

/* ================= 第十一节：手机端专项适配 + 桌面微调 =================
   目标：手机上一屏能读完关键信息、拇指可点、输入不缩放、弹窗贴底；
   桌面保持原三段式，只补 sticky/视口/焦点等细节。全部为覆盖式规则，
   放在文件末尾以取得同级选择器的后置优先。 */

/* ---------- 1. 全局：视口单位 / 触控 / 焦点 ---------- */
.app { height: 100vh; height: 100dvh; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow: hidden; }
.main { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
button, .chip, .nav-item, .seg-btn, .mi-btn, .pf-item, .check, .day, .pday {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--ink) 45%, transparent);
  outline-offset: 2px;
}
.side :focus-visible { outline-color: rgba(217, 242, 107, .75); }
@media (min-width: 1560px) {
  .view { max-width: 1040px; }
  .main { padding: 38px 52px 120px; }
}

/* ---------- 2. 触屏设备：去掉"悬停才出现"的依赖 ---------- */
@media (hover: none) {
  .row-actions { opacity: 1; transform: none; }
  .task:hover { transform: none; border-color: var(--line); box-shadow: none; }
  .day:hover, .pday:hover { box-shadow: none; }
  .task:hover::before { transform: none; }
  .pblock:hover::before { background: transparent; }
  .pblock:hover .pblock-axis i { transform: none; box-shadow: none; }
  .pblock:hover .pblock-axis::after { background: var(--line); }
  .chip:hover { color: var(--muted); background: transparent; }
  .chip.is-active:hover { color: var(--btn-solid-fg); background: var(--btn-solid-bg); }
  .task:active, .day:active { transform: none; }
}

/* ---------- 3. 手机 / 竖屏平板：单栏重排 ---------- */
@media (max-width: 860px) {
  /* 3.1 顶栏：品牌 + 可横滑导航 */
  .app { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .side {
    flex-direction: row; align-items: center; gap: 6px;
    padding: calc(7px + env(safe-area-inset-top, 0px)) 10px 7px;
    overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    background: var(--side-bg);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 8px 24px -20px rgba(0, 0, 0, .8);
  }
  .side::-webkit-scrollbar { display: none; }
  .brand { flex: 0 0 auto; padding: 0 2px 0 0; gap: 8px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-mark span { width: 6px; height: 6px; }
  .brand-name { font-size: 15px; letter-spacing: 2px; }
  .brand-sub { display: none; }
  .nav { flex-direction: row; gap: 4px; width: auto; flex: 0 0 auto; }
  .nav-item {
    width: auto; height: 38px; min-height: 38px; padding: 0 11px;
    font-size: 12.5px; border-radius: 11px; flex: 0 0 auto; white-space: nowrap;
  }
  .nav-item span { display: inline; }
  .nav-item .ico { width: 16px; height: 16px; }
  .nav-item.is-active::before { display: none; }
  .nav-item.is-active { background: rgba(255, 255, 255, .12); }
  .nav-count { font-size: 10.5px; padding: 1px 6px; min-width: 18px; }
  .side-section, .side-foot { display: none; }

  /* 3.2 正文区 */
  .main { padding: 14px 14px calc(96px + env(safe-area-inset-bottom, 0px)); }
  .view { max-width: 100%; }
  .head { margin-bottom: 16px; }
  .head-meta { font-size: 11px; gap: 6px; }
  .head h1 { font-size: 21px; line-height: 1.32; letter-spacing: -.4px; }
  .head h1 em { font-size: 24px; }
  .head-sub { font-size: 12.5px; line-height: 1.65; }
  .head-actions {
    margin-top: 13px; gap: 8px;
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin-inline: -14px; padding: 2px 14px 4px;
  }
  .head-actions::-webkit-scrollbar { display: none; }
  .head-actions > * { flex: 0 0 auto; }
  .btn { height: 38px; padding: 0 13px; font-size: 12.5px; border-radius: 11px; }
  .btn .ico { width: 15px; height: 15px; }
  .btn-icon { width: 38px; padding: 0; justify-content: center; }

  /* 3.3 雷达卡片 */
  .radar-card { padding: 13px 12px; border-radius: 16px; }
  .radar-top { gap: 10px; margin-bottom: 10px; }
  .radar-legend { display: none; }
  .radar-hint { font-size: 12px; }
  .radar { gap: 3px; }
  .day { padding: 6px 4px; min-height: 64px; border-radius: 10px; }
  .day-num { font-size: 15px; }

  /* 3.4 列表头：标题+排序一行，搜索一行，筛选可横滑 */
  .list-head {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    align-items: center; gap: 8px 10px; margin-bottom: 12px;
  }
  .list-head.sticky { top: -1px; padding-top: 6px; background: var(--paper); }
  .list-title { grid-column: 1; min-width: 0; }
  .list-title h2 { font-size: 15px; }
  .select-wrap { grid-column: 2; margin-left: 0; }
  .search-wrap { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .search-input { width: 100%; height: 38px; font-size: 16px; }
  .filters {
    grid-column: 1 / -1; grid-row: 3; margin: 0;
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch; padding-bottom: 2px;
  }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; min-height: 30px; padding: 5px 12px; font-size: 12px; }

  /* 3.5 任务卡：标题两行、操作常显、右栏收窄 */
  .group { margin-bottom: 16px; }
  .task-list { gap: 7px; }
  .task { padding: 12px 12px 12px 11px; gap: 10px; border-radius: 14px; }
  .check { width: 24px; height: 24px; border-radius: 8px; margin-top: 0; }
  .check .ico { width: 14px; height: 14px; }
  .task-top { gap: 6px; margin-bottom: 2px; }
  .plat { font-size: 9px; padding: 1px 6px; }
  .course { font-size: 11px; }
  .task-title {
    font-size: 14px; line-height: 1.42; margin-bottom: 4px;
    white-space: normal; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  }
  .task-meta { gap: 10px; font-size: 10.5px; }
  .task-meta .mi svg { width: 11px; height: 11px; }
  .bar { margin-top: 8px; max-width: none; }
  .task-right { min-width: 66px; gap: 2px; }
  .cd { font-size: 11.5px; }
  .pri { font-size: 9px; }
  .row-actions { opacity: 1; transform: none; }
  .row-actions .icon-btn { width: 32px; height: 32px; }
  .row-actions .icon-btn .ico { width: 15px; height: 15px; }

  /* 3.6 弹窗：贴底全宽，底部按钮均分并让开安全区 */
  .modal-mask { align-items: flex-end; padding: 0; }
  .modal { width: 100%; max-width: 100%; max-height: 92dvh; border-radius: 20px 20px 0 0; }
  .modal-head { padding: 16px 16px 8px; }
  .modal-head h2 { font-size: 19px; }
  .modal-body { padding: 4px 16px 10px; }
  .modal-foot {
    padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    gap: 8px; flex-wrap: wrap;
    background: var(--card); border-top: 1px solid var(--line);
  }
  .modal-foot .btn { flex: 1 1 0; justify-content: center; }

  /* 3.7 表单与草稿卡 */
  .draft { padding: 12px; }
  .draft-top { gap: 6px; }
  .draft-course { width: 104px; font-size: 11.5px; }
  .draft-title { font-size: 14px; }
  .draft-fields { grid-template-columns: 1fr 1fr; gap: 8px; }
  .draft-fields label:first-child { grid-column: 1 / -1; }
  .draft-fields input, .draft-fields select,
  .form input, .form select, .form textarea,
  .notice-input, .mini-form input, .pf-name, .pf-kw { font-size: 16px; }
  .form { grid-template-columns: 1fr; }
  .form.two { grid-template-columns: 1fr; }
  .mini-form { grid-template-columns: 1fr 1fr; }

  /* 3.8 设置 / 计划 */
  .settings-grid { grid-template-columns: 1fr; }
  .panel { padding: 16px 14px; border-radius: 16px; }
  .plan-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .pday { min-height: 78px; padding: 8px 6px; }
  .pday-num { font-size: 17px; }
  .plan-goals { grid-template-columns: 1fr; }
  .priority-weights { grid-template-columns: 1fr; }
  .plan-detail { padding: 14px 12px; }
  .pdetail-head { flex-direction: column; gap: 10px; }
  .pdetail-meter { width: 100%; }
  .pdetail-num { justify-content: flex-start; }
  .pdetail-cap { text-align: left; }
  .goal-form, .act-form { grid-template-columns: 1fr 1fr; }
  .goal-form .btn, .act-form .btn { grid-column: 1 / -1; }
  .pblock { grid-template-columns: 42px 12px minmax(0, 1fr) 24px; gap: 6px; }
  .pblock-time b { font-size: 11px; }
  .pblock-title { font-size: 13px; white-space: normal; }
  .seg-btn { min-height: 34px; }

  /* 3.9 浮层让开安全区与底部手势条 */
  .music-dock { left: 10px; right: 10px; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); max-width: none; }
  .remind-dock { left: 10px; right: 10px; bottom: calc(140px + env(safe-area-inset-bottom, 0px)); }
  .remind-card { width: 100%; }
  .study-clock { font-size: 44px; letter-spacing: -1.5px; }
  .save-warn { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); left: 12px; right: 12px; }
}

/* ---------- 4. 小屏手机（≤430）：再收紧一档 ---------- */
@media (max-width: 430px) {
  .brand-text { display: none; }
  .nav-item { padding: 0 10px; font-size: 12px; height: 36px; min-height: 36px; }
  .main { padding-inline: 12px; }
  .head h1 { font-size: 20px; }
  .head h1 em { font-size: 22px; }
  .task { gap: 9px; padding: 11px 11px 11px 10px; }
  .task-right { min-width: 62px; }
  .cd { font-size: 11px; }
  .week-num, .stat b { font-size: 19px; }
  .modal-head h2 { font-size: 18px; }
  .draft-course { width: 96px; }
  .music-dock { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .remind-dock { bottom: calc(132px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- 5. 横屏矮屏：少占首屏高度 ---------- */
@media (max-height: 540px) and (orientation: landscape) {
  .side { padding-block: 4px; }
  .brand-mark { width: 24px; height: 24px; }
  .main { padding-top: 10px; }
  .head h1 { font-size: 19px; }
  .hero { padding: 16px; }
}

/* ---------- 6. 手机端修正与兜底 ---------- */
:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; }
.side :focus-visible { outline-color: rgba(217, 242, 107, .75); }
@supports (outline-color: color-mix(in oklab, red 50%, transparent)) {
  :focus-visible { outline-color: color-mix(in oklab, var(--ink) 45%, transparent); }
  .side :focus-visible { outline-color: rgba(217, 242, 107, .75); }
}

@media (max-width: 860px) {
  /* 搜索框在手机上始终占满一行，别被 :focus 的定宽规则拽回 184px */
  .search-input:focus { width: 100%; }
  /* 倒计时原来是 nowrap，窄屏会顶出卡片；允许两行并右对齐 */
  .task-right { min-width: 0; max-width: 96px; }
  .cd { white-space: normal; text-align: right; line-height: 1.3; }
  .task.is-done .task-right { justify-content: flex-end; }
}
@media (max-width: 430px) {
  .head-actions { margin-inline: -12px; padding-inline: 12px; }
}

/* ---------- 7. 手机端第二轮微调：导航收口 / 小鸽缩放 / 横向滚动提示 ---------- */
@media (max-width: 860px) {
  /* 顶栏可横滑但带吸附，滚到一半也会停在整项上 */
  .side { scroll-snap-type: x proximity; }
  .nav-item { scroll-snap-align: center; }

  /* 操作区横向滚动时给右边缘一点渐隐，暗示"还有" */
  .head-actions {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent);
    padding-right: 26px;
  }

  /* 小鸽：手机/平板上缩成一个安静的小卡片，不再压住正文 */
  .bp-card.bp-float[class] {
    right: 10px; bottom: calc(122px + env(safe-area-inset-bottom, 0px));
    max-width: 150px; padding: 7px 9px 6px; gap: 4px; border-radius: 14px;
  }
  .bp-card.bp-float[class] .bp-stage { height: 72px; }
  .bp-card.bp-float[class] .bp-stage canvas { width: 72px; height: 72px; }
  .bp-card.bp-float[class] .bp-bubble {
    font-size: 10px; line-height: 1.5; max-width: none;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .bp-card.bp-float[class] .bp-badges { display: none; }
  .bp-card.bp-float[class] .bp-hud .bp-line + .bp-line { display: none; }
}

@media (max-width: 640px) {
  /* 更窄的屏幕上只留一只小鸽子头，放在左下角，避开右侧倒计时/提醒 */
  .bp-card.bp-float[class] {
    left: 10px; right: auto; bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    max-width: 68px; padding: 5px; border-radius: 99px;
  }
  .bp-card.bp-float[class] .bp-head,
  .bp-card.bp-float[class] .bp-bubble,
  .bp-card.bp-float[class] .bp-hud,
  .bp-card.bp-float[class] .bp-badges { display: none; }
  .bp-card.bp-float[class] .bp-stage { height: 58px; }
  .bp-card.bp-float[class] .bp-stage canvas { width: 58px; height: 58px; }
  /* 提醒弹窗让开左下角的小鸽 */
  .remind-dock { left: 86px; right: 10px; bottom: calc(128px + env(safe-area-inset-bottom, 0px)); }
}

/* 窄屏导航：只给当前项显示文字，其余收成图标（文字仍留在无障碍树里） */
@media (max-width: 430px) {
  .nav { gap: 2px; }
  .nav-item { gap: 6px; padding: 0 9px; }
  .nav-item > span:not(.nav-count) {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  .nav-item.is-active > span:not(.nav-count) {
    position: static; width: auto; height: auto; margin: 0; overflow: visible; clip-path: none;
  }
  .nav-item.is-active { padding: 0 11px; }
}

/* 窄屏小鸽：收进正文底部的留白带里（.main 预留了 96px），不压正文 */
@media (max-width: 640px) {
  .bp-card.bp-float[class] {
    left: 10px; right: auto; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    max-width: 56px; padding: 4px; border-radius: 99px; box-shadow: 0 10px 26px -18px rgba(22,25,29,.7);
  }
  .bp-card.bp-float[class] .bp-stage { height: 48px; }
  .bp-card.bp-float[class] .bp-stage canvas { width: 48px; height: 48px; }
  .remind-dock { left: 10px; right: 10px; bottom: calc(128px + env(safe-area-inset-bottom, 0px)); }
}

/* 单栏布局下小鸽会压住列表右栏的倒计时：手机上先收起，桌面/宽屏保留 */
@media (max-width: 860px) {
  .bp-card.bp-float[class] { display: none; }
}

/* 宽屏：任务清单的「标题 / 搜索 / 筛选 / 排序」压回同一行，别让排序单占一行 */
.chip { flex: 0 0 auto; white-space: nowrap; }
@media (min-width: 1300px) {
  .list-head { flex-wrap: nowrap; gap: 10px; }
  .list-head .search-input { width: 118px; }
  .list-head .search-input:focus { width: 168px; }
  .list-head .list-title, .list-head .filters, .list-head .select-wrap { flex: 0 0 auto; }
}

.draft-issues { margin-top: 6px; font-size: 11px; line-height: 1.65; color: var(--amber); }

/* 第六轮补充 · 侧栏 logo 与站点图标同一套母题：外环 + 内环 + 指针 + 中心点 */
.brand-mark::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 2px; height: 8px; margin: -8px 0 0 -1px;
  background: #F4F1E9; border-radius: 2px;
  transform-origin: 50% 100%; transform: rotate(42deg); opacity: .9;
}
.brand-mark span { position: relative; z-index: 2; }

/* ================= 第十四轮：手机端底栏 + 更大的按键 + 更丰富的底色 ================= */

/* ---------- A. 站内 logo 换成鸽子圆标（与 favicon 同一枚图形） ---------- */
.brand-mark {
  width: 36px; height: 36px; border-radius: 0; border: 0;
  background: url(dove.svg) center / contain no-repeat;
}
.brand-mark::before, .brand-mark::after { content: none; display: none; }
.brand-mark span { display: none; }

/* ---------- B. 底色：纸面 + 两团很淡的光晕（浅色主题暖、深色主题冷） ---------- */
.app { background: var(--paper); }
.main {
  background-image:
    radial-gradient(760px 420px at 96% -10%, rgba(217, 242, 107, .30), transparent 62%),
    radial-gradient(640px 380px at -14% 0%, rgba(126, 173, 255, .16), transparent 58%),
    radial-gradient(700px 420px at 70% 108%, rgba(255, 186, 120, .10), transparent 60%);
  background-repeat: no-repeat;
  background-attachment: local;
}
[data-theme="dark"] .main {
  background-image:
    radial-gradient(760px 420px at 96% -10%, rgba(217, 242, 107, .20), transparent 62%),
    radial-gradient(640px 380px at -14% 0%, rgba(90, 140, 255, .22), transparent 58%),
    radial-gradient(700px 420px at 70% 108%, rgba(255, 160, 90, .10), transparent 60%);
}
.side { background-image: radial-gradient(320px 260px at 20% 0%, rgba(217, 242, 107, .10), transparent 70%); }

/* ---------- C. 手机端：顶部横滑导航 → 底部标签栏 ---------- */
@media (max-width: 860px) {
  .app { grid-template-rows: minmax(0, 1fr); padding-bottom: 0; }
  .side {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    height: auto; min-height: 0; z-index: 90;
    flex-direction: row; align-items: center; gap: 4px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    background: color-mix(in oklab, var(--side-bg) 94%, #000);
    border-top: 1px solid rgba(255, 255, 255, .09);
    box-shadow: 0 -14px 34px -26px rgba(0, 0, 0, .9);
    overflow: visible;
  }
  .brand { padding: 0 4px 0 0; gap: 0; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-text { display: none; }
  .nav { flex: 1 1 auto; flex-direction: row; justify-content: space-between; gap: 0; width: auto; }
  .nav-item {
    flex: 1 1 0; width: auto; min-width: 0; height: 52px; padding: 0 2px;
    flex-direction: column; justify-content: center; gap: 3px;
    font-size: 10.5px; line-height: 1; letter-spacing: .2px; border-radius: 13px;
    background: transparent; position: relative;
  }
  .nav-item > span:not(.nav-count) {
    position: static; width: auto; height: auto; margin: 0; overflow: visible;
    clip-path: none; white-space: nowrap;
  }
  .nav-item .ico { width: 21px; height: 21px; }
  .nav-item.is-active { background: rgba(217, 242, 107, .16); box-shadow: inset 0 0 0 1px rgba(217, 242, 107, .34); }
  .nav-item.is-active::before { display: none; }
  .nav-count {
    position: absolute; top: 3px; right: 50%; transform: translateX(19px);
    min-width: 15px; height: 15px; padding: 0 4px; border-radius: 99px;
    font-size: 9px; line-height: 15px; text-align: center;
  }
  .main {
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }
  /* 操作区改换行：手机上六个按钮一次看全，不用横滑 */
  .head-actions {
    flex-wrap: wrap; overflow: visible; padding-right: 0;
    -webkit-mask-image: none; mask-image: none;
  }
  .head-actions .btn { flex: 1 1 auto; }
  .head-actions .icon-btn { flex: 0 0 auto; }
  .music-dock { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .remind-dock { bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }

  /* 按键更清楚：主操作 46、次要 42、图标键 44、胶囊 36 起 */
  .btn { min-height: 46px; padding: 0 18px; font-size: 14px; border-radius: 13px; }
  .btn .ico { width: 17px; height: 17px; }
  .btn-ghost { border-color: var(--line-strong); background: var(--card); }
  .icon-btn { width: 46px; height: 46px; border-radius: 13px; color: var(--ink-2); border-color: var(--line-strong); }
  .nav-count { top: 1px; }
  .icon-btn .ico { width: 19px; height: 19px; }
  .chip { min-height: 36px; padding: 0 13px; font-size: 13px; }
  .seg-btn { min-height: 42px; }
  .mi-btn { min-height: 34px; padding: 0 10px; }
  fieldset, .field { row-gap: 6px; }
  .field input, .field select, .field textarea { min-height: 46px; }
}

/* ---------- D. 极窄屏：底栏更紧 ---------- */
@media (max-width: 380px) {
  .nav-item { font-size: 9.5px; height: 50px; }
  .nav-item .ico { width: 19px; height: 19px; }
  .brand-mark { width: 26px; height: 26px; }
}

/* ================= 第十五轮：主题特效 + 宠物开关 ================= */

/* 特效层：垫在内容下面（卡片自己有不透明底色，所以只在留白里显出星星/草） */
#fxLayer {
  position: fixed; inset: 0; z-index: 1; overflow: hidden; pointer-events: none;
  opacity: 0; transition: opacity .9s var(--ease-out, ease);
}
#fxLayer.fx-in { opacity: 1; }
#fxLayerTop { position: fixed; inset: 0; z-index: 3; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .9s var(--ease-out, ease); }
#fxLayerTop.fx-in { opacity: 1; }
.main { position: relative; z-index: 2; }
@media (min-width: 861px) { .side { position: relative; z-index: 2; } }
.main { background-color: transparent; }
[data-theme="dark"] .main, [data-theme="bean"] .main { background-image: none; }

/* ---- 暗色：星星 + 月亮 ---- */
.fx-star {
  position: absolute; color: rgba(250, 248, 240, .95); display: block;
  transform-origin: 50% 50%;
  animation-name: fx-twinkle; animation-iteration-count: infinite; animation-timing-function: ease-in-out;
}
.fx-star svg, .fx-grass svg, .fx-vine svg { width: 100%; height: 100%; display: block; }
.fx-star-lg { color: rgba(217, 242, 107, .78); filter: drop-shadow(0 0 6px rgba(217, 242, 107, .35)); }
@keyframes fx-twinkle {
  0%, 100% { opacity: .18; transform: scale(.86) rotate(0deg); }
  50% { opacity: .92; transform: scale(1.06) rotate(12deg); }
}
@keyframes fx-moon-in {
  from { opacity: 0; transform: translateY(-8px) scale(.86); }
  to { opacity: 1; transform: none; }
}

/* ---- 豆绿：草地 + 藤叶 ---- */
.fx-grass {
  position: absolute; bottom: -2px; width: 26px; color: rgba(48, 92, 56, .55);
  transform-origin: 50% 100%;
  animation: fx-sway 7s ease-in-out infinite alternate;
  opacity: .75;
}
.fx-vine {
  position: absolute; width: 18px; color: rgba(56, 104, 64, .42);
  transform-origin: 50% 100%;
  animation: fx-sway 9s ease-in-out infinite alternate;
  opacity: .62;
}
@keyframes fx-sway {
  0% { transform: rotate(-3.2deg) translateY(6px); opacity: .25; }
  55% { opacity: .95; }
  100% { transform: rotate(3.4deg) translateY(0); opacity: .8; }
}
/* 入场：整层 0→1 慢淡入（上面 #fxLayer.fx-in 那条），元素自身再做微小的生长/闪烁 */

/* 深色/豆绿主题里，正文底色让出一点给特效 */
[data-theme="dark"] .app { background: #0E1014; }
[data-theme="bean"] .app { background: #EAF2E6; }

/* ---- 宠物：开关 + 折叠 ---- */
.pet-off .bp-card.bp-float[class] { display: none !important; }
#petChip {
  position: fixed; left: 14px; bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  z-index: 88; display: none; align-items: center; gap: 6px;
  height: 40px; padding: 0 12px 0 8px; border-radius: 99px;
  background: var(--card); border: 1px solid var(--line-strong); color: var(--ink);
  font-size: 12px; box-shadow: 0 10px 26px -18px rgba(0, 0, 0, .7); cursor: pointer;
}
.pet-off #petChip { display: inline-flex; }
#petChip .ico { width: 16px; height: 16px; color: var(--muted); }
.pet-state { font-size: 12px; color: var(--muted); }
@media (max-width: 861px) {
  #petChip { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .fx-grass { bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
  .fx-grass { width: 20px; }
  .fx-vine { width: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .fx-star { opacity: .5; }
}

/* 豆绿主题：底部草地带（MDI grass 拼成 repeat-x，比逐株定位稳） */
[data-theme="bean"] body::after {
  content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 54px; z-index: 3;
  pointer-events: none; opacity: .45;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22%23305c38%22%3E%3Cpath%20d%3D%22mdi-grassM12%2020H2V18H7.75C7%2015.19%204.81%2013%202%2012.26C2.64%2012.1%203.31%2012%204%2012C8.42%2012%2012%2015.58%2012%2020M22%2012.26C21.36%2012.1%2020.69%2012%2020%2012C17.07%2012%2014.5%2013.58%2013.12%2015.93C13.41%2016.59%2013.65%2017.28%2013.79%2018C13.92%2018.65%2014%2019.32%2014%2020H22V18H16.24C17%2015.19%2019.19%2013%2022%2012.26M15.64%2011C16.42%208.93%2017.87%207.18%2019.73%206C15.44%206.16%2012%209.67%2012%2014V14C12.95%2012.75%2014.2%2011.72%2015.64%2011M11.42%208.85C10.58%206.66%208.88%204.89%206.7%204C8.14%205.86%209%208.18%209%2010.71C9%2010.92%208.97%2011.12%208.96%2011.32C9.39%2011.56%209.79%2011.84%2010.18%2012.14C10.39%2010.96%2010.83%209.85%2011.42%208.85Z%22%2F%3E%3C%2Fsvg%3E") repeat-x left bottom / 26px 26px;
}
@media (max-width: 861px) {
  [data-theme="bean"] body::after { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); height: 40px; }
}

/* ===== 第十六轮：特效重做（全部垫在内容下面，卡片天然做蒙版） ===== */

/* 特效层回到内容下方：卡片、文字永远压在上面，不会被特效盖住 */
#fxLayer { z-index: 1; }
#fxLayerTop { display: none !important; }
.main { position: relative; z-index: 2; }
@media (min-width: 861px) { .side { position: relative; z-index: 2; } }

/* 深色：夜空渐变 + 三档景深星星 + 带光晕的月亮 */
[data-theme="dark"] .app {
  background:
    radial-gradient(1200px 620px at 78% -12%, rgba(58, 74, 140, .38), transparent 60%),
    radial-gradient(900px 520px at 12% 8%, rgba(40, 92, 70, .30), transparent 62%),
    radial-gradient(700px 420px at 55% 120%, rgba(120, 90, 160, .22), transparent 66%),
    linear-gradient(180deg, #0B0D12 0%, #0E1116 45%, #0A0C10 100%);
}
.fx-star { color: rgba(250, 248, 240, .92); }
.fx-star.d2 { color: rgba(214, 226, 255, .70); filter: blur(.3px); }
.fx-star.d3 { color: rgba(240, 244, 255, .42); filter: blur(.8px); }
.fx-star-lg { color: rgba(217, 242, 107, .85); filter: drop-shadow(0 0 7px rgba(217, 242, 107, .45)); animation-name: fx-twinkle, fx-float; }
@keyframes fx-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes fx-moon-drift {
  from { transform: translateY(0) rotate(-1deg); }
  to { transform: translateY(-5px) rotate(1deg); }
}
/* 桌面：月亮移到正文右边缘、滚动条左侧，避开右侧小鸽 */

/* 豆绿：纸面 + 日光，底部两层草地（垫在内容下，只在留白处显形） */
[data-theme="bean"] .app {
  background:
    radial-gradient(760px 420px at 82% -8%, rgba(255, 244, 200, .55), transparent 62%),
    radial-gradient(620px 380px at 8% 0%, rgba(190, 226, 190, .55), transparent 60%),
    linear-gradient(180deg, #EEF6EA 0%, #E7F1E4 55%, #DEEBDA 100%);
}
[data-theme="bean"] .app::before,
[data-theme="bean"] .app::after {
  content: ""; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1; pointer-events: none;
}
[data-theme="bean"] .app::after {
  height: 46px; opacity: .55;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22%2333663a%22%3E%3Cpath%20d%3D%22mdi-grassM12%2020H2V18H7.75C7%2015.19%204.81%2013%202%2012.26C2.64%2012.1%203.31%2012%204%2012C8.42%2012%2012%2015.58%2012%2020M22%2012.26C21.36%2012.1%2020.69%2012%2020%2012C17.07%2012%2014.5%2013.58%2013.12%2015.93C13.41%2016.59%2013.65%2017.28%2013.79%2018C13.92%2018.65%2014%2019.32%2014%2020H22V18H16.24C17%2015.19%2019.19%2013%2022%2012.26M15.64%2011C16.42%208.93%2017.87%207.18%2019.73%206C15.44%206.16%2012%209.67%2012%2014V14C12.95%2012.75%2014.2%2011.72%2015.64%2011M11.42%208.85C10.58%206.66%208.88%204.89%206.7%204C8.14%205.86%209%208.18%209%2010.71C9%2010.92%208.97%2011.12%208.96%2011.32C9.39%2011.56%209.79%2011.84%2010.18%2012.14C10.39%2010.96%2010.83%209.85%2011.42%208.85Z%22%2F%3E%3C%2Fsvg%3E") repeat-x left bottom / 22px 22px;
}
[data-theme="bean"] .app::before {
  height: 68px; opacity: .38;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22%23274d2c%22%3E%3Cpath%20d%3D%22mdi-grassM12%2020H2V18H7.75C7%2015.19%204.81%2013%202%2012.26C2.64%2012.1%203.31%2012%204%2012C8.42%2012%2012%2015.58%2012%2020M22%2012.26C21.36%2012.1%2020.69%2012%2020%2012C17.07%2012%2014.5%2013.58%2013.12%2015.93C13.41%2016.59%2013.65%2017.28%2013.79%2018C13.92%2018.65%2014%2019.32%2014%2020H22V18H16.24C17%2015.19%2019.19%2013%2022%2012.26M15.64%2011C16.42%208.93%2017.87%207.18%2019.73%206C15.44%206.16%2012%209.67%2012%2014V14C12.95%2012.75%2014.2%2011.72%2015.64%2011M11.42%208.85C10.58%206.66%208.88%204.89%206.7%204C8.14%205.86%209%208.18%209%2010.71C9%2010.92%208.97%2011.12%208.96%2011.32C9.39%2011.56%209.79%2011.84%2010.18%2012.14C10.39%2010.96%2010.83%209.85%2011.42%208.85Z%22%2F%3E%3C%2Fsvg%3E") repeat-x left bottom / 34px 34px;
}
@media (max-width: 861px) {
  [data-theme="bean"] .app::before { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); height: 54px; }
  [data-theme="bean"] .app::after { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); height: 36px; }
}
/* 豆绿：两侧垂下几片叶子，落在留白里 */
[data-theme="bean"] .fx-vine {
  position: fixed; width: 16px; height: 18px; opacity: .5; color: #3a7440;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22%23356b3c%22%3E%3Cpath%20d%3D%22M11%2020A7%207%200%200%201%209.8%206.1C15.5%205%2017%204.48%2019%202c1%202%202%204.18%202%208%200%205.5-4.78%2010-10%2010ZM2%2021c0-3%201.85-5.36%205.08-6C9.5%2014.52%2012%2013%2013%2012%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
  animation: fx-sway 9s ease-in-out infinite alternate;
}
[data-theme="bean"] .fx-vine svg { display: none; }

/* 小鸽卡片上的收起按钮 */
.bp-card.bp-float[class] { position: fixed; z-index: 6; }
.pet-x {
  position: absolute; top: 44px; right: 10px; z-index: 3;
  width: 22px; height: 22px; border: 0; border-radius: 99px; cursor: pointer;
  background: rgba(20, 22, 26, .55); color: #F4F1E9; font-size: 13px; line-height: 22px;
  padding: 0; opacity: .55; transition: opacity .18s ease;
}
.bp-card.bp-float[class]:hover .pet-x, .pet-x:focus-visible { opacity: 1; }
@media (hover: none) { .pet-x { opacity: 1; } }
/* 收起后的小胶囊更明显一点 */
#petChip { bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }

/* 宽屏：三栏都抬到特效层之上，星星只落在留白里，不会盖到卡片和文字 */
@media (min-width: 861px) {
  body > .app > * { position: relative; z-index: 2; }
  body > .app > .side { z-index: 3; }
}

.bp-card { position: relative; }

/* ===== 第十七轮：收起小鸽要真的看不见 + 豆绿的植物挪到侧栏留白里 ===== */

/* 小鸽：不管是浮游版还是右侧栏里的卡片版，收起后都彻底隐藏 */
body.pet-off .bp-card[class] { display: none !important; }
body.pet-off #petChip { display: inline-flex; }

/* 豆绿：把草地画进左侧栏底部的空白区（那里没有文字，天然是留白） */
@media (min-width: 861px) { [data-theme="bean"] .side { position: relative; overflow: hidden; } }
[data-theme="bean"] .side::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 168px; z-index: 0;
  pointer-events: none; opacity: .30;
  background:
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22%235fa066%22%3E%3Cpath%20d%3D%22mdi-grassM12%2020H2V18H7.75C7%2015.19%204.81%2013%202%2012.26C2.64%2012.1%203.31%2012%204%2012C8.42%2012%2012%2015.58%2012%2020M22%2012.26C21.36%2012.1%2020.69%2012%2020%2012C17.07%2012%2014.5%2013.58%2013.12%2015.93C13.41%2016.59%2013.65%2017.28%2013.79%2018C13.92%2018.65%2014%2019.32%2014%2020H22V18H16.24C17%2015.19%2019.19%2013%2022%2012.26M15.64%2011C16.42%208.93%2017.87%207.18%2019.73%206C15.44%206.16%2012%209.67%2012%2014V14C12.95%2012.75%2014.2%2011.72%2015.64%2011M11.42%208.85C10.58%206.66%208.88%204.89%206.7%204C8.14%205.86%209%208.18%209%2010.71C9%2010.92%208.97%2011.12%208.96%2011.32C9.39%2011.56%209.79%2011.84%2010.18%2012.14C10.39%2010.96%2010.83%209.85%2011.42%208.85Z%22%2F%3E%3C%2Fsvg%3E") repeat-x left bottom / 30px 30px,
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22%237fbf85%22%3E%3Cpath%20d%3D%22mdi-grassM12%2020H2V18H7.75C7%2015.19%204.81%2013%202%2012.26C2.64%2012.1%203.31%2012%204%2012C8.42%2012%2012%2015.58%2012%2020M22%2012.26C21.36%2012.1%2020.69%2012%2020%2012C17.07%2012%2014.5%2013.58%2013.12%2015.93C13.41%2016.59%2013.65%2017.28%2013.79%2018C13.92%2018.65%2014%2019.32%2014%2020H22V18H16.24C17%2015.19%2019.19%2013%2022%2012.26M15.64%2011C16.42%208.93%2017.87%207.18%2019.73%206C15.44%206.16%2012%209.67%2012%2014V14C12.95%2012.75%2014.2%2011.72%2015.64%2011M11.42%208.85C10.58%206.66%208.88%204.89%206.7%204C8.14%205.86%209%208.18%209%2010.71C9%2010.92%208.97%2011.12%208.96%2011.32C9.39%2011.56%209.79%2011.84%2010.18%2012.14C10.39%2010.96%2010.83%209.85%2011.42%208.85Z%22%2F%3E%3C%2Fsvg%3E") repeat-x left bottom / 22px 22px;
}
[data-theme="bean"] .side > * { position: relative; z-index: 1; }
[data-theme="bean"] .side-foot { position: relative; z-index: 2; }

/* 正文右下角再垂两片叶子（只在留白处，卡片会盖住它） */
[data-theme="bean"] .main::after {
  content: ""; position: fixed; right: 296px; bottom: 8px; width: 54px; height: 54px; z-index: 1;
  pointer-events: none; opacity: .35;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22%238fd094%22%3E%3Cpath%20d%3D%22M11%2020A7%207%200%200%201%209.8%206.1C15.5%205%2017%204.48%2019%202c1%202%202%204.18%202%208%200%205.5-4.78%2010-10%2010ZM2%2021c0-3%201.85-5.36%205.08-6C9.5%2014.52%2012%2013%2013%2012%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
  transform: rotate(-12deg);
}
@media (max-width: 1180px) { [data-theme="bean"] .main::after { display: none; } }

/* 月亮往下挪一点，别和顶部日期挤在一起 */

/* 月相图标：Twemoji 的全 8 个月相（CC-BY 4.0），按当天相位切换 */
@keyframes fx-moon-glow {
  from { filter: drop-shadow(0 0 12px rgba(255, 214, 140, .28)); }
  to { filter: drop-shadow(0 0 20px rgba(255, 214, 140, .50)); }
}

/* ============ 第十七轮：暗色主题换成流星雨（无贴图，纯渐变 + 发光头） ============ */
.fx-meteor {
  position: absolute;
  height: 2px;
  border-radius: 99px;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(188, 220, 255, .04) 22%,
    rgba(205, 232, 255, .42) 68%,
    rgba(235, 246, 255, .95) 96%,
    #ffffff 100%);
  filter: drop-shadow(0 0 7px rgba(186, 219, 255, .55));
  mix-blend-mode: screen;
  transform: translate3d(0, 0, 0) rotate(var(--ang, 158deg));
  animation-name: fx-meteor;
  animation-timing-function: cubic-bezier(.34, .04, .7, .58);
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}
.fx-meteor::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px 3px rgba(205, 232, 255, .8), 0 0 26px 9px rgba(150, 195, 255, .28);
}
@keyframes fx-meteor {
  0%   { opacity: 0; transform: translate3d(0, 0, 0) rotate(var(--ang, 158deg)); }
  7%   { opacity: var(--op, .8); }
  58%  { opacity: var(--op, .8); }
  100% { opacity: 0; transform: translate3d(var(--tx, -170px), var(--ty, 96px), 0) rotate(var(--ang, 158deg)); }
}
@media (max-width: 861px) {
  .fx-meteor { height: 1.6px; }
  .fx-meteor::after { width: 4px; height: 4px; margin-top: -2px; }
}
@media (prefers-reduced-motion: reduce) {
  .fx-meteor { animation: none !important; opacity: 0; }
}

/* ============ 第十八轮：统一每个主题的底色，去掉多余光晕 ============ */
/* 页面底色只保留主题本色，不再叠径向光斑 */
.main { background-image: none !important; }
.side { background-image: none !important; }

/* 深色：一块干净的深蓝黑，不要星云渐变 */
[data-theme="dark"] body { background: #0E1116 !important; }
[data-theme="dark"] .app { background: transparent !important; background-image: none !important; }
[data-theme="dark"] .main { background: transparent !important; }

/* 豆绿：干净的浅绿纸面 */
[data-theme="bean"] body { background: #EDF4E6 !important; }
[data-theme="bean"] .app { background: transparent !important; background-image: none !important; }
[data-theme="bean"] .main { background: transparent !important; }

/* 顶卡右上的柠檬光斑 —— 就是它让「优先级」那块发绿 */
.hero::before { content: none !important; display: none !important; }

/* 小鸽脚下的彩色光晕（随心情变色，跟主题不搭） */
.bp-stage .bp-glow { display: none !important; }

/* 第十九轮：手机端总览改横向分页（今天 / 这周），桌面端 display:contents 完全透明 */
.pager { display: contents; }
@media (max-width: 860px) {
  .pager {
    display: flex; overflow-x: auto; overflow-y: visible;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; overscroll-behavior-x: contain;
    margin: 0 -2px;
  }
  .pager::-webkit-scrollbar { display: none; }
  .pager {
    height: calc(100vh - 152px - env(safe-area-inset-bottom, 0px));
    height: calc(100dvh - 152px - env(safe-area-inset-bottom, 0px));
    align-items: stretch;
  }
  .pager > .page {
    flex: 0 0 100%; min-width: 0; scroll-snap-align: center;
    height: 100%; overflow-y: auto; overscroll-behavior-y: contain;
    padding: 0 2px 24px;
  }
  .pager > .page > *:first-child { margin-top: 0; }
}

/* 分页控制条：只在窄屏出现 */
.pager-bar { display: none; }
@media (max-width: 860px) {
  .pager-bar {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    padding: 10px 2px 2px;
  }
  .pager-btn {
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid var(--line-strong, var(--line)); background: var(--card);
    color: var(--ink-2); font-size: 18px; line-height: 1; display: grid; place-items: center;
  }
  .pager-btn:disabled { opacity: .3; }
  .pager-dots { display: flex; gap: 8px; }
  .pager-dot {
    width: 7px; height: 7px; border-radius: 50%; border: 0; padding: 0;
    background: var(--line-strong, var(--line)); transition: width .2s, background-color .2s;
  }
  .pager-dot.is-on { width: 20px; border-radius: 4px; background: var(--ink); }
  .pager > .page { padding-bottom: 6px; }
}

/* 分组折叠 */
.group-fold-head { cursor: pointer; user-select: none; position: relative; }
.group-fold-head::after {
  content: ''; position: absolute; right: 2px; top: 50%; width: 7px; height: 7px;
  border-right: 1.5px solid var(--muted-2, #9aa); border-bottom: 1.5px solid var(--muted-2, #9aa);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s;
}
.group.is-folded > .group-fold-head::after { transform: translateY(-30%) rotate(-135deg); }
.group.is-folded > .task { display: none; }
.group.is-folded > .group-fold-head { margin-bottom: 0; }
