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

/* ============================================
   tomo_iezukuri デザインシステム v2.2 準拠
   生成り×焦げ茶×飴色/淡色 #8A7A69/本文16px以上
   ============================================ */
: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;   /* 非活性 */
  --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;
}

.view {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px var(--screen-pad) 40px;
}

.hidden { display: none; }

/* ===== ボタン ===== */
.btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-btn);
  font-size: 16px;
  font-weight: 700;
  font-family: var(--sans);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

/* 主ボタン(1画面に1つまで) */
.btn-primary {
  background: var(--brass);
  color: var(--ink);
  margin-top: 24px;
}

.btn-line {
  background: var(--brass);
  color: var(--ink);
}

.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: 4px auto 0; }

/* ===== トップ(入口分岐) ===== */
.top-hero { text-align: center; padding: 40px 0 28px; }

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

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

.entry-question {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin: 4px 0 16px;
}

/* 白地+飴色枠2px+項目数飴色。タップ時のみ飴色地に反転(白文字) */
.choice-btn {
  display: block;
  width: 100%;
  background: var(--panel);
  border: 2px solid var(--brass);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 18px var(--pad-card);
  margin-bottom: var(--gap);
  text-align: center;
  font-family: var(--sans);
  cursor: pointer;
}

.choice-btn:active { background: var(--brass); }
.choice-btn:active .choice-label,
.choice-btn:active .choice-sub { color: #FFFFFF; }

/* 前回選んだ編(再訪時に復元) */
.choice-btn.prev { background: var(--panel-deep); }

.choice-label {
  display: inline;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--paper);
}

/* 編ごとの個別進捗(「土地の売買契約 3/21」形式・数字は飴色) */
.choice-sub {
  display: inline;
  font-size: 14px;
  color: var(--brass);
  margin-left: 8px;
}

.exclusion-note {
  font-size: 14px;
  color: var(--faint);
  text-align: center;
  margin: 4px 0 28px;
}

/* ===== 編トップ ===== */
.track-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin: 12px 0 20px;
}

.testimonial {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brass);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 20px;
}

.testimonial blockquote {
  font-size: 16px;
  color: var(--paper);
}

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

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

.progress-labels.small { justify-content: flex-end; font-size: 13px; margin-bottom: 4px; }

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

.progress-bar.slim { height: 6px; }

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

/* ===== チェック画面 ===== */
.check-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.check-header-progress { flex: 1; max-width: 200px; }

.track-label {
  font-size: 14px;
  color: var(--faint);
  margin-bottom: 8px;
}

/* セクション=カード */
.category {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  margin-bottom: var(--gap);
  overflow: hidden;
}

.category-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px var(--pad-card);
  background: var(--panel);
  border: none;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--paper);
  cursor: pointer;
  text-align: left;
  gap: 8px;
}

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

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

.category-arrow { color: var(--faint); transition: transform 0.2s; }

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

.category-body { display: none; }

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

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

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

.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.checked .item-text { color: var(--faint); }

/* くわしく(解説+質問例)の折りたたみ */
.detail-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  background: none;
  border: 1px solid var(--faint);
  border-radius: var(--radius-chip);
  color: var(--faint);
  font-family: var(--sans);
  font-size: 14px;
  cursor: pointer;
  padding: 8px 16px;
  margin: 6px 0 0 32px;
}

.detail-body {
  display: none;
  margin: 6px 0 0 32px;
  padding: 12px 14px;
  background: var(--panel-deep);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.item.detail-open .detail-body { display: block; }

.detail-desc { font-size: 16px; color: var(--paper); }

.q-block {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(74, 66, 56, 0.25);
}

.q-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--brass);
  margin-bottom: 2px;
}

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

.q-sub {
  font-size: 14px;
  color: var(--faint);
  margin-top: 4px;
}

/* 主な根拠法令(静的表示・チェック対象ではない) */
.laws-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 20px;
}

.laws-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--faint);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.laws-text {
  font-size: 14px;
  color: var(--faint);
}

/* ===== 結果画面(型:①大きな数字→②ひとこと→③次の一歩) ===== */
.result-summary {
  background: var(--panel-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  text-align: center;
  padding: 28px 20px;
  margin: 16px 0 20px;
}

.result-headline {
  color: var(--faint);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.15em;
}

.result-number {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 700;
  color: var(--brass);
  line-height: 1.2;
  margin: 8px 0;
}

.result-message {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.result-sub { font-size: 13px; color: var(--faint); }

.section-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--brass);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  margin: 24px 0 14px;
}

/* これから確認できる項目 */
.remaining-item {
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  margin-bottom: 8px;
  font-size: 16px;
}

.remaining-category {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--brass);
  display: block;
}

.remaining-note {
  font-size: 16px;
  color: var(--paper);
  text-align: center;
  margin: 16px 0 8px;
}

/* ===== CTA・次の一歩 ===== */
.cta-block,
.next-step {
  margin-top: 28px;
  padding: var(--pad-card);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  text-align: center;
}

.cta-block.hidden { display: none; }

.cta-lead { font-size: 16px; margin-bottom: 2px; }

.next-step .btn-primary { margin-top: 14px; }

/* 免責(控えめな表示) */
.disclaimer {
  font-size: 14px;
  color: var(--faint);
  margin-top: 24px;
}

/* ===== 共通フッター ===== */
.tool-footer {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px var(--screen-pad) 40px;
  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; }
