  :root {
    /* ZpeerSTORE ブランドカラー（store.zpeer.co.jp と同じ） */
    --zs-blue: #3a76c4;
    --zs-blue-dark: #2f5fa0;
    --zs-blue-light: #eef3fb;
    --zs-orange: #ff6c10;
    --zs-text: #333538;
    --zs-text-sub: #6b7280;
    --zs-line: #e5e7eb;
    --zs-bg: #ffffff;
    --zs-bg-sub: #f8f9fa;
    --zs-footer: #333538;
  }
  * { box-sizing: border-box; }
  html, body {
    margin: 0;
    width: 100%;
    font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
    background: var(--zs-bg);
    color: var(--zs-text);
    -webkit-font-smoothing: antialiased;
  }
  body { display: flex; flex-direction: column; min-height: 100vh; }
  a { color: inherit; }

  /* ---------- ヘッダー（store.zpeer.co.jp と同じ構成：左ロゴ／右ログイン） ---------- */
  header {
    background: var(--zs-bg);
    border-bottom: 1px solid var(--zs-line);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
  }
  .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    text-decoration: none;
  }
  .brand img { height: 26px; width: auto; display: block; }
  .brand .page-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--zs-text);
    padding-left: 10px;
    border-left: 1px solid var(--zs-line);
    white-space: nowrap;
    line-height: 1.2;
  }
  .header-links { display: flex; gap: 8px; flex-shrink: 0; }
  .header-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    padding: 9px 14px;
    border-radius: 999px;
    white-space: nowrap;
    line-height: 1;
    transition: background-color .15s ease, color .15s ease;
  }
  .header-links a img { width: 14px; height: 14px; }
  .link-outline { background: #fff; color: var(--zs-blue); border: 1px solid var(--zs-blue); }
  .link-outline:hover { background: var(--zs-blue-light); }
  .link-primary { background: var(--zs-blue); color: #fff !important; border: 1px solid var(--zs-blue); }
  .link-primary:hover { background: var(--zs-blue-dark); border-color: var(--zs-blue-dark); }
  .link-primary svg { width: 14px; height: 14px; stroke: #fff; flex-shrink: 0; }

  .main-content {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 16px auto 40px;
    padding: 0 40px;
    }
  /* ---------- 見出し＋登録数 ---------- */
  .intro {
    padding: 18px 0 14px;
  }
  .intro h1 {
    margin: 0 0 2px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .02em;
  }
  .intro p {
    margin: 0;
    font-size: 12.5px;
    color: var(--zs-text-sub);
    line-height: 1.6;
  }
  .stat {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 12.5px;
    color: var(--zs-text-sub);
    white-space: nowrap;
  }
  .stat b {
    font-size: 26px;
    font-weight: 700;
    color: var(--zs-orange);
    letter-spacing: .01em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  .stat .unit { color: var(--zs-text); font-weight: 700; }

  /* ---------- 地図 ---------- */
  #map-wrap {
    position: relative;
    height: 72vh;
    min-height: 380px;
    width: 100%;
  }
  #map { height: 100%; width: 100%; }

  .loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.92);
    z-index: 800;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: opacity 0.25s ease;
  }
  .loading-overlay.hide { opacity: 0; pointer-events: none; }
  .spinner {
    width: 34px; height: 34px;
    border: 3px solid var(--zs-blue-light);
    border-top-color: var(--zs-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }
  .loading-text { font-size: 13px; color: var(--zs-text-sub); }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* 検索バー（地図左上に浮かせる） */
  .search-bar {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 500;
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 8px 0 14px;
  }
  .search-bar svg { width: 18px; height: 18px; color: var(--zs-text-sub); flex-shrink: 0; }
  .search-bar input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--zs-text);
    padding: 0 8px;
    font-family: inherit;
  }
  .search-bar input::placeholder { color: #9ca3af; }
  .search-count {
    font-size: 11.5px;
    color: var(--zs-blue);
    font-weight: 700;
    white-space: nowrap;
    padding: 0 4px;
  }
  .search-clear {
    border: none;
    background: var(--zs-bg-sub);
    color: var(--zs-text-sub);
    width: 24px; height: 24px;
    border-radius: 50%;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
  }
  .search-clear[hidden] { display: none; }
  @media (min-width: 560px) {
    .search-bar { left: 16px; max-width: 340px; }
  }

  .locate-fab {
    position: absolute;
    right: 12px;
    bottom: 24px;
    z-index: 500;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--zs-line);
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    display: flex; align-items: center; justify-content: center;
    color: var(--zs-blue);
    cursor: pointer;
    padding: 0;
  }
  .locate-fab:active { background: var(--zs-blue-light); }
  .locate-fab:disabled { opacity: 0.6; }
  .locate-fab svg { width: 22px; height: 22px; }

  .locate-toast {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 500;
    background: rgba(51,53,56,0.92);
    color: #fff;
    font-size: 12.5px;
    padding: 9px 16px;
    border-radius: 999px;
    max-width: 88%;
    text-align: center;
    display: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  }
  .locate-toast.show { display: block; }
  .locate-toast.error { background: rgba(232,0,46,0.92); }

  .current-loc-dot {
    width: 16px; height: 16px;
    background: var(--zs-orange);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255,108,16,0.35), 0 1px 4px rgba(0,0,0,0.3);
  }
  .current-loc-pulse {
    width: 16px; height: 16px;
    border-radius: 50%;
    background: rgba(255,108,16,0.35);
    animation: pulse 1.8s infinite;
  }
  @keyframes pulse {
    0% { transform: scale(1); opacity: 0.7; }
    70%, 100% { transform: scale(2.8); opacity: 0; }
  }

  /* ---------- ポップアップ ---------- */
  .popup-content { font-family: inherit; min-width: 180px; max-width: 240px; }
  .popup-content .p-pref {
    display: inline-block;
    background: var(--zs-blue-light);
    color: var(--zs-blue);
    font-size: 10.5px; font-weight: 700;
    padding: 2px 8px; border-radius: 999px;
    margin-bottom: 6px;
  }
  .popup-content .p-name { font-size: 14px; font-weight: 700; color: var(--zs-text); margin-bottom: 4px; line-height: 1.4; }
  .popup-content .p-addr { font-size: 12.5px; color: var(--zs-text-sub); line-height: 1.55; }

  .leaflet-popup-content-wrapper { border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.14); }
  .leaflet-popup-content { margin: 14px 16px; }
  .leaflet-touch .leaflet-control-zoom a { width: 36px; height: 36px; line-height: 36px; }
  .leaflet-bottom.leaflet-left .leaflet-control-zoom { margin-left: 12px; margin-bottom: 16px; }
  .marker-cluster-custom { background: transparent !important; }

  /* ---------- フッター（store.zpeer.co.jp のフッターに準拠） ---------- */
  footer {
    background: var(--zs-footer);
    color: #fff;
    padding: 22px 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  footer img { height: 22px; width: auto; display: block; }
  footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
  footer nav a { font-size: 12px; color: #fff; text-decoration: none; opacity: .9; }
  footer nav a:hover { opacity: 1; text-decoration: underline; }
  footer small { font-size: 11px; opacity: .7; }

  /* ---------- 画面幅ごとの微調整 ---------- */
  @media (max-width: 480px) {
    .brand .page-name { display: none; }
    .header-links a { padding: 9px 12px; font-size: 12px; }
    .intro h1 { font-size: 15px; }
    .stat b { font-size: 22px; }
  }

  @media (min-width: 560px) {
    header { padding: 14px 24px; }
    .brand img { height: 30px; }
    .brand .page-name { font-size: 14px; }

    .main-content {
      margin: 16px auto 40px;
      padding: 0 40px;
    }

    .intro {
      padding: 18px 0 14px;
    }

    .intro h1 { font-size: 19px; }
    .locate-fab { width: 48px; height: 48px; right: 16px; bottom: 28px; }
    footer { padding: 26px 24px 22px; }
  }
