@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;
}

/* ===== トップ ===== */
.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-concept {
  font-size: 16px;
  color: var(--paper);
  margin-bottom: 10px;
}

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

/* ===== 進捗バー ===== */
.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: 16px;
}

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

/* カテゴリ=カード */
.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); }

.why-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;
}

.why-text {
  display: none;
  margin: 6px 0 0 32px;
  padding: 12px 14px;
  background: var(--panel-deep);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  color: var(--paper);
}

.item.why-open .why-text { display: block; }

/* ===== 結果画面(型:①大きな数字→②ひとこと→③次の一歩) ===== */
.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; }

/* ===== 共通フッター ===== */
.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; }
