:root {
  color-scheme: light;
  --bg: #f2f2ea;
  --paper: #fffef9;
  --ink: #222d27;
  --muted: #53635a;
  --line: #dce1d5;
  --green: #284b3d;
  --dark: #243b32;
  --lime: #e5ec9e;
  --subtle: #eef1e5;
  --warm: #f3e9d5;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3.3rem); line-height: 1.18; letter-spacing: -.05em; }
h2 { font-size: 1.18rem; letter-spacing: -.02em; }
h3 { font-size: 1rem; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .65; }
:focus-visible { outline: 3px solid #6a822a; outline-offset: 3px; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { position: absolute; z-index: 10; top: .5rem; left: .5rem; padding: .5rem; background: white; }
.top { border-bottom: 1px solid var(--line); background: var(--paper); }
.top-inner { max-width: 1152px; min-height: 69px; padding: 0 26px; margin: auto; display: flex; align-items: center; gap: 36px; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-weight: 750; }
nav { display: flex; gap: 6px; align-items: center; }
nav a { border-radius: 8px; padding: 8px 14px; color: var(--muted); font-size: .92rem; white-space: nowrap; }
nav a:hover, nav a[aria-current="page"] { background: var(--subtle); color: var(--ink); }
nav a[aria-current="page"] { font-weight: 700; }
.settings { margin-left: auto; white-space: nowrap; }
.wrap { max-width: 1152px; margin: auto; padding: 34px 26px 0; }
.hero { position: relative; min-height: 230px; padding: 31px 34px; display: grid; grid-template-columns: 1.4fr 1fr; align-items: end; gap: 3rem; background: var(--dark); color: var(--paper); border-radius: 20px; overflow: hidden; }
.hero::after { content: ""; position: absolute; width: 390px; height: 390px; right: -77px; top: -263px; border-radius: 50%; border: 1px solid #ffffff25; box-shadow: 0 0 0 28px #ffffff10, 0 0 0 57px #ffffff0a, 0 0 0 93px #ffffff08; pointer-events: none; }
.hero-main, .hero-progress { position: relative; z-index: 1; }
.hero-label { color: var(--lime); font-size: .89rem; font-weight: 700; letter-spacing: .05em; margin-bottom: 10px; }
.hero h1 { margin-bottom: 10px; }
.hero p { max-width: 29rem; color: #e2eadf; }
.hero-actions:not(:has(button:not([hidden]):not(.mobile-pause))) { display: none; }
.hero-actions { margin-top: 16px; }
.hero-progress { border-top: 1px solid #ffffff31; padding-top: 12px; }
.progress-top, .phase-labels { display: flex; justify-content: space-between; gap: 7px; align-items: baseline; font-size: .88rem; }
.progress-top strong { color: var(--lime); font-variant-numeric: tabular-nums; }
progress { display: block; width: 100%; margin: 10px 0 7px; height: 9px; border: 0; border-radius: 10px; overflow: hidden; appearance: none; background: #466056; }
progress::-webkit-progress-bar { background: #466056; }
progress::-webkit-progress-value { background: var(--lime); border-radius: 10px; }
progress::-moz-progress-bar { background: var(--lime); }
.phase-labels { color: #e2eadf; }
.layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; gap: 20px; margin-top: 20px; }
.stack { display: grid; gap: 20px; min-width: 0; }
.card { border: 1px solid var(--line); border-radius: 16px; background: var(--paper); padding: 21px 23px; min-width: 0; }
.card-header, .page-head, .dialog-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.card-header .muted { font-size: .89rem; }
.muted, .footnote { color: var(--muted); }
.footnote { font-size: .88rem; margin-top: 13px; }
.checks { margin-top: 14px; }
.check { display: flex; align-items: flex-start; gap: 13px; padding: 13px 0; border-top: 1px solid var(--line); cursor: pointer; }
.check:last-child { border-bottom: 1px solid var(--line); }
.check input { width: 20px; height: 20px; margin: 3px 0 0; flex: none; accent-color: var(--green); }
.check strong, .check small, summary small { display: block; }
.check small, summary small { font-size: .9rem; color: var(--muted); margin-top: 2px; }
.check:has(input:checked) strong { color: var(--green); }
.pause-card { background: var(--subtle); }
.pause-card p { margin: 7px 0 17px; color: var(--muted); }
.pause-icon { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 11px; border-radius: 9px; background: #d9e3bd; color: var(--dark); font-weight: 800; }
.primary, .secondary, .light, .plain, .text-link, .hero-secondary { border-radius: 8px; padding: 8px 13px; font-size: .9rem; font-weight: 700; min-height: 41px; }
.primary, .secondary, .light { border: 1px solid transparent; }
.primary { background: var(--green); color: white; }
.primary:hover { background: #365e4e; }
.secondary { color: var(--green); background: var(--subtle); border-color: #d5ddcd; }
.secondary:hover { background: #e2ead8; }
.light { background: var(--lime); color: var(--dark); }
.hero-secondary { border: 1px solid #ffffff65; background: transparent; color: var(--paper); }
.hero-secondary:hover { background: #ffffff19; }
.mobile-pause { display: none; }
.plain, .text-link { background: transparent; border: 1px solid transparent; color: var(--green); }
.plain:hover, .text-link:hover { background: var(--subtle); }
.danger { color: #873228; }
.text-link { display: inline-flex; align-items: center; white-space: nowrap; padding: 4px 7px; }
input:not([type=checkbox]), textarea, select { box-sizing: border-box; min-width: 0; width: 100%; display: block; border: 1px solid #cbd4c8; border-radius: 8px; padding: 9px 10px; background: white; color: var(--ink); }
input[type=date] { min-height: 43px; }
textarea { resize: vertical; }
.fields, .settings-section { display: grid; gap: 14px; margin-top: 15px; }
.fields button { justify-self: start; }
.fields label, .inline-form label { display: grid; gap: 5px; font-weight: 650; font-size: .95rem; }
.fields label :is(input, textarea, select), .inline-form input { font-weight: 400; }
summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.4rem; color: var(--green); }
details[open] > summary::after { content: "−"; }
.page-head { margin: 8px 0 25px; align-items: end; }
.page-head p { color: var(--muted); margin-top: 6px; }
.promise-list { margin-top: 9px; }
.promise { border-top: 1px solid var(--line); padding: 12px 0; display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.promise:last-child { padding-bottom: 0; }
.promise h3, .promise p { overflow-wrap: anywhere; }
.promise p { font-size: .9rem; color: var(--muted); }
.promise .overdue { color: #873228; }
.promise .actions { justify-content: flex-end; }
.promise .plain, .promise .secondary { padding-inline: 8px; }
.empty { color: var(--muted); font-size: .92rem; padding: 9px 0 2px; }
.guide-list { padding-left: 1.4rem; margin: 12px 0 0; }
.guide-list li { padding: 4px 0; }
.guide-list small { display: block; color: var(--muted); font-size: .88rem; }
.phase-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.phase.active { border-color: #77927d; box-shadow: inset 0 3px 0 #77927d; }
.phase .period { font-size: .86rem; color: var(--green); margin-bottom: 5px; }
.phase .checks { margin-top: 10px; }
.plan-bottom { margin-top: 20px; }
.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 22px; margin-top: 13px; }
.principles p { color: var(--muted); font-size: .92rem; }
footer { display: flex; justify-content: flex-end; padding: 14px 0; }
dialog { width: min(100% - 28px, 570px); max-height: calc(100dvh - 32px); color: var(--ink); border: 1px solid var(--line); border-radius: 17px; background: var(--paper); padding: 0; box-shadow: 0 12px 50px #18251b33; }
dialog::backdrop { background: #17291cb0; }
.dialog-heading { padding: 12px 22px; border-bottom: 1px solid var(--line); }
.dialog-body { padding: 18px 22px 22px; }
.close { font-size: 1.45rem; padding: 0 12px; }
.inline-form { display: flex; align-items: end; gap: 9px; margin-top: 10px; }
.inline-form label { flex: 1; min-width: 0; }
.inline-form button, .page-head button { flex: none; }
.settings-section { border-top: 1px solid var(--line); padding-top: 15px; }
.settings-section p { font-size: .92rem; }
.sync-status { color: var(--green); font-size: .9rem; }
.sync-status:empty, #backup-status:empty { display: none; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.notice { background: var(--warm); border-radius: 8px; padding: 10px 13px; }
.notice .actions { margin-top: 7px; }
#storage-alert { margin-bottom: 14px; }
.timer { display: flex; align-items: center; gap: 12px; }
.timer > span { width: 58px; height: 58px; flex: none; display: grid; place-items: center; background: var(--subtle); color: var(--green); font-variant-numeric: tabular-nums; font-size: 1.5rem; font-weight: 750; border-radius: 12px; }
.timer p { font-size: .87rem; color: var(--muted); }
.timer button { margin-left: auto; white-space: nowrap; }
.pause-guide { margin-bottom: 11px; }
.record-link { display: block; border-top: 1px solid var(--line); padding: 10px 0 4px; color: var(--green); overflow-wrap: anywhere; }
.record-link small { display: block; color: var(--muted); }
@media (max-width: 760px) {
  .top-inner { gap: 12px; padding: 0 15px; flex-wrap: wrap; min-height: 58px; }
  .brand { padding: 10px 0; }
  nav { order: 3; width: 100%; margin-top: -9px; padding-bottom: 7px; }
  nav a { flex: 1; text-align: center; padding: 8px; }
  .wrap { padding: 17px 13px 0; }
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 22px; padding: 23px 19px; border-radius: 15px; }
  .hero-actions:not(:has(button:not([hidden]):not(.mobile-pause))) { display: flex; }
  .mobile-pause { display: inline-block; }
  .pause-card { display: none; }
  .layout, .phase-grid, .principles { grid-template-columns: 1fr; }
  .layout, .stack, .phase-grid { gap: 13px; }
  .layout { margin-top: 13px; }
  .card { padding: 16px 15px; border-radius: 13px; }
  .page-head { align-items: start; margin-bottom: 15px; }
  .page-head h1 { font-size: 1.8rem; }
  .promise { flex-wrap: wrap; }
}
@media (max-width: 360px) {
  .page-head, .inline-form { flex-wrap: wrap; }
  .card-header { gap: .35rem; }
  .card-header input[type=date] { width: 125px; padding-inline: 4px; }
}
