/* Travel journal: app layout for the Modern & vibrant design.
   vibrant.css holds the shared design pieces; this file places them on screen. */
:root { --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px); }
html, body { height: 100%; margin: 0; }
body.vb { overflow: hidden; }
.vb :focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
[hidden] { display: none !important; }
.vb a { color: var(--violet-d); }

/* ---------- map ---------- */
#map { position: fixed; inset: 0; z-index: 0; background: #DCEBFA; }
.leaflet-container { font-family: inherit; background: #DCEBFA; }
.map-soft .leaflet-tile-pane { filter: saturate(1.05); }
.leaflet-control-attribution { font-size: 10px; background: rgba(255,255,255,.8) !important; border-radius: 8px 0 0 0; }
.leaflet-control-zoom { border: 0 !important; border-radius: 16px !important; overflow: hidden; box-shadow: 0 6px 18px rgba(21,18,58,.16) !important; }
.leaflet-control-zoom a { color: var(--ink) !important; font-weight: 700; }
.route-casing { stroke: #fff; stroke-width: 9; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.route { stroke: var(--violet); stroke-width: 4.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.route--short { stroke-dasharray: 1 9; }
.plane { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--violet); box-shadow: 0 2px 8px rgba(21,18,58,.2); }
.plane svg { width: 18px; height: 18px; }
.pin-wrap { background: none; border: 0; }

.vpin__face b { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; border: 2px solid #fff; background: var(--c); color: #fff; font: 800 16px/1 'Bricolage Grotesque', sans-serif; }
.vpin.is-current .vpin__face { box-shadow: 0 0 0 3px var(--ink); }
.vpin.is-dim { opacity: .3; }
.vpin__now { left: 50%; transform: translateX(-50%); top: -26px; }
.halo-pin { position: absolute; left: 50%; top: 31px; width: 110px; height: 110px; margin: -55px 0 0 -55px; border-radius: 50%; background: radial-gradient(circle, rgba(108,59,255,.28) 0, rgba(108,59,255,.1) 45%, transparent 70%); pointer-events: none; }
.vstack { white-space: nowrap; }
.vstack .ini { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; color: #fff; font: 800 13px/1 'Bricolage Grotesque', sans-serif; }
.vstack .ini + .ini, .vstack img + .ini, .vstack .ini + img { margin-left: -12px; }

/* ---------- faces ---------- */
.face { display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; background: var(--c, var(--violet)); color: #fff; font: 800 16px/1 'Bricolage Grotesque', sans-serif; flex: none; }
.face img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- side: status card + views (phone: floats; desktop: left panel) ---------- */
.side { display: contents; }
.status { position: fixed; z-index: 500; left: 12px; right: 12px; top: calc(var(--st) + 12px); padding: 14px 16px 10px; background: #fff; border-radius: 24px; box-shadow: 0 10px 30px rgba(21,18,58,.14); }
.status__row { display: flex; align-items: center; gap: 12px; }
.status h1 { margin: 0; font: 800 20px/1.1 'Bricolage Grotesque', sans-serif; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status p { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); }
.datetile { display: grid; place-items: center; width: 44px; height: 44px; padding: 4px; border-radius: 12px; background: var(--sun); text-align: center; font: 800 16px/1 'Figtree', sans-serif; flex: none; }
.datetile small { display: block; font-size: 10px; font-weight: 700; margin-top: 1px; }
.outbox-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 10px; border-radius: 999px; background: #FFF1EF; color: var(--coral-d); font-size: 12px; font-weight: 800; border: 0; }
.tl { position: relative; margin-top: 8px; }
.tl ol { display: flex; margin: 0 -16px; padding: 12px 16px 4px; list-style: none; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain;
  -webkit-mask: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent); mask: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent); }
.tl ol::-webkit-scrollbar { display: none; }
.tl li { position: relative; flex: none; width: 84px; }
.tl li::before { content: ""; position: absolute; top: 10px; left: 0; right: 0; height: 4px; background: var(--violet); }
.tl li:first-child::before { left: 50%; }
.tl li:last-child::before { right: 50%; }
.tl li:only-child::before { display: none; }
.tl li > button { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0; border: 0; background: none; text-align: center; }
.tl i { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; background: var(--violet); border: 4px solid #fff; box-shadow: 0 0 0 2px var(--violet); }
.tl .on i { background: var(--sun); box-shadow: 0 0 0 2.5px var(--ink), 0 0 0 8px rgba(255,200,61,.35); }
.tl b { font-size: 12px; line-height: 1.1; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl small { font-size: 11px; font-weight: 700; color: var(--ink-2); }
.tl .now small { padding: 1px 7px; border-radius: 999px; background: var(--ink); color: #fff; }
.tl .vtl__arrow { top: 12px; width: 34px; }
.vb .vtag { color: var(--ink); }
.tabs, .sideplay { display: none; }
.viewbody { display: none; position: fixed; z-index: 520; left: 0; right: 0; top: 0; bottom: 0; padding: calc(var(--st) + 8px) 0 calc(var(--sb) + 100px); overflow-y: auto; overscroll-behavior: contain; background: var(--bg); }
body.view-open .viewbody { display: block; }
body.view-open .status, body.view-open .filter, body.view-open .peek { display: none; }
.viewhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; }
.viewhead h2 { margin: 0; font: 800 26px/1.1 'Bricolage Grotesque', sans-serif; letter-spacing: -.03em; }
.viewhead span { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.vsec2 { padding: 0 16px; margin-top: 24px; }
.vsec2 > h3 { margin: 0 0 10px; font: 800 17px/1.2 'Bricolage Grotesque', sans-serif; }

/* ---------- family filter ---------- */
.filter { position: fixed; z-index: 500; right: 12px; top: calc(var(--st) + 190px); display: flex; flex-direction: column; gap: 8px; padding: 8px 6px; border-radius: 24px; background: #fff; box-shadow: 0 8px 24px rgba(21,18,58,.16); }
.filter button { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: none; box-shadow: 0 0 0 3px var(--c); }
.filter button .face { width: 40px; height: 40px; border: 2px solid #fff; }
.filter button[aria-pressed="false"] { box-shadow: 0 0 0 2px var(--line); }
.filter button[aria-pressed="false"] .face { filter: grayscale(1); opacity: .45; }
.filter__label { display: none; }

/* ---------- bottom cards (phone) ---------- */
.peek { position: fixed; z-index: 500; left: 12px; right: 12px; bottom: calc(var(--sb) + 96px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.peekcard { display: flex; gap: 8px; align-items: center; min-width: 0; padding: 12px; border: 0; border-radius: 22px; background: #fff; box-shadow: 0 10px 30px rgba(21,18,58,.16); color: var(--ink); text-decoration: none; text-align: left; font: inherit; }
.vb .peekcard { color: var(--ink); }
.peekcard--play { background: var(--sun); box-shadow: 0 4px 0 var(--sun-d), 0 10px 30px rgba(21,18,58,.16); }
.peekcard__ic { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; color: #fff; flex: none; overflow: hidden; align-self: center; }
.peekcard__ic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.peekcard__txt { min-width: 0; }
.peekcard__txt > span { display: block; font-size: 12px; font-weight: 800; color: var(--coral-d); }
.peekcard--play .peekcard__txt > span { color: #5C4300; }
.peekcard__txt b { display: block; font: 800 16px/1.15 'Bricolage Grotesque', sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.peekcard__txt small { display: block; font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.peekcard--play .peekcard__txt small { color: #3D3300; }

/* ---------- bottom nav ---------- */
.vnav { position: fixed; z-index: 540; left: 12px; right: 12px; bottom: calc(var(--sb) + 12px); }
.vnav a, .vnav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border: 0; border-radius: 22px; background: none; color: var(--ink-2); font: 700 12px/1.2 'Figtree', sans-serif; text-decoration: none; }
.vnav .on { background: var(--violet-50); color: var(--violet-d); }
.vnav .post { flex: none; width: 56px; height: 56px; margin: -14px 2px 0; border-radius: 50%; background: var(--violet); color: #fff; box-shadow: 0 4px 0 var(--violet-d); justify-content: center; }
.vnav .post .ic { width: 26px; height: 26px; stroke-width: 2.8; }

/* ---------- journey list ---------- */
.ctabs { display: flex; gap: 8px; padding: 6px 16px 10px; overflow-x: auto; scrollbar-width: none; }
.ctabs::-webkit-scrollbar { display: none; }
.ctabs .vtab { position: static; box-shadow: 0 0 0 1.5px var(--line); }
.ctabs .vtab--on { box-shadow: inset 0 0 0 2px var(--violet); }
.daylist { list-style: none; margin: 0; padding: 0 8px 12px; }
.daylist h4 { margin: 0; padding: 14px 8px 4px; font: 800 13px/1.3 'Bricolage Grotesque', sans-serif; color: var(--ink-2); }
.jrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border: 0; border-radius: 18px; background: none; color: var(--ink); text-align: left; font: inherit; }
.jrow:hover { background: var(--bg); }
.jrow.is-current { background: var(--violet-50); box-shadow: inset 0 0 0 2px var(--violet); }
.jrow__thumb { position: relative; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; overflow: hidden; color: #fff; flex: none; }
.jrow__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.jrow__thumb .face { position: absolute; right: 2px; bottom: 2px; width: 20px; height: 20px; border: 2px solid #fff; font-size: 10px; }
.jrow__main { flex: 1; min-width: 0; }
.jrow__main b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jrow__main span { font-size: 13px; color: var(--ink-2); }
.jrow__media { display: flex; gap: 4px; color: var(--violet-d); }
.jrow__media .ic { width: 16px; height: 16px; }
.latest-badge { padding: 3px 8px; border-radius: 999px; background: var(--sun); font-size: 11px; font-weight: 800; }
.basecamp-tools { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; margin-top: 8px; border-top: 1.5px solid var(--line); }

/* ---------- family ---------- */
.ftabs { display: flex; gap: 8px; padding: 0 16px; }
.ftabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; padding: 8px 0 10px; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1.5px var(--line); font: 700 13px 'Figtree', sans-serif; color: var(--ink); }
.ftabs button[aria-selected="true"] { background: var(--violet-50); box-shadow: inset 0 0 0 2.5px var(--violet); color: var(--violet-d); font-weight: 800; }
.ftabs .face { width: 46px; height: 46px; }
.fhero { position: relative; margin: 16px 16px 0; padding: 20px 18px 18px; border-radius: 28px; background: linear-gradient(150deg, #6C3BFF 0%, #8B5CF6 60%, #B57BFF 100%); color: #fff; overflow: hidden; }
.fhero::before { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.12); }
.fhero__top { position: relative; display: flex; align-items: center; gap: 16px; }
.fhero .face { width: 84px; height: 84px; border: 4px solid #fff; font-size: 34px; box-shadow: 0 8px 20px rgba(21,18,58,.3); }
.fhero h3 { margin: 0; font: 800 30px/1 'Bricolage Grotesque', sans-serif; }
.fhero p { margin: 6px 0 0; font-size: 14px; font-weight: 600; }
.fhero__stats { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.fhero__stats div { padding: 12px 6px; border-radius: 18px; background: rgba(255,255,255,.16); text-align: center; }
.fhero__stats b { display: block; font: 800 28px/1 'Bricolage Grotesque', sans-serif; }
.fhero__stats span { font-size: 12px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips .vtag { position: static; padding: 6px 12px 6px 6px; background: #fff; box-shadow: 0 0 0 1.5px var(--line); font-size: 14px; }
.chips .vflag { width: 28px; height: 28px; font-size: 11px; }
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pgrid button { display: block; padding: 0; border: 0; border-radius: 20px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1.5px var(--line); text-align: left; font: inherit; color: var(--ink); }
.pgrid__img { position: relative; display: grid; place-items: center; height: 100px; color: #fff; }
.pgrid__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pgrid button > span:last-child { display: block; padding: 10px 12px; }
.pgrid b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pgrid small { font-size: 12px; color: var(--ink-2); }
.bars { padding: 6px 14px; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1.5px var(--line); }
.bars > div { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.bars .face { width: 32px; height: 32px; font-size: 13px; }
.bars b { width: 76px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars .track { flex: 1; height: 12px; border-radius: 12px; background: var(--bg); }
.bars .track i { display: block; height: 100%; border-radius: 12px; background: var(--c); }
.bars em { width: 22px; text-align: right; font: 800 16px 'Bricolage Grotesque', sans-serif; font-style: normal; }
.family-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.family-actions label.vbtn { cursor: pointer; }

/* ---------- stamps ---------- */
.stampsum { display: flex; align-items: center; gap: 16px; margin: 4px 16px 0; padding: 16px; border-radius: 26px; background: linear-gradient(135deg, #15123A, #3B2A8F); color: #fff; }
.stampsum h3 { margin: 0; font: 800 22px/1.1 'Bricolage Grotesque', sans-serif; }
.stampsum p { margin: 6px 0 0; font-size: 14px; line-height: 1.4; }
.vstamps { list-style: none; margin: 16px 16px 0; padding: 0; }
.vstampcard { display: block; width: 100%; font: inherit; border: 0; cursor: pointer; }
.vstampcard.locked { cursor: default; }
.vstampcard .face { width: 20px; height: 20px; font-size: 10px; }

/* ---------- postcard ---------- */
.card { position: fixed; z-index: 600; inset: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; pointer-events: auto; }
.card::-webkit-scrollbar { display: none; }
.card__track { display: flex; flex-direction: column; justify-content: flex-end; min-height: 100%; }
.card__spacer { flex: 1 0 34vh; }
.card__frame { position: relative; flex: none; max-height: calc(100vh - var(--st) - 12px); max-height: calc(100dvh - var(--st) - 12px); display: flex; flex-direction: column; background: #fff; border-radius: 28px 28px 0 0; box-shadow: 0 -10px 40px rgba(21,18,58,.18); animation: rise .3s cubic-bezier(.2,.9,.3,1.1); }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.card__inner { flex: 1; min-height: 0; overflow-y: hidden; overscroll-behavior: auto; padding-bottom: calc(var(--sb) + 96px); }
.card__inner.can-scroll { overflow-y: auto; }
.card .vgrab { margin-top: 10px; }
.card .vhero img { height: 250px; }
.card .vvideo { margin-top: 16px; }
.card .vvideo button.facade { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; }
.card .vvideo iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vhero__close { position: absolute; z-index: 3; top: 12px; right: 12px; }
.voicehero { position: relative; margin: 12px 14px 0; padding: 16px 18px; border-radius: 24px; background: linear-gradient(135deg, #FF5A4E 0%, #FF8A3D 55%, #FFC83D 100%); color: var(--ink); overflow: hidden; }
.voicehero .bigwave { display: flex; align-items: center; justify-content: space-between; height: 64px; margin-top: 10px; }
.voicehero .bigwave i { width: 5px; border-radius: 4px; background: rgba(255,255,255,.5); }
.voicehero .bigwave i.on { background: #fff; }
.voicehero__row { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.voicehero__btn { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; border: 0; padding: 0; background: #fff; color: var(--coral-d); box-shadow: 0 4px 0 rgba(21,18,58,.25); flex: none; }
.vb .voicehero__btn { color: var(--coral-d); }
.voicehero__row b { display: block; font: 800 19px 'Bricolage Grotesque', sans-serif; }
.voicehero__row span { font-size: 14px; font-weight: 700; }
.vvoice__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; }
.wave i { cursor: pointer; }
.nextstop { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 22px; padding: 12px; border: 0; border-radius: 22px; background: var(--bg); color: var(--ink); text-align: left; font: inherit; }
.nextstop .thumb { position: relative; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; overflow: hidden; color: #fff; flex: none; }
.nextstop .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nextstop b { display: block; font: 800 17px/1.15 'Bricolage Grotesque', sans-serif; }
.nextstop span span { font-size: 13px; color: var(--ink-2); }
.cardfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.sample { font-size: 12px; font-weight: 800; color: var(--ink-2); background: var(--bg); border-radius: 8px; padding: 3px 8px; }
.card .vbar { position: fixed; z-index: 2; padding-bottom: calc(var(--sb) + 14px); }
.follow-bar { position: fixed; z-index: 3; left: 0; right: 0; bottom: calc(var(--sb) + 74px); height: 4px; background: var(--line); display: none; }
.is-playing .follow-bar { display: block; }
.follow-bar i { display: block; height: 100%; width: 0; background: var(--violet); }
.lightbox { position: fixed; inset: 0; z-index: 900; background: rgba(21,18,58,.94); display: grid; place-items: center; padding: 20px; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 16px; }
.lightbox .vclose { position: fixed; top: calc(var(--st) + 14px); right: 14px; }

/* ---------- toasts, empty, dialogs ---------- */
.toast { position: fixed; z-index: 1000; left: 50%; top: calc(var(--st) + 16px); transform: translate(-50%, calc(-100% - 40px)); visibility: hidden; max-width: min(440px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 18px; background: var(--ink); color: #fff; font-weight: 700; box-shadow: 0 10px 30px rgba(21,18,58,.3); transition: transform .3s cubic-bezier(.2,.9,.3,1.2); }
.toast.is-on { transform: translate(-50%, 0); visibility: visible; }
.toast.is-error { background: var(--coral-d); }
.empty { position: fixed; z-index: 480; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(320px, calc(100vw - 48px)); padding: 22px; text-align: center; background: #fff; border-radius: 24px; box-shadow: 0 10px 30px rgba(21,18,58,.14); }
.empty h2 { margin: 0 0 6px; font: 800 22px/1.1 'Bricolage Grotesque', sans-serif; }
.empty p { margin: 0; color: var(--ink-2); }
.ask { position: fixed; inset: 0; z-index: 1300; background: rgba(21,18,58,.45); }
.ask .vdialog { position: fixed; max-width: 420px; margin: 0 auto; bottom: calc(var(--sb) + 10px); }
.ask__icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 22px; background: #FFE6E3; color: var(--coral-d); }
.ask__icon .ic { width: 30px; height: 30px; }
.celebrate { position: fixed; inset: 0; z-index: 1200; display: flex; flex-direction: column; justify-content: space-between; padding: calc(var(--st) + 70px) 16px calc(var(--sb) + 24px); background: linear-gradient(170deg, #6C3BFF 0%, #8B5CF6 45%, #FF8A6B 100%); color: #fff; text-align: center; overflow: hidden; }
.celebrate svg.sticker { width: 170px; height: 170px; margin: 0 auto; filter: drop-shadow(0 12px 20px rgba(21,18,58,.3)); animation: pop .6s cubic-bezier(.2,.9,.3,1.4); }
@keyframes pop { from { transform: scale(.3) rotate(-30deg); opacity: 0; } }
.celebrate h2 { margin: 12px 8px 0; font: 800 32px/1.05 'Bricolage Grotesque', sans-serif; }
.celebrate p { margin: 10px 16px 0; font-size: 16px; line-height: 1.5; }
.celebrate .pill { display: inline-block; margin-top: 20px; padding: 5px 12px; border-radius: 999px; background: var(--sun); color: var(--ink); font-size: 13px; font-weight: 800; }
.celebrate .actions { display: grid; gap: 10px; width: 100%; max-width: 420px; margin: 0 auto; }
.confetti { position: absolute; pointer-events: none; }
.posted { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; pointer-events: none; }
.posted span { padding: 14px 26px; border-radius: 24px; background: var(--mint); color: #fff; font: 800 28px 'Bricolage Grotesque', sans-serif; box-shadow: 0 6px 0 var(--mint-d); animation: pop .5s cubic-bezier(.2,.9,.3,1.4); }

/* ---------- desktop: left panel, map, postcard on the right ---------- */
@media (min-width: 900px) {
  .side { display: flex; position: fixed; z-index: 500; left: 16px; top: 16px; bottom: 16px; width: 360px; flex-direction: column; background: #fff; border-radius: 28px; box-shadow: 0 16px 40px rgba(21,18,58,.18); overflow: hidden; }
  .status { position: static; box-shadow: none; border-radius: 0; padding: 16px 18px 8px; }
  .tabs { display: flex; gap: 6px; padding: 4px 18px 10px; }
  .tabs button { flex: 1; min-height: 38px; border: 0; border-radius: 12px; background: var(--bg); color: var(--ink-2); font: 700 14px 'Figtree', sans-serif; }
  .tabs button[aria-selected="true"] { background: var(--violet-50); color: var(--violet-d); box-shadow: inset 0 0 0 2px var(--violet); }
  .viewbody { display: block; position: static; flex: 1; min-height: 0; padding: 0 0 12px; background: #fff; border-top: 1.5px solid var(--line); }
  .viewbody .viewhead { display: none; }
  .viewbody .vstamps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .viewbody .fhero h3 { font-size: 26px; }
  .sideplay { display: grid; gap: 8px; padding: 12px 18px 18px; border-top: 1.5px solid var(--line); }
  .peek, .vnav { display: none !important; }
  body.view-open .status { display: block; }
  body.view-open .filter { display: flex; }
  .filter { top: 16px; right: auto; left: calc(50% + 0px); transform: translateX(-50%); flex-direction: row; align-items: center; padding: 6px 14px 6px 6px; border-radius: 999px; }
  .filter button { width: 34px; height: 34px; }
  .filter button .face { width: 34px; height: 34px; }
  .filter__label { display: block; margin-left: 4px; font-size: 13px; font-weight: 800; }
  .card { inset: 16px 16px 16px auto; width: 400px; overflow: hidden; border-radius: 28px; pointer-events: none; }
  .card__track { display: contents; }
  .card__spacer { display: none; }
  .card__frame { height: 100%; max-height: none; border-radius: 28px; pointer-events: auto; box-shadow: 0 16px 40px rgba(21,18,58,.2); }
  .card__inner, .card__inner.can-scroll { overflow-y: auto; padding-bottom: 12px; }
  .card .vgrab { display: none; }
  .card .vbar { position: static; border-radius: 0 0 28px 28px; padding-bottom: 16px; pointer-events: auto; }
  .card .follow-bar { position: absolute; bottom: 72px; }
  .leaflet-top.leaflet-right { top: 16px; right: auto; left: 392px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ======================= Basecamp ======================= */
.sheet { position: fixed; inset: 0; z-index: 800; background: rgba(21,18,58,.45); display: flex; flex-direction: column; }
.vform { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--bg); padding-top: var(--st); }
.vform .vh { padding: 14px 16px 6px; }
.vform__body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 32px; padding: 12px 16px 24px; }
.vgroup { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.vgh { margin: 0; font: 800 17px/1.2 'Bricolage Grotesque', sans-serif; }
.vgh-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.vform__foot { padding: 12px 16px calc(var(--sb) + 16px); background: var(--bg); border-top: 1.5px solid var(--line); }
.form-err { margin: 0 0 10px; color: var(--coral-d); font-weight: 700; }
.form-err:empty { display: none; }
.vwho button { cursor: pointer; }
.vwho .face { width: 52px; height: 52px; font-size: 22px; }
.vloc { overflow: visible; }
.vloc__map { border-radius: 20px 20px 0 0; }
#miniMap { position: absolute; inset: 0; }
.vloc__map .vadjust { z-index: 500; pointer-events: none; }
.vloc .vrow { position: relative; }
.vrow__input { display: block; width: 100%; min-height: 28px; padding: 0; border: 0; outline: 0; background: none; font: 700 16px 'Figtree', sans-serif; color: var(--ink); }
.vrow small button { font-size: 13px; }
.search { position: relative; }
.suggest { position: absolute; z-index: 30; left: -50px; right: -6px; top: calc(100% + 10px); max-height: 300px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; background: #fff; border-radius: 20px; box-shadow: 0 16px 40px rgba(21,18,58,.22), 0 0 0 1.5px var(--line); }
.suggest button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 14px; background: none; text-align: left; font: inherit; color: var(--ink); }
.suggest button:hover, .suggest button.is-active { background: var(--violet-50); }
.suggest strong { display: block; font-weight: 800; }
.suggest small { display: block; font-size: 13px; color: var(--ink-2); }
.suggest .suggest__msg { padding: 10px 12px; font-size: 14px; color: var(--ink-2); }
.vmrow label.vbtn { cursor: pointer; }
.vmrow .vinput { min-height: 46px; }
.vmrow.is-rec .vmrow__ic { animation: recpulse 1.2s ease-in-out infinite; }
@keyframes recpulse { 50% { box-shadow: 0 0 0 7px rgba(255,90,78,.25); } }
.vradio { width: 100%; border: 0; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.vradio:not(.on) i .ic { display: none; }
.vpick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.vpick .vinput { flex: 1 1 200px; border: 0; }
.vb .vinput { font: 600 16px 'Figtree', sans-serif; color: var(--ink); }
body.sheet-open .vnav, body.sheet-open .peek { display: none; }
@media (min-width: 900px) {
  .sheet { align-items: center; justify-content: center; padding: 24px; }
  .vform { flex: 0 1 auto; width: 600px; max-height: calc(100vh - 48px); border-radius: 28px; overflow: hidden; box-shadow: 0 20px 50px rgba(21,18,58,.3); padding-top: 0; }
  .vform__foot { border-radius: 0 0 28px 28px; }
}

/* login */
.gate { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 20px; background: linear-gradient(170deg, #6C3BFF 0%, #8B5CF6 50%, #FF8A6B 100%); }
.gate__card { width: min(380px, 100%); padding: 28px 22px 20px; border-radius: 30px; background: #fff; text-align: center; box-shadow: 0 20px 50px rgba(21,18,58,.3); }
.gate__icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 22px; background: var(--violet-50); color: var(--violet-d); }
.gate__card h1 { margin: 12px 0 6px; font: 800 28px/1.1 'Bricolage Grotesque', sans-serif; }
.gate__card p { margin: 0 0 16px; color: var(--ink-2); }
.gate__input { display: block; width: 100%; min-height: 52px; margin-bottom: 12px; padding: 0 16px; border: 0; border-radius: 16px; background: var(--bg); box-shadow: inset 0 0 0 2px var(--line); font: 600 17px 'Figtree', sans-serif; color: var(--ink); }
.gate__input:focus { outline: 0; box-shadow: inset 0 0 0 2.5px var(--violet), 0 0 0 5px rgba(108,59,255,.14); }
.gate__err { min-height: 1.4em; margin: 10px 0 4px !important; color: var(--coral-d) !important; font-weight: 700; }
.vb .vclose { color: var(--ink); }

/* ---------- Round 2 fixes ---------- */
/* country filter: flag on top, count underneath; tiles wrap onto new rows, so any number of countries fits */
.flag { display: block; flex: none; border-radius: 5px; object-fit: cover; box-shadow: 0 0 0 1px rgba(21,18,58,.12); background: #fff; }
.vtag .flag { border-radius: 4px; }
.vtag:has(.flag) { padding-left: 6px; }
.chips .vtag .flag { width: 28px; height: 21px; }
.ctiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 8px; padding: 4px 16px 6px; }
.ctile { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; padding: 10px 4px 8px; border: 0; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); font: 800 15px/1 'Figtree', sans-serif; color: var(--ink); cursor: pointer; }
.vb .ctile { color: var(--ink); }
.ctile.on { background: var(--violet-50); box-shadow: inset 0 0 0 2px var(--violet); }
.vb .ctile.on { color: var(--violet-d); }
.ctile__all { display: grid; place-items: center; width: 36px; height: 27px; border-radius: 5px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 800; }

/* family filter: one simple coloured border per face */
.filter button { width: auto; height: auto; box-shadow: none !important; border-radius: 50%; }
.filter button .face { border: 3px solid var(--c); box-sizing: border-box; }
.filter button[aria-pressed="false"] .face { border-color: var(--line); }

/* journey: each postcard is its own card, with clear day groups and bigger media icons */
.daylist { padding: 0 16px 12px; }
.daylist > li + li { margin-top: 10px; }
.daylist h4 { padding: 14px 4px 8px; font-size: 14px; }
.jrow { background: #fff; box-shadow: 0 0 0 1.5px var(--line); border-radius: 20px; padding: 10px; }
.jrow + .jrow { margin-top: 8px; }
.jrow:hover { background: #fff; box-shadow: 0 0 0 2px #CFC5F5; }
.jrow__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.jrow__media { gap: 6px; }
.jrow__media span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--violet-50); color: var(--violet-d); }
.jrow__media .ic { width: 20px; height: 20px; }

/* postcards without a photo show a map of where they were posted */
.maphero { position: relative; height: 200px; margin: 12px 14px 0; border-radius: 22px; overflow: hidden; background: #DCEBFA; }
.maphero__map { position: absolute; inset: 0; pointer-events: none; }
.maphero .vtag { z-index: 500; }
.maphero .vhero__close { z-index: 600; }

@media (min-width: 900px) {
  .viewbody { padding-top: 16px; scrollbar-gutter: stable; }
  .filter button .face { width: 34px !important; height: 34px !important; font-size: 14px !important; }
}

/* ---------- Round 3 ---------- */
/* timeline: one notch per city, labelled with its dates */
.tl li { width: 104px; }
.tl b { max-width: 98px; }
.tl small { white-space: nowrap; }
.tl .now small { padding: 1px 7px; border-radius: 999px; background: var(--ink); color: #fff; }

/* new-stamp celebration: stacked like the design, with falling confetti */
.celebrate { justify-content: space-between; }
.celebrate__body { position: relative; z-index: 1; }
.celebrate svg.sticker { display: block; margin: 0 auto; }
.celebrate .pill { margin-top: 22px; }
.celebrate .actions { position: relative; z-index: 1; }
.celebrate .vclose { z-index: 2; }
.confetti { position: absolute; top: -30px; z-index: 0; opacity: .95; animation: confetti-fall 4s linear infinite; will-change: transform; }
@keyframes confetti-fall {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(var(--drift), 55vh, 0) rotate(calc(var(--spin) / 2)); }
  100% { transform: translate3d(calc(var(--drift) * -0.5), 115vh, 0) rotate(var(--spin)); }
}
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }

/* ---------- Round 4 ---------- */
/* the country chip on a photo is a small flag, never stretched to the photo's size */
.card .vhero img { height: 250px; }
.vhero .vtag img.flag, .maphero .vtag img.flag { display: block; width: 22px; height: 16px; object-fit: cover; border-radius: 4px; }
/* map previews for postcards without a photo */
.mthumb { position: absolute; inset: 0; overflow: hidden; background: #DCEBFA; }
.mthumb__tiles { position: absolute; left: 50%; top: 50%; width: 512px; height: 512px; }
.mthumb__tiles img { position: absolute; width: 256px !important; height: 256px !important; max-width: none; object-fit: fill !important; }
.mthumb__pin { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(21,18,58,.35); }
.pgrid__img .mthumb__pin { width: 18px; height: 18px; margin: -9px 0 0 -9px; }
.peekcard__ic .mthumb__pin { width: 10px; height: 10px; margin: -5px 0 0 -5px; border-width: 2px; }
.jrow__thumb .face { z-index: 2; }

/* ---------- Round 5 ---------- */
/* initials on faces are always white (the author line's grey text colour was leaking in) */
.vb span.face { color: #fff; }
/* stamp cards: every card in a row is the same height */
.vstamps > li { display: flex; }
.vstamps > li.vstampcard { display: block; }
.vstamps > li > .vstampcard, .vstamps > li.vstampcard { flex: 1; }
.vstampcard.locked small { line-height: 1.35; padding: 0 6px; text-align: center; }
/* stamps summary: a stamp sliding in and out of an envelope */
.envslot { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; background: rgba(255,255,255,.1); flex: none; }
.envelope { width: 84px; height: 84px; overflow: visible; }
.envelope__stamp { transform-box: fill-box; transform-origin: 50% 100%; animation: stamp-out 3.2s cubic-bezier(.3,.9,.3,1) infinite; }
@keyframes stamp-out {
  0%, 12% { transform: translateY(30px) rotate(0deg); }
  38%, 70% { transform: translateY(-6px) rotate(-8deg); }
  88%, 100% { transform: translateY(30px) rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) { .envelope__stamp { animation: none; transform: translateY(-6px) rotate(-8deg); } }

/* ---------- Round 6 ---------- */
.vstampcard svg { width: 72px; height: 72px; }
/* softened map styles (see assets/styles.js) */
.tiles-soft { filter: saturate(.72) brightness(1.06) contrast(.95); }
.tiles-pastel { filter: saturate(.5) brightness(1.14) contrast(.9) hue-rotate(-8deg); }

/* ---------- Round 7 (from the updated designs) ---------- */
/* country tiles: flag on the left, count beside it */
.ctile { flex-direction: row; align-items: center; gap: 0; padding: 4px; border-radius: 10px; }
.ctile b { flex: 1; text-align: center; }
/* journey rows: media icons sit right after the traveller and time */
.jrow__meta { display: flex; align-items: center; gap: 4px; min-width: 0; }
.jrow__meta > span:first-child { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jrow__media { display: inline-flex; gap: 4px; margin-left: 4px; color: var(--violet-d); flex: none; }
.jrow__media span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 10px; background: none; color: var(--violet-d); }
.jrow__media .ic { width: 20px; height: 20px; }
/* postcard author tile: a warm panel that separates who posted from what they posted */
.authortile { padding: 12px 12px 12px 14px; border-radius: 20px; background: #FDF4EA; }
.authortile b { font-size: 16px; }
.authortile .vround { background: #fff; }
.authortile + .vtitle { margin-top: 26px; }

/* date tile: keep the day and month close together; the tile stays the same size */
.datetile { align-content: center; gap: 0; line-height: 1; }
.datetile small { margin-top: 2px; line-height: 1; }

/* ---------- Round 8 ---------- */
/* illustrated place scene for postcards without a photo */
.scenehero { background: #D6EEFF; }
.scenehero svg.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* postcard bottom bar: Earlier, count and Later grouped on the left; Play all on the right */
.card .vbar { justify-content: space-between; }
.vbar__nav { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vbar__nav .vbar__count { flex: none; min-width: 64px; }

/* ---------- Round 9: calmer phone screen ---------- */
/* phones: no floating family filter and no bottom cards; everyone's postcards show by default */
@media (max-width: 899px) {
  .filter, .peek { display: none !important; }
}
/* moving between postcards doesn't replay the slide-up, so the footer never flickers */
.card.is-stepping .card__frame { animation: none; }
/* Journal: more room in the header and around the country tiles */
.viewhead { padding: 18px 16px 14px; }
.ctiles { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; padding: 2px 16px 16px; }
.ctile { padding: 5px 12px 5px 5px; gap: 10px; border-radius: 12px; }
.ctile b { flex: 1; min-width: 22px; font-size: 17px; text-align: center; }
.daylist h4 { padding-top: 12px; }
@media (min-width: 900px) { .ctiles { padding-top: 0; } }
/* login: illustrated treasure chest */
.gate__icon { width: 112px; height: 96px; border-radius: 28px; background: #FFF4D6; }
.gate__icon svg { display: block; }
