:root { --ink: #253b32; --muted: #7d8982; --line: #e6eae5; --paper: #fffefb; --green: #204d3e; --shadow: 0 12px 45px #20392a20; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif; background: #e8ede5; }
button, input, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { opacity: .45; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #79a98d; outline-offset: 3px; }
[hidden] { display: none !important; }
#map { position: fixed; inset: 0; z-index: 0; }
.amap-info-content { border-radius: 13px; }
.amap-info-close { font-size: 18px; }
.tile-warning { position: fixed; z-index: 150; top: 90px; right: 25px; max-width: 300px; padding: 12px; background: #fff8df; border-radius: 9px; font-size: 11px; line-height: 1.7; }
.trip-panel { position: fixed; z-index: 200; inset: 24px auto 24px 24px; width: 386px; display: flex; flex-direction: column; background: var(--paper); border: 1px solid #ffffffb3; border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.trip-header { padding: 27px 27px 18px; background: linear-gradient(135deg, #f4f6ee, #fffefb); }
.eyebrow { display: flex; align-items: center; gap: 8px; color: #6d8074; font-size: 9px; font-weight: 650; letter-spacing: 2px; }
.eyebrow span { width: 6px; height: 6px; background: #3b795b; border-radius: 50%; }
.title-row { display: flex; justify-content: space-between; align-items: flex-start; margin-top: 14px; }
h1 { margin: 0; font-family: 'Songti SC', 'STSong', serif; font-size: 38px; font-weight: 700; letter-spacing: 5px; }
.subtitle { font-size: 12px; color: #768376; margin: 9px 0 0; letter-spacing: .6px; }
.panel-close { border: 0; background: none; font-size: 25px; color: #839286; padding: 0 6px; }
.trip-stats { display: flex; gap: 17px; align-items: center; margin-top: 23px; font-size: 11px; color: #7c8a7f; }
.trip-stats strong { color: #3b5947; font-size: 19px; font-weight: 500; padding-right: 4px; }
.trip-stats i { width: 1px; height: 16px; background: #dce3d8; }
.day-tabs { display: flex; gap: 5px; padding: 14px 22px; border-block: 1px solid var(--line); }
.day-tabs button { flex: 1; background: none; border: 0; border-radius: 8px; padding: 10px 0; font-size: 12px; color: #7c887f; }
.day-tabs button[aria-pressed=true] { background: var(--green); color: #fff; }
.day-tabs button:hover { background: #edf1e8; color: var(--ink); }
.day-tabs i, .map-legend i { display: inline-block; height: 6px; width: 6px; border-radius: 50%; background: var(--day); margin-right: 5px; }
.itinerary { flex: 1; min-height: 0; overflow: auto; padding: 20px 23px; scrollbar-width: thin; scrollbar-color: #d1d9ce transparent; }
.plan-notice { border: 1px solid #e6dcc8; border-radius: 10px; padding: 11px 13px; background: #fbf7ed; color: #8f754a; font-size: 11px; line-height: 1.65; }
.plan-notice strong { font-size: 12px; }
.plan-notice p { margin: 4px 0 0; }
.date-row { display: flex; align-items: center; justify-content: space-between; margin: 15px 0 24px; font-size: 11px; color: var(--muted); }
.date-row input { border: 1px solid var(--line); color: var(--ink); border-radius: 6px; padding: 6px; background: #fff; max-width: 175px; }
.day-card + .day-card { padding-top: 25px; border-top: 1px solid var(--line); margin-top: 25px; }
.day-heading { display: flex; align-items: center; gap: 11px; }
.day-number { background: var(--day); width: 36px; height: 39px; display: grid; place-items: center; color: #fff; border-radius: 10px; font-size: 14px; font-weight: 600; }
.day-date { color: var(--muted); font-size: 10px; }
h2 { font-size: 16px; margin: 4px 0 0; font-weight: 600; }
.day-focus { margin-left: auto; border: 1px solid var(--line); border-radius: 50%; background: #fff; width: 29px; height: 29px; font-size: 17px; color: var(--day); }
.day-meta { font-size: 10px; color: var(--day); margin: 13px 0 19px; }
.day-meta span { color: #889287; }
.stop-list { list-style: none; padding: 0; margin: 0; }
.stop-item { position: relative; padding: 0 0 0 0; }
.stop-item:not(:last-child)::before { content: ''; position: absolute; width: 1px; background: #dde4db; top: 27px; bottom: -5px; left: 12px; }
.stop-select { border: 0; padding: 6px 24px 6px 0; background: transparent; display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left; border-radius: 7px; }
.stop-select:hover, .stop-item.selected .stop-select { background: #f0f3ec; }
.stop-number { flex-shrink: 0; display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid color-mix(in srgb, var(--day) 35%, white); background: var(--paper); border-radius: 50%; color: var(--day); font-size: 11px; z-index: 1; }
.stop-body { display: block; min-width: 0; flex: 1; }
.stop-top { display: flex; gap: 9px; align-items: center; }
time { font-size: 11px; color: #8b948b; font-variant-numeric: tabular-nums; }
.stop-type { font-size: 9px; color: #a0a89e; }
.stop-body strong { display: block; font-size: 13px; font-weight: 550; margin-top: 6px; }
.stop-edit { position: absolute; top: 12px; right: 0; border: 0; background: none; color: #8c9b8a; font-size: 18px; width: 28px; height: 28px; }
.transport { color: #9ba398; font-size: 10px; margin: 7px 0 14px 39px; }
.personal-note { display: block; font-size: 11px; line-height: 1.6; color: #7e8b73; margin-top: 7px; white-space: pre-wrap; overflow-wrap: anywhere; }
.done .stop-number { background: var(--day); color: white; }
.done .stop-body strong::after { content: ' ✓'; color: var(--day); }
.stay { display: flex; align-items: center; gap: 8px; padding: 11px 12px; border-radius: 8px; background: #f2f4ee; color: #6f7f6b; font-size: 11px; margin-top: 18px; }
.stay span { font-size: 10px; border: 1px solid #bfccba; padding: 1px 3px; border-radius: 3px; }
.day-tip { color: #90988a; font-size: 10px; line-height: 1.8; margin: 10px 0 0; }
.trip-footer { border-top: 1px solid var(--line); padding: 11px 22px; color: #929b8d; background: #fbfcf7; }
.trip-footer p { margin: 0; font-size: 9px; line-height: 1.7; }
.trip-footer span { display: inline-grid; place-items: center; width: 12px; height: 12px; border-radius: 50%; border: 1px solid #b3bbaa; margin-right: 3px; font-family: serif; }
.map-toolbar { position: fixed; z-index: 150; top: 24px; right: 24px; display: flex; padding: 5px; gap: 3px; background: #fffefbf5; box-shadow: var(--shadow); border-radius: 13px; }
.tool-button { display: flex; align-items: center; gap: 6px; border: 0; border-radius: 8px; padding: 11px 14px; font-size: 11px; background: transparent; color: #7d8b7c; }
.tool-button.active { background: #eaf0e4; color: #3b664b; }
.tool-button:hover { background: #f1f3ed; }
.tool-icon { font-size: 19px; line-height: 1; }
.map-legend { position: fixed; z-index: 100; bottom: 30px; right: 24px; padding: 13px 17px 10px; background: #fffefbef; backdrop-filter: blur(12px); border-radius: 12px; box-shadow: var(--shadow); }
.map-legend button { display: block; border: 0; background: none; font-size: 10px; padding: 5px 0; color: #647b67; }
.map-legend button[aria-pressed=false] { opacity: .4; }
.map-legend p { border-top: 1px solid var(--line); padding-top: 10px; font-size: 9px; color: #a0a794; margin: 7px 0 0; }
.dashed-key, .solid-key { display: inline-block; width: 15px; border-top: 2px dashed #9ca993; margin-right: 5px; vertical-align: middle; }
.solid-key { border-top-style: solid; }
.route-summary { font-size: 10px; line-height: 1.7; color: #758270; background: #f1f4ed; padding: 8px 10px; border-radius: 7px; margin: 0 0 17px; }
.arrival-note { color: #8b714a; background: #faf5e9; padding: 10px 12px; border-radius: 8px; font-size: 11px; line-height: 1.8; margin: -5px 0 18px; }
.route-details { margin: 0 0 15px 39px; color: #6d8063; font-size: 10px; line-height: 1.7; position: relative; }
.route-details summary { cursor: pointer; padding: 3px 0; }
.route-details[data-status=partial], .route-details[data-status=unavailable] { color: #9a7642; }
.route-detail-content { max-height: 220px; overflow: auto; padding: 8px 10px; border: 1px solid #e3e9de; border-radius: 8px; background: #f8faf4; color: #79876f; }
.route-detail-content section + section { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.route-detail-content strong { color: #526e4c; }
.route-detail-content p { margin: 5px 0; }
.route-detail-content ol { padding-left: 17px; }
.retry-routes { margin-top: 12px; border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 8px 10px; color: #6d8063; font-size: 11px; }
.map-pin { display: flex; align-items: center; flex-direction: column; background: none; border: 0; padding: 0; width: 120px; }
.pin-core { position: relative; display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px; border: 3px solid white; border-radius: 50% 50% 50% 10%; transform: rotate(-5deg); background: var(--day); color: white; font-size: 11px; font-weight: 650; box-shadow: 0 3px 10px #15382d30; }
.pin-core sup { position: absolute; right: -7px; top: -8px; border-radius: 50%; background: white; color: var(--day); width: 15px; height: 15px; }
.pin-label { margin-top: 5px; background: #fffefbf2; box-shadow: 0 2px 8px #29402a17; border-radius: 5px; padding: 4px 7px; font-size: 10px; white-space: nowrap; color: #42533e; }
.map-pin:hover .pin-core { transform: scale(1.1); }
.stop-popup { width: min(270px, calc(100vw - 90px)); padding: 7px 6px; }
.popup-tag { font-size: 10px; letter-spacing: .5px; }
.stop-popup h3 { font-size: 16px; margin: 9px 0; }
.stop-popup p { font-size: 12px; color: #7a8775; line-height: 1.7; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.stop-popup .popup-personal { background: #f1f4ee; padding: 8px; margin-top: 8px; border-radius: 6px; }
.popup-actions { display: flex; gap: 8px; margin-top: 14px; }
.popup-actions button, .plan-actions button { background: #f1f5eb; border: 1px solid #e0e7d9; color: #557149; padding: 7px 9px; border-radius: 6px; font-size: 11px; }
.shared-stops { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.shared-stops small { color: var(--muted); }
.shared-stops button { display: block; border: 0; background: none; font-size: 11px; color: #557149; margin-top: 6px; }
.plan-actions { display: flex; gap: 10px; margin-top: 27px; }
.sources { font-size: 10px; color: #8d9785; line-height: 1.8; margin-top: 18px; }
.sources summary { cursor: pointer; }
.sources a { display: block; color: #678363; }
.map-error { position: absolute; top: 100px; left: 450px; right: 30px; background: #fff8de; padding: 20px; border-radius: 10px; font-size: 13px; line-height: 1.7; }
.edit-dialog { width: min(440px, calc(100% - 30px)); padding: 25px; border: 0; border-radius: 16px; color: var(--ink); box-shadow: var(--shadow); }
.edit-dialog::backdrop { background: #112e2580; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; }
.dialog-heading h2 { margin: 0; }
.dialog-heading button { border: 0; background: none; font-size: 25px; }
.edit-dialog p { font-size: 12px; line-height: 1.7; color: var(--muted); }
.edit-dialog label { display: block; font-size: 12px; margin-top: 17px; }
.edit-dialog input[type=time], .edit-dialog textarea { display: block; width: 100%; margin-top: 7px; padding: 10px; border: 1px solid #d7dfd2; border-radius: 7px; color: var(--ink); background: #fff; }
.edit-dialog textarea { resize: vertical; }
.edit-dialog .check-label { display: flex; align-items: center; gap: 6px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 23px; }
.dialog-actions button { padding: 9px 14px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 12px; }
.dialog-actions .primary { background: var(--green); color: #fff; }
.mobile-day-title { display: none; }
@media (max-width: 1050px) and (min-width: 761px) { .map-legend { right: 15px; } .trip-panel { left: 14px; width: 350px; } }
@media (max-width: 760px) {
  .trip-panel { inset: auto 0 0; width: 100%; height: 49dvh; border-radius: 20px 20px 0 0; box-shadow: 0 -5px 30px #2b422e20; }
  .trip-header { padding: 15px 20px 12px; }
  .eyebrow, .trip-stats, .subtitle { display: none; }
  .title-row { margin: 0; align-items: center; }
  h1 { font-size: 23px; letter-spacing: 3px; }
  h1::after { content: ' / ' attr(data-trip-caption); font: 11px -apple-system, sans-serif; letter-spacing: 0; color: #8c9885; }
  .panel-close { font-size: 21px; }
  .day-tabs { padding: 6px 14px; }
  .day-tabs button { padding: 8px 0; }
  .itinerary { padding: 16px 22px 25px; }
  .trip-footer { display: none; }
  body:not(.panel-hidden) .amap-logo, body:not(.panel-hidden) .amap-copyright { bottom: 49dvh !important; }
  .tile-warning { top: 105px; right: 14px; left: 14px; max-width: none; }
  .map-toolbar { top: 14px; right: 14px; padding: 4px; border-radius: 10px; }
  .tool-button { padding: 9px 10px; gap: 4px; }
  .tool-icon { font-size: 17px; }
  .map-legend { display: none; }
  .mobile-day-title { display: block; position: fixed; top: 70px; right: 15px; font-size: 10px; color: #5f725b; background: #fffefbd9; border-radius: 6px; padding: 6px 10px; pointer-events: none; }
  .map-error { left: 20px; right: 20px; top: 115px; }
  .pin-label { font-size: 9px; }
}
