/* Layout: phone-first app shell. Static header, fixed bottom tab bar on phones (sticky top bar on wide screens),
   one scrolling column of content, bottom sheets for forms. */
:root {
  --bg: #F2F4F8;
  --surface: #FFFFFF;
  --surface-2: #E8ECF3;
  --fg: #141F38;
  --muted: #5B6980;
  --line: #D3DAE5;
  --accent: #1E6E5A;          /* Otto Wagner green, Karlsplatz pavilion */
  --accent-soft: #D9EDE5;
  --accent-fg: #FFFFFF;
  --gold: #B2851A;            /* Secession gold */
  --gold-soft: #F5EBCF;
  --danger: #B23A48;
  --shadow: 0 10px 30px rgba(20, 31, 56, .14);
  --c-food: #C0392B; --c-cafe: #8A5A2B; --c-bar: #B5651D; --c-sight: #2B5C9E; --c-activity: #1F8A70; --c-museum: #7B4BA6;
  --c-nature: #2E7D4F; --c-shop: #C2537A; --c-market: #B2851A; --c-night: #4A4E9C; --c-stay: #5D6D7E; --c-transport: #607D8B; --c-other: #6B7280;
  --font-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --font-body: "Manrope", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --tabbar-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1420; --surface: #171F30; --surface-2: #212B40; --fg: #E8EDF6; --muted: #9DAAC0; --line: #2A3650;
    --accent: #4DB596; --accent-soft: #1A3B33; --accent-fg: #07130F; --gold: #E2B547; --gold-soft: #3A3014; --danger: #E5707F;
    --shadow: 0 10px 30px rgba(0,0,0,.5);
    --c-food: #EC7B6E; --c-cafe: #C89A6A; --c-bar: #E0A060; --c-sight: #7FA9E8; --c-activity: #5CC4A8; --c-museum: #B995E2;
    --c-nature: #6FC18F; --c-shop: #E98BB0; --c-market: #E2B547; --c-night: #9A9EE8; --c-stay: #A3B1C2; --c-transport: #9FB4C2; --c-other: #A3ABB8;
    color-scheme: dark;
  }
  .leaflet-tile-pane { filter: brightness(.7) invert(1) contrast(.85) hue-rotate(180deg) saturate(.55) brightness(.85); }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
html { padding-top: env(safe-area-inset-top, 0px); background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.app { min-height: 100%; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* Header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-block: 14px 12px; }
.eyebrow { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.top h1 { font-family: var(--font-display); font-weight: 500; font-size: 28px; line-height: 1.05; margin-top: 2px; }
.top h1 em { font-style: italic; color: var(--accent); }
.top .right { text-align: right; }
.countdown { font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.countdown strong { display: block; font-size: 22px; color: var(--fg); font-family: var(--font-display); font-weight: 500; line-height: 1; }
.status { font-size: 11px; color: var(--muted); font-weight: 700; display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; }
.status .led { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status.ok .led { background: var(--accent); }
.status.bad .led { background: var(--danger); }
.status.busy .led { background: var(--gold); }

/* Tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px)); }
.tabbar .tabs { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--tabbar-h); }
.tab-btn { background: none; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--muted); border-radius: 10px; }
.tab-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab-btn.active { color: var(--accent); }
@media (min-width: 768px) {
  .tabbar { position: sticky; top: 0; bottom: auto; border-top: 0; border-bottom: 1px solid var(--line); padding-bottom: 0; }
  .tabbar .tabs { height: 52px; }
  .tab-btn { flex-direction: row; gap: 8px; font-size: 14px; }
  .tab-btn svg { width: 18px; height: 18px; }
}

/* Main */
main { flex: 1; padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 24px); }
@media (min-width: 768px) { main { padding-bottom: 40px; } }
.tab { padding-block: 14px; }
.section-title { font-family: var(--font-display); font-weight: 500; font-size: 22px; margin-block: 18px 8px; }
.section-title:first-child { margin-top: 4px; }
.hint { color: var(--muted); font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.nowrap { flex-wrap: nowrap; }
.row.nowrap > input { flex: 1; min-width: 0; }
.row.end { justify-content: flex-end; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 140px; }

/* Controls */
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; line-height: 1.2; text-decoration: none; color: var(--fg); }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--accent); }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 5px 9px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 11px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip .dot { margin-right: 5px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c-other); vertical-align: middle; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.field input, .field select, .field textarea, .input, .textarea { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; font-size: 15px; }
.field textarea, .textarea { min-height: 72px; resize: vertical; }
.select-inline { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 5px 8px; font-size: 13px; font-weight: 600; }
.notice { background: var(--gold-soft); border: 1px solid var(--gold); color: var(--fg); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }

/* Here bar */
.herebar { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; flex-wrap: wrap; }
.herebar .pin { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.herebar.live .pin { animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--accent-soft); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.herebar .pin svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.herebar .txt { flex: 1; min-width: 120px; }
.herebar .txt small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.herebar .txt b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Place cards */
.cards { display: flex; flex-direction: column; gap: 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.card.visited { opacity: .72; }
.card .head { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.card .cat { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; flex: none; }
.card .main { flex: 1; min-width: 0; }
.card .name { font-weight: 800; font-size: 15.5px; }
.card.visited .name { text-decoration: line-through; }
.card .meta { color: var(--muted); font-size: 12.5px; margin-top: 1px; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.card .meta .when { color: var(--accent); font-weight: 700; }
.card .side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.card .side .source { margin-left: 0; vertical-align: 0; }
.card .dist { text-align: right; flex: none; font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.card .dist b { display: block; color: var(--fg); font-size: 14px; }
.card .note { margin-top: 6px; font-size: 13.5px; color: var(--fg); }
.card .note.clamp { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.card .more { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 10px; }
.card .more .row > span { font-size: 12px; color: var(--muted); font-weight: 700; }
.wants .chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; padding: 22px 16px; text-align: center; color: var(--muted); }
.empty b { color: var(--fg); display: block; font-size: 16px; margin-bottom: 4px; }

details.starter { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
details.starter summary { cursor: pointer; padding: 12px 0; font-weight: 800; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.starter summary::-webkit-details-marker { display: none; }
details.starter summary::after { content: "+"; font-size: 20px; color: var(--muted); }
details.starter[open] summary::after { content: "–"; }
.starter-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.starter-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.starter-item:last-child { border-bottom: 0; }
.starter-item .cat { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: none; }
.starter-item .t { flex: 1; min-width: 0; font-size: 13.5px; }
.starter-item .t b { display: block; font-size: 14px; }
.starter-item .t span { color: var(--muted); }
.fab { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 14px); z-index: 900;
  background: var(--accent); color: var(--accent-fg); border: 0; border-radius: 999px; padding: 12px 18px; font-weight: 800; font-size: 14px; box-shadow: var(--shadow); display: inline-flex; gap: 6px; align-items: center; }
@media (min-width: 768px) { .fab { bottom: 24px; } }

/* Map */
.mapbox { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
#map { width: 100%; height: min(64vh, 600px); background: var(--surface-2); }
#map.setmode { cursor: crosshair; }
.map-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--muted); }
.leaflet-container { font-family: var(--font-body); }
.leaflet-popup-content-wrapper { background: var(--surface); color: var(--fg); border-radius: 12px; box-shadow: var(--shadow); }
.leaflet-popup-tip { background: var(--surface); }
.leaflet-popup-content { margin: 10px 12px; font-size: 13.5px; line-height: 1.4; }
.leaflet-popup-content b { font-size: 14.5px; }
.leaflet-popup-content .row { margin-top: 8px; }
.leaflet-control-zoom a { background: var(--surface) !important; color: var(--fg) !important; border-color: var(--line) !important; }
.leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 80%, transparent) !important; color: var(--muted) !important; font-size: 10px !important; }
.leaflet-control-attribution a { color: var(--accent) !important; }
.hotel-icon { background: var(--surface); border: 2px solid var(--fg); border-radius: 6px; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--fg); box-shadow: var(--shadow); }

/* Days */
.day { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.day .dh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.day h3 { font-family: var(--font-display); font-weight: 500; font-size: 20px; }
.day h3 small { font-family: var(--font-body); font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-left: 6px; }
.day .facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fact { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--gold-soft); color: var(--fg); border: 1px solid var(--gold); }
.fact.calm { background: var(--surface-2); border-color: var(--line); color: var(--muted); }
.slot { margin-top: 10px; }
.slot h4 { margin: 0 0 4px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.slot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.slot li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.slot li .dot { flex: none; }
.slot li .x { margin-left: auto; }
.day textarea { width: 100%; margin-top: 10px; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 9px 11px; min-height: 56px; resize: vertical; font-size: 14px; }
.day .plan { margin-top: 10px; background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; white-space: pre-wrap; }
.day .plan .lbl { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 800; display: block; margin-bottom: 4px; }
.day .tools { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Ask */
.topics { display: flex; flex-wrap: wrap; gap: 6px; }
.sugs { display: flex; flex-direction: column; gap: 8px; }
.sug { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; display: flex; gap: 10px; align-items: flex-start; }
.sug .cat { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: none; }
.sug .t { flex: 1; min-width: 0; font-size: 13.5px; }
.sug .t b { display: block; font-size: 14.5px; }
.sug .t .area { color: var(--muted); font-size: 12.5px; }
.sug .t .tip { color: var(--muted); margin-top: 3px; font-size: 12.5px; }
.chat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; }
.msgs { padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 120px; max-height: 56vh; overflow-y: auto; }
.msg { max-width: 92%; border-radius: 14px; padding: 9px 12px; font-size: 14px; }
.msg.user { align-self: flex-end; background: var(--fg); color: var(--bg); border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.msg.bot.thinking { color: var(--muted); font-style: italic; }
.msg p { margin: 0 0 6px; } .msg p:last-child { margin: 0; }
.msg ul, .msg ol { margin: 0 0 6px; padding-left: 18px; }
.msg .places { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msg .places .btn { background: var(--surface); }
.msg .err { color: var(--danger); font-size: 12.5px; margin-top: 6px; }
.composer { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.composer input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: 15px; }
.quick-q { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 12px 10px; }
.chat-foot { display: flex; justify-content: space-between; align-items: center; padding: 0 10px 10px; gap: 8px; }

/* Info */
.info-block { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.info-block h3 { font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.info-block ul { margin: 0; padding-left: 18px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.info-block li b { font-weight: 700; }
.info-block li.row { list-style: none; margin-left: -18px; margin-top: 4px; }
.phr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 14px; }
.phr span { color: var(--muted); }

/* Sheets, toasts */
.sheet { position: fixed; inset: 0; z-index: 2000; background: rgba(10, 16, 30, .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet .panel { background: var(--surface); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
@media (min-width: 640px) { .sheet { align-items: center; } .sheet .panel { border-radius: 16px; max-height: 86vh; } }
.sheet h2 { font-family: var(--font-display); font-weight: 500; font-size: 22px; }
.loclist { display: flex; flex-direction: column; max-height: 36vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.loclist button { text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 9px 12px; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.loclist button:last-child { border-bottom: 0; }
.loclist button span { color: var(--muted); font-size: 12px; text-align: right; }
.loclist button small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.loclist button:hover { background: var(--surface-2); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 16px); z-index: 3000; background: var(--fg); color: var(--bg); padding: 10px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 600; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
@media (min-width: 768px) { .toast { bottom: 24px; } }
.banner { background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.banner .wrap { padding-block: 8px; }

/* Auth, trips list, members, sources */
.auth { display: flex; flex-direction: column; gap: 16px; max-width: 460px; margin: 10px auto 0; }
.auth-intro h2 { font-family: var(--font-display); font-weight: 500; font-size: 30px; line-height: 1.1; margin-bottom: 6px; }
.trip-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; cursor: pointer; text-align: left; width: 100%; color: inherit; }
.trip-card:hover { border-color: var(--accent); }
.trip-card .t { flex: 1; min-width: 0; }
.trip-card .t b { display: block; font-size: 16px; font-family: var(--font-display); font-weight: 500; font-size: 20px; }
.trip-card .t span { color: var(--muted); font-size: 13px; }
.trip-card .meta { text-align: right; font-size: 12px; color: var(--muted); flex: none; }
.phase { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.phase.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.phase.planning { background: var(--gold-soft); border-color: var(--gold); color: var(--fg); }
.group-title { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 800; margin-top: 8px; }
.member { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; flex-wrap: wrap; }
.member:last-child { border-bottom: 0; }
.member .who { flex: 1; min-width: 140px; }
.member .who small { display: block; color: var(--muted); font-size: 12px; }
.source { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--surface-2); color: var(--muted); text-decoration: none; vertical-align: -4px; margin-left: 2px; }
.source svg { width: 12px; height: 12px; display: block; }
.source.tiktok { background: #010101; color: #fff; }
.source.instagram { background: linear-gradient(135deg, #F58529 0%, #DD2A7B 55%, #8134AF 100%); color: #fff; }
.source.youtube { background: #FF0000; color: #fff; }
.source.claude { background: var(--accent-soft); color: var(--accent); }
a.source:hover { filter: brightness(1.1); }
.source-mini { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 4px; vertical-align: -3px; margin-right: 5px; background: var(--surface-2); color: var(--muted); }
.source-mini svg { width: 9px; height: 9px; display: block; }
.source-mini.tiktok { background: #010101; color: #fff; } .source-mini.instagram { background: #DD2A7B; color: #fff; } .source-mini.youtube { background: #FF0000; color: #fff; }
.quote { margin-top: 6px; padding: 8px 10px; border-left: 3px solid var(--gold); background: var(--gold-soft); border-radius: 0 8px 8px 0; font-size: 13px; }
.quote small { display: block; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 800; margin-bottom: 2px; }
.brief h4 { margin: 10px 0 4px; font-size: 14px; }
.brief ul { margin: 0; padding-left: 18px; font-size: 14px; display: flex; flex-direction: column; gap: 3px; }
.top .brand { min-width: 0; }
.top h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Legs, invites, admin panel */
.leg { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.leg:last-child { border-bottom: 0; }
.leg .n { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; }
.leg .t { flex: 1; min-width: 160px; }
.leg .t b { display: block; }
.leg .t small { display: block; color: var(--muted); font-size: 12.5px; }
.invite { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; flex-wrap: wrap; }
.invite:last-child { border-bottom: 0; }
.invite .t { flex: 1; min-width: 160px; }
.invite .t small { display: block; color: var(--muted); font-size: 12px; word-break: break-all; }
.invite-link { background: var(--surface-2); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; word-break: break-all; }
.city-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.day .where { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ok-note { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 10px; padding: 10px 12px; font-size: 13px; }

/* "Add a place" candidates */
.picks { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 12px; }
.picks .sug.pick { cursor: default; }
.picks .sug .t .addr { color: var(--muted); font-size: 12.5px; }
.picks .sug .t .kinds { color: var(--muted); font-size: 12px; margin-top: 2px; }
.picks .sug .t .kinds b { color: var(--fg); font-weight: 700; }
.picks .vhead { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.picks .vhead .source { position: static; }
.picks .sug.saved { opacity: .6; }

/* Tap-to-show explanations: a small "?" next to a title or label */
.info { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1; vertical-align: 2px; margin-left: 4px; padding: 0; cursor: help; font-family: var(--font-body, inherit); }
.info:hover { color: var(--fg); border-color: var(--fg); }
h2 .info { vertical-align: 6px; }
.spread.end { justify-content: flex-end; }

/* Photos */
.card .thumb { width: 54px; height: 54px; border-radius: 10px; flex: none; background: var(--surface-2) center/cover no-repeat; position: relative; display: grid; place-items: center; font-weight: 800; color: var(--muted); font-size: 18px; }
.card .thumb .cat { position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border: 2px solid var(--surface); border-radius: 50%; margin: 0; }
.card .head { align-items: flex-start; }
.trip-card { position: relative; overflow: hidden; }
.trip-card .cover { width: 64px; height: 64px; border-radius: 12px; flex: none; background: var(--surface-2) center/cover no-repeat; margin-right: 12px; }
.open { color: var(--ok, #1f7a4f); font-weight: 700; }
.closed { color: var(--danger, #b42318); font-weight: 700; }
/* Activity feed */
.activity { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font-size: 13px; }
.activity .line { display: flex; gap: 8px; align-items: baseline; }
.activity .line b { font-weight: 700; }
.activity .line .when { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }
.activity .line .dot-new { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; align-self: center; }
.activity .all { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.activity button.link { background: none; border: 0; color: var(--accent); font-weight: 700; padding: 0; font-size: 12.5px; }
/* Comments */
.comments { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 8px; }
.comments .c { font-size: 13px; margin-bottom: 6px; display: flex; gap: 6px; align-items: baseline; }
.comments .c b { font-weight: 700; }
.comments .c .when { color: var(--muted); font-size: 11.5px; }
.comments .c .x { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 12px; padding: 0 4px; }
.comments form { display: flex; gap: 6px; margin-top: 4px; }
.comments form input { flex: 1; min-width: 0; }
/* Votes */
.votes .chip.down.on { background: var(--surface-2); color: var(--fg); border-color: var(--line); text-decoration: line-through; }
/* Travel times between stops */
.day .leg-time { color: var(--muted); font-size: 12px; padding: 2px 0 2px 22px; }
.day .leg-time.err { color: var(--danger, #b42318); }
.daymode { display: flex; gap: 6px; }
