/* Tokushimaru Stripe Form — ぐ〜す〜 定期購読 申込フォーム リデザイン
 * デザイン: 株式会社カンマン 阿部（.tksm-form スコープ）
 * 変数は .tksm-form にスコープ（サイト全体の :root を汚染しない）
 */
.tksm-form{
  --brand:#E8500E; --brand-deep:#C24408; --brand-tint:#FCEDE4;
  --ink:#2B2723; --ink-sub:#6E6459; --line:#E2DACE; --line-strong:#CFC5B5;
  --paper:#FAF6F0; --radius:10px; --ring:0 0 0 4px rgba(232,80,14,.15);
  max-width:720px; margin:0 auto; color:var(--ink); text-align:left;
  font-size:16px; line-height:1.7;
}
.tksm-form [hidden]{ display:none !important; }

/* ステップナビ（オレンジ番号丸＋つなぎ線） */
.tksm-form .tksm-steps-nav{list-style:none;display:flex;padding:0;margin:0 0 30px;counter-reset:step}
.tksm-form .tksm-steps-nav li{flex:1;position:relative;text-align:center;font-size:13px;font-weight:700;color:var(--ink-sub);padding:42px 0 0;margin:0;background:transparent;border:0;border-radius:0}
.tksm-form .tksm-steps-nav li::before{counter-increment:step;content:counter(step);position:absolute;top:0;left:50%;transform:translateX(-50%);width:34px;height:34px;border-radius:50%;background:#fff;border:2px solid var(--line-strong);color:var(--ink-sub);display:grid;place-items:center;font-size:15px;font-weight:900;z-index:2}
.tksm-form .tksm-steps-nav li::after{content:"";position:absolute;top:16px;left:-50%;width:100%;height:3px;background:var(--line);z-index:1}
.tksm-form .tksm-steps-nav li:first-child::after{display:none}
.tksm-form .tksm-steps-nav li.is-active{color:var(--brand-deep)}
.tksm-form .tksm-steps-nav li.is-active::before{background:var(--brand);border-color:var(--brand);color:#fff;box-shadow:var(--ring)}

/* 各ステップ（白カード） */
.tksm-form .tksm-step{background:#fff;border:1px solid var(--line);border-radius:16px;padding:clamp(20px,4vw,36px);box-shadow:0 1px 2px rgba(43,39,35,.04)}
.tksm-form h4{font-size:19px;font-weight:900;margin:34px 0 4px;padding-left:13px;position:relative;border:0}
.tksm-form h4:first-child{margin-top:0}
.tksm-form h4::before{content:"";position:absolute;left:0;top:.15em;bottom:.15em;width:5px;border-radius:3px;background:var(--brand)}
.tksm-form .section-note{color:var(--ink-sub);font-size:14px;margin:2px 0 12px}
/* 必須マーク（赤バッジ・項目名の前に表示） */
.tksm-form .req{display:inline-block;background:#e03131;color:#fff;font-size:11px;font-weight:700;line-height:1;padding:3px 6px;border-radius:4px;margin-right:8px;vertical-align:2px;letter-spacing:.02em}
.tksm-form .tksm-step > p{margin:0 0 18px;font-size:15.5px;font-weight:700;color:var(--ink);line-height:1.5}
.tksm-form .tksm-step > p:empty{display:none;margin:0}
.tksm-form .tksm-delivery-other > p{margin:0 0 16px;font-weight:700}

/* 入力欄 */
.tksm-form .wpcf7-form-control-wrap{display:block;margin-top:7px}
.tksm-form input[type=text],.tksm-form input[type=tel],.tksm-form input[type=email],.tksm-form input[type=number],.tksm-form select,.tksm-form textarea{
  font-family:inherit;font-size:16.5px;font-weight:500;color:var(--ink);width:100%;height:54px;padding:0 15px;background:#fff;border:1.5px solid var(--line-strong);border-radius:var(--radius);transition:border-color .15s,box-shadow .15s;appearance:none;-webkit-appearance:none}
.tksm-form input[type=number]{width:120px;text-align:center}
.tksm-form textarea{height:auto;padding:12px 15px;line-height:1.6;resize:vertical;min-height:104px}
.tksm-form input::placeholder,.tksm-form textarea::placeholder{color:#B4A997}
.tksm-form input:focus,.tksm-form select:focus,.tksm-form textarea:focus{outline:none;border-color:var(--brand);box-shadow:var(--ring)}
.tksm-form select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%236E6459' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 15px center;padding-right:40px;cursor:pointer}

/* ラジオ（選べるカード） */
.tksm-form .wpcf7-radio{display:flex;flex-direction:column;gap:10px;margin-top:8px}
.tksm-form .wpcf7-radio .wpcf7-list-item{margin:0;display:block}
.tksm-form .wpcf7-radio label{display:flex;align-items:center;gap:12px;cursor:pointer;border:1.5px solid var(--line-strong);border-radius:var(--radius);padding:15px 17px;font-weight:700;font-size:16px;transition:.15s;margin:0}
.tksm-form .wpcf7-radio label:hover{border-color:var(--brand)}
.tksm-form .wpcf7-radio input[type=radio]{appearance:none;-webkit-appearance:none;flex:none;width:22px;height:22px;border:2px solid var(--line-strong);border-radius:50%;margin:0;position:relative}
.tksm-form .wpcf7-radio label:has(input:checked){border-color:var(--brand);background:var(--brand-tint)}
.tksm-form .wpcf7-radio input[type=radio]:checked{border-color:var(--brand)}
.tksm-form .wpcf7-radio input[type=radio]:checked::after{content:"";position:absolute;inset:3px;border-radius:50%;background:var(--brand)}
.tksm-form .wpcf7-list-item-label{flex:1}

/* お届け先（本人以外）破線ボックス */
.tksm-form .tksm-delivery-other{margin:6px 0 8px;padding:20px 18px;border:1px dashed var(--line-strong);border-radius:12px;background:#FCFAF6}

/* 行2カラム（性別・年齢） */
@media (min-width:560px){.tksm-form .row-2{display:flex;gap:16px}.tksm-form .row-2 > p{flex:1;margin-bottom:18px}}

/* カード入力欄（Stripe要素の器）。※grid等は付けない（Stripe iframeの幅崩れ防止） */
.tksm-form .tksm-card-input{margin:6px 0 4px;padding:18px;border:1.5px solid var(--line-strong);border-radius:12px;background:#FCFAF6}
.tksm-form .tksm-card-input > p:first-child{font-weight:700;margin:0 0 10px}
.tksm-form .tksm-payment-element{min-height:44px}
.tksm-form .secure-note{display:flex;align-items:center;gap:6px;color:var(--ink-sub);font-size:12.5px;margin-top:10px}
/* 支払方法の案内文（郵便振替/銀行振込） */
/* 選択肢ボタン（.wpcf7-list-item）の直下に差し込まれる（form.js が移動） */
.tksm-form .tksm-pay-hint{margin:8px 0 0;padding:12px 16px;background:var(--brand-tint);border:1px solid var(--line);border-radius:10px;font-size:14px;line-height:1.7;color:var(--ink)}
.tksm-form .tksm-pay-hint[hidden]{display:none}
/* 送信ボタン直前のSSL注記 */
.tksm-form .ssl-note{margin:20px 0 0;font-size:14px;line-height:1.7;color:var(--ink-sub)}
.tksm-form .ssl-note .ssl{display:inline-flex;align-items:center;gap:5px;color:var(--brand-deep);font-weight:700}

/* 追加コンテンツ */
.tksm-form .form-guide{border:1px solid var(--line);background:#fff;border-radius:12px;padding:16px 18px;margin:0 0 26px;font-size:14.5px;line-height:1.75;font-weight:400}
.tksm-form .form-guide .ssl{display:inline-flex;align-items:center;gap:5px;color:var(--brand-deep);font-weight:700}
.tksm-form .price-callout{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;border:1.5px solid var(--brand);border-radius:12px;padding:16px 20px;margin:0 0 6px;background:var(--brand-tint)}
.tksm-form .price-callout .plan{font-size:15px;font-weight:700}
.tksm-form .price-callout .amount{font-size:30px;font-weight:900;color:var(--brand-deep);line-height:1}
.tksm-form .price-callout .amount small{font-size:15px;font-weight:700}
.tksm-form .terms{border:1.5px solid var(--line-strong);border-radius:14px;overflow:hidden;margin:6px 0 22px;background:#fff}
.tksm-form .terms > summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:10px;padding:16px 18px;font-weight:900;font-size:16px;background:var(--brand-tint);color:var(--brand-deep)}
.tksm-form .terms > summary::-webkit-details-marker{display:none}
.tksm-form .terms > summary::before{content:"必読";flex:none;font-size:11px;font-weight:900;color:#fff;background:var(--brand);border-radius:6px;padding:3px 8px}
.tksm-form .terms .body{padding:18px;font-size:14px;line-height:1.85}
.tksm-form .terms .body h5{margin:16px 0 4px;font-size:14.5px;font-weight:900;color:var(--brand-deep)}
.tksm-form .terms .body h5:first-child{margin-top:0}
.tksm-form .terms .body p{margin:0 0 6px}

/* 同意（CF7 [acceptance] 出力に合わせる） */
.tksm-form .consent{border:1.5px solid var(--line-strong);border-radius:12px;padding:16px 18px;margin:0 0 6px;font-size:15.5px}
.tksm-form .consent:has(input:checked){border-color:var(--brand);background:var(--brand-tint)}
.tksm-form .consent .wpcf7-form-control-wrap,.tksm-form .consent .wpcf7-acceptance,.tksm-form .consent .wpcf7-list-item{display:block;margin:0}
.tksm-form .consent label{display:flex;align-items:flex-start;gap:12px;margin:0;cursor:pointer;font-weight:700}
.tksm-form .consent input[type=checkbox]{appearance:none;-webkit-appearance:none;flex:none;width:24px;height:24px;border:2px solid var(--line-strong);border-radius:6px;position:relative;margin:0;cursor:pointer}
.tksm-form .consent input[type=checkbox]:checked{background:var(--brand);border-color:var(--brand)}
.tksm-form .consent input[type=checkbox]:checked::after{content:"";position:absolute;left:7px;top:2px;width:7px;height:13px;border:solid #fff;border-width:0 3px 3px 0;transform:rotate(45deg)}
.tksm-form .consent a{font-weight:900;text-decoration:underline;color:var(--brand-deep)}

/* ボタン（ピル型・縦積み） */
.tksm-form .tksm-actions{margin-top:30px;display:flex;flex-direction:column;gap:12px}
.tksm-form .tksm-btn{font-family:inherit;font-weight:900;font-size:17px;letter-spacing:.05em;border:none;border-radius:999px;padding:17px 24px;cursor:pointer;transition:.12s;width:100%;text-align:center}
.tksm-form .tksm-btn:disabled{opacity:.6;cursor:not-allowed}
.tksm-form .tksm-btn-primary{background:var(--brand);color:#fff;box-shadow:0 6px 16px rgba(232,80,14,.28)}
.tksm-form .tksm-btn-primary:hover:not(:disabled){background:var(--brand-deep);transform:translateY(-2px)}
.tksm-form .tksm-btn-secondary{background:#fff;color:var(--ink);border:1.5px solid var(--line-strong)}
.tksm-form .form-reassure{text-align:center;color:var(--ink-sub);font-size:13px;margin:14px 0 0}

/* 確認ステップ: 入力内容サマリ */
.tksm-form .tksm-summary{border:1px solid var(--line);border-radius:12px;overflow:hidden;margin:16px 0}
.tksm-form .tksm-summary .tksm-row{display:flex;border-bottom:1px solid var(--line)}
.tksm-form .tksm-summary .tksm-row:last-child{border-bottom:0}
.tksm-form .tksm-summary dt{flex:0 0 40%;margin:0;padding:12px 16px;background:var(--brand-tint);font-weight:700;font-size:14px}
.tksm-form .tksm-summary dd{flex:1;margin:0;padding:12px 16px;word-break:break-all}

/* 確認ステップ: マスク済みカード情報 */
.tksm-form .tksm-card-masked{margin:16px 0;padding:14px 16px;border:1.5px solid var(--line-strong);border-radius:12px;background:#FCFAF6}
.tksm-form .tksm-card-masked-label{margin:0 0 6px;font-size:13px;color:var(--ink-sub)}
.tksm-form .tksm-card-summary{font-size:16px;font-weight:900;letter-spacing:.04em;color:var(--brand-deep)}

/* 状態表示 */
.tksm-form .tksm-busy{margin:12px 0;color:var(--ink-sub);font-size:14px}
.tksm-form .tksm-error{margin:12px 0;padding:12px 16px;background:#fff5f5;color:#c92a2a;border:1px solid #ffc9c9;border-radius:8px;font-size:14px}
/* 項目別バリデーション（form.js）のインライン表示 */
.tksm-form .tksm-field-error{display:block;margin-top:7px;color:#c92a2a;font-size:13px;font-weight:700;line-height:1.5}
.tksm-form input.tksm-invalid,
.tksm-form select.tksm-invalid,
.tksm-form textarea.tksm-invalid{border-color:#e03131;box-shadow:0 0 0 4px rgba(224,49,49,.12)}

/* CF7標準のインラインチップは当方の .tksm-field-error と重複するため非表示（当方表示に一本化） */
.tksm-form .wpcf7-not-valid-tip{display:none !important}

/* CF7標準のバリデーションメッセージ枠（表示時のみ）をデザインに馴染ませる */
.tksm-form .wpcf7-response-output{margin:16px 0 0;padding:12px 16px;border-width:1.5px;border-radius:8px;font-size:14px}
.tksm-form .wpcf7-not-valid-tip{color:#c92a2a;font-size:13px;font-weight:700}

/* サンクス */
.tksm-form .tksm-step-thanks{text-align:center;padding:32px 16px}
.tksm-form .tksm-step-thanks h3{color:var(--brand-deep)}
