:root {
  --paper: #f6f2e9;
  --paper-deep: #ede6d8;
  --ink: #16372e;
  --ink-soft: #56685f;
  --line: rgba(22, 55, 46, 0.2);
  --line-strong: rgba(22, 55, 46, 0.45);
  --amber: #d49a4c;
  --amber-soft: #f1dfc2;
  --white: #fffdf8;
  --serif: "Noto Serif SC", "Songti SC", STSong, serif;
  --sans: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); line-height: 1.65; }
body::before { position: fixed; inset: 0; z-index: -1; content: ""; opacity: 0.28; pointer-events: none; background-image: radial-gradient(rgba(22, 55, 46, 0.08) 0.55px, transparent 0.7px); background-size: 8px 8px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
textarea { resize: vertical; }
.shell { width: min(980px, calc(100% - 48px)); margin-inline: auto; }
.section { padding-top: 150px; scroll-margin-top: 80px; }

.site-header { min-height: 78px; display: flex; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; white-space: nowrap; }
.brand-mark { width: 29px; height: 29px; display: grid; place-items: center; }
.brand-mark svg { width: 27px; height: 27px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand-name { font-family: var(--serif); font-size: 22px; font-weight: 700; letter-spacing: 0.11em; }
.brand-caption { color: var(--ink-soft); font-size: 11px; letter-spacing: 0.06em; }
nav { display: flex; gap: 23px; margin-left: auto; }
nav a, .quiet-button { color: var(--ink-soft); font-size: 12px; text-decoration: none; transition: color 160ms ease; }
nav a:hover, .quiet-button:hover { color: var(--ink); }
.quiet-button { border: 0; background: transparent; }

.intro { padding: 92px 0 104px; }
.eyebrow, .section-number { margin: 0 0 18px; color: var(--ink-soft); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; }
.eyebrow::before, .section-number::before { display: inline-block; width: 20px; height: 1px; margin: 0 9px 4px 0; background: var(--amber); content: ""; }
h1, h2 { margin: 0; font-family: var(--serif); font-weight: 700; letter-spacing: -0.045em; }
h1 { max-width: 760px; font-size: clamp(45px, 6.4vw, 82px); line-height: 1.14; }
h1 em { color: #6b7e59; font-style: normal; }
h2 { font-size: clamp(34px, 4.7vw, 60px); line-height: 1.18; }
.intro-copy { max-width: 515px; margin: 30px 0 0; color: var(--ink-soft); font-size: 16px; }

.daily-section { padding: 90px 0 102px; color: var(--white); background: var(--ink); scroll-margin-top: 0; }
.daily-layout { display: grid; grid-template-columns: 0.72fr 1.25fr 0.47fr; gap: clamp(30px, 5vw, 66px); align-items: start; }
.daily-heading .section-number { color: #c5d0c5; }
.daily-heading .section-number::before { background: var(--amber); }
.daily-heading h2 { color: var(--white); }
.date-label { margin: 22px 0 0; color: var(--amber); font-family: var(--serif); font-size: 15px; }
.section-note { margin: 18px 0 0; color: #c8d3c9; font-size: 13px; line-height: 1.7; }

.reflection-form { display: grid; gap: 0; }
.daily-form { border-top: 1px solid rgba(255, 253, 248, 0.34); }
.date-field, .select-field { display: grid; gap: 8px; padding: 18px 0; color: inherit; font-size: 12px; }
.date-field input, .select-field select { width: 100%; min-height: 37px; border: 1px solid currentColor; border-radius: 0; outline: 0; background: transparent; color: inherit; padding: 7px 9px; }
.daily-form .date-field { color: #d6dfd5; border-bottom: 1px solid rgba(255, 253, 248, 0.2); }
.daily-form input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); }
.field-block { display: grid; grid-template-columns: 33px 1fr; gap: 12px; padding: 23px 0; border-bottom: 1px solid currentColor; border-color: inherit; }
.daily-form .field-block { border-color: rgba(255, 253, 248, 0.2); }
.field-block > span, .field-block legend { padding: 0; }
.field-index { color: var(--amber); font-family: var(--serif); font-size: 15px; }
.field-title { display: block; margin-bottom: 11px; color: inherit; font-family: var(--serif); font-size: 18px; font-weight: 700; line-height: 1.45; }
.field-block textarea { width: 100%; min-height: 54px; border: 0; border-bottom: 1px solid currentColor; border-radius: 0; outline: 0; background: transparent; color: inherit; font-size: 14px; line-height: 1.65; }
.daily-form textarea::placeholder { color: #92a493; }
.daily-form textarea:focus { border-color: var(--amber); }
.choice-block { display: block; min-width: 0; margin: 0; border-inline: 0; border-bottom: 1px solid rgba(255, 253, 248, 0.2); padding: 23px 0; }
.choice-block legend { width: 100%; }
.choice-block .field-index { display: inline-block; width: 33px; vertical-align: top; }
.choice-block .field-title { display: inline-block; max-width: calc(100% - 40px); }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; margin-left: 33px; }
.choice-row label { position: relative; }
.choice-row input { position: absolute; opacity: 0; pointer-events: none; }
.choice-row span { display: block; border: 1px solid rgba(255, 253, 248, 0.4); padding: 7px 10px; color: #d8e0d8; font-size: 12px; transition: background-color 150ms ease, color 150ms ease; }
.choice-row input:checked + span { border-color: var(--amber); color: var(--ink); background: var(--amber); }
.choice-row input:focus-visible + span { outline: 2px solid var(--white); outline-offset: 2px; }
.form-footer { display: flex; align-items: center; gap: 17px; padding-top: 23px; }
.form-footer p { margin: 0; color: inherit; opacity: 0.72; font-size: 11px; }
.primary-button, .outline-button { display: inline-flex; align-items: center; gap: 16px; min-height: 42px; border: 1px solid transparent; padding: 0 17px; font-size: 13px; font-weight: 700; text-decoration: none; transition: transform 150ms ease, background-color 150ms ease; }
.primary-button { color: var(--ink); background: var(--amber); }
.primary-button:hover, .outline-button:hover { transform: translateY(-2px); }
.primary-button span { font-size: 17px; }
.daily-summary { padding-top: 62px; }
.summary-label { margin: 0; color: var(--amber); font-family: var(--serif); font-size: 16px; }
.summary-line { height: 1px; margin: 11px 0 20px; background: rgba(255, 253, 248, 0.32); }
.summary-entry, .summary-adjustment { margin: 0 0 19px; }
.summary-entry span, .summary-adjustment span { display: block; margin-bottom: 3px; color: #9db09f; font-size: 10px; letter-spacing: 0.08em; }
.summary-entry strong, .summary-adjustment strong { color: #f5f4e9; font-size: 12px; font-weight: 500; line-height: 1.5; }
.summary-adjustment { padding-top: 7px; }

.section-heading { display: grid; grid-template-columns: 1fr 0.58fr; gap: 50px; align-items: end; margin-bottom: 56px; }
.section-heading > p { max-width: 310px; margin: 0; color: var(--ink-soft); font-size: 14px; }
.goals-form { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-strong); }
.goal-field { display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; min-height: 214px; padding: 26px 24px 25px 0; border-bottom: 1px solid var(--line); }
.goal-field:nth-of-type(even) { padding-left: 24px; padding-right: 0; border-left: 1px solid var(--line); }
.goal-number { color: var(--amber); font-family: var(--serif); font-size: 14px; }
.goal-name { align-self: start; font-family: var(--serif); font-size: 28px; font-weight: 700; }
.goal-field textarea { grid-column: 2; min-height: 84px; margin-top: 11px; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; line-height: 1.7; }
.goal-field textarea::placeholder { color: #89978e; }
.goal-field textarea:focus { border-color: var(--amber); }
.goals-save-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 17px; padding-top: 27px; }
.goals-save-row p { margin: 0; color: var(--ink-soft); font-size: 12px; }
.outline-button { border-color: var(--line-strong); color: var(--ink); background: transparent; }

.weekly-section { margin-top: 150px; padding: 112px 0 122px; background: var(--paper-deep); }
.weekly-layout { display: grid; grid-template-columns: 0.7fr 1.15fr; gap: clamp(45px, 10vw, 145px); }
.weekly-heading > p:not(.section-number) { max-width: 305px; margin: 24px 0 0; color: var(--ink-soft); font-size: 14px; }
.weekly-form { border-top: 1px solid var(--line-strong); color: var(--ink); }
.weekly-form .date-field, .weekly-form .select-field { border-bottom: 1px solid var(--line); }
.weekly-form .field-block { border-color: var(--line); }
.weekly-form textarea::placeholder { color: #89978e; }
.weekly-form textarea:focus { border-color: var(--amber); }
.weekly-form .form-footer { padding-top: 24px; }
.weekly-form .form-footer p { color: var(--ink-soft); }

.closing { padding: 130px 0; }
.closing h2 { margin-bottom: 30px; }
.site-footer { display: grid; grid-template-columns: 1fr 1fr auto; gap: 22px; padding: 26px 0 35px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 11px; }
.site-footer p { margin: 0; }
#save-status { color: #6b7e59; text-align: right; }

@media (max-width: 860px) {
  .shell { width: min(720px, calc(100% - 40px)); }
  nav { display: none; }
  .daily-layout { grid-template-columns: 1fr; gap: 35px; }
  .daily-summary { padding-top: 0; }
  .daily-heading { max-width: 510px; }
  .section-heading, .weekly-layout { grid-template-columns: 1fr; gap: 26px; }
  .section-heading > p { max-width: 450px; }
  .weekly-section { margin-top: 100px; }
  .weekly-heading > p:not(.section-number) { max-width: 450px; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 32px, 500px); }
  .site-header { min-height: 68px; }
  .brand-caption { display: none; }
  .quiet-button { margin-left: auto; font-size: 11px; }
  .intro { padding: 68px 0 74px; }
  h1 { font-size: clamp(40px, 12vw, 55px); }
  h2 { font-size: 37px; }
  .daily-section { padding: 70px 0 75px; }
  .field-title { font-size: 17px; }
  .choice-row { margin-left: 0; }
  .choice-block .field-index { width: 27px; }
  .choice-block .field-title { max-width: calc(100% - 33px); }
  .form-footer { align-items: flex-start; flex-direction: column; gap: 10px; }
  .section { padding-top: 95px; }
  .goals-form { grid-template-columns: 1fr; }
  .goal-field, .goal-field:nth-of-type(even) { min-height: 190px; padding: 23px 0; border-left: 0; }
  .weekly-section { margin-top: 96px; padding: 80px 0; }
  .closing { padding: 92px 0; }
  .site-footer { grid-template-columns: 1fr; gap: 7px; }
  #save-status { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
