/* KML 在线预览界面 V1.12：量测实时预览、十字丝光标，并增强节点编辑。 */
.kml-preview-page{background:#f5f9ff;overflow-x:hidden}
.preview-shell{width:min(var(--max),calc(100vw - 32px));margin:0 auto;padding:10px 0 12px}
.preview-topbar{position:sticky;top:86px;z-index:120;display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 10px;padding:9px 14px;border:1px solid #dbe8fb;border-radius:12px;background:rgba(255,255,255,.96);box-shadow:0 8px 20px rgba(11,72,150,.09);backdrop-filter:blur(10px)}
.preview-title-block{min-width:0;display:grid;gap:2px}
.preview-title-block .breadcrumb{font-size:12px;color:#0868f5;font-weight:900;line-height:1.25}
.preview-title-block h1{display:flex;align-items:center;gap:8px;margin:0;font-size:24px;line-height:1.1;color:#071d4a;font-weight:950;letter-spacing:0}
.version-pill{display:inline-flex;align-items:center;height:21px;padding:0 8px;border-radius:7px;background:#eaf3ff;border:1px solid #cfe2ff;color:#0868f5;font-size:12px;font-weight:950;letter-spacing:0}
.preview-title-block p{margin:0;color:#415574;font-size:13px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.preview-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.outline-link{height:34px;display:inline-flex;align-items:center;justify-content:center;padding:0 13px;border:1px solid #b6d3ff;border-radius:7px;color:#0b66e9;background:#fff;font-size:13px;font-weight:900;white-space:nowrap}
.primary-btn.compact{height:34px;min-width:112px;font-size:13px;border-radius:7px}
.map-workspace{height:calc(100vh - 188px);min-height:540px;display:flex;gap:10px;align-items:stretch}
.left-panel{width:340px;min-width:320px;max-width:360px;display:flex;flex-direction:column;gap:8px;min-height:0;overflow-y:auto;overflow-x:hidden;padding-right:4px;scrollbar-width:thin}
.map-panel{flex:1;min-width:0;height:100%;background:#fff;border:1px solid #dce9fb;border-radius:12px;box-shadow:0 10px 26px rgba(13,45,93,.06);overflow:hidden;display:grid;grid-template-rows:42px minmax(0,1fr)}
.panel-card{background:#fff;border:1px solid #dce9fb;border-radius:10px;box-shadow:0 5px 16px rgba(13,45,93,.04);padding:10px}
.panel-heading{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:9px;margin-bottom:8px}
.panel-heading.slim-heading{margin-bottom:6px}
.panel-icon{width:32px;height:32px;border-radius:9px;background:#eaf3ff;color:#0868f5;display:grid;place-items:center;font-weight:950;font-size:13px;border:1px solid #cfe2ff}
.panel-heading strong{display:block;font-size:15px;color:#10284f;margin-bottom:1px;line-height:1.2}
.panel-heading span:last-child{display:block;color:#687a95;font-size:12px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.key-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 8px;border-radius:8px;background:#f8fbff;border:1px solid #edf4ff;color:#53667f;font-size:13px;font-weight:800}
.key-summary b{color:#0b4fb3}
.key-summary button,.key-row button,.file-actions button,.map-toolbar button,.measure-actions button,.edit-actions button,.draw-actions button{height:32px;border:1px solid #b6d3ff;border-radius:7px;background:#fff;color:#0b66e9;font-size:12.5px;font-weight:900;cursor:pointer}
.key-summary button{min-width:78px}
.key-editor{margin-top:8px}
.key-editor.collapsed{display:none}
.key-row{display:grid;grid-template-columns:minmax(0,1fr) 92px;gap:7px}
.key-row input{height:32px;border:1px solid #c9dcf5;border-radius:7px;padding:0 9px;color:#13294b;outline:none;background:#fafdff;font-size:13px}
.key-row input:focus,.edit-name-row input:focus{border-color:#0868f5;box-shadow:0 0 0 3px rgba(8,104,245,.10)}
.key-row button{background:#0868f5;color:#fff;border-color:#0868f5}
.mini-tip{margin:6px 0 0;color:#7a89a3;font-size:12px;line-height:1.45}
.file-name-ellipsis{display:block;max-width:245px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.status-box{min-height:0;padding:8px;border-radius:8px;background:#f3f8ff;border:1px dashed #bfd8ff;color:#53667f;font-size:12.5px;line-height:1.45;max-height:64px;overflow:auto}
.status-box.ok{border-style:solid;border-color:#a7dfbf;background:#f1fff6;color:#166534;font-weight:800}
.status-box.warn{border-style:solid;border-color:#ffd99d;background:#fff9ed;color:#92400e;font-weight:800}
.status-box.error{border-style:solid;border-color:#ffb4b4;background:#fff3f3;color:#b42318;font-weight:800}
.file-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:8px}
#openKmlBtn{background:#0868f5;border-color:#0868f5;color:#fff;box-shadow:0 6px 14px rgba(8,104,245,.20)}
#openKmlBtn:hover{filter:brightness(.98);box-shadow:0 8px 18px rgba(8,104,245,.26)}
.file-actions button:disabled,.edit-actions button:disabled,.draw-actions button:disabled{background:#f2f4f7;color:#98a2b3;border-color:#e4e7ec;cursor:not-allowed;box-shadow:none}
.measure-actions,.edit-actions,.draw-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.measure-actions button:hover,.edit-actions button:hover,.draw-actions button:hover,.file-actions button:hover,.key-summary button:hover,.key-row button:hover,.map-toolbar button:hover{filter:brightness(.98);box-shadow:0 5px 12px rgba(8,104,245,.10)}
.measure-actions button.active,.edit-actions button.active,.draw-actions button.active{background:#0868f5;color:#fff;border-color:#0868f5}
.measure-actions button:last-child,.edit-actions button:last-child,.draw-actions button:last-child{grid-column:1/-1}
.edit-actions button:last-child,.draw-actions button:last-child{background:#0868f5;color:#fff;border-color:#0868f5}
.edit-actions button:last-child:disabled,.draw-actions button:last-child:disabled{background:#f2f4f7;color:#98a2b3;border-color:#e4e7ec}
.measure-result,.selected-feature-box{min-height:0;margin-top:8px;padding:8px;border-radius:8px;background:#f3f8ff;border:1px dashed #bfd8ff;color:#53667f;font-size:12.5px;line-height:1.45;max-height:136px;overflow:auto}
.measure-result.active{border-style:solid;border-color:#9dc5ff;background:#eef6ff;color:#0b4fb3;font-weight:800}
.measure-result.ok{border-style:solid;border-color:#a7dfbf;background:#f1fff6;color:#166534;font-weight:800}
.measure-result.warn{border-style:solid;border-color:#ffd99d;background:#fff9ed;color:#92400e;font-weight:800}
.edit-status,.draw-status{padding:7px 8px;border-radius:8px;background:#f3f8ff;border:1px solid #d8e8ff;color:#0b4fb3;font-size:12.5px;font-weight:900;line-height:1.35}
.edit-status.warn,.draw-status.warn{background:#fff9ed;border-color:#ffd99d;color:#92400e}
.edit-status.ok,.draw-status.ok{background:#f1fff6;border-color:#a7dfbf;color:#166534}
.edit-name-row{display:grid;gap:5px;margin-top:8px;color:#667797;font-size:12.5px;font-weight:900}
.edit-name-row input{height:32px;border:1px solid #c9dcf5;border-radius:7px;padding:0 9px;color:#13294b;outline:none;background:#fafdff;font-weight:800;font-size:13px}
.edit-name-row input:disabled{background:#f2f4f7;color:#98a2b3;border-color:#e4e7ec}
.edit-actions,.draw-actions{margin-top:8px}
.feature-detail-list{display:grid;gap:6px;margin:0}
.feature-detail-list div{display:grid;grid-template-columns:62px minmax(0,1fr);gap:8px;align-items:start;padding:6px 8px;border-radius:8px;background:#fff;border:1px solid #e5f0ff}
.feature-detail-list dt{font-size:12.5px;color:#667797;font-weight:800}
.feature-detail-list dd{margin:0;color:#0b1f49;font-weight:900;font-size:12.5px;word-break:break-all;line-height:1.35}
.info-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:8px 0 0}
.info-list div{display:grid;grid-template-columns:auto minmax(0,1fr);gap:5px;align-items:center;padding:6px 8px;border-radius:8px;background:#f8fbff;border:1px solid #edf4ff}
.info-list div.wide{grid-column:1/-1}
.info-list dt{font-size:12px;color:#667797;font-weight:800}
.info-list dd{margin:0;color:#0b1f49;font-weight:900;font-size:12.5px;word-break:break-all;line-height:1.35}
.note-card{padding:0;overflow:hidden}
.note-card summary{list-style:none;cursor:pointer;padding:10px;color:#0b2b68;font-size:14px;font-weight:900}
.note-card summary::-webkit-details-marker{display:none}
.note-card p{margin:0;padding:0 10px 10px;color:#4d607d;font-size:12.5px;line-height:1.6}
.map-toolbar{height:42px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 10px;border-bottom:1px solid #e3edf9;background:#fbfdff}
.toolbar-left{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.map-toolbar button{height:28px;padding:0 10px;border-radius:6px;font-size:12.5px;background:#fff;color:#0b66e9}
.map-toolbar button.active{background:#0868f5;color:#fff;border-color:#0868f5}
.toolbar-right{color:#667797;font-size:12.5px;font-weight:800;white-space:nowrap}
.map-container{position:relative;min-height:0;width:100%;height:100%;background:#e9f2ff;overflow:hidden}
.map-container.map-cursor-select,.map-container.map-cursor-select *{cursor:default!important}
.map-container.map-cursor-draw,.map-container.map-cursor-draw *{cursor:crosshair!important}
.map-container.map-cursor-measure,.map-container.map-cursor-measure *{cursor:crosshair!important}
.map-placeholder{position:absolute;inset:0;z-index:2;display:grid;place-items:center;background:linear-gradient(135deg,#eaf4ff 0,#f7fbff 100%)}
.placeholder-card{width:min(380px,calc(100% - 40px));min-height:126px;border:1px dashed #9dc5ff;border-radius:14px;background:rgba(255,255,255,.88);display:grid;place-items:center;text-align:center;padding:22px;color:#53667f;box-shadow:0 12px 28px rgba(8,104,245,.08)}
.placeholder-card strong{display:block;color:#0b2b68;font-size:21px;margin-bottom:6px}
.placeholder-card span{font-size:14px;line-height:1.6}
.map-placeholder.hidden{display:none}
.kml-edit-node{width:14px;height:14px;border:2px solid #fff;border-radius:50%;background:#0868f5;box-shadow:0 0 0 2px rgba(8,104,245,.35),0 4px 12px rgba(8,104,245,.22)}
.measure-map-label-shell{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important}
.measure-map-label{padding:6px 9px;border:1px solid #9dc5ff;border-radius:7px;background:rgba(255,255,255,.95);box-shadow:0 6px 16px rgba(13,45,93,.18);color:#0b1f49;font-size:13px;font-weight:900;line-height:1.45;white-space:nowrap}
.tdt-control-copyright,.tdt-control-copyrightLogo{display:none!important}
@media(max-width:1120px){.preview-topbar{top:86px}.map-workspace{height:auto;min-height:0;display:grid;grid-template-columns:1fr}.left-panel{width:auto;max-width:none;min-width:0;max-height:none;overflow:visible;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.map-panel{height:620px}.note-card{grid-column:1/-1}}
@media(max-width:720px){.preview-shell{width:calc(100vw - 20px);padding-top:8px}.preview-topbar{top:0;align-items:flex-start;flex-direction:column}.preview-title-block h1{font-size:22px}.preview-title-block p{white-space:normal}.version-pill{height:20px;font-size:12px}.preview-actions{width:100%;justify-content:flex-start}.outline-link,.primary-btn.compact{width:100%}.left-panel{grid-template-columns:1fr}.map-toolbar{height:auto;min-height:42px;align-items:flex-start;flex-direction:column;padding:8px}.map-panel{height:560px}.key-row,.measure-actions,.edit-actions,.draw-actions{grid-template-columns:1fr}.file-actions{grid-template-columns:1fr}.measure-actions button:last-child,.edit-actions button:last-child,.draw-actions button:last-child{grid-column:auto}.toolbar-right{white-space:normal}}


/* V1.15：KML 预览编辑抬头统一为 CAD转KML 工具页风格。 */
.kml-preview-page .preview-shell{width:100%;max-width:none;margin:0;padding:0 0 12px;}
.kml-preview-page .main-area{padding:14px 0 8px;margin:0 0 6px;}
.kml-preview-page .main-head{align-items:center;gap:22px;}
.kml-preview-page .tool-title{font-size:34px;margin-bottom:6px;}
.kml-preview-page .tool-sub{font-size:15px;line-height:1.45;margin:0 0 6px;}
.kml-preview-page .privacy-note{font-size:13.5px;line-height:1.4;}
.kml-preview-page .contour-art{height:108px;opacity:.62;}
.kml-preview-page .contour-art::before{right:18px;top:2px;width:245px;height:86px;border-radius:15px;}
.kml-preview-page .contour-art::after{right:126px;top:24px;width:28px;height:28px;}
.kml-preview-page .preview-actions{margin-top:8px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-start;}
.kml-preview-page .map-workspace{width:min(var(--max),calc(100vw - 32px));margin:8px auto 0;height:calc(100vh - 210px);min-height:540px;}
.tool-version-pill{display:inline-flex;align-items:center;margin-left:10px;height:28px;padding:0 10px;border-radius:999px;background:#0868f5;color:#fff;font-size:14px;font-weight:900;vertical-align:middle;letter-spacing:0;}
@media(max-width:1120px){.kml-preview-page .map-workspace{height:auto;min-height:0}.kml-preview-page .tool-title{font-size:30px}}
@media(max-width:720px){.kml-preview-page .main-area{padding:12px 0 8px}.kml-preview-page .tool-title{font-size:28px}.kml-preview-page .contour-art{display:none}.kml-preview-page .map-workspace{width:calc(100vw - 20px)}}
