/* お客様向け入稿ページのスタイル(スマホファースト) */
:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --ink: #2c2823;
  --muted: #857d70;
  --line: #e5e0d6;
  --accent: #47705f;
  --accent-dark: #395c4e;
  --danger: #b3382c;
  --warn: #9a6b00;
  --ok: #2c7a4b;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

main, .site-header, .steps, .site-footer {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

.site-header { padding-top: 28px; text-align: center; }
.shop-name { margin: 0; font-size: 13px; color: var(--muted); letter-spacing: 0.05em; }
.site-header h1 { margin: 4px 0 8px; font-size: 22px; }
.lead { margin: 0; font-size: 14px; color: var(--muted); }

/* ステップ表示 */
.steps {
  display: flex;
  gap: 6px;
  list-style: none;
  padding-top: 20px;
  padding-bottom: 4px;
  margin: 0 auto;
  counter-reset: step;
}
.steps li {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding-top: 8px;
  border-top: 3px solid var(--line);
}
.steps li.current { color: var(--accent-dark); font-weight: 700; border-top-color: var(--accent); }
.steps li.passed { border-top-color: var(--accent); }
.steps.hidden { display: none; }

/* 画面(ステップ)切り替え */
.screen {
  display: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px 24px;
  margin: 14px 0 24px;
}
.screen.active { display: block; }
.screen h2 { margin: 0 0 14px; font-size: 18px; }

.field { margin-bottom: 18px; }
.label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }

input[type="text"], textarea {
  width: 100%;
  font-size: 16px; /* iOSのズーム防止 */
  padding: 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
input[type="text"]:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(71, 112, 95, 0.15);
}
textarea { resize: vertical; font-family: inherit; }

/* モール選択 */
.mall-buttons { display: flex; gap: 10px; }
.mall-btn {
  flex: 1;
  min-height: 56px;
  font-size: 15px;
  font-weight: 700;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.mall-btn.selected.rakuten { border-color: #bf0000; background: #fdf1f1; color: #8e0000; }
.mall-btn.selected.yahoo { border-color: #ff0033; background: #fff0f3; color: #b30024; }

/* メッセージ */
.msg { font-size: 13.5px; margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; }
.msg.error { background: #fbeeec; color: var(--danger); }
.msg.ok { background: #ecf5ef; color: var(--ok); }
.msg.warn { background: #faf3e3; color: var(--warn); }

.help { margin-top: 10px; font-size: 13.5px; }
.help summary { color: var(--accent-dark); cursor: pointer; }
.help p { margin: 8px 0; color: var(--muted); }

/* ボタン */
.btn {
  display: block;
  width: 100%;
  min-height: 50px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:active { background: var(--accent-dark); }
.btn.primary:disabled { background: #c5c0b5; cursor: not-allowed; }
.btn.outline { background: #fff; color: var(--accent-dark); border: 2px solid var(--accent); }
.btn.ghost { background: transparent; color: var(--muted); border: 1.5px solid var(--line); }
.btn-row { display: flex; gap: 10px; margin-top: 18px; }
.btn-row .ghost { flex: 1; }
.btn-row .primary { flex: 2; }

/* プレビュー */
.preview-grid {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.preview-grid li {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #faf9f6;
}
.preview-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.preview-grid .meta { padding: 6px 8px 8px; font-size: 11.5px; color: var(--muted); word-break: break-all; }
.preview-grid .badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  margin-bottom: 4px;
}
.badge.ok { background: #ecf5ef; color: var(--ok); }
.badge.warn { background: #faf3e3; color: var(--warn); }
.badge.bad { background: #fbeeec; color: var(--danger); }
.preview-grid .remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

/* 確認画面 */
.confirm-list { margin: 0 0 14px; }
.confirm-list > div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.confirm-list dt { font-size: 12px; color: var(--muted); }
.confirm-list dd { margin: 2px 0 0; font-size: 15px; }
.confirm-list dd.big { font-size: 19px; font-weight: 700; letter-spacing: 0.03em; word-break: break-all; }
.confirm-thumbs { list-style: none; display: flex; gap: 8px; padding: 0; margin: 6px 0 0; flex-wrap: wrap; }
.confirm-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
#turnstile-box { margin: 14px 0 4px; min-height: 0; }

/* 送信中 */
.progress-list { list-style: none; padding: 0; margin: 16px 0; }
.progress-list li { margin-bottom: 12px; font-size: 13px; }
.progress-list .name { display: block; margin-bottom: 4px; word-break: break-all; }
.progress-list .bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress-list .bar > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.progress-list li.error .bar > span { background: var(--danger); }
.progress-list .state { color: var(--muted); font-size: 12px; }
.progress-list li.error .state { color: var(--danger); }

/* 完了 */
#screen-done { text-align: center; }
.done-mark {
  width: 64px;
  height: 64px;
  margin: 8px auto 12px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 34px;
  line-height: 64px;
}
.receipt { font-size: 17px; }
.receipt strong { letter-spacing: 0.08em; }
.notice { font-size: 13.5px; background: #faf3e3; color: var(--warn); padding: 10px 12px; border-radius: 10px; }

.site-footer { padding-bottom: 40px; font-size: 12px; color: var(--muted); text-align: center; }

/* ===== 注文前入稿(楽天専用)で追加した要素 ===== */

/* 買い物フローの説明(楽天の外部リンク許可条件) */
.flow {
  max-width: 520px;
  margin: 18px auto 0;
  padding: 16px 18px 18px;
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.flow h2 { margin: 0 0 10px; font-size: 15px; }
.flow ol { margin: 0; padding-left: 1.3em; font-size: 13.5px; }
.flow ol li { margin-bottom: 5px; }
.flow .flow-note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }

/* 前回の受付番号 */
.prev-receipt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #eef3f0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 14px 0 -4px;
  font-size: 12.5px;
  color: var(--muted);
}
.prev-receipt strong {
  font-size: 20px;
  letter-spacing: .12em;
  color: var(--accent-dark);
  font-variant-numeric: tabular-nums;
}

/* 受付番号の表示 */
.receipt-box {
  background: #f3f7f5;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 16px 16px;
  margin: 4px 0 16px;
}
.receipt-label { margin: 0; font-size: 12.5px; color: var(--muted); letter-spacing: .08em; }
.receipt-number {
  margin: 4px 0 14px;
  font-size: clamp(30px, 9vw, 40px);
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--accent-dark);
  font-variant-numeric: tabular-nums;
}
.btn.copy { min-height: 44px; font-size: 15px; }

.callout {
  background: #faf3e3;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
  text-align: left;
}
.callout p { margin: 0 0 6px; font-size: 13.5px; color: var(--warn); }
.callout p:last-child { margin-bottom: 0; }

.btn.shop-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

/* フッターの表示(外部リンク許可条件) */
.notice-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  text-align: left;
}
.notice-box p { margin: 0 0 4px; font-size: 12px; color: var(--ink); }
.notice-box p:last-child { margin-bottom: 0; }
.operator { font-weight: 700; color: var(--ink); margin-bottom: 8px; }
