
:root{
  --navy:#5aa6d6; --blue:#7cc0ea; --sky:#f3faff; --ink:#17212b;
  --muted:#6b7680; --line:#d9e2e8; --white:#fff; --accent:#d46b3b;
  --ok:#2f7d57; --shadow:0 8px 30px rgba(22,48,68,.10);
}
*{box-sizing:border-box}
html{background:#f4f7f9}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink);background:#f4f7f9}
button,input,textarea{font:inherit}
button{cursor:pointer}
.topbar{position:sticky;top:0;z-index:20;display:flex;justify-content:space-between;gap:16px;padding:calc(14px + env(safe-area-inset-top)) 18px 14px;background:var(--navy);color:white;box-shadow:0 3px 14px rgba(0,0,0,.18)}
.eyebrow{font-size:11px;letter-spacing:.18em;opacity:.75;font-weight:700}
h1{font-size:23px;margin:3px 0 2px}.sub{font-size:13px;opacity:.8}
.iconbtn{border:0;background:rgba(255,255,255,.13);color:white;border-radius:12px;width:42px;height:42px;font-size:24px}
main{max-width:860px;margin:auto;padding:18px 14px calc(40px + env(safe-area-inset-bottom))}
.section-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;margin:4px 2px 14px}
.section-head h2{margin:0 0 2px;font-size:22px}.section-head p{margin:0;color:var(--muted);font-size:14px}
.day-list{display:grid;gap:11px}
.day-card{background:white;border:1px solid var(--line);border-radius:18px;padding:15px;box-shadow:var(--shadow);display:grid;grid-template-columns:58px 1fr auto;gap:12px;align-items:center}
.day-card.today{border:2px solid var(--blue)}
.day-num{width:58px;height:58px;border-radius:16px;background:var(--sky);display:grid;place-items:center;color:var(--navy)}
.day-num b{font-size:20px}.day-num span{font-size:10px;text-transform:uppercase;letter-spacing:.08em}
.day-main h3{margin:0 0 4px;font-size:17px}.day-main p{margin:2px 0;color:var(--muted);font-size:13px}
.chev{font-size:22px;color:#84919b}
.hidden{display:none!important}
.back{border:0;background:none;color:var(--blue);padding:4px 0 12px;font-weight:650}
.hero{background:linear-gradient(150deg,#66add9,#9bd3f1);color:white;border-radius:22px;padding:19px;margin-bottom:14px;box-shadow:var(--shadow)}
.hero .date{font-size:13px;opacity:.8}.hero h2{margin:4px 0 7px;font-size:25px}.hero p{margin:3px 0;opacity:.9}
.hero-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.card{background:white;border:1px solid var(--line);border-radius:18px;padding:16px;margin:12px 0;box-shadow:var(--shadow)}
.card h3{margin:0 0 12px;font-size:18px}
.meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.meta .box{background:#f7fafc;border:1px solid #e5edf2;border-radius:13px;padding:11px}
.meta .k{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}.meta .v{margin-top:3px;font-weight:650;font-size:14px}
.primary,.ghost,.danger,.soft,.filebtn{border:0;border-radius:12px;padding:10px 13px;font-weight:650;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
.primary{background:var(--blue);color:white}.primary.small{padding:8px 12px}
.ghost{background:#edf2f5;color:var(--ink)}.soft{background:rgba(255,255,255,.15);color:white}
.danger{background:#fff0ee;color:#9d2e24}
.schedule{display:grid;gap:9px}
.item{display:grid;grid-template-columns:30px 74px 1fr auto;gap:9px;align-items:start;padding:11px 0;border-bottom:1px solid #edf1f4}
.item:last-child{border-bottom:0}
.item.done .item-text{text-decoration:line-through;opacity:.5}
.check{width:24px;height:24px;margin-top:1px}
.time{font-weight:750;font-size:13px;color:var(--navy);line-height:1.25}
.item-title{font-weight:700;margin-bottom:3px}.item-note,.duration{color:var(--muted);font-size:13px;line-height:1.35}
.item-actions{display:flex;flex-direction:column;gap:5px}
.mini{border:0;border-radius:8px;background:#eff3f6;padding:6px 8px;color:#42515c;font-size:12px}
.add{width:100%;margin-top:12px}
.tip{background:#fff8e7;border-color:#f0dfab}
.links a{display:block;padding:10px 0;border-bottom:1px solid var(--line);color:var(--blue);font-weight:650;text-decoration:none}.links a:last-child{border-bottom:0}
dialog{border:0;border-radius:20px;width:min(92vw,560px);padding:0;box-shadow:0 22px 80px rgba(0,0,0,.28)}
dialog::backdrop{background:rgba(13,27,38,.55)}
dialog form,.menu-panel{padding:20px}
dialog h3{margin:0 0 14px}
label{display:block;font-size:13px;font-weight:650;margin:10px 0}
input,textarea{width:100%;margin-top:5px;border:1px solid #cfd9e0;border-radius:11px;padding:11px;background:white;color:var(--ink)}
textarea{resize:vertical}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:16px}
.menu-panel{display:grid;gap:10px}.menu-panel button,.filebtn{width:100%}
.filebtn{background:#edf2f5;color:var(--ink)}.filebtn input{display:none}.fine{font-size:12px;color:var(--muted);margin:5px 0 0}
@media(max-width:520px){
  .day-card{grid-template-columns:52px 1fr auto;padding:13px}.day-num{width:52px;height:52px}
  .meta{grid-template-columns:1fr 1fr}
  .item{grid-template-columns:28px 67px 1fr;}.item-actions{grid-column:3;flex-direction:row}
  .topbar h1{font-size:20px}
}


.viewtabs{display:flex;gap:8px;margin:0 0 12px}
.tab{border:1px solid var(--line);background:white;border-radius:12px;padding:9px 14px;font-weight:700;color:var(--muted)}
.tab.active{background:var(--navy);color:white;border-color:var(--navy)}
.info-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:10px}
.info-head h3{margin:0}
.hotel-box,.route-box{background:#f7fafc;border:1px solid #e5edf2;border-radius:13px;padding:12px;margin-top:8px}
.hotel-name{font-weight:750}
.address{color:var(--muted);font-size:13px;margin-top:3px}
.secret{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.08em}
.secret-row{display:grid;grid-template-columns:1fr auto;gap:7px;align-items:end}
.secret-row input{margin-top:5px}
.action-row{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}
.map-wide{width:100%;margin-top:12px}
.stop-list{margin:8px 0 0;padding-left:20px;color:var(--muted);font-size:13px}
.stop-list li{margin:5px 0}
.trip-map{position:relative;height:430px;background:linear-gradient(#eaf4f8,#f6fbfd);border-radius:16px;overflow:hidden;border:1px solid #d9e4e9}
.trip-map .coast{position:absolute;inset:0}
.trip-map .route-line{fill:none;stroke:#2d6d9f;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;opacity:.8}
.trip-map .pin{fill:#d46b3b;stroke:white;stroke-width:2}
.trip-map .pin-label{font-size:11px;font-weight:700;fill:#17365d;paint-order:stroke;stroke:white;stroke-width:3px;stroke-linejoin:round}
.delete-btn{background:#fff0ee!important;color:#9d2e24!important;font-weight:800}
@media(max-width:520px){
 .trip-map{height:500px}
}

.notes-box{
  background:#fffdf5;
  border:1px solid #eadfb8;
  border-radius:13px;
  padding:12px;
  white-space:pre-wrap;
  line-height:1.45;
}

.sync-status{
  font-size:11px;
  margin-top:4px;
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:3px 7px;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  color:rgba(255,255,255,.9)
}
.sync-status::before{content:"";width:7px;height:7px;border-radius:50%;background:#b8c3cb}
.sync-status.on::before{background:#6ee7a2}
.sync-status.busy::before{background:#ffd76e}
.sync-status.error::before{background:#ff8c80}

/* Version 4 Light Blue marker */
.topbar{
  background:#5aa6d6;
}
.version-badge{
  display:inline-flex;
  margin-top:5px;
  padding:3px 8px;
  border-radius:999px;
  background:rgba(255,255,255,.28);
  font-size:11px;
  font-weight:700;
  letter-spacing:.04em;
}
