/**
 * 电网大亨 · 全球地形数据工作台
 * 全屏地图、左右悬浮工作面板与响应式移动布局。
 */

:root {
    --dwd-ink: #07111b;
    --dwd-panel: rgba(8, 20, 31, 0.95);
    --dwd-panel-soft: rgba(15, 34, 49, 0.92);
    --dwd-line: rgba(159, 190, 211, 0.18);
    --dwd-text: #f2f7fa;
    --dwd-muted: #91a5b5;
    --dwd-faint: #637888;
    --dwd-accent: var(--primary-color, #2fe0b5);
    --dwd-accent-strong: var(--primary-hover, #16c99e);
    --dwd-blue: #55a9ff;
    --dwd-warning: #ffb45c;
    --dwd-danger: #ff7272;
    --dwd-shadow: 0 24px 64px rgba(0, 9, 17, 0.34), 0 4px 16px rgba(0, 9, 17, 0.28);
}

.dwd-terrain-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.dwd-terrain-host-container,
.dwd-terrain-article,
.dwd-terrain-host-main {
    width: 100% !important;
    max-width: none !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
}

html.dwd-terrain-workspace-root,
body.dwd-terrain-workspace-page {
    max-width: 100%;
    overflow-x: hidden !important;
}

html.dwd-terrain-workspace-root { scrollbar-width: none; }
html.dwd-terrain-workspace-root::-webkit-scrollbar,
body.dwd-terrain-workspace-page::-webkit-scrollbar { width: 0; height: 0; }

.dwd-terrain-article > .entry-header,
.dwd-terrain-article > .post-header,
.dwd-terrain-article > .page-header,
.dwd-terrain-article > .post-thumbnail,
.dwd-terrain-article > footer {
    display: none !important;
}

.dwd-terrain-wrapper,
.dwd-terrain-wrapper * {
    box-sizing: border-box;
}

.dwd-terrain-wrapper [hidden] {
    display: none !important;
}

.dwd-terrain-wrapper {
    position: relative;
    width: 100% !important;
    height: var(--dwd-min-height, 680px);
    min-height: 0;
    margin: 0 !important;
    overflow: hidden;
    color: var(--dwd-text);
    background: #b8c6c5;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    isolation: isolate;
    font-family: Inter, "SF Pro Display", "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

.dwd-terrain-container,
#dwd-map {
    position: relative;
    width: 100%;
    height: 100%;
}

#dwd-map {
    z-index: 1;
    background: #dce4e3;
}

.dwd-map-shade {
    position: absolute;
    inset: 0;
    z-index: 400;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(3, 12, 20, 0.22), transparent 23%, transparent 77%, rgba(3, 12, 20, 0.22)),
        linear-gradient(180deg, rgba(2, 10, 17, 0.12), transparent 18%, transparent 78%, rgba(2, 10, 17, 0.2));
}

/* 顶部品牌与全局状态 */
.dwd-workspace-brand {
    position: absolute;
    top: 18px;
    left: 50%;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 48px;
    padding: 8px 10px 8px 12px;
    color: var(--dwd-text);
    background: rgba(6, 18, 28, 0.88);
    border: 1px solid rgba(165, 204, 226, 0.19);
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(1, 11, 19, 0.25);
    backdrop-filter: blur(18px) saturate(1.25);
    transform: translateX(-50%);
    white-space: nowrap;
}

.dwd-brand-mark {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    width: 36px;
    height: 32px;
    padding: 7px;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(47, 224, 181, 0.22), rgba(85, 169, 255, 0.12));
    border: 1px solid rgba(47, 224, 181, 0.28);
    border-radius: 10px;
}

.dwd-brand-mark i {
    display: block;
    width: 5px;
    background: var(--dwd-accent);
    border-radius: 4px 4px 1px 1px;
    box-shadow: 0 0 12px rgba(47, 224, 181, 0.45);
}
.dwd-brand-mark i:nth-child(1) { height: 8px; opacity: .66; }
.dwd-brand-mark i:nth-child(2) { height: 18px; }
.dwd-brand-mark i:nth-child(3) { height: 13px; opacity: .82; }

.dwd-workspace-brand > span:nth-child(2) {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.12;
}

.dwd-workspace-brand strong {
    color: #f7fbfd;
    font-size: 14px;
    font-weight: 720;
    letter-spacing: .06em;
}

.dwd-workspace-brand small {
    margin-top: 4px;
    color: #7690a2;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .2em;
}

.dwd-workspace-brand em {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: 6px;
    padding: 7px 10px;
    color: #a9bac6;
    background: rgba(139, 166, 184, 0.09);
    border-radius: 9px;
    font-size: 11px;
    font-style: normal;
    font-weight: 650;
}

.dwd-workspace-brand em::before {
    width: 6px;
    height: 6px;
    content: "";
    background: #78909f;
    border-radius: 50%;
}

.dwd-workspace-brand em.is-ready { color: #a8f4df; background: rgba(47, 224, 181, .1); }
.dwd-workspace-brand em.is-ready::before { background: var(--dwd-accent); box-shadow: 0 0 10px rgba(47, 224, 181, .8); }
.dwd-workspace-brand em.is-selecting,
.dwd-workspace-brand em.is-generating { color: #b9ddff; background: rgba(85, 169, 255, .1); }
.dwd-workspace-brand em.is-selecting::before,
.dwd-workspace-brand em.is-generating::before { background: var(--dwd-blue); animation: dwd-pulse 1.25s infinite; }
.dwd-workspace-brand em.is-warning { color: #ffd4a2; background: rgba(255, 180, 92, .1); }
.dwd-workspace-brand em.is-warning::before { background: var(--dwd-warning); }

@keyframes dwd-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .38; transform: scale(.75); }
}

/* 右上图层切换：底图单选，道路与地名作为透明叠加层。 */
.dwd-layer-switcher {
    position: absolute;
    top: 18px;
    right: 22px;
    z-index: 900;
    width: 178px;
    padding: 10px;
    color: var(--dwd-text);
    background: rgba(6, 18, 28, .9);
    border: 1px solid rgba(165, 204, 226, .19);
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(1, 11, 19, .25);
    backdrop-filter: blur(18px) saturate(1.25);
}

.dwd-layer-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 0 2px 8px;
}
.dwd-layer-title strong { color: #eaf3f7; font-size: 10px; letter-spacing: .08em; }
.dwd-layer-title span { color: #688091; font-size: 7px; font-weight: 750; letter-spacing: .12em; }
.dwd-layer-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.dwd-layer-options label,
.dwd-layer-overlay {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    margin: 0;
    color: #8fa5b3;
    background: rgba(136, 169, 189, .07);
    border: 1px solid rgba(136, 169, 189, .1);
    border-radius: 8px;
    cursor: pointer;
    font-size: 8px;
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
    transition: color .16s ease, background .16s ease, border-color .16s ease;
}
.dwd-layer-options label:hover,
.dwd-layer-options label.is-active { color: #bdf8e9; background: rgba(47, 224, 181, .1); border-color: rgba(47, 224, 181, .26); }
.dwd-layer-options input,
.dwd-layer-overlay input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dwd-layer-overlay { justify-content: flex-start; min-height: 27px; margin-top: 5px; padding: 0 8px 0 26px; }
.dwd-layer-overlay::before {
    position: absolute;
    left: 9px;
    width: 9px;
    height: 9px;
    content: "";
    background: rgba(148, 177, 195, .08);
    border: 1px solid rgba(148, 177, 195, .28);
    border-radius: 3px;
}
.dwd-layer-overlay.is-active { color: #bdf8e9; background: rgba(47, 224, 181, .075); border-color: rgba(47, 224, 181, .18); }
.dwd-layer-overlay.is-active::before { background: var(--dwd-accent); border-color: var(--dwd-accent); box-shadow: inset 0 0 0 2px #0a3027; }

.dwd-map-credits { margin-top: 6px; color: #8195a2; font-size: 10px; }
.dwd-map-credits summary { color: #8fa6b4; cursor: pointer; font-weight: 650; list-style-position: inside; }
.dwd-map-credits p { margin: 5px 2px 1px; color: #718895; font-size: 10px; line-height: 1.45; }

/* 左右悬浮面板 */
.dwd-panel {
    position: absolute;
    top: 82px;
    bottom: 22px;
    z-index: 850;
    display: flex;
    flex-direction: column;
    max-height: calc(100% - 138px);
    overflow: hidden;
    color: var(--dwd-text);
    background: var(--dwd-panel);
    border: 1px solid var(--dwd-line);
    border-radius: 18px;
    box-shadow: var(--dwd-shadow);
    backdrop-filter: blur(22px) saturate(1.18);
    transition: width .22s ease, max-height .22s ease, box-shadow .22s ease;
}

.dwd-panel-left {
    left: 22px;
    width: 356px;
}

.dwd-panel-right {
    right: 22px;
    width: 380px;
}

.dwd-panel.is-collapsed {
    bottom: auto;
    max-height: 66px;
}

.dwd-panel.is-collapsed .dwd-panel-body {
    display: none;
}

.dwd-panel-header {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 11px;
    min-height: 64px;
    padding: 12px 13px;
    background: linear-gradient(135deg, rgba(23, 47, 64, .96), rgba(11, 27, 40, .96));
    border-bottom: 1px solid rgba(151, 187, 209, 0.13);
}

.dwd-panel-header::after {
    position: absolute;
    right: 16px;
    bottom: -1px;
    left: 16px;
    height: 1px;
    content: "";
    background: linear-gradient(90deg, transparent, rgba(47, 224, 181, .24), transparent);
}

.dwd-step {
    display: grid;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    place-items: center;
    color: var(--dwd-accent);
    background: rgba(47, 224, 181, .09);
    border: 1px solid rgba(47, 224, 181, .25);
    border-radius: 11px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
}

.dwd-panel-heading {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
}

.dwd-panel-heading strong {
    color: #f2f8fa;
    font-size: 14px;
    font-weight: 720;
    letter-spacing: .04em;
}

.dwd-panel-heading small {
    margin-top: 2px;
    overflow: hidden;
    color: var(--dwd-muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dwd-panel-toggle {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    padding: 0;
    place-items: center;
    color: #a8bbc8;
    background: rgba(153, 181, 198, .08);
    border: 1px solid rgba(153, 181, 198, .14);
    border-radius: 9px;
    cursor: pointer;
    font: 500 18px/1 inherit;
    transition: .16s ease;
}

.dwd-panel-toggle:hover {
    color: #fff;
    background: rgba(47, 224, 181, .12);
    border-color: rgba(47, 224, 181, .28);
}

.dwd-panel-body {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    padding: 17px;
    scrollbar-color: rgba(126, 158, 178, .34) transparent;
    scrollbar-width: thin;
}

.dwd-panel-body::-webkit-scrollbar { width: 0; height: 0; }

.dwd-section-label {
    margin: 0 0 8px;
    color: #8298a8;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.dwd-section-spaced { margin-top: 18px; }

/* 地点搜索 */
.dwd-search-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dwd-search-icon {
    position: absolute;
    left: 13px;
    width: 13px;
    height: 13px;
    pointer-events: none;
    border: 1.7px solid #6f8798;
    border-radius: 50%;
}

.dwd-search-icon::after {
    position: absolute;
    right: -5px;
    bottom: -3px;
    width: 6px;
    height: 1.7px;
    content: "";
    background: #6f8798;
    border-radius: 2px;
    transform: rotate(45deg);
}

.dwd-search-input {
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 0 65px 0 38px !important;
    color: #eef5f8 !important;
    background: rgba(150, 182, 202, .07) !important;
    border: 1px solid rgba(145, 177, 197, .18) !important;
    border-radius: 11px !important;
    box-shadow: none !important;
    outline: none;
    font: 500 12px/1 inherit !important;
    transition: .16s ease;
}

.dwd-search-input::placeholder { color: #687d8d; }
.dwd-search-input:focus {
    background: rgba(150, 182, 202, .1) !important;
    border-color: rgba(47, 224, 181, .48) !important;
    box-shadow: 0 0 0 3px rgba(47, 224, 181, .08) !important;
}

.dwd-icon-btn {
    position: absolute;
    right: 5px;
    height: 32px;
    padding: 0 10px;
    color: #baf4e4;
    background: rgba(47, 224, 181, .12);
    border: 1px solid rgba(47, 224, 181, .2);
    border-radius: 8px;
    cursor: pointer;
    font: 700 11px/1 inherit;
}

.dwd-icon-btn:hover { background: rgba(47, 224, 181, .2); }

.dwd-inline-status {
    min-height: 0;
    max-height: 34px;
    margin-top: 6px;
    overflow: hidden;
    color: #8095a5;
    font-size: 10px;
    line-height: 1.55;
    text-overflow: ellipsis;
}
.dwd-inline-status.is-success { color: #87d9c0; }
.dwd-inline-status.is-warning { color: #f3b776; }
.dwd-inline-status.is-loading { color: #8fc7f8; }

/* 选区方式与预设 */
.dwd-tool-btn {
    display: flex;
    width: 100%;
    min-height: 56px;
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    text-align: left;
    color: var(--dwd-text);
    background: linear-gradient(135deg, rgba(47, 224, 181, .1), rgba(85, 169, 255, .05));
    border: 1px solid rgba(47, 224, 181, .2);
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: .16s ease;
}

.dwd-tool-btn:hover,
.dwd-tool-btn.is-active {
    background: linear-gradient(135deg, rgba(47, 224, 181, .18), rgba(85, 169, 255, .08));
    border-color: rgba(47, 224, 181, .46);
    transform: translateY(-1px);
}

.dwd-tool-icon {
    position: relative;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border: 1.5px dashed var(--dwd-accent);
    border-radius: 7px;
}

.dwd-tool-icon::before,
.dwd-tool-icon::after {
    position: absolute;
    width: 5px;
    height: 5px;
    content: "";
    background: var(--dwd-panel-soft);
    border: 1px solid var(--dwd-accent);
}
.dwd-tool-icon::before { top: -3px; left: -3px; }
.dwd-tool-icon::after { right: -3px; bottom: -3px; }

.dwd-tool-btn > span:nth-child(2) { display: flex; flex: 1; min-width: 0; flex-direction: column; }
.dwd-tool-btn strong { font-size: 12px; font-weight: 700; }
.dwd-tool-btn small { margin-top: 2px; color: var(--dwd-muted); font-size: 9px; }
.dwd-tool-btn b {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    color: #718898;
    background: rgba(150, 181, 200, .08);
    border: 1px solid rgba(150, 181, 200, .12);
    border-radius: 6px;
    font-size: 9px;
}

.dwd-preset-label {
    margin: 13px 0 7px;
    color: #6f8494;
    font-size: 9px;
}

.dwd-preset-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.dwd-preset-btn {
    display: flex;
    min-width: 0;
    padding: 9px 5px 8px;
    align-items: center;
    flex-direction: column;
    color: #d6e1e7;
    background: rgba(144, 174, 193, .055);
    border: 1px solid rgba(144, 174, 193, .13);
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    transition: .16s ease;
}

.dwd-preset-btn:hover {
    color: #fff;
    background: rgba(85, 169, 255, .11);
    border-color: rgba(85, 169, 255, .34);
}
.dwd-preset-btn strong { font-size: 12px; font-weight: 730; }
.dwd-preset-btn span { margin-top: 2px; color: #718797; font-size: 8px; }

.dwd-selection-empty {
    display: flex;
    margin-top: 17px;
    padding: 15px 12px;
    align-items: center;
    flex-direction: column;
    text-align: center;
    background: rgba(130, 160, 179, .035);
    border: 1px dashed rgba(130, 160, 179, .15);
    border-radius: 12px;
}
.dwd-selection-empty > span {
    display: grid;
    width: 26px;
    height: 26px;
    margin-bottom: 7px;
    place-items: center;
    color: #7890a0;
    background: rgba(139, 169, 187, .08);
    border-radius: 8px;
    font-size: 17px;
}
.dwd-selection-empty strong { color: #abbcc7; font-size: 10px; font-weight: 650; }
.dwd-selection-empty p { margin: 5px 0 0; color: #677d8c; font-size: 9px; line-height: 1.55; }

/* 选区数据 */
.dwd-bounds-info { margin-top: 16px; }

.dwd-area-summary {
    position: relative;
    display: grid;
    padding: 13px 14px;
    overflow: hidden;
    grid-template-columns: 1fr auto;
    background: linear-gradient(135deg, rgba(47, 224, 181, .11), rgba(47, 224, 181, .035));
    border: 1px solid rgba(47, 224, 181, .18);
    border-radius: 12px;
}
.dwd-area-summary::after {
    position: absolute;
    top: -20px;
    right: -10px;
    width: 90px;
    height: 90px;
    content: "";
    background: radial-gradient(circle, rgba(47, 224, 181, .16), transparent 68%);
}
.dwd-area-summary span { color: #86a097; font-size: 9px; }
.dwd-area-summary strong { z-index: 1; grid-row: span 2; color: #bdf7e7; font-size: 17px; font-weight: 730; }
.dwd-area-summary small { margin-top: 3px; color: #718c83; font-size: 9px; }

.dwd-coordinate-grid {
    display: grid;
    margin-top: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}
.dwd-coordinate-grid > div {
    display: flex;
    min-width: 0;
    padding: 8px 9px;
    flex-direction: column;
    background: rgba(137, 168, 188, .045);
    border: 1px solid rgba(137, 168, 188, .09);
    border-radius: 8px;
}
.dwd-coordinate-grid span { color: #657b8a; font-size: 8px; }
.dwd-coordinate-grid strong { margin-top: 2px; overflow: hidden; color: #b7c7d1; font: 600 9px/1.3 "SFMono-Regular", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }

.dwd-text-btn {
    width: 100%;
    margin-top: 8px;
    padding: 7px;
    color: #718897;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font: 600 9px/1 inherit;
}
.dwd-text-btn:hover { color: #ffabab; background: rgba(255, 114, 114, .06); }

/* 输出设置 */
.dwd-select-field {
    display: flex;
    min-height: 50px;
    padding: 7px 10px;
    align-items: center;
    color: var(--dwd-muted);
    background: rgba(145, 177, 197, .06);
    border: 1px solid rgba(145, 177, 197, .15);
    border-radius: 11px;
}
.dwd-select-field > span { flex: 0 0 78px; font-size: 9px; font-weight: 650; }
.dwd-select-field select {
    flex: 1;
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 0 25px 0 9px !important;
    color: #e7f0f4 !important;
    background-color: rgba(6, 18, 28, .75) !important;
    border: 1px solid rgba(143, 177, 198, .14) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    outline: none;
    font: 600 10px/1 inherit !important;
}
.dwd-select-field select:focus { border-color: rgba(47, 224, 181, .4) !important; }

.dwd-resolution-note {
    margin: 7px 2px 0;
    color: #687e8d;
    font-size: 9px;
    line-height: 1.5;
}

.dwd-format-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.dwd-format-btn {
    position: relative;
    display: grid;
    min-height: 74px;
    padding: 11px;
    text-align: left;
    grid-template-columns: 1fr auto;
    color: #b4c4ce;
    background: rgba(142, 172, 191, .045);
    border: 1px solid rgba(142, 172, 191, .12);
    border-radius: 11px;
    cursor: pointer;
    font-family: inherit;
    transition: .16s ease;
}
.dwd-format-btn::after {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 7px;
    height: 7px;
    content: "";
    background: #435664;
    border: 3px solid #162835;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(137, 169, 190, .25);
}
.dwd-format-btn:hover { background: rgba(142, 172, 191, .075); }
.dwd-format-btn.is-active {
    color: #edf9f5;
    background: linear-gradient(145deg, rgba(47, 224, 181, .13), rgba(47, 224, 181, .045));
    border-color: rgba(47, 224, 181, .35);
}
.dwd-format-btn.is-active::after { background: var(--dwd-accent); border-color: #14392f; box-shadow: 0 0 10px rgba(47, 224, 181, .55); }
.dwd-format-btn strong { align-self: end; font-size: 15px; font-weight: 760; letter-spacing: .04em; }
.dwd-format-btn > span { align-self: end; padding-right: 10px; color: #6e8595; font: 650 8px/1 monospace; }
.dwd-format-btn small { grid-column: 1 / -1; margin-top: 4px; color: #6f8493; font-size: 8px; }

.dwd-export-readiness {
    display: flex;
    min-height: 36px;
    margin-top: 18px;
    padding: 9px 10px;
    align-items: center;
    color: #718695;
    background: rgba(130, 159, 177, .045);
    border: 1px solid rgba(130, 159, 177, .1);
    border-radius: 9px;
    font-size: 9px;
    font-weight: 600;
}
.dwd-export-readiness::before {
    width: 6px;
    height: 6px;
    margin-right: 8px;
    content: "";
    background: #536977;
    border-radius: 50%;
}
.dwd-export-readiness.is-ready { color: #a1dfcc; background: rgba(47, 224, 181, .055); border-color: rgba(47, 224, 181, .14); }
.dwd-export-readiness.is-ready::before { background: var(--dwd-accent); box-shadow: 0 0 8px rgba(47, 224, 181, .6); }
.dwd-export-readiness.is-warning { color: #edbd86; background: rgba(255, 180, 92, .055); border-color: rgba(255, 180, 92, .16); }
.dwd-export-readiness.is-warning::before { background: var(--dwd-warning); }

.dwd-generate-btn {
    display: flex;
    width: 100%;
    min-height: 48px;
    margin-top: 9px;
    padding: 0 15px;
    align-items: center;
    justify-content: space-between;
    color: #05241c;
    background: linear-gradient(135deg, #43e8bf, #21cfa5);
    border: 0;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(26, 205, 162, .2);
    cursor: pointer;
    font: 750 12px/1 inherit;
    transition: .16s ease;
}
.dwd-generate-btn b { font-size: 19px; font-weight: 400; transition: transform .16s ease; }
.dwd-generate-btn:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 11px 28px rgba(26, 205, 162, .3); }
.dwd-generate-btn:not(:disabled):hover b { transform: translateX(3px); }
.dwd-generate-btn:disabled {
    color: #667b85;
    background: #213542;
    box-shadow: none;
    cursor: not-allowed;
}

/* 进度、结果与错误 */
.dwd-progress {
    margin-top: 12px;
    padding: 12px;
    background: rgba(85, 169, 255, .055);
    border: 1px solid rgba(85, 169, 255, .14);
    border-radius: 11px;
}
.dwd-progress-meta { display: flex; align-items: center; justify-content: space-between; }
.dwd-progress-meta strong { color: #b5d9f8; font-size: 9px; font-weight: 650; }
.dwd-progress-meta span { color: #77b7ee; font: 700 9px/1 monospace; }
.dwd-progress-bar { height: 5px; margin: 9px 0 7px; overflow: hidden; background: rgba(111, 150, 180, .16); border-radius: 10px; }
.dwd-progress-fill { width: 0; height: 100%; background: linear-gradient(90deg, var(--dwd-blue), var(--dwd-accent)); border-radius: 10px; box-shadow: 0 0 12px rgba(47, 224, 181, .3); transition: width .45s ease; }
.dwd-progress > small { color: #657f92; font-size: 8px; }

.dwd-download-area {
    margin-top: 13px;
    padding: 13px;
    background: linear-gradient(145deg, rgba(47, 224, 181, .11), rgba(47, 224, 181, .035));
    border: 1px solid rgba(47, 224, 181, .2);
    border-radius: 13px;
}
.dwd-result-heading { display: flex; align-items: center; gap: 10px; }
.dwd-result-heading > span { display: grid; flex: 0 0 30px; width: 30px; height: 30px; place-items: center; color: #062a20; background: var(--dwd-accent); border-radius: 50%; font-weight: 900; }
.dwd-result-heading > div { display: flex; min-width: 0; flex-direction: column; }
.dwd-result-heading strong { color: #dffaf2; font-size: 11px; font-weight: 730; }
.dwd-result-heading small { margin-top: 2px; color: #739c90; font-size: 8px; }

.dwd-download-info { display: grid; margin: 11px 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.dwd-download-info > div { display: flex; min-width: 0; padding: 7px 5px; align-items: center; flex-direction: column; background: rgba(2, 17, 13, .19); border-radius: 7px; }
.dwd-download-info span { color: #6f968b; font-size: 7px; }
.dwd-download-info strong { max-width: 100%; margin-top: 2px; overflow: hidden; color: #bde9dc; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.dwd-download-btn {
    display: flex !important;
    width: 100%;
    min-height: 42px;
    padding: 0 13px !important;
    align-items: center;
    justify-content: space-between;
    color: #06271e !important;
    background: #43e8bf;
    border: 0;
    border-radius: 10px;
    text-decoration: none !important;
    font-size: 10px;
    font-weight: 760;
}
.dwd-download-btn:hover { color: #031d16 !important; background: #5ef0cb; }
.dwd-download-btn span { font-size: 17px; }

.dwd-error {
    margin-top: 12px;
    padding: 11px 12px;
    color: #ffc0c0;
    background: rgba(255, 83, 83, .085);
    border: 1px solid rgba(255, 114, 114, .2);
    border-radius: 10px;
    font-size: 9px;
    line-height: 1.6;
}

.dwd-login-gate {
    display: grid;
    grid-template-columns: 26px 1fr auto;
    margin-top: 10px;
    padding: 10px;
    align-items: center;
    gap: 8px;
    color: #d8e8ef;
    background: linear-gradient(135deg, rgba(85, 169, 255, .105), rgba(47, 224, 181, .055));
    border: 1px solid rgba(85, 169, 255, .19);
    border-radius: 10px;
}
.dwd-login-gate > span { display: grid; width: 25px; height: 25px; place-items: center; color: #8dc8ff; background: rgba(85, 169, 255, .1); border: 1px solid rgba(85, 169, 255, .18); border-radius: 8px; font-size: 13px; }
.dwd-login-gate strong { display: block; color: #dfeff7; font-size: 9px; }
.dwd-login-gate p { margin: 3px 0 0; color: #7892a3; font-size: 7.5px; line-height: 1.45; }
.dwd-login-gate a { padding: 6px 9px; color: #cbe8ff !important; background: rgba(85, 169, 255, .12); border: 1px solid rgba(85, 169, 255, .2); border-radius: 7px; text-decoration: none !important; font-size: 8px; font-weight: 700; }
.dwd-login-gate a:hover { color: #fff !important; background: rgba(85, 169, 255, .22); }
.dwd-generate-btn.is-login-required:not(:disabled) { color: #e6f3ff; background: linear-gradient(135deg, #278dd7, #226bb1); }

.dwd-data-note {
    display: flex;
    margin-top: 14px;
    padding-top: 13px;
    gap: 9px;
    border-top: 1px solid rgba(139, 171, 191, .1);
}
.dwd-data-note > span { display: grid; flex: 0 0 19px; width: 19px; height: 19px; place-items: center; color: #6f8797; border: 1px solid rgba(131, 163, 183, .2); border-radius: 50%; font: italic 700 9px/1 serif; }
.dwd-data-note p { margin: 0; color: #7690a0; font-size: 9px; line-height: 1.62; }

/* Leaflet 适配 */
.dwd-terrain-wrapper .leaflet-container { font-family: inherit; }
.dwd-terrain-wrapper .leaflet-bottom.leaflet-right { right: 398px; }
.dwd-terrain-wrapper .leaflet-control-zoom {
    overflow: hidden;
    background: rgba(6, 18, 28, .88);
    border: 1px solid rgba(153, 184, 202, .17) !important;
    border-radius: 11px !important;
    box-shadow: 0 8px 22px rgba(2, 11, 18, .22) !important;
    backdrop-filter: blur(10px);
}
.dwd-terrain-wrapper .leaflet-control-zoom a {
    width: 32px;
    height: 32px;
    color: #b8cbd5;
    background: transparent;
    border-color: rgba(153, 184, 202, .12);
    line-height: 30px;
}
.dwd-terrain-wrapper .leaflet-control-zoom a:hover { color: var(--dwd-accent); background: rgba(47, 224, 181, .08); }
.dwd-terrain-wrapper .leaflet-editing-icon {
    width: 11px !important;
    height: 11px !important;
    margin: -6px 0 0 -6px !important;
    background: var(--dwd-accent) !important;
    border: 2px solid #09251e !important;
    border-radius: 3px;
    box-shadow: 0 0 0 1px var(--dwd-accent), 0 0 10px rgba(47, 224, 181, .65);
}
.dwd-terrain-wrapper .leaflet-draw-tooltip {
    padding: 7px 9px;
    color: #dceaf0;
    background: rgba(6, 18, 28, .94);
    border: 1px solid rgba(47, 224, 181, .23);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 8, 14, .24);
    font-size: 9px;
}

/* 中等宽度 */
@media (max-width: 1180px) {
    .dwd-panel-left { left: 14px; width: 320px; }
    .dwd-panel-right { right: 14px; width: 338px; }
    .dwd-terrain-wrapper .leaflet-bottom.leaflet-right { right: 350px; }
    .dwd-workspace-brand em { display: none; }
    .dwd-layer-switcher { right: 14px; }
}

/* 移动端采用上下浮动抽屉，地图仍保持全屏 */
@media (max-width: 760px) {
    .dwd-terrain-wrapper {
        min-height: 0;
    }
    .dwd-map-shade { background: linear-gradient(180deg, rgba(2, 10, 17, .12), transparent 30%, transparent 68%, rgba(2, 10, 17, .22)); }
    .dwd-workspace-brand {
        top: 10px;
        right: 10px;
        left: 10px;
        min-height: 48px;
        transform: none;
    }
    .dwd-workspace-brand > span:nth-child(2) { flex: 1; }
    .dwd-workspace-brand strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .dwd-workspace-brand em { display: inline-flex; margin-left: auto; padding: 6px 8px; font-size: 8px; }
    .dwd-layer-switcher {
        top: auto;
        right: auto;
        bottom: calc(39% + 22px);
        left: 10px;
        display: flex;
        width: auto;
        padding: 5px;
        align-items: center;
        gap: 4px;
        border-radius: 11px;
    }
    .dwd-layer-title { display: none; }
    .dwd-map-credits { display: none; }
    .dwd-layer-options { display: flex; }
    .dwd-layer-options label { min-width: 48px; min-height: 27px; }
    .dwd-layer-overlay { min-height: 27px; margin: 0; padding-right: 7px; font-size: 7px; }
    .dwd-panel {
        right: 10px;
        left: 10px;
        width: auto;
        max-height: 35%;
        border-radius: 15px;
    }
    .dwd-panel-left { top: 70px; bottom: auto; }
    .dwd-panel-right { top: auto; bottom: 10px; max-height: 39%; }
    .dwd-panel.is-collapsed { right: 10px; left: 10px; width: auto; max-height: 61px; }
    .dwd-panel-header { min-height: 58px; padding: 10px 12px; }
    .dwd-panel-body { padding: 14px; }
    .dwd-terrain-wrapper .leaflet-bottom.leaflet-right { right: 8px; bottom: 42%; }
}

/* 可读性：工作面板不再使用 7–9px 的微型字体。 */
.dwd-layer-title strong { font-size: 12px; }
.dwd-layer-title span { font-size: 9px; }
.dwd-layer-options label,
.dwd-layer-overlay { font-size: 10px; }
.dwd-workspace-brand strong { font-size: 15px; }
.dwd-workspace-brand small { font-size: 10px; }
.dwd-workspace-brand em { font-size: 12px; }
.dwd-panel-heading strong { font-size: 16px; }
.dwd-panel-heading small { font-size: 12px; }
.dwd-section-label { font-size: 11px; }
.dwd-search-input,
.dwd-icon-btn { font-size: 12px; }
.dwd-inline-status { font-size: 10px; }
.dwd-tool-btn strong { font-size: 13px; }
.dwd-tool-btn small { font-size: 11px; }
.dwd-preset-label,
.dwd-preset-btn span { font-size: 10px; }
.dwd-preset-btn strong { font-size: 13px; }
.dwd-selection-empty strong { font-size: 12px; }
.dwd-selection-empty p { font-size: 11px; }
.dwd-area-summary span,
.dwd-area-summary small { font-size: 10px; }
.dwd-coordinate-grid span { font-size: 10px; }
.dwd-coordinate-grid strong { font-size: 10px; }
.dwd-text-btn,
.dwd-select-field > span,
.dwd-resolution-note { font-size: 11px; }
.dwd-select-field select { font-size: 12px; }
.dwd-format-btn > span,
.dwd-format-btn small { font-size: 10px; }
.dwd-export-readiness { font-size: 11px; }
.dwd-generate-btn { font-size: 13px; }
.dwd-progress-meta strong,
.dwd-progress-meta span,
.dwd-progress > small { font-size: 10px; }
.dwd-result-heading strong { font-size: 12px; }
.dwd-result-heading small,
.dwd-download-info span { font-size: 10px; }
.dwd-download-info strong,
.dwd-download-btn { font-size: 11px; }
.dwd-error { font-size: 11px; }
.dwd-login-gate strong { font-size: 11px; }
.dwd-login-gate p { font-size: 10px; }
.dwd-login-gate a { font-size: 11px; }
.dwd-data-note p { color: #9aafbb; font-size: 11px; }

/* 跟随 Xuhuan 的动态主题。暗色/玻璃态沿用工业深色，浅色主题切换为高对比明亮面板。 */
html[data-theme="dark"] .dwd-terrain-wrapper,
html[data-theme="glass"] .dwd-terrain-wrapper,
body.tah-theme-dark .dwd-terrain-wrapper,
body.tah-theme-glass .dwd-terrain-wrapper {
    --dwd-accent: var(--primary-color, #2fe0b5);
    --dwd-accent-strong: var(--primary-hover, #16c99e);
}

html[data-theme="light"] .dwd-terrain-wrapper,
body.tah-theme-light .dwd-terrain-wrapper,
body.tah-theme-flat .dwd-terrain-wrapper {
    --dwd-ink: #eaf0f2;
    --dwd-panel: rgba(248, 251, 252, .96);
    --dwd-panel-soft: rgba(238, 245, 247, .95);
    --dwd-line: rgba(43, 70, 83, .17);
    --dwd-text: #172a34;
    --dwd-muted: #526b78;
    --dwd-faint: #6b818c;
    --dwd-shadow: 0 22px 54px rgba(23, 43, 52, .18), 0 3px 12px rgba(23, 43, 52, .12);
}

html[data-theme="light"] .dwd-workspace-brand,
html[data-theme="light"] .dwd-layer-switcher,
body.tah-theme-light .dwd-workspace-brand,
body.tah-theme-light .dwd-layer-switcher,
body.tah-theme-flat .dwd-workspace-brand,
body.tah-theme-flat .dwd-layer-switcher {
    color: #172a34;
    background: rgba(248, 251, 252, .94);
    border-color: rgba(48, 77, 90, .2);
}

html[data-theme="light"] .dwd-workspace-brand strong,
html[data-theme="light"] .dwd-layer-title strong,
body.tah-theme-light .dwd-workspace-brand strong,
body.tah-theme-light .dwd-layer-title strong,
body.tah-theme-flat .dwd-workspace-brand strong,
body.tah-theme-flat .dwd-layer-title strong { color: #132832; }

html[data-theme="light"] .dwd-panel-header,
body.tah-theme-light .dwd-panel-header,
body.tah-theme-flat .dwd-panel-header {
    background: linear-gradient(135deg, rgba(229, 239, 243, .98), rgba(244, 249, 250, .98));
    border-bottom-color: rgba(51, 82, 96, .15);
}

html[data-theme="light"] .dwd-panel-heading strong,
html[data-theme="light"] .dwd-tool-btn strong,
html[data-theme="light"] .dwd-format-btn strong,
body.tah-theme-light .dwd-panel-heading strong,
body.tah-theme-light .dwd-tool-btn strong,
body.tah-theme-light .dwd-format-btn strong,
body.tah-theme-flat .dwd-panel-heading strong,
body.tah-theme-flat .dwd-tool-btn strong,
body.tah-theme-flat .dwd-format-btn strong { color: #172a34; }

html[data-theme="light"] .dwd-search-box,
html[data-theme="light"] .dwd-tool-btn,
html[data-theme="light"] .dwd-preset-btn,
html[data-theme="light"] .dwd-selection-empty,
html[data-theme="light"] .dwd-coordinate-grid > div,
html[data-theme="light"] .dwd-select-field,
html[data-theme="light"] .dwd-format-btn,
body.tah-theme-light .dwd-search-box,
body.tah-theme-light .dwd-tool-btn,
body.tah-theme-light .dwd-preset-btn,
body.tah-theme-light .dwd-selection-empty,
body.tah-theme-light .dwd-coordinate-grid > div,
body.tah-theme-light .dwd-select-field,
body.tah-theme-light .dwd-format-btn,
body.tah-theme-flat .dwd-search-box,
body.tah-theme-flat .dwd-tool-btn,
body.tah-theme-flat .dwd-preset-btn,
body.tah-theme-flat .dwd-selection-empty,
body.tah-theme-flat .dwd-coordinate-grid > div,
body.tah-theme-flat .dwd-select-field,
body.tah-theme-flat .dwd-format-btn {
    color: #233a45;
    background: rgba(224, 235, 239, .72);
    border-color: rgba(54, 86, 100, .17);
}

html[data-theme="light"] .dwd-search-input,
html[data-theme="light"] .dwd-select-field select,
body.tah-theme-light .dwd-search-input,
body.tah-theme-light .dwd-select-field select,
body.tah-theme-flat .dwd-search-input,
body.tah-theme-flat .dwd-select-field select { color: #152a34 !important; }

html[data-theme="light"] .dwd-data-note p,
html[data-theme="light"] .dwd-resolution-note,
body.tah-theme-light .dwd-data-note p,
body.tah-theme-light .dwd-resolution-note,
body.tah-theme-flat .dwd-data-note p,
body.tah-theme-flat .dwd-resolution-note { color: #4f6975; }

@media (max-width: 430px) {
    .dwd-workspace-brand small,
    .dwd-workspace-brand em { display: none; }
    .dwd-panel-heading small { display: none; }
    .dwd-download-info { grid-template-columns: 1fr; }
    .dwd-download-info > div { align-items: center; flex-direction: row; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
    .dwd-terrain-wrapper *,
    .dwd-terrain-wrapper *::before,
    .dwd-terrain-wrapper *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
