:root {
  --ink: #1b2126;
  --ink-soft: #2c353d;
  --paper: #faf9f6;
  --surface: #ffffff;
  --wash: #f3f1ec;
  --line: #e2ded6;
  --line-dark: #c9c4b8;
  --text: #232a2f;
  --muted: #7c766a;
  --accent: #17554a;
  --accent-soft: #eef3f1;
  --warn-bg: #faf6ef;
  --warn-line: #ddd3c0;
  --warn-text: #6d5c33;
  --radius: 6px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  background: var(--paper);
  color: var(--text);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ---------- ヘッダー ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
}
.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
}
.logo { font-weight: 800; font-size: 17px; letter-spacing: 0.14em; white-space: nowrap; }
.logo span { color: var(--accent); }
.header-nav { display: flex; gap: 2px; white-space: nowrap; }
.header-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.05em;
  padding: 4px 7px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.header-nav a:hover { color: var(--ink); border-bottom-color: var(--ink); }

.notice-bar {
  background: var(--wash);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  padding: 8px 16px;
  text-align: center;
}

main { max-width: 960px; margin: 0 auto; padding: 0 16px 64px; }

/* ---------- ヒーロー ---------- */
.hero { padding: 52px 2px 10px; }
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: var(--accent);
  margin-bottom: 22px;
}
.hero-kicker::before { content: ""; width: 34px; height: 1px; background: var(--accent); }
.hero h1 {
  font-size: 29px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-bottom: 18px;
}
.hero-lead {
  color: var(--muted);
  font-size: 15px;
  max-width: 32em;
  margin-bottom: 30px;
}
.cta-button {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  padding: 15px 42px;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.12em;
  transition: background 0.18s ease;
}
.cta-button:hover { background: var(--accent); }
.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.hero-points span {
  font-size: 12.5px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 9px;
}
.hero-points span::before { content: ""; width: 5px; height: 5px; background: var(--accent); flex: none; }

/* ---------- セクション ---------- */
section { margin-top: 56px; }
section h2 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 18px;
}
.sec-num { font-size: 12px; font-weight: 700; letter-spacing: 0.2em; color: var(--accent); }
section h2 .sub { font-size: 12px; color: var(--muted); font-weight: 400; letter-spacing: 0.03em; margin-left: auto; }

/* ---------- チャット ---------- */
.chat-window {
  background: var(--surface);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  overflow: hidden;
}
.chat-messages {
  padding: 22px 16px;
  height: min(600px, 72vh);
  min-height: 460px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
}
.msg {
  max-width: 88%;
  padding: 12px 16px;
  border-radius: 10px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 16.5px;
  line-height: 1.75;
}
.msg.bot {
  background: var(--wash);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}
.msg.user {
  background: var(--ink);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}
.msg.alert {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  color: var(--warn-text);
}
.msg.type-name {
  background: var(--surface);
  border: 1px solid var(--line-dark);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  color: var(--ink);
  font-weight: 700;
  font-size: 17.5px;
}

.pick-card {
  align-self: stretch;
  background: var(--surface);
  border: 1px solid var(--line-dark);
  border-left: 3px solid var(--ink);
  border-radius: 4px;
  padding: 16px 18px;
}
.pick-name { font-weight: 800; font-size: 16px; line-height: 1.5; color: var(--ink); }
.pick-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; letter-spacing: 0.03em; }
.pick-reason-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--accent);
  margin-top: 14px;
}
.pick-reason { font-size: 14.5px; line-height: 1.7; margin: 4px 0 0; }

.quick-replies { padding: 2px 16px 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.quick-replies:empty { padding-bottom: 0; }
.quick-replies button {
  border: 1px solid var(--ink);
  color: var(--ink);
  background: var(--surface);
  border-radius: 3px;
  padding: 7px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.quick-replies button:hover { background: var(--ink); color: #fff; }

.chat-input-area {
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--line-dark);
  background: var(--surface);
  padding: 12px;
}
.chat-input-area input {
  flex: 1;
  border: 1px solid var(--line-dark);
  border-radius: 3px;
  padding: 12px 16px;
  font-size: 16px;
  outline: none;
  min-width: 0;
  background: var(--paper);
  transition: border-color 0.15s ease;
}
.chat-input-area input:focus { border-color: var(--ink); background: #fff; }
.chat-input-area button {
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 0 26px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.15s ease;
}
.chat-input-area button:hover { background: var(--accent); }
.chat-note { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.6; }

/* ---------- 商品 ---------- */
.sample-note { font-size: 13px; color: var(--muted); margin-bottom: 14px; }

.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filter-row button {
  border: 1px solid var(--line-dark);
  background: var(--surface);
  border-radius: 3px;
  padding: 6px 16px;
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-row button:hover { border-color: var(--ink); }
.filter-row button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.product-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.product-card {
  background: var(--surface);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.15s ease;
}
.product-card:hover { border-color: var(--ink); }
.product-card h3 { font-size: 17px; margin-bottom: 4px; line-height: 1.5; color: var(--ink); }
.product-card .category {
  display: block;
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.24em;
  margin-bottom: 8px;
}
.product-card .price { font-size: 21px; font-weight: 800; color: var(--ink); margin: 8px 0 2px; letter-spacing: 0.02em; }
.product-card .price small { font-size: 13px; color: var(--muted); font-weight: 400; }
.product-card dl { font-size: 14px; margin-top: 10px; }
.product-card dt { font-weight: 700; color: var(--muted); font-size: 11.5px; letter-spacing: 0.08em; margin-top: 9px; }
.product-card dd { margin: 0; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.product-card dd:last-child { border-bottom: none; padding-bottom: 0; }
.compare-add {
  margin-top: 16px;
  width: 100%;
  padding: 11px;
  border-radius: 3px;
  border: 1px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.15s ease;
}
.compare-add:hover { background: var(--wash); }
.compare-add.added { background: var(--accent); border-color: var(--accent); color: #fff; }
.buy-link {
  display: block;
  margin-top: 10px;
  padding: 12px;
  border-radius: 3px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s ease;
}
.buy-link:hover { background: var(--accent); }
.pick-card .buy-link { margin-top: 14px; }

/* ---------- ルーティン表 ---------- */
.routine-card {
  align-self: stretch;
  background: var(--surface);
  border: 1px solid var(--line-dark);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 16px 18px;
}
.routine-title { font-weight: 800; font-size: 15.5px; color: var(--ink); letter-spacing: 0.04em; margin-bottom: 12px; }
.routine-cols { display: grid; grid-template-columns: 1fr; gap: 16px; }
.routine-col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  margin-bottom: 8px;
}
.routine-col ol { list-style: none; counter-reset: step; }
.routine-col li {
  counter-increment: step;
  font-size: 13.5px;
  line-height: 1.6;
  padding: 5px 0 5px 26px;
  position: relative;
}
.routine-col li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 5px;
  width: 18px;
  height: 18px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: 11px;
  line-height: 17px;
  text-align: center;
  color: var(--ink);
}
.routine-cat { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; color: var(--muted); }
.routine-item-note { display: block; font-size: 12px; color: var(--muted); }
.routine-none { font-size: 13.5px; color: var(--muted); }
.routine-note { font-size: 12px; color: var(--muted); margin-top: 12px; }
@media (min-width: 640px) {
  .routine-cols { grid-template-columns: 1fr 1fr; }
}

/* ---------- 比較 ---------- */
.compare-table-wrap { overflow-x: auto; }
table.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 14px;
  min-width: 520px;
}
.compare-table th, .compare-table td {
  border: 1px solid var(--line-dark);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.compare-table th { background: var(--wash); color: var(--ink); }
.empty-note { color: var(--muted); font-size: 14px; }

/* ---------- プロフィール ---------- */
.profile-card {
  background: var(--surface);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 20px;
}
.profile-card h3 { font-size: 16px; margin-bottom: 6px; color: var(--ink); }
.profile-card dl { font-size: 14px; }
.profile-card dt { font-weight: 700; color: var(--muted); font-size: 11.5px; letter-spacing: 0.08em; margin-top: 7px; }
.profile-card dd { margin: 0; }
.profile-history { margin-top: 18px; font-size: 14px; }
.profile-history h3 { font-size: 15px; margin-bottom: 6px; }
.profile-history ul { list-style: none; color: var(--muted); }
.profile-history li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.profile-clear {
  margin-top: 16px;
  padding: 10px 16px;
  border-radius: 3px;
  border: 1px solid var(--line-dark);
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.profile-clear:hover { border-color: #b3261e; color: #b3261e; }

/* ---------- フッター ---------- */
.site-footer {
  background: var(--ink);
  color: #a7adb2;
  padding: 34px 16px 38px;
  text-align: center;
  font-size: 13px;
}
.site-footer p:first-child { color: #fff; font-weight: 800; letter-spacing: 0.14em; font-size: 15px; margin-bottom: 10px; }
.footer-note { line-height: 1.7; }
.footer-links { margin-top: 10px; }
.footer-links a { color: #d8dcdf; }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (min-width: 640px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: 68px; }
  .hero h1 { font-size: 37px; line-height: 1.45; }
  .header-inner { padding: 13px 16px; }
  .logo { font-size: 19px; }
  .header-nav a { font-size: 13px; padding: 4px 9px; }
  .chat-messages { padding: 24px 20px; }
  .msg { max-width: 80%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- 成分の注意 ---------- */
.pick-caution-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--warn-text);
  margin-top: 14px;
}
.pick-caution { font-size: 14px; line-height: 1.7; margin: 4px 0 0; color: var(--warn-text); }
.product-caution {
  font-size: 13px;
  line-height: 1.6;
  color: var(--warn-text);
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: 4px;
  padding: 8px 10px;
  margin-top: 10px;
}

/* ---------- 保存用サマリー ---------- */
.summary-card {
  background: var(--surface);
  border: 1px solid var(--line-dark);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 18px;
  margin-top: 12px;
}
.summary-head { font-size: 11px; font-weight: 700; letter-spacing: 0.24em; color: var(--accent); }
.summary-type { font-size: 20px; font-weight: 800; color: var(--ink); line-height: 1.5; margin-top: 6px; }
.summary-meta { font-size: 13px; color: var(--muted); margin-top: 4px; }
.summary-cols { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 14px; }
.summary-col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  margin-bottom: 8px;
}
.summary-col ol { list-style: none; counter-reset: step; }
.summary-col li {
  counter-increment: step;
  font-size: 13.5px;
  line-height: 1.6;
  padding: 5px 0 5px 26px;
  position: relative;
}
.summary-col li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 5px;
  width: 18px;
  height: 18px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: 11px;
  line-height: 17px;
  text-align: center;
  color: var(--ink);
}
.summary-total { font-weight: 700; font-size: 14.5px; color: var(--ink); margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.summary-note { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
@media (min-width: 640px) {
  .summary-cols { grid-template-columns: 1fr 1fr; }
}
