/* ==========================================================================
   foursum — デザインシステム + 全画面コンポーネントスタイル
   このファイルが唯一のスタイルソース。使い方は docs/UI-GUIDE.md を参照。
   目次:
   1.  トークン (:root)
   2.  リセット / ベース
   3.  レイアウトユーティリティ
   4.  ヘッダー
   5.  ボタン
   6.  フォーム
   7.  ヒーロー検索バー
   8.  スティッキー検索サマリーバー / 並べ替え / フィルターピル
   9.  バッジ / タグ / 評価 / フェアウェイインジケータ
   10. コースカード + グリッド + 画像テーマ
   11. コース詳細ページ
   12. 統合ビュー「検討リスト＝投票」（コースカード + プラン行）
   13. モーダル（共有 / 名前入力ゲート）
   14. 投票部品（投票ボタン / 投票者チップ）
   15. トースト
   16. 空状態
   17. アニメーション / アクセシビリティ
   18. 詳細フィルターモーダル（プレースタイル / プレー人数オプション / 除外オプション）
   19. 評価内訳（口コミ評価軸）
   20. もっと見る（ページング）
   21. プラン一覧モーダル
   22. アイコン（Lucide）
   ========================================================================== */

/* ==========================================================================
   1. トークン
   ========================================================================== */
:root {
  /* アクセントカラー（ゴルフグリーン） */
  --accent: #0f7b4d;
  --accent-dark: #0b5c3a;
  --accent-darker: #08432a;
  --accent-light: #e6f4ec;
  --accent-light-strong: #cdeadb;
  --accent-contrast: #ffffff;

  /* ニュートラル */
  --ink-900: #14181a;
  --ink-800: #23292b;
  --ink-700: #3c4547;
  --ink-500: #6b7577;
  --ink-400: #8a9294;
  --ink-300: #b3b9ba;
  --border-color: #e6e8e6;
  --border-color-strong: #d3d7d4;
  --surface: #ffffff;
  --surface-sunken: #f4f6f4;
  --bg: #f7f8f6;

  /* セマンティック */
  --danger: #d1453d;
  --danger-light: #fbeceb;
  --star: #f5a623;

  /* 角丸 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* 影 */
  --shadow-xs: 0 1px 2px rgba(20, 24, 26, 0.05);
  --shadow-sm: 0 1px 2px rgba(20, 24, 26, 0.06), 0 1px 1px rgba(20, 24, 26, 0.04);
  --shadow-md: 0 12px 28px rgba(20, 24, 26, 0.10), 0 2px 6px rgba(20, 24, 26, 0.04);
  --shadow-lg: 0 24px 56px rgba(20, 24, 26, 0.16), 0 8px 20px rgba(20, 24, 26, 0.08);

  /* 余白スケール */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* フォント */
  --font-sans: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;

  --header-height: 64px;
  --container-max: 1200px;
  --transition-fast: 0.15s ease;
  --transition-base: 0.22s cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* ==========================================================================
   2. リセット / ベース
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: 1.55;
  color: var(--ink-900);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  /* スティッキーフッター: コンテンツが短いページでもフッターを画面下端に */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main#app {
  flex: 1;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  line-height: 1.25;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  color: inherit;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button,
[role="button"] {
  cursor: pointer;
}

button:disabled,
[disabled] {
  cursor: not-allowed;
}

/* ==========================================================================
   3. レイアウトユーティリティ
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 640px) {
  .container {
    padding-inline: var(--space-5);
  }
}

@media (min-width: 960px) {
  .container {
    padding-inline: var(--space-6);
  }
}

.view {
  padding-block: var(--space-5) var(--space-9);
}

/* ヒーローをヘッダー直下に密着させる（上パディングだと背景色の帯が見えるため） */
.view--flush-top {
  padding-top: 0;
}

/* ==========================================================================
   3a. フッター（楽天ウェブサービスの必須クレジット表示を含む）
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-color);
  background: var(--surface);
  padding-block: var(--space-5);
  margin-top: var(--space-7);
}

.site-footer__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: center;
  text-align: center;
}

.site-footer__credit {
  font-size: var(--text-xs);
  color: var(--ink-500);
}

.site-footer__credit a {
  color: var(--ink-700);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer__credit a:hover {
  color: var(--accent-dark);
}

.section-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: var(--space-4);
}

.text-muted {
  color: var(--ink-500);
}

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

/* ==========================================================================
   4. ヘッダー
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border-color);
}

.site-header__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  height: 100%;
  padding-inline: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

@media (min-width: 960px) {
  .site-header__inner {
    padding-inline: var(--space-6);
  }
}

.site-header__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 800;
  font-size: var(--text-lg);
  color: var(--accent-dark);
  letter-spacing: -0.01em;
}

.site-header__logo-img {
  display: block;
  height: 22px;
  width: auto;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.shortlist-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color-strong);
  background: var(--surface);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-800);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.shortlist-link:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent-dark);
}

.shortlist-link__icon {
  display: inline-flex;
  align-items: center;
}

.shortlist-link__label {
  display: none;
}

@media (min-width: 640px) {
  .shortlist-link__label {
    display: inline;
  }
}

/* ==========================================================================
   5. ボタン
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 22px;
  /* ボタンの角丸は全サイズ pill で統一（--sm/--lg は個別指定せず継承）。
     他のボタン系（filter-pill / sort-dropdown / btn-shortlist 等）も既に pill。 */
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  transition: background var(--transition-fast), border-color var(--transition-fast),
    color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn:active {
  transform: scale(0.97);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn[disabled] {
  opacity: 0.5;
  transform: none;
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

.btn--primary:hover:not([disabled]) {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn--secondary {
  background: var(--surface);
  border-color: var(--border-color-strong);
  color: var(--ink-900);
}

.btn--secondary:hover:not([disabled]) {
  background: var(--surface-sunken);
}

.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--accent-dark);
}

.btn--ghost:hover:not([disabled]) {
  background: var(--accent-light);
}

.btn--danger-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--danger);
}

.btn--danger-ghost:hover:not([disabled]) {
  background: var(--danger-light);
}

.btn--sm {
  padding: 8px 16px;
  font-size: var(--text-xs);
}

.btn--lg {
  padding: 16px 28px;
  font-size: var(--text-md);
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn--icon {
  padding: 10px;
  border-radius: var(--radius-pill);
  aspect-ratio: 1;
}

/* ==========================================================================
   6. フォーム
   ========================================================================== */
.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink-700);
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: var(--text-md);
  color: var(--ink-900);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><path d='M4 6l4 4 4-4' fill='none' stroke='%233c4547' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.input--error {
  border-color: var(--danger);
}

.form-error {
  font-size: var(--text-xs);
  color: var(--danger);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--ink-500);
}

/* ==========================================================================
   7. ヒーロー検索バー
   ========================================================================== */
.hero {
  padding-block: var(--space-7) var(--space-6);
  background: linear-gradient(180deg, var(--accent-light) 0%, var(--bg) 100%);
  text-align: center;
}

.hero__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}

@media (min-width: 960px) {
  .hero__inner {
    padding-inline: var(--space-6);
  }
}

.hero__title {
  font-size: var(--text-2xl);
  color: var(--ink-900);
  letter-spacing: -0.01em;
}

@media (min-width: 640px) {
  .hero__title {
    font-size: var(--text-3xl);
  }
}

.hero__subtitle {
  font-size: var(--text-md);
  color: var(--ink-700);
  max-width: 480px;
}

.search-bar {
  width: 100%;
  max-width: 880px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-2);
  text-align: left;
}

.search-bar__field {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
  /* ラベル含むフィールド全体がクリック領域（search.js がコントロールへ転送する） */
  cursor: pointer;
}

/* 区切り線: border だとフィールドの border-radius で端が丸く曲がるため疑似要素で直線を描く */
.search-bar__field::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--space-4);
  right: var(--space-4);
  height: 1px;
  background: var(--border-color);
}

.search-bar__field:first-of-type::before {
  display: none;
}

.search-bar__field:hover,
.search-bar__field:focus-within {
  background: var(--surface-sunken);
}

.search-bar__field-label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink-900);
}

.search-bar__field-input {
  border: none;
  background: transparent;
  padding: 0;
  width: 100%;
  /* 16px: iOSで入力フォーカス時の自動ズームを防ぎつつ、可読性のため少し大きめにする */
  font-size: var(--text-md);
  color: var(--ink-700);
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}

/* iOS/WebKit の <input type="date"> は値テキストを既定で中央寄せするため、
   他フィールド（エリア/時間帯ボタン）と左端が揃うよう明示的に左寄せする。 */
.search-bar__field-input::-webkit-date-and-time-value {
  text-align: left;
}

.search-bar__field-input:focus {
  outline: none;
}

.search-bar__field-input.select {
  border: none;
  padding: 0 20px 0 0;
  background-position: right 0 center;
}

.search-bar__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin: var(--space-2) 0 0;
  padding: 14px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: var(--text-sm);
  font-weight: 700;
  flex-shrink: 0;
  transition: background var(--transition-fast);
}

.search-bar__submit:hover {
  background: var(--accent-dark);
}

@media (min-width: 640px) {
  .search-bar {
    flex-direction: row;
    align-items: stretch;
    padding: var(--space-2);
    border-radius: var(--radius-pill);
  }

  .search-bar__field {
    padding-inline: var(--space-5);
    justify-content: center;
  }

  .search-bar__field::before {
    top: var(--space-2);
    bottom: var(--space-2);
    left: 0;
    right: auto;
    width: 1px;
    height: auto;
  }

  .search-bar__submit {
    margin: 0;
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: var(--radius-pill);
    align-self: center;
  }

  .search-bar__submit-label {
    display: none;
  }
}

/* エリア / スタート時間帯 のマルチセレクト（チェックボックス・ポップアップ）。
   同じ見た目・挙動のパターンなので、時間帯ピッカー（.time-picker*）はエリアピッカーの
   ルールをそのまま共有する（クラス名を並記してCSSの重複を避ける。地方まとめてチェック等
   エリア固有の要素は .area-picker__region のように単独のままでよい）。 */
.area-picker,
.time-picker {
  position: relative;
}

.area-picker__toggle,
.time-picker__toggle {
  text-align: left;
  cursor: pointer;
  color: var(--ink-700);
  font-family: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.area-picker__popup,
.time-picker__popup {
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 0;
  z-index: 60;
  width: min(560px, calc(100vw - 32px));
  max-height: min(440px, 70vh);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-4);
  text-align: left;
  cursor: default;
}

.area-picker__groups {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.area-picker__group {
  border: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.area-picker__region {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: var(--space-2);
  cursor: pointer;
}

.area-picker__prefs,
.time-picker__options {
  /* 等幅グリッドで各項目の左端（チェックボックス）を縦に揃える。flex-wrap だと
     ラベル幅がバラつき列の縦ラインがずれるため grid に変更。auto-fit + 1fr で
     ポップアップ幅に応じて列数が変わっても各列は等幅・チェックボックスが整列する。 */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: var(--space-2) var(--space-4);
}

.area-picker__pref,
.time-picker__option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--ink-700);
  cursor: pointer;
  min-width: 88px;
}

.area-picker__pref input,
.area-picker__region input,
.time-picker__option input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.area-picker__footer,
.time-picker__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-color);
}

/* モバイル: ポップアップは検索バー（field）幅いっぱいに広げる */
@media (max-width: 639px) {
  .area-picker__popup,
  .time-picker__popup {
    width: calc(100vw - 48px);
    max-width: 100%;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* ==========================================================================
   8. 検索結果レイアウト（サイドバー + 結果カラム）/ ツールバー / フィルターチップ
   デスクトップ（>=960px）はサイドバー常設の2カラム。960px 未満はサイドバーを
   オフキャンバスのドロワーにし、結果ツールバーの「条件・絞り込み」ボタンで開く。
   ========================================================================== */
.results-layout {
  padding-block: var(--space-5) var(--space-9);
}

@media (min-width: 960px) {
  .results-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: var(--space-6);
    align-items: start;
  }
}

.results-main {
  min-width: 0;
}

/* 結果カラム内のグリッドは列幅に合わせて自動調整する（サイドバーの分だけ主カラムが
   狭くなるため、固定列数（§10 の .course-grid）ではなく auto-fill で詰める）。 */
.results-main .course-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* 空状態は grid を解除してカラム全幅の1ブロックにする（.empty-state 側が中央寄せ）。
   .course-grid.course-grid--empty で詳細度を上げ、後方の `.course-grid { display:grid }`
   にソース順で負けないようにする（負けると空状態が最初の1トラックに押し込まれ左寄せになる）。 */
.course-grid.course-grid--empty {
  display: block;
}

/* 結果カラム上部のツールバー: 件数サマリー / 条件・絞り込みボタン（モバイル）/ 並べ替え。 */
.results-toolbar {
  position: sticky;
  top: var(--header-height);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
  padding-block: var(--space-2);
  background: rgba(247, 248, 246, 0.94);
  backdrop-filter: saturate(180%) blur(8px);
}

.results-toolbar__controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.search-summary__text {
  font-size: var(--text-sm);
  color: var(--ink-700);
}

.search-summary__text strong {
  color: var(--ink-900);
  font-weight: 700;
}

/* 「条件・絞り込み」ボタン。モバイルでサイドバードロワーを開く。デスクトップでは隠す。 */
.results-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (min-width: 960px) {
  .results-filter-toggle {
    display: none;
  }
}

/* 可視ラベルは置かずドロップダウン単体で表示する（用途名は select の aria-label が担う。
   format.js sortDropdownHtml 参照）。 */
.sort-dropdown {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.select--sort {
  padding: 8px 32px 8px 14px;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-pill);
}

/* ---------------------------- サイドバー本体 ---------------------------- */
.results-sidebar {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* デスクトップでは通常フローの列（sticky にしない）。エリア/スタート時間のポップアップを
   絶対配置でオーバーレイするため、クリップ元になる overflow / sticky+max-height を持たせない
   （sticky + overflow scroll だとポップアップが切れる。ページごとスクロールする挙動にする）。 */

.results-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  border-bottom: 1px solid var(--border-color);
}

.results-sidebar__heading {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--ink-900);
}

.results-sidebar__close {
  display: none; /* モバイルドロワー時のみ表示 */
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  line-height: 1;
  color: var(--ink-500);
  padding: 4px 8px;
}

.results-sidebar__scroll {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.results-sidebar__overlay {
  display: none;
}

/* ---------------------------- サイドバーのセクション ---------------------------- */
.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.sidebar-section__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink-900);
}

.sidebar-section__apply {
  width: 100%;
  margin-top: var(--space-1);
}

.sidebar-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-field__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-500);
}

.sidebar-field__control {
  width: 100%;
}

/* プレー日フィールド: フィールド全体をクリック領域にしてネイティブ日付ピッカーを開く
   （JS の showPicker）。ネイティブのカレンダーアイコンは隠し、チェブロンはエリア/時間と揃える。 */
.sidebar-date {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 44px;
  padding: 8px var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
}

.sidebar-date:hover {
  border-color: var(--ink-400);
}

.sidebar-date__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: var(--text-sm);
  color: var(--ink-900);
  cursor: pointer;
}

.sidebar-date__input:focus {
  outline: none;
}

.sidebar-date__input::-webkit-calendar-picker-indicator {
  display: none;
}

/* エリア / スタート時間: レイアウトを押し下げないポップアップ型セレクト。 */
.sidebar-picker {
  position: relative;
}

.sidebar-picker__toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 44px;
  padding: 8px var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: var(--text-sm);
  color: var(--ink-700);
  text-align: left;
  cursor: pointer;
}

.sidebar-picker__toggle:hover,
.sidebar-picker__toggle[aria-expanded="true"] {
  border-color: var(--ink-400);
}

.sidebar-picker__label {
  flex-shrink: 0;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-500);
}

/* value（兵庫県 / 6時台 など）は右揃え。 */
.sidebar-picker__value {
  margin-left: auto;
  font-size: var(--text-sm);
  color: var(--ink-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 65%;
  text-align: right;
}

/* チェブロン: プレー日・エリア・スタート時間で共通（色・位置・大きさを揃える）。 */
.sidebar-date::after,
.sidebar-picker__toggle::after {
  content: "";
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  margin-top: -2px;
  border-right: 2px solid var(--ink-400);
  border-bottom: 2px solid var(--ink-400);
  transform: rotate(45deg);
}

/* エリア/時間のポップアップ（絶対配置。開いても下のチップ/詳細を押し下げない）。 */
.sidebar-picker__popup {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  z-index: 40;
  max-height: min(420px, 60vh);
  overflow-y: auto;
  padding: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.sidebar-picker__popup[hidden] {
  display: none;
}

/* アコーディオン（<details>）: 詳細絞り込み。 */
.sidebar-accordion {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.sidebar-accordion__summary {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.sidebar-accordion__summary::-webkit-details-marker {
  display: none;
}

.sidebar-accordion__summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid var(--ink-400);
  border-bottom: 2px solid var(--ink-400);
  transform: rotate(45deg);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.sidebar-accordion[open] > .sidebar-accordion__summary::after {
  transform: rotate(-135deg);
}

.sidebar-accordion__value {
  margin-left: auto;
  font-size: var(--text-sm);
  color: var(--ink-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
  text-align: right;
}

.sidebar-accordion__body {
  padding: var(--space-3);
  border-top: 1px solid var(--border-color);
}

/* 詳細絞り込みのオプション（§18 の .filter-modal__options を再利用）は、狭いサイドバー内では
   2列だと窮屈なため1列に落とす。 */
.results-sidebar .filter-modal__options {
  grid-template-columns: 1fr;
}

/* 詳細絞り込みの各セクションの区切り（アコーディオン内で縦に積む）。 */
.results-sidebar .filter-modal__section + .filter-modal__section {
  margin-top: var(--space-4);
}

/* よく使う条件チップの並び（サイドバー内は折り返す）。 */
.sidebar-quick {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* 詳細絞り込みのアクション（クリア / N件を表示）。 */
.sidebar-detail__actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.sidebar-detail__actions .btn--primary {
  flex: 1;
}

/* ---------------------------- モバイル: ドロワー ---------------------------- */
@media (max-width: 959px) {
  .results-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(360px, 88vw);
    z-index: 80;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform var(--transition-base);
  }

  .results-sidebar.is-open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .results-sidebar__scroll {
    flex: 1;
    overflow-y: auto;
  }

  .results-sidebar__close {
    display: inline-flex;
  }

  .results-sidebar__overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(20, 24, 26, 0.45);
  }

  .results-sidebar__overlay[hidden] {
    display: none;
  }

  body.sidebar-open {
    overflow: hidden;
  }
}

/* フィルターチップ（サイドバーの「よく使う条件」）。 */
.filter-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color-strong);
  background: var(--surface);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-700);
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.filter-pill:hover {
  border-color: var(--ink-400);
}

.filter-pill.is-active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent-dark);
}

.filter-pill.is-active::before {
  content: "✓";
  font-weight: 700;
}

/* 適用数バッジ（結果ツールバーの「条件・絞り込み」ボタン / 詳細絞り込みの見出し）。 */
.filter-trigger__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.filter-trigger__badge[hidden] {
  display: none;
}

/* ==========================================================================
   9. バッジ / タグ / 評価 / フェアウェイインジケータ
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1;
}

.badge[hidden] {
  /* .badge の display:inline-flex は author-origin なので UA の [hidden]{display:none} より
     優先されてしまい、hidden 属性だけでは非表示にならない。明示的に上書きする。 */
  display: none;
}

.badge--accent {
  background: var(--accent);
  color: var(--accent-contrast);
}

.badge--neutral {
  background: var(--surface-sunken);
  color: var(--ink-700);
  border: 1px solid var(--border-color-strong);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface-sunken);
  border: 1px solid var(--border-color);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-700);
}

/* 統合ビュー（§12）の属性ピルの色付きバリアント（format.js tagHtml の variant）。
   昼食付=アンバー系 / キャディ付=ブルー系。
   （旧 .tag--warn（条件・注意系の赤ピル）はプラン名と重複情報のため廃止。） */
.tag--lunch {
  background: #fdf3e0;
  border-color: #f0dfad;
  color: #8a6414;
}

.tag--caddie {
  background: #eef3fb;
  border-color: #d8e2f0;
  color: #3a5a8a;
}

/* ピル先頭のアイコン（絵文字）。装飾用のため aria-hidden で出力される */
.tag__icon {
  display: inline-flex;
  align-items: center;
}

/* コース名 → 楽天GORA詳細ページへのリンク（検討リスト・共有投票ビュー共通） */
.course-name-link {
  color: inherit;
  text-decoration: none;
}

.course-name-link:hover,
.course-name-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.course-name-link__ext {
  display: inline-flex;
  align-items: center;
  color: var(--ink-500);
  margin-left: 2px;
}

.course-name-link:hover .course-name-link__ext {
  color: var(--accent);
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
}

.rating__stars {
  color: var(--star);
  letter-spacing: 1px;
  font-size: var(--text-sm);
}

.rating__value {
  font-weight: 700;
  color: var(--ink-900);
}

.rating__count {
  color: var(--ink-500);
  font-size: var(--text-xs);
}

/* 検討リスト比較テーブル専用の2行表示（星+数値の下に件数を折り返す）。
   ratingHtml(rating, reviewCount, { stacked: true }) が付与する（他画面は従来の1行表示のまま）。 */
.rating--stacked {
  flex-wrap: wrap;
  row-gap: 2px;
}

.rating--stacked .rating__count {
  flex-basis: 100%;
}

.fairway-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-dark);
  box-shadow: var(--shadow-xs);
}

.fairway-tag--wide {
  color: var(--accent-dark);
}

.fairway-tag--standard {
  color: var(--ink-700);
}

.fairway-tag--narrow {
  color: var(--danger);
}

/* 楽天口コミ評価軸「フェアウェイが広い」の値（「広い（4.2）」の「（4.2）」部分）。
   検討リスト比較テーブルのみで使う（fairwayTagHtml の scoreSlot オプション）。
   ロード完了までは空のまま＝ラベルのみ表示（js/views/shortlist.js 参照）。 */
.fairway-tag__score {
  /* 括弧前のスペースはテキスト側（" (3.7)"）で表現するため margin は持たせない。 */
  opacity: 0.8;
}

.fairway-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--ink-700);
}

/* ==========================================================================
   10. コースカード + グリッド + 画像テーマ
   ========================================================================== */
.course-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 640px) {
  .course-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .course-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.course-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

/* 検索中のローディングステート（スケルトンカード）。course-card と同じシェルを使い、
   結果描画時のレイアウトシフトを防ぐ */
.skeleton-card:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface-sunken);
  border-radius: var(--radius-sm);
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .skeleton::after {
    animation: none;
  }
}

.course-card__media.skeleton {
  border-radius: 0;
}

.skeleton--line {
  height: 14px;
}

.skeleton--w70 { width: 70%; }
.skeleton--w60 { width: 60%; }
.skeleton--w45 { width: 45%; }

.skeleton--pill {
  height: 26px;
  width: 96px;
  border-radius: var(--radius-pill);
  margin-top: var(--space-2);
}

.course-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.course-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.course-card__image {
  width: 100%;
  height: 100%;
}

.course-card__badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
}

.course-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  flex: 1;
}

.course-card__name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--ink-900);
}

.course-card__area {
  font-size: var(--text-sm);
  color: var(--ink-500);
}

.course-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* カード幅が狭くなり、料金と2ボタンを1行に並べると「追加済み」「予約」が縦組みに崩れるため、
   料金1行・ボタン1行の縦2段に変更（§3ユーザー要望）。 */
.course-card__footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
  padding: var(--space-4);
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

/* 料金は「¥12,990〜 税込 / 人」を1行（baseline揃え）にまとめる。 */
.course-card__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}

.course-card__price-value {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--ink-900);
}

.course-card__price-sub {
  font-size: var(--text-xs);
  color: var(--ink-500);
}

/* ボタン行: 検討リストトグルが残り幅、予約は内容幅。横に並べて縦崩れを防ぐ。 */
.course-card__actions {
  display: flex;
  gap: var(--space-2);
}

.course-card__actions .btn-shortlist {
  flex: 1;
  justify-content: center;
  white-space: nowrap;
  padding-inline: var(--space-2);
}

.course-card__actions .btn-book {
  flex: 0 0 auto;
}

/* 「プランを見る (N)」ボタン（プラン一覧モーダルのトリガー。旧アコーディオンの置き換え）。
   アコーディオン展開は同一グリッド行の他カードの高さに影響してレイアウトが乱れる問題が
   あったため撤去し、オーバーレイモーダル（§20 プラン一覧モーダル参照）に変更した。
   margin-top: auto でこのブロックを .course-card__body（flexカラム、flex:1）の下端に
   アンカーする。グリッドは行の高さが揃う（stretch）ため、コース名が1行/2行いずれでも
   同じ行の全カードでこのボタン（と、さらに下の .course-card__footer）のY座標が一致する
   （名前等の可変コンテンツは上に留まり、余白がこのブロックの直前に吸収される）。 */
.course-card__plans-section {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: var(--space-3);
}

.course-card__plans-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--accent);
  background: var(--accent-light);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--accent-dark);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.course-card__plans-btn:hover {
  background: var(--accent-light-strong);
  border-color: var(--accent-dark);
}

.btn-shortlist {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color-strong);
  background: var(--surface);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--ink-800);
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.btn-shortlist:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.btn-shortlist__icon {
  display: inline-flex;
  align-items: center;
}

.btn-shortlist.is-added {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent-dark);
}

.btn-book {
  white-space: nowrap;
}

/* コース画像テーマ（imageTheme キーに対応） */
.course-img--pine {
  background: linear-gradient(135deg, #1f7a4d 0%, #0b5c3a 55%, #073c26 100%);
}

.course-img--lake {
  background: linear-gradient(135deg, #2f8f6f 0%, #1c6a8a 55%, #0d3f5c 100%);
}

.course-img--hill {
  background: linear-gradient(135deg, #8bb84a 0%, #4d9455 55%, #2c6b3e 100%);
}

.course-img--valley {
  background: linear-gradient(135deg, #b08a4e 0%, #6f8a4a 55%, #395c33 100%);
}

.course-img--links {
  background: linear-gradient(135deg, #d9c37a 0%, #7fa872 55%, #2f6d5c 100%);
}

.course-img--forest {
  background: linear-gradient(135deg, #4c7a3a 0%, #2e5a34 55%, #1a3a24 100%);
}

.course-img--pine,
.course-img--lake,
.course-img--hill,
.course-img--valley,
.course-img--links,
.course-img--forest {
  position: relative;
}

.course-img--pine::after,
.course-img--lake::after,
.course-img--hill::after,
.course-img--valley::after,
.course-img--links::after,
.course-img--forest::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.22) 0, rgba(255, 255, 255, 0) 40%),
    radial-gradient(circle at 82% 78%, rgba(0, 0, 0, 0.18) 0, rgba(0, 0, 0, 0) 45%);
}

/* ==========================================================================
   11. コース詳細ページ
   ========================================================================== */
.detail-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink-700);
  margin-bottom: var(--space-4);
}

.detail-back-link:hover {
  color: var(--accent-dark);
}

.detail-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 220px;
  margin-bottom: var(--space-5);
}

@media (min-width: 640px) {
  .detail-hero {
    min-height: 300px;
  }
}

.detail-hero__image {
  position: absolute;
  inset: 0;
}

.detail-hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.55) 100%);
}

.detail-hero__content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-5);
  color: #fff;
}

.detail-hero__title {
  font-size: var(--text-2xl);
  color: #fff;
}

.detail-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.92);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

/* grid item の min-width:auto により子（時間チップ列など）の intrinsic 幅が
   親に伝播して横溢れするのを防ぐ。.plan-times の overflow-x:auto を効かせる前提 */
.detail-main {
  min-width: 0;
}

@media (min-width: 960px) {
  .detail-layout {
    grid-template-columns: 1fr 320px;
    align-items: start;
  }
}

.detail-section {
  margin-bottom: var(--space-6);
}

.detail-section__title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-3);
}

.detail-summary-card {
  position: sticky;
  top: calc(var(--header-height) + var(--space-4));
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-2);
  border-bottom: 1px solid var(--border-color);
  font-size: var(--text-sm);
}

.stat-row:last-of-type {
  border-bottom: none;
}

.stat-row__label {
  color: var(--ink-500);
}

.stat-row__value {
  font-weight: 700;
  color: var(--ink-900);
}

.plan-list {
  display: flex;
  flex-direction: column;
}

/* プラン行の区切り: 個別カード枠（border一周）はやめ、全幅リスト + 行間ディバイダーに統一した
   （タスク: 行の視認性向上。方針(a)。docs/UI-GUIDE.md §9/§11a参照）。個別カード枠だと
   プラン一覧モーダル・詳細ページのプラン一覧で「カードの中にカード」のような二重の枠が
   でき、Airbnb的なクリーンなトーンを崩すため、区切りはボーダーのみで表現する。1行目には
   border-top を付けない（親コンテナ側の枠と二重線にならないように `+ .plan-row` セレクタで
   2行目以降にのみ適用）。ホバー時は淡い背景でフィードバックする。 */
.plan-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-2);
  transition: background var(--transition-fast);
}

.plan-row + .plan-row {
  border-top: 1px solid var(--border-color);
}

.plan-row__info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0; /* flex item の min-width:auto による時間チップ列の横溢れ防止 */
}

/* 下段フッター: 左に総額（ラベル・金額・税込/1人）、右にボタン群を固定配置する
   （タスク: プラン行レイアウトの統一。プラン名の長さに関わらず、上段 .plan-row__info の
   高さが変わるだけで、料金・ボタンの位置は全行で同一になる）。 */
.plan-row__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.plan-row__title {
  font-weight: 700;
  color: var(--ink-900);
}

.plan-row__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

/* ==========================================================================
   11b. プラン行の時間チップ（.plan-times）+ コンテキストメニュー
   旧「プラン別ティータイム ポップオーバー」（.plan-frames-popover、「残りN枠」クリック起点）を
   置き換える常時表示チップ列。横スクロール1列（time slots が多いプランでもページ全体は
   横スクロールしない = overflow-x はこのコンテナ自身に閉じる）。スクロールバーは
   .filter-pills（§5）と同じ「細い/隠す」パターンを踏襲する。
   ========================================================================== */
.plan-times {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin-top: 4px;
  padding-block: 2px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.plan-times::-webkit-scrollbar {
  height: 4px;
}

.plan-times::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-pill);
}

.plan-time-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  background: var(--surface-sunken);
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--ink-900);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast),
    color var(--transition-fast);
}

.plan-time-chip:hover,
.plan-time-chip:focus-visible {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent-dark);
  outline: none;
}

/* 取得中のプレースホルダー（4個並べてレイアウトシフトを抑える） */
.plan-time-chip--skeleton {
  width: 46px;
  height: 24px;
  border: none;
  cursor: default;
}

.plan-times__empty {
  flex: 0 0 auto;
  font-size: var(--text-xs);
  color: var(--ink-500);
}

.plan-times__fallback-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--accent-dark);
  text-decoration: underline;
}

/* アクションメニュー共通部品（js/components/menu.js の openActionMenu）。
   プラン時間チップのコンテキストメニューと統合ビューの ellipsis（…）メニューが共用する
   （旧 .plan-time-menu を汎用化してリネーム）。 */
.action-menu {
  z-index: 1000;
  min-width: 220px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.action-menu__item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  font-family: inherit;
  font-size: var(--text-sm);
  color: var(--ink-900);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.action-menu__item:hover,
.action-menu__item:focus-visible {
  background: var(--surface-sunken);
  outline: none;
}

/* 削除系項目（リストを削除 等）は赤文字 */
.action-menu__item--danger {
  color: var(--danger);
}

.plan-row__price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex-shrink: 0;
}

.plan-row__price-label {
  font-size: var(--text-xs);
  color: var(--ink-500);
}

.plan-row__price-value {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--ink-900);
}

.plan-row__price-sub {
  font-size: var(--text-xs);
  color: var(--ink-500);
}

.plan-row__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* モバイル: 左右分割を維持する（375px幅でも price / actions は横並びのまま収まる）。
   価格の桁数（¥5,500 と ¥12,800 等）によって必要幅が数px変わるため、375px幅ちょうどだと
   桁数の多い行だけ折り返して同じコース内で行ごとに配置がバラつく不具合があった
   （実測: .btn-shortlist の余白を詰める前は行によって折り返しが発生/非発生に分かれた）。
   ボタン・ギャップを少し詰めて、想定する最大桁数の料金でも1行に収まる余裕を確保する。 */
@media (max-width: 480px) {
  .plan-row__footer {
    gap: var(--space-2);
  }

  .plan-row__actions {
    gap: 6px;
  }

  .plan-row__actions .btn-shortlist {
    padding: 7px 10px;
    gap: 4px;
  }
}

/* 上記の圧縮でも収まらない極端に狭い画面（iPhone SEクラス未満）だけ、
   最終フォールバックとして縦積みにする。その際も「料金→ボタン」の順を保つ
   （flex-direction: column で自然にこの順になる）。 */
@media (max-width: 340px) {
  .plan-row__footer {
    flex-wrap: wrap;
  }

  .plan-row__actions {
    flex-wrap: wrap;
  }
}

/* ==========================================================================
   12. 統合ビュー「検討リスト＝投票」（#/shortlist と #/s/<payload> 共通）

   js/views/decide.js + js/components/vote-card.js が描画する。旧・比較テーブル
   （.compare-table）と旧・投票カード（.vote-card）はこのビューに統合されて廃止。
   デザイン規律: アクセントは 緑=アクション / アンバー=1位強調 / 赤=警告・削除 の
   3役割のみ（docs/UI-GUIDE.md §10参照）。
   ========================================================================== */
/* タイトル行: 左にタイトル、右端に ellipsis（…）メニューボタン（名前を変更 / リストを削除）。
   375px幅でタイトルが折り返してもボタンは右上に留まる（flex-start + flex-shrink:0）。 */
.decide-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.decide-head__title {
  font-size: var(--text-xl);
}

.decide-head__menu {
  flex-shrink: 0;
  color: var(--ink-500);
}

/* 緑テキストのアクションリンク（GORAで予約 / 別の時間を追加 / 名前を変更）。
   赤（--danger）は削除系、グレー（--muted）は「プランを外す」（ホバーで赤）に使う。 */
.link-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  padding: 4px;
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.link-action:hover {
  text-decoration: underline;
}

.link-action--danger {
  color: var(--danger);
}

.link-action--muted {
  color: var(--ink-400);
}

.link-action--muted:hover {
  color: var(--danger);
}

/* 所在地リンク（所在地テキスト全体を Google Maps 経路リンク化: 📍所在地↗。
   format.js の mapLinkHtml）。.link-action（アクセント緑・inline-flex + align-items:center）を
   ベースに、周囲のメタテキストの文字サイズになじむようインライン調整だけ加える。
   vertical-align: bottom が重要 — inline-flex の既定ベースラインは先頭フレックスアイテム
   （＝map-pinアイコン）由来になり、リンク全体が周囲のテキストより上にずれて見えるため、
   ボックス下端を行ボックス下端に揃える（リンク内テキストは同じ font-size / line-height を
   継承しているので、これでベースラインが一致する）。 */
.map-link {
  gap: 3px;
  padding: 0;
  font-size: inherit;
  vertical-align: bottom;
}

.map-link .map-link__pin,
.map-link .map-link__ext {
  flex: none;
}

.map-link .map-link__ext {
  color: var(--ink-400);
}

.map-link:hover .map-link__ext {
  color: inherit;
}

/* コース詳細ヒーロー（暗い写真の上）用: 緑リンクではコントラストが不足するため白にする */
.map-link--light,
.map-link--light .map-link__ext {
  color: #fff;
}

.map-link--light:hover,
.map-link--light:hover .map-link__ext {
  color: rgba(255, 255, 255, 0.85);
}

.decide-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.decide-toolbar__spacer {
  flex: 1;
}

/* 「現在の1位」バナー（薄緑）。投票ゼロ/読み込み中はグレーのプレースホルダー表示 */
.decide-lead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--accent-light);
  border: 1px solid var(--accent-light-strong);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
}

.decide-lead__text {
  font-size: var(--text-sm);
  color: var(--accent-darker);
}

.decide-lead__text b {
  font-size: var(--text-md);
}

.decide-lead__reserve {
  gap: 6px;
}

.decide-lead--empty,
.decide-lead--loading {
  background: var(--surface-sunken);
  border-color: var(--border-color);
}

.decide-lead--empty .decide-lead__text,
.decide-lead--loading .decide-lead__text {
  color: var(--ink-500);
}

/* ---- コースカード ---- */
.vote-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.vote-course {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.vote-course--winning {
  border: 2px solid var(--accent);
}

.vote-course__head {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-4) var(--space-3);
  align-items: flex-start;
}

.vote-course__thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  flex: none;
}

.vote-course__main {
  flex: 1;
  min-width: 0;
}

.vote-course__name {
  font-size: var(--text-md);
  font-weight: 700;
}

.vote-course__meta {
  color: var(--ink-500);
  font-size: var(--text-xs);
  margin-top: 1px;
}

.vote-course__badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* 写真上バッジ用の白背景（§9 .fairway-tag）をカード内トーンに合わせる */
.vote-course__badges .fairway-tag {
  background: var(--accent-light);
  box-shadow: none;
}

/* 右上の合計得票数（大きい緑数字。0票はグレー） */
.vote-course__votes {
  text-align: center;
  flex: none;
  padding-left: var(--space-2);
  line-height: 1.15;
}

.vote-course__crown {
  color: var(--star); /* アンバー = 1位強調 */
}

.vote-course__votes-num {
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
}

.vote-course__votes-num--zero {
  color: var(--ink-300);
}

.vote-course__votes-unit {
  font-size: var(--text-xs);
  color: var(--ink-500);
}

/* ---- プラン行 ----
   モバイルファースト: 1行目 = 時刻チップ + 価格/投票ボタン（横並び）、
   pill列・プラン名・投票者/リンク行はその下に縦積み。640px以上は時刻チップが
   2行分（pill列+プラン名）を受け、右端に価格/投票ボタンを縦積みする。 */
.vote-plan {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  grid-template-areas:
    "time right"
    "pills pills"
    "name name"
    "foot foot";
  gap: 6px var(--space-3);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border-color);
}

.vote-plan.is-voted {
  background: #f3faf5;
}

.vote-plan__time {
  grid-area: time;
  align-self: center;
  font-size: var(--text-md);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
  background: var(--surface-sunken);
  border-radius: var(--radius-md);
  padding: 8px 2px;
}

.vote-plan.is-voted .vote-plan__time {
  background: var(--accent-light-strong);
  color: var(--accent-dark);
}

/* 確定時刻でない（時台レンジ・早朝/薄暮/時間未定）チップは小さめ表示 */
.vote-plan__time--fuzzy {
  font-size: var(--text-xs);
  font-weight: 700;
}

.vote-plan__pills {
  grid-area: pills;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.vote-plan__right {
  grid-area: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
}

.vote-plan__price {
  font-size: var(--text-md);
  font-weight: 800;
  white-space: nowrap;
}

.vote-plan__price small {
  font-size: var(--text-xs);
  color: var(--ink-500);
  font-weight: 500;
}

.vote-plan__name {
  grid-area: name;
  font-size: var(--text-xs);
  color: var(--ink-500);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vote-plan__foot {
  grid-area: foot;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.vote-plan__links {
  margin-left: auto;
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.vote-plan--gone .vote-plan__name {
  white-space: normal;
}

.vote-plan__time-skeleton {
  height: 36px;
  border-radius: var(--radius-md);
}

/* オーナー専用フッター（破線区切り。参加者にはマークアップ自体が出力されない） */
.vote-course__foot {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  border-top: 1px dashed var(--border-color);
}

.vote-course__remove {
  margin-left: auto;
}

/* 候補の取得失敗カード */
.vote-course--error {
  padding: var(--space-4);
}

.vote-course--error .vote-course__foot {
  border-top: none;
  padding: var(--space-2) 0 0;
}

.vote-course__error-text {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--ink-500);
}

@media (min-width: 640px) {
  .vote-plan {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    grid-template-areas:
      "time pills right"
      "time name right"
      ". foot foot";
    gap: 4px var(--space-3);
  }

  .vote-plan__time {
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
  }

  .vote-plan__right {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }
}

/* ==========================================================================
   13. モーダル（共有 / 名前入力ゲート）
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 24, 26, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-6);
  animation: modal-pop var(--transition-base);
}

.modal__close {
  /* 正円（40x40px固定）。以前は .btn--icon の aspect-ratio:1 のみに頼っていたが、
     position: absolute の非置換要素は width/height が auto のまま aspect-ratio が
     正しく解決されないことがあり、実際には細長い楕円になっていた。padding:0 + 明示的な
     width/height + flexセンタリングで確実に正円にする（プランモーダル・共有モーダル・
     名前入力ゲート・絞り込みモーダル全ての .modal__close 共通、docs/UI-GUIDE.md §11参照）。 */
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  aspect-ratio: 1;
  flex-shrink: 0;
}

.modal__header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: var(--space-5);
  padding-right: var(--space-6);
}

.modal__title {
  font-size: var(--text-xl);
}

.modal__subtitle {
  font-size: var(--text-sm);
  color: var(--ink-500);
}

.modal__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-color);
}

.share-modal__link-row {
  display: flex;
  gap: var(--space-2);
}

.share-modal__link-input {
  flex: 1;
  background: var(--surface-sunken);
  font-size: var(--text-sm);
}

.share-modal__channels {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.name-gate__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* ==========================================================================
   14. 投票部品（投票ボタン / 投票者チップ / スケルトン小物）

   統合ビュー（§12）のプラン行から使う。旧・投票カード（.vote-card / .vote-count /
   .vote-summary-banner）は統合ビューに置き換えられて廃止。
   ========================================================================== */
.voter-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-sunken);
  border: 1px solid var(--border-color);
  font-size: var(--text-xs);
  color: var(--ink-700);
}

/* 自分の名前チップは緑塗り */
.voter-chip--me {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

.vote-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--accent);
  background: var(--surface);
  color: var(--accent-dark);
  font-size: var(--text-sm);
  font-weight: 700;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.vote-button:hover {
  background: var(--accent-light);
}

.vote-button.is-voted {
  background: var(--accent);
  color: #fff;
}

/* プラン行用の小さめバリアント */
.vote-button--sm {
  padding: 5px 14px;
  border-width: 1.5px;
  gap: 4px;
  white-space: nowrap;
}

/* 統合ビューのローディングステート小物（.skeleton ベース。§17参照） */
.skeleton--count {
  display: block;
  width: 36px;
  height: 30px;
}

.skeleton--chip {
  display: inline-block;
  width: 64px;
  height: 22px;
  border-radius: var(--radius-pill);
}

.skeleton--pill-sm {
  width: 96px;
  height: 32px;
  margin-top: 0;
  border-radius: var(--radius-pill);
}

/* ==========================================================================
   15. トースト
   ========================================================================== */
.toast-root {
  position: fixed;
  left: 50%;
  bottom: var(--space-5);
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: calc(100% - var(--space-6));
  max-width: 420px;
  pointer-events: none;
}

@media (min-width: 640px) {
  .toast-root {
    left: auto;
    right: var(--space-5);
    bottom: var(--space-5);
    transform: none;
  }
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--ink-900);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toast-in var(--transition-base);
}

.toast--success {
  background: var(--accent-dark);
}

.toast--error {
  background: var(--danger);
}

.toast__icon {
  display: inline-flex;
  align-items: center;
}

/* ==========================================================================
   16. 空状態
   ========================================================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
  padding: var(--space-8) var(--space-4);
  color: var(--ink-500);
}

.empty-state__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-400);
  opacity: 0.7;
}

.empty-state__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--ink-900);
}

.empty-state__text {
  font-size: var(--text-sm);
  max-width: 360px;
}

.empty-state__action {
  margin-top: var(--space-2);
}

/* ==========================================================================
   17. アニメーション / アクセシビリティ
   ========================================================================== */
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes modal-pop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==========================================================================
   18. 詳細フィルターモーダル（プレースタイル / プレー人数オプション / 除外オプション）
   ========================================================================== */
.filter-modal {
  max-width: 560px;
  padding: var(--space-6) var(--space-6) var(--space-5);
}

.filter-modal__body {
  max-height: 60vh;
  overflow-y: auto;
  gap: var(--space-6);
  padding-right: 2px;
}

.filter-modal__section {
  border: none;
  padding: 0;
  margin: 0;
}

.filter-modal__section-title {
  padding: 0;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: var(--space-3);
}

.filter-modal__section-hint {
  font-size: var(--text-xs);
  color: var(--ink-500);
  margin: -4px 0 var(--space-3);
}

.filter-modal__section--exclude {
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-color);
}

.filter-modal__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2) var(--space-4);
}

.filter-modal__option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  font-size: var(--text-sm);
  color: var(--ink-700);
  cursor: pointer;
}

.filter-modal__option input[type='checkbox'] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.filter-modal__option-icon {
  display: inline-flex;
  align-items: center;
  color: var(--ink-500);
}

/* アイコンは通常/錠の2種を重ねず切り替え表示（既定は通常、ロック時は錠）。 */
.filter-modal__option-icon-default {
  display: inline-flex;
}
.filter-modal__option-icon-lock {
  display: none;
}

/* ロック状態: 含む/除外の一方を選ぶと反対側の同一項目を無効化（クリック不可・グレー）し、
   アイコンを錠に差し替える。理由は option 要素の title 属性（ホバーで表示）。 */
.filter-modal__option--locked {
  color: var(--ink-400);
  cursor: not-allowed;
  opacity: 0.6;
}
.filter-modal__option--locked input[type='checkbox'] {
  cursor: not-allowed;
}
.filter-modal__option--locked .filter-modal__option-icon-default {
  display: none;
}
.filter-modal__option--locked .filter-modal__option-icon-lock {
  display: inline-flex;
}

.filter-modal__footer {
  align-items: center;
  justify-content: space-between;
}

/* 料金レンジ（デュアルハンドルスライダー）。外部ライブラリ不使用の自作実装:
   透明な <input type="range"> を2本重ね、トラック全体は pointer-events: none にして
   つまみ（::-webkit-slider-thumb / ::-moz-range-thumb）だけ pointer-events: auto に
   戻すことで、両方のつまみを重なった状態でも個別に掴めるようにする（定番のデュアルレンジ
   実装パターン）。z-index はJS側（results.js setupPriceRangeControl）が値に応じて動的に
   入れ替える。 */
.filter-modal__section--price {
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-color);
}

/* 現在値テキスト（「指定なし 〜 ¥15,000」）はプレースタイル等のオプション（.filter-modal__option）
   と同じテキストスタイル（太字にせず控えめ）に揃える。 */
.price-range__value {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--ink-700);
  margin: 0 0 var(--space-4);
}

.price-range__track {
  position: relative;
  height: 44px;
}

.price-range__track-bg {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  transform: translateY(-50%);
  background: var(--border-color-strong);
  border-radius: var(--radius-pill);
}

.price-range__track-fill {
  position: absolute;
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  background: var(--accent);
  border-radius: var(--radius-pill);
}

.price-range__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 44px;
  margin: 0;
  background: none;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
}

.price-range__input--min {
  z-index: 2;
}

.price-range__input--max {
  z-index: 3;
}

.price-range__input::-webkit-slider-runnable-track {
  -webkit-appearance: none;
  background: none;
  height: 44px;
}

.price-range__input::-moz-range-track {
  background: none;
  height: 44px;
  border: none;
}

/* つまみ（サム）は視覚上24pxだが、input自体の高さ（44px、上のルール参照）が
   ブラウザのヒットテスト領域になるため、モバイルでも押しやすいタップ領域を確保できる。 */
.price-range__input::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: auto;
  width: 24px;
  height: 24px;
  margin-top: 10px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.price-range__input::-moz-range-thumb {
  pointer-events: auto;
  width: 24px;
  height: 24px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.price-range__input:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px var(--accent-light);
}

.price-range__input:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 3px var(--accent-light);
}

@media (max-width: 480px) {
  .filter-modal__options {
    grid-template-columns: 1fr;
  }

  .filter-modal__footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .filter-modal__footer .btn {
    width: 100%;
  }
}

/* モバイル（<640px）: 画面下からのボトムシート表示に切り替える
   （狭い画面ではセンターモーダルより親指操作しやすいため）。 */
@media (max-width: 639px) {
  #filter-modal.modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  #filter-modal .filter-modal {
    max-width: none;
    width: 100%;
    max-height: 85vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    animation: filter-modal-sheet-in 0.2s ease-out;
  }
}

@keyframes filter-modal-sheet-in {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

/* ==========================================================================
   19. 評価内訳（口コミ評価軸）
   ========================================================================== */

/* コース詳細ページ（.detail-section 内）とスケルトンで共通のコンテナ。
   評価内訳（軸別スコアバー）はコース詳細ページ専用の表示。検討リスト比較テーブルでは
   表示せず（テーブルが縦に間延びするため撤去）、フェアウェイ軸の値のみ
   フェアウェイ列に「広い（4.2）」形式で表示する（css/styles.css .fairway-tag__score、
   js/views/shortlist.js 参照）。 */
.rating-breakdown {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.rating-breakdown__axes {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.rating-breakdown__axis {
  display: grid;
  grid-template-columns: 72px 1fr 40px;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
}

.rating-breakdown__axis-label {
  color: var(--ink-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rating-breakdown__bar {
  position: relative;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-sunken);
  overflow: hidden;
}

.rating-breakdown__bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-pill);
  transition: width var(--transition-base);
}

.rating-breakdown__axis-value {
  text-align: right;
  font-weight: 700;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}

.rating-breakdown__axis--skeleton {
  grid-template-columns: 72px 1fr;
}

.rating-breakdown__bar-skeleton {
  display: block;
  height: 8px;
  border-radius: var(--radius-pill);
}

/* 「口コミを見る ↗」リンク（コース詳細ページの評価サマリー直下） */
.rating-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent-dark);
  text-decoration: none;
}

.rating-link:hover {
  text-decoration: underline;
}

.rating-link__ext {
  display: inline-flex;
  align-items: center;
}

/* ==========================================================================
   20. もっと見る（ページング）
   ========================================================================== */

.load-more-row {
  display: flex;
  justify-content: center;
  margin-top: var(--space-6);
}

/* .load-more-row の display:flex は author-origin なので UA の [hidden]{display:none} を
   上書きしてしまう（.badge[hidden] と同じ罠）。hidden 属性を効かせるため明示的に消す。
   これでローディング中・0件時（updateLoadMoreUi で hidden=true）に確実に非表示になる。 */
.load-more-row[hidden] {
  display: none;
}

.load-more-btn {
  min-width: 220px;
  justify-content: center;
}

.load-more-btn[disabled] {
  cursor: default;
  opacity: 0.85;
}

.load-more-btn__spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: var(--space-2);
  border: 2px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin-rotate 0.6s linear infinite;
  vertical-align: -2px;
}

/* 汎用の回転スピナーアニメーション（旧 plan-frames-spin。プラン別ティータイム
   ポップオーバー廃止に伴い汎用名にリネームした。load-more-btn__spinner が使用）。 */
@keyframes spin-rotate {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .load-more-btn__spinner {
    animation: none;
  }
}

/* ==========================================================================
   21. プラン一覧モーダル（結果カード「プランを見る (N)」から開く）

   共有の .modal-overlay / .modal シェル（§13）をそのまま使う。デスクトップは中央モーダル、
   640px未満は画面下からのボトムシート（#filter-modal と同じパターン。§18参照）。
   プラン行（.plan-row）はコース詳細ページのプラン一覧（§9）と共通のマークアップを再利用する。
   ========================================================================== */
.plans-modal {
  max-width: 560px;
}

.plans-modal__body {
  max-height: 65vh;
  overflow-y: auto;
  gap: var(--space-3);
  padding-right: 2px;
}

@media (max-width: 639px) {
  #plans-modal.modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  #plans-modal .plans-modal {
    max-width: none;
    width: 100%;
    max-height: 85vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    animation: filter-modal-sheet-in 0.2s ease-out;
  }
}

/* ==========================================================================
   22. アイコン（Lucide, js/components/icons.js の icon() が出力する <svg class="icon ...">）

   絵文字/テキスト記号（✕ ↗ ♡ ♥ 👑 🔍 🍽️ ⏩ ◐ 🧍 🛺 👥 🤝 等）を置き換えた
   インラインSVG共通スタイル。個別のアイコン色・サイズは呼び出し側のラッパー
   （.tag__icon, .btn-shortlist__icon 等）や icon() の size 引数で指定するため、
   ここでは全アイコン共通の縦位置調整のみ行う。
   ========================================================================== */
.icon {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: -0.15em;
}

