/* =============================================================
   購入画面（purchase.html）の新しい見た目（2026-10-27 購入画面の作り直し フェーズ1）
   運営者「よりモダンで安心でき、申し込みしやすい設計に」。色と形はフロント（assets/front/css/modern.css）と
   スマホのメニューにそろえる。
   ・上の帯（.bp-hero）と手順の表示（.bp-steps）＝全部のステップ
   ・プランを選ぶ画面（.bp-s1）＝かんたんシミュレーション・主なプラン 3 つのカード・ほかのプラン（畳む）・
     ご注文の内容（パソコンは右の欄・スマホは一覧の下）・画面の下の帯（スマホ・タブレット）
   HTML は js/purchase.js の renderStep1（文言は辞書の buy）。ステップ 2・3（フェーズ2）・4＝完了の画面（フェーズ3）もこのファイルの後ろの方
   ★手順の表示の .steps・.step-item は長期滞在のページ（subscription.html）と共通の見た目（style.css）なので、
     ここでは .bp-steps の中だけを直す
   ============================================================= */
:root {
  --bp-blue: #0065b8;
  --bp-blue-dark: #0a4f8f;
  --bp-teal: #0f7f80;
  --bp-text: #070c1a;
  --bp-sub: #5d6b69;
  --bp-line: #e1e7ee;
  --bp-soft: #f4f7fb;
  --bp-focus: #1a73e8;
  --bp-ease: cubic-bezier(.2, .65, .3, 1);
}
.bp-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ─── 上の帯: 見出しと安心の札 ─── */
.purchase-hero.bp-hero {
  margin-bottom: 0;
  padding: clamp(24px, 3.4vw, 40px) 0 clamp(18px, 2.4vw, 26px);
  background: linear-gradient(180deg, #eaf3fd 0%, #f6f9fd 60%, #ffffff 100%);
  border-bottom: 0;
}
.purchase-hero.bp-hero h1 { margin: 0; color: var(--bp-text); font-size: clamp(26px, 3.2vw, 38px); line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.bp-chips { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 14px 0 0; padding: 0; list-style: none; }
.bp-chips li { display: inline-flex; align-items: center; gap: 7px; color: #2c3a38; font-size: 14px; line-height: 1.35; font-weight: 600; }
.bp-chips svg { flex-shrink: 0; width: 20px; height: 20px; padding: 3px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; background: var(--bp-teal); border-radius: 50%; }

/* ─── 手順の表示（番号つきの線。終わった手順は ✓・いまの手順は青） ─── */
.purchase-steps-wrap.bp-steps { max-width: 720px; margin: clamp(18px, 2.6vw, 30px) auto clamp(24px, 3.4vw, 40px); }
.bp-steps-list { display: flex; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.bp-steps .step-item { position: relative; display: flex; flex: 1 1 0; flex-direction: column; align-items: center; gap: 8px; min-width: 0; text-align: center; }
.bp-steps .step-item + .step-item::before {   /* 前の手順からの線 */
  position: absolute;
  top: 16px;
  right: calc(50% + 24px);
  left: calc(-50% + 24px);
  height: 3px;
  content: "";
  background: #dde5ee;
  border-radius: 3px;
}
.bp-steps .step-item.done + .step-item::before,
.bp-steps .step-item.done + .step-item.active::before { background: linear-gradient(90deg, var(--bp-teal), var(--bp-blue)); }
.bp-steps .step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: #6b7884;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  background: #fff;
  border: 2px solid #d4dde7;
  border-radius: 50%;
  transition: background-color .3s ease, border-color .3s ease, color .3s ease, box-shadow .3s ease;
}
.bp-steps .step-item.active .step-num { color: #fff; background: var(--bp-blue); border-color: var(--bp-blue); box-shadow: 0 0 0 5px rgba(0, 101, 184, .14); }
.bp-steps .step-item.done .step-num {
  color: transparent;
  background: var(--bp-teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 18px no-repeat;
  border-color: var(--bp-teal);
}
.bp-steps .step-label { display: block; max-width: 100%; color: #5d6b69; font-size: 13.5px; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
.bp-steps .step-item.active .step-label { color: var(--bp-text); font-weight: 700; }
@media (max-width: 600px) {
  .bp-steps .step-label { font-size: 12px; }   /* style.css は 600px 以下で文字を隠す → ここでは短い名前を出す */
}

/* ステップ 1 は「次へ」が右の欄と下の帯にあるので、下のボタンの行は空（線も出さない） */
.step-actions-row:empty { display: none; }

/* =============================================================
   ステップ 1: プランを選ぶ
   ============================================================= */
.step-section.bp-s1 { max-width: 1112px; }
.bp-s1-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.bp-s1-head .step-title { margin-bottom: 6px; color: var(--bp-text); font-size: clamp(22px, 2.4vw, 28px); }
.bp-s1-head .step-sub { margin-bottom: 18px; color: var(--bp-sub); font-size: 14px; }
.bp-empty { padding: 32px 20px; color: #8a2a1f; font-weight: 600; text-align: center; background: #fff5f4; border: 1px solid #f3c9c3; border-radius: 16px; }

/* ─── かんたんシミュレーション（トップの「ぴったりのプラン」と同じ見た目） ─── */
.bp-sim {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(16px, 2.4vw, 28px);
  padding: clamp(18px, 2.4vw, 28px);
  background: #fff;
  border: 1px solid var(--bp-line);
  border-radius: 24px;
  box-shadow: 0 14px 38px rgba(16, 24, 40, .07);
}
.bp-sim-h { margin: 0; color: var(--bp-text); font-size: clamp(18px, 1.9vw, 22px); line-height: 1.35; font-weight: 700; }
.bp-q { margin-top: 16px; }
.bp-q-l { display: flex; align-items: center; gap: 9px; margin: 0 0 9px; color: var(--bp-text); font-size: 14.5px; line-height: 1.4; font-weight: 700; }
.bp-q-n { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 24px; height: 24px; color: #fff; font-size: 12.5px; font-weight: 800; background: linear-gradient(135deg, var(--bp-teal), var(--bp-blue)); border-radius: 50%; }
.bp-seg { display: flex; gap: 4px; width: 100%; padding: 4px; background: #eef2f7; border: 1px solid rgba(7, 12, 26, .06); border-radius: 999px; }
.bp-seg-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 42px;
  padding: 0 6px;
  color: #3b4745;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 600;
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
@media (hover: hover) {
  .bp-seg-btn:hover { color: var(--bp-text); background: rgba(255, 255, 255, .75); }
}
.bp-seg-btn[aria-pressed="true"] { color: #fff; background: var(--bp-blue); box-shadow: 0 4px 12px rgba(0, 101, 184, .28); }
.bp-step { display: inline-flex; align-items: center; gap: 4px; padding: 4px; background: #eef2f7; border: 1px solid rgba(7, 12, 26, .06); border-radius: 999px; }
.bp-step-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--bp-blue);
  background: #fff;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(16, 24, 40, .12);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .15s ease;
}
.bp-step-btn:active { transform: scale(.92); }
.bp-step-btn[aria-disabled="true"] { color: #8794a1; background: transparent; box-shadow: none; cursor: default; transform: none; }
.bp-step-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.bp-step-n { min-width: 5.5em; color: var(--bp-text); font-size: 15.5px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.bp-use { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }   /* いつも 1 列（2 列だと日本語が「見 / る」のように言葉の途中で折れる） */
.bp-use-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 8px 12px;
  color: #33403e;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.35;
  font-weight: 600;
  text-align: left;
  background: #f6f9fc;
  border: 1.5px solid #d6e0ea;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.bp-use-btn svg { flex-shrink: 0; width: 24px; height: 24px; fill: none; stroke: var(--bp-teal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) {
  .bp-use-btn:hover { border-color: #a9c3dd; }
}
.bp-use-btn[aria-pressed="true"] { color: var(--bp-text); background: #f2f7fe; border-color: var(--bp-blue); box-shadow: inset 0 0 0 1px var(--bp-blue); }
.bp-sim-r {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(18px, 2.2vw, 26px);
  background: linear-gradient(160deg, #f2f7fe 0%, #e5effb 100%);
  border-radius: 20px;
}
.bp-r-head { margin: 0; color: #0b6e6f; font-size: 12.5px; line-height: 1.2; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
html:lang(ja) .bp-r-head,
html:lang(zh-CN) .bp-r-head,
html:lang(ko) .bp-r-head { letter-spacing: .06em; }
.bp-r-main { margin-top: 8px; transform-origin: left center; }
.bp-r-main.is-bump { animation: bpBump .45s var(--bp-ease); }
.bp-r-name { margin: 0; color: var(--bp-text); font-family: var(--font-heading); font-size: clamp(19px, 1.9vw, 23px); line-height: 1.3; font-weight: 700; }
.bp-r-for { margin: 2px 0 0; color: var(--bp-sub); font-size: 13.5px; font-weight: 600; }
.bp-r-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 6px 0 0; }
.bp-r-total > span { color: var(--bp-text); font-family: var(--font-heading); font-size: clamp(30px, 3vw, 38px); line-height: 1.1; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.bp-r-total small { color: var(--bp-sub); font-size: 12.5px; font-weight: 600; }
.bp-r-per { margin: 4px 0 0; color: #33403e; font-size: 13.5px; line-height: 1.5; font-weight: 600; }
.bp-r-alt { margin: 12px 0 0; padding: 9px 11px; color: #5c3300; font-size: 13.5px; line-height: 1.6; background: #fff6e0; border: 1px solid #f1d699; border-radius: 12px; }
.bp-r-alt[hidden] { display: none; }
.bp-r-alt strong { font-weight: 800; }
.bp-r-alt-btn { padding: 0; color: #0b56a0; font-family: inherit; font-size: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; background: none; border: 0; cursor: pointer; }
.bp-r-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
  padding: 0 18px;
  color: #fff;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 700;
  background: var(--bp-blue);
  border: 2px solid var(--bp-blue);
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0, 101, 184, .24);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .15s ease;
}
.bp-r-cta svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) {
  .bp-r-cta:hover { background: var(--bp-blue-dark); border-color: var(--bp-blue-dark); }
}
.bp-r-cta:active { transform: translateY(1px); }
.bp-r-cta.is-done { color: #0b6e6f; background: #fff; border-color: #9fd2c9; box-shadow: none; }
.bp-r-group { margin: 10px 0 0; color: var(--bp-sub); font-size: 12.5px; line-height: 1.55; }
.bp-r-group[hidden] { display: none; }

/* ─── 主なプランのカード（3 つ）。データ量で 3 色・選ぶと青い枠と ✓ ─── */
.bp-pick { margin-top: 20px; }
.bp-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.bp-cards.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bp-cards.is-one { grid-template-columns: minmax(0, 360px); }
.bp-radio { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.bp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--bp-text);
  background: #fff;
  border: 2px solid var(--bp-line);
  border-radius: 20px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, .05);
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .25s ease, transform .25s var(--bp-ease);
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .bp-card:hover { border-color: #a9c3dd; box-shadow: 0 12px 26px rgba(16, 24, 40, .1); transform: translateY(-2px); }
}
.bp-card.is-on { border-color: var(--bp-blue); box-shadow: 0 0 0 4px rgba(0, 101, 184, .12), 0 14px 30px rgba(0, 101, 184, .16); }
.bp-card:has(.bp-radio:focus-visible),
.bp-row:has(.bp-radio:focus-visible) { outline: 3px solid var(--bp-focus); outline-offset: 3px; }
.bp-card-vis {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 16px 16px 14px;
  color: #fff;
  isolation: isolate;
}
.bp-card-vis::after {   /* 右上の光（飾り） */
  position: absolute;
  top: -40%;
  right: -20%;
  z-index: -1;
  width: 70%;
  aspect-ratio: 1;
  content: "";
  background: radial-gradient(closest-side, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0));
}
.t1 .bp-card-vis { background: linear-gradient(140deg, #0a5c45 0%, #0e7a5b 100%); }
.t2 .bp-card-vis { background: linear-gradient(140deg, #064a8a 0%, #0b6aa8 100%); }
.t3 .bp-card-vis { background: linear-gradient(140deg, #6e4304 0%, #9a6409 100%); }
.bp-badge { display: inline-flex; align-items: center; min-height: 24px; margin-bottom: 6px; padding: 0 10px; color: #0a2440; font-size: 12px; font-weight: 700; letter-spacing: .02em; background: rgba(255, 255, 255, .94); border-radius: 999px; }
.bp-gb { font-family: var(--font-heading); font-size: 15px; font-weight: 700; line-height: 1; }
.bp-gb b { font-size: clamp(34px, 3.6vw, 42px); font-weight: 700; letter-spacing: -.02em; }
.bp-days { font-size: 14.5px; font-weight: 600; opacity: .95; }
.bp-card-body { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px 16px; }
.bp-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; color: var(--bp-text); font-family: var(--font-heading); font-size: 24px; line-height: 1.15; font-weight: 700; font-variant-numeric: tabular-nums; }
.bp-price small { color: var(--bp-sub); font-family: var(--font-body); font-size: 12px; font-weight: 600; }
.bp-per { color: #1d5a8f; font-size: 13.5px; font-weight: 700; }
.bp-gbday { color: var(--bp-sub); font-size: 12.5px; font-weight: 600; }
.bp-tick {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, .25);
  border: 2px solid rgba(255, 255, 255, .85);
  border-radius: 50%;
  transition: background-color .2s ease, transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
.bp-tick svg { width: 16px; height: 16px; fill: none; stroke: transparent; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.is-on .bp-tick { background: #fff; border-color: #fff; transform: scale(1.08); }
.is-on .bp-tick svg { stroke: var(--bp-blue); }
/* 画像のカード（2026-10-27 運営者「プランのカードの画像は今までの画像を」）: プラン管理の画像（820×405・トップのカードと同じ）を上に。
   札は画像の左上・日数は白い所の 1 行目・選んだ印は白い所の右上（画像の右上には文字があるので重ねない）。後ろの色は読み込むまでの下地 */
.bp-card-vis.has-img { display: block; padding: 0; }
.bp-card-vis.has-img::after { content: none; }
.bp-card-vis.has-img img { display: block; width: 100%; height: auto; aspect-ratio: 820 / 405; object-fit: cover; }
.bp-card-vis.has-img .bp-badge { position: absolute; top: 10px; left: 10px; max-width: calc(100% - 20px); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, .22); }
.has-img .bp-card-body { position: relative; }
.bp-card-name { padding-right: 34px; color: var(--bp-text); font-size: 14.5px; line-height: 1.35; font-weight: 700; }
.has-img .bp-card-body .bp-tick { top: 12px; right: 12px; background: #fff; border-color: #c6d2de; }
.bp-card.has-img.is-on .bp-tick { background: var(--bp-blue); border-color: var(--bp-blue); }
.bp-card.has-img.is-on .bp-tick svg { stroke: #fff; }
.bp-card.is-bump,
.bp-row.is-bump { animation: bpBump .5s var(--bp-ease); }

/* ─── ほかのプラン（畳んでおく。押すと開く） ─── */
.bp-more { margin-top: 14px; background: #fff; border: 1px solid var(--bp-line); border-radius: 18px; }
.bp-more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 0 18px;
  color: var(--bp-text);
  font-size: 15px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
  border-radius: 18px;
}
.bp-more summary::-webkit-details-marker { display: none; }
.bp-more summary svg { flex-shrink: 0; width: 20px; height: 20px; fill: none; stroke: #6b7884; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--bp-ease); }
.bp-more[open] summary svg { transform: rotate(180deg); }
.bp-more summary:focus-visible { outline: 3px solid var(--bp-focus); outline-offset: 2px; }
.bp-rows { display: flex; flex-direction: column; gap: 8px; padding: 0 12px 12px; }
.bp-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 8px 48px 8px 8px;
  background: #fff;
  border: 2px solid #e8edf3;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .bp-row:hover { border-color: #a9c3dd; }
}
.bp-row.is-on { background: #f2f7fe; border-color: var(--bp-blue); }
.bp-row-gb { display: flex; flex-shrink: 0; align-items: baseline; justify-content: center; width: 56px; height: 46px; padding-top: 11px; color: #fff; font-family: var(--font-heading); font-size: 19px; font-weight: 700; line-height: 1; border-radius: 11px; }
.bp-row-gb small { font-size: 11px; }
.t1 .bp-row-gb, .t1.bp-sum-plan .bp-sum-gb { background: linear-gradient(140deg, #0a5c45, #0e7a5b); }
.t2 .bp-row-gb, .t2.bp-sum-plan .bp-sum-gb { background: linear-gradient(140deg, #064a8a, #0b6aa8); }
.t3 .bp-row-gb, .t3.bp-sum-plan .bp-sum-gb { background: linear-gradient(140deg, #6e4304, #9a6409); }
.bp-row-t { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.bp-row-t b { color: var(--bp-text); font-size: 15px; line-height: 1.3; font-weight: 700; }
.bp-row-t small { color: #1d5a8f; font-size: 12.5px; font-weight: 600; }
.bp-row-price { flex-shrink: 0; color: var(--bp-text); font-family: var(--font-heading); font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bp-row .bp-tick { top: 50%; right: 12px; margin-top: -13px; width: 26px; height: 26px; background: #fff; border-color: #c6d2de; }
.bp-row.is-on .bp-tick { background: var(--bp-blue); border-color: var(--bp-blue); }
.bp-row.is-on .bp-tick svg { stroke: #fff; }
.bp-common { margin: 12px 4px 0; color: var(--bp-sub); font-size: 13px; line-height: 1.5; }

/* ─── ご注文の内容（パソコンは右の欄・スマホは一覧の下） ─── */
.bp-sum {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  padding: 22px;
  background: #fff;
  border: 1px solid var(--bp-line);
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(16, 24, 40, .08);
}
.bp-sum-h { margin: 0 0 12px; color: var(--bp-text); font-size: 17px; font-weight: 700; }
.bp-sum-none { margin: 0; padding: 14px; color: var(--bp-sub); font-size: 14px; line-height: 1.6; background: var(--bp-soft); border-radius: 14px; }
.bp-sum.has-plan .bp-sum-none { display: none; }
.bp-sum:not(.has-plan) .bp-sum-sel { display: none; }
.bp-sum-plan { display: flex; align-items: center; gap: 12px; }
.bp-sum-gb { display: flex; flex-shrink: 0; align-items: baseline; justify-content: center; width: 60px; height: 50px; padding-top: 12px; color: #fff; font-family: var(--font-heading); font-size: 21px; font-weight: 700; line-height: 1; border-radius: 12px; }
.bp-sum-gb small { font-size: 11px; }
.bp-sum-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bp-sum-t b { color: var(--bp-text); font-size: 15.5px; line-height: 1.3; font-weight: 700; }
.bp-sum-t small { color: var(--bp-sub); font-size: 12.5px; font-weight: 600; }
.bp-qty { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #eef2f6; }
.bp-qty-l { color: var(--bp-text); font-size: 14px; font-weight: 700; }
.bp-qty .bp-step-n { min-width: 4.2em; font-size: 15px; }
.bp-qty-hint { flex-basis: 100%; color: var(--bp-sub); font-size: 12px; }
.bp-sum-rows { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid #eef2f6; }
.bp-sum-rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.bp-sum-rows > div[hidden] { display: none; }
.bp-sum-rows dt { min-width: 0; color: var(--bp-sub); font-size: 13.5px; font-weight: 600; }
.bp-sum-rows dd { margin: 0; color: var(--bp-text); font-size: 14px; font-weight: 600; text-align: right; }
.bp-sum-unit { margin-bottom: 6px; }
.bp-sum-total dt { color: var(--bp-text); font-size: 15px; font-weight: 700; }
.bp-sum-total dd { display: flex; flex-direction: column; align-items: flex-end; }
.bp-sum-total strong { font-family: var(--font-heading); font-size: 28px; line-height: 1.15; font-weight: 700; font-variant-numeric: tabular-nums; }
.bp-sum-total small { color: var(--bp-sub); font-size: 12px; font-weight: 600; }
.bp-charged { margin: 10px 0 0; padding: 9px 11px; color: #3b4745; font-size: 12.5px; line-height: 1.55; background: var(--bp-soft); border-radius: 10px; }
.bp-charged[hidden] { display: none; }
.bp-next {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  margin-top: 16px;
  padding: 0 20px;
  color: #fff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  background: linear-gradient(90deg, #db1a1a, #ff4027);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 4px 0 #a31414;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, filter .2s ease;
}
.bp-next svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) {
  .bp-next:hover { filter: brightness(1.05); }
}
.bp-next:active { transform: translateY(2px); box-shadow: 0 2px 0 #a31414; }
/* プランを選ぶ前の「次へ」: 灰色（まだ進めないことが分かる形）。押すと「先にプランを選んでください」と知らせてカードへ */
.bp-sum:not(.has-plan) .bp-next,
.bp-bar:not(.has-plan) .bp-next { color: #4b5866; background: #e6ecf2; box-shadow: none; filter: none; }
.bp-next-hint { margin: 8px 0 0; color: var(--bp-sub); font-size: 12.5px; text-align: center; }
.bp-trust { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 0; padding: 14px 0 0; list-style: none; border-top: 1px solid #eef2f6; }
.bp-trust li { display: flex; align-items: center; gap: 9px; color: #33403e; font-size: 13px; line-height: 1.4; font-weight: 600; }
.bp-trust svg { flex-shrink: 0; width: 20px; height: 20px; fill: none; stroke: var(--bp-teal); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bp-s1 button:focus-visible { outline: 3px solid var(--bp-focus); outline-offset: 2px; }

/* ─── 画面の下の帯（スマホ・タブレット）: 選んだプラン・合計・次へ ─── */
.bp-bar { display: none; }
@media (max-width: 999px) {
  .bp-s1-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .bp-sum { position: static; }
  .bp-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, .97);
    border-top: 1px solid var(--bp-line);
    box-shadow: 0 -8px 24px rgba(16, 24, 40, .1);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    transition: transform .3s var(--bp-ease), opacity .25s ease, visibility 0s;
  }
  .bp-bar.is-hidden { visibility: hidden; opacity: 0; transform: translateY(100%); transition: transform .3s var(--bp-ease), opacity .25s ease, visibility 0s linear .3s; }
  .bp-bar-t { display: flex; flex: 1; flex-direction: column; gap: 1px; min-width: 0; }
  .bp-bar-name { overflow: hidden; color: var(--bp-sub); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
  .bp-bar-total { color: var(--bp-text); font-family: var(--font-heading); font-size: 21px; line-height: 1.15; font-weight: 700; font-variant-numeric: tabular-nums; }
  .bp-bar-total:empty { display: none; }
  .bp-bar-next { flex-shrink: 0; width: auto; min-height: 50px; margin-top: 0; padding: 0 18px; font-size: 16px; }
  body.bp-has-bar { padding-bottom: 96px; }   /* 帯の下にフッターが隠れないように */
}
@media (max-width: 760px) {
  .bp-sim { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 639px) {
  /* スマホ: カードは横長（左に GB・右に値段）。縦の長さを前の半分以下に */
  .bp-cards,
  .bp-cards.is-two,
  .bp-cards.is-one { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .bp-card { flex-direction: row; align-items: stretch; border-radius: 18px; }
  .bp-card-vis { justify-content: center; width: 112px; flex-shrink: 0; padding: 12px; }
  .bp-badge { order: 3; min-height: 20px; margin: 6px 0 0; padding: 0 7px; font-size: 10.5px; }
  .bp-gb b { font-size: 32px; }
  .bp-days { font-size: 13px; }
  .bp-card-body { flex: 1; justify-content: center; min-width: 0; padding: 12px 46px 12px 14px; }
  .bp-price { font-size: 21px; }
  .bp-tick { top: 50%; right: 12px; margin-top: -14px; background: #fff; border-color: #c6d2de; }
  .bp-card.is-on .bp-tick { background: var(--bp-blue); border-color: var(--bp-blue); }
  .bp-card.is-on .bp-tick svg { stroke: #fff; }
  /* 画像のカード: 左の四角に画像の右側（「30GB」の文字の所）が見えるように切り取る・札は左下・印は右の真ん中 */
  .bp-card-vis.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-position: 88% 50%; }
  .bp-card-vis.has-img .bp-badge { top: auto; bottom: 8px; left: 8px; max-width: calc(100% - 16px); }
  .has-img .bp-card-body .bp-tick { top: 50%; margin-top: -14px; }
  .bp-card-name { padding-right: 0; font-size: 13.5px; }
  .bp-use-btn { min-height: 50px; }
  .bp-seg-btn { font-size: 13px; }
  .bp-chips { gap: 6px 14px; }
  .bp-chips li { font-size: 13px; }
}
@media (max-width: 380px) {
  .bp-card-vis { width: 96px; padding: 10px; }
  .bp-gb b { font-size: 28px; }
  .bp-seg-btn { padding: 0 3px; font-size: 12.5px; }
}

/* =============================================================
   ステップ 2・3: お客様の情報・お支払い（2026-10-27 フェーズ2）
   左に入力（白いカードの箱）・右にご注文の内容（パソコンは追いかける）。スマホは上の「ご注文の内容（合計）」を押すと開く
   ============================================================= */
.step-section.bp-s2,
.step-section.bp-s3 { max-width: 1112px; }
.bp-box { margin-top: 16px; padding: clamp(16px, 2.2vw, 24px); background: #fff; border: 1px solid var(--bp-line); border-radius: 20px; box-shadow: 0 8px 24px rgba(16, 24, 40, .05); }
.bp-box-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bp-box-h { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--bp-text); font-family: var(--font-heading); font-size: 17px; line-height: 1.35; font-weight: 700; }
.bp-box-h svg { width: 20px; height: 20px; fill: none; stroke: var(--bp-teal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bp-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.bp-s2 .form-group { margin-bottom: 16px; }
.bp-s2 .form-group:last-child { margin-bottom: 0; }
.bp-s2 .form-label { color: #33403e; font-size: 14px; font-weight: 700; }
.bp-s2 .form-input,
.bp-s2 .form-select,
.bp-s3 .form-input { min-height: 48px; font-size: 16px; border-color: #cfd8e3; border-radius: 12px; }   /* 16px＝iPhone で欄を押しても拡大しない */
.bp-s2 .form-input:focus,
.bp-s2 .form-select:focus,
.bp-s3 .form-input:focus { border-color: var(--bp-blue); box-shadow: 0 0 0 3px rgba(0, 101, 184, .16); }
.bp-req { color: #b32d1f; font-weight: 700; }
.bp-opt-l { color: var(--bp-sub); font-size: 12.5px; font-weight: 600; }
.bp-s2 .form-hint { display: flex; align-items: flex-start; gap: 6px; margin-top: 7px; color: var(--bp-sub); font-size: 12.5px; line-height: 1.5; }
.bp-s2 .form-hint svg { flex-shrink: 0; width: 16px; height: 16px; margin-top: 1px; fill: none; stroke: var(--bp-teal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bp-s2 .form-error,
.bp-s3 .form-error { margin-top: 6px; color: #b32d1f; font-size: 13px; font-weight: 600; }
.bp-mail-sug { margin-top: 8px; padding: 8px 11px; color: #5c3300; font-size: 13.5px; line-height: 1.5; background: #fff6e0; border: 1px solid #f1d699; border-radius: 10px; }
.bp-mail-sug[hidden] { display: none; }
.bp-mail-sug b { font-weight: 800; overflow-wrap: anywhere; }
.bp-link { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 2px; color: #0b56a0; font-family: inherit; font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; cursor: pointer; }
.bp-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* 使い始める日（今日から／日付を選ぶ）と流れの図 */
.bp-start { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.bp-opt { position: relative; display: flex; align-items: center; gap: 12px; min-height: 66px; padding: 10px 14px; background: #f6f9fc; border: 2px solid #d6e0ea; border-radius: 16px; cursor: pointer; transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease; -webkit-tap-highlight-color: transparent; }
.bp-opt input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
@media (hover: hover) {
  .bp-opt:hover { border-color: #a9c3dd; }
}
.bp-opt.is-on { background: #f2f7fe; border-color: var(--bp-blue); box-shadow: 0 0 0 3px rgba(0, 101, 184, .12); }
.bp-opt:has(input:focus-visible) { outline: 3px solid var(--bp-focus); outline-offset: 2px; }
.bp-opt-i { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 40px; height: 40px; background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(16, 24, 40, .08); }
.bp-opt-i svg { width: 22px; height: 22px; fill: none; stroke: var(--bp-teal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bp-opt.is-on .bp-opt-i { background: var(--bp-blue); }
.bp-opt.is-on .bp-opt-i svg { stroke: #fff; }
.bp-opt-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bp-opt-t b { color: var(--bp-text); font-size: 15.5px; line-height: 1.3; font-weight: 700; }
.bp-opt-t small { color: var(--bp-sub); font-size: 12.5px; line-height: 1.35; font-weight: 600; }
.bp-date { margin-top: 12px; }
.bp-date[hidden] { display: none; }
.bp-tl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; counter-reset: bptl; }
.bp-tl li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; color: #33403e; font-size: 12.5px; line-height: 1.35; font-weight: 700; text-align: center; }
.bp-tl li + li::before { position: absolute; top: 18px; right: calc(50% + 22px); left: calc(-50% + 22px); height: 2px; content: ""; background: repeating-linear-gradient(90deg, #9fc4e6 0 6px, transparent 6px 11px); }
.bp-tl svg { width: 36px; height: 36px; padding: 8px; fill: none; stroke: var(--bp-blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; background: #eaf3fd; border-radius: 50%; }
.bp-start-note { margin: 12px 0 0; padding: 10px 12px; color: #3b4745; font-size: 13px; line-height: 1.6; background: var(--bp-soft); border-radius: 12px; }

/* 同意（規約・特商法・広告メール） */
.bp-agree .check-label { align-items: flex-start; color: var(--bp-text); font-size: 14.5px; line-height: 1.55; }
.bp-agree .check-label input { width: 20px; height: 20px; margin-top: 1px; flex-shrink: 0; }
.bp-agree a { color: #0b56a0; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.bp-legal { margin: 8px 0 0 30px; font-size: 13px; }
.bp-legal a { color: var(--bp-sub); font-weight: 600; }
.bp-promo { margin: 16px 0 0; padding: 14px 16px; background: var(--bp-soft); border: 1px solid #e3e9f0; border-radius: 14px; }
.bp-promo .check-label { font-size: 14px; }
.bp-promo-notes { margin-top: 8px; color: var(--bp-sub); font-size: 12.5px; line-height: 1.6; }

/* ご注文の内容（ステップ 2・3）の中の行・割引コード・ポイント */
.bp-sum-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.bp-sum-top .bp-sum-h { margin: 0; }
.bp-sum-2 .bp-sum-plan,
.bp-sum-3 .bp-sum-plan { padding-bottom: 14px; border-bottom: 1px solid #eef2f6; }
.bp-sum-2 .bp-sum-rows,
.bp-sum-3 .bp-sum-rows { margin-top: 0; border-top: 0; }
.bp-sum-rows > .bp-sum-disc { margin-bottom: 6px; }
.bp-sum-disc dt,
.bp-sum-disc dd { color: #2f6a1a; font-weight: 700; }
.bp-sum-disc.is-gold dt,
.bp-sum-disc.is-gold dd { color: #7a5c17; }
.bp-code { margin-top: 14px; border-top: 1px solid #eef2f6; }
.bp-code summary { display: flex; align-items: center; gap: 8px; min-height: 46px; color: #0b56a0; font-size: 14px; font-weight: 700; list-style: none; cursor: pointer; }
.bp-code summary::-webkit-details-marker { display: none; }
.bp-code summary svg,
.bp-code-add svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bp-code-row { display: flex; gap: 8px; }
.bp-code-row .form-input { flex: 1; min-width: 0; min-height: 46px; font-size: 16px; letter-spacing: .05em; text-transform: uppercase; border-radius: 12px; }
.bp-btn-line { flex-shrink: 0; min-height: 46px; padding: 0 16px; color: var(--bp-blue); font-family: inherit; font-size: 14.5px; font-weight: 700; white-space: nowrap; background: #fff; border: 1.5px solid #9fc4e6; border-radius: 12px; cursor: pointer; }
@media (hover: hover) {
  .bp-btn-line:hover { background: #f2f7fe; }
}
.bp-btn-line:disabled { cursor: default; opacity: .6; }
.bp-code-msg { margin-top: 8px; font-size: 13px; line-height: 1.5; font-weight: 600; }
.bp-code-add { margin-top: 10px; font-size: 13.5px; }
.bp-points { margin-top: 12px; padding: 12px; background: #fffaf0; border: 1px solid #f1e2b6; border-radius: 14px; }
.bp-points-t { margin: 0 0 8px; color: #5c4a1a; font-size: 13px; line-height: 1.5; }
.bp-points .bp-btn-line { width: 100%; }

/* スマホ・タブレット: 上の「ご注文の内容（合計）」。押すとご注文の内容の欄が開く */
.bp-sumbar { display: none; }

/* ステップ 3: 入力の確認・カード・対応機種 */
.bp-check-l { display: grid; gap: 8px; margin: 12px 0 0; }
.bp-check-l > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid #eef2f6; }
.bp-check-l > div:first-child { padding-top: 0; border-top: 0; }
.bp-check-l dt { display: flex; flex-shrink: 0; align-items: center; gap: 6px; color: var(--bp-sub); font-size: 13px; font-weight: 600; }
.bp-check-l dt svg { width: 16px; height: 16px; fill: none; stroke: var(--bp-teal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bp-check-l dd { min-width: 0; margin: 0; color: var(--bp-text); font-size: 14.5px; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.bp-check-l .is-mail dd { color: #0a4f8f; font-weight: 800; }
.bp-card-box .bp-box-top { flex-wrap: wrap; }
.bp-card-box .card-icons { gap: 5px; }
.bp-pay-ph { margin-top: 12px; padding: 14px; background: var(--bp-soft); border: 1px dashed #c9d6e3; border-radius: 14px; }
.bp-pay-ph p { margin: 0; color: var(--bp-text); font-size: 14.5px; line-height: 1.6; }
.bp-small { margin: 6px 0 0; color: var(--bp-sub); font-size: 12.5px; line-height: 1.55; }
.bp-pay-ph .bp-small { margin-top: 6px; color: var(--bp-sub); font-size: 12.5px; }
.bp-card-box #payjp-card-element { margin-top: 12px; }
/* PAY.JP の部品（v2）: 入れ物に padding を付けない（部品が入れ物の高さに中身の高さを入れてくる＝padding の分だけ下が切れる）。
   iframe は行の中の文字のように置くと下にすき間ができるので、箱として置く */
#payjp-v2-widget { margin: 8px 0; }
#payjp-v2-widget iframe { display: block; }
/* 狭いスマホ（2026-10-27）: PAY.JP の部品の中身は、最低 320px の幅で作られている（部品の中で決め打ち・こちらでは変えられない）。
   枠が 320px より狭いと、右側（カード番号の欄まで）が切れる。440px 以下は、ページの左右の余白を 16px・カードの箱の中を 12px にして、
   部品を箱の枠の近くまで広げる（360px の画面で 324px）。352px 以下は、部品だけ画面の端まで広げる（320px の画面で 320px） */
@media (max-width: 440px) {
  .purchase-page #main .container { padding-left: 16px; padding-right: 16px; }
  .bp-card-box { padding-left: 12px; padding-right: 12px; }
  #payjp-v2-widget { margin-left: -11px; margin-right: -11px; }
}
@media (max-width: 352px) {
  #payjp-v2-widget { margin-left: -29px; margin-right: -29px; }
}
.bp-card-box .payjp-label { color: #33403e; font-size: 13px; font-weight: 700; letter-spacing: 0; }
.bp-card-box .payjp-mount { border-color: #cfd8e3; border-radius: 12px; }
.bp-by { margin: 12px 0 0; color: var(--bp-sub); font-size: 12px; text-align: center; }
.bp-help { margin: 10px 0 0; padding: 10px 12px; color: #5c3300; font-size: 13.5px; line-height: 1.55; background: #fff6e0; border: 1px solid #f1d699; border-radius: 12px; }
.bp-help[hidden] { display: none; }
.bp-help a { color: #0b56a0; font-weight: 700; text-decoration: underline; }
.bp-dev-top { display: flex; align-items: flex-start; gap: 12px; }
.bp-dev-i { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 42px; height: 42px; background: #eaf3fd; border-radius: 12px; }
.bp-dev-i svg { width: 22px; height: 22px; fill: none; stroke: var(--bp-blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bp-dev .bp-box-h { font-size: 15.5px; }
.bp-dev-check { margin-top: 10px; }
.bp-dev-check summary { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; color: #0b56a0; font-size: 14px; font-weight: 700; list-style: none; cursor: pointer; }
.bp-dev-check summary::-webkit-details-marker { display: none; }
.bp-dev-check summary svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--bp-ease); }
.bp-dev-check[open] summary svg { transform: rotate(180deg); }
.bp-dev-check .form-label { margin-top: 6px; color: #33403e; font-size: 13px; font-weight: 700; }
.bp-dev-out:empty { display: none; }
.bp-dev-out { margin-top: 10px; padding: 12px; border-radius: 12px; }
.bp-dev-out.is-ok { background: #effaf3; border: 1px solid #b9e3c6; }
.bp-dev-out.is-ng { background: #fff6e0; border: 1px solid #f1d699; }
.bp-dev-head { margin: 0; color: var(--bp-text); font-size: 14.5px; font-weight: 800; }
.bp-dev-out ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.bp-dev-out li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; color: var(--bp-text); font-size: 13px; font-weight: 600; background: #fff; border: 1px solid #cfe9d8; border-radius: 999px; }
.bp-dev-out li span { color: var(--bp-sub); font-size: 11.5px; }
.bp-dev-out a { color: #0b56a0; font-weight: 700; text-decoration: underline; }
.bp-dev-all { display: inline-block; margin-top: 10px; color: #0b56a0; font-size: 13.5px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.bp-trust-row { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 18px 0 0; padding: 0; border-top: 0; }

/* 下のボタン（戻る・次へ／支払う）: パソコンは左の列の下に右寄せ。スマホは「次へ」を上に・幅いっぱい */
body.bp-step-2 .step-actions-row,
body.bp-step-3 .step-actions-row { max-width: 1112px; padding-right: 372px; border-top: 0; }
.step-actions-row .bp-go { width: auto; min-width: 280px; margin-top: 0; }
.step-actions-row .bp-go svg { flex-shrink: 0; }
.step-actions-row .bp-go .spinner { flex-shrink: 0; }
.step-actions-row .bp-back { display: inline-flex; align-items: center; gap: 6px; min-height: 50px; padding: 0 18px; border-radius: 14px; }
.step-actions-row .bp-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
#pay-btn:disabled { cursor: progress; filter: saturate(.7); }

@media (max-width: 999px) {
  body.bp-step-2 .step-actions-row,
  body.bp-step-3 .step-actions-row { padding-right: 0; }
  .bp-s2 .bp-sum,
  .bp-s3 .bp-sum { display: none; order: -1; }
  .bp-s2 .bp-sum.is-open,
  .bp-s3 .bp-sum.is-open { display: block; }
  .bp-sumbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 54px;
    margin-bottom: 14px;
    padding: 0 16px;
    color: var(--bp-text);
    font-family: inherit;
    background: #fff;
    border: 1px solid var(--bp-line);
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(16, 24, 40, .06);
    cursor: pointer;
  }
  .bp-sumbar-l { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; }
  .bp-sumbar-l svg { width: 20px; height: 20px; fill: none; stroke: var(--bp-teal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .bp-sumbar-l svg:last-child { width: 18px; height: 18px; stroke: #6b7884; transition: transform .25s var(--bp-ease); }
  .bp-sumbar[aria-expanded="true"] .bp-sumbar-l svg:last-child { transform: rotate(180deg); }
  .bp-sumbar-total { font-family: var(--font-heading); font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
}
@media (max-width: 600px) {
  /* ステップ 2〜4 は、上の帯を小さく（入力を上に） */
  body.bp-step-2 .purchase-hero.bp-hero,
  body.bp-step-3 .purchase-hero.bp-hero,
  body.bp-step-4 .purchase-hero.bp-hero { padding: 14px 0 6px; }
  body.bp-step-2 .bp-hero h1,
  body.bp-step-3 .bp-hero h1,
  body.bp-step-4 .bp-hero h1 { font-size: 21px; }
  body.bp-step-2 .bp-chips,
  body.bp-step-3 .bp-chips,
  body.bp-step-4 .bp-chips { display: none; }
  .bp-grid2 { grid-template-columns: minmax(0, 1fr); }
  .bp-start { grid-template-columns: minmax(0, 1fr); }
  #step-actions.step-actions-row { flex-direction: column-reverse; align-items: stretch; }   /* ★ID で書く: purchase.html の中の古い決まり（column）より強く＝「次へ／支払う」を上に */
  .step-actions-row .bp-go { width: 100%; min-width: 0; }
  .step-actions-row .bp-back { justify-content: center; }
  .bp-check-l > div { flex-direction: column; gap: 2px; }
  .bp-check-l dd { text-align: left; }
}

/* =============================================================
   ステップ 4: 完了の画面（2026-10-27 フェーズ3）
   上に「ありがとう」（線で描く ✓）・左に注文の内容と「次にすること」（iPhone／Android の切り替え・Android は APN）・
   メールが届かないとき、右にマイページ・カレンダー（使い始める日が先のとき）・お客様だけの特典。スマホとタブレットは 1 列
   HTML は js/purchase.js の renderStep4・bpDoneGeneric（注文が読めないとき）
   ★purchase.html の中の <style>（.step-section・.step-title）が後ろにあるので、ここは 2 つ重ねて書く
   ============================================================= */
.step-section.bp-done { max-width: 1112px; }
.bp-done-hero { max-width: 720px; margin: 0 auto; text-align: center; }
.bp-done-hero .step-title { margin: 0; color: var(--bp-text); font-family: var(--font-heading); font-size: clamp(24px, 3vw, 32px); line-height: 1.25; font-weight: 700; }
.bp-done-lead { margin: 10px 0 0; color: #33403e; font-size: 15.5px; line-height: 1.65; overflow-wrap: anywhere; }
.bp-done-lead b { color: var(--bp-blue-dark); font-weight: 800; }
/* 日本語の見出しは、言葉の切れ目で折る（対応しているブラウザだけ。ほかは今までどおり） */
:lang(ja) .bp-done-hero .step-title,
:lang(ja) .bp-done .bp-box-h { word-break: auto-phrase; }
.bp-done-mark { display: inline-flex; align-items: center; justify-content: center; width: 76px; height: 76px; margin: 0 auto 14px; }
.bp-done-mark.is-check svg { width: 76px; height: 76px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bp-done-mark.is-check circle { fill: #e8f6f4; stroke: var(--bp-teal); stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; animation: bpDraw .6s var(--bp-ease) forwards; }
.bp-done-mark.is-check path { stroke: var(--bp-teal); stroke-width: 4.5; stroke-dasharray: 32; stroke-dashoffset: 32; animation: bpDraw .35s .5s var(--bp-ease) forwards; }
.bp-done-mark.is-mail { background: #eaf3fd; border-radius: 50%; }
.bp-done-mark.is-mail svg { width: 36px; height: 36px; fill: none; stroke: var(--bp-blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes bpDraw { to { stroke-dashoffset: 0; } }

.bp-done-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 0 32px; align-items: start; margin-top: clamp(20px, 3vw, 32px); }
.bp-done-main > .bp-box:first-child,
.bp-done-side > .bp-box:first-child { margin-top: 0; }
.bp-done-id b { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; letter-spacing: .02em; }
.bp-copy { min-height: 32px; margin-left: 4px; font-size: 13px; }

/* 次にすること（番号つき） */
.bp-do { margin: 12px 0 0; padding: 0; list-style: none; }
.bp-do > li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid #eef2f6; }
.bp-do > li:first-child { padding-top: 4px; border-top: 0; }
.bp-do > li:last-child { padding-bottom: 0; }
.bp-do-n { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; color: #fff; font-size: 15px; font-weight: 800; background: var(--bp-blue); border-radius: 50%; }
.bp-do > li > div > b { display: block; padding-top: 5px; color: var(--bp-text); font-size: 15.5px; line-height: 1.4; font-weight: 700; }
.bp-do p { margin: 4px 0 0; color: #3b4745; font-size: 14px; line-height: 1.6; }
.bp-do .bp-small { color: var(--bp-sub); font-size: 12.5px; }

/* iPhone／Android の切り替え */
.bp-os { display: inline-flex; gap: 4px; margin: 12px 0 0; padding: 4px; background: var(--bp-soft); border: 1px solid var(--bp-line); border-radius: 12px; }
.bp-os-t { min-width: 104px; min-height: 40px; padding: 0 14px; color: #3b4745; font-family: inherit; font-size: 14px; font-weight: 700; background: transparent; border: 0; border-radius: 9px; cursor: pointer; }
.bp-os-t[aria-selected="true"] { color: var(--bp-text); background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, .14); }
.bp-os-t:focus-visible { outline: 3px solid var(--bp-focus); outline-offset: 2px; }
.bp-os-p { margin-top: 10px; padding: 12px 14px; background: #fff; border: 1px solid var(--bp-line); border-radius: 12px; }
.bp-os-p[hidden] { display: none; }
.bp-do .bp-os-p p { margin: 0; }
.bp-do .bp-os-p p + p,
.bp-os-p .bp-apn,
.bp-os-p > .bp-link { margin-top: 8px; }
.bp-do .bp-os-p .bp-apn-h { color: var(--bp-text); font-weight: 700; }
.bp-apn { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; padding: 10px 12px; color: var(--bp-text); font-size: 14.5px; background: #effaf3; border: 1px solid #b9e3c6; border-radius: 10px; }
.bp-apn[hidden] { display: none; }
.bp-apn b { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15.5px; letter-spacing: .02em; }
.bp-apn .bp-small { flex-basis: 100%; margin: 0; }

/* メールが届かないとき（開いて読む） */
.bp-mail summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; color: var(--bp-text); font-size: 15.5px; font-weight: 700; list-style: none; cursor: pointer; }
.bp-mail summary::-webkit-details-marker { display: none; }
.bp-mail summary > span { display: inline-flex; align-items: center; gap: 8px; }
.bp-mail summary svg { flex-shrink: 0; width: 20px; height: 20px; fill: none; stroke: var(--bp-teal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bp-mail summary > svg { stroke: #6b7884; transition: transform .25s var(--bp-ease); }
.bp-mail[open] summary > svg { transform: rotate(180deg); }
.bp-mail summary:focus-visible { outline: 3px solid var(--bp-focus); outline-offset: 4px; border-radius: 6px; }
.bp-mail ul { margin: 12px 0 0; padding: 0 0 0 1.2em; color: #3b4745; font-size: 14px; line-height: 1.65; }
.bp-mail li + li { margin-top: 6px; }

/* 右の欄（マイページ・カレンダー・特典） */
.bp-done-my .bp-next,
.bp-done-cta .bp-next { text-decoration: none; }
.bp-done-my .bp-next { margin-top: 14px; }
.bp-cal-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bp-cal-btns .bp-btn-line { display: inline-flex; flex: 1 1 140px; align-items: center; justify-content: center; text-decoration: none; }
.bp-done-perk { background: linear-gradient(180deg, #fffaf0 0%, #ffffff 100%); border-color: #f1d699; }
.bp-done-perk[hidden] { display: none; }
.bp-done-perk .bp-box-h svg { stroke: #b07a00; }
.bp-done-perk .bp-btn-line,
.bp-done-cta .bp-btn-line { display: inline-flex; align-items: center; justify-content: center; width: 100%; margin-top: 12px; text-decoration: none; }
.bp-done-more { margin-top: 14px; }
.bp-done-cta { display: flex; flex-direction: column; align-items: stretch; max-width: 420px; margin: 24px auto 0; }

@media (max-width: 999px) {
  .bp-done-grid { grid-template-columns: minmax(0, 1fr); }
  .bp-done-side > .bp-box:first-child { margin-top: 16px; }
}
@media (max-width: 600px) {
  .bp-done-mark,
  .bp-done-mark.is-check svg { width: 60px; height: 60px; }
  .bp-done-hero .step-title { font-size: 22px; }
  .bp-done-lead { font-size: 14.5px; }
  .bp-os { display: flex; }
  .bp-os-t { flex: 1 1 0; min-width: 0; }
}

@keyframes bpBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.025); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .bp-card,
  .bp-row,
  .bp-tick,
  .bp-bar,
  .bp-steps .step-num,
  .bp-more summary svg,
  .bp-opt,
  .bp-dev-check summary svg,
  .bp-sumbar-l svg { transition: none !important; }
  .bp-r-main.is-bump,
  .bp-card.is-bump,
  .bp-row.is-bump { animation: none !important; }
  .bp-card:hover { transform: none; }
  /* 完了の画面（フェーズ3）: ✓ は描かずに最初から出す */
  .bp-done-mark.is-check circle,
  .bp-done-mark.is-check path { animation: none !important; stroke-dashoffset: 0; }
  .bp-mail summary > svg { transition: none !important; }
}
