:root {
  --bg: #fff8ee;
  --card: #ffffff;
  --ink: #2a2420;
  --sub: #6b6058;
  --line: #eadfce;
  --red: #b3122e;      /* 主なボタン（白い文字） */
  --red-dark: #8f0e25;
  --gold: #c9a14a;     /* 線・飾りだけ */
  --soft: #fbefe0;
  --ok: #2f7d4f;
  --err: #b3261e;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  font-size: 16px; line-height: 1.7;
  word-break: auto-phrase; -webkit-text-size-adjust: 100%;
}
main { max-width: 480px; margin: 0 auto; padding: 16px 16px calc(32px + env(safe-area-inset-bottom)); }
h1, h2, h3 { line-height: 1.4; text-wrap: balance; margin: 0; }
h1 { font-size: 28px; letter-spacing: .02em; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0; }
.nb { display: inline-block; }
.sub { color: var(--sub); font-size: 14px; }
.lucide { display: inline-block; vertical-align: middle; flex: none; width: 20px; height: 20px; }
.loading { text-align: center; color: var(--sub); padding: 48px 0; }

.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* 見出し */
.brand { display: flex; align-items: center; gap: 8px; color: var(--red); font-weight: 600; font-size: 15px; }
.brand .lucide { color: var(--gold); }
.hero { padding: 8px 0 4px; border-bottom: 2px solid var(--gold); padding-bottom: 16px; }
.hero h1 { margin-top: 8px; }
.hero p { margin-top: 8px; color: var(--sub); }

/* カード */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 20px 8px; min-height: 140px; justify-content: center; cursor: pointer; font: inherit; color: inherit;
}
.choice .lucide { width: 36px; height: 36px; color: var(--red); }
.choice strong { font-size: 17px; }
.choice span { font-size: 13px; color: var(--sub); }
.choice:active, .choice[aria-pressed="true"] { border-color: var(--red); background: var(--soft); }

/* ボタン */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  min-height: 52px; padding: 0 20px; border-radius: 999px; border: 0; font: inherit; font-weight: 600; font-size: 17px;
  cursor: pointer; text-decoration: none;
}
.btn.block { display: flex; width: 100%; }
.btn.primary { background: var(--red); color: #fff; }
.btn.primary:active { background: var(--red-dark); }
.btn.primary:disabled { background: #d9c9c3; color: #fff; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); min-height: 44px; font-size: 15px; font-weight: 500; }
.btn.link { background: none; color: var(--sub); min-height: 40px; font-weight: 500; font-size: 14px; padding: 0 8px; }
.back { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; color: var(--sub); font: inherit; font-size: 14px; min-height: 40px; padding: 0; cursor: pointer; }

/* 写真 */
.photo {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  width: 100%; aspect-ratio: 4 / 3; border: 2px dashed var(--gold); border-radius: var(--radius);
  background: var(--card); color: var(--sub); cursor: pointer; font: inherit; overflow: hidden; padding: 0;
}
.photo .lucide { width: 36px; height: 36px; color: var(--red); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.has { border-style: solid; border-color: var(--line); }

/* 切りかえ */
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); border-radius: 999px; padding: 4px; }
.seg button { min-height: 40px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 15px; color: var(--sub); cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* 型 */
.tpl-list { display: grid; gap: 8px; }
.tpl {
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 56px;
  font: inherit; color: inherit; cursor: pointer;
}
.tpl .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; }
.tpl[aria-pressed="true"] { border-color: var(--red); background: var(--soft); }
.tpl[aria-pressed="true"] .dot { border-color: var(--red); background: var(--red); }
.tpl[aria-pressed="true"] .dot::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.tpl strong { display: block; font-size: 16px; }
.tpl span { display: block; font-size: 13px; color: var(--sub); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.chip[aria-pressed="true"] { border-color: var(--red); color: var(--red); font-weight: 600; background: var(--soft); }

/* 了解のチェック */
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--red); flex: none; }

/* 待ち */
.wait { text-align: center; padding: 40px 8px; }
.spin { width: 48px; height: 48px; color: var(--red); animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.wait h2 { margin-top: 16px; }
.wait p { margin-top: 8px; color: var(--sub); }
.elapsed { font-variant-numeric: tabular-nums; }

/* 結果 */
.result-media { width: 100%; border-radius: var(--radius); background: #000; display: block; }
img.result-media { background: var(--card); }
.meta { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--sub); flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 13px; padding: 2px 10px; border-radius: 999px; background: var(--soft); color: var(--ink); }

/* お知らせ */
.note { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px; background: var(--soft); }
.note.err { background: #fdecea; color: var(--err); }
.note .lucide { margin-top: 2px; }

/* 購入 */
.sheet-back { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: flex-end; justify-content: center; z-index: 10; }
.sheet { background: var(--bg); width: 100%; max-width: 480px; border-radius: 20px 20px 0 0; padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; cursor: pointer; color: var(--sub); border-radius: 50%; }
.plan { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 14px 16px; font: inherit; color: inherit; cursor: pointer; min-height: 60px; }
.plan[aria-pressed="true"] { border-color: var(--red); background: var(--soft); }
.plan .price { font-weight: 600; font-size: 18px; white-space: nowrap; }
.plan .per { font-size: 13px; color: var(--sub); white-space: nowrap; }

/* これまでの動画 */
.list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.thumb { position: relative; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: var(--soft); border: 0; padding: 0; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .lucide { position: absolute; inset: 0; margin: auto; width: 28px; height: 28px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.thumb .state { position: absolute; left: 6px; bottom: 6px; font-size: 11px; background: rgba(255,255,255,.9); padding: 1px 6px; border-radius: 999px; }

.sample { aspect-ratio: 16 / 10; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--sub); font-size: 14px; text-align: center; padding: 16px; }
.sample .lucide { width: 32px; height: 32px; color: var(--gold); }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lang { font-size: 13px; color: var(--sub); }
.lang a { color: inherit; }
footer { margin-top: 32px; font-size: 12px; color: var(--sub); text-align: center; }
footer a { color: inherit; }

/* 紹介ページ・案内ページ */
.center { text-align: center; }
main.center { padding-top: 48px; }
main.center .btn { margin-top: 8px; }
.h-page { font-size: 22px; }
.sample span { color: var(--sub); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 8px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 24px; height: 24px; margin: 0 auto; border-radius: 50%; background: var(--red); color: #fff; font-size: 13px; font-weight: 600; }
.steps strong { font-size: 15px; white-space: nowrap; }
.steps span { font-size: 12px; color: var(--sub); line-height: 1.5; }
.prices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.prices .card { padding: 12px 8px; text-align: center; }
.prices .price { font-size: 20px; font-weight: 600; white-space: nowrap; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 600; font-size: 15px; }
details p { padding: 0 0 14px; font-size: 14px; }
.hero .brand { color: var(--red); }

/* 規約などの文書ページ */
.doc h2 { font-size: 17px; margin-top: 28px; }
.doc ol, .doc ul { padding-left: 1.4em; margin: 8px 0 0; }
.doc li + li { margin-top: 6px; }
.doc a { color: var(--red); }
.brand a { color: inherit; text-decoration: none; }
.todo { background: #fff3cd; padding: 0 4px; border-radius: 4px; }
table.law { width: 100%; border-collapse: collapse; font-size: 14px; }
table.law th, table.law td { border-top: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: top; }
table.law th { width: 34%; white-space: nowrap; font-weight: 600; background: var(--soft); }
@media (max-width: 400px) { table.law th { white-space: normal; } }
