:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --text: #1f2421;
  --muted: #5f6762;
  --line: #e2e0d9;
  --brand: #1f6f5c;
  --brand-soft: #e3f0ec;
  --accent: #d9622b;
  --accent-text: #ffffff;
  --loss: #b3261e;
  --loss-soft: #fbeceb;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151816;
    --surface: #1e2220;
    --text: #e8ebe9;
    --muted: #a3aba6;
    --line: #333a36;
    --brand: #6cc2a8;
    --brand-soft: #1f302b;
    --accent: #f08a54;
    --accent-text: #1b120d;
    --loss: #f2a49e;
    --loss-soft: #3a2422;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  line-height: 1.75;
  font-size: 16px;
}
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.4; }
h2 { font-size: 1.25rem; margin: 0 0 .75rem; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 600px; padding-top: 24px; }

.hero { background: var(--brand-soft); padding: 40px 0 32px; margin-bottom: 24px; }
.hero h1 { font-size: clamp(1.45rem, 5vw, 2rem); margin: .25rem 0 1rem; }
.eyebrow { color: var(--brand); font-weight: 700; font-size: .85rem; margin: 0; letter-spacing: .04em; }
.lead { margin: 0; color: var(--text); }
.h1-small { font-size: 1.4rem; margin-top: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.form .field { display: block; border: 0; padding: 0; margin: 0 0 18px; }
.form .field > span, .form legend { display: block; font-weight: 700; margin-bottom: 6px; }
.form em { font-style: normal; font-size: .75rem; color: var(--accent); margin-left: 6px; }
.form small { font-weight: 400; color: var(--muted); font-size: .8rem; margin-left: 4px; }
.form input[type=date], .form input[type=number] {
  font: inherit; color: inherit; background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; width: 100%; max-width: 260px;
}
.suffix { display: flex; align-items: center; gap: 8px; }
.suffix input { max-width: 160px !important; }
.choice { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; }
.choice input { width: 20px; height: 20px; accent-color: var(--brand); }

.btn {
  font: inherit; font-weight: 700; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 12px 22px; min-height: 48px;
}
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--surface); width: 100%; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-text); width: 100%; }
.btn:hover { filter: brightness(1.05); }
.note { font-size: .8rem; color: var(--muted); margin: 10px 0 0; }
.error { color: var(--loss); font-weight: 700; }

.count { font-size: .9rem; color: var(--muted); font-weight: 400; }
.hint { color: var(--muted); font-size: .9rem; }

.cta { border: 2px solid var(--accent); }
.cta h3 { margin-top: 0; font-size: 1.1rem; }
.cta ul { padding-left: 1.2em; }

.month { font-size: 1rem; color: var(--brand); margin: 28px 0 8px; padding-bottom: 4px; border-bottom: 2px solid var(--brand-soft); }
.task {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  margin-bottom: 10px; overflow: hidden;
}
.task.has-loss { border-left: 5px solid var(--loss); }
.task summary {
  list-style: none; cursor: pointer; padding: 14px 16px;
  display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: baseline;
}
.task summary::-webkit-details-marker { display: none; }
.task .cat {
  grid-row: span 2; font-size: .7rem; font-weight: 700; color: var(--brand);
  background: var(--brand-soft); border-radius: 6px; padding: 2px 6px; white-space: nowrap;
}
.task .title { font-weight: 700; }
.task .when { font-size: .85rem; color: var(--muted); }
.task.past { opacity: .6; }
.task .body { padding: 0 16px 14px; border-top: 1px dashed var(--line); }
.task .desc { white-space: pre-line; }
.task .loss { background: var(--loss-soft); color: var(--loss); border-radius: 8px; padding: 10px 12px; font-size: .9rem; }
.task .link { font-size: .9rem; margin: 0; }

.actions { margin: 16px 0 32px; text-align: center; }
.faq details { border-top: 1px solid var(--line); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.article ol li { margin-bottom: 8px; }
.disclaimer { font-size: .8rem; color: var(--muted); }

.footer { border-top: 1px solid var(--line); padding: 20px 0 40px; font-size: .85rem; }
.footer .wrap { display: flex; gap: 16px; flex-wrap: wrap; }

@media print {
  .hero, .form, .cta, .actions, .article, .faq, .footer { display: none !important; }
  body { background: #fff; color: #000; }
  .task { break-inside: avoid; }
  .task .body { display: block !important; }
}

.legal dt { font-weight: 700; margin-top: 12px; }
.legal dd { margin: 2px 0 0; }
.btn:disabled { opacity: .55; cursor: not-allowed; filter: none; }
