/* ==========================================================================
   平日割LP v2（2026-10-14）
   色は :root のトークンだけを使う。テーマ色＝青系（平日の落ち着き）、強調＝赤（割引・価格）
   ========================================================================== */

:root {
  --c-primary: #1F6FE5;
  --c-primary-dark: #1553B3;
  --c-primary-soft: #E8F1FE;
  --c-accent: #D7263D;        /* 割引・価格。白地で 5.3:1 */
  --c-accent-soft: #FDECEE;
  --c-ink: #1A2233;
  --c-ink-2: #4A5468;
  --c-ink-3: #7A8396;
  --c-line: #E2E7EF;
  --c-bg: #F3F6FA;
  --c-card: #FFFFFF;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 32, 64, .06), 0 2px 8px rgba(16, 32, 64, .05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: #E9EDF3;
  color: var(--c-ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }

#app-wrapper {
  max-width: 480px;
  margin: 0 auto;
  background: var(--c-bg);
  min-height: 100vh;
  box-shadow: 0 0 20px rgba(0, 0, 0, .08);
}

.container { padding: 0 16px; }

/* ---------- ヘッダー ---------- */
.header { background: #fff; border-bottom: 1px solid var(--c-line); padding: 12px 0; }
.header-logo { display: flex; justify-content: center; }
.header-logo img { height: 24px; display: block; }


/* ---------- ヒーロー（KV画像 1200×630、Retinaは@2x） ---------- */
.hero { background: #DCEFFB; }
.hero-image { width: 100%; height: auto; aspect-ratio: 1200 / 630; display: block; }

/* ---------- イントロ ---------- */
.section-intro { background: #fff; padding: 22px 0 24px; }
.section-desc { font-size: 13px; line-height: 1.85; color: var(--c-ink-2); }
.section-desc b { color: var(--c-ink); }


/* ---------- カタログ ---------- */
.section-catalog { padding: 14px 0 32px; }

.sticky-filter {
  position: sticky; top: 0; z-index: 50;
  background: var(--c-bg);
  padding: 6px 0 8px;
}
.sticky-filter.is-stuck { box-shadow: 0 4px 10px -6px rgba(16, 32, 64, .25); }

.chip-row {
  display: flex; gap: 8px;
  overflow-x: auto; padding: 0 16px;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  font-family: inherit;
  font-size: 13px; font-weight: 700; line-height: 1;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--c-line);
  background: #fff; color: var(--c-ink-2);
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.chip .n { font-size: 11px; font-weight: 500; color: var(--c-ink-3); margin-left: 4px; }
.chip[aria-pressed="true"] { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.chip[aria-pressed="true"] .n { color: rgba(255, 255, 255, .8); }

.result-bar { display: flex; align-items: center; justify-content: space-between; margin: 10px 0; }
.sort { display: flex; flex-shrink: 0; gap: 2px; }
.sort button {
  font-family: inherit; font-size: 12px; font-weight: 700; line-height: 1;
  border: 0; background: transparent; color: var(--c-ink-3);
  padding: 7px 8px; border-radius: 6px; cursor: pointer;
}
.sort button[aria-pressed="true"] { background: #fff; color: var(--c-ink); box-shadow: 0 1px 2px rgba(16, 32, 64, .12); }

.result-status { font-size: 12px; color: var(--c-ink-3); }
.result-status b { color: var(--c-ink); font-size: 14px; }

.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

@keyframes gridFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.product-grid.is-fade { animation: gridFade .25s ease both; }

/* カード（参考: 温泉一覧カード） */
.card {
  position: relative;
  background: var(--c-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  display: flex; flex-direction: column;
}
.card:active { transform: scale(.98); }

.thumb { position: relative; flex: none; aspect-ratio: 3 / 2; overflow: hidden; background: #DDE3EC; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.badge-off {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  background: var(--c-accent); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1;
  padding: 4px 6px; border-radius: 4px;
}
.badge-loc {
  position: absolute; left: 6px; bottom: 6px; z-index: 2;
  max-width: calc(100% - 12px);
  display: inline-flex; align-items: center; gap: 2px;
  background: rgba(17, 24, 39, .62); color: #fff;
  font-size: 10px; font-weight: 500; line-height: 1;
  padding: 4px 8px 4px 6px; border-radius: 999px;
  white-space: nowrap; overflow: hidden;
}
.badge-loc svg { width: 10px; height: 10px; flex-shrink: 0; }
.badge-loc span { overflow: hidden; text-overflow: ellipsis; }

.card-body { padding: 8px 10px 10px; display: flex; flex-direction: column; flex: 1; }
.c-name {
  font-size: 13px; font-weight: 700; line-height: 1.4; height: 2.8em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.c-plan {
  font-size: 11px; line-height: 1.5; color: var(--c-ink-2); margin-top: 4px; height: 4.5em;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.c-price {
  margin-top: auto; padding-top: 8px;
  font-size: 16px; font-weight: 800; color: var(--c-accent); line-height: 1.2;
}
.c-price del { font-size: 11px; font-weight: 500; color: var(--c-ink-3); margin-right: 4px; }

.empty-state { text-align: center; padding: 48px 16px; color: var(--c-ink-3); font-size: 13px; }

/* ---------- フッター ---------- */
.footer { background: #fff; border-top: 1px solid var(--c-line); padding: 24px 16px 28px; text-align: center; }
.footer p { font-size: 12px; color: var(--c-ink-3); }

/* ---------- 読み込み・エラー ---------- */
.loading-container, .error-container {
  min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 48px 16px;
}
.loading-content, .error-content { text-align: center; }
.spinner {
  display: inline-block; width: 32px; height: 32px; margin-bottom: 12px;
  border: 4px solid var(--c-primary); border-top-color: transparent; border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 14px; color: var(--c-ink-3); }
.error-text { font-size: 14px; color: var(--c-accent); margin-bottom: 16px; }
.retry-button {
  padding: 8px 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--c-primary); color: #fff; font-family: inherit; font-size: 14px; font-weight: 700;
}

/* ---------- プレビュー（staging / ローカルのみ表示される状態） ---------- */
[data-display-status="preview-only"]::after,
[data-display-status="upcoming"]::after,
[data-display-status="ended"]::after {
  content: ''; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  box-shadow: inset 0 0 0 2px #E53935; border-radius: var(--radius);
}
.preview-badge {
  position: absolute; top: 6px; right: 6px; z-index: 5;
  background: #E53935; color: #fff; padding: 3px 8px; border-radius: 4px;
  font-size: 10px; font-weight: 700;
}
.pr-badge {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  background: rgba(255, 255, 255, .85); color: #6b7280;
  border: 1px solid rgba(107, 114, 128, .35); border-radius: 3px;
  padding: 0 5px; font-size: 9px; font-weight: 600; line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
