:root {
  --green: #1c7a52;
  --bg: #ffffff;
  --card: #ffffff;
  --ink: #222222;
  --sub: #6f6f6f;
  --line: #e8e8e8;
  --badge: #f2f2f2;
  --shadow: rgba(0, 0, 0, .08);
  --lv0: #1a9850;
  --lv1: #f5a623;
  --lv2: #d64541;
}
[data-theme="dark"] {
  --green: #35b381;
  --bg: #121417;
  --card: #1d2024;
  --ink: #e8e8e8;
  --sub: #9aa0a6;
  --line: #33373c;
  --badge: #2a2e33;
  --shadow: rgba(0, 0, 0, .5);
}
* { box-sizing: border-box; }
html { height: 100%; overscroll-behavior-y: none; }
body { margin: 0; background: var(--bg); color: var(--ink);
  /* 和文→欧文→総称の連鎖。日本語UIの可読性のため行間と字送りを明示する */
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.6; letter-spacing: 0.02em;
  font-feature-settings: "palt" 1; line-break: strict; overflow-wrap: anywhere;
  display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 6px; flex: none; }
h1 { font-size: 20px; margin: 0; color: var(--green); letter-spacing: 0.06em;
  font-family: "Zen Maru Gothic", "Zen Kaku Gothic New", sans-serif; font-weight: 700; }
h1 .okinawa { font-size: 12px; margin-left: 4px; color: var(--sub); }
.hright { display: flex; align-items: center; gap: 8px; }
.themebtn { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 50%; width: 34px; height: 34px; font-size: 16px; cursor: pointer; }
.fbbtn { font-weight: 700; color: var(--green); border-color: var(--green); }
.menu-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 50; }
.menu-panel { position: absolute; top: 0; right: 0; height: 100%; width: 260px; background: var(--card); box-shadow: -2px 0 12px var(--shadow); padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.menu-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; margin-bottom: 6px; }
.menu-item { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 12px; font-size: 14px; cursor: pointer; text-decoration: none; }
.fb-modal { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.fb-box { background: var(--card); border-radius: 12px; padding: 16px; width: 100%; max-width: 420px; }
.fb-box h3 { margin: 0 0 6px; }
.fb-sub { font-size: 12px; color: var(--sub); margin: 0 0 8px; }
.fb-box textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px; font-size: 14px; background: var(--bg); color: var(--ink); }
.fb-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.chip.primary { background: var(--green); color: #fff; border-color: var(--green); }
.fb-done { color: var(--green); font-weight: 700; font-size: 14px; }
.filters { padding: 0 10px 8px; background: var(--bg); flex: none; }
.chip-row { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 16px; padding: 5px 10px; font-size: 13px; white-space: nowrap; cursor: pointer; }
.chip.active, .chip.toggle.on { background: var(--green); color: #fff; border-color: var(--green); }
#stage { flex: 1; position: relative; overflow: hidden; }
#map { position: absolute; inset: 0; }
#sheet { position: absolute; left: 0; right: 0; bottom: 0; top: 38%; background: var(--bg); border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 16px var(--shadow); display: flex; flex-direction: column; transition: top .22s ease; }
#sheetHandle { flex: none; padding: 16px 0 10px; cursor: grab; touch-action: none; }
#sheetHandle::before { content: ""; display: block; width: 64px; height: 6px; border-radius: 3px; background: var(--line); margin: 0 auto; }
main { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 4px 12px 20px; }
h2 { flex: none; font-size: 15px; margin: 0 14px 6px; padding: 2px 0; cursor: grab; touch-action: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; box-shadow: 0 1px 3px var(--shadow); cursor: pointer; display: flex; gap: 10px; }
.card .body { flex: 1; min-width: 0; }
.spoticon { flex: none; width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.card.sel { outline: 2px solid var(--green); }
.card .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card .name { font-weight: 700; font-size: 15px; }
.crowd { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 10px; color: #fff; white-space: nowrap; }
.crowd.lv0 { background: var(--lv0); }
.crowd.lv1 { background: var(--lv1); }
.crowd.lv2 { background: var(--lv2); }
.badges { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; font-size: 11px; color: var(--sub); }
.badges span { background: var(--badge); border-radius: 8px; padding: 1px 7px; }
.note { font-size: 12px; color: var(--sub); margin-top: 4px; }
.gomap { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; text-decoration: none;
  background: var(--green); color: #fff; border-radius: 16px; padding: 7px 16px; }
footer { padding: 10px 2px 30px; font-size: 11px; color: var(--sub); }
footer a { color: var(--sub); }
[hidden] { display: none !important; }

/* --- 地図上のフローティングコントロール --- */
.mapctl { position: absolute; z-index: 5; display: flex; gap: 8px; }
.mapctl-tl { top: 8px; left: 10px; flex-wrap: wrap; max-width: 60%; }
.mapctl-tr { top: 8px; right: 10px; flex-direction: column; align-items: flex-end; gap: 6px; }
.selwrap { position: relative; }
.selwrap::after { content: "▾"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  pointer-events: none; font-size: 12px; color: var(--sub); }
.selwrap select { appearance: none; -webkit-appearance: none; border: none; outline: none;
  background: var(--card); color: var(--ink); font-family: inherit; font-size: 14px; font-weight: 700;
  border-radius: 20px; padding: 9px 30px 9px 14px; box-shadow: 0 2px 6px rgba(0,0,0,.28); cursor: pointer; }
.mapbtn { border: none; background: var(--card); color: var(--ink); font-family: inherit;
  font-size: 14px; font-weight: 700; line-height: 1; border-radius: 20px; padding: 11px 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,.28); cursor: pointer; white-space: nowrap; }
.mapbtn.on { background: var(--green); color: #fff; }

/* --- 設備バッジ（駐車場・オムツ替え・授乳室・日陰）--- */
.amen { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 4px; font-size: 11px; }
.amen .am { border-radius: 8px; padding: 1px 7px; white-space: nowrap; }
.amen .yes { background: #e6f4ec; color: #17603f; }
.amen .no { background: var(--badge); color: var(--sub); }
[data-theme="dark"] .amen .yes { background: #1d3b2c; color: #7fd3a9; }
.empty-note { color: var(--sub); font-size: 13px; line-height: 1.7; padding: 10px 4px; }
footer .lead { line-height: 1.8; margin-bottom: 10px; }

/* お知らせの未読を示す赤い点 */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #d64541; margin-left: 6px; vertical-align: 1px; }
.themebtn.has-dot { position: relative; }
.themebtn.has-dot::after { content: ""; position: absolute; top: 2px; right: 2px; width: 8px; height: 8px;
  border-radius: 50%; background: #d64541; border: 2px solid var(--bg); }

/* Googleマップの案内。選択せずにボタンを押す人にも伝わるよう全カードに出す */
.gomap-hint { font-size: 11px; color: var(--sub); margin: 4px 0 0; line-height: 1.45; }

/* 密度が要る要素は行間を詰める（body の 1.6 を上書き） */
.chip, .crowd, .badges, .amen, .mapbtn, .selwrap select { line-height: 1.35; }
.card .name { line-height: 1.45; }
