/* SunnyPhone — 地图模块 */
#mapOverlay { z-index: 3100; }
.map-main-body { padding: 0 !important; overflow: hidden !important; position: relative; }
.map-disabled-card {
	display: none; margin: 10px 12px 0; padding: 10px 12px; border-radius: 12px;
	background: rgba(var(--sp-accent-rgb), .1); align-items: center; justify-content: space-between; gap: 10px;
}
.map-disabled-card.show { display: flex; }
.map-disabled-card div { display: flex; flex-direction: column; min-width: 0; }
.map-disabled-card strong { font-size: 13px; color: var(--sp-text); }
.map-disabled-card span { font-size: 10px; color: var(--sp-text-soft); margin-top: 2px; }
.map-disabled-card button, .map-virtual-empty button {
	border: 0; border-radius: 14px; padding: 7px 11px; flex-shrink: 0;
	background: var(--sp-accent-fill); color: var(--sp-on-accent); font-size: 11px;
}

.map-mode-tabs {
	height: 40px; display: flex; align-items: flex-end; justify-content: center; gap: 26px;
	border-bottom: 1px solid var(--sp-border); background: var(--sp-header-bg);
}
.map-mode-tabs button {
	height: 39px; border: 0; border-bottom: 2px solid transparent; background: none;
	color: var(--sp-text-soft); font-size: 13px; padding: 0 3px;
}
.map-mode-tabs button.active { color: var(--sp-accent-2); border-bottom-color: var(--sp-accent-fill); font-weight: 600; }
.map-mode-panel { display: none; position: absolute; inset: 0; overflow: hidden; }
.map-disabled-card.show ~ .map-mode-panel { top: 62px; }
.map-mode-panel.active { display: block; }

.map-search-wrap {
	position: absolute; z-index: 8; left: 12px; right: 12px; top: 10px; height: 38px;
	display: flex; border-radius: 12px; background: var(--sp-header-bg); border: 1px solid var(--sp-border);
}
.map-search-wrap input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0 12px; font-size: 12px; color: var(--sp-text); }
.map-search-wrap button { border: 0; border-left: 1px solid var(--sp-border); background: transparent; color: var(--sp-accent-2); padding: 0 12px; }
.map-search-results {
	display: none; position: absolute; top: 43px; left: 0; right: 0; max-height: 190px; overflow: auto;
	border-radius: 11px; background: var(--sp-page-top); border: 1px solid var(--sp-border);
}
.map-search-results.show { display: block; }
.map-search-result { padding: 9px 11px; border-bottom: 1px solid var(--sp-border); cursor: pointer; }
.map-search-result:last-child { border-bottom: 0; }
.map-search-result strong { display: block; font-size: 12px; color: var(--sp-text); }
.map-search-result span { display: block; font-size: 10px; color: var(--sp-text-soft); margin-top: 2px; }
.map-real-canvas,
.map-real-canvas.maplibregl-map { position: absolute; inset: 0; background: #e7ece4; }
.map-real-canvas .maplibregl-canvas { outline: none; }
.map-loading {
	position: absolute; z-index: 2; left: 50%; top: 48%; transform: translate(-50%,-50%);
	font-size: 12px; color: rgba(var(--sp-text-rgb),.55); background: rgba(255,255,255,.84); padding: 7px 12px; border-radius: 12px;
}
.map-locate-btn {
	position: absolute; z-index: 7; right: 12px; bottom: 142px; width: 38px; height: 38px; border: 0;
	border-radius: 50%; background: var(--sp-header-bg); color: var(--sp-accent-2); display: grid; place-items: center;
}
.map-bottom-panel {
	position: absolute; z-index: 7; left: 0; right: 0; bottom: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
	background: var(--sp-header-bg); border-top: 1px solid var(--sp-border);
}
.map-picked-place { font-size: 12px; font-weight: 600; color: var(--sp-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-weather-compact { min-height: 16px; font-size: 10px; color: var(--sp-text-soft); margin: 3px 0 7px; }
.map-assign-row { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 6px; }
.map-assign-row select, .map-assign-row input {
	min-width: 0; height: 34px; border: 1px solid var(--sp-border); border-radius: 9px;
	background: var(--sp-input-bg); color: var(--sp-text); font-size: 11px; padding: 0 7px;
}
.map-assign-row button { border: 0; border-radius: 9px; background: var(--sp-accent-fill); color: var(--sp-on-accent); padding: 0 9px; font-size: 11px; }
.map-real-marker {
	width: 31px; height: 36px; border: 2px solid #fff; border-radius: 16px 16px 16px 3px;
	transform: rotate(-45deg); background: var(--sp-accent-fill); color: var(--sp-on-accent); display: grid; place-items: center; overflow: hidden;
}
.map-real-marker > * { transform: rotate(45deg); }
.map-real-marker img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }

.map-virtual-toolbar {
	height: 44px; padding: 7px 10px; display: grid; grid-template-columns: 1fr auto auto; gap: 6px;
	background: var(--sp-header-bg); border-bottom: 1px solid var(--sp-border);
}
.map-virtual-toolbar select { min-width: 0; border: 1px solid var(--sp-border); border-radius: 9px; padding: 0 8px; background: transparent; color: var(--sp-text); }
.map-virtual-toolbar button, .map-editor-actions button {
	border: 1px solid rgba(var(--sp-accent-rgb), .22); background: rgba(var(--sp-accent-rgb), .08);
	color: var(--sp-accent-2); border-radius: 9px; padding: 0 10px; font-size: 11px;
}
.map-virtual-empty { position: absolute; inset: 44px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--sp-text-soft); gap: 7px; }
.map-virtual-empty strong { color: var(--sp-text); font-size: 15px; }
.map-virtual-empty span { font-size: 11px; }
.map-virtual-view { display: none; position: absolute; inset: 44px 0 102px; overflow: auto; background: rgba(var(--sp-text-rgb),.045); }
.map-virtual-stage, .map-editor-canvas { position: relative; min-width: 100%; min-height: 100%; background-position: center; background-size: contain; background-repeat: no-repeat; overflow: hidden; touch-action: none; }
.map-virtual-stage.has-bg, .map-editor-canvas.has-bg { min-width: 620px; min-height: 440px; }
.map-v-region { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.map-v-region polygon { fill: rgba(var(--sp-accent-rgb), .13); stroke: rgba(var(--sp-accent-rgb), .75); stroke-width: .35; }
.map-v-route line { stroke: rgba(78,52,46,.5); stroke-width: .42; stroke-dasharray: 1.2 1; }
.map-v-place {
	position: absolute; transform: translate(-50%,-100%); border: 0; padding: 0; background: transparent;
	display: flex; flex-direction: column; align-items: center; color: var(--sp-text); font-size: 10px; white-space: nowrap;
}
.map-v-place::before { content: ""; width: 14px; height: 14px; border-radius: 50% 50% 50% 2px; transform: rotate(-45deg); background: var(--sp-accent-fill); border: 2px solid #fff; }
.map-v-place span { margin-top: 3px; background: rgba(255,255,255,.88); color: #263238; padding: 2px 5px; border-radius: 6px; }
.map-v-entity {
	position: absolute; transform: translate(-50%,-50%); width: 35px; height: 35px; border-radius: 50%;
	border: 2px solid #fff; background: var(--sp-accent-fill); color: var(--sp-on-accent); display: grid; place-items: center; overflow: hidden; touch-action: none;
}
.map-v-entity img { width: 100%; height: 100%; object-fit: cover; }
.map-entity-tray {
	display: none; position: absolute; left: 0; right: 0; bottom: 48px; height: 54px; padding: 6px 10px;
	background: var(--sp-header-bg); border-top: 1px solid var(--sp-border); gap: 8px; overflow-x: auto;
}
.map-entity-chip { flex: 0 0 auto; display: flex; align-items: center; gap: 5px; padding: 3px 8px 3px 4px; border-radius: 18px; background: rgba(var(--sp-text-rgb),.05); color: var(--sp-text); font-size: 10px; }
.map-entity-chip .ct-avatar, .map-place-contact .ct-avatar { flex-shrink: 0; }
.map-entity-chip-text, .map-place-contact-name { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.map-entity-chip-text small, .map-place-contact-name small { margin-top: 1px; color: var(--sp-text-soft); font-size: 8px; font-weight: 400; }
.map-weather-panel { display: none; position: absolute; left: 0; right: 0; bottom: 0; height: 48px; padding: 6px 10px; background: var(--sp-header-bg); border-top: 1px solid var(--sp-border); overflow-x: auto; gap: 10px; }
.map-weather-day { min-width: 58px; display: flex; flex-direction: column; align-items: center; font-size: 9px; color: var(--sp-text-soft); }
.map-weather-day strong { color: var(--sp-text); font-size: 10px; }

.map-editor-body { padding: 10px !important; overflow-y: auto !important; }
.map-editor-fields { display: grid; gap: 7px; }
.map-editor-fields textarea { resize: vertical; }
.map-editor-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.map-editor-actions button { height: 30px; }
.map-editor-actions button.active { color: var(--sp-on-accent); background: var(--sp-accent-fill); }
.map-editor-canvas-wrap { height: 360px; margin: 10px -10px 0; overflow: auto; background: rgba(var(--sp-text-rgb),.045); border-top: 1px solid rgba(var(--sp-text-rgb),.08); border-bottom: 1px solid rgba(var(--sp-text-rgb),.08); }
.map-editor-canvas { min-height: 360px; cursor: crosshair; }
.map-editor-hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); color: var(--sp-text-soft); font-size: 11px; pointer-events: none; }
.map-editor-side { display: grid; gap: 8px; margin-top: 10px; }
.map-editor-card { padding: 9px; border: 1px solid var(--sp-border); border-radius: 10px; background: var(--sp-surface); }
.map-editor-card-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--sp-text); }
.map-editor-card-head button { border: 0; background: none; color: #c65b5b; font-size: 11px; }
.map-editor-card-grid { margin-top: 7px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.map-editor-card-grid .wide { grid-column: 1 / -1; }
.map-editor-card-grid input, .map-editor-card-grid select, .map-editor-card-grid textarea {
	min-width: 0; border: 1px solid rgba(var(--sp-text-rgb),.12); border-radius: 7px; padding: 7px; background: transparent; color: var(--sp-text); font-size: 10px;
}
.map-delete-map { width: 100%; margin: 14px 0 30px; height: 36px; border: 1px solid rgba(198,91,91,.25); border-radius: 9px; background: rgba(198,91,91,.07); color: #c65b5b; }
.map-settings-body { padding: 16px !important; }
.map-setting-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.map-toast {
	position: absolute; z-index: 100; left: 50%; bottom: 80px; transform: translate(-50%, 10px);
	padding: 8px 14px; border-radius: 16px; color: #fff; background: rgba(35,30,29,.86);
	font-size: 11px; opacity: 0; pointer-events: none; transition: .2s; white-space: nowrap;
}
.map-toast.show { opacity: 1; transform: translate(-50%,0); }

#screen.sp-dark .map-mode-tabs,
#screen.sp-dark .map-bottom-panel,
#screen.sp-dark .map-virtual-toolbar,
#screen.sp-dark .map-entity-tray,
#screen.sp-dark .map-weather-panel,
#screen.sp-dark .map-editor-card { background: var(--sp-header-bg); }
#screen.sp-dark .map-search-wrap,
#screen.sp-dark .map-search-results { background: rgba(35,35,38,.96); border-color: rgba(255,255,255,.1); }
#screen.sp-dark .map-search-wrap input,
#screen.sp-dark .map-search-result strong,
#screen.sp-dark .map-picked-place,
#screen.sp-dark .map-assign-row select,
#screen.sp-dark .map-assign-row input { color: var(--sp-text); }
#screen.sp-dark .map-search-result span,
#screen.sp-dark .map-weather-compact { color: var(--sp-text-soft); }
#screen.sp-dark .map-assign-row select,
#screen.sp-dark .map-assign-row input { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); }

/* 虚拟矢量地图 */
.map-virtual-view {
	inset: 44px 0 54px; overflow: hidden; background: #f2f5f6;
}
.map-virtual-stage {
	position: absolute; inset: 0; min-width: 0; min-height: 0; background: none; overflow: hidden;
}
.map-virtual-stage.map-vector-host { position: absolute; inset: 0; }
.map-virtual-search-wrap { z-index: 14; right: 58px; box-shadow: 0 3px 14px rgba(45,65,72,.13); }
.map-vector-host {
	--map-bg: #f5f7f7;
	--map-land: #f3f5f4;
	--map-district: #f2f4f3;
	--map-district-line: #e2e7e5;
	--map-campus: #edf2e9;
	--map-park: #dcefd8;
	--map-park-line: #c8e3c3;
	--map-water: #d7ebf4;
	--map-water-line: #bedde9;
	--map-building: #e8e6e0;
	--map-building-line: #d9d6cf;
	--map-commercial: #e7e3dc;
	--map-landmark: #dfddd6;
	--map-road: #fff;
	--map-road-casing: #d8dddc;
	--map-highway: #f4b85d;
	--map-highway-casing: #d5d9d8;
	--map-arterial: #fff9ea;
	--map-arterial-casing: #dcdfda;
	--map-walk: #e4e8e4;
	--map-rail: #8d989d;
	--map-label: #4d5c62;
	--map-region-label: #909b9d;
	--map-road-label: #68767d;
	--map-poi-label: #3f4e54;
	--map-label-halo: #fff;
	--map-texture: rgba(113,130,132,.055);
	--map-route: #267cf5;
	--map-route-casing: rgba(255,255,255,.94);
	--map-poi: #5d86b1;
	--map-poi-education: #6685c2;
	--map-poi-medical: #cf7177;
	--map-poi-food: #d08a58;
	--map-poi-transport: #5284ad;
	--map-poi-commercial: #af7b9d;
	--map-poi-park: #639a6d;
	--map-poi-scenic: #8875a9;
	--map-poi-sport: #509895;
	--map-poi-residential: #748d99;
	--map-poi-industry: #8c8078;
	position: relative; overflow: hidden; touch-action: none; user-select: none;
	background: var(--map-bg);
}
.map-vector-svg {
	position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab;
	background: var(--map-bg); shape-rendering: geometricPrecision;
}
.map-vector-svg:active { cursor: grabbing; }
.map-vector-root,
.map-vector-layer { isolation: isolate; }
.map-vector-background { fill: var(--map-land); }
.map-vector-texture { pointer-events: none; }
.map-vector-texture-line {
	fill: none; stroke: var(--map-texture); stroke-width: .45px;
	vector-effect: non-scaling-stroke; pointer-events: none;
}
.map-vector-regions polygon,
.map-vector-buildings polygon,
.map-vector-roads path { cursor: pointer; }
.map-vector-terrain {
	fill: var(--map-district); stroke: none;
}
.map-terrain-hill,
.map-terrain-forest { fill: var(--map-park); }
.map-terrain-water { fill: var(--map-water); }
.map-vector-region {
	fill: var(--map-district); stroke: var(--map-district-line); stroke-width: .55px;
	vector-effect: non-scaling-stroke; transition: opacity .16s;
}
.map-region-district,
.map-region-local { fill: var(--map-district); stroke-opacity: .45; }
.map-region-campus { fill: var(--map-campus); stroke: var(--map-park-line); }
.map-region-park { fill: var(--map-park); stroke: var(--map-park-line); stroke-width: .8px; }
.map-region-water { fill: var(--map-water); stroke: var(--map-water-line); stroke-width: .8px; }
.map-vector-building {
	fill: var(--map-building); stroke: var(--map-building-line); stroke-width: .65px;
	vector-effect: non-scaling-stroke; transition: opacity .16s, fill .16s;
}
.map-building-commercial { fill: var(--map-commercial); }
.map-building-landmark { fill: var(--map-landmark); stroke-width: .9px; }
.map-vector-road {
	fill: none; stroke: var(--map-road); stroke-width: 2.6px; stroke-linecap: round; stroke-linejoin: round;
	vector-effect: non-scaling-stroke; pointer-events: stroke;
}
.map-vector-road-casing {
	fill: none; stroke: var(--map-road-casing); stroke-width: 4.2px; stroke-linecap: round; stroke-linejoin: round;
	vector-effect: non-scaling-stroke; pointer-events: none;
}
.map-vector-road.map-road-highway { stroke: var(--map-highway); stroke-width: 5.6px; }
.map-vector-road-casing.map-road-highway { stroke: var(--map-highway-casing); stroke-width: 7.5px; }
.map-vector-road.map-road-arterial { stroke: var(--map-arterial); stroke-width: 4px; }
.map-vector-road-casing.map-road-arterial { stroke: var(--map-arterial-casing); stroke-width: 5.7px; }
.map-vector-road.map-road-local { stroke: var(--map-road); stroke-width: 2.6px; }
.map-vector-road-casing.map-road-local { stroke: var(--map-road-casing); stroke-width: 4.1px; }
.map-vector-road.map-road-walk {
	stroke: var(--map-walk); stroke-width: 1.35px; stroke-dasharray: 2.5 2.5; pointer-events: stroke;
}
.map-vector-road-casing.map-road-walk { stroke: var(--map-road-casing); stroke-width: 2.3px; opacity: .48; }
.map-vector-road.map-road-rail {
	stroke: var(--map-rail); stroke-width: 1.8px; stroke-dasharray: 7 3;
}
.map-vector-road-casing.map-road-rail { stroke: var(--map-road-casing); stroke-width: 3.3px; }
.map-vector-region-labels,
.map-vector-region-label { pointer-events: none; }
.map-region-label-text {
	fill: var(--map-region-label); stroke: var(--map-label-halo); stroke-width: 2.2px; stroke-linejoin: round;
	paint-order: stroke fill; font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 10px; font-weight: 500; letter-spacing: 1px; pointer-events: none;
}
.map-region-label-park .map-region-label-text,
.map-region-label-campus .map-region-label-text,
.map-region-label-water .map-region-label-text { font-size: 11px; font-weight: 570; }
.map-region-label-water .map-region-label-text { fill: #7796a4; font-style: italic; }
.map-vector-road-labels { pointer-events: none; }
.map-vector-road-label { pointer-events: none; }
.map-road-label-text {
	fill: var(--map-road-label); font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 10px; font-weight: 550; letter-spacing: .12px;
	paint-order: stroke fill; stroke: var(--map-label-halo); stroke-width: 2.5px; stroke-linejoin: round;
}
.map-road-label-highway .map-road-label-text,
.map-road-label-arterial .map-road-label-text { font-weight: 620; }
.map-road-label-walk .map-road-label-text { opacity: .75; font-size: 9px; }
.map-vector-route { pointer-events: none; }
.map-vector-route-casing {
	fill: none; stroke: var(--map-route-casing); stroke-width: 9px; stroke-linecap: round; stroke-linejoin: round;
	vector-effect: non-scaling-stroke; pointer-events: none;
}
.map-vector-route-highlight {
	fill: none; stroke: var(--map-route); stroke-width: 6px; stroke-linecap: round; stroke-linejoin: round;
	vector-effect: non-scaling-stroke; pointer-events: none; filter: drop-shadow(0 1px 2px rgba(35,111,223,.35));
}
.map-vector-place { cursor: pointer; overflow: visible; }
.map-place-hit { fill: transparent; stroke: none; pointer-events: all; }
.map-place-pin-halo {
	fill: #fff; stroke: none; pointer-events: none;
	filter: drop-shadow(0 1px 1.5px rgba(35,55,65,.2));
}
.map-place-pin {
	fill: var(--map-poi); stroke: none; vector-effect: non-scaling-stroke; pointer-events: none;
}
.map-place-glyph {
	fill: #fff; stroke: none; font-size: 7.2px; font-weight: 750;
	font-family: system-ui, -apple-system, "Segoe UI", sans-serif; pointer-events: none;
}
.map-place-label {
	fill: var(--map-poi-label); stroke: var(--map-label-halo); stroke-width: 2.4px; stroke-linejoin: round;
	paint-order: stroke fill; font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 10px; font-weight: 580; letter-spacing: .08px; pointer-events: none;
}
.map-poi-education .map-place-pin { fill: var(--map-poi-education); }
.map-poi-medical .map-place-pin { fill: var(--map-poi-medical); }
.map-poi-food .map-place-pin { fill: var(--map-poi-food); }
.map-poi-transport .map-place-pin { fill: var(--map-poi-transport); }
.map-poi-commercial .map-place-pin { fill: var(--map-poi-commercial); }
.map-poi-park .map-place-pin { fill: var(--map-poi-park); }
.map-poi-scenic .map-place-pin { fill: var(--map-poi-scenic); }
.map-poi-sport .map-place-pin { fill: var(--map-poi-sport); }
.map-poi-residential .map-place-pin { fill: var(--map-poi-residential); }
.map-poi-industry .map-place-pin { fill: var(--map-poi-industry); }
.map-vector-entity { cursor: pointer; }
.map-vector-entity circle {
	fill: var(--sp-accent-fill); stroke: #fff; stroke-width: 3px; vector-effect: non-scaling-stroke;
	filter: drop-shadow(0 2px 3px rgba(30,50,60,.3));
}
.map-vector-entity image { clip-path: circle(50%); pointer-events: none; }
.map-vector-entity text { fill: var(--sp-on-accent); font-size: 14px; font-weight: 750; pointer-events: none; }
.map-vector-place.is-selected .map-place-pin,
.map-vector-place.selected .map-place-pin,
.map-vector-place[aria-selected="true"] .map-place-pin,
.map-vector-entity.is-selected circle,
.map-vector-entity.selected circle,
.map-vector-entity[aria-selected="true"] circle {
	stroke: #ffb21c; stroke-width: 3px; filter: drop-shadow(0 0 4px rgba(255,178,28,.55));
}
.map-vector-region.is-selected,
.map-vector-region.selected,
.map-vector-region[data-selected="true"],
.map-vector-building.is-selected,
.map-vector-building.selected,
.map-vector-building[data-selected="true"] {
	stroke: #247cf0; stroke-width: 2px;
}
.map-vector-road.is-selected,
.map-vector-road.selected,
.map-vector-road[data-selected="true"] {
	stroke: #247cf0; stroke-width: 6px;
}
.map-vector-draw-preview {
	fill: rgba(36,124,240,.13); stroke: #247cf0; stroke-width: 3px; stroke-dasharray: 7 4;
	vector-effect: non-scaling-stroke; pointer-events: none;
}
.map-lod-far .map-lod-min-mid,
.map-lod-far .map-lod-min-near,
.map-lod-mid .map-lod-min-near { display: none; }
.map-lod-far .map-vector-region { opacity: .72; }
.map-lod-far .map-region-park,
.map-lod-far .map-region-water,
.map-lod-far .map-region-campus { opacity: .94; }
.map-lod-far .map-region-label-district,
.map-lod-far .map-region-label-local { opacity: .72; }
.map-lod-mid .map-vector-building { opacity: .88; }
.map-lod-near .map-vector-building { opacity: 1; }
.map-lod-near .map-vector-road.map-road-local { stroke-width: 3px; }
.map-lod-near .map-vector-road-casing.map-road-local { stroke-width: 4.6px; }
.map-vector-scale {
	position: absolute; left: 12px; bottom: 12px; z-index: 8; color: var(--map-label); font-size: 9px;
	text-shadow: 0 1px 1px var(--map-label-halo); pointer-events: none;
}
.map-vector-scale span { display: block; box-sizing: border-box; height: 5px; border: solid currentColor; border-width: 0 1px 1px; }
.map-vector-scale b { display: block; margin-top: 1px; font-weight: 500; }
.map-vector-host[data-map-style="pastel"] {
	--map-bg: #f7f0eb;
	--map-land: #f5eee8;
	--map-district: #f3ebe5;
	--map-district-line: #e4d9d1;
	--map-campus: #ece5cc;
	--map-park: #d8e6c9;
	--map-water: #c8deeb;
	--map-building: #eadfd7;
	--map-building-line: #d9cdc5;
	--map-commercial: #e7ddd5;
	--map-landmark: #dfd9d4;
	--map-road-casing: #d9cec6;
	--map-label: #5b504a;
	--map-region-label: #a09189;
	--map-road-label: #756c67;
	--map-poi-label: #554b46;
	--map-texture: rgba(133,111,98,.05);
}
.map-vector-host[data-map-style="amap-dark"],
#screen.sp-dark .map-vector-host[data-map-style="amap-light"] {
	--map-bg: #182125;
	--map-land: #1d272b;
	--map-district: #1e292d;
	--map-district-line: #2b373b;
	--map-campus: #26332c;
	--map-park: #284235;
	--map-park-line: #355444;
	--map-water: #1b3b4b;
	--map-water-line: #285164;
	--map-building: #30383b;
	--map-building-line: #3b4548;
	--map-commercial: #343a3b;
	--map-landmark: #3a3e3e;
	--map-road: #5b676b;
	--map-road-casing: #20292d;
	--map-highway: #bd8242;
	--map-highway-casing: #293035;
	--map-arterial: #777264;
	--map-arterial-casing: #283035;
	--map-walk: #4d5856;
	--map-rail: #8b989d;
	--map-label: #c9d1d3;
	--map-region-label: #7f8e91;
	--map-road-label: #aebabe;
	--map-poi-label: #dce3e5;
	--map-label-halo: #182125;
	--map-texture: rgba(187,205,207,.035);
	--map-route-casing: rgba(17,25,30,.9);
}

.map-vector-controls {
	position: absolute; z-index: 13; right: 12px; top: 58px; display: grid; gap: 7px;
}
.map-vector-controls button {
	width: 38px; height: 38px; border: 0; border-radius: 10px; background: rgba(255,255,255,.96);
	color: #44545b; box-shadow: 0 2px 10px rgba(45,65,72,.16); display: grid; place-items: center; font-size: 17px;
}
.map-vector-controls .map-compass-btn { color: #e35757; font-size: 11px; font-weight: 800; }
.map-layer-popover {
	display: none; position: absolute; z-index: 18; top: 58px; right: 58px; width: 142px; padding: 10px;
	border-radius: 12px; background: rgba(255,255,255,.97); box-shadow: 0 5px 20px rgba(45,65,72,.2);
}
.map-layer-popover.show { display: grid; gap: 8px; }
.map-layer-popover strong { color: #29383e; font-size: 12px; }
.map-layer-popover label { color: #55676e; font-size: 10px; display: flex; align-items: center; gap: 5px; }
.map-entity-tray {
	bottom: 0; height: 54px; z-index: 12; box-shadow: 0 -2px 10px rgba(45,65,72,.07);
}
.map-entity-chip { border: 1px solid transparent; }
.map-entity-chip.active { color: var(--sp-accent-2); border-color: rgba(var(--sp-accent-rgb),.3); background: rgba(var(--sp-accent-rgb),.1); }
.map-entity-initial { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--sp-accent-fill); color: var(--sp-on-accent); }

.map-place-sheet, .map-route-sheet {
	position: absolute; z-index: 24; left: 8px; right: 8px; bottom: 61px; padding: 8px 14px 14px;
	border-radius: 17px; background: rgba(255,255,255,.98); box-shadow: 0 8px 30px rgba(30,50,58,.25);
	transform: translateY(calc(100% + 80px)); opacity: 0; pointer-events: none; transition: .22s ease;
}
.map-place-sheet.show, .map-route-sheet.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.map-place-sheet.show.collapsed { transform: translateY(calc(100% - 52px)); }
.map-sheet-handle { width: 32px; height: 4px; margin: 0 auto 6px; border-radius: 3px; background: #d9dfe1; cursor: pointer; }
.map-sheet-close, .map-route-head button {
	position: absolute; right: 9px; top: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%;
	background: #f0f3f4; color: #607077; font-size: 17px;
}
.map-place-kicker { color: #6f8087; font-size: 9px; }
.map-place-sheet h3 { margin: 2px 34px 0 0; color: #24333a; font-size: 17px; }
.map-place-sheet p { margin: 5px 0; max-height: 34px; overflow: auto; color: #66777d; font-size: 10px; line-height: 1.6; }
.map-place-weather { padding: 7px 9px; border-radius: 9px; background: #f3f7fa; color: #44606d; font-size: 10px; }
.map-place-contacts { margin-top: 8px; }
.map-place-contacts > strong { display: block; margin-bottom: 5px; color: #6f8087; font-size: 9px; font-weight: 600; }
#mapVirtualPlaceContactList { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
#mapVirtualPlaceContactList::-webkit-scrollbar { display: none; }
.map-place-contact {
	min-width: 0; display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
	padding: 5px 8px 5px 5px; border-radius: 13px; background: #f3f7fa; color: #334950; font-size: 10px;
}
.map-place-contact img { flex: 0 0 auto; border-radius: 50%; }
.map-place-contact-empty { color: #8a989d; font-size: 10px; }
.map-place-entity-row { display: grid; grid-template-columns: 1fr auto; gap: 7px; margin-top: 8px; }
.map-place-entity-row select, .map-route-points select {
	min-width: 0; height: 34px; border: 1px solid #d9e0e3; border-radius: 9px; background: #fff; padding: 0 8px; color: #374a52; font-size: 10px;
}
.map-place-entity-row button, .map-place-actions button, .map-route-actions button {
	border: 0; border-radius: 9px; background: var(--sp-accent-fill); color: var(--sp-on-accent); padding: 0 10px; font-size: 10px;
}
.map-place-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 7px; }
.map-place-actions button { height: 33px; background: var(--sp-accent-soft); color: var(--sp-accent-2); }
.map-route-head { display: flex; align-items: center; min-height: 28px; color: #29383e; font-size: 14px; }
.map-route-head button { top: 7px; }
.map-route-points { display: grid; grid-template-columns: 1fr 30px 1fr; gap: 6px; align-items: center; margin-top: 5px; }
.map-route-points button { height: 30px; border: 0; background: none; color: var(--sp-accent-2); font-size: 17px; }
.map-route-modes { display: flex; gap: 6px; margin-top: 8px; }
.map-route-modes button { height: 27px; padding: 0 13px; border: 0; border-radius: 14px; background: #f0f3f4; color: #617279; font-size: 10px; }
.map-route-modes button.active { background: var(--sp-accent-soft); color: var(--sp-accent-2); font-weight: 600; }
.map-route-summary { margin: 8px 0; color: #52656c; font-size: 11px; }
.map-route-actions { display: flex; gap: 7px; }
.map-route-actions button { height: 34px; flex: 1; }
#mapRouteStartNav { background: #21a366; color: #1c1814; }
#mapRouteFinishNav { background: #f18a38; color: #1c1814; }

/* 全屏地图编辑器 */
.map-editor-body { padding: 0 !important; overflow: hidden !important; position: relative; background: #edf1f2; }
.map-editor-canvas { position: absolute; inset: 0; min-height: 0; cursor: default; }
.map-editor-top-tools { position: absolute; z-index: 12; right: 10px; top: 10px; display: flex; gap: 5px; }
.map-editor-top-tools button {
	height: 32px; min-width: 32px; padding: 0 8px; border: 0; border-radius: 9px; background: rgba(255,255,255,.95);
	color: #4a5b62; box-shadow: 0 2px 10px rgba(45,65,72,.14); font-size: 10px;
}
.map-editor-top-tools button:disabled { opacity: .4; }
.map-editor-actions {
	position: absolute; z-index: 12; left: 7px; right: 7px; bottom: calc(8px + env(safe-area-inset-bottom));
	display: flex; flex-wrap: nowrap; gap: 4px; padding: 6px; overflow-x: auto;
	border-radius: 13px; background: rgba(255,255,255,.96); box-shadow: 0 3px 18px rgba(45,65,72,.19);
}
.map-editor-actions button { flex: 0 0 auto; height: 34px; padding: 0 10px; border: 0; background: transparent; }
.map-editor-actions button.active { background: var(--sp-accent-fill); color: var(--sp-on-accent); }
.map-editor-finish {
	position: absolute; z-index: 14; right: 10px; bottom: calc(62px + env(safe-area-inset-bottom));
	height: 36px; padding: 0 14px; border: 0; border-radius: 18px; background: var(--sp-accent-fill); color: var(--sp-on-accent);
	box-shadow: 0 3px 14px rgba(var(--sp-accent-rgb),.35); font-size: 11px; font-weight: 600;
}
.map-editor-finish:disabled { opacity: .48; }
.map-editor-hint {
	display: none; position: absolute; z-index: 11; left: 50%; top: 12px; transform: translateX(-50%);
	padding: 6px 10px; border-radius: 13px; background: rgba(35,45,50,.78); color: #fff; white-space: nowrap;
}
.map-editor-hint.show { display: block; }

.map-modal-mask {
	position: absolute; z-index: 150; inset: 0; display: flex; align-items: flex-end; padding: 10px;
	background: rgba(20,27,30,.35); opacity: 0; transition: .18s;
}
.map-modal-mask.show { opacity: 1; }
.map-modal-card {
	width: 100%; max-height: 86%; overflow: hidden; border-radius: 18px; background: var(--sp-page-top);
	transform: translateY(30px); transition: .18s; box-shadow: 0 10px 40px rgba(20,30,35,.3);
}
.map-modal-mask.show .map-modal-card { transform: translateY(0); }
.map-modal-head { height: 46px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(var(--sp-text-rgb),.08); }
.map-modal-head strong { color: var(--sp-text); font-size: 14px; }
.map-modal-head button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(var(--sp-text-rgb),.06); color: var(--sp-text-soft); font-size: 17px; }
.map-modal-body { max-height: calc(72vh - 100px); overflow-y: auto; padding: 12px 14px; }
.map-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.map-form-grid label { display: grid; gap: 4px; color: var(--sp-text-soft); font-size: 9px; }
.map-form-grid .wide { grid-column: 1 / -1; }
.map-form-grid input, .map-form-grid select, .map-form-grid textarea {
	min-width: 0; width: 100%; padding: 8px; border: 1px solid rgba(var(--sp-text-rgb),.13); border-radius: 9px;
	outline: none; background: rgba(var(--sp-text-rgb),.025); color: var(--sp-text); font-size: 11px; resize: vertical;
}
.map-form-grid input:focus, .map-form-grid select:focus, .map-form-grid textarea:focus { border-color: var(--sp-accent-2); }
.map-form-layers { padding-top: 4px; display: flex !important; flex-wrap: wrap; gap: 7px !important; }
.map-form-layers strong { width: 100%; color: var(--sp-text); }
.map-form-check { display: flex !important; align-items: center; }
.map-form-check input { width: auto; }
.map-form-grid .map-inline-action {
	height: 34px; border: 1px solid rgba(var(--sp-accent-rgb),.3); border-radius: 9px; background: var(--sp-accent-soft);
	color: var(--sp-accent-2); font-size: 10px;
}
.map-create-status {
	padding: 8px 10px; border-radius: 9px; background: rgba(var(--sp-accent-rgb),.07);
	color: var(--sp-text-soft); font-size: 10px; line-height: 1.5;
}
.map-create-status.loading { color: var(--sp-accent-2); }
.map-create-status.success { color: #27855a; background: rgba(39,133,90,.09); }
.map-create-status.error { color: #c95757; background: rgba(201,87,87,.09); }
.map-modal-actions { min-height: 50px; padding: 7px 12px; display: flex; align-items: center; gap: 7px; border-top: 1px solid rgba(var(--sp-text-rgb),.08); }
.map-modal-actions > span { flex: 1; }
.map-modal-actions button { height: 34px; min-width: 68px; border: 0; border-radius: 9px; background: rgba(var(--sp-text-rgb),.06); color: var(--sp-text); font-size: 10px; }
.map-modal-actions button.primary { background: var(--sp-accent-fill); color: var(--sp-on-accent); }
.map-modal-actions button.danger { margin-right: auto; color: #c95757; background: rgba(201,87,87,.09); }

#screen.sp-dark .map-virtual-view,
#screen.sp-dark .map-editor-body { background: #1d252b; }
#screen.sp-dark .map-vector-controls button,
#screen.sp-dark .map-layer-popover,
#screen.sp-dark .map-place-sheet,
#screen.sp-dark .map-route-sheet,
#screen.sp-dark .map-editor-top-tools button,
#screen.sp-dark .map-editor-actions { background: rgba(38,42,46,.97); color: var(--sp-text); }
#screen.sp-dark .map-layer-popover strong,
#screen.sp-dark .map-place-sheet h3,
#screen.sp-dark .map-route-head { color: var(--sp-text); }
#screen.sp-dark .map-layer-popover label,
#screen.sp-dark .map-place-sheet p,
#screen.sp-dark .map-route-summary { color: var(--sp-text-soft); }
#screen.sp-dark .map-place-weather { background: rgba(255,255,255,.06); color: var(--sp-text-soft); }
#screen.sp-dark .map-place-contact { background: rgba(255,255,255,.06); color: var(--sp-text); }
#screen.sp-dark .map-place-contacts > strong,
#screen.sp-dark .map-place-contact-empty { color: var(--sp-text-soft); }
#screen.sp-dark .map-place-entity-row select,
#screen.sp-dark .map-route-points select { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); color: var(--sp-text); }

/* QQ 地点联动 */
.qq-inline-location {
	display: inline-flex; align-items: center; justify-content: center; gap: 3px; max-width: 230px;
	padding: 0; border: 0; background: none; color: var(--sp-text-soft); font-size: 10px; cursor: pointer;
}
.qq-inline-location span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qq-location-card { min-width: 190px; max-width: 235px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.qq-location-card-icon {
	width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center;
	background: rgba(var(--sp-accent-rgb), .12); color: var(--sp-accent-2);
}
.qq-location-card-copy { min-width: 0; display: flex; flex-direction: column; }
.qq-location-card-copy strong { color: var(--sp-text); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qq-location-card-copy span { color: var(--sp-text-soft); font-size: 10px; margin-top: 3px; }
.qq-profile-modal-location { margin-top: 5px; color: rgba(var(--sp-text-rgb),.55); font-size: 12px; }
#screen.sp-dark .qq-profile-modal-location { color: var(--sp-text-soft); }
