/**
 * 道の駅TRIP 2.0 — 06 道の駅詳細 スタイルシート
 * Single Source of Truth（正本画像）に完全準拠したレイアウト・情報階層・余白・文字サイズ・カード構成・CTA配置
 */

.v2-detail-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: #F8FAFC;
  box-sizing: border-box;
  padding-bottom: max(140px, calc(env(safe-area-inset-bottom, 24px) + 120px));
  position: relative;
}

/* ============================================================
   1. Hero エリア (正本画像再現: 旅情・青空・手書き風サイン)
   ============================================================ */
.v2-detail-hero {
  position: relative;
  width: 100%;
  height: 290px;
  overflow: hidden;
  background: #B2D4F0;
}

.v2-detail-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  display: block;
}

.v2-detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(14, 37, 72, 0.35) 0%,
    rgba(14, 37, 72, 0.05) 35%,
    rgba(0, 0, 0, 0) 55%,
    rgba(0, 0, 0, 0.25) 85%,
    rgba(15, 23, 42, 0.4) 100%
  );
  pointer-events: none;
}

/* 上部ナビ（丸型白半透明ボタン） */
.v2-detail-top-nav {
  position: absolute;
  top: max(14px, env(safe-area-inset-top, 14px));
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.v2-detail-nav-circle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0E2548;
  cursor: pointer;
  transition: all 0.16s ease;
  padding: 0;
}

.v2-detail-nav-circle-btn:active {
  transform: scale(0.92);
  background: #FFFFFF;
}

.v2-detail-nav-circle-btn svg {
  width: 20px;
  height: 20px;
}

/* お気に入りハート */
.v2-detail-fav-btn {
  color: #334155;
}

.v2-detail-fav-btn.is-active {
  color: #EF4444;
  background: #FFFFFF;
}

.v2-detail-fav-btn.is-active svg {
  fill: #EF4444;
  stroke: #EF4444;
}

/* Hero内 旅情ブランドコピー（手書き風サイン） */
.v2-detail-hero-copy-left {
  position: absolute;
  bottom: 38px;
  left: 18px;
  color: #FFFFFF;
  font-family: "Caveat", "Shippori Mincho", "Hiragino Mincho ProN", serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  z-index: 5;
}

.v2-detail-hero-copy-right {
  position: absolute;
  bottom: 42px;
  right: 18px;
  color: #FFFFFF;
  font-family: "Caveat", "Shippori Mincho", "Hiragino Mincho ProN", serif;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-align: right;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.6);
  transform: rotate(-5deg);
  pointer-events: none;
  z-index: 5;
}

/* ============================================================
   2. 白カード メインシート (上部角丸オーバーラップ)
   ============================================================ */
.v2-detail-card-sheet {
  position: relative;
  z-index: 6;
  margin-top: -24px;
  border-radius: 28px 28px 0 0;
  background: #FFFFFF;
  padding: 24px 18px 28px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

/* 駅名・所在地・カテゴリ */
.v2-detail-header-block {
  margin-bottom: 20px;
}

.v2-detail-title {
  font-family: var(--font-display, "Shippori Mincho", serif);
  font-size: 26px;
  font-weight: 700;
  color: #0F172A;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0 0 10px 0;
  word-break: break-word;
}

.v2-detail-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.v2-detail-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 600;
  color: #64748B;
}

.v2-detail-location svg {
  width: 15px;
  height: 15px;
  fill: #64748B;
  flex-shrink: 0;
}

.v2-detail-cat-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.v2-cat-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  line-height: 1.4;
}

.v2-cat-chip.chip-station {
  background: #EFF6FF;
  color: #2563EB;
}

.v2-cat-chip.chip-rest {
  background: #F0FDF4;
  color: #16A34A;
}

.v2-cat-chip.chip-view {
  background: #FEF3C7;
  color: #D97706;
}

/* 紹介コピー & リード文 */
.v2-detail-catch {
  font-family: var(--font-display, "Shippori Mincho", serif);
  font-size: 16.5px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.45;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.v2-detail-lead {
  font-family: var(--font-body, "Noto Sans JP", sans-serif);
  font-size: 13px;
  font-weight: 400;
  color: #475569;
  line-height: 1.68;
  margin: 0;
  letter-spacing: 0.01em;
}

/* ============================================================
   3. セクション共通定義
   ============================================================ */
.v2-detail-sec {
  margin-top: 24px;
}

.v2-detail-sec-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.v2-detail-sec-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.01em;
}

.v2-detail-more-btn {
  background: none;
  border: none;
  padding: 0;
  color: #2563EB;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 2px;
}

.v2-arrow-chevron {
  font-size: 12px;
  font-weight: 700;
}

/* セクションアイコン */
.v2-sec-icon-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1E3A8A;
  color: #FFFFFF;
  font-family: var(--font-num, "Montserrat", sans-serif);
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
}

.v2-sec-icon-mountain {
  width: 18px;
  height: 18px;
  color: #334155;
}

.v2-sec-icon-gear {
  width: 18px;
  height: 18px;
  color: #334155;
}

.v2-sec-icon-car {
  width: 18px;
  height: 18px;
  color: #334155;
}

/* ============================================================
   4. 基本情報 (2×2 グリッドカード)
   ============================================================ */
.v2-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.v2-info-item {
  background: #F8FAFC;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 12px;
  padding: 12px 12px 10px;
  display: flex;
  flex-direction: column;
}

.v2-info-item-head {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748B;
  margin-bottom: 6px;
}

.v2-info-item-head svg {
  width: 15px;
  height: 15px;
  color: #0369A1;
  fill: currentColor;
  flex-shrink: 0;
}

.v2-info-item-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
}

.v2-info-item-val {
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.35;
  word-break: break-word;
}

.v2-info-item-note {
  font-size: 10px;
  color: #94A3B8;
  margin-top: 3px;
  line-height: 1.3;
}

/* ============================================================
   5. この駅の見どころ (3列カード構成)
   ============================================================ */
.v2-highlights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.v2-highlight-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 10px 8px 12px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.v2-highlight-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #FFFFFF;
  font-family: var(--font-num, "Montserrat", sans-serif);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.v2-highlight-badge.badge-green {
  background: #22C55E;
}

.v2-highlight-badge.badge-blue {
  background: #3B82F6;
}

.v2-highlight-badge.badge-orange {
  background: #F97316;
}

.v2-highlight-icon-wrap {
  width: 42px;
  height: 42px;
  margin: 10px 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.v2-highlight-icon-wrap svg {
  width: 34px;
  height: 34px;
}

.v2-highlight-title {
  font-size: 12px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.3;
  margin: 0 0 6px 0;
  white-space: nowrap;
}

.v2-highlight-desc {
  font-size: 10px;
  color: #64748B;
  line-height: 1.45;
  text-align: left;
  margin: 0;
  word-break: break-word;
}

/* ============================================================
   6. 施設・サービス (チップUI)
   ============================================================ */
.v2-facility-chips-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.v2-facility-chips-row::-webkit-scrollbar {
  display: none;
}

.v2-facility-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  flex-shrink: 0;
}

.v2-facility-chip svg {
  width: 14px;
  height: 14px;
  color: #0284C7;
  flex-shrink: 0;
}

/* ============================================================
   7. 写真ポリシー表示 (信頼性バナー)
   ============================================================ */
.v2-detail-photo-policy-banner {
  margin-top: 18px;
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.v2-policy-icon {
  width: 16px;
  height: 16px;
  color: #2563EB;
  flex-shrink: 0;
}

.v2-policy-text {
  font-size: 12px;
  font-weight: 600;
  color: #1D4ED8;
  line-height: 1.35;
}

/* ============================================================
   8. アクセス
   ============================================================ */
.v2-access-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  margin-top: 10px;
}

.v2-access-gps-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 12px 14px;
}

.v2-access-gps-col {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
}

.v2-access-pin,
.v2-access-car-icon {
  width: 15px;
  height: 15px;
  color: #64748B;
  flex-shrink: 0;
  transform: translateY(2px);
}

.v2-gps-highlight {
  font-family: var(--font-num, "Montserrat", sans-serif);
  font-size: 18px;
  font-weight: 800;
  color: #0284C7;
  margin-left: 2px;
}

.v2-gps-highlight small {
  font-size: 11px;
  font-weight: 700;
  color: #0284C7;
  margin-left: 1px;
}

.v2-access-divider {
  width: 1px;
  height: 20px;
  background: #E2E8F0;
}

/* ============================================================
   9. 固定CTAバー (正本画像再現: 左「ここへ行く」右「お気に入り」)
   ============================================================ */
.v2-detail-fixed-cta-bar {
  position: fixed;
  bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 10px 16px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 990;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

.v2-cta-btn {
  height: 46px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.16s ease;
  letter-spacing: 0.02em;
}

.v2-cta-btn:active {
  transform: scale(0.98);
}

/* 左: ここへ行く (青グラデーション) */
.v2-cta-btn-go {
  background: linear-gradient(135deg, #0284C7 0%, #005AEB 100%);
  color: #FFFFFF;
  border: none;
  box-shadow: 0 4px 14px rgba(0, 90, 235, 0.28);
}

.v2-cta-btn-go svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

/* 右: お気に入り (白背景・青枠線) */
.v2-cta-btn-fav {
  background: #FFFFFF;
  color: #005AEB;
  border: 1.5px solid #005AEB;
}

.v2-cta-btn-fav svg {
  width: 17px;
  height: 17px;
}

.v2-cta-btn-fav.is-fav-active {
  background: #EFF6FF;
  color: #005AEB;
  border-color: #005AEB;
}

.v2-cta-btn-fav.is-fav-active svg {
  fill: #005AEB;
  stroke: #005AEB;
}

/* ============================================================
   10. Detail 専用 Bottom Navigation (承認版デザイン完全準拠)
   ============================================================ */
.v2-detail-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  height: 60px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-sizing: content-box;
}

/* ============================================================
   11. レスポンシブ (375px / 390px / 430px)
   ============================================================ */
@media (max-width: 380px) {
  .v2-detail-hero {
    height: 270px;
  }
  .v2-detail-title {
    font-size: 23px;
  }
  .v2-detail-catch {
    font-size: 15px;
  }
  .v2-highlight-title {
    font-size: 11px;
  }
  .v2-highlight-desc {
    font-size: 9.5px;
  }
}
