/* Meetline component base (people, chips, results, legs, pins). Directions set tokens and layout. */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }



.block { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.block-head { display: flex; align-items: baseline; justify-content: space-between; }
.title { font-size: 24px; line-height: 1.2; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 6px; }
.lede { margin: 0 0 14px; color: var(--muted); }
.label { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.count { font: 500 12px var(--mono); color: var(--muted); }

.search { position: relative; }
.search input { width: 100%; height: 44px; padding: 0 14px; border: 1px solid #c9ced4; border-radius: var(--radius); background: var(--paper); }
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.suggest { position: absolute; z-index: 1000; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(16, 24, 32, 0.12); }
.suggest-item { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.suggest-item.is-active, .suggest-item:hover { background: var(--soft); }
.suggest-title { font-weight: 500; }
.suggest-sub { font-size: 13px; color: var(--muted); }
.add-row { display: flex; gap: 8px; margin-top: 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; font-weight: 500; text-decoration: none; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #095c42; }
.btn-quiet { background: var(--paper); border-color: #c9ced4; color: var(--ink); }
.btn-quiet:hover, .btn-quiet.is-on { background: var(--soft); border-color: var(--ink); }
.btn-small { height: 32px; padding: 0 12px; font-size: 14px; }
.btn:focus-visible, .chip:focus-visible, .seg:focus-visible, .mode-btn:focus-visible, .venue-hit:focus-visible, .icon-btn:focus-visible, .link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

.people { list-style: none; margin: 0; padding: 0; }
.person { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto 28px; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.person:first-child { border-top: 0; }
.person-mark { width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 14px; cursor: pointer; }
.person-name { width: 100%; border: 0; padding: 2px 4px; margin-left: -4px; border-radius: 4px; font-weight: 600; background: transparent; }
.person-name:hover { background: var(--soft); }
.person-name:focus { outline: 2px solid var(--accent); background: var(--paper); }
.person-place { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-live { font: 500 11px var(--mono); color: var(--accent); margin-right: 6px; text-transform: uppercase; }
.mode { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; padding: 2px; }
.mode-btn { width: 30px; height: 28px; display: grid; place-items: center; background: none; border: 0; border-radius: 5px; cursor: pointer; color: var(--muted); }
.mode-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mode-btn.is-on { background: var(--ink); color: #fff; }
.icon-btn { width: 28px; height: 28px; display: grid; place-items: center; background: none; border: 0; border-radius: 6px; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--soft); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

.empty { margin-top: 4px; }
.empty-need { margin: 0 0 4px; font-weight: 500; }
.empty-hint { margin: 0; color: var(--muted); font-size: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid #c9ced4; background: var(--paper); cursor: pointer; font-size: 14px; }
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.segs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #c9ced4; border-radius: var(--radius); overflow: hidden; }
.seg { display: flex; flex-direction: column; align-items: flex-start; padding: 8px 12px; background: var(--paper); border: 0; cursor: pointer; text-align: left; }
.seg + .seg { border-left: 1px solid #c9ced4; }
.seg-label { font-weight: 600; font-size: 14px; }
.seg-hint { font-size: 12px; color: var(--muted); }
.seg.is-on { background: var(--accent-soft); box-shadow: inset 0 -3px 0 var(--accent); }

.status { margin: 0; padding: 10px 20px; font-size: 14px; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--soft); }
.status[data-kind="busy"]::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border: 2px solid var(--accent); border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -1px; }
.status[data-kind="error"] { color: #a61b1b; background: #fdeeee; }
@keyframes spin { to { transform: rotate(360deg); } }

.detail { padding: 18px 20px; border-bottom: 1px solid var(--line); background: var(--paper); }
.detail-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.detail-kicker { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.detail-name { margin: 2px 0 2px; font-size: 21px; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
.detail-meta { margin: 0; font-size: 13px; color: var(--muted); }
.detail-figure { text-align: right; flex: none; }
.detail-figure-num { display: block; font: 500 22px/1.1 var(--mono); }
.detail-figure-label { font-size: 12px; color: var(--muted); }
.legs { list-style: none; margin: 14px 0; padding: 0; }
.leg { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.leg-mark { width: 24px; height: 24px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.leg-who { display: flex; flex-direction: column; min-width: 0; }
.leg-name { font-weight: 500; }
.leg-mode { font-size: 13px; color: var(--muted); }
.leg-time { font: 500 15px var(--mono); }
.leg-go { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--accent); text-decoration: none; padding: 4px 6px; border-radius: 6px; font-weight: 500; }
.leg-go:hover { background: var(--accent-soft); }
.leg-go svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.results { list-style: none; margin: 0; padding: 0; }
.venue + .venue { margin-top: 6px; }
.venue-hit { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; width: 100%; text-align: left; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); cursor: pointer; }
.venue-hit:hover { border-color: #aab1b9; }
.venue.is-selected .venue-hit { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.venue-rank { font: 500 13px/24px var(--mono); width: 24px; height: 24px; text-align: center; border-radius: 4px; background: var(--soft); }
.venue.is-selected .venue-rank { background: var(--accent); color: #fff; }
.venue-body { display: flex; flex-direction: column; min-width: 0; }
.venue-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.venue-meta { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip { position: relative; height: 14px; margin: 8px 0 6px; border-bottom: 1px solid var(--line); }
.strip-span { position: absolute; bottom: 5px; height: 4px; background: var(--line); border-radius: 2px; }
.tick { position: absolute; bottom: 1px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--c); border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12); }
.venue-stats { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.venue-stats b { font: 500 13px var(--mono); color: var(--ink); }

.foot { margin-top: auto; padding: 14px 20px; font-size: 12px; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 2000; max-width: min(92vw, 460px); padding: 12px 16px; border-radius: var(--radius); background: var(--ink); color: #fff; font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }

/* Map pins */
.pin-wrap { background: none; border: 0; }
.pin-person { width: 34px; height: 34px; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); display: grid; place-items: center; color: #fff; font: 600 14px var(--sans); }
.pin-person.is-me { outline: 3px solid rgba(28, 100, 217, 0.25); }
.pin-venue { position: relative; width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #fff; border: 2px solid var(--ink); display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.pin-venue span { transform: rotate(45deg); font: 600 12px var(--mono); color: var(--ink); }
.pin-venue.is-selected { width: 40px; height: 40px; background: var(--accent); border-color: #fff; border-width: 3px; }
.pin-venue.is-selected span { color: #fff; font-size: 15px; }
.pin-venue-wrap { position: relative; }
.pin-label { position: absolute; left: 46px; top: 2px; white-space: nowrap; background: #fff; border-radius: 6px; padding: 5px 9px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); display: flex; flex-direction: column; font: 12px/1.3 var(--sans); color: var(--muted); }
.pin-label b { color: var(--ink); font-size: 13px; font-weight: 600; }
.pin-center { width: 18px; height: 18px; border: 2px solid var(--ink); border-radius: 50%; background: rgba(255, 255, 255, 0.7); position: relative; }
.pin-center::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--ink); }
.search-ring { fill: var(--accent); fill-opacity: 0.05; stroke: var(--accent); stroke-opacity: 0.45; stroke-width: 1.5; stroke-dasharray: 4 6; }
.leaflet-container { font-family: var(--sans); }
.leaflet-tooltip { font-size: 13px; }
#map.is-picking { cursor: crosshair; }
