/*
 * ベスポジゴルフ場検索 — コース詳細ページ共通スタイル
 * 前提: /guide/shared.css が先にロードされ design tokens 使用可能
 *
 * ページ構成:
 *   パンくず → ヒーロー → フォト → コストCTA →
 *   ベスポジスコア → スペック → 料金 → コース紹介 →
 *   アクセス → FAQ → 予約CTA
 */

/* ── ページ幅 ────────────────────────────── */
.course-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

/* ── パンくず ────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  padding: var(--sp-4) 0;
  font-size: 12px;
  color: var(--text-subtle);
}
.breadcrumb a {
  color: var(--text-subtle);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--ui-accent); }
.breadcrumb-sep { color: var(--border); }

/* ── コースヒーロー ──────────────────────── */
.course-hero {
  background: var(--bg-soft);
  border-radius: var(--sp-3);
  padding: var(--sp-8) var(--sp-6);
  margin-bottom: var(--sp-6);
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: var(--sp-6);
  align-items: center;
}
.course-hero-content { min-width: 0; }
.course-hero-map {
  border-radius: var(--sp-2);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}
.course-hero-map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.course-hero-map:hover img { transform: scale(1.03); }
@media (max-width: 599px) {
  .course-hero { grid-template-columns: 1fr; }
  .course-hero-map { display: none; }
}
.course-hero-pref {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ui-accent);
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-2);
}
.course-hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.4rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  line-height: 1.3;
  margin-bottom: var(--sp-1);
}
.course-kana {
  font-size: 13px;
  color: var(--text-subtle);
  margin-bottom: var(--sp-4);
}
.course-hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-3);
}
.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--ui-accent);
  color: var(--text-on-dark);
  font-size: 13px;
  font-weight: 700;
  padding: 4px var(--sp-3);
  border-radius: 99px;
}
.rating-badge svg { flex-shrink: 0; }
a.rating-badge { text-decoration: none; }
a.rating-badge:hover { opacity: 0.85; }
.review-count {
  font-size: 12px;
  color: var(--text-subtle);
}
.course-name-link {
  color: inherit;
  text-decoration: none;
}
.course-name-link:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.review-count-link {
  font-size: 12px;
  color: var(--ui-accent);
  text-decoration: none;
  font-weight: 600;
}
.review-count-link:hover { text-decoration: underline; }

/* ── フォトグリッド ──────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
  gap: 4px;
  border-radius: var(--sp-3);
  overflow: hidden;
  margin-bottom: var(--sp-6);
  aspect-ratio: 16/7;
}
.photo-grid-main {
  grid-row: 1 / 3;
}
.photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-grid-main img { border-radius: 0; }
@media (max-width: 599px) {
  .photo-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    aspect-ratio: 4/3;
  }
  .photo-grid-main { grid-row: auto; }
  .photo-sub { display: none; }
}

/* ── コストCTAバナー ─────────────────────── */
.course-cost-cta {
  background: var(--ui-black);
  border-radius: var(--sp-3);
  padding: var(--sp-6) var(--sp-6) var(--sp-6) var(--sp-8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  margin-bottom: var(--sp-8);
  overflow: hidden;
  min-height: 152px;
}
.cost-cta-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding-bottom: 2px;
}
.cost-cta-text {
  flex: 1;
}
.cost-cta-text p {
  font-size: 1rem;
  color: var(--text-on-dark);
  font-weight: 800;
  margin-bottom: 4px;
  line-height: 1.4;
}
.cost-cta-text strong {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-on-dark);
  line-height: 1.4;
}
/* iPhoneモックアップ */
.phone-mockup {
  flex-shrink: 0;
  position: relative;
  width: 82px;
  aspect-ratio: 800 / 1610;
}
.phone-screen-img {
  position: absolute;
  top: 6.9%;
  left: 5.8%;
  width: 88.6%;
  height: 89.9%;
  object-fit: cover;
  object-position: 50% 15%;
  z-index: 1;
}
.phone-frame-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}
@media (max-width: 479px) {
  .phone-mockup { display: none; }
}

/* ── セクション共通 ──────────────────────── */
.course-section {
  margin-bottom: var(--sp-12);
}
.section-heading {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.03em;
  padding-bottom: var(--sp-3);
  border-bottom: 2px solid var(--ui-accent);
  margin-bottom: var(--sp-6);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

/* ── ベスポジスコア カード ───────────────────── */
.score-section-card {
  background: linear-gradient(145deg, rgba(40,94,94,0.07), rgba(81,157,158,0.12));
  border: 1px solid rgba(40,94,94,0.22);
  border-radius: var(--sp-4);
  padding: var(--sp-8);
}
.score-section-header {
  margin-bottom: var(--sp-6);
}
.score-section-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--text-on-dark);
  background: var(--ui-accent);
  padding: 3px var(--sp-3);
  border-radius: 4px;
  margin-bottom: var(--sp-2);
}
.score-section-title-row {
  display: flex;
  align-items: baseline;
  gap: var(--sp-4);
  margin-bottom: 4px;
}
.score-section-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.03em;
}
.score-overall-wrap {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-left: auto;
}
.score-overall-value {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--ui-accent);
  line-height: 1;
  letter-spacing: -0.03em;
}
.score-overall-max {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-subtle);
}
.score-section-desc {
  font-size: 13px;
  color: var(--text-subtle);
}

/* ── ベスポジスコア ───────────────────────── */
/* スコア数値 + 総評 (2カラム) */
.score-top-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--sp-6);
  align-items: start;
  margin-bottom: var(--sp-6);
}
@media (max-width: 599px) {
  .score-top-layout { grid-template-columns: 1fr; }
}

/* スコア数値リスト */
.score-nums {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--sp-2);
  overflow: hidden;
}
.score-num-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
}
.score-num-item:last-of-type { border-bottom: none; }
.score-num-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
}
.score-num-value {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--ui-accent);
  line-height: 1;
  letter-spacing: -0.02em;
}
.score-num-value.score-mid { color: var(--ui-accent2); }
.score-num-max {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-subtle);
  margin-left: 2px;
}
.score-badges {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--border);
}

/* レーダーチャート (Chart.js canvas) */
.radar-canvas-wrap {
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
}

/* スコアバー */
.score-bars {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}
.score-bar-item {}
.score-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.score-bar-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.score-bar-num {
  font-size: 14px;
  font-weight: 800;
  color: var(--ui-accent);
}
.score-bar-track {
  height: 6px;
  background: var(--bg-soft);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.score-bar-fill {
  height: 100%;
  background: var(--ui-accent);
  border-radius: 3px;
}
.score-bar-comment {
  font-size: 13.5px;
  color: var(--text-body);
  line-height: 1.7;
}

/* 編集部コメント */
.editorial-comment {
  background: var(--bg-soft);
  border-left: 3px solid var(--ui-accent);
  border-radius: 0 var(--sp-2) var(--sp-2) 0;
  padding: var(--sp-4) var(--sp-5);
  margin-top: var(--sp-6);
}
.editorial-comment p {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.75;
  margin-bottom: var(--sp-3);
}
.editorial-comment p:last-child { margin-bottom: 0; }
.recommend-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ui-accent);
  display: block;
  margin-bottom: 4px;
}

/* バッジ */
.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px var(--sp-3);
  border-radius: 99px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-body);
}
.badge-tag.active {
  background: var(--ui-accent);
  border-color: var(--ui-accent);
  color: var(--text-on-dark);
}

/* ── スペックグリッド ─────────────────────── */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--sp-2);
  overflow: hidden;
}
.spec-cell {
  background: var(--surface);
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.spec-cell-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-subtle);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.spec-cell-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
@media (max-width: 479px) {
  .spec-grid { grid-template-columns: 1fr; }
}

/* ── 料金 ────────────────────────────────── */
.price-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}
@media (max-width: 479px) {
  .price-cards { grid-template-columns: 1fr; }
}
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--sp-3);
  padding: var(--sp-5) var(--sp-6);
  text-align: center;
}
.price-card-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-subtle);
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-2);
}
.price-card-amount {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.price-card-amount span {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-subtle);
}
.price-card.holiday { border-top: 3px solid var(--ui-accent); }

/* ── コース紹介文 ─────────────────────────── */
.course-description {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.9;
}

/* ── アクセス ────────────────────────────── */
.access-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.access-row {
  display: flex;
  gap: var(--sp-4);
  font-size: 14px;
}
.access-row-label {
  flex-shrink: 0;
  width: 96px;
  font-weight: 700;
  color: var(--text-subtle);
  font-size: 12px;
  padding-top: 2px;
}
.access-row-value {
  color: var(--text-body);
  line-height: 1.6;
}
.access-row-value a {
  color: var(--ui-accent);
  text-decoration: none;
}
.access-row-value a:hover { text-decoration: underline; }

/* ── FAQ ─────────────────────────────────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--sp-2);
  overflow: hidden;
}
.faq-q {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--surface);
  cursor: pointer;
  list-style: none;
}
.faq-q::marker { display: none; }
.faq-q-mark {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ui-accent);
  color: var(--text-on-dark);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
details[open] .faq-q { border-bottom: 1px solid var(--border); }
.faq-a {
  padding: var(--sp-4) var(--sp-5) var(--sp-4) calc(var(--sp-5) + 22px + var(--sp-3));
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.8;
  background: var(--bg-soft);
}

/* ── 近隣コース ──────────────────────────── */
.nearby-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
}
@media (min-width: 640px) {
  .nearby-grid { grid-template-columns: repeat(4, 1fr); }
}
.nearby-card {
  display: block;
  padding: var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--sp-2);
  text-decoration: none;
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.nearby-card:hover {
  border-color: var(--ui-accent);
  box-shadow: 0 2px 8px rgba(40,94,94,0.12);
}
.nearby-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.4;
}
.nearby-card-loc {
  font-size: 11px;
  color: var(--text-subtle);
}
.nearby-card-scores {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: var(--sp-2);
}
.nearby-besposi {
  font-size: 11px;
  font-weight: 700;
  color: var(--ui-accent);
  line-height: 1.4;
}
.nearby-rakuten {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-subtle);
  line-height: 1.4;
}

/* ── 予約CTA ─────────────────────────────── */
.booking-cta {
  background: var(--ui-black);
  border-radius: var(--sp-5);
  padding: var(--sp-10) var(--sp-8);
  text-align: center;
  margin: var(--sp-14) 0;
}
.booking-cta h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-on-dark);
  margin-bottom: var(--sp-2);
  letter-spacing: 0.04em;
}
.booking-cta p {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  margin-bottom: var(--sp-6);
}
.btn-booking {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--text-on-dark);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 800;
  padding: 14px var(--sp-8);
  border-radius: 10px;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: all 0.18s;
  box-shadow: 0 var(--sp-1) var(--sp-4) rgba(0,0,0,0.25);
}
.btn-booking:hover {
  background: var(--ui-mint);
  color: var(--text-on-dark);
}
