:root {
  color-scheme: light;
  --paper: #f7f6f2;
  --white: #fff;
  --ink: #242823;
  --muted: #60665d;
  --line: #e5e6df;
  --accent: #9b462b;
  --accent-strong: #78331e;
  --accent-soft: #f7e8e0;
  --done: #315845;
  --done-soft: #ecf4ec;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.5; }
h1, h2, h3, p, ul { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.site-header { border-bottom: 1px solid var(--line); background: var(--white); }
.header-inner, .shell { width: min(calc(100% - 48px), 1060px); margin-inline: auto; }
.header-inner { min-height: 73px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 720; font-size: 1.125rem; }
.brand-mark, .empty-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: white; background: var(--accent); }
.brand-mark i, .empty-mark i, .tick { display: inline-block; width: 8px; height: 13px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.shell { padding: 39px 0 48px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 42px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--white); font-size: .875rem; font-weight: 650; white-space: nowrap; }
.button:not(:disabled):hover { background: #f3f3ed; }
.button.primary { color: white; background: var(--accent); border-color: var(--accent); }
.button.primary:not(:disabled):hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.button.quiet { border-color: transparent; color: var(--muted); background: transparent; }
.button.small { padding-inline: 11px; min-height: 38px; }
.notice { color: var(--muted); margin-bottom: 14px; }
.notice.error { color: #842c23; }
.summary { display: flex; justify-content: space-between; align-items: center; gap: 28px; margin-bottom: 24px; padding: 27px 29px; color: #f8f8f2; background: #292f28; border-radius: 18px; }
.today-date { margin-bottom: 6px; color: #d3d8cb; font-size: .875rem; }
.summary h1 { font-size: clamp(1.65rem, 4vw, 2.35rem); font-weight: 720; letter-spacing: -.035em; line-height: 1.2; }
.progress-box { flex: 0 1 250px; min-width: 0; }
.progress-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 9px; color: #e6e8df; font-size: .875rem; }
.progress-caption strong { color: white; font-size: 1.45rem; }
progress { display: block; appearance: none; width: 100%; height: 7px; overflow: hidden; border: 0; border-radius: 10px; background: #51574d; color: #edb89c; }
progress::-webkit-progress-bar { background: #51574d; }
progress::-webkit-progress-value { border-radius: 10px; background: #edb89c; }
progress::-moz-progress-bar { border-radius: 10px; background: #edb89c; }
.columns { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; gap: 22px; }
.card { padding: 20px 23px 23px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.card-heading { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.card-heading h2 { font-size: 1.125rem; font-weight: 720; }
.muted { color: var(--muted); font-size: .875rem; }
.project-list, #day-list { padding: 0; list-style: none; }
.project-row { display: flex; align-items: center; gap: 10px; min-height: 66px; padding: 8px 0; border-top: 1px solid var(--line); }
.project-dot { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; background: var(--project-color); }
.orange { --project-color: #ba623f; }
.green { --project-color: #528069; }
.blue { --project-color: #4e75a0; }
.purple { --project-color: #8065ab; }
.pink { --project-color: #ac597c; }
.gray { --project-color: #68746d; }
.project-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 620; }
.project-row .edit { min-width: 44px; padding-inline: 6px; }
.checkin { min-width: 83px; border-color: #ead6cc; background: #fff9f6; color: var(--accent-strong); }
.checkin:not(:disabled):hover { background: var(--accent-soft); }
.checkin.checked { color: var(--done); border-color: #d5e5d6; background: var(--done-soft); }
.checkin.checked:not(:disabled):hover { background: #e2eee3; }
.checkin .tick { width: 6px; height: 10px; transform: translateY(-1px) rotate(45deg); }
.empty-state { display: grid; justify-items: center; gap: 12px; padding: 40px 10px; text-align: center; border-top: 1px solid var(--line); }
.empty-mark { width: 45px; height: 45px; background: var(--accent-soft); color: var(--accent); }
.empty-state p { font-weight: 640; }
details { margin-top: 10px; border-top: 1px solid var(--line); }
details summary { display: list-item; padding: 13px 0 3px; cursor: pointer; color: var(--muted); font-size: .875rem; }
details[open] summary { padding-bottom: 12px; }
.calendar-nav { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin: 5px 0 9px; }
.calendar-nav h3 { font-size: 1rem; text-align: center; }
.calendar-week, .calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.calendar-week { padding: 6px 0 7px; color: var(--muted); font-size: .875rem; }
.calendar-days button { position: relative; min-width: 0; min-height: 43px; padding: 0 0 3px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink); font-size: .875rem; }
.calendar-days button:not(:disabled):hover { background: #f4f3ee; }
.calendar-days .today { border-color: #dbc6b8; }
.calendar-days button[aria-pressed="true"] { border-color: #e8c5b2; background: var(--accent-soft); color: var(--accent-strong); font-weight: 750; }
.calendar-days .marked::after { content: ""; position: absolute; bottom: 5px; left: calc(50% - 2px); width: 4px; height: 4px; border-radius: 50%; background: var(--done); }
.day-detail { min-height: 69px; margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--line); }
.day-detail h3 { margin-bottom: 5px; font-size: .875rem; font-weight: 650; }
#day-list li { display: flex; align-items: baseline; gap: 8px; padding: 2px 0; font-size: .875rem; overflow-wrap: anywhere; }
#day-list .project-dot { position: relative; top: -1px; width: 7px; height: 7px; flex-basis: 7px; }
dialog { width: min(440px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 23px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: var(--white); box-shadow: 0 18px 42px #181c1852; }
dialog::backdrop { background: #1d231d80; }
dialog h2 { margin-bottom: 16px; font-size: 1.25rem; }
.field-label, legend { display: block; margin-bottom: 6px; font-size: .875rem; font-weight: 650; }
#name { display: block; width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #cbd0c7; border-radius: 8px; color: var(--ink); background: var(--white); }
fieldset { padding: 0; margin: 15px 0 0; border: 0; min-width: 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 5px; }
.swatch { position: relative; min-width: 38px; height: 38px; cursor: pointer; }
.swatch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.swatch span { display: block; width: 23px; height: 23px; margin: 7px; border-radius: 50%; background: var(--project-color); }
.swatch input:checked + span { outline: 2px solid var(--ink); outline-offset: 3px; }
.swatch input:focus-visible + span { outline: 2px dashed var(--ink); outline-offset: 4px; }
.editor-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 19px; }
#archive-project { margin-right: auto; padding-inline: 5px; }
.form-error { margin-top: 10px; color: #842c23; font-size: .875rem; }

@media (max-width: 700px) {
  .header-inner, .shell { width: calc(100% - 30px); }
  .header-inner { min-height: 64px; }
  .shell { padding-block: 23px 34px; }
  .columns { grid-template-columns: 1fr; gap: 14px; }
  .summary { margin-bottom: 14px; padding: 20px; gap: 19px; }
  .card { padding: 14px 16px 16px; }
}
@media (max-width: 430px) {
  .summary { flex-direction: column; align-items: stretch; gap: 14px; }
  .progress-box { flex-basis: auto; }
  .project-row { gap: 7px; }
}
