:root {
  font: 16px/1.6 Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #233429;
  background: #f7f5ef;
  --ink: #233429;
  --muted: #54645a;
  --green: #214f3c;
  --paper: #fffcf6;
  --line: #e3ded0;
  --soft-green: #e6ede1;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select { font: inherit; }
h1, h2, h3, p, dl, dd { margin: 0; }
h2 { font-size: 1.35rem; line-height: 1.25; }
a { color: var(--green); text-underline-offset: .22em; }
button { color: inherit; cursor: pointer; }
button:disabled, input:disabled { opacity: .62; cursor: wait; }
:focus-visible { outline: 3px solid #28714e; outline-offset: 3px; }
.frame { width: min(1080px, 100% - 3rem); margin-inline: auto; }
.masthead { background: var(--paper); border-bottom: 1px solid var(--line); }
.masthead-inner { min-height: 4.1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand, nav a { text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: .58rem; color: var(--ink); font-weight: 750; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 1.95rem; height: 1.95rem; border-radius: .52rem; background: var(--green); color: #fff9e9; font-size: .96rem; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: 1.35rem; font-size: .91rem; }
nav a { color: var(--muted); white-space: nowrap; }
nav a:hover { color: var(--green); text-decoration: underline; }
.workspace { padding-block: 2.15rem 1.55rem; }
.hero { position: relative; display: grid; grid-template-columns: 1fr .92fr; min-height: 16.8rem; overflow: hidden; border: 1px solid #dce3d4; border-radius: 1.26rem; background: var(--soft-green); }
.hero-copy { min-width: 0; align-self: center; padding: clamp(1.5rem, 5vw, 3.1rem); z-index: 1; }
.date-label { margin-bottom: .4rem; color: var(--green); font-size: .87rem; font-weight: 680; letter-spacing: .025em; }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.15; letter-spacing: -.045em; }
.hero-copy h1 + p { margin-top: .65rem; color: var(--muted); }
.hero-copy .button, .hero-copy .actions { margin-top: 1.25rem; }
.hero-copy .actions .button { margin-top: 0; }
.hero-photo { min-height: 100%; background: #dbe3d5 url("/life/morning.jpg") 58% 54% / cover no-repeat; }
.actions { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .33rem; min-height: 2.65rem; padding: .52rem .9rem; border: 1px solid transparent; border-radius: .66rem; font-weight: 650; text-decoration: none; }
.primary { color: #fffdf4; background: var(--green); }
.primary:hover { background: #173d2d; }
.secondary { background: var(--paper); border-color: var(--line); color: var(--ink); }
.secondary:hover { border-color: #a5b4a6; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: .85rem 0 1.4rem; }
.stats > div { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .67rem 1rem; min-height: 3.3rem; border: 1px solid var(--line); border-radius: .78rem; background: var(--paper); }
.stats dt { color: var(--muted); font-size: .87rem; }
.stats dd { font: 650 1.48rem/1 Inter, -apple-system, BlinkMacSystemFont, sans-serif; font-variant-numeric: tabular-nums; }
.panel, .module { border: 1px solid var(--line); border-radius: 1rem; background: var(--paper); }
.agenda { padding: clamp(1rem, 3vw, 1.45rem); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.category-filter { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .88rem; white-space: nowrap; }
.category-filter select { width: auto; }
select, input:not([type="checkbox"]) { width: 100%; min-height: 2.45rem; padding: .43rem .58rem; color: var(--ink); border: 1px solid var(--line); border-radius: .56rem; background: #fffdf8; }
.filters { display: flex; flex-wrap: wrap; gap: .35rem; margin-block: .75rem .42rem; }
.filters button { padding: .35rem .75rem; border: 1px solid transparent; border-radius: 2rem; background: transparent; color: var(--muted); font-size: .87rem; }
.filters button:hover { border-color: var(--line); }
.filters [aria-pressed="true"] { background: var(--soft-green); color: var(--green); font-weight: 690; }
.agenda-list { list-style: none; margin: 0; padding: 0; }
.agenda-row { display: flex; justify-content: space-between; align-items: center; gap: .8rem; min-width: 0; padding: .67rem 0; border-top: 1px solid var(--line); }
.agenda-row:first-child { border-top: 0; }
.task-label { display: flex; gap: .78rem; align-items: center; min-width: 0; cursor: pointer; }
.task-label input { flex: 0 0 auto; appearance: none; display: grid; place-content: center; width: 1.18rem; height: 1.18rem; margin: 0; border: 1px solid #8c9b8d; border-radius: .35rem; background: #fffdf8; cursor: pointer; }
.task-label input:checked { border-color: var(--green); background: var(--green); }
.task-label input:checked::after { content: ""; width: .55rem; height: .31rem; transform: translateY(-.05rem) rotate(-45deg); border-left: 2px solid white; border-bottom: 2px solid white; }
.task-label input:checked + .task-body > .task-name { text-decoration: line-through; color: var(--muted); }
.task-body, .task-name { min-width: 0; display: block; overflow-wrap: anywhere; }
.task-name { line-height: 1.45; }
.metadata { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin-top: .27rem; color: var(--muted); font-size: .78rem; }
.chip { display: inline-block; padding: .11rem .49rem; border-radius: 2rem; color: var(--tag-ink, #435549); background: var(--tag, #ebeee7); }
.task-date.overdue { color: #96472f; font-weight: 650; }
.edit-button { flex: 0 0 auto; min-height: 2.35rem; padding: .32rem .48rem; border: 1px solid transparent; border-radius: .47rem; color: var(--green); background: transparent; font-size: .86rem; }
.edit-button:hover { background: var(--soft-green); }
.empty { padding-block: .75rem; color: var(--muted); font-size: .91rem; }
.notice:not(:empty) { margin-block: .65rem .15rem; color: var(--green); font-size: .88rem; }
.notice.error { color: #93442f; }
.module-section { margin-top: 1.75rem; }
.modules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: .9rem; }
.module { display: flex; flex-direction: column; gap: .52rem; align-items: flex-start; min-width: 0; padding: 1rem 1.12rem; }
.module h3 { display: flex; align-items: center; gap: .55rem; font-size: 1.06rem; }
.module-symbol { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: .56rem; color: var(--tag-ink); background: var(--tag); font-size: .83rem; }
.module p { font-size: .88rem; overflow-wrap: anywhere; }
.module-now { color: var(--muted); }
.module a { margin-top: auto; font-size: .86rem; font-weight: 660; }
[data-module="assets"] { --tag: #f1e6cc; --tag-ink: #634c26; }
[data-module="english"] { --tag: #dfeadd; --tag-ink: #345341; }
[data-module="video"] { --tag: #eee4e0; --tag-ink: #724738; }
[data-module="bills"] { --tag: #e2ebec; --tag-ink: #37545c; }
[data-module="invoices"] { --tag: #ebe4ef; --tag-ink: #62456e; }
footer { padding-top: 1.2rem; color: var(--muted); font-size: .83rem; }
dialog { width: min(31rem, calc(100% - 1.8rem)); max-height: calc(100% - 1.8rem); overflow: auto; border: 1px solid var(--line); border-radius: 1rem; color: var(--ink); background: var(--paper); padding: clamp(1rem, 5vw, 1.5rem); }
dialog::backdrop { background: rgb(25 42 33 / 42%); }
.field { display: flex; flex-direction: column; gap: .38rem; min-width: 0; margin-top: .88rem; color: var(--muted); font-size: .91rem; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.form-actions { justify-content: flex-end; margin-top: 1.12rem; }
@media (max-width: 800px) {
  .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .frame { width: calc(100% - 1.4rem); }
  .masthead-inner { min-height: 3.6rem; gap: .5rem; }
  .brand { gap: .35rem; font-size: .91rem; }
  .brand-mark { width: 1.6rem; height: 1.6rem; }
  nav { gap: .57rem; font-size: .77rem; }
  .workspace { padding-block: .85rem 1.2rem; }
  .hero { grid-template-columns: 1fr; min-height: 0; border-radius: 1rem; }
  .hero-photo { min-height: 8.1rem; grid-row: 1; background-position: 57% 58%; }
  .hero-copy { padding: 1.15rem; }
  .stats { gap: .38rem; margin-bottom: .9rem; }
  .stats > div { padding-inline: .4rem; }
  .stats dt { font-size: .78rem; }
  .stats dd { font-size: 1.2rem; }
  .modules { grid-template-columns: 1fr; }
}
@media (max-width: 340px) {
  nav { gap: .35rem; }
  nav a:first-child { display: none; }
  .category-filter > span { display: none; }
  .form-row { grid-template-columns: 1fr; }
}
