:root {
    --paper: rgba(255, 255, 255, 0.96);
    --ink: #1e2329;
    --muted: #68717d;
    --line: rgba(45, 54, 65, 0.14);
    --accent: #b83a2e;
    --accent-dark: #822820;
    --gold: #b9822e;
    --shadow: 0 18px 48px rgba(18, 24, 33, 0.2);
}

.city-panel,
.city-panel *,
.map-tools,
.map-tools *,
.map-search,
.map-search *,
.map-status {
    box-sizing: border-box;
}

html,
body,
#map {
    width: 100%;
    height: 100%;
    margin: 0;
}

body {
    overflow: hidden;
    color: var(--ink);
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
    background: #eef2f0;
}

#map {
    position: fixed;
    inset: 0;
}

.map-tools {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 18;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 8px;
    max-width: calc(100vw - 360px);
}

.map-search {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 19;
}

.filter-toggle {
    display: inline-flex;
    padding: 3px;
    border: 1px solid rgba(45, 54, 65, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 24px rgba(18, 24, 33, 0.12);
}

.tool-button {
    min-height: 34px;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0 12px;
    color: #2f3b49;
    background: rgba(255, 255, 255, 0.92);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.filter-toggle .tool-button {
    background: transparent;
}

.tool-button:hover,
.tool-button:focus-visible {
    outline: none;
    border-color: rgba(47, 128, 237, 0.36);
    color: #1f5fb8;
}

.tool-button.is-active {
    color: #fff;
    background: #2f80ed;
}

.visible-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 36px;
    min-height: 36px;
    border: 1px solid rgba(45, 54, 65, 0.14);
    border-radius: 8px;
    padding: 0;
    color: #5d6672;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 24px rgba(18, 24, 33, 0.12);
    transition: width 0.18s ease;
}

.visible-search.is-expanded {
    width: min(300px, calc(100vw - 32px));
    padding: 0 8px 0 10px;
}

.visible-search-toggle {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 7px;
    color: #2f3b49;
    background: transparent;
    cursor: pointer;
}

.visible-search-toggle:hover,
.visible-search-toggle:focus-visible {
    outline: none;
    color: #1f5fb8;
    background: rgba(47, 128, 237, 0.1);
}

.visible-search.is-expanded .visible-search-toggle {
    display: none;
}

.visible-search input {
    display: none;
    min-width: 0;
    flex: 1 1 auto;
    height: 32px;
    border: 0;
    outline: 0;
    color: #1f2a36;
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
}

.visible-search input::-webkit-search-cancel-button,
.visible-search input::-webkit-search-decoration {
    display: none;
}

.visible-search.is-expanded input {
    display: block;
}

.visible-search input::placeholder {
    color: #7b8490;
    font-weight: 600;
}

.visible-search-clear {
    display: none;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 50%;
    color: #68717d;
    background: transparent;
    cursor: pointer;
}

.visible-search-clear.is-visible {
    display: inline-grid;
    place-items: center;
}

.visible-search-clear:hover,
.visible-search-clear:focus-visible {
    outline: none;
    color: #1f5fb8;
    background: rgba(47, 128, 237, 0.1);
}

.visible-search-results {
    position: absolute;
    top: 42px;
    left: 0;
    width: min(340px, calc(100vw - 32px));
    max-height: min(420px, calc(100vh - 88px));
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 14px 40px rgba(18, 24, 33, 0.18);
}

.visible-search-results.is-hidden {
    display: none;
}

.map-json-debug {
    position: fixed;
    top: 60px;
    left: 16px;
    z-index: 19;
    display: none;
}

.json-debug {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    width: 36px;
    min-height: 36px;
    border: 1px solid rgba(45, 54, 65, 0.14);
    border-radius: 8px;
    padding: 0;
    color: #5d6672;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 24px rgba(18, 24, 33, 0.12);
    transition: width 0.18s ease;
    cursor: pointer;
}

.json-debug.is-expanded {
    width: min(420px, calc(100vw - 32px));
    padding: 6px 8px 6px 10px;
    cursor: default;
}

.json-debug::before {
    content: "{}";
    font-weight: 700;
    font-size: 15px;
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    color: #2f3b49;
    cursor: pointer;
}

.json-debug.is-expanded::before {
    display: none;
}

#json-debug-input {
    display: none;
    min-width: 0;
    flex: 1 1 auto;
    height: 28px;
    border: 0;
    outline: 0;
    color: #1f2a36;
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-family: "SF Mono", "Menlo", "Consolas", monospace;
}

.json-debug.is-expanded #json-debug-input {
    display: block;
}

.json-debug-clear {
    display: none;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    color: #68717d;
    background: transparent;
    cursor: pointer;
    font-size: 11px;
}

.json-debug.is-expanded .json-debug-clear {
    display: inline-grid;
    place-items: center;
}

.json-debug-clear:hover,
.json-debug-clear:focus-visible {
    outline: none;
    color: #1f5fb8;
    background: rgba(47, 128, 237, 0.1);
}

.json-debug-output {
    display: block;
    width: 100%;
    margin: 6px 0 2px;
    border: 1px solid rgba(45, 54, 65, 0.12);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(18, 24, 33, 0.14);
    overflow: hidden;
}

.json-debug-output.is-hidden {
    display: none;
}

.json-debug-heading {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(45, 54, 65, 0.08);
    background: #f8f9fa;
    font-size: 12px;
    font-weight: 600;
    color: #2f3b49;
}

.json-debug-heading span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.json-debug-heading button {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #68717d;
    cursor: pointer;
    font-size: 13px;
}

.json-debug-heading button:hover {
    background: rgba(45, 54, 65, 0.08);
    color: #1e2329;
}

.json-debug-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 300px;
    overflow: auto;
}

.json-debug-item {
    display: block;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    border-bottom: 1px solid rgba(45, 54, 65, 0.06);
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.json-debug-item:last-child {
    border-bottom: 0;
}

.json-debug-item:hover {
    background: rgba(47, 128, 237, 0.06);
}

.json-debug-item b {
    display: block;
    font-size: 13px;
    color: #1e2329;
    font-weight: 600;
    margin-bottom: 2px;
}

.json-debug-item small {
    display: block;
    font-size: 11px;
    color: #68717d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.json-debug-pre {
    margin: 0;
    padding: 10px 12px;
    max-height: 400px;
    overflow: auto;
    font-family: "SF Mono", "Menlo", "Consolas", monospace;
    font-size: 11px;
    line-height: 1.55;
    color: #1e2329;
    white-space: pre-wrap;
    word-break: break-all;
}

.json-debug-empty {
    margin: 0;
    padding: 14px 12px;
    font-size: 12px;
    color: #68717d;
    text-align: center;
}

.visible-search-empty,
.visible-search-count {
    margin: 0;
    color: #68717d;
    font-size: 12px;
    line-height: 1.55;
}

.visible-search-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.visible-search-count {
    flex: 1 1 auto;
    margin-bottom: 8px;
    color: #2f3b49;
    font-weight: 700;
}

.visible-search-heading .visible-search-count {
    margin: 0;
}

.visible-search-show-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    min-height: 28px;
    border: 1px solid rgba(47, 128, 237, 0.24);
    border-radius: 999px;
    padding: 0 10px;
    color: #1d4ed8;
    background: rgba(47, 128, 237, 0.08);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.visible-search-show-all:hover,
.visible-search-show-all:focus-visible {
    outline: none;
    border-color: rgba(47, 128, 237, 0.48);
    background: rgba(47, 128, 237, 0.14);
}

.visible-search-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.visible-search-item {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    width: 100%;
    border: 1px solid rgba(45, 54, 65, 0.1);
    border-radius: 8px;
    padding: 8px 9px;
    color: #1f2a36;
    background: rgba(255, 255, 255, 0.74);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.visible-search-item:hover,
.visible-search-item:focus-visible {
    outline: none;
    border-color: rgba(47, 128, 237, 0.34);
    background: rgba(47, 128, 237, 0.08);
}

.visible-search-item .bi {
    color: #2f80ed;
    text-align: center;
}

.visible-search-item span {
    min-width: 0;
}

.visible-search-item b,
.visible-search-item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.visible-search-item b {
    font-size: 13px;
}

.visible-search-item small {
    margin-top: 2px;
    color: #68717d;
    font-size: 11px;
}

.list-toggle {
    border-color: rgba(45, 54, 65, 0.14);
    box-shadow: 0 8px 24px rgba(18, 24, 33, 0.12);
}

.point-add-toggle,
.point-focus-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-color: rgba(124, 58, 237, 0.18);
    color: #5b21b6;
    box-shadow: 0 8px 24px rgba(18, 24, 33, 0.12);
}

.point-add-toggle .bi,
.point-focus-toggle .bi {
    line-height: 1;
}

.point-add-toggle.is-active {
    color: #fff;
    background: #7c3aed;
}

.point-focus-toggle:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.favorite-list-popover,
.custom-point-list-popover {
    position: absolute;
    top: 46px;
    right: 0;
    width: min(320px, calc(100vw - 32px));
    max-height: min(430px, calc(100vh - 84px));
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 40px rgba(18, 24, 33, 0.18);
    touch-action: pan-y;
}

.favorite-list-popover.has-custom-size {
    max-height: none;
}

.favorite-list-popover.is-resizing {
    cursor: nwse-resize;
    touch-action: none;
    user-select: none;
}

.favorite-list-popover.is-hidden,
.custom-point-list-popover.is-hidden {
    display: none;
}

.favorite-list-title {
    margin: 0 0 10px 30px;
    color: #1f2a36;
    font-size: 15px;
}

.custom-point-list-title {
    margin: 0 0 8px;
    color: #4c1d95;
    font-size: 15px;
}

.custom-point-list-hint,
.custom-point-list-empty {
    margin: 0 0 10px;
    color: #68717d;
    font-size: 12px;
    line-height: 1.55;
}

.custom-point-list-empty {
    margin: 0;
    border: 1px dashed rgba(124, 58, 237, 0.3);
    border-radius: 8px;
    padding: 12px;
    background: rgba(124, 58, 237, 0.05);
}

.custom-point-items {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.custom-point-item {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: 1px solid rgba(124, 58, 237, 0.22);
    border-radius: 8px;
    padding: 9px 10px;
    color: #43216e;
    background: rgba(124, 58, 237, 0.06);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.custom-point-item:hover,
.custom-point-item:focus-visible {
    outline: none;
    border-color: #7c3aed;
    background: rgba(124, 58, 237, 0.12);
}

.custom-point-item strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    color: #fff;
    background: #7c3aed;
    font-size: 12px;
}

.custom-point-item span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.custom-point-item b,
.custom-point-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-point-item b {
    font-size: 13px;
}

.custom-point-item small,
.custom-point-item .bi {
    color: #6b5b81;
    font-size: 12px;
}

.favorite-resize-handle {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(45, 54, 65, 0.14);
    border-radius: 6px;
    color: #68717d;
    background: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    cursor: nesw-resize;
    touch-action: none;
}

.favorite-resize-handle:hover,
.favorite-resize-handle:focus-visible {
    outline: none;
    border-color: rgba(47, 128, 237, 0.4);
    color: #1f5fb8;
    background: #fff;
}

.favorite-resize-handle .bi {
    line-height: 1;
}

.favorite-city-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.favorite-list-hint {
    margin: -4px 0 10px;
    color: #68717d;
    font-size: 12px;
    line-height: 1.55;
}

.favorite-list-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: -2px 0 10px;
}

.favorite-data-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    border: 1px solid rgba(47, 128, 237, 0.2);
    border-radius: 7px;
    color: #1f5fb8;
    background: rgba(47, 128, 237, 0.08);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.favorite-data-button:hover,
.favorite-data-button:focus-visible {
    outline: none;
    border-color: rgba(47, 128, 237, 0.48);
    background: rgba(47, 128, 237, 0.14);
}

.favorite-data-button .bi {
    line-height: 1;
}

.favorite-city-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 7px;
}

.favorite-city-main {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.favorite-city-row.is-dragging {
    opacity: 0.5;
}

.favorite-city-row.is-drop-target .favorite-city-item {
    border-color: #2f80ed;
    box-shadow: inset 0 0 0 1px rgba(47, 128, 237, 0.28);
}

.drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(45, 54, 65, 0.12);
    border-radius: 7px;
    color: #68717d;
    background: rgba(255, 255, 255, 0.74);
    font-size: 16px;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.drag-handle .bi {
    line-height: 1;
}

.favorite-city-row:active .drag-handle {
    cursor: grabbing;
}

.favorite-city-item {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    width: 100%;
    border: 1px solid rgba(32, 164, 100, 0.22);
    border-radius: 7px;
    padding: 10px 11px;
    color: #153326;
    background: rgba(32, 164, 100, 0.07);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.favorite-city-item:hover,
.favorite-city-item:focus-visible {
    outline: none;
    border-color: #20a464;
    background: rgba(32, 164, 100, 0.12);
}

.favorite-city-item span {
    font-size: 14px;
    font-weight: 700;
}

.favorite-city-text {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.favorite-city-item small {
    color: #5c6977;
    font-size: 12px;
}

.favorite-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    color: #fff;
    background: #20a464;
    font-size: 12px;
}

.favorite-reorder-actions {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
}

.reorder-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    border: 1px solid rgba(45, 54, 65, 0.12);
    border-radius: 6px;
    color: #354152;
    background: rgba(255, 255, 255, 0.88);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.reorder-button .bi {
    font-size: 14px;
    line-height: 1;
}

.reorder-button:hover,
.reorder-button:focus-visible {
    outline: none;
    border-color: #2f80ed;
    color: #1f5fb8;
}

.reorder-button:disabled {
    cursor: not-allowed;
    opacity: 0.35;
}

.favorite-list-empty {
    margin: 0;
    color: #5c6977;
    font-size: 13px;
    line-height: 1.7;
}

.favorite-note-summary {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 0;
    border: 1px solid rgba(184, 130, 46, 0.18);
    border-radius: 7px;
    padding: 8px 9px;
    color: #5f4621;
    background: rgba(184, 130, 46, 0.08);
    font-size: 12px;
    line-height: 1.55;
}

.favorite-note-summary .bi {
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--gold);
    line-height: 1;
}

.itinerary-editor {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.itinerary-editor.is-compact {
    gap: 7px;
}

.itinerary-field {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.itinerary-field span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #68717d;
    font-size: 12px;
    font-weight: 700;
}

.itinerary-field .bi {
    color: #1f5fb8;
    line-height: 1;
}

.itinerary-picker-row {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.72fr) minmax(0, 0.72fr);
    gap: 6px;
}

.itinerary-field input,
.itinerary-field select,
.itinerary-picker-trigger {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    border: 1px solid rgba(45, 54, 65, 0.16);
    border-radius: 7px;
    padding: 7px 9px;
    color: #1f2a36;
    background: rgba(255, 255, 255, 0.86);
    font: inherit;
    font-size: 13px;
}

.itinerary-field select,
.itinerary-picker-trigger {
    appearance: auto;
    cursor: pointer;
}

.itinerary-editor.is-compact .itinerary-field input,
.itinerary-editor.is-compact .itinerary-field select,
.itinerary-editor.is-compact .itinerary-picker-trigger {
    min-height: 32px;
    padding: 6px 7px;
    font-size: 12px;
}

.itinerary-field input:hover,
.itinerary-field input:focus,
.itinerary-field select:hover,
.itinerary-field select:focus,
.itinerary-picker-trigger:hover,
.itinerary-picker-trigger:focus-visible {
    outline: none;
    border-color: rgba(47, 128, 237, 0.52);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.08);
}

.itinerary-picker-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    min-height: 34px;
    font: inherit;
    text-align: left;
}

.itinerary-picker-trigger::after {
    content: "\F282";
    color: #1f5fb8;
    font-family: "bootstrap-icons";
    font-size: 14px;
}

.itinerary-picker-layer {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 12px;
    background: rgba(18, 24, 33, 0.24);
}

.itinerary-picker-layer.is-hidden {
    display: none;
}

.itinerary-picker-popover {
    width: min(410px, 100%);
    max-height: min(640px, calc(100vh - 24px));
    overflow: auto;
    border: 1px solid rgba(47, 128, 237, 0.22);
    border-radius: 16px;
    padding: 18px;
    color: #1f2a36;
    background: #fff;
    box-shadow: 0 22px 60px rgba(18, 24, 33, 0.28);
}

.itinerary-picker-heading,
.itinerary-picker-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.itinerary-picker-heading h2,
.itinerary-time-section h3 {
    margin: 0;
    color: #1f2a36;
}

.itinerary-picker-heading h2 {
    font-size: 19px;
}

.itinerary-picker-kicker,
.itinerary-picker-help {
    margin: 0;
    color: #68717d;
    font-size: 12px;
    line-height: 1.55;
}

.itinerary-picker-kicker {
    margin-bottom: 2px;
    color: #1f5fb8;
    font-weight: 700;
}

.itinerary-picker-help {
    margin: 10px 0 14px;
}

.itinerary-picker-close,
.itinerary-picker-secondary,
.itinerary-picker-confirm,
.itinerary-calendar-nav-button,
.itinerary-calendar-day,
.itinerary-time-toggle,
.itinerary-time-input {
    border: 1px solid rgba(45, 54, 65, 0.16);
    border-radius: 7px;
    font: inherit;
    cursor: pointer;
}

.itinerary-picker-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #4b5562;
    background: #fff;
}

.itinerary-calendar-nav-button:hover,
.itinerary-calendar-nav-button:focus-visible,
.itinerary-calendar-day:hover,
.itinerary-calendar-day:focus-visible,
.itinerary-picker-close:hover,
.itinerary-picker-close:focus-visible,
.itinerary-time-toggle:hover,
.itinerary-time-toggle:focus-visible,
.itinerary-time-input:hover,
.itinerary-time-input:focus-visible {
    outline: none;
    border-color: rgba(47, 128, 237, 0.54);
    background: rgba(47, 128, 237, 0.1);
}

.itinerary-calendar {
    margin-top: 14px;
    border: 1px solid rgba(45, 54, 65, 0.1);
    border-radius: 12px;
    padding: 10px;
    background: #fff;
}

.itinerary-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.itinerary-calendar-nav strong {
    color: #253447;
    font-size: 15px;
}

.itinerary-calendar-nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: #4b5562;
    background: #fff;
}

.itinerary-calendar-weekdays,
.itinerary-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
    text-align: center;
}

.itinerary-calendar-weekdays {
    margin-bottom: 4px;
    color: #8a94a3;
    font-size: 11px;
    font-weight: 700;
}

.itinerary-calendar-day,
.itinerary-calendar-empty {
    min-width: 0;
    height: 36px;
}

.itinerary-calendar-day {
    color: #354152;
    background: #fff;
    font-size: 13px;
}

.itinerary-calendar-day.is-today {
    border-color: rgba(47, 128, 237, 0.65);
    color: #1f5fb8;
    font-weight: 700;
}

.itinerary-calendar-day.is-selected {
    border-color: #2f80ed;
    color: #fff;
    background: #2f80ed;
    box-shadow: 0 4px 10px rgba(47, 128, 237, 0.2);
}

.itinerary-time-section {
    margin-top: 14px;
    border-radius: 12px;
    padding: 11px;
    background: rgba(47, 128, 237, 0.06);
}

.itinerary-time-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.itinerary-time-section h3 {
    font-size: 14px;
}

.itinerary-time-section p {
    margin: 3px 0 0;
    color: #68717d;
    font-size: 12px;
}

.itinerary-time-toggle {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0 9px;
    color: #1f5fb8;
    background: #fff;
    font-size: 12px;
    font-weight: 700;
}

.itinerary-time-toggle.is-active {
    border-color: #2f80ed;
    color: #fff;
    background: #2f80ed;
}

.itinerary-time-input-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    color: #68717d;
    font-size: 12px;
}

.itinerary-time-input {
    width: 148px;
    min-height: 38px;
    padding: 0 10px;
    color: #253447;
    background: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
}

.itinerary-picker-error {
    margin: 12px 0 0;
    color: #9f251f;
    font-size: 13px;
    font-weight: 700;
}

.itinerary-picker-actions {
    justify-content: flex-end;
    margin-top: 16px;
}

.itinerary-picker-secondary,
.itinerary-picker-confirm {
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 700;
}

.itinerary-picker-secondary {
    color: #4b5562;
    background: #fff;
}

.itinerary-picker-confirm {
    border-color: #2f80ed;
    color: #fff;
    background: #2f80ed;
}

.itinerary-help,
.itinerary-empty {
    margin: 8px 0 0;
    color: #68717d;
    font-size: 12px;
    line-height: 1.65;
}

.itinerary-empty {
    margin: 0;
    border: 1px dashed rgba(104, 113, 125, 0.32);
    border-radius: 8px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.6);
}

.itinerary-time-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: -10px 0 20px;
    padding: 0;
    list-style: none;
}

.itinerary-time-tags li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(47, 128, 237, 0.22);
    border-radius: 999px;
    padding: 6px 10px;
    color: #1f5fb8;
    background: rgba(47, 128, 237, 0.08);
    font-size: 12px;
    font-weight: 700;
}

.itinerary-time-tags .bi {
    line-height: 1;
}

.destination-note-field {
    display: grid;
    gap: 8px;
}

.destination-note-field span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #68717d;
    font-size: 13px;
    font-weight: 700;
}

.destination-note-field .bi {
    color: var(--gold);
    line-height: 1;
}

.destination-note-field textarea {
    width: 100%;
    min-height: 118px;
    resize: vertical;
    border: 1px solid rgba(184, 130, 46, 0.24);
    border-radius: 8px;
    padding: 11px 12px;
    color: #1f2a36;
    background: rgba(255, 255, 255, 0.78);
    font: inherit;
    font-size: 14px;
    line-height: 1.7;
}

.destination-note-field textarea:hover,
.destination-note-field textarea:focus {
    outline: none;
    border-color: rgba(184, 130, 46, 0.55);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(184, 130, 46, 0.09);
}

.custom-point-title-row {
    margin: 0 0 8px;
}

.custom-point-name-field {
    display: grid;
    gap: 7px;
}

.custom-point-name-field span {
    color: #7c3aed;
    font-size: 13px;
    font-weight: 700;
}

.custom-point-name-field input {
    width: 100%;
    border: 1px solid rgba(124, 58, 237, 0.26);
    border-radius: 8px;
    padding: 10px 12px;
    color: #4c1d95;
    background: rgba(255, 255, 255, 0.82);
    font: inherit;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
}

.custom-point-name-field input:hover,
.custom-point-name-field input:focus {
    outline: none;
    border-color: rgba(124, 58, 237, 0.56);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.custom-point-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    border: 1px solid rgba(37, 99, 235, 0.28);
    border-radius: 8px;
    padding: 0 13px;
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.08);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.secondary-button:hover,
.secondary-button:focus-visible,
.secondary-button.is-active {
    outline: none;
    border-color: rgba(37, 99, 235, 0.55);
    background: rgba(37, 99, 235, 0.14);
}

.custom-point-relocate-button.is-active {
    color: #6d28d9;
    border-color: rgba(124, 58, 237, 0.46);
    background: rgba(124, 58, 237, 0.12);
}

.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    border: 1px solid rgba(184, 58, 46, 0.28);
    border-radius: 8px;
    padding: 0 13px;
    color: #9f251f;
    background: rgba(184, 58, 46, 0.08);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.danger-button:hover,
.danger-button:focus-visible {
    outline: none;
    border-color: rgba(184, 58, 46, 0.55);
    background: rgba(184, 58, 46, 0.14);
}

.visually-hidden {
    position: fixed;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

.city-panel {
    position: fixed;
    left: 0;
    z-index: 20;
    background: var(--paper);
    box-shadow: var(--shadow);
    border-right: 1px solid var(--line);
    transition: width 180ms ease, height 180ms ease, transform 180ms ease, border-radius 180ms ease;
}

.city-panel.is-hidden {
    display: none;
}

.city-panel.is-expanded {
    top: 0;
    bottom: 0;
    width: 50vw;
    height: 100vh;
    border-radius: 0;
}

.city-panel.is-minimized {
    bottom: 0;
    top: auto;
    width: 25vw;
    height: 40vh;
    min-width: 300px;
    border-radius: 0 8px 0 0;
    border-top: 1px solid var(--line);
}

.panel-actions {
    position: absolute;
    top: 14px;
    right: 30px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(130, 40, 32, 0.22);
    border-radius: 6px;
    color: var(--accent-dark);
    background: rgba(255, 255, 255, 0.86);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.icon-button:hover,
.icon-button:focus-visible {
    outline: none;
    border-color: var(--accent);
    background: #fff7f3;
}

.panel-content {
    height: 100%;
    overflow: auto;
    padding: 42px 44px 48px;
}

.is-minimized .panel-content {
    padding: 44px 22px 22px;
}

.city-kicker {
    margin: 0 0 8px;
    color: var(--gold);
    font-size: 13px;
    letter-spacing: 0;
}

.city-title {
    margin: 0;
    color: var(--accent-dark);
    font-size: 34px;
    line-height: 1.18;
}

.city-title-row {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-right: 84px;
}

.is-minimized .city-title {
    font-size: 22px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.is-minimized .city-title-row {
    display: block;
    padding-right: 0;
}

.is-minimized .favorite-icon-button {
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 30px;
    margin-top: 0;
    font-size: 16px;
}

.city-subtitle {
    margin: 8px 0 18px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.favorite-icon-button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-top: 3px;
    border: 1px solid rgba(47, 128, 237, 0.42);
    border-radius: 999px;
    color: #1f5fb8;
    background: rgba(47, 128, 237, 0.08);
    font: inherit;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.favorite-icon-button .bi {
    line-height: 1;
}

.favorite-icon-button:hover,
.favorite-icon-button:focus-visible {
    outline: none;
    border-color: #2f80ed;
    background: rgba(47, 128, 237, 0.14);
}

.favorite-icon-button.is-favorited {
    border-color: rgba(32, 164, 100, 0.4);
    color: #117946;
    background: rgba(32, 164, 100, 0.1);
}

.favorite-icon-button.is-favorited:hover,
.favorite-icon-button.is-favorited:focus-visible {
    border-color: #20a464;
    background: rgba(32, 164, 100, 0.16);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.tag-list li {
    padding: 5px 9px;
    border: 1px solid rgba(184, 130, 46, 0.25);
    border-radius: 999px;
    color: #694513;
    background: rgba(184, 130, 46, 0.08);
    font-size: 12px;
}

.section-title {
    margin: 24px 0 10px;
    color: #2b3138;
    font-size: 17px;
}

.history-text {
    margin: 0;
    color: #333b45;
    font-size: 15px;
    line-height: 1.9;
    text-align: justify;
}

.timeline-list {
    position: relative;
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0 0 0 22px;
    list-style: none;
}

.timeline-list::before {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 6px;
    width: 2px;
    background: linear-gradient(180deg, rgba(184, 58, 46, 0.68), rgba(184, 130, 46, 0.26));
}

.timeline-item {
    position: relative;
}

.timeline-dot {
    position: absolute;
    top: 12px;
    left: -21px;
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 0 2px rgba(184, 58, 46, 0.22);
}

.timeline-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.74);
}

.timeline-date {
    margin: 0 0 5px;
    color: var(--gold);
    font-size: 12px;
}

.timeline-title {
    margin: 0 0 6px;
    color: var(--accent-dark);
    font-size: 15px;
}

.timeline-desc,
.timeline-empty {
    margin: 0;
    color: #4b5562;
    font-size: 13px;
    line-height: 1.7;
}

.timeline-empty {
    border: 1px dashed rgba(104, 113, 125, 0.32);
    border-radius: 8px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.6);
}

.attraction-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.is-minimized .attraction-list {
    grid-template-columns: 1fr;
}

.attraction-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.72);
}

.attraction-name {
    margin: 0 0 6px;
    color: var(--accent-dark);
    font-size: 15px;
}

.attraction-desc {
    margin: 0;
    color: #4b5562;
    font-size: 13px;
    line-height: 1.65;
}

.source-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.source-list a {
    color: #1b67a8;
    font-size: 13px;
    text-decoration: none;
}

.source-list a:hover,
.source-list a:focus-visible {
    text-decoration: underline;
}

.map-status {
    display: none;
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 10;
    max-width: min(420px, calc(100vw - 36px));
    padding: 10px 14px;
    border-radius: 8px;
    color: #27313d;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 28px rgba(18, 24, 33, 0.14);
    font-size: 13px;
    line-height: 1.6;
}

.map-status.is-visible {
    display: block;
}

.map-status.is-error {
    color: #7f1d1d;
    background: rgba(255, 245, 245, 0.96);
}

.zoom-debug {
    position: fixed;
    left: 18px;
    bottom: 34px;
    z-index: 12;
    border: 1px solid rgba(45, 54, 65, 0.14);
    border-radius: 999px;
    padding: 6px 10px;
    color: #27313d;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 24px rgba(18, 24, 33, 0.12);
    font-size: 12px;
    font-weight: 800;
    pointer-events: none;
}

.zoom-debug.is-hidden {
    display: none;
}

.marker-city-name {
    vertical-align: middle;
}

.marker-main-line {
    display: block;
}

.marker-weather {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 5px;
    padding-left: 5px;
    border-left: 1px solid rgba(45, 54, 65, 0.18);
    color: #1f5fb8;
    font-weight: 700;
    vertical-align: middle;
}

.marker-weather .bi {
    font-size: 11px;
    line-height: 1;
}

.marker-weather.is-muted {
    color: #68717d;
    font-weight: 600;
}

.marker-itinerary-line {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 2px;
    color: #7c2d12;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
}

.marker-itinerary-line span {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.marker-itinerary-line .bi {
    color: #b45309;
    font-size: 11px;
    line-height: 1;
}

.city-label {
    color: #2c1a00;
    font-size: 12px;
    font-family: "Microsoft YaHei", sans-serif;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--accent);
    border-radius: 3px;
    padding: 1px 4px;
    white-space: nowrap;
}

.weather-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    border: 1px solid rgba(47, 128, 237, 0.18);
    border-radius: 999px;
    padding: 8px 12px;
    color: #1f5fb8;
    background: rgba(47, 128, 237, 0.08);
    font-size: 14px;
    font-weight: 700;
}

.weather-summary .bi {
    font-size: 18px;
    line-height: 1;
}

.climate-text {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    border: 1px solid rgba(47, 128, 237, 0.18);
    border-radius: 8px;
    padding: 12px 14px;
    color: #354152;
    background: rgba(47, 128, 237, 0.07);
    font-size: 13px;
    line-height: 1.75;
}

.climate-text .bi {
    flex: 0 0 auto;
    margin-top: 3px;
    color: #1f5fb8;
    line-height: 1;
}

.weather-forecast-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.weather-day {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.72);
    font-size: 13px;
}

.weather-date {
    color: var(--gold);
    font-weight: 700;
}

.weather-kind {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    color: #354152;
    font-weight: 700;
}

.weather-kind .bi {
    color: #1f5fb8;
    line-height: 1;
}

.weather-temp {
    color: #4b5562;
    font-weight: 700;
    white-space: nowrap;
}

.weather-empty {
    margin: 0;
    border: 1px dashed rgba(47, 128, 237, 0.26);
    border-radius: 8px;
    padding: 12px 14px;
    color: #4b5562;
    background: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    line-height: 1.7;
}

.weather-empty.is-error {
    border-color: rgba(184, 58, 46, 0.28);
    color: #7f1d1d;
    background: rgba(255, 245, 245, 0.74);
}

@media (max-width: 768px) {
    .map-tools {
        top: 12px;
        right: 12px;
        left: 12px;
        justify-content: flex-end;
        max-width: none;
    }

    .filter-toggle {
        flex: 1 1 auto;
    }

    .map-search {
        top: 12px;
        left: 12px;
        right: auto;
    }

    .visible-search {
        width: 36px;
    }

    .visible-search.is-expanded {
        width: calc(100vw - 24px);
    }

    .visible-search-results {
        top: 42px;
        right: 0;
        left: 0;
        width: 100%;
        max-height: min(340px, calc(100vh - 82px));
    }

    .zoom-debug {
        left: 12px;
        bottom: 28px;
    }

    .filter-toggle .tool-button {
        flex: 1 1 0;
        padding: 0 8px;
    }

    .list-toggle {
        flex: 0 0 auto;
    }

    .point-add-toggle,
    .point-focus-toggle {
        flex: 1 1 100%;
        justify-content: center;
    }

    .favorite-list-popover,
    .custom-point-list-popover {
        top: 44px;
        right: 0;
        left: 0;
        width: 100%;
        max-height: min(360px, calc(100vh - 78px));
    }

    .favorite-list-popover.has-custom-size {
        left: auto;
        max-width: calc(100vw - 24px);
        max-height: none;
    }

    .favorite-city-row {
        grid-template-columns: 26px minmax(0, 1fr) auto;
        gap: 6px;
    }

    .itinerary-editor,
    .itinerary-editor.is-compact {
        grid-template-columns: 1fr;
    }

    .itinerary-picker-popover {
        max-height: calc(100vh - 24px);
        padding: 14px;
    }

    .itinerary-time-input {
        width: 132px;
    }

    .favorite-city-item {
        padding: 9px;
    }

    .reorder-button {
        width: 28px;
    }

    .city-panel.is-expanded {
        width: 100vw;
    }

    .city-panel.is-minimized {
        width: calc(100vw - 24px);
        min-width: 0;
        height: 40vh;
    }

    .panel-content {
        padding: 42px 22px 32px;
    }

    .city-title {
        font-size: 28px;
    }

    .city-title-row {
        align-items: flex-start;
        padding-right: 74px;
    }

    .favorite-icon-button {
        width: 32px;
        height: 32px;
        font-size: 22px;
    }

    .custom-point-name-field input {
        font-size: 22px;
    }

    .attraction-list {
        grid-template-columns: 1fr;
    }

    .weather-forecast-list {
        grid-template-columns: 1fr;
    }

    .weather-day {
        grid-template-columns: 50px minmax(0, 1fr) auto;
    }
}
