/* ゴルフ場マップ（40〜60代向けの基準: 本文16px以上・文字のコントラスト7:1以上・押す場所44px以上）map-design §11 */
.gm { --gm-blue: #0b4f8c; --gm-ink: #222; --gm-line: #d6d6d6; --gm-soft: #f4f7fb;
  color: var(--gm-ink); font-size: 18px; line-height: 1.8;
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif; }
.gm *, .gm *::before, .gm *::after { box-sizing: border-box; }
.gm-loading { font-size: 18px; padding: 24px 0; }
.gm-label { display: block; font-size: 17px; font-weight: 700; margin: 0 0 6px; padding: 0; }
.gm-select { width: 100%; min-height: 52px; font-size: 18px; padding: 8px 12px; border: 2px solid var(--gm-ink);
  border-radius: 4px; background: #fff; color: var(--gm-ink); margin: 0 0 18px; }
.gm-filters { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.gm-check { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; margin: 0 0 6px;
  border: 1px solid var(--gm-line); border-radius: 4px; background: #fff; cursor: pointer; font-size: 17px; line-height: 1.5; }
.gm .gm-check input { display: inline-block; width: 30px; height: 30px; flex: 0 0 30px; margin: 0; padding: 0; accent-color: var(--gm-blue); } /* テーマの input{margin:auto} を打ち消す */
.gm-check:has(input:checked) { border-color: var(--gm-blue); background: var(--gm-soft); }
.gm-mapwrap { margin: 0 0 16px; }
.gm-stage { position: relative; }
.gm-map { width: 100%; height: 50vh; min-height: 320px; max-height: 520px; border: 1px solid var(--gm-line); }
/* スマホ: パネルを開くと地図を少し低くし、そのすぐ下にパネルを置く。パネルの中だけスクロール */
.gm-stage.has-panel .gm-map { height: 30vh; min-height: 200px; } /* パネルの最初の高さに業者ボタンまで入れる */
.gm-panel { background: #fff; border: 2px solid var(--gm-blue); border-top-width: 4px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.gm-panel[hidden] { display: none; }
.gm-panel-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--gm-line); }
.gm-panel-name { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.5; }
.gm-panel-head .gm-sub { margin: 0; display: block; }
.gm-close { flex: 0 0 auto; min-height: 48px; min-width: 88px; padding: 8px 14px; font-size: 17px; font-weight: 700; color: var(--gm-blue);
  background: #fff; border: 2px solid var(--gm-blue); border-radius: 4px; cursor: pointer; }
.gm-close:focus-visible { outline: 3px solid var(--gm-blue); outline-offset: 2px; }
.gm-count { font-size: 18px; font-weight: 700; margin: 0 0 8px; border-bottom: 2px solid var(--gm-ink); padding-bottom: 6px; }
.gm-list { list-style: none; margin: 0; padding: 0; }
.gm-item { border-bottom: 1px solid var(--gm-line); }
.gm-item.is-open { background: var(--gm-soft); border-left: 4px solid var(--gm-blue); }
.gm-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; width: 100%; min-height: 64px; padding: 12px 10px;
  border: 0; background: none; text-align: left; cursor: pointer; color: var(--gm-ink); font: inherit; }
.gm-row:hover { background: var(--gm-soft); }
.gm-row:focus-visible { outline: 3px solid var(--gm-blue); outline-offset: -3px; }
.gm-name { grid-column: 1; font-size: 19px; font-weight: 700; line-height: 1.5; }
.gm-sub { grid-column: 1; font-size: 16px; color: #444; line-height: 1.5; }
.gm-key { grid-column: 1; font-size: 16px; line-height: 1.6; }
.gm-key b { font-size: 17px; }
.gm-key span { display: inline-block; white-space: nowrap; margin-right: 12px; }
.gm-toggle { grid-column: 2; grid-row: 1 / span 3; align-self: center; font-size: 16px; font-weight: 700; color: var(--gm-blue);
  border: 2px solid var(--gm-blue); border-radius: 4px; padding: 8px 10px; white-space: nowrap; }
.gm-empty { padding: 20px 4px; }
.gm-detail { padding: 4px 12px 20px; }
.gm-h { font-size: 18px; font-weight: 700; margin: 18px 0 8px; padding: 0 0 0 10px; border-left: 4px solid var(--gm-blue); line-height: 1.5; background: none; color: var(--gm-ink); }
.gm-cost { width: 100%; border-collapse: collapse; margin: 0; font-size: 18px; }
.gm-cost th, .gm-cost td { border: 1px solid var(--gm-line); padding: 10px 12px; vertical-align: middle; background: #fff; }
.gm-cost th { text-align: left; font-weight: 400; width: 60%; }
.gm-cost th small { display: block; font-size: 16px; color: #444; }
.gm-cost td { text-align: right; font-size: 22px; font-weight: 700; white-space: nowrap; }
.gm-cost .gm-sum th, .gm-cost .gm-sum td { background: var(--gm-soft); font-weight: 700; }
.gm-revise, .gm-warn { font-size: 17px; margin: 10px 0 0; padding: 10px 12px; border: 1px solid #c0392b; color: #8e2a1f; background: #fff; }
.gm-facts { margin: 0; }
.gm-facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--gm-line); }
.gm-facts dt { flex: 1 1 auto; font-size: 16px; color: #444; font-weight: 400; margin: 0; }
.gm-facts dd { flex: 0 0 auto; max-width: 55%; font-size: 18px; font-weight: 700; margin: 0; text-align: right; }
.gm-small { font-size: 16px; margin: 6px 0 10px; line-height: 1.7; }
.gm-btn { display: block; min-height: 56px; margin: 0 0 10px; padding: 14px 12px; text-align: center; font-size: 18px; font-weight: 700;
  color: #fff !important; background: var(--gm-blue); border: 2px solid var(--gm-blue); border-radius: 4px; text-decoration: none !important; }
.gm-btn-sub { color: var(--gm-blue) !important; background: #fff; }
.gm-link { display: block; min-height: 44px; margin: 14px 0 10px; font-size: 18px; color: var(--gm-blue); text-decoration: underline; }
.gm-more { margin: 12px 0 0; border: 1px solid var(--gm-line); }
.gm-more summary { min-height: 52px; padding: 12px; font-size: 17px; font-weight: 700; cursor: pointer; color: var(--gm-blue); }
.gm-more .gm-facts, .gm-more .gm-small { padding: 0 12px; }
.gm-more .gm-small a { display: inline-block; min-height: 48px; line-height: 48px; }
.gm-note { font-size: 16px; color: #444; margin: 16px 0 0; line-height: 1.7; }
/* 業者への導線: 費用表のすぐ下（パネル）と、一覧の5件目の後に1回ずつ */
.gm-cta { margin: 14px 0 4px; padding: 12px 12px 4px; background: var(--gm-soft); border: 1px solid #b9cce0; border-radius: 4px; }
.gm-cta-h { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.5; }
.gm-cta .gm-small, .gm-listcta .gm-small { margin: 4px 0 12px; }
.gm-listcta { margin: 12px 0; padding: 14px 12px 4px; background: var(--gm-soft); border: 1px solid #b9cce0; border-radius: 4px; }
.gm-unknown { color: #444; margin-top: 10px; }
.gm .maplibregl-ctrl-group button { width: 44px; height: 44px; }
.gm .maplibregl-ctrl-group button .maplibregl-ctrl-icon { background-size: 30px; }
.gm .maplibregl-cooperative-gesture-screen { font-size: 18px; }

.ria-tool[data-tool="golf-map"] { container-type: inline-size; }
/* 本文の欄が広いとき（PC・サイドバーなしのページ）だけ2列にする */
@container (min-width: 860px) {
  .gm { display: grid; grid-template-columns: 380px 1fr; grid-template-rows: auto auto 1fr; gap: 0 24px; }
  .gm-top { grid-column: 1; grid-row: 1; }
  .gm-ctrl { grid-column: 1; grid-row: 2; }
  .gm-listwrap { grid-column: 1; grid-row: 3; }
  .gm-mapwrap { grid-column: 2; grid-row: 1 / span 3; }
  .gm-stage { position: sticky; top: 16px; height: calc(100vh - 32px); max-height: 760px; }
  .gm-map, .gm-stage.has-panel .gm-map { height: 100%; max-height: none; }
  /* PC: 地図の上、右側にパネルを重ねる */
  .gm-panel { position: absolute; top: 12px; right: 12px; bottom: 12px; width: min(420px, 55%); max-height: none !important; }
  /* PC のパネルは費用表を詰めて、開いた高さの中に業者ボタンまで入れる */
  #wrapper .ria-tool .gm .gm-cost th small { display: inline !important; }
  .gm-panel-head { padding: 8px 12px; }
  .gm-detail { padding-top: 0; }
  /* 業者ボタンの枠は、パネルの下に隠れるときは下端に貼りつける（費用表のすぐ下が本来の位置） */
  .gm-cta { position: sticky; bottom: 0; z-index: 1; box-shadow: 0 -6px 12px rgba(0,0,0,.06); }
  .gm-cta .gm-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .gm-cta .gm-btn { margin-bottom: 10px; padding: 10px 6px; font-size: 16px; line-height: 1.4; }
}

/* ===== 地図ページの枠（ページに「1カラム」を設定し、プラグインが body に ria-toolpage-wide を付ける）=====
   記事用の飾りを外し、横幅を広げて地図に面積を回す。テーマの指定に勝つよう body と id を付けて書く */
body.ria-toolpage-wide #wrapper #content { max-width: 1480px; }
body.ria-toolpage-wide #wrapper main { padding: 16px 16px 40px; }
body.ria-toolpage-wide #wrapper #breadcrumb { margin-bottom: 6px; }
body.ria-toolpage-wide #wrapper #contentInner .post .entry-title { font-size: 20px; line-height: 1.5; margin: 0 0 10px; padding: 0; }
/* スマホ: ツールのタブは折り返さず横1列（横にずらして見る）。地図を最初の画面に入れるため */
body.ria-toolpage-wide #wrapper #content .entry-content .ria-tool-nav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
body.ria-toolpage-wide #wrapper #content .entry-content .ria-tool-nav a,
body.ria-toolpage-wide #wrapper #content .entry-content .ria-tool-nav span { flex: 0 0 auto; padding: 4px 14px; white-space: nowrap; }
body.ria-toolpage-wide #wrapper .entry-content > :not(.ria-tool):not(.ria-tool-nav) { max-width: 860px; }
body.ria-toolpage-wide #wrapper .ria-tool-nav { margin-bottom: 12px; }
body.ria-toolpage-wide #wrapper .ria-tool[data-tool="golf-map"] { margin: 8px 0 32px; }
/* 新着記事・著者などの記事向けの欄は出さない（このページはツールとして使う） */
body.ria-toolpage-wide #wrapper .page-widgets-bottom,
body.ria-toolpage-wide #wrapper .blogbox,
body.ria-toolpage-wide #wrapper .sns,
body.ria-toolpage-wide #wrapper .st-author-box { display: none; }
@media (min-width: 960px) {
  body.ria-toolpage-wide #wrapper main { padding: 20px 28px 48px; }
  body.ria-toolpage-wide #wrapper #contentInner .post .entry-title { font-size: 26px; }
  /* ツールのタブは横1列に並べ、地図までの距離を縮める */
  body.ria-toolpage-wide #wrapper #content .entry-content .ria-tool-nav a,
  body.ria-toolpage-wide #wrapper #content .entry-content .ria-tool-nav span { flex: 1 1 0; white-space: nowrap; }
}
@container (min-width: 1100px) {
  .gm { grid-template-columns: 400px 1fr; gap: 0 28px; }
  .gm-stage { height: calc(100vh - 32px); max-height: 900px; }
}
/* テーマの記事用の指定（.post input{margin:5px auto}・.post ol の番号と余白）を地図の中では打ち消す */
.post .ria-tool .gm .gm-check input[type="checkbox"] { margin: 0; padding: 0; }
.post .ria-tool .gm ol.gm-list { list-style: none; margin: 0; padding: 0; }
.post .ria-tool .gm ol.gm-list > li { padding: 0; font-size: inherit; line-height: inherit; }
.post .ria-tool .gm select.gm-select { margin: 0 0 18px; padding: 8px 12px; }

/* 見出しのすぐ下: 何が分かるページかを3つで見せる（本文側の <div class="gm-lead">）。テーマの .post p・ul の余白と黒丸に勝つよう id を付ける */
#wrapper .gm-lead { margin: 0 0 14px; max-width: none; }
#wrapper .post .gm-lead p { margin: 0 !important; padding: 0; }
#wrapper .post .gm-lead .gm-lead-q { font-size: 20px; font-weight: 700; line-height: 1.5; color: #222; margin-bottom: 4px !important; }
#wrapper .post .gm-lead .gm-lead-t { font-size: 16px; line-height: 1.6; color: #333; margin-bottom: 10px !important; }
#wrapper .post .gm-lead ul.gm-knows { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; list-style: none !important; margin: 0 !important; padding: 0 !important; }
#wrapper .post .gm-lead ul.gm-knows li { list-style: none !important; margin: 0 !important; padding: 8px 8px 8px 10px !important; border-left: 4px solid #0b4f8c;
  background: #f4f7fb; font-size: 16px; line-height: 1.45; color: #333; }
#wrapper .post .gm-lead ul.gm-knows li::before { content: none !important; display: none !important; }
#wrapper .post .gm-lead ul.gm-knows b { display: block; font-size: 16px; color: #222; }
@media (max-width: 600px) {
  /* スマホは問いと3つの見出し語だけにして、地図を最初の画面に入れる（説明は下の「目安の見方」） */
  #wrapper .post .gm-lead .gm-lead-t { display: none; }
  #wrapper .post .gm-lead .gm-lead-q { font-size: 18px; }
  /* パンくずは1行にまとめ、はみ出す分は「…」にする */
  body.ria-toolpage-wide #wrapper #breadcrumb ol { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.ria-toolpage-wide #wrapper #breadcrumb ol li { display: inline; }
  #wrapper .post .gm-lead ul.gm-knows { gap: 6px; }
  #wrapper .post .gm-lead ul.gm-knows li { padding: 6px 4px 6px 7px !important; display: flex; align-items: center; }
  #wrapper .post .gm-lead ul.gm-knows b { line-height: 1.35; }
  #wrapper .post .gm-lead ul.gm-knows span { display: none; }
}
@media (min-width: 960px) {
  /* PC は問いを左、わかること3つを右に1段で並べ、地図までの距離を縮める */
  #wrapper .gm-lead { display: grid; grid-template-columns: auto minmax(0, 640px); gap: 4px 28px; align-items: center; }
  #wrapper .post .gm-lead .gm-lead-q { grid-column: 1; grid-row: 1; margin: 0 !important; font-size: 22px; }
  #wrapper .post .gm-lead .gm-lead-t { grid-column: 1; grid-row: 2; margin: 0 !important; }
  #wrapper .post .gm-lead ul.gm-knows { grid-column: 2; grid-row: 1 / span 2; }
}
/* 地図ページでは右下の「上へ戻る」ボタンを出さない（パネルのボタンに重なるため） */
body.ria-toolpage-wide #page-top { display: none !important; }

/* パネルを開いた最初の高さに、費用表と業者ボタンまでを入れる。テーマの h4・p（id 付きの指定）に勝つよう id と !important で書く */
#wrapper .ria-tool .gm h4.gm-h { margin: 14px 0 6px !important; padding: 0 0 0 10px !important; border: 0 !important; border-left: 4px solid var(--gm-blue) !important;
  background: none !important; font-size: 18px !important; line-height: 1.5 !important; color: var(--gm-ink) !important; }
#wrapper .ria-tool .gm h4.gm-h::before, #wrapper .ria-tool .gm h4.gm-h::after { content: none !important; display: none !important; }
#wrapper .ria-tool .gm .gm-panel-head p { margin: 0 !important; }
#wrapper .ria-tool .gm .gm-panel-head .gm-sub { line-height: 1.5; }
#wrapper .ria-tool .gm .gm-detail p.gm-small { margin: 4px 0 10px !important; }
#wrapper .ria-tool .gm .gm-detail p.gm-cta-h, #wrapper .ria-tool .gm .gm-listcta p.gm-cta-h { margin: 0 !important; }
#wrapper .ria-tool .gm .gm-detail p.gm-revise, #wrapper .ria-tool .gm .gm-detail p.gm-warn { margin: 8px 0 0 !important; padding: 8px 10px; }
#wrapper .ria-tool .gm .gm-listcta p.gm-small { margin: 4px 0 12px !important; }
#wrapper .ria-tool .gm .gm-cost { margin: 0 !important; }
.gm .gm-cost th, .gm .gm-cost td { padding: 8px 10px; }
#wrapper .ria-tool .gm .gm-cost th, #wrapper .ria-tool .gm .gm-cost td { font-size: 18px !important; line-height: 1.5; }
#wrapper .ria-tool .gm .gm-cost td { font-size: 20px !important; }
#wrapper .ria-tool .gm .gm-cost th small { font-size: 16px !important; }
#wrapper .ria-tool .gm a:not(.gm-btn) { color: var(--gm-blue); }
#wrapper .ria-tool .gm ol.gm-list > li.gm-listcta { margin: 12px 0 !important; padding: 14px 12px 4px !important; }
