@font-face { font-family: "Literata"; font-weight: 500; font-display: swap; src: url("fonts/literata-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Literata"; font-weight: 600; font-display: swap; src: url("fonts/literata-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url("fonts/nunito-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 600; font-display: swap; src: url("fonts/nunito-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("fonts/nunito-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url("fonts/nunito-latin-800-normal.woff2") format("woff2"); }

:root {
  --ink: #1F2A3A; --sl: #3F5A7A; --ac: #4E6F96; --mid: #9DB2CC; --soft: #E3E9F1; --bg: #F3F5F8;
  --mut: #5B6878; --line: #DCE2EA; --surf: #FFFFFF; --dash: #AEBACB; --danger: #B42318; --green-bg: #EEF0E6; --green: #4D5A2E;
  --head: "Literata", Georgia, serif; --body: "Nunito", -apple-system, system-ui, sans-serif;
  --sat: env(safe-area-inset-top); --sab: env(safe-area-inset-bottom);
  --shadow: 0 1px 2px rgba(31,42,58,.06), 0 4px 14px rgba(31,42,58,.05);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
body { font-family: var(--body); -webkit-text-size-adjust: 100%; overscroll-behavior: none; font-size: 15px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
input, select, textarea { font: inherit; color: var(--ink); }
a { color: var(--sl); }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
img { display: block; }
.loading { display: flex; height: 100%; align-items: center; justify-content: center; color: var(--mut); }
.mut { color: var(--mut); }
.sm { font-size: 13px; color: var(--mut); }
.center { text-align: center; }

/* shell */
.shell { position: fixed; inset: 0; display: flex; flex-direction: column; }
.page { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; position: relative; }
.pad { padding: calc(var(--sat) + 18px) 20px 28px; display: flex; flex-direction: column; gap: 18px; }
.tabs { flex: none; display: flex; justify-content: space-around; align-items: flex-start; padding: 8px 6px var(--sab); height: calc(64px + var(--sab)); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); z-index: 5; }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 60px; min-height: 48px; color: #7C8796; font-size: 11px; font-weight: 700; }
.tab.on { color: var(--sl); font-weight: 800; }
.plusbtn { width: 52px; height: 52px; border-radius: 50%; background: var(--sl); color: #fff; display: flex; align-items: center; justify-content: center; margin-top: -16px; box-shadow: 0 6px 16px rgba(63,90,122,.35); }
.plusbtn svg { width: 26px; height: 26px; stroke-width: 2.2; }

/* type */
.h1 { margin: 0; font-family: var(--head); font-weight: 600; font-size: 30px; letter-spacing: -.3px; line-height: 1.15; }
.h2 { margin: 0; font-family: var(--head); font-weight: 600; font-size: 19px; }
.serif { font-family: var(--head); font-weight: 600; }
.eyebrow { font-size: 12px; font-weight: 800; color: var(--ac); text-transform: uppercase; letter-spacing: .8px; }
.group-t { font-size: 12px; font-weight: 800; color: var(--mut); text-transform: uppercase; letter-spacing: .8px; margin: 0 4px -10px; }
.toprow { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rowb { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }

/* bits */
.card { background: var(--surf); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); }
.card.list { padding: 2px 14px; }
.card.tight { padding: 12px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); width: 100%; min-height: 44px; }
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row b, .t15 { font-size: 15px; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--soft); color: var(--sl); font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.tag.green { background: var(--green-bg); color: var(--green); }
.tag.solid { background: var(--sl); color: #fff; }
.tag.grey { background: #F1F3F6; color: var(--mut); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 0 14px; height: 36px; border-radius: 999px; background: #fff; color: var(--ink); border: 1px solid var(--line); font-size: 13px; font-weight: 700; white-space: nowrap; flex: none; }
.chip.on { background: var(--sl); color: #fff; border-color: var(--sl); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chips::-webkit-scrollbar { display: none; }
.av { display: inline-flex; border-radius: 50%; align-items: center; justify-content: center; font-weight: 800; border: 2px solid #fff; flex: none; }
.avs { display: flex; } .avs .av + .av { margin-left: -8px; }
.ibtn { width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(31,42,58,.14); flex: none; }
.ibtn.dark { background: var(--sl); color: #fff; }
.ibtn svg { width: 20px; height: 20px; }
.btn { height: 52px; border-radius: 16px; background: var(--sl); color: #fff; font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.btn:disabled { opacity: .55; }
.btn.ghost { background: none; border: 1.5px dashed var(--dash); color: var(--ac); font-size: 15px; height: 50px; border-radius: 14px; }
.btn.danger { background: none; color: var(--danger); border: 1.5px solid #F0C9C5; font-size: 15px; height: 48px; }
.btn.small { height: 40px; font-size: 14px; width: auto; padding: 0 18px; border-radius: 999px; }
.link { color: var(--ac); font-weight: 800; font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--soft); }
.bar > div { height: 100%; }
.dot { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.empty { text-align: center; color: var(--mut); padding: 26px 10px; font-size: 14px; line-height: 1.5; }
.empty svg { width: 34px; height: 34px; color: var(--mid); margin: 0 auto 8px; display: block; }
.pic { background: var(--soft); color: var(--mid); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; }
.pic img { width: 100%; height: 100%; object-fit: cover; }
.pic svg { width: 30%; height: 30%; max-width: 44px; max-height: 44px; }
.thumb { width: 52px; height: 52px; border-radius: 12px; }

/* trips home */
.hero-card { border-radius: 22px; overflow: hidden; background: #fff; box-shadow: 0 6px 20px rgba(31,42,58,.10); width: 100%; display: block; }
.hero-card .pic { width: 100%; height: 190px; }
.hero-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.big-title { font-family: var(--head); font-size: 24px; font-weight: 600; margin-top: 2px; }
.leave-mini { display: flex; gap: 18px; }
.leave-mini > div { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.leave-mini .n { font-family: var(--head); font-size: 24px; font-weight: 600; }
.leave-mini .n span { font-family: var(--body); font-size: 13px; color: var(--mut); font-weight: 700; }

/* ideas */
.search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; height: 46px; color: var(--mut); }
.search input { border: 0; outline: 0; font-size: 16px; flex: 1; background: none; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.icard { background: #fff; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; text-align: left; }
.icard .pic { width: 100%; height: 120px; }
.icard .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 5px; }
.icard .name { font-family: var(--head); font-size: 17px; font-weight: 600; }

/* hero pages (trip, idea) */
.hero { position: relative; height: 270px; }
.hero .pic { position: absolute; inset: 0; height: 100%; width: 100%; }
.hero .pic svg { width: 64px; height: 64px; }
.hero-btns { position: absolute; left: 20px; right: 20px; top: calc(var(--sat) + 12px); display: flex; justify-content: space-between; z-index: 2; }
.hero-btns > div { display: flex; gap: 8px; }
.over { position: relative; background: var(--bg); margin-top: -26px; border-radius: 24px 24px 0 0; padding: 20px 20px 30px; display: flex; flex-direction: column; gap: 14px; }
.tiles { display: flex; gap: 10px; }
.tile { flex: 1; background: #fff; border-radius: 16px; padding: 12px 0 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--sl); font-size: 12.5px; font-weight: 800; box-shadow: var(--shadow); position: relative; }
.tile span { color: var(--ink); }
.tile .cnt { position: absolute; top: 6px; right: 8px; font-size: 11px; color: var(--mut); }
.seg { display: flex; background: var(--soft); border-radius: 12px; padding: 3px; }
.seg button { flex: 1; height: 38px; border-radius: 10px; font-size: 13.5px; font-weight: 800; color: var(--mut); text-align: center; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(31,42,58,.12); }
.facts { display: flex; gap: 8px; }
.facts > div { flex: 1; background: #fff; border-radius: 14px; padding: 10px 12px; box-shadow: 0 1px 2px rgba(31,42,58,.06); min-width: 0; }
.facts .k { font-size: 11.5px; color: var(--mut); font-weight: 800; }
.facts .v { font-size: 15px; font-weight: 800; margin-top: 2px; }
.ic-sl { color: var(--sl); display: inline-flex; }
.note { font-size: 14px; color: var(--mut); line-height: 1.45; white-space: pre-wrap; margin: 6px 0 0; }
.subhdr { display: flex; align-items: center; gap: 12px; }
.subhdr .ttl { font-family: var(--head); font-size: 24px; font-weight: 600; line-height: 1.15; }
.subhdr .pre { font-size: 13px; color: var(--mut); font-weight: 800; }
.notes-area { width: 100%; min-height: 300px; border: 1px solid var(--line); border-radius: 16px; padding: 14px; font-size: 16px; line-height: 1.5; background: #fff; resize: vertical; }

/* day itinerary */
.days { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px 4px; }
.days::-webkit-scrollbar { display: none; }
.daybtn { flex: none; width: 58px; height: 60px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fff; font-size: 11.5px; font-weight: 800; box-shadow: 0 1px 2px rgba(31,42,58,.08); }
.daybtn b { font-size: 17px; }
.daybtn.on { background: var(--sl); color: #fff; }
.daybtn .has { width: 5px; height: 5px; border-radius: 50%; background: var(--mid); margin-top: 2px; }
.daybtn.on .has { background: #fff; }
.stop { position: relative; display: flex; gap: 12px; }
.stop .tm { width: 44px; font-size: 13px; font-weight: 800; color: var(--mut); padding-top: 14px; text-align: right; flex: none; }
.stop .bul { width: 12px; height: 12px; border-radius: 50%; background: var(--sl); border: 3px solid var(--bg); margin-top: 16px; flex: none; position: relative; z-index: 1; box-sizing: content-box; }
.stop .ln { position: absolute; left: 61px; top: 24px; bottom: -16px; width: 2px; background: var(--line); }
.stop .card { flex: 1; text-align: left; padding: 12px; min-width: 0; }
.stops { display: flex; flex-direction: column; gap: 14px; }

/* packing */
.check { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); width: 100%; min-height: 44px; }
.check:first-child { border-top: 0; }
.box { width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid var(--dash); background: #fff; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.box svg { width: 16px; height: 16px; stroke-width: 2.6; }
.check.done .box { background: var(--sl); border-color: var(--sl); }
.check.done .lbl { text-decoration: line-through; color: var(--mut); }
.check .lbl { flex: 1; font-size: 15px; text-align: left; }

/* journal */
.jcard { background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 6px 20px rgba(31,42,58,.08); text-align: left; width: 100%; display: block; }
.jcard > .pic { width: 100%; height: 200px; }
.jcard .body { padding: 14px 16px 16px; }
.jcard .title { font-family: var(--head); font-size: 21px; font-weight: 600; margin-top: 3px; }
.strip { display: flex; gap: 6px; margin-top: 10px; }
.strip .pic { width: 64px; height: 64px; border-radius: 10px; }
.strip .more { width: 64px; height: 64px; border-radius: 10px; background: var(--soft); color: var(--sl); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 0 20px; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery button { flex: none; width: 86%; height: 300px; border-radius: 18px; overflow: hidden; scroll-snap-align: center; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.viewer { position: fixed; inset: 0; background: rgba(10,14,20,.94); z-index: 60; display: flex; align-items: center; justify-content: center; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer .ibtn { position: absolute; top: calc(var(--sat) + 12px); right: 16px; }

/* map */
#map { height: 300px; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); background: #EEF3F8; z-index: 0; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--mut); font-weight: 700; }
.legend span { display: flex; gap: 6px; align-items: center; }
.pdot { width: 12px; height: 12px; border-radius: 50%; background: var(--sl); border: 2.5px solid var(--sl); flex: none; }
.pdot.want { background: #fff; }
.stats { display: flex; }
.stats > div { flex: 1; text-align: center; }
.stats .n { font-family: var(--head); font-size: 26px; font-weight: 600; }
.stats .l { font-size: 12.5px; color: var(--mut); font-weight: 800; }
.leaflet-container { font-family: var(--body); }
.leaflet-container svg { width: auto; height: auto; stroke-width: inherit; }
.results { display: flex; flex-direction: column; }

/* leave */
.lc-head { display: flex; justify-content: space-between; align-items: center; }
.lc-big { display: flex; align-items: baseline; gap: 6px; margin: 10px 0; }
.lc-big .n { font-family: var(--head); font-size: 36px; font-weight: 600; }
.legend3 { display: flex; gap: 8px; margin-top: 12px; }
.legend3 > div { flex: 1; }
.legend3 .k { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--mut); font-weight: 800; }
.legend3 .v { font-size: 18px; font-weight: 800; margin-top: 2px; }
.yearnav { display: flex; align-items: center; justify-content: center; gap: 6px; }
.yearnav button { width: 44px; height: 40px; display: inline-flex; align-items: center; justify-content: center; color: var(--mut); }
.yearnav span { font-weight: 800; font-size: 14px; min-width: 120px; text-align: center; }

/* sheet (forms, menus) */
.sheet { position: fixed; inset: 0; z-index: 40; background: var(--bg); display: flex; flex-direction: column; }
.sheet.anim { animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(30px); opacity: .3; } to { transform: none; opacity: 1; } }
.sheet .shdr { flex: none; padding: calc(var(--sat) + 10px) 16px 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sheet .shdr b { font-size: 16px; }
.sheet .sbody > * { flex: none; }
.sheet .sbody { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 20px calc(var(--sab) + 30px); display: flex; flex-direction: column; gap: 16px; }
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 800; color: var(--mut); min-width: 0; }
.fld input, .fld select, .fld textarea { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; height: 46px; font-size: 16px; font-weight: 400; background: #fff; width: 100%; min-width: 0; -webkit-appearance: none; appearance: none; }
.fld input[type=date], .fld input[type=time] { display: block; line-height: 46px; }
.fld textarea { padding: 12px 14px; height: auto; min-height: 90px; resize: vertical; line-height: 1.45; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: 2px solid var(--mid); outline-offset: -1px; }
.two { display: flex; gap: 10px; } .two > * { flex: 1; }
.cover { position: relative; border-radius: 18px; overflow: hidden; height: 160px; }
.cover .pic { width: 100%; height: 100%; }
.cover label { position: absolute; right: 10px; bottom: 10px; background: rgba(255,255,255,.95); color: var(--ink); font-weight: 800; font-size: 13px; height: 38px; padding: 0 12px; border-radius: 999px; display: flex; gap: 6px; align-items: center; }
.cover label svg { width: 17px; height: 17px; }
.hidefile { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.listrow { display: flex; align-items: center; gap: 8px; }
.listrow input { flex: 1; }
.listrow .x { width: 40px; height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--mut); flex: none; }
.listrow .x svg { width: 18px; height: 18px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; font-size: 15px; font-weight: 700; color: var(--ink); width: 100%; }
.sw { width: 48px; height: 30px; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: background .15s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.toggle.on .sw { background: var(--sl); }
.toggle.on .sw::after { transform: translateX(18px); }
.calc { background: var(--soft); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 700; color: var(--sl); }
.photos { display: flex; gap: 8px; flex-wrap: wrap; }
.photos .ph { position: relative; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; }
.photos .ph img { width: 100%; height: 100%; object-fit: cover; }
.photos .ph button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; }
.photos .ph button svg { width: 14px; height: 14px; }
.photos label.add { width: 76px; height: 76px; border-radius: 12px; border: 1.5px dashed var(--dash); color: var(--ac); display: flex; align-items: center; justify-content: center; position: relative; }
.filebox { display: flex; align-items: center; gap: 12px; border: 1.5px dashed var(--dash); border-radius: 14px; padding: 14px; color: var(--ac); font-weight: 800; position: relative; min-height: 60px; }
.menu { position: fixed; inset: 0; z-index: 45; background: rgba(20,28,40,.35); display: flex; align-items: flex-end; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.menu .panel { background: var(--bg); width: 100%; border-radius: 22px 22px 0 0; padding: 18px 16px calc(var(--sab) + 18px); display: flex; flex-direction: column; gap: 8px; animation: up .2s ease-out; }
.menu .mi { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 14px; padding: 0 16px; height: 56px; font-size: 16px; font-weight: 700; width: 100%; }
.menu .mi svg { color: var(--sl); }
.toast { position: fixed; left: 50%; bottom: calc(var(--sab) + 84px); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 700; z-index: 70; max-width: 90%; text-align: center; animation: fade .2s; }

/* sign in */
.signin { min-height: 100%; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--sat) + 30px) 26px 40px; gap: 16px; }
.signin .logo { width: 72px; height: 72px; border-radius: 20px; }
.err { color: var(--danger); font-size: 14px; font-weight: 700; }
.ok { color: var(--green); font-size: 14px; font-weight: 700; }
