/* TravelMe — transit-signage identity.
   Palette: midnight indigo grounds, signal amber, sea teal.
   Type: Big Shoulders Display (signage), Hanken Grotesk (body), IBM Plex Mono (data). */

:root {
  --ground: #EDF0F8;
  --ground-2: #E1E6F4;
  --surface: #FFFFFF;
  --surface-2: #F5F7FD;
  --line: #CDD5EA;
  --line-2: #B4C0DC;
  --ink: #131A2E;
  --ink-2: #4A5779;
  --ink-3: #6E7C9E;
  --accent: #A85C06;
  --accent-ink: #FFFFFF;
  --accent-wash: #F7E7CE;
  --teal: #0B756D;
  --cat-see: #A85C06;
  --cat-eat: #BC4227;
  --cat-drink: #6244BE;
  --cat-shop: #0B756D;
  --cat-outdoors: #3E7530;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(19, 26, 46, .05), 0 12px 28px -18px rgba(19, 26, 46, .35);
  --water: #A9C4E8;
  --land: #E7EBF6;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #070B18;
    --ground-2: #0B1123;
    --surface: #101831;
    --surface-2: #17213F;
    --line: #222F52;
    --line-2: #2F3E68;
    --ink: #E9EDFB;
    --ink-2: #97A4C6;
    --ink-3: #6E7CA3;
    --accent: #FFB661;
    --accent-ink: #1A1206;
    --accent-wash: #33250F;
    --teal: #63D6C6;
    --cat-see: #FFB661;
    --cat-eat: #FF8A72;
    --cat-drink: #B49BFF;
    --cat-shop: #63D6C6;
    --cat-outdoors: #8FD27A;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 32px -20px rgba(0, 0, 0, .8);
    --water: #16305C;
    --land: #101831;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ground: #070B18;
  --ground-2: #0B1123;
  --surface: #101831;
  --surface-2: #17213F;
  --line: #222F52;
  --line-2: #2F3E68;
  --ink: #E9EDFB;
  --ink-2: #97A4C6;
  --ink-3: #6E7CA3;
  --accent: #FFB661;
  --accent-ink: #1A1206;
  --accent-wash: #33250F;
  --teal: #63D6C6;
  --cat-see: #FFB661;
  --cat-eat: #FF8A72;
  --cat-drink: #B49BFF;
  --cat-shop: #63D6C6;
  --cat-outdoors: #8FD27A;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 32px -20px rgba(0, 0, 0, .8);
  --water: #16305C;
  --land: #101831;
  color-scheme: dark;
}

* { box-sizing: border-box; }

/* The artifact host ships this; a standalone page needs it too, or `hidden`
   loses to any display rule (.btn is inline-flex). */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }

.mono {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.wrap {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 30px);
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-in {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  flex-wrap: wrap;
  padding-block: 9px;
}

.mark {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: "Big Shoulders Display", "Hanken Grotesk", sans-serif;
  font-weight: 700;
  font-size: 27px;
  letter-spacing: .01em;
  line-height: 1;
}

.mark svg { width: 22px; height: 22px; color: var(--accent); flex: none; }

.trips {
  display: flex;
  gap: 6px;
  flex: 1 1 260px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: 2px;
}
.trips::-webkit-scrollbar { display: none; }

.trip-tab {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, background .15s;
}
.trip-tab:hover { border-color: var(--line-2); }
.trip-tab[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--accent-wash);
}
.trip-tab .tt-days {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.trip-tab[aria-selected="true"] .tt-days { color: var(--accent); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: background .15s, border-color .15s, transform .08s;
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); filter: brightness(1.07); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn-icon { padding: 6px; width: 30px; height: 30px; }
.btn svg { width: 15px; height: 15px; flex: none; }

:where(a, button, input, select, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  margin-top: 18px;
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-height: 470px;
  display: flex;
  flex-direction: column;
}

.hero-sky {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 78% at 70% 100%, var(--sky-3) 0%, transparent 58%),
    linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 62%, var(--sky-3) 100%);
}

.hero-stars { position: absolute; inset: 0; z-index: -2; opacity: .5; }

.tm-skyline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: -1;
  color: var(--sky-ink);
  display: block;
}
.tm-skyline svg { display: block; width: 100%; height: auto; }
.tm-skyline .sl-far { opacity: .32; }
.tm-skyline .sl-mid { opacity: .6; }
.tm-skyline .sl-near { opacity: 1; }
.tm-skyline [stroke-width] { stroke: currentColor; }
.tm-skyline .sl-cross { fill: none; stroke-linecap: round; }
.tm-skyline .sl-window { fill: #FFCE8A; opacity: .62; }
.tm-skyline .sl-cut, .tm-skyline .sl-clock { fill: var(--sky-lit); opacity: .8; }
.tm-skyline .sl-arch { fill: var(--sky-lit); opacity: .42; }

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px clamp(18px, 3vw, 30px) 0;
}

.hero-city {
  font-family: "Big Shoulders Display", "Hanken Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(54px, 9vw, 104px);
  line-height: .86;
  letter-spacing: -.005em;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .35);
}
.hero-sub {
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
  max-width: 42ch;
  margin-top: 8px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .45);
}
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.glass {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .26);
  background: rgba(10, 14, 30, .34);
  backdrop-filter: blur(9px);
  color: #fff;
  padding: 5px 11px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.glass b { font-weight: 600; }

.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-actions .btn {
  background: rgba(10, 14, 30, .38);
  border-color: rgba(255, 255, 255, .3);
  color: #fff;
  backdrop-filter: blur(9px);
}
.hero-actions .btn:hover { background: rgba(10, 14, 30, .56); border-color: #fff; }

.hero-bottom {
  margin-top: auto;
  padding: 26px clamp(18px, 3vw, 30px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 64px;
  background: linear-gradient(180deg, transparent, rgba(6, 9, 20, .34) 42%, rgba(6, 9, 20, .72));
}

.countdown { display: flex; gap: clamp(8px, 1.6vw, 18px); }

.cd-unit { text-align: center; min-width: 62px; }
.cd-num {
  font-family: "Big Shoulders Display", sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 7vw, 76px);
  line-height: .84;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .4);
}
.cd-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
  margin-top: 7px;
}
.cd-sep {
  font-family: "Big Shoulders Display", sans-serif;
  font-size: clamp(30px, 5vw, 56px);
  color: rgba(255, 255, 255, .34);
  align-self: flex-start;
  line-height: 1;
}

.hero-status { text-align: right; color: #fff; }
.hero-status .big {
  font-family: "Big Shoulders Display", sans-serif;
  font-size: 30px;
  line-height: 1;
  font-weight: 500;
}
.hero-status .small { color: rgba(255, 255, 255, .74); font-size: 12.5px; margin-top: 4px; }

/* ---------- layout ---------- */

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}
.col { display: grid; gap: 18px; align-content: start; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.panel-title {
  font-family: "Big Shoulders Display", sans-serif;
  font-weight: 700;
  font-size: 25px;
  line-height: 1;
  letter-spacing: .005em;
}
.panel-note { color: var(--ink-3); font-size: 12.5px; }

/* ---------- base / hotel ---------- */

.base {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 13px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.base-pin {
  width: 34px; height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
}
.base-pin svg { width: 17px; height: 17px; }
.base-name { font-weight: 600; font-size: 15.5px; }
.base-where { color: var(--ink-2); font-size: 13px; }
.base-coords { color: var(--ink-3); font-size: 11px; margin-top: 3px; }

/* ---------- lists ---------- */

.list { display: flex; flex-direction: column; }

.row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 11px 4px;
  border-top: 1px solid var(--line);
}
.row:first-child { border-top: 0; }

.row-idx {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
  border-radius: 6px;
  padding: 2px 0;
  background: var(--surface-2);
}
.row-name { font-weight: 600; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.row-sub { color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.row-end { display: flex; align-items: center; gap: 8px; }

.dist {
  text-align: right;
  font-family: "IBM Plex Mono", monospace;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}
.dist b { font-size: 14px; font-weight: 500; }
.dist span { display: block; font-size: 10.5px; color: var(--ink-3); }

.tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid currentColor;
  line-height: 1.6;
}
.c-see { color: var(--cat-see); }
.c-eat { color: var(--cat-eat); }
.c-drink { color: var(--cat-drink); }
.c-shop { color: var(--cat-shop); }
.c-outdoors { color: var(--cat-outdoors); }

.star { color: var(--accent); font-size: 12px; }

.empty {
  padding: 26px 16px;
  text-align: center;
  color: var(--ink-3);
  border: 1px dashed var(--line-2);
  border-radius: 12px;
  font-size: 13.5px;
}

/* ---------- filters ---------- */

.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.pill {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-size: 12.5px;
  color: var(--ink-2);
}
.pill:hover { border-color: var(--line-2); color: var(--ink); }
.pill[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}

/* ---------- recommendations ---------- */

.recs { display: grid; gap: 10px; }
.rec {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-left: 3px solid var(--rec-color, var(--accent));
}
.rec-name { font-weight: 600; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.rec-why { color: var(--ink-2); font-size: 12.5px; margin-top: 3px; }
.rec-reason {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--accent);
}
.rec-reason svg { width: 12px; height: 12px; }

/* ---------- map ---------- */

.map-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--land);
}
.map-wrap svg { display: block; width: 100%; height: auto; touch-action: manipulation; }
.map-water { fill: var(--water); stroke: var(--water); stroke-linejoin: round; stroke-linecap: round; }
.map-grid { stroke: var(--line); stroke-width: .6; opacity: .65; }
.map-dist {
  fill: var(--ink-3);
  font-family: "IBM Plex Mono", monospace;
  font-size: 8.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.map-link { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 3 3; opacity: .5; }
.map-pin { cursor: pointer; }
.map-pin circle { stroke: var(--surface); stroke-width: 1.5; }
.map-pin text { font-family: "IBM Plex Mono", monospace; font-size: 9px; fill: #fff; font-weight: 500; }
.map-pin.is-rec circle { opacity: .45; }
.map-pin:hover circle { stroke: var(--ink); }
.map-hotel-ring { fill: none; stroke: var(--accent); stroke-width: 1.2; opacity: .35; }
.map-hotel { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }

.map-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--ink-3);
}
.map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.map-legend i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; display: inline-block; }

.map-tip {
  position: absolute;
  pointer-events: none;
  background: var(--ink);
  color: var(--ground);
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 12px;
  transform: translate(-50%, -140%);
  white-space: nowrap;
  opacity: 0;
  transition: opacity .12s;
  z-index: 3;
}
.map-tip.on { opacity: 1; }

/* ---------- dialog ---------- */

dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  padding: 0;
  width: min(560px, calc(100vw - 32px));
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .6);
}
dialog::backdrop { background: rgba(6, 9, 20, .62); backdrop-filter: blur(3px); }
.dlg-head {
  padding: 18px 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.dlg-title { font-family: "Big Shoulders Display", sans-serif; font-weight: 700; font-size: 30px; line-height: 1; }
.dlg-body { padding: 16px 20px; display: grid; gap: 14px; max-height: min(66vh, 560px); overflow-y: auto; }
.dlg-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--surface-2);
  border-radius: 0 0 18px 18px;
}

.field { display: grid; gap: 6px; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.input {
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--ink);
}
.input:focus { border-color: var(--accent); outline: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.choice {
  text-align: left;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  cursor: pointer;
}
.choice:hover { border-color: var(--line-2); }
.choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-wash); }
.choice b { display: block; font-size: 14px; }
.choice span { color: var(--ink-3); font-size: 11.5px; }

.hint { color: var(--ink-3); font-size: 12px; }

/* ---------- misc ---------- */

.foot {
  margin: 26px 0 40px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 16px);
  background: var(--ink);
  color: var(--ground);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
  z-index: 60;
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .7);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 900px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: 360px; }
  .hero-bottom { align-items: flex-start; }
  .hero-status { text-align: left; }
}

@media (max-width: 560px) {
  .cd-unit { min-width: 0; }
  .cd-sep { display: none; }
  .countdown { gap: 14px; }
  .two { grid-template-columns: 1fr; }
  .row { grid-template-columns: 22px minmax(0, 1fr); }
  .row-end { grid-column: 2; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- route strip (multi-city) ---------- */

.route-panel { margin-top: 18px; }

.route {
  display: flex;
  align-items: stretch;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.route::-webkit-scrollbar { display: none; }

.leg {
  flex: none;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s;
}
.leg:hover { border-color: var(--line-2); }
.leg[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-wash); }
.leg[data-status="done"] { opacity: .55; }
.leg[data-status="now"] .leg-i { background: var(--accent); color: var(--accent-ink); }

.leg-i {
  width: 22px; height: 22px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--ink-2);
}
.leg-city { display: block; font-weight: 600; font-size: 14.5px; line-height: 1.2; }
.leg-when { display: block; font-size: 11px; color: var(--ink-3); margin-top: 1px; }

.leg-sep {
  display: grid;
  place-items: center;
  color: var(--ink-3);
  flex: none;
}
.leg-sep svg { width: 15px; height: 15px; }

/* ---------- wizard ---------- */

.crumbs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.crumb {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.crumb[aria-current="true"] { color: var(--accent); border-color: var(--accent); }

.city-group + .city-group { margin-top: 14px; }
.city-group .eyebrow { margin-bottom: 7px; }

.ord-head { margin: 16px 0 8px; }

.ord {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-top: 1px solid var(--line);
}
.ord:first-child { border-top: 0; }
.ord-i {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 6px;
  background: var(--accent-wash);
  color: var(--accent);
  font-size: 11px;
}
.ord-n { font-weight: 600; font-size: 14px; min-width: 0; }
.ord-c { display: block; font-weight: 400; font-size: 11.5px; color: var(--ink-3); }

.stepper { display: flex; align-items: center; gap: 6px; }
.stepper b { font-size: 12.5px; font-weight: 500; min-width: 26px; text-align: center; }

#wStep3 .choices { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }

/* ---------- view tabs ---------- */

.tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  flex: none;
}
.tabs button {
  padding: 5px 13px;
  border-radius: 7px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.tabs button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

#viewSocial { margin-top: 18px; }
#viewSocial .grid { margin-top: 0; }

/* ---------- sharing controls ---------- */

.me-card { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.me-name { font-family: "Big Shoulders Display", sans-serif; font-size: 26px; font-weight: 700; line-height: 1; }

.seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 3px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.seg-btn {
  padding: 8px 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.seg-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

.share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 2px;
  border-top: 1px solid var(--line);
}
.share-row:first-child { border-top: 0; }
.share-toggles { display: flex; gap: 6px; }

.preview { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.preview summary { cursor: pointer; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.prev-row { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.prev-row:last-child { border-bottom: 0; }

/* ---------- people ---------- */

.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  flex: none;
  background: var(--surface-2);
  object-fit: cover;
}
.avatar.sm { width: 28px; height: 28px; }

.friend {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px;
  border-top: 1px solid var(--line);
}
.friend:first-child { border-top: 0; }
.friend-n { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; }
.friend-n .hint { display: block; font-weight: 400; }

.person {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--surface-2);
}
.person + .person { margin-top: 12px; }
.person-head { display: flex; align-items: center; gap: 11px; }
.person-head > div { flex: 1; min-width: 0; }
.person-name { font-weight: 600; font-size: 15.5px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.person-status { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

.person-trip {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}
.stop {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  padding: 6px 0;
}
.stop-city { font-weight: 600; font-size: 14px; }
.stop-when { font-size: 11.5px; color: var(--ink-3); text-align: right; }
.stop-stay { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-2); }
.muted { color: var(--ink-3); font-style: italic; }

.overlap {
  margin-top: 11px;
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--accent-wash);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.past { margin-top: 11px; }
.past summary { cursor: pointer; font-size: 12.5px; color: var(--ink-3); }
.past-row { font-size: 13px; padding: 5px 0 0; color: var(--ink-2); }

#shareTripBtn[data-on="1"] { border-color: #fff; }

@media (max-width: 720px) {
  .tabs { order: 3; width: 100%; }
}

.avatar.ph {
  display: grid;
  place-items: center;
  font-family: "Big Shoulders Display", sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.avatar.sm.ph { font-size: 14px; }
