/* ページ共通のスタイル - Spring Tech Design System */

:root {
  /* Spring Tech カラーパレット */
  --primary-spring-pink: #f06292;   /* メインの桜色。力強さのあるピンク */
  --secondary-mint: #e0f2f1;        /* サブの背景色。清涼感 */
  --accent-blue: #00acc1;           /* リンクやボタン。信頼感のある青 */
  --text-main: #333333;             /* 基本の文字色 */
  --text-muted: #666666;            /* 補助テキスト */
  --bg-white: #ffffff;
  --bg-light-gray: #f8f9fa;         /* セクション区切り用 */
  --border: #e5e7eb;                /* 薄いグレー */
  
  /* 後方互換性のためのエイリアス */
  --bg: var(--bg-white);
  --accent: var(--accent-blue);
  --header-bg: var(--secondary-mint);
  --secondary: #6b7280;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg-white);
  color: var(--text-main);
  font-family: "Noto Sans JP", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.7;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
}

/* 見出し（Spring Tech） */
h2 {
  color: var(--text-main);
  font-size: clamp(20px, 5vw, 24px);
  font-weight: 700;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--primary-spring-pink);
  position: relative;
}
h2::before {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--accent-blue);
}

/* ヘッダー（Spring Tech デザイン） */
.site-header {
  background: linear-gradient(135deg, var(--secondary-mint) 0%, #ffffff 100%);
  border-bottom: 2px solid var(--primary-spring-pink);
  position: relative;
  overflow: hidden;
}
.site-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(240, 98, 146, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}
.brand {
  margin: 0;
  padding: 20px 0;
  color: var(--text-main);
  font-size: 28px;
  font-weight: 700;
  font-family: "Noto Sans JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
  text-align: center;
  letter-spacing: 0.05em;
  position: relative;
  z-index: 1;
}

/* セクション余白（Spring Tech） */
.section {
  margin: 16px 0;
  animation: fadeInUp 0.6s ease-out;
}

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

/* リスト */
.list { list-style: none; padding: 0; margin: 0; }
.list-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.list-item a { color: #1f2937; text-decoration: none; }
.list-item a:hover { text-decoration: underline; }

/* 進捗バー（Spring Tech） */
.progress {
  width: 100%;
  height: 10px;
  background: var(--bg-light-gray);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-spring-pink) 0%, #ec407a 100%);
  transition: width 0.6s ease-out;
  position: relative;
  overflow: hidden;
}
.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: progress-shimmer 2s infinite;
}

@keyframes progress-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* 太めの進捗バー（横幅はそのまま、高さだけ拡張） */
.progress-thick { height: 20px; }

/* 区切り線（Spring Tech - 斜めのアクセント） */
.section-separator {
  border: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--primary-spring-pink) 50%, transparent 100%);
  margin: 24px 0;
  position: relative;
}
.section-separator::after {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: var(--primary-spring-pink);
  border-radius: 2px;
}

/* マップのプレースホルダー（枠付き矩形） */
.map-placeholder {
  width: 100%;
  height: 200px;
  border: 2px dashed var(--border);
  display: grid;
  place-items: center;
  color: var(--text-muted);
}

/* アクション行（横並び） */
.action-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch; /* ボタン高さを揃える */
}
.action-row .btn {
  width: 100%;
  min-height: 72px;
  padding: 18px 20px;
  border-radius: 6px;
  font-size: 22px;
}

/* 縦並びボタンのラッパー */
.column-buttons { display: grid; gap: 12px; }

/* ボタン（共通） */
.btn {
  appearance: none;
  display: inline-block;
  padding: 16px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: center;
  flex: 1 1 50%;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}
.btn:hover::before {
  width: 300px;
  height: 300px;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}
.btn:focus {
  outline: 2px solid var(--primary-spring-pink);
  outline-offset: 2px;
}
.btn:active {
  transform: translateY(0);
}

/* プライマリ（Spring Tech - アクアブルー） */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue) 0%, #0097a7 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 172, 193, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 8px 20px rgba(0, 172, 193, 0.4);
}

/* セカンダリ（落ち着いたグレー） */
.btn-secondary {
  background: linear-gradient(135deg, #607d8b 0%, #546e7a 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(96, 125, 139, 0.3);
}
.btn-secondary:hover {
  box-shadow: 0 8px 20px rgba(96, 125, 139, 0.4);
}

/* フューチャー（Spring Pink - メイン機能強調） */
.btn-featured {
  background: linear-gradient(135deg, var(--primary-spring-pink) 0%, #ec407a 100%);
  box-shadow: 0 12px 28px rgba(240, 98, 146, 0.4);
  border-radius: 12px;
  font-weight: 700;
}
.btn-featured:hover {
  box-shadow: 0 16px 36px rgba(240, 98, 146, 0.5);
  transform: translateY(-3px);
}

/* 戻るボタン行 */
.back-row { margin: 8px 0 16px; }
.btn-back {
  text-align: left;
  text-decoration: none;
  padding: 12px 16px; /* 少しコンパクトに */
}
.btn-back:hover { text-decoration: none; }

/* フロア用ボタン（左揃え・大きめ文字・下線なし） */
.btn-floor {
  text-align: left;
  font-size: 20px;
  text-decoration: none;
}
.btn-floor:hover { text-decoration: none; }

/* カードグリッド（Spring Tech） */
/* スタンプカードのグリッド */
.card-grid {
  position: relative;
  width: clamp(260px, 78vw, 380px);
  height: clamp(260px, 78vw, 380px);
  margin: 0 auto;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff 0%, var(--secondary-mint) 50%, #ffffff 100%);
  box-shadow: 0 10px 30px rgba(240, 98, 146, 0.15);
  overflow: hidden;
}
.card-grid::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(240, 98, 146, 0.03) 10px,
    rgba(240, 98, 146, 0.03) 20px
  );
  animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
  0% { transform: translate(0, 0); }
  100% { transform: translate(20px, 20px); }
}
.card-cell {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-rows: auto auto;
  justify-items: center;
  gap: 8px;
  text-align: center;
  z-index: 1;
}
/* 丸いスタンプ領域（Spring Tech） */
.stamp-circle {
  width: clamp(64px, 20vw, 96px);
  height: clamp(64px, 20vw, 96px);
  border-radius: 50%;
  border: 3px solid var(--accent-blue);
  overflow: hidden;
  background: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(0, 172, 193, 0.2);
  transition: all 0.3s ease;
}
.stamp-circle:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 28px rgba(0, 172, 193, 0.3);
}
.stamp-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.stamp-circle.disabled {
  border-color: #d1d5db;
  background: #f9fafb;
  cursor: default;
}
.stamp-circle.blank {
  border-style: dashed;
  border-color: rgba(0, 172, 193, 0.3);
  background: var(--bg-light-gray);
  box-shadow: none;
}
.stamp-label {
  font-size: clamp(12px, 3.5vw, 14px);
  color: var(--text-main);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* 押印状態の表現（Spring Pink） */
.card-cell.stamped .stamp-circle {
  border-color: var(--primary-spring-pink);
  background: linear-gradient(135deg, #ffffff 0%, #fce4ec 100%);
  box-shadow: 0 8px 20px rgba(240, 98, 146, 0.3);
}
.card-cell.just-stamped .stamp-circle {
  animation: pulse-spring 0.6s ease-in-out;
}

@keyframes pulse-spring {
  0% {
    box-shadow: 0 0 0 0 rgba(240, 98, 146, 0.7);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 20px rgba(240, 98, 146, 0);
    transform: scale(1.1);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(240, 98, 146, 0);
    transform: scale(1);
  }
}

/* 完成状態（全スタンプ埋まり） */
.card-grid.completed {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffc700 100%);
  box-shadow: 0 15px 40px rgba(255, 215, 0, 0.4);
  animation: celebrate-glow 0.6s ease-out;
}

@keyframes celebrate-glow {
  0% {
    box-shadow: 0 10px 30px rgba(240, 98, 146, 0.15);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 20px 50px rgba(255, 215, 0, 0.5);
    transform: scale(1.02);
  }
  100% {
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.4);
    transform: scale(1);
  }
}

/* モバイル向け微調整（Spring Tech） */
@media (max-width: 480px) {
  .btn {
    font-size: 18px;
    padding: 18px 20px;
  }
  .action-row {
    gap: 14px;
  }
  .brand {
    font-size: 24px;
  }
  h2 {
    font-size: 20px;
  }
  .card-grid {
    height: clamp(360px, 100vw, 620px);
    border-radius: 16px;
  }
}
