/* Vicarious styles. Sections follow the app: basics, home, trip map, photos, posting page.
   Phone sizes, dark mode and reduced motion are each gathered in one place at the end. */

/* ── Colors and themes ───────────────────────────────────────────────────── */
:root {
  /* surfaces and ink */
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --surface-2: #F1F2F5;
  --ink: #0B0D12;
  --muted: #697181;
  --line: #E2E4E9;
  --hair: rgba(11, 13, 18, .08);
  /* actions: near-black; signal orange marks anything live or new */
  --accent: #0B0D12;
  --accent-ink: #FFFFFF;
  --stamp: #FF5A1F;
  --signal: #FF5A1F;
  --ok: #0E9F57;
  --warn: #C2410C;
  --paper: #FFFFFF;
  --glass: rgba(255, 255, 255, .78);
  --shadow: 0 1px 0 rgba(11, 13, 18, .03), 0 14px 34px -10px rgba(11, 13, 18, .22);
  --shadow-sm: 0 1px 2px rgba(11, 13, 18, .06);
  --display: "Space Grotesk", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", "SF Pro Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0A0B0F;
  --surface: #14161C;
  --surface-2: #1B1E26;
  --ink: #F2F3F5;
  --muted: #9AA1AD;
  --line: #262A33;
  --hair: rgba(255, 255, 255, .09);
  --accent: #F2F3F5;
  --accent-ink: #0A0B0F;
  --stamp: #FF6A33;
  --signal: #FF6A33;
  --ok: #34D399;
  --warn: #FB923C;
  --glass: rgba(20, 22, 28, .76);
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 16px 40px -10px rgba(0, 0, 0, .6);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  color-scheme: dark;
}
* { box-sizing: border-box; }
*::before { box-sizing: border-box; }
*::after { box-sizing: border-box; }
html { margin: 0; height: 100%; }
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
body[data-screen="trip"] { overflow: hidden; }
body:not([data-screen="trip"]) .toast { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
body[data-screen="trip"] .toast { bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important; }
body.replaying .trip-card { display: none !important; }
body.replaying .trip-bar { display: none !important; }
body.replaying .trip-chips { display: none !important; }
body.replaying .trip-menu { display: none !important; }
body.replaying .maplibregl-ctrl-bottom-right { display: none !important; }
body.replaying .mode-switch { display: none !important; }
:root[data-theme="dark"] .queue-note { background: #3A2E17; color: #F3D9A6; }

/* photo count badge on the Photos tab */
.trip-bar .bi { position: relative; }
.bcount { position: absolute; top: -6px; left: calc(100% - 7px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 6px; background: var(--signal); color: #fff;
  font: 600 10.5px/17px var(--mono); text-align: center; letter-spacing: 0; box-shadow: 0 0 0 2px var(--surface); }
/* data reads like an instrument panel */
.day-count, .thumb-time span, .lb-count, .lb-when, .gal-date, .replay-label, .stat strong, .stats-range, .note-meta, .post-hearts, .tc-body .card-sub, #tripSub, .now-text { font-family: var(--mono); letter-spacing: -.02em; }
.stat strong { font-weight: 600; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(11, 13, 18, .1); }

/* ── Basics: type, links, buttons, fields ────────────────────────────────── */
[hidden] { display: none !important; }
input { font: inherit; color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; }
.page { max-width: 760px; margin: 0 auto; padding: 32px 20px 64px; }
.page.narrow { max-width: 520px; }
.wordmark { font-family: var(--display); font-weight: 700; font-size: clamp(40px, 10.5vw, 64px); line-height: .95; letter-spacing: -.05em; margin: 0; }
.wordmark::after { content: ""; display: inline-block; width: .19em; height: .19em; margin-left: .07em; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 .07em rgba(255, 90, 31, .18); vertical-align: baseline; }
.wordmark.small { font-size: 18px; letter-spacing: -.01em; }
.wordmark.small::after { display: none; }
.person { font-family: var(--display); font-weight: 800; font-size: clamp(32px, 7vw, 48px); line-height: 1; letter-spacing: -.025em; margin: 0; }
.lede { font-size: 17px; color: var(--muted); margin: 12px 0 0; max-width: 46ch; }
.section-title { font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: -.025em; margin: 0 0 12px; }
.muted { color: var(--muted); margin: 0 0 12px; }
.small { font-size: 14px; }
.footnote { color: var(--muted); margin-top: 40px; font-size: 15px; }
.back { display: inline-block; margin-bottom: 10px; font-weight: 700; text-decoration: none; }
.back::before { content: "‹ "; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.panel { background: var(--surface); border: 1px solid var(--hair); border-radius: 16px; padding: 20px; box-shadow: var(--shadow-sm); margin: 0 0 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 15px/1.2 var(--body); letter-spacing: -.01em; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .1s; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: 15px; }
.btn.big { min-height: 52px; padding: 12px 26px; font-size: 18px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--hair); background: var(--glass); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow-sm); flex: 0 0 auto; text-decoration: none; cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.subtle { box-shadow: none; background: transparent; color: var(--muted); width: 40px; height: 40px; }
.icon-btn.dark { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: none; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 6px 12px; font-size: 13.5px; font-weight: 600; color: var(--ink); min-height: 34px; letter-spacing: -.01em; }
.chip.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip.warn { border-color: var(--warn); color: var(--warn); }
.chip.danger { color: var(--stamp); }
input[type=text] { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px; background: var(--surface); color: var(--ink); font: inherit; transition: border-color .15s, box-shadow .15s; }
input[type=email] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
  background: var(--surface);
  color: var(--ink);
}
input[type=search] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
  background: var(--surface);
  color: var(--ink);
}
select {
  font: inherit;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
  background: var(--surface);
  color: var(--ink);
}
.field { display: block; margin: 0 0 14px; }
.fields label { display: block; margin: 0 0 14px; }
.field > span { display: block; font-size: 14px; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
.fields label > span { display: block; font-size: 14px; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-msg { min-height: 1.5em; margin: 10px 0 0; color: var(--muted); }
.live-badge { display: inline-flex; align-items: center; gap: 6px; font: 600 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--signal); margin: 0 0 6px; }
.live-badge.small { font-size: 14px; margin: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--stamp); box-shadow: 0 0 0 0 var(--stamp); animation: pulse 2s infinite; }
.notice {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  z-index: 7;
  background: var(--surface);
  border-radius: 18px;
  padding: 20px 24px;
  box-shadow: var(--shadow);
  max-width: min(420px, calc(100% - 32px));
  text-align: center;
}
.notice h2 { font-family: var(--display); font-weight: 800; margin: 0 0 6px; font-size: 24px; }
.notice p { margin: 0; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 80; display: flex; align-items: center; gap: 12px; background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow); font-size: 14.5px; font-weight: 500; max-width: calc(100% - 24px); }
.toast > span { flex: 1 1 auto; }
.toast-action { border: 0; background: var(--stamp); color: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 700; white-space: nowrap; }
.panel.live { border-top: 6px solid var(--stamp); }
.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
  flex: 0 0 auto;
}
.grow { flex: 1 1 auto; min-width: 0; }
.you-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}
.icon-btn.small-btn { width: 36px; height: 36px; box-shadow: none; background: var(--surface-2); }
.icon-btn.small-btn svg { width: 18px; height: 18px; }
.linkish {
  font-size: 15px;
  border: 0;
  background: none;
  color: var(--muted);
  font-weight: 700;
  padding: 8px;
  align-self: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}
input[type=password] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
  background: var(--surface);
  color: var(--ink);
}
.theme-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  box-shadow: none;
  cursor: pointer;
}
.theme-btn svg { width: 19px; height: 19px; }
.page-head { margin: 8px 0 26px; position: relative; }
.page-head > .theme-btn { position: absolute; right: 0; top: 0; }
.mode-switch {
  position: fixed;
  z-index: 30;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
  padding: 9px 16px;
  box-shadow: var(--shadow);
  top: auto;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
}
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%) !important;
  background-size: 200% 100% !important;
  animation: shimmer 1.3s linear infinite;
}
.skeleton-line { display: block; height: 12px; width: 70%; border-radius: 6px; margin-top: 4px; }
.screen.page:not([hidden]) { animation: fadeUp .3s ease-out both; }
.count-badge {
  display: inline-block;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: var(--stamp);
  color: #fff;
  font-size: 13px;
  font-family: var(--body);
  line-height: 22px;
  text-align: center;
  vertical-align: middle;
  margin-left: 6px;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Welcome ─────────────────────────────────────────────────────────────── */
.welcome {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  display: grid;
  place-items: center;
  padding: 24px;
  padding-top: calc(24px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
.welcome-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 14px; }
.welcome-card .wordmark { margin-bottom: 18px; }
.welcome-card h1 { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -.01em; margin: 0; line-height: 1.2; }
.welcome-card .welcome-sub { margin: 0; color: var(--muted); font-size: 16px; }
.welcome-card input { font-size: 18px; min-height: 52px; }
.welcome-card .btn.big { width: 100%; }

/* ── Home and traveler pages ─────────────────────────────────────────────── */
.empty { color: var(--muted); margin: 6px 0 0; }
.card-list { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 10px; }
.traveler-card { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--hair); border-radius: 16px; padding: 10px 10px 10px 14px; box-shadow: var(--shadow-sm); }
.traveler-card.stale .card-sub { color: var(--warn); }
.card-text { display: flex; flex-direction: column; min-width: 0; }
.card-title { font-weight: 700; font-size: 18px; line-height: 1.25; }
.card-sub { color: var(--muted); font-size: 15px; line-height: 1.35; }
.live-card {
  background: var(--surface);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
}
.live-cover { width: 100%; height: 100%; min-height: 220px; object-fit: cover; display: block; background: var(--surface-2); }
.live-body { padding: 22px; }
.live-body h2 { font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1.05; letter-spacing: -.02em; margin: 2px 0 8px; }
.live-body .row { margin-top: 18px; flex-wrap: wrap; }
.notify { background: var(--surface); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow); margin: 0 0 20px; }
.notify-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.notify-title { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 700; }
.notify-title svg { color: var(--accent); flex: 0 0 auto; }
.notify-steps { margin: 10px 0 6px; padding-left: 22px; }
.notify-steps li { margin: 4px 0; }
.notify-note { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.notify-note.warn { color: var(--warn); }
.traveler-card.big { flex-direction: column; align-items: stretch; padding: 0; overflow: hidden; gap: 0; }
.traveler-card.big .tc-main { display: block; text-decoration: none; color: inherit; }
.tc-cover { position: relative; display: block; aspect-ratio: 3 / 1; background: var(--surface-2); overflow: hidden; }
.tc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.traveler-card.big:hover .tc-cover img { transform: scale(1.03); }
.tc-initial {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 54px;
  color: var(--muted);
}
.tc-live {
  position: absolute;
  left: 12px;
  top: 12px;
  background: var(--paper);
  color: var(--stamp);
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.tc-body { display: flex; flex-direction: column; gap: 1px; padding: 10px 14px 2px; }
.tc-body .card-title { font-size: 18px; font-family: var(--display); font-weight: 800; letter-spacing: -.01em; }
.tc-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 10px 10px 14px; }
.tc-actions:empty { display: none; }
.tc-actions .icon-btn.subtle { opacity: .45; width: 32px; height: 32px; }
.tc-actions .icon-btn.subtle:hover { opacity: 1; }
.tc-actions .icon-btn.subtle:focus-visible { opacity: 1; }

/* ── Trip map: header, days, chips, bottom bar ───────────────────────────── */
.trip-row {
  display: flex;
  gap: 14px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border-radius: 16px;
  padding: 10px;
  box-shadow: var(--shadow);
}
.trip-row img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--surface-2); flex: 0 0 auto; }
.trip-row-empty { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--surface-2); flex: 0 0 auto; }
.trip { position: fixed; inset: 0; }
.map { position: absolute; inset: 0; background: var(--bg); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin-top: 8px; font-size: 15px; }
.crumbs:empty { display: none; }
.crumb {
  border: 0;
  background: none;
  padding: 2px 0;
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.crumb.current { color: var(--ink); text-decoration: none; font-weight: 700; }
.crumb-sep { color: var(--muted); }
.maplibregl-ctrl-group { border-radius: 12px !important; }
.maplibregl-ctrl-attrib { font-size: 11px; }
.day-bar::-webkit-scrollbar { display: none; }
.day-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 9px; padding: 4px 10px; font-size: 13px; font-weight: 600; min-height: 30px; white-space: nowrap; letter-spacing: -.01em; cursor: pointer; }
.day-chip .day-count { font-weight: 400; color: var(--muted); font-size: 13px; }
.day-chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.day-chip[aria-pressed="true"] .day-count { color: inherit; opacity: .75; }
.day-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; box-shadow: 0 0 0 1.5px var(--surface); }
.day-bar {
  display: flex;
  gap: 6px;
  margin: 10px -4px 0;
  padding: 2px 4px 4px;
  scrollbar-width: none;
  max-width: 100%;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  max-height: none;
}
.trip-card {
  position: absolute;
  z-index: 6;
  left: 12px;
  right: 12px;
  top: calc(10px + env(safe-area-inset-top, 0px));
  max-width: 560px;
  
  
  
  
  padding: 8px 12px 10px; background: var(--glass); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border: 1px solid var(--hair); box-shadow: var(--shadow); border-radius: 16px; }
.trip-row1 { display: flex; align-items: center; gap: 8px; }
.trip-row1 h1 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(19px, 2.6vw, 24px);
  line-height: 1.15;
  letter-spacing: -.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#bellBtn.on { background: var(--accent); color: var(--accent-ink); }
.trip-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0 44px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  min-width: 0;
}
.trip-meta #tripSub { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.trip-card .day-bar { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; max-height: none; margin: 8px -12px 0; padding: 2px 12px 2px; }
.trip-card .day-bar.more-right {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
}
.trip-card .day-bar.more-left.more-right {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
}
.trip-card .day-bar.more-left:not(.more-right) {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 28px);
  mask-image: linear-gradient(to right, transparent, #000 28px);
}
.trip-card .crumbs { margin: 6px 0 0 2px; font-size: 14px; }
.trip-bar {
  position: absolute;
  z-index: 6;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex;
  gap: 6px;
  padding: 6px;
  
  
  
  
  
  max-width: calc(100% - 16px);
  overflow-x: auto;
  scrollbar-width: none; background: var(--glass); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border: 1px solid var(--hair); box-shadow: var(--shadow); border-radius: 16px; }
.trip-bar::-webkit-scrollbar { display: none; }
.trip-bar .btn.accent { background: var(--accent); color: var(--accent-ink); }
.trip-bar .btn.post { background: var(--stamp); color: #fff; }
.trip-bar .btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.maplibregl-ctrl-bottom-right { bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important; }
.trip-row1 .theme-btn { width: 34px; height: 34px; border: 0; background: var(--surface-2); }
.trip-chips {
  position: absolute;
  z-index: 4;
  left: 12px;
  right: 12px;
  top: calc(var(--card-bottom, 136px) + 8px);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  pointer-events: none;
}
.trip-chips > * { pointer-events: auto; }
.now-card { display: inline-flex; align-items: center; gap: 8px; border-radius: 12px; padding: 7px 12px 7px 10px; font-size: 13.5px; color: var(--ink); cursor: pointer; max-width: 100%; background: var(--glass); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border: 1px solid var(--hair); box-shadow: var(--shadow); }
.now-card .now-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-card .now-icon { font-size: 16px; }
.new-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 7px 14px 7px 10px;
  font-size: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  max-width: 100%;
  background: var(--stamp);
  color: #fff;
  font-weight: 700;
}
.new-pill .new-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulseW 1.6s infinite; }
.now-card:not([hidden]) { animation: popIn .2s ease-out both; }
.new-pill:not([hidden]) { animation: popIn .2s ease-out both; }
.trip-bar .btn { min-height: 40px; padding: 6px 15px; font-size: 15px; border-color: transparent; background: transparent; flex: 0 0 auto; gap: 7px; }
.trip-bar .bi { display: inline-grid; place-items: center; }
.trip-bar .bi svg { width: 18px; height: 18px; }
.trip-card.loading #tripTitle {
  color: transparent;
  border-radius: 8px;
  min-width: 55%;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}

/* ── Map pins ────────────────────────────────────────────────────────────── */
.pin { position: relative; width: 0; height: 0; padding: 0; border: 0; background: none; cursor: pointer; }
.pin-shadow {
  position: absolute;
  left: -6px;
  top: -3px;
  width: 12px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .35);
  filter: blur(1px);
}
.pin-head img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pin.area .pin-head { left: -24px; width: 48px; height: 48px; }
.pin-count { position: absolute; left: 10px; bottom: 44px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; background: var(--signal); color: #fff; font: 600 11px/20px var(--mono); text-align: center; box-shadow: 0 0 0 2px #fff; }
.pin.area .pin-count { left: 14px; bottom: 52px; }
.pin-label { position: absolute; top: 5px; left: 0; transform: translateX(-50%); white-space: nowrap; background: rgba(11, 13, 18, .9); color: #fff; border-radius: 6px; padding: 3px 7px; font: 500 11.5px/1.2 var(--mono); letter-spacing: -.01em; box-shadow: 0 4px 12px -4px rgba(11, 13, 18, .5); }
.pin:hover .pin-head { transform: scale(1.12); }
.pin:focus-visible { outline: none; }
.pin:focus-visible .pin-head { transform: scale(1.12); border-color: var(--accent); }
.pin.is-active { z-index: 3; }
.pin-head { position: absolute; left: -20px; bottom: 10px; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; border: 2.5px solid var(--pin, #fff); background: #D9DCE2; box-shadow: 0 0 0 1px rgba(11, 13, 18, .14), 0 8px 18px -6px rgba(11, 13, 18, .55); transition: transform .12s; transform-origin: 50% 120%; }
.pin-tail {
  position: absolute;
  left: -7px;
  bottom: 0;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 12px solid var(--paper);
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .25));
  border-top-color: var(--pin, var(--paper));
}
.pin.is-active .pin-head { border-color: var(--pin, var(--paper)); box-shadow: 0 0 0 3px var(--accent), 0 2px 6px rgba(0, 0, 0, .35); }
.pin.drop .pin-head { animation: pinDrop .5s cubic-bezier(.2, 1.2, .4, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
.pin.drop .pin-tail { animation: pinDrop .5s cubic-bezier(.2, 1.2, .4, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
.pin.drop .pin-label { animation: pinDrop .5s cubic-bezier(.2, 1.2, .4, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
.pin.drop .pin-count { animation: pinDrop .5s cubic-bezier(.2, 1.2, .4, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }

/* ── Menu ────────────────────────────────────────────────────────────────── */
.trip-menu {
  position: absolute;
  z-index: 25;
  right: 14px;
  top: calc(66px + env(safe-area-inset-top, 0px));
  width: min(320px, calc(100% - 28px));
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
  padding: 6px;
  border: 1px solid var(--line);
}
.trip-menu button {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  border: 0;
  background: none;
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
}
.trip-menu button:hover { background: var(--surface-2); }
.trip-menu button:focus-visible { background: var(--surface-2); }
.trip-menu .mi {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--accent);
  flex: 0 0 auto;
}
.trip-menu .mi svg { width: 19px; height: 19px; }
.trip-menu strong { display: block; font-size: 15px; }
.trip-menu small { display: block; color: var(--muted); font-size: 13px; line-height: 1.3; }
.trip-menu [aria-pressed="true"] .mi { background: var(--accent); color: var(--accent-ink); }
.trip-menu:not([hidden]) { animation: popIn .16s ease-out both; transform-origin: top right; }

/* ── Gallery ─────────────────────────────────────────────────────────────── */
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.is-active { box-shadow: 0 0 0 3px var(--accent); }
.thumb {
  flex: 0 0 auto;
  width: 74px;
  height: 74px;
  border-radius: 10px;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: var(--surface-2);
  scroll-snap-align: center;
  position: relative;
}
.thumb-time {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 4px 3px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  background: linear-gradient(to top, rgba(0, 0, 0, .65), transparent);
}
.gallery {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.gal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 6px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}
.gal-head h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -.01em; }
.gal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0 18px 28px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  -webkit-overflow-scrolling: touch;
}
.gal-day h3 { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px; font-size: 17px; }
.gal-date { color: var(--muted); font-weight: 400; font-size: 15px; }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.gal-item { position: relative; aspect-ratio: 1 / 1; border: 0; padding: 0; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.gal-item .thumb-time { display: flex; flex-direction: column; align-items: center; line-height: 1.2; padding: 14px 4px 4px; }
.gal-item .thumb-time strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.gal-item .thumb-time span { font-weight: 400; opacity: .9; font-size: 10.5px; }
.gal-item.skeleton img { opacity: 0; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .25s; }
.gallery:not([hidden]) { animation: fadeUp .25s ease-out both; }
.gallery-done {
  flex: 0 0 auto;
  padding: 10px 18px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.gallery-done .btn { width: 100%; }
.gallery-body { flex: 1 1 0; overflow-y: auto; }
.gal-date::before { content: "·"; margin: 0 6px 0 2px; color: var(--muted); }

/* ── Photo viewer ────────────────────────────────────────────────────────── */
.lightbox { position: fixed; inset: 0; z-index: 50; background: #080D11; color: #EEF2F4; overflow: hidden; }
.lightbox:not([hidden]) { animation: popIn .18s ease-out both; }
/* the photo fills the screen; the details sit over the bottom of it */
.lb-stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.lb-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; will-change: transform; }
.lb-close { position: absolute; z-index: 4; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; }
.lb-nav { position: absolute; z-index: 3; top: 45%; transform: translateY(-50%); width: 48px; height: 48px; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: rgba(0, 0, 0, .35); color: #fff; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); cursor: pointer; }
.lb-nav svg { width: 24px; height: 24px; }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-nav:disabled { opacity: .2; }
.lb-info { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 4px;
  max-height: 45vh; overflow-y: auto; padding: 64px 20px calc(18px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, rgba(8, 13, 17, .94) 0%, rgba(8, 13, 17, .72) 55%, rgba(8, 13, 17, 0) 100%); }
.lb-info > * { max-width: 760px; }
.lb-count { margin: 0; color: rgba(255, 255, 255, .6); font-size: 13px; }
.lb-info h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.15; letter-spacing: -.01em; }
.lb-when { margin: 0; color: rgba(255, 255, 255, .72); font-size: 14px; }
.lb-caption { margin: 4px 0 0; font-size: 16px; color: rgba(255, 255, 255, .92); }
.lb-actions { margin-top: 10px; gap: 8px; }
.lb-info .chip { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .22); color: #EEF2F4; }
.lb-nav:disabled { opacity: .2; }
.chip.heart { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: 16px; min-height: 44px; }
.heart-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.chip.heart.on { color: #FF6B6F; border-color: rgba(255, 107, 111, .5); }
.chip.heart.on .heart-icon {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z' fill='black'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z' fill='black'/%3E%3C/svg%3E");
}
.chip.heart.pop .heart-icon { animation: heartPop .4s cubic-bezier(.2, 1.6, .4, 1); }
.chip.heart:disabled { opacity: .85; cursor: default; }
.lb-bars { position: absolute; z-index: 3; left: 12px; right: 64px; top: calc(14px + env(safe-area-inset-top, 0px)); display: flex; gap: 4px; }
.lb-bars span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .3); overflow: hidden; position: relative; }
.lb-bars span.done { background: rgba(255, 255, 255, .9); }
.lb-bars span.now::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  transform-origin: left;
  animation: barFill 5s linear forwards;
}
.lightbox.story .lb-nav { display: none; }
.lightbox:not([hidden]) { animation: popIn .18s ease-out both; }

/* ── Play the trip ───────────────────────────────────────────────────────── */
.replay {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 14px calc(18px + env(safe-area-inset-bottom, 0px));
}
.replay > * { pointer-events: auto; }
.replay-top {
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
  max-width: 560px;
}
.replay-bar { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.replay-bar span { display: block; height: 100%; width: 0; background: var(--stamp); transition: width .6s ease; }
.replay-label { margin: 8px 0 0; font-weight: 700; font-size: 15px; }
.replay-card {
  align-self: center;
  margin: 0;
  background: var(--paper);
  padding: 8px 8px 10px;
  border-radius: 4px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
  width: min(300px, 70vw);
  transform: rotate(-2deg);
}
.replay-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; background: #CBD3CF; }
.replay-card figcaption { color: #1B2A35; font-size: 14px; padding: 8px 4px 0; text-align: center; }
.replay-card.in { animation: cardIn .45s cubic-bezier(.2, 1.3, .4, 1) both; }
.replay-controls { display: flex; gap: 10px; justify-content: center; }
.replay-controls .btn { box-shadow: var(--shadow); min-width: 110px; }

/* ── Stats and dialogs ───────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(8, 14, 18, .55); display: grid; place-items: center; padding: 16px; }
.modal-card {
  background: var(--surface);
  border-radius: 20px;
  width: min(760px, 100%);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.modal-head { display: flex; gap: 14px; align-items: center; }
.modal-head img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.modal-head h2 { font-family: var(--display); font-weight: 800; margin: 0; font-size: 22px; }
.modal-head .muted { margin: 2px 0 0; }
.narrow-card .notify { box-shadow: none; padding: 0; margin: 0 0 12px; }
.stats-card h2 { font-family: var(--display); font-weight: 800; margin: 0; font-size: 24px; }
.stats-range { margin: 2px 0 14px; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat { background: var(--surface-2); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.stat strong { font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1.05; letter-spacing: -.01em; }
.stat span { color: var(--muted); font-size: 13px; line-height: 1.25; }
.narrow-card { width: min(460px, 100%); }
#noteText {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  resize: vertical;
}
.modal:not([hidden]) .modal-card { animation: popIn .18s ease-out both; }

/* ── Posting page ────────────────────────────────────────────────────────── */
.delay > span { display: block; font-size: 14px; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--muted); margin: 2px 0 10px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: 0 0 auto; }
.studio .page { max-width: 980px; }
.studio-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.title-input {
  
  
  font-size: 26px !important;
  border-color: transparent !important;
  padding-left: 0 !important;
  background: transparent !important; font-family: var(--display); font-weight: 600; letter-spacing: -.03em; }
.title-input:hover { border-color: var(--line) !important; padding-left: 10px !important; }
.title-input:focus { border-color: var(--line) !important; padding-left: 10px !important; }
.delay { display: block; margin: 12px 0 18px; }
.creds { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 16px; }
.creds div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.creds dt { font-size: 13px; font-weight: 700; color: var(--muted); }
.creds .code { letter-spacing: .08em; }
.photos { margin-top: 12px; }
.photos-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 6px; }
.photos-head .section-title { margin: 0; }
.photos-head select { width: auto; min-width: 200px; flex: 0 1 auto; }
.pending-list { list-style: none; padding: 0; margin: 0; }
.post-list { list-style: none; padding: 0; margin: 0; }
.pending { display: flex; gap: 10px; align-items: center; color: var(--muted); padding: 8px 0; }
.pending.failed { color: var(--warn); }
.post-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.post-thumb { width: 112px; height: 112px; border-radius: 12px; object-fit: cover; background: var(--surface-2); }
.post-body input[type=text] { margin-bottom: 8px; min-height: 40px; }
.status { margin: 0; font-weight: 700; }
.status[data-k="live"] { color: var(--ok); }
.status[data-k="wait"] { color: var(--accent); }
.status[data-k="place"] { color: var(--warn); }
.status[data-k="manual"] { color: var(--warn); }
.status[data-k="hold"] { color: var(--warn); }
.post-body .muted.small { margin-bottom: 10px; }
.place-map { height: min(52vh, 460px); border-radius: 14px; overflow: hidden; }
.place-map .maplibregl-ctrl-bottom-right { bottom: 0; }
.suggest-wrap { position: relative; }
.finder { margin: 4px 0 10px; }
.finder input { border-color: var(--warn); }
.suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  list-style: none;
  margin: 0;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-height: 300px;
  overflow-y: auto;
}
.suggest li { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 8px; cursor: pointer; line-height: 1.3; }
.suggest li strong { font-weight: 700; }
.suggest li span { font-size: 14px; color: var(--muted); }
.suggest li.is-active { background: var(--surface-2); }
.suggest li:hover { background: var(--surface-2); }
.suggest li.none { cursor: default; color: var(--muted); }
.creds dd { margin: 2px 0 0; font-size: 20px; font-weight: 700; word-break: normal; overflow-wrap: anywhere; }
.fol-list { list-style: none; margin: 0; padding: 0; }
.fol-recent { list-style: none; margin: 0; padding: 0; }
.fol-row { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.fol-row:first-child { border-top: 0; }
.fol-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: 0 0 auto;
}
.fol-text { display: flex; flex-direction: column; min-width: 0; }
.fol-text .muted { margin: 0; }
.fol-sub { font-size: 15px; margin: 16px 0 6px; }
.fol-recent li { font-size: 14px; color: var(--muted); padding: 3px 0; }
.fol-recent li strong { color: var(--ink); }
#folClear { margin-top: 12px; }
.studio-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.studio-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.studio-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.studio-main > .photos { margin-top: 0; }
.settings { padding: 0; }
.settings > summary { list-style: none; cursor: pointer; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; }
.settings > summary::-webkit-details-marker { display: none; }
.settings > summary .section-title { margin: 0; }
.settings > summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2.5px solid var(--muted);
  border-bottom: 2.5px solid var(--muted);
  transform: rotate(45deg);
  margin-top: -4px;
  transition: transform .15s;
}
.settings[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.settings-part { padding: 4px 20px 20px; border-top: 1px solid var(--line); }
.settings-part .section-title { font-size: 18px; margin-top: 14px; }
.notes-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; }
.note {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border-radius: 12px;
  background: var(--surface-2);
}
.note.unread { box-shadow: inset 3px 0 0 var(--stamp); }
.note-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: var(--line);
  color: var(--muted);
  font-size: 20px;
}
.note-meta { margin: 0; font-size: 13px; color: var(--muted); }
.note-meta strong { color: var(--ink); font-size: 14px; }
.note-text { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-hearts { margin: 2px 0 6px; font-size: 14px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.heart-mini { color: #E0484D; font-size: 15px; }
.queue-note { margin: 8px 0; padding: 10px 14px; border-radius: 12px; background: #FFF4E0; color: #6B4A12; font-size: 15px; }
.quick-card { width: min(440px, 100%); gap: 12px; }
.quick-card img { width: 100%; max-height: 52vh; object-fit: contain; border-radius: 12px; background: var(--surface-2); }
.quick-where { margin: 0; color: var(--muted); font-size: 15px; }
#quickCaption {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  resize: none;
}
.quick-card .grow { flex: 1; }


@media (max-width: 760px) {
  .trip-bar .btn.post { color: var(--signal); }
  .trip-bar { left: 12px; right: 12px; transform: none; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 5px; }
  .trip-bar .btn { min-width: 0; min-height: 52px; flex-direction: column; padding: 6px 4px 5px; gap: 3px; border-radius: 11px; font-size: 11.5px; font-weight: 600; letter-spacing: 0; }
  .trip-bar .btn:not(.accent) { border-color: transparent; background: transparent; }
  .trip-bar .bi svg { width: 20px; height: 20px; }
  .trip-bar .bl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .lb-nav { display: none; }
  .fields { grid-template-columns: 1fr; }
  .live-card { grid-template-columns: 1fr; }
  .live-cover { min-height: 180px; max-height: 240px; }
  .maplibregl-ctrl-bottom-right { display: none; }
  .place-map .maplibregl-ctrl-bottom-right { display: block; }
  .post-row { grid-template-columns: 80px minmax(0, 1fr); padding: 12px; gap: 12px; }
  .post-thumb { width: 80px; height: 80px; }
  .thumb { width: 64px; height: 64px; }
  body[data-screen="trip"] .toast { bottom: calc(248px + env(safe-area-inset-bottom, 0px)); }
  .day-chip { font-size: 13px; padding: 3px 9px; min-height: 30px; }
  .page-head { padding-right: 0; }
  #home .page-head { margin-top: 44px; }
  #traveler .page-head { margin-top: 44px; }
  .gal-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .gal-item { border-radius: 6px; }
  .trip-bar { gap: 2px; }
  .trip-bar .btn { font-size: 14px; min-height: 38px; padding: 6px 10px; }
  .trip-meta { margin-left: 2px; }
  .studio-layout { grid-template-columns: 1fr; }
}

@media (max-width: 440px) {
  .creds { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .trip-bar .btn { padding: 6px 11px; }
  .trip-bar .bl { font-size: 14px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .new-pill .new-dot { animation: none; }
  .dot { animation: none; }
  .pin-head { transition: none; }
  .skeleton { animation: none; }
  .trip-card.loading #tripTitle { animation: none; }
  .screen.page:not([hidden]) { animation: none !important; }
  .gallery:not([hidden]) { animation: none !important; }
  .lightbox:not([hidden]) { animation: none !important; }
  .trip-menu:not([hidden]) { animation: none !important; }
  .pin.drop * { animation: none !important; }
  .replay-card.in { animation: none !important; }
  .modal:not([hidden]) .modal-card { animation: none !important; }
  .now-card { animation: none !important; }
  .new-pill { animation: none !important; }
  .lb-bars span.now::after { animation: none !important; }
}

/* ── Animations ────────────────────────────────────────────────────────── */
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(201, 58, 63, .5); } 70% { box-shadow: 0 0 0 9px rgba(201, 58, 63, 0); } 100% { box-shadow: 0 0 0 0 rgba(201, 58, 63, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulseW { 50% { opacity: .35; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(30px) rotate(4deg) scale(.9); } to { opacity: 1; transform: rotate(-2deg); } }
@keyframes heartPop { 0% { transform: scale(1); } 40% { transform: scale(1.5); } 100% { transform: scale(1); } }
@keyframes barFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes popIn { from { opacity: 0; transform: scale(.96) translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pinDrop { 0% { opacity: 0; transform: translateY(-22px) scale(.7); } 70% { opacity: 1; transform: translateY(2px) scale(1.04); } 100% { transform: none; } }
