/* Owan map page: a full-screen terrain map with a "Where to?" panel. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:root { --you: #2F7FD8; --land: #F4F2EC; --shadow: 0 18px 50px rgba(14, 14, 14, .22), 0 3px 10px rgba(14, 14, 14, .12); }

.maphero { background: var(--forest); color: var(--white); padding: calc(78px + 2.2vw) var(--pad) clamp(22px, 2.4vw, 34px); display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap; }
.maphero .h-hero { font-size: clamp(54px, 6.6vw, 104px); color: var(--sun); }
.maphero .lede { margin: 0; max-width: 30rem; color: rgba(255, 255, 255, .88); }

/* ── The map ── */
.mapapp { background: var(--land); }
.mapview { position: relative; height: calc(100svh - 64px); min-height: 600px; max-height: 1100px; overflow: hidden; touch-action: none; cursor: grab; background: var(--land); }
.mapview.is-drag { cursor: grabbing; }
.mapview > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; -webkit-user-select: none; }

.m-relief { image-rendering: auto; }
.m-lgacase { fill: none; stroke: rgba(255, 255, 255, .85); stroke-width: 5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.m-lga { fill: none; stroke: var(--forest); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-dasharray: 10 4 2 4; }
.m-river { fill: none; stroke: #4E95BD; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: .85; }
.m-road { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.m-roadcase { stroke: rgba(70, 58, 30, .35); }
.m-road--main { stroke: var(--sun); }
.m-road--minor { stroke: #FFFFFF; }
.m-lgalabel { font: 800 30px/1 var(--cond); font-stretch: 68%; fill: var(--forest); opacity: .3; text-anchor: middle; pointer-events: none; }
.m-rlabel { font: italic 600 12px/1 var(--body); fill: #2B6E93; pointer-events: none; paint-order: stroke; stroke: rgba(255, 255, 255, .85); stroke-width: 3px; stroke-linejoin: round; }
.m-ctx circle { fill: #8E887A; }
.m-ctx text { font: italic 600 12px/1 var(--body); fill: #6F695C; paint-order: stroke; stroke: var(--land); stroke-width: 3px; }

.m-place circle { fill: var(--ink); stroke: #fff; vector-effect: non-scaling-stroke; stroke-width: 2; }
.m-place.is-major circle { fill: var(--forest); }
.m-place.is-hq rect { fill: var(--sun); stroke: var(--ink); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.m-place text { font: 600 13px/1 var(--body); fill: var(--ink); paint-order: stroke; stroke: rgba(255, 255, 255, .92); stroke-width: 3.5px; stroke-linejoin: round; pointer-events: none; }
.m-place.is-major text { font-weight: 700; font-size: 14px; }
.m-place.is-hq text { font: 800 17px/1 var(--cond); font-stretch: 68%; text-transform: uppercase; letter-spacing: .02em; }
.m-place.is-end text { font-weight: 800; }
.m-place.is-end circle, .m-place.is-end rect { opacity: 0; }

/* route */
.m-routecase { fill: none; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.m-route { fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.m-routeflow { fill: none; stroke: var(--sun); stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; animation: flow 1.6s linear infinite; }
.m-track { fill: none; stroke: var(--ink); stroke-linecap: round; vector-effect: non-scaling-stroke; }
@keyframes flow { to { stroke-dashoffset: -60; } }
.m-route.is-draw, .m-routecase.is-draw { animation: draw 1s var(--ease) both; }
@keyframes draw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }

/* pins (drawn in screen pixels inside a scaled group) */
.m-pin { pointer-events: none; }
.m-pin .drop { animation: pindrop .62s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes pindrop { from { transform: translateY(-46px); opacity: 0; } 60% { opacity: 1; } to { transform: none; opacity: 1; } }
.m-pin .shadow { fill: rgba(14, 14, 14, .28); }
.m-pin--to .body { fill: var(--forest); stroke: #fff; stroke-width: 2.5; }
.m-pin--to .eye { fill: var(--sun); }
.m-pin--from .body { fill: var(--ink); stroke: #fff; stroke-width: 3; }
.m-pin--from .eye { fill: #fff; }
.m-halo { fill: none; stroke: var(--sun); stroke-width: 3; pointer-events: none; animation: halo 1.8s var(--ease) infinite; transform-box: fill-box; transform-origin: center; }
@keyframes halo { from { opacity: 1; transform: scale(.5); } to { opacity: 0; transform: scale(1.9); } }

/* you */
.m-acc { fill: rgba(47, 127, 216, .14); stroke: rgba(47, 127, 216, .45); stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; }
.m-me { fill: var(--you); stroke: #fff; stroke-width: 3; vector-effect: non-scaling-stroke; pointer-events: none; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .35)); }
.m-mepulse { fill: none; stroke: var(--you); stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: none; animation: halo 2s var(--ease) infinite; transform-box: fill-box; transform-origin: center; }

/* ── Map buttons ── */
.mapzoom { position: absolute; top: 16px; right: 16px; display: grid; gap: 8px; z-index: 3; }
.mapzoom button { width: 46px; height: 46px; border: 0; border-radius: 14px; background: var(--white); color: var(--ink); cursor: pointer; box-shadow: 0 4px 14px rgba(14, 14, 14, .16); display: grid; place-items: center; transition: transform .15s, background .2s; }
.mapzoom button:hover { background: var(--sun); }
.mapzoom button:active { transform: scale(.94); }
.mapzoom svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.mapzoom__me { margin-top: 8px; }
.mapzoom__me svg { fill: currentColor; stroke-width: 1.5; }
.mapzoom__me[aria-pressed="true"] { background: var(--you); color: #fff; }
.mapzoom__me.is-wait svg { animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.maphint { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); z-index: 4; margin: 0; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--white); font: 600 14px/1.25 var(--body); text-align: center; max-width: min(460px, calc(100% - 140px)); box-shadow: var(--shadow); pointer-events: none; animation: pop .25s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -8px); } }

/* ── Where to? panel ── */
.mpanel { position: absolute; z-index: 5; left: 16px; top: 16px; width: 392px; max-height: calc(100% - 32px); display: flex; flex-direction: column; background: var(--white); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; cursor: default; touch-action: pan-y; }
.mp-grab { display: none; }
.mp-search, .mp-trip, .mp-addv { padding: 20px 20px 18px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; animation: rise .3s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.mp-title { font: 800 40px/.9 var(--cond); font-stretch: 68%; text-transform: uppercase; margin: 0 0 14px; }
.mp-field { position: relative; display: block; }
.mp-field svg { position: absolute; left: 16px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; pointer-events: none; }
.mp-field input { width: 100%; height: 58px; border: 0; border-radius: 16px; background: var(--mist); color: var(--ink); padding: 0 16px 0 50px; font: 600 18px/1 var(--body); -webkit-appearance: none; appearance: none; transition: box-shadow .2s, background .2s; }
.mp-field input::placeholder { color: rgba(14, 14, 14, .5); }
.mp-field input:focus { outline: none; background: var(--white); box-shadow: 0 0 0 3px var(--sun); }
.mp-label { display: block; margin: 18px 0 8px; font: 800 14px/1 var(--cond); font-stretch: 68%; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mp-chip { height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--mist); color: var(--ink); font: 600 15px/1 var(--body); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: background .15s, transform .15s; }
.mp-chip:hover { background: var(--sun); }
.mp-chip:active { transform: scale(.95); }
.mp-chip small { font-weight: 500; font-size: 13px; color: var(--muted); }
.mp-chip--recent::before { content: ""; width: 14px; height: 14px; background: currentColor; opacity: .55; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center/contain no-repeat; }
.mp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.mp-tool { height: 50px; border: 2px solid var(--ink); border-radius: 14px; background: var(--white); color: var(--ink); font: 800 18px/1 var(--cond); font-stretch: 68%; text-transform: uppercase; letter-spacing: .02em; display: flex; align-items: center; justify-content: center; gap: 9px; cursor: pointer; transition: background .15s, transform .15s; }
.mp-tool:hover { background: var(--sun); }
.mp-tool:active { transform: scale(.97); }
.mp-tool svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.mp-tool svg circle { fill: currentColor; stroke: none; }

.mp-results { list-style: none; margin: 10px -20px 0; padding: 0; }
.mp-results:empty { display: none; }
.mp-results button { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 10px 20px; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); }
.mp-results button:hover, .mp-results button:focus-visible { background: var(--mist); outline: none; }
.mp-results i { width: 40px; height: 40px; border-radius: 50%; background: var(--mist); display: grid; place-items: center; }
.mp-results i::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px #fff; }
.mp-results .is-major i::before { background: var(--forest); }
.mp-results .is-hq i::before { border-radius: 2px; background: var(--sun); box-shadow: 0 0 0 2px var(--ink); }
.mp-results b { display: block; font: 700 16px/1.2 var(--body); }
.mp-results span { display: block; font: 500 13px/1.3 var(--body); color: var(--muted); }
.mp-results em { font: 700 13px/1 var(--body); font-style: normal; color: var(--muted); white-space: nowrap; }
.mp-none { margin: 14px 0 0; font-size: 15px; }

/* trip card */
.mp-head { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: start; }
.mp-back { width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--mist); display: grid; place-items: center; cursor: pointer; }
.mp-back:hover { background: var(--sun); }
.mp-back svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.mp-legs { position: relative; display: grid; gap: 6px; }
.mp-legs::before { content: ""; position: absolute; left: 15px; top: 26px; bottom: 26px; border-left: 2px dotted rgba(14, 14, 14, .35); }
.mp-leg { display: grid; grid-template-columns: 30px 1fr; align-items: center; min-height: 46px; border-radius: 14px; background: var(--mist); padding-right: 6px; }
.mp-leg--to { background: var(--white); border: 2px solid var(--ink); }
.mp-dot { justify-self: center; width: 12px; height: 12px; border-radius: 50%; position: relative; z-index: 1; }
.mp-dot--from { background: var(--ink); box-shadow: 0 0 0 3px #fff; }
.mp-dot--to { background: var(--forest); box-shadow: 0 0 0 3px var(--sun); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.mp-leg select { width: 100%; height: 44px; border: 0; background: transparent; font: 600 16px/1 var(--body); color: var(--ink); cursor: pointer; -webkit-appearance: none; appearance: none; padding-right: 22px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.mp-leg select:focus { outline: none; }
.mp-leg strong { font: 800 26px/1 var(--cond); font-stretch: 72%; text-transform: uppercase; letter-spacing: .01em; padding: 9px 0 7px; }
.mp-stats { display: grid; grid-template-columns: 1fr 1fr; margin: 16px 0 0; border-radius: 18px; background: var(--ink); color: var(--white); overflow: hidden; }
.mp-stats > div { padding: 14px 16px 12px; }
.mp-stats > div + div { border-left: 1px solid rgba(255, 255, 255, .16); }
.mp-stats b { display: block; font: 800 46px/.9 var(--cond); font-stretch: 68%; color: var(--sun); }
.mp-stats span { display: block; margin-top: 4px; font: 600 13px/1.2 var(--body); color: rgba(255, 255, 255, .72); }
.mp-stats.is-wait b { animation: blink 1s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.mp-note { margin: 10px 2px 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.mp-note:empty { display: none; }
.mp-actions { display: grid; grid-template-columns: 1fr 58px; gap: 8px; margin-top: 14px; }
.mp-go { height: 62px; justify-content: center; font-size: 30px; border-radius: 16px; box-shadow: 0 6px 0 #B98F12; transition: transform .1s, box-shadow .1s, background .2s; }
.mp-go:hover { background: #FFD457; border-color: #FFD457; }
.mp-go:active { transform: translateY(4px); box-shadow: 0 2px 0 #B98F12; }
.mp-go .arr { font-size: 24px; }
.mp-share { height: 62px; padding: 0; justify-content: center; border-radius: 16px; color: var(--ink); }
.mp-share svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.mp-facts { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid rgba(14, 14, 14, .12); font-size: 14px; line-height: 1.4; }
.mp-facts dt { font: 800 13px/1.4 var(--cond); font-stretch: 68%; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.mp-facts dd { margin: 0; }
.mp-nearwrap .mp-label { margin-top: 16px; }
.mp-more { display: inline-flex; gap: 6px; margin-top: 12px; font: 700 15px/1.2 var(--body); color: var(--forest); text-decoration: none; }
.mp-more:hover { text-decoration: underline; }

/* legend */
.maplegend { position: absolute; right: 16px; bottom: 16px; z-index: 2; list-style: none; margin: 0; padding: 12px 14px; display: grid; gap: 6px; background: rgba(255, 255, 255, .94); border-radius: 14px; box-shadow: 0 4px 14px rgba(14, 14, 14, .14); font: 600 13px/1.2 var(--body); }
.maplegend li { display: flex; align-items: center; gap: 9px; }
.maplegend i { display: inline-block; flex: none; }
.k-hq { width: 11px; height: 11px; background: var(--sun); border: 2px solid var(--ink); }
.k-seat, .k-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--forest); box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px rgba(0, 0, 0, .15); }
.k-dot { width: 8px; height: 8px; background: var(--ink); margin: 0 1px; }
.k-road { width: 18px; height: 4px; background: var(--sun); border-radius: 2px; box-shadow: 0 0 0 1px rgba(70, 58, 30, .35); }
.k-river { width: 18px; height: 3px; background: #4E95BD; border-radius: 2px; }

/* ── Add my village ── */
.maim { position: absolute; left: 0; top: 0; z-index: 2; width: 34px; height: 51px; margin: -47px 0 0 -17px; pointer-events: none; }
.maim svg { width: 100%; height: 100%; overflow: visible; transition: transform .18s var(--ease); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .25)); }
.maim .sh { fill: rgba(14, 14, 14, .3); transition: transform .18s var(--ease); transform-origin: 0 1px; }
.maim .bd { fill: var(--sun); stroke: var(--ink); stroke-width: 2.5; }
.maim .ey { fill: var(--ink); }
.mapview.is-drag .maim svg { transform: translateY(-10px); }
.mapview.is-drag .maim .sh { transform: translateY(10px) scale(.7); }
.mp-addbtn { width: 100%; height: 50px; margin-top: 8px; border: 2px dashed var(--forest); border-radius: 14px; background: rgba(7, 92, 42, .06); color: var(--forest); font: 800 18px/1 var(--cond); font-stretch: 68%; text-transform: uppercase; letter-spacing: .02em; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: background .15s, transform .15s; }
.mp-addbtn:hover { background: rgba(7, 92, 42, .12); }
.mp-addbtn:active { transform: scale(.98); }
.mp-addbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.mp-link { border: 0; padding: 0; background: none; color: var(--forest); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.mp-head--add { align-items: center; }
.mp-title--add { margin: 0; font-size: 34px; }
.mp-lead { margin: 12px 0 12px; font-size: 15px; line-height: 1.45; }
.mp-tool--wide { width: 100%; }
.mp-tool--wide svg { fill: currentColor; stroke-width: 1.5; }
.mp-where { margin: 10px 0 2px; padding: 10px 12px; border-radius: 12px; background: var(--mist); font: 600 14px/1.35 var(--body); }
.mp-where:empty { display: none; }
.mp-where.is-off { background: #F8E7E1; color: #8a3c2a; }
.mp-in { display: block; margin-top: 12px; }
.mp-in span { display: block; margin-bottom: 6px; font: 800 13px/1.2 var(--cond); font-stretch: 68%; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mp-in small { font: 600 12px var(--body); text-transform: none; letter-spacing: 0; }
.mp-in input { width: 100%; height: 50px; border: 0; border-radius: 14px; background: var(--mist); color: var(--ink); padding: 0 14px; font: 600 17px/1 var(--body); -webkit-appearance: none; appearance: none; box-sizing: border-box; }
.mp-in input:focus { outline: none; background: var(--white); box-shadow: 0 0 0 3px var(--sun); }
.mp-err { margin: 10px 0 0; color: #8a3c2a; font: 700 14px/1.35 var(--body); }
.mp-send { width: 100%; margin-top: 14px; }
.mp-send.is-wait { opacity: .6; pointer-events: none; }
.mp-fine { margin: 12px 2px 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.mp-thanks { text-align: center; padding: 10px 4px 6px; }
.mp-thanks h3 { margin: 10px 0 6px; font: 800 32px/1 var(--cond); font-stretch: 68%; text-transform: uppercase; }
.mp-thanks p { margin: 0 0 16px; font-size: 15px; line-height: 1.45; }
.mp-tick { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--forest); animation: pop .35s var(--ease); }
.mp-tick svg { width: 34px; height: 34px; fill: none; stroke: var(--sun); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* ── Guidance (Start): our own turn-by-turn ── */
.navbar, .navbot, .n-center { display: none; }
.mapview.is-nav .mpanel, .mapview.is-nav .mapzoom, .mapview.is-nav .maplegend, .mapview.is-nav .tm-back { display: none; }
.mapview.is-nav .navbar { display: flex; }
.mapview.is-nav .navbot { display: flex; }
.mapview.is-nav .n-center { display: flex; }
.mapview .n-center[hidden] { display: none; }
.navbar { position: absolute; z-index: 6; top: 12px; left: 12px; right: 12px; max-width: 560px; margin: 0 auto; align-items: center; gap: 14px; padding: 14px 18px 14px 14px; border-radius: 22px; background: var(--forest); color: #fff; box-shadow: var(--shadow); animation: rise .3s var(--ease); }
.n-icon { flex: none; width: 60px; height: 60px; border-radius: 16px; background: rgba(255, 255, 255, .12); display: grid; place-items: center; }
.n-icon svg { width: 42px; height: 42px; fill: none; stroke: var(--sun); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.n-main { min-width: 0; display: grid; gap: 2px; }
.n-main b { font: 800 30px/1 var(--cond); font-stretch: 68%; color: var(--sun); }
.n-main b:empty { display: none; }
.n-main strong { font: 800 20px/1.15 var(--body); }
.n-main span { font: 600 14px/1.25 var(--body); color: rgba(255, 255, 255, .8); }
.n-main span:empty { display: none; }
.navbot { position: absolute; z-index: 6; left: 12px; right: 12px; bottom: 12px; max-width: 560px; margin: 0 auto; align-items: center; gap: 10px; padding: 12px 12px 12px 18px; border-radius: 22px; background: var(--white); box-shadow: var(--shadow); animation: rise .3s var(--ease); }
.n-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.n-info b { font: 800 30px/1 var(--cond); font-stretch: 68%; color: var(--forest); }
.n-info span { font: 600 14px/1.25 var(--body); color: var(--muted); }
.n-btn { flex: none; width: 50px; height: 50px; border: 0; border-radius: 14px; background: var(--mist); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.n-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.n-btn .off, .n-btn[aria-pressed="true"] .on { display: none; }
.n-btn[aria-pressed="true"] .off { display: block; }
.n-end { flex: none; height: 50px; padding: 0 22px; border: 0; border-radius: 14px; background: var(--ink); color: #fff; font: 800 20px/1 var(--cond); font-stretch: 68%; text-transform: uppercase; letter-spacing: .03em; cursor: pointer; }
.n-end:active, .n-btn:active { transform: scale(.95); }
.n-center { position: absolute; z-index: 6; right: 12px; bottom: 104px; height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--white); color: var(--ink); box-shadow: 0 4px 14px rgba(14, 14, 14, .18); align-items: center; gap: 8px; font: 700 15px/1 var(--body); cursor: pointer; }
.n-center svg { width: 18px; height: 18px; fill: var(--you); }
.mp-go svg { width: 24px; height: 24px; fill: currentColor; margin-right: 2px; }
.mp-stepswrap { margin-top: 14px; border-top: 1px solid rgba(14, 14, 14, .12); padding-top: 10px; }
.mp-stepswrap[hidden] { display: none; }
.mp-stepswrap summary { cursor: pointer; font: 700 15px/1.3 var(--body); color: var(--forest); padding: 4px 0; }
.mp-steps { list-style: none; margin: 6px 0 0; padding: 0; }
.mp-steps li { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(14, 14, 14, .07); }
.mp-steps svg { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mp-steps b { display: block; font: 700 15px/1.25 var(--body); }
.mp-steps span { display: block; font: 500 13px/1.3 var(--body); color: var(--muted); }
.mp-steps span:empty { display: none; }
.mp-steps em { font: 600 13px/1 var(--body); font-style: normal; color: var(--muted); white-space: nowrap; }

/* ── Owan Places ── */
.m-poi circle { stroke: #fff; stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.m-poi text { font: 600 12px/1 var(--body); fill: var(--ink); paint-order: stroke; stroke: rgba(255, 255, 255, .92); stroke-width: 3.5px; stroke-linejoin: round; pointer-events: none; }
.m-poi.is-cat circle { stroke-width: 2.6; }
.m-poi.is-end circle { opacity: 0; }
.m-poi.is-end text { font-weight: 800; }
.mp-cat i { width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; }
.mp-catbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--mist); font: 700 14px/1.2 var(--body); }
.mp-catbar[hidden] { display: none; }
.mp-results .is-poi i { border-radius: 12px; }
.mp-results .is-poi i::before { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 3px #fff; }
.m-poi--health circle { fill: #D2453B; }
.mp-cat--health i, .mp-results .is-poi--health i::before { background: #D2453B; }
.m-poi--school circle { fill: #2F6FB0; }
.mp-cat--school i, .mp-results .is-poi--school i::before { background: #2F6FB0; }
.m-poi--market circle { fill: #E08A1E; }
.mp-cat--market i, .mp-results .is-poi--market i::before { background: #E08A1E; }
.m-poi--worship circle { fill: #7A5C9E; }
.mp-cat--worship i, .mp-results .is-poi--worship i::before { background: #7A5C9E; }
.m-poi--fuel circle { fill: #3D3D3D; }
.mp-cat--fuel i, .mp-results .is-poi--fuel i::before { background: #3D3D3D; }
.m-poi--transport circle { fill: #0E7C86; }
.mp-cat--transport i, .mp-results .is-poi--transport i::before { background: #0E7C86; }
.m-poi--hotel circle { fill: #8A3C2A; }
.mp-cat--hotel i, .mp-results .is-poi--hotel i::before { background: #8A3C2A; }
.m-poi--food circle { fill: #C2410C; }
.mp-cat--food i, .mp-results .is-poi--food i::before { background: #C2410C; }
.m-poi--shop circle { fill: #B7791F; }
.mp-cat--shop i, .mp-results .is-poi--shop i::before { background: #B7791F; }
.m-poi--bank circle { fill: #2E7D32; }
.mp-cat--bank i, .mp-results .is-poi--bank i::before { background: #2E7D32; }
.m-poi--community circle { fill: #6B6250; }
.mp-cat--community i, .mp-results .is-poi--community i::before { background: #6B6250; }
.m-poi--government circle { fill: #455A64; }
.mp-cat--government i, .mp-results .is-poi--government i::before { background: #455A64; }

/* add: village or place */
.mp-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 12px; padding: 4px; border-radius: 14px; background: var(--mist); }
.mp-seg button { height: 40px; border: 0; border-radius: 11px; background: transparent; color: var(--ink); font: 700 15px/1 var(--body); cursor: pointer; }
.mp-seg button.is-on { background: var(--white); box-shadow: 0 1px 4px rgba(14, 14, 14, .15); }
.mp-in[hidden] { display: none; }
.mp-in select { width: 100%; height: 50px; border: 0; border-radius: 14px; background: var(--mist); color: var(--ink); padding: 0 14px; font: 600 16px/1 var(--body); box-sizing: border-box; }
.mp-in select:focus { outline: none; box-shadow: 0 0 0 3px var(--sun); }

/* notices on the village card */
.m-place.has-notice circle { stroke: var(--sun); stroke-width: 3.5; }
.mp-nwrap[hidden] { display: none; }
.mp-nwrap .mp-label { margin-top: 16px; }
.mp-notices { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mp-notice { width: 100%; display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; padding: 10px 12px; border: 0; border-radius: 14px; background: var(--mist); color: var(--ink); text-align: left; cursor: pointer; }
.mp-notice i { font: 800 11px/1 var(--body); font-style: normal; text-transform: uppercase; letter-spacing: .05em; padding: 5px 8px; border-radius: 999px; background: var(--white); }
.mp-notice--burial i { background: var(--ink); color: #fff; }
.mp-notice--wedding i { background: var(--sun); }
.mp-notice--event i { background: var(--forest); color: #fff; }
.mp-notice b { display: block; font: 700 15px/1.25 var(--body); }
.mp-notice span { display: block; font: 600 13px/1.3 var(--body); color: var(--muted); }

/* Owan Alert on the map */
.m-danger circle { fill: #B3261E; stroke: #fff; stroke-width: 2.4; vector-effect: non-scaling-stroke; }
.m-danger .ring { fill: rgba(179, 38, 30, .18); stroke: none; animation: dangerpulse 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.m-danger text { fill: #fff; font: 900 14px/1 var(--body); text-anchor: middle; pointer-events: none; }
.m-danger.is-end { opacity: .35; }
@keyframes dangerpulse { 50% { transform: scale(1.35); opacity: .4; } }
.mp-dangerbtn { width: 100%; height: 46px; margin-top: 8px; border: 2px solid #B3261E; border-radius: 14px; background: #FBEAE8; color: #8C1D17; font: 800 15px/1 var(--body); display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.mp-dangerbtn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.mp-guard { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: var(--mist); font: 500 13.5px/1.4 var(--body); cursor: pointer; }
.mp-guard input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--forest); flex: none; }
.mp-guard b { display: block; font: 800 15px/1.3 var(--body); }
.mp-note.is-warn { padding: 10px 12px; border-radius: 12px; background: #FBEAE8; color: #8C1D17; font-weight: 600; }

/* ── Every village ── */
.vlist { list-style: none; margin: clamp(28px, 3.4vw, 48px) 0 0; padding: 0; columns: 5 170px; column-gap: clamp(20px, 3vw, 44px); border-top: 2px solid var(--ink); padding-top: 18px; }
.vlist li { break-inside: avoid; }
.vlist a { display: block; padding: 7px 0; font: 700 17px/1.25 var(--body); color: var(--ink); text-decoration: none; border-bottom: 1px solid rgba(14, 14, 14, .08); }
.vlist a:hover { color: var(--forest); text-decoration: underline; }

/* ── Still to place ── */
.missing { columns: 4 220px; column-gap: clamp(24px, 3vw, 48px); margin-top: clamp(32px, 4vw, 56px); }
.missing section { break-inside: avoid; margin: 0 0 26px; }
.missing h3 { font: 800 22px/1 var(--cond); font-stretch: 68%; text-transform: uppercase; letter-spacing: .02em; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.missing p { margin: 0; font-size: 16px; line-height: 1.7; }
.mapsrc { columns: 2 340px; column-gap: clamp(28px, 4vw, 64px); margin-top: 28px; }
.mapsrc p { margin: 0 0 16px; break-inside: avoid; }
.mapsrc .fine { margin-top: 0; }

/* ── Phone: the panel becomes a bottom sheet ── */
@media (max-width: 760px) {
  /* Phones: the map fills the screen under the bar, like Google Maps; the title stays for search engines. */
  .maphero { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); }
  .mapapp { padding-top: 56px; }
  .mapview { height: calc(100svh - 56px); min-height: 480px; }
  .mapzoom { top: 12px; right: 12px; gap: 6px; }
  .mapzoom button { width: 44px; height: 44px; }
  .mapzoom #zin, .mapzoom #zout { display: none; }
  .maplegend { display: none; }
  .maphint { top: 12px; max-width: calc(100% - 90px); }
  /* A persistent bottom sheet: it rests low (search and a first row), opens taller for a trip, and drags to full. */
  .mpanel { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: min(36%, 290px); border-radius: 24px 24px 0 0; transition: max-height .35s var(--ease); box-shadow: 0 -8px 30px rgba(14, 14, 14, .18); }
  .mpanel:has(#pt:not([hidden])), .mpanel:has(#pa:not([hidden])) { max-height: 56%; }
  .mpanel.is-half { max-height: 52%; }
  .mpanel.is-open { max-height: 86%; }
  .mp-grab { display: grid; place-items: center; flex: none; height: 26px; border: 0; background: none; cursor: pointer; }
  .mp-grab i { width: 44px; height: 5px; border-radius: 3px; background: rgba(14, 14, 14, .22); }
  .mp-search, .mp-trip, .mp-addv { padding: 2px 16px 18px; }
  .mp-title { font-size: 32px; margin-bottom: 10px; }
  .mp-field input { height: 54px; }
  .mp-results { margin: 8px -16px 0; }
  .mp-results button { padding: 9px 16px; }
  .mp-stats b { font-size: 40px; }
  .mp-go { height: 58px; }
  .mp-share { height: 58px; }
  .navbar { top: 10px; left: 10px; right: 10px; }
  .navbot { left: 10px; right: 10px; bottom: 10px; }
}
