/* 地図の上で経路を指で直す部品（web/public/routemap.js）。航空情報タブの経路間の地図など */
.r-view.rm-edit { -webkit-touch-callout: none; }
.rm-tools { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.rm-tools button, .rm-help { border: 1px solid var(--rv-thumb-line, var(--line)); background: var(--card); color: var(--text); border-radius: 8px; font-size: .78rem; font-weight: 700; padding: 7px 10px; cursor: pointer; box-shadow: 0 1px 4px rgb(0 0 0 / .25); }
.rm-tools button:disabled { opacity: .45; cursor: default; }
.rm-help { position: absolute; top: 48px; right: 10px; width: 34px; height: 34px; padding: 0; border-radius: 50%; font-size: .95rem; }

.rm-hint { position: absolute; left: 10px; bottom: 10px; width: min(280px, calc(100% - 20px)); background: rgb(20 28 40 / .86); color: #eef2f7; border-radius: 10px; padding: 6px 10px; box-shadow: 0 4px 16px rgb(0 0 0 / .3); font-size: .72rem; line-height: 1.4; pointer-events: none; }
.rm-hint .rm-x { pointer-events: auto; }
.rm-hint p { margin: 0 0 3px; font-weight: 700; color: #ffcf6e; font-size: .75rem; letter-spacing: .04em; }
.rm-hint ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; color: #b9c3d0; }
.rm-hint b { color: #fff; margin-right: 6px; }
.rm-x { position: absolute; right: 4px; top: 2px; width: 30px; height: 30px; border: 0; background: none; color: inherit; opacity: .7; font-size: 1.1rem; cursor: pointer; }

/* 引っぱっている間、指の上に出す吹き出し（指で隠れないように上に） */
.rm-callout { position: absolute; z-index: 6; transform: translate(-50%, calc(-100% - 46px)); background: #1b1f26; color: #fff; border-radius: 10px; padding: 6px 10px; font-size: .75rem; white-space: nowrap; pointer-events: none; box-shadow: 0 4px 14px rgb(0 0 0 / .35); text-align: center; }
.rm-callout b { display: block; font-size: 1rem; }
.rm-callout span { color: #b9c3d0; }
.rm-callout.none b { color: #ffcf6e; font-size: .85rem; }
.rm-callout::after { content: ""; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%) rotate(45deg); width: 12px; height: 12px; background: #1b1f26; }

/* 長押し・点のタップ・どれにするかの吹き出し */
.rm-pop { position: absolute; z-index: 8; width: min(330px, calc(100% - 16px)); max-height: calc(100% - 16px); overflow: auto; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 30px rgb(0 0 0 / .3); font-size: .85rem; cursor: auto; }
.rm-pop-h { display: flex; align-items: center; gap: 8px; padding: 9px 12px 7px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); }
.rm-pop-h p { margin: 0; flex: 1; font-weight: 700; }
.rm-pop-h .rm-x { position: static; color: var(--muted); }
.rm-row { display: grid; grid-template-columns: 26px 1fr; gap: 0 8px; padding: 7px 12px; border-bottom: 1px solid var(--line); align-items: center; }
.rm-ic { grid-row: span 2; width: 26px; height: 26px; }
.rm-nm { font-weight: 700; font-size: .95rem; min-width: 0; overflow-wrap: anywhere; }
.rm-nm small { font-weight: 500; font-size: .75rem; color: var(--muted); margin-left: 6px; }
.rm-kd { font-size: .72rem; color: var(--muted); overflow-wrap: anywhere; }
.rm-acts { grid-column: 2; display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.rm-row.pick { cursor: pointer; }
.rm-row.pick:hover, .rm-row.pick:focus-visible { background: var(--accent-soft, #eef3f9); }
.rm-row.spot { background: rgb(229 57 53 / .07); }
.rm-spot { color: #d32f2f; }
.rm-btn { border: 1px solid var(--line); border-radius: 7px; padding: 5px 9px; font-size: .75rem; font-weight: 700; cursor: pointer; background: var(--card); color: var(--text); }
.rm-btn.main { background: #e53935; border-color: #e53935; color: #fff; }
.rm-btn.danger { color: #c62828; }
.rm-note { margin: 0; padding: 7px 12px 9px; font-size: .75rem; color: var(--muted); line-height: 1.5; }

#rm-toast { position: fixed; z-index: 50; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 12px); background: #1b1f26; color: #fff; padding: 9px 14px; border-radius: 10px; font-size: .85rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); text-align: center; box-shadow: 0 4px 14px rgb(0 0 0 / .35); }
#rm-toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { #rm-toast { transition: none; } }
