@charset "utf-8";
/* CSS Document */
/* ==========================================================================
   1. 変数定義・基本設定
   ========================================================================== */
:root {
	/* テーマカラー定義 */
	--primary: #8a0194;          /* メインカラー (紫) */
	--primary-dark: #6a0172;     /* メインカラーの濃い色 */
	--primary-light: #f7e6f8;    /* メインカラーの薄い色 (背景等) */
	--accent: #f97316;           /* アクセントカラー (オレンジ) */
	--accent-light: #fff7ed;     /* アクセントカラーの薄い色 */

	/* テキスト・背景色 */
	--text-main: #1e293b;        /* メインテキスト色 (濃いグレー) */
	--text-muted: #64748b;       /* 補助テキスト色 (薄いグレー) */
	--bg-body: #faf5fa;          /* ページ全体の背景色 */
	--bg-card: #ffffff;          /* カード要素の背景色 (白) */

	/* UIパーツ用 */
	--border-color: #f0e2f0;     /* 枠線の色 */
	--shadow: 0 10px 15px -3px rgba(138, 1, 148, 0.12); /* 共通の影 */
	--radius: 20px;              /* 角丸の共通サイズ */
}

/* 全要素のリセット */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
	background-color: var(--bg-body);
	color: var(--text-main);
	line-height: 1.6;
	padding-bottom: 200px; /* 下部固定フッターに隠れないための余白 */
}

/* ==========================================================================
   2. 共通レイアウト・ヘッダー
   ========================================================================== */
/* ヘッダーの固定とすりガラス効果 */
header {
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border-color);
	position: sticky;
	top: 0;
	z-index: 100;
	padding: 16px 0;
}

/* コンテンツの最大幅を制限して中央に配置 */
.container {
	max-width: 600px;
	margin: 0 auto;
	padding: 0 20px;
}

.header-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.logo {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 800;
	font-size: 1.2rem;
	color: var(--primary);
}

/* ステップインジケーター (1.商品選択 / 2.情報入力...) */
.step-indicator {
	display: flex;
	gap: 6px;
	font-size: 0.65rem;
	font-weight: 800;
	color: var(--text-muted);
	flex-wrap: wrap;
}
.step-indicator span.active { color: var(--primary); }

/* 各ステップのコンテンツエリアを囲むカード */
section {
	background: var(--bg-card);
	border-radius: var(--radius);
	padding: 28px;
	margin-top: 24px;
	border: 1px solid var(--border-color);
	box-shadow: var(--shadow);
	animation: fadeIn 0.4s ease-out; /* ふわっと表示させる */
}

@keyframes fadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

/* セクションのタイトル部分 (数字バッジ + テキスト) */
.section-title {
	display: flex;
	gap: 14px;
	margin-bottom: 24px;
}
.number-badge {
	width: 36px;
	height: 36px;
	background: var(--primary);
	color: white;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	flex-shrink: 0;
}
.section-title h2 { font-size: 1.15rem; font-weight: 800; }
.section-title p { font-size: 0.85rem; color: var(--text-muted); }

/* --- エラーメッセージの表示枠 (詳細表示対応版) --- */
.error-message {
	background: #fff1f2; border: 1px solid #fda4af; color: #e11d48;
	padding: 16px; border-radius: 12px; font-size: 0.85rem; margin-bottom: 24px;
	display: none; line-height: 1.5; 
}
.error-message.active { display: block; animation: shake 0.4s ease-in-out; }
.error-title { font-weight: 800; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.error-list { list-style: none; padding-left: 24px; margin: 0; }
.error-list li { position: relative; margin-bottom: 4px; }
.error-list li::before { content: "・"; position: absolute; left: -15px; }

@keyframes shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-4px); }
	75% { transform: translateX(4px); }
}

/* JavaScriptによる表示/非表示制御用クラス */
.js-hidden { display: none !important; }

/* ==========================================================================
   3. 商品選択エリア (Step 1) 用のスタイル
   ========================================================================== */
/* 初めて・再注文・定期中の選択ボタン */
.select-btn {
	background: #ffffff; border: 2px solid #bcb4bc; border-radius: 16px; padding: 18px; cursor: pointer;
	display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; transition: all 0.2s;
}
.select-btn.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 480px) { .grid-3 { grid-template-columns: 1fr; } }

/* 商品カード (30粒・90粒) の外枠 */
.product-card { border: 2px solid var(--border-color); border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); }

/* 30粒・90粒のヘッダー部分 (画像・商品名・金額) */
.product-header { display: flex; align-items: center; gap: 20px; padding: 24px 20px; background: linear-gradient(135deg, #fdfbfd 0%, #f4eaf4 100%); }
.product-header.orange-bg { background: linear-gradient(135deg, #fffbf7 0%, #feead6 100%); }

/* 商品画像の枠 */
.product-img { width: 85px; height: 85px; background: white; border-radius: 16px; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.05); font-weight: 800; font-size: 0.8rem; color: var(--text-muted); flex-shrink: 0; padding: 4px; }
.product-img img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* タイトル・価格の装飾 */
.product-info h3 { font-size: 1.3rem; font-weight: 900; color: var(--primary-dark); margin-bottom: 6px; letter-spacing: 0.05em; line-height: 1.2; }
.product-info h3.orange-text { color: var(--accent); }

.current-price { font-size: 1.4rem; font-weight: 900; color: var(--primary); display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; line-height: 1.1; }
.current-price.orange-price { color: var(--accent); }
.current-price .old-price { font-size: 1rem; color: var(--text-muted); font-weight: normal; margin-left: 8px; }

.product-body { padding: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .product-body { grid-template-columns: 1fr; } }

/* 定期/一回の選択肢ボタン */
.plan-option { border: 2px solid #bcb4bc; padding: 16px; border-radius: 16px; cursor: pointer; display: flex; gap: 12px; position: relative; transition: all 0.2s; }
.plan-option.active { border-color: var(--primary); background: var(--primary-light); }
.plan-option.active.orange { border-color: var(--accent); background: var(--accent-light); } /* 90粒定期用のオレンジ色 */

/* 選択された際のチェックマーク */
.custom-check { width: 20px; height: 20px; border: 2px solid var(--border-color); border-radius: 6px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #fff; }
.plan-option.active .custom-check { background: var(--primary); border-color: var(--primary); color: white; }
.plan-option.active.orange .custom-check { background: var(--accent); border-color: var(--accent); color: white; }

.plan-info { flex: 1; }
.option-details { margin-top: 12px; }
.detail-label { font-size: 0.7rem; color: var(--text-muted); font-weight: bold; display: block; margin-bottom: 4px; }

/* ==========================================================================
   4. フォーム入力要素 (Step 2, Step 3) のスタイル
   ========================================================================== */
/* 入力フォームのグリッドレイアウト (PCは2列、スマホは1列) */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { margin-bottom: 20px; }
.form-group.full { grid-column: span 2; } /* 2列全体を使用 */

@media (max-width: 480px) {
	.form-grid { grid-template-columns: 1fr; }
	.form-group.full { grid-column: span 1; }
}

label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 8px; color: var(--text-main); }

.required-tag {
	background: #ff4d4d; color: white; font-size: 0.6rem;
	padding: 2px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle;
}

/* テキスト・セレクトボックスなどの共通デザイン */

/* notを内のクラスのみ対象から外す */
:is(input[type="text"], input[type="tel"], input[type="email"], input[type="date"], select, textarea):not(.ui-widget-input_l, .ui-widget-input_s) {
  /* 中身のスタイルは元々あったものをそのまま残す */
	width: 100%; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border-color);
	font-size: 0.95rem; outline: none; background: #fff; transition: all 0.2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
input.error, select.error { border-color: #e11d48 !important; background-color: #fff1f2 !important; }

/* プレースホルダーとセレクトボックス未選択状態の色を薄くする */
input::placeholder, textarea::placeholder { color: #cbd5e1; opacity: 1; }
select:invalid { color: #cbd5e1; }
select option { color: var(--text-main); }

/* ラジオボタン群のデザイン (性別、メルマガ、お支払い方法) */
.radio-group { display: flex; gap: 12px; margin-top: 4px; border: 1px solid transparent; transition: border-color 0.2s; }
.payment-radio-group { flex-direction: column; } /* お支払い方法は縦並びに */
.radio-item { flex: 1; position: relative; }
.radio-item input { position: absolute; opacity: 0; cursor: pointer; } /* デフォルトの丸ポチは隠す */

.radio-label {
	display: flex; align-items: center; justify-content: center; padding: 12px;
	background: #f8fafc; border: 2px solid #f1f5f9; border-radius: 12px;
	font-size: 0.9rem; font-weight: 700; cursor: pointer; transition: all 0.2s; gap: 8px;
}
.payment-radio-group .radio-label { justify-content: flex-start; padding: 16px 20px; }
.radio-item input:checked + .radio-label { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }

/* 配送方法バッジ (ポスト投函 / 宅配便) */
.delivery-badge { font-size: 0.8rem; padding: 4px 10px; border-radius: 6px; font-weight: 800; white-space: nowrap; letter-spacing: 0.05em; }
.delivery-badge.post { background-color: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.delivery-badge.courier { background-color: #fef08a; color: #b45309; border: 1px solid #fde047; }

textarea { height: 100px; resize: none; }

/* 郵便番号・生年月日など横並び入力用の調整 */
.zip-input-group { display: flex; align-items: center; gap: 10px; }
.birth-input-group { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; }

/* ==========================================================================
   5. 確認画面 (Step 4) 用スタイル
   ========================================================================== */
/* セクション小見出し */
.confirm-heading {
	font-size: 0.95rem; font-weight: 800; color: var(--primary-dark); margin-bottom: 12px; margin-top: 32px;
	display: flex; align-items: center; gap: 8px;
}
.confirm-heading::before { content: ""; display: block; width: 4px; height: 16px; background: var(--primary); border-radius: 2px; }

/* 情報を囲むグレーのボックス */
.confirm-box { background: #f8fafc; border: 1px solid var(--border-color); border-radius: 12px; padding: 20px; }

/* 入力情報の表示テーブル */
.confirm-table { width: 100%; border-collapse: collapse; }
.confirm-table th, .confirm-table td { padding: 12px 0; border-bottom: 1px solid #e2e8f0; font-size: 0.9rem; vertical-align: top; }
.confirm-table tr:last-child th, .confirm-table tr:last-child td { border-bottom: none; padding-bottom: 0; }
.confirm-table tr:first-child th, .confirm-table tr:first-child td { padding-top: 0; }
.confirm-table th { width: 170px; text-align: left; color: var(--text-muted); font-weight: 700; }
.confirm-table td { color: var(--text-main); font-weight: 700; line-height: 1.5; }

.legal-table th, .legal-table td { font-size: 0.8rem; font-weight: normal; }
.legal-table th { font-weight: 700; color: var(--text-main); }

/* 選択された商品の詳細リスト */
.conf-item-row { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px dashed var(--border-color); }
.conf-item-img { width: 80px; height: 80px; border-radius: 12px; border: 1px solid var(--border-color); object-fit: contain; background: #fff; flex-shrink: 0; }
.conf-item-content { flex: 1; }
.conf-item-title { font-weight: 800; font-size: 0.95rem; color: var(--text-main); margin-bottom: 2px; }
.conf-item-type { font-size: 0.75rem; color: var(--primary); font-weight: bold; margin-bottom: 8px; }
.conf-item-table { width: 100%; font-size: 0.8rem; color: var(--text-muted); border-collapse: collapse; }
.conf-item-table td { padding-bottom: 4px; }
.conf-item-table td:first-child { width: 100px; }
.conf-item-price-col { font-weight: 800; font-size: 1.1rem; color: var(--primary-dark); text-align: right; min-width: 80px; }

/*オファー表示部分*/
.offer-placeholder {
    text-align: center;
}

/* 特商法表記など法的テキストのスタイル */
.legal-sub-heading { font-size: 0.9rem; font-weight: 800; color: var(--text-main); margin-top: 16px; margin-bottom: 8px; padding-left: 8px; border-left: 3px solid var(--primary); }
.legal-list { list-style: none; padding: 0; margin: 0 0 16px 0; }
.legal-list li { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 6px; padding-left: 1em; text-indent: -1em; line-height: 1.5; }
.legal-list li::before { content: "●"; color: var(--primary); margin-right: 4px; font-size: 0.7em; vertical-align: middle; }
.legal-note { font-size: 0.75rem; color: var(--text-muted); margin-top: -12px; margin-bottom: 16px; padding-left: 8px; }
.contact-box { background: white; border: 1px solid var(--border-color); border-radius: 12px; padding: 16px; text-align: center; margin: 16px 0; }
.legal-divider { border: none; border-top: 1px dashed var(--border-color); margin: 24px 0; }

/* ==========================================================================
   6. フッター・固定操作バー
   ========================================================================== */
/* 下部固定ナビゲーション */
.footer-bar {
	position: fixed; bottom: 0; left: 0; width: 100%; background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(20px); border-top: 1px solid var(--border-color); z-index: 200;
	box-shadow: 0 -10px 25px rgba(138, 1, 148, 0.08);
	height: 90px;
	display: flex;
	align-items: center;
}
.footer-content { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; }

.summary-info { flex: 1; min-width: 0; }
.summary-label { font-size: 0.7rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; margin-bottom: 2px; }
.summary-text { 
	font-size: 0.85rem; color: var(--primary); font-weight: 700; line-height: 1.3; 
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-wrap: break-word;
}

.total-box { flex-shrink: 0; text-align: right; }
.total-price { font-size: 1.6rem; font-weight: 900; line-height: 1.2; }

.footer-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* 次へ進むボタン */
.submit-btn {
	background: var(--primary); color: white; border: none; padding: 0 24px; height: 48px; border-radius: 24px;
	font-weight: 800; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: all 0.3s;
	box-shadow: 0 4px 14px rgba(138, 1, 148, 0.35); font-size: 0.95rem; white-space: nowrap;
}
.submit-btn:disabled { background: #cbd5e1; cursor: not-allowed; box-shadow: none; }
.submit-btn:not(:disabled):hover { background: var(--primary-dark); transform: translateY(-2px); }

/* 戻るボタン */
.back-btn {
	background: #fff; color: var(--text-muted); border: 1px solid var(--border-color); padding: 0 16px; height: 48px; border-radius: 24px;
	font-weight: 800; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all 0.3s; font-size: 0.9rem; white-space: nowrap;
}
.back-btn:hover { background: #f8fafc; border-color: var(--text-muted); color: var(--text-main); }

/* ==========================================================================
   7. その他の調整・レスポンシブ
   ========================================================================== */
/* サイトフッター (法的リンクなど) */

.site-footer-links a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.site-footer-links a:hover { color: var(--text-main); text-decoration: underline; }

/* スマホ向けレスポンシブ調整 (フッターバー用) */
@media (max-width: 600px) {
	.footer-content { gap: 8px; }
	.total-price { font-size: 1.2rem; }
	.submit-btn { padding: 0 12px; height: 40px; font-size: 0.8rem; border-radius: 20px; gap: 4px; }
	.back-btn { padding: 0 10px; height: 40px; font-size: 0.8rem; border-radius: 20px; gap: 4px; }
	.submit-btn i, .back-btn i { width: 16px; height: 16px; }
	.summary-label { font-size: 0.65rem; }
	.summary-text { font-size: 0.75rem; line-height: 1.3; }
}

