/* ─── リセット & 基本 ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --white:   #FFFFFF;
  --black:   #1A1A1A;
  --gray:    #8A8A8A;
  --light:   #F4F2EE;
  --gold:    #C4922A;
  --gold-lt: #F0D9A0;
  --red:     #B8384E;
  --radius:  12px;
  --shadow:  0 4px 20px rgba(0,0,0,0.10);
}

body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  background: var(--light);
  color: var(--black);
  min-height: 100dvh;
}

/* ─── ページ切り替え ──────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }

/* ─── ヘッダー ────────────────────────────────────────────── */
header {
  background: var(--white);
  border-bottom: 1px solid #E0DDD6;
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.logo-img {
  height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
  object-position: center;
}

.logo-sub {
  font-family: "Noto Serif JP", serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--black);
  padding-left: 2px;
}

/* ─── ページナビ（スタンプ取得画面上部） ─────────────────── */
.page-nav {
  background: var(--white);
  border-bottom: 1px solid #E0DDD6;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-back {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
  color: var(--black);
  padding: 4px 8px;
}

.page-nav-label {
  font-size: 0.85rem;
  color: var(--gray);
}

/* ─── コンテナ ────────────────────────────────────────────── */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

/* ─── プログレス ──────────────────────────────────────────── */
.progress-wrap {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  text-align: center;
}

.progress-label {
  font-family: "Noto Serif JP", serif;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--gray);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.progress-count {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
  font-family: "Noto Serif JP", serif;
}

.progress-bar-bg {
  background: var(--light);
  border-radius: 99px;
  height: 8px;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--gold), #E8C060);
  height: 100%;
  border-radius: 99px;
  transition: width 0.6s ease;
}

/* ─── ビュー切替 ──────────────────────────────────────────── */
.view-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: var(--white);
  border-radius: 10px;
  padding: 4px;
  box-shadow: var(--shadow);
}

.view-btn {
  flex: 1;
  background: none;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--gray);
  transition: background 0.2s, color 0.2s;
  font-family: "Noto Sans JP", sans-serif;
}

.view-btn.active {
  background: var(--gold);
  color: var(--white);
}

/* ─── セクション見出し ────────────────────────────────────── */
.section-title {
  font-family: "Noto Serif JP", serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--gray);
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* ─── スタンプグリッド ────────────────────────────────────── */
.stamp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 32px;
}

@media (max-width: 400px) {
  .stamp-grid { grid-template-columns: repeat(3, 1fr); }
}

.stamp-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center;
  padding-bottom: 8px;
  filter: grayscale(1) opacity(0.45);
  transition: filter 0.3s;
}

.stamp-card.got { filter: none; }

.stamp-img-wrap {
  position: relative;
  aspect-ratio: 1;
  background: var(--light);
}

.stamp-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.stamp-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--gray);
  font-weight: 700;
}

.stamp-name {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--black);
  padding: 5px 5px 2px;
  line-height: 1.4;
}

.stamp-event {
  font-size: 0.52rem;
  color: var(--gold);
  padding: 0 5px 2px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stamp-location {
  font-size: 0.5rem;
  color: var(--gray);
  padding: 0 5px 6px;
  line-height: 1.4;
}

/* ─── エリアビュー ────────────────────────────────────────── */
.area-block {
  margin-bottom: 24px;
}

.area-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.area-name {
  font-family: "Noto Serif JP", serif;
  font-size: 0.9rem;
  font-weight: 700;
}

.area-count {
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 700;
  background: var(--gold-lt);
  padding: 3px 10px;
  border-radius: 99px;
}

/* ─── 獲得済み特典リスト ──────────────────────────────────── */
.benefit-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 32px;
}

.benefit-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  gap: 16px;
  padding: 16px;
  align-items: center;
}

.benefit-card img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--light);
  flex-shrink: 0;
}

.benefit-venue-name {
  font-size: 0.72rem;
  color: var(--gray);
  margin-bottom: 4px;
}

.benefit-info h3 {
  font-family: "Noto Serif JP", serif;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.benefit-info p {
  font-size: 0.76rem;
  color: var(--gray);
  margin-bottom: 10px;
}

.btn-use {
  background: var(--gold);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-use:hover { background: #a87820; }

.badge-used {
  display: inline-block;
  background: var(--gray);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.1em;
}

/* ─── スタンプ取得画面 ────────────────────────────────────── */
.stamp-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--gray);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.stamp-single-img {
  width: min(200px, 55vw);
  height: min(200px, 55vw);
  object-fit: contain;
  margin: 16px auto 24px;
  display: block;
  border-radius: var(--radius);
  background: var(--white);
  padding: 18px;
  box-shadow: var(--shadow);
}

.stamp-venue-name {
  font-family: "Noto Serif JP", serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.stamp-venue-desc {
  color: var(--gray);
  font-size: 0.85rem;
  margin-bottom: 32px;
}

.btn-stamp-get {
  background: var(--gold);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 16px 40px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.08em;
  box-shadow: 0 4px 16px rgba(196,146,42,0.4);
}

.btn-stamp-get:hover { background: #a87820; }

.stamp-result {
  margin-top: 20px;
  font-size: 1rem;
  font-weight: 700;
}

.stamp-result.success { color: var(--gold); }
.stamp-result.already { color: var(--gray); }

/* ─── モーダル共通 ────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open { display: flex; }

.modal-box {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 400px;
  width: 100%;
  padding: 28px 22px 22px;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
  max-height: 90dvh;
  overflow-y: auto;
}

.modal-box > img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  background: var(--light);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 14px;
}

.modal-box h2 {
  font-family: "Noto Serif JP", serif;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.modal-box > p {
  font-size: 0.82rem;
  color: var(--gray);
  margin-bottom: 20px;
}

.modal-warn {
  font-size: 0.74rem;
  color: var(--red);
  margin-bottom: 18px;
  font-weight: 700;
}

.modal-actions {
  display: flex;
  gap: 12px;
}

.btn-modal-confirm {
  flex: 1;
  background: var(--gold);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 14px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-modal-cancel {
  flex: 1;
  background: var(--light);
  color: var(--black);
  border: none;
  border-radius: 8px;
  padding: 14px;
  font-size: 0.9rem;
  cursor: pointer;
}

/* ─── アンロックモーダル ─────────────────────────────────── */
.unlocked-header { text-align: center; margin-bottom: 18px; }
.unlocked-icon { font-size: 2.6rem; margin-bottom: 8px; }
.unlocked-header h2 { font-family: "Noto Serif JP", serif; font-size: 1.05rem; color: var(--gold); margin-bottom: 6px; }
.unlocked-header p  { font-size: 0.76rem; color: var(--gray); }
.modal-venue-name { font-weight: 700; color: var(--black) !important; font-size: 0.85rem !important; margin-bottom: 4px !important; }

.unlocked-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }

.unlocked-item {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--light);
  border-radius: 10px;
  padding: 12px;
  text-align: left;
}

.unlocked-item img {
  width: 56px; height: 56px;
  object-fit: contain;
  background: var(--white);
  border-radius: 8px;
  padding: 6px;
  flex-shrink: 0;
}

.unlocked-item h3 { font-family: "Noto Serif JP", serif; font-size: 0.88rem; margin-bottom: 3px; }
.unlocked-item p  { font-size: 0.72rem; color: var(--gray); margin: 0; }

/* ─── エラー画面 ──────────────────────────────────────────── */
.status-page {
  min-height: 80dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  gap: 14px;
}

.status-page .status-icon { font-size: 3.2rem; }
.status-page h1 { font-family: "Noto Serif JP", serif; font-size: 1.3rem; }
.status-page p  { color: var(--gray); font-size: 0.88rem; line-height: 1.8; }
