/* トップページ（templates/home.html）だけで読む。2026-10-15 作り直し（決めごとは docs/design/top-page.md）。
   ゴルフスケール／テニスナビの home.css と同じ骨（白いカード基調・スライド＋目次・検索 1 本・お知らせ・各欄・スマホの間引き）を、
   このサイトの色（gs-shell.css の変数。主色は青・副色は橙・差し色は緑）で組む。色の hex は書かない。 */
.hm { --hm-gap: 40px; --hm-card: var(--card); --hm-line: var(--line); --hm-sub: var(--mute); --hm-radius: 10px;
  --hm-shadow: 0 1px 2px rgba(16, 36, 43, .06), 0 8px 24px -20px rgba(16, 36, 43, .35); padding-bottom: 8px; }
.hm h2, .hm h3 { border-bottom: 0; }
.hm .hm-sec { margin-top: var(--hm-gap); }
.hm .hm-sec-last { margin-bottom: 24px; }
.hm-sec-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.hm-sec-h h2, .hm-box-h h3 { margin: 0; font-size: 1.3rem; line-height: 1.4; font-weight: 800; color: var(--ink); }
.hm-more { margin-left: auto; font-size: .88rem; font-weight: 700; color: var(--g); white-space: nowrap; text-decoration: none; }
.hm-more::after { content: " ›"; }
.hm-more:hover { text-decoration: underline; }

/* ボタン・札 */
.hm-btn { display: inline-block; padding: 9px 22px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--card);
  color: var(--ink); font-size: .9rem; font-weight: 700; text-decoration: none; line-height: 1.4; }
.hm-btn:hover { background: var(--ink); color: #fff; }
.hm-btn.is-blue { border-color: var(--g); background: var(--g); color: #fff; }
.hm-btn.is-blue:hover { background: var(--g-dark); border-color: var(--g-dark); }
.hm-btn.is-orange { border-color: var(--s-ink); background: var(--s-ink); color: #fff; }
.hm-btn.is-orange:hover { background: var(--s); border-color: var(--s); }
.hm-badge { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: .74rem; font-weight: 700; line-height: 1.6; white-space: nowrap; background: var(--soft); color: var(--hm-sub); }
.hm-badge.is-l4, .hm-badge.is-l3 { background: var(--s-soft); color: var(--s-ink); }
.hm-badge.is-l2 { background: var(--tint); color: var(--g); }
.hm-badge.is-l1, .hm-badge.is-l0 { background: var(--y-soft); color: var(--y-deep); }
.hm-rk-n { width: 26px; height: 26px; border-radius: 50%; background: var(--g); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; flex: 0 0 auto; }

/* ===== スライド: 左に大きく 1 枚（文字＋写真）＋ PC は右に目次 ===== */
.hm-mv { position: relative; margin-top: 20px; }
.hm-mv-main { position: relative; min-width: 0; }
/* 枠の高さは固定（幅の 1/2。16:9 は「縦長すぎる」＝ 2026-10-20 ユーザー判断で 2:1 に。それまでの 25:9 から揃えた）。写真の縦横比や図の高さで枠が変わると、目次で切り替えたとき枠がカクカク動く（2026-10-15 フィットスケールでユーザー指摘・同じ作りなので揃えた） */
.hm-slide { display: grid; grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); grid-template-rows: minmax(0, 1fr); aspect-ratio: 2 / 1; overflow: hidden;
  border: 1px solid var(--hm-line); border-radius: var(--hm-radius); background: var(--hm-card); }
.hm-slide[hidden] { display: none; }
.hm-slide.img-broken, .hm-slide:not(.has-img):not(.has-fig) { grid-template-columns: 1fr; }
.hm-slide.img-broken .hm-slide-img { display: none; }
.hm-slide-txt { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 28px 30px; min-width: 0; min-height: 0; overflow: hidden; }
.hm-slide-lbl { align-self: flex-start; padding: 0 10px; border-radius: 99px; font-size: .76rem; font-weight: 700; line-height: 1.8; background: var(--tint); color: var(--g); }
.hm-slide-lbl.is-o { background: var(--s-soft); color: var(--s-ink); }
.hm-slide-lbl.is-g { background: var(--y-soft); color: var(--y-deep); }
.hm-slide-h { margin: 0; font-size: 1.65rem; line-height: 1.35; font-weight: 800; letter-spacing: .01em; color: var(--ink); text-wrap: balance; }
.hm-slide-ctas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.hm-slide-txt .rk-credit { margin: 4px 0 0; }
.hm-slide-img { position: relative; display: block; min-width: 0; min-height: 0; background: var(--soft); }
.hm-slide-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }   /* 写真の実寸で枠を押し広げない */
.hm-slide-credit { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 1px 8px; border-radius: 6px; background: rgba(16, 36, 43, .62); color: #fff; font-size: .68rem; line-height: 1.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-slide-fig { display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--soft); min-width: 0; min-height: 0; overflow: hidden; }
.hm-slide-fig img { max-width: 100%; max-height: 100%; height: auto; }
.hm-flags { flex-wrap: wrap; gap: 14px 22px; align-content: center; }
.hm-flag { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .82rem; font-weight: 700; color: var(--ink); }
.hm-flag img { width: 64px; height: 48px; border-radius: 4px; box-shadow: 0 0 0 1px var(--hm-line); object-fit: cover; }
/* 前後ボタン・ドット（目次が入らない幅で出す） */
.hm-mv-nav { display: none; position: absolute; top: 50%; z-index: 2; width: 44px; height: 44px; margin-top: -22px; padding: 0; border: 0; border-radius: 50%;
  background: var(--card); color: var(--ink); box-shadow: var(--hm-shadow); cursor: pointer; align-items: center; justify-content: center; }
.hm-mv-nav .icon { width: 18px; height: 18px; }
.hm-mv-prev { left: -16px; }
.hm-mv-next { right: -16px; }
.hm-mv-dots { display: flex; justify-content: center; gap: 10px; margin-top: 10px; line-height: 0; }
.hm-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--line); cursor: pointer; }
.hm-dot.is-on { background: var(--g); }
.hm-toc { display: none; }
@media (min-width: 1000px) {
  .hm-mv.has-toc { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; }
  .has-toc .hm-mv-nav, .has-toc .hm-mv-dots { display: none; }
  .hm-toc { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
  .hm-toc li { display: flex; flex: 1 1 0; min-height: 0; }
  .hm-toc a { position: relative; display: block; flex: 1; padding: 8px 12px; overflow: hidden; border: 1px solid var(--hm-line); border-radius: 8px;
    background: var(--card); color: var(--ink); text-decoration: none; transition: border-color .15s; }
  .hm-toc a:hover { border-color: var(--g); }
  .hm-toc a.is-on { border-color: var(--g); box-shadow: inset 4px 0 0 var(--g); }
  .hm-toc b, .hm-toc small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }   /* 6 枠をスライドの高さ（2:1）に収める: 見出し 1 行・要約 1 行 */
  .hm-toc b { font-size: .84rem; line-height: 1.4; }
  .hm-toc small { font-size: .72rem; line-height: 1.5; color: var(--hm-sub); }   /* 2 行目は中身の要約（件数・施設名・料金 …）。説明文ではなくコンテンツ（2026-10-16） */
  .hm-toc a.is-on::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 3px; background: var(--g); }
  .hm-mv.is-playing .hm-toc a.is-on::after { animation: hm-prog 6s linear forwards; }
}
@keyframes hm-prog { to { width: 100%; } }
/* 768〜1199px は枠が 620〜710px で文字の列が 280〜320px しかない。見出しと余白を詰めて枠に収める（はみ出すと overflow で切れる） */
@media (min-width: 768px) and (max-width: 1199px) {
  .hm-slide-txt { gap: 8px; padding: 18px 20px; }
  .hm-slide-h { font-size: 1.3rem; }
  .hm-slide-ctas .hm-btn { padding: 7px 14px; font-size: .84rem; }
}
@media (min-width: 768px) and (max-width: 999px) {
  .hm-mv-main { padding: 0 56px; }
  .hm-mv-nav { display: flex; }
  .hm-mv-prev { left: 6px; }
  .hm-mv-next { right: 6px; }
}

/* ===== 検索（丸い枠・主色） ===== */
.hm-find { margin-top: 24px; text-align: center; }
.hm-h1 { margin: 0 0 10px; font-size: .95rem; font-weight: 700; color: var(--hm-sub); border: 0; }
.hm-search { display: flex; max-width: 620px; margin: 0 auto; overflow: hidden; border: 2px solid var(--g); border-radius: 999px; background: var(--card); }
.hm-search input { flex: 1; min-width: 0; padding: 11px 18px; border: 0; outline: 0; font: inherit; font-size: 16px; background: transparent; color: var(--ink); }
.hm-search button { flex: 0 0 auto; padding: 0 24px; border: 0; background: var(--g); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.hm-search button:hover { background: var(--g-dark); }
.hm-search:focus-within { box-shadow: 0 0 0 3px rgba(3, 105, 161, .22); }

/* ===== お知らせカード ===== */
.hm-info { display: grid; gap: 12px; margin-top: 24px; }
.hm-promo { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; padding: 14px 16px 14px 14px; background: var(--hm-card);
  border: 1px solid var(--hm-line); border-left: 5px solid var(--pc); border-radius: var(--hm-radius); color: var(--ink); text-decoration: none; transition: box-shadow .15s, transform .15s; }
.hm-promo.is-b { --pc: var(--g); --pc-soft: var(--tint); --pc-ink: var(--g); }
.hm-promo.is-o { --pc: var(--s); --pc-soft: var(--s-soft); --pc-ink: var(--s-ink); }
.hm-promo:hover { color: var(--ink); box-shadow: 0 10px 24px -18px rgba(16, 36, 43, .55); transform: translateY(-1px); }
.hm-promo-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hm-promo-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: .74rem; }
.hm-promo-label { font-weight: 700; color: var(--pc-ink); background: var(--pc-soft); padding: 0 8px; border-radius: 99px; }
.hm-promo-title { font-weight: 800; font-size: 1.02rem; line-height: 1.4; }
.hm-promo-cta { display: inline-flex; align-items: center; gap: 2px; padding: 8px 12px 8px 16px; border-radius: 99px; background: var(--pc-ink); color: #fff; font-weight: 700; font-size: .84rem; white-space: nowrap; }
.hm-promo-cta .icon { width: 15px; height: 15px; }
@media (min-width: 1000px) { .hm-info { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }

/* ===== 旅の予定に（次の連休・渡航情報） ===== */
.hm-plan { display: grid; gap: 12px; }
.hm-planc { display: flex; flex-direction: column; gap: 4px; padding: 13px 16px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius); background: var(--hm-card); min-width: 0; }
.hm-planc-k { font-size: .8rem; font-weight: 700; color: var(--g); }
.hm-planc-v { font-weight: 800; line-height: 1.45; font-size: 1.02rem; }
.hm-planc-v small { font-weight: 600; color: var(--hm-sub); }
.hm-planc-r { font-size: .84rem; color: var(--hm-sub); line-height: 1.65; }
.hm-planc-r a, .hm-planc-v a { color: var(--g); font-weight: 700; text-decoration: none; }
.hm-planc-r a:hover, .hm-planc-v a:hover { text-decoration: underline; }
@media (min-width: 900px) { .hm-plan { grid-template-columns: 1fr 1fr; } }

/* ===== ランキング ===== */
.hm-rk-grid { display: grid; gap: 12px; }
.hm-rkc { display: flex; flex-direction: column; gap: 4px; padding: 13px 16px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius); background: var(--hm-card);
  color: var(--ink); text-decoration: none; min-width: 0; transition: border-color .15s; }
.hm-rkc:hover { border-color: var(--g); color: var(--ink); }
.hm-rkc-cat { font-size: .8rem; font-weight: 700; color: var(--g); }
.hm-rkc-top { display: flex; align-items: center; gap: 8px; font-weight: 800; line-height: 1.4; flex-wrap: wrap; }
.hm-rkc-top small { font-weight: 600; color: var(--hm-sub); }
.hm-rkc-rest { font-size: .8rem; color: var(--hm-sub); line-height: 1.6; }
@media (min-width: 640px) { .hm-rk-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .hm-rk-grid { grid-template-columns: repeat(3, 1fr); } }

/* ===== 写真のある観光地（横スクロール） ===== */
.hm-scroll { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; }
.hm-pc { display: block; width: 190px; flex: 0 0 190px; scroll-snap-align: start; overflow: hidden; border: 1px solid var(--hm-line); border-radius: var(--hm-radius); background: var(--hm-card);
.hm-pc.img-broken { display: none; }   /* 写真が読めなかった札は隠す（home.js） */
  color: var(--ink); text-decoration: none; transition: border-color .15s; }
.hm-pc:hover { border-color: var(--g); color: var(--ink); }
.hm-pc-im { display: block; height: 124px; background: var(--soft); }
.hm-pc-im img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hm-pc-bd { display: block; padding: 8px 12px 10px; font-size: .86rem; line-height: 1.5; }
.hm-pc-bd small { display: block; font-size: .74rem; color: var(--hm-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-pc-bd b { display: block; font-weight: 800; }

/* ===== 2 枚組の箱（宿を探す） ===== */
.hm-two { display: grid; gap: 20px; }
.hm-box { padding: 16px 18px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius); background: var(--hm-card); min-width: 0; }
.hm-box-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.hm-box .hm-box-h h3 { font-size: 1.05rem; }
.hm-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.hm-chips a { display: inline-block; padding: 4px 11px; border-radius: 999px; background: var(--tint); color: var(--g); font-size: .84rem; font-weight: 700; text-decoration: none; line-height: 1.6; }
.hm-chips a:hover { background: var(--g); color: #fff; }
.hm-chips a:hover small { color: #fff; }
.hm-chips small { margin-left: 5px; font-size: .72rem; font-weight: 500; color: var(--hm-sub); }
@media (min-width: 900px) { .hm-two { grid-template-columns: 1fr 1fr; } }

/* ===== カテゴリから探す ===== */
.hm-cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
.hm-cat { display: flex; flex-direction: column; height: 100%; padding: 13px 14px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius); background: var(--hm-card);
  box-shadow: var(--hm-shadow); color: var(--ink); text-decoration: none; transition: border-color .15s; min-width: 0; }
.hm-cat:hover { border-color: var(--g); color: var(--ink); }
.hm-cat-ic .icon { width: 28px; height: 28px; color: var(--g); }
.hm-cat-name { margin-top: 6px; font-weight: 800; line-height: 1.35; }
.hm-cat-count { font-size: .8rem; font-weight: 700; color: var(--g); }
@media (min-width: 640px) { .hm-cats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .hm-cats { grid-template-columns: repeat(6, 1fr); } }

/* ===== スマホ ===== */
@media (max-width: 767px) {
  .hm { --hm-gap: 32px; }
  .hm-mv { margin-top: 12px; }
  .hm-slide, .hm-slide.has-img, .hm-slide.has-fig { grid-template-columns: 1fr; grid-template-rows: none; aspect-ratio: auto; }   /* スマホは縦に積むので枠の比率は固定しない */
  .hm-slide.has-img .hm-slide-img { order: -1; aspect-ratio: 16 / 9; }
  .hm-slide.has-fig .hm-slide-fig { order: -1; min-height: 120px; }
  .hm-slide-txt { gap: 8px; padding: 14px 16px 16px; }
  .hm-slide-h { font-size: 1.25rem; }
  .hm-slide-ctas .hm-btn { width: 100%; text-align: center; }
  /* スマホは短く（ゴルフスケール・テニスナビと同じ密度）: お知らせ 1 枚・旅の予定は連休だけ・ランキングは 1 位だけ・都道府県 8・ブランド 6・カテゴリ 8 */
  .hm-info .hm-promo:nth-child(n+2), .hm-plan > :nth-child(n+2), .hm-rkc-rest, .hm-rkc-top small,
  .hm-prefs > li:nth-child(n+9), .hm-box .hm-chips:not(.hm-prefs) > li:nth-child(n+7), .hm-cats > li:nth-child(n+9) { display: none; }
  .hm-sec-h h2, .hm-box-h h3 { font-size: 1.15rem; }
  .hm-pc { width: 150px; flex-basis: 150px; }
  .hm-pc-im { height: 100px; }
}
