/* ============================================================
   すてぶるペイ デモ — 共通スタイル
   ============================================================ */

:root {
  /* ---------- Brand axis: 青基調（会議決定 2026-07-03: 3ページ統一）---------- */
  --brand: #2563EB;
  --brand-dark: #1D4ED8;
  --brand-deep: #16449A;
  --brand-soft: #E7EEFB;
  --brand-tint: #DBEAFE;
  --brand-accent: #60A5FA;
  --grad-brand: linear-gradient(135deg, #3B82F6 0%, #2563EB 55%, #1D4ED8 100%);

  /* ---------- EX axis: home-faithful deep blue ---------- */
  --ex: #2563EB;
  --ex-dark: #1D4ED8;
  --ex-deep: #16449A;
  --ex-soft: #DBEAFE;
  --ex-tint: #E7EEFB;
  --ex-ring: #3B82F6;
  --ex-accent: #72D0FF;
  --grad-ex: linear-gradient(135deg, #16449A 0%, #2563EB 60%, #3B82F6 100%);
  --grad-ex-accent: linear-gradient(120deg, #16449A 0%, #2563EB 50%, #72D0FF 100%);

  /* Compat: legacy liquid-* aliased to EX axis */
  --liquid-blue: #2563EB;
  --liquid-blue-dark: #1D4ED8;
  --liquid-blue-soft: #E7EEFB;

  /* ---------- Neutrals ---------- */
  --bg: #F6F7FB;
  --surface: #FFFFFF;
  --surface-2: #FBFBFD;
  --surface-sunken: #F1F3F9;
  --ink: #0B1020;
  --ink-2: #3A4256;
  --ink-3: #6B7488;
  --ink-4: #9AA2B4;
  --line: #E6E8F0;
  --line-2: #F0F2F7;
  --line-strong: #D5D9E4;
  /* Compat */
  --bg-card: #FFFFFF;

  /* ---------- Semantic colors (soft / strong / ink) ---------- */
  --success: #0E9F6E;
  --success-soft: #E3F6EF;
  --success-ink: #066B49;
  --warning: #B7791F;
  --warning-soft: #FBF1DF;
  --warning-ink: #8A5A12;
  --warn: #B7791F; /* compat */
  --danger: #DC2626;
  --danger-soft: #FCEBEB;
  --danger-ink: #991B1B;

  /* ---------- すてぶるペイ axis: 白ヘッダー + 青アクセント（青統一） ---------- */
  --stbl-ink: #0B1020;
  --stbl-band: #FFFFFF;         /* ヘッダーは白ベース + 濃紺ワードマーク */
  --stbl-surface: #FFFFFF;
  --stbl-bg: #F6F7FB;
  --stbl-line: #E6E8F0;
  --stbl-accent: #2563EB;       /* 青アクセント。差し替えはこの1行 */
  --stbl-accent-ink: #FFFFFF;   /* アクセント上の文字（青アクセント時は白） */

  --info: #2563EB;
  --info-soft: #E7EEFB;
  --info-ink: #16449A;

  /* ---------- Focus rings ---------- */
  --ring-brand: 0 0 0 3px rgba(37, 99, 235, 0.30);
  --ring-ex: 0 0 0 3px rgba(59, 130, 246, 0.32);
  --ring-danger: 0 0 0 3px rgba(220, 38, 38, 0.30);

  /* ---------- Typography ---------- */
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Hiragino Sans",
    "Noto Sans JP", sans-serif;
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Hiragino Sans",
    "Noto Sans JP", sans-serif;
  --font-num: "Inter", "SF Pro Display", -apple-system, sans-serif;
  --font-mono: "SF Mono", "Menlo", "Consolas", monospace;

  --text-2xs: 11px;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 15px;
  --text-lg: 17px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  --text-4xl: 38px;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  --lh-tight: 1.25;
  --lh-snug: 1.4;
  --lh-normal: 1.6;

  --tracking-tight: -0.01em;
  --tracking-wide: 0.06em;

  /* ---------- Spacing (8px grid) ---------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* ---------- Radius ---------- */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;
  /* Compat */
  --radius: 14px;

  /* ---------- Elevation ---------- */
  --elevation-1: 0 1px 2px rgba(11, 16, 32, 0.05), 0 1px 1px rgba(11, 16, 32, 0.04);
  --elevation-2: 0 2px 4px rgba(11, 16, 32, 0.05), 0 4px 12px rgba(11, 16, 32, 0.06);
  --elevation-3: 0 6px 16px rgba(11, 16, 32, 0.08), 0 12px 28px rgba(11, 16, 32, 0.07);
  --elevation-4: 0 16px 32px rgba(11, 16, 32, 0.10), 0 32px 64px rgba(11, 16, 32, 0.14);
  --elevation-modal: 0 24px 48px rgba(11, 16, 32, 0.16), 0 48px 96px rgba(11, 16, 32, 0.22);
  --shadow-brand: 0 6px 20px rgba(37, 99, 235, 0.28);
  --shadow-ex: 0 6px 20px rgba(37, 99, 235, 0.26);
  /* Compat */
  --shadow-sm: var(--elevation-1);
  --shadow-md: var(--elevation-2);
  --shadow-lg: var(--elevation-modal);

  /* ---------- Motion ---------- */
  --ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 120ms;
  --dur-base: 180ms;
  --dur-slow: 240ms;
  --dur-slower: 360ms;

  /* ---------- Inline icon masks (currentColor via mask) ---------- */
  --ic-bolt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13 2 4.5 13.5H11l-1 8.5L19.5 10H13z'/%3E%3C/svg%3E");
  --ic-bank: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10 12 4l9 6'/%3E%3Cpath d='M5 10v8M9 10v8M15 10v8M19 10v8M3 21h18'/%3E%3C/svg%3E");
  --ic-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  --ic-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E");
  --ic-warn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 2 20h20z'/%3E%3Cpath d='M12 10v4M12 17h.01'/%3E%3C/svg%3E");
  --ic-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
img, svg { max-width: 100%; }

/* display を持つクラス（.callout 等）が hidden 属性を上書きしないよう明示 */
[hidden] { display: none !important; }

/* 固有名詞などの途中改行を防ぐ */
.nowrap { white-space: nowrap; }

/* 日本語の説明テキストは対応ブラウザ（Chromium 119+）で文節単位の改行にする
   （ツールチップは幅が狭く行末が不自然に空くため対象外） */
.first-note p,
.pay-disclaimer,
.trust-note,
.pay-status,
.min-pay-note,
.fee-note,
.ex-sub {
  word-break: auto-phrase;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-feature-settings: "palt";
  font-size: var(--text-base);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font-family: inherit;
  transition: color var(--dur-fast) var(--ease-standard),
    background-color var(--dur-fast) var(--ease-standard),
    border-color var(--dur-fast) var(--ease-standard),
    box-shadow var(--dur-fast) var(--ease-standard),
    transform var(--dur-fast) var(--ease-standard);
}
button:focus-visible { outline: none; box-shadow: var(--ring-brand); }

input, select {
  font-family: inherit;
  font-size: var(--text-base);
  transition: border-color var(--dur-base) var(--ease-standard),
    box-shadow var(--dur-base) var(--ease-standard);
}

/* ---------- Numeric / amount treatment ---------- */
.price,
.summary-row.total span:last-child,
.receipt .row.total span:last-child,
.bank-row .v {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--tracking-tight);
}

/* =============== EC site =============== */

.site-header {
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-2) 100%);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  transition: box-shadow var(--dur-base) var(--ease-standard);
}
.site-header.is-scrolled { box-shadow: var(--elevation-1); }
.site-header .inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--space-2) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  min-width: 0;
  white-space: nowrap;
}
.brand-dot {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-xs);
  background: var(--grad-brand);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--ink-3);
  font-size: var(--text-sm);
  flex-shrink: 0;
}
.header-lp-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-full);
  color: var(--ink);
  background: #fff;
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color var(--dur-fast) var(--ease-standard),
    color var(--dur-fast) var(--ease-standard),
    background var(--dur-fast) var(--ease-standard);
}
.header-lp-link:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: var(--brand-soft);
}
.header-cart {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--ink-2);
}
.header-cart .ic { width: 18px; height: 18px; display: inline-flex; }
.header-cart .ic svg { width: 18px; height: 18px; }
.header-cart .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--space-10) var(--space-6) var(--space-16);
}

.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  margin-bottom: var(--space-8);
  box-shadow: var(--elevation-2);
  transition: box-shadow var(--dur-slow) var(--ease-standard);
}
.product:hover { box-shadow: var(--elevation-3); }
.product-image {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--surface-sunken), var(--line));
  box-shadow: inset 0 0 0 1px rgba(11, 16, 32, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  color: var(--ink-4);
}
.product-image > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-image .ph-icon { width: 38%; height: 38%; }
.product-image .ph-icon svg { width: 100%; height: 100%; }
.product-info h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  margin: 0 0 var(--space-2);
  color: var(--ink);
}
.product-info .sub {
  color: var(--ink-3);
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-4);
}
.product-info .price {
  font-size: var(--text-4xl);
  font-weight: var(--fw-bold);
  color: var(--ink);
  margin-bottom: var(--space-4);
  line-height: var(--lh-tight);
}
.product-info .price small {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--ink-3);
  margin-left: var(--space-2);
  letter-spacing: 0;
}
.product-info p.desc {
  color: var(--ink-2);
  font-size: var(--text-base);
  line-height: var(--lh-normal);
  margin: 0 0 var(--space-5);
}
.qty {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
  font-size: var(--text-base);
  color: var(--ink-2);
}
.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty-control button {
  background: var(--surface);
  border: 0;
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  font-size: var(--text-lg);
  color: var(--ink-2);
}
.qty-control button:hover { background: var(--surface-sunken); }
.qty-control button:focus-visible { outline: none; box-shadow: var(--ring-brand); }
.qty-control .num {
  padding: 0 var(--space-3);
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-weight: var(--fw-semibold);
  min-width: 30px;
  text-align: center;
}

.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: var(--space-6);
}
.checkout-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--elevation-2);
}
.checkout-card h2 {
  margin: 0 0 var(--space-4);
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
  color: var(--ink);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-2) 0;
  font-size: var(--text-base);
  color: var(--ink-2);
}
.summary-row.total {
  margin-top: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: var(--fw-bold);
}
.summary-row.total span:last-child {
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  color: var(--ink);
}

.pay-methods {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.pay-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: not-allowed;
  opacity: 0.55;
  font-size: var(--text-base);
}
.pay-option .icon {
  width: 36px; height: 24px;
  border-radius: var(--radius-xs);
  background: linear-gradient(135deg, #C7CCD8, #9AA2B4);
}
.pay-option .right {
  color: var(--ink-3);
  font-size: var(--text-xs);
  background: var(--surface-sunken);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}
.btn-jpyc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-4) var(--space-5);
  background: var(--grad-brand);
  color: #fff;
  border: 0;
  border-radius: var(--radius-md);
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  box-shadow: var(--elevation-2);
  transition: background-color var(--dur-fast) var(--ease-standard),
    box-shadow var(--dur-fast) var(--ease-standard),
    transform var(--dur-fast) var(--ease-standard);
}
.btn-jpyc:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-brand);
  background-image: linear-gradient(135deg, #4f8ff8 0%, #3670ee 55%, #2558dd 100%);
}
.btn-jpyc:active { transform: translateY(0) scale(0.99); }
.btn-jpyc:focus-visible { outline: none; box-shadow: var(--ring-brand); }
.btn-jpyc .modal-title .logo {
  background: #fff;
  color: var(--brand);
}
.btn-jpyc .badge {
  background: rgba(255, 255, 255, 0.20);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
  font-size: var(--text-2xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-wide);
}

.fee-note {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--ink-3);
  line-height: var(--lh-normal);
}

/* =============== Account status (EC) =============== */

.account-status {
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  box-shadow: var(--elevation-1);
}
.account-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}
.account-label {
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}
.account-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}
.account-badge.first {
  background: var(--warning-soft);
  color: var(--warning-ink);
}
.account-badge.first::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: currentColor;
}
.account-badge.repeat {
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.account-badge.repeat::before {
  content: "";
  width: 12px;
  height: 12px;
  background: currentColor;
  -webkit-mask: var(--ic-bolt) center / contain no-repeat;
  mask: var(--ic-bolt) center / contain no-repeat;
}
.account-detail {
  font-size: var(--text-sm);
  color: var(--ink-2);
  line-height: var(--lh-snug);
}
.account-detail strong { color: var(--ink); }
.account-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.account-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-2xs);
  background: var(--surface);
  border: 1px solid var(--brand-tint);
  color: var(--brand-dark);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
  font-weight: var(--fw-semibold);
}
.account-actions {
  margin-top: var(--space-2);
  text-align: right;
}
.btn-link {
  background: transparent;
  border: 0;
  color: var(--ink-3);
  font-size: var(--text-xs);
  cursor: pointer;
  padding: var(--space-1);
  border-radius: var(--radius-xs);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-link:hover { color: var(--brand); }
.btn-link:focus-visible { outline: none; box-shadow: var(--ring-brand); }

/* =============== JPYC modal =============== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 16, 32, 0.55);
  backdrop-filter: blur(8px) saturate(1.1);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: var(--space-6);
  animation: fade var(--dur-base) var(--ease-standard);
}
.modal-backdrop.open { display: flex; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--elevation-modal), inset 0 0 0 1px rgba(11, 16, 32, 0.04);
  width: 100%;
  max-width: 880px;
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-columns: 1fr 240px;
  overflow: hidden;
  animation: slide-up var(--dur-slow) var(--ease-out);
}

.modal-main {
  padding: var(--space-8);
  overflow-y: auto;
}
.modal-aside {
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--brand-soft) 100%);
  border-left: 1px solid var(--line);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}
.modal-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--text-md);
  color: var(--ink);
}
.modal-title .logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  background: var(--grad-brand);
  color: #fff;
  font-weight: var(--fw-bold);
  font-size: var(--text-xs);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.close-btn {
  background: transparent;
  border: 0;
  color: var(--ink-3);
  font-size: var(--text-xl);
  line-height: 1;
  cursor: pointer;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-xs);
}
.close-btn:hover { background: var(--surface-sunken); color: var(--ink); }
.close-btn:focus-visible { outline: none; box-shadow: var(--ring-brand); }

.step-h {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  margin: var(--space-2) 0 var(--space-1);
}
.step-lead {
  color: var(--ink-3);
  font-size: var(--text-base);
  line-height: var(--lh-normal);
  margin: 0 0 var(--space-6);
}
.step-lead strong { color: var(--ink-2); }

.step-progress {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  font-size: var(--text-sm);
}
.step-progress h3 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}
.step-progress ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.step-progress li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  color: var(--ink-3);
  position: relative;
}
.step-progress li .dot {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 2px solid var(--line-strong);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  font-family: var(--font-num);
  font-size: var(--text-2xs);
  color: #fff;
  transition: background-color var(--dur-base) var(--ease-standard),
    border-color var(--dur-base) var(--ease-standard),
    box-shadow var(--dur-base) var(--ease-standard);
}
.step-progress li.active { color: var(--ink); font-weight: var(--fw-semibold); }
.step-progress li.active .dot {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.step-progress li.done { color: var(--ink-2); }
.step-progress li.done .dot {
  border-color: var(--brand);
  background: var(--brand);
}
.step-progress li.done .dot::after {
  content: "✓";
  font-family: var(--font-num);
}
.step-progress li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 22px;
  width: 2px;
  height: calc(100% - 4px);
  background: var(--line);
}
.step-progress li:last-child::before { display: none; }
.step-progress li.done::before { background: var(--brand); }
.step-progress li.skipped { opacity: 0.7; }
.step-progress li .step-label {
  display: inline-flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--text-sm);
  line-height: var(--lh-tight);
}
.step-progress li .step-tag {
  display: inline-block;
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  padding: 1px var(--space-2);
  border-radius: var(--radius-full);
  width: max-content;
}
.step-progress li .step-tag.once {
  background: var(--warning-soft);
  color: var(--warning-ink);
}
.step-progress li .step-tag.skip {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.aside-foot {
  margin-top: auto;
  padding-top: var(--space-4);
  font-size: var(--text-2xs);
  color: var(--ink-3);
  line-height: var(--lh-snug);
}

/* ----- shared building blocks ----- */

.info-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  background: var(--surface);
  box-shadow: var(--elevation-1);
  margin-bottom: var(--space-3);
}
.info-card .label {
  font-size: var(--text-2xs);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-1);
}
.info-card .value {
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
  color: var(--ink);
  word-break: break-all;
}
.info-card .value.amount {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--tracking-tight);
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
}
.info-card.copyable .value-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}
.kv {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--space-2) var(--space-4);
  font-size: var(--text-base);
  margin: 0;
}
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: var(--fw-medium); word-break: break-all; }

.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-6);
  gap: var(--space-3);
}
.actions.end { justify-content: flex-end; }

.btn {
  appearance: none;
  border: 0;
  background: var(--grad-brand);
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  box-shadow: var(--elevation-2);
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-brand);
}
.btn:active { transform: translateY(0) scale(0.99); }
.btn:focus-visible { outline: none; box-shadow: var(--ring-brand); }
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--elevation-1);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn-ghost:hover {
  background: var(--surface-sunken);
  transform: translateY(-1px);
  box-shadow: var(--elevation-1);
}
.btn-secondary {
  background: var(--ink);
  color: #fff;
}
.btn-secondary:hover { background: var(--ink-2); }
.btn-liquid {
  background: var(--grad-ex);
  box-shadow: var(--elevation-2);
}
.btn-liquid:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-ex);
}
.btn-liquid:focus-visible { outline: none; box-shadow: var(--ring-ex); }

.btn-copy {
  background: var(--surface-sunken);
  color: var(--ink-2);
  font-size: var(--text-xs);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
  box-shadow: none;
  cursor: pointer;
}
.btn-copy:hover { background: var(--line); }
.btn-copy:focus-visible { outline: none; box-shadow: var(--ring-brand); }
.btn-copy.copied {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-color: var(--brand);
}

.form-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: var(--space-4);
  align-items: center;
  margin-bottom: var(--space-3);
  min-width: 0;
}
.form-row label {
  font-size: var(--text-sm);
  color: var(--ink-2);
}
.form-row input, .form-row select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-3);
  font-size: var(--text-base);
  background: var(--surface);
}
.form-row input:focus, .form-row select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--ring-brand);
}

.callout {
  background: var(--info-soft);
  color: var(--info-ink);
  border-left: 3px solid var(--info);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  margin: var(--space-4) 0;
}
.callout.blue {
  background: var(--ex-tint);
  color: var(--ex-deep);
  border-left-color: var(--ex);
}
.callout.warn {
  background: var(--warning-soft);
  color: var(--warning-ink);
  border-left-color: var(--warning);
}
/* Replace injected emoji (ⓘ / ⚠) with crisp SVG icons */
.callout > span[aria-hidden="true"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  font-size: 0;
  background: currentColor;
  -webkit-mask: var(--ic-info) center / contain no-repeat;
  mask: var(--ic-info) center / contain no-repeat;
}
.callout.warn > span[aria-hidden="true"] {
  -webkit-mask: var(--ic-warn) center / contain no-repeat;
  mask: var(--ic-warn) center / contain no-repeat;
}

/* ----- spinner / pulse ----- */

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
.spinner.dark {
  border-color: rgba(11, 16, 32, 0.18);
  border-top-color: var(--ink);
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ----- reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .btn:hover,
  .btn-ghost:hover,
  .btn-liquid:hover,
  .btn-jpyc:hover,
  .ex-btn:hover,
  .product:hover {
    transform: none !important;
  }
}

/* ----- Passkey dialog (OS-like) ----- */

.passkey-dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 16, 32, 0.40);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.passkey-dialog-backdrop.open { display: flex; animation: fade var(--dur-base) var(--ease-standard); }
.passkey-dialog {
  background: #F6F7F9;
  border-radius: var(--radius-lg);
  width: 360px;
  padding: var(--space-6) var(--space-6) var(--space-5);
  text-align: center;
  box-shadow: var(--elevation-4), inset 0 0 0 1px rgba(11, 16, 32, 0.05);
  animation: slide-up var(--dur-base) var(--ease-out);
}
.passkey-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--grad-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.30);
  animation: passkey-pulse 1.6s var(--ease-in-out) infinite;
}
.passkey-icon svg { width: 30px; height: 30px; display: block; }
@keyframes passkey-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.passkey-dialog h3 {
  margin: 0 0 var(--space-1);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--ink);
  line-height: var(--lh-tight);
}
.passkey-dialog p {
  margin: 0 0 var(--space-5);
  font-size: var(--text-sm);
  color: var(--ink-3);
  line-height: var(--lh-snug);
  white-space: pre-line; /* JS が textContent に入れる \n を改行として表示 */
}
.passkey-dialog .actions-row {
  display: flex;
  border-top: 1px solid var(--line-strong);
  margin: 0 calc(-1 * var(--space-6)) calc(-1 * var(--space-5));
}
.passkey-dialog .actions-row button {
  flex: 1;
  background: transparent;
  border: 0;
  padding: var(--space-3);
  font-family: var(--font-body);
  color: var(--ink-2);
  font-size: var(--text-base);
  cursor: pointer;
}
.passkey-dialog .actions-row button:hover { background: rgba(37, 99, 235, 0.06); }
.passkey-dialog .actions-row button:active { background: rgba(37, 99, 235, 0.10); }
.passkey-dialog .actions-row button:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.40);
}
.passkey-dialog .actions-row button + button {
  border-left: 1px solid var(--line-strong);
  color: var(--brand);
  font-weight: var(--fw-semibold);
}
@media (prefers-reduced-motion: reduce) {
  .passkey-icon { animation: none !important; }
}

/* ----- Reservation step / bank details ----- */

.bank-details {
  background: linear-gradient(180deg, var(--ex-tint) 0%, var(--surface) 70%);
  border: 1px solid var(--ex-soft);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  box-shadow: var(--elevation-1);
}
.bank-details h4 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  color: var(--ex-deep);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.bank-details h4::before {
  content: "";
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background: currentColor;
  -webkit-mask: var(--ic-bank) center / contain no-repeat;
  mask: var(--ic-bank) center / contain no-repeat;
}
.bank-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px dashed var(--line);
  font-size: var(--text-base);
  align-items: center;
}
.bank-row:last-child { border-bottom: 0; }
.bank-row .k { color: var(--ink-3); font-size: var(--text-xs); }
.bank-row .v { font-weight: var(--fw-semibold); word-break: break-all; color: var(--ink); }

/* ----- Waiting / Done step ----- */

.waiting-stage {
  text-align: center;
  padding: var(--space-5) 0 var(--space-2);
}
.big-spinner {
  width: 52px;
  height: 52px;
  border: 4px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.waiting-stage .big-spinner {
  margin: var(--space-5) auto;
}
.progress-log {
  list-style: none;
  margin: var(--space-6) 0 var(--space-2);
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.progress-log li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--ink-3);
  background: var(--surface);
  opacity: 0.5;
}
.progress-log li.done {
  opacity: 1;
  color: var(--ink);
  border-color: var(--brand);
  background: var(--brand-soft);
}
.progress-log li .check {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--line);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xs);
  flex-shrink: 0;
}
.progress-log li.done .check { background: var(--brand); }

.done-stage {
  text-align: center;
  padding: var(--space-2) 0;
}
.done-stage .badge-ok {
  width: 72px;
  height: 72px;
  margin: var(--space-1) auto var(--space-4);
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
}
.done-stage .badge-ok::before {
  content: "";
  width: 36px;
  height: 36px;
  background: currentColor;
  -webkit-mask: var(--ic-check) center / contain no-repeat;
  mask: var(--ic-check) center / contain no-repeat;
}
.done-stage .badge-ok.ex {
  background: var(--ex-soft);
  color: var(--ex);
}
.done-stage h2 {
  margin: 0 0 var(--space-1);
  font-size: var(--text-2xl);
}
.done-stage .sub {
  color: var(--ink-3);
  font-size: var(--text-base);
  margin-bottom: var(--space-5);
}
.receipt {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  text-align: left;
  background: var(--surface);
  margin: 0 auto var(--space-4);
}
.receipt h4 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-sm);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}
.receipt .row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-1) 0;
  font-size: var(--text-sm);
  color: var(--ink-2);
}
.receipt .row.total {
  border-top: 1px solid var(--line);
  margin-top: var(--space-2);
  padding-top: var(--space-3);
  font-weight: var(--fw-bold);
  color: var(--ink);
}

/* =============== JPYC EX (模擬) ページ =============== */

body.jpyc-ex {
  background: linear-gradient(180deg, var(--ex-tint) 0%, var(--surface) 55%);
  min-height: 100vh;
}
.ex-header {
  background: var(--grad-ex-accent);
  color: #fff;
  box-shadow: var(--elevation-2);
}
.ex-header-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ex-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--fw-extrabold);
  letter-spacing: var(--tracking-wide);
}
.ex-header-logo {
  display: block;
  height: 34px;
  width: auto;
  background: #fff;
  border-radius: var(--radius-xs);
  padding: 4px 10px;
  box-shadow: var(--elevation-1);
}
.ex-logo {
  font-size: var(--text-xl);
  font-weight: var(--fw-extrabold);
  background: rgba(255, 255, 255, 0.18);
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.06em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.ex-brand-name {
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  opacity: 0.92;
}
.ex-step-tag {
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.16);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.ex-main {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-10) var(--space-6) var(--space-16);
}

.ex-progress {
  list-style: none;
  margin: 0 0 var(--space-6);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-2);
  font-size: var(--text-2xs);
}
.ex-progress li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  color: var(--ink-3);
  position: relative;
}
.ex-progress li .dot {
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 2px solid var(--line-strong);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--dur-base) var(--ease-standard),
    border-color var(--dur-base) var(--ease-standard),
    box-shadow var(--dur-base) var(--ease-standard);
}
.ex-progress li.active { color: var(--ink); font-weight: var(--fw-bold); }
.ex-progress li.active .dot {
  background: var(--ex);
  border-color: var(--ex);
  box-shadow: 0 0 0 4px var(--ex-soft);
}
.ex-progress li.done { color: var(--ink-2); }
.ex-progress li.done .dot { background: var(--ex); border-color: var(--ex); }
.ex-progress li.done .dot::after {
  content: "";
  width: 8px;
  height: 8px;
  background: #fff;
  -webkit-mask: var(--ic-check) center / contain no-repeat;
  mask: var(--ic-check) center / contain no-repeat;
}
.ex-progress li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 14px;
  right: -8px;
  height: 2px;
  background: var(--line-strong);
  z-index: 0;
}
.ex-progress li.done::after { background: var(--ex); }
.ex-progress li .step-label {
  font-size: var(--text-2xs);
  line-height: var(--lh-snug);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ex-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  min-width: 0;
  box-shadow: var(--elevation-3);
  transition: box-shadow var(--dur-slow) var(--ease-standard);
}
.ex-card:hover { box-shadow: var(--elevation-4); }
.ex-card h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  margin: 0 0 var(--space-2);
}
.ex-card .ex-sub {
  color: var(--ink-3);
  font-size: var(--text-md);
  margin: 0 0 var(--space-6);
  line-height: var(--lh-normal);
}
.ex-card .ex-sub strong { color: var(--ink-2); font-weight: var(--fw-semibold); }

.ex-form { margin-bottom: var(--space-3); }
.ex-form .form-row { grid-template-columns: minmax(0, 150px) minmax(0, 1fr); }
.ex-form .form-row label { font-size: var(--text-sm); color: var(--ink-2); }
.ex-form .form-row input,
.ex-form .form-row select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  background: var(--surface);
  color: var(--ink);
}
.ex-form .form-row input:focus,
.ex-form .form-row select:focus {
  outline: none;
  border-color: var(--ex-ring);
  box-shadow: var(--ring-ex);
}
.check-line {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--ink-2);
}
.check-line input[type="checkbox"] {
  width: auto;
  min-width: 0;
}

.ex-actions {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.ex-actions.end { justify-content: flex-end; }
.ex-btn {
  background: var(--ex);
  border-radius: var(--radius-full);
  padding: var(--space-3) var(--space-8);
  box-shadow: var(--elevation-2);
}
.ex-btn:hover {
  background: var(--ex-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-ex);
}
.ex-btn:active { transform: translateY(0) scale(0.99); }
.ex-btn:focus-visible { outline: none; box-shadow: var(--ring-ex); }

@media (max-width: 640px) {
  .ex-header-inner {
    padding: var(--space-3) var(--space-4);
    gap: var(--space-3);
  }
  .ex-header-logo {
    height: 30px;
    padding-inline: var(--space-2);
  }
  .ex-step-tag {
    flex-shrink: 0;
    padding-inline: var(--space-2);
  }
  .ex-main {
    padding: var(--space-6) var(--space-4) var(--space-10);
  }
  .ex-card {
    padding: var(--space-5);
    border-radius: var(--radius-md);
  }
  .ex-card h1 {
    font-size: var(--text-2xl);
  }
  .ex-card .ex-sub {
    font-size: var(--text-base);
    margin-bottom: var(--space-5);
  }
  .ex-form .form-row {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
  .ex-form .form-row label {
    margin-bottom: 0;
  }
  .ex-form .form-row > label:empty {
    display: none;
  }
  .check-line {
    align-items: flex-start;
  }
  .check-line input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 4px;
  }
  .ex-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .ex-actions.end {
    align-items: stretch;
  }
  .ex-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ----- KYC phone mock ----- */

.kyc-pair {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-6);
  align-items: flex-start;
  margin: var(--space-2) 0;
}
.kyc-phone-mock { display: flex; justify-content: center; }
.phone-frame {
  width: 180px;
  height: 320px;
  background: var(--ink);
  border-radius: var(--radius-xl);
  padding: 10px;
  box-shadow: var(--elevation-3);
  position: relative;
}
.phone-frame::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 5px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-full);
  z-index: 2;
}
.phone-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--ex-tint) 0%, var(--ex-soft) 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: background var(--dur-slow) var(--ease-standard);
}
.phone-screen.ok {
  background: linear-gradient(180deg, var(--success-soft) 0%, #CFF3E6 100%);
}
.phone-bar {
  background: var(--ex);
  color: #fff;
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  padding: 18px 10px 8px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  letter-spacing: 0.02em;
}
.phone-bar-dot {
  width: 6px; height: 6px;
  border-radius: var(--radius-full);
  background: #fff;
}
.phone-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  gap: var(--space-3);
  text-align: center;
}
.phone-card-icon {
  width: 90px;
  height: 60px;
  perspective: 600px;
}
.phone-card {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #3B82F6, var(--ex-deep));
  border-radius: var(--radius-xs);
  position: relative;
  transform: rotate(-6deg);
  box-shadow: var(--elevation-2);
}
.phone-card-strip {
  position: absolute;
  top: 12px;
  left: 0; right: 0;
  height: 8px;
  background: rgba(255, 255, 255, 0.22);
}
.phone-card-chip {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 16px;
  height: 12px;
  background: linear-gradient(135deg, #F4D58D, #D4A437);
  border-radius: var(--radius-xs);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.phone-status {
  font-size: var(--text-2xs);
  color: var(--ink-2);
  line-height: var(--lh-snug);
}
.phone-status .ok-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-right: 4px;
  border-radius: var(--radius-full);
  background: var(--success);
  color: #fff;
  font-size: 9px;
  font-weight: var(--fw-bold);
  vertical-align: middle;
}

.kyc-instructions { font-size: var(--text-sm); }
.kyc-steps {
  margin: 0 0 var(--space-4);
  padding-left: var(--space-5);
  color: var(--ink-2);
}
.kyc-steps li { margin-bottom: var(--space-2); }
.kyc-steps strong { color: var(--ink); }
.qr-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  text-align: center;
  cursor: pointer;
  transition: background-color var(--dur-base) var(--ease-standard),
    border-color var(--dur-base) var(--ease-standard),
    box-shadow var(--dur-base) var(--ease-standard);
}
.qr-box:hover { background: var(--ex-tint); border-color: var(--ex-soft); }
.qr-box:focus-visible { outline: none; box-shadow: var(--ring-ex); }
.qr-mock {
  width: 100px;
  height: 100px;
  margin: 0 auto var(--space-2);
  background:
    repeating-linear-gradient(0deg, var(--ink) 0 3px, transparent 3px 6px),
    repeating-linear-gradient(90deg, var(--ink) 0 3px, transparent 3px 6px),
    #fff;
  border-radius: var(--radius-xs);
  position: relative;
}
.qr-mock::before, .qr-mock::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 3px;
}
.qr-mock::before {
  top: 4px;
  left: 4px;
  box-shadow: 0 74px 0 -4px #fff, 0 74px 0 0 var(--ink);
}
.qr-mock::after { top: 4px; right: 4px; }
.qr-caption {
  font-size: var(--text-2xs);
  color: var(--ink-3);
}

/* ----- Reserve card ----- */

.reserve-card {
  background: var(--ex-tint);
  border: 1px solid var(--ex);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
}
.reserve-card h4 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  color: var(--ex-deep);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}
.reserve-card .kv {
  grid-template-columns: 160px 1fr;
  font-size: var(--text-base);
}
.reserve-card .kv dd { font-weight: var(--fw-semibold); }
.muted-sm { font-size: var(--text-2xs); color: var(--ink-3); font-weight: var(--fw-regular); }

.reservation-pending {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--ex-deep);
  background: var(--ex-soft);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
  font-family: var(--font-mono);
}
.pending-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--warning);
  flex-shrink: 0;
  animation: pulse 1.4s var(--ease-in-out) infinite;
}
.pending-dot.ok {
  background: var(--ex);
  animation: none;
}

/* ----- Sub-step list (in modal jpyc-ex step) ----- */

.sub-step-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sub-step-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 13px;
  color: var(--ink-2);
}
.sub-step-list li .dot {
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  border: 2px solid var(--line-strong);
  background: var(--surface);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #fff;
}
.sub-step-list li.done .dot {
  background: var(--brand);
  border-color: var(--brand);
}
.sub-step-list li.done .dot::after { content: "✓"; font-family: var(--font-num); }
.sub-step-list li .step-tag {
  display: inline-block;
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  padding: 1px var(--space-2);
  border-radius: var(--radius-full);
  margin-left: var(--space-1);
}
.sub-step-list li .step-tag.once { background: var(--warning-soft); color: var(--warning-ink); }
.sub-step-list li .step-tag.skip { background: var(--brand-soft); color: var(--brand-dark); }

/* ----- UserOperation 可視化 (sign step) ----- */

.userop-card {
  background: var(--ink);
  color: #E2E8F0;
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin: var(--space-4) 0 var(--space-2);
  box-shadow: var(--elevation-2), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.userop-card summary {
  cursor: pointer;
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  color: var(--brand-accent);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  list-style: none;
}
.userop-card summary::-webkit-details-marker { display: none; }
.userop-card summary::before {
  content: "▸ ";
  display: inline-block;
  margin-right: 4px;
  transition: transform 0.15s;
}
.userop-card[open] summary::before { content: "▾ "; }

.userop-body {
  margin: var(--space-3) 0 var(--space-2);
  padding: var(--space-3);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  line-height: 1.55;
  color: #E8EAF4;
  white-space: pre-wrap;
  word-break: break-all;
}
.userop-note {
  font-size: var(--text-xs);
  color: #CBD5E1;
  background: rgba(67, 56, 202, 0.18);
  border-left: 3px solid var(--brand);
  padding: var(--space-2) var(--space-3);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: var(--space-2) 0;
  line-height: 1.55;
}
.userop-note code {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
}
.userop-hash {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-2xs);
  margin-top: var(--space-2);
  font-family: var(--font-mono);
  color: #CBD5E1;
}
.userop-k {
  background: var(--brand);
  color: #fff;
  padding: 1px 7px;
  border-radius: var(--radius-xs);
  font-family: var(--font-num);
  font-weight: var(--fw-bold);
  font-size: var(--text-2xs);
  letter-spacing: 0.04em;
  text-transform: lowercase;
}
.userop-v { color: var(--brand-accent); font-family: var(--font-mono); }

/* ----- API overlay (modal -> JPYC EX 遷移時) ----- */

.api-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  z-index: 5;
  animation: fade var(--dur-base) var(--ease-standard);
}
.modal-main { position: relative; }
.api-overlay-card {
  width: 100%;
  max-width: 420px;
  text-align: center;
}
.api-overlay-card .big-spinner {
  margin: 0 auto var(--space-4);
  border-top-color: var(--ex);
}
.api-overlay-card h3 {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--ink);
}
.api-overlay-payload {
  background: var(--ink);
  color: #CBD5E1;
  border-radius: var(--radius-sm);
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.55;
  margin-bottom: var(--space-3);
  box-shadow: var(--elevation-2), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.api-row {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  flex-wrap: wrap;
}
.api-k {
  background: var(--ex);
  color: #fff;
  padding: 1px 7px;
  border-radius: var(--radius-xs);
  font-family: var(--font-num);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
}
.api-v {
  color: var(--ex-accent);
  font-family: var(--font-mono);
  word-break: break-all;
}
.api-body {
  margin: 0;
  padding: var(--space-2) 0 2px;
  white-space: pre-wrap;
  color: #F1F5F9;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.api-overlay-sub {
  font-size: var(--text-xs);
  color: var(--ink-3);
  margin: 0;
}

/* =============== misc =============== */

.muted { color: var(--ink-3); }
.center { text-align: center; }

.address-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  word-break: break-all;
}

@media (max-width: 720px) {
  .kyc-pair { grid-template-columns: 1fr; }
  .ex-progress { grid-template-columns: repeat(2, 1fr); }
  .ex-progress li:nth-child(odd):not(:last-child)::after { display: none; }
  .ex-progress li:nth-child(even):not(:last-child)::after { display: none; }
}

@media (max-width: 880px) {
  .modal {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 24px);
  }
  .modal-aside {
    order: -1;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px 20px;
  }
  .modal-aside .aside-foot { display: none; }
  .step-progress ol {
    flex-direction: row;
    overflow-x: auto;
    gap: 10px;
  }
  .step-progress li::before { display: none; }
  .step-progress li { white-space: nowrap; }
  .product { grid-template-columns: 1fr; }
  .checkout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: var(--space-2); }
  .form-row label { margin-bottom: 0; }
}

/* ===== 専用決済ページ (pay.html) — LP トーン準拠 ===== */
.pay-page {
  --pay-ink: #161616;
  --pay-gray: #6b6b6b;
  --pay-line: #e2e2e2;
  --pay-paper: #ffffff;
  --pay-paper-dim: #f7f7f6;
  --pay-accent: #2775ca;
  --pay-accent-dark: #1f5fa8;
  background: var(--pay-paper);
  color: var(--pay-ink);
  min-height: 100vh;
}
.pay-page .ex-main {
  width: min(100% - 48px, 560px);
  max-width: none;
  padding: 72px 0 56px;
}

/* ヘッダー: LP と同じ白ベース + 1px 罫線 */
.pay-page .ex-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid var(--pay-line);
  box-shadow: none;
  backdrop-filter: blur(8px);
}
.pay-page .ex-header-inner {
  width: min(100% - 48px, 1080px);
  max-width: none;
  min-height: 64px;
  align-items: center;
  padding: 0;
}
.pay-page .ex-brand { align-items: center; }
.pay-page .stbl-logo {
  display: block;
  height: 24px;
  width: auto;
}
.pay-page .ex-back {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--pay-ink);
  border-radius: 0;
  color: var(--pay-ink);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.pay-page .ex-back:hover {
  color: var(--pay-accent);
  border-color: var(--pay-accent);
}
.pay-page .ex-back:focus-visible { outline: 2px solid var(--pay-ink); outline-offset: 2px; box-shadow: none; }

/* カード: フラットな白面・黒見出し・罫線 */
.pay-page .ex-card {
  background: var(--pay-paper);
  border: 1px solid var(--pay-line);
  border-radius: 0;
  box-shadow: none;
  padding: 34px;
}
.pay-page .ex-card:hover { box-shadow: none; }
.pay-page .ex-card h1 {
  color: var(--pay-ink);
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: 0;
  margin-bottom: 14px;
}
.pay-page .ex-card .ex-sub { color: var(--ink-3); }
.pay-page .bank-row .k { color: var(--ink-3); }
.pay-page .bank-row .v { color: var(--stbl-ink); }
.pay-page .bank-details { border-color: var(--stbl-line); }

/* CTA: アクセント背景 + 黒文字 */
.pay-page .ex-btn,
.pay-page .btn:not(.btn-ghost) {
  background: var(--stbl-accent);
  color: var(--stbl-accent-ink);
  border: none;
  font-weight: 700;
  transition: transform .08s ease, box-shadow .12s ease, filter .12s ease;
}
.pay-page .ex-btn:hover,
.pay-page .btn:not(.btn-ghost):hover { filter: none; transform: none; box-shadow: none; }
.pay-page .ex-btn:active,
.pay-page .btn:not(.btn-ghost):active { transform: translateY(0) scale(0.99); }
.pay-page .ex-btn:focus-visible,
.pay-page .btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,0.45); } /* rgba: --stbl-accent を展開、CSS vars は rgba() 内不可 */
.pay-page .btn-ghost {
  background: transparent;
  color: var(--stbl-ink);
  border: 1.5px solid var(--stbl-ink);
}

/* 進捗 / チェック: アクセント */
.pay-page .progress-log li.done .check { background: var(--stbl-accent); color: var(--stbl-accent-ink); border-color: var(--stbl-accent); }
.pay-page .big-spinner { border-top-color: var(--stbl-accent); } /* 既存 .big-spinner は border-top-color: var(--brand) で spinning arc を指定 */
.pay-page .callout { border-left-color: var(--stbl-accent); }

/* 完了画面: アクセントの大チェック（.done-stage .badge-ok は詳細度 0,2,0 → .pay-page .done-stage で 0,3,0 に上げて確実に勝つ） */
.pay-page .done-stage .badge-ok { background: var(--stbl-accent); color: var(--stbl-accent-ink); }

/* disclaimer */
.pay-disclaimer {
  margin: 18px auto 0;
  max-width: 560px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--pay-gray, #6b6b6b);
  text-align: left;
  border-top: 1px solid var(--pay-line, #e2e2e2);
  padding-top: 14px;
}

/* ============================================================
   加盟店ページの実店舗風スタイル（.shop スコープ）
   全セレクタは .shop を前置し pay.html / jpyc-ex.html に影響しない
   ============================================================ */

/* ---------- ヘッダー内ナビ & 検索 ---------- */

.shop .shop-nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-width: 0;
}
.shop .shop-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-standard),
    border-color var(--dur-fast) var(--ease-standard);
}
.shop .shop-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--brand);
}
.shop .shop-nav-lp {
  color: var(--brand-dark);
  font-weight: var(--fw-bold);
}

.shop .shop-search input {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  color: var(--ink);
  background: var(--surface-sunken);
  width: 180px;
  outline: none;
  transition: border-color var(--dur-base) var(--ease-standard),
    box-shadow var(--dur-base) var(--ease-standard),
    width var(--dur-slow) var(--ease-out);
}
.shop .shop-search input:focus {
  border-color: var(--brand);
  box-shadow: var(--ring-brand);
  width: 220px;
  background: var(--surface);
}

/* ---------- パンくずナビ ---------- */

.shop .breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--ink-3);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}
.shop .breadcrumb a {
  color: var(--ink-3);
  text-decoration: none;
}
.shop .breadcrumb a:hover {
  color: var(--brand);
  text-decoration: underline;
}
.shop .breadcrumb span[aria-current="page"] {
  color: var(--ink-2);
  font-weight: var(--fw-medium);
}

/* ---------- 商品ギャラリー ---------- */

.shop .gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.shop .gallery-main {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}

.shop .gallery-img {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.shop .gallery-img.active {
  display: block;
}
.shop .gallery-img svg {
  width: 100%;
  height: 100%;
  display: block;
}

.shop .gallery-thumbs {
  display: flex;
  flex-direction: row;
  gap: var(--space-2);
}

.shop .thumb {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  padding: 4px;
  cursor: pointer;
  overflow: hidden;
  outline: none;
  transition: border-color var(--dur-fast) var(--ease-standard),
    box-shadow var(--dur-fast) var(--ease-standard);
}
.shop .thumb:hover {
  border-color: var(--ink-3);
}
.shop .thumb.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand);
}
.shop .thumb svg {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: var(--radius-xs);
}

/* ---------- 評価・星 ---------- */

.shop .rating {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
}
.shop .rating .stars {
  color: #F5A623;
  font-size: var(--text-md);
  letter-spacing: 1px;
}
.shop .rating strong {
  font-weight: var(--fw-bold);
  color: var(--ink);
}
.shop .rating a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: var(--text-xs);
}
.shop .rating a:hover {
  color: var(--brand-dark);
}

/* ---------- 在庫・配送・ポイント ---------- */

.shop .stock {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-2);
}
.shop .stock.low {
  color: var(--danger-ink);
  background: var(--danger-soft);
  padding: 2px var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
}

.shop .delivery,
.shop .points {
  display: block;
  font-size: var(--text-xs);
  color: var(--ink-3);
  margin-bottom: var(--space-2);
}

/* ---------- スペックテーブル ---------- */

.shop .spec {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  margin: var(--space-4) 0;
}
.shop .spec tr {
  border-bottom: 1px solid var(--line);
}
.shop .spec tr:last-child {
  border-bottom: none;
}
.shop .spec th {
  text-align: left;
  color: var(--ink-3);
  font-weight: var(--fw-medium);
  padding: var(--space-2) var(--space-4) var(--space-2) 0;
  width: 6.5em;
  vertical-align: top;
  white-space: nowrap;
}
.shop .spec td {
  color: var(--ink-2);
  padding: var(--space-2) var(--space-2);
  vertical-align: top;
}

/* ---------- トラストバッジ ---------- */

.shop .trust-badges {
  list-style: none;
  margin: 0 0 var(--space-6);
  padding: var(--space-3) var(--space-5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-6);
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--ink-2);
}
.shop .trust-badges li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

/* ---------- カスタマーレビュー ---------- */

.shop .reviews {
  margin-top: var(--space-8);
  margin-bottom: var(--space-8);
}
.shop .reviews h2 {
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  color: var(--ink);
  margin: 0 0 var(--space-6);
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.shop .reviews-avg {
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  color: var(--ink-3);
}

.shop .review {
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--line);
}
.shop .review:last-child {
  border-bottom: none;
}
.shop .review-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
  flex-wrap: wrap;
}
.shop .review-stars {
  color: #F5A623;
  font-size: var(--text-base);
  letter-spacing: 1px;
}
.shop .review-head strong {
  font-weight: var(--fw-semibold);
  color: var(--ink);
  font-size: var(--text-sm);
}
.shop .verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  color: var(--success-ink);
  background: var(--success-soft);
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}
.shop .verified::before {
  content: "\2713";
  font-size: 10px;
}
.shop .review-date {
  font-size: var(--text-xs);
  color: var(--ink-4);
  margin-left: auto;
}
.shop .review p {
  font-size: var(--text-sm);
  color: var(--ink-2);
  line-height: var(--lh-normal);
  margin: 0 0 var(--space-2);
}
.shop .review-helpful {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-3);
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-standard),
    color var(--dur-fast) var(--ease-standard);
}
.shop .review-helpful:hover {
  background: var(--surface-sunken);
  color: var(--ink-2);
}
.shop .review-helpful:focus-visible {
  outline: none;
  box-shadow: var(--ring-brand);
}

/* ---------- フッター ---------- */

.shop .site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.70);
  margin-top: var(--space-8);
}
.shop .footer-cols {
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--space-10) var(--space-6) var(--space-8);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
}
.shop .footer-cols h4 {
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  color: #fff;
  margin: 0 0 var(--space-3);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}
.shop .footer-cols p {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.58);
  line-height: var(--lh-normal);
  margin: 0;
}
.shop .footer-cols ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.shop .footer-cols ul a {
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color var(--dur-fast) var(--ease-standard);
}
.shop .footer-cols ul a:hover {
  color: #fff;
}
.shop .footer-bottom {
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.42);
}

/* ---------- レスポンシブ（.shop スコープ） ---------- */

@media (max-width: 880px) {
  .shop .site-header .inner {
    flex-wrap: wrap;
    gap: var(--space-3);
  }
  .shop .shop-nav {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-5);
  }
  .shop main {
    padding-top: var(--space-8);
  }
  .shop .footer-cols {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }
  .shop .trust-badges {
    gap: var(--space-2) var(--space-4);
  }
}

@media (max-width: 640px) {
  .shop .site-header .inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: var(--space-2) var(--space-4);
  }
  .shop .brand {
    font-size: var(--text-md);
  }
  .shop .brand-dot {
    width: 18px;
    height: 18px;
  }
  .shop .header-actions {
    gap: var(--space-2);
  }
  .shop .header-lp-link {
    min-height: 32px;
    padding: 0 var(--space-3);
    font-size: var(--text-xs);
  }
  .shop .shop-nav {
    flex-wrap: nowrap;
    gap: var(--space-4);
    overflow-x: auto;
    padding: 2px 0 var(--space-1);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .shop .shop-nav::-webkit-scrollbar {
    display: none;
  }
  .shop main {
    padding: var(--space-6) var(--space-4) var(--space-10);
  }
  .shop .breadcrumb {
    margin-bottom: var(--space-4);
  }
  .shop .cart-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-4);
  }
  .shop .checkout {
    gap: var(--space-4);
  }
  .shop .checkout-card {
    padding: var(--space-4);
    border-radius: var(--radius-md);
  }
  .shop .account-status-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .shop .account-badge {
    white-space: normal;
  }
  .shop .trust-badges {
    padding: var(--space-3) var(--space-4);
    gap: var(--space-2) var(--space-4);
  }
  .shop .footer-cols {
    padding: var(--space-8) var(--space-4) var(--space-6);
  }
  .shop .footer-bottom {
    padding: var(--space-4);
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .shop .footer-cols {
    grid-template-columns: 1fr;
  }
  .shop .gallery-thumbs {
    gap: var(--space-1);
  }
  .shop .thumb {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 420px) {
  .shop .header-lp-link {
    display: none;
  }
  .shop .header-cart {
    min-height: 32px;
    padding: 0 var(--space-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-full);
    background: var(--surface);
    text-decoration: none;
  }
  .shop .shop-nav {
    gap: var(--space-3);
  }
  .shop .shop-nav a {
    font-size: var(--text-xs);
  }
}


/* ============================================================
   専用決済ページ: 1 画面・4 ステート（計画 §3.6）
   ============================================================ */

/* 注文明細（Stripe: 合計は確定ボタン近傍・太字・最大サイズ） */
.pay-page .pay-merchant {
  color: var(--pay-gray);
  font-size: 14px;
  margin: 0 0 26px;
  line-height: 1.7;
}
.pay-page .pay-merchant strong { color: var(--pay-ink); }
.pay-page .pay-kicker {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  color: var(--pay-gray);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}
.pay-page .order-list {
  border-top: 1px solid var(--pay-ink);
  border-bottom: 1px solid var(--pay-line);
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  padding: 18px 0;
  margin-bottom: 22px;
  background: transparent;
}
.pay-page .order-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  padding: 0;
  font-weight: var(--fw-bold);
  color: var(--pay-ink);
}
.pay-page .order-total > span:first-child {
  color: var(--pay-gray);
  font-size: 13px;
  font-weight: 600;
}
.pay-page .order-amount {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  color: var(--pay-ink);
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0;
}
.pay-page .wallet-balance {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--pay-line);
  color: var(--pay-gray);
  font-size: 13px;
  font-weight: 600;
}
.pay-page .wallet-balance strong {
  color: var(--pay-ink);
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  font-weight: 800;
}

/* 説明ブロック: LP同様に薄い面ではなく罫線で整理 */
.pay-page .pay-note {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  margin: 0 0 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--pay-line);
}
.pay-page .ex-note-logo {
  display: block;
  height: auto;
  max-width: 104px;
  width: auto;
  margin: 0 auto;
}
.pay-page .first-note {
  width: 100%;
  max-width: 430px;
  font-size: 13px;
  color: var(--pay-gray);
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin: 0;
  line-height: 1.75;
}
.pay-page .first-note p { margin: 0; }
.pay-page .first-note p + p { margin-top: 4px; }

/* 支払いボタン（高さ44px・金額埋め込み・§3.6.2） */
.pay-page .pay-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--pay-accent);
  border-radius: 0;
  background: var(--pay-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.pay-page .pay-cta:hover:not(:disabled) {
  transform: none;
  box-shadow: none;
  background: var(--pay-accent-dark);
  border-color: var(--pay-accent-dark);
}
.pay-page .pay-cta:active:not(:disabled) { transform: none; }
.pay-page .pay-cta:focus-visible { outline: 2px solid var(--pay-ink); outline-offset: 2px; box-shadow: none; }
.pay-page .pay-cta:disabled { cursor: default; }
.pay-page .pay-cta.loading { opacity: 0.9; }
.pay-page .pay-cta.success { background: var(--success); }
.pay-page .pay-cta-check {
  font-size: var(--text-lg);
  font-weight: var(--fw-extrabold);
  animation: pop-in var(--dur-slow) var(--ease-out);
}
@keyframes pop-in {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* 完了ステータス（aria-live） */
.pay-page .pay-status {
  min-height: 1em;
  font-size: 13px;
  color: var(--success-ink);
  text-align: left;
  margin: 12px 0 0;
}

/* 失敗: 同一画面・インラインエラー + シェイク */
.pay-page .pay-error { margin: 0 0 var(--space-3); }
.pay-page .ex-card.shake { animation: shake 0.4s var(--ease-standard); }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}

/* 信頼マイクロコピー / Powered by（確定ボタン直下が定位置） */
.pay-page .trust-note {
  font-size: 12px;
  color: var(--pay-gray);
  text-align: left;
  margin: 18px 0 0;
  line-height: 1.7;
}
.pay-page .powered {
  font-size: 11px;
  color: var(--pay-gray);
  text-align: left;
  letter-spacing: 0;
  margin: 6px 0 0;
}

@media (max-width: 640px) {
  .pay-page .ex-main {
    width: min(100% - 32px, 560px);
    padding: 40px 0 44px;
  }
  .pay-page .ex-header-inner {
    width: min(100% - 32px, 1080px);
  }
  .pay-page .ex-card {
    padding: 24px;
  }
  .pay-page .order-total {
    align-items: flex-start;
    flex-direction: column;
  }
  .pay-page .order-amount {
    font-size: 36px;
  }
  .pay-page .pay-note {
    gap: 12px;
  }
  .pay-page .ex-note-logo {
    max-width: 96px;
  }
  .pay-page .first-note {
    max-width: none;
  }
  .pay-page .pay-merchant .tip .tip-bubble {
    left: auto;
    right: -8px;
    transform: none;
  }
  .pay-page .pay-merchant .tip .tip-bubble::after {
    left: auto;
    right: 10px;
    transform: none;
  }
}

@media (max-width: 360px) {
  .pay-page .tip .tip-bubble {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 72px;
    bottom: auto;
    width: auto;
    transform: none;
  }
  .pay-page .tip .tip-bubble::after {
    display: none;
  }
}

/* ============================================================
   仕組み説明ツールチップ（計画 §3.6.5・CSS のみ・CSP/TT 両立）
   ============================================================ */
.tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  cursor: help;
  vertical-align: baseline;
}
.tip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-style: normal;
  color: var(--ink-3);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  line-height: 1;
}
.tip:hover .tip-icon,
.tip:focus .tip-icon,
.tip:focus-within .tip-icon {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}
.tip:focus { outline: none; }
.tip .tip-bubble {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: min(240px, calc(100vw - 48px));
  background: var(--ink);
  color: #F1F5F9;
  font-size: var(--text-xs);
  font-weight: var(--fw-regular);
  line-height: var(--lh-snug);
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  box-shadow: var(--elevation-3);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-base) var(--ease-standard),
    visibility var(--dur-base) var(--ease-standard);
  z-index: 50;
  pointer-events: none;
}
.tip .tip-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--ink);
}
.tip:hover .tip-bubble,
.tip:focus .tip-bubble,
.tip:focus-within .tip-bubble {
  opacity: 1;
  visibility: visible;
}

/* ============================================================
   加盟店: カート / あわせて買いたい（§3.1）
   ============================================================ */
.shop .cart-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-tight);
  margin: 0 0 var(--space-5);
}
.shop .cart-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px dashed var(--line);
}
/* 商品サムネイル（assets/img/*.svg。カート/決済ページ共有） */
.cart-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  object-fit: cover;
  background: var(--surface-sunken);
  display: block;
}
.shop .cart-row .cart-name {
  font-size: var(--text-sm);
  color: var(--ink);
  font-weight: var(--fw-medium);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.shop .cart-row .cart-unit {
  font-size: var(--text-xs);
  color: var(--ink-3);
  font-weight: var(--fw-regular);
}
.shop .cart-row .cart-line-total {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-weight: var(--fw-semibold);
  min-width: 72px;
  text-align: right;
  white-space: nowrap;
}
.shop .cart-row .cart-remove {
  background: transparent;
  border: 0;
  color: var(--ink-4);
  font-size: var(--text-xs);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: var(--space-1);
  border-radius: var(--radius-xs);
}
.shop .cart-row .cart-remove:hover { color: var(--danger); }
.shop .cart-row .cart-remove:focus-visible { outline: none; box-shadow: var(--ring-brand); }
.shop .cart-empty {
  color: var(--ink-3);
  font-size: var(--text-sm);
  padding: var(--space-4) 0;
  margin: 0;
}
/* 決済ボタン（ロゴ入り・§3.2/§3.6.2: 高さ44px以上・ロゴは固定） */
.btn-jpyc { min-height: 48px; justify-content: center; gap: var(--space-2); }
.btn-jpyc:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--elevation-1);
}
.btn-jpyc-logo {
  display: block;
  height: 20px;
  width: auto;
  filter: brightness(0) invert(1); /* 濃紺ワードマーク → 白（青ボタン上） */
}
.btn-jpyc-text { font-weight: var(--fw-bold); }
.min-pay-note {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--warning-ink);
  background: var(--warning-soft);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  line-height: var(--lh-snug);
}

@media (max-width: 640px) {
  .shop .cart-row {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    grid-template-areas:
      "thumb name total"
      "thumb qty remove";
    gap: var(--space-2) var(--space-3);
    align-items: center;
    padding: var(--space-4) 0;
  }
  .shop .cart-row .cart-thumb {
    grid-area: thumb;
    align-self: start;
  }
  .shop .cart-row .cart-name {
    grid-area: name;
  }
  .shop .cart-row .qty-control {
    grid-area: qty;
    justify-self: start;
  }
  .shop .cart-row .qty-control button {
    min-width: 34px;
    min-height: 34px;
    padding: var(--space-1) var(--space-2);
  }
  .shop .cart-row .cart-line-total {
    grid-area: total;
    align-self: start;
    min-width: 64px;
  }
  .shop .cart-row .cart-remove {
    grid-area: remove;
    justify-self: end;
    min-height: 32px;
  }
  .shop .summary-row.total span:last-child {
    font-size: var(--text-xl);
  }
  .shop .pay-option {
    padding: var(--space-3);
    gap: var(--space-3);
  }
  .shop .pay-option > div {
    min-width: 0;
  }
  .shop .pay-option .right {
    flex-shrink: 0;
  }
  .shop .account-status .tip .tip-bubble {
    left: -84px;
    transform: none;
  }
  .shop .account-status .tip .tip-bubble::after {
    left: 90px;
    transform: none;
  }
}

@media (max-width: 360px) {
  .shop .cart-row {
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-areas:
      "thumb name"
      "thumb total"
      "qty remove";
  }
  .shop .cart-row .cart-thumb {
    width: 44px;
    height: 44px;
  }
  .shop .cart-row .cart-line-total {
    justify-self: start;
    text-align: left;
  }
  .btn-jpyc {
    padding-inline: var(--space-3);
  }
  .btn-jpyc-logo {
    height: 18px;
  }
}

/* ============================================================
   振込先案内（§3.6.6: 金額最大表示・囲い・鍵アイコン）
   ============================================================ */
.transfer-amount {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  background: var(--ex-tint);
  border: 1px solid var(--ex-soft);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-4);
}
.transfer-amount .k {
  font-size: var(--text-xs);
  color: var(--ex-deep);
  font-weight: var(--fw-semibold);
}
.transfer-amount .v {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-4xl);
  font-weight: var(--fw-extrabold);
  color: var(--ink);
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-tight);
}
.bank-details.secure {
  border: 1.5px solid var(--ex-soft);
  position: relative;
}
.reload-hint {
  font-size: var(--text-xs);
  text-align: center;
  margin: var(--space-4) 0 0;
}
.bank-details.secure h4::before {
  -webkit-mask: var(--ic-lock) center / contain no-repeat;
  mask: var(--ic-lock) center / contain no-repeat;
}

/* ============================================================
   旧ブラウザ警告（§3.5・3ページ共通）
   ============================================================ */
.compat-warning {
  background: var(--warning-soft);
  color: var(--warning-ink);
  border-bottom: 1px solid var(--warning);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  text-align: center;
  line-height: var(--lh-snug);
}
