/* giữa. — hệ thống thị giác
   Giấy + mực: nền trắng ngà, chữ gần đen, phân tách bằng đường kẻ mảnh thay vì thẻ nổi.
   Một màu nhấn duy nhất (vàng chanh) đánh dấu "điểm hẹn". Màu từng người lấy từ bảng mực Risograph. */
:root {
  --paper: #f6f5f1;
  --paper-2: #efede7;
  --ink: #111110;
  --ink-2: #3b3a36;
  --muted: #86837b;
  --faint: #b3afa6;
  --hair: #e2dfd7;
  --accent: #d4ff3a;
  --warn: #9a5800;
  --err: #c23b22;
  --font: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --panel-w: 420px;
  --pad: 28px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--paper); color: var(--ink); font: 400 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: "ss01", "tnum" 0; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; color: var(--faint); }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a { color: inherit; }
.num { font-variant-numeric: tabular-nums; }

.app { display: grid; grid-template-columns: var(--panel-w) 1fr; height: 100%; height: 100dvh; }
#map { position: relative; min-height: 0; border-left: 1px solid var(--hair); }

/* ---------- panel ---------- */
.panel { position: relative; z-index: 2; overflow-y: auto; background: var(--paper); display: flex; flex-direction: column; scrollbar-width: thin; scrollbar-color: var(--hair) transparent; }
.panel > * { padding-left: var(--pad); padding-right: var(--pad); }
.grab { display: none; }

.top { display: flex; align-items: center; gap: 12px; padding-top: 26px; padding-bottom: 22px; }
.mark { width: 34px; height: 34px; stroke: var(--ink); stroke-width: 1.6; }
.mark .dot { fill: var(--ink); stroke: none; }
.mark .hub { fill: var(--accent); stroke: var(--ink); stroke-width: 1.6; }
.wordmark { font-size: 24px; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.wordmark i { font-style: normal; color: var(--muted); }
.tagline { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.brand-text { flex: 1; }
.help { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--hair); font: 600 14px/1 var(--font); color: var(--ink-2); display: grid; place-items: center; transition: border-color .15s, background .15s; }
.help:hover { border-color: var(--ink); color: var(--ink); background: #fff; }

/* ---------- onboarding ---------- */
.ob { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.ob[hidden] { display: none; }
.ob-backdrop { position: absolute; inset: 0; background: rgba(17, 17, 16, .42); opacity: 0; transition: opacity .18s; }
.ob-card { position: relative; width: min(440px, 100%); background: var(--paper); border-radius: 16px; padding: 18px 22px 20px; box-shadow: 0 24px 64px rgba(0, 0, 0, .28); opacity: 0; transform: translateY(10px) scale(.98); transition: opacity .18s, transform .18s; }
.ob.open .ob-backdrop { opacity: 1; }
.ob.open .ob-card { opacity: 1; transform: none; }
.ob-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ob-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ob-skip { font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hair); }
.ob-skip:hover { color: var(--ink); }
/* minh hoạ tự khai báo fill/stroke; không kế thừa style của icon */
.ob-art svg { display: block; width: 100%; height: auto; border-radius: 12px; fill: none; stroke: none; stroke-width: 0; }
.ob-card:focus { outline: none; }
.ob-art.in { animation: obIn .28s ease; }
@keyframes obIn { from { opacity: 0; transform: translateX(8px); } }
.ob-title { margin: 18px 0 6px; font-size: 22px; font-weight: 700; letter-spacing: -.03em; line-height: 1.2; }
.ob-body { margin: 0; font-size: 14px; color: var(--ink-2); min-height: 63px; }
.ob-body b { font-weight: 600; color: var(--ink); }
.ob-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.ob-dots { display: flex; gap: 6px; }
.ob-dots button { width: 7px; height: 7px; border-radius: 99px; background: var(--hair); transition: width .2s, background .2s; }
.ob-dots button.on { width: 22px; background: var(--ink); }
.ob-nav { display: flex; gap: 8px; align-items: center; }
.ob-back { font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 0 10px; height: 40px; }
.ob-back:hover { color: var(--ink); }
.ob-next { height: 40px; padding: 0 18px; border-radius: 9px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 14px; }
.ob-next:hover { background: #000; }
html.ob-open .maplibregl-ctrl { visibility: hidden; }

/* nhóm */
.group { border-top: 1px solid var(--ink); padding-top: 14px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; }
.group-head h2 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: -.01em; }
.group-head h2 span { color: var(--muted); font-weight: 400; margin-left: 4px; }
.text-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--hair); text-underline-offset: 4px; text-decoration-thickness: 1px; transition: text-decoration-color .15s; }
.text-btn:hover:not(:disabled) { text-decoration-color: var(--ink); color: var(--ink); }
.text-btn svg { width: 14px; height: 14px; }

/* ô nhập địa chỉ + gợi ý */
.search { position: relative; margin-top: 12px; }
.search > svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; margin-top: -8px; fill: none; stroke: var(--muted); stroke-width: 1.8; pointer-events: none; }
.search input { width: 100%; box-sizing: border-box; height: 42px; padding: 0 12px 0 36px; border: 1px solid var(--hair); border-radius: 8px; background: #fff; font: 400 14px/1 var(--font); color: var(--ink); outline: none; transition: border-color .15s; -webkit-appearance: none; }
.search input::placeholder { color: var(--faint); }
.search input:focus { border-color: var(--ink); }
.search input:disabled { background: var(--paper-2); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search.busy::after { content: ""; position: absolute; right: 12px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border: 1.5px solid var(--hair); border-top-color: var(--ink); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sugs { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--ink); border-radius: 8px; box-shadow: 0 8px 24px rgba(17, 17, 16, .12); max-height: 420px; overflow-y: auto; }
.sug { padding: 9px 12px; cursor: pointer; border-top: 1px solid var(--hair); }
.sug:first-child { border-top: 0; }
.sug.on, .sug:hover { background: var(--paper); }
.sug.on { box-shadow: inset 3px 0 0 var(--ink); }
.sug-main { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sug-main b { font-weight: 600; font-size: 14px; letter-spacing: -.01em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-kind { flex: none; font-size: 11px; color: var(--muted); }
.sug-detail { font-size: 12.5px; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-note { font-size: 12px; color: var(--warn); margin-top: 2px; }
.sug-msg { padding: 12px; font-size: 13px; color: var(--ink-2); }
.sug-msg.err { color: var(--err); }
.sug-foot { position: sticky; bottom: 0; padding: 7px 12px; font-size: 11px; color: var(--faint); border-top: 1px solid var(--hair); background: var(--paper); }

.people { list-style: none; margin: 10px 0 0; padding: 0; }
.person { display: grid; grid-template-columns: 26px 1fr 24px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.person:first-child { border-top: 1px solid var(--hair); }
.tag { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: var(--on, #fff); font-size: 10.5px; font-weight: 700; letter-spacing: -.02em; border: 0; padding: 0; }
.tag.sm { width: 20px; height: 20px; font-size: 8px; letter-spacing: -.04em; }
.swatch { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.pmain { min-width: 0; }
.pmain input { width: 100%; border: 0; background: transparent; font: 500 14px/1.3 var(--font); color: var(--ink); padding: 0; outline: none; letter-spacing: -.01em; }
.pmain input:focus { box-shadow: 0 1px 0 var(--ink); }
.parea { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.del { width: 24px; height: 24px; display: grid; place-items: center; color: var(--faint); border-radius: 50%; opacity: 0; transition: opacity .15s, color .15s; }
.person:hover .del, .del:focus-visible { opacity: 1; }
.del:hover { color: var(--ink); }
.del svg { width: 14px; height: 14px; }
.empty { padding: 18px 0 6px; border-top: 1px solid var(--hair); }
.empty .lead { font-size: 22px; font-weight: 600; letter-spacing: -.03em; line-height: 1.2; margin: 0 0 6px; }
.empty p { margin: 0; color: var(--muted); font-size: 13px; }
.empty p.lead { color: var(--ink); font-size: 22px; margin-bottom: 6px; }
.hint-row { padding: 10px 0 0; font-size: 12.5px; color: var(--muted); }

/* hành động */
.cta { padding-top: 18px; padding-bottom: 18px; }
.go { width: 100%; height: 50px; display: flex; align-items: center; gap: 10px; padding: 0 18px; background: var(--ink); color: var(--paper); border-radius: 10px; font-weight: 600; font-size: 15px; letter-spacing: -.01em; transition: background .15s; }
.go .label { flex: 1; text-align: left; }
.go .arrow { width: 20px; height: 20px; stroke-width: 2; transition: transform .2s; }
.go:hover:not(:disabled) .arrow { transform: translateX(3px); }
.go:hover:not(:disabled) { background: #000; }
.go:disabled { background: var(--paper-2); color: var(--faint); }
.go:disabled .arrow { display: none; }
.spinner { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(246, 245, 241, .25); border-top-color: var(--accent); animation: spin .7s linear infinite; }
.go.loading { background: var(--ink); color: var(--paper); }
.go.loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.cta-sub { display: flex; justify-content: space-between; margin-top: 10px; }

/* ghi chú */
#msg:empty, #summary:empty, #results:empty { display: none; }
#msg { padding-bottom: 14px; }
.note { margin: 0 0 8px; padding: 1px 0 1px 12px; border-left: 2px solid var(--faint); font-size: 13px; color: var(--ink-2); }
.note.warn { border-color: #e8a33d; }
.note.err { border-color: var(--err); color: var(--err); }
.note b { font-weight: 600; }
.note button { margin-left: 6px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* kết luận: gặp nhau ở đâu */
.verdict { border-top: 1px solid var(--ink); padding-top: 18px; padding-bottom: 22px; }
.kicker { font-size: 12.5px; color: var(--muted); }
.verdict h2 { margin: 4px 0 2px; font-size: 40px; font-weight: 700; letter-spacing: -.045em; line-height: 1.02; }
.verdict h2 mark { background: linear-gradient(transparent 58%, var(--accent) 58%, var(--accent) 92%, transparent 92%); color: inherit; padding: 0 2px; margin: 0 -2px; }
.verdict .where { font-size: 13.5px; color: var(--ink-2); }
.from { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 14px 0 16px; font-size: 12.5px; color: var(--ink-2); }
.from span { display: inline-flex; align-items: center; gap: 6px; }
.more { font-size: 13px; font-weight: 500; text-underline-offset: 4px; text-decoration-color: var(--hair); }
.more:hover { text-decoration-color: var(--ink); }
.more svg { width: 13px; height: 13px; margin-left: 4px; vertical-align: -2px; }

/* bảng quán: kiểu bảng giờ tàu */
.table-head { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--ink); padding: 12px 0 8px; font-size: 12px; color: var(--muted); }
.table-head b { color: var(--ink); font-weight: 600; font-size: 13px; }
.table-head .legend { display: inline-flex; align-items: center; gap: 5px; }
.table-head .legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 30px 1fr auto; gap: 4px 12px; padding: 14px 0; border-top: 1px solid var(--hair); cursor: pointer; position: relative; }
.row::before { content: ""; position: absolute; left: calc(-1 * var(--pad)); top: -1px; bottom: 0; width: 3px; background: transparent; transition: background .15s; }
.row:hover::before { background: var(--hair); }
.row.sel::before { background: var(--ink); }
.idx { font-size: 12px; font-weight: 600; color: var(--muted); padding-top: 2px; font-variant-numeric: tabular-nums; }
.row.best .idx span { background: var(--accent); color: var(--ink); padding: 1px 4px; border-radius: 3px; }
.rname { font-size: 15px; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; }
.rmeta { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.rsub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.row > div:nth-child(2) { min-width: 0; }
.rsub .stale { color: var(--warn); white-space: nowrap; }
.rmin { text-align: right; line-height: 1; padding-top: 1px; }
.rmin b { font-size: 26px; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.rmin small { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }

/* dot plot: mỗi người một chấm trên trục thời gian chung, đoạn đậm = chênh lệch */
.plot { grid-column: 2 / 4; position: relative; height: 14px; margin-top: 8px; }
.plot .axis { position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: var(--paper-2); border-radius: 2px; }
.plot .span { position: absolute; top: 6px; height: 2px; background: var(--ink); border-radius: 2px; opacity: .8; }
.plot .pt { position: absolute; top: 2px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--paper); }

.detail { grid-column: 2 / 4; margin-top: 12px; }
.legs { list-style: none; margin: 0; padding: 0; }
.legs li { display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: center; padding: 5px 0; font-size: 13px; border-top: 1px dashed var(--hair); }
.legs li:first-child { border-top: 0; }
.legs .m { font-variant-numeric: tabular-nums; font-weight: 500; }
/* thông tin quán: bảng nhãn/giá trị + nhãn tiện ích */
.info { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--hair); }
.info dl { display: grid; grid-template-columns: 76px 1fr; gap: 4px 12px; margin: 0; font-size: 13px; }
.info dt { color: var(--muted); font-size: 12px; padding-top: 1px; }
.info dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.info dd a { color: inherit; text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.info dd a:hover { text-decoration-color: var(--ink); }
.chips { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-size: 12px; line-height: 1; padding: 5px 7px; border: 1px solid var(--hair); border-radius: 3px; color: var(--ink-2); background: var(--paper); }
.facts { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.facts div + div { margin-top: 2px; }
.acts { display: flex; gap: 8px; margin-top: 12px; }
.acts a { flex: 1; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; border-radius: 8px; font-size: 13px; font-weight: 600; text-decoration: none; border: 1px solid var(--hair); background: #fff; }
.acts a:hover { border-color: var(--ink); }
.acts a.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.acts a svg { width: 14px; height: 14px; }

/* trạng thái tải */
.sk { background: linear-gradient(90deg, var(--paper-2) 0, #f9f8f5 50%, var(--paper-2) 100%); background-size: 200% 100%; animation: sh 1.1s linear infinite; border-radius: 4px; }
@keyframes sh { to { background-position: -200% 0; } }
.sk-verdict { border-top: 1px solid var(--ink); padding-top: 18px; padding-bottom: 22px; }
.sk-row { border-top: 1px solid var(--hair); padding: 16px 0; display: grid; gap: 8px; }

.foot { margin-top: auto; padding-top: 24px; padding-bottom: 22px; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.foot a { text-underline-offset: 3px; text-decoration-color: var(--hair); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 50; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- bản đồ ---------- */
.mk-person { cursor: grab; }
.mk-person .b { width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: var(--on, #fff); border: 2.5px solid #fff; display: grid; place-items: center; font: 700 11px/1 var(--font); letter-spacing: -.02em; box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 4px 10px rgba(0, 0, 0, .12); transition: transform .15s; }
.mk-person.hl .b { transform: scale(1.15); }
.mk-cafe { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--paper); border: 2px solid var(--paper); font: 600 10.5px/1 var(--font); display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s, box-shadow .15s; }
.mk-cafe.best { width: 26px; height: 26px; background: var(--accent); color: var(--ink); border-color: var(--ink); font-size: 11.5px; }
.mk-cafe.sel, .mk-cafe:hover { transform: scale(1.25); box-shadow: 0 0 0 3px var(--accent), 0 2px 8px rgba(0, 0, 0, .3); }
.mk-zone-wrap { pointer-events: none; width: 120px; height: 120px; position: relative; }
.mk-zone { position: absolute; inset: 0; border-radius: 50%; background: rgba(17, 17, 16, .045); border: 1.5px dashed rgba(17, 17, 16, .45); }
.mk-zone-label { position: absolute; left: 50%; top: -12px; transform: translateX(-50%); white-space: nowrap; background: var(--ink); color: var(--paper); font: 600 11.5px/1 var(--font); padding: 6px 9px 6px 8px; border-radius: 99px; display: flex; align-items: center; gap: 6px; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.mk-zone-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.maplibregl-ctrl-group { border-radius: 8px !important; box-shadow: 0 0 0 1px var(--hair) !important; }
.city-switch { display: flex; padding: 3px; gap: 2px; background: rgba(246, 245, 241, .94); border-radius: 99px; box-shadow: 0 0 0 1px var(--hair), 0 4px 14px rgba(0, 0, 0, .08); backdrop-filter: blur(6px); }
.city-switch button { font: 600 12.5px/1 var(--font); color: var(--ink-2); padding: 8px 12px; border-radius: 99px; white-space: nowrap; transition: background .15s, color .15s; }
.city-switch button:hover { color: var(--ink); background: rgba(17, 17, 16, .05); }
.city-switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.city-more { position: relative; display: flex; align-items: center; border-radius: 99px; }
.city-more::after { content: ""; position: absolute; right: 11px; top: 50%; width: 6px; height: 6px; margin-top: -5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); pointer-events: none; color: var(--ink-2); }
.city-more select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; font: 600 12.5px/1 var(--font); color: var(--ink-2); padding: 8px 26px 8px 12px; border-radius: 99px; cursor: pointer; max-width: 150px; }
.city-more select:hover { background: rgba(17, 17, 16, .05); color: var(--ink); }
.city-more.on select { background: var(--ink); color: var(--paper); }
.city-more.on::after { color: var(--paper); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.maplibregl-ctrl-attrib { font: 10.5px var(--font); background: rgba(246, 245, 241, .85) !important; }

/* ---------- mobile: bottom sheet ---------- */
@media (max-width: 760px) {
  :root { --pad: 20px; }
  .app { display: block; }
  #map { position: fixed; inset: 0; border: 0; }
  .panel { position: fixed; left: 0; right: 0; bottom: 0; max-height: 54dvh; border-radius: 16px 16px 0 0; box-shadow: 0 -1px 0 var(--hair), 0 -12px 32px rgba(0, 0, 0, .1); transition: max-height .25s ease; padding-bottom: env(safe-area-inset-bottom); }
  .panel.expanded { max-height: 90dvh; }
  .grab { display: block; padding: 10px 0 2px !important; width: 100%; flex: none; }
  .grab span { display: block; width: 36px; height: 4px; border-radius: 99px; background: var(--hair); margin: 0 auto; }
  .top { padding-top: 6px; padding-bottom: 14px; }
  .verdict h2 { font-size: 34px; }
  .del { opacity: 1; }
  .toast { bottom: calc(54dvh + 12px); }
  .ob { place-items: end stretch; padding: 0; }
  .ob-card { width: 100%; border-radius: 18px 18px 0 0; padding: 16px 20px calc(20px + env(safe-area-inset-bottom)); transform: translateY(24px); }
  .ob-title { font-size: 20px; }
}

/* loại quán + loại trừ */
.prefs { padding-top: 16px; }
.prefs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.seg { display: inline-flex; background: var(--paper-2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg-b { font-size: 13px; font-weight: 500; color: var(--ink-2); padding: 6px 11px; border-radius: 7px; transition: background .15s, color .15s; white-space: nowrap; }
.seg-b:hover { color: var(--ink); }
.seg-b.on { background: var(--ink); color: var(--paper); }
.excl-btn b { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; margin-left: 2px; border-radius: 9px; background: var(--accent); color: var(--ink); font-size: 11px; font-weight: 700; text-decoration: none; }
.excl { margin-top: 10px; padding: 12px; background: var(--paper-2); border-radius: 10px; font-size: 13px; }
.tog { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; color: var(--ink-2); line-height: 1.4; }
.tog input { margin: 2px 0 0; accent-color: var(--ink); }
.tog small { color: var(--muted); font-size: 12px; }
.kw { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.kw input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid var(--hair); border-radius: 7px; background: #fff; font: 400 13px/1 var(--font); color: var(--ink); outline: none; }
.kw input:focus { border-color: var(--ink); }
.tags-x { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags-x li { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 9px; background: #fff; border: 1px solid var(--hair); border-radius: 6px; font-size: 12.5px; color: var(--ink); max-width: 100%; }
.tags-x button { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; color: var(--muted); }
.tags-x button:hover { background: var(--paper-2); color: var(--ink); }
.tags-x svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.hid-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; color: var(--muted); font-size: 12px; }
.excl-hint { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.hide-btn { margin-top: 10px; font-size: 12.5px; color: var(--muted); text-decoration: underline; text-decoration-color: var(--hair); text-underline-offset: 3px; }
.hide-btn:hover { color: var(--err); text-decoration-color: currentColor; }

/* hướng dẫn bật vị trí */
.loc-help { margin-top: 10px; padding: 10px 12px; background: #fff7e6; border: 1px solid #f0d9a8; border-radius: 9px; font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.loc-help-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--warn); }
.loc-help-head button { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; color: var(--muted); }
.loc-help-head svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
.loc-help ol { margin: 6px 0 0; padding-left: 18px; }
.loc-help li + li { margin-top: 3px; }
.text-btn.busy { opacity: .55; }

/* nhóm đã lưu */
.head-acts { display: flex; gap: 14px; align-items: baseline; }
.circles { margin-top: 10px; padding: 12px; background: var(--paper-2); border-radius: 10px; font-size: 13px; }
.c-save { display: flex; gap: 8px; }
.c-save input { flex: 1; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--hair); border-radius: 7px; background: #fff; font: 400 13px/1 var(--font); color: var(--ink); outline: none; }
.c-save input:focus { border-color: var(--ink); }
.c-save-btn { flex: none; height: 36px; padding: 0 12px; border-radius: 7px; background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 600; }
.c-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.c-list li { display: flex; align-items: stretch; background: #fff; border: 1px solid var(--hair); border-radius: 8px; overflow: hidden; }
.c-list li.on { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); }
.c-open { flex: 1; min-width: 0; text-align: left; padding: 8px 10px; }
.c-open:hover { background: var(--paper); }
.c-open b { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.c-open span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-del { flex: none; width: 34px; display: grid; place-items: center; color: var(--muted); border-left: 1px solid var(--hair); }
.c-del:hover { color: var(--err); background: var(--paper); }
.c-del svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
.c-empty { margin: 10px 0 0; color: var(--ink-2); }
.c-note { margin: 8px 0 0; color: var(--muted); font-size: 11.5px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; font-size: 12px; color: var(--muted); }
.quick > span { margin-right: 2px; }
.quick button { padding: 4px 9px; border: 1px dashed var(--faint); border-radius: 6px; font-size: 12.5px; color: var(--ink-2); background: transparent; }
.quick button:hover { border-style: solid; border-color: var(--ink); color: var(--ink); }
