/* ============================================================
 *  スタンプラリー スタイル
 * ============================================================ */

:root {
  --accent: #e8552d;
  --accent-dark: #c23e1a;
  --gold: #f3b21b;
  --green: #2e9d5b;
  --bg: #fff7ef;
  --card: #ffffff;
  --ink: #3a2a22;
  --muted: #8a7b72;
  --line: #f0e2d6;
  --radius: 18px;
  --shadow: 0 6px 20px rgba(120, 70, 40, 0.10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, #ffe6cf 0, transparent 42%),
    radial-gradient(circle at 88% 0%, #fff0d0 0, transparent 40%),
    var(--bg);
  -webkit-text-size-adjust: 100%;
  line-height: 1.6;
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px calc(40px + env(safe-area-inset-bottom));
}

.wrap--center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- ヘッダー ---- */
.hero {
  text-align: center;
  padding: 8px 0 18px;
}
.hero__logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  margin-bottom: 6px;
}
.hero__title {
  font-size: 1.5rem;
  margin: 4px 0 2px;
  letter-spacing: 0.02em;
}
.hero__tagline {
  margin: 0;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.98rem;
}

/* ---- カード共通 ---- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 16px;
  margin: 14px 0;
}

/* ---- バナー（クリア/コンプリート） ---- */
.banner {
  border-radius: var(--radius);
  padding: 20px 16px;
  margin: 14px 0;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow);
}
.banner--hidden { display: none; }
.banner--clear {
  background: linear-gradient(135deg, var(--green), #1f7e46);
}
.banner--complete {
  background: linear-gradient(135deg, var(--gold), var(--accent));
}
.banner__big {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.banner__sub {
  font-size: 1rem;
  margin-top: 2px;
  opacity: 0.95;
}
.banner__prize {
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---- 進捗 ---- */
.progress { text-align: center; }
.progress__numbers {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}
.progress__count {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.progress__sep, .progress__total {
  font-size: 1.4rem;
  color: var(--muted);
  font-weight: 700;
}
.progress__unit { color: var(--muted); font-size: 0.95rem; }
.progress__bar {
  margin: 12px 0 8px;
  height: 14px;
  background: #f1e3d6;
  border-radius: 999px;
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--accent));
  border-radius: 999px;
  transition: width 0.5s ease;
}
.progress__hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---- 説明 ---- */
.desc {
  color: var(--ink);
  font-size: 0.92rem;
}

/* ---- スタンプ一覧 ---- */
.stamps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 14px 0;
}
@media (max-width: 380px) {
  .stamps { grid-template-columns: repeat(3, 1fr); }
}
.stamp { text-align: center; }
.stamp__imgwrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.stamp__img {
  width: 84%;
  height: 84%;
  object-fit: contain;
  transition: transform 0.2s ease;
}
.stamp--got .stamp__img {
  animation: pop 0.4s ease;
}
.stamp--locked .stamp__img {
  filter: grayscale(1);
  opacity: 0.28;
}
.stamp__lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: #c9b8aa;
}
.stamp__label {
  margin-top: 5px;
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.25;
}
.stamp--got .stamp__label { color: var(--ink); font-weight: 700; }

@keyframes pop {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* ---- 注意事項 ---- */
.notes__title {
  font-size: 1rem;
  margin: 0 0 8px;
}
.notes__list {
  margin: 0;
  padding-left: 1.1em;
  font-size: 0.85rem;
  color: var(--muted);
}
.notes__list li { margin-bottom: 6px; }

/* ---- 警告 ---- */
.warn {
  background: #fff1f0;
  color: #a3271a;
  font-size: 0.88rem;
  border: 1px solid #f5c6c0;
}
.warn--hidden { display: none; }

/* ---- フッター ---- */
.foot {
  text-align: center;
  margin-top: 18px;
}
.foot__pid {
  font-size: 0.7rem;
  color: #c2b2a6;
  letter-spacing: 0.02em;
}

/* ============================================================
 *  stamp.html 結果画面
 * ============================================================ */
.result {
  text-align: center;
  width: 100%;
  max-width: 420px;
  padding: 28px 22px;
}
.result__icon { font-size: 3.2rem; line-height: 1; }
.result__title {
  font-size: 1.5rem;
  margin: 10px 0 6px;
}
.result__stampwrap { margin: 14px 0; }
.result__stamp {
  width: 150px;
  height: 150px;
  object-fit: contain;
  animation: pop 0.5s ease;
}
.result__msg {
  color: var(--ink);
  font-size: 1rem;
  margin: 6px 0 14px;
}
.result__progress {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 10px;
}
.result__status {
  min-height: 1.2em;
  font-weight: 800;
  color: var(--green);
  margin: 6px 0 16px;
  font-size: 1.02rem;
}
.result--success .result__title { color: var(--green); }
.result--error .result__title { color: var(--accent-dark); }
.result--info .result__title { color: var(--muted); }

/* ---- ボタン ---- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.btn:active { background: var(--accent-dark); }
