/* ==========================================================
   スキー場早割リフト券特集 2026-2027
   SPファースト / PCでも480px幅維持（brand標準）
   白ベース・フラット・2カラム（202511_skiのトーン踏襲）
   ========================================================== */
:root {
  --navy: #0e2a52;
  --blue: #1a6ad6;
  --ink: #1a1a1a;
  --sub: #6b7280;
  --sub-light: #9ca3af;
  --line: #e5e7eb;
  --bg-gray: #f3f4f6;
  --white: #ffffff;
  --red: #dc2626;
  --font: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 14px;
  overflow-x: hidden;
}

#app-wrapper {
  max-width: 480px;
  margin: 0 auto;
  background: var(--white);
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.is-hidden { display: none !important; }

/* Header */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
}
.header-container {
  display: flex;
  justify-content: center;
}
.header-logo img { height: 26px; width: auto; }

/* Hero */
.hero-image { width: 100%; height: auto; }

/* Lead */
.lead {
  padding: 18px 16px 4px;
}
.lead-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
}
.lead-season {
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.08em;
}
.lead-text {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--sub);
}
.lead-note {
  margin-top: 6px;
  font-size: 10.5px;
  color: var(--sub-light);
}

/* Loading */
.loading-container {
  padding: 60px 16px;
  text-align: center;
  color: var(--sub);
  font-size: 12px;
}
.loading-spinner {
  width: 28px; height: 28px;
  margin: 0 auto 10px;
  border: 3px solid var(--line);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .loading-spinner { animation: none; }
}

/* 券種レーンタブ（下線タブ） */
.lane-tabs {
  display: flex;
  border-bottom: 2px solid var(--line);
  margin: 12px 16px 0;
}
.lane-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  color: var(--sub);
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 4px;
}
.lane-tab.is-active {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--navy);
}
.lane-tab .lane-count {
  font-size: 11px;
  font-weight: 400;
  margin-left: 2px;
  color: var(--sub-light);
}

/* エリアフィルター + 並び替え: スクロールしても上部に残す。
   通常時は罫線なし・不透明、追従中だけ半透明＋ぼかし＋下線にする */
.sticky-sentinel {
  height: 1px;
  margin-bottom: -1px;
}
.filter-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--white);
  padding-bottom: 8px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  border-bottom: 1px solid transparent;
}
.filter-sticky.is-stuck {
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}

/* エリアフィルター */
.region-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px 2px;
  scrollbar-width: none;
}
.region-nav::-webkit-scrollbar { display: none; }
.region-btn {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--sub);
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 4px;
  white-space: nowrap;
}
.region-btn.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
  font-weight: 700;
}

/* 並び替え */
.sort-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 0;
}
.sort-label { font-size: 11px; color: var(--sub); flex: 0 0 auto; }
.sort-buttons { display: flex; gap: 12px; }
.sort-btn {
  border: none;
  background: none;
  color: var(--sub);
  font-size: 12px;
  padding: 4px 0;
}
.sort-btn.is-active {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* プラン一覧（2カラム） */
.plan-count {
  padding: 10px 16px 0;
  font-size: 11px;
  color: var(--sub);
}
.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 10px;
  padding: 10px 16px 28px;
}

.plan-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.plan-thumb { position: relative; }
.plan-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.plan-noimg {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg-gray);
  color: var(--sub-light);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.badge-pr {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: var(--white);
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 2px;
}
.thumb-badges {
  position: absolute;
  top: 6px;
  left: 6px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.badge-pickup {
  background: var(--navy);
  color: var(--white);
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 2px;
}

.plan-body {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.area-chip {
  position: absolute;
  left: 6px;
  bottom: 6px;
  max-width: calc(100% - 12px);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(28, 42, 58, 0.72);
  color: var(--white);
  font-size: 9.5px;
  line-height: 1;
  padding: 4px 9px 4px 7px;
  border-radius: 999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.area-chip svg { flex: 0 0 auto; }
.plan-facility {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 1px;
}
.plan-ticket {
  font-size: 10.5px;
  color: var(--sub);
  margin-top: 2px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.plan-price-block {
  margin-top: auto;
  padding-top: 5px;
  text-align: right;
}
.plan-price-row {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}
.plan-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 4px;
  margin-bottom: 4px;
}
.price-off {
  border: 1px solid var(--red);
  color: var(--red);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 3px 5px;
  border-radius: 3px;
  white-space: nowrap;
}
.price-original {
  font-size: 10.5px;
  color: var(--sub-light);
  text-decoration: line-through;
}
.price-sale {
  font-size: 16px;
  font-weight: 700;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}
.price-sale .price-unit { font-size: 10.5px; font-weight: 500; }
.price-tbd { font-size: 12px; color: var(--sub-light); }

.plan-meta {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.meta-chip {
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 2px;
  background: var(--bg-gray);
  color: var(--sub);
}
.preview-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #e53935;
  color: var(--white);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  z-index: 5;
}
.preview-badge.is-lower { top: 26px; }
.meta-chip.is-deadline { background: var(--bg-gray); color: var(--sub); }
.meta-chip.is-soon { background: var(--red); border: 1px solid var(--red); color: var(--white); font-weight: 700; }

.plan-desc {
  font-size: 10.5px;
  color: var(--sub);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.plan-copyright {
  font-size: 8.5px;
  color: var(--sub-light);
  margin-top: 3px;
}

.no-results {
  padding: 40px 16px;
  text-align: center;
  color: var(--sub);
  font-size: 13px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 16px;
}
.footer-copy { font-size: 10px; color: var(--sub-light); }

/* PC */
@media (min-width: 481px) {
  body { background: var(--bg-gray); }
  #app-wrapper { box-shadow: 0 0 12px rgba(0, 0, 0, 0.06); }
}
