  :root {
    --bg: #f7f7f8;
    --surface: #ffffff;
    --text: #1d2433;
    --muted: #6b7280;
    --faint: #9ca3af;
    --line: #e7e8eb;
    --accent: #2a5a8c;
    --accent-press: #234c77;
    --accent-weak: #c9d5e3;
    --error: #b42318;
    --radius: 12px;
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; }
  body {
    background: var(--bg);
    color: var(--text);
    font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    letter-spacing: 0.02em;
    -webkit-font-smoothing: antialiased;
    word-break: auto-phrase;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  a { color: inherit; }
  button { font: inherit; }

  /* ---- 外枠 ---- */
  .notice {
    font-size: 12px;
    color: var(--muted);
    background: #eef0f3;
    padding: 8px 16px;
    text-align: center;
  }
  .notice a { color: var(--accent); margin-left: 8px; }
  .notice[hidden] { display: none; }
  header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 32px;
  }
  .wordmark { font-weight: 600; font-size: 16px; letter-spacing: 0.04em; }
  .who { font-size: 13px; color: var(--muted); }
  main { flex: 1; display: flex; justify-content: center; padding: 40px 16px 64px; }
  footer {
    text-align: center;
    font-size: 12px;
    color: var(--faint);
    padding: 24px 16px 32px;
  }
  footer a { text-decoration: none; }
  footer a:hover { color: var(--muted); text-decoration: underline; }
  footer span { margin: 0 8px; }

  .screen { width: 100%; }
  .screen[hidden] { display: none; }
  .step { font-size: 13px; color: var(--faint); text-align: center; margin: 0 0 6px; }
  h1 {
    font-size: 28px;
    font-weight: 500;
    text-align: center;
    margin: 0 0 40px;
    letter-spacing: 0.04em;
  }

  /* ---- アカウント作成 ---- */
  .account { max-width: 400px; margin: 0 auto; }
  .field { margin-bottom: 24px; }
  .field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
  .input-wrap { position: relative; }
  .field input {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    font: inherit;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
  }
  .field input::placeholder { color: var(--faint); }
  .field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(42, 90, 140, .12); }
  .field input[aria-invalid="true"] { border-color: var(--error); }
  .toggle-pw {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    border: 0; background: none; color: var(--muted); font-size: 13px;
    padding: 6px 8px; cursor: pointer;
  }
  .help { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
  .err { font-size: 12px; color: var(--error); margin: 6px 0 0; }
  .err:empty { display: none; }

  .btn {
    display: block; width: 100%; height: 52px;
    border: 0; border-radius: 10px;
    background: var(--accent); color: #fff;
    font-size: 16px; font-weight: 500; letter-spacing: 0.08em;
    cursor: pointer;
    transition: background .15s, opacity .15s;
  }
  .btn:hover:not(:disabled) { background: var(--accent-press); }
  .btn:disabled { background: var(--accent-weak); cursor: not-allowed; }
  .sub-link { display: block; text-align: center; margin-top: 20px; font-size: 14px; color: var(--accent); text-decoration: none; }
  .sub-link:hover { text-decoration: underline; }

  /* ---- 決済 ---- */
  .payment { max-width: 560px; margin: 0 auto; }
  .tools { list-style: none; margin: 0; padding: 0; }
  .tool { border-bottom: 1px solid var(--line); }
  .tool:last-child { border-bottom: 0; }
  .tool label {
    display: flex; align-items: center; gap: 16px;
    padding: 18px 4px; cursor: pointer;
  }
  .tool input { position: absolute; opacity: 0; pointer-events: none; }
  .tool .name { font-size: 17px; font-weight: 500; }
  .tool .desc { font-size: 13px; color: var(--muted); }
  .tool .body { flex: 1; min-width: 0; }
  .tool .add { font-size: 13px; color: var(--muted); white-space: nowrap; }
  .check {
    flex: none; width: 28px; height: 28px; border-radius: 50%;
    border: 1.5px solid #c7cbd1; background: var(--surface);
    display: grid; place-items: center;
    transition: background .15s, border-color .15s;
  }
  .check svg { width: 14px; height: 14px; opacity: 0; transition: opacity .15s; }
  .tool input:checked ~ .check { background: var(--accent); border-color: var(--accent); }
  .tool input:checked ~ .check svg { opacity: 1; }
  .tool input:checked ~ .add { visibility: hidden; }
  .tool input:focus-visible ~ .check { box-shadow: 0 0 0 3px rgba(42, 90, 140, .25); }
  .tool label:hover .check { border-color: var(--accent); }

  .summary { text-align: center; margin-top: 48px; }
  .total { margin: 0; font-weight: 500; }
  .total .label { font-size: 20px; margin-right: 8px; }
  .total .amount { font-size: 44px; font-weight: 600; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
  .total .yen { font-size: 24px; margin-left: 2px; }
  .total .tax { font-size: 13px; color: var(--muted); margin-left: 8px; }
  .terms-line { font-size: 14px; color: var(--muted); margin: 8px 0 0; }
  .empty-line { font-size: 14px; color: var(--muted); margin: 8px 0 0; }

  .agree {
    display: inline-flex; align-items: center; gap: 10px;
    margin: 28px 0 16px; font-size: 14px; cursor: pointer;
  }
  .agree input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
  .agree a { color: var(--accent); }
  .stripe-note { font-size: 12px; color: var(--muted); margin: 12px 0 0; text-align: center; }
  .status-msg { font-size: 13px; color: var(--accent); margin: 12px 0 0; text-align: center; }
  .status-msg:empty { display: none; }

  .bar { display: none; }

  @media (max-width: 640px) {
    header { padding: 16px; }
    main { padding: 24px 16px 40px; }
    h1 { font-size: 24px; margin-bottom: 28px; }
    .summary { margin-top: 28px; text-align: left; }
    .summary .total, .summary .btn-inline { display: none; }
    .agree { margin: 20px 0 4px; }
    .stripe-note { text-align: left; }
    body.on-payment { padding-bottom: 84px; }
    body.on-payment .bar {
      display: flex; align-items: center; justify-content: space-between; gap: 12px;
      position: fixed; left: 0; right: 0; bottom: 0;
      padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
      background: rgba(255, 255, 255, .94);
      backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
      border-top: 1px solid var(--line);
    }
    .bar .total .label { font-size: 14px; }
    .bar .total .amount { font-size: 24px; }
    .bar .total .yen { font-size: 15px; }
    .bar .total .tax { font-size: 11px; margin-left: 4px; }
    .bar .btn { width: auto; height: 46px; padding: 0 22px; font-size: 15px; letter-spacing: 0.04em; }
    footer { display: flex; flex-direction: column; align-items: center; gap: 10px; }
    footer span { display: none; }
  }
  .who a { color: var(--accent); margin-left: 10px; text-decoration: none; }
  .who a:hover { text-decoration: underline; }
  .form-err { font-size: 13px; color: var(--error); margin: 14px 0 0; text-align: center; }
  .form-err:empty { display: none; }
  .btn[aria-busy="true"] { opacity: .6; pointer-events: none; }
  .loading { text-align: center; color: var(--muted); font-size: 14px; padding: 80px 0; }
  .done h1 { margin-bottom: 16px; }
  .done p { text-align: center; color: var(--muted); font-size: 15px; line-height: 1.9; margin: 0 0 10px; }
