:root {
  --forest: #1f3b2c;
  --forest-2: #2c5740;
  --green: #2f8a57;
  --leaf: #7cc68a;
  --mint: #e3f3e3;
  --cream: #f7f2e6;
  --paper: #fffdf7;
  --sand: #ece4d0;
  --sand-2: #cdbf9c;
  --ink: #22312a;
  --ink-2: #5d6b62;
  --sun: #ff8a3d;
  --sun-2: #ffb347;
  --yolk: #ffd166;
  --sky: #4aa9dc;
  --snow: #a9d8f0;
  --stone: #c9cec9;
  --berry: #e4577a;
  --shrine: #a07d5c;
  --r-lg: 22px;
  --r-md: 14px;
  --shadow: 0 10px 30px rgba(31, 59, 44, .16);
  --shadow-sm: 0 3px 10px rgba(31, 59, 44, .12);
  --top: 58px;
  --font: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
  --num: "Outfit", "Zen Maru Gothic", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font); font-weight: 500; color: var(--ink); background: var(--cream);
  line-height: 1.7; -webkit-font-smoothing: antialiased; overflow: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--green); }
h1, h2, h3, h4, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 8px; }
.num { font-family: var(--num); font-weight: 700; letter-spacing: .01em; }

/* ---------- ヘッダー ---------- */
.topbar {
  height: var(--top); display: flex; align-items: center; gap: 14px; padding: 0 18px;
  background: var(--forest); color: #fff; position: relative; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; stroke: none; }
.brand-name { font-weight: 900; font-size: 21px; letter-spacing: .06em; }
.brand-tag { font-size: 13px; color: #bfe6c9; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-about { font-size: 13px; font-weight: 700; color: #fff; padding: 7px 14px; border-radius: 99px; background: rgba(255, 255, 255, .13); white-space: nowrap; }
.btn-about:hover { background: rgba(255, 255, 255, .24); }

/* ---------- レイアウト ---------- */
.app { display: grid; grid-template-columns: 400px 1fr; height: calc(100dvh - var(--top)); }
.sidebar { overflow-y: auto; background: var(--cream); border-right: 1px solid var(--sand); overscroll-behavior: contain; }
.stage { position: relative; overflow: hidden; background: #cfe3ee; }
.map-wrap { position: absolute; inset: 0; }
#map { position: absolute; inset: 0; }

/* ---------- 絞り込み ---------- */
.filters { padding: 14px 16px 10px; }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--ink-2); }
.search input {
  width: 100%; height: 44px; padding: 0 14px 0 40px; border-radius: 99px; border: 2px solid var(--sand);
  background: var(--paper); font-size: 15px;
}
.search input:focus { outline: none; border-color: var(--green); }
.filter-row { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filter-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 34px; padding: 0 13px; border-radius: 99px; font-size: 13px; font-weight: 700;
  background: var(--paper); border: 2px solid var(--sand); color: var(--ink-2); white-space: nowrap; transition: .15s;
}
/* 検索パネルのボタンのホバー: 枠を少し濃い砂色にする(色は変えない) */
.chip:not(.on):hover, .mon:not(.on):hover, .sort:hover, .search input:hover { border-color: var(--sand-2); color: var(--ink); }
.chip, .mon, .sort, .search input { transition: border-color .15s, background .15s, color .15s; }
.chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.chip { display: inline-flex; align-items: center; gap: 5px; }
.chip svg { width: 15px; height: 15px; color: var(--green); }
.chip.on svg { color: #fff; }
.lv-dots { display: inline-flex; gap: 2px; }
.lv-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--sand); }
.lv-dots.l1 i:nth-child(-n+1) { background: #4fae6a; } .lv-dots.l2 i:nth-child(-n+2) { background: #f0a51e; } .lv-dots.l3 i { background: #e4577a; }
.chip.on .lv-dots i { background: rgba(255, 255, 255, .35); }
.chip.on .lv-dots.l1 i:nth-child(-n+1), .chip.on .lv-dots.l2 i:nth-child(-n+2), .chip.on .lv-dots.l3 i { background: #fff; }
.search-row { display: flex; gap: 8px; }
.search-row .search { flex: 1; min-width: 0; }
.btn-filter { display: none; }
.fgroup { margin-top: 12px; }
.sub-wrap { margin-top: 6px; padding: 7px 9px 8px; border-radius: var(--r-md); background: color-mix(in srgb, var(--sand) 55%, transparent); }
.sub-wrap > span { font-size: 11px; font-weight: 700; color: var(--forest-2); }
.sub-wrap .filter-row { margin-top: 4px; }
.chip.sm { height: 30px; padding: 0 11px; font-size: 12px; }
.flabel { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 900; color: var(--forest-2); }
.flabel svg { width: 15px; height: 15px; color: var(--sun); }
.flabel small { font-size: 10.5px; font-weight: 500; color: var(--ink-2); margin-left: 4px; }
.fgroup .filter-row { margin-top: 5px; }
.filter-row.seg3 { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; }
.filter-row.seg3 .chip { justify-content: center; padding: 0 6px; height: 38px; }
.filter-row.wrap { flex-wrap: wrap; overflow: visible; }
.months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; margin-top: 5px; }
.mon {
  height: 34px; border-radius: 10px; background: var(--paper); border: 2px solid var(--sand); font-family: var(--num); font-weight: 800; font-size: 14px; color: var(--ink-2);
  display: grid; place-items: center; position: relative; transition: .15s;
}
.mon small { display: none; }
.mon.now::after { content: ""; position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--sun); }
.mon.on { background: var(--green); border-color: var(--green); color: #fff; }
.filter-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--ink-2); min-height: 32px; }
.filter-foot #count { font-weight: 700; }
.filter-foot b { font-family: var(--num); font-size: 20px; color: var(--ink); }
.filter-foot small { margin-left: 3px; font-size: 12px; }
.link-btn { font-size: 12.5px; font-weight: 700; color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.link-btn[hidden] { display: none; }
.sort { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; background: var(--paper); border: 2px solid var(--sand); border-radius: 99px; padding: 0 6px 0 10px; height: 32px; }
.sort svg { width: 14px; height: 14px; color: var(--green); }
.sort select { border: 0; background: none; font-size: 12.5px; font-weight: 700; height: 28px; outline: none; }

/* ---------- カード ---------- */
.cards { display: grid; gap: 14px; padding: 4px 16px 16px; }
.card {
  display: block; width: 100%; text-align: left; background: var(--paper); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s; position: relative; border: 3px solid transparent;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card.on { border-color: var(--sun); }
.card-img { position: relative; aspect-ratio: 16 / 9; background: var(--forest-2); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.card:hover .card-img img { transform: scale(1.05); }
.card-img::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(20, 38, 28, .78)); }
.card-title { position: absolute; left: 14px; right: 14px; bottom: 9px; z-index: 1; color: #fff; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.card-title h3 { font-size: 22px; font-weight: 900; line-height: 1.2; text-shadow: 0 1px 6px rgba(0, 0, 0, .4); }
.card-title small { display: block; font-size: 11px; font-weight: 500; opacity: .9; }
.card-ele { font-family: var(--num); font-weight: 800; font-size: 20px; white-space: nowrap; text-shadow: 0 1px 6px rgba(0, 0, 0, .4); }
.card-ele small { display: inline; font-size: 12px; margin-left: 1px; }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 900; }
.badge.lv-初級 { background: #dff3d8; color: #24693f; }
.badge.lv-中級 { background: #ffe9b8; color: #8a5a00; }
.badge.lv-上級 { background: #ffd7d7; color: #a3293e; }
.card-badge { position: absolute; top: 10px; left: 10px; z-index: 1; box-shadow: var(--shadow-sm); }
.card-season { position: absolute; top: 10px; right: 10px; z-index: 1; background: rgba(255, 253, 247, .94); box-shadow: var(--shadow-sm); }
.card-season.s-b { color: #c25410; } .card-season.s-o { color: #24693f; } .card-season.s-s { color: #1f6f99; } .card-season.s-w { color: #6a726d; }
.card-body { padding: 11px 14px 13px; }
.card-catch { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 12.5px; color: var(--ink-2); }
.card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.card-meta svg { width: 14px; height: 14px; color: var(--green); }
.card-meta b { color: var(--ink); font-family: var(--num); font-size: 14px; }
.card-meta b i { font-style: normal; font-size: .82em; font-weight: 700; color: var(--ink-2); margin-left: 1px; }
.empty { padding: 36px 16px; text-align: center; color: var(--ink-2); font-size: 14px; }
.empty b { display: block; font-size: 16px; color: var(--ink); margin-bottom: 4px; }
.side-foot { padding: 4px 18px 90px; font-size: 11.5px; color: var(--ink-2); line-height: 1.6; }

/* ---------- 地図まわり ---------- */
.map-tools { position: absolute; top: 14px; left: 14px; z-index: 4; display: flex; flex-wrap: wrap; gap: 8px; max-width: calc(100% - 28px); }
.seg { display: flex; background: var(--paper); border-radius: 99px; padding: 3px; box-shadow: var(--shadow-sm); }
.seg button { height: 34px; padding: 0 14px; border-radius: 99px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.seg button.on { background: var(--forest); color: #fff; }
.tool {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 99px;
  background: var(--paper); box-shadow: var(--shadow-sm); font-size: 13px; font-weight: 700; color: var(--ink);
}
.tool svg { width: 17px; height: 17px; color: var(--green); }
.tool:hover { background: #fff; transform: translateY(-1px); }
.tool.on { background: var(--sun); color: #fff; }
.tool.on svg { color: #fff; }
.tool[hidden] { display: none; }
/* 2D/3D: 文字だけの小さなボタン。パソコンでは +/− と同じ枠の先頭に入る */
#btn3d .dim { font-family: var(--num); font-size: 11.5px; font-weight: 800; color: var(--forest); letter-spacing: .02em; }
.maplibregl-ctrl-group #btn3d { display: grid; place-items: center; width: 29px; height: 29px; padding: 0; border-radius: 0; box-shadow: none; background: transparent; transform: none; }
.maplibregl-ctrl-group #btn3d:hover { background: var(--sand); }
.maplibregl-ctrl-top-left .maplibregl-ctrl { margin-top: 8px; }
.maplibregl-ctrl-top-left .maplibregl-ctrl:first-child { margin-top: 10px; }
#dimGroup:empty { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.map-legend {
  position: absolute; left: 14px; bottom: 34px; z-index: 4; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center;
  background: rgba(255, 253, 247, .94); border-radius: 14px; padding: 7px 13px; font-size: 12px; font-weight: 700; box-shadow: var(--shadow-sm);
}
.map-legend[hidden] { display: none; }
.map-legend label, .map-legend span { display: inline-flex; align-items: center; gap: 6px; cursor: default; }
.map-legend label { cursor: pointer; }
.map-legend input { accent-color: var(--sky); width: 15px; height: 15px; margin: 0; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.dot-sight { background: #3a9bd1; }
.dot-fac { background: #e07b22; } .dot-rel { background: var(--green); }
.ln { width: 22px; height: 4px; border-radius: 2px; display: inline-block; }
.ln-up { background: var(--sun); }
.ln-down { background: repeating-linear-gradient(90deg, #ffe08a 0 6px, transparent 6px 10px); }
.map-hint {
  position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 3; pointer-events: none;
  background: rgba(31, 59, 44, .78); color: #fff; font-size: 12px; padding: 5px 14px; border-radius: 99px; white-space: nowrap; transition: opacity .6s;
}
.map-hint.hide { opacity: 0; }
.map-loading {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6; display: flex; align-items: center; gap: 10px;
  background: var(--paper); padding: 10px 18px; border-radius: 99px; font-size: 13px; font-weight: 700; box-shadow: var(--shadow); transition: opacity .3s;
}
.map-loading.hide { opacity: 0; pointer-events: none; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--mint); border-top-color: var(--green); animation: spin .8s linear infinite; }
.fab-back, .fab-map { display: none; }

.welcome {
  position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 3; text-align: center; pointer-events: none;
  background: rgba(255, 253, 247, .95); padding: 14px 26px; border-radius: var(--r-lg); box-shadow: var(--shadow); width: max-content; max-width: calc(100% - 32px);
}
.welcome h2 { font-size: 18px; font-weight: 900; color: var(--forest); }
.welcome p { font-size: 13px; color: var(--ink-2); }
.welcome[hidden] { display: none; }

/* 地図上のピン */
.pin { cursor: pointer; display: flex; flex-direction: column; align-items: center; transform-origin: bottom center; }
.pin-label {
  background: var(--paper); color: var(--forest); font-family: var(--font); font-weight: 900; font-size: 13px; padding: 4px 11px; border-radius: 99px;
  box-shadow: var(--shadow-sm); white-space: nowrap; border: 2px solid var(--forest); transition: .15s;
}
.pin-label small { font-family: var(--num); font-weight: 700; font-size: 11px; color: var(--ink-2); margin-left: 4px; }
.pin-stem { width: 3px; height: 12px; background: var(--forest); }
.pin-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--sun); border: 2px solid #fff; margin-top: -2px; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.pin:hover .pin-label, .pin.hover .pin-label { background: var(--sun); border-color: var(--sun); color: #fff; transform: scale(1.08); }
.pin:hover .pin-label small, .pin.hover .pin-label small { color: #fff; }
.pin.out { display: none !important; }
/* 方位磁針: 赤い針が北。パソコンは地図ライブラリの方位磁針(+/−と同じ大きさ)の絵柄を差し替えて使い、スマホは自前のボタンを右下に置く */
.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 29 29'%3E%3Cpath fill='%23e0486c' d='M14.5 4.5 18 14.5h-7z'/%3E%3Cpath fill='%23c9cec9' d='M14.5 24.5 11 14.5h7z'/%3E%3C/svg%3E"); }
.compass { display: none; place-items: center; position: absolute; z-index: 4; border-radius: 50%; background: var(--paper); box-shadow: var(--shadow-sm); }
.compass svg { stroke: none; transition: transform .1s linear; }
.compass .n { fill: #e0486c; } .compass .s { fill: var(--stone); }
.compass span { display: none; }
.map-filter {
  position: absolute; top: 64px; left: 14px; z-index: 4; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 5px 0 13px; border-radius: 99px;
  background: var(--green); color: #fff; font-size: 12.5px; font-weight: 900; box-shadow: var(--shadow-sm);
}
.map-filter button { height: 24px; padding: 0 11px; border-radius: 99px; background: #fff; color: var(--forest); font-size: 12px; font-weight: 900; }
body.has-detail .map-filter { display: none; } /* 山の詳細を見ている間は、その山のコースだけを見せる */
.pin.compact .pin-label { display: none; position: absolute; bottom: 20px; }
.pin.compact .pin-stem { display: none; }
.pin.compact .pin-dot { margin: 0; }
.pin.compact:hover .pin-label, .pin.compact.hover .pin-label { display: block; }
.pin { z-index: 2; }
.pin.compact { z-index: 1; }
.pin:hover, .pin.hover { z-index: 5; }
.maplibregl-ctrl-top-left { top: 106px; left: 4px; }
body.has-detail .map-tools { max-width: calc(100% - 510px); }
body.has-detail.detail-min .map-tools { max-width: calc(100% - 60px); }

/* 一覧・詳細を横にたたむ「つまみ」 */
.app { transition: grid-template-columns .3s ease; }
body.side-min .app { grid-template-columns: 0 1fr; }
body.side-min .sidebar { visibility: hidden; border: 0; }
.edge-tab {
  position: absolute; top: 50%; z-index: 9; width: 24px; height: 64px; margin-top: -32px; background: var(--paper); color: var(--forest);
  display: grid; place-items: center; box-shadow: var(--shadow-sm); transition: right .35s cubic-bezier(.2, .8, .2, 1), background .15s;
}
.edge-tab:hover { background: var(--sun); color: #fff; }
.edge-tab svg { width: 16px; height: 16px; stroke-width: 3; transition: transform .3s; }
.edge-tab.left { left: 0; border-radius: 0 12px 12px 0; }
.edge-tab.right { right: calc(var(--dw, 460px) + 14px); border-radius: 12px 0 0 12px; display: none; }
body.has-detail .edge-tab.right { display: grid; }
body.side-min .edge-tab.left svg, body.detail-min .edge-tab.right svg { transform: rotate(180deg); }
body.detail-min .edge-tab.right { right: 0; }
.detail { transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
body.detail-min .detail { transform: translateX(calc(100% + 20px)); }
body.has-detail .map-hint { left: 14px; bottom: 78px; transform: none; }

.probe-mk { width: 16px; height: 16px; border-radius: 50%; background: var(--forest); border: 3px solid #fff; box-shadow: 0 0 0 3px rgba(255, 138, 61, .6); }
.maplibregl-popup-content { font-family: var(--font); border-radius: 14px; padding: 10px 14px; font-size: 13px; box-shadow: var(--shadow); max-width: 240px; }
.maplibregl-popup-content b { display: block; font-size: 14px; color: var(--forest); }
.maplibregl-popup-content small { color: var(--ink-2); }
.maplibregl-ctrl-attrib { font-family: var(--font); font-size: 10.5px; }
.maplibregl-ctrl-group { border-radius: 14px !important; overflow: hidden; box-shadow: var(--shadow-sm) !important; }

/* ---------- 詳細パネル ---------- */
.detail {
  position: absolute; top: 14px; right: 14px; bottom: 14px; width: 460px; z-index: 8; background: var(--paper);
  border-radius: var(--r-lg); box-shadow: var(--shadow); overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth;
  animation: slideIn .35s cubic-bezier(.2, .8, .2, 1);
}
.detail[hidden] { display: none; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } }
.hero { position: relative; height: 210px; background: var(--forest-2); }
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero::after { content: ""; position: absolute; inset: 30% 0 0; background: linear-gradient(transparent, rgba(20, 38, 28, .85)); }
.hero-txt { position: absolute; left: 20px; right: 20px; bottom: 14px; z-index: 1; color: #fff; }
.hero-txt .kana { font-size: 12px; letter-spacing: .12em; opacity: .9; }
.hero-txt h2 { font-size: 30px; font-weight: 900; line-height: 1.2; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.hero-txt h2 .num { font-size: 22px; font-weight: 800; }
.hero-txt h2 .num small { font-size: 13px; }
.hero-txt .where { font-size: 12.5px; opacity: .92; }
.hero-close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 253, 247, .95);
  display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.hero-close svg { width: 18px; height: 18px; }
.hero-credit { position: absolute; top: 14px; left: 14px; z-index: 2; font-size: 10px; color: #fff; background: rgba(0, 0, 0, .38); padding: 1px 8px; border-radius: 99px; }
.hero-credit a { color: #fff; }

.tabs {
  position: sticky; top: 0; z-index: 4; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 9px 14px;
  background: rgba(255, 253, 247, .96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--sand);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; height: 32px; padding: 0 13px; border-radius: 99px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
/* タブはクリーム色の地の上にあるので、ホバーは同じ系統の少し濃い色(砂色)にする */
.tabs button { transition: background .15s, color .15s; }
.tabs button:not(.on):hover { background: var(--sand); color: var(--forest); }
.tabs button.on { background: var(--forest); color: #fff; }

.sec { padding: 20px 20px 4px; scroll-margin-top: 52px; }
.sec:last-child { padding-bottom: 28px; }
.sec h3 { font-size: 17px; font-weight: 900; color: var(--forest); display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.h-ico { width: 30px; height: 30px; border-radius: 10px; background: var(--sun); color: #fff; display: grid; place-items: center; flex: none; }
.h-ico svg { width: 18px; height: 18px; }
.sec h4 { font-size: 13.5px; font-weight: 900; color: var(--forest-2); margin: 16px 0 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sec h4 > svg { width: 16px; height: 16px; color: var(--sun); flex: none; }
.sec h4 small { font-size: 11.5px; font-weight: 500; color: var(--ink-2); }
.hero-txt .where { display: flex; align-items: center; gap: 4px; }
.hero-txt .where svg { width: 13px; height: 13px; }
.sheet-grip { display: none; }

/* コースの切り替え */
.courses { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 4px; }
.courses::-webkit-scrollbar { display: none; }
.course-chip {
  flex: 1 0 auto; min-width: 120px; max-width: 220px; text-align: left; padding: 8px 12px 7px; border-radius: var(--r-md); background: #fff; border: 2px solid var(--sand); transition: .15s;
}
.course-chip b { display: block; font-size: 13.5px; font-weight: 900; line-height: 1.35; }
.course-chip small { font-size: 11px; color: var(--ink-2); font-weight: 700; }
.course-chip.on { background: var(--forest); border-color: var(--forest); color: #fff; }
.course-chip.on small { color: #bfe6c9; }
#coursePick2 { margin-bottom: 10px; }
.updown { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 6px; font-size: 13px; }
.updown span { display: inline-flex; align-items: center; gap: 5px; background: #fff3e2; color: #a34a0b; border-radius: 99px; padding: 3px 12px 3px 9px; font-weight: 700; }
.updown span.dn { background: var(--mint); color: #24693f; }
.updown span.dn svg { transform: scaleY(-1); }
.updown svg { width: 16px; height: 16px; }
.updown b { font-weight: 900; }
.updown small { font-size: 11.5px; color: var(--ink-2); }
.note.th { display: flex; gap: 6px; align-items: flex-start; }
.note.th svg { width: 15px; height: 15px; color: var(--sun); flex: none; margin-top: 3px; }
.note.th b { color: var(--forest-2); margin-right: 4px; }
.catch { font-size: 18px; font-weight: 900; color: var(--forest); line-height: 1.5; }
.desc { font-size: 14px; margin-top: 8px; }
.note { font-size: 12.5px; color: var(--ink-2); margin-top: 8px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stat { background: var(--mint); border-radius: var(--r-md); padding: 10px 8px 9px; text-align: center; }
.stat small { display: block; font-size: 11px; font-weight: 700; color: var(--forest-2); }
.stat > svg { width: 20px; height: 20px; color: var(--green); display: block; margin: 0 auto 1px; }
.stat.wide > svg { margin: 0 8px 0 0; color: #d9731c; }
.stat.wide small { flex: 1; }
.stat b { font-family: var(--num); font-size: 21px; font-weight: 800; color: var(--forest); line-height: 1.25; display: block; }
.stat b i { font-style: normal; font-size: 12px; font-family: var(--font); font-weight: 700; margin-left: 1px; }
.stat.wide { grid-column: span 3; display: flex; align-items: center; justify-content: space-between; text-align: left; padding: 10px 14px; background: #fff3e2; }
.stat.wide b { font-family: var(--font); font-size: 16px; font-weight: 900; color: #a34a0b; }
.stat.wide small { color: #a34a0b; }

.levels { display: grid; gap: 6px; margin-top: 12px; }
.level { display: grid; grid-template-columns: 52px auto 1fr; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; }
.pips { display: flex; gap: 4px; }
.pips i { width: 22px; height: 10px; border-radius: 5px; background: var(--sand); }
.pips i.f { background: var(--sun); }
/* ゲージの色は段階で変える: やさしい=緑、ふつう=黄、きつい=オレンジ、とてもきつい=ピンク(難易度ラベルと同じ色の並び) */
.pips.l1 i.f, .pips.l2 i.f { background: var(--green); }
.pips.l3 i.f { background: var(--yolk); }
.pips.l4 i.f { background: var(--sun); }
.pips.l5 i.f { background: var(--berry); }
.level span { font-size: 12px; color: var(--ink-2); font-weight: 500; }

/* 季節 */
.season { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; margin-top: 4px; }
.season div { text-align: center; }
.season i { display: block; height: 30px; border-radius: 7px; position: relative; }
.season .s-b i { background: var(--sun); } .season .s-o i { background: var(--leaf); }
.season .s-s i { background: var(--snow); } .season .s-w i { background: var(--stone); }
.season small { font-family: var(--num); font-size: 12px; font-weight: 700; color: var(--ink-2); display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin: 3px auto 0; border-radius: 50%; line-height: 1; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.season .now small { background: var(--sun); color: #fff; font-weight: 800; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 11.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; }
.now-box { margin-top: 10px; padding: 9px 13px; border-radius: var(--r-md); font-size: 13px; font-weight: 700; }
.now-box.s-b { background: #fff0e0; color: #a34a0b; } .now-box.s-o { background: var(--mint); color: #24693f; }
.now-box.s-s { background: #e2f2fa; color: #1f6f99; } .now-box.s-w { background: #eceeec; color: #555d58; }
.bullets li { position: relative; padding-left: 18px; font-size: 13.5px; margin-top: 5px; }
.bullets li::before { content: ""; position: absolute; left: 3px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--leaf); }
.bullets.warn li::before { background: var(--sun); }

/* 標高グラフ */
.profile { position: relative; margin-top: 10px; background: linear-gradient(#eef7fb, #fffdf7); border-radius: var(--r-md); padding: 8px 6px 2px; touch-action: pan-y; }
.profile svg { display: block; width: 100%; height: 130px; stroke: none; overflow: visible; }
.pf-plot { position: relative; }
.pf-dot { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: #fff; border: 2.5px solid #ff7a2a; pointer-events: none; }
.pf-dot { pointer-events: auto; cursor: pointer; transition: transform .15s; }
.pf-dot::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; } /* 押しやすいように当たり判定を広げる */
.pf-dot:hover { transform: scale(1.35); }
.pf-dot.on, .pf-dot.peak.on { background: var(--forest); border-color: #fff; box-shadow: 0 0 0 2px var(--forest); transform: scale(1.45); z-index: 2; }
.pf-dot.peak { background: #ff7a2a; border-color: #fff; box-shadow: 0 0 0 1.5px #ff7a2a; }
.pf-y { position: absolute; left: 10px; font-family: var(--num); font-size: 10px; font-weight: 700; color: var(--ink-2); z-index: 1; pointer-events: none; }
.pf-y.hi { top: 6px; } .pf-y.lo { bottom: 4px; }
.gain { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.gain > div { border-radius: var(--r-md); padding: 8px 6px 7px; text-align: center; background: #fff3e2; color: #a34a0b; }
.gain > .dn { background: var(--mint); color: #24693f; } .gain > .top { background: #eef7fb; color: #1f6f99; }
.gain svg { width: 18px; height: 18px; display: block; margin: 0 auto 1px; }
.gain .dn svg { transform: scaleY(-1); }
.gain small { display: block; font-size: 10.5px; font-weight: 700; line-height: 1.4; }
.gain b { font-family: var(--num); font-size: 19px; font-weight: 800; line-height: 1.25; }
.gain b i { font-style: normal; font-size: 11px; font-family: var(--font); margin-left: 1px; }
.profile .tip {
  position: absolute; top: 6px; left: 0; background: var(--forest); color: #fff; font-family: var(--num); font-size: 12px; font-weight: 700;
  padding: 2px 9px; border-radius: 99px; pointer-events: none; white-space: nowrap; transform: translateX(-50%); opacity: 0;
}
.profile-axis { display: flex; justify-content: space-between; font-family: var(--num); font-size: 11px; color: var(--ink-2); padding: 0 4px 4px; }

/* チェックポイント */
.cps { margin-top: 12px; position: relative; }
.cp { display: grid; grid-template-columns: 34px 1fr; gap: 10px; width: 100%; text-align: left; padding: 0 0 14px; position: relative; }
.cp::before { content: ""; position: absolute; left: 16px; top: 30px; bottom: -2px; width: 3px; background: repeating-linear-gradient(var(--leaf) 0 6px, transparent 6px 10px); }
.cp:last-child::before { display: none; }
.cp-n {
  width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 3px solid var(--sun); display: grid; place-items: center;
  font-family: var(--num); font-weight: 800; font-size: 14px; color: var(--forest); position: relative; z-index: 1; transition: .15s;
}
.cp.peak .cp-n { background: var(--sun); color: #fff; }
.cp:hover .cp-n, .cp.on .cp-n { background: var(--forest); border-color: var(--forest); color: #fff; transform: scale(1.1); }
.cp-main { display: block; padding-top: 3px; min-width: 0; }
.cp-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; }
.cp-name { font-size: 15px; font-weight: 900; }
.cp-kind { font-size: 11px; font-weight: 700; padding: 0 8px; border-radius: 99px; background: var(--mint); color: var(--forest-2); line-height: 19px; }
.cp-kind.k-hut { background: #ffe9cf; color: #a34a0b; } .cp-kind.k-peak { background: #ffdede; color: #a3293e; }
.cp-kind.k-camp { background: #e0f0ff; color: #1f5f99; }
.cp-kind { display: inline-flex; align-items: center; gap: 3px; padding-left: 6px; }
.cp-kind svg { width: 12px; height: 12px; }
.cp-data b { white-space: nowrap; display: inline-block; }
.cp-data b svg { width: 12px; height: 12px; vertical-align: -1.5px; margin-right: 2px; }
.cp-data { font-family: var(--num); font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.cp-data b { color: var(--sun); font-weight: 800; font-family: var(--font); font-size: 12.5px; }
.cp-data { display: block; }
.cp-note { display: block; font-size: 13px; color: var(--ink); margin-top: 2px; line-height: 1.6; }

/* 山小屋・アクセスなど */
.items { display: grid; gap: 8px; }
.item { background: #fff; border: 2px solid var(--sand); border-radius: var(--r-md); padding: 9px 13px; }
.item b { font-size: 14px; font-weight: 900; display: block; }
.item p { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
button.item { text-align: left; width: 100%; transition: .15s; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; }
button.item:hover { border-color: var(--sky); transform: translateX(2px); }
button.item p { grid-column: 1; }
button.item .tag { grid-row: 1 / span 2; grid-column: 2; font-size: 11px; font-weight: 700; padding: 1px 10px; border-radius: 99px; background: #e0f2fb; color: #1f6f99; }
button.item .tag.onsen { background: #fde3ea; color: #b02c50; }
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 8px 12px; font-size: 13.5px; }
.kv dt { font-weight: 900; color: var(--forest-2); font-size: 12.5px; padding-top: 1px; }
.kv dd { margin: 0; }
dl { margin: 0; }
.kv dt { display: flex; align-items: flex-start; gap: 5px; }
.kv dt svg { width: 15px; height: 15px; color: var(--green); flex: none; margin-top: 3px; }
.item.ico { display: grid; grid-template-columns: 30px 1fr; gap: 0 10px; align-items: start; }
.item.ico > svg, .item.ico .s-ico { grid-row: 1 / span 2; width: 30px; height: 30px; border-radius: 10px; background: #fff3e2; color: #d9731c; padding: 6px; display: block; }
.item.ico .s-ico { padding: 0; display: grid; place-items: center; background: #e0f2fb; color: #1f6f99; }
.item.ico .s-ico.onsen { background: #fde3ea; color: #b02c50; }
.item.ico .s-ico svg { width: 18px; height: 18px; }
button.item.ico { grid-template-columns: 30px 1fr auto; }
button.item.ico b, button.item.ico p { grid-column: 2; }
button.item.ico .tag { grid-column: 3; }
.stay-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.stay-row > div { background: var(--mint); border-radius: var(--r-md); padding: 9px 12px; }
.stay-row > div.ng { background: #eceeec; }
.stay-row svg { width: 20px; height: 20px; color: var(--green); float: left; margin: 1px 7px 0 0; }
.stay-row .ng svg { color: #7c857f; }
.stay-row small { display: block; font-size: 11px; font-weight: 700; color: var(--forest-2); line-height: 1.4; }
.stay-row b { display: block; font-size: 13px; font-weight: 900; line-height: 1.45; clear: both; padding-top: 2px; }

/* 天気 */
.wx-now { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 13px; }
.wx-now .big { font-size: 34px; line-height: 1; }
.wx-now b { font-family: var(--num); font-size: 26px; font-weight: 800; color: var(--forest); }
.wx-now svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 3px; color: var(--sky); }
.wx7 { display: grid; gap: 4px; }
.wx-row { display: grid; grid-template-columns: 42px 30px minmax(0, 1fr) 40px 62px 46px 36px; align-items: center; gap: 6px; background: #eef7fb; border-radius: 12px; padding: 5px 10px; font-size: 12.5px; }
.wx-row.today { background: var(--forest); color: #fff; }
.wx-row .d b { display: block; font-size: 13px; font-weight: 900; line-height: 1.2; }
.wx-row .d small { font-family: var(--num); font-size: 11px; opacity: .75; }
.wx-row .d.sat b { color: #2f7fc0; } .wx-row .d.sun b { color: #d8496b; }
.wx-row.today .d b { color: #fff; }
.wx-row .ico { font-size: 22px; line-height: 1; text-align: center; }
.wx-row .nm { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wx-row .bar { height: 6px; border-radius: 3px; background: rgba(31, 59, 44, .1); position: relative; }
.wx-row.today .bar { background: rgba(255, 255, 255, .2); }
.wx-row .bar i { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, var(--sky), var(--sun)); min-width: 6px; }
.wx-row .t { font-family: var(--num); font-size: 13px; text-align: right; white-space: nowrap; opacity: .9; }
.wx-row .t b { font-size: 15px; font-weight: 800; }
.wx-row .p, .wx-row .w { font-family: var(--num); font-size: 12px; font-weight: 700; white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; }
.wx-row svg { width: 12px; height: 12px; color: var(--sky); flex: none; }
.wx-row.today svg { color: #bfe6c9; }
.wx-row .w.strong { color: #d8496b; } .wx-row .w.strong svg { color: #d8496b; }
.wx-key { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 11px; color: var(--ink-2); margin-top: 6px; }
.wx-key span { display: inline-flex; align-items: center; gap: 3px; }
.wx-key svg { width: 12px; height: 12px; color: var(--sky); }
.skeleton { height: 300px; border-radius: var(--r-md); background: linear-gradient(90deg, #eef2ea 25%, #f8faf5 50%, #eef2ea 75%); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links a {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 99px; background: var(--forest); color: #fff;
  font-size: 13px; font-weight: 700; text-decoration: none;
}
.links a:hover { background: var(--green); }
.links a svg { width: 14px; height: 14px; }
.disclaimer { font-size: 11.5px; color: var(--ink-2); background: #f3eedf; border-radius: var(--r-md); padding: 10px 13px; margin-top: 14px; line-height: 1.6; }

/* ---------- ダイアログ ---------- */
.about { border: 0; border-radius: var(--r-lg); padding: 26px; max-width: 540px; width: calc(100% - 32px); box-shadow: var(--shadow); background: var(--paper); color: var(--ink); }
.about::backdrop { background: rgba(20, 38, 28, .55); }
.about h2 { font-size: 20px; font-weight: 900; color: var(--forest); margin-bottom: 8px; }
.about h3 { font-size: 14px; font-weight: 900; margin: 14px 0 4px; color: var(--forest-2); }
.about p, .about li { font-size: 13.5px; }
.about p + p { margin-top: 6px; }
.about { max-height: calc(100dvh - 32px); overflow-y: auto; }
.about li + li { margin-top: 3px; }
.noscript { margin: 0; padding: 14px 18px; background: #fff3e2; color: #a34a0b; font-size: 14px; font-weight: 700; }
.about ul { list-style: disc; padding-left: 20px; }
.btn-primary { margin-top: 18px; height: 44px; padding: 0 28px; border-radius: 99px; background: var(--sun); color: #fff; font-weight: 900; font-size: 15px; }

/* ============================================================
   色と箱の統一(テーマは一覧パネルと同じ: 白い面 + 砂色の太めの枠 + 深緑とオレンジ)
   ここでは :root で定義した色だけを使う
   ============================================================ */
/* --- 詳細: 一覧と同じクリームの地に、セクションごとの白いカードを載せる --- */
.detail { background: var(--cream); }
.tabs { background: rgba(247, 242, 230, .96); }
.sec { margin: 12px 12px 0; padding: 18px 16px; background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.sec:last-child { margin-bottom: 14px; padding-bottom: 20px; }

/* --- 「選択中」「今日」の強調: 濃い緑のベタではなく、薄緑の地 + 緑の枠で示す --- */
.course-chip.on { background: var(--mint); border-color: var(--green); color: var(--forest); }
.course-chip.on small { color: var(--forest-2); }
/* コースの選択は「丸を押してえらぶ」見た目にする。選んでいない方は空の丸+浮いたボタン、選んだ方は緑の丸にチェック */
.course-chip { position: relative; padding-left: 40px; box-shadow: 0 2px 0 var(--sand); cursor: pointer; }
.course-chip::before { content: ""; position: absolute; left: 12px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; border: 2px solid var(--stone); background: #fff; box-sizing: border-box; transition: .15s; }
.course-chip:not(.on):hover { border-color: var(--sand-2); transform: translateY(-1px); }
.course-chip:not(.on):hover::before { border-color: var(--sand-2); }
.course-chip.on { box-shadow: none; cursor: default; transform: none; }
.course-chip.on::before { background: var(--green); border-color: var(--green); }
.course-chip.on::after { content: ""; position: absolute; left: 19px; top: 50%; width: 5px; height: 9px; margin-top: -6px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.wx-row { border: 2px solid transparent; }
/* 「今日」は行を塗らず、オレンジの印で示す(登れる時期の「今月」の丸と同じ考え方) */
.wx-row.today { background: #eef7fb; border-color: transparent; color: var(--ink); }
.wx-row.today .d b { display: inline-block; background: var(--sun); color: #fff; border-radius: 99px; padding: 2px 7px; font-size: 11.5px; line-height: 1.3; margin-left: -4px; }
.wx-row.today .bar { background: rgba(31, 59, 44, .1); }
.wx-row.today svg { color: var(--sky); }

/* --- 数値の箱を1種類に: おすすめ日程・歩行時間・距離・累積標高・獲得標高・日程・テント泊 --- */
.stat, .gain > div, .stay-row > div {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 3px 6px; text-align: left;
  background: #fff; border: 2px solid var(--sand); border-radius: var(--r-md); padding: 9px 11px 8px; color: var(--ink);
}
.stat > svg, .gain svg, .stay-row svg { width: 16px; height: 16px; margin: 0; float: none; display: block; color: var(--green); }
.stat small, .gain small, .stay-row small { font-size: 10.5px; font-weight: 700; color: var(--ink-2); line-height: 1.3; display: block; }
.stat b, .gain b, .stay-row b { grid-column: 1 / -1; font-family: var(--num); font-size: 21px; font-weight: 800; color: var(--forest); line-height: 1.2; padding: 0; clear: none; }
.stat b i, .gain b i { font-size: 11.5px; font-family: var(--font); font-weight: 700; color: var(--ink-2); margin-left: 2px; }
.stat.wide { grid-column: span 3; grid-template-columns: auto 1fr auto; background: #fff; padding: 10px 13px; }
.stat.wide > svg { margin: 0; color: var(--sun); width: 18px; height: 18px; }
.stat.wide small { color: var(--ink-2); font-size: 12px; }
.stat.wide b { grid-column: 3; font-family: var(--font); font-size: 16px; font-weight: 900; color: var(--forest); }
.gain > .dn, .gain > .top { background: #fff; color: var(--ink); }
.gain .up svg { color: var(--sun); } .gain .dn svg { color: var(--green); } .gain .top svg { color: var(--sky); }
.stay-row b { font-family: var(--font); font-size: 13.5px; font-weight: 900; line-height: 1.5; color: var(--ink); }
.stay-row > div.ng { background: #fff; }
.stay-row .ng svg { color: var(--stone); }

/* --- 登り・下りの時間: ほかの数値と同じ箱(白地+砂色の枠)を左右に分けて表示 --- */
.updown { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 10px; background: #fff; border: 2px solid var(--sand); border-radius: var(--r-md); }
.updown span, .updown span.dn {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 6px; background: none; border-radius: 0;
  padding: 9px 12px 8px; color: var(--ink-2); font-size: 10.5px; font-weight: 700;
}
.updown span.dn { border-left: 2px solid var(--sand); }
.updown span svg { width: 16px; height: 16px; color: var(--sun); }
.updown span.dn svg { color: var(--green); }
.updown b { grid-column: 1 / -1; font-size: 17px; font-weight: 900; color: var(--forest); line-height: 1.3; }
.updown-note { font-size: 11.5px; color: var(--ink-2); margin: 4px 2px 0; }

/* --- コース欄の並び --- */
.course-name { font-size: 15.5px; font-weight: 900; color: var(--forest); line-height: 1.5; margin-top: 12px; }
.sec h4.h-course { margin-top: 0; }
.updown { margin-top: 12px; }
/* 一覧で選んでいる山のカードも、選択中の色(緑)にそろえる */
.card.on { border-color: var(--green); }

.courses.single .course-chip { max-width: none; flex: 1 1 auto; }
.courses + .stats { margin-top: 12px; }
/* コース欄の数値: 同じ大きさの箱を3列で上から順に積む */
.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat, .stat.wide { display: grid; grid-column: auto; grid-template-columns: auto 1fr; padding: 8px 10px 7px; min-width: 0; }
.stat small { font-size: 10px; line-height: 1.3; }
.stat b { font-size: 19px; white-space: nowrap; }
.stat b i { font-size: 10.5px; margin-left: 1px; }
.stat.txt b { font-family: var(--font); font-size: 14px; font-weight: 900; line-height: 1.4; white-space: normal; padding-top: 2px; }
.stat.up > svg { color: var(--sun); } .stat.dn > svg { color: var(--green); transform: scaleY(-1); } .stat.top > svg { color: var(--sky); }
.stat.tent.ng b { color: var(--ink-2); }
.stat.tent.ng > svg { color: var(--stone); }
.updown-note { margin-top: 6px; }
.courses + .levels { margin-top: 14px; }
.levels + .desc { margin-top: 12px; }
.desc + .stats, .note.th + .stats { margin-top: 14px; }
/* ---- コース欄の数値: 主役3つを大きな箱に、内訳はその下に1〜2行で ---- */
.ar { display: inline-flex; } .ar svg, .sum-c p span > svg { width: 13px; height: 13px; color: var(--green); flex: none; }
.ar.u svg { color: var(--sun); } .ar.d svg { color: var(--green); transform: scaleY(-1); }
.sum-c b i { font-style: normal; font-size: .55em; font-family: var(--font); font-weight: 700; color: var(--ink-2); margin-left: 1px; }
.sum-c { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sum-c .big { background: #fff; border: 2px solid var(--sand); border-radius: var(--r-md); padding: 10px 10px 9px; display: grid; gap: 2px; align-content: start; min-width: 0; }
.sum-c .big small { display: flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; color: var(--ink-2); }
.sum-c .big small svg { width: 14px; height: 14px; color: var(--green); }
.sum-c .big b { font-family: var(--num); font-size: 22px; font-weight: 800; color: var(--forest); line-height: 1.25; }
.sum-c .big b.tx { font-family: var(--font); font-size: 14.5px; font-weight: 900; line-height: 1.4; }
.desc + .sum-c, .note.th + .sum-c { margin-top: 14px; }
.sum-c .big small { white-space: nowrap; }
.sum-c .big small svg { flex: none; }
@media (max-width: 420px) { .sum-c .big { padding: 9px 8px 8px; } .sum-c .big small { font-size: 10px; gap: 3px; } .sum-c .big small svg { width: 12px; height: 12px; } }
/* 内訳: 左に時間(登り・下り)、右に獲得標高とテント泊。それぞれ上下に2行 */
.sum-c .sub { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; padding: 2px 4px 0; }
.sum-c .sub p + p { border-left: 2px solid var(--sand); padding-left: 14px; }
.sum-c p { display: grid; gap: 4px; align-content: start; font-size: 12px; color: var(--ink-2); }
.sum-c p span { display: flex; align-items: center; gap: 4px; }
.sum-c p span b { margin-left: auto; padding-left: 6px; }
.sum-c p span { white-space: nowrap; }
.sum-c p span small { font-size: 10px; margin-left: -2px; }
@media (max-width: 420px) { .sum-c .sub { gap: 0 10px; padding: 2px 0 0; } .sum-c .sub p + p { padding-left: 10px; } .sum-c p { font-size: 11.5px; } .sum-c p b { font-size: 12px; } }
/* 内訳の値は、上の大きな数字より控えめに(項目名と同じグレー、太さだけ少し太く) */
.sum-c p b { font-family: var(--font); font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
/* チェックポイント: 行ごと反応させる。ホバーはクリームの地、選択中は薄いオレンジの地+番号がオレンジのベタ */
.cp { padding: 8px 10px 10px 8px; margin: 0 -8px 2px; width: calc(100% + 16px); border-radius: 16px; transition: background .15s; }
.cp::before { left: 24px; top: 44px; bottom: -10px; }
.cp:hover { background: var(--cream); }
.cp:hover .cp-n { background: #fff; border-color: var(--sun); color: var(--forest); transform: none; }
.cp.peak:hover .cp-n { background: var(--sun); color: #fff; }
.cp.on, .cp.on:hover { background: color-mix(in srgb, var(--sun) 11%, #fff); }
.cp.on .cp-n, .cp.on:hover .cp-n { background: var(--sun); border-color: var(--sun); color: #fff; transform: none; box-shadow: 0 2px 6px color-mix(in srgb, var(--sun) 45%, transparent); }
.cp.on .cp-name { color: var(--forest); }
.cp.on::before { opacity: .5; }
/* チェックポイントをつなぐ点線は、目立たないグレー(季節の表で使っている色) */
.cp::before { background: repeating-linear-gradient(var(--stone) 0 6px, transparent 6px 11px); width: 3px; }
/* 山頂も最初はほかの地点と同じ見た目。オレンジのベタは「いま選んでいる地点」だけに使う */
.cp.peak .cp-n, .cp.peak:hover .cp-n { background: #fff; color: var(--forest); }
.cp.peak.on .cp-n, .cp.peak.on:hover .cp-n { background: var(--sun); color: #fff; }
.pf-dot.peak { background: #fff; border-color: #ff7a2a; box-shadow: none; }
.pf-dot.on, .pf-dot.peak.on { background: var(--sun); border-color: #fff; box-shadow: 0 0 0 2px var(--sun); }
/* Googleマップで開く: 地図が動く項目は吹き出しの中に文字のリンク、動かない項目は名前の右に外部リンクの印 */
.gmap-line { display: flex; width: fit-content; align-items: center; gap: 4px; margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--green); }
.gmap-line svg { width: 12px; height: 12px; }
.gmap-line { text-decoration: none; }
.gmap-in { display: inline-block; margin-left: 5px; color: var(--green); vertical-align: -3px; padding: 2px; border-radius: 6px; }
.gmap-in svg { width: 14px; height: 14px; display: block; }
.gmap-in:hover { background: var(--sand); }
.gmap-line:hover { text-decoration: underline; text-underline-offset: 3px; }
/* 項目のアイコン: 色ベタ(淡いグラデーション)に白抜き。施設=オレンジ / スポット=水色 / 温泉=ピンク */
.item.ico > svg { background: linear-gradient(135deg, var(--sun-2), var(--sun)); color: #fff; }
.item.ico .s-ico { background: linear-gradient(135deg, #7cc4ea, #3a9bd1); color: #fff; }
.item.ico .s-ico.onsen { background: linear-gradient(135deg, #f08aa5, var(--berry)); color: #fff; }
.item.ico .s-ico.shrine { background: linear-gradient(135deg, #c8a784, var(--shrine)); color: #fff; }
/* 周辺の山のうち掲載中の山: 別の山のページへ移る項目なので、種別ラベルではなく文字のリンクにする */
.item.ico .s-ico.rel { background: linear-gradient(135deg, var(--leaf), var(--green)); color: #fff; }
/* 周辺の山(掲載中): 左は地図で場所を見るボタン、右は山のページへ移るボタン */
.item.ico.rel-row { display: flex; align-items: center; gap: 8px; padding: 0 13px 0 0; transition: .15s; }
.item.ico.rel-row:hover { border-color: var(--sand-2); transform: translateY(-2px); }
.rel-main { flex: 1; min-width: 0; display: grid; grid-template-columns: 30px 1fr; gap: 0 10px; align-items: start; text-align: left; padding: 9px 0 9px 13px; }
.rel-main .s-ico { grid-row: 1 / span 2; }
.rel-main b, .rel-main p { grid-column: 2; }
.maplibregl-popup-content .gmap-line + .gmap-line { margin-top: 3px; }
.go-link { flex: none; display: inline-flex; align-items: center; gap: 1px; font-size: 12px; font-weight: 900; color: var(--green); white-space: nowrap; }
.go-link svg { width: 15px; height: 15px; stroke-width: 2.6; transition: transform .15s; }
button.item:hover .go-link svg { transform: translateX(3px); }
/* 押せる項目(周辺スポット・あわせて登りたい山)のホバー: 枠は緑、動きは少し浮くだけ */
button.item:hover { border-color: var(--sand-2); transform: translateY(-2px); }

/* --- 難易度・季節のラベル(一覧カードと詳細で共通) --- */
.badge.lv-初級 { background: var(--green); color: #fff; }
.badge.lv-中級 { background: var(--yolk); color: var(--forest); }
.badge.lv-上級 { background: var(--berry); color: #fff; }
.badge.lv-closed { background: var(--ink); color: #fff; }
/* 規制で登れない山の案内 */
.closed-box { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 4px; padding: 11px 13px; border-radius: var(--r-md); background: #fff3e2; border: 2px solid var(--sun); color: var(--ink); }
.closed-box > svg { width: 22px; height: 22px; color: var(--sun); flex: none; margin-top: 1px; }
.closed-box b { display: block; font-size: 14.5px; font-weight: 900; color: #a34a0b; line-height: 1.5; }
.closed-box p { font-size: 12.5px; line-height: 1.7; margin-top: 2px; }
.note.grading { display: flex; gap: 6px; align-items: flex-start; }
.note.grading svg { width: 14px; height: 14px; color: var(--green); flex: none; margin-top: 3px; }
.note.grading b { color: var(--forest); font-family: var(--num); font-size: 13.5px; }
.sources { margin-top: 12px; font-size: 12px; color: var(--ink-2); }
.sources summary { cursor: pointer; font-weight: 700; }
.sources ul { list-style: disc; padding: 6px 0 0 20px; display: grid; gap: 3px; }
.sources a { color: var(--green); word-break: break-all; }
.card-season { background: var(--paper); color: var(--ink) !important; gap: 5px; padding: 0 10px 0 8px; }
.card-season i { width: 9px; height: 9px; border-radius: 50%; background: var(--stone); flex: none; }
.card-season.s-b i { background: var(--sun); } .card-season.s-o i { background: var(--green); } .card-season.s-s i { background: var(--sky); } .card-season.s-w i { background: var(--stone); }
.card-season .mo { color: var(--ink-2); }

/* --- 種別ラベル(温泉・景勝地・観光、山小屋・登山口など): クリームの地 + 色は点とアイコンだけ --- */
button.item .tag, button.item .tag.onsen { background: var(--cream); color: var(--ink); font-weight: 700; padding: 1px 10px 1px 8px; display: inline-flex; align-items: center; gap: 5px; }
button.item .tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3a9bd1; }
button.item .tag.onsen::before { background: var(--berry); }
button.item .tag.shrine::before { background: var(--shrine); }
.cp-kind, .cp-kind.k-hut, .cp-kind.k-peak, .cp-kind.k-camp { background: var(--cream); color: var(--ink); }
.cp-kind svg { color: var(--green); }
.cp-kind.k-hut svg { color: var(--sun); } .cp-kind.k-peak svg { color: var(--berry); } .cp-kind.k-camp svg { color: var(--sky); }

/* ---------- 中くらいの画面 ---------- */
@media (max-width: 1280px) {
  .app { grid-template-columns: 340px 1fr; }
  .detail { width: 410px; }
  :root { --dw: 410px; }
  body.has-detail .map-tools { max-width: calc(100% - 450px); }
}

/* ---------- スマホ・タブレット ---------- */
@media (max-width: 900px) {
  :root { --top: 52px; }
  .edge-tab { display: none !important; } /* パソコン用の「たたむ」つまみは出さない */
  .map-filter { top: calc(58px + env(safe-area-inset-top)); left: 10px; }
  body.detail-min .detail { transform: none; }
  body.side-min .sidebar { visibility: visible; }
  body { overflow: auto; }
  .brand-tag { display: none; }
  .brand { flex: 1; }
  .topbar { position: sticky; top: 0; }
  .app { display: block; height: auto; }
  .sidebar { border: 0; overflow: visible; }
  .filters { position: static; }
  .filters { padding: 12px 12px 8px; }
  .btn-filter {
    display: inline-flex; align-items: center; gap: 6px; flex: none; height: 44px; padding: 0 14px; border-radius: 99px; background: var(--paper); border: 2px solid var(--sand);
    font-size: 13.5px; font-weight: 900; color: var(--forest); position: relative;
  }
  .btn-filter svg { width: 18px; height: 18px; color: var(--green); }
  .btn-filter.active, .filters.open .btn-filter { background: var(--green); border-color: var(--green); color: #fff; }
  .btn-filter.active svg, .filters.open .btn-filter svg { color: #fff; }
  .btn-filter b { min-width: 20px; height: 20px; border-radius: 10px; background: var(--sun); color: #fff; font-family: var(--num); font-size: 12px; display: grid; place-items: center; padding: 0 5px; }
  .f-panel { display: none; background: var(--paper); border: 2px solid var(--sand); border-radius: var(--r-lg); padding: 2px 12px 14px; margin-top: 10px; animation: drop .22s ease-out; }
  .filters.open .f-panel { display: block; }
  @keyframes drop { from { opacity: 0; transform: translateY(-8px); } }
  .f-panel .chip, .f-panel .mon { background: #fff; }
  .f-panel .chip.on, .f-panel .mon.on { background: var(--green); }
  .months { grid-template-columns: repeat(6, 1fr); gap: 5px; }
  .mon { height: 38px; }
  .mon small { display: inline; font-family: var(--font); font-size: 10px; margin-left: 1px; }
  .mon { display: flex; align-items: baseline; justify-content: center; padding-top: 7px; }
  .filter-foot { margin-top: 8px; }

  /* 一覧は2列。小さなカードに必要な情報だけを載せる */
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 4px 12px 16px; }
  .card { border-radius: 16px; border-width: 2px; }
  .card-img { aspect-ratio: 4 / 3; }
  .card-title { left: 9px; right: 9px; bottom: 6px; display: block; }
  .card-title h3 { font-size: 17px; }
  .card-title small { font-size: 9.5px; }
  .card-ele { font-size: 13px; display: block; margin-top: 1px; }
  .card-ele small { font-size: 10px; }
  .card-badge { top: 7px; left: 7px; }
  .card-season { top: 7px; right: 7px; }
  .card .badge { height: 20px; padding: 0 7px; font-size: 10.5px; }
  .card-season .mo { display: none; }
  .card-body { padding: 8px 9px 9px; }
  .card-catch { font-size: 11.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
  .card-meta { gap: 2px 8px; margin-top: 5px; font-size: 11px; }
  .card-meta b { font-size: 12px; }
  .card-meta svg { width: 12px; height: 12px; }
  .card-meta .where { display: none; }
  .card:hover { transform: none; }

  .stage { position: fixed; inset: 0; z-index: 40; display: none; background: var(--paper); }
  body.stage-open { overflow: hidden; }
  body.stage-open .stage { display: block; }
  /* 詳細はボトムシート。地図は常に全画面で、その上にシートが重なる。高さは JS が --sheet-h で指定する */
  .detail {
    position: absolute; top: auto; left: 0; right: 0; bottom: 0; width: auto; height: var(--sheet-h, 54dvh); max-height: calc(100dvh - 62px);
    border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: 0 -8px 24px rgba(31, 59, 44, .22);
    overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; scroll-behavior: smooth; scrollbar-width: none;
    transition: height .34s cubic-bezier(.2, .85, .25, 1); animation: slideUp .35s cubic-bezier(.2, .8, .2, 1); will-change: height;
  }
  .detail::-webkit-scrollbar { display: none; }
  .detail.dragging { transition: none; }
  @keyframes slideUp { from { transform: translateY(60px); opacity: 0; } }
  /* 上端のつまみ: ここを上下に動かすとシートの高さが変わる。写真の上に重ねて置き、中身をスクロールしても上に残る */
  .sheet-grip { display: block; position: sticky; top: 0; height: 23px; margin-bottom: -23px; z-index: 6; cursor: grab; touch-action: none; }
  .sheet-grip i { position: absolute; left: 50%; top: 8px; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: rgba(255, 255, 255, .92); box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
  .detail.scrolled .sheet-grip { background: var(--cream); }
  .detail.scrolled .sheet-grip i { background: var(--stone); box-shadow: none; }
  /* タブはつまみの帯と1px重ね、地色も不透明にして、すき間から後ろが透けないようにする */
  .tabs { top: 22px; background: var(--cream); backdrop-filter: none; }
  .hero { height: 132px; }
  .hero-txt { bottom: 10px; left: 16px; right: 16px; }
  .hero-txt h2 { font-size: 25px; }
  .hero-close { display: none; }
  .hero-credit { top: 12px; left: 12px; }

  .fab-back {
    display: inline-flex; align-items: center; gap: 2px; position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 10px; z-index: 5;
    height: 40px; padding: 0 15px 0 8px; border-radius: 99px; background: var(--paper); color: var(--forest); font-weight: 900; font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .35); border: 2px solid #fff;
  }
  .fab-back svg { width: 20px; height: 20px; color: var(--sun); stroke-width: 3; }
  /* 横にスライドできる列。影や動きが切れないよう上下に余白を取り、右端はフェードさせて「続きがある」ことを見せる */
  .map-tools {
    top: calc(2px + env(safe-area-inset-top)); left: 92px; right: 0; max-width: none; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    padding: 8px 40px 10px 4px; gap: 6px; overscroll-behavior-x: contain;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6px, #000 calc(100% - 44px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 6px, #000 calc(100% - 44px), transparent 100%);
  }
  .tool:hover { transform: none; }
  .map-tools::-webkit-scrollbar { display: none; }
  .map-tools > * { flex: none; }
  .tool { padding: 0 11px; }
  .tool span { display: none; }
  /* 写真/地形は左下。2D/3D と方位磁針は右下に縦に並べる(どちらもシートの高さに合わせて動く)。回転・全体表示は上の列 */
  .map-wrap > .seg { position: absolute; left: 10px; bottom: 30px; z-index: 4; transition: bottom .3s; }
  body.has-detail .map-wrap > .seg { bottom: calc(var(--sheet-vis, 0px) + 26px); }
  .map-side { position: absolute; right: 10px; bottom: 34px; z-index: 4; display: flex; flex-direction: column; gap: 8px; transition: bottom .3s; }
  body.has-detail .map-side { bottom: calc(var(--sheet-vis, 0px) + 26px); }
  .map-side .tool, .map-side .compass { position: static; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 50%; }
  .map-side .compass svg { width: 26px; height: 26px; }
  .map-side #btn3d .dim { font-size: 13px; }
  .map-hint { display: none; }
  .maplibregl-ctrl-top-left { display: none; }
  body.has-detail .map-tools { max-width: none; }
  .map-legend { bottom: 26px; left: 10px; padding: 5px 10px; font-size: 11px; gap: 2px 10px; }
  body.has-detail .maplibregl-ctrl-bottom-left { bottom: calc(var(--sheet-vis, 0px) - 4px); display: none; }
  body.has-detail .maplibregl-ctrl-bottom-left { display: block; top: auto; }
  .maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib { font-size: 9.5px; }
  .maplibregl-ctrl-bottom-left { max-width: calc(100% - 150px); }
  .maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-inner { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* 凡例は画面の右上の角(上のボタンと同じ高さ) */
  body.has-detail .map-legend { left: auto; right: 8px; bottom: auto; top: calc(10px + env(safe-area-inset-top)); display: grid; grid-template-columns: auto auto; gap: 1px 10px; font-size: 10.5px; padding: 5px 9px; }
  .welcome { bottom: 40px; padding: 10px 18px; }
  .welcome h2 { font-size: 15px; }
  .welcome p { font-size: 12px; }
  .maplibregl-ctrl-top-right { top: 54px; }

  .fab-map {
    display: inline-flex; align-items: center; gap: 8px; position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20;
    height: 50px; padding: 0 24px; border-radius: 99px; background: var(--sun); color: #fff; font-weight: 900; font-size: 15px; box-shadow: 0 8px 22px rgba(255, 138, 61, .5);
  }
  .fab-map svg { width: 20px; height: 20px; }
  body.stage-open .fab-map { display: none; }
  .sec { margin: 10px 10px 0; padding: 16px 14px; }
  .card-season { padding: 0 8px 0 6px; gap: 4px; }
  .card-season i { width: 8px; height: 8px; }
  .tabs { padding: 8px 12px; }
}
@media (min-width: 620px) and (max-width: 900px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 380px) {
  .stats { gap: 6px; }
  .stat b { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (max-width: 420px) {
  .wx-row { grid-template-columns: 38px 26px minmax(0, 1fr) 58px 44px 34px; padding: 5px 8px; gap: 5px; }
  .wx-row .bar { display: none; }
  .kv { grid-template-columns: 84px 1fr; }
}
