/* 公開キャンペーンページ (campaign/) */
:root {
  --red: #ea5a5a;
  --red-dark: #d94b4b;
  --ink: #222;
  --muted: #666;
  --line: #e6e6e6;
  --bg: #f4f4f4;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
a { color: #1a73e8; }
.page { max-width: 430px; margin: 0 auto; min-height: 100vh; background: #fff; padding-bottom: 32px; }
.hero img { display: block; width: 100%; height: auto; }

.sec { padding: 22px 14px 6px; }
.sec h2 { font-size: 21px; font-weight: 700; line-height: 1.4; margin: 0 0 8px; }
.sec p { margin: 0 0 8px; }
.sec.center { text-align: center; padding-top: 32px; padding-bottom: 24px; }
.cta { padding: 20px 14px 8px; text-align: center; }
.lead { font-size: 15px; font-weight: 700; line-height: 1.8; }
.note { font-size: 12px; color: var(--muted); margin: 10px 0 0; }

.btn {
  display: block; width: 100%; max-width: 340px; margin: 12px auto 0;
  padding: 14px 16px; border-radius: 999px; border: 0;
  font-size: 16px; font-weight: 700; text-align: center; text-decoration: none;
  cursor: pointer; -webkit-appearance: none; appearance: none;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:active { background: var(--red-dark); }
.btn-primary.copied { background: #3cb371; }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); font-weight: 500; }

.steps { margin: 0; padding: 0; list-style: none; }
.steps li { position: relative; padding-left: 1.5em; margin: 0 0 4px; }
.steps .step-no { position: absolute; left: 0; top: 0; }
.terms { margin: 0; padding: 0 0 12px; list-style: none; }
.terms li { position: relative; padding-left: 14px; margin: 0 0 4px; font-size: 12.5px; color: #444; }
.terms li::before { content: "・"; position: absolute; left: 0; }

/* result */
.result-title { font-size: 24px; font-weight: 700; line-height: 1.5; margin: 8px 0 20px; }
.accent { color: var(--red); }
.serial-box { border: 1px solid var(--line); border-radius: 12px; padding: 18px 16px 14px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.serial-label { font-size: 12px; color: var(--muted); margin: 0; }
.serial-code { font-size: 26px; font-weight: 700; letter-spacing: .06em; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.btn-copy { margin-top: 6px; }
.serial-note { font-size: 11px; color: var(--muted); margin: 10px 0 0; line-height: 1.6; }
.result-lead { font-size: 18px; font-weight: 700; line-height: 1.6; margin: 28px 0 10px; }
.result-sub { font-size: 14px; font-weight: 700; margin: 0 0 16px; }
.slash { color: var(--red); }
.stores { display: flex; gap: 16px; justify-content: center; }
.store { flex: 1 1 0; max-width: 170px; text-align: center; }
.store-label { font-size: 12px; margin: 0 0 8px; }
.qr { display: flex; justify-content: center; margin: 0 0 8px; }
.qr img, .qr canvas { width: 140px !important; height: 140px !important; }
.store-badge {
  display: block; background: #000; color: #fff; text-decoration: none;
  border-radius: 8px; padding: 6px 10px; text-align: left; line-height: 1.15;
}
.store-badge-small { display: block; font-size: 9px; letter-spacing: .02em; opacity: .9; }
.store-badge-big { display: block; font-size: 16px; font-weight: 700; }

.checklist { list-style: none; margin: 16px auto; padding: 0; max-width: 320px; text-align: left; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin: 0 0 8px; font-size: 14px; }
.checklist .mark { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; text-align: center; line-height: 22px; font-size: 13px; font-weight: 700; color: #fff; }
.checklist li.ok .mark { background: #3cb371; }
.checklist li.ok .mark::before { content: "✓"; }
.checklist li.ng .mark { background: var(--red); }
.checklist li.ng .mark::before { content: "!"; }

.foot { padding: 20px 14px 8px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 16px; }
.foot p { margin: 0 0 4px; }

/* 判定テスト (管理画面から) */
.test-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.test-table th, .test-table td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.test-table th { width: 40%; background: #fafafa; font-weight: 700; }
.dump { text-align: left; font-family: ui-monospace, Menlo, monospace; font-size: 11px; white-space: pre-wrap; word-break: break-all; background: #f6f6f6; border: 1px solid var(--line); border-radius: 6px; padding: 8px; max-height: 60vh; overflow: auto; }

/* ===== 導線 v2 ===== */
.v2-lead { text-align: center; padding: 18px 14px 0; }
.v2-lead-main { font-size: 17px; font-weight: 700; margin: 0 0 2px; }
.v2-lead-sub { font-size: 15px; font-weight: 700; color: #e8291c; margin: 0; }
.cta-v2 { padding-top: 14px; }
.btn-red { background: #e8291c; color: #fff; }
.btn-red:active { background: #c9211a; }
.result-v2 .result-title { font-size: 24px; margin: 4px 0 12px; }
.capsule { display: block; width: 150px; height: auto; margin: 0 auto 10px; }
.v2-catch { font-size: 17px; font-weight: 700; line-height: 1.5; margin: 0 0 8px; }
.v2-desc { font-size: 12px; line-height: 1.7; margin: 0 0 16px; }
.serial-box-v2 { max-width: 300px; margin: 0 auto 14px; padding: 14px 16px 12px; }
.serial-box-v2 .serial-code { font-size: 22px; margin: 2px 0 8px; }
.btn-copy-quiet { background: #aab4c3; color: #fff; font-size: 13px; padding: 9px 14px; max-width: 220px; }
.btn-copy-quiet.copied { background: #3cb371; }
.btn-cta-v2 { font-size: 20px; padding: 10px 16px 12px; line-height: 1.25; }
.btn-cta-v2 .small { display: block; font-size: 12px; font-weight: 500; }
.cta-band { margin: 0 -14px 16px; padding: 10px 14px 12px; background: #e8291c; color: #fff; font-size: 20px; font-weight: 700; line-height: 1.25; }
.cta-band .small { display: block; font-size: 12px; font-weight: 500; }
.v2-notes { list-style: none; margin: 16px 0 16px; padding: 0; text-align: left; font-size: 11px; color: #555; line-height: 1.6; }
.v2-notes li { margin: 0 0 2px; }
.v2-notes li.accent { color: var(--red); }
/* ガチャ演出 (gacha.php)。アプリ側 (web/css/x_campaign.css) と同じ見た目 */
.gacha-overlay { position: fixed; inset: 0; background: #fff; z-index: 150; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gacha-lottie { position: absolute; inset: 0; }
.gacha-lottie svg { width: 100% !important; height: 100% !important; }
.gacha-skip { position: absolute; left: 0; right: 0; bottom: max(24px, env(safe-area-inset-bottom)); text-align: center; color: #888; font-size: 13px; margin: 0; animation: gacha-blink 2s infinite; }
@keyframes gacha-blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.gacha-fallback { display: flex; flex-direction: column; align-items: center; }
.gacha-img { width: 260px; height: 260px; animation: gacha-shake 0.7s ease-in-out infinite; }
@keyframes gacha-shake { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.gacha-text { color: #666; font-weight: 700; font-size: 16px; margin: 16px 0 0; }
