@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,800&family=Inter:wght@400;500;600&display=swap');

:root {
  --pine: #183B2F;
  --pine-2: #22513F;
  --ground: #FBFAF7;
  --sand: #F2EEE4;
  --line: #E4E0D6;
  --muted: #55645C;
  --ember: #E8692C;
  --flame: #F6C45A;
  --ember-tint: #FFF4EC;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Inter, system-ui, sans-serif; background: var(--ground); color: var(--pine); -webkit-font-smoothing: antialiased; }
a { color: var(--pine); }
button { font: inherit; cursor: pointer; color: inherit; }
input, select, textarea { font: inherit; color: var(--pine); }
h1, h2, .display { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; margin: 0; }

.wrap { max-width: 520px; margin: 0 auto; padding: 16px 20px 110px; }
.brand { font-family: var(--display); font-weight: 800; font-size: 18px; text-decoration: none; }
.brand:has(.brand-mark) { display: inline-flex; align-items: center; gap: 8px; }
.brand-mark { display: inline-flex; flex: none; }
.eyebrow { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.muted { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.field input, .field select, .field textarea {
  min-height: 48px; border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; background: #fff;
}
.field textarea { padding: 12px 14px; min-height: 64px; resize: vertical; }
.field input.big { font-family: var(--display); font-weight: 800; font-size: 22px; border: 2px solid var(--pine); }

.btn { min-height: 52px; border-radius: 16px; border: none; padding: 0 18px; font-family: var(--display); font-weight: 800; font-size: 17px; }
.btn-primary { background: var(--pine); color: #fff; }
.btn-ember { background: var(--ember); color: #1a1a1a; }
.btn-quiet { background: #fff; border: 1px solid var(--line); color: var(--pine); font-family: Inter, sans-serif; font-weight: 600; font-size: 14px; min-height: 44px; }
.btn[disabled] { opacity: 0.5; cursor: default; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips .label { font-size: 13px; width: 60px; }
.chip { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid #D5D0C4; background: #fff; font-size: 13px; font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--pine); border-color: var(--pine); color: #fff; }

.meter { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.meter button { min-height: 70px; border-radius: 14px; border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 4px; font-size: 11px; font-weight: 600; line-height: 1.15; text-align: center; }
.meter button[aria-pressed="true"] { border: 2px solid var(--ember); background: var(--ember-tint); }

.place { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.place[aria-pressed="true"] { border: 2px solid var(--pine); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--sand); border-radius: 14px; padding: 10px 12px; }
.stat b { display: block; font-family: var(--display); font-size: 22px; }
.stat span { font-size: 12px; color: var(--muted); }

.stay { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #ECE8DE; }
.stay .grow { flex: 1; min-width: 0; }
.stay .fires { display: flex; align-items: flex-start; gap: 4px; flex: none; }
.stay .kid-fire { display: flex; flex-direction: column; align-items: center; margin-top: 4px; }
.stay .kid-fire small { font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1; }
.stay .site { font: 700 12px var(--display); color: var(--muted); background: var(--sand); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.stay-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.stay-title .stay-link { flex: 1; min-width: 0; }
.stay-title .site { margin-top: 1px; }
.stay-title b { font-size: 17px; line-height: 1.25; }
.stay-line { font-size: 13px; margin-top: 2px; }
.stay-note { font-size: 14px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.stay .fires-wrap { flex: none; }
.stay.trad .trad-bars { margin-top: 8px; }
/* On a phone the row is for reading; Edit and delete live on the stay page. */
@media (max-width: 899px) { #stay-list .stay .acts { display: none; } }

#map { height: 44vh; min-height: 280px; border-radius: 0 0 24px 24px; }
.map-full { margin: -16px -20px 0; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; align-items: center; padding: 8px 12px calc(12px + env(safe-area-inset-bottom)); background: var(--ground); border-top: 1px solid #ECE8DE; }
.tabbar button { min-width: 72px; min-height: 44px; border: none; background: none; font-size: 12px; font-weight: 600; color: var(--muted); }
.tabbar button[aria-current="page"] { color: var(--pine); }
.tabbar .add { width: 58px; height: 58px; border-radius: 18px; background: var(--ember); color: #1a1a1a; font-size: 30px; line-height: 1; margin-top: -20px; }

.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); background: var(--pine); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.want-pin { width: 20px; height: 20px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: #fff; border: 2.5px dashed var(--pine); box-sizing: border-box; }
.want-icon { width: 30px; flex: none; display: flex; justify-content: center; padding-top: 4px; }
.want-icon .want-pin { width: 16px; height: 16px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
details summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }

/* ---------- App shell: phone top bar + tab bar; desktop sidebar ---------- */
.app h1 { font-size: 26px; }
.app .page-title { font-size: 30px; }
.rail { display: none; }
.topbar { display: flex; justify-content: space-between; align-items: center; max-width: 520px; margin: 0 auto; padding: 8px 20px 0; }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--pine); color: var(--flame); display: grid; place-items: center; font: 800 16px var(--display); text-transform: uppercase; }
.avatar-btn { border: none; background: none; padding: 2px; min-width: 44px; min-height: 44px; display: grid; place-items: center; border-radius: 50%; }
.avatar-btn[aria-current="page"] .avatar { box-shadow: 0 0 0 3px var(--flame); }
.grow { flex: 1; min-width: 0; }

/* Map home */
.home { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.hello { display: flex; flex-direction: column; gap: 14px; }
.hello-sub { margin: 4px 0 0; }
.hello-sub:empty { display: none; }
.home-trips { display: none; }
.home-trips h2 { font-size: 22px; }

.stay .fire { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--sand); display: grid; place-items: center; }
.stay[data-id] { cursor: pointer; }
.stay .acts { display: flex; gap: 6px; align-self: center; }
.stay .acts button { border-radius: 12px; padding: 0 12px; }
.pin-on { z-index: 2; }
.pin-dim > * { opacity: .25; transition: opacity .2s; }  /* MapLibre sets opacity on the marker itself, so fade its insides */
.pin-on > div { box-shadow: 0 0 0 4px rgba(232,105,44,.45); transform: rotate(-45deg) scale(1.25) !important; }

/* Trip cards */
.trip-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.trip-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; }
.trip-card .mini { display: block; width: 100%; height: 120px; background: #E6EDDF; }
.trip-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.trip-card h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; font-size: 20px; margin: 0; line-height: 1.15; }
.trip-card .fires { display: flex; gap: 4px; flex-wrap: wrap; }
.trip-card .fires span { width: 34px; height: 34px; border-radius: 10px; background: var(--sand); display: grid; place-items: center; }
.trip-card .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.trip-card .acts .btn { text-decoration: none; display: inline-flex; align-items: center; }
.btn-quiet.btn-dark { background: var(--pine); color: #fff; border-color: var(--pine); }

/* Trips toolbar, grouped lists, dense rows */
.trip-bar { display: flex; flex-direction: column; gap: 10px; }
.tb-row { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.tb-sel { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.tb-sel select { min-height: 36px; border-radius: 999px; padding: 0 10px; font-size: 13px; }
.tb-count { margin-left: auto; font-size: 13px; }
.trip-group { border-top: 1px solid var(--line); padding: 4px 0; }
.trip-group > summary { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; min-height: 44px; cursor: pointer; list-style: none; padding: 8px 2px; }
.trip-group > summary::-webkit-details-marker { display: none; }
.trip-group > summary::before { content: "\25B8"; color: var(--muted); width: 14px; }
.trip-group[open] > summary::before { content: "\25BE"; }
.tg-title { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; font-size: 19px; }
.trip-group .trip-grid, .trip-group .trip-rows { margin: 4px 0 14px; }
.trip-rows { display: flex; flex-direction: column; }
.tc-photos { display: grid; gap: 2px; height: 160px; background: #E6EDDF; }
.tc-photos img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 0; }
.tc-1 { grid-template-columns: 1fr; }
.tc-2 { grid-template-columns: 1fr 1fr; }
.tc-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.tc-3 img:first-child { grid-row: 1 / 3; }
.tl { color: inherit; text-decoration: none; }
.tl:hover { text-decoration: underline; }
.tc-link { display: block; color: inherit; }
a.tr-thumb { text-decoration: none; }
.tr-thumb { position: relative; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; background: var(--sand); flex: none; display: grid; place-items: center; }
.tr-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tr-thumb span { position: absolute; right: 3px; bottom: 3px; background: rgba(24,59,47,.85); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 0 6px; line-height: 18px; }
.tg-strip { display: inline-flex; margin-left: auto; }
.tg-strip img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; border: 2px solid var(--ground, #FBFAF7); margin-left: -8px; }
.trip-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: 6px 14px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.tr-main { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.tr-main b { font-family: var(--display); font-size: 16px; overflow-wrap: anywhere; }
.tr-main .muted { font-size: 12px; }
.tr-fires { display: flex; gap: 2px; }
.tr-acts { display: flex; gap: 6px; }
.tr-acts .btn { border-radius: 12px; padding: 0 12px; text-decoration: none; display: inline-flex; align-items: center; }
@media (max-width: 640px) { .trip-row { grid-template-columns: 56px minmax(0, 1fr); } .tr-fires, .tr-acts { grid-column: 2; } .tr-fires { order: 2; } .tb-count { margin-left: 0; } }

/* Log a stay */
.sheet { display: flex; flex-direction: column; gap: 14px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sheet-head h1 { font-size: 30px; }
.sheet-close { display: none; }
.add-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.add-when { flex-wrap: wrap; }
.add-when .field:first-child { flex-basis: 100%; }

/* You */
.who { display: flex; gap: 16px; align-items: center; }
.avatar-big { width: 80px; height: 80px; font-size: 32px; }
.who h1 { font-size: 28px; overflow-wrap: anywhere; }
.who-nums { display: flex; gap: 14px; font-size: 14px; margin-top: 4px; }
.who-nums b { font-family: var(--display); }
.group h2 { margin: 0 0 6px 4px; font-family: Inter, sans-serif; letter-spacing: 0.06em; }
.rows { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.r { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 10px 16px; }
.r + .r { border-top: 1px solid #EFEBE2; }
.r b { font-weight: 600; }
.r small { display: block; color: var(--muted); font-size: 13px; }
.r-val { font-size: 14px; }
.r-field { flex-wrap: wrap; }
.r-field label { flex: 1 1 200px; }
.r-field input { flex: 1 1 200px; min-height: 48px; border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; background: #fff; }
.switch { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; flex: none; border-radius: 999px; background: #7C8A82; position: relative; cursor: pointer; margin: 0; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .2s; }
.switch:checked { background: var(--pine); }
.switch:checked::after { left: 23px; }
.invite-row { flex-wrap: wrap; align-items: stretch; }
.invite-row .field { flex: 1 1 200px; }
.sign-out { width: 100%; background: #fff; border: 1px solid var(--line); color: #B4441A; }

@media (min-width: 900px) {
  body.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100%; height: auto; }
  .app .topbar, .app .tabbar { display: none; }
  .rail { display: flex; flex-direction: column; gap: 6px; padding: 22px 16px; border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; }

  .rail-log { width: 100%; margin: 0 0 14px; display: flex; align-items: center; justify-content: center; gap: 8px; }
  .rail-log span { font-size: 24px; line-height: 1; }
  .rail-nav { display: flex; flex-direction: column; gap: 4px; }
  .rail-nav button { min-height: 44px; text-align: left; padding: 0 12px; border: none; border-radius: 12px; background: none; font-weight: 600; color: var(--muted); }
  .rail-nav a.nav-btn { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 12px; font-weight: 600; color: var(--muted); text-decoration: none; }
  .rail-nav button:hover, .rail-nav a.nav-btn:hover { color: var(--pine); }
  .rail-nav button[aria-current="page"] { background: var(--sand); color: var(--pine); }
  .rail-me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 8px; border: none; border-radius: 14px; background: none; text-align: left; font-size: 14px; }
  .rail-me .grow > * { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rail-me:hover, .rail-me[aria-current="page"] { background: var(--sand); }

  .main { min-width: 0; }
  .app .wrap { max-width: none; margin: 0; padding: 28px 36px 48px; }
  .app .wrap-wide { max-width: 1320px; }
  .app .wrap-mid { max-width: 1100px; }
  .app .wrap-narrow { max-width: 820px; padding-top: 48px; }
  .app h1 { font-size: 30px; }

  .home { grid-template-columns: minmax(0, 1fr) clamp(320px, 30vw, 420px); grid-template-areas: "hello hello" "map latest" "trips trips"; gap: 24px; }
  .hello { grid-area: hello; flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 24px; }
  .hello h1 { font-size: 40px; }
  .hello .stats { width: 420px; flex: none; }
  .home .map-full { grid-area: map; margin: 0; }
  .home #map { height: clamp(420px, calc(100vh - 220px), 680px); border-radius: 24px; }
  .latest { grid-area: latest; max-height: clamp(420px, calc(100vh - 220px), 680px); overflow-y: auto; padding-right: 4px; }
  .latest-head { position: sticky; top: 0; background: var(--ground); padding-bottom: 6px; z-index: 1; }
  .home-trips { grid-area: trips; display: flex; flex-direction: column; gap: 12px; }
  .trip-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .stay { padding: 12px 8px; border-radius: 16px; border-bottom-color: transparent; }
  .stay + .stay { border-top: 1px solid #ECE8DE; }
  .stay.is-on { background: #fff; box-shadow: 0 0 0 1px var(--line), 0 6px 18px rgba(24,59,47,.08); }
  .stay.is-on + .stay { border-top-color: transparent; }

  /* Log a stay becomes a sheet over whatever you were looking at. */
  .app #view-add { position: fixed; inset: 0; z-index: 30; max-width: none; margin: 0; padding: 32px; background: rgba(24,59,47,.45); display: grid; place-items: center; overflow-y: auto; }
  .app #view-add.hidden { display: none !important; }
  .sheet { background: var(--ground); border-radius: 28px; width: min(1000px, 100%); padding: 28px 32px; box-shadow: 0 30px 80px rgba(0,0,0,.25); gap: 18px; }
  .sheet-close { display: inline-flex; align-items: center; }
  .add-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .add-when { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr); }
  .add-when input { min-width: 0; width: 100%; }
  #cancel-edit { display: none; }
  .avatar-big { width: 104px; height: 104px; font-size: 40px; }
  .who h1 { font-size: 38px; }
  .toast { bottom: 32px; left: calc(50% + 118px); }
}
.trip-card .mini-empty { display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.bee-link { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px; border-radius: 16px; border: 1px solid var(--line); background: #fff; text-align: left; }
.bee-link .grow > * { display: block; }
.bee-link .muted { font-size: 13px; }
.nav-count { margin-left: 6px; font-weight: 500; }
@media (min-width: 900px) { .bee-link { display: none; } }
@media (min-width: 900px) { .bee-link.import-banner { display: flex; } }
.rail-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--pine); }
.rail-tag { font-size: 13px; color: var(--muted); margin: 0; }
.rail-tag:empty { display: none; }
@media (min-width: 900px) {
  .rail .rail-brand { margin: 0 8px; }
  .rail .rail-brand { font-size: 22px; }
  .rail .brand-mark svg { width: 32px; height: 32px; }
  .rail > .rail-tag { margin: 4px 8px 18px; line-height: 1.35; }
}

/* With a mouse, a stay's Edit / delete only show on hover or focus, so the list reads cleanly. */
@media (min-width: 900px) and (hover: hover) {
  .stay[data-id] { position: relative; }
  .stay .acts { position: absolute; top: 8px; right: 8px; opacity: 0; pointer-events: none; transition: opacity .15s; background: #fff; border-radius: 14px; padding: 4px; box-shadow: 0 4px 14px rgba(24,59,47,.12); }
  .stay:hover .acts, .stay:focus-within .acts { opacity: 1; pointer-events: auto; }
}
@media (min-width: 900px) and (max-width: 1199px) {
  .hello { flex-direction: column; align-items: stretch; gap: 14px; }
  .hello h1 { font-size: 32px; }
  .hello .stats { width: auto; }
}
.add-when input { min-width: 0; width: 100%; }
.add-when .field:not(:first-child) { flex: 1 1 0; }
.add-when .field { min-width: 0; }
#stay-list .stay .fires { width: 60px; }

/* Photo on Log a stay */
.photo-box { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1.5px dashed var(--line); border-radius: 16px; background: #fff; }
.photo-box .grow { flex: 1; min-width: 0; }
.photo-box p { margin: 4px 0 0; font-size: 13px; }
.photo-btn { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
.photo-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; flex: none; }
.photo-box.busy .photo-thumb { opacity: .7; }
.photo-progress { height: 8px; margin: 10px 0 2px; border-radius: 99px; background: var(--sand, #F2EEE4); overflow: hidden; }
.photo-progress span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #E8692C, #F6C45A); transition: width .5s ease; }
@media (prefers-reduced-motion: reduce) { .photo-progress span { transition: none; } }
.stay-photo { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; flex: none; align-self: flex-start; background: var(--sand); }
.trip-photo { width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; margin-top: 8px; }

/* Stay details page */
.stay-link { color: inherit; text-decoration: none; }
.stay-link:hover { text-decoration: underline; }
.pop-link { font-weight: 600; color: #B4440F; }  /* the brand ember is only 3.1:1 on white, too pale for small text */
.trip-card .fires a { width: 34px; height: 34px; border-radius: 10px; background: var(--sand); display: grid; place-items: center; }
.sd { display: flex; flex-direction: column; gap: 16px; }
.sd-back { align-self: flex-start; border-radius: 12px; padding: 0 14px; }
.sd-cols { display: flex; flex-direction: column; gap: 18px; }
.sd-side { display: contents; }
img.sd-photo { order: -1; }
.sd-photo-empty, .sd-soon { order: 1; }
.sd-title { font-size: 34px; line-height: 1.05; margin-top: 4px; }
.sd-site { font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--ember); margin-top: 6px; }
.sd-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px; background: var(--sand); }
.sd-photo-empty { border: 1.5px dashed var(--line); background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 16px; text-align: center; color: var(--muted); font-size: 14px; aspect-ratio: auto; min-height: 96px; }
.sd-photo-empty b { color: var(--pine); font-family: var(--display); font-size: 17px; }
.sd-rate { display: flex; flex-direction: column; gap: 14px; }
.sd-rate-row { display: flex; align-items: center; gap: 14px; }
.sd-rates.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sd-rates.two .sd-kid { padding: 0 0 0 14px; border-left: 1px solid var(--line); }
@media (max-width: 460px) { .sd-rates.two { grid-template-columns: 1fr; } .sd-rates.two .sd-kid { padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line); } }
.sd-fire { width: 64px; height: 56px; flex: none; border-radius: 16px; background: var(--sand); display: grid; place-items: center; }
.sd-verdict { display: block; font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.sd-note { margin: 6px 0 0; font-size: 17px; line-height: 1.4; }
.sd-private { background: var(--sand); border-style: dashed; }
.sd-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 7px 12px; border-radius: 999px; background: var(--sand); font-size: 14px; font-weight: 600; }
.sd-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.sd-facts:empty { display: none; }
.sd-facts div { display: flex; flex-direction: column; gap: 2px; }
.sd-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.sd-acts .btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border-radius: 14px; }
.sd-acts .btn-primary { flex: 1 1 100%; }
.sd-del { color: #B4441A; }
.sd-soon { background: transparent; border-style: dashed; }
.sd-soon p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
@media (min-width: 900px) {
  .sd-cols { flex-direction: row; align-items: flex-start; gap: 36px; }
  .sd-main { flex: 1 1 0; min-width: 0; }
  .pl-cols .sd-main { position: sticky; top: 16px; }
  .sd-side { display: flex; flex-direction: column; gap: 16px; flex: 1 1 0; min-width: 0; }
  img.sd-photo, .sd-photo-empty, .sd-soon { order: 0; }
  .sd-title { font-size: 44px; }
  .sd-acts .btn-primary { flex: none; }
}

/* Campgrounds we return to */
.pin-trad { position: relative; }
.pin-trad::after { content: ''; position: absolute; inset: -8px; border: 2px dashed var(--ember); border-radius: 50%; pointer-events: none; }
.pin-count { position: absolute; left: -14px; top: -14px; z-index: 1; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--pine); color: var(--flame); font: 800 12px/20px var(--display); text-align: center; pointer-events: none; }
.stay.trad .trad-badge, .badge-trad { background: var(--pine); color: var(--flame); font: 800 13px var(--display); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge-trad { display: inline-block; margin-top: 10px; font-size: 14px; padding: 6px 12px; }
.trad-bars { display: flex; align-items: flex-end; gap: 5px; margin-top: 8px; }
.trad-bars i { display: block; width: 14px; border-radius: 4px 4px 2px 2px; background: var(--c); }
.trad-bars i.gap { height: 8px; background: var(--line); }
.trad-bars span { font-size: 11px; color: var(--muted); margin-left: 4px; }
.pl-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pl-stats div { background: var(--sand); border-radius: 14px; padding: 10px 12px; }
.pl-stats b { display: block; font: 800 22px/1.15 var(--display); overflow-wrap: anywhere; }
.pl-stats b.pl-small { font-size: 16px; padding-top: 4px; }
.pl-stats span { font-size: 12px; color: var(--muted); }
.py-row { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 6px; }
.py { background: var(--sand); border-radius: 14px; padding: 8px 2px 6px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-height: 72px; }
.py b { font: 800 13px var(--display); margin-top: 2px; }
.py-note { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.py-gap { background: transparent; border: 1.5px dashed var(--line); }
.py-skip { font-size: 10px; color: var(--muted); }
.tl { position: relative; padding-left: 22px; display: flex; flex-direction: column; }
.tl::before { content: ''; position: absolute; left: 7px; top: 14px; bottom: 14px; width: 2px; background: var(--line); }
.tl-item { position: relative; display: block; padding: 12px 0; }
.tl-link { display: block; color: inherit; text-decoration: none; }
.tl-link:hover b, .tl-link:focus-visible b { text-decoration: underline; }
.tl-meta { font-size: 14px; }
.tl-fire { display: inline-block; vertical-align: -3px; margin-right: 4px; }
.tl-photos:empty { display: none; }
.pl-photos.tl-photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pl-photos.tl-photos .gb-tile { width: 64px; height: 64px; flex: none; }
.pl-photos.tl-photos .gb-more { display: grid; place-items: center; background: var(--pine); color: var(--flame); cursor: pointer; }
.pl-photos.tl-photos .gb-more b { font: 800 16px var(--display); }
.tl-item::before { content: ''; position: absolute; left: -21px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--c); border: 2px solid var(--pine); }
.tl-note { margin-top: 4px; font-size: 15px; }
.pl-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.pl-photos a { position: relative; display: block; border-radius: 12px; overflow: hidden; background: var(--sand); aspect-ratio: 1; }
.pl-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-photos span { position: absolute; left: 6px; bottom: 6px; background: rgba(24,59,47,.85); color: #fff; font: 800 12px var(--display); padding: 2px 8px; border-radius: 999px; }
.pl-photos .gb-tile { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--sand); aspect-ratio: 1; cursor: zoom-in; }
.gb-year { margin-top: 14px; }
.gb-year h3 { margin: 0 0 8px; font: 800 20px var(--display); color: var(--pine); }
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(12,28,22,.94); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 12px 12px; }
.lb img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; border-radius: 8px; }
.lb-cap { color: #fff; margin-top: 12px; display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: center; font-size: 15px; }
.lb-cap a { color: var(--flame); }
.lb-cap .muted { color: #B9C8BF; }
.lb button { position: absolute; background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 999px; width: 48px; height: 48px; font-size: 24px; cursor: pointer; }
.lb-x { top: 8px; right: 8px; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
.return-nudge { background: var(--ember-tint, #FFF4EC); border: 1px solid #F3C9AC; border-radius: 16px; padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.return-nudge .btn { border-radius: 12px; padding: 0 14px; background: #fff; }

/* The crew (family circle) */
.crew-map { height: 42vh; min-height: 280px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.crew-pin { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(24,59,47,.4); color: #fff; font: 800 12px/21px var(--display); text-align: center; cursor: pointer; }
.crew-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.crew-chip { display: inline-flex; align-items: center; }
.crew-av { width: 34px; height: 34px; flex: none; border-radius: 50%; color: #fff; display: grid; place-items: center; font: 800 14px var(--display); }
.crew-stay { align-items: center; }
.crew-stay[data-sid] { cursor: pointer; }
.invite-box { background: var(--sand); border-radius: 12px; padding: 12px; font-size: 13px; word-break: break-all; }

/* Rating chip beside a map pin: grown-up campfire. */
.pin-chip { position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 2px; padding: 2px 5px; background: #fff; border: 1.5px solid var(--pine); border-radius: 12px; box-shadow: 0 1px 4px rgba(24,59,47,.25); pointer-events: none; white-space: nowrap; }
.pin-chip svg { display: block; }
.chips-off .pin-chip { display: none; }

/* Who came along (stay page) + per-stay crew sharing */
.share-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.share-opt { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid #D5D0C4; background: #fff; font-size: 14px; font-weight: 600; }
.share-opt input { width: 20px; height: 20px; margin: 0; accent-color: var(--pine); }
.tg-card { gap: 12px; }
.tg-row { display: flex; align-items: flex-start; gap: 12px; padding: 4px 0; }
.tg-row + .tg-row { border-top: 1px solid var(--line); padding-top: 12px; }
.tg-row .grow { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tg-vote { width: 40px; height: 36px; flex: none; border-radius: 12px; background: var(--sand); display: grid; place-items: center; }
.tg-none { opacity: .5; }
.tg-note { font-size: 15px; line-height: 1.35; margin-top: 2px; }
.tg-acts { display: flex; gap: 6px; flex: none; }
.tg-acts .btn-quiet { border-radius: 12px; padding: 0 12px; min-width: 44px; }
.tg-wide { width: 100%; border-radius: 14px; }
.tg-form { padding: 12px; border-radius: 14px; background: var(--sand); }
.tg-card .pl-photos a { position: relative; }
.tg-x { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(24,59,47,.85); color: #fff; font-size: 13px; }
.trip-form .btn { white-space: nowrap; }

/* Announcement banner (Admin > Settings) */
.announce { display: flex; align-items: center; gap: 10px; background: var(--flame); color: var(--pine); font-size: 14px; font-weight: 600; padding: 4px 8px 4px 16px; min-height: 44px; }
.announce span { flex: 1; min-width: 0; }
.announce button { border: none; background: none; font-size: 24px; line-height: 1; min-width: 44px; min-height: 44px; border-radius: 12px; }

/* Avatars: photo when they have one, initial otherwise */
.av-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar.has-av { background: var(--sand); }
.avatar-pick { position: relative; flex: none; border: none; background: none; padding: 0; border-radius: 50%; cursor: pointer; }
.avatar-pick:focus-visible { outline: 3px solid var(--flame); outline-offset: 3px; }
.avatar-cam { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--ember); color: #fff; display: grid; place-items: center; border: 3px solid var(--ground); }
.crew-av { overflow: hidden; }
.crew-av:has(.av-img) { box-shadow: 0 0 0 2.5px currentColor; }
.crew-pin { overflow: hidden; }
.crew-pin.has-av { box-sizing: border-box; padding: 0; }
.tg-av { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--sand); color: var(--pine); display: grid; place-items: center; font: 800 14px var(--display); overflow: hidden; }

/* Cropper */
.cropper { border: none; padding: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; color: var(--pine); }
.cropper::backdrop { background: rgba(10, 24, 19, .72); backdrop-filter: blur(3px); }
.cropper[open] { display: grid; place-items: center; }
.cr-card { background: var(--ground); width: min(560px, 100%); height: min(760px, 100%); border-radius: 0; display: flex; flex-direction: column; gap: 12px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); box-sizing: border-box; margin: 0; }
.cr-head { display: flex; align-items: center; justify-content: space-between; }
.cr-head h2 { margin: 0; font-size: 22px; }
.cr-x { width: 44px; height: 44px; border: none; background: none; font-size: 18px; border-radius: 50%; color: inherit; }
.cr-stage { flex: 1; min-height: 220px; border-radius: 16px; overflow: hidden; background: #0E2019; position: relative; }
.cr-stage canvas { display: block; cursor: grab; border-radius: 16px; }
.cr-stage canvas.grabbing { cursor: grabbing; }
.cr-stage canvas:focus-visible { outline: 3px solid var(--flame); outline-offset: -3px; }
.cr-hint { margin: 0; font-size: 13px; text-align: center; }
.cr-kbd { display: none; }
.cr-aspects { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.cr-tools { display: flex; align-items: center; gap: 6px; }
.cr-icon { width: 44px; height: 44px; flex: none; border: 1px solid var(--line); background: #fff; border-radius: 12px; font: 700 22px var(--display); color: var(--pine); display: grid; place-items: center; cursor: pointer; }
.cr-zoom { flex: 1; min-width: 0; accent-color: var(--ember); height: 44px; }
.cr-foot { display: flex; gap: 10px; justify-content: flex-end; }
.cr-foot .btn { min-height: 48px; padding: 0 22px; }
@media (min-width: 700px) {
  .cr-card { border-radius: 24px; height: min(760px, calc(100vh - 48px)); padding: 18px 20px 20px; box-shadow: 0 24px 80px rgba(0, 0, 0, .35); }
  .cr-kbd { display: inline; }
}
@media (prefers-reduced-motion: no-preference) { .cropper[open] .cr-card { animation: cr-in .18s ease-out; } }
@keyframes cr-in { from { transform: translateY(12px); opacity: 0; } }

/* First-run welcome */
.welcome { background: var(--ember-tint); border: 1px solid #F3D5BF; border-radius: 20px; padding: 16px; margin-bottom: 18px; }
.welcome-head { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; }
.welcome-head h2 { font-size: 24px; margin: 0; }
.welcome-head p { margin: 4px 0 0; font-size: 14px; }
.welcome-skip { border-radius: 12px; padding: 0 14px; flex: none; }
.welcome-steps { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.welcome-steps li { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; min-height: 60px; }
.welcome-steps small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.welcome-steps .is-done b { text-decoration: line-through; text-decoration-color: var(--muted); color: var(--muted); }
.w-tick { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; }
.w-tick-pin { color: #1a1a1a; }
.is-done .w-tick { background: var(--pine); border-color: var(--pine); }
.w-tick-pin { border-color: var(--ember); background: var(--ember); }
.w-go { flex: none; border-radius: 12px; padding: 0 14px; }
.welcome-strip { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 14px; min-height: 44px; border-radius: 14px; background: var(--ember-tint); border: 1px solid #F3D5BF; text-decoration: none; font-size: 14px; }
@media (min-width: 900px) { .welcome-steps { display: grid; grid-template-columns: 1fr 1fr; } }

/* ---------- Phone polish (2026-12-01) ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, a, select, summary, .chip { touch-action: manipulation; -webkit-tap-highlight-color: rgba(232,105,44,.18); }
.field, .row > * { min-width: 0; }
/* Home-screen apps and notched phones: keep chrome out from under the status bar and side cutouts. */
.topbar { padding-top: calc(8px + env(safe-area-inset-top)); }
.wrap { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.map-full { margin-left: calc(-1 * max(20px, env(safe-area-inset-left))); margin-right: calc(-1 * max(20px, env(safe-area-inset-right))); }
.lb { padding-top: max(56px, calc(env(safe-area-inset-top) + 48px)); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.toast { max-width: calc(100vw - 32px); text-align: center; }
/* iOS Safari's toolbars make 100vh taller than what you can see. dvh follows the toolbars. */
@supports (height: 1dvh) {
  #map, .trip-page #map { height: 44dvh; }
  .crew-map { height: 42dvh; }
  .lb img { max-height: calc(100dvh - 150px); }
  @media (min-width: 900px) {
    .home #map { height: clamp(420px, calc(100dvh - 220px), 680px); }
    .trip-page #map { height: calc(100dvh - 40px); }
  }
}
@media (max-width: 899px) {
  /* 16px+ inputs, or iOS Safari zooms the page when you tap one. */
  .app input, .app select, .app textarea { font-size: 16px; }
  .tb-sel select { font-size: 16px; min-height: 44px; max-width: 100%; text-overflow: ellipsis; }
  .tb-sel { max-width: 100%; }
  #tf-place { max-width: 100%; width: 100%; }
  #tf-place:not(:focus) { min-width: 0; }
  .tb-sel:has(#tf-place) { flex: 1 1 100%; }
  /* Thumb-sized taps. */
  .chip { min-height: 44px; padding: 0 14px; font-size: 14px; }
  .chips { gap: 8px; }
  .meter button { font-size: 12px; min-height: 76px; }
  .kid-fire small, .stay .kid-fire small, .py-skip, .trad-bars span, .tr-thumb span { font-size: 11px; }
  .tabbar button { min-width: 64px; }
  .invite-row .btn, .photo-btn { min-height: 44px; }
  .tp-cta { display: inline-flex; align-items: center; min-height: 44px; }
  .stay-link { display: inline-block; padding: 4px 0; }
  .tg-x { width: 40px; height: 40px; }
}

/* Add to Home Screen hint (install.js). Phones only; the You page row works everywhere. */
.inst-row { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--sand); border-radius: 16px; font-size: 14px; }
.inst-sub { font-size: 13px; line-height: 1.4; color: var(--muted); margin-top: 2px; }
.inst-share { vertical-align: -4px; margin: 0 1px; color: var(--pine); }
.install-hint { position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); max-width: 496px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 8px 28px rgba(24, 59, 47, .18); font-size: 14px; }
.install-hint .brand-mark svg { width: 34px; height: 34px; }
.install-hint b { font-family: var(--display); font-weight: 800; color: var(--pine); }
.inst-x { flex: none; width: 44px; height: 44px; border: none; background: none; font-size: 26px; line-height: 1; color: var(--muted); }
@media (min-width: 900px) { .install-hint { display: none; } }
@media (display-mode: standalone) { .install-hint, [data-install-row] { display: none; } }

/* Site footer (home, trip and Help / Privacy / Terms pages). Filled by the Worker from BRAND (siteFooter in src/brand-html.js). */
.site-foot { border-top: 1px solid #ECE8DE; color: var(--muted); font-size: 14px; padding: 24px 20px calc(36px + env(safe-area-inset-bottom, 0px)); }
.sf-in { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.sf-brand { margin: 0; color: var(--pine); }
.sf-brand span { color: var(--muted); }
.site-foot nav { display: flex; flex-wrap: wrap; column-gap: 20px; }
.site-foot nav a { color: var(--pine); min-height: 44px; display: inline-flex; align-items: center; text-underline-offset: 3px; }
.sf-fine { margin: 0; font-size: 13px; }
@media (min-width: 760px) { .site-foot { padding-left: 32px; padding-right: 32px; } }

/* ---------- Accessibility ---------- */
/* One visible focus ring everywhere (pine on light backgrounds, flame on dark ones). Keyboard only; mouse clicks stay clean. */
:focus-visible { outline: 3px solid var(--pine); outline-offset: 2px; border-radius: 4px; }
.btn-primary:focus-visible, .chip[aria-pressed="true"]:focus-visible, .btn-dark:focus-visible, .lb button:focus-visible, .lb a:focus-visible, .rail-log:focus-visible, .adm-badge:focus-visible { outline-color: var(--flame); }
.btn:focus-visible, .chip:focus-visible, .field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { border-radius: 14px; }
.btn-ember:focus-visible, .tabbar .add:focus-visible { outline-color: var(--pine); box-shadow: 0 0 0 5px #fff; }
.switch:focus-visible { border-radius: 999px; }
.pin-chip, .maplibregl-marker[tabindex] { outline: none; }
.maplibregl-marker:focus-visible > div:first-child, .maplibregl-marker:focus-visible.crew-pin { outline: 3px solid var(--pine); outline-offset: 3px; box-shadow: 0 0 0 6px var(--flame); }
[tabindex="-1"]:focus { outline: none; }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--pine); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; outline: 3px solid var(--flame); }
.toast { max-width: calc(100vw - 32px); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
/* Windows high contrast / forced colors: keep switches and pins visible. */
@media (forced-colors: active) {
  .switch { border: 2px solid ButtonText; }
  .switch::after { background: ButtonText; }
  .switch:checked::after { background: Highlight; }
}
/* Offline: status bar and stays waiting to sync */
.sync-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--flame); color: var(--pine); font-size: 14px; line-height: 1.3; }
.sync-bar.sync-ok { background: var(--pine); color: #fff; }
.sync-bar .btn-quiet { min-height: 44px; padding: 0 12px; border-radius: 12px; font-weight: 700; }
.stay.pending { opacity: .92; }
.pending-icon { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--sand); color: var(--ember); display: grid; place-items: center; font-weight: 800; }
.pending-tag { font-size: 12px; font-weight: 700; color: var(--ember); margin-top: 2px; }
body.has-sync-bar { padding-top: 64px; }

/* Campground contact details */
.ct-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.ct-chip { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border-radius: 14px; }
.ct-add { font-size: 14px; font-weight: 600; color: #B4440F; }
.ct-rows { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.ct-rows div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ct-rows b { overflow-wrap: anywhere; }
.ct-card .sd-acts .btn-primary { flex: none; }

/* Photos card: drop zone + make-cover button */
.tg-drop { border: 2px dashed transparent; border-radius: 14px; padding: 4px; display: grid; gap: 10px; transition: background .15s, border-color .15s; }
.tg-drop.over { border-color: var(--ember); background: rgba(232,105,44,.08); }
.tg-card .tg-cover { position: absolute; left: 6px; top: 6px; min-height: 28px; border: 0; border-radius: 999px; padding: 2px 10px; background: rgba(255,255,255,.92); color: var(--pine); font: 800 12px var(--display); cursor: pointer; opacity: 0; }
.tg-card .pl-photos a:hover .tg-cover, .tg-card .tg-cover:focus-visible { opacity: 1; }
@media (hover: none) { .tg-card .tg-cover { opacity: 1; } }
.lb-cap .lb-text { position: static; width: auto; height: auto; min-height: 44px; padding: 0 14px; font: 700 15px var(--body); border-radius: 999px; }

.crew-banner { height: 140px; border-radius: 18px; background: var(--sand) center / cover no-repeat; border: 1px solid var(--line); }
.crew-motto { margin: 4px 0 0; font-style: italic; color: var(--muted); }
@media (min-width: 720px) { .crew-banner { height: 190px; } }

/* ---------- Phone comfort: bigger type, more air (2026-12) ----------
   Phones only. Desktop keeps its denser layout. */
@media (max-width: 899px) {
  :root { --space-1: 8px; --space-2: 16px; --space-3: 24px; --space-4: 36px; --radius: 20px; }
  body.app { font-size: 17px; line-height: 1.5; }
  .app .wrap { padding-top: var(--space-2); padding-bottom: 132px; }
  .app h1, .app .page-title { font-size: 32px; line-height: 1.12; }
  .app h2 { font-size: 24px; line-height: 1.2; }
  .app .eyebrow { font-size: 13px; }
  .app .muted { line-height: 1.5; }
  .app .stack { gap: var(--space-2); }
  .app .home { gap: var(--space-3); }
  .app .hello { gap: var(--space-2); }
  .app .card { padding: 20px; border-radius: var(--radius); }
  .app .field { gap: 8px; }
  .app .field input, .app .field select, .app .field textarea { min-height: 52px; border-radius: 16px; }
  .app .btn { min-height: 56px; border-radius: 18px; }
  .app .btn-quiet { min-height: 48px; font-size: 15px; }
  .app .chips { gap: 10px; }
  .app .chip { min-height: 48px; padding: 0 16px; font-size: 15px; }
  .app .stay { padding: 18px 0; gap: 14px; }
  .app .stay-title b { font-size: 18px; }
  .app .stay-line { font-size: 14px; margin-top: 4px; }
  .app .stay-note { font-size: 15px; margin-top: 6px; }
  .app .trip-grid { gap: var(--space-2); }
  .app .trip-card { border-radius: 24px; }
  .app .trip-card .body { padding: 18px 20px 20px; gap: 10px; }
  .app .stats { gap: 12px; }
  .app .stat { padding: 14px; border-radius: 16px; }
  .app .topbar { padding-top: calc(12px + env(safe-area-inset-top)); padding-bottom: 8px; }
  .app .tabbar { padding-top: 10px; box-shadow: 0 -6px 20px rgba(24,59,47,.06); }
  .app .tabbar button { font-size: 13px; min-height: 48px; }
  .app .toast { bottom: 112px; }
}

/* Crew page: empty state and the quiet leave link */
.crew-nostays { padding: 18px; border-radius: 18px; background: var(--sand); border: 1px dashed #D5D0C4; }
.crew-nostays b { font-family: var(--display); font-size: 18px; }
.crew-leave { align-self: center; min-height: 44px; padding: 0 12px; background: none; border: none; color: #B4441A; font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

/* Avatar menu (phones) */
.me-scrim { position: fixed; inset: 0; background: rgba(24,59,47,.35); z-index: 40; }
.me-menu { position: fixed; z-index: 41; top: calc(64px + env(safe-area-inset-top)); right: 16px; width: min(320px, calc(100vw - 32px)); background: #fff; border-radius: 24px; box-shadow: 0 18px 50px rgba(24,59,47,.28); padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.me-menu button, .me-menu a { display: flex; align-items: center; min-height: 52px; padding: 0 14px; border: 0; border-radius: 14px; background: none; font: 600 16px Inter, sans-serif; color: var(--pine); text-align: left; text-decoration: none; width: 100%; }
.me-menu button:active, .me-menu a:active, .me-menu button:hover, .me-menu a:hover { background: var(--sand); }
.me-menu-who { display: flex; align-items: center; gap: 12px; padding: 10px 14px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.me-menu-who b { display: block; font-family: var(--display); font-size: 18px; }
.me-menu form { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid var(--line); }
.me-menu .me-out { color: #A33A12; }
@media (prefers-reduced-motion: no-preference) { .me-menu:not(.hidden) { animation: me-in .16s ease-out; } @keyframes me-in { from { opacity: 0; transform: translateY(-6px); } } }
@media (min-width: 900px) { .me-menu, .me-scrim { display: none !important; } }

/* Map home on phones: one obvious next step, then the numbers, then the lists. */
.home-log { display: none; }
@media (max-width: 899px) {
  .home-log { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; font-size: 19px; }
  .home-log span { font-size: 26px; line-height: 1; }
  .app .home .latest-head { margin-bottom: 8px; }
  .app .home { gap: 32px; }
  .app .bee-link { padding: 18px; border-radius: 20px; }
}
