:root {
  --bg: #eceff4;
  --panel: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f7fa;
  --surface-3: #eef1f5;
  --border: #e5e8ee;
  --border-strong: #d3d8e1;
  --text: #3a4254;
  --muted: #6a7486;
  --faint: #98a2b3;
  --accent: #2f5bea;
  --accent-2: #4a73ff;
  --accent-ink: #ffffff;
  --accent-soft: #eaf0ff;
  --glow: 0 0 0 4px rgba(47, 91, 234, .16);
  --pill-bg: #ffffff;
  --pill-border: #e3e6ec;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow: 0 6px 20px -10px rgba(16, 24, 40, .12), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 16px 40px -16px rgba(16, 24, 40, .16), 0 2px 6px rgba(16, 24, 40, .04);
  --pin-ring: #ffffff;
  --danger: #e5484d;
  --ok: #16a34a;
  --radius: 16px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    
    --bg: #0c0c0d; --panel: #19191b; --surface: #222225; --surface-2: #1e1e21; --surface-3: #2a2a2e;
    --border: #2e2e33; --border-strong: #3c3c42; --text: #f4f4f5; --muted: #a3a3ab; --faint: #6e6e76;
    --accent: #6f8dff; --accent-2: #8aa2ff; --accent-ink: #0b1230; --accent-soft: rgba(111, 141, 255, .14);
    --glow: 0 0 0 3px rgba(111, 141, 255, .22);
    --pill-bg: #1a1a1c; --pill-border: #37373c;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow: 0 8px 24px -12px rgba(0, 0, 0, .55), 0 1px 3px rgba(0, 0, 0, .3);
    --shadow-lg: 0 18px 44px -16px rgba(0, 0, 0, .65); --pin-ring: #f4f4f5;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    
  --bg: #0c0c0d; --panel: #19191b; --surface: #222225; --surface-2: #1e1e21; --surface-3: #2a2a2e;
  --border: #2e2e33; --border-strong: #3c3c42; --text: #f4f4f5; --muted: #a3a3ab; --faint: #6e6e76;
  --accent: #6f8dff; --accent-2: #8aa2ff; --accent-ink: #0b1230; --accent-soft: rgba(111, 141, 255, .14);
  --glow: 0 0 0 3px rgba(111, 141, 255, .22);
  --pill-bg: #1a1a1c; --pill-border: #37373c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow: 0 8px 24px -12px rgba(0, 0, 0, .55), 0 1px 3px rgba(0, 0, 0, .3);
  --shadow-lg: 0 18px 44px -16px rgba(0, 0, 0, .65); --pin-ring: #f4f4f5;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; letter-spacing: -0.006em; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
.i { flex: none; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- buttons ---------- */
.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 520; font-size: 15px; border: 1px solid var(--border-strong); background: var(--surface); transition: background .15s, border-color .15s, transform .1s; white-space: nowrap; }
.btn:hover { border-color: var(--faint); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 1px 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn.primary:hover { background: var(--accent-2); }
.btn.accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--surface-3); }
.btn.block { width: 100%; height: 50px; border-radius: 14px; }
.btn.sm { height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.on { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.iconbtn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--muted); transition: background .15s, color .15s; }
.iconbtn:hover { background: var(--surface-3); color: var(--text); }
.iconbtn.outline { border: 1px solid var(--border); }

/* ---------- avatars ---------- */
.av { border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; flex: none; background: var(--surface-3); color: #1b1b1f; font-weight: 580; box-shadow: 0 0 0 2px var(--panel); }
.av-more { background: var(--accent-soft); color: var(--accent); font-weight: 580; }
.pile { display: inline-flex; align-items: center; }
.pile .av + .av { margin-left: -9px; }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w, 404px) 0 1fr; height: 100dvh; padding: 12px; column-gap: 6px; }
.resizer { position: relative; z-index: 15; cursor: col-resize; touch-action: none; }
.resizer::before { content: ''; position: absolute; top: 0; bottom: 0; left: -6px; width: 12px; }
.resizer::after { content: ''; position: absolute; top: 50%; left: -2.5px; width: 5px; height: 44px; margin-top: -22px; border-radius: 3px; background: var(--border-strong); opacity: 0; transition: opacity .15s, background .15s, height .15s; }
.app:hover .resizer::after { opacity: .7; }
.resizer:hover::after, .resizer.drag::after, .resizer:focus-visible::after { opacity: 1; background: var(--accent); height: 64px; margin-top: -32px; }
body.resizing { cursor: col-resize; user-select: none; }
body.resizing .mapwrap { pointer-events: none; }
.panel { background: var(--panel); border-radius: 24px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; border: 1px solid var(--border); }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 18px 18px 8px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 580; font-size: 19px; letter-spacing: -.02em; }
.logo-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.panel-head .spacer { flex: 1; }

.trip { margin: 10px 18px 4px; }
.trip-row { display: flex; gap: 12px; align-items: center; }
.trip h1 { margin: 0; font-size: 22px; line-height: 1.2; letter-spacing: -.025em; font-weight: 580; }
.trip-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; margin-top: 3px; flex-wrap: wrap; }
.trip-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.bubble .contrib { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.bubble { margin-top: 12px; background: var(--surface-2); border: 1px solid transparent; border-radius: 4px 16px 16px 16px; padding: 10px 14px; font-size: 14px; color: var(--text); }
.contrib { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.contrib b { color: var(--text); font-weight: 520; }

.search { position: relative; margin: 14px 18px 0; }
.search-box { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 8px 0 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.search-box:focus-within { border-color: var(--accent); box-shadow: var(--glow); }
.search-box input { flex: 1; border: 0; background: none; outline: none; min-width: 0; font-size: 15px; }
.search-box input::placeholder { color: var(--faint); }
.search-box .i { color: var(--faint); }
.kbd { font-size: 11.5px; color: var(--faint); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }
.results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 30; padding: 6px; max-height: 420px; overflow: auto; }
.result { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 10px; border-radius: 12px; }
.result:hover, .result.active { background: var(--surface-3); }
.result .r-name { font-weight: 520; font-size: 14.5px; }
.result .r-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result .r-body { flex: 1; min-width: 0; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 520; padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.results-foot { font-size: 11.5px; color: var(--faint); padding: 8px 10px 4px; display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--border); margin-top: 4px; }
.results-empty { padding: 14px; color: var(--muted); font-size: 14px; }

.controls { display: flex; gap: 8px; margin: 14px 18px 0; align-items: center; }
.controls-label { font-size: 13px; color: var(--muted); margin: 16px 18px 0; display: flex; gap: 8px; }
.seg { display: flex; padding: 3px; border-radius: 12px; background: var(--surface-3); flex: 1; }
.seg button { flex: 1; height: 34px; border-radius: 9px; font-size: 13.5px; font-weight: 520; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg .n { font-size: 11.5px; color: var(--faint); font-weight: 520; }
.select { position: relative; }
.select select { appearance: none; height: 40px; padding: 0 34px 0 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 13.5px; font-weight: 520; cursor: pointer; }

.chips { mask-image: linear-gradient(90deg, #000 88%, transparent); display: flex; gap: 6px; padding: 12px 18px 4px; overflow-x: auto; scrollbar-width: none; flex: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 10px; border-radius: 999px; border: 1px solid var(--border); font-size: 13px; font-weight: 520; color: var(--muted); white-space: nowrap; background: var(--surface); transition: all .15s; }
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip .cdot { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.chip.near { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.chip.near.live { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip.on { background: color-mix(in srgb, var(--c, var(--accent)) 14%, var(--surface)); color: var(--text); border-color: var(--c, var(--accent)); box-shadow: 0 0 0 1px var(--c, var(--accent)) inset; }
.chip .n { opacity: .6; font-weight: 520; }

.list { list-style: none; margin: 0; padding: 8px 10px 18px; overflow-y: auto; flex: 1; min-height: 0; }
.item { display: flex; align-items: center; gap: 13px; padding: 10px 12px; border-radius: 18px; cursor: pointer; border: 1.5px solid transparent; transition: background .15s, border-color .15s, box-shadow .15s; position: relative; }
.item:hover { background: var(--surface-2); }
.item.sel { border-color: var(--accent); background: var(--surface-2); box-shadow: 0 0 0 3px var(--accent-soft); }
.thumb { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; position: relative; background-size: cover; background-position: center; }
.thumb .thumb-av { position: absolute; right: -4px; bottom: -4px; }
.item-body { flex: 1; min-width: 0; }
.item-name { font-weight: 520; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.012em; }
.item-sub { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 1px; white-space: nowrap; overflow: hidden; }
.item-sub .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; flex: none; }
.item-sub .catname { font-weight: 520; }
.item-note { font-size: 13px; color: var(--muted); margin-top: 6px; display: flex; gap: 6px; align-items: flex-start; }
.item-note span { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.item-side { display: flex; align-items: center; }
.list .item + .item { margin-top: 4px; }
.love { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 5px; border-radius: 999px; border: 1px solid transparent; background: var(--surface-3) !important; font-size: 13px; font-weight: 580; color: var(--muted); background: var(--surface); transition: all .15s; }
.love:hover { border-color: var(--border-strong); color: var(--text); }
.love.on { color: #ff4d6d; border-color: rgba(255, 77, 109, .35); background: rgba(255, 77, 109, .08); }
.love.on .i { fill: currentColor; }
.love .pile .av { box-shadow: 0 0 0 2px var(--surface-3); }
.love-n { display: inline-flex; align-items: center; gap: 4px; }
.visited-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 580; color: var(--ok); }
.item.visited .thumb { filter: saturate(.35); opacity: .75; }
.empty { text-align: center; padding: 40px 24px; color: var(--muted); }
.empty-art { width: 64px; height: 64px; border-radius: 20px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin: 0 auto 14px; }
.empty h3 { color: var(--text); margin: 0 0 6px; font-size: 17px; }

.promo { display: flex; gap: 12px; align-items: center; margin: 14px 2px 4px; padding: 14px; border-radius: 18px; background: var(--accent-soft); font-size: 13.5px; color: var(--muted); }
.promo b { color: var(--text); font-size: 14.5px; }
.promo-art { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); flex: none; }

/* ---------- map ---------- */
.mapwrap { position: relative; border-radius: 24px; overflow: hidden; background: var(--surface-3); border: 1px solid var(--border); min-height: 0; }
#map { position: absolute; inset: 0; }
.mapwrap::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1; box-shadow: inset 0 0 90px 10px color-mix(in srgb, var(--bg) 55%, transparent); border-radius: inherit; }
.maplibregl-ctrl-attrib { font-size: 10px; background: color-mix(in srgb, var(--panel) 70%, transparent) !important; color: var(--faint); border-radius: 8px 0 0 0; }
.maplibregl-ctrl-attrib a { color: var(--muted) !important; }
.maplibregl-ctrl-attrib-button { display: none; }
.map-tools { position: absolute; right: 16px; top: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 5; }
.map-tools .group { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.map-tools .group button { width: 42px; height: 42px; display: grid; place-items: center; color: var(--text); }
.map-tools .group button + button { border-top: 1px solid var(--border); }
.map-tools .group button:hover { background: var(--surface-3); }
.map-top { position: absolute; left: 16px; top: 16px; z-index: 5; display: flex; gap: 8px; }
.map-pill { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow); font-weight: 520; font-size: 14px; }
.map-pill .i { color: var(--accent); }

/* pins */
.pin { position: absolute; display: flex; flex-direction: column; align-items: center; cursor: pointer; transform-origin: 50% 100%; will-change: transform; }
.pin-head { position: relative; width: 50px; height: 50px; border-radius: 50%; background: var(--cat, var(--pin-ring)); padding: 3px; box-shadow: 0 3px 8px rgba(0, 0, 0, .14); transition: transform .18s cubic-bezier(.3, 1.4, .5, 1), box-shadow .18s; }
.pin-head .pin-av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: block; box-shadow: none; }
.pin-head .pin-stack { position: absolute; left: -12px; bottom: -2px; }
.pin-head .pin-stack .av { box-shadow: 0 0 0 2px var(--pin-ring); }
.pin-cat { position: absolute; right: -6px; top: -6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 0 0 2.5px var(--pin-ring), 0 1px 3px rgba(0, 0, 0, .15); }
.pin-sat { position: absolute; width: 22px; height: 22px; border-radius: 50%; }
.pin-sat .av { display: block; box-shadow: 0 0 0 2px var(--pin-ring), 0 2px 5px rgba(0, 0, 0, .25); }
.pin-sat-1 { left: -8px; top: 27px; z-index: 1; }
.pin-sat-2 { left: -11px; top: 5px; }
.pin-label { position: absolute; top: calc(100% + 11px); left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 8px; background: var(--pill-bg); border: 1px solid var(--pill-border); font-size: 12px; font-weight: 580; color: var(--text); box-shadow: 0 2px 6px rgba(0, 0, 0, .08); white-space: nowrap; pointer-events: none; transition: opacity .15s; }
.pin-label .i { color: #ff4d6d; fill: #ff4d6d; }
.pin.nolabel .pin-label, .mapwrap.carded .pin.sel .pin-label { opacity: 0; }
.pin.nolabel .pin-label { visibility: hidden; }
.pin-label .pl-name { overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.pin-more { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); min-width: 26px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--pill-bg); color: var(--text); font-size: 11.5px; font-weight: 600; place-items: center; box-shadow: 0 0 0 2px var(--pin-ring), 0 2px 6px rgba(0,0,0,.2); }
.pin.sel .pin-more { background: var(--accent); color: var(--accent-ink); }
.pin:hover .pin-head { transform: scale(1.06); }
.pin:hover { z-index: 4; }
.pin.sel { z-index: 3; }
.pin.sel .pin-head { transform: scale(1.12); box-shadow: 0 0 0 3px var(--accent), 0 0 18px color-mix(in srgb, var(--accent) 35%, transparent), 0 4px 10px rgba(0, 0, 0, .14); }
.pin.sel .pin-label { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.pin.sel .pin-label .i { color: var(--accent-ink); fill: var(--accent-ink); }
.pin.visited .pin-head .pin-av { filter: grayscale(.5); }
.pin-visited { position: absolute; left: -5px; top: -5px; width: 20px; height: 20px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 2.5px var(--pin-ring); }
.pin.draft .pin-head { background: var(--accent); animation: bob 1.2s ease-in-out infinite; }
.pin.draft .pin-head .pin-inner { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.pin.dim, .cluster.dim { opacity: .12; pointer-events: none; transition: opacity .2s; }
@keyframes bob { 50% { transform: translateY(-5px); } }
@keyframes drop { 0% { transform: translateY(-40px) scale(.6); opacity: 0; } 60% { transform: translateY(4px) scale(1.05); opacity: 1; } 100% { transform: none; } }
.pin.new .pin-head { animation: drop .5s cubic-bezier(.3, 1.4, .5, 1); }
.cluster { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--cluster-bg, var(--accent)); color: var(--cluster-ink, var(--accent-ink)); font-weight: 580; font-size: 16px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent), 0 3px 8px rgba(0, 0, 0, .12); cursor: pointer; border: 3px solid var(--pin-ring); position: absolute; }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 22%, transparent); }

/* place card */
.card { position: absolute; z-index: 10; width: 372px; background: var(--panel); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .22s cubic-bezier(.2, 1, .4, 1); display: flex; flex-direction: column; max-height: calc(100% - 32px); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.card-scroll { overflow-y: auto; min-height: 0; }
.card { overflow: visible; }
.card-scroll { border-radius: 22px 22px 0 0; }
.card::before { content: ''; position: absolute; top: var(--caret, 50%); width: 16px; height: 16px; background: var(--panel); border: 1px solid var(--border); transform: translateY(-50%) rotate(45deg); z-index: -1; }
.card[data-side="right"]::before { left: -8px; border-right: 0; border-top: 0; }
.card[data-side="left"]::before { right: -8px; border-left: 0; border-bottom: 0; }
.card-photo { height: 150px; background-size: cover; background-position: center; position: relative; }
.card-close { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--panel) 85%, transparent); backdrop-filter: blur(8px); color: var(--text); z-index: 2; box-shadow: var(--shadow-sm); }
.card-head { display: flex; gap: 14px; align-items: center; padding: 20px 20px 0; }
.card-head .thumb { width: 56px; height: 56px; }
.card-title { font-size: 19px; font-weight: 580; letter-spacing: -.02em; line-height: 1.2; }
.card-sub { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.stats { display: flex; margin: 16px 20px 0; border: 1px solid var(--border); border-radius: 14px; }
.stat { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; height: 44px; font-size: 13.5px; font-weight: 520; white-space: nowrap; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat .i { color: var(--muted); }
.stat .heart { color: #ff4d6d; fill: #ff4d6d; }
.sect { padding: 18px 20px 0; }
.sect-title { font-size: 12px; font-weight: 580; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; display: flex; justify-content: space-between; }
.note { display: flex; gap: 10px; align-items: flex-start; }
.note + .note { margin-top: 14px; }
.note-body { flex: 1; min-width: 0; }
.note-who { font-size: 13.5px; font-weight: 580; display: flex; gap: 6px; align-items: baseline; }
.note-who .when { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.note-text { font-size: 14px; color: var(--text); margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-silent { align-items: center; font-size: 13.5px; color: var(--muted); font-weight: 500; }
.visit-box { margin: 18px 20px 0; border-radius: 16px; background: color-mix(in srgb, var(--ok) 10%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent); overflow: hidden; }
.visit-box img { width: 100%; max-height: 220px; object-fit: cover; display: block; }
.visit-box .vb { padding: 12px 14px; font-size: 14px; }
.visit-box .vb-title { font-weight: 580; color: var(--ok); font-size: 13px; display: flex; gap: 6px; align-items: center; }
.card-actions { display: flex; gap: 8px; padding: 18px 20px 20px; flex: none; }
.card-actions .btn { flex: 1; height: 48px; border-radius: 14px; }
.card-foot { display: flex; justify-content: center; gap: 4px; padding: 0 20px 14px; margin-top: -8px; }
.card-foot .btn { height: 32px; font-size: 13px; color: var(--faint); }

/* draft (adding a place) */
.field { display: block; margin-top: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 520; margin-bottom: 6px; color: var(--muted); }
.input, .textarea { width: 100%; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 12px 14px; outline: none; transition: border-color .15s, box-shadow .15s; font-size: 15px; }
.input:focus, .textarea:focus { border-color: var(--accent); box-shadow: var(--glow); }
.textarea { resize: none; min-height: 88px; line-height: 1.45; }
.catpick { display: flex; flex-wrap: wrap; gap: 6px; }
.catpick .chip { height: 32px; }
.catpick .chip.on { background: color-mix(in srgb, var(--c) 14%, var(--surface)); border-color: var(--c); color: var(--text); box-shadow: 0 0 0 1px var(--c) inset; }
.catpick .chip.on .i { color: var(--c); }

/* import */
.import-link { display: block; margin: 8px 2px 0; font-size: 12.5px; color: var(--muted); }
.import-link b { color: var(--accent); font-weight: 520; }
.sheet.wide { max-width: 560px; }
.imp-rows { margin-top: 14px; max-height: 42dvh; overflow-y: auto; border: 1px solid var(--border); border-radius: 16px; }
.imp-row { display: flex; gap: 12px; align-items: center; padding: 10px 12px; }
.imp-row + .imp-row { border-top: 1px solid var(--border); }
.imp-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.imp-row .thumb { width: 36px; height: 36px; }
.imp-row .r-body { flex: 1; min-width: 0; }
.imp-row select { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-size: 12.5px; padding: 4px 6px; }
.imp-row.miss { opacity: .55; }
.imp-status { font-size: 13px; color: var(--muted); margin-top: 10px; min-height: 18px; }

/* date range picker */
.drp { position: relative; }
.drp-field { width: 100%; height: 50px; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface-2); text-align: left; transition: border-color .15s, box-shadow .15s; }
.drp-field:hover { border-color: var(--faint); }
.drp-field[aria-expanded="true"] { border-color: var(--accent); box-shadow: var(--glow); }
.drp-ic { color: var(--muted); display: grid; }
.drp-text { flex: 1; font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drp-ph { color: var(--faint); font-weight: 400; }
.drp-n { margin-left: 6px; font-size: 12.5px; font-weight: 520; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; }
.drp-clear { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--faint); }
.drp-clear:hover { background: var(--surface-3); color: var(--text); }
.drp-pop { position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; width: 344px; max-width: calc(100vw - 32px); background: var(--panel); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 18px; animation: pop .2s cubic-bezier(.2, 1, .4, 1); }
.drp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.drp-nav { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--border); display: grid; place-items: center; color: var(--text); transition: background .15s, border-color .15s; }
.drp-nav:hover { background: var(--surface-3); border-color: var(--border-strong); }
.drp-nav .i { transform: rotate(90deg); }
.drp-nav.next .i { transform: rotate(-90deg); }
.drp-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 520; font-size: 15.5px; padding: 6px 10px; border-radius: 10px; }
.drp-title:hover { background: var(--surface-3); }
.drp-title .i { color: var(--muted); }
.drp-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 4px; }
.drp-dow { text-align: center; font-size: 12.5px; font-weight: 500; color: var(--faint); padding: 6px 0 8px; }
.drp-day { position: relative; height: 42px; display: grid; place-items: center; font-size: 14.5px; font-weight: 500; color: var(--text); }
.drp-day span { position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; transition: background .12s, color .12s; }
.drp-day:not(:disabled):hover span { background: var(--surface-3); }
.drp-day.out { color: var(--faint); }
.drp-day.past { color: var(--faint); opacity: .45; cursor: default; }
.drp-day.today span { color: var(--accent); font-weight: 580; }
.drp-day.today span::after { content: ''; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.drp-day.mid::before, .drp-day.has-end::before, .drp-day.has-start::before { content: ''; position: absolute; top: 1px; bottom: 1px; left: 0; right: 0; background: var(--accent-soft); }
.drp-day.has-end::before { left: 50%; }
.drp-day.has-start::before { right: 50%; }
.drp-day.start span, .drp-day.end span, .drp-day.start:hover span, .drp-day.end:hover span { background: var(--accent); color: var(--accent-ink); font-weight: 580; }
.drp-day.start span::after, .drp-day.end span::after { background: var(--accent-ink); }
.drp-day.preview.end span { background: color-mix(in srgb, var(--accent) 70%, transparent); }
.drp-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px 0 6px; }
.drp-months button { height: 48px; border-radius: 12px; font-size: 15px; font-weight: 500; }
.drp-months button:hover:not(:disabled) { background: var(--surface-3); }
.drp-months button.now { color: var(--accent); font-weight: 580; }
.drp-months button.on { background: var(--accent); color: var(--accent-ink); font-weight: 580; }
.drp-months button:disabled { color: var(--faint); opacity: .45; cursor: default; }
.drp-foot { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--border); }
.drp-hint { flex: 1; font-size: 13px; color: var(--muted); }

/* inline identity */
.idblock { margin-top: 14px; padding: 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.id-row { display: flex; gap: 12px; align-items: center; }
.id-pic { width: 76px; height: 76px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 580; cursor: pointer; color: var(--muted); transition: border-color .15s, color .15s; }
.id-pic:hover { border-color: var(--accent); color: var(--accent); }
.id-fields { flex: 1; display: grid; gap: 8px; min-width: 0; }
.id-fields .input { height: 34px; padding: 6px 12px; font-size: 14px; background: var(--surface); }
.id-hint { font-size: 12.5px; color: var(--muted); margin: 10px 2px 0; line-height: 1.4; }
.linkbtn { color: var(--accent); font-weight: 520; font-size: 12.5px; }
.posting { margin-top: 12px; }
.posting .linkbtn { margin-left: auto; }
.compose .textarea { margin-top: 0; }
.card .err:empty { display: none; }

/* sheets */
.overlay { position: fixed; inset: 0; background: rgba(8, 10, 14, .55); backdrop-filter: blur(4px); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--border); border-radius: 26px; box-shadow: var(--shadow-lg); padding: 26px; animation: pop .25s cubic-bezier(.2, 1, .4, 1); max-height: calc(100dvh - 32px); overflow-y: auto; position: relative; }
.sheet h2 { margin: 0; font-size: 22px; letter-spacing: -.025em; line-height: 1.2; }
.sheet .lead { color: var(--muted); margin: 8px 0 0; font-size: 14.5px; }
.sheet .x { position: absolute; right: 14px; top: 14px; }
.sheet .actions { display: flex; gap: 10px; margin-top: 22px; }
.sheet .actions .btn { flex: 1; height: 50px; border-radius: 14px; }
.selfie { display: flex; gap: 16px; align-items: center; margin-top: 20px; }
.selfie-pic { width: 84px; height: 84px; border-radius: 50%; flex: none; background: var(--surface-3); display: grid; place-items: center; color: var(--faint); overflow: hidden; border: 2px dashed var(--border-strong); }
.selfie-pic img { width: 100%; height: 100%; object-fit: cover; }
.selfie-pic.has { border: 3px solid var(--accent); }
.selfie-btns { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.selfie-btns .btn { height: 40px; font-size: 14px; justify-content: flex-start; }
.err { color: var(--danger); font-size: 13.5px; margin-top: 12px; min-height: 1px; }
.fineprint { font-size: 12px; color: var(--faint); margin-top: 12px; }
.dropzone { margin-top: 16px; border: 1.5px dashed var(--border-strong); border-radius: 16px; min-height: 140px; display: grid; place-items: center; color: var(--muted); cursor: pointer; overflow: hidden; background: var(--surface-2); text-align: center; font-size: 14px; }
.dropzone img { width: 100%; max-height: 260px; object-fit: cover; display: block; }
.recips { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); font-size: 14px; }
.share-link { display: flex; gap: 8px; margin-top: 18px; }
.share-link .input { font-size: 14px; }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.share-grid a, .share-grid button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 14px; border: 1px solid var(--border); font-size: 12.5px; font-weight: 520; text-decoration: none; color: var(--text); }
.share-grid a:hover, .share-grid button:hover { background: var(--surface-3); }
.owner-note { margin-top: 18px; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13.5px; color: var(--muted); }
.owner-note b { color: var(--text); }

/* camera */
.cam { position: fixed; inset: 0; background: #000; z-index: 200; display: grid; place-items: center; }
.cam-box { position: relative; width: min(92vw, 480px); }
.cam video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; transform: scaleX(-1); display: block; }
.cam-ring { position: absolute; inset: 0; aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .8); pointer-events: none; }
.cam-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; }
.cam .btn.ghost { color: #fff; width: 76px; }
.shutter { width: 72px; height: 72px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px #000, 0 0 0 7px #fff; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; background: var(--text); color: var(--panel); padding: 12px 18px; border-radius: 14px; font-weight: 520; font-size: 14px; z-index: 300; transition: all .25s; pointer-events: none; box-shadow: var(--shadow-lg); display: flex; gap: 8px; align-items: center; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.fab { display: none; }
.sheet-handle { display: none; }
.skeleton { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- mobile ---------- */
@media (max-width: 820px) {
  .app { display: block; padding: 0; height: 100dvh; position: relative; overflow: hidden; }
  .mapwrap { position: absolute; inset: 0; border-radius: 0; border: 0; }
  .resizer { display: none; }
  .panel { position: absolute; left: 0; right: 0; bottom: 0; height: 46dvh; border-radius: 24px 24px 0 0; z-index: 20; box-shadow: 0 -10px 40px rgba(0, 0, 0, .25); transition: height .3s cubic-bezier(.2, 1, .4, 1); border-bottom: 0; }
  .panel.full { height: calc(100dvh - 56px); }
  .panel.mini { height: 150px; }
  .sheet-handle { display: block; width: 100%; padding: 8px 0 2px; }
  .sheet-handle::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--border-strong); margin: 0 auto; }
  .panel-head { display: none; }
  .trip { margin-top: 6px; }
  .trip h1 { font-size: 19px; }
  .bubble { display: none; }
  .contrib { margin-top: 8px; }
  .search { margin-top: 12px; }
  .search-box { height: 48px; }
  .map-top { left: 12px; top: calc(12px + env(safe-area-inset-top)); right: 12px; }
  .map-top .map-pill:first-child { flex: 1; min-width: 0; }
  .map-tools { right: 12px; top: calc(66px + env(safe-area-inset-top)); }
  .card { left: 8px !important; right: 8px; top: auto !important; bottom: 8px; width: auto; max-height: 72dvh; z-index: 40; position: fixed; }
  .sheet { border-radius: 26px 26px 0 0; align-self: end; max-width: none; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); }
  .overlay { padding: 0; place-items: end stretch; }
  .item { padding: 10px; }
  .thumb { width: 46px; height: 46px; }
}

/* ---------- custom select ---------- */
.fsel { position: relative; }
.fsel-btn { height: 40px; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px 0 12px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 13.5px; font-weight: 520; white-space: nowrap; transition: border-color .15s, box-shadow .15s, background .15s; }
.fsel-btn:hover { border-color: var(--faint); }
.fsel-btn > .i:first-child { color: var(--accent); }
.fsel-chev { color: var(--muted); transition: transform .25s cubic-bezier(.2, 1, .4, 1); }
.fsel.open .fsel-chev { transform: rotate(180deg); }
.fsel.open .fsel-btn { border-color: var(--accent); box-shadow: var(--glow); }
.fsel-menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 196px; padding: 6px; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 35; opacity: 0; transform: translateY(-6px) scale(.96); transform-origin: top right; pointer-events: none; visibility: hidden; transition: opacity .16s ease, transform .22s cubic-bezier(.2, 1, .4, 1), visibility 0s .22s; outline: none; }
.fsel.open .fsel-menu { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .16s ease, transform .22s cubic-bezier(.2, 1, .4, 1), visibility 0s; }
.fsel-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px 7px 7px; border-radius: 11px; font-size: 14px; font-weight: 500; text-align: left; color: var(--text); }
.fsel-opt.active { background: var(--surface-3); }
.fsel-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); transition: background .15s, color .15s; }
.fsel-opt.active .fsel-ic { background: var(--surface); }
.fsel-opt.on .fsel-ic { background: var(--accent-soft); color: var(--accent); }
.fsel-opt.on { font-weight: 520; }
.fsel-label { flex: 1; }
.fsel-check { color: var(--accent); }

/* ---------- form controls ---------- */
input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border-strong); background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; flex: none; margin: 0; transition: background .15s, border-color .15s, transform .1s; }
input[type=checkbox]::after { content: ''; width: 10px; height: 6px; border: 2px solid var(--accent-ink); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .18s cubic-bezier(.3, 1.6, .5, 1); }
input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); }
input[type=checkbox]:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
input[type=checkbox]:active { transform: scale(.92); }
input[type=checkbox]:disabled { opacity: .4; cursor: default; }
.imp-row select { appearance: none; -webkit-appearance: none; padding: 6px 26px 6px 10px; border-radius: 9px; font-weight: 520; font-size: 12.5px; color: var(--text); cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center; }
.btn.danger { background: var(--danger); color: #fff; border-color: transparent; }
.sheet.confirm { max-width: 400px; }

/* ---------- motion ---------- */
.seg { position: relative; isolation: isolate; }
.seg::before { content: ''; position: absolute; z-index: -1; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 9px; background: var(--surface); box-shadow: var(--shadow-sm); transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .32s cubic-bezier(.2, 1, .3, 1); }
.seg button.on { background: transparent; box-shadow: none; }
.seg button { transition: color .2s; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.list.stagger .item, .list.stagger .promo { animation: rise .38s cubic-bezier(.2, 1, .4, 1) both; animation-delay: var(--d, 0ms); }

@keyframes appear { from { opacity: 0; transform: translateY(6px) scale(.6); } 70% { opacity: 1; } }
.pin.appear .pin-head { animation: appear .45s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: var(--d, 0ms); }
.pin.appear .pin-label { animation: fade .3s ease both; animation-delay: calc(var(--d, 0ms) + 200ms); }
.cluster { animation: appear .4s cubic-bezier(.3, 1.4, .5, 1) both; }

@keyframes burst { 0% { transform: scale(1); } 35% { transform: scale(1.18); } 65% { transform: scale(.94); } 100% { transform: scale(1); } }
@keyframes heartpop { 0% { transform: scale(1); } 40% { transform: scale(1.5); } 100% { transform: scale(1); } }
.love.burst { animation: burst .45s cubic-bezier(.3, 1.4, .5, 1); }
.love.burst .love-n .i { animation: heartpop .45s cubic-bezier(.3, 1.4, .5, 1); }

@keyframes leave { to { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes fadeout { to { opacity: 0; } }
.card.leaving, .sheet.leaving { animation: leave .18s ease-in forwards; pointer-events: none; }
.overlay.leaving { animation: fadeout .2s ease-in forwards; pointer-events: none; }
.overlay.leaving .sheet { animation: leave .18s ease-in forwards; }
.results { animation: pop .18s cubic-bezier(.2, 1, .4, 1); transform-origin: top center; }
.chip { transition: background .2s, color .2s, border-color .2s, transform .1s; }
.chip:active { transform: scale(.96); }
.item { transition: background .2s, border-color .2s, box-shadow .25s; }
html.theming, html.theming *, html.theming *::before, html.theming *::after { transition: background-color .4s ease, border-color .4s ease, color .3s ease, box-shadow .4s ease !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}

/* ---------- compact list toolbar ---------- */
.search-box { padding-right: 6px; }
.search-import { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 10px; border-radius: 10px; font-size: 12.5px; font-weight: 520; color: var(--muted); background: var(--surface); border: 1px solid var(--border); transition: color .15s, border-color .15s, background .15s; flex: none; }
.search-import:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 18px 0; border-bottom: 1px solid var(--border); }
.tabs { position: relative; display: flex; gap: 22px; }
.tabs button { height: 40px; font-size: 14px; font-weight: 520; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; transition: color .2s; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); }
.tabs .n { font-size: 12px; font-weight: 580; color: var(--faint); background: var(--surface-3); border-radius: 999px; padding: 1px 7px; min-width: 20px; text-align: center; }
.tabs .n:empty { display: none; }
.tabs button.on .n { color: var(--accent); background: var(--accent-soft); }
.tabs-bar { position: absolute; bottom: -1px; left: 0; height: 2.5px; border-radius: 2px; background: var(--accent); width: var(--w, 0); transform: translateX(var(--x, 0)); transition: transform .32s cubic-bezier(.2, 1, .3, 1), width .32s cubic-bezier(.2, 1, .3, 1); }
.fsel.quiet .fsel-btn { height: 34px; border: 0; background: transparent; padding: 0 6px 0 8px; font-size: 13px; color: var(--muted); border-radius: 10px; }
.fsel.quiet .fsel-btn:hover, .fsel.quiet.open .fsel-btn { background: var(--surface-3); color: var(--text); box-shadow: none; }
.fsel.quiet .fsel-btn > .i:first-child { color: var(--muted); }
.chips { padding-top: 12px; }
.chips + .list { padding-top: 6px; }

/* ---------- export sheet ---------- */
.exp-list { display: grid; gap: 10px; margin-top: 18px; }
.exp { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: 18px; transition: border-color .15s, background .15s; }
.exp:hover { border-color: var(--border-strong); background: var(--surface-2); }
.exp-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.exp-body { flex: 1; min-width: 0; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.exp-body > b { display: block; color: var(--text); font-size: 15px; margin-bottom: 2px; }
.exp-body li b { color: var(--text); }
.exp-body details { margin-top: 8px; }
.exp-body summary { cursor: pointer; color: var(--accent); font-weight: 520; font-size: 13px; list-style: none; }
.exp-body summary::-webkit-details-marker { display: none; }
.exp-body summary { display: inline-flex; align-items: center; gap: 6px; }
.exp-body summary::after { content: ''; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); margin-left: 2px; transition: transform .2s; }
.exp-body details[open] summary::after { transform: rotate(45deg) translate(-2px, -2px); }
.exp-body ol { margin: 8px 0 0; padding-left: 18px; }
.exp-body ol li + li { margin-top: 4px; }
.exp-body a { color: var(--accent); font-weight: 520; }
.exp .btn { flex: none; align-self: center; }
.exp-opt { display: flex; gap: 10px; align-items: center; margin-top: 16px; font-size: 14px; color: var(--muted); cursor: pointer; }
@media (max-width: 560px) { .exp { flex-wrap: wrap; } .exp .btn { width: 100%; } }

.exp-btn { color: var(--text); }
.exp-btn .i { color: var(--muted); }
.fsel.quiet .fsel-btn { padding: 0 2px; }
.fsel.quiet .fsel-btn:hover, .fsel.quiet.open .fsel-btn { background: transparent; color: var(--accent); }
.fsel.quiet .fsel-btn:hover > .i:first-child, .fsel.quiet.open .fsel-btn > .i:first-child { color: var(--accent); }

/* ---------- contribution cheer ---------- */
.cheer { position: fixed; left: 50%; bottom: 26px; z-index: 250; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 12px; width: min(520px, calc(100vw - 24px)); border-radius: 22px; background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: cheerin .55s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes cheerin { from { opacity: 0; transform: translate(-50%, 30px) scale(.9); } }
.cheer.leaving { animation: cheerout .22s ease-in forwards; }
@keyframes cheerout { to { opacity: 0; transform: translate(-50%, 16px) scale(.96); } }
.cheer-av { position: relative; flex: none; animation: wiggle .7s .25s ease-in-out; }
@keyframes wiggle { 25% { transform: rotate(-10deg) scale(1.08); } 50% { transform: rotate(8deg); } 75% { transform: rotate(-4deg); } }
.cheer-badge { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; background: #ff4d6d; color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 2.5px var(--panel); }
.cheer-body { flex: 1; min-width: 0; }
.cheer-body b { display: block; font-size: 15.5px; letter-spacing: -.01em; }
.cheer-body span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.cheer .btn { flex: none; }
@media (max-width: 560px) { .cheer { bottom: 12px; flex-wrap: wrap; } .cheer .btn { width: 100%; } }

/* ---------- photos with illustrated fallback ---------- */
.thumb { position: relative; }
.thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- search upload + import menu ---------- */
.search-up { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); flex: none; transition: background .15s, color .15s; }
.search-up:hover { background: var(--surface-3); color: var(--accent); }
.search-box input::placeholder { text-overflow: ellipsis; }
.imp-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 31; width: 280px; padding: 6px; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); animation: pop .18s cubic-bezier(.2, 1, .4, 1); transform-origin: top right; }
.imp-menu button { display: flex; gap: 12px; align-items: center; width: 100%; padding: 8px; border-radius: 11px; text-align: left; }
.imp-menu button:hover { background: var(--surface-3); }
.imp-menu b { display: block; font-size: 14px; }
.imp-menu small { display: block; font-size: 12.5px; color: var(--muted); }
.imp-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }

/* ---------- import modal ---------- */
.imp-steps { margin: 16px 0 0; padding-left: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.imp-steps li { counter-increment: s; position: relative; padding-left: 36px; min-height: 24px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.imp-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 580; font-size: 12.5px; display: grid; place-items: center; }
.imp-steps b { color: var(--text); }
.imp-steps a { color: var(--accent); font-weight: 520; }
.drop { margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px; border-radius: 18px; border: 1.5px dashed var(--border-strong); background: var(--surface-2); cursor: pointer; text-align: center; font-size: 14px; color: var(--muted); transition: border-color .15s, background .15s, transform .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop.over { transform: scale(1.01); }
.drop b { color: var(--text); font-size: 15px; }
.drop u { color: var(--accent); text-decoration: none; font-weight: 520; }
.drop-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--panel); color: var(--accent); box-shadow: var(--shadow-sm); margin-bottom: 4px; }
.imp-bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.imp-bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width .25s; }
.imp-alt { font-size: 12.5px; color: var(--faint); margin: 14px 0 0; }
.imp-head { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 13.5px; color: var(--muted); font-weight: 520; }
.imp .imp-rows { max-height: 44dvh; }
.imp .imp-row { align-items: flex-start; padding: 12px; }
.imp .imp-row input[type=checkbox] { margin-top: 12px; }
.imp .imp-row .thumb { width: 44px; height: 44px; }
.imp-note { width: 100%; margin-top: 8px; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 7px 10px; font-size: 13.5px; outline: none; transition: border-color .15s, box-shadow .15s; }
.imp-note:focus { border-color: var(--accent); box-shadow: var(--glow); }
.imp .imp-row select.imp-cat { margin-top: 8px; }

/* ---------- selfie menu ---------- */
.id-pic-wrap { position: relative; flex: none; }
.selfie-menu { position: absolute; left: 0; top: calc(100% + 6px); z-index: 20; min-width: 190px; padding: 6px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); animation: pop .18s cubic-bezier(.2, 1, .4, 1); transform-origin: top left; }
.selfie-menu button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border-radius: 10px; font-size: 14px; font-weight: 520; text-align: left; }
.selfie-menu button:hover { background: var(--surface-3); }
.selfie-menu .i { color: var(--accent); }

/* ---------- new map setup (edit in place) ---------- */
.panel.setup .search, .panel.setup .toolbar, .panel.setup .chips, .panel.setup .list, .panel.setup #exportBtn, .panel.setup #shareBtn, .panel.setup #copyBtn { display: none; }
.setup { padding-bottom: 20px; animation: rise .45s cubic-bezier(.2, 1, .4, 1) both; }
.setup-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 580; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }
.setup-head { display: flex; gap: 14px; align-items: center; margin-top: 6px; }
.setup-av { width: 64px; height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 580; color: var(--muted); cursor: pointer; }
.setup-av:hover { border-color: var(--accent); color: var(--accent); }
.setup-title { margin: 0; font-size: 22px; line-height: 1.25; letter-spacing: -.025em; font-weight: 580; }
.setup-title input { font: inherit; letter-spacing: inherit; color: var(--accent); border: 0; border-bottom: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent); background: transparent; outline: none; padding: 0 2px; min-width: 4ch; max-width: 100%; }
.setup-title input::placeholder { color: color-mix(in srgb, var(--accent) 55%, transparent); }
.setup-title input:focus { border-bottom-style: solid; border-bottom-color: var(--accent); }
.setup .field > span em { font-style: normal; color: var(--faint); font-weight: 500; }
.setup .id-hint { margin-top: 6px; }
.setup-go { margin-top: 16px; height: 52px; font-size: 16px; }
.setup-hint { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 5; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--panel); box-shadow: var(--shadow); font-size: 14px; font-weight: 520; color: var(--muted); white-space: nowrap; animation: rise .5s .3s cubic-bezier(.2, 1, .4, 1) both; }
.setup-hint .i { color: var(--accent); }
@media (max-width: 820px) { .panel.setup { height: 72dvh; } .setup-hint { bottom: calc(72dvh + 12px); } }

/* ---------- accent schemes (one token drives the whole UI) ---------- */
:root[data-accent="blue"] { --accent: #2f5bea; --accent-2: #4a73ff; --accent-ink: #ffffff; --accent-soft: rgba(47, 91, 234, 0.1); --glow: 0 0 0 3px rgba(47, 91, 234, 0.16); }
:root[data-theme="dark"][data-accent="blue"] { --accent: #6f8dff; --accent-2: #8aa2ff; --accent-ink: #0d0d10; --accent-soft: rgba(111, 141, 255, 0.14); --glow: 0 0 0 3px rgba(111, 141, 255, 0.22); }
:root[data-accent="coral"] { --accent: #ee5a36; --accent-2: #f5734f; --accent-ink: #ffffff; --accent-soft: rgba(238, 90, 54, 0.1); --glow: 0 0 0 3px rgba(238, 90, 54, 0.16); }
:root[data-theme="dark"][data-accent="coral"] { --accent: #ff8a66; --accent-2: #ffa283; --accent-ink: #0d0d10; --accent-soft: rgba(255, 138, 102, 0.14); --glow: 0 0 0 3px rgba(255, 138, 102, 0.22); }
:root[data-accent="teal"] { --accent: #0e9f8a; --accent-2: #13b39b; --accent-ink: #ffffff; --accent-soft: rgba(14, 159, 138, 0.1); --glow: 0 0 0 3px rgba(14, 159, 138, 0.16); }
:root[data-theme="dark"][data-accent="teal"] { --accent: #3fd0b8; --accent-2: #62dcc8; --accent-ink: #0d0d10; --accent-soft: rgba(63, 208, 184, 0.14); --glow: 0 0 0 3px rgba(63, 208, 184, 0.22); }
:root[data-accent="grape"] { --accent: #6d5ce8; --accent-2: #8274f0; --accent-ink: #ffffff; --accent-soft: rgba(109, 92, 232, 0.1); --glow: 0 0 0 3px rgba(109, 92, 232, 0.16); }
:root[data-theme="dark"][data-accent="grape"] { --accent: #9d90ff; --accent-2: #b3a9ff; --accent-ink: #0d0d10; --accent-soft: rgba(157, 144, 255, 0.14); --glow: 0 0 0 3px rgba(157, 144, 255, 0.22); }
:root[data-accent="rose"] { --accent: #e0457b; --accent-2: #ea5f8f; --accent-ink: #ffffff; --accent-soft: rgba(224, 69, 123, 0.1); --glow: 0 0 0 3px rgba(224, 69, 123, 0.16); }
:root[data-theme="dark"][data-accent="rose"] { --accent: #ff7aa6; --accent-2: #ff97ba; --accent-ink: #0d0d10; --accent-soft: rgba(255, 122, 166, 0.14); --glow: 0 0 0 3px rgba(255, 122, 166, 0.22); }


/* ---------- characters ---------- */
.id-pic.has { border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--border); }
.id-pic.spin img { animation: flip .45s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes flip { 0% { transform: scale(.6) rotate(-20deg); opacity: .3; } 100% { transform: none; opacity: 1; } }
.setup-measure { position: absolute; visibility: hidden; white-space: pre; font: inherit; letter-spacing: inherit; padding: 0 2px; }
.setup-title { position: relative; }
.drp-field { background: var(--surface); border-color: var(--border); }

/* ---------- open in Google / Apple Maps ---------- */
.maps-pick { position: relative; flex: 1; display: flex; }
.maps-pick > .btn { flex: 1; height: 48px; border-radius: 14px; }
.maps-chev { color: var(--muted); margin-left: -2px; }
.maps-menu { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 5; min-width: 190px; padding: 6px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); animation: pop .18s cubic-bezier(.2, 1, .4, 1); transform-origin: bottom right; }
.maps-menu a { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; font-size: 14px; font-weight: 520; text-decoration: none; color: var(--text); }
.maps-menu a:hover { background: var(--surface-3); }
.mm-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }

/* ---------- choose your look ---------- */
.edit-badge { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 2.5px var(--panel); z-index: 2; transition: transform .15s; }
.id-pic-wrap:hover .edit-badge { transform: scale(1.1); }
.id-pic { transition: transform .15s; }
.id-pic-wrap:hover .id-pic { transform: scale(1.03); }
.selfie-menu.look { width: 288px; padding: 12px; }
.look-head b { white-space: nowrap; }
.look-head { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 10px; font-size: 14px; }
.look-more { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 520; color: var(--accent); padding: 4px 8px; border-radius: 8px; }
.look-more:hover { background: var(--accent-soft); }
.look-more .i { transition: transform .3s; }
.look-more:hover .i { transform: rotate(180deg); }
.look-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.look-item { position: relative; aspect-ratio: 1; border-radius: 50%; padding: 0; overflow: visible; transition: transform .15s cubic-bezier(.3, 1.4, .5, 1); }
.look-item img { width: 100%; height: 100%; border-radius: 50%; display: block; box-shadow: 0 0 0 1px var(--border); }
.look-item:hover { transform: scale(1.08); }
.look-item.on img { box-shadow: 0 0 0 2.5px var(--panel), 0 0 0 4.5px var(--accent); }
.look-item.on::after { content: ''; position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat; box-shadow: 0 0 0 2px var(--panel); }
.look-item.deal { animation: deal .35s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: var(--d); }
@keyframes deal { from { opacity: 0; transform: scale(.5) rotate(-12deg); } }
.look-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.selfie-menu.look .look-actions button { justify-content: center; white-space: nowrap; font-size: 13px; padding: 9px 6px; border-radius: 10px; background: var(--surface-2); }
.selfie-menu.look .look-actions button:hover { background: var(--surface-3); }

.owner-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 16px 2px 0; font-size: 13px; color: var(--muted); }
.owner-line .i { color: var(--faint); }
.owner-line span { color: var(--faint); }

b, strong { font-weight: 540; }

.manage-line { list-style: none; text-align: center; font-size: 13px; color: var(--faint); padding: 18px 0 6px; }
.sheet.claim { max-width: 420px; }
.code-in { font-size: 24px; letter-spacing: 10px; text-align: center; font-variant-numeric: tabular-nums; }
/* Character tiles are buttons inside the menu; don't let the menu's text-button spacing apply to them. */
.selfie-menu .look-item { display: block; width: 100%; padding: 0; border-radius: 50%; background: none; }
.selfie-menu .look-item:hover { background: none; }
/* The chosen picture always fills its circle edge to edge. */
.id-pic { position: relative; overflow: hidden; }
.id-pic.has img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ---------- empty list ---------- */
.empty2 { list-style: none; text-align: center; padding: 36px 20px 8px; }
.e-pile { display: flex; justify-content: center; margin-bottom: 16px; }
.e-pile span { width: 40px; height: 40px; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--accent) 45%, var(--panel)); background: color-mix(in srgb, var(--accent) 9%, var(--panel)); box-shadow: 0 0 0 3px var(--panel); animation: pileIn .5s cubic-bezier(.3, 1.4, .5, 1) both; }
.e-pile span + span { margin-left: -10px; }
.e-pile span:nth-child(2) { animation-delay: .08s; transform: translateY(-4px); }
.e-pile span:nth-child(3) { animation-delay: .16s; }
@keyframes pileIn { from { opacity: 0; transform: scale(.5); } }
.e-title { margin: 0; font-size: 16px; font-weight: 600; color: var(--text); }
.e-sub { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.e-link { display: flex; align-items: center; gap: 8px; margin: 18px auto 0; max-width: 340px; padding: 5px 5px 5px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.e-link span { flex: 1; min-width: 0; text-align: left; font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Room for the selected item's outline at the list's top and bottom edges. */
.list { scroll-padding: 16px 0; }
.chips + .list, .toolbar + .chips[hidden] + .list { padding-top: 10px; }
.list { padding-bottom: 24px; }

/* ---------- selection uses the place's own category color ---------- */
.item.sel { background: color-mix(in srgb, var(--cat, var(--accent)) 7%, var(--panel)); border-color: color-mix(in srgb, var(--cat, var(--accent)) 45%, var(--panel)); box-shadow: none; }
.item.sel:hover { background: color-mix(in srgb, var(--cat, var(--accent)) 10%, var(--panel)); }
.item.sel .love { background: color-mix(in srgb, var(--cat, var(--accent)) 10%, var(--panel)) !important; }
.item.sel .love .pile .av { box-shadow: 0 0 0 2px color-mix(in srgb, var(--cat, var(--accent)) 10%, var(--panel)); }
.pin.sel .pin-head { transform: scale(1.14); box-shadow: 0 0 0 5px color-mix(in srgb, var(--cat) 22%, transparent), 0 6px 16px color-mix(in srgb, var(--cat) 35%, transparent); }
.pin.sel .pin-label { background: var(--cat); color: #fff; border-color: transparent; }
.pin.sel .pin-more { background: var(--cat); color: #fff; }

/* ---------- extra accent options (homepage color trial) ---------- */
:root[data-accent="terracotta"] { --accent: #c4553a; --accent-2: #d0674c; --accent-ink: #ffffff; --accent-soft: rgba(196, 85, 58, 0.1); --glow: 0 0 0 3px rgba(196, 85, 58, 0.16); }
:root[data-theme="dark"][data-accent="terracotta"] { --accent: #ec8a6f; --accent-2: #f2a08a; --accent-ink: #0d0d10; --accent-soft: rgba(236, 138, 111, 0.14); --glow: 0 0 0 3px rgba(236, 138, 111, 0.22); }
:root[data-accent="marigold"] { --accent: #d9860b; --accent-2: #e6961f; --accent-ink: #ffffff; --accent-soft: rgba(217, 134, 11, 0.1); --glow: 0 0 0 3px rgba(217, 134, 11, 0.16); }
:root[data-theme="dark"][data-accent="marigold"] { --accent: #f5b547; --accent-2: #f8c469; --accent-ink: #0d0d10; --accent-soft: rgba(245, 181, 71, 0.14); --glow: 0 0 0 3px rgba(245, 181, 71, 0.22); }
:root[data-accent="pine"] { --accent: #1f7a57; --accent-2: #268a64; --accent-ink: #ffffff; --accent-soft: rgba(31, 122, 87, 0.1); --glow: 0 0 0 3px rgba(31, 122, 87, 0.16); }
:root[data-theme="dark"][data-accent="pine"] { --accent: #4fc393; --accent-2: #6ed1a7; --accent-ink: #0d0d10; --accent-soft: rgba(79, 195, 147, 0.14); --glow: 0 0 0 3px rgba(79, 195, 147, 0.22); }
:root[data-accent="berry"] { --accent: #c42a5e; --accent-2: #d23d6f; --accent-ink: #ffffff; --accent-soft: rgba(196, 42, 94, 0.1); --glow: 0 0 0 3px rgba(196, 42, 94, 0.16); }
:root[data-theme="dark"][data-accent="berry"] { --accent: #f06c97; --accent-2: #f489ac; --accent-ink: #0d0d10; --accent-soft: rgba(240, 108, 151, 0.14); --glow: 0 0 0 3px rgba(240, 108, 151, 0.22); }
:root[data-accent="plum"] { --accent: #8b3aa8; --accent-2: #9b4db7; --accent-ink: #ffffff; --accent-soft: rgba(139, 58, 168, 0.1); --glow: 0 0 0 3px rgba(139, 58, 168, 0.16); }
:root[data-theme="dark"][data-accent="plum"] { --accent: #c07ad8; --accent-2: #cd94e0; --accent-ink: #0d0d10; --accent-soft: rgba(192, 122, 216, 0.14); --glow: 0 0 0 3px rgba(192, 122, 216, 0.22); }

.color-trial { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 500; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: 13px; color: var(--muted); animation: rise .4s cubic-bezier(.2, 1, .4, 1) both; }
.color-trial .sw { display: flex; gap: 8px; }
.color-trial button.c { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--panel); box-shadow: 0 0 0 1px var(--border); transition: transform .15s, box-shadow .15s; }
.color-trial button.c:hover { transform: scale(1.12); }
.color-trial button.c.on { box-shadow: 0 0 0 2px var(--text); }
.color-trial .name { min-width: 76px; color: var(--text); font-weight: 520; }
/* Card buttons share the row without overflowing the card's padding. */
.card-actions > * { min-width: 0; }
.card-actions > .btn { flex: 1.5 1 0; }
.maps-pick { flex: 1 1 0; min-width: 0; }
.maps-pick > .btn { width: 100%; min-width: 0; padding: 0 12px; }

/* ---------- floating popovers, dropzone, map button fixes ---------- */
.selfie-menu.floating { position: fixed; z-index: 260; }
.dropzone { display: flex; align-items: center; justify-content: center; }
.dz-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); }
.dz-empty b { font-weight: 520; color: var(--text); font-size: 15px; }
.dz-empty small { font-size: 12.5px; color: var(--faint); }
.field .opt { font-style: normal; color: var(--faint); font-weight: 500; }
.maps-pick > .btn { gap: 6px; overflow: hidden; white-space: nowrap; }
.card-actions > .btn { flex: 1.35 1 0; }

/* ---------- all selected / focus outlines are a single 1px line ---------- */
:root, :root[data-accent] { --glow: 0 0 0 0 transparent; }
:root[data-theme="dark"], :root[data-theme="dark"][data-accent] { --glow: 0 0 0 0 transparent; }
.chip.on { box-shadow: none; border-width: 1px; }
.catpick .chip.on { box-shadow: none; }
.item { border-width: 1px; }
.item.sel { border-width: 1px; }
.search-box:focus-within, .input:focus, .textarea:focus, .imp-note:focus, .drp-field[aria-expanded="true"], .fsel.open .fsel-btn { box-shadow: none; }
.dest-box:focus-within { box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.look-item.on img { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--accent); }
.selfie-pic.has { border-width: 1px; }
.extra-photo.has { border-width: 1px; }
.accent-picker button.c.on, .color-trial button.c.on { box-shadow: 0 0 0 1px var(--text); }
:focus-visible { outline-width: 1px; }

/* ---------- filter pills stay inside the panel margins ---------- */
.chips { margin: 0 18px; padding: 12px 1px 4px; mask-image: none; -webkit-mask-image: none; scroll-padding: 0 24px; }
.chips.fade-r { mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
.chips.fade-l { mask-image: linear-gradient(90deg, transparent, #000 36px); }
.chips.fade-l.fade-r { mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }

.imp-miss { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, #f5b400 12%, var(--panel)); font-size: 13.5px; line-height: 1.45; color: var(--text); }
.imp-miss .i { color: #b07d00; margin-top: 2px; flex: none; }
.imp-miss b { font-weight: 560; }

/* ---------- QA pass (Sep 30): spacing + responsive fixes ---------- */
/* Empty import status line no longer reserves space under the buttons. */
.imp-status:empty { display: none; }
.tabs button { white-space: nowrap; }
.toolbar { min-width: 0; }

@media (max-width: 820px) {
  /* The card is a bottom sheet on phones, so it has no caret pointing at a pin. */
  .card::before { display: none; }
  /* Bigger target for the drag handle. */
  .sheet-handle { padding: 10px 0 8px; }
}
/* Phones pinch to zoom; dropping the zoom buttons keeps the control stack clear of the list sheet. */
@media (max-width: 820px) and (pointer: coarse) { .map-tools .group:first-child { display: none; } }
@media (max-width: 380px) {
  .tabs { gap: 14px; }
  .toolbar .fsel-btn { padding: 0 8px; gap: 5px; }
}

/* Short landscape screens (phones turned sideways, small laptop windows): the whole panel scrolls
   instead of squeezing the list to nothing, and the place card's photo shrinks. */
@media (min-width: 821px) and (max-height: 560px) {
  .app { padding: 8px; }
  .panel { overflow-y: auto; overscroll-behavior: contain; }
  .panel > * { flex-shrink: 0; }
  .list { overflow: visible; flex: none; }
  .card { max-height: calc(100% - 16px); }
  .card-photo { height: 84px; }
  .card-head { padding-top: 14px; }
  .card-actions { padding: 12px 16px 14px; }
  .map-tools { top: 10px; right: 10px; gap: 6px; }
  .map-tools .group button { width: 36px; height: 36px; }
}

/* Temporary homepage color trial: fit small screens and never cover the main button. */
body.landing { padding-bottom: 72px; }
@media (max-width: 560px) {
  .color-trial { bottom: calc(10px + env(safe-area-inset-bottom)); padding: 8px 10px; gap: 8px; max-width: calc(100vw - 20px); }
  .color-trial > span { display: none; }
  .color-trial .sw { gap: 6px; }
  .color-trial button.c { width: 26px; height: 26px; }
}
@media (max-height: 500px) { .color-trial > span:first-child { display: none; } .color-trial { bottom: 8px; } }

/* Example maps: "make your own" button. */
.demo-float { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 6; display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 22px 0 18px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 15.5px; font-weight: 580; text-decoration: none; white-space: nowrap; box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 35%, transparent), var(--shadow); animation: demofloat .5s .4s cubic-bezier(.2, 1, .4, 1) both; transition: transform .2s, background .2s; }
@keyframes demofloat { from { opacity: 0; transform: translateX(-50%) translateY(10px); } }
.demo-float:hover { background: var(--accent-2); transform: translateX(-50%) translateY(-2px); }
/* Phones: float just above the list sheet and follow it; hide when the sheet or a place card covers the map. */
@media (max-width: 820px) {
  .demo-float { bottom: calc(46dvh + 14px); height: 46px; padding: 0 20px 0 16px; font-size: 15px; transition: bottom .3s cubic-bezier(.2, 1, .4, 1), transform .2s, background .2s; }
  .app:has(.panel.mini) .demo-float { bottom: 164px; }
  .app:has(.panel.full) .demo-float, .mapwrap:has(.card) .demo-float { display: none; }
}
/* Tabs already show an underline; keep the keyboard focus ring soft and inside the tab. */
.tabs button:focus-visible { outline-offset: -2px; border-radius: 8px; }
/* While making a new map on a phone, the map buttons would only collide with the hint pill. */
@media (max-width: 820px) { .app:has(.panel.setup) .map-tools { display: none; } }

/* ---------- design audit (Oct 1): overlap + tap-target fixes, all designs ---------- */
/* Small tap targets get a 40px hit area without changing how they look. */
.edit-badge::before { content: ''; position: absolute; inset: -8px; }
@media (max-width: 560px) { .color-trial button.c { width: 32px; height: 32px; } }
/* Phones: the map credits ride above the list sheet instead of hiding under it. */
@media (max-width: 820px) {
  .app .maplibregl-ctrl-bottom-right { bottom: calc(46dvh - 2px); transition: bottom .3s cubic-bezier(.2, 1, .4, 1); }
  .app:has(.panel.mini) .maplibregl-ctrl-bottom-right { bottom: 148px; }
  .app:has(.panel.setup) .maplibregl-ctrl-bottom-right { bottom: calc(72dvh - 2px); }
  .app:has(.panel.full) .maplibregl-ctrl-bottom-right, .app:has(.card) .maplibregl-ctrl-bottom-right { display: none; }
}
/* Phones: the homepage demo's tip bubble collided with the list header card; the pins already tell the story. */
@media (max-width: 560px) { .show-bubble { display: none !important; } }



/* ---------- import from a doc: review list (Oct 2) ---------- */
.imp-or { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; font-size: 12.5px; color: var(--faint); }
.imp-or::before, .imp-or::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.imp-add { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 4px; padding: 0 12px; height: 44px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); }
.imp-add:focus-within { border-color: var(--accent); }
.imp-add-ic { color: var(--faint); display: grid; }
.imp-add input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 14.5px; }
.imp-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); max-height: 260px; overflow-y: auto; }
.imp-results .result { padding: 8px 10px; }
.imp-results .r-body { display: block; text-align: left; }
.imp-results .r-name, .imp-results .r-sub { display: block; }
.imp-all { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.imp-all input { width: 18px; height: 18px; accent-color: var(--accent); }
.imp-legend { font-size: 12.5px; color: var(--accent); font-weight: 580; }
.imp-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; color: var(--muted); transition: opacity .2s; }
.imp-bulk.dim { opacity: .5; pointer-events: none; }
.imp-bulk select { border: 1px solid var(--border); border-radius: 9px; background: var(--surface); font-size: 13px; padding: 6px 8px; }
.imp-bulk input { flex: 1; min-width: 150px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); font-size: 13px; padding: 7px 10px; }
.imp-bulk .btn.sm { height: 32px; }
.imp .imp-row { position: relative; }
.imp-row.off .thumb, .imp-row.off .r-name { opacity: .5; }
.imp-row.unsure { background: color-mix(in srgb, #f5b400 9%, var(--panel)); }
.imp-row.miss { opacity: 1; background: color-mix(in srgb, var(--danger) 6%, var(--panel)); }
.imp-check-ph { width: 18px; flex: none; }
.imp-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.imp-x { width: 30px; height: 30px; color: var(--faint); }
.imp-row.miss > .imp-x { align-self: flex-start; }
.imp-x:hover { color: var(--danger); }
.r-area { font-weight: 450; color: var(--muted); font-size: 13px; }
.r-flag { margin-top: 4px; font-size: 12.5px; line-height: 1.45; color: #9a6b00; }
.imp-row.miss .r-flag { color: var(--danger); }
.r-src { margin-top: 3px; font-size: 12.5px; color: var(--faint); }
.r-flag .linkbtn, .r-src .linkbtn { font-size: 12.5px; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.imp-fix { position: relative; margin-top: 8px; }
.imp-fix input { width: 100%; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); font-size: 13.5px; padding: 8px 10px; }
.imp-fix input:focus { outline: none; border-color: var(--accent); }
:root[data-theme="dark"] .r-flag { color: #f5c451; }
@media (max-width: 560px) {
  .imp .imp-row { flex-wrap: wrap; }
  .imp-side { flex-direction: row; width: 100%; justify-content: space-between; padding-left: 74px; }
  .imp-bulk input { min-width: 0; flex: 1 1 calc(100% - 90px); }
}
.imp-row .r-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- import review, simplified (Oct 2) ---------- */
.rv-summary { margin: 4px 0 0; font-size: 14.5px; color: var(--muted); }
.imp .imp-rows.rv { border: 0; border-radius: 0; margin-top: 10px; max-height: 54dvh; padding: 2px 2px 8px; }
.rv-h { margin: 14px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rv-h2 { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.rv-h2 h3 { margin: 0; font: inherit; letter-spacing: inherit; }
.rv-h2 h3 span { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text); letter-spacing: 0; }
.rv-tools { display: flex; gap: 14px; text-transform: none; letter-spacing: 0; }
.rv-tools .linkbtn, .rv-actions .linkbtn, .rv-foot .linkbtn { font-size: 13.5px; font-weight: 520; color: var(--accent); padding: 4px 0; }

/* questions */
.rv-ask { padding: 14px 16px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 14px; background: var(--surface); }
.rv-ask + .rv-ask { margin-top: 10px; }
.rv-q { margin: 0; font-size: 15px; color: var(--text); }
.rv-q b { font-weight: 600; }
.rv-note { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.rv-guess { display: flex; gap: 12px; align-items: center; margin-top: 12px; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.rv-guess .thumb { width: 40px; height: 40px; }
.rv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.rv-actions .btn.sm { height: 36px; }
.rv-actions .linkbtn { margin-left: 6px; color: var(--muted); }

/* ready rows */
.rv-row { border-bottom: 1px solid var(--border); }
.rv-row:last-of-type { border-bottom: 0; }
.rv-line { display: flex; align-items: center; gap: 12px; padding: 10px 2px; }
.rv-line input[type=checkbox] { width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.rv-line .thumb { width: 40px; height: 40px; flex: none; }
.rv-main { flex: 1; min-width: 0; text-align: left; padding: 2px 0; }
.rv-name { display: block; font-size: 15px; font-weight: 560; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 13px; color: var(--muted); min-width: 0; }
.rv-type { flex: none; }
.rv-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; flex: none; }
.rv-metatext { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-add { color: var(--accent); }
.rv-chev { color: var(--faint); display: grid; transition: transform .2s; }
.rv-row.open .rv-chev { transform: rotate(180deg); }
.rv-row.off .thumb, .rv-row.off .rv-main { opacity: .45; }
.rv-addr { font-size: 12.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-edit { display: grid; gap: 10px; padding: 0 2px 14px 70px; }
.rv-field { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.rv-field input, .rv-field select { width: 100%; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); font-size: 14px; padding: 8px 10px; color: var(--text); }
.rv-field input:focus, .rv-field select:focus { outline: none; border-color: var(--accent); }
.rv-foot { display: flex; justify-content: space-between; }
.rv-foot .rv-remove { color: var(--muted); }
.rv-foot .rv-remove:hover { color: var(--danger); }

/* search boxes inside the list */
.rv .imp-fix { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 0 12px; height: 42px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); }
.rv .imp-fix[hidden] { display: none; }
.rv .imp-fix:focus-within { border-color: var(--accent); }
.rv .imp-fix input { flex: 1; min-width: 0; border: 0; padding: 0; background: none; font-size: 14px; outline: none; }
.imp-fix-ic { color: var(--faint); display: grid; }
.imp-bulk { display: grid; gap: 8px; margin: 0 0 6px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.imp-bulk select { width: 100%; padding: 8px 10px; }
.rv-bulknote { display: flex; gap: 8px; }
.rv-bulknote input { flex: 1; min-width: 0; }
.rv-addwrap { margin-top: 10px; }
.rv-addbtn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px; border: 1px dashed var(--border-strong); border-radius: 12px; color: var(--accent); font-size: 14px; font-weight: 520; }
.rv-addbtn:hover { background: var(--surface-2); }
.rv .imp-add { margin-top: 0; }
.rv-empty { margin: 8px 0; font-size: 14px; color: var(--faint); }
@media (max-width: 560px) { .rv-edit { padding-left: 2px; } .rv-field { grid-template-columns: 40px 1fr; } }
/* Inside the import window the "who's adding" block is a single compact row, so the list keeps the space. */
.imp .idblock { margin-top: 12px; padding: 10px 12px; }
.imp .idblock .id-pic, .imp .idblock .selfie-pic { width: 44px; height: 44px; }
.imp .idblock .id-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.imp .idblock .id-fields .input { height: 40px; margin: 0; }
.imp .idblock .id-hint { display: none; }
@media (max-width: 560px) { .imp .idblock .id-fields { grid-template-columns: 1fr; gap: 6px; } .imp .idblock .id-fields .input { height: 38px; } }
.rv-guess > div { min-width: 0; }
.rv-guess .rv-addr { white-space: nowrap; }

/* ---------- import review: flat list with line separators (Oct 2, replaces the card version above) ---------- */
.imp .imp-rows.rv { padding: 0 0 8px; }
.rv-summary { font-size: 15px; }
.rv-h { margin: 18px 0 0; padding-bottom: 8px; border-bottom: 1px solid var(--border-strong); font-size: 14px; font-weight: 600; letter-spacing: -.01em; text-transform: none; color: var(--text); }
.rv-h2 { margin-top: 26px; }
.rv-h2 h3 span { margin-left: 4px; padding: 0; background: none; color: var(--muted); font-weight: 500; }
.rv-tools .linkbtn { font-size: 13.5px; }
.rv-ask { padding: 16px 0; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: none; }
.rv-ask + .rv-ask { margin-top: 0; }
.rv-q { font-size: 15px; }
.rv-guess { margin-top: 10px; padding: 0; background: none; border-radius: 0; }
.rv-guess .rv-name { font-weight: 520; }
.rv-actions { gap: 18px; margin-top: 12px; }
.rv-act { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 14px; font-weight: 520; color: var(--text); border-radius: 0; background: none; }
.rv-act:hover { text-decoration: underline; text-underline-offset: 3px; }
.rv-act.yes { color: var(--accent); font-weight: 600; }
.rv-act.muted { color: var(--muted); }
.rv .imp-fix { height: 40px; margin-top: 10px; padding: 0; border: 0; border-bottom: 1px solid var(--border-strong); border-radius: 0; background: none; }
.rv .imp-fix:focus-within { border-bottom-color: var(--accent); }
.rv-row { border-bottom: 1px solid var(--border); }
.rv-row:last-of-type { border-bottom: 1px solid var(--border); }
.rv-line { padding: 12px 0; }
.rv-field input, .rv-field select { border: 0; border-bottom: 1px solid var(--border-strong); border-radius: 0; background: none; padding: 8px 0; }
.imp-bulk { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--border); border-radius: 0; background: none; }
.imp-bulk select, .rv-bulknote input { border: 0; border-bottom: 1px solid var(--border-strong); border-radius: 0; background: none; padding: 8px 0; }
.rv-addwrap { margin-top: 4px; }
.rv-addbtn { width: auto; padding: 12px 0; border: 0; border-radius: 0; color: var(--accent); }
.rv-addbtn:hover { background: none; }
.rv .imp-add { height: 44px; padding: 0; border: 0; border-bottom: 1px solid var(--border-strong); border-radius: 0; background: none; }
.imp .idblock { border: 0; border-top: 1px solid var(--border-strong); border-radius: 0; background: none; padding: 14px 0 0; }
.imp .idblock .id-fields .input { border: 0; border-bottom: 1px solid var(--border-strong); border-radius: 0; background: none; padding: 0; }

/* ---------- Oct 2: photo gallery, copied tips, copy sheet, Beli, plan tab ---------- */
/* Gallery in the place card: swipe or use the arrows; tap a photo for full screen. */
.gallery { overflow: hidden; }
.g-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.g-track::-webkit-scrollbar { display: none; }
.g-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; cursor: zoom-in; user-select: none; }
.g-nav { position: absolute; top: 50%; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: #3a4254; box-shadow: 0 2px 8px rgba(20, 24, 40, .18); opacity: 0; transition: opacity .2s; }
.g-nav.prev { left: 10px; } .g-nav.prev .i { transform: rotate(90deg); }
.g-nav.next { right: 10px; } .g-nav.next .i { transform: rotate(-90deg); }
.gallery:hover .g-nav { opacity: 1; }
.gallery.at-start .g-nav.prev, .gallery.at-end .g-nav.next { opacity: 0; pointer-events: none; }
@media (hover: none) { .g-nav { display: none; } }
.g-count { position: absolute; right: 10px; bottom: 10px; padding: 2px 8px; border-radius: 999px; background: rgba(20, 24, 40, .55); color: #fff; font-size: 12px; font-weight: 560; pointer-events: none; }
.lightbox { background: rgba(10, 12, 18, .92); padding: 0; }
.lightbox img { max-width: calc(100vw - 32px); max-height: calc(100dvh - 96px); border-radius: 12px; object-fit: contain; animation: pop .2s ease-out; user-select: none; }
.lightbox .x { position: fixed; top: 14px; right: 14px; color: #fff; background: rgba(255, 255, 255, .12); }
.lb-nav { position: fixed; top: 50%; width: 46px; height: 46px; margin-top: -23px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); color: #fff; }
.lb-nav:hover { background: rgba(255, 255, 255, .24); }
.lb-nav.prev { left: 16px; } .lb-nav.prev .i { transform: rotate(90deg); }
.lb-nav.next { right: 16px; } .lb-nav.next .i { transform: rotate(-90deg); }
.lb-count { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, .8); font-size: 13px; font-weight: 520; }

/* Tips that came with a copied place */
.via { margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--border-strong); }
.via-title { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 560; color: var(--muted); margin-bottom: 4px; }

/* Copy sheet */
.copy .cp-h { display: flex; align-items: center; justify-content: space-between; }
.copy .cp-h h3 { margin: 0; font-size: 14px; }
.cp-list { max-height: 40dvh; overflow-y: auto; margin-top: 2px; }
.cp-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.cp-row input { width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.cp-row .thumb { width: 40px; height: 40px; flex: none; }
.cp-main { min-width: 0; flex: 1; display: flex; flex-direction: column; text-align: left; }
.cp-main .rv-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.cp-go { display: flex; gap: 10px; margin-top: 18px; }
.cp-go .btn { flex: 1; }
.cp-hint { margin: 10px 0 0; font-size: 12.5px; color: var(--faint); text-align: center; }
.cp-maps { display: grid; gap: 8px; margin-top: 14px; }
.cp-map { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); transition: border-color .15s, background .15s; }
.cp-map:hover { border-color: var(--accent); background: var(--accent-soft); }
.cp-map:disabled { opacity: .6; }
.cp-map-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.cp-chev { transform: rotate(-90deg); color: var(--faint); }
.cp-done { text-align: center; padding-top: 8px; }
.cp-done-ic { width: 56px; height: 56px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.cp-done .actions { justify-content: center; }
.setup-copy { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); color: var(--text); font-size: 13.5px; line-height: 1.45; }
.setup-copy .i { color: var(--accent); flex: none; margin-top: 2px; }
.imp-warn { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

/* Plan tab */
.pin-num { position: absolute; right: -6px; top: -6px; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 999px; color: #fff; font-size: 11.5px; font-weight: 640; display: grid; place-items: center; box-shadow: 0 0 0 2.5px var(--pin-ring); }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 6px 4px; }
.plan-head b { display: block; font-size: 15px; font-weight: 580; }
.plan-head span { font-size: 12.5px; color: var(--muted); }
.day { margin-top: 12px; padding: 12px 10px 8px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.day.focus { border-color: color-mix(in srgb, var(--day) 55%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--day) 14%, transparent); }
.day-head { display: flex; align-items: center; gap: 10px; }
.day-badge { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--day); color: #fff; font-weight: 640; font-size: 14px; display: grid; place-items: center; transition: transform .15s; }
.day-badge:hover { transform: scale(1.08); }
.day-titles { flex: 1; min-width: 0; }
.day-kicker { font-size: 12px; font-weight: 540; color: var(--muted); }
.day-title { width: 100%; font: inherit; font-size: 15.5px; font-weight: 580; color: var(--text); border: 0; border-bottom: 1px dashed transparent; background: none; padding: 1px 0; outline: none; }
.day-title:hover { border-bottom-color: var(--border-strong); }
.day-title:focus { border-bottom: 1px solid var(--accent); }
.day-title::placeholder { color: var(--faint); font-weight: 500; }
.day-route, .day-del { width: 34px; height: 34px; flex: none; }
.day-route { color: var(--day); }
.day-note { margin: 8px 2px 0 42px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.day-items { list-style: none; margin: 6px 0 0; padding: 0; min-height: 8px; }
.day-drop { margin: 4px 0 4px 42px; padding: 12px; border: 1.5px dashed var(--border-strong); border-radius: 12px; font-size: 13px; color: var(--faint); text-align: center; }
.pi { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 12px; background: var(--surface); }
.pi.sel { background: color-mix(in srgb, var(--cat) 10%, var(--surface)); }
.pi .thumb { width: 38px; height: 38px; flex: none; }
.pi-grip { width: 22px; height: 34px; flex: none; display: grid; place-items: center; color: var(--faint); cursor: grab; touch-action: none; border-radius: 8px; }
.pi-grip:hover { color: var(--text); background: var(--surface-3); }
.pi-n { width: 20px; flex: none; text-align: center; font-size: 12.5px; font-weight: 640; color: var(--day, var(--muted)); }
.pi-main { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; }
.pi-name { font-size: 14.5px; font-weight: 540; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-sub { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.pi-sub .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; flex: none; }
.pi-x { width: 32px; height: 32px; flex: none; color: var(--faint); }
.pi-add { flex: none; height: 30px; padding: 0 10px; font-size: 13px; }
.pi-hole { opacity: .35; }
.pi-ghost { position: fixed; z-index: 400; pointer-events: none; box-shadow: var(--shadow-lg); transform: rotate(1.5deg); border: 1px solid var(--border); }
body.dragging-plan, body.dragging-plan * { cursor: grabbing !important; user-select: none; }
.plan-addday { padding: 4px 6px; }
.pool { margin-top: 10px; padding: 0 4px; }
.pool-h { padding: 12px 2px 6px; border-bottom: 1px solid var(--border); font-size: 13.5px; font-weight: 580; }
.pool-h span { margin-left: 4px; color: var(--muted); font-weight: 500; }
.pool .day-drop { margin-left: 0; }
.plan-empty { text-align: center; padding: 34px 18px; }
.pe-art { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.pe-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.day-menu { position: fixed; z-index: 280; min-width: 210px; max-height: 60dvh; overflow-y: auto; padding: 6px; border-radius: 16px; background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: pop .16s ease-out; }
.day-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 10px; text-align: left; font-size: 14px; font-weight: 520; }
.day-menu button:hover, .day-menu button:focus-visible { background: var(--surface-3); outline: none; }
.dm-dot { width: 24px; height: 24px; flex: none; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 640; display: grid; place-items: center; }
.dm-new { background: var(--surface-3); color: var(--muted); }
.dm-t { display: flex; flex-direction: column; min-width: 0; }
.dm-t small { font-size: 12px; color: var(--muted); font-weight: 500; }
.plan-btn { color: var(--muted) !important; }

/* Plan with AI */
.planai .ai-off { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-3); font-size: 13px; color: var(--muted); }
.ai-count { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; font-size: 14px; font-weight: 540; }
.stepper { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border-strong); border-radius: 12px; padding: 2px; }
.stepper button { width: 32px; height: 32px; border-radius: 9px; font-size: 18px; color: var(--muted); }
.stepper button:hover { background: var(--surface-3); color: var(--text); }
.stepper b { min-width: 26px; text-align: center; font-weight: 600; }
#aiDays { max-height: 42dvh; overflow-y: auto; }
.ai-day { margin-top: 12px; }
.ai-day > span b { font-weight: 640; }
.ai-replace { margin: 6px 0 0; font-size: 12.5px; color: var(--faint); }
.btn-spin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: btnspin .8s linear infinite; }
@keyframes btnspin { to { transform: rotate(360deg); } }
@media (max-width: 820px) { .copy .cp-go { flex-direction: column; } }
/* Header buttons drop their labels when the sidebar is narrow, so Share always fits. */
.panel-head { container-type: inline-size; }
@container (max-width: 420px) { #copyBtn span, #exportBtn span { display: none; } #copyBtn, #exportBtn { padding: 0 9px; } }
.pin.unplanned:not(.sel) { opacity: .5; }
.pin.unplanned:not(.sel):hover { opacity: 1; }

/* ---------- starter places on a new map from a suggested city ---------- */
.setup-samples { margin-top: 18px; border-top: 1px solid var(--border); }
.ss-head { padding: 14px 0 6px; font-size: 13.5px; color: var(--muted); }
.ss-head b { display: block; font-size: 14.5px; color: var(--text); font-weight: 580; }
.ss-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.ss-row .thumb { width: 36px; height: 36px; flex: none; }
.ss-body { flex: 1; min-width: 0; }
.ss-name { font-size: 14.5px; font-weight: 540; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-sub { font-size: 12.5px; color: var(--muted); }
.ss-x { width: 32px; height: 32px; color: var(--faint); }
.ss-x:hover { color: var(--danger); }
.ss-pin { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--c); box-shadow: 0 0 0 3px var(--pin-ring), 0 3px 8px rgba(0,0,0,.2); }

/* ---------- quick facts ("Good to know") ---------- */
.qf { display: grid; gap: 8px; margin-top: 4px; }
.qf-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qf-label { width: 100%; font-size: 12.5px; color: var(--muted); font-weight: 520; }
.qf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.qf-chip { height: 32px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); font-size: 13.5px; font-weight: 520; color: var(--text); transition: background .15s, border-color .15s; }
.qf-chip:hover { border-color: var(--accent); }
.qf-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.qf-src { font-size: 12px; font-weight: 500; color: var(--faint); text-transform: none; letter-spacing: 0; }
.qf-hint { margin: 2px 0 0; font-size: 12px; color: var(--faint); }
#draftAttrs:not(:empty) { margin-top: 16px; }
#draftAttrs .sect-title { margin-bottom: 8px; }
.qf-line { display: flex; flex-wrap: wrap; gap: 6px; }
.qf-line span { padding: 4px 10px; border-radius: 999px; background: var(--surface-3); font-size: 13px; font-weight: 520; }
.qf-empty { font-size: 13.5px; color: var(--faint); }
.qf-card .sect-title .linkbtn { font-size: 12.5px; color: var(--accent); text-transform: none; letter-spacing: 0; }
.rv-edit .qf { margin-top: 2px; }

/* ---------- Feedback button + sheet ---------- */
.fb-btn { position: fixed; z-index: 40; left: 18px; bottom: 18px; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px 0 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel); color: var(--text); font-size: 13.5px; font-weight: 520; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.fb-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.fb-btn .i { color: var(--accent); }
.fb-btn:disabled { opacity: .6; cursor: progress; }
.app ~ .fb-btn { left: calc(var(--sidebar-w, 404px) + 34px); bottom: 26px; }
@media (max-width: 820px) {
  .app ~ .fb-btn { left: 12px; bottom: calc(46dvh + 14px); transition: bottom .3s cubic-bezier(.2, 1, .4, 1); }
  .app:has(.panel.mini) ~ .fb-btn { bottom: 164px; }
  .app:has(.panel.full) ~ .fb-btn, .app:has(.panel.setup) ~ .fb-btn, body:has(.card) .app ~ .fb-btn { display: none; }
  .fb-btn span { display: none; }
  .fb-btn { width: 40px; height: 40px; padding: 0; justify-content: center; }
}
body.landing .fb-btn { bottom: 18px; }
@media (max-width: 560px) { body.landing .fb-btn { bottom: 76px; } }
.fb-kinds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.fb-opt { font-style: normal; color: var(--faint); font-weight: 500; }
.fb-shot { margin-top: 8px; }
.fb-shot img { display: block; width: 100%; max-height: 220px; object-fit: contain; object-position: left top; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.fb-shot-actions { display: flex; gap: 18px; margin-top: 8px; }
.fb-shot-actions .linkbtn { font-size: 13px; color: var(--accent); }
.fb-add { display: flex; align-items: center; gap: 8px; width: 100%; padding: 14px; border: 1px dashed var(--border-strong); border-radius: 12px; color: var(--muted); font-size: 14px; }
.fb-add:hover { border-color: var(--accent); color: var(--accent); }
.fb-wait { padding: 26px 14px; border: 1px dashed var(--border-strong); border-radius: 12px; color: var(--faint); font-size: 13.5px; text-align: center; }

/* ---------- temporary typography picker (?fonts=1) ---------- */
.font-pick { position: fixed; z-index: 60; right: 18px; bottom: 18px; font-family: Inter, sans-serif; }
.fp-btn { height: 36px; padding: 0 14px; border-radius: 999px; background: #1f2433; color: #fff; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow); }
.fp-btn span { font-weight: 450; opacity: .8; margin-left: 4px; }
.fp-menu { position: absolute; right: 0; bottom: 44px; width: 280px; max-height: calc(100vh - 90px); overflow-y: auto; padding: 8px; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); }
.fp-menu[hidden] { display: none; }
.fp-menu p { margin: 4px 8px 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.fp-opt { display: block; width: 100%; padding: 8px 10px; border-radius: 10px; text-align: left; color: var(--text); }
.fp-opt b { display: block; font-size: 16px; font-weight: 600; }
.fp-opt small { display: block; font-size: 12.5px; color: var(--muted); }
.fp-opt:hover { background: var(--surface-3); }
.fp-opt.on { background: var(--accent-soft); }
.fp-off { display: block; margin: 6px 8px 2px; font-size: 12.5px; color: var(--faint); }
@media (max-width: 820px) { .app ~ .font-pick { bottom: auto; top: calc(124px + env(safe-area-inset-top)); right: 12px; } }
