:root {
  --bg: #f6f4ee;
  --surface: #ffffff;
  --ink: #1f2a24;
  --muted: #5d6b63;
  --line: #e2ded3;
  --primary: #2f6b4f;
  --primary-ink: #ffffff;
  --primary-soft: #e3efe7;
  --accent: #b8731f;
  --accent-soft: #fbefd9;
  --ai: #6b4fa8;
  --ai-soft: #efeaf8;
  --warn: #a8442f;
  --warn-soft: #f9e6e1;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(31, 42, 36, 0.06), 0 6px 20px rgba(31, 42, 36, 0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans JP", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}
button { font: inherit; cursor: pointer; }

/* 架空の表示（常に出す） */
.fiction {
  background: var(--accent-soft);
  color: #6d4512;
  font-size: 12px;
  text-align: center;
  padding: 4px 16px;
  border-bottom: 1px solid #efd9b4;
}

header.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246, 244, 238, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 16px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; white-space: nowrap; }
.brand .logo { width: 28px; height: 28px; border-radius: 8px; background: var(--primary); display: grid; place-items: center; }
.brand small { font-weight: 400; color: var(--muted); font-size: 12px; }
.play {
  margin-left: auto; border: 0; border-radius: 999px;
  background: var(--primary); color: var(--primary-ink);
  padding: 7px 14px; font-size: 13px; font-weight: 700; white-space: nowrap;
}
.play[aria-pressed="true"] { background: var(--ink); }

nav.steps {
  max-width: 1120px; margin: 0 auto;
  display: flex; gap: 6px; overflow-x: auto;
  padding: 0 16px 10px; scrollbar-width: none;
}
nav.steps::-webkit-scrollbar { display: none; }
nav.steps button {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--muted);
}
nav.steps button .n { font-weight: 700; margin-right: 4px; color: var(--primary); }
nav.steps button[aria-current="step"] { background: var(--primary); border-color: var(--primary); color: #fff; }
nav.steps button[aria-current="step"] .n { color: #fff; }

main { max-width: 1120px; margin: 0 auto; padding: 24px 16px 140px; }
.screen-title { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.screen-lead { color: var(--muted); margin: 0 0 20px; }

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.side { grid-template-columns: 1.2fr 1fr; }
@media (max-width: 820px) { .grid.two, .grid.side { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.card h3 { margin: 0 0 10px; font-size: 15px; }
.label { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; border-radius: 999px; padding: 2px 10px; background: var(--primary-soft); color: var(--primary); font-weight: 700; white-space: nowrap; }
.chip.ai { background: var(--ai-soft); color: var(--ai); }
.chip.accent { background: var(--accent-soft); color: #8a5512; }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.gray { background: #eeece6; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: 10px; }

/* ホーム */
.hero { display: grid; gap: 24px; grid-template-columns: 1.1fr 1fr; align-items: center; padding: 16px 0 8px; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(26px, 4.4vw, 40px); line-height: 1.35; margin: 0 0 14px; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero p { color: var(--muted); margin: 0 0 18px; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 16px; font-weight: 700; }
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.flow { display: grid; gap: 8px; }
.flow .f { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.flow .f b { width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: 13px; flex: 0 0 auto; }

/* メール */
.mail { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mail .head { background: #faf9f5; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.mail .body { padding: 14px; white-space: pre-wrap; }
.masked { display: inline-block; background: #e9e6dd; color: transparent; border-radius: 4px; user-select: none; }
.sep { display: flex; flex-direction: column; gap: 8px; }
.sep .item { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 10px; background: #faf9f5; border: 1px dashed var(--line); font-size: 13px; }
.arrow { text-align: center; color: var(--muted); font-size: 13px; }

.para { padding: 10px 12px; border-radius: 10px; margin-bottom: 8px; }
.para.fixed { background: #f3f1ea; }
.para.ai { background: var(--ai-soft); border-left: 3px solid var(--ai); }
.approve { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* 希望分析 */
.wish { display: grid; grid-template-columns: 120px 1fr auto; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.wish:last-child { border-bottom: 0; }
.wish .k { color: var(--muted); font-size: 13px; }
.wish .v { font-weight: 700; }
.wish .basis { grid-column: 2 / 4; font-size: 12px; color: var(--muted); }
@media (max-width: 520px) { .wish { grid-template-columns: 1fr auto; } .wish .k { grid-column: 1 / 3; } .wish .basis { grid-column: 1 / 3; } }

/* 追客リスト */
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.list td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr.hot td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.list-wrap { overflow-x: auto; }
@media (max-width: 640px) {
  table.list thead { display: none; }
  table.list, table.list tbody, table.list tr, table.list td { display: block; width: 100%; }
  table.list tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.list td { border: 0; padding: 2px 10px; }
}

/* 現地レポート */
.map-wrap svg { width: 100%; height: auto; display: block; border-radius: 12px; }
.pin-label { font-size: 11px; font-weight: 700; fill: #fff; }
.note { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.note:last-child { border-bottom: 0; }
.note .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--primary-soft); display: grid; place-items: center; color: var(--primary); }
.note .meta { font-size: 12px; color: var(--muted); }
.note .t { font-weight: 700; }
.foryou { margin-top: 6px; padding: 8px 10px; background: var(--ai-soft); border-radius: 8px; font-size: 14px; }
.foryou b { color: var(--ai); font-size: 12px; margin-right: 6px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: #fff; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--ai); color: #fff; }
.report-head { background: linear-gradient(0deg, transparent, transparent), var(--surface); }
.report-head h4 { margin: 6px 0 2px; font-size: 17px; line-height: 1.5; }
.photo { aspect-ratio: 4 / 3; border-radius: 10px; background: repeating-linear-gradient(45deg, #efece4, #efece4 10px, #f6f4ee 10px, #f6f4ee 20px); display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; padding: 8px; }
.phone { max-width: 300px; margin: 0 auto; border: 8px solid #1f2a24; border-radius: 30px; padding: 16px 14px; background: #fff; }
.phone .f { border-bottom: 1px solid var(--line); padding: 8px 0; font-size: 13px; }
.phone .f .label { display: block; }
.disclaimer { font-size: 12px; color: var(--muted); margin-top: 10px; }

/* 今日やること */
.todo { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.todo:last-child { border-bottom: 0; }
.todo .time { font-weight: 700; color: var(--accent); font-size: 13px; }
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl { position: relative; padding: 0 0 14px; }
.tl::before { content: ""; position: absolute; left: -20px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--primary); }
.tl.done::before { background: var(--primary); }
.tl .d { font-size: 12px; color: var(--muted); }
.draft { white-space: pre-wrap; background: #faf9f5; border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 14px; }

/* 仕組み */
table.ba { width: 100%; border-collapse: collapse; font-size: 14px; }
table.ba th, table.ba td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.ba th { font-size: 12px; color: var(--muted); }
table.ba td.after { color: var(--primary); font-weight: 700; }
.diagram .scroll { overflow-x: auto; }
.diagram svg { width: 100%; min-width: 560px; height: auto; display: block; }

/* 自動再生の字幕 */
.caption {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  width: min(760px, calc(100% - 32px));
  background: rgba(31, 42, 36, 0.92); color: #fff;
  border-radius: 14px; padding: 12px 18px; font-size: 16px; line-height: 1.6;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  display: none; z-index: 40;
}
.caption.on { display: block; }
.caption .bar { height: 3px; background: rgba(255,255,255,.2); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.caption .bar i { display: block; height: 100%; width: 0; background: #f2c879; }
.flash { animation: flash 1.2s ease; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(107,79,168,.45); } 100% { box-shadow: 0 0 0 14px rgba(107,79,168,0); } }

footer.foot { max-width: 1120px; margin: 0 auto; padding: 0 16px 24px; font-size: 12px; color: var(--muted); }

/* スマホの幅が狭いとき、見出しの副題を隠して横はみ出しを防ぐ */
@media (max-width: 430px) {
  .brand small { display: none; }
  .top-inner { gap: 8px; }
}
.demo-note { color: var(--accent); margin: 8px 0 0; min-height: 0; }
.demo-note:empty { display: none; }
#screen:focus { outline: none; }
/* 動きを減らす設定の人には、強調の動きを出さない */
@media (prefers-reduced-motion: reduce) {
  .flash { animation: none; }
  html { scroll-behavior: auto; }
}
