:root {
  --bg: #0e0f12;
  --fg: #e9ecf1;
  --muted: #a6adbb;
  --accent: #7aa2ff;
  --card: #151821;
  --border: #222735;

  /* === 丸（ドット）共通設定をここで管理 === */
  --dot-size: 5px;                     /* 直径 */
  --dot-border-width: 1.5px;           /* ボーダー幅 */
  --dot-border-color: #0b0e16;         /* ボーダー色（濃い枠） */
  --dot-opacity: 0.95;                 /* 塗り透明度 */
}

/* ベース */
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.6 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,"Noto Sans JP","Hiragino Kaku Gothic ProN",Meiryo,sans-serif;
}

header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: #0f1218;
  position: sticky; top: 0; z-index: 10;
}
h1 { margin: 0 0 8px; font-size: 18px; letter-spacing: .02em; }
form.search { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; max-width: 960px; }
.input,.btn { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--fg); }
.btn { cursor: pointer; border-color: #2c3350; }
.meta { display:flex; gap:16px; align-items:center; margin-top:8px; color:var(--muted); font-size:12px; flex-wrap:wrap; }
.badge { display:inline-block; padding:2px 8px; border-radius:999px; border:1px solid var(--border); background:#111827; color:var(--fg); font-size:12px; }
.muted { color: var(--muted); }
.error { margin:12px 16px; color:#ff6b6b; }

#map {
  height: 100dvh;
}

/* 判例 */
.legend {
  position:absolute; right:12px; top:12px;
  background:#0f121899; color:#e9ecf1;
  border:1px solid #222735; border-radius:12px;
  padding:10px 12px; font-size:12px;
  backdrop-filter:blur(6px); z-index:9400; min-width:180px;
}
.legend .row { display:flex; align-items:center; gap:8px; margin:4px 0; }
.legend hr { border:0; border-top:1px solid #2a3042; margin:6px 0; }

/* === 丸ドット（DivIcon内の要素） === */
.dot-wrap { background: transparent !important; border: none !important; }
.dot {
  width: var(--dot-size);
  height: var(--dot-size);
  border-radius: 50%;
  display: inline-block;
  /* 色・枠は下のカテゴリクラスで上書き */
  background: var(--dot-color, #a6adbb);
  opacity: var(--dot-opacity);
  border: var(--dot-border-width) solid var(--dot-border-color);
  /* 視認性を少し上げる */
  box-shadow: 0 0 0.5px rgba(0,0,0,.3);
}

/* === カテゴリごとの色（ここを書き換えれば配色変更がCSSだけで完結） === */
.cat-drugstore   { --dot-color: #ff6b6b; }  /* ドラッグストア／薬局 */
.cat-hospital    { --dot-color: #00c2ff; }  /* 病院 */
.cat-clinic      { --dot-color: #7aa2ff; }  /* 診療所 */
.cat-convenience { --dot-color: #ffd166; }  /* コンビニ */
.cat-supermarket { --dot-color: #22c55e; }  /* スーパー */
.cat-post        { --dot-color: #f472b6; }  /* 郵便局 */
.cat-other       { --dot-color: #a6adbb; }  /* その他 */

/* もしズームに応じてサイズを変えたい時は、メディアクエリ感覚で倍率を調整も可
@media (min-width: 1400px) {
  :root { --dot-size: 6px; }
}
*/


/* 既存のあなたの style.css を使用。必要なら下だけ追記 */

.legend .row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
}

.legend .swatch {
    width: 10px;
    height: 10px;
    display: inline-block;
    position: relative;
}

.legend .swatch-fill {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.version-badge {
    position: fixed;
    right: 12px;
    bottom: 12px;
    background: #0f1218cc;
    color: #e9ecf1;
    border: 1px solid #222735;
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 12px;
    z-index: 450;
    backdrop-filter: blur(6px);
}

/* OSMタイルだけをモノクロ化（マーカーやポップアップはそのまま） */
.tiles-gray .leaflet-tile {
    filter: contrast(1.3) brightness(0.95);
  
  filter: grayscale(100%) contrast(1.05) brightness(1.05) !important;
  
}



.leaflet-safari .leaflet-tile-container {
    opacity: 0.7;
}



/* 地図の中に伝票を固定するための基準 */
#map {
  position: relative;
  /* ← 追加 */
  width: 100%;
  height: 100vh;
}

/* 画面表示用：地図の右上に固定 */
#map .legend,
.legend {
  color: #e9ecf1;
  border: 1px solid #222735;
  backdrop-filter: none;
  /* ← ぼかしも不要なら外す */
}



:root {
  --bg: #0e0f12;
  --fg: #e9ecf1;
  --accent: #7aa2ff;
  --border: #222735;
}

/* 全画面地図 */
html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}
#map {
  position: fixed;
  inset: 0;
  z-index: 1;
}

/* === ヘッダー === */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: #0f1218cc;
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  padding: 16px;
  z-index: 500;
  transform: translateY(-100%);
  transition: transform 0.4s ease;
}
#header.is-open { transform: translateY(0); }

h1 { margin: 0 0 8px; font-size: 18px; }
form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.input, .btn {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #151821;
  color: var(--fg);
}
.btn { cursor: pointer; background: var(--accent); color: #fff; }

/* トグルボタン */
#toggle-header {
  position: fixed;
  top: 12px; right: 12px;
  z-index: 600;
  background: #0f1218cc;
  color: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background .3s;
}
#toggle-header:hover {
  background: #1a1d28cc;
}

/* 凡例 */
.legend {
  position:absolute; right:12px;
  background:#0f1218cc;
  border:1px solid #222735;
  border-radius:12px;
  padding:10px 12px;
  font-size:12px;
  backdrop-filter:blur(6px);
  z-index:400;
  color:#e9ecf1;
}




/* フルスクリーン地図＆トグルヘッダー用追加 */

html,
body {
  height: 100%;
}

#map {
  position: fixed;
  inset: 0;
  /* top/right/bottom/left: 0 */
  z-index: 1;
}

/* 既存の header をスライド式に変更 */
#app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #0f1218cc;
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  padding: 16px;
  z-index: 500;
  transform: translateY(-100%);
  transition: transform .4s ease;
}

#app-header.is-open {
  transform: translateY(0);
}

/* トグルボタン */
#toggle-header {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 600;
  background: #0f121800;
  color: #e9ecf1;
  border: 1px solid #22273500;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

#toggle-header:hover {
  background: #151a25cc;
}

/* 凡例は地図の上に固定（右下） */
#map .legend {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: #0f1218cc;
  color: #e9ecf1;
  border: 1px solid #222735;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  z-index: 550;
  /* ヘッダー開いても隠れないよう充分に上げる */
}

/* タイルのモノクロ化（必要なら） */
.tiles-gray .leaflet-tile {
  filter: grayscale(100%) contrast(1.05) brightness(1.05);
}

/* 印刷時はヘッダー/トグルOFF、地図を紙面いっぱいに */
@media print {

  /* 印刷でタイルの filter が落ちる場合は強制する */
  .tiles-gray .leaflet-tile {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    filter: grayscale(100%) contrast(1.05) brightness(1.05) !important;
  }
}


