    * { box-sizing: border-box; margin: 0; padding: 0; }
    html, body { height: 100%; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
    #app { display: flex; height: 100%; }
    #container { flex: 1; height: 100%; position: relative; }
    #panel {
        width: 380px; height: 100%; overflow-y: auto; background: #fff;
        border-right: 1px solid #e5e7eb; padding: 14px 16px; flex-shrink: 0;
    }
    h1 { font-size: 17px; margin-bottom: 10px; }
    h2 { font-size: 13px; color: #374151; margin: 14px 0 6px; }
    section { border-bottom: 1px dashed #e5e7eb; padding-bottom: 12px; }
    input[type=text], input[type=number], input[type=file], select, textarea {
        width: 100%; border: 1px solid #d1d5db; border-radius: 5px;
        padding: 4px 8px; font-size: 13px; margin: 3px 0; background: #fff;
        font-family: inherit;
    }
    input[type=text], input[type=number], select { height: 30px; }
    textarea { height: 90px; resize: vertical; }
    button {
        height: 30px; border: none; border-radius: 5px; padding: 0 12px;
        font-size: 13px; cursor: pointer; background: #2563eb; color: #fff; margin: 3px 4px 3px 0;
    }
    button.ghost { background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; }
    button.warn { background: #dc2626; }
    button:disabled { background: #9ca3af; cursor: not-allowed; }
    .row { display: flex; gap: 6px; align-items: center; }
    .row > * { flex: 1; }
    .row > button, .row > label { flex: 0 0 auto; }
    .hint { font-size: 12px; color: #6b7280; line-height: 1.6; margin: 4px 0; }
    .chip {
        display: flex; align-items: center; gap: 6px; border-radius: 6px;
        padding: 5px 10px; font-size: 13px; margin-top: 4px;
    }
    .chip .x {
        margin: 0 0 0 auto; padding: 0 2px; background: none; border: none;
        color: #9ca3af; font-size: 13px; height: auto; cursor: pointer; line-height: 1.4;
    }
    .chip .coord { font-size: 11px; color: #6b7280; }
    .circle-item {
        display: flex; align-items: center; gap: 6px; font-size: 13px;
        padding: 5px 6px; border: 1px solid #e5e7eb; border-radius: 6px; margin-top: 5px;
    }
    .dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
    .circle-item .label { flex: 1; }
    .circle-item button { margin: 0; height: 24px; padding: 0 8px; font-size: 12px; }
    .poi-item {
        padding: 6px 8px; border: 1px solid #e5e7eb; border-radius: 6px;
        margin-top: 5px; font-size: 13px; cursor: pointer;
    }
    .poi-item:hover { background: #f9fafb; }
    .poi-item .meta { font-size: 12px; color: #6b7280; margin-top: 2px; }
    .poi-item .commute { font-size: 12px; margin-top: 3px; line-height: 1.7; }
    .badge {
        display: inline-block; font-size: 11px; border-radius: 3px; padding: 0 5px;
        margin: 1px 3px 1px 0; color: #fff; background: #9ca3af;
    }
    .badge.g { background: #059669; } .badge.y { background: #d97706; }
    .badge.o { background: #ea580c; } .badge.r { background: #dc2626; }
    .poi-item .tags span {
        display: inline-block; font-size: 11px; border-radius: 3px; padding: 0 5px;
        margin: 2px 3px 0 0; color: #fff;
    }
    .src-tag { font-size: 11px; color: #7c3aed; border: 1px solid #ddd6fe; border-radius: 3px; padding: 0 4px; margin-left: 4px; }
    .st-dot {
        width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
        font-size: 12px; line-height: 1; background: #fff; border: 2px solid #0891b2;
        box-shadow: 0 1px 4px rgba(0,0,0,.35);
    }
    .st-dot.metro { border-color: #dc2626; }
    .station-row .meta { font-size: 12px; color: #6b7280; margin-top: 2px; }
    .line-list { max-height: 190px; overflow-y: auto; margin-top: 4px; }
    .line-item {
        display: flex; align-items: center; gap: 6px; font-size: 12px;
        padding: 3px 4px; border-radius: 4px; cursor: pointer; line-height: 1.5;
    }
    .line-item:hover { background: #f3f4f6; }
    .line-item.active { background: #e0f2fe; }
    .line-item .dot { width: 10px; height: 10px; border-radius: 2px; }
    .line-item .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #toast {
        position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
        background: rgba(17,24,39,.9); color: #fff; padding: 8px 18px; border-radius: 6px;
        font-size: 13px; z-index: 999; display: none; max-width: 80%;
    }
    #mapTip {
        position: fixed; z-index: 998; display: none; pointer-events: none;
        background: rgba(17,24,39,.92); color: #fff; font-size: 12px; line-height: 1.4;
        padding: 4px 8px; border-radius: 4px; max-width: 240px;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        box-shadow: 0 2px 8px rgba(0,0,0,.25);
    }
    details summary { font-size: 12px; color: #6b7280; cursor: pointer; }
    footer { font-size: 11px; color: #9ca3af; line-height: 1.7; padding-top: 10px; }
    .mdot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); }
    .intersect-bar { display: flex; gap: 6px; align-items: center; font-size: 12px; color: #374151; margin-top: 8px; flex-wrap: wrap; }
    .intersect-bar label { display: flex; gap: 4px; align-items: center; white-space: nowrap; }
    .circle-item input[type=checkbox] { width: auto; height: auto; margin: 0; }
    #intersectInfo { font-size: 12px; color: #6b7280; }
    #diffInfo { font-size: 12px; color: #6b7280; }
    button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
    textarea:focus-visible, .poi-item:focus-visible {
        outline: 2px solid #2563eb; outline-offset: 1px;
    }
    .h1-link { font-size: 12px; font-weight: normal; color: #9ca3af; text-decoration: none; margin-left: 8px; white-space: nowrap; }
    .h1-link:hover { color: #2563eb; }
    #guideBar {
        display: none; align-items: flex-start; gap: 8px; background: #eff6ff;
        border: 1px solid #bfdbfe; border-radius: 8px; padding: 8px 10px;
        font-size: 12px; color: #1e40af; line-height: 1.7; margin-bottom: 10px;
    }
    #guideBar .x {
        margin: 0 0 0 auto; padding: 0 4px; background: none; border: none; height: auto;
        cursor: pointer; color: #60a5fa; font-size: 14px; line-height: 1.7; flex-shrink: 0;
    }
    #panelGrab {
        display: none; width: 100%; background: none; border: none; color: #9ca3af;
        font-size: 12px; height: 26px; margin: 0 0 2px; padding: 0; cursor: pointer;
        touch-action: none;
    }
    #panelSummary {
        display: none; font-size: 12px; color: #6b7280; line-height: 1.6;
        padding: 0 4px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .min-chip { height: 24px; padding: 0 9px; font-size: 12px; margin: 2px 4px 2px 0; }
    .retry-btn { height: 22px; font-size: 11px; padding: 0 8px; margin: 4px 0 0; }
    #progBar {
        position: fixed; top: 64px; left: 50%; transform: translateX(-50%);
        z-index: 998; display: none; align-items: center; gap: 10px;
        background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
        box-shadow: 0 4px 16px rgba(0,0,0,.14); padding: 8px 12px;
        font-size: 12px; color: #374151; max-width: 94%;
    }
    #progBar .txt { white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    #progBar .track { width: 160px; height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; flex-shrink: 0; }
    #progBar .fill { display: block; height: 100%; width: 0%; background: #2563eb; transition: width .2s; }
    #progBar button { height: 24px; font-size: 12px; padding: 0 10px; margin: 0; flex-shrink: 0; }
    #keyModal, #pkgModal {
        position: fixed; inset: 0; background: rgba(0,0,0,.45);
        display: none; align-items: center; justify-content: center; z-index: 1000;
        padding: 16px;
    }
    #keyModal.show, #pkgModal.show { display: flex; }
    .modal-box {
        background: #fff; border-radius: 10px; width: 100%; max-width: 420px;
        padding: 20px; box-shadow: 0 10px 40px rgba(0,0,0,.2);
        position: relative;
    }
    .modal-close {
        position: absolute; top: 10px; right: 10px;
        width: 30px; height: 30px; padding: 0; margin: 0;
        background: transparent; border: none; color: #6b7280; font-size: 16px;
    }
    .modal-close:hover { color: #111827; background: #f3f4f6; border-radius: 6px; }
    .info-icon { position: relative; cursor: help; color: #6b7280; font-size: 13px; align-self: center; }
    .info-icon:hover, .info-icon:focus { color: #2563eb; }
    .info-tip {
        display: none; position: absolute; left: 50%; transform: translateX(-50%);
        top: 22px; width: 240px; z-index: 20;
        background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
        box-shadow: 0 4px 16px rgba(0,0,0,.16); padding: 8px 10px;
        font-size: 12px; color: #374151; line-height: 1.6; white-space: normal; cursor: default;
    }
    .info-icon:hover .info-tip, .info-icon.open .info-tip { display: block; }
    .modal-box h3 { font-size: 16px; margin-bottom: 10px; }
    .modal-box p { font-size: 13px; color: #4b5563; line-height: 1.7; margin-bottom: 12px; }
    .modal-box input { margin-bottom: 8px; }
    .modal-box .actions { display: flex; justify-content: flex-end; margin-top: 14px; }
    @media (max-width: 768px) {
        #app { flex-direction: column-reverse; }
        #container { height: auto; flex: 1; }
        #panel { width: 100%; height: 46%; border-right: none; border-top: 1px solid #e5e7eb; transition: height .18s ease; }
        #panel.h-full { height: 85%; }
        #panel.h-min { height: 92px; }
        #panel.h-min #panelSummary { display: block; }
        #panelGrab { display: block; height: 32px; }
        button, input[type=text], input[type=number], select { height: 40px; }
        textarea { min-height: 40px; }
        #panel input[type=checkbox] { width: 22px !important; height: 22px !important; }
        .circle-item button, #progBar button, .retry-btn, .min-chip { height: 32px; }
        .min-chip { padding: 0 12px; font-size: 13px; }
        .chip { padding: 8px 12px; }
        .chip .x { padding: 0 8px; min-width: 32px; height: 32px; font-size: 16px; }
        #guideBar .x { min-width: 32px; height: 32px; }
        #progBar .track { width: 100px; }
    }
