* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%;
  font-family: Roboto, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  color: #202124;
}
#map { position: absolute; inset: 0; }

/* ---- 左上の浮きカード（本家My Mapsのパネル） ---- */
#panel {
  position: absolute; top: 10px; left: 10px; z-index: 30;
  width: 300px; background: #fff; border-radius: 2px;
  box-shadow: 0 1px 6px rgba(0,0,0,.3);
}
.pn-title-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 8px 2px 16px;
}
#map-title {
  font-size: 18px; font-weight: 400; cursor: pointer;
  padding: 2px 6px; margin-left: -6px; border-radius: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#map-title:hover { background: #f1f3f4; }
#btn-menu {
  border: none; background: none; cursor: pointer; font-size: 16px;
  color: #5f6368; padding: 4px 10px; border-radius: 4px; font-weight: 700;
}
#btn-menu:hover { background: #f1f3f4; }
.pn-meta { padding: 0 16px 8px; font-size: 12px; color: #5f6368; min-height: 18px; }
.st-dirty { color: #ea8600 !important; }
.st-saving { color: #1a73e8 !important; }
.st-ok { color: #188038 !important; }
.st-err { color: #d93025 !important; }

.pn-actions {
  display: flex; align-items: center; gap: 2px;
  padding: 6px 8px; background: #f8f9fa;
  border-top: 1px solid #e8eaed; border-bottom: 1px solid #e8eaed;
}
.pn-actions button {
  border: none; background: none; cursor: pointer;
  font-size: 13px; color: #202124; padding: 6px 8px; border-radius: 4px;
  white-space: nowrap;
}
.pn-actions button:hover { background: #e8eaed; }
.pn-bottom {
  padding: 8px 12px; border-top: 1px solid #e8eaed;
}
.pn-bottom select {
  width: 100%; border: 1px solid #dadce0; border-radius: 4px; background: #fff;
  font-size: 12px; padding: 5px 6px; color: #202124;
}
.pn-bottom select + select { margin-top: 6px; }

/* レイヤ行 */
.ly-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px 6px 12px; font-size: 13px;
}
.ly-row input[type="checkbox"] { margin: 0; cursor: pointer; }
.ly-name {
  flex: 1; cursor: pointer; padding: 3px 6px; border-radius: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ly-name:hover { background: #f1f3f4; }
.ly-active .ly-name { font-weight: 700; }
.ly-active { border-left: 3px solid #1a73e8; padding-left: 9px; }
.ly-menu {
  border: none; background: none; cursor: pointer; color: #5f6368;
  padding: 2px 8px; border-radius: 4px; font-weight: 700;
}
.ly-menu:hover { background: #f1f3f4; }
.ly-items { padding-left: 24px; }
.fl-off { opacity: .45; cursor: default; }
.ly-import {
  border: none; background: none; cursor: pointer;
  color: #1a73e8; font-size: 12px; padding: 4px 8px; border-radius: 4px;
  display: block; margin: 2px 0 4px;
}
.ly-import:hover { background: #f1f3f4; }

#layer-menu[hidden] { display: none !important; }
#layer-menu {
  position: fixed; z-index: 50; min-width: 150px;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid #dadce0; border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,.2); overflow: hidden; padding: 4px 0;
}
#layer-menu button {
  border: none; border-radius: 0; text-align: left;
  padding: 8px 14px; font-size: 13px; background: #fff; cursor: pointer;
}
#layer-menu button:hover { background: #f1f3f4; }

#feature-list { max-height: 50vh; overflow-y: auto; padding: 4px 8px 8px; }
.fl-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: 4px; cursor: pointer; font-size: 13px;
}
.fl-row:hover { background: #f1f3f4; }
.fl-ic { flex-shrink: 0; width: 18px; height: 18px; }
.fl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ⋮メニュー */
#menu-wrap { position: relative; }
#main-menu[hidden] { display: none !important; }
#main-menu {
  position: absolute; top: 30px; right: 0; z-index: 40;
  display: flex; flex-direction: column; min-width: 200px;
  background: #fff; border: 1px solid #dadce0; border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,.2); overflow: hidden; padding: 4px 0;
}
#main-menu button {
  border: none; border-radius: 0; text-align: left;
  padding: 9px 16px; font-size: 13px; background: #fff; cursor: pointer;
  white-space: nowrap;
}
#main-menu button:hover { background: #f1f3f4; }
.mi-danger { color: #d93025; }

/* ---- 編集パネル: 本家の情報ウィンドウ風（図形のそばに出す。位置はJSが設定） ---- */
#edit-panel {
  position: absolute; left: 12px; top: 60px; z-index: 20;
  width: 250px; background: #fff; border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,.28); padding: 14px 16px 8px;
}
#ep-close {
  position: absolute; top: 8px; right: 8px;
  border: none; background: none; cursor: pointer; padding: 4px;
  border-radius: 50%; line-height: 0;
}
#ep-close:hover { background: #f1f3f4; }
/* 閲覧（デフォルト） */
#ep-title-view {
  font-size: 16px; font-weight: 700; padding-right: 22px; margin-bottom: 4px;
  word-break: break-all;
}
#ep-desc-view {
  font-size: 12.5px; color: #3c4043; white-space: pre-wrap;
  margin-bottom: 6px; max-height: 30vh; overflow-y: auto;
}
#ep-meta { font-size: 12px; color: #5f6368; }
#ep-view .ep-foot { margin-top: 14px; }

/* 編集フォーム */
#ep-title, #ep-desc {
  display: block; width: calc(100% - 20px);
  border: none; border-bottom: 1px solid #dadce0; border-radius: 0;
  padding: 4px 0 5px; margin-bottom: 12px;
  font-family: inherit; background: none; resize: none;
}
#ep-title { font-size: 15px; font-weight: 500; }
#ep-desc { font-size: 12.5px; color: #3c4043; width: 100%; }
#ep-title:focus, #ep-desc:focus {
  outline: none; border-bottom: 2px solid #1a73e8; padding-bottom: 4px;
}
#ep-title::placeholder, #ep-desc::placeholder { color: #9aa0a6; font-weight: 400; }
.ep-btns { display: flex; gap: 8px; padding: 2px 0 6px; }
#ep-save {
  background: #1a73e8; color: #fff; border: none; border-radius: 4px;
  padding: 7px 18px; font-size: 13px; cursor: pointer;
}
#ep-save:hover { background: #1765cc; }
#ep-cancel {
  background: #f1f3f4; border: none; border-radius: 4px;
  padding: 7px 14px; font-size: 13px; cursor: pointer;
}
#ep-cancel:hover { background: #e8eaed; }
#ep-back {
  border: none; background: none; color: #1a73e8; font-size: 12px;
  cursor: pointer; padding: 4px 8px; border-radius: 4px;
}
#ep-back:hover { background: #f1f3f4; }

#ep-colors { display: grid; grid-template-columns: repeat(13, 13px); gap: 2px; margin-bottom: 4px; }
.pal {
  width: 13px; height: 13px; border-radius: 0; border: none;
  cursor: pointer; padding: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.pal-active { outline: 2px solid #1a73e8; outline-offset: -1px; z-index: 1; position: relative; }

.ep-width-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #5f6368; margin: 8px 0 2px; }
#ep-width { flex: 1; }
#ep-width-num {
  width: 58px; font-size: 12px; font-family: monospace;
  border: 1px solid #dadce0; border-radius: 0; padding: 2px 4px;
}
#ep-width-num:focus { outline: none; border-color: #1a73e8; }
#ep-width-num {
  width: 52px; font-size: 12px; font-family: monospace;
  border: 1px solid #dadce0; border-radius: 0; padding: 2px 4px;
}
#ep-width-num:focus { outline: none; border-color: #1a73e8; }
.ep-width-row[hidden] { display: none !important; }

.ep-foot { display: flex; align-items: center; padding: 6px 0 4px; }
.ep-grow { flex: 1; }
#ep-color-custom {
  width: 28px; height: 14px; padding: 0; border: 1px dashed #9aa0a6;
  border-radius: 0; cursor: pointer; background: none;
  -webkit-appearance: none; appearance: none;
}
#ep-color-custom::-webkit-color-swatch-wrapper { padding: 1px; }
#ep-color-custom::-webkit-color-swatch { border: none; border-radius: 1px; }
#ep-color-custom.pal-active { outline: 2px solid #1a73e8; outline-offset: 1px; border-style: solid; }
#ep-color-hex {
  width: 68px; margin-left: 6px; font-size: 12px; font-family: monospace;
  border: 1px solid #dadce0; border-radius: 0; padding: 2px 4px;
}
#ep-color-hex:focus { outline: none; border-color: #1a73e8; }
#ep-delete, #ep-edit, #ep-style {
  border: none; background: none; cursor: pointer; padding: 6px;
  border-radius: 4px; line-height: 0;
}
#ep-delete:hover, #ep-edit:hover, #ep-style:hover { background: #f1f3f4; }
#ep-delete:hover path { fill: #d93025; }

/* ---- 地図コントロール ---- */
.maplibregl-ctrl-group { border-radius: 4px !important; }
.maplibregl-ctrl-group button { border-radius: 0 !important; }
/* 描画ツールバーは本家同様、上部横並びでカードの右隣 */
.maplibregl-ctrl-top-left .maplibregl-ctrl { margin: 10px 0 0 320px; }
.maplibregl-ctrl-top-left .maplibregl-ctrl-group { display: flex; flex-direction: row; }
.maplibregl-ctrl-top-left .maplibregl-ctrl-group button { border-top: none; }
/* 伸縮トグル・全図形削除・選択削除ボタンは出さない（削除はカードのゴミ箱から） */
.maplibregl-terradraw-render-button,
.maplibregl-terradraw-delete-button,
.maplibregl-terradraw-delete-selection-button { display: none !important; }

/* ---- 通知・ポップオーバー・その場編集 ---- */
#toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  background: #323232; color: #fff; padding: 10px 20px; border-radius: 4px;
  font-size: 13px; opacity: 0; pointer-events: none;
  transition: opacity .25s; z-index: 100; max-width: 80vw;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#toast.show { opacity: 1; pointer-events: auto; }
#toast button {
  border: none; background: none; color: #8ab4f8; cursor: pointer;
  font-size: 13px; font-weight: 700; margin-left: 14px; padding: 2px 4px;
}

/* 現在地ボタン: モバイルのみ、地図右下（フッターの上）に浮かせる */
#fab-locate { display: none; }
html.mobile #fab-locate {
  display: block; position: fixed; right: 12px; bottom: 124px; z-index: 30;
  width: 42px; height: 42px; background: #fff; border: none; border-radius: 4px;
  box-shadow: 0 1px 6px rgba(0,0,0,.3); cursor: pointer; line-height: 0;
  padding: 11px;
}
html.mobile #fab-locate:active { background: #f1f3f4; }

#share-menu[hidden] { display: none !important; }
#share-menu {
  position: fixed; z-index: 50; width: 300px;
  background: #fff; border: 1px solid #dadce0; border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,.2); padding: 10px;
}
#share-url {
  width: 100%; font-size: 12px; padding: 6px 8px;
  border: 1px solid #dadce0; border-radius: 4px; color: #5f6368;
  margin-bottom: 8px;
}
.sm-row { display: flex; justify-content: flex-end; gap: 6px; }
.sm-row button {
  border: none; background: #f1f3f4; border-radius: 4px; cursor: pointer;
  padding: 6px 12px; font-size: 12px;
}
.sm-row button:hover { background: #e8eaed; }

.inline-edit {
  font: inherit; border: none; border-bottom: 2px solid #1a73e8;
  outline: none; padding: 2px 4px; background: none; min-width: 80px;
}

/* ---- データ読込前はパネル類・地図コントロールを出さない ---- */
.boot { display: none !important; }
html.booting .maplibregl-ctrl { display: none !important; }

/* ---- モバイル: ヘッダーなし・下部フッターバー＋左ドロワー＋ボトムシート ----
   判定はウィンドウ幅でなくデバイス特性、common.jsがhtml.mobileを付与 */
#footer, #add-menu[hidden] { display: none; }
#add-menu[hidden] { display: none !important; }
html.mobile #footer {
  display: flex; align-items: center; justify-content: space-around;
  position: fixed; bottom: 0; left: 0; right: 0; height: 52px;
  background: #fff; border-top: 1px solid #dadce0; z-index: 40;
  padding-bottom: env(safe-area-inset-bottom);
}
#fb-context {
  flex: 1; height: 100%; border: none; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  padding: 0 16px; gap: 1px; overflow: hidden;
}
#fb-context:active { background: #f1f3f4; }
#fb-ctx-main {
  font-size: 14px; font-weight: 500; color: #202124; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#fb-ctx-sub {
  font-size: 11px; color: #5f6368; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#fb-ctx-sub:empty { display: none; }
#fab-add { display: none; }
html.mobile #fab-add {
  display: block; position: fixed; right: 12px; bottom: 68px; z-index: 30;
  width: 46px; height: 46px; background: #1a73e8; color: #fff; border: none;
  border-radius: 4px; font-size: 26px; line-height: 1; cursor: pointer;
  box-shadow: 0 1px 6px rgba(0,0,0,.3); padding: 0;
}
html.mobile #fab-add:active { background: #1765cc; }
#add-menu {
  position: fixed; bottom: 122px; right: 12px;
  z-index: 45; display: flex; flex-direction: column; min-width: 220px;
  background: #fff; border: 1px solid #dadce0; border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,.25); overflow: hidden; padding: 4px 0;
}
#add-menu button {
  border: none; background: #fff; cursor: pointer; text-align: left;
  padding: 11px 16px; font-size: 14px;
}
#add-menu button:active { background: #f1f3f4; }
/* 地図コントロール群はモバイルでは出さない（操作はフッターから） */
html.mobile .maplibregl-ctrl-group { display: none !important; }
html.mobile #map { top: 0; bottom: 52px; }
/* パネルは左ドロワー化。≡で開閉 */
html.mobile #panel { display: none; }
html.mobile.drawer-open #panel {
  display: block; position: fixed; left: 0; right: 0; bottom: 52px; top: auto;
  width: 100%; max-width: none; max-height: 62vh;
  border-radius: 4px 4px 0 0;
  box-shadow: 0 -2px 10px rgba(0,0,0,.3); overflow-y: auto; z-index: 35;
}
/* シート表示中は右下の浮きボタンを引っ込めて干渉を防ぐ */
html.mobile.drawer-open #fab-add, html.mobile.drawer-open #fab-locate,
html.mobile.sheet-open #fab-add, html.mobile.sheet-open #fab-locate { display: none !important; }
html.mobile #feature-list { max-height: none; }
html.mobile #edit-panel {
  left: 0 !important; top: auto !important; right: 0; bottom: 52px; width: 100%;
  border-radius: 4px 4px 0 0; box-shadow: 0 -2px 10px rgba(0,0,0,.3);
}
html.mobile #ep-colors { grid-template-columns: repeat(13, 1fr); }


/* ---- 作成画面（APKの新しいライン/ポイントの追加） ---- */
#create-bar, #create-foot, #crosshair { display: none; }
html.creating #create-bar {
  display: flex; align-items: center; gap: 4px;
  position: fixed; top: 0; left: 0; right: 0; height: 48px;
  background: #1a73e8; color: #fff; z-index: 60;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
#create-bar button {
  border: none; background: none; color: #fff; cursor: pointer;
  font-size: 20px; padding: 10px 16px; line-height: 1;
}
#create-bar button:active { background: rgba(255,255,255,.2); }
#cb-title { flex: 1; font-size: 16px; font-weight: 500; }
/* 照準は地図コンテナ内で絶対中央に置く（100vh計算はURLバーでズレるため使わない） */
html.creating #crosshair {
  display: block; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%); z-index: 5; pointer-events: none;
  font-size: 30px; font-weight: 700; color: #202124;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff;
}
html.creating #create-foot {
  display: flex; align-items: center;
  position: fixed; bottom: 0; left: 0; right: 0; height: 52px;
  background: #fff; border-top: 1px solid #dadce0; z-index: 60;
  padding: 0 8px env(safe-area-inset-bottom);
}
#create-foot button {
  border: none; background: none; cursor: pointer; color: #5f6368;
  font-size: 22px; padding: 6px 18px; border-radius: 4px; line-height: 1;
}
#create-foot button:disabled { opacity: .3; }
#create-foot button:active { background: #f1f3f4; }
.cf-grow { flex: 1; }
#cf-undo[hidden], #cf-redo[hidden], #cf-clear[hidden] { display: none !important; }
html.creating #create-foot[hidden] { display: none !important; }
/* 作成中は通常フッターを引っ込める（＋は頂点追加ボタンとして残す） */
html.creating #footer { display: none !important; }
html.creating #fab-locate { display: none !important; }


/* ---- 作成スキームの命名画面（赤バーと✓の位置は作成画面と同一） ---- */
#name-form { display: none; }
html.naming #name-form {
  display: block; position: fixed; top: 48px; left: 0; right: 0;
  background: #fff; padding: 18px 16px; z-index: 55;
  border-bottom: 1px solid #dadce0; box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
#nf-title, #nf-desc {
  display: block; width: 100%;
  border: none; border-bottom: 1px solid #dadce0; border-radius: 0;
  padding: 6px 0; margin-bottom: 14px;
  font-family: inherit; font-size: 15px; background: none; resize: none;
}
#nf-title { font-weight: 500; }
#nf-desc { font-size: 13px; color: #3c4043; margin-bottom: 2px; }
#nf-title:focus, #nf-desc:focus { outline: none; border-bottom: 2px solid #1a73e8; padding-bottom: 5px; }
html.naming #crosshair, html.naming #create-foot, html.naming #fab-add { display: none !important; }


/* 出典表記(attribution)は＋の左に置く */
html.mobile .maplibregl-ctrl-bottom-right {
  right: 66px;
}
html.mobile.drawer-open .maplibregl-ctrl-bottom-right,
html.mobile.sheet-open .maplibregl-ctrl-bottom-right,
html.mobile.creating .maplibregl-ctrl-bottom-right { display: none; }


/* ドラッグ並び替えのドロップ位置表示 */
.drag-over { box-shadow: inset 0 2px 0 0 #1a73e8; }


/* 線種見本ボタン */
#ep-dash-current {
  flex: 1; border: 1px solid #dadce0; background: #fff; cursor: pointer;
  padding: 5px 6px; border-radius: 0; line-height: 0; text-align: center;
}
#ep-dash-current:hover { background: #f1f3f4; }
#dash-menu[hidden] { display: none !important; }
#dash-menu {
  position: fixed; z-index: 60; display: flex; flex-direction: column;
  background: #fff; border: 1px solid #dadce0; border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,.25); padding: 4px;
}
.dash-opt {
  border: 1px solid #dadce0; background: #fff; cursor: pointer;
  padding: 5px 4px; border-radius: 0; line-height: 0; flex: 1;
}
.dash-opt:hover { background: #f1f3f4; }
.dash-opt.dash-active { outline: 2px solid #1a73e8; outline-offset: -1px; }


/* スクショ範囲選択 */
#snip-overlay[hidden] { display: none !important; }
#snip-overlay {
  position: absolute; inset: 0; z-index: 70;
  cursor: crosshair; background: rgba(0,0,0,.25);
}
#snip-rect {
  position: absolute; display: none; pointer-events: none;
  border: 2px solid #ffffff; outline: 1px solid #1a73e8;
  background: rgba(255,255,255,.08);
}
#btn-shot { display: flex; align-items: center; justify-content: center; }


/* ログイン画面 */
#login-view[hidden] { display: none !important; }
#login-view {
  position: fixed; inset: 0; z-index: 90;
  background: #e8eaed;
  display: flex; align-items: center; justify-content: center;
}
#login-card {
  background: #fff; width: 320px; max-width: calc(100vw - 48px);
  padding: 28px 28px 24px; box-shadow: 0 1px 4px rgba(0,0,0,.3);
  display: flex; flex-direction: column; gap: 12px;
}
.lg-title { font-size: 20px; color: #202124; margin-bottom: 4px; }
#login-card input {
  border: 1px solid #dadce0; padding: 9px 10px; font-size: 14px; outline: none;
}
#login-card input:focus { border-color: #1a73e8; }
#lg-error { color: #d93025; font-size: 12px; min-height: 14px; }
#lg-submit {
  background: #1a73e8; color: #fff; border: none; padding: 9px 0;
  font-size: 14px; cursor: pointer;
}
#lg-submit:disabled { background: #9ab8e8; }
html.login-open #panel, html.login-open #footer, html.login-open #fab-add,
html.login-open #fab-locate, html.login-open .maplibregl-ctrl-top-left { display: none !important; }


/* ログイン画面の補助 */
#login-card[hidden], #signup-card[hidden] { display: none !important; }
#signup-card {
  background: #fff; width: 320px; max-width: calc(100vw - 48px);
  padding: 28px 28px 24px; box-shadow: 0 1px 4px rgba(0,0,0,.3);
  display: flex; flex-direction: column; gap: 12px;
}
.lg-link {
  background: none; border: none; color: #1a73e8; font-size: 13px;
  cursor: pointer; padding: 2px 0; text-align: center;
}
.lg-sub { font-size: 12px; color: #5f6368; line-height: 1.5; }
#su-error { color: #d93025; font-size: 12px; min-height: 14px; }


/* 線上メニュー（右クリック/＋） */
#line-menu[hidden] { display: none !important; }
#line-menu {
  position: fixed; z-index: 80; background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.3); min-width: 160px;
  display: flex; flex-direction: column; padding: 4px 0;
}
#line-menu button {
  background: none; border: none; text-align: left; font-size: 13px;
  padding: 8px 14px; cursor: pointer; color: #202124;
}
#line-menu button:hover { background: #f1f3f4; }
#ep-addon { font-size: 16px; }
html:not(.mobile) #ep-addon { display: none !important; }


/* 連動長方形のサイズ入力 */
#ep-rect-row[hidden] { display: none !important; }
#ep-rect-row input { width: 64px; }


/* 連動図形ドラッグ中はカードにポインタを奪わせない */
html.rect-drag #edit-panel { pointer-events: none; }
#olm-extend[hidden] { display: none !important; }


/* 左メニューの親子関係 */
.fl-row.fl-child { padding-left: 28px; position: relative; }
.fl-row.fl-child::before {
  content: ''; position: absolute; left: 14px; top: 0; bottom: 50%;
  border-left: 1px solid #dadce0; border-bottom: 1px solid #dadce0; width: 8px;
}
.fl-badge {
  margin-left: auto; font-size: 11px; color: #5f6368;
  background: #f1f3f4; padding: 0 5px; min-width: 16px; text-align: center;
}


/* 形の編集ボタンはモバイル専用 */
#ep-geom[hidden] { display: none !important; }
html:not(.mobile) #ep-geom { display: none !important; }
/* 図形（ポリゴン）編集中は頂点追加の＋を出さない */
html.creating.no-vertex-add #fab-add { display: none !important; }


#ep-sync-row[hidden], #olm-ungroup[hidden] { display: none !important; }
#ep-sync-row label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #5f6368; }
.fl-badge.fl-group { background: #e8f0fe; color: #1a73e8; }


/* 子要素の折りたたみ */
#ep-strength-row[hidden] { display: none !important; }
#ep-strength { width: 72px; }
.fl-toggle {
  background: none; border: none; cursor: pointer; color: #5f6368;
  width: 16px; padding: 0; font-size: 10px; line-height: 1; flex: none;
}
.fl-row .fl-spacer { width: 16px; flex: none; }


/* 入れ子の深さに応じた接続線 */
.fl-row.fl-child::before { left: var(--ind, 14px); }


/* スマホ: 行の長押しでテキスト選択・コールアウトを出さない */
html.mobile .fl-row { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }


#cf-move { display: flex; align-items: center; justify-content: center; }
#cf-move[hidden] { display: none !important; }


/* 広告枠 */
#ad-slot[hidden] { display: none !important; }
#ad-slot { border-top: 1px solid #dadce0; }
#ad-slot iframe { display: block; width: 100%; height: 110px; border: 0; }

/* 退会カード */
#withdraw-view[hidden] { display: none !important; }
#withdraw-view {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(32, 33, 36, .5);
  display: flex; align-items: center; justify-content: center;
}
#withdraw-card {
  background: #fff; width: 320px; max-width: calc(100vw - 48px);
  padding: 28px 28px 24px; box-shadow: 0 1px 4px rgba(0,0,0,.3);
  display: flex; flex-direction: column; gap: 12px;
}
#withdraw-card input {
  border: 1px solid #dadce0; padding: 9px 10px; font-size: 14px; outline: none;
}
#wd-error { color: #d93025; font-size: 12px; min-height: 14px; }
.wd-danger { background: #d93025; color: #fff; border: none; padding: 9px 0; font-size: 14px; cursor: pointer; }
.wd-danger:disabled { background: #e8a09a; }


.lg-legal { display: flex; gap: 14px; justify-content: center; margin-top: 2px; }
.lg-legal a { color: #5f6368; font-size: 11px; text-decoration: none; }

/* point button: replace default ring icon with a place pin */
.maplibregl-terradraw-add-point-button,
.maplibregl-terradraw-measure-add-point-button {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%235f6368' d='M12 2C8.7 2 6 4.7 6 8c0 4.4 6 12 6 12s6-7.6 6-12c0-3.3-2.7-6-6-6zm0 8.4a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8z'/%3E%3C/svg%3E") !important;
  background-size: 17px 17px !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}

/* お試しモードのバナー */
#try-banner {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
  padding: 7px 12px;
  font-size: 12.5px;
  color: #3c4043;
  max-width: calc(100vw - 20px);
}
#try-banner button {
  flex: none;
  border: 0;
  background: #1a73e8;
  color: #fff;
  font-size: 12.5px;
  padding: 5px 12px;
  border-radius: 5px;
  cursor: pointer;
}
html.mobile #try-banner {
  top: auto;
  bottom: 84px;
}
html.login-open #try-banner { display: none; }
#try-banner[hidden] { display: none; }
