@import url('https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap');

/* ============================================
   tomo_iezukuri デザインシステム v2.2 準拠
   生成り×焦げ茶×飴色/淡色 #8A7A69/本文16px以上
   (流用元: 18_seshukensa/style.css + 15_madori-tool の LINE CTA)
   ============================================ */
:root {
  /* カラー */
  --ink: #FAF6EF;        /* 背景:明るい生成り */
  --panel: #FFFFFF;      /* カード面:白 */
  --panel-deep: #F1EAE0; /* 沈んだ面 */
  --paper: #4A4238;      /* 文字:焦げ茶 */
  --faint: #8A7A69;      /* 補助文字(v2.2で濃く) */
  --brass: #C9862B;      /* アクセント:飴色 */
  --line: rgba(74, 66, 56, 0.12);   /* 罫線 */
  --disabled: #D9D0C3;   /* 非活性 */
  --line-green: #06C755; /* LINEブランド色(CTAボタンのみ) */
  --shadow: 0 2px 10px rgba(74, 66, 56, 0.07); /* カードの浮き */
  /* フォント */
  --serif: 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', sans-serif;
  --sans: 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', sans-serif;
  /* 形 */
  --radius-card: 16px;
  --radius-btn: 14px;
  --radius-chip: 999px;
  /* 余白 */
  --pad-card: 16px;
  --gap: 12px;
  --screen-pad: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  color: var(--paper);
  background: var(--ink);
  line-height: 1.7;
  font-size: 16px;
}

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px var(--screen-pad) 40px;
  padding-left: calc(var(--screen-pad) + env(safe-area-inset-left));
  padding-right: calc(var(--screen-pad) + env(safe-area-inset-right));
}

/* ===== ボタン・リンク ===== */
.btn-text {
  background: none;
  border: none;
  color: var(--faint);
  font-size: 14px;
  font-family: var(--sans);
  cursor: pointer;
  padding: 8px 0;
}

.link-center { display: block; margin: 20px auto 0; text-decoration: underline; }

/* ===== ファーストビュー ===== */
.top-hero { text-align: center; padding: 40px 0 28px; }

.top-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.4;
  margin-bottom: 14px;
}

.top-sub { font-size: 16px; color: var(--faint); }

/* 体温一滴 */
.intro-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: var(--pad-card);
  margin-bottom: var(--gap);
}

.intro-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--brass);
  margin-bottom: 6px;
}

.intro-text { font-size: 16px; color: var(--paper); }

/* ===== LINE CTA(LINE_READYで有効化・15_madori-tool流用) ===== */
.line-cta {
  background: var(--panel-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--pad-card);
  text-align: center;
  margin-top: 12px;
}

.line-cta .line-cta-text { font-size: 16px; font-weight: 700; margin-bottom: 8px; }

.line-cta .badge-preparing {
  display: inline-block;
  font-size: 12px;
  padding: 8px 20px;
  border-radius: var(--radius-chip);
  background: var(--disabled);
  color: var(--faint);
}

.line-cta .btn-line {
  display: block;
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-btn);
  background: var(--line-green);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}

.line-cta .btn-line:active { transform: scale(0.97); }

/* ===== 部見出し ===== */
.part { margin-top: 40px; }

.part-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.5;
  margin-bottom: 16px;
}

/* ===== 進捗バー ===== */
.top-progress { margin-bottom: 16px; }

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--faint);
  margin-bottom: 6px;
}

.progress-bar {
  height: 10px;
  background: var(--panel-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-chip);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--brass);
  border-radius: var(--radius-chip);
  transition: width 0.25s;
}

/* ===== 第1部:グループ=カード(常時展開) ===== */
.group {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  margin-bottom: var(--gap);
  overflow: hidden;
}

.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px var(--pad-card);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
}

.group-count {
  font-size: 13px;
  font-weight: 400;
  font-family: var(--sans);
  color: var(--faint);
  white-space: nowrap;
  margin-left: auto;
}

.group-count.done { color: var(--brass); font-weight: 700; }

.item { border-top: 1px solid var(--line); padding: 12px var(--pad-card); }

.item-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.item-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 4px;
  accent-color: var(--brass);
}

.item-text { font-size: 16px; flex: 1; }

.item-id {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--brass);
  margin-right: 8px;
}

.item.checked .item-text { color: var(--faint); }

/* ===== 第2部:吹き出し風アコーディオン ===== */
.serifu { margin-bottom: 20px; }

.serifu-toggle {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 14px var(--pad-card);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  font-family: var(--sans);
  cursor: pointer;
  text-align: left;
}

/* 吹き出しのしっぽ(閉状態のみ) */
.serifu-toggle::after {
  content: "";
  position: absolute;
  left: 26px;
  bottom: -9px;
  border: 9px solid transparent;
  border-top-color: var(--panel);
  border-bottom: 0;
}

.serifu-num {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--brass);
  margin-top: 3px;
}

.serifu-quote {
  flex: 1;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--paper);
}

.serifu-arrow { color: var(--faint); transition: transform 0.2s; margin-top: 2px; }

.serifu.open .serifu-arrow { transform: rotate(180deg); }

.serifu.open .serifu-toggle {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.serifu.open .serifu-toggle::after { display: none; }

.serifu-body {
  display: none;
  background: var(--panel-deep);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  padding: 12px var(--pad-card);
}

.serifu.open .serifu-body { display: block; }

.serifu-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--brass);
  margin-bottom: 6px;
}

.serifu-answer { font-size: 16px; color: var(--paper); }

/* ===== 締めの一文(常設) ===== */
.closing { margin-top: 40px; }

.closing-text {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  line-height: 2;
  text-align: center;
  padding: 12px 0;
}

/* ===== 共通フッター ===== */
.tool-footer {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px var(--screen-pad) calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  text-align: center;
}

.tool-footer .brand {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
}

.tool-footer .links {
  color: var(--faint);
  font-size: 16px;
  margin-top: 6px;
}

.tool-footer .links span { margin: 0 4px; }

.tool-footer .links a { color: var(--brass); text-decoration: none; margin: 0 4px; }
