/* Apple Human Interface Guidelines に沿った共通の土台（lp.css と同じ色の考え方） */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --accent: #0071e3;
  --accent-text: #ffffff;
  --note-bg: #f5f5f7;
  --error: #d70015;
  --radius: 12px;
  --serif: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1d1d1f;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --line: #38383a;
    --accent: #0a84ff;
    --accent-text: #ffffff;
    --note-bg: #1d1d1f;
    --error: #ff6961;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }

header.site {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
header.site .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 16px; padding-top: 14px; padding-bottom: 14px;
}
header.site .name { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; color: var(--text); letter-spacing: 0.04em; }
header.site .name::before { content: "F"; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: var(--accent); color: #fff; font: 700 18px/1 sans-serif; }
header.site nav { display: flex; gap: 16px; font-size: 14px; }
header.site nav a { color: var(--muted); text-decoration: none; }
header.site nav a:hover { color: var(--text); }

main { padding: 32px 0 56px; }

h1 { font-weight: 700; font-size: 1.9rem; line-height: 1.3; margin: 0 0 16px; }
h2 { font-weight: 700; font-size: 1.35rem; line-height: 1.4; margin: 40px 0 12px; }
h3 { font-size: 1.02rem; margin: 24px 0 8px; }
p, ul, ol, table { margin: 0 0 16px; }
.lead { font-size: 1.05rem; color: var(--muted); }
.muted { color: var(--muted); font-size: 0.92rem; }

.note {
  background: var(--note-bg);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.95rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 36px; margin-bottom: 10px; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 2px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: var(--accent-text);
  font-size: 13px; font-weight: 700; display: grid; place-items: center;
}

.badge {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.05em;
  border: 1px solid var(--accent); color: var(--accent);
  border-radius: 999px; padding: 0 10px; margin-bottom: 8px;
}

/* 回答ページ */
fieldset { border: 0; padding: 0; margin: 0 0 20px; }
legend { font-weight: 700; font-size: 1.1rem; margin-bottom: 12px; line-height: 1.6; }
.choice {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 8px; cursor: pointer; min-height: 48px;
}
.choice:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.choice input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.choice.stop { color: var(--muted); font-size: 0.95rem; }

label.field { display: block; font-weight: 600; margin-bottom: 6px; }
input[type="email"] {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
input[type="email"]:focus, .choice:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

button[type="submit"] {
  font: inherit; font-weight: 700; color: var(--accent-text); background: var(--accent);
  border: 0; border-radius: 980px; padding: 12px 28px; cursor: pointer; min-height: 48px;
}
button[type="submit"][disabled] { opacity: 0.6; cursor: wait; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.error { color: var(--error); font-weight: 600; }
[hidden] { display: none !important; }

footer.site { border-top: 1px solid var(--line); background: var(--note-bg); padding: 20px 0 32px; font-size: 12px; color: var(--muted); }
footer.site a { color: var(--muted); }

.tight { margin-bottom: 8px; }
.spaced { margin-top: 16px; }
h2.plain { border: 0; margin-top: 0; padding-top: 0; }

/* 回答ページ（タップで回答） */
.reply-page main { padding-top: 28px; }
.eyebrow { color: var(--muted); font-size: 0.9rem; font-weight: 600; letter-spacing: 0.04em; margin-bottom: 8px; }
.question { font-size: 1.35rem; line-height: 1.6; margin-bottom: 24px; }

.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.pick {
  font: inherit; font-size: 1.35rem; font-weight: 700; letter-spacing: 0.04em;
  color: var(--text); background: var(--surface);
  border: 2px solid var(--line); border-radius: 14px;
  min-height: 96px; padding: 12px; cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.pick:hover { border-color: var(--accent); }
.pick:active { transform: scale(0.98); }
.pick:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pick.is-active { border-color: var(--accent); background: var(--note-bg); font-size: 1rem; }
.pick[disabled] { cursor: wait; }
.pick[disabled]:not(.is-active) { opacity: 0.45; }

.pick-secondary { display: grid; margin-bottom: 16px; }
.pick-sub { font-size: 1.05rem; font-weight: 600; min-height: 56px; border-width: 1px; border-radius: 12px; }

.pick-hint { color: var(--muted); font-size: 0.88rem; margin-bottom: 20px; }

.link-button {
  font: inherit; font-size: 0.92rem; color: var(--muted); background: none; border: 0;
  padding: 8px 0; text-decoration: underline; cursor: pointer; min-height: 44px;
}
.link-button:hover { color: var(--text); }
.stop-line { margin: 0; display: flex; flex-wrap: wrap; gap: 0 20px; }
.change-line { margin: 0 0 12px; }
.change-note { margin-bottom: 16px; }

.received { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; font-weight: 700; margin-bottom: 16px; }
.check {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--accent); color: var(--accent-text);
  display: grid; place-items: center; font-size: 18px;
}
#email { margin-bottom: 12px; }
.email-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
#email-submit {
  font: inherit; font-weight: 700; color: var(--accent-text); background: var(--accent);
  border: 0; border-radius: 980px; padding: 12px 28px; cursor: pointer; min-height: 48px;
}
#email-submit[disabled] { opacity: 0.6; cursor: wait; }

/* 追加の質問（選ぶだけ） */
.fq { border: 0; padding: 0; margin: 0 0 20px; }
.fq legend { font-weight: 700; font-size: 1rem; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: 0.95rem; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; min-height: 44px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-text); font-weight: 700; }
.chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; resize: vertical;
}
textarea:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
#details-submit {
  font: inherit; font-weight: 700; color: var(--accent-text); background: var(--accent);
  border: 0; border-radius: 980px; padding: 12px 28px; cursor: pointer; min-height: 48px;
}
#details-submit[disabled] { opacity: 0.6; cursor: wait; }

@media (prefers-reduced-motion: reduce) {
  .pick { transition: none; }
  .pick:active { transform: none; }
}

/* 希望者向けの別の入口：15分の相談 */
.talk { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; }
.button-secondary {
  font: inherit; font-weight: 700; color: var(--accent); background: transparent;
  border: 1px solid var(--accent); border-radius: 980px; padding: 10px 22px; cursor: pointer; min-height: 48px;
}
.button-secondary[disabled] { opacity: 0.6; cursor: wait; }
.skip-line { margin: 16px 0 0; }

/* AIの簡易診断 */
.ai-entry { border-color: var(--accent); }
.ai-entry a { font-weight: 600; }
.ai-warning { margin-bottom: 16px; }
input[type="file"] { display: block; margin-bottom: 8px; font: inherit; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.thumbs img { width: 96px; height: 72px; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; }
.agree { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; margin: 8px 0 8px; }
.agree input { width: 18px; height: 18px; margin-top: 4px; flex: none; accent-color: var(--accent); }
.plain-h3 { margin: 0 0 8px; font-size: 1rem; }
.air-list { margin: 16px 0 0; }
.air-list h4 { margin: 0 0 6px; font-size: .95rem; }
.air-list ul { margin: 0 0 8px; padding-left: 1.3em; }
.opp { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.opp-title { font-weight: 700; }
.fit { display: inline-block; font-size: 12px; font-weight: 700; border: 1px solid var(--accent); color: var(--accent); border-radius: 999px; padding: 0 8px; margin-left: 6px; }
.cta { border-color: var(--accent); background: var(--note-bg); }
#ai-submit[disabled] { opacity: 0.6; cursor: wait; }
#air-to-contact {
  font: inherit; font-weight: 700; color: var(--accent-text); background: var(--accent);
  border: 0; border-radius: 980px; padding: 12px 22px; cursor: pointer; min-height: 48px;
}

.air-reply { margin-bottom: 16px; }
#air-questions ul { margin: 0 0 12px; padding-left: 1.3em; }
#air-questions h4 { margin: 0 0 6px; font-size: .95rem; }

/* お手紙の回答ページ：HIGのグループ化した画面（灰色の背景に白い角丸のパネル） */
.reply-page {
  --bg: var(--bg2);
  --surface: var(--paper);
  --text: var(--ink);
  --muted: var(--sub);
  --line: var(--rule);
  --accent: var(--action);
  --accent-text: #ffffff;
  --note-bg: var(--ok-bg);
  --radius: 12px;
  font-family: var(--font);
}
.reply-page .reply-header-label { color: var(--sub); font-size: 0.75rem; white-space: nowrap; }
.reply-page .reply-header .lp-nav { margin-left: auto; }
.reply-page main.wrap { padding-top: 32px; padding-bottom: 64px; }
.reply-page h1, .reply-page h2.plain, .reply-page .received { font-weight: 700; }
.reply-page .reply-panel, .reply-page .card { background: var(--paper); border: 0; border-radius: 18px; box-shadow: none; }
.reply-page .reply-panel { padding: 32px 32px 24px; }
.reply-page .card { padding: 26px 28px; }
.reply-page .eyebrow { color: var(--brand); font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; }
.reply-page .reply-intro { color: var(--sub); font-size: 0.92rem; margin: 0 0 20px; }
.reply-page .question { color: var(--ink); font-weight: 700; font-size: clamp(1.3rem, 3.6vw, 1.6rem); line-height: 1.5; margin: 0 0 28px; }
.reply-page .pick-grid { gap: 12px; }
.reply-page .pick { color: var(--ink); background: var(--bg2); border: 2px solid transparent; border-radius: 14px; min-height: 100px; }
.reply-page .pick:hover { border-color: var(--action); }
.reply-page .pick.is-active { border-color: var(--action); background: var(--ok-bg); }
.reply-page .pick-sub { min-height: 52px; color: var(--sub); background: var(--bg2); font-size: 0.98rem; border-radius: 12px; }
.reply-page .pick-hint { border-top: 1px solid var(--rule); padding-top: 14px; margin: 16px 0 8px; }
.reply-page .stop-line { margin-top: 0; }
.reply-page .link-button { color: var(--brand); text-decoration: none; }
.reply-page .link-button:hover { text-decoration: underline; }
.reply-page .received { color: var(--ink); font-size: 1.2rem; }
.reply-page .check { background: #34c759; }
.reply-page h2.plain { color: var(--ink); font-size: 1.35rem; margin-bottom: 12px; }
.reply-page label.field { color: var(--ink); }
.reply-page input[type="email"], .reply-page textarea { border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); min-height: 44px; }
.reply-page input[type="email"]:focus, .reply-page textarea:focus { outline: 3px solid rgba(0, 125, 250, 0.5); outline-offset: 0; border-color: var(--action); }
.reply-page .email-privacy { color: var(--sub); font-size: 0.78rem; line-height: 1.6; margin: 12px 0 0; }
.reply-page .email-privacy a { color: var(--brand); }
.reply-page button[type="submit"], .reply-page #email-submit, .reply-page #details-submit, .reply-page #air-to-contact, .reply-page .button-secondary { border-radius: 980px; }
.reply-page button[type="submit"], .reply-page #email-submit, .reply-page #details-submit, .reply-page #air-to-contact { background: var(--action); color: #ffffff; }
.reply-page button[type="submit"]:hover, .reply-page #email-submit:hover, .reply-page #details-submit:hover, .reply-page #air-to-contact:hover { background: var(--action-hover); }
.reply-page .button-secondary { color: var(--brand); background: var(--ok-bg); border: 0; }
.reply-page button:focus-visible, .reply-page a:focus-visible { outline: 3px solid rgba(0, 125, 250, 0.6); outline-offset: 2px; }
.reply-page .chip { border-radius: 980px; background: var(--bg2); border-color: transparent; }
.reply-page .chip[aria-pressed="true"] { background: var(--action); border-color: var(--action); }
.reply-page .note { border-radius: 12px; background: var(--bg2); }
.reply-page .reply-data-note { color: var(--sub); font-size: 0.78rem; margin: 28px 0 0; padding: 0 4px; }
.reply-page .reply-footer-inner { display: flex; justify-content: space-between; gap: 24px; }
.reply-page .reply-footer-inner nav { display: flex; flex-direction: column; gap: 4px; flex: none; }
.reply-page .reply-footer-inner p { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .reply-page { font-size: 16px; }
  .reply-page main.wrap { padding-top: 16px; padding-bottom: 44px; }
  .reply-page .reply-panel { padding: 22px 18px 18px; }
  .reply-page .card { padding: 22px 18px; }
  .reply-page .reply-intro { margin-bottom: 14px; }
  .reply-page .question { margin-bottom: 20px; }
  .reply-page .pick-grid { gap: 8px; }
  .reply-page .pick { min-height: 88px; }
  .reply-page .pick-sub { min-height: 48px; }
  .reply-page .email-actions { align-items: stretch; }
  .reply-page #email-submit, .reply-page #talk-submit { width: 100%; }
  .reply-page .reply-footer-inner { flex-direction: column; }
  .reply-page .reply-footer-inner nav { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; }
}
@media (max-width: 360px) {
  .reply-page .reply-header-label { display: none; }
}
@media (prefers-color-scheme: dark) {
  .reply-page .pick, .reply-page .pick-sub, .reply-page .chip, .reply-page .note { background: #2c2c2e; }
}

/* 回答ページの「動く見本」（assets/demo.js）。左に実際の画面、右にAIの作業記録。データは架空 */
.demo { background: var(--bg2, var(--note-bg)); border-radius: 16px; padding: 14px; margin: 0 0 24px; }
.demo-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 10px; }
.demo-title { margin: 0; font-weight: 700; font-size: 1rem; line-height: 1.5; color: var(--ink, var(--text)); }
.demo-badge { font-size: .7rem; color: var(--sub, var(--muted)); border: 1px solid var(--rule, var(--line)); border-radius: 999px; padding: 2px 8px; }
.demo-stage { display: grid; grid-template-columns: 1.35fr 1fr; gap: 10px; }
.demo-screen { position: relative; height: 300px; background: #fff; color: #1d1d1f; border: 1px solid #d2d2d7; border-radius: 10px; overflow: hidden; font-size: .76rem; line-height: 1.55; }
.demo-bar { display: flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px; background: #f2f2f4; border-bottom: 1px solid #e3e3e8; }
.demo-bar-dots { width: 34px; height: 8px; background: radial-gradient(circle, #ff5f57 3.5px, transparent 4px) 0 0/12px 8px repeat-x; flex: none; }
.demo-bar-name { font-size: .7rem; font-weight: 700; color: #6e6e73; }
.demo-scene { position: absolute; top: 26px; right: 0; bottom: 0; left: 0; padding: 10px; opacity: 0; visibility: hidden; transition: opacity .45s; overflow: hidden; }
.demo-scene.is-cur { opacity: 1; visibility: visible; }
.demo-screen mark { background: transparent; color: inherit; border-radius: 3px; transition: background-color .35s, box-shadow .35s; }
.demo-screen mark.is-on { background: rgba(0, 113, 227, .16); box-shadow: 0 0 0 1.5px rgba(0, 113, 227, .55); }
/* メール */
.dm-mail-row { position: relative; padding: 5px 8px 5px 16px; border-bottom: 1px solid #eee; color: #6e6e73; }
.dm-mail-row b { color: #1d1d1f; font-weight: 600; }
.dm-mail-row.is-unread b { font-weight: 800; }
.dm-dot { position: absolute; left: 5px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: #0071e3; }
.dm-time { float: right; font-size: .68rem; }
.dm-subj { font-size: .72rem; }
.dm-mail-row.is-unread.is-on { background: rgba(0, 113, 227, .08); }
.dm-mail-open { margin-top: 8px; border: 1px solid #e3e3e8; border-radius: 6px; padding: 6px 8px; opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s; }
.dm-mail-open.is-on { opacity: 1; transform: none; }
.dm-mail-h { border-bottom: 1px solid #eee; padding-bottom: 4px; margin-bottom: 4px; font-size: .7rem; }
.dm-mail-h span { display: inline-block; width: 3.2em; color: #6e6e73; }
.dm-mail-b { font-size: .74rem; }
/* Excel風の表 */
.dm-sheet-tabs { display: flex; gap: 2px; margin-bottom: 6px; font-size: .68rem; }
.dm-sheet-tabs span { padding: 2px 8px; background: #eef0f3; border-radius: 4px 4px 0 0; color: #6e6e73; }
.dm-sheet-tabs .is-cur { background: #1d6f42; color: #fff; }
.demo-screen table { width: 100%; border-collapse: collapse; font-size: .68rem; }
.demo-screen th, .demo-screen td { border: 1px solid #d9dce1; padding: 3px 4px; text-align: left; white-space: nowrap; }
.demo-screen th { background: #f3f5f7; font-weight: 600; color: #444; }
.dm-new { opacity: 0; transition: opacity .4s, background-color .6s; }
.dm-new.is-on { opacity: 1; background: #e7f4ec; }
.dm-pick.is-on { background: rgba(0, 113, 227, .12); }
.dm-warn-cell.is-on { background: #fff1d6; color: #b25000; font-weight: 700; }
/* 書類 */
.dm-doc { border: 1px solid #d9dce1; border-radius: 4px; padding: 8px 10px; background: #fcfcfd; }
.dm-doc-t { margin: 0 0 6px; font-weight: 800; text-align: center; letter-spacing: .1em; font-size: .8rem; }
.dm-doc dl { display: grid; grid-template-columns: 5.5em 1fr; gap: 4px 6px; margin: 0; }
.dm-doc dt { color: #6e6e73; }
.dm-doc dd { margin: 0; border-bottom: 1px solid #e3e3e8; min-height: 1.4em; color: transparent; transition: color .35s; }
.dm-doc dd.is-on { color: #1d1d1f; }
.dm-doc-n { margin: 6px 0 0; font-size: .66rem; color: #6e6e73; }
.dm-form tr[data-k] td, .dm-doc-n[data-k] { color: transparent; transition: color .35s; }
.dm-form tr[data-k].is-on td, .dm-doc-n[data-k].is-on { color: #1d1d1f; }
/* 確認画面 */
.dm-ok-h { margin: 0 0 6px; font-weight: 800; font-size: .78rem; }
.dm-ok-card { border: 1px solid #d9dce1; border-radius: 8px; padding: 8px 10px; }
.dm-ok-sub { margin: 6px 0 2px; font-size: .68rem; color: #6e6e73; }
.dm-ok-mail { margin: 0 0 8px; padding: 6px 8px; background: #f5f5f7; border-radius: 6px; }
.dm-ok-warn { margin: 6px 0 8px; padding: 5px 8px; background: #fff1d6; color: #b25000; border-radius: 6px; font-weight: 700; }
.dm-btn { display: inline-block; padding: 5px 12px; border-radius: 999px; background: #0071e3; color: #fff; font-weight: 700; transition: transform .15s, background-color .3s; }
.dm-btn.is-on { transform: scale(.94); background: #1f8f3a; }
.dm-ok-done { margin: 6px 0 0; color: #1f8f3a; font-weight: 700; opacity: 0; transition: opacity .4s; }
.dm-ok-done.is-on { opacity: 1; }
/* チャット */
.dm-chat-h { margin: 0 0 6px; font-weight: 800; color: #6e6e73; }
.dm-msg { padding: 6px 8px; border-radius: 6px; margin-bottom: 6px; }
.dm-msg p { margin: 2px 0 0; }
.dm-msg[data-k] { opacity: 0; transition: opacity .4s, background-color .4s; }
.dm-msg[data-k].is-on { opacity: 1; background: rgba(0, 113, 227, .06); }
/* AIの作業記録 */
.demo-ai { background: #0b2545; color: #e8eef6; border-radius: 10px; padding: 10px 12px; height: 300px; overflow: hidden; }
.demo-ai-h { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: .75rem; font-weight: 700; color: #b9c8dc; }
.demo-ai-icon { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: #3b82f6; color: #fff; font-size: .6rem; font-weight: 800; }
.demo-log { list-style: none; margin: 0; padding: 0; font-size: .76rem; line-height: 1.5; }
.demo-log li { position: relative; padding: 0 0 7px 16px; color: #c9d6e6; animation: demo-in .35s ease-out; }
.demo-log li::before { content: "✓"; position: absolute; left: 0; color: #4ade80; font-weight: 800; }
.demo-log li.is-doing { color: #fff; font-weight: 700; }
.demo-log li.is-doing::before { content: "●"; color: #60a5fa; animation: demo-blink 1s infinite; }
@keyframes demo-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes demo-blink { 50% { opacity: .25; } }
.demo-foot { margin-top: 8px; }
.demo-end { margin: 0; min-height: 1.5em; font-weight: 700; color: #1f8f3a; font-size: .9rem; }
.demo-note { margin: 4px 0 0; font-size: .7rem; color: var(--sub, var(--muted)); line-height: 1.5; }
.demo-again { font-size: .85rem; }
@media (prefers-color-scheme: dark) { .demo-end { color: #30d158; } }
/* スマホ：画面を上、AIの作業記録を下に。高さを抑えて質問が下に行きすぎないように */
@media (max-width: 560px) {
  .demo { padding: 10px; }
  .demo-title { font-size: .9rem; }
  .demo-stage { grid-template-columns: 1fr; gap: 8px; }
  .demo-screen { height: 272px; }
  .demo-ai { height: 128px; padding: 8px 10px; }
  .demo-log li { padding-bottom: 4px; font-size: .72rem; }
  .demo-log li:not(:nth-last-child(-n+3)) { display: none; }
}
/* メールを開いたら、受信一覧を隠して本文を見せる（メールアプリと同じ） */
.dm-mail.is-open .dm-mail-list { display: none; } /* :has は古いiPhoneで効かないため、demo.js が is-open を付ける */
.dm-mail.is-open .dm-mail-open { margin-top: 0; }
/* 受注の見本：入口の印・FAX・LINE */
.dm-ch { display: inline-block; font-size: .6rem; font-weight: 800; padding: 0 5px; margin-right: 5px; border-radius: 4px; background: #e8f0fe; color: #1a56c4; vertical-align: 1px; }
.dm-ch.is-fax { background: #f1f1f3; color: #555; }
.dm-ch.is-line { background: #e3f7e8; color: #06873a; }
.dm-mail-row[data-k] { opacity: 0; transition: opacity .35s; }
.dm-mail-row[data-k].is-on { opacity: 1; }
.dm-fax { background: #f7f6f2; border: 1px solid #d6d3c9; padding: 10px 12px; transform: rotate(-.6deg); font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; filter: contrast(1.05); }
.dm-fax-t { margin: 0; text-align: center; font-weight: 800; letter-spacing: .3em; font-size: .9rem; }
.dm-fax-to { margin: 4px 0 6px; font-size: .7rem; color: #444; }
.dm-fax table td { font-size: .8rem; height: 1.8em; }
.dm-fax-n { margin: 6px 0 0; font-size: .64rem; color: #888; font-family: inherit; }
.dm-line { background: #8cabd8; margin: -10px; height: calc(100% + 20px); padding: 10px; }
.dm-line-h { margin: 0 0 8px; color: #fff; font-weight: 700; font-size: .75rem; }
.dm-line-b { display: inline-block; margin: 0; padding: 7px 10px; background: #fff; border-radius: 12px 12px 12px 2px; max-width: 85%; }
.dm-line-ai { margin: 10px 0 0; padding: 6px 9px; background: #0b2545; color: #e8eef6; border-radius: 8px; font-size: .72rem; opacity: 0; transition: opacity .4s; }
.dm-line-ai.is-on { opacity: 1; }
/* 動く見本の「これは何？」 */
.demo-what { background: var(--paper, var(--surface)); border-left: 4px solid var(--action, var(--accent)); border-radius: 8px; padding: 8px 12px; margin: 0 0 10px; }
.demo-what-h { margin: 0 0 2px; font-size: .75rem; font-weight: 800; color: var(--action, var(--accent)); }
.demo-what-t { margin: 0; font-size: .85rem; line-height: 1.6; color: var(--ink, var(--text)); }
/* スマホ：表は折り返して枠に収める。確認画面の余白を詰める */
@media (max-width: 560px) {
  .demo-screen th, .demo-screen td { white-space: normal; padding: 2px 3px; font-size: .62rem; }
  .dm-ok-h { margin-bottom: 4px; }
  .dm-ok-card { padding: 6px 8px; }
  .dm-ok-warn { margin: 4px 0 6px; padding: 4px 8px; }
  .dm-ok-done { margin-top: 4px; }
}
/* 「ある」のときの次の一歩は30分の無料相談だけなので、相談のボタンを主ボタンにする */
.reply-page #talk-submit { background: var(--action); color: #ffffff; border-radius: 980px; margin-top: 12px; }
.reply-page #talk-submit:hover { background: var(--action-hover); }

/* 第6弾から：相談の入り口（AI・メール・面談）とAIとの会話 */
.consult-ways { display: grid; gap: 12px; margin: 16px 0; }
.consult-way { display: block; width: 100%; text-align: left; padding: 16px 18px; border: 2px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--text); cursor: pointer; font: inherit; }
.consult-way:hover { border-color: var(--accent); }
.consult-way:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.consult-way .way-title { display: block; font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.consult-way .way-text { display: block; color: var(--muted); font-size: .92rem; line-height: 1.6; }
.chat-log { display: grid; gap: 10px; margin: 16px 0; }
.chat-bubble { max-width: 92%; padding: 10px 14px; border-radius: 14px; line-height: 1.7; }
.chat-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-bubble .chat-who { display: block; font-size: .78rem; color: var(--muted); margin-bottom: 2px; }
.chat-bubble.from-ai { background: var(--note-bg); justify-self: start; }
.chat-bubble.from-you { border: 1px solid var(--line); justify-self: end; }
.chat-log > .card { margin: 4px 0; }
.chat-old-summary summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.chat-old-summary h4 { margin: 10px 0 2px; font-size: .9rem; }
.chat-old-summary p, .chat-old-summary ol { margin: 0 0 6px; color: var(--muted); }
.chat-wait p { color: var(--muted); }
.chat-dots { display: inline-flex; gap: 4px; margin-top: 6px; }
.chat-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); opacity: .3; animation: chat-dot 1.2s infinite; }
.chat-dots i:nth-child(2) { animation-delay: .2s; }
.chat-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes chat-dot { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .chat-dots i { animation: none; opacity: .6; } }
#chat-contact-bottom { margin-top: 12px; }
.chat-summary h4 { margin: 14px 0 4px; font-size: .95rem; }
.chat-summary ul { margin: 0 0 8px; padding-left: 1.3em; }
#step-contact input[type="text"], #step-contact input[type="tel"], #step-contact input[type="email"] { margin-bottom: 4px; }
#step-contact input[type="text"], #step-contact input[type="tel"] {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px;
}
.reply-page #step-contact input[type="text"], .reply-page #step-contact input[type="tel"] { border-color: var(--rule); border-radius: 10px; background: var(--paper); min-height: 44px; }
#chat-to-contact {
  font: inherit; font-weight: 700; color: #ffffff; background: var(--action, var(--accent));
  border: 0; border-radius: 980px; padding: 12px 28px; cursor: pointer; min-height: 48px;
}
#chat-to-contact:hover { background: var(--action-hover, var(--accent)); }
#step-contact .fq { margin: 8px 0 12px; }
.reply-page #ct-how .chip { background: #ffffff; border: 1px solid #c7c7cc; color: #1d1d1f; padding: 8px 16px; border-radius: 980px; }
.reply-page #ct-how .chip[aria-pressed="true"] { background: var(--action, var(--accent)); border-color: var(--action, var(--accent)); color: #ffffff; }
@media (prefers-color-scheme: dark) { .reply-page #ct-how .chip { background: #1d1d1f; border-color: #48484a; color: #f5f5f7; } }
.sum-steps { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 10px; }
.sum-steps li { border-left: 3px solid var(--line); padding: 4px 0 4px 12px; }
.sum-steps .step-label { display: block; font-size: .82rem; color: var(--muted); font-weight: 600; }
.sum-steps .step-title { display: block; margin: 2px 0; }
.sum-steps .step-detail { display: block; line-height: 1.7; }
.sum-steps li.step-ai { border-left-color: var(--action, var(--accent)); background: var(--note-bg); border-radius: 0 10px 10px 0; padding: 8px 10px 8px 12px; }
.sum-steps li.step-ai .step-label { color: var(--action, var(--accent)); }
