/* 実地図のGoogleマップ風配置（2026-11-25 ユーザー指定の参考画像）：上に検索バーと絞込みチップ、右に丸ボタン、下に引き出しシート */
.gm{--gm-ink:#171b19;--gm-muted:#646b67;--gm-line:#e3e6e3;--gm-surface:#f3f4f3;--gm-green:#268c75;--gm-green-ink:#176b55;--gm-tint:#e2f0eb;--gm-shadow:0 2px 10px #171b1929;--gm-float:0 8px 32px #171b1926}
.gm .gm-top{position:absolute;top:calc(10px + env(safe-area-inset-top,0px));left:12px;right:12px;z-index:4;display:grid;gap:8px;pointer-events:none}
.gm .gm-top>*{pointer-events:auto}
.gm-search{display:flex;align-items:center;gap:8px;height:56px;padding:6px 6px 6px 16px;background:#fff;border-radius:999px;box-shadow:var(--gm-shadow);max-width:560px}
.gm-search:focus-within{box-shadow:0 0 0 2px var(--gm-green),var(--gm-shadow)}
.gm-search>svg{width:22px;height:22px;flex:none;fill:none;stroke:var(--gm-muted);stroke-width:2;stroke-linecap:round}
.gm-search input{flex:1;min-width:0;height:44px;min-height:44px;padding:0;border:0;border-radius:0;background:transparent;font-size:16px;color:var(--gm-ink)}
.gm-search input:focus,.gm-search input:focus-visible{outline:none;background:transparent}
.gm-me{flex:none;width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:50%;background:var(--gm-ink);color:#fff;font-weight:700;font-size:16px}
.gm-me:hover{background:#333a36}
.gm-chips{display:flex;gap:8px;overflow-x:auto;margin:0 -12px;padding:2px 12px 6px;scrollbar-width:none}
.gm-chips::-webkit-scrollbar{display:none}
.chip{flex:none;display:inline-flex;align-items:center;gap:6px;height:44px;min-height:44px;padding:0 16px;border-radius:999px;background:#fff;border:1px solid var(--gm-line);box-shadow:0 1px 4px #171b191a;font-size:14px;color:var(--gm-ink);white-space:nowrap}
.chip span{font-size:13px;color:var(--gm-muted);font-variant-numeric:tabular-nums}
.chip.on{background:var(--gm-tint);border-color:var(--gm-green);color:var(--gm-green-ink);font-weight:700}
.chip.on span{color:var(--gm-green-ink)}
.chip.add{color:var(--gm-green-ink);border-color:var(--gm-green);font-weight:700}
.gm #map-message{justify-self:start;max-width:100%;margin:0;padding:8px 14px;border-radius:999px;background:var(--gm-ink);color:#fff;font-size:13px;line-height:1.5;box-shadow:var(--gm-shadow)}
.gm #map-message:empty{display:none}
.gm-menu{max-width:560px;max-height:55dvh;overflow:auto;padding:16px;background:#fff;border-radius:24px;box-shadow:var(--gm-float)}
.gm-menu h2{font-size:16px;margin:0}
.gm-menu .actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}
.gm-menu .actions>*{min-width:0;font-size:14px}
.gm-menu .sub{margin-top:12px}

.fab{display:grid;place-items:center;width:48px;height:48px;min-height:48px;padding:0;border:0;border-radius:50%;background:#fff;color:var(--gm-ink);box-shadow:var(--gm-shadow)}
.fab:hover{background:var(--gm-surface)}
.fab svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.gm-layers{position:absolute;z-index:4;right:12px;top:calc(132px + env(safe-area-inset-top,0px));background:var(--gm-tint);color:var(--gm-green-ink)}
.gm-layers:hover{background:#d3e9e1}
.gm-layer-menu{position:absolute;z-index:5;right:68px;top:calc(124px + env(safe-area-inset-top,0px));display:grid;gap:4px;width:160px;padding:8px;background:#fff;border-radius:20px;box-shadow:var(--gm-float)}
.gm-layer-menu button{border:0;border-radius:14px;text-align:left;font-size:14px;padding:10px 14px}
.gm-layer-menu button.on{background:var(--gm-tint);color:var(--gm-green-ink);font-weight:700}

.map-sheet{position:absolute;z-index:4;left:0;right:0;bottom:0;display:flex;flex-direction:column;height:104px;background:#fff;border-radius:24px 24px 0 0;box-shadow:0 -4px 24px #171b191f;transition:height .25s ease}
.map-sheet[data-state="half"]{height:46%}
.map-sheet[data-state="full"]{height:88%}
.map-sheet.dragging{transition:none}
.sheet-grab{flex:none;display:grid;place-items:center;height:36px;cursor:grab;touch-action:none}
.sheet-grab span{width:48px;height:6px;border-radius:999px;background:#c9cec9}
.sheet-head{cursor:grab;touch-action:none;padding-bottom:4px}
.map-sheet[data-state="peek"]{cursor:grab;touch-action:none}
.map-sheet[data-state="peek"]:has(.sheet-empty){height:164px}
.sheet-empty{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:10px}
.sheet-empty span{font-size:13px;color:var(--gm-muted)}
.sheet-grab:focus-visible{outline:3px solid var(--gm-green);outline-offset:-3px;border-radius:24px 24px 0 0}
.sheet-body{position:relative;flex:1;min-height:0;overflow:auto;padding:0 20px 16px;overscroll-behavior:contain}
.map-sheet[data-state="peek"] .sheet-body{overflow:hidden}
.sheet-title{margin:0;font-size:22px;line-height:1.3;color:var(--gm-ink)}
.sheet-title b{font-variant-numeric:tabular-nums}
.sheet-head>.sub{margin-top:4px}
.sheet-fabs{position:absolute;right:12px;bottom:calc(100% + 12px);display:grid;gap:12px;transition:opacity .2s}
.map-sheet[data-state="full"] .sheet-fabs{opacity:0;pointer-events:none}
.sheet-close{position:absolute;z-index:1;top:0;right:12px;width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:50%;background:var(--gm-surface);color:var(--gm-muted);font-size:22px;line-height:1}
.map-sheet .property-popup .popup-scroll{max-height:none;padding:0;overflow:visible}
.map-sheet .property-popup h2{margin-right:52px;font-size:20px}
.map-sheet .property-list{max-height:none;margin-top:12px}
.map-sheet .property-item{background:var(--gm-surface);border:0;border-radius:16px;min-height:44px}
.map-sheet .import-preview{margin:4px 0 8px;background:var(--gm-surface);border:0}
.map-sheet .empty-state{padding:16px 0;text-align:left}

/* 地図の部品：ズーム等は指で操作し、独自の丸ボタンを使う。出典表示はシートの上に出す */
.gm .maplibregl-ctrl-top-right{display:none}
.gm .maplibregl-ctrl-bottom-right,.gm .maplibregl-ctrl-bottom-left{bottom:104px}
.gm .maplibregl-ctrl-attrib{font-size:10px;background:#ffffffcc}
.gm .live-pin{min-height:0}

@media(min-width:900px){
  .map-sheet{left:16px;right:auto;width:400px}
  .map-sheet[data-state="half"]{height:52%}
  .gm .gm-top{right:auto;width:min(560px,calc(100% - 24px))}
  .gm .maplibregl-ctrl-bottom-left{left:430px}
}
@media(prefers-reduced-motion:reduce){.map-sheet,.sheet-fabs{transition:none}}
