/* ---------- tokens ---------- */
:root {
  --paper: #f6f2f4;
  --paper-2: #efe7ed;
  --paper-3: #e6dce4;
  --card: #fffcfd;
  --card-2: #fbf6fa;
  --ink: #241c22;
  --ink-2: #544a51;
  --muted: #7c7279;
  --faint: #a69ba3;
  --line: rgba(62,28,55, .09);
  --line-strong: rgba(62,28,55, .16);
  --jade: #6a005f;
  --jade-2: #4b0044;
  --jade-3: #35002f;
  --jade-soft: #f4e8f1;
  --jade-tint: #faf3f8;
  --clay: #b07a00;
  --clay-2: #8a5e00;
  --clay-soft: #fbf0d9;
  --gold: #a57c48;
  --gold-soft: #f8efe2;
  --danger: #8a1f45;
  --danger-soft: #f9e9ef;
  --vine: #8f702c;
  --champagne: #cfac7c;
  --champagne-light: #fbcc7e;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --font-num: Georgia, "Times New Roman", "Songti SC", serif;
  --shadow-1: 0 1px 2px rgba(62,28,55, .04), 0 8px 24px rgba(62,28,55, .05);
  --shadow-2: 0 18px 52px rgba(62,28,55, .16), 0 2px 8px rgba(62,28,55, .06);
  --shadow-3: 0 30px 80px rgba(53,0,47, .28);
  --r-sm: 9px;
  --r: 13px;
  --r-lg: 19px;
  --header-h: 72px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(1200px 620px at 6% -12%, #fbf4fa 0%, rgba(251,244,250, 0) 62%),
    radial-gradient(1000px 560px at 102% -4%, #f8efe1 0%, rgba(248,239,225, 0) 58%),
    radial-gradient(900px 700px at 50% 110%, #f1e9ef 0%, rgba(241,233,239, 0) 55%),
    var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: .028;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; }
input, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
svg { display: block; }
[hidden] { display: none !important; }
::selection { background: rgba(106,0,95, .2); }
:focus-visible { outline: 2px solid rgba(106,0,95, .55); outline-offset: 2px; }

* { scrollbar-width: thin; scrollbar-color: rgba(62,28,55, .2) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: rgba(62,28,55, .18); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- shared ---------- */
.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(148deg, #7a126d, var(--jade-2));
  color: #f8efe4;
  box-shadow: 0 7px 18px rgba(106,0,95, .26), inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(207,172,124, .32);
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-mark-lg { width: 54px; height: 54px; border-radius: 16px; }
.brand-mark-lg svg { width: 34px; height: 34px; }
.brand-mark-sm { width: 30px; height: 30px; border-radius: 9px; }
.brand-mark-sm svg { width: 19px; height: 19px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0 16px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background .18s, border-color .18s, box-shadow .18s, color .18s, transform .18s;
}
.btn .szmf-ic { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(160deg, #7a126d, var(--jade));
  color: #fff8fc;
  border-color: rgba(75,0,68, .45);
  box-shadow: 0 8px 20px rgba(106,0,95, .2), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.btn-primary:hover { background: linear-gradient(160deg, #8a1c7c, var(--jade-2)); box-shadow: 0 10px 24px rgba(106,0,95, .26); }
.btn-ghost { background: rgba(255,252,253, .6); border-color: var(--line-strong); color: var(--ink-2); }
.btn-ghost:hover { background: #fffcfd; border-color: rgba(62,28,55, .24); color: var(--ink); }
.btn-soft { background: var(--jade-soft); color: var(--jade-2); }
.btn-soft:hover { background: #ecdce9; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #6e1736; }
.btn-sm { height: 36px; padding: 0 13px; font-size: 14px; }
.btn-block { width: 100%; height: 48px; font-size: 15px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: background .16s, color .16s, box-shadow .16s;
}
.icon-btn:hover { background: rgba(62,28,55, .06); color: var(--ink); }
.icon-btn:disabled { opacity: .32; pointer-events: none; }
.icon-btn.is-danger:hover { background: var(--danger-soft); color: var(--danger); }
.icon-btn-sm { width: 29px; height: 29px; border-radius: 8px; }
.icon-btn-sm .szmf-ic { width: 17px; height: 17px; }
.icon-btn[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  transform: translate(-50%, 3px);
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--ink);
  color: #fbf0e3;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s, transform .15s;
  z-index: 20;
}
.icon-btn[data-tip]:hover::after, .icon-btn[data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }

.avatar {
  --avatar-bg: #6a005f;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  color: #fff8fc;
  background: var(--avatar-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 0 0 1px rgba(255, 255, 255, .08);
  user-select: none;
}
.avatar-lg { width: 38px; height: 38px; font-size: 14px; }
.avatar-sm { width: 24px; height: 24px; font-size: 11px; }

.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; flex: none; }
.dot-high { background: var(--clay); }
.dot-medium { background: var(--gold); }
.dot-low { background: #8e8590; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}
.pill-jade { background: var(--jade-soft); color: var(--jade-2); }
.pill-clay { background: var(--clay-soft); color: var(--clay-2); }
.pill-gold { background: var(--gold-soft); color: #8a5e00; }
.pill-soft { background: var(--paper-2); color: var(--muted); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }

.prio {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}
.prio-high { background: var(--clay-soft); color: var(--clay-2); }
.prio-medium { background: var(--gold-soft); color: #8a5e00; }
.prio-low { background: #f2eff2; color: #5f555c; }

/* ---------- boot ---------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--paper);
  transition: opacity .35s ease, visibility .35s;
}
.boot.is-gone { opacity: 0; visibility: hidden; }
.boot-word { font-size: 14px; letter-spacing: 5px; color: var(--muted); }
.boot .brand-mark { animation: bootPulse 1.6s ease-in-out infinite; }
@keyframes bootPulse { 0%, 100% { transform: scale(1); box-shadow: 0 6px 16px rgba(106,0,95, .24); } 50% { transform: scale(1.04); box-shadow: 0 12px 30px rgba(106,0,95, .32); } }

/* ---------- auth ---------- */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
  background: var(--paper);
}
.auth-art {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 42px 56px 34px;
  color: #fbf2e8;
  background:
    radial-gradient(900px 620px at 16% -8%, #7a126d 0%, rgba(122,18,109, 0) 58%),
    radial-gradient(700px 540px at 98% 108%, #8f702c 0%, rgba(143,112,44, 0) 62%),
    linear-gradient(152deg, #6a005f 0%, #470041 68%, #33002e 100%);
}
.auth-art::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  pointer-events: none;
}
.auth-art-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  right: -110px;
  top: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251,204,126, .2), rgba(251,204,126, 0) 68%);
  pointer-events: none;
}
.auth-brand { display: flex; align-items: center; gap: 11px; position: relative; z-index: 2; }
.auth-brand .brand-mark { background: rgba(255,252,253, .1); border: 1px solid rgba(255,252,253, .18); box-shadow: none; color: #f8efe4; }
.auth-brand-name { font-size: 16px; font-weight: 600; letter-spacing: 2px; }
.auth-copy { position: relative; z-index: 2; margin-top: clamp(38px, 7.5vh, 86px); max-width: 560px; }
.auth-copy h1 {
  font-family: var(--font-serif);
  font-size: clamp(36px, 3.5vw, 50px);
  font-weight: 600;
  line-height: 1.42;
  letter-spacing: 2px;
  color: #fbf2e8;
}
.auth-copy p { margin-top: 18px; font-size: 15px; line-height: 1.8; color: rgba(247, 241, 227, .64); letter-spacing: .5px; }
.auth-rule { display: block; width: 54px; height: 2px; margin-top: 22px; border-radius: 2px; background: linear-gradient(90deg, var(--vine), var(--champagne-light)); }
.auth-preview { position: relative; z-index: 2; margin-top: auto; padding-top: clamp(28px, 5vh, 56px); width: min(520px, 100%); }
.preview-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.preview-month { font-size: 13px; letter-spacing: 2px; color: rgba(247, 241, 227, .72); }
.preview-dots { display: flex; gap: 5px; }
.preview-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(247, 241, 227, .28); }
.preview-dots i:first-child { background: #fbcc7e; }
.preview-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(247, 241, 227, .1);
  border-radius: 14px;
  background: rgba(255,252,253, .035);
}
.preview-cell {
  height: 29px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 11px;
  color: rgba(247, 241, 227, .46);
}
.preview-cell.is-other { opacity: .3; }
.preview-cell.has-dot::after {
  content: "";
  position: absolute;
  bottom: 4px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fbcc7e;
  opacity: .85;
}
.preview-cell.is-today { background: rgba(251,204,126, .16); color: #f6d9ac; font-weight: 600; }
.preview-card {
  margin-top: 16px;
  width: min(400px, 94%);
  margin-left: auto;
  margin-right: 12px;
  padding: 15px 18px 13px;
  border-radius: 16px;
  background: #fffcfd;
  color: var(--ink);
  box-shadow: var(--shadow-3);
  transform: rotate(-1.1deg);
}
.preview-date { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.preview-date b { font-family: var(--font-num); font-size: 38px; font-weight: 600; line-height: .9; letter-spacing: -1px; color: var(--jade); }
.preview-date div { display: flex; flex-direction: column; gap: 2px; }
.preview-date span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.preview-date em { font-style: normal; font-size: 11px; color: var(--jade); letter-spacing: .5px; }
.preview-tasks { display: flex; flex-direction: column; gap: 9px; padding-top: 11px; }
.preview-task { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2); }
.preview-task > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-check { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-strong); position: relative; }
.preview-check.on { background: var(--jade); border-color: var(--jade); }
.preview-check.on::after { content: ""; position: absolute; left: 4px; top: 3px; width: 5px; height: 8px; border-right: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(40deg); }
.preview-task .is-done { color: var(--faint); text-decoration: line-through; }
.preview-flag { font-size: 11px; font-weight: 500; font-style: normal; height: 18px; padding: 0 6px; border-radius: 5px; display: inline-flex; align-items: center; }
.preview-flag.high { background: var(--clay-soft); color: var(--clay-2); }
.preview-flag.medium { background: var(--gold-soft); color: #8a5e00; }
.preview-flag.low { background: #f2eff2; color: #5f555c; }
.auth-art-foot { position: relative; z-index: 2; margin-top: 26px; font-size: 12px; letter-spacing: 2px; color: rgba(247, 241, 227, .34); }

.auth-panel { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; min-height: 100vh; background: radial-gradient(720px 560px at 100% 0%, rgba(207,172,124,.16), rgba(207,172,124,0) 62%), var(--paper); }
.login-title { color: var(--jade); }
.login-brand { color: var(--jade); }
.auth-panel-inner { width: min(382px, 100%); }
.login-brand { display: none; align-items: center; gap: 10px; margin-bottom: 34px; font-size: 15px; font-weight: 600; letter-spacing: 1.5px; color: var(--ink); }
.login-title { font-size: 31px; font-weight: 700; letter-spacing: 1px; line-height: 1.3; }
.login-sub { margin-top: 7px; font-size: 14px; color: var(--muted); }
#login-form { margin-top: 30px; display: flex; flex-direction: column; gap: 17px; }
.field { display: block; }
.field-label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; color: var(--ink-2); letter-spacing: .3px; }
.input-shell {
  position: relative;
  display: flex;
  align-items: center;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255,252,253, .86);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.input-shell:focus-within { border-color: rgba(106,0,95, .6); background: #fffcfd; box-shadow: 0 0 0 3px rgba(106,0,95, .12); }
.input-shell .input-ic { position: absolute; left: 14px; color: var(--faint); pointer-events: none; }
.input-shell input { width: 100%; height: 100%; border: 0; outline: 0; background: transparent; padding: 0 44px 0 43px; font-size: 15px; color: var(--ink); }
.input-shell input::placeholder { color: var(--faint); }
.input-eye { position: absolute; right: 7px; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--faint); }
.input-eye:hover { color: var(--ink-2); background: rgba(62,28,55, .05); }
.input-eye .szmf-ic { width: 18px; height: 18px; }
.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--danger-soft);
  border: 1px solid rgba(138,31,69, .16);
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}
.login-error .szmf-ic { width: 18px; height: 18px; flex: none; }
.btn-login { margin-top: 3px; justify-content: space-between; padding: 0 18px; }


/* ---------- app shell ---------- */
.app { min-height: 100vh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  border-bottom: 1px solid var(--line);
  background: rgba(250,246,249, .82);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
}
.topbar-inner { height: 100%; width: 100%; padding: 0 24px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.brand-text strong { font-size: 17px; font-weight: 700; letter-spacing: 1px; line-height: 1.3; white-space: nowrap; color: var(--jade); }
.brand-text span { font-size: 12.5px; color: var(--muted); letter-spacing: .4px; line-height: 1.4; white-space: nowrap; }
.view-switch { margin-left: 10px; display: flex; gap: 2px; padding: 4px; border-radius: 12px; background: var(--paper-2); border: 1px solid rgba(62,28,55, .05); }
.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: background .18s, color .18s, box-shadow .18s;
}
.view-btn .szmf-ic { width: 18px; height: 18px; }
.view-btn:hover { color: var(--ink-2); }
.view-btn.is-active { background: var(--card); color: var(--jade); box-shadow: 0 1px 2px rgba(62,28,55, .07), 0 3px 10px rgba(62,28,55, .05); }
.view-btn.is-active .szmf-ic { color: var(--jade); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.viewer { position: relative; }
.viewer-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 10px 0 5px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(255,252,253, .72);
  transition: border-color .18s, background .18s;
}
.viewer-trigger:hover { border-color: var(--line-strong); background: var(--card); }
.viewer-label { font-size: 12.5px; color: var(--faint); letter-spacing: .3px; }
.viewer-name { font-size: 13.5px; font-weight: 600; color: var(--ink-2); max-width: 86px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-chevron { color: var(--faint); }
.viewer-chevron .szmf-ic { width: 16px; height: 16px; }
.account-trigger { display: flex; align-items: center; gap: 6px; height: 42px; padding: 3px 6px 3px 3px; border-radius: 99px; transition: background .18s; }
.account-trigger:hover { background: rgba(62,28,55, .05); }
.account-trigger .avatar { width: 34px; height: 34px; font-size: 13.5px; }
.account-name { font-size: 13.5px; font-weight: 600; color: var(--ink-2); max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-chevron { color: var(--faint); }
.account-chevron .szmf-ic { width: 15px; height: 15px; }

.workspace { height: calc(100vh - var(--header-h)); display: flex; overflow: hidden; }

/* ---------- calendar ---------- */
.calendar-view { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 20px 23px 14px; }
.calendar-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 0 2px 13px; }
.month-title { display: flex; align-items: baseline; gap: 11px; }
.month-trigger {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 1px 9px 1px 2px;
  margin-left: -2px;
  border-radius: 10px;
  transition: background .16s;
}
.month-trigger:hover { background: rgba(106,0,95, .055); }
.month-name {
  font-family: var(--font-serif);
  font-size: 37px;
  font-weight: 600;
  letter-spacing: 4px;
  line-height: 1.15;
  color: var(--jade);
}
.month-chevron { display: grid; place-items: center; align-self: center; color: var(--champagne-2, #a57c48); transition: color .16s, transform .16s; }
.month-chevron .szmf-ic { width: 16px; height: 16px; }
.month-trigger:hover .month-chevron { color: var(--jade); transform: translateY(1px); }
.month-year { font-family: var(--font-num); font-size: 14px; letter-spacing: 2px; color: var(--vine); }
.month-meta { margin-top: 4px; font-size: 12.5px; color: var(--muted); letter-spacing: .3px; }
.calendar-tools { display: flex; align-items: center; gap: 8px; padding-bottom: 2px; }
.stepper { display: flex; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(255,252,253, .6); overflow: hidden; }
.stepper .icon-btn { border-radius: 0; width: 36px; height: 34px; }
.stepper .icon-btn + .icon-btn { border-left: 1px solid var(--line); }
.weekdays { display: grid; grid-template-columns: repeat(7, 1fr); padding: 0 0 7px; }
.weekdays span { text-align: center; font-size: 12.5px; font-weight: 600; letter-spacing: 2px; color: var(--faint); }
.weekdays .weekend { color: rgba(176,122,0, .8); }
.calendar-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(0, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.cal-cell {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 7px 8px 6px;
  background: var(--card);
  cursor: pointer;
  transition: background .16s ease;
}
.cal-cell:hover { background: #fdf8fc; }
.cal-cell.is-other { background: #faf6f9; }
.cal-cell.is-other .cal-daynum, .cal-cell.is-other .cal-cell-top { opacity: .42; }
.cal-cell.is-selected { background: var(--jade-tint); box-shadow: inset 0 0 0 2px rgba(106,0,95, .7); z-index: 2; }
.cal-cell.is-selected:hover { background: #f0e7ee; }
.cal-cell-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 27px; }
.cal-daynum {
  font-family: var(--font-num);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink-2);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-feature-settings: "tnum";
}
.cal-cell:nth-child(7n) .cal-daynum, .cal-cell:nth-child(7n-1) .cal-daynum { color: var(--clay); }
.cal-cell.is-today .cal-daynum { background: var(--jade); color: #fff8fc; box-shadow: 0 2px 8px rgba(106,0,95, .28); }
.cal-cell.is-today.is-other .cal-daynum { opacity: 1; }
.cal-count { font-size: 12px; color: var(--faint); letter-spacing: .2px; padding-right: 2px; }
.cal-count b { font-weight: 600; color: var(--muted); }
.cal-chips { display: flex; flex-direction: column; gap: 3px; min-height: 0; overflow: hidden; }
.cal-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  background: #f8f2f7;
  border: 1px solid transparent;
  font-size: 13px;
  line-height: 1;
  color: var(--ink-2);
  pointer-events: none;
  cursor: default;
  transition: background .14s, border-color .14s;
}
.cal-chip:hover { background: #efe6ed; border-color: rgba(62,28,55, .1); }
.cal-chip .chip-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.cal-chip.is-done { opacity: .52; }
.cal-chip.is-done .chip-title { text-decoration: line-through; }
.cal-chip .dot { width: 5px; height: 5px; }
.cal-more { font-size: 12px; color: var(--faint); padding-left: 4px; line-height: 1.2; }
.cal-dots { display: none; }
.calendar-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 4px 0; min-height: 24px; }
.legend { display: flex; align-items: center; gap: 13px; font-size: 12.5px; color: var(--faint); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.calendar-foot-note { font-size: 12.5px; color: var(--faint); letter-spacing: .3px; }

/* ---------- day panel ---------- */
.day-panel { width: 396px; flex: none; border-left: 1px solid var(--line); background: linear-gradient(180deg, #fbf6fa 0%, #f7f1f6 100%); min-height: 0; }
.day-panel-scroll { height: 100%; overflow-y: auto; padding: 21px 20px 30px; }
.day-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.day-date { display: flex; align-items: center; gap: 12px; min-width: 0; }
.day-num { font-family: var(--font-num); font-size: 51px; font-weight: 600; line-height: .86; letter-spacing: -1.5px; color: var(--jade); font-feature-settings: "tnum"; }
.day-date-meta { display: flex; flex-direction: column; gap: 4px; }
.day-weekday { font-size: 14px; font-weight: 600; color: var(--ink-2); letter-spacing: .5px; }
.day-ym { font-size: 12.5px; color: var(--muted); letter-spacing: .4px; }
.day-badge { margin-left: 2px; }
.day-head-actions { display: flex; align-items: center; gap: 2px; }
.panel-close { display: none; }
.day-owner { display: flex; align-items: center; gap: 7px; width: fit-content; max-width: 100%; margin: 10px 0 0; padding: 5px 10px 5px 5px; border-radius: 99px; background: rgba(255,252,253, .72); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.day-owner strong { font-weight: 600; color: var(--ink-2); }
.day-progress { margin: 15px 0 15px; }
.day-progress-top { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; }
.day-progress-top b { color: var(--jade-2); font-weight: 600; }
.day-progress-bar { height: 5px; border-radius: 99px; background: #e8dfe7; overflow: hidden; }
.day-progress-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--vine), var(--champagne-light)); transition: width .4s cubic-bezier(.2, .7, .3, 1); }
.day-add { width: 100%; margin-bottom: 18px; }
.day-section-head { display: flex; align-items: center; gap: 8px; margin: 2px 0 9px; padding: 0 2px; }
.day-section-head span { font-size: 12.5px; font-weight: 600; letter-spacing: 1.5px; color: var(--faint); }
.day-section-head b { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.day-section-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.day-done-toggle { width: 100%; display: flex; align-items: center; gap: 7px; margin: 14px 0 9px; padding: 0 2px; color: var(--faint); font-size: 12.5px; letter-spacing: 1px; }
.day-done-toggle .szmf-ic { width: 15px; height: 15px; transition: transform .18s; }
.day-done-toggle.is-open .szmf-ic { transform: rotate(0); }
.day-done-toggle:not(.is-open) .szmf-ic { transform: rotate(-90deg); }
.day-done-toggle b { font-weight: 600; color: var(--muted); }

.todo-card {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  padding: 13px 12px 10px;
  margin-bottom: 9px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 1px rgba(62,28,55, .025);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.todo-card::before { content: ""; position: absolute; left: 0; top: 16px; width: 3px; height: 21px; border-radius: 0 3px 3px 0; background: var(--gold); }
.todo-card.prio-high::before { background: var(--clay); }
.todo-card.prio-medium::before { background: var(--gold); }
.todo-card.prio-low::before { background: #8e8590; }
.todo-card:hover { transform: translateY(-1px); border-color: var(--line-strong); box-shadow: 0 8px 22px rgba(62,28,55, .07); }
.todo-card.is-done { background: #fbf6fa; opacity: .82; }
.todo-card.is-done::before { background: #c5bac3; }
.todo-check {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  border: 1.5px solid #cbbeca;
  display: grid;
  place-items: center;
  color: transparent;
  background: transparent;
  transition: border-color .16s, background .16s, color .16s, transform .16s;
}
.todo-check .szmf-ic { width: 14px; height: 14px; }
.todo-check:hover { border-color: var(--jade); background: var(--jade-tint); }
.todo-check.is-checked { border-color: var(--jade); background: var(--jade); color: #fff8fc; }
.todo-check:active { transform: scale(.92); }
.todo-main { min-width: 0; }
.todo-title { font-size: 15px; font-weight: 600; line-height: 1.5; color: var(--ink); letter-spacing: .1px; word-break: break-word; }
.todo-card.is-done .todo-title { color: var(--faint); text-decoration: line-through; text-decoration-thickness: 1px; }
.todo-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 5px; font-size: 12.5px; color: var(--faint); }
.todo-foot { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.todo-foot .todo-meta { margin-top: 0; flex: 1; min-width: 0; flex-wrap: nowrap; gap: 5px; }
.todo-meta .meta { display: inline-flex; align-items: center; gap: 4px; }
.todo-meta .meta .szmf-ic { width: 14px; height: 14px; }
.todo-meta .meta-postpone { color: #8f702c; }
.todo-notes { margin-top: 6px; font-size: 13px; line-height: 1.7; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; cursor: pointer; }
.todo-card.is-done .todo-notes { color: var(--faint); }
.todo-actions { display: flex; align-items: center; gap: 2px; margin: 0 -5px 0 0; opacity: .78; transition: opacity .16s; flex: none; }
.todo-card:hover .todo-actions, .todo-card:focus-within .todo-actions { opacity: 1; }
.todo-actions .icon-btn { color: var(--ink-2); }
.todo-actions .icon-btn:hover { color: var(--ink); background: var(--paper-2); }
.todo-actions .icon-btn.is-danger:hover { color: var(--danger); background: var(--danger-soft); }

.day-empty { padding: 34px 16px 30px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.day-empty-art { width: 92px; height: 92px; margin-bottom: 15px; color: #c9bcc7; }
.day-empty-art svg { width: 100%; height: 100%; }
.day-empty h3 { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.day-empty p { margin-top: 5px; font-size: 13px; color: var(--faint); line-height: 1.7; max-width: 220px; }
.day-empty .btn { margin-top: 16px; }

/* ---------- list view ---------- */
.list-view { height: calc(100vh - var(--header-h)); overflow-y: auto; }
.list-inner { max-width: 1130px; margin: 0 auto; padding: 27px 30px 90px; }
.list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.list-head h1 { font-family: var(--font-serif); font-size: 36px; font-weight: 600; letter-spacing: 4px; line-height: 1.2; color: var(--jade); }
.list-meta { margin-top: 5px; font-size: 13px; color: var(--muted); letter-spacing: .3px; }
.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 19px 0 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,252,253, .62);
  backdrop-filter: blur(10px);
}
.segmented { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--paper-2); }
.seg { height: 32px; padding: 0 13px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--muted); transition: background .16s, color .16s, box-shadow .16s; }
.seg:hover { color: var(--ink-2); }
.seg.is-active { background: var(--card); color: var(--jade); box-shadow: 0 1px 2px rgba(62,28,55, .06), 0 2px 8px rgba(62,28,55, .04); }
.toolbar-right { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.filter-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255,252,253, .8);
  font-size: 14px;
  color: var(--ink-2);
  transition: border-color .16s, background .16s;
}
.filter-trigger:hover { border-color: rgba(62,28,55, .25); background: var(--card); }
.filter-trigger .szmf-ic { width: 17px; height: 17px; color: var(--faint); }
.filter-trigger .filter-value { color: var(--ink); font-weight: 500; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-trigger .chevron { color: var(--faint); }
.filter-trigger .chevron .szmf-ic { width: 15px; height: 15px; }
.filter-trigger.is-active { border-color: rgba(106,0,95, .45); background: var(--jade-tint); color: var(--jade-2); }
.search-shell {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  width: 232px;
  padding: 0 9px 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255,252,253, .8);
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.search-shell:focus-within { border-color: rgba(106,0,95, .5); background: var(--card); box-shadow: 0 0 0 3px rgba(106,0,95, .1); }
.search-shell .szmf-ic { width: 17px; height: 17px; color: var(--faint); flex: none; }
.search-shell input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13.5px; color: var(--ink); }
.search-shell input::placeholder { color: var(--faint); }
.search-clear { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: var(--faint); }
.search-clear:hover { background: var(--paper-2); color: var(--ink-2); }

.list-group { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 20px; padding: 15px 0 5px; }
.list-date { text-align: right; padding-top: 7px; }
.list-date b { display: block; font-family: var(--font-num); font-size: 31px; font-weight: 600; line-height: 1; letter-spacing: -1px; color: var(--ink-2); font-feature-settings: "tnum"; }
.list-date span { display: block; margin-top: 5px; font-size: 12.5px; color: var(--muted); letter-spacing: .5px; }
.list-date em { display: inline-flex; align-items: center; height: 20px; margin-top: 6px; padding: 0 7px; border-radius: 99px; font-style: normal; font-size: 12px; font-weight: 500; }
.list-date em.today { background: var(--jade-soft); color: var(--jade-2); }
.list-date em.overdue { background: var(--danger-soft); color: var(--danger); }
.list-rows { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.list-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 14px 11px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 1px rgba(62,28,55, .02);
  transition: border-color .16s, box-shadow .16s, transform .16s;
}
.list-row:hover { border-color: var(--line-strong); box-shadow: 0 6px 20px rgba(62,28,55, .06); }
.list-row.is-done { background: #fbf6fa; opacity: .78; }
.list-row.is-overdue { border-left: 3px solid rgba(138,31,69, .5); padding-left: 12px; }
.list-row-main { flex: 1; min-width: 0; cursor: pointer; }
.list-row .todo-title { font-size: 14.5px; }
.list-row .todo-notes { -webkit-line-clamp: 2; margin-top: 4px; }
.list-row-actions { display: flex; align-items: center; gap: 2px; opacity: .62; transition: opacity .16s; }
.list-row:hover .list-row-actions, .list-row:focus-within .list-row-actions { opacity: 1; }
.list-row-actions .icon-btn { color: var(--ink-2); }
.list-row-actions .icon-btn:hover { color: var(--ink); background: var(--paper-2); }
.list-row-actions .icon-btn.is-danger:hover { color: var(--danger); background: var(--danger-soft); }
.list-empty { margin: 42px auto 0; max-width: 360px; text-align: center; }
.list-empty-art { width: 90px; height: 90px; margin: 0 auto 16px; color: #c9bcc7; }
.list-empty-art svg { width: 100%; height: 100%; }
.list-empty h3 { font-size: 16px; font-weight: 600; color: var(--ink-2); }
.list-empty p { margin-top: 6px; font-size: 13px; color: var(--faint); line-height: 1.8; }
.list-empty .btn { margin-top: 18px; }

/* ---------- menus / date picker ---------- */
.menu {
  position: fixed;
  z-index: 760;
  min-width: 196px;
  max-width: 330px;
  max-height: min(70vh, 460px);
  overflow-y: auto;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  animation: menuIn .14s cubic-bezier(.2, .7, .3, 1);
  transform-origin: top;
}
.menu-label { padding: 7px 10px 5px; font-size: 12px; font-weight: 600; letter-spacing: 1px; color: var(--faint); }
.menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-2);
  text-align: left;
  transition: background .14s, color .14s;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--paper-2); color: var(--ink); outline: 0; }
.menu-item .szmf-ic { width: 18px; height: 18px; color: var(--muted); flex: none; }
.menu-item .menu-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.menu-item .menu-main strong { font-weight: 600; color: var(--ink); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item .menu-main span { font-size: 12px; color: var(--faint); }
.menu-item .menu-check { margin-left: auto; color: var(--jade); }
.menu-item .menu-check .szmf-ic { width: 17px; height: 17px; color: var(--jade); }
.menu-item .menu-meta { margin-left: auto; font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.menu-item.is-danger { color: var(--danger); }
.menu-item.is-danger .szmf-ic { color: var(--danger); }
.menu-item.is-danger:hover { background: var(--danger-soft); }
.menu-sep { height: 1px; margin: 5px 7px; background: var(--line); }
.menu-note { padding: 6px 10px 8px; font-size: 12px; color: var(--faint); }

.datepicker { width: 292px; padding: 12px; }
.dp-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 1px 2px 8px; }
.dp-title { font-size: 13.5px; font-weight: 600; color: var(--ink); letter-spacing: .5px; }
.dp-title span { margin-left: 5px; font-family: var(--font-num); font-size: 12px; color: var(--muted); font-weight: 500; }
.dp-nav { display: flex; gap: 1px; }
.dp-nav .icon-btn { width: 30px; height: 30px; }
.dp-week { display: grid; grid-template-columns: repeat(7, 1fr); padding: 4px 0 3px; }
.dp-week span { text-align: center; font-size: 12px; color: var(--faint); font-weight: 600; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-day {
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--font-num);
  font-size: 13.5px;
  color: var(--ink-2);
  font-feature-settings: "tnum";
  transition: background .14s, color .14s, box-shadow .14s;
}
.dp-day:hover { background: var(--paper-2); }
.dp-day.is-other { color: var(--faint); opacity: .55; }
.dp-day.is-today { box-shadow: inset 0 0 0 1px rgba(106,0,95, .4); color: var(--jade-2); font-weight: 600; }
.dp-day.is-selected { background: var(--jade); color: #fff8fc; font-weight: 600; box-shadow: 0 3px 9px rgba(106,0,95, .26); }
.dp-day[disabled] { opacity: .25; pointer-events: none; }
.dp-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.dp-foot .btn { height: 32px; padding: 0 11px; font-size: 12.5px; }
.dp-clear { font-size: 12.5px; color: var(--muted); padding: 5px 7px; border-radius: 6px; }
.dp-clear:hover { background: var(--paper-2); color: var(--ink-2); }

/* ---------- modal & forms ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(32,18,30, .44);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fadeIn .16s ease;
  overflow-y: auto;
}
.modal {
  width: 590px;
  max-width: 100%;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 21px;
  box-shadow: var(--shadow-2);
  animation: modalIn .22s cubic-bezier(.2, .7, .3, 1);
}
.modal.is-wide { width: 880px; }
.modal.is-small { width: 446px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 21px 24px 13px; }
.modal-head h2 { font-size: 21px; font-weight: 700; letter-spacing: .3px; line-height: 1.4; }
.modal-eyebrow { margin-bottom: 4px; font-size: 12px; font-weight: 600; letter-spacing: 1.2px; color: var(--jade); }
.modal-sub { margin-top: 4px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.modal-head .icon-btn { margin: -3px -6px 0 0; }
.modal-body { padding: 2px 24px 20px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 24px 19px; border-top: 1px solid var(--line); }
.modal-foot-right { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.modal .field + .field, .modal .field + .form-row, .modal .form-row + .field { margin-top: 15px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; align-items: start; }
.form-row .field { min-width: 0; display: flex; flex-direction: column; }
.modal .form-row .field + .field { margin-top: 0; }
.text-field {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  font-size: 15px;
  color: var(--ink);
  outline: 0;
  transition: border-color .16s, box-shadow .16s;
}
.text-field::placeholder { color: var(--faint); }
.text-field:focus { border-color: rgba(106,0,95, .55); box-shadow: 0 0 0 3px rgba(106,0,95, .11); }
textarea.text-field { height: auto; min-height: 112px; padding: 11px 13px; line-height: 1.75; resize: vertical; font-size: 14.5px; }
.field-count { display: flex; justify-content: flex-end; margin-top: 4px; font-size: 12px; color: var(--faint); }
.form-error { display: flex; align-items: center; gap: 7px; margin-top: 11px; padding: 9px 11px; border-radius: 9px; background: var(--danger-soft); color: var(--danger); font-size: 13px; }
.form-error .szmf-ic { width: 17px; height: 17px; flex: none; }
.form-hint { margin-top: 6px; font-size: 13px; color: var(--faint); line-height: 1.6; }
.segmented-prio { width: 100%; height: 46px; padding: 4px; align-items: stretch; }
.segmented-prio .seg { flex: 1; height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.segmented-prio .seg .dot { width: 6px; height: 6px; }
.date-field {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  font-size: 14.5px;
  color: var(--ink);
  text-align: left;
  transition: border-color .16s, box-shadow .16s;
}
.date-field:hover { border-color: rgba(62,28,55, .28); }
.date-field .szmf-ic { width: 18px; height: 18px; color: var(--muted); flex: none; }
.date-field span { flex: 1; }
.date-field .date-weekday { flex: none; font-size: 12px; color: var(--faint); }
.date-field .chevron .szmf-ic { width: 15px; height: 15px; color: var(--faint); }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 96px;
  padding: 16px;
  border: 1.5px dashed #ddd0dc;
  border-radius: 13px;
  background: #fbf6fa;
  text-align: center;
  cursor: pointer;
  transition: border-color .16s, background .16s;
}
.dropzone:hover, .dropzone.is-drag { border-color: rgba(106,0,95, .55); background: var(--jade-tint); }
.dz-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--paper-2); color: var(--jade); margin-bottom: 2px; }
.dz-ic .szmf-ic { width: 20px; height: 20px; }
.dz-title { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.dz-hint { font-size: 12.5px; color: var(--faint); }
.att-list { display: flex; flex-direction: column; gap: 7px; margin-top: 9px; }
.att-item { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.att-thumb { width: 40px; height: 40px; flex: none; border-radius: 7px; object-fit: cover; background: var(--paper-2); }
.att-ico { width: 40px; height: 40px; flex: none; border-radius: 7px; display: grid; place-items: center; background: var(--paper-2); color: var(--muted); }
.att-ico .szmf-ic { width: 20px; height: 20px; }
.att-info { flex: 1; min-width: 0; }
.att-name { font-size: 13px; font-weight: 500; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-meta { font-size: 12px; color: var(--faint); margin-top: 1px; display: flex; align-items: center; gap: 6px; }
.att-progress { height: 3px; border-radius: 99px; background: var(--paper-2); margin-top: 5px; overflow: hidden; }
.att-progress i { display: block; height: 100%; width: 0; background: var(--jade); transition: width .2s; }
.att-remove { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: var(--faint); flex: none; }
.att-remove:hover { background: var(--danger-soft); color: var(--danger); }
.att-remove .szmf-ic { width: 16px; height: 16px; }
.att-error { color: var(--danger); font-size: 12px; margin-top: 5px; }
.upload-status { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--muted); }

.member-table { width: 100%; border-collapse: collapse; }
.member-table th { padding: 8px 8px; text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .8px; color: var(--faint); border-bottom: 1px solid var(--line); white-space: nowrap; }
.member-table td { padding: 11px 8px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-2); vertical-align: middle; }
.member-table tr:last-child td { border-bottom: 0; }
.member-table .m-user { display: flex; align-items: center; gap: 9px; }
.member-table .m-user strong { font-size: 14px; font-weight: 600; color: var(--ink); }
.member-table .m-user span { display: block; font-size: 12px; color: var(--faint); }
.member-table .m-phone { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; color: var(--muted); letter-spacing: .2px; }
.member-table .m-actions { display: flex; justify-content: flex-end; gap: 1px; }
.member-table .role-admin { background: var(--jade-soft); color: var(--jade-2); }
.member-table .role-user { background: var(--paper-2); color: var(--muted); }
.member-table .is-self { margin-left: 5px; font-size: 12px; color: var(--faint); }
.member-table .is-off { opacity: .5; }
.member-table .m-count b { font-family: var(--font-num); font-size: 15px; color: var(--ink); font-weight: 600; }
.member-table .m-count span { color: var(--faint); font-size: 12px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; bottom: 22px; right: 22px; z-index: 690; display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
.toast {
  position: relative;
  width: 338px;
  max-width: calc(100vw - 32px);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px 12px 15px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 38px rgba(62,28,55, .16), 0 2px 5px rgba(62,28,55, .05);
  animation: toastIn .22s cubic-bezier(.2, .7, .3, 1);
  pointer-events: auto;
  overflow: hidden;
}
.toast::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--jade); }
.toast.is-error::before { background: var(--danger); }
.toast.is-warning::before { background: var(--gold); }
.toast.is-info::before { background: #6e5a63; }
.toast-ic { width: 22px; height: 22px; flex: none; margin-top: 1px; color: var(--jade); }
.toast.is-error .toast-ic { color: var(--danger); }
.toast.is-warning .toast-ic { color: var(--gold); }
.toast.is-info .toast-ic { color: #6e5a63; }
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.5; }
.toast-text { margin-top: 1px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.toast-close { width: 22px; height: 22px; margin: -2px -3px 0 0; border-radius: 6px; display: grid; place-items: center; color: var(--faint); }
.toast-close:hover { background: var(--paper-2); color: var(--ink-2); }
.toast-close .szmf-ic { width: 14px; height: 14px; }
.toast.is-leaving { animation: toastOut .18s ease forwards; }

/* ---------- responsive ---------- */
@media (max-width: 1360px) {
  .day-panel { width: 366px; }
  .calendar-view { padding: 18px 20px 12px; }
  .topbar-inner { padding: 0 20px; }
}
@media (max-width: 1180px) {
  .day-panel { width: 340px; }
  .calendar-view { padding: 16px 16px 10px; }
  .month-name { font-size: 33px; }
  .brand-text span { display: none; }
  .view-switch { margin-left: 2px; }
}
@media (max-width: 980px) {
  :root { --header-h: 64px; }
  .workspace { display: block; position: relative; }
  .calendar-view { height: 100%; padding: 16px 16px 10px; }
  .day-panel {
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    width: min(408px, 92vw);
    z-index: 120;
    transform: translateX(103%);
    transition: transform .26s cubic-bezier(.2, .7, .3, 1);
    box-shadow: -18px 0 50px rgba(62,28,55, .16);
    background: #fbf6fa;
  }
  .day-panel.is-open { transform: none; }
  .panel-close { display: grid; }
  .panel-scrim { display: block; position: fixed; inset: var(--header-h) 0 0; z-index: 110; background: rgba(32,18,30, .34); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .24s; }
  .panel-scrim.is-open { opacity: 1; pointer-events: auto; }
  .list-inner { padding: 22px 22px 80px; }
  .toasts { bottom: 16px; right: 14px; }
}
@media (min-width: 981px) {
  .panel-scrim { display: none; }
}
@media (max-width: 820px) {
  .account-name { display: none; }
  .viewer-label { display: none; }
  .viewer-name { max-width: 70px; }
  .brand-text strong { font-size: 16px; }
  .list-toolbar { align-items: stretch; }
  .toolbar-right { width: 100%; }
  .search-shell { flex: 1; width: auto; }
}
@media (max-width: 700px) {
  :root { --header-h: 60px; }
  .topbar-inner { padding: 0 13px; gap: 9px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .brand-mark svg { width: 21px; height: 21px; }
  .brand-text strong { font-size: 15px; letter-spacing: .5px; }
  .view-switch { margin-left: 0; padding: 3px; }
  .view-btn { padding: 0 10px; height: 34px; gap: 0; }
  .view-btn span { display: none; }
  .top-actions { gap: 4px; }
  .top-actions > .icon-btn { width: 36px; height: 36px; }
  .viewer-trigger { padding: 0 7px 0 4px; height: 36px; }
  .viewer-name { display: none; }
  .viewer .avatar { width: 27px; height: 27px; font-size: 11.5px; }
  .account-trigger { height: 38px; padding: 2px; }
  .account-trigger .avatar { width: 32px; height: 32px; }
  .account-name { display: none; }
  .account-chevron { display: none; }
  .viewer { display: none; }
  .calendar-view { padding: 12px 10px 8px; }
  .calendar-head { align-items: center; padding-bottom: 8px; }
  .month-title { gap: 7px; }
  .month-name { font-size: 27px; letter-spacing: 2px; }
  .month-year { font-size: 12px; }
  .month-meta { font-size: 12px; margin-top: 1px; }
  .calendar-tools .btn-ghost { height: 32px; padding: 0 10px; font-size: 12.5px; }
  .stepper .icon-btn { width: 32px; height: 32px; }
  .weekdays { padding-bottom: 5px; }
  .weekdays span { font-size: 12px; letter-spacing: 1px; }
  .calendar-grid { border-radius: 14px; }
  .cal-cell { padding: 5px 4px 4px; gap: 3px; }
  .cal-cell-top { min-height: 23px; justify-content: center; }
  .cal-daynum { width: 23px; height: 23px; font-size: 13px; }
  .cal-count { display: none; }
  .cal-chips { display: none; }
  .todo-actions { opacity: 1; }
  .cal-dots { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; padding: 0 1px; }
  .cal-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
  .cal-dots i.p-high { background: var(--clay); }
  .cal-dots i.p-low { background: #8e8590; }
  .cal-dots i.is-done { opacity: .35; }
  .cal-more { display: none; }
  .calendar-foot { padding-top: 7px; }
  .calendar-foot-note { display: none; }
  .legend { gap: 11px; font-size: 12px; }
  .day-panel { width: min(430px, 94vw); }
  .day-panel-scroll { padding: 18px 16px 24px; }
  .list-inner { padding: 18px 15px 70px; }
  .list-head h1 { font-size: 30px; }
  .list-head .btn { height: 38px; padding: 0 12px; font-size: 13px; }
  .list-toolbar { padding: 8px; gap: 8px; }
  .segmented { width: 100%; }
  .seg { flex: 1; padding: 0 8px; }
  .toolbar-right { gap: 6px; }
  .filter-trigger { flex: 1; justify-content: center; }
  .search-shell { order: -1; width: 100%; flex: 1 0 100%; }
  .list-group { grid-template-columns: 1fr; gap: 7px; padding: 12px 0 4px; }
  .list-date { display: flex; align-items: center; gap: 8px; text-align: left; padding: 0 2px; }
  .list-date b { font-size: 23px; }
  .list-date span { margin: 0; font-size: 12px; }
  .list-date em { margin: 0 0 0 2px; }
  .list-row { padding: 11px 11px 10px; }
  .list-row-actions { opacity: 1; flex-wrap: nowrap; justify-content: flex-end; max-width: none; }
  .overlay { padding: 0; align-items: flex-end; }
  .modal { width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; animation: sheetIn .24s cubic-bezier(.2, .7, .3, 1); }
  .modal-head { padding: 18px 18px 11px; }
  .modal-body { padding: 2px 18px 16px; }
  .modal-foot { padding: 12px 18px 16px; }
  .modal-head h2 { font-size: 19px; }
  .form-row { grid-template-columns: 1fr; }
  .toasts { left: 12px; right: 12px; align-items: stretch; }
  .toast { width: auto; }
  .auth-panel { padding: 24px; }

  .login-title { font-size: 27px; }
}
@media (max-width: 430px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .login-brand { display: flex; }
  .auth-panel { min-height: 100vh; justify-content: flex-start; padding-top: 54px; }
  .day-num { font-size: 45px; }
  .day-panel-scroll { padding: 16px 13px 22px; }
  .brand-text strong { font-size: 14px; }
}
@media (max-width: 370px) {
  .view-switch { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- keyframes ---------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes sheetIn { from { opacity: .6; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(12px); } }

.menu-item .avatar { margin: 0 1px 0 0; }
.menu-item.is-disabled { opacity: .45; pointer-events: none; }
.confirm-text { font-size: 14px; line-height: 1.8; color: var(--muted); padding: 2px 0 6px; word-break: break-word; }
.member-table-wrap { overflow-x: auto; margin: 2px -4px; }
.member-table { min-width: 640px; }

@media (min-width: 901px) and (max-height: 790px) {
  .auth-art { padding: 30px 48px 24px; }
  .auth-copy { margin-top: 30px; }
  .auth-copy h1 { font-size: 38px; line-height: 1.38; }
  .auth-copy p { margin-top: 12px; font-size: 14px; }
  .auth-preview { padding-top: 20px; }
  .preview-cell { height: 23px; }
  .preview-card { margin-top: 10px; padding: 12px 16px 10px; }
  .preview-date b { font-size: 32px; }
  .preview-tasks { gap: 6px; padding-top: 8px; }
  .auth-art-foot { margin-top: 12px; }
}
@media (min-width: 901px) and (max-height: 700px) {
  .preview-grid { display: none; }
  .auth-art-foot { display: none; }
}

@media (max-width: 700px) {
  .todo-check { width: 24px; height: 24px; }
  .todo-actions .icon-btn, .list-row-actions .icon-btn { width: 34px; height: 34px; }
  .todo-actions { margin-top: 5px; }
}

/* ---------- VI refinements ---------- */
.force-form { margin-top: 30px; display: flex; flex-direction: column; gap: 17px; }
.force-user {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: -2px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,252,253,.72);
  font-size: 13px;
  color: var(--muted);
}
.force-user strong { color: var(--ink); font-weight: 600; }
.force-logout {
  align-self: center;
  margin-top: 2px;
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--muted);
  transition: background .16s, color .16s;
}
.force-logout:hover { background: var(--paper-2); color: var(--jade); }

.monthpicker { width: 302px; padding: 12px; }
.mp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 1px 2px 9px; }
.mp-year { font-family: var(--font-num); font-size: 17px; font-weight: 600; letter-spacing: 1px; color: var(--jade); }
.mp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mp-month {
  height: 44px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--ink-2);
  background: var(--card-2);
  border: 1px solid transparent;
  transition: background .14s, color .14s, border-color .14s;
}
.mp-month:hover { background: var(--jade-soft); color: var(--jade-2); }
.mp-month.is-current { border-color: rgba(207,172,124,.8); color: var(--vine); }
.mp-month.is-selected { background: var(--jade); color: #fff8fc; border-color: var(--jade); box-shadow: 0 4px 12px rgba(106,0,95,.22); }
.mp-foot { display: flex; justify-content: flex-end; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line); }
.mp-today { padding: 5px 8px; border-radius: 7px; font-size: 12.5px; color: var(--muted); }
.mp-today:hover { background: var(--paper-2); color: var(--jade); }

@media (max-width: 700px) {
  .todo-actions { margin-top: 0; }
  .todo-foot .todo-meta { gap: 4px; }
  .todo-foot .meta-postpone span { display: none; }
  .month-trigger { gap: 6px; padding-right: 6px; }
  .month-name { font-size: 27px; letter-spacing: 2px; }
  .month-chevron .szmf-ic { width: 14px; height: 14px; }
  .force-form { gap: 14px; margin-top: 24px; }
}

@media (max-width: 700px) {
  .todo-actions, .list-row-actions { opacity: 1; }
}
