/* required styles */

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
	position: absolute;
	left: 0;
	top: 0;
	}
.leaflet-container {
	overflow: hidden;
	}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;
	  -webkit-user-drag: none;
	}
/* Prevents IE11 from highlighting tiles in blue */
.leaflet-tile::selection {
	background: transparent;
}
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
.leaflet-safari .leaflet-tile {
	image-rendering: -webkit-optimize-contrast;
	}
/* hack that prevents hw layers "stretching" when loading new tiles */
.leaflet-safari .leaflet-tile-container {
	width: 1600px;
	height: 1600px;
	-webkit-transform-origin: 0 0;
	}
.leaflet-marker-icon,
.leaflet-marker-shadow {
	display: block;
	}
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container .leaflet-overlay-pane svg {
	max-width: none !important;
	max-height: none !important;
	}
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer,
.leaflet-container .leaflet-tile {
	max-width: none !important;
	max-height: none !important;
	width: auto;
	padding: 0;
	}

.leaflet-container img.leaflet-tile {
	/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */
	mix-blend-mode: plus-lighter;
}

.leaflet-container.leaflet-touch-zoom {
	-ms-touch-action: pan-x pan-y;
	touch-action: pan-x pan-y;
	}
.leaflet-container.leaflet-touch-drag {
	-ms-touch-action: pinch-zoom;
	/* Fallback for FF which doesn't support pinch-zoom */
	touch-action: none;
	touch-action: pinch-zoom;
}
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
	-ms-touch-action: none;
	touch-action: none;
}
.leaflet-container {
	-webkit-tap-highlight-color: transparent;
}
.leaflet-container a {
	-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
}
.leaflet-tile {
	filter: inherit;
	visibility: hidden;
	}
.leaflet-tile-loaded {
	visibility: inherit;
	}
.leaflet-zoom-box {
	width: 0;
	height: 0;
	-moz-box-sizing: border-box;
	     box-sizing: border-box;
	z-index: 800;
	}
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
.leaflet-overlay-pane svg {
	-moz-user-select: none;
	}

.leaflet-pane         { z-index: 400; }

.leaflet-tile-pane    { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane  { z-index: 500; }
.leaflet-marker-pane  { z-index: 600; }
.leaflet-tooltip-pane   { z-index: 650; }
.leaflet-popup-pane   { z-index: 700; }

.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg    { z-index: 200; }

.leaflet-vml-shape {
	width: 1px;
	height: 1px;
	}
.lvml {
	behavior: url(#default#VML);
	display: inline-block;
	position: absolute;
	}


/* control positioning */

.leaflet-control {
	position: relative;
	z-index: 800;
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}
.leaflet-top,
.leaflet-bottom {
	position: absolute;
	z-index: 1000;
	pointer-events: none;
	}
.leaflet-top {
	top: 0;
	}
.leaflet-right {
	right: 0;
	}
.leaflet-bottom {
	bottom: 0;
	}
.leaflet-left {
	left: 0;
	}
.leaflet-control {
	float: left;
	clear: both;
	}
.leaflet-right .leaflet-control {
	float: right;
	}
.leaflet-top .leaflet-control {
	margin-top: 10px;
	}
.leaflet-bottom .leaflet-control {
	margin-bottom: 10px;
	}
.leaflet-left .leaflet-control {
	margin-left: 10px;
	}
.leaflet-right .leaflet-control {
	margin-right: 10px;
	}


/* zoom and fade animations */

.leaflet-fade-anim .leaflet-popup {
	opacity: 0;
	-webkit-transition: opacity 0.2s linear;
	   -moz-transition: opacity 0.2s linear;
	        transition: opacity 0.2s linear;
	}
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
	opacity: 1;
	}
.leaflet-zoom-animated {
	-webkit-transform-origin: 0 0;
	    -ms-transform-origin: 0 0;
	        transform-origin: 0 0;
	}
svg.leaflet-zoom-animated {
	will-change: transform;
}

.leaflet-zoom-anim .leaflet-zoom-animated {
	-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
	   -moz-transition:    -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
	        transition:         transform 0.25s cubic-bezier(0,0,0.25,1);
	}
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile {
	-webkit-transition: none;
	   -moz-transition: none;
	        transition: none;
	}

.leaflet-zoom-anim .leaflet-zoom-hide {
	visibility: hidden;
	}


/* cursors */

.leaflet-interactive {
	cursor: pointer;
	}
.leaflet-grab {
	cursor: -webkit-grab;
	cursor:    -moz-grab;
	cursor:         grab;
	}
.leaflet-crosshair,
.leaflet-crosshair .leaflet-interactive {
	cursor: crosshair;
	}
.leaflet-popup-pane,
.leaflet-control {
	cursor: auto;
	}
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-grab .leaflet-interactive,
.leaflet-dragging .leaflet-marker-draggable {
	cursor: move;
	cursor: -webkit-grabbing;
	cursor:    -moz-grabbing;
	cursor:         grabbing;
	}

/* marker & overlays interactivity */
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-image-layer,
.leaflet-pane > svg path,
.leaflet-tile-container {
	pointer-events: none;
	}

.leaflet-marker-icon.leaflet-interactive,
.leaflet-image-layer.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive,
svg.leaflet-image-layer.leaflet-interactive path {
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}

/* visual tweaks */

.leaflet-container {
	background: #ddd;
	outline-offset: 1px;
	}
.leaflet-container a {
	color: #0078A8;
	}
.leaflet-zoom-box {
	border: 2px dotted #38f;
	background: rgba(255,255,255,0.5);
	}


/* general typography */
.leaflet-container {
	font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-size: 0.75rem;
	line-height: 1.5;
	}


/* general toolbar styles */

.leaflet-bar {
	box-shadow: 0 1px 5px rgba(0,0,0,0.65);
	border-radius: 4px;
	}
.leaflet-bar a {
	background-color: #fff;
	border-bottom: 1px solid #ccc;
	width: 26px;
	height: 26px;
	line-height: 26px;
	display: block;
	text-align: center;
	text-decoration: none;
	color: black;
	}
.leaflet-bar a,
.leaflet-control-layers-toggle {
	background-position: 50% 50%;
	background-repeat: no-repeat;
	display: block;
	}
.leaflet-bar a:hover,
.leaflet-bar a:focus {
	background-color: #f4f4f4;
	}
.leaflet-bar a:first-child {
	border-top-left-radius: 4px;
	border-top-right-radius: 4px;
	}
.leaflet-bar a:last-child {
	border-bottom-left-radius: 4px;
	border-bottom-right-radius: 4px;
	border-bottom: none;
	}
.leaflet-bar a.leaflet-disabled {
	cursor: default;
	background-color: #f4f4f4;
	color: #bbb;
	}

.leaflet-touch .leaflet-bar a {
	width: 30px;
	height: 30px;
	line-height: 30px;
	}
.leaflet-touch .leaflet-bar a:first-child {
	border-top-left-radius: 2px;
	border-top-right-radius: 2px;
	}
.leaflet-touch .leaflet-bar a:last-child {
	border-bottom-left-radius: 2px;
	border-bottom-right-radius: 2px;
	}

/* zoom control */

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
	font: bold 18px 'Lucida Console', Monaco, monospace;
	text-indent: 1px;
	}

.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out  {
	font-size: 22px;
	}


/* layers control */

.leaflet-control-layers {
	box-shadow: 0 1px 5px rgba(0,0,0,0.4);
	background: #fff;
	border-radius: 5px;
	}
.leaflet-control-layers-toggle {
	background-image: url(images/layers.png);
	width: 36px;
	height: 36px;
	}
.leaflet-retina .leaflet-control-layers-toggle {
	background-image: url(images/layers-2x.png);
	background-size: 26px 26px;
	}
.leaflet-touch .leaflet-control-layers-toggle {
	width: 44px;
	height: 44px;
	}
.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
	display: none;
	}
.leaflet-control-layers-expanded .leaflet-control-layers-list {
	display: block;
	position: relative;
	}
.leaflet-control-layers-expanded {
	padding: 6px 10px 6px 6px;
	color: #333;
	background: #fff;
	}
.leaflet-control-layers-scrollbar {
	overflow-y: scroll;
	overflow-x: hidden;
	padding-right: 5px;
	}
.leaflet-control-layers-selector {
	margin-top: 2px;
	position: relative;
	top: 1px;
	}
.leaflet-control-layers label {
	display: block;
	font-size: 13px;
	font-size: 1.08333em;
	}
.leaflet-control-layers-separator {
	height: 0;
	border-top: 1px solid #ddd;
	margin: 5px -10px 5px -6px;
	}

/* Default icon URLs */
.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */
	background-image: url(images/marker-icon.png);
	}


/* attribution and scale controls */

.leaflet-container .leaflet-control-attribution {
	background: #fff;
	background: rgba(255, 255, 255, 0.8);
	margin: 0;
	}
.leaflet-control-attribution,
.leaflet-control-scale-line {
	padding: 0 5px;
	color: #333;
	line-height: 1.4;
	}
.leaflet-control-attribution a {
	text-decoration: none;
	}
.leaflet-control-attribution a:hover,
.leaflet-control-attribution a:focus {
	text-decoration: underline;
	}
.leaflet-attribution-flag {
	display: inline !important;
	vertical-align: baseline !important;
	width: 1em;
	height: 0.6669em;
	}
.leaflet-left .leaflet-control-scale {
	margin-left: 5px;
	}
.leaflet-bottom .leaflet-control-scale {
	margin-bottom: 5px;
	}
.leaflet-control-scale-line {
	border: 2px solid #777;
	border-top: none;
	line-height: 1.1;
	padding: 2px 5px 1px;
	white-space: nowrap;
	-moz-box-sizing: border-box;
	     box-sizing: border-box;
	background: rgba(255, 255, 255, 0.8);
	text-shadow: 1px 1px #fff;
	}
.leaflet-control-scale-line:not(:first-child) {
	border-top: 2px solid #777;
	border-bottom: none;
	margin-top: -2px;
	}
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
	border-bottom: 2px solid #777;
	}

.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	box-shadow: none;
	}
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	border: 2px solid rgba(0,0,0,0.2);
	background-clip: padding-box;
	}


/* popup */

.leaflet-popup {
	position: absolute;
	text-align: center;
	margin-bottom: 20px;
	}
.leaflet-popup-content-wrapper {
	padding: 1px;
	text-align: left;
	border-radius: 12px;
	}
.leaflet-popup-content {
	margin: 13px 24px 13px 20px;
	line-height: 1.3;
	font-size: 13px;
	font-size: 1.08333em;
	min-height: 1px;
	}
.leaflet-popup-content p {
	margin: 17px 0;
	margin: 1.3em 0;
	}
.leaflet-popup-tip-container {
	width: 40px;
	height: 20px;
	position: absolute;
	left: 50%;
	margin-top: -1px;
	margin-left: -20px;
	overflow: hidden;
	pointer-events: none;
	}
.leaflet-popup-tip {
	width: 17px;
	height: 17px;
	padding: 1px;

	margin: -10px auto 0;
	pointer-events: auto;

	-webkit-transform: rotate(45deg);
	   -moz-transform: rotate(45deg);
	    -ms-transform: rotate(45deg);
	        transform: rotate(45deg);
	}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
	background: white;
	color: #333;
	box-shadow: 0 3px 14px rgba(0,0,0,0.4);
	}
.leaflet-container a.leaflet-popup-close-button {
	position: absolute;
	top: 0;
	right: 0;
	border: none;
	text-align: center;
	width: 24px;
	height: 24px;
	font: 16px/24px Tahoma, Verdana, sans-serif;
	color: #757575;
	text-decoration: none;
	background: transparent;
	}
.leaflet-container a.leaflet-popup-close-button:hover,
.leaflet-container a.leaflet-popup-close-button:focus {
	color: #585858;
	}
.leaflet-popup-scrolled {
	overflow: auto;
	}

.leaflet-oldie .leaflet-popup-content-wrapper {
	-ms-zoom: 1;
	}
.leaflet-oldie .leaflet-popup-tip {
	width: 24px;
	margin: 0 auto;

	-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
	filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
	}

.leaflet-oldie .leaflet-control-zoom,
.leaflet-oldie .leaflet-control-layers,
.leaflet-oldie .leaflet-popup-content-wrapper,
.leaflet-oldie .leaflet-popup-tip {
	border: 1px solid #999;
	}


/* div icon */

.leaflet-div-icon {
	background: #fff;
	border: 1px solid #666;
	}


/* Tooltip */
/* Base styles for the element that has a tooltip */
.leaflet-tooltip {
	position: absolute;
	padding: 6px;
	background-color: #fff;
	border: 1px solid #fff;
	border-radius: 3px;
	color: #222;
	white-space: nowrap;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	pointer-events: none;
	box-shadow: 0 1px 3px rgba(0,0,0,0.4);
	}
.leaflet-tooltip.leaflet-interactive {
	cursor: pointer;
	pointer-events: auto;
	}
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	position: absolute;
	pointer-events: none;
	border: 6px solid transparent;
	background: transparent;
	content: "";
	}

/* Directions */

.leaflet-tooltip-bottom {
	margin-top: 6px;
}
.leaflet-tooltip-top {
	margin-top: -6px;
}
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-top:before {
	left: 50%;
	margin-left: -6px;
	}
.leaflet-tooltip-top:before {
	bottom: 0;
	margin-bottom: -12px;
	border-top-color: #fff;
	}
.leaflet-tooltip-bottom:before {
	top: 0;
	margin-top: -12px;
	margin-left: -6px;
	border-bottom-color: #fff;
	}
.leaflet-tooltip-left {
	margin-left: -6px;
}
.leaflet-tooltip-right {
	margin-left: 6px;
}
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	top: 50%;
	margin-top: -6px;
	}
.leaflet-tooltip-left:before {
	right: 0;
	margin-right: -12px;
	border-left-color: #fff;
	}
.leaflet-tooltip-right:before {
	left: 0;
	margin-left: -12px;
	border-right-color: #fff;
	}

/* Printing */

@media print {
	/* Prevent printers from removing background-images of controls. */
	.leaflet-control {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
		}
	}



/* GeoToolbox Pro · 工作台样式（浅色 / 深色）
   布局：顶部功能区 | 左：内容/目录 | 中：地图 + 底部停靠面板 | 右：地理处理/符号系统 | 状态栏 */
:root {
  --bg: #f3f2ee;
  --panel: #fbfaf7;
  --panel-2: #ffffff;
  --ink: #1d1d1b;
  --muted: #6e6d66;
  --line: #dedcd3;
  --line-2: #cfccc1;
  --accent: #1f72b5;
  --accent-2: #3d9be0;
  --accent-soft: rgba(61, 155, 224, .13);
  --accent-ink: #ffffff;
  --select: #00b8d4;
  --good: #2f7d4f;
  --warn: #a5620a;
  --bad: #b42318;
  --plugin: #6a4fb6;
  --map: #e9e7e0;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .08);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
  --r: 8px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121416; --panel: #1a1d20; --panel-2: #20242a; --ink: #e6e8ea; --muted: #9aa1a8; --line: #2c3238; --line-2: #3a424a;
    --accent: #5cb2f0; --accent-2: #3d9be0; --accent-soft: rgba(92, 178, 240, .16); --accent-ink: #0b1620; --map: #0f1215; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121416; --panel: #1a1d20; --panel-2: #20242a; --ink: #e6e8ea; --muted: #9aa1a8; --line: #2c3238; --line-2: #3a424a;
  --accent: #5cb2f0; --accent-2: #3d9be0; --accent-soft: rgba(92, 178, 240, .16); --accent-ink: #0b1620; --map: #0f1215; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { color: var(--ink); background: var(--bg); font: 13px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.shell { display: grid; height: 100%; grid-template-rows: auto auto minmax(0, 1fr) auto; }

/* ---------- 顶栏与功能区 ---------- */
.topbar { display: flex; align-items: center; gap: 14px; padding: 7px 12px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.brand { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.brand-mark { color: var(--accent-2); font-size: 18px; line-height: 1; }
.brand-name { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.brand-name span { color: var(--accent); }
.brand-tag { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.rb-tabs { display: flex; gap: 2px; margin-left: 8px; }
.rb-tab { padding: 5px 12px; border: 0; border-radius: 6px; background: transparent; font-weight: 600; cursor: pointer; color: var(--muted); }
.rb-tab:hover { background: var(--accent-soft); color: var(--ink); }
.rb-tab[aria-selected="true"] { color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 -2px 0 var(--accent); }
.top-search { position: relative; flex: 1; max-width: 380px; margin-left: auto; }
.top-search input { width: 100%; padding: 6px 10px 6px 30px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3E%3Ccircle cx='7' cy='7' r='5' fill='none' stroke='%238a8a85' stroke-width='1.6'/%3E%3Cpath d='M11 11l3 3' stroke='%238a8a85' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") 10px 50% no-repeat; }
.geo-results { position: absolute; z-index: 1200; left: 0; right: 0; top: calc(100% + 6px); max-height: 340px; overflow: auto; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); box-shadow: var(--shadow); }
.geo-hit { display: flex; width: 100%; flex-direction: column; gap: 2px; padding: 7px 9px; border: 0; border-radius: 7px; background: transparent; text-align: left; cursor: pointer; }
.geo-hit:hover { background: var(--accent-soft); }
.geo-hit span { color: var(--muted); font-size: 11.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.top-right { display: flex; align-items: center; gap: 8px; }
.gt-home { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 12px; white-space: nowrap; }
.gt-home:hover { border-color: var(--accent); color: var(--accent); }
.is-embedded .gt-home { display: none; }
.langs { display: flex; gap: 2px; }
.lang-btn { padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); cursor: pointer; font-size: 12px; }
.lang-btn[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

.ribbon { display: flex; align-items: stretch; gap: 0; min-height: 64px; padding: 4px 8px; overflow-x: auto; border-bottom: 1px solid var(--line); background: var(--panel); scrollbar-width: thin; }
.rb-group { display: flex; align-items: stretch; gap: 2px; padding: 0 8px; border-right: 1px solid var(--line); }
.rb-group:last-child { border-right: 0; }
.rb-btn { display: flex; min-width: 62px; max-width: 92px; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px 6px; border: 1px solid transparent; border-radius: 7px; background: transparent; cursor: pointer; }
.rb-btn:hover { border-color: var(--line); background: var(--accent-soft); }
.rb-icon { font-size: 19px; line-height: 1.2; color: var(--accent); }
.rb-label { font-size: 11.5px; line-height: 1.25; text-align: center; color: var(--ink); }

/* ---------- 主体三栏 ---------- */
.app { display: grid; grid-template-columns: 290px minmax(0, 1fr) 340px; min-height: 0; }
body.hide-left .app { grid-template-columns: 0 minmax(0, 1fr) 340px; }
body.hide-right .app { grid-template-columns: 290px minmax(0, 1fr) 0; }
body.hide-left.hide-right .app { grid-template-columns: 0 minmax(0, 1fr) 0; }
body.hide-left .pane.left, body.hide-right .pane.right { display: none; }
.pane { display: flex; min-height: 0; flex-direction: column; background: var(--panel); }
.pane.left { border-right: 1px solid var(--line); }
.pane.right { border-left: 1px solid var(--line); }
.tabs { display: flex; gap: 0; padding: 0 6px; border-bottom: 1px solid var(--line); background: var(--panel-2); overflow-x: auto; scrollbar-width: none; }
.tab { flex: 0 0 auto; padding: 8px 9px; border: 0; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.pane-body { flex: 1; min-height: 0; overflow: auto; padding: 10px; }

/* 内容面板 */
.layer-list { margin: 0; padding: 0; list-style: none; }
.layer { margin-bottom: 4px; border: 1px solid transparent; border-radius: 8px; }
.layer.is-active { border-color: var(--line-2); background: var(--panel-2); box-shadow: var(--shadow); }
.layer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 5px 4px; }
.layer-vis { margin: 0; accent-color: var(--accent); }
.swatch { position: relative; display: inline-grid; width: 18px; height: 18px; place-items: center; cursor: pointer; }
.swatch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sw { display: inline-block; flex: 0 0 auto; }
.sw-poly { width: 16px; height: 12px; border: 1px solid rgba(0, 0, 0, .25); border-radius: 3px; }
.sw-line { width: 16px; height: 3px; border-radius: 2px; }
.sw-point { width: 10px; height: 10px; border: 1.5px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.sw-grad { width: 16px; height: 12px; border-radius: 3px; background: linear-gradient(90deg, #e8f1fa, #4590c8, #0d4a80); }
.layer-name { display: flex; flex: 1; min-width: 0; flex-direction: column; align-items: flex-start; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.layer-title { max-width: 100%; overflow: hidden; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.layer-count { color: var(--muted); font-size: 11px; }
.layer-actions { display: none; width: 100%; gap: 2px; padding-left: 44px; }
.layer.is-active .layer-actions { display: flex; }
.icon-btn { display: grid; width: 24px; height: 24px; place-items: center; padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--accent); background: var(--accent-soft); }
.legend { margin: 0 0 6px 46px; padding: 0; list-style: none; }
.legend li { display: flex; align-items: center; gap: 7px; padding: 1px 0; font-size: 11.5px; color: var(--muted); }
.legend-lg li { font-size: 12.5px; color: var(--ink); }
.basemap-row { display: flex; width: 100%; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 10px; border: 1px dashed var(--line-2); border-radius: 8px; background: transparent; cursor: pointer; text-align: left; }
.basemap-row b { flex: 1; overflow: hidden; color: var(--accent); white-space: nowrap; text-overflow: ellipsis; }
.basemap-row:hover { border-color: var(--accent); }
.contents-actions { display: flex; gap: 6px; margin-top: 10px; }

/* 目录 */
.cat-group { margin-bottom: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); }
.cat-group summary { padding: 8px 10px; font-weight: 700; cursor: pointer; list-style: none; }
.cat-group summary::-webkit-details-marker { display: none; }
.cat-group summary::before { content: '▸ '; color: var(--muted); }
.cat-group[open] summary::before { content: '▾ '; }
.cat-note { margin: -2px 10px 6px; color: var(--muted); font-size: 11.5px; }
.cat-items { margin: 0; padding: 0 6px 6px; list-style: none; }
.cat-item { display: flex; width: 100%; align-items: center; gap: 8px; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; text-align: left; cursor: pointer; }
.cat-item:hover { color: var(--accent); background: var(--accent-soft); }
.cat-kind { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 5px; color: var(--accent); background: var(--accent-soft); font-size: 13px; }
.cat-picker { display: grid; gap: 6px; margin: 0 10px 10px; padding-top: 8px; border-top: 1px dashed var(--line); }

/* ---------- 地图 ---------- */
.center { display: grid; min-width: 0; min-height: 0; grid-template-rows: minmax(0, 1fr) 260px; }
body.hide-dock .center { grid-template-rows: minmax(0, 1fr) 0; }
body.hide-dock .dock { display: none; }
.center > * { min-width: 0; }
.map-wrap { position: relative; min-height: 0; min-width: 0; overflow: hidden; }
.dock { min-width: 0; overflow: hidden; }
.pane, .pane-body { min-width: 0; }
#map { position: absolute; inset: 0; background: var(--map); }
body.is-drawing #map, body.is-drawing .leaflet-interactive { cursor: crosshair !important; }
.draw-hint { position: absolute; z-index: 800; left: 50%; top: 10px; display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; transform: translateX(-50%); border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); box-shadow: var(--shadow); white-space: nowrap; }
.drop-hint { position: absolute; z-index: 900; inset: 10px; display: none; place-items: center; border: 2px dashed var(--accent); border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-size: 15px; font-weight: 700; pointer-events: none; }
.map-wrap.is-drop .drop-hint { display: grid; }
.leaflet-container { font: 12px/1.4 var(--font); background: var(--map); }
.leaflet-bar a { color: var(--ink); background: var(--panel-2); border-color: var(--line) !important; }
.leaflet-control-scale-line { color: var(--ink); background: rgba(255, 255, 255, .8); border-color: var(--ink); font-family: var(--mono); }
.gt-label { padding: 0; border: 0; background: transparent; box-shadow: none; color: #1d1d1b; font-weight: 600; font-size: 11px; text-shadow: 0 0 2px #fff, 0 0 3px #fff, 0 0 4px #fff; white-space: nowrap; }
.gt-label::before { display: none; }
body.map-dark .gt-label { color: #fff; text-shadow: 0 0 2px #000, 0 0 3px #000, 0 0 4px #000; }
.gt-measure { padding: 3px 7px; border: 1px solid var(--accent-2); border-radius: 6px; color: #0b3d63; background: #fff; font-family: var(--mono); font-weight: 700; box-shadow: var(--shadow); }
.gt-popup .leaflet-popup-content-wrapper { border-radius: 10px; color: var(--ink); background: var(--panel-2); box-shadow: var(--shadow); }
.gt-popup .leaflet-popup-tip { background: var(--panel-2); }
.gt-popup .leaflet-popup-content { margin: 10px 12px; }
.gt-pop-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; padding-bottom: 5px; border-bottom: 1px solid var(--line); }
.gt-pop-head span { color: var(--muted); font-family: var(--mono); }
.gt-pop table { width: 100%; border-collapse: collapse; }
.gt-pop th { padding: 2px 8px 2px 0; color: var(--muted); font-weight: 500; text-align: left; vertical-align: top; white-space: nowrap; }
.gt-pop td { padding: 2px 0; word-break: break-word; }
.gt-pop-actions { display: flex; gap: 6px; margin-top: 8px; }
.gt-pop-actions button { flex: 1; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); cursor: pointer; }
.gt-pop-actions button:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- 底部停靠面板 ---------- */
.dock { border-top: 1px solid var(--line); }
.table-bar { position: sticky; top: -10px; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -10px -10px 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--panel); }
.table-bar .field-input { width: 180px; padding: 4px 8px; }
.inline-check { display: inline-flex; align-items: center; gap: 4px; }
.table-wrap { overflow: auto; }
table.attr { width: 100%; border-collapse: collapse; font-size: 12px; }
table.attr th, table.attr td { padding: 4px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: left; }
table.attr th { position: sticky; top: 0; z-index: 1; color: var(--muted); font-weight: 600; background: var(--panel); }
table.attr th.sortable { cursor: pointer; }
table.attr th.sortable:hover, table.attr th.is-sorted { color: var(--accent); }
table.attr td.num, table.attr th.num { text-align: right; font-family: var(--mono); }
table.attr tbody tr { cursor: pointer; }
table.attr tbody tr:hover { background: var(--accent-soft); }
table.attr tr.is-selected { background: rgba(0, 184, 212, .18); }
table.attr td.params { white-space: normal; min-width: 220px; }
.table-scroll { overflow-x: auto; }
.log-list { margin: 0; padding: 0; list-style: none; font-family: var(--mono); font-size: 12px; }
.log-line { display: grid; grid-template-columns: auto auto 1fr; gap: 8px; padding: 2px 0; border-bottom: 1px dashed var(--line); }
.log-time { color: var(--muted); }
.lvl { padding: 0 6px; border-radius: 4px; font-size: 11px; }
.lvl-info { color: var(--accent); background: var(--accent-soft); }
.lvl-warning { color: var(--warn); background: rgba(165, 98, 10, .12); }
.lvl-error { color: var(--bad); background: rgba(180, 35, 24, .12); }
.history-bar, .export-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.export-box textarea { width: 100%; min-height: 140px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); font: 11px/1.4 var(--mono); }
.status { padding: 1px 7px; border-radius: 999px; font-size: 11px; }
.status-success { color: var(--good); background: rgba(47, 125, 79, .12); }
.status-failed { color: var(--bad); background: rgba(180, 35, 24, .12); }
.status-cancelled { color: var(--warn); background: rgba(165, 98, 10, .12); }
.result-card { margin-bottom: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.result-card h3 { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 8px; font-size: 13px; }
.result-card time { color: var(--muted); font-family: var(--mono); font-weight: 400; }
.profile-box { position: relative; }
.profile-svg { display: block; width: 100%; height: auto; max-height: 220px; }
.pf-grid { stroke: var(--line); stroke-width: 1; }
.pf-tick, .pf-axis { fill: var(--muted); font: 11px var(--font); }
.pf-area { fill: rgba(61, 155, 224, .18); }
.pf-line { fill: none; stroke: var(--accent); stroke-width: 2; }
.pf-cross { stroke: var(--muted); stroke-dasharray: 3 3; }
.pf-dot { fill: var(--accent); stroke: #fff; stroke-width: 2; }
.profile-tip { position: absolute; top: 4px; padding: 2px 7px; transform: translateX(-50%); border-radius: 5px; color: #fff; background: var(--accent); font: 11px var(--mono); pointer-events: none; }

/* ---------- 地理处理与符号系统 ---------- */
.tool-filters { display: grid; grid-template-columns: 1fr 120px; gap: 6px; }
.tool-count { margin: 6px 2px; font-size: 11.5px; }
.tool-list { margin: 0; padding: 0; list-style: none; }
.tool-group { margin-top: 6px; }
.tool-group.is-fav span { display: block; padding: 4px 6px; color: var(--muted); font-weight: 700; font-size: 11.5px; }
.group-toggle { display: flex; width: 100%; align-items: center; gap: 6px; padding: 6px 6px; border: 0; border-radius: 6px; background: transparent; font-weight: 700; text-align: left; cursor: pointer; }
.group-toggle:hover { background: var(--accent-soft); }
.group-toggle .caret { width: 12px; color: var(--muted); }
.group-toggle .count { margin-left: auto; padding: 0 7px; border-radius: 999px; color: var(--muted); background: var(--bg); font-size: 11px; }
.tool-item { display: flex; width: 100%; align-items: center; gap: 8px; padding: 5px 8px 5px 22px; border: 0; border-radius: 6px; background: transparent; text-align: left; cursor: pointer; }
.tool-group.is-fav + li .tool-item, .tool-item { padding-left: 18px; }
.tool-item:hover { color: var(--accent); background: var(--accent-soft); }
.tool-item.is-current { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.tool-icon { display: inline-grid; width: 20px; height: 20px; flex: 0 0 auto; place-items: center; border-radius: 5px; color: var(--accent); background: var(--accent-soft); font-size: 12px; }
.tool-name { flex: 1; }
.chip { padding: 1px 7px; border-radius: 999px; font-size: 10.5px; white-space: nowrap; }
.chip-builtin { color: var(--muted); background: var(--bg); }
.chip-plugin { color: var(--plugin); background: rgba(106, 79, 182, .12); }
.chip-cat { color: var(--accent); background: var(--accent-soft); }
.plugin-box { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.back-btn { margin-bottom: 8px; padding: 4px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--accent); cursor: pointer; }
.back-btn:hover { background: var(--accent-soft); }
.tool-head { margin-bottom: 6px; }
.tool-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 15px; }
.tool-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tool-id { color: var(--muted); font: 11px var(--mono); }
.tool-desc { margin: 6px 0 10px; color: var(--muted); }
.tool-form { display: grid; gap: 4px; }
.field { display: grid; gap: 4px; margin-bottom: 6px; }
.field-inline { display: flex; align-items: center; gap: 8px; }
.field-label { font-weight: 600; font-size: 12px; }
.field-label .unit { color: var(--muted); font-weight: 400; }
.field-input { width: 100%; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--panel-2); }
.field-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.field-input[aria-invalid="true"] { border-color: var(--bad); }
.field-input.coords { font: 11.5px/1.4 var(--mono); resize: vertical; }
.field-input.color { height: 32px; padding: 2px; }
.field-check { accent-color: var(--accent); }
.field-help { margin: 0; color: var(--muted); font-size: 11.5px; }
.field-error { min-height: 0; margin: 0; color: var(--bad); font-size: 11.5px; }
.field-error:empty { display: none; }
.pick-btn { justify-self: start; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.run-row { display: flex; gap: 6px; margin-top: 6px; }
.btn { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--panel-2); cursor: pointer; font-weight: 600; }
.btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.btn-primary:hover:not(:disabled) { color: var(--accent-ink); background: var(--accent-2); }
.btn-small { padding: 4px 9px; font-size: 12px; }
.btn-danger { color: #fff !important; background: var(--bad); border-color: var(--bad); }
.file-btn { position: relative; display: inline-flex; align-items: center; padding: 4px 9px; overflow: hidden; border: 1px solid var(--line-2); border-radius: 6px; background: var(--panel-2); font-size: 12px; font-weight: 600; cursor: pointer; }
.file-btn:hover { border-color: var(--accent); color: var(--accent); }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.progress { height: 6px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: var(--bg); }
.progress-bar { width: 0; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .2s ease; }
.run-status { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.run-status.is-success { color: var(--good); }
.run-status.is-failed { color: var(--bad); }
.ramps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.ramp { height: 18px; border: 2px solid transparent; border-radius: 5px; cursor: pointer; }
.ramp.is-on { border-color: var(--ink); }
.sub-h { margin: 14px 0 6px; font-size: 13px; }
.empty { color: var(--muted); }
.note { color: var(--muted); font-size: 11.5px; }
.lead { color: var(--muted); }
.doc-cat { margin: 14px 0 6px; font-size: 13px; }
.doc-tool { margin-bottom: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.doc-tool summary { font-weight: 600; cursor: pointer; }
.doc-tool code, code.inline { font: 11px var(--mono); color: var(--muted); }
pre.code { overflow: auto; padding: 10px; border-radius: 8px; background: var(--bg); font: 11px/1.5 var(--mono); }
.about h3 { margin: 14px 0 6px; font-size: 13px; }
.about p, .about li { color: var(--ink); }
.about ol, .about ul { padding-left: 18px; }
.byline { color: var(--muted); font-size: 11.5px; }

/* ---------- 弹出层、状态栏、提示 ---------- */
.popover { position: fixed; z-index: 1500; width: 370px; max-height: min(70vh, 560px); overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); box-shadow: 0 18px 50px rgba(0, 0, 0, .18); }
.gallery h4 { margin: 8px 2px 6px; color: var(--muted); font-size: 11.5px; letter-spacing: .04em; }
.bm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bm-card { display: flex; flex-direction: column; gap: 4px; padding: 4px; border: 2px solid transparent; border-radius: 9px; background: var(--panel); cursor: pointer; text-align: left; }
.bm-card:hover { border-color: var(--line-2); }
.bm-card.is-on { border-color: var(--accent); }
.bm-thumb { display: block; height: 54px; border-radius: 6px; }
.bm-name { font-size: 11.5px; line-height: 1.25; }
.ov-row { display: flex; align-items: center; gap: 8px; padding: 4px 2px; cursor: pointer; }
.ov-row input { accent-color: var(--accent); }
.bk-item { display: block; width: 100%; padding: 7px 9px; border: 0; border-radius: 7px; background: transparent; text-align: left; cursor: pointer; }
.bk-item:hover { color: var(--accent); background: var(--accent-soft); }
.statusbar .icp-link { flex: none; color: inherit; text-decoration: none; opacity: .7; }
.statusbar .icp-link:hover { opacity: 1; text-decoration: underline; }
.statusbar { display: flex; align-items: center; gap: 14px; min-height: 26px; padding: 3px 12px; overflow: hidden; border-top: 1px solid var(--line); background: var(--panel-2); font-size: 11.5px; white-space: nowrap; }
.attribution { margin-left: auto; overflow: hidden; color: var(--muted); text-overflow: ellipsis; }
.attribution.is-gcj { color: var(--warn); }
.attribution.is-warn::before { content: '⚠ '; color: var(--warn); }
.busy { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }
.busy i { width: 12px; height: 12px; border: 2px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; z-index: 2000; left: 50%; bottom: 40px; max-width: min(90vw, 560px); padding: 8px 14px; transform: translate(-50%, 20px); border-radius: 999px; color: #fff; background: #2a2d31; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .3s ease; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.is-ok { background: #1f6b44; }
.toast.is-err { background: #9b2a1f; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .app { grid-template-columns: 250px minmax(0, 1fr) 300px; }
  .brand-tag { display: none; }
}
@media (max-width: 860px) {
  .shell { grid-template-rows: auto auto auto auto; height: auto; min-height: 100%; }
  .topbar { flex-wrap: wrap; }
  .top-search { order: 5; max-width: none; flex-basis: 100%; }
  .app, body.hide-left .app, body.hide-right .app { display: flex; flex-direction: column; }
  .center { grid-template-rows: 62vh auto; }
  .pane.left, .pane.right { max-height: 52vh; border: 0; border-top: 1px solid var(--line); }
  .pane.left { order: 2; }
  .dock { max-height: 46vh; }
  .popover { left: 8px !important; right: 8px; width: auto; }
}
