@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@500;800&family=Noto+Sans+JP:wght@400;500;700&display=swap');

:root {
  --bg: #f4f1fb;
  --paper: #ffffff;
  --ink: #221a3a;
  --muted: #625a7c;
  --line: #e2dcf2;
  --stage: #1b1532;
  --pink: #f0386f;
  --pink-ink: #c21f53;
  --mint: #12a99d;
  --round: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", sans-serif;
  --sans: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.8 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--pink-ink); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* ---------- ヘッダー ---------- */
.site-head { padding: 18px 0; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { font: 800 20px/1 var(--round); color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.logo-mark { width: 28px; height: 28px; border-radius: 9px; background: var(--stage); position: relative; }
.logo-mark::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 3px var(--bg); }
.site-head nav { display: flex; gap: 20px; font-size: 15px; }
.site-head nav a { color: var(--muted); text-decoration: none; }
.site-head nav a:hover { color: var(--ink); }

/* ---------- ヒーロー ---------- */
.hero { padding: 32px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1fr auto; gap: 56px; align-items: center; }
.hero h1 {
  font: 800 clamp(34px, 5.4vw, 58px)/1.25 var(--round);
  letter-spacing: -.01em;
  margin: 0 0 22px;
  text-wrap: balance;
}
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 30em; margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 16px/1 var(--sans); text-decoration: none; cursor: pointer;
  border: 0; border-radius: 999px; padding: 16px 26px;
  transition: transform .15s, background .15s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--pink); color: #fff; }
.btn-primary:hover { background: var(--pink-ink); }
.btn-quiet { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn-quiet:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.btn[disabled] { opacity: .5; cursor: progress; }

/* 縦型の配信画面 */
.phone {
  width: 300px; aspect-ratio: 9 / 16; border-radius: 34px; position: relative; overflow: hidden;
  background:
    radial-gradient(120% 70% at 20% 85%, #6c3bd1 0%, transparent 60%),
    radial-gradient(90% 60% at 90% 20%, #d23e8a 0%, transparent 55%),
    radial-gradient(80% 50% at 60% 60%, #2a8fb0 0%, transparent 60%),
    var(--stage);
  box-shadow: 0 0 0 10px var(--stage), 0 30px 60px -20px rgba(34, 26, 58, .5);
  transform: rotate(2deg);
}
.phone::before { /* 配信者のシルエット */
  content: ""; position: absolute; left: 50%; bottom: -8%; width: 70%; aspect-ratio: 1;
  translate: -50% 0; border-radius: 50% 50% 0 0;
  background: radial-gradient(circle at 50% 28%, rgba(255,255,255,.22) 0 18%, transparent 18.5%),
              radial-gradient(ellipse 60% 55% at 50% 100%, rgba(255,255,255,.16) 0 60%, transparent 61%);
}
.phone .live-chip {
  position: absolute; top: 18px; right: 16px; z-index: 2;
  font: 800 11px/1 var(--sans); color: #fff; background: var(--pink); padding: 5px 8px; border-radius: 6px;
}
.phone iframe { position: absolute; top: 58px; left: 14px; border: 0; width: 210px; height: 380px; background: transparent; }

/* ---------- セクション共通 ---------- */
section { padding: 72px 0; }
.section-title { font: 800 30px/1.4 var(--round); margin: 0 0 12px; }
.section-lead { color: var(--muted); margin: 0 0 36px; max-width: 36em; }

/* ---------- 商品 ---------- */
#products { background: var(--paper); border-radius: 40px 40px 0 0; }
.product {
  display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start;
  padding: 32px 0; border-top: 1px solid var(--line);
}
.product:first-of-type { border-top: 0; padding-top: 0; }
.product-shot { background: var(--stage); border-radius: 22px; padding: 18px; }
.product-shot img { border-radius: 10px; width: 100%; }
.product h3 { font: 800 26px/1.4 var(--round); margin: 0 0 6px; }
.price { font: 800 30px/1 var(--round); color: var(--pink-ink); margin: 0 0 16px; }
.price small { font: 500 14px/1 var(--sans); color: var(--muted); margin-left: 6px; }
.product ul { margin: 16px 0 24px; padding-left: 1.2em; }
.product li { margin: 4px 0; }
.product li::marker { color: var(--mint); }
.add-btn[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.soon { color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.status-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--bg); color: var(--ink); font-size: 13px; font-weight: 800; }
.status-note { color: var(--muted); font-size: 14px; margin: 6px 0 0; }

/* ---------- 流れ（順番がある内容なので番号を付ける） ---------- */
#how { background: var(--paper); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-top: 56px; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font: 800 18px/1 var(--round); background: var(--stage); color: #fff;
}
.steps h3 { font: 800 19px/1.5 var(--round); margin: 0 0 6px; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- よくある質問 ---------- */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 800 22px/1 var(--round); color: var(--mint); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* ---------- フッター ---------- */
.site-foot { padding: 40px 0 120px; color: var(--muted); font-size: 14px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-foot a { color: var(--muted); }

/* ---------- 購入バー ---------- */
.cart-bar {
  position: fixed; left: 50%; bottom: 20px; z-index: 10;
  width: min(560px, 100% - 24px); translate: -50% 140%;
  background: var(--stage); color: #fff; border-radius: 22px; padding: 12px 12px 12px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  box-shadow: 0 18px 40px -12px rgba(34, 26, 58, .6);
  transition: translate .35s cubic-bezier(.2, .9, .3, 1.1);
}
.cart-bar.show { translate: -50% 0; }
.cart-bar .sum { font-size: 14px; color: rgba(255,255,255,.75); line-height: 1.4; }
.cart-bar .sum b { display: block; font: 800 22px/1.2 var(--round); color: #fff; }
.cart-msg { position: fixed; left: 50%; bottom: 104px; translate: -50% 0; z-index: 11; background: var(--paper); color: var(--pink-ink); font-weight: 700; padding: 10px 16px; border-radius: 12px; box-shadow: 0 8px 20px rgba(34,26,58,.15); display: none; max-width: calc(100% - 24px); }

/* ---------- 文書ページ ---------- */
.doc { background: var(--paper); border-radius: 28px; padding: clamp(24px, 5vw, 56px); margin: 16px auto 40px; max-width: 820px; }
.doc h1 { font: 800 28px/1.4 var(--round); margin: 0 0 24px; }
.doc h2 { font: 800 19px/1.5 var(--round); margin: 32px 0 8px; }
.doc table { width: 100%; border-collapse: collapse; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 14px 10px; border-bottom: 1px solid var(--line); }
.doc th { width: 34%; color: var(--muted); font-weight: 500; }
.todo { background: #fff3c4; padding: 0 4px; border-radius: 4px; }

/* ---------- 購入完了 ---------- */
.key-box { background: var(--stage); color: #fff; border-radius: 22px; padding: 22px; margin: 20px 0; }
.key-box code { display: block; font: 500 14px/1.6 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; word-break: break-all; color: #d9fff9; }
.key-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.key-actions .btn { padding: 12px 20px; font-size: 15px; }
.notice { border-left: 4px solid var(--pink); padding: 4px 0 4px 16px; margin: 24px 0; }

/* ---------- スマホ ---------- */
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 48px; }
  .phone { margin: 0 auto; width: 260px; }
  .phone iframe { top: 52px; left: 10px; width: 210px; height: 380px; transform: scale(.87); transform-origin: top left; }
  .product { grid-template-columns: 1fr; gap: 20px; }
  .product-shot { max-width: 300px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .site-head nav { display: none; }
  section { padding: 56px 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- 最終確認ダイアログ ---------- */
dialog.confirm { border: 0; border-radius: 26px; padding: 0; width: min(560px, 100% - 24px); color: var(--ink); max-height: calc(100% - 24px); }
dialog.confirm::backdrop { background: rgba(27, 21, 50, .55); }
dialog.confirm form { padding: 28px; }
dialog.confirm h2 { font: 800 22px/1.4 var(--round); margin: 0 0 16px; }
dialog.confirm table { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
dialog.confirm td { padding: 10px 0; border-bottom: 1px solid var(--line); }
dialog.confirm td:last-child { text-align: right; font-weight: 700; }
dialog.confirm tr.total td { font: 800 20px/1.4 var(--round); color: var(--pink-ink); border-bottom: 0; }
dialog.confirm dl { margin: 0 0 18px; font-size: 14px; display: grid; grid-template-columns: 7.5em 1fr; gap: 8px 12px; }
dialog.confirm dt { color: var(--muted); }
dialog.confirm dd { margin: 0; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; background: var(--bg); padding: 12px 14px; border-radius: 14px; cursor: pointer; }
.agree input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--pink); flex: none; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
@media (max-width: 520px) { dialog.confirm dl { grid-template-columns: 1fr; gap: 2px; } dialog.confirm dd { margin-bottom: 8px; } }

/* ---------- 規約の要約 ---------- */
.summary { background: var(--bg); border-radius: 20px; padding: 22px 24px; margin: 0 0 32px; }
.summary h2 { margin-top: 0; }
.summary ul { margin: 12px 0 0; padding-left: 1.2em; }
.summary li { margin: 10px 0; }
.summary li::marker { color: var(--pink); }
.doc ol ul { margin: 6px 0; }

/* ---------- セール表示 ---------- */
.sale-tag { display: inline-block; margin: 0 0 10px; padding: 4px 12px; border-radius: 999px; background: #ffe3ec; color: var(--pink-ink); font-weight: 700; font-size: 14px; }
.price s { font: 500 18px/1 var(--sans); color: var(--muted); margin-right: 10px; text-decoration-thickness: 2px; }
.muted { color: var(--muted); }

/* 最終確認画面：重複購入の注意 */
.confirm dd.warn { color: var(--pink-ink); font-weight: 700; }

/* 動作環境 */
.env-box { background: var(--paper); border: 3px solid var(--pink); border-radius: 24px; padding: clamp(20px, 4vw, 30px); }
.env-head { font: 800 20px/1.4 var(--round); color: var(--pink-ink); margin: 0 0 8px; }
.env-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.env-table th { text-align: left; white-space: nowrap; padding: 10px 14px 10px 0; vertical-align: top; color: var(--muted); width: 7em; }
.env-table td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.env-table tr:first-child td { border-top: 1px solid var(--line); }
.env-table tr:first-child th { border-top: 1px solid var(--line); }
.env-no { color: var(--pink-ink); font-weight: 700; }
.env-note { color: var(--muted); font-size: 14px; margin: 0; }
@media (max-width: 560px) { .env-table th { display: block; padding-bottom: 0; } .env-table td { display: block; } }

/* 最終確認画面：PC ID */
.pc-field { background: var(--bg); border-radius: 14px; padding: 14px 16px; margin: 0 0 14px; }
.pc-field label { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 8px; }
.pc-field .req { font-size: 11px; font-weight: 700; color: #fff; background: var(--pink); border-radius: 6px; padding: 2px 7px; }
.pc-field input { width: 100%; font: 700 18px/1.4 Consolas, "Cascadia Mono", ui-monospace, monospace; letter-spacing: .08em; padding: 10px 12px;
  border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--ink); text-transform: uppercase; }
.pc-field input:focus { outline: none; border-color: var(--mint); }
.pc-field input.bad { border-color: var(--pink); }
.pc-help { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.pc-help .bad { color: var(--pink-ink); font-weight: 700; }
