:root{--navy:#0c3e49;--navydark:#082a33;--blue:#285b6a;--sea:#d7e9e4;--mint:#eff6f3;--paper:#f6f8f5;--white:#fff;--ink:#173239;--muted:#6b8185;--stroke:#dde6e3;--coral:#b75c3a;--gold:#eec58a;--danger:#a53a37;--shadow:0 8px 30px #12383b13;font-family:ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Arial,sans-serif;color:var(--ink);background:var(--paper);color-scheme:light;font-size:15px}
*{box-sizing:border-box}body{margin:0;min-height:100dvh}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}a{color:var(--blue)}h1,h2,h3,h4,p{margin:0}h1,h2,h3{letter-spacing:-.035em}h1{font-size:2.25rem;font-weight:750;line-height:1.14}h2{font-size:1.5rem}h3{font-size:1.1rem}.tiny{font-size:.77rem}.small{font-size:.89rem}.muted{color:var(--muted)}.nowrap{white-space:nowrap}.boot{height:90vh;display:grid;align-content:center;justify-content:center;text-align:center;gap:16px;color:var(--navy)}.boot .mark{font-size:4rem}
.shell{display:grid;min-height:100dvh;grid-template-columns:248px minmax(0,1fr)}.sidebar{background:var(--navy);color:#dceae7;display:flex;flex-direction:column;padding:26px 16px;gap:28px}.brand{font-weight:750;color:white;font-size:1.32rem;display:flex;align-items:center;gap:12px;padding:0 8px}.brand-icon{display:grid;place-items:center;width:42px;height:42px;background:#ffffff20;color:var(--gold);border-radius:14px;font-size:23px}.eyebrow{text-transform:uppercase;letter-spacing:.14em;font-size:.7rem;font-weight:750;color:var(--muted)}.sidebar .eyebrow{color:#afc9c6;margin:2px 10px 10px}.nav-link{width:100%;border:0;background:transparent;text-align:left;color:#bcd2d0;display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:11px;font-weight:600}.nav-link:hover{background:#ffffff13;color:white}.nav-link.active{color:var(--navy);background:#fff}.nav-link .nav-icon{width:25px;display:inline-block;text-align:center;font-size:17px}.sidebar-bottom{margin-top:auto;border-top:1px solid #ffffff22;padding:16px 9px 0}.sidebar-bottom strong{display:block;color:white;overflow-wrap:anywhere}.main{min-width:0;padding:28px clamp(20px,4.5vw,70px) 64px;max-width:1600px;width:100%;margin:0 auto}.topline{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:28px}.top-actions{display:flex;align-items:center;gap:10px}.status-dot{display:inline-block;width:8px;height:8px;border-radius:100%;background:#399777;margin-right:6px}.status-dot.offline{background:#cd8445}.page-title{display:flex;justify-content:space-between;align-items:end;gap:14px;flex-wrap:wrap;margin:12px 0 24px}.page-title h1{margin-top:6px}.hero{background:linear-gradient(120deg,#0d4851,#226576);border-radius:22px;color:white;padding:36px clamp(22px,4vw,52px);display:flex;justify-content:space-between;align-items:center;gap:24px;min-height:180px;position:relative;overflow:hidden;margin:18px 0 26px}.hero:before{content:'✧';position:absolute;right:33px;top:-50px;font-size:240px;color:#ffffff0c;transform:rotate(15deg)}.hero h2{font-size:2.05rem;margin:9px 0}.hero .sub{color:#d9e7e4;line-height:1.5;max-width:650px}.hero .pill{background:#ffffff25;color:white}.hero .btn{position:relative;z-index:1}.card{background:var(--white);border:1px solid var(--stroke);border-radius:17px;box-shadow:var(--shadow);padding:22px}.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.stat{padding:24px;min-height:110px}.stat .number{font-size:2rem;font-weight:750;margin-top:10px}.section-header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:28px 0 14px}.section-header:first-child{margin-top:0}.trip-card{border:1px solid var(--stroke);background:white;text-align:left;padding:25px;border-radius:18px;transition:transform .15s,box-shadow .15s;min-height:180px;display:flex;flex-direction:column;gap:14px;color:var(--ink)}.trip-card:hover{box-shadow:var(--shadow);transform:translateY(-2px)}.trip-card h3{font-size:1.36rem}.trip-card .trip-bottom{margin-top:auto;display:flex;justify-content:space-between;align-items:center}.trip-card .arrow{font-size:24px;color:var(--blue)}.pill{display:inline-flex;gap:6px;align-items:center;background:#e2eee9;color:#245e50;font-size:.73rem;padding:6px 10px;border-radius:999px;font-weight:700}.pill.private{background:#fff0dd;color:#865e1f}.btn{background:var(--navy);color:white;border:1px solid var(--navy);padding:11px 16px;border-radius:10px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:43px;white-space:nowrap;text-decoration:none}.btn:hover:not(:disabled){background:#155564}.btn.secondary{background:white;border-color:var(--stroke);color:var(--ink)}.btn.secondary:hover{background:var(--mint)}.btn.ghost{background:transparent;color:var(--navy);border-color:transparent}.btn.ghost:hover{background:var(--sea)}.btn.danger{background:#fff4f2;color:var(--danger);border-color:#ecd5d2}.btn.small{padding:8px 12px;min-height:34px;font-size:.84rem}.btn.important{background:var(--gold);color:var(--navydark);border-color:var(--gold)}.list{display:flex;flex-direction:column;gap:11px}.item{border:1px solid var(--stroke);background:white;border-radius:13px;padding:18px;display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.item h3{font-size:1.05rem;margin-bottom:5px}.item .content{min-width:0;flex:1}.item .details{font-size:.89rem;color:var(--muted);line-height:1.55;overflow-wrap:anywhere}.item .item-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.empty{background:white;border:1px dashed #bfcfca;border-radius:17px;padding:44px 20px;text-align:center;color:var(--muted)}.empty .art{font-size:38px;margin-bottom:12px}.empty h3{color:var(--ink);margin-bottom:8px}.subnav{display:flex;gap:7px;overflow-x:auto;padding:0 0 12px;border-bottom:1px solid var(--stroke);margin:4px 0 25px;scrollbar-width:thin}.tab{border:0;border-radius:9px;padding:10px 14px;background:transparent;color:var(--muted);white-space:nowrap;font-weight:650}.tab.active{background:var(--navy);color:white}.tab:hover:not(.active){background:#e6efeb;color:var(--ink)}.tag{font-size:.77rem;display:inline-block;padding:5px 8px;border:1px solid var(--stroke);border-radius:7px;margin-right:5px}.alert{border-radius:12px;padding:14px 17px;background:#fff4dc;border:1px solid #eddcbc;color:#6b532c;line-height:1.5}.alert.info{background:var(--mint);border-color:var(--sea);color:var(--blue)}.alert.error{background:#fff1ee;border-color:#efc7c0;color:#8d332d}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.field{display:flex;flex-direction:column;gap:7px;font-weight:650;color:#304b50;font-size:.86rem}.field.wide{grid-column:1/-1}.field input,.field select,.field textarea,.simple-input{background:#fbfcfb;border:1px solid #cbd8d4;border-radius:10px;min-height:43px;padding:11px 12px;color:var(--ink);width:100%;font-weight:450;outline-color:#4a9185}.field textarea{min-height:93px;resize:vertical}.field input[type=checkbox]{width:18px;min-height:18px}.checkrow{display:flex;gap:12px;align-items:center;font-weight:500}.modal-host:empty{display:none}.modal-host{position:fixed;inset:0;z-index:50;display:grid;place-items:center;background:#092b3480;padding:15px}.modal-panel{background:white;border-radius:18px;width:min(620px,100%);max-height:90dvh;overflow:auto;box-shadow:0 35px 100px #0004}.modal-header{padding:23px 25px;border-bottom:1px solid var(--stroke);display:flex;justify-content:space-between;align-items:center}.modal-body{padding:23px 25px}.modal-footer{display:flex;justify-content:flex-end;gap:10px;padding:16px 25px 23px}.icon-btn{border:0;background:transparent;color:var(--muted);font-size:1.35rem;min-width:32px;min-height:32px}.toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);background:var(--navydark);color:white;padding:13px 22px;border-radius:10px;box-shadow:var(--shadow);z-index:100;opacity:0;pointer-events:none;transition:opacity .3s;max-width:min(600px,90vw)}.toast.visible{opacity:1}.auth-wrap{min-height:100dvh;display:grid;grid-template-columns:1fr 1fr}.auth-art{background:linear-gradient(160deg,#0c3e49,#266a76);color:white;padding:clamp(40px,7vw,100px);display:flex;flex-direction:column;justify-content:space-between;overflow:hidden}.auth-art .illustration{font-size:clamp(90px,16vw,260px);text-align:center;line-height:1.6;color:var(--gold)}.auth-art h1{font-size:clamp(2.8rem,5vw,5.5rem);max-width:550px;margin-top:35px}.auth-art p{font-size:1.06rem;line-height:1.7;max-width:440px;color:#c5dfdc;margin-top:20px}.auth-panel{display:grid;place-items:center;padding:30px}.auth-box{width:min(430px,100%)}.auth-box h2{font-size:2rem;margin-bottom:12px}.auth-box .field{margin:16px 0}.auth-box .btn{width:100%;margin-top:12px}.auth-toggle{text-align:center;margin-top:20px}.auth-toggle button{background:transparent;border:0;color:var(--blue);font-weight:750}.onboarding{max-width:620px;margin:30px auto}.onboarding .card{padding:35px}.switch{position:relative;display:inline-flex;align-items:center;gap:12px;cursor:pointer}.switch input{width:20px;height:20px;accent-color:var(--navy)}.share-row{padding:14px 0;border-bottom:1px solid var(--stroke);display:flex;align-items:center;justify-content:space-between;gap:14px}.share-row:last-child{border-bottom:0}.bottombar{display:none}.dotlabel{font-weight:700;color:var(--blue)}@media(max-width:990px){.sidebar{display:none}.shell{display:block}.main{padding:20px 20px 105px}.bottombar{position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid var(--stroke);display:flex;justify-content:space-around;padding:8px 5px calc(8px + env(safe-area-inset-bottom));z-index:15;box-shadow:0 -6px 18px #12383b13}.bottombar button{border:0;background:transparent;color:var(--muted);display:flex;flex-direction:column;align-items:center;gap:3px;font-size:.71rem;padding:5px 10px;min-width:60px}.bottombar button.active{color:var(--navy);font-weight:750}.bottombar .glyph{font-size:20px}.auth-wrap{grid-template-columns:1fr}.auth-art{padding:30px;min-height:210px}.auth-art h1{font-size:2rem;margin-top:10px}.auth-art .illustration{display:none}.auth-art p{font-size:.95rem;margin-top:8px}.auth-panel{padding:35px 24px}}
@media(max-width:600px){h1{font-size:1.8rem}.hero{padding:24px;min-height:160px;display:block}.hero h2{font-size:1.6rem}.hero .btn{margin-top:18px}.grid2,.grid3,.form-grid{grid-template-columns:1fr}.field.wide{grid-column:auto}.item{flex-direction:column}.item-actions{width:100%}.page-title{align-items:start}.card{padding:17px}.topline{margin-bottom:14px}.hide-mobile{display:none}.modal-body{padding:18px}.modal-header,.modal-footer{padding:18px}.section-header{align-items:start}}
/* Trip map — mobile-first, touch-friendly map and route legend */
.map-heading{display:flex;align-items:end;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:18px}
.map-heading h2{font-size:1.55rem;margin:7px 0 4px}
.map-layout{display:grid;grid-template-columns:minmax(0,1fr) 285px;gap:18px;align-items:start}
.map-main,.map-filter-card,.map-route-card{background:#fff;border:1px solid var(--stroke);border-radius:18px;box-shadow:var(--shadow);overflow:hidden}
.waypatch-map{height:clamp(400px,66vh,690px);width:100%;background:#e8eeec;z-index:0}
.map-map-status{padding:11px 16px;font-size:.82rem;color:var(--blue);border-top:1px solid var(--stroke);min-height:42px}
.map-attribution{padding:0 16px 14px;color:var(--muted);font-size:.68rem;line-height:1.55}
.map-filter-card,.map-route-card{padding:18px;margin-bottom:15px}
.map-side h3{font-size:1.03rem;margin-bottom:14px}
.map-mode-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px 7px}
.map-mode{display:flex;align-items:center;gap:7px;font-size:.82rem;cursor:pointer;white-space:nowrap}
.map-mode input,.map-extra-toggle input{accent-color:var(--navy);width:16px;height:16px;margin:0}
.map-key{width:23px;flex:none;border-top:4px solid var(--mode-color);border-radius:5px}
.map-mode:has(input[data-map-mode="unplanned"]) .map-key{border-top-style:dotted}
.map-extra-toggle{display:flex;flex-wrap:wrap;gap:15px;border-top:1px solid var(--stroke);padding-top:15px;margin-top:18px;font-size:.85rem}
.map-extra-toggle label{display:flex;gap:8px;align-items:center;cursor:pointer}
.map-legs-list{display:grid;gap:8px;max-height:445px;overflow-y:auto}
.map-leg-item{border:1px solid var(--stroke);border-left-width:4px;border-radius:10px;background:#fbfcfb;padding:10px 11px;text-align:left;display:grid;gap:3px;width:100%;white-space:normal;word-break:break-word;cursor:pointer}
.map-leg-item:hover{background:var(--mint)}
.map-leg-mode{text-transform:uppercase;letter-spacing:.09em;font-size:.63rem;color:var(--muted);font-weight:700}
.map-leg-item strong{font-size:.85rem;line-height:1.35}
.map-leg-item small{font-size:.73rem;line-height:1.35;color:var(--muted)}
.map-help{margin-top:14px;line-height:1.65}
.waypatch-pin,.waypatch-arrow-icon{background:none;border:0}
.waypatch-pin>div{height:30px;min-width:30px;display:grid;place-items:center;border:2px solid white;border-radius:50% 50% 50% 8%;transform:rotate(-45deg);box-shadow:0 3px 8px #1235;color:white;font-weight:750;font-size:13px}
.waypatch-pin>div span{transform:rotate(45deg)}
.waypatch-arrow-icon>div{filter:drop-shadow(0 1px 2px #fff)}
@media(max-width:1150px){.map-layout{grid-template-columns:minmax(0,1fr)}.map-side{display:grid;grid-template-columns:1fr 1fr;gap:14px}.map-filter-card,.map-route-card{margin-bottom:0}.map-legs-list{max-height:280px}}
@media(max-width:650px){.map-side{grid-template-columns:1fr}.waypatch-map{height:53vh;min-height:330px;max-height:560px}.map-mode-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:13px 5px}.map-mode{font-size:.76rem}.map-filter-card,.map-route-card{padding:16px}.map-heading h2{font-size:1.36rem}.map-legs-list{max-height:400px}}

.map-basemap-unavailable {background:repeating-linear-gradient(0deg,#e8f2ee,#e8f2ee 35px,#dce8e5 36px),#e8f2ee;}
/* Unified chronological itinerary and evidence-based planning checklist */
.planning-gaps{border:1px solid #e9d7ac;background:#fffaf0;padding:18px;border-radius:17px;margin:18px 0 23px}
.gap-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.gap-heading strong{font-size:1.05rem}.gap-row{display:grid;grid-template-columns:25px minmax(0,1fr) 16px;gap:10px;align-items:center;width:100%;border:0;border-top:1px solid #efe5d0;background:transparent;text-align:left;padding:10px 0;color:#5a4a2e}
.gap-row strong,.gap-row small{display:block}.gap-row strong{font-size:.88rem}.gap-row small{font-size:.77rem;color:#82725a;margin-top:3px}.gap-row:hover{color:#194a54}
.timeline-list{margin-top:18px;max-width:940px}.timeline-date{padding:13px 0 9px;font-size:.84rem;letter-spacing:.045em;text-transform:uppercase;font-weight:800;color:var(--navy);border-bottom:1px solid var(--stroke);margin-top:13px}
.timeline-item{display:grid;grid-template-columns:40px minmax(0,1fr);gap:11px;padding:15px 1px 15px 2px;border-bottom:1px solid var(--stroke);background:transparent}
.timeline-item[draggable="true"]{cursor:grab}.timeline-item[draggable="true"]:active{cursor:grabbing}
.timeline-marker{background:var(--sea);color:var(--navy);width:35px;height:35px;border-radius:12px;display:grid;place-items:center;font-size:1.16rem;font-weight:700}
.timeline-body{min-width:0}.timeline-top{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-bottom:6px}.timeline-body h3{margin-bottom:5px;font-size:1.06rem;overflow-wrap:anywhere}
.timeline-actions{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:10px}.timeline-actions .btn{padding:7px 10px}
@media(max-width:600px){.timeline-item{grid-template-columns:32px minmax(0,1fr)}.timeline-marker{width:30px;height:30px}}


/* WayPatch v4: simple, one-plan experience */
.plan-welcome{display:flex;align-items:center;justify-content:space-between;gap:20px;background:linear-gradient(120deg,#0d4851,#267c81);border-radius:22px;color:#fff;padding:26px 30px;margin-bottom:18px}
.plan-welcome .eyebrow{color:#c3e4df;margin-bottom:8px}
.plan-welcome h2{font-size:clamp(1.55rem,3vw,2.25rem);margin-bottom:8px;color:#fff}
.plan-welcome p{color:#e3f5f1;line-height:1.5;max-width:560px}
.plan-welcome .btn{white-space:nowrap;min-height:48px}
.plan-hint{display:flex;align-items:center;gap:13px;background:#eff6f3;border:1px solid #c7ded6;border-radius:15px;padding:14px 16px;color:#294f52;margin-bottom:18px;font-size:.91rem;line-height:1.45}
.plan-hint>span:first-child{font-size:1.4rem}
.plan-checks{border:1px solid var(--stroke);border-radius:14px;padding:12px 18px;background:white;margin:18px 0}
.plan-checks summary{font-weight:700;cursor:pointer;padding:3px 0;font-size:.96rem}
.plan-checks .planning-gaps{margin:12px 0 0;border-radius:12px}
.plan-tile{display:flex;gap:16px;align-items:flex-start;background:#fff;border:1px solid #dce6e2;border-radius:18px;padding:18px;margin:11px 0;box-shadow:0 3px 10px #12383b09;transition:box-shadow .15s,border-color .15s}
.plan-tile[draggable="true"]{cursor:grab}
.plan-tile[draggable="true"]:hover{border-color:#7aaba3;box-shadow:0 7px 22px #12383b1b}
.plan-tile[draggable="true"]:active{cursor:grabbing}
.plan-icon{display:grid;place-items:center;flex:0 0 48px;width:48px;height:48px;border-radius:15px;background:#e8f3f0;font-size:25px}
.plan-main{flex:1;min-width:0}
.plan-meta{font-weight:750;color:#40616a;letter-spacing:.07em;font-size:.72rem;margin-bottom:6px}
.plan-main h3{font-size:1.19rem;line-height:1.3;margin-bottom:6px;overflow-wrap:anywhere}
.plan-main p{line-height:1.5}
.plan-chips{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0 0}
.plan-chip{border-radius:999px;padding:5px 9px;background:#eef3f5;color:#345661;font-size:.77rem;font-weight:650}
.plan-chip.confirmed{background:#def5e7;color:#24654b}
.plan-chip.subtle{background:#f7f1e5;color:#75613e}
.plan-actions{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-top:14px}
.plan-actions .btn{min-height:37px;padding:8px 11px}
.plan-reorder{display:flex;gap:5px;margin-left:auto}
.plan-reorder button{min-width:40px}
.plan-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.plan-choice{display:flex;align-items:center;text-align:left;gap:12px;background:#f3f8f6;border:1px solid #d7e8e1;border-radius:15px;padding:18px 14px;cursor:pointer;color:#153c43;min-height:100px}
.plan-choice:hover,.plan-choice:focus-visible{background:#e4f4ed;border-color:#6fa99c;outline-offset:2px}
.plan-choice strong,.plan-choice small{display:block}
.plan-choice strong{font-size:1.09rem;margin-bottom:4px}
.plan-choice small{color:#55777b;line-height:1.35;font-size:.82rem}
.plan-choice-icon{font-size:1.9rem}
.plan-choice>span:last-child{margin-left:auto;font-weight:800}
.loose-bookings{margin-top:24px;background:#f3f7f8;border:1px solid #dce7e7;border-radius:18px;padding:18px}
.loose-bookings .list{margin-top:12px}
.plan-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;background:#f1f6f7;border:1px solid var(--stroke);padding:16px;border-radius:15px;margin:22px 0}
@media(max-width:650px){.plan-welcome{flex-direction:column;align-items:stretch;padding:22px 18px}.plan-choice-grid{grid-template-columns:1fr}.plan-tile{padding:13px;gap:10px}.plan-icon{width:38px;height:38px;flex-basis:38px;font-size:21px}.plan-actions .btn{min-height:42px}.plan-reorder{margin-left:0}.plan-footer{align-items:stretch;flex-direction:column}.plan-footer .btn{align-self:flex-start}}
