:root {
  --green: #2f7d6d;
  --green-dark: #1f5c50;
  --green-soft: #e8f3f0;
  --ink: #1f2a2e;
  --muted: #5b6b70;
  --line: #dbe4e2;
  --bg: #f6f8f7;
  --card: #ffffff;
  --warn: #b5541c;
  --warn-soft: #fdf1e8;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--green-dark); }
.site-header {
  background: var(--green);
  padding: 12px 20px;
}
.logo { color: #fff; font-weight: 700; text-decoration: none; font-size: 17px; letter-spacing: .02em; }
.wrap { max-width: 760px; margin: 0 auto; padding: 8px 16px 40px; }
.crumbs { font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
.crumbs a { color: var(--muted); }
h1 { font-size: 26px; line-height: 1.4; margin: 8px 0 8px; }
h2 { font-size: 20px; margin: 0 0 10px; }
.lead { color: var(--muted); margin: 0 0 18px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 0 0 16px;
}

/* 条件 */
.conditions fieldset { border: 0; margin: 0 0 14px; padding: 0; }
.conditions fieldset:last-child { margin-bottom: 0; }
legend { font-weight: 700; font-size: 15px; margin-bottom: 8px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label, .toggles label { cursor: pointer; }
.chips input, .toggles input { position: absolute; opacity: 0; pointer-events: none; }
.chips span {
  display: inline-block;
  padding: 9px 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 16px;
  min-width: 72px;
  text-align: center;
}
.chips input:checked + span { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }
.chips input:focus-visible + span, .toggles input:focus-visible + span { outline: 3px solid #9fd3c7; outline-offset: 2px; }
.toggles { display: flex; flex-direction: column; gap: 8px; }
.toggles span {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0;
}
.toggles span::before {
  content: ""; flex: none;
  width: 24px; height: 24px;
  border: 2px solid #a9b8b5; border-radius: 6px; background: #fff;
}
.toggles input:checked + span::before {
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' stroke='white' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;
  border-color: var(--green);
}

/* 進捗と操作 */
.sticky { position: sticky; top: 0; z-index: 5; box-shadow: 0 4px 14px rgba(31, 42, 46, .06); padding: 12px 18px 8px; margin-bottom: 10px; }
.progress { height: 10px; background: var(--green-soft); border-radius: 999px; overflow: hidden; }
.bar { height: 100%; width: 0; background: var(--green); transition: width .25s ease; }
.progress-text { margin: 6px 0 0; font-weight: 700; font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.btn {
  font: inherit; font-size: 15px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--green);
  background: #fff; color: var(--green-dark);
  cursor: pointer;
}
.btn:hover { background: var(--green-soft); }
.btn.line { background: #06c755; border-color: #06c755; color: #fff; font-weight: 700; }
.btn.line:hover { background: #05b04b; }
.btn.ghost { border-color: var(--line); color: var(--muted); }

.notice {
  background: var(--warn-soft);
  border-left: 4px solid var(--warn);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 15px;
  margin: 0 0 12px;
}
.notice.soft { background: var(--green-soft); border-color: var(--green); }

/* リスト */
.cat { margin: 0 0 18px; }
.cat h3 {
  font-size: 17px; margin: 0 0 6px; padding: 4px 0 4px 10px;
  border-left: 5px solid var(--green);
}
.cat ul, .ng ul { list-style: none; margin: 0; padding: 0; }
.item {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 6px;
}
.item label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; flex: 1; }
.item input[type="checkbox"] { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--green); flex: none; }
.item .body { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.item .name { font-size: 17px; }
.item .note { display: block; width: 100%; font-size: 14px; color: var(--muted); line-height: 1.5; }
.item.done { background: #f1f5f4; }
.item.done .name { color: var(--muted); text-decoration: line-through; }
.tag { font-size: 12px; padding: 1px 7px; border-radius: 6px; font-weight: 700; white-space: nowrap; }
.tag.must { background: var(--green); color: #fff; }
.tag.ask { background: var(--warn-soft); color: var(--warn); border: 1px solid #f0c9ad; }
.shop { font-size: 12px; color: var(--muted); white-space: nowrap; padding-top: 4px; }
.shop a { color: var(--muted); }
.pr { border: 1px solid #c9d3d1; border-radius: 4px; padding: 0 4px; margin-right: 4px; font-size: 10px; }
.del { border: 0; background: none; font-size: 20px; color: var(--muted); cursor: pointer; padding: 0 4px; }
.add { display: flex; gap: 8px; margin-top: 6px; }
.add input { flex: 1; font: inherit; font-size: 16px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; }
.add button { font: inherit; padding: 8px 16px; border-radius: 10px; border: 0; background: var(--green); color: #fff; cursor: pointer; }

.ng li { padding: 4px 0 4px 26px; position: relative; }
.ng li::before { content: "×"; position: absolute; left: 4px; color: var(--warn); font-weight: 700; }

/* 読みもの */
.guide { margin: 28px 0; }
.guide h2 { margin-top: 26px; }
.guide h3 { font-size: 17px; margin: 18px 0 4px; }
.guide p { margin: 0 0 12px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 8px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 8px 0 0; }
.related ul { margin: 0; padding-left: 20px; }

.ad-slot { margin: 16px 0; min-height: 90px; text-align: center; }
.ad-label { display: block; font-size: 11px; color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); padding: 20px 16px 40px; text-align: center; font-size: 13px; color: var(--muted); }
.site-footer p { max-width: 640px; margin: 6px auto; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 15px; z-index: 10;
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 22px; }
  .btn { flex: 1 1 calc(50% - 8px); }
  .shop { display: none; }
}

/* 印刷：チェックリストだけをA4に */
@media print {
  .site-header, .conditions, .actions, .progress, .ad-slot, .guide, .related, .site-footer, .crumbs, .lead, .add, .del, .shop, #rental-note { display: none !important; }
  body { background: #fff; font-size: 12px; }
  .wrap { max-width: none; padding: 0; }
  h1 { font-size: 18px; }
  .sticky { position: static; box-shadow: none; border: 0; padding: 0; }
  .card { border: 0; padding: 0; }
  .list { columns: 2; column-gap: 20px; }
  .cat { break-inside: avoid; margin-bottom: 10px; }
  .item { border: 0; padding: 1px 0; margin: 0; background: none !important; }
  .item .note { font-size: 10px; }
  .item.done .name { text-decoration: none; color: var(--ink); }
  .notice { border: 1px solid #999; background: none; font-size: 11px; }
}
