/* ============================================================
   EXPLORITE v3 — "Field Journal / The Planner"
   Paper, ink, hairlines, one terracotta accent.
   Radical departure from v1 (Shadowed Gilding dark baroque).
   ============================================================ */

:root {
  --paper: #F6F3EC;
  --paper-raise: #FDFBF6;
  --ink: #17140F;
  --ink-soft: #57503F;
  --ink-faint: #8C8471;
  --hairline: #DDD6C6;
  --hairline-dark: #17140F;
  --accent: #C0441F;          /* terracotta — reserved for primary action */
  --accent-ink: #FFF6EF;
  --verified: #33684B;        /* role: verified / "in" */
  --maybe: #B08215;           /* role: maybe */
  --serif: "Fraunces", Georgia, serif;
  --sans: "Karla", -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --col: 480px;
  --pad: 20px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 560px) {
  body { background:
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(23,20,15,0.035) 79px 80px),
    #EFEBE0; }
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

#app {
  max-width: var(--col);
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--paper);
  position: relative;
  padding-bottom: calc(84px + var(--sab));
}
@media (min-width: 560px) {
  #app { border-left: 1px solid var(--hairline); border-right: 1px solid var(--hairline); }
}

/* ---------- type utilities ---------- */
.kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.kicker.dark { color: var(--ink-soft); }
.display {
  font-family: var(--serif);
  font-weight: 560;
  font-variation-settings: "opsz" 90;
  line-height: 1.04;
  letter-spacing: -0.015em;
}
.rule { border: 0; border-top: 1px solid var(--hairline); }
.rule.dark { border-top: 1.5px solid var(--hairline-dark); }

/* ---------- masthead ---------- */
.masthead {
  padding: calc(14px + var(--sat)) var(--pad) 0;
  background: var(--paper);
  position: sticky; top: 0; z-index: 30;
}
.masthead-row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-bottom: 10px;
}
.masthead-brand {
  font-family: var(--serif);
  font-weight: 640;
  font-size: 24px;
  letter-spacing: -0.02em;
}
.masthead-brand em { font-style: italic; font-weight: 400; }
.masthead-issue { display: flex; gap: 12px; align-items: baseline; }
.avatar-btn {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--ink);
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  transform: translateY(7px);
  background: var(--paper-raise);
}
.masthead .rule.dark { margin: 0 calc(var(--pad) * -1) 0; border-top-width: 2px; }

/* city tabs */
.city-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--hairline); margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); background: var(--paper); }
.city-tab {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 12px 14px 10px; color: var(--ink-faint);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.city-tab.active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }

/* ---------- discover ---------- */
.section-pad { padding: 0 var(--pad); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px var(--pad) 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  padding: 7px 13px; border: 1px solid var(--hairline); border-radius: 999px;
  white-space: nowrap; color: var(--ink-soft); background: var(--paper-raise);
  transition: all .15s ease;
}
.chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* cover story */
.cover-story { display: block; width: calc(100% - (var(--pad) * 2)); margin: 14px var(--pad) 6px; position: relative; text-align: left; }
.cover-story .photo { aspect-ratio: 4 / 5; overflow: hidden; position: relative; }
.cover-story .photo img { width: 100%; height: 100%; object-fit: cover; }
.cover-num {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  background: var(--paper); padding: 5px 9px; text-transform: uppercase;
}
.cover-caption {
  border: 1px solid var(--hairline-dark); border-top: 0;
  background: var(--paper-raise); padding: 16px 16px 18px;
}
.cover-caption h2 { font-size: 30px; margin: 6px 0 8px; }
.cover-caption .sub { color: var(--ink-soft); font-size: 14.5px; line-height: 1.45; }
.cover-meta { display: flex; gap: 14px; margin-top: 12px; align-items: center; flex-wrap: wrap; }

.meta-mono { font-family: var(--mono); font-size: 11.5px; color: var(--ink-soft); }
.meta-mono b { color: var(--ink); font-weight: 600; }
.star { color: var(--ink); }

/* index rows */
.index-head { display: flex; justify-content: space-between; align-items: baseline; padding: 26px var(--pad) 8px; }
.index-row {
  display: grid; grid-template-columns: 34px 92px 1fr;
  gap: 14px; padding: 16px var(--pad);
  border-top: 1px solid var(--hairline);
  align-items: start;
  width: 100%; text-align: left;
}
.index-row:active { background: var(--paper-raise); }
.index-num { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); padding-top: 3px; }
.index-thumb { aspect-ratio: 1; object-fit: cover; width: 92px; filter: saturate(0.92); }
.index-body h3 { font-family: var(--serif); font-weight: 560; font-size: 18.5px; line-height: 1.15; letter-spacing: -0.01em; }
.index-body .tag { margin: 3px 0 7px; color: var(--ink-soft); font-size: 13px; line-height: 1.35; }
.trust-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--verified); border: 1px solid currentColor;
  padding: 3px 7px; margin-top: 8px;
}
.trust-chip::before { content: "✓"; font-weight: 700; }

/* ---------- detail ---------- */
.detail-hero { position: relative; }
.detail-hero img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.back-float {
  position: absolute; top: calc(12px + var(--sat)); left: 12px;
  background: var(--paper); border: 1px solid var(--ink);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  padding: 8px 12px; text-transform: uppercase;
}
.save-float {
  position: absolute; top: calc(12px + var(--sat)); right: 12px;
  background: var(--paper); border: 1px solid var(--ink);
  font-size: 15px; padding: 6px 11px;
}
.save-float.saved { background: var(--ink); color: var(--paper); }
.photo-credit {
  border-top: 1px solid var(--hairline-dark);
  border-bottom: 1px solid var(--hairline);
  padding: 8px var(--pad);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em;
  color: var(--ink-faint); text-transform: uppercase;
  display: flex; justify-content: space-between; gap: 10px;
}
.detail-head { padding: 20px var(--pad) 4px; }
.detail-head h1 { font-size: 33px; margin: 8px 0 8px; }
.detail-head .tagline { font-size: 15.5px; color: var(--ink-soft); line-height: 1.4; }
.badge-row { display: flex; flex-wrap: wrap; gap: 7px; padding: 14px var(--pad) 2px; }
.badge {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.07em; text-transform: uppercase;
  border: 1px solid var(--hairline-dark); padding: 4px 9px; color: var(--ink-soft);
}
.factline {
  display: flex; gap: 0; margin: 18px var(--pad) 0;
  border: 1px solid var(--hairline-dark);
}
.fact { flex: 1; padding: 10px 6px 12px; text-align: center; border-left: 1px solid var(--hairline); }
.fact:first-child { border-left: 0; }
.fact .v { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.fact .k { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); margin-top: 2px; }

/* trust module — the signature block */
.fieldnote {
  margin: 22px var(--pad) 0;
  background: var(--paper-raise);
  border: 1.5px solid var(--verified);
  padding: 16px 16px 15px;
  position: relative;
}
.fieldnote .stamp {
  position: absolute; top: -12px; right: 12px;
  background: var(--verified); color: #F2F7F1;
  font-family: var(--mono); font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 10px; transform: rotate(2deg);
}
.fieldnote h4 { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 17px; margin-bottom: 7px; }
.fieldnote p { font-size: 14px; line-height: 1.55; color: var(--ink-soft); }
.fieldnote .vetline { font-family: var(--mono); font-size: 10.5px; color: var(--verified); margin-top: 10px; letter-spacing: 0.04em; }

.detail-section { padding: 26px var(--pad) 0; }
.detail-section > .kicker { display: block; padding-bottom: 10px; border-bottom: 1px solid var(--hairline-dark); margin-bottom: 4px; }
.hl-row { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--hairline); font-size: 14.5px; line-height: 1.45; }
.hl-row .n { font-family: var(--mono); font-size: 11px; color: var(--accent); padding-top: 2px; }
.inc-list { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 12px; }
.meetline { padding-top: 12px; font-size: 14.5px; color: var(--ink-soft); }
.meetline b { color: var(--ink); }
.cancel-note { margin-top: 10px; font-family: var(--mono); font-size: 11px; color: var(--verified); }

/* host */
.host-card { display: flex; gap: 14px; align-items: flex-start; padding-top: 14px; }
.host-mark {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--ink); background: var(--paper-raise);
  font-family: var(--serif); font-size: 22px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.host-card h5 { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.host-card .line { font-size: 13.5px; color: var(--ink-soft); margin: 2px 0 4px; }
.host-card .yrs { font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.08em; }
.btn-ghost {
  display: inline-block; margin-top: 14px;
  border: 1.5px solid var(--ink); padding: 10px 16px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600;
  background: var(--paper-raise);
}
.btn-ghost:active { background: var(--ink); color: var(--paper); }

/* reviews */
.digest {
  background: var(--paper-raise); border: 1px solid var(--hairline-dark);
  padding: 14px 15px; margin-top: 14px;
}
.digest .lbl { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 8px; display: flex; justify-content: space-between; }
.digest blockquote { font-family: var(--serif); font-style: italic; font-size: 16.5px; line-height: 1.4; }
.digest cite { display: block; font-family: var(--mono); font-style: normal; font-size: 10.5px; color: var(--ink-soft); margin-top: 8px; }
.review { padding: 16px 0 14px; border-bottom: 1px solid var(--hairline); }
.review-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.review-head .who { font-weight: 700; font-size: 14px; }
.review-head .stars { font-size: 12px; letter-spacing: 1px; }
.review .vbadge {
  display: inline-block; font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--verified); margin: 3px 0 5px;
}
.review .vbadge::before { content: "✓ "; }
.review p { font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.review time { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); }

/* write review */
.rate-input { display: flex; gap: 6px; padding: 10px 0; font-size: 24px; }
.rate-input button { opacity: 0.25; transition: opacity .1s; }
.rate-input button.on { opacity: 1; }

/* sticky reserve bar */
.reserve-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%) translateY(110%);
  width: 100%; max-width: var(--col); z-index: 40;
  background: var(--paper-raise); border-top: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--pad) calc(12px + var(--sab));
  transition: transform .25s ease;
}
.reserve-bar.show { transform: translateX(-50%) translateY(0); }
.reserve-bar .price .v { font-family: var(--serif); font-size: 22px; font-weight: 640; }
.reserve-bar .price .k { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.08em; }
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 14px 26px; border: 1.5px solid var(--accent);
}
.btn-primary:active { filter: brightness(0.92); }
.btn-primary:disabled { opacity: 0.4; }
.btn-primary.wide { width: 100%; text-align: center; }

/* ---------- bottom sheet ---------- */
.sheet-scrim {
  position: fixed; inset: 0; background: rgba(23,20,15,0.45);
  z-index: 60; opacity: 0; transition: opacity .22s;
}
.sheet-scrim.open { opacity: 1; }
.sheet {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%) translateY(103%);
  width: 100%; max-width: var(--col); z-index: 61;
  background: var(--paper); border-top: 2px solid var(--ink);
  max-height: 88dvh; overflow-y: auto;
  padding: 18px var(--pad) calc(22px + var(--sab));
  transition: transform .28s cubic-bezier(.3,.9,.3,1);
}
.sheet.open { transform: translateX(-50%) translateY(0); }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.sheet-head h3 { font-family: var(--serif); font-size: 23px; font-weight: 600; }
.sheet-close { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); padding: 6px; }

.datestrip { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: none; }
.datestrip::-webkit-scrollbar { display: none; }
.datecell {
  flex: none; width: 58px; padding: 9px 0 10px; text-align: center;
  border: 1px solid var(--hairline); background: var(--paper-raise);
}
.datecell .dow { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); }
.datecell .dom { font-family: var(--serif); font-size: 19px; font-weight: 600; margin-top: 2px; }
.datecell.sel { background: var(--ink); border-color: var(--ink); }
.datecell.sel .dow, .datecell.sel .dom { color: var(--paper); }
.slotrow { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0 4px; }
.slotcell { font-family: var(--mono); font-size: 12px; padding: 9px 14px; border: 1px solid var(--hairline); background: var(--paper-raise); }
.slotcell.sel { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.stepper { display: flex; align-items: center; gap: 18px; padding: 10px 0; }
.stepper button {
  width: 40px; height: 40px; border: 1.5px solid var(--ink);
  font-size: 19px; font-weight: 600; background: var(--paper-raise);
}
.stepper button:disabled { opacity: 0.25; }
.stepper .n { font-family: var(--serif); font-size: 24px; font-weight: 640; min-width: 30px; text-align: center; }
.sheet .totalrow {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1.5px solid var(--ink); margin-top: 16px; padding-top: 13px; margin-bottom: 14px;
}
.sheet .totalrow .v { font-family: var(--serif); font-size: 25px; font-weight: 640; }
.sheet .lbl-gap { display: block; margin-top: 16px; }

/* ---------- ticket ---------- */
.ticket { margin: 14px 0 4px; filter: drop-shadow(0 2px 8px rgba(23,20,15,0.12)); }
.ticket-top {
  background: var(--paper-raise); border: 1.5px solid var(--ink); border-bottom: 0;
  padding: 16px 16px 14px; position: relative;
}
.ticket-top h4 { font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1.15; margin: 5px 0 3px; }
.ticket-top .where { font-size: 13px; color: var(--ink-soft); }
.ticket-perf {
  height: 0; border-top: 2px dashed var(--hairline);
  margin: 0; position: relative; background: var(--paper-raise);
  border-left: 1.5px solid var(--ink); border-right: 1.5px solid var(--ink);
}
.ticket-perf::before, .ticket-perf::after {
  content: ""; position: absolute; top: -8px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: 1.5px solid var(--ink);
}
.ticket-perf::before { left: -9px; clip-path: inset(0 0 0 50%); }
.ticket-perf::after { right: -9px; clip-path: inset(0 50% 0 0); }
.ticket-bottom {
  background: var(--paper-raise); border: 1.5px solid var(--ink); border-top: 0;
  padding: 13px 16px 15px; display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.ticket-bottom .code { font-family: var(--mono); font-size: 21px; font-weight: 600; letter-spacing: 0.14em; }
.ticket-bottom .when { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); text-align: right; line-height: 1.5; }
.ticket-cancelled { opacity: 0.45; }
.ticket-cancelled .code { text-decoration: line-through; }
.ticket-status { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--verified); }
.ticket-status.off { color: var(--ink-faint); }

/* ---------- plans ---------- */
.plan-card { border: 1.5px solid var(--ink); background: var(--paper-raise); margin-top: 14px; }
.plan-card .top { padding: 14px 15px 12px; border-bottom: 1px solid var(--hairline); }
.plan-card h4 { font-family: var(--serif); font-size: 19px; font-weight: 600; margin-top: 4px; }
.plan-grid { width: 100%; border-collapse: collapse; }
.plan-grid th, .plan-grid td { border-top: 1px solid var(--hairline); padding: 9px 8px; font-size: 12.5px; text-align: left; }
.plan-grid th { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-faint); font-weight: 500; }
.plan-grid .tally { font-family: var(--mono); font-size: 11px; }
.tally .in { color: var(--verified); font-weight: 600; }
.tally .maybe { color: var(--maybe); }
.tally .out { color: var(--ink-faint); }
.plan-lead { font-family: var(--mono); font-size: 10px; color: var(--verified); text-transform: uppercase; letter-spacing: 0.08em; }
.plan-actions { display: flex; gap: 8px; padding: 12px 15px 14px; flex-wrap: wrap; }

/* vote page */
.vote-slot {
  border: 1px solid var(--hairline-dark); background: var(--paper-raise);
  padding: 13px 14px; margin-top: 10px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.vote-slot .when { font-family: var(--serif); font-size: 16.5px; font-weight: 600; }
.vote-slot .who { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); margin-top: 3px; }
.vote-btns { display: flex; gap: 6px; }
.vote-btn { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; border: 1px solid var(--hairline-dark); padding: 8px 10px; background: var(--paper); }
.vote-btn.sel-in { background: var(--verified); border-color: var(--verified); color: #F2F7F1; }
.vote-btn.sel-maybe { background: var(--maybe); border-color: var(--maybe); color: #FFF9EC; }
.vote-btn.sel-out { background: var(--ink-faint); border-color: var(--ink-faint); color: var(--paper); }

/* ---------- inbox / chat ---------- */
.thread-row {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 13px; align-items: center;
  padding: 15px var(--pad); border-top: 1px solid var(--hairline); width: 100%; text-align: left;
}
.thread-row img { width: 52px; height: 52px; object-fit: cover; border-radius: 50%; border: 1px solid var(--hairline-dark); }
.thread-row .who { font-weight: 700; font-size: 14.5px; }
.thread-row .last { font-size: 13px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.thread-row time { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); }

.chat-screen { display: flex; flex-direction: column; height: 100dvh; max-height: 100dvh; }
.chat-head {
  display: flex; gap: 12px; align-items: center;
  padding: calc(10px + var(--sat)) var(--pad) 10px;
  border-bottom: 1.5px solid var(--ink); background: var(--paper-raise);
}
.chat-head .back { font-family: var(--mono); font-size: 18px; padding: 4px 8px 4px 0; }
.chat-head .who { font-weight: 700; }
.chat-head .sub { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); }
.chat-body { flex: 1; overflow-y: auto; padding: 16px var(--pad); display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 78%; padding: 10px 13px; font-size: 14.5px; line-height: 1.45; }
.bubble.user { align-self: flex-end; background: var(--ink); color: var(--paper); }
.bubble.host { align-self: flex-start; background: var(--paper-raise); border: 1px solid var(--hairline-dark); }
.bubble time { display: block; font-family: var(--mono); font-size: 9px; opacity: 0.55; margin-top: 4px; }
.typing { align-self: flex-start; font-family: var(--mono); font-size: 11px; color: var(--ink-faint); padding: 6px 2px; }
.typing::after { content: "…"; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.2; } }
.chat-input {
  display: flex; gap: 9px; padding: 10px var(--pad) calc(12px + var(--sab));
  border-top: 1.5px solid var(--ink); background: var(--paper-raise);
}
.chat-input input {
  flex: 1; border: 1px solid var(--hairline-dark); background: var(--paper);
  padding: 11px 13px; font-size: 15px; outline: none;
}
.chat-input button { border: 1.5px solid var(--accent); background: var(--accent); color: var(--accent-ink); font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 0 16px; font-weight: 600; }

/* ---------- forms / auth ---------- */
.form-block { padding: 8px 0; }
.form-block label { display: block; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); margin: 14px 0 6px; }
.form-block input, .form-block textarea {
  width: 100%; border: 1px solid var(--hairline-dark); background: var(--paper-raise);
  padding: 13px 14px; font-size: 16px; outline: none;
}
.form-block input:focus, .form-block textarea:focus { border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.form-err { color: var(--accent); font-size: 13px; padding-top: 10px; min-height: 18px; }
.auth-flip { font-family: var(--mono); font-size: 11.5px; color: var(--ink-soft); text-decoration: underline; padding: 8px 0; }

/* ---------- page scaffolding ---------- */
.page-head { padding: calc(16px + var(--sat)) var(--pad) 0; }
.page-head h1 { font-size: 34px; margin: 6px 0 10px; }
.page-head .rule.dark { margin: 0; }
.empty {
  margin: 26px var(--pad); border: 1px dashed var(--hairline-dark);
  padding: 30px 22px; text-align: center;
}
.empty h4 { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 19px; margin-bottom: 7px; }
.empty p { font-size: 14px; color: var(--ink-soft); line-height: 1.5; }
.empty .btn-primary { margin-top: 16px; display: inline-block; }

/* saved grid */
.saved-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 18px var(--pad); }
.saved-card { text-align: left; }
.saved-card img { aspect-ratio: 1; object-fit: cover; width: 100%; border: 1px solid var(--hairline-dark); }
.saved-card h4 { font-family: var(--serif); font-size: 15px; font-weight: 600; line-height: 1.2; margin-top: 8px; }
.saved-card .m { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); margin-top: 3px; }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--col); z-index: 50;
  background: var(--paper-raise); border-top: 2px solid var(--ink);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: var(--sab);
}
@media (min-width: 560px) { .tabbar { border-left: 1px solid var(--hairline); border-right: 1px solid var(--hairline); } }
.tab {
  padding: 10px 0 9px; text-align: center;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-faint); display: flex; flex-direction: column; gap: 3px; align-items: center;
}
.tab svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.tab.active { color: var(--ink); font-weight: 600; }

/* ---------- toast ---------- */
#toast-root { position: fixed; bottom: calc(96px + var(--sab)); left: 0; right: 0; display: flex; justify-content: center; z-index: 80; pointer-events: none; }
.toast {
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.03em;
  padding: 11px 18px; max-width: 90%;
  animation: toast-in .2s ease, toast-out .25s ease 2.4s forwards;
}
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(6px); opacity: 0; } }

/* ---------- splash ---------- */
.splash {
  position: fixed; inset: 0; z-index: 100; background: var(--paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; animation: splash-hide .45s ease 1.5s forwards;
}
.splash .word { font-family: var(--serif); font-size: 40px; font-weight: 640; letter-spacing: -0.02em; overflow: hidden; }
.splash .word span { display: inline-block; animation: rise .7s cubic-bezier(.2,.8,.2,1) both; }
.splash .word em { font-style: italic; font-weight: 400; }
.splash .sub { font-family: var(--mono); font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-faint); animation: fadein .6s ease .5s both; }
@keyframes rise { from { transform: translateY(110%); } }
@keyframes fadein { from { opacity: 0; } }
@keyframes splash-hide { to { opacity: 0; visibility: hidden; } }

/* skeleton */
.skel { background: linear-gradient(90deg, #ECE8DD 25%, #F3EFE5 50%, #ECE8DD 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
.skel-row { height: 92px; margin: 16px var(--pad); }
.skel-cover { aspect-ratio: 4/5; margin: 14px var(--pad); }

.fade-in { animation: fadein .3s ease both; }

/* ============================================================
   v3 — TRIP PLANNER
   ============================================================ */
.plan-pitch { color: var(--ink-soft); font-size: 14px; margin: 6px 0 2px; }
.btn-ghost.sm { margin-top: 0; padding: 8px 12px; font-size: 10.5px; }

/* trips home */
.trip-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 13px 0; border-bottom: 1px solid var(--hairline); }
.trip-card img { width: 74px; height: 74px; object-fit: cover; flex: none; }
.trip-card-main { flex: 1; min-width: 0; }
.trip-card-main h4 { font-family: var(--serif); font-size: 19px; font-weight: 600; margin: 2px 0; }
.trip-card-main .m { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }
.trip-card-arrow { font-size: 17px; color: var(--ink-faint); }

/* trip document */
.trip-hero { position: relative; height: 200px; overflow: hidden; }
.trip-hero img { width: 100%; height: 100%; object-fit: cover; }
.edit-float { position: absolute; top: calc(12px + var(--sat)); right: 12px; background: var(--paper); border: 1px solid var(--ink); font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; padding: 8px 12px; text-transform: uppercase; }
.trip-toolbar { display: flex; gap: 8px; padding: 12px var(--pad) 0; }

.sl-wrap { margin-top: 6px; }
.dayblock { margin-top: 16px; border: 1px solid var(--hairline); background: var(--paper-raise); }
.dayhead { display: flex; align-items: baseline; gap: 10px; padding: 12px 14px 6px; }
.day-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--di); flex: none; transform: translateY(0.5px); }
.day-n { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--di); }
.day-date { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.day-sub { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }
.day-intent { width: calc(100% - 28px); margin: 0 14px 8px; border: 0; border-bottom: 1px dashed var(--hairline); background: none; font-style: italic; font-family: var(--serif); font-size: 15px; padding: 4px 0 6px; color: var(--ink-soft); }
.day-intent:focus { outline: none; border-bottom-color: var(--ink); }
.day-intent::placeholder { color: var(--ink-faint); }

.stop-row { display: flex; gap: 10px; padding: 11px 14px; align-items: flex-start; cursor: pointer; border-top: 1px solid var(--hairline); }
.sl-wrap .stop-row { padding: 11px 0; }
.stop-num { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--di, #17140F); color: var(--di, #17140F); font-family: var(--mono); font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex: none; margin-top: 2px; background: var(--paper-raise); }
.stop-thumb { width: 44px; height: 44px; object-fit: cover; flex: none; }
.stop-main { flex: 1; min-width: 0; }
.stop-title { font-weight: 600; font-size: 15px; line-height: 1.35; }
.stop-time { font-family: var(--mono); font-size: 10.5px; background: var(--ink); color: var(--paper); padding: 2px 6px; margin-right: 8px; white-space: nowrap; }
.stop-meta { font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); margin-top: 2px; }
.stop-note { font-style: italic; color: var(--ink-soft); font-size: 13.5px; margin-top: 3px; }
.stop-ctl { display: flex; flex-direction: column; gap: 0; flex: none; }
.stop-ctl button { font-size: 13px; color: var(--ink-faint); padding: 1px 7px; }
.stop-ctl button:active { color: var(--ink); }

.walkline { font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); padding: 3px 14px 3px 47px; border-top: 1px dashed var(--hairline); }
.note-row { display: flex; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--hairline); cursor: pointer; font-style: italic; color: var(--ink-soft); font-size: 14px; align-items: baseline; }
.sl-wrap .note-row { padding: 10px 0; }
.note-mark { color: var(--ink-faint); flex: none; }
.fixed-row { display: flex; gap: 10px; padding: 11px 14px; border-top: 1px solid var(--hairline); background: #EDF2EC; cursor: pointer; align-items: flex-start; }
.fixed-stamp { width: 24px; height: 24px; border-radius: 50%; background: var(--verified); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; flex: none; margin-top: 2px; }
.day-empty { padding: 9px 14px 4px; color: var(--ink-faint); font-size: 13.5px; font-style: italic; border-top: 1px solid var(--hairline); }
.day-actions { display: flex; gap: 8px; padding: 10px 12px 12px; }

/* ledger */
.ledger-top { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 12px; }
.ledger-big { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.1; }
.ledger-big.over { color: var(--accent); }
.ledger-bar { height: 6px; background: var(--hairline); margin: 12px 0 8px; }
.ledger-fill { height: 100%; background: var(--verified); transition: width 0.4s; }
.ledger-fill.over { background: var(--accent); }
.ledger-split { margin: 2px 0 12px; }
.exp-row { display: flex; gap: 8px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--hairline); }
.exp-cat { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); width: 62px; flex: none; }
.exp-title { flex: 1; font-size: 14.5px; }
.exp-amt { font-family: var(--mono); font-size: 12px; }
.exp-del { color: var(--ink-faint); font-size: 12px; padding: 2px 5px; }

/* kit list */
.kit-row { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--hairline); }
.kit-row input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border: 1.5px solid var(--ink); flex: none; display: grid; place-content: center; background: var(--paper-raise); cursor: pointer; }
.kit-row input[type=checkbox]:checked::before { content: '✕'; font-size: 11px; font-family: var(--mono); }
.kit-row span { flex: 1; font-size: 14.5px; }
.kit-row.done span { text-decoration: line-through; color: var(--ink-faint); }
.kit-add { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.kit-add input { flex: 1; border: 0; border-bottom: 1px solid var(--hairline-dark); background: none; padding: 7px 0; }
.kit-add input:focus { outline: none; }

/* add-stop sheet */
.seg { display: flex; border: 1px solid var(--hairline-dark); margin: 14px 0 10px; }
.seg-btn { flex: 1; padding: 9px 0; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; }
.seg-btn.active { background: var(--ink); color: var(--paper); }
.pick-row { display: flex; gap: 10px; width: 100%; text-align: left; padding: 9px 0; border-bottom: 1px solid var(--hairline); align-items: center; }
.pick-row img { width: 46px; height: 46px; object-fit: cover; flex: none; }
.pick-row h5 { font-size: 14.5px; font-weight: 600; }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.geo-result { display: block; width: 100%; text-align: left; padding: 8px 0; border-bottom: 1px solid var(--hairline); font-size: 13.5px; }
.geo-picked { font-family: var(--mono); font-size: 11px; color: var(--verified); margin-top: 6px; }
select { width: 100%; border: 1px solid var(--hairline-dark); background: var(--paper-raise); padding: 10px 12px; }
input[type=date], input[type=time] { width: 100%; }

/* map */
.map-head { display: flex; align-items: center; justify-content: space-between; padding: calc(12px + var(--sat)) var(--pad) 10px; gap: 10px; }
.map-chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 var(--pad) 10px; scrollbar-width: none; }
.map-chips::-webkit-scrollbar { display: none; }
.map-chip { font-family: var(--mono); font-size: 11px; padding: 6px 11px; border: 1px solid var(--hairline-dark); white-space: nowrap; flex: none; background: var(--paper-raise); }
.map-chip.active { background: var(--ink); color: var(--paper); }
.map-chip[data-day]:not([data-day='all']):not([data-day='sl'])::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--di, transparent); margin-right: 6px; }
#tripmap { height: calc(100dvh - 200px); border-top: 1.5px solid var(--hairline-dark); }
#sharemap { height: 240px; margin-top: 16px; border-top: 1.5px solid var(--hairline-dark); border-bottom: 1px solid var(--hairline); }
.pin-wrap { background: none; border: 0; }
.pin { width: 26px; height: 26px; border-radius: 50%; background: var(--paper-raise); border: 2px solid var(--di, #17140F); color: var(--di, #17140F); font-family: var(--mono); font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(23, 20, 15, 0.3); }
.leaflet-container { font-family: var(--sans); background: #EFEBE0; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { border-radius: 2px; background: var(--paper-raise); color: var(--ink); box-shadow: 0 2px 10px rgba(23, 20, 15, 0.25); }
.leaflet-popup-content { font-size: 13px; font-family: var(--sans); }
