:root {
  color-scheme: dark;
  --bg: #11141c;
  --text: #eeedf5;
  --muted: #9296aa;
  --accent: #bcb0f5;
  --line: #ffffff0d;
  font-family: Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  background: var(--bg);
  color: var(--text);
}
/* 输入区的模式按钮：清单 / 随手记。 */
.mode-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; font-size: 10px; color: #686b80; }
.mode-caption #mode-label { color: #b7a9d7; letter-spacing: .1em; }
.mode-toggle { position: relative; width: 36px; height: 36px; min-height: 36px; padding: 0; flex-shrink: 0; display: grid; place-items: center; border: 1px solid #bcb0f52b; border-radius: 12px; color: #c5b7e8; background: #bcb0f50b; transition: background .2s, border-color .2s; }
.mode-toggle:hover { border-color: #bcb0f580; background: #bcb0f51b; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.app-icon { display: inline-block; width: 18px; height: 18px; flex-shrink: 0; vertical-align: middle; }
.note-glyph .app-icon { width: 15px; height: 15px; }
.mode-switch-mark { position: absolute; bottom: -4px; right: -4px; display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: #282334; border: 1px solid #aa91ca45; color: #b9a6d8; font-size: 7px; }
.note-input { width: 100%; flex: 1; min-width: 0; min-height: 140px; max-height: 420px; resize: vertical; border: 0; outline: none; padding: 3px 0 12px; background: transparent; color: inherit; font: inherit; font-size: 16px; line-height: 1.9; }
.note-input::placeholder { color: #777182; }
.note-info { display: flex; gap: 12px; align-items: center; color: #89808e; font-size: 10px; }
.note-info .text-button { color: #baa88d; }
.notes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.note-card { --paper: #c7ae83; position: relative; min-width: 0; display: flex; flex-direction: column; gap: 19px; padding: 22px 22px 12px; border: 1px solid #d9bb8124; border-radius: 19px; background: linear-gradient(145deg, #b89a5910, #ffffff03); box-shadow: 0 10px 30px #00000012, inset 0 1px #ffffff04; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transition: border-color .2s, box-shadow .2s; }
.note-card:nth-child(3n+2) { --paper: #b5a1c7; border-color: #b5a1c724; background: linear-gradient(145deg, #aa8ac910, #ffffff03); }
.note-card:nth-child(3n+3) { --paper: #9ebbad; border-color: #9ebbad24; background: linear-gradient(145deg, #86b39a10, #ffffff03); }
.note-card::before { content: ''; position: absolute; top: 18px; left: -1px; width: 3px; height: 25px; border-radius: 2px; background: var(--paper); opacity: .45; }
.note-card:hover, .note-card.is-editing { border-color: color-mix(in srgb, var(--paper) 50%, transparent); box-shadow: 0 12px 34px #0000001b; }
.note-card-top { display: flex; align-items: center; gap: 10px; }
.note-glyph { color: var(--paper); font-size: 13px; opacity: .8; }
.note-time { color: #827b8b; font-size: 10px; letter-spacing: .02em; }
.note-content { color: #d5cfda; font-size: 13px; line-height: 1.95; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #a58fa333 transparent; }
.note-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid #ffffff09; }
.note-edited { font-size: 9px; color: #676475; }
.note-actions { display: flex; gap: 2px; }
.note-actions button { width: 30px; font-size: 11px; }
.note-actions .note-delete:hover { color: #d6a2a7; }
.note-search { display: flex; gap: 8px; align-items: center; min-width: 0; color: #777083; font-size: 11px; }
.note-search input { width: 145px; max-width: 100%; border: 0; border-bottom: 1px solid #ffffff10; border-radius: 0; background: transparent; color: inherit; padding: 8px 0; font-size: 12px; }
.note-search input:focus { border-color: #b6a08488; }
[data-mode="notes"] { --accent: #cfbb97; }
[data-mode="notes"] .composer-main { align-items: flex-start; }
[data-mode="notes"] .composer { background: linear-gradient(125deg, #c4a16a0c, #ffffff03); border-color: #d9bb8124; }
[data-mode="notes"] .composer:focus-within { border-color: #ccb18466; }
[data-mode="notes"] .mode-toggle { color: #d5be95; border-color: #ccb18438; background: #ccb1840c; }
[data-mode="notes"] .mode-toggle:hover { border-color: #ccb18480; background: #ccb18418; }
[data-mode="notes"] .mode-switch-mark { background: #302a28; color: #d5be95; border-color: #ccb18440; }
[data-mode="notes"] #mode-label, [data-mode="notes"] .eyebrow { color: #b5a086; }
[data-mode="notes"] .nav-item.active { color: #ceb998; border-color: #ccb1841c; background: #ccb1840c; }
[data-mode="notes"] .active .badge { color: #b5a086; }
[data-mode="notes"] .day.selected { background: #cfbb97; }
[data-theme="light"] .mode-caption { color: #a49aad; }
[data-theme="light"] .mode-caption #mode-label { color: #9478ad; }
[data-theme="light"] .mode-toggle { color: #9778b3; border-color: #aa87d22b; background: #aa87d20b; }
[data-theme="light"] .mode-switch-mark { background: #f5effa; color: #9778b3; border-color: #aa87d238; }
[data-theme="light"] .note-input::placeholder { color: #b1a3b1; }
[data-theme="light"] .note-info, [data-theme="light"] .note-search { color: #a294a9; }
[data-theme="light"] .note-search input { border-color: #8f739722; }
[data-theme="light"] .note-card { --paper: #b79a68; background: linear-gradient(145deg, #fffbf2dc, #fffdfa9e); border-color: #d6be9633; box-shadow: 0 8px 26px #816a4606, inset 0 1px #ffffff; }
[data-theme="light"] .note-card:nth-child(3n+2) { --paper: #ab8fb8; background: linear-gradient(145deg, #faf4ffdc, #fdfaff9e); border-color: #bfa2cc2b; }
[data-theme="light"] .note-card:nth-child(3n+3) { --paper: #8aa994; background: linear-gradient(145deg, #f2faf5dc, #fbfffd9e); border-color: #a2bfa52b; }
[data-theme="light"] .note-content { color: #6a5a6c; }
[data-theme="light"] .note-time { color: #aa9aab; }
[data-theme="light"] .note-edited { color: #b8aabc; }
[data-theme="light"] .note-card-foot { border-color: #8d739510; }
[data-theme="light"] [data-mode="notes"] .composer { background: linear-gradient(125deg, #fffaf0b3, #fffefd80); border-color: #d6be9633; }
[data-theme="light"] [data-mode="notes"] .mode-toggle { color: #b19365; border-color: #c1a37533; background: #c1a3750b; }
[data-theme="light"] [data-mode="notes"] .mode-switch-mark { background: #fcf8ef; color: #b19365; border-color: #c1a37533; }
[data-theme="light"] [data-mode="notes"] #mode-label, [data-theme="light"] [data-mode="notes"] .eyebrow { color: #b09370; }
[data-theme="light"] [data-mode="notes"] .nav-item.active { background: #c1a3750f; color: #a4875d; border-color: #c1a3751c; }
[data-theme="light"] [data-mode="notes"] .primary { background: #e8d8b9; color: #785f3f; }
[data-theme="light"] [data-mode="notes"] .primary:hover { background: #e2cfac; }
@media (max-width: 600px) { .notes-grid { grid-template-columns: 1fr; } .note-card { padding: 20px 20px 10px; } .mode-caption { font-size: 9px; } .note-search input { width: 120px; font-size: 16px; } .note-input { min-height: 155px; } }
@media (prefers-reduced-transparency: reduce) { .note-card { background: #24232b; backdrop-filter: none; -webkit-backdrop-filter: none; } [data-theme="light"] .note-card { background: #fffdf8; } }
* {
  box-sizing: border-box;
}
[hidden] {
  display: none!important;
}
body {
  margin: 0;
  min-height: 100svh;
  background: radial-gradient(ellipse at 4% 3%,#51416a40,transparent 50%),radial-gradient(ellipse at 100% 80%,#234e4c30,transparent 50%),var(--bg);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.035' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .45;
}
button,input {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  min-height: 40px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: inherit;
}
button:disabled {
  opacity: .4;
  cursor: wait;
}
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
input {
  min-width: 0;
  color: inherit;
  outline: none;
}
input:focus {
  border-color: #bcb0f580!important;
}
input::placeholder {
  color: #71758a;
}
h1,h2,p {
  margin: 0;
}
.muted {
  color: var(--muted);
  line-height: 1.7;
}
.icon {
  width: 18px;
  text-align: center;
  font-size: 15px;
  flex-shrink: 0;
}
.glass {
  border: 1px solid #ffffff12;
  background: #ffffff04;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 24px 70px #0002,inset 0 1px #ffffff05;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .06em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #292237;
  background: linear-gradient(135deg,#d2c7ff,#a899e0);
  box-shadow: 0 5px 22px #aa91ee20;
}
.brand-sub {
  margin: 8px 0 0 47px;
  font-size: 10px;
  color: #74788c;
  letter-spacing: .2em;
}
.auth-wrap {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 24px;
}
.auth-card {
  width: min(100%,420px);
  border-radius: 28px;
  padding: 38px;
}
.auth-card h1 {
  margin-top: 38px;
  font-size: 29px;
  font-weight: 550;
  letter-spacing: -.04em;
}
.auth-card .muted {
  margin-top: 12px;
  font-size: 13px;
}
.auth-form {
  margin-top: 28px;
}
.field {
  display: block;
  margin-bottom: 18px;
  font-size: 12px;
  color: #bbb9ce;
}
.field input {
  display: block;
  width: 100%;
  margin-top: 9px;
  padding: 14px;
  border: 1px solid #ffffff13;
  border-radius: 12px;
  background: #0002;
  font-size: 16px;
}
.primary {
  padding: 12px 19px;
  background: var(--accent);
  color: #292238;
  font-size: 13px;
  font-weight: 600;
  transition: background .2s,transform .2s;
}
.primary:hover {
  background: #cbbffc;
}
.primary:active {
  transform: scale(.98);
}
.auth-form .primary {
  width: 100%;
  margin-top: 4px;
}
.auth-switch {
  display: block;
  margin: 14px auto 0;
  color: #aaa6bf;
  font-size: 12px;
}
.notice {
  padding: 12px 15px;
  border: 1px solid #f1a7ac20;
  background: #f1a7ac09;
  color: #f2b9be;
  font-size: 12px;
  line-height: 1.8;
  border-radius: 12px;
  margin-top: 16px;
  overflow-wrap: anywhere;
}
.notice.success {
  border-color: #a4d5bd20;
  color: #b7d9c9;
  background: #a4d5bd08;
}
.app {
  display: grid;
  grid-template-columns: 268px minmax(0,1fr);
  width: min(1280px,100%);
  min-height: 100svh;
  margin: auto;
}
.sidebar {
  border-right: 1px solid var(--line);
  padding: 44px 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 34px;
  background: #ffffff02;
}
.sidebar-top {
  position: sticky;
  top: 36px;
}
.nav-label {
  color: #6c7186;
  font-size: 10px;
  letter-spacing: .16em;
  margin: 40px 12px 14px;
}
.nav {
  display: grid;
  gap: 6px;
}
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  min-height: 47px;
  color: #9297ac;
  text-align: left;
  font-size: 13px;
  border: 1px solid transparent;
  transition: background .2s,color .2s;
}
.nav-item:hover {
  color: #d3cce7;
  background: #ffffff04;
}
.nav-item.active {
  color: #d5caff;
  background: #b4a2f012;
  border-color: #b4a2f017;
}
.badge {
  margin-left: auto;
  font-size: 11px;
  color: #85839c;
}
.active .badge {
  color: #c5b6f7;
}
.calendar {
  margin-top: 35px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
}
.calendar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.calendar-top h2 {
  font-size: 12px;
  font-weight: 500;
  color: #c4c1d3;
}
.calendar-arrows {
  display: flex;
  gap: 3px;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  min-height: 32px;
  color: #8b8da4;
  border-radius: 8px;
}
.icon-button:hover {
  color: #d2c8f8;
  background: #ffffff07;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7,minmax(0,1fr));
  gap: 3px;
}
.weekday {
  text-align: center;
  font-size: 10px;
  color: #60677c;
  padding: 6px 0 9px;
}
.day {
  position: relative;
  min-height: 30px;
  padding: 0;
  font-size: 11px;
  color: #9095aa;
  border: 1px solid transparent;
  border-radius: 9px;
}
.day:hover {
  background: #ffffff07;
}
.day.today {
  border-color: #bcb0f52b;
  color: #d6cafa;
}
.day.selected {
  color: #282136;
  background: var(--accent);
  border-color: transparent;
}
.day.has-tasks::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  bottom: 3px;
  left: calc(50% - 1.5px);
  background: #ad9ae1;
}
.day.selected::after {
  background: #4d3d72;
}
.calendar-help {
  margin-top: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  color: #676e83;
  font-size: 10px;
}
.text-button {
  color: #a99ccf;
  font-size: 11px;
  padding: 0 5px;
  min-height: 30px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 35px;
}
.small-quote {
  font-size: 11px;
  color: #686e83;
  line-height: 1.9;
  border-left: 2px solid #b4a2f02a;
  padding-left: 12px;
  margin-bottom: 25px;
}
.user {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background: #bcb0f513;
  border: 1px solid #bcb0f51a;
  color: #bdb0e8;
  border-radius: 50%;
  font-size: 12px;
}
.user-info {
  min-width: 0;
  flex: 1;
}
.user-name {
  font-size: 11px;
  color: #b7b5ca;
}
.email {
  color: #656c81;
  font-size: 10px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workspace {
  min-width: 0;
  padding: 40px clamp(24px,5vw,72px) 32px;
}
.workspace-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #797f94;
  font-size: 11px;
  margin-bottom: 48px;
}
.sync {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: #7f879a;
}
.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b29e70;
}
.sync.live .dot {
  background: #8fc5ac;
  box-shadow: 0 0 9px #8fc5ac30;
}
.eyebrow {
  color: #a89bc9;
  font-size: 10px;
  letter-spacing: .2em;
  margin-bottom: 13px;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}
.heading h1 {
  font-size: clamp(28px,3.5vw,38px);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1.3;
}
.heading .muted {
  font-size: 12px;
  margin-top: 12px;
}

.progress-wrap {
  display: flex;
  gap: 15px;
  align-items: center;
  margin: 25px 0 32px;
}
.progress-track {
  height: 3px;
  background: #ffffff07;
  border-radius: 3px;
  flex: 1;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg,#8977b9,#b9acd9);
  transition: width .5s;
}
.progress-label {
  font-size: 10px;
  color: #7b8096;
  white-space: nowrap;
}
.composer {
  border: 1px solid #ffffff15;
  border-radius: 17px;
  padding: 15px 16px 12px;
  background: #ffffff04;
  box-shadow: 0 8px 32px #0001;
  transition: border-color .2s;
}
.composer:focus-within {
  border-color: #bcb0f54a;
}
.composer-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

#task-input {
  border: 0;
  background: transparent;
  flex: 1;
  padding: 6px 0 12px;
  width: 100%;
  font-size: 16px;
}
.composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 11px;
}
.due-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8c879f;
  font-size: 11px;
  min-width: 0;
}
.composer .primary {
  min-height: 34px;
  padding: 8px 13px;
  font-size: 11px;
  display: flex;
  gap: 9px;
  align-items: center;
}
.list-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 32px 0 15px;
}
.list-toolbar h2 {
  font-size: 12px;
  font-weight: 500;
  color: #c0bdd1;
}
.list-toolbar h2 span {
  margin-left: 8px;
  color: #686f84;
  font-size: 10px;
}
.list-hint {
  color: #646c82;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 4px;
}
.task-card {
  cursor: grab;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 21px 18px 21px 12px;
  background: linear-gradient(115deg,#ffffff07,#ffffff03);
  border: 1px solid #ffffff0f;
  border-radius: 17px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 6px 24px #00000015,inset 0 1px #ffffff04;
  transition: transform .25s,border-color .25s,background .25s,opacity .35s;
}
@media(hover:hover) {
  .task-card:hover {
    transform: translateY(-3px);
    border-color: #bcb0f52e;
    background: linear-gradient(115deg,#ffffff0a,#ffffff05);
    box-shadow: 0 12px 30px #0002;
  }
}
.drag-handle {
  width: 22px;
  padding: 0;
  color: #4f566c;
  cursor: grab;
  flex-shrink: 0;
  touch-action: none;
  font-size: 13px;
}
.drag-handle:active {
  cursor: grabbing;
}
.drag-handle:hover {
  color: #b8a8dd;
}
.check-label {
  position: relative;
  width: 23px;
  height: 23px;
  flex-shrink: 0;
  cursor: pointer;
}
.check-label input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}
.check-ring {
  position: absolute;
  inset: 0;
  border: 1.5px solid #6f718b;
  border-radius: 50%;
  overflow: hidden;
  transition: border-color .25s,box-shadow .3s;
}
.check-ring::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: #bcb0f5;
  border-radius: 50%;
  transform: scale(0);
  transition: transform .35s cubic-bezier(.2,.8,.3,1);
}
.check-ring::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 4px;
  border-left: 1.8px solid #302746;
  border-bottom: 1.8px solid #302746;
  top: 7px;
  left: 6px;
  transform: rotate(-45deg) scale(.3);
  opacity: 0;
  transition: transform .25s .08s,opacity .15s .08s;
}
input:checked+.check-ring {
  border-color: #bcb0f5;
  box-shadow: 0 0 18px #bcb0f518;
}
input:checked+.check-ring::before {
  transform: scale(1);
}
input:checked+.check-ring::after {
  opacity: 1;
  transform: rotate(-45deg) scale(1);
}
input:focus-visible+.check-ring {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
input:disabled+.check-ring {
  opacity: .7;
}
.task-body {
  min-width: 0;
  flex: 1;
}
.task-title {
  font-size: 13px;
  line-height: 1.75;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  transition: color .3s,text-decoration-color .3s;
  text-decoration: line-through transparent;
  text-decoration-thickness: 1px;
}
.task-card.done .task-title {
  color: #76788f;
  text-decoration-color: #76788f;
}
.task-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #747d93;
  font-size: 10px;
  margin-top: 7px;
}
.task-meta.overdue {
  color: #c29493;
}
.task-meta i {
  font-size: 10px;
}
.card-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}
.delete:hover {
  color: #e3a9b3;
}
.card-actions .icon-button {
  font-size: 11px;
}
.task-card.completing {
  animation: complete-away .68s ease forwards;
  pointer-events: none;
}
@keyframes complete-away {
  0%,55% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(18px) scale(.97);
  }
}
.empty {
  border: 1px dashed #ffffff0d;
  border-radius: 18px;
  text-align: center;
  padding: 45px 20px;
  margin-top: 10px;
}
.empty>i {
  color: #9c8ab4;
  font-size: 24px;
  margin-bottom: 17px;
}
.empty h2 {
  color: #b4afc6;
  font-size: 14px;
  font-weight: 400;
}
.empty p {
  color: #687086;
  font-size: 11px;
  line-height: 1.8;
  margin-top: 9px;
}
.workspace-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: #5d657b;
  font-size: 10px;
}
.refresh {
  color: #827b9a;
  font-size: 10px;
  min-height: 30px;
  padding: 4px 0 4px 8px;
}
.busy .drag-handle {
  pointer-events: none;
  opacity: .3;
}
/* 使用自定义日期文字覆盖原生占位，避免显示 yyyy/mm/dd 等字母。 */
.date-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 112px;
  min-height: 32px;
  padding: 4px 6px;
  color: #aaa5bb;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.due-label .date-picker input {
  border: 0;
  background: transparent;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  opacity: 0;
  font-size: 16px;
  cursor: pointer;
}
.date-picker input::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  cursor: pointer;
}
.date-picker:focus-within {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
.task-card.sort-chosen {
  background: #252333;
  border-color: #bcb0f560;
  user-select: none;
  -webkit-user-select: none;
  cursor: grabbing;
}
/* 浮动卡片由 Sortable 实时定位，禁用 transform 过渡，避免跟手拖影。 */
.task-card.sort-follow {
  opacity: 1!important;
  transition: none!important;
  animation: none!important;
  will-change: transform;
  background: #292535;
  border-color: #bcb0f57a;
  box-shadow: 0 22px 60px #0007,0 0 0 1px #bcb0f51c;
  list-style: none;
  cursor: grabbing;
  pointer-events: none!important;
}
.task-card.sort-ghost:not(.sort-follow) {
  opacity: .18;
  border: 1px dashed #bcb0f5;
  background: #bcb0f508;
  box-shadow: none;
}
@media(min-width:1200px) {
  .app {
    padding: 0 20px;
  }
}
@media(max-width:760px) {
  .app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 24px 22px 20px;
    gap: 0;
  }
  .sidebar-top {
    position: static;
    display: grid;
    grid-template-columns: minmax(0,1fr) 208px;
    column-gap: 24px;
    align-items: start;
  }
  .brand-block {
    grid-column: 1;
  }
  .brand {
    font-size: 17px;
  }
  .brand-sub {
    font-size: 8px;
  }
  .nav-label {
    display: none;
  }
  .nav {
    grid-column: 1;
    margin-top: 20px;
  }
  .nav-item {
    min-height: 39px;
    padding: 9px 11px;
    font-size: 12px;
  }
  .calendar {
    grid-column: 2;
    grid-row: 1 / 4;
    margin: 0;
    padding: 0;
    border: 0;
  }
  .calendar-help {
    font-size: 9px;
  }
  .sidebar-bottom {
    padding-top: 18px;
    margin: 0;
  }
  .small-quote {
    display: none;
  }
  .user {
    padding-top: 12px;
  }
  .user-info {
    display: flex;
    align-items: center;
    gap: 9px;
  }
  .email {
    margin: 0;
    max-width: 220px;
  }
  .user .avatar {
    width: 26px;
    height: 26px;
  }
  .user .icon-button {
    margin-left: auto;
  }
  .workspace {
    padding: 25px 22px 30px;
  }
  .workspace-top {
    margin-bottom: 30px;
  }
  .heading h1 {
    font-size: 29px;
  }

  .progress-wrap {
    margin: 23px 0;
  }
  .task-card {
    gap: 10px;
    padding: 19px 12px 19px 8px;
  }
  .card-actions {
    gap: 0;
  }
  .drag-handle {
    width: 20px;
  }
  .task-title {
    font-size: 14px;
  }
}
@media(max-width:390px) {
  .sidebar {
    padding: 20px 16px;
  }
  .sidebar-top {
    grid-template-columns: minmax(0,1fr) 172px;
    gap: 12px;
  }
  .calendar-grid {
    gap: 1px;
  }
  .day {
    min-height: 26px;
    font-size: 10px;
  }
  .calendar-help>span {
    display: none;
  }
  .workspace {
    padding: 24px 16px;
  }

  .nav-item {
    gap: 8px;
    padding: 8px;
  }
  .brand-sub {
    letter-spacing: .06em;
  }
  .card-actions .icon-button {
    width: 26px;
  }
  .list-hint {
    font-size: 9px;
  }
}
.theme-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid #cbb8ff30;
  border-radius: 18px;
  background: radial-gradient(circle at 25% 15%, #b9a0ef25, transparent 75%), #c1b4ef08;
  box-shadow: inset 0 1px 0 #ffffff12, 0 8px 22px #00000016;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.theme-toggle:hover {
  border-color: #cbb8ff70;
  box-shadow: inset 0 1px 0 #ffffff18, 0 0 24px #b9a0ef12;
}
.theme-toggle:active { scale: .96; }
.theme-orbit { position: relative; width: 32px; height: 32px; }
.theme-moon, .theme-sun {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 21px;
  transition: transform .4s cubic-bezier(.2,.8,.2,1), opacity .3s;
}
.theme-moon {
  color: #d9ceff;
  filter: drop-shadow(0 0 7px #bba6f240);
  transform: rotate(-18deg);
}
.theme-sun { color: #a56b29; opacity: 0; transform: rotate(-80deg) scale(.35); }
.theme-star {
  position: absolute;
  top: 4px;
  right: 3px;
  width: 4px;
  height: 4px;
  background: #d9ceff;
  border-radius: 1px;
  transform: rotate(45deg);
  box-shadow: 5px 9px 0 -1px #d9ceff80;
  transition: opacity .25s, transform .35s;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f3fa;
  --text: #302d40;
  --muted: #79758a;
  --accent: #c1aff1;
  --line: #46335e12;
}
[data-theme="light"] body {
  background: radial-gradient(ellipse at 4% 3%, #e4d9f570, transparent 55%), radial-gradient(ellipse at 100% 80%, #dcece870, transparent 55%), var(--bg);
}
[data-theme="light"] .glass {
  background: #ffffff85;
  border-color: #ffffffd9;
  box-shadow: 0 24px 70px #4a396a0b, inset 0 1px #ffffff;
}
[data-theme="light"] .sidebar { background: #ffffff30; }
[data-theme="light"] .brand-mark { color: #45345f; box-shadow: 0 5px 22px #aa91ee18; }
[data-theme="light"] .brand-sub,
[data-theme="light"] .nav-label,
[data-theme="light"] .weekday,
[data-theme="light"] .calendar-help,
[data-theme="light"] .small-quote,
[data-theme="light"] .email,
[data-theme="light"] .list-hint,
[data-theme="light"] .workspace-footer { color: #8a849a; }
[data-theme="light"] .nav-item,
[data-theme="light"] .day,
[data-theme="light"] .icon-button,
[data-theme="light"] .workspace-top,
[data-theme="light"] .sync,
[data-theme="light"] .progress-label,
[data-theme="light"] .refresh { color: #7c758e; }
[data-theme="light"] .nav-item:hover,
[data-theme="light"] .icon-button:hover,
[data-theme="light"] .day:hover { background: #9175bd0a; color: #715793; }
[data-theme="light"] .nav-item.active { background: #ad8bd918; border-color: #ad8bd91c; color: #73539c; }
[data-theme="light"] .badge { color: #93889f; }
[data-theme="light"] .active .badge { color: #8363ab; }
[data-theme="light"] .calendar-top h2,
[data-theme="light"] .user-name,
[data-theme="light"] .list-toolbar h2 { color: #5f556f; }
[data-theme="light"] .day.today { color: #79569b; border-color: #ad8bd94d; }
[data-theme="light"] .day.selected { background: #c7b5e8; color: #46315f; }
[data-theme="light"] .text-button,
[data-theme="light"] .eyebrow { color: #9476ae; }
[data-theme="light"] .avatar { background: #a68bbf12; color: #8a68a7; border-color: #a68bbf26; }
[data-theme="light"] .field,
[data-theme="light"] .auth-switch,
[data-theme="light"] .due-label,
[data-theme="light"] .date-picker { color: #85758f; }
[data-theme="light"] .field input { background: #ffffff70; border-color: #7b63831c; }
[data-theme="light"] input::placeholder { color: #a39bad; }
[data-theme="light"] .primary { color: #45315e; background: #d5c5ef; }
[data-theme="light"] .primary:hover { background: #cbb9e9; }
[data-theme="light"] .progress-track { background: #86729a12; }
[data-theme="light"] .progress-fill { background: linear-gradient(90deg, #c4abd9, #a8c9ba); }
[data-theme="light"] .composer { background: #ffffff6b; border-color: #ffffffb3; box-shadow: 0 8px 32px #4a396a05; }
[data-theme="light"] .composer:focus-within { border-color: #a88bc166; }
[data-theme="light"] 
[data-theme="light"] .task-title { color: #554b63; }
[data-theme="light"] .task-card.done .task-title { color: #b1a6b9; text-decoration-color: #b1a6b9; }
[data-theme="light"] .check-ring { border-color: #c5b5d1; }
[data-theme="light"] .task-meta { color: #a091aa; }
[data-theme="light"] .task-meta.overdue { color: #b7817d; }
[data-theme="light"] .drag-handle { color: #bbb0c5; }
[data-theme="light"] .drag-handle:hover { color: #8f70ac; }
[data-theme="light"] .delete:hover { color: #bc7783; }
[data-theme="light"] .empty { border-color: #9d84b526; }
[data-theme="light"] .empty h2 { color: #8d789c; }
[data-theme="light"] .empty p { color: #a094ac; }
[data-theme="light"] .notice { color: #a2606b; background: #f8e6eb94; border-color: #d6a6b126; }
[data-theme="light"] .notice.success { color: #739581; background: #e7f0e894; border-color: #9fbaa226; }
[data-theme="light"] .task-card.sort-chosen { background: #eee4f6; border-color: #b59acb66; }
[data-theme="light"] .task-card.sort-follow { background: #f5eefb; border-color: #b59acb99; box-shadow: 0 22px 60px #60457c1a; }
[data-theme="light"] .task-card.sort-ghost:not(.sort-follow) { opacity: .3; background: #bd9ddc12; border-color: #b59acb; box-shadow: none; }
[data-theme="light"] .theme-toggle {
  border-color: #b48ed32e;
  background: radial-gradient(circle at 30% 20%, #fff8dfb3, transparent 80%), #ffffff80;
  box-shadow: inset 0 1px #ffffff, 0 5px 18px #9d7dba0d;
}
[data-theme="light"] .theme-toggle:hover { border-color: #b48ed370; }
[data-theme="light"] .theme-moon { opacity: 0; transform: rotate(65deg) scale(.35); }
[data-theme="light"] .theme-sun { opacity: 1; transform: rotate(0) scale(1); color: #bc9668; filter: drop-shadow(0 0 7px #e4bf8133); }
[data-theme="light"] .theme-star { opacity: 0; transform: rotate(90deg) scale(0); }
@media (hover: hover) {
  [data-theme="light"] .task-card:hover { border-color: #b59acb3b; background: linear-gradient(115deg, #ffffffde, #ffffff99); box-shadow: 0 12px 30px #60457c0b; }
}
@media (max-width: 760px) {
  .theme-toggle { width: 44px; height: 44px; border-radius: 15px; }
}
@media (max-width: 390px) {
  .theme-toggle { width: 40px; height: 40px; border-radius: 13px; }
}
@media (prefers-reduced-transparency: reduce) {
  [data-theme="light"] .glass, [data-theme="light"] .task-card { background: #fdfbff; }
}
.task-surface { display: contents; }
.swipe-delete { display: none; }
@media (hover: none), (pointer: coarse) {
  /* 移动端避免每张卡片单独做背景模糊，保留半透明底色与阴影。 */
  .task-card, .note-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .task-card {
    display: block;
    overflow: hidden;
    padding: 0;
    touch-action: pan-y;
    cursor: default;
  }
  .task-card .task-surface {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    width: 100%;
    min-height: 76px;
    padding: 19px 14px 19px 8px;
    border-radius: inherit;
    background: linear-gradient(115deg, #20212d, #1b1e27);
    transition: transform .22s cubic-bezier(.2,.8,.2,1);
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
  }
  .task-card .card-actions { display: none; }
  .task-card>.swipe-delete {
    position: absolute;
    inset: 0 0 0 auto;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 100%;
    padding: 0;
    border-radius: 0 16px 16px 0;
    background: #a24f60;
    color: #fff3f5;
    font-size: 13px;
    font-weight: 500;
  }
  .task-card>.swipe-delete:active { background: #8b4050; }
  .task-card.swipe-moving .task-surface { transition: none; }
  [data-theme="light"] .task-card .task-surface { background: linear-gradient(115deg, #fdfbff, #f5f3fa); }
  [data-theme="light"] .task-card>.swipe-delete { background: #d88d9a; color: #fff; }
}
.toast {
  position: fixed;
  z-index: 100010;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 40px);
  padding: 14px 20px;
  border: 1px solid #b8d9c82b;
  border-radius: 16px;
  background: #242c2be8;
  color: #d0e6d9;
  box-shadow: 0 12px 40px #0003, inset 0 1px #ffffff06;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-size: 13px;
  line-height: 1.6;
  pointer-events: none;
  animation: toast-in .22s ease-out;
}
.toast::before {
  content: '✓';
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #a9d5bc18;
  color: #a9d5bc;
  font-size: 12px;
}
[data-theme="light"] .toast {
  background: #f8fcf9f2;
  color: #648470;
  border-color: #9fbaa23b;
  box-shadow: 0 12px 40px #45664f14, inset 0 1px #ffffff;
}
[data-theme="light"] .toast::before { background: #a9c9b52b; color: #6f9b7f; }
.toast.loading::before {
  content: '';
  width: 17px;
  height: 17px;
  margin: 2.5px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  background: transparent;
  animation: toast-spin .8s linear infinite;
}
@keyframes toast-spin { to { transform: rotate(360deg); } }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (hover: hover) and (pointer: fine) {
  .task-card .card-actions {
    opacity: 0;
    pointer-events: none;
    transform: translateX(3px);
    transition: opacity .18s, transform .18s;
  }
  .task-card:hover .card-actions,
  .task-card:focus-within .card-actions {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }
}
@media (max-width: 600px) { .toast { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); } }
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation-duration: .01ms!important;
    transition-duration: .01ms!important;
    scroll-behavior: auto!important;
  }
}
@media(prefers-reduced-transparency:reduce) {
  .glass,.task-card {
    background: #1c1e29;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
