.csm { --csm-logo: url(stores-map-logo.webp?v=20260929); }
/* ══════════════════════════════════════════════
   店舗マップ（.csm = color-chikara store map）v2
   柔らかいフラット：明るい緑を主役に、角丸・細い線・淡い面で構成
   ロゴ画像は build_section.py が --csm-logo に差し込む
══════════════════════════════════════════════ */
.csm {
  --csm-primary: #2fa464;      /* 主役の明るい緑（ロゴ #00a43d を柔らかく） */
  --csm-primary-d: #23804d;    /* 淡い面の上の文字 */
  --csm-brand: #3a5c45;        /* ブランドの深緑（見出しの文字だけ） */
  --csm-tint: #eef8f1;
  --csm-tint2: #dcf0e3;
  --csm-ink: #2d3a33;
  --csm-text: #46524b;
  --csm-mute: #77837c;
  --csm-line: #e3ebe5;
  --csm-beige: #ebe4d9;
  --csm-home: #f29a52;         /* 当店 */
  --csm-soon: #9dbad6;         /* オープン前 */
  --csm-reserve: #c99a5e;
  --csm-shadow: 0 10px 28px rgba(40, 80, 60, 0.08);
  --csm-r-lg: 18px;
  --csm-r: 12px;
  --csm-r-sm: 10px;
  --csm-map-h: 600px;
  padding: 80px 24px;
  background: #fff;
  overflow-x: clip;
  font-family: 'Noto Sans JP', sans-serif;
}
.csm *, .csm *::before, .csm *::after { box-sizing: border-box; }
.csm-inner { max-width: 1200px; margin: 0 auto; }
.csm-lead { font-size: 15px; color: var(--csm-text); margin: -20px 0 28px; }
.csm-logo { display: block; background: var(--csm-logo) center / contain no-repeat; }

/* ── STEP 1：県を選ぶ ─────────────────────── */
.csm-select {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px; align-items: center;
}
.csm-illust { position: relative; background: var(--csm-tint); border-radius: 24px; padding: 16px; }
.csm-illust svg { display: block; width: 100%; height: auto; max-height: 560px; }
.csm-illust .csm-cap {
  position: absolute; left: 22px; top: 18px; padding: 4px 12px; border-radius: 999px; background: #fff;
  font-size: 12px; font-weight: 500; color: var(--csm-primary-d);
}
.csm-shape { stroke: #3a5c45; stroke-width: 2; stroke-linejoin: round; cursor: pointer; transition: fill .25s; outline: none; }
.csm-shape.is-aichi { fill: #c9ead3; }
.csm-shape.is-gifu { fill: #e2f0cf; }
.csm-shape:hover, .csm-shape:focus-visible { fill: #a9dcb9; }
.csm-plabel { pointer-events: none; }
.csm-plabel .n { font-size: 19px; font-weight: 700; letter-spacing: .08em; fill: var(--csm-brand); }
.csm-plabel .c { font-size: 12px; font-weight: 500; fill: var(--csm-primary-d); }
.csm-plabel rect { fill: #fff; }
.csm-mark { pointer-events: none; }

.csm-pick-title { font-size: 21px; font-weight: 700; letter-spacing: .04em; color: var(--csm-ink); margin-bottom: 6px; }
.csm-pick-note { font-size: 14px; color: var(--csm-text); margin-bottom: 24px; }
.csm-pref-btns { display: grid; gap: 14px; }
.csm-pref-btn {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2px 16px;
  width: 100%; padding: 18px 22px; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid var(--csm-line); border-radius: var(--csm-r-lg); box-shadow: var(--csm-shadow);
  font-family: inherit; color: var(--csm-ink); transition: transform .2s, box-shadow .2s, background .2s;
}
.csm-pref-btn:hover { transform: translateY(-2px); background: #fbfefc; box-shadow: 0 14px 32px rgba(40,80,60,.12); }
.csm-pref-btn:active { transform: translateY(1px) scale(.985); box-shadow: 0 4px 12px rgba(40,80,60,.1); }
.csm-pref-btn .ic { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 50%; background: var(--csm-tint2); display: flex; align-items: center; justify-content: center; }
.csm-pref-btn .ic .csm-logo { width: 30px; height: 30px; }
.csm-pref-btn .nm { font-size: 20px; font-weight: 700; letter-spacing: .06em; }
.csm-pref-btn .ar { grid-column: 2; font-size: 13px; color: var(--csm-mute); }
.csm-pref-btn .ct { grid-row: 1 / 3; grid-column: 3; display: flex; align-items: baseline; gap: 2px; font-family: 'Inter', sans-serif; font-size: 32px; font-weight: 500; color: var(--csm-primary); }
.csm-pref-btn .ct small { font-family: 'Noto Sans JP', sans-serif; font-size: 13px; font-weight: 500; color: var(--csm-mute); }

/* ── STEP 2：地図 ─────────────────────────── */
.csm-explore[hidden], .csm-select[hidden] { display: none; }
.csm-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 16px; }
.csm-back {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px 8px 12px; cursor: pointer;
  background: var(--csm-tint); border: 0; border-radius: 999px; font-family: inherit; font-size: 13px; font-weight: 500; color: var(--csm-primary-d);
}
.csm-back:hover { background: var(--csm-tint2); }
.csm-crumb { font-size: 19px; font-weight: 700; letter-spacing: .04em; color: var(--csm-ink); }
.csm-crumb small { font-size: 13px; font-weight: 400; color: var(--csm-mute); margin-left: 6px; letter-spacing: 0; }
.csm-chips { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.csm-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; cursor: pointer;
  background: #fff; border: 1px solid var(--csm-line); border-radius: 999px; font-family: inherit; font-size: 14px; font-weight: 500; color: var(--csm-ink);
  transition: background .2s, color .2s, border-color .2s;
}
.csm-chip .n { min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--csm-tint); font-size: 12px; color: var(--csm-primary-d); text-align: center; }
.csm-chip:hover { border-color: var(--csm-tint2); background: var(--csm-tint); }
.csm-chip[aria-pressed="true"] { background: var(--csm-primary); border-color: var(--csm-primary); color: #fff; }
.csm-chip[aria-pressed="true"] .n { background: rgba(255,255,255,.25); color: #fff; }

.csm-stage {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; overflow: hidden;
  border: 1px solid var(--csm-line); border-radius: var(--csm-r-lg); box-shadow: var(--csm-shadow); background: #fff;
}
.csm-map { height: var(--csm-map-h); background: #eaf2f5; z-index: 0; font-family: 'Noto Sans JP', sans-serif; }
.csm-list { height: var(--csm-map-h); overflow-y: auto; border-left: 1px solid var(--csm-line); overscroll-behavior: contain; }
.csm-list-head { position: sticky; top: 0; z-index: 1; background: #fff; padding: 16px 18px 12px; border-bottom: 1px solid var(--csm-line); }
.csm-list-head .en { display: block; font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 500; letter-spacing: .2em; color: var(--csm-primary); }
.csm-list-head .t { font-size: 17px; font-weight: 700; letter-spacing: .04em; color: var(--csm-ink); }
.csm-list-head .t small { font-size: 13px; font-weight: 400; color: var(--csm-mute); margin-left: 6px; }
.csm-row {
  display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center;
  width: 100%; padding: 12px 18px; text-align: left; cursor: pointer;
  background: #fff; border: 0; border-bottom: 1px solid #f0f4f1; font-family: inherit; color: var(--csm-ink);
}
.csm-row:hover { background: #f7fbf8; }
.csm-row.is-active { background: var(--csm-tint); }
.csm-row .th { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; }
.csm-row .nm { display: block; font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.csm-row .ad { display: block; font-size: 12px; color: var(--csm-mute); line-height: 1.5; margin-top: 2px; }
.csm-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; color: #fff; background: var(--csm-home); vertical-align: 2px; }
.csm-tag.is-soon { background: var(--csm-soon); }

/* 写真（無い店は淡い緑地＋ロゴ） */
.csm-ph { position: relative; background: var(--csm-tint); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.csm-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.csm-ph .csm-logo { width: 34%; max-width: 88px; aspect-ratio: 1; opacity: .55; }
.csm-row .th.csm-ph .csm-logo { width: 46%; }

/* 背景地図（市区町村の面） */
.csm-muni-label { background: none; border: 0; }
.csm-muni-label span {
  display: block; transform: translate(-50%, -50%); white-space: nowrap;
  font-size: 11px; font-weight: 500; color: #7c9486; letter-spacing: .04em;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 2px #fff;
}
.csm-muni-label.lv1 span { font-size: 13px; font-weight: 700; color: #6a8577; }
.csm-map .csm-muni-label { display: none; }
.csm-map.zl-1 .csm-muni-label.lv1:not(.ward),
.csm-map.zl-2 .csm-muni-label.lv1:not(.city-nagoya),
.csm-map.zl-2 .csm-muni-label.lv2,
.csm-map.zl-3 .csm-muni-label:not(.city-nagoya) { display: block; }

/* ピン（明るい色＋ロゴ・文字なし）。県全体の縮尺では先端を支点に小さくする */
.csm-pin-wrap { background: none; border: 0; }
.csm-pin-s { display: block; width: 36px; height: 36px; transform-origin: 18px 43px; transition: transform .25s; }
.csm-map.zl-1 .csm-pin-s { transform: scale(.72); }
.csm-pin {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--csm-primary); box-shadow: 0 3px 8px rgba(30, 70, 50, .28);
  transition: background .2s, transform .2s;
}
.csm-pin .csm-logo { width: 26px; height: 26px; transform: rotate(45deg); border-radius: 50%; background-color: #fff; background-size: 22px; }
.csm-pin.is-home { background: var(--csm-home); }
.csm-pin.is-soon { background: var(--csm-soon); }
.csm-pin.is-soon .csm-logo { filter: saturate(.35); opacity: .9; }
.csm-pin.is-active { transform: rotate(-45deg) scale(1.2); box-shadow: 0 6px 14px rgba(30, 70, 50, .32); }
.leaflet-tooltip.csm-tip {
  padding: 2px 10px; border: 0; border-radius: 999px; box-shadow: 0 2px 8px rgba(40,80,60,.14);
  font-family: 'Noto Sans JP', sans-serif; font-size: 12px; font-weight: 500; color: var(--csm-ink); background: #fff;
}
.leaflet-tooltip.csm-tip::before { display: none; }
.csm-map .leaflet-tooltip.csm-tip { display: none; }
.csm-map.show-labels .leaflet-tooltip.csm-tip { display: block; }
.csm .leaflet-control-zoom { border: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 3px 10px rgba(40,80,60,.15); }
.csm .leaflet-control-zoom a { color: var(--csm-primary-d); border-color: var(--csm-line); }
.csm .leaflet-control-attribution { font-size: 10px; background: rgba(255,255,255,.85); border-radius: 8px 0 0 0; }

/* ポップアップ（店舗情報） */
.csm .leaflet-popup-content-wrapper { border-radius: var(--csm-r-lg); padding: 0; overflow: hidden; box-shadow: 0 14px 36px rgba(40,80,60,.2); }
.csm .leaflet-popup-content { margin: 0; width: 292px !important; font-family: 'Noto Sans JP', sans-serif; line-height: 1.6; }
.csm .leaflet-popup-tip { box-shadow: none; }
.csm .leaflet-container a.leaflet-popup-close-button {
  top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%;
  font-size: 20px; line-height: 28px; color: var(--csm-ink); background: rgba(255,255,255,.92); box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.csm-pop .csm-ph { aspect-ratio: 16 / 9; }
.csm-pop-body { padding: 14px 16px 16px; }
.csm .leaflet-popup-content .csm-pop-name { margin: 0 0 8px; font-size: 17px; font-weight: 700; letter-spacing: .02em; color: var(--csm-ink); }
.csm .leaflet-popup-content .csm-btn { white-space: nowrap; letter-spacing: 0; padding: 8px 4px; }

/* 店舗情報の行（ポップアップ・一覧カード共通） */
.csm-info { display: grid; gap: 5px; margin: 0 0 12px; }
.csm-info div { display: grid; grid-template-columns: 16px 1fr; gap: 7px; font-size: 13px; color: var(--csm-text); line-height: 1.55; }
.csm-info svg { margin-top: 3px; color: var(--csm-primary); }
.csm-info a { color: var(--csm-primary-d); font-weight: 700; text-decoration: none; }
.csm-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; }
.csm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 40px; padding: 8px 6px;
  border-radius: var(--csm-r-sm); font-size: 12px; font-weight: 700; letter-spacing: .03em; text-decoration: none; text-align: center; line-height: 1.3;
  transition: filter .2s, transform .15s;
}
.csm-btn:hover { filter: brightness(1.05); }
.csm-btn:active { transform: scale(.97); }
.csm .csm-btn-reserve { background: var(--csm-reserve); color: #fff; }
.csm .csm-btn-line { background: #06C755; color: #fff; }
.csm .csm-btn-hp { background: #d9545e; color: #fff; }
.csm .csm-btn-site { background: #fff; color: var(--csm-primary-d); box-shadow: inset 0 0 0 1.5px var(--csm-tint2); }
.csm-route {
  display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; min-height: 38px;
  border-radius: var(--csm-r-sm); background: var(--csm-tint); font-size: 12px; font-weight: 700; color: var(--csm-primary-d) !important; text-decoration: none;
}
.csm-route:hover { background: var(--csm-tint2); }

/* ── エリア別の店舗一覧（地図を使わない人向け・静的HTML） ── */
.csm-index { margin-top: 80px; }
.csm-index-title { font-size: clamp(1.15rem, 2.2vw, 1.45rem); font-weight: 700; letter-spacing: .04em; color: var(--csm-ink); margin-bottom: 16px; }
.csm-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.csm-jump a { padding: 7px 16px; border-radius: 999px; background: var(--csm-tint); font-size: 13px; font-weight: 500; color: var(--csm-primary-d); text-decoration: none; }
.csm-jump a:hover { background: var(--csm-tint2); }
.csm-area { padding-top: 40px; scroll-margin-top: 80px; }
.csm-area-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 18px; }
.csm-area-h .en { font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 500; letter-spacing: .2em; color: var(--csm-primary); }
.csm-area-h h3 { font-size: 19px; font-weight: 700; letter-spacing: .04em; color: var(--csm-ink); }
.csm-area-h .sub { font-size: 13px; color: var(--csm-mute); }
.csm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.csm-card { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--csm-beige); border-radius: var(--csm-r-lg); box-shadow: var(--csm-shadow); }
.csm-card .csm-ph { aspect-ratio: 4 / 3; }
.csm-ph .badge { position: absolute; top: 10px; left: 10px; z-index: 2; padding: 3px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #fff; background: var(--csm-home); }
.csm-ph .badge.is-soon { background: var(--csm-soon); }
.csm-card-body { display: flex; flex-direction: column; flex: 1; padding: 18px 18px 18px; }
.csm-card-name { font-size: 17px; font-weight: 700; letter-spacing: .02em; color: var(--csm-ink); margin-bottom: 10px; }
.csm-card .csm-actions { margin-top: auto; padding-top: 14px; }
.csm-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; font-size: 12px; }
.csm-card-foot a, .csm-card-foot button { background: none; border: 0; padding: 4px 0; min-height: 0; margin: 0; font-family: inherit; font-size: 12px; font-weight: 700; color: var(--csm-primary-d) !important; text-decoration: none; cursor: pointer; }
.csm-card-foot a:hover, .csm-card-foot button:hover { text-decoration: underline; }

/* ── レスポンシブ ─────────────────────────── */
@media (max-width: 1000px) {
  .csm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .csm-select { grid-template-columns: 1fr; gap: 28px; }
  .csm-illust svg { max-height: 460px; margin: 0 auto; }
  .csm-stage { grid-template-columns: 1fr; }
  .csm-list { height: auto; max-height: none; overflow: visible; border-left: 0; border-top: 1px solid var(--csm-line); }
  .csm-list-head { position: static; }
}
@media (max-width: 640px) {
  .csm { padding: 56px 16px; --csm-map-h: clamp(380px, calc(100svh - 250px), 560px); }
  .csm-lead { margin: -24px 0 20px; font-size: 14px; }
  .csm-grid { grid-template-columns: 1fr; }
  .csm-illust { padding: 8px; border-radius: 20px; }
  .csm-pref-btn { padding: 14px 16px; }
  .csm-pref-btn .nm { font-size: 18px; }
  .csm-pref-btn .ct { font-size: 28px; }
  .csm-bar { gap: 8px 12px; margin-bottom: 12px; }
  .csm-chips { gap: 6px; }
  .csm-chip { padding: 7px 12px; font-size: 13px; }
  .csm-row { padding: 12px 16px; }
  .csm-index { margin-top: 56px; }
  .csm .leaflet-popup-content { width: 264px !important; }
  .csm .leaflet-popup-content .csm-btn { font-size: 11px; letter-spacing: -.02em; padding: 8px 2px; }
  .csm-pop .csm-ph { aspect-ratio: 2 / 1; }
  .csm-card .csm-ph { aspect-ratio: 16 / 9; }
}

/* 県ボタンは <a>（JSが無い・地図を読めない時は一覧へのリンク） */
a.csm-pref-btn { text-decoration: none; }
.csm-fail { margin-top: 14px; padding: 10px 14px; border-radius: var(--csm-r-sm); background: #fff5ec; font-size: 13px; color: #8a4b1c; }
.csm-fail[hidden] { display: none; }
