:root {
  --paper: #f5f3ee;
  --paper-deep: #ebe7de;
  --ink: #202826;
  --muted: #7c827b;
  --line: #ddd9d0;
  --teal: #2f655b;
  --teal-dark: #23483f;
  --mint: #c7e2d4;
  --coral: #dc6946;
  --sun: #f2c96b;
  --white: #fffdf9;
  --shadow: 0 22px 60px rgba(43, 45, 37, .08);
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.page-shell { min-height: 100vh; padding: 0 32px 36px; }
.topbar { max-width: 1360px; height: 76px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; width: fit-content; }
.brand-mark { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; color: var(--white); background: var(--teal); font-size: 15px; }
.brand-name { font-size: 13px; font-weight: 750; letter-spacing: .18em; }
.topbar-context { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px rgba(220, 105, 70, .12); }
.topbar-actions { justify-self: end; display: inline-flex; align-items: center; gap: 8px; }
.account-label { max-width: 130px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.account-action { border: 1px solid var(--teal); color: var(--teal-dark); background: transparent; padding: 8px 12px; font-size: 11px; font-weight: 750; transition: background .2s, color .2s, transform .2s; }
.account-action:hover, .account-action:focus-visible { color: var(--white); background: var(--teal); transform: translateY(-1px); }
.top-action { justify-self: end; border: 1px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); padding: 8px 16px; font-size: 12px; font-weight: 700; transition: background .2s, color .2s, transform .2s; }
.top-action:hover, .top-action:focus-visible { color: var(--white); background: var(--ink); transform: translateY(-1px); }
.app-grid { max-width: 1360px; margin: 0 auto; display: grid; grid-template-columns: minmax(250px, 310px) minmax(0, 1fr); gap: clamp(28px, 5vw, 82px); padding-top: 54px; }
.sidebar { min-height: calc(100vh - 166px); display: flex; flex-direction: column; }
.kicker { margin: 0 0 13px; color: var(--coral); font-size: 10px; font-weight: 800; letter-spacing: .2em; }
.sidebar-intro h1 { max-width: 285px; margin: 0; font-family: Georgia, "Times New Roman", "Songti SC", serif; font-size: clamp(29px, 3vw, 43px); font-weight: 500; line-height: 1.16; letter-spacing: 0; }
.intro-copy { max-width: 240px; margin: 16px 0 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.goal-block { margin-top: 52px; }
.section-heading, .progress-topline, .subsection-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-label { color: var(--teal-dark); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.edit-hint, .progress-month, .streak-count, .subsection-heading > span { color: var(--muted); font-size: 11px; }
.goal-input-wrap { display: block; margin-top: 13px; position: relative; }
.goal-input-wrap input { width: 100%; border: 0; border-radius: 0; outline: none; color: var(--ink); background: transparent; padding: 0 0 10px; font-family: Georgia, "Times New Roman", "Songti SC", serif; font-size: 22px; line-height: 1.35; }
.goal-input-wrap input::placeholder { color: #a9aaa1; }
.input-line { display: block; height: 2px; background: var(--ink); transform-origin: left; transition: transform .25s, background .25s; }
.goal-input-wrap:focus-within .input-line { background: var(--coral); transform: scaleX(1.02); }
.goal-caption { margin: 9px 0 0; color: var(--muted); font-size: 11px; }
.progress-block { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); }
.progress-row { display: flex; align-items: center; gap: 17px; margin-top: 19px; }
.progress-ring { --progress: 0deg; width: 90px; height: 90px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--coral) var(--progress), var(--paper-deep) 0); position: relative; }
.progress-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--paper); }
.progress-ring-inner { position: relative; display: grid; justify-items: center; gap: 1px; }
.progress-ring strong { font-size: 19px; line-height: 1; }
.progress-ring span { color: var(--muted); font-size: 9px; }
.progress-copy { display: grid; gap: 5px; }
.progress-copy strong { font-size: 19px; font-weight: 750; }
.progress-copy span, .progress-copy small { color: var(--muted); font-size: 11px; }
.progress-copy small { margin-top: 5px; color: var(--teal); font-weight: 700; }
.streak-block { margin-top: 43px; padding-top: 18px; border-top: 1px solid var(--line); }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; margin-top: 16px; }
.week-day { min-width: 0; text-align: center; cursor: pointer; }
.week-day-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; }
.week-day-dot { display: grid; width: 27px; height: 27px; margin: 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: transparent; font-size: 10px; transition: background .2s, border-color .2s; }
.week-day.has-entry .week-day-dot { color: var(--teal-dark); border-color: var(--mint); background: var(--mint); }
.week-day.today .week-day-dot { border-color: var(--coral); box-shadow: inset 0 0 0 2px var(--paper); background: var(--coral); color: var(--white); }
.week-day.has-missed .week-day-dot { border-color: #e8aa98; background: #fbe1d8; color: #9b402b; }
.sidebar-footnote { display: flex; align-items: center; gap: 9px; margin-top: auto; padding-top: 40px; color: var(--muted); font-size: 10px; }
.footnote-mark { color: var(--coral); font-size: 18px; }
.workspace { min-width: 0; display: grid; gap: 28px; }
.calendar-panel, .day-panel { border: 1px solid var(--line); background: rgba(255, 253, 249, .54); box-shadow: var(--shadow); }
.calendar-panel { padding: clamp(23px, 3vw, 38px) clamp(20px, 3vw, 42px) 23px; }
.calendar-header, .day-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.calendar-header h2, .day-header h2 { margin: 0; font-family: Georgia, "Times New Roman", "Songti SC", serif; font-size: clamp(28px, 3vw, 42px); font-weight: 500; line-height: 1.1; }
.calendar-controls { display: flex; gap: 8px; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--ink); background: var(--white); font-size: 19px; transition: border-color .2s, color .2s, transform .2s; }
.icon-button:hover, .icon-button:focus-visible { border-color: var(--teal); color: var(--teal); transform: translateY(-1px); }
.calendar-grid { margin-top: 28px; }
.weekday-row, .days-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekday-row { margin-bottom: 7px; }
.weekday-row span { padding: 0 8px 6px; color: var(--muted); font-size: 10px; font-weight: 750; text-align: right; }
.days-grid { gap: 6px; }
.day-cell { min-height: clamp(68px, 8vw, 104px); position: relative; display: flex; align-items: flex-start; justify-content: flex-end; border: 1px solid transparent; padding: 10px 10px 8px; color: var(--ink); background: rgba(255, 253, 249, .52); text-align: right; transition: border-color .2s, background .2s, transform .2s; }
.day-cell:hover, .day-cell:focus-visible { z-index: 1; border-color: var(--teal); background: var(--white); transform: translateY(-2px); outline: none; }
.day-cell.is-selected { border-color: var(--teal); background: var(--white); box-shadow: inset 0 3px 0 var(--teal); }
.day-cell.is-done { border-color: #9bc9aa; background: #edf7ef; }
.day-cell.is-missed { border-color: #e8aa98; background: #fff0eb; }
.day-cell.is-selected.is-done { background: #e4f2e7; }
.day-cell.is-selected.is-missed { background: #fce4dd; }
.day-cell.is-today .day-number { display: inline-grid; min-width: 25px; height: 25px; place-items: center; border-radius: 50%; color: var(--white); background: var(--coral); }
.day-cell.is-outside { color: #b5b5ac; background: rgba(238, 235, 226, .46); }
.day-cell .day-number { position: relative; z-index: 1; font-size: 12px; font-weight: 750; }
.day-markers { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 5px; }
.day-marker { width: 6px; height: 6px; border-radius: 50%; }
.day-marker.done { background: var(--teal); }
.day-marker.note { background: var(--sun); }
.day-marker.status-done { background: #378a59; }
.day-marker.status-missed { background: #d35e43; }
.day-complete-count { margin-left: auto; color: var(--teal); font-size: 10px; font-weight: 750; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 17px; margin-top: 20px; color: var(--muted); font-size: 10px; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-status { width: 10px; height: 10px; border-radius: 3px; }
.legend-status-done { background: #6db587; }
.legend-status-missed { background: #e38a70; }
.legend-today { width: 10px; height: 10px; border-radius: 50%; background: var(--coral); }
.day-panel { padding: clamp(23px, 3vw, 35px) clamp(20px, 3vw, 42px) 32px; }
.day-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.day-header h2 { font-size: clamp(24px, 2.4vw, 34px); }
.day-status { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 9px; border-radius: 999px; color: var(--muted); background: var(--paper-deep); font-size: 10px; font-weight: 750; }
.day-status.is-done { color: var(--teal-dark); background: var(--mint); }
.day-status.is-missed { color: #9b402b; background: #fbe1d8; }
.day-header .day-number { color: var(--paper-deep); font-family: Georgia, "Times New Roman", serif; font-size: clamp(55px, 6vw, 82px); font-weight: 700; line-height: .8; }
.day-mark-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.mark-label { margin-right: 4px; color: var(--muted); font-size: 11px; }
.mark-button, .clear-mark-button { min-height: 32px; border: 1px solid var(--line); padding: 6px 11px; color: var(--ink); background: var(--white); font-size: 11px; font-weight: 750; transition: border-color .2s, color .2s, background .2s, transform .2s; }
.mark-button:hover, .mark-button:focus-visible, .clear-mark-button:hover, .clear-mark-button:focus-visible { transform: translateY(-1px); outline: none; }
.mark-done:hover, .mark-done:focus-visible, .mark-done.is-active { border-color: #6db587; color: #24633b; background: #dff0e4; }
.mark-missed:hover, .mark-missed:focus-visible, .mark-missed.is-active { border-color: #e38a70; color: #9b402b; background: #fbe1d8; }
.clear-mark-button { color: var(--muted); background: transparent; }
.clear-mark-button:disabled { cursor: default; opacity: .45; transform: none; }
.day-content { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(26px, 5vw, 76px); margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.subsection-heading h3 { margin: 0; font-size: 14px; font-weight: 800; }
.task-form { display: grid; grid-template-columns: 1fr 35px; gap: 7px; margin-top: 18px; }
.task-form input, .notes-column textarea { border: 1px solid var(--line); color: var(--ink); background: var(--white); outline: none; transition: border-color .2s, box-shadow .2s; }
.task-form input { min-width: 0; height: 38px; padding: 0 12px; font-size: 12px; }
.task-form input:focus, .notes-column textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(47, 101, 91, .09); }
.task-form input::placeholder, .notes-column textarea::placeholder { color: #a8aaa0; }
.add-task-button { width: 35px; height: 38px; border: 1px solid var(--teal); color: var(--white); background: var(--teal); font-size: 22px; line-height: 1; transition: background .2s; }
.add-task-button:hover, .add-task-button:focus-visible { background: var(--teal-dark); }
.task-list { display: grid; gap: 7px; margin-top: 15px; }
.task-item { display: grid; grid-template-columns: 20px minmax(0, 1fr) 24px; align-items: center; gap: 8px; min-height: 38px; padding: 7px 8px; border-bottom: 1px solid var(--line); }
.task-check { width: 17px; height: 17px; margin: 0; accent-color: var(--teal); }
.task-text { min-width: 0; color: var(--ink); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.task-item.is-done .task-text { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--coral); }
.delete-task { width: 24px; height: 24px; border: 0; color: #a7aaa1; background: transparent; font-size: 16px; opacity: 0; transition: opacity .2s, color .2s; }
.task-item:hover .delete-task, .task-item:focus-within .delete-task { opacity: 1; }
.delete-task:hover, .delete-task:focus-visible { color: var(--coral); }
.empty-tasks { margin: 17px 0 0; color: var(--muted); font-family: Georgia, "Times New Roman", "Songti SC", serif; font-size: 14px; }
.notes-column textarea { display: block; width: 100%; min-height: 145px; resize: vertical; margin-top: 18px; padding: 13px 14px; font-size: 12px; line-height: 1.7; }
.save-state { color: var(--teal) !important; }
.note-footer { display: flex; justify-content: flex-end; gap: 3px; margin-top: 7px; color: var(--muted); font-size: 10px; }
.toast { position: fixed; z-index: 10; left: 50%; bottom: 25px; max-width: calc(100vw - 30px); padding: 10px 15px; border: 1px solid var(--teal); color: var(--white); background: var(--teal-dark); box-shadow: 0 10px 30px rgba(35, 72, 63, .2); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 15px); transition: opacity .2s, transform .2s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.calendar-auth-dialog { width: min(420px, calc(100vw - 28px)); border: 1px solid var(--line); padding: 25px; color: var(--ink); background: var(--white); box-shadow: 0 26px 80px rgba(43, 45, 37, .2); }
.calendar-auth-dialog::backdrop { background: rgba(32, 40, 38, .28); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.dialog-head h2 { margin: 0; font-family: Georgia, "Times New Roman", "Songti SC", serif; font-size: 28px; font-weight: 500; }
.auth-tabs { display: flex; gap: 16px; margin-top: 25px; border-bottom: 1px solid var(--line); }
.auth-tabs button { border: 0; border-bottom: 2px solid transparent; padding: 0 0 10px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 750; }
.auth-tabs button.active { border-bottom-color: var(--coral); color: var(--ink); }
.calendar-auth-form { display: grid; gap: 15px; margin-top: 20px; }
.field { display: grid; gap: 7px; }
.field > span { color: var(--teal-dark); font-size: 11px; font-weight: 750; }
.field input { height: 38px; border: 1px solid var(--line); padding: 0 11px; color: var(--ink); background: var(--paper); outline: none; font-size: 12px; }
.field input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(47, 101, 91, .09); }
.form-error { min-height: 17px; margin: 0; color: var(--coral); font-size: 11px; }
.submit-button { min-height: 40px; border: 1px solid var(--teal); color: var(--white); background: var(--teal); font-size: 12px; font-weight: 750; }
.submit-button:hover, .submit-button:focus-visible { background: var(--teal-dark); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 900px) { .page-shell { padding: 0 20px 28px; } .app-grid { grid-template-columns: 1fr; gap: 35px; padding-top: 34px; } .sidebar { min-height: auto; } .sidebar-intro h1 { max-width: 480px; } .intro-copy { max-width: 390px; } .goal-block { margin-top: 34px; } .progress-block, .streak-block { margin-top: 28px; } .sidebar-footnote { padding-top: 28px; } }
@media (max-width: 620px) { .page-shell { padding: 0 13px 22px; } .topbar { height: 64px; grid-template-columns: auto 1fr auto; gap: 8px; } .brand-name { display: none; } .topbar-context { justify-self: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 112px; } .topbar-actions { gap: 5px; } .account-label { display: none; } .account-action { padding: 7px 8px; } .top-action { padding: 7px 9px; } .calendar-panel, .day-panel { box-shadow: none; } .calendar-panel { padding: 21px 12px 18px; } .day-panel { padding: 21px 15px 25px; } .calendar-grid { margin-top: 22px; } .days-grid { gap: 3px; } .day-cell { min-height: 56px; padding: 7px 6px 6px; } .day-markers { left: 6px; right: 6px; bottom: 7px; } .day-complete-count { font-size: 9px; } .weekday-row span { padding-left: 5px; padding-right: 5px; } .day-mark-actions { margin-top: 18px; } .day-content { grid-template-columns: 1fr; gap: 32px; } .day-header .day-number { font-size: 55px; } .delete-task { opacity: 1; } }
