
/* Custom CSS */
:root{--navy:#1e3a5f;--coral:#e85d45;--gold:#f5a623;--green:#27ae60;--teal:#2a9d8f;--bg:#f5f3ef;--card:#fff;--text:#2d3436;--text2:#636e72;--radius:12px;--shadow:0 1px 2px rgba(0,0,0,.04),0 2px 8px rgba(0,0,0,.06);--shadow-lg:0 2px 4px rgba(0,0,0,.04),0 4px 16px rgba(0,0,0,.08)}
html{scroll-behavior:smooth}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;background:var(--bg);color:var(--text);line-height:1.6;font-size:15px;-webkit-font-smoothing:antialiased}

/* ─── Layout ─── */
html,body{margin:0;height:100vh;height:100dvh;overflow:hidden;background:#f5f3ef}
.right-panel{height:100vh;height:100dvh;overflow:hidden;display:flex;flex-direction:column;background:#f5f3ef;isolation:isolate}

/* Fixed-height top section (header + stats + map) */
.fixed-top{flex-shrink:0;background:#f5f3ef}

/* Scrollable content area */
.scroll-content{flex:1;overflow-y:auto;overscroll-behavior:contain;background:#f5f3ef;min-height:0}

/* Header */
.header{background:linear-gradient(135deg,#1a365d 0%,#1e3a5f 50%,#2a4a6a 100%);color:#fff;padding:10px 16px;padding-top:max(10px,env(safe-area-inset-top,10px));display:flex;align-items:center;gap:10px;min-height:73px;box-sizing:border-box}
.header h1{font-size:17px;font-weight:700;flex:1;letter-spacing:.3px}
.header .stat{font-size:10px;opacity:.75;white-space:nowrap;background:rgba(255,255,255,.1);padding:3px 8px}
.header .tz span{background:rgba(255,255,255,.08);padding:2px 5px}
.menu-btn{background:rgba(255,255,255,.1);border:none;color:#fff;font-size:22px;cursor:pointer;padding:4px 8px;display:block;line-height:1;transition:background .15s}
.menu-btn:hover{background:rgba(255,255,255,.2)}

/* Stats bar */
.stats-bar{display:flex;gap:10px;padding:8px 0;overflow-x:auto;background:#f5f3ef;scrollbar-width:none;align-items:stretch;max-width:960px;margin:0 auto;box-sizing:border-box}
.stats-bar::-webkit-scrollbar{display:none}
.stat-card{flex-shrink:0;background:var(--card);border-radius:10px;padding:8px 12px;box-shadow:0 1px 3px rgba(0,0,0,.06);text-align:center;min-width:70px;border:1px solid #f0f0f0;display:flex;flex-direction:column;justify-content:center}
.stat-card .num{font-size:19px;font-weight:700;color:var(--navy);font-variant-numeric:tabular-nums}
.stat-card .lbl{font-size:10px;color:var(--text2);margin-top:2px}
@media(max-width:480px){
  .header .stat{font-size:9px;padding:2px 5px}
  .header .stat:nth-child(n+5){display:none}
  .stat-card{padding:4px 8px;min-width:auto}
  .stat-card .num{font-size:15px}
}
.map-wrap{overflow:hidden;height:350px;background:#f5f3ef;max-width:960px;margin:0 auto;padding:0 8px;box-sizing:border-box;position:relative}
@media(max-width:480px){.map-wrap{height:250px}}
.map-wrap #map{width:100%;height:100%}
.map-fullscreen-btn{position:absolute;top:12px;right:12px;z-index:500;background:#fff;border:none;padding:7px 12px;font-size:12px;font-weight:600;cursor:pointer;display:flex;align-items:center;gap:5px;color:var(--text)}
.map-fullscreen-btn:hover{background:#f5f5f5}

/* Content */
.scroll-inner{max-width:960px;margin:0 auto;padding:14px 0 80px;box-sizing:border-box}
.day-card{background:var(--card);margin-bottom:14px;overflow:hidden;scroll-margin-top:0;transition:box-shadow .2s;border-radius:var(--radius);box-shadow:0 1px 4px rgba(0,0,0,.06)}

/* Sidebar */
.sidebar-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:900}
.sidebar-overlay.open{display:block}
.sidebar{position:fixed;top:0;left:-280px;bottom:0;width:280px;background:var(--card);z-index:1000;transition:left .3s cubic-bezier(.4,0,.2,1);overflow-y:auto;border-right:1px solid #e8e8e8}
.sidebar.open{left:0}
.sidebar-header{background:linear-gradient(135deg,#1a365d,#2a4a6a);color:#fff;padding:10px 16px;padding-top:max(10px,env(safe-area-inset-top,10px));font-weight:700;font-size:15px;display:flex;align-items:center;gap:10px;min-height:73px;box-sizing:border-box}
.sidebar-close{background:rgba(255,255,255,.1);border:none;color:#fff;font-size:18px;cursor:pointer;padding:2px 8px;margin-left:auto;transition:background .15s}
.sidebar-close:hover{background:rgba(255,255,255,.2)}
.sidebar-item{display:flex;align-items:center;gap:10px;padding:11px 16px;border-bottom:1px solid #f0f0f0;cursor:pointer;text-decoration:none;color:var(--text);font-size:14px;transition:all .15s}
.sidebar-item:hover,.sidebar-item.active{background:#f0f4ff;color:var(--navy);padding-left:20px}
.sidebar-item .dot{width:10px;height:10px;border-radius:50%;flex-shrink:0}
.sidebar-item .day-label{font-weight:600;min-width:52px;font-size:12px;color:var(--text2);letter-spacing:.3px}
.sidebar-item.active .day-label{color:var(--navy)}
.sidebar-item .day-title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar-section{padding:12px 16px 6px;font-size:10px;font-weight:700;text-transform:uppercase;color:var(--text2);letter-spacing:.8px}
.day-header{display:flex;align-items:center;padding:14px 16px;cursor:pointer;gap:10px;user-select:none;-webkit-tap-highlight-color:transparent;transition:background .15s}
.day-header:hover{background:#fafafa}
.day-header:active{background:#f5f5f5}
.day-dot{width:14px;height:14px;border-radius:50%;flex-shrink:0;margin-top:1px;box-shadow:0 1px 2px rgba(0,0,0,.1)}
.day-meta{flex:1;min-width:0}
.day-meta .day-title{font-weight:600;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text)}
.day-meta .day-sub{font-size:12px;color:var(--text2);display:flex;gap:8px;flex-wrap:wrap}
.day-badge{font-size:10px;padding:2px 8px;border-radius:20px;font-weight:600;white-space:nowrap}
.weather-badge{font-size:10px;padding:2px 8px;border-radius:20px;background:#e3f2fd;color:#1565c0;white-space:nowrap;display:inline-flex;align-items:center;gap:3px}
.day-arrow{font-size:11px;color:var(--text2);transition:transform .3s cubic-bezier(.4,0,.2,1);flex-shrink:0}
.day-card.open .day-arrow{transform:rotate(180deg)}
.day-body{display:none;padding:4px 16px 16px;border-top:1px solid #eee;animation:fadeIn .25s}
.day-card.open .day-body{display:block}
@keyframes fadeIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}

/* Sections inside day */
.sec{margin-top:16px}
.sec:first-child{margin-top:4px}
.sec-label{font-size:11px;font-weight:600;color:var(--text2);letter-spacing:.6px;margin-bottom:8px;display:flex;align-items:center;gap:6px;text-transform:uppercase}
.sec-label .sec-line{flex:1;height:1px;background:linear-gradient(90deg,#d0d0d0 0%,transparent 100%)}

/* Timeline */
.timeline{padding:2px 0}
.tl-item{display:flex;gap:12px;padding:8px 0 8px 16px;border-left:3px solid #e0e0e0;padding-left:16px;position:relative;transition:background .1s}
.tl-item:hover{background:#fafafa;border-radius:0 6px 6px 0}
.tl-item::before{content:'';position:absolute;left:-7px;top:14px;width:11px;height:11px;border-radius:50%;background:#d0d0d0;border:2.5px solid #fff;box-shadow:0 1px 3px rgba(0,0,0,.12)}
.tl-item:first-child::before{background:var(--coral);border-color:#fff;width:13px;height:13px;left:-8px;top:13px}
.tl-item:last-child{border-left-color:transparent}
.tl-time{font-size:12px;font-weight:700;background:var(--coral);color:#fff;padding:1px 8px;border-radius:4px;white-space:nowrap;display:inline-block;margin-top:1px;letter-spacing:.3px;align-self:flex-start}
.tl-desc{font-size:14px;color:var(--text);flex:1;line-height:1.5;padding-top:1px}
.tl-desc .sub{font-size:12px;color:var(--text2);display:block;margin-top:2px}
.tl-item.hike .tl-time{background:var(--green)}
.tl-item.hike::before{background:var(--green)!important}
.tl-item.group-a .tl-time{background:#8e44ad}
.tl-item.group-a::before{background:#8e44ad!important}
.tl-item.group-b .tl-time{background:#e67e22}
.tl-item.group-b::before{background:#e67e22!important}

/* Stay card */
.stay-card{background:linear-gradient(135deg,#f0f7ff,#e8f0fe);border-radius:10px;padding:12px 14px 12px 16px;margin-top:8px;display:flex;justify-content:space-between;align-items:flex-start;gap:8px;border-left:3px solid var(--navy);box-shadow:0 1px 3px rgba(0,0,0,.04)}
.stay-card .name{font-weight:700;font-size:13px;color:var(--navy)}
.stay-card .detail{font-size:12px;color:var(--text2);margin-top:2px;line-height:1.4}
.stay-status{font-size:10px;padding:2px 10px;border-radius:20px;font-weight:600;white-space:nowrap;flex-shrink:0}
.stay-status.confirmed{background:#e8f5e9;color:#1a7a42}
.stay-status.pending{background:#fff3e0;color:#bf5e00}
.stay-status.recommended{background:#e3f2fd;color:#1565c0}

/* Food */
.food-item{font-size:13px;padding:5px 0;display:flex;gap:10px;border-bottom:1px solid #f5f5f5}
.food-item:last-child{border:none}
.food-item .label{font-weight:600;color:var(--gold);white-space:nowrap;min-width:3em}
/* Alert */
.alert-item{font-size:13px;padding:7px 10px;display:flex;gap:8px;background:#fff8f0;border-radius:6px;margin-top:4px;border-left:3px solid #f0ad4e;color:#8d6e00;line-height:1.4}

/* Hikes table in day */
.hike-item{font-size:13px;padding:6px 0;display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 8px}
.hike-item .hname{font-weight:600;color:var(--green);margin-right:4px}
.hike-item .hike-diff{margin-right:4px}
.hike-diff{font-size:10px;padding:1px 8px;border-radius:20px;font-weight:600}
.hike-diff.easy{background:#e8f5e9;color:#2e7d32}
.hike-diff.me{background:#fff3e0;color:#e65100}
.hike-diff.hard{background:#ffebee;color:#c62828}

/* Cost Section */
.cost-section{margin-top:16px}
.cost-section h3{font-size:13px;font-weight:700;color:var(--navy);margin-bottom:8px;display:flex;align-items:center;gap:6px}
.cost-table{width:100%;font-size:13px;border-collapse:collapse;table-layout:fixed}
.cost-table td{padding:5px 8px;border-bottom:1px solid #f0f0f0}
.cost-table td:nth-child(2){width:110px;text-align:right;white-space:nowrap}
.cost-table td:nth-child(3){width:100px;text-align:right;white-space:nowrap}
.cost-table .label{color:var(--text2)}
.cost-table .value{font-weight:600}
.cost-subrow td{padding-top:8px!important;font-size:11px;color:var(--text2);border-bottom:none!important}
.cost-subrow-last td{font-size:11px;color:var(--text2);border-bottom:none!important;padding-bottom:2px}
.cost-total-row td{padding-top:8px!important;font-size:14px;font-weight:700;color:var(--coral);border-bottom:none!important}

/* Hotels summary */
.hotel-summary{margin-top:16px}
.hotel-item{display:flex;align-items:center;gap:8px;padding:7px 0;border-bottom:1px solid #f0f0f0;font-size:13px;transition:background .1s}
.hotel-item:hover{background:#fafafa}
.hotel-tag{font-size:10px;padding:1px 5px;border-radius:3px;color:#fff;font-weight:600;flex-shrink:0}
.hotel-date{color:var(--text2);font-size:12px;white-space:nowrap;min-width:80px}

/* Stargazing highlight */
.star-highlight{background:linear-gradient(135deg,#1a237e,#3949ab);color:#fff;border-radius:10px;padding:10px 16px;margin-top:12px;font-size:13px;text-align:center;box-shadow:0 1px 6px rgba(26,35,126,.2)}

/* Note card */
.note-section{margin-top:12px}
.note-item{font-size:12px;color:var(--text2);padding:3px 0;display:flex;gap:6px}
.note-item::before{content:'·';color:var(--navy);font-weight:700}

/* Map fullscreen */
.map-fullscreen .map-wrap{position:fixed!important;inset:0;z-index:9999;height:100%!important;width:100%!important;margin:0;padding:0;max-width:none}
.map-fullscreen .map-fullscreen-btn{top:50px}
.map-fullscreen .header,.map-fullscreen .stats-bar,.map-fullscreen .scroll-content{display:none}

/* Marker popup */
.leaflet-popup-content{font-size:13px;line-height:1.5;margin:10px 14px}
.leaflet-popup-content strong{color:var(--navy)}
.leaflet-popup-content .sub{font-size:11px;color:var(--text2)}

/* Day color dots */
.dc-1{background:#3498db} .dc-2{background:#2ecc71} .dc-3{background:#9b59b6}
.dc-4{background:#f39c12} .dc-5{background:#e74c3c} .dc-6{background:#3498db}
.dc-7{background:#2ecc71} .dc-8{background:#9b59b6} .dc-9{background:#f39c12}
.dc-10{background:#e74c3c} .dc-11{background:#3498db} .dc-12{background:#2ecc71}
.dc-13{background:#9b59b6} .dc-14{background:#f39c12}

/* Map overlay */
.map-overlay{display:none;position:fixed;inset:0;z-index:900;background:rgba(0,0,0,.4)}
.map-overlay.active{display:block}
.map-overlay-header{position:absolute;top:0;left:0;right:0;z-index:10;background:#fff;padding:10px 14px;display:flex;justify-content:space-between;align-items:center;font-weight:700;font-size:14px;box-shadow:0 1px 4px rgba(0,0,0,.08)}
.map-overlay-close{background:none;border:none;font-size:18px;cursor:pointer;padding:2px 6px;color:var(--text2);border-radius:4px}
.map-overlay-close:hover{background:#f0f0f0}
.map-overlay-body{position:absolute;top:42px;left:0;right:0;bottom:0;background:#e8e8e8}
.map-overlay-body #hotelMapContainer{width:100%;height:100%}

.flight-row{display:flex;gap:10px;padding:6px 0;border-bottom:1px solid #f2f2f2;font-size:12px;align-items:center}
.flight-row:last-child{border:none}
.flight-icon{font-size:20px;flex-shrink:0;width:32px;text-align:center}
.flight-info{flex:1}
.flight-route{font-weight:700;font-size:13px}
.flight-time{color:var(--text2);font-size:11px;margin-top:1px}
.flight-ref{background:#f0f4f8;border-radius:4px;padding:2px 8px;font-size:10px;font-weight:600;color:var(--navy);white-space:nowrap}
.flight-pax{font-size:9px;padding:1px 6px;border-radius:3px;background:#f0e6ff;color:#7b2d8e;font-weight:600;white-space:nowrap;flex-shrink:0}
.book-table{width:100%;font-size:12px;border-collapse:collapse}
.book-table td{padding:5px 6px;border-bottom:1px solid #f2f2f2}
.book-table td:last-child{text-align:right;white-space:nowrap}
.book-name{font-weight:600}
.book-detail{font-size:10px;color:var(--text2);margin-top:1px}
.book-badge{font-size:9px;padding:2px 7px;border-radius:3px;font-weight:600;white-space:nowrap}
.book-badge.confirmed{background:#e6f5e9;color:#1a7a42}
.book-badge.pending{background:#fef3e0;color:#bf5e00}
.book-badge.recommended{background:#e3f0fd;color:#1a5a9a}
.route-table{width:100%;border-collapse:collapse;font-size:12px}
.route-table td{padding:5px 6px;border-bottom:1px solid #f2f2f2}
.route-table td:last-child{text-align:right;white-space:nowrap}
.route-table tr{cursor:pointer;transition:background .15s}
.route-table tr:hover{background:#f5f0eb}
.route-dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:6px;vertical-align:middle}
.route-day{font-weight:700;color:var(--navy);min-width:32px}
.route-stops{color:var(--text2);font-size:11px}


/* Hotel list */
.hotel-list{display:flex;flex-direction:column;gap:4px;margin-top:6px}
.hotel-row{display:flex;align-items:center;gap:5px;padding:4px 8px;border-radius:6px;font-size:13px;background:#fafafa;flex-wrap:nowrap}
.hotel-row:nth-child(odd){background:#f5f6fa}
.hr-num{font-size:10px;font-weight:700;color:#999;min-width:16px;text-align:center;flex-shrink:0}
.hr-score{font-size:10px;font-weight:700;color:#fff;padding:1px 5px;border-radius:3px;min-width:30px;text-align:center;flex-shrink:0}
.hr-name{flex:1;min-width:0;text-decoration:none;color:var(--navy);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.hr-name:hover{color:var(--coral);text-decoration:underline}
.hr-kit{font-size:9px;font-weight:700;color:#e67e22;background:#fef9e7;padding:1px 4px;border-radius:3px;border:1px solid #f9e79f;flex-shrink:0}
.hr-reviews{font-size:10px;color:var(--text2);min-width:32px;text-align:right;flex-shrink:0}
.hr-price{font-size:12px;font-weight:700;color:var(--coral);min-width:48px;text-align:right;flex-shrink:0}
.hr-book{font-size:10px;font-weight:600;color:#fff;background:var(--navy);padding:2px 8px;border-radius:3px;text-decoration:none;white-space:nowrap;flex-shrink:0}
.hr-book:hover{background:var(--coral)}
.no-hotels{font-size:12px;color:var(--text2);padding:8px;text-align:center;font-style:italic}
.scheme-tabs{display:flex;gap:4px;margin:6px 0;flex-wrap:wrap}
.scheme-tab{padding:3px 10px;font-size:11px;font-weight:600;border-radius:4px;cursor:pointer;border:1px solid #ddd;background:#fff;color:var(--text2);transition:all .15s}
.scheme-tab.active{background:var(--navy);color:#fff;border-color:var(--navy)}
.map-btn{display:inline-block;font-size:11px;color:var(--teal);cursor:pointer;padding:4px 10px;border-radius:4px;border:1px solid var(--teal);transition:all .15s;font-weight:500}
.map-btn:hover{background:var(--teal);color:#fff}
.hotel-container{width:100%;margin-top:4px}
.hotel-container .hotel-list{width:100%}
@media(min-width:768px){
  .menu-btn{display:none}
  .sidebar-overlay{display:none!important}
  .sidebar{left:0!important}
  .sidebar-close{display:none}
  .right-panel{margin-left:280px}
  .header h1{font-size:18px}
  .stats-bar{max-width:960px;margin:0 auto;padding:8px 0}
  .map-wrap{max-width:960px;margin:0 auto;padding:0}
  .scroll-inner{max-width:960px;padding:14px 0 80px;margin:0 auto}
  .day-card{margin-bottom:14px}
  .hr-name{font-size:13px}
  .hr-price{font-size:13px;min-width:60px}
  .hr-book{font-size:11px;padding:2px 12px}
}
