:root {
  --bg: #070d18;
  --panel: #0f1828;
  --panel-2: #142035;
  --line: #22314d;
  --text: #e6ecfa;
  --muted: #8b9abb;
  --accent: #6aa9ff;
  --accent-2: #b18cff;
  --good: #4ade80;
  --bad: #ff6b6b;
  --warn: #ffc857;
  --radius: 12px;
  --font: "Zen Kaku Gothic New", system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; }
body { display: flex; flex-direction: column; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
a { color: var(--accent); }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 14px; padding: 8px 14px; background: linear-gradient(180deg, #0f1a2e, #0b1424); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo { font-size: 30px; color: #8fb8ff; filter: drop-shadow(0 0 8px rgba(106,169,255,.5)); }
.brand b { font-size: 17px; font-weight: 900; letter-spacing: .04em; background: linear-gradient(90deg, #9cc6ff, #d3b8ff); -webkit-background-clip: text; background-clip: text; color: transparent; display: block; }
.brand small { color: var(--muted); font-size: 11px; display: block; }
.clock { display: flex; align-items: center; gap: 6px; padding: 5px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; font-variant-numeric: tabular-nums; font-weight: 700; min-width: 170px; justify-content: center; }
.playback { display: flex; align-items: center; gap: 6px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ai-status { display: flex; gap: 4px; flex-wrap: wrap; }
.ai-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.ai-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.ai-chip.busy .dot { background: var(--good); box-shadow: 0 0 6px var(--good); animation: blink 1s infinite; }
.ai-chip.err .dot { background: var(--bad); }
@keyframes blink { 50% { opacity: .35; } }

/* ---------- buttons ---------- */
.btn { background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; padding: 6px 12px; cursor: pointer; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:hover { background: #1b2a45; border-color: #33476e; }
.btn:active { transform: translateY(1px); }
.btn.icon { padding: 6px 10px; min-width: 34px; }
.btn.small, .seg.small button { padding: 4px 8px; font-size: 12px; }
.btn.primary { background: linear-gradient(135deg, #3f7dff, #8b5cf6); border-color: transparent; font-weight: 700; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { color: #ffb4b4; }
.btn.wide { width: 100%; padding: 10px; }
.btn:disabled { opacity: .5; cursor: default; }
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg button { background: none; border: 0; padding: 6px 10px; cursor: pointer; color: var(--muted); }
.seg button.on { background: #24385c; color: var(--text); font-weight: 700; }

.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px; display: none; z-index: 50; min-width: 180px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.menu-pop.open { display: block; }
.menu-pop button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.menu-pop button:hover { background: var(--panel-2); }

/* ---------- layout ---------- */
.layout { flex: 1; display: grid; grid-template-columns: 320px 1fr 380px; min-height: 0; }
.panel { background: var(--panel); overflow-y: auto; min-height: 0; }
.panel.left { border-right: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.panel.right { border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.card { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.card h2 { font-size: 14px; margin: 0 0 10px; font-weight: 900; }
.card h3 { font-size: 13px; margin: 14px 0 8px; color: var(--muted); font-weight: 700; }
.form { display: flex; flex-direction: column; gap: 9px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.form label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
.form label output { color: var(--text); font-weight: 700; }
input, select, textarea { background: #0b1322; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; color: var(--text); width: 100%; }
input[type=range] { padding: 0; accent-color: var(--accent); }
input[type=checkbox] { width: auto; accent-color: var(--accent); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(106,169,255,.4); border-color: var(--accent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 4px 0; }
.chips { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips legend { font-size: 12px; color: var(--muted); margin-bottom: 4px; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: #0b1322; cursor: pointer; font-size: 12px; user-select: none; }
.chip input { display: none; }
.chip:has(input:checked) { background: #24385c; border-color: var(--accent); }
.presets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.presets button { font-size: 12px; }

/* ---------- map ---------- */
.mapwrap { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #0a1220; }
#map { display: block; touch-action: none; cursor: grab; }
.legend { position: absolute; left: 12px; top: 12px; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 330px); }
.legend .lg { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: rgba(10,18,32,.8); border: 1px solid var(--line); font-size: 12px; cursor: pointer; backdrop-filter: blur(4px); }
.legend .lg.on { border-color: #fff; }
.legend .lg i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.legend .lg b { font-variant-numeric: tabular-nums; }
.map-tools { position: absolute; right: 12px; top: 12px; display: flex; gap: 6px; }
.map-tools .seg, .map-tools .btn { background: rgba(10,18,32,.85); backdrop-filter: blur(4px); }
.ticker { position: absolute; left: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 6px; max-width: min(460px, calc(100% - 24px)); pointer-events: none; }
.tick-item { display: flex; gap: 8px; align-items: flex-start; padding: 7px 10px; background: rgba(10,18,32,.88); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; font-size: 12px; animation: slidein .35s ease-out; backdrop-filter: blur(4px); }
@keyframes slidein { from { opacity: 0; transform: translateY(8px); } }
.tooltip { position: absolute; pointer-events: none; background: rgba(10,18,32,.95); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 12px; max-width: 260px; z-index: 20; box-shadow: 0 8px 24px rgba(0,0,0,.4); line-height: 1.5; }
.toasts { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; z-index: 30; }
.toast { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 12px; max-width: 360px; box-shadow: 0 8px 24px rgba(0,0,0,.4); animation: slidein .3s; }
.toast.err { border-color: #7a2f3a; }
.empty-hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; background: rgba(10,18,32,.8); padding: 16px 22px; border-radius: 14px; border: 1px solid var(--line); pointer-events: none; line-height: 1.8; }
.empty-hint small { color: var(--muted); display: block; }
.empty-hint .btn { pointer-events: auto; margin: 8px 0 4px; }
.for-touch { display: none !important; }
@media (hover: none) { .for-touch { display: block !important; } span.for-touch { display: inline !important; } .for-pointer { display: none !important; } }
.card.flash { animation: flash 1.2s ease-out; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.tooltip.pinned { pointer-events: auto; }
.tooltip .tt-actions { display: flex; gap: 6px; margin-top: 8px; }
.tooltip .tt-actions .btn { flex: 1; justify-content: center; display: inline-flex; align-items: center; gap: 4px; }
.toast .btn { margin-left: 8px; }

/* ---------- tabs ---------- */
.tabs { display: flex; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 2; }
.tabs button { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 4px; cursor: pointer; color: var(--muted); font-size: 11.5px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.tabs button .ms { font-size: 20px; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 700; }
.tab-body { flex: 1; overflow-y: auto; }
.tab { padding: 12px; display: flex; flex-direction: column; gap: 12px; }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.kpi small { color: var(--muted); font-size: 11px; display: block; }
.kpi b { font-size: 20px; font-variant-numeric: tabular-nums; font-weight: 900; }
.kpi span { font-size: 11px; color: var(--muted); }
.chart { width: 100%; display: block; }
.bars .bar-row { display: grid; grid-template-columns: 52px 1fr 42px; align-items: center; gap: 8px; font-size: 12px; margin: 4px 0; cursor: pointer; }
.bars .bar-row:hover { color: #fff; }
.stack { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: #0b1322; }
.stack i { display: block; height: 100%; }
.emo-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.emo-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); background: #0b1322; }
.funnel .f-row { display: grid; grid-template-columns: 70px 1fr 60px; gap: 8px; align-items: center; font-size: 12px; margin: 5px 0; }
.funnel .f-bar { height: 16px; border-radius: 5px; transition: width .4s; min-width: 2px; }

/* feed */
.feed { display: flex; flex-direction: column; gap: 8px; }
.feed-filter { align-self: flex-start; }
.post { display: grid; grid-template-columns: 36px 1fr; gap: 9px; padding: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; animation: slidein .3s; }
.post:hover { border-color: #33476e; }
.post.system { grid-template-columns: 1fr; background: linear-gradient(135deg, rgba(63,125,255,.15), rgba(139,92,246,.15)); text-align: center; cursor: default; }
.post.life { opacity: .8; }
.post .meta { font-size: 11px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.post .meta b { color: var(--text); font-size: 12px; }
.post .body { margin-top: 3px; line-height: 1.55; }
.post.kind-post .body { font-size: 14px; }
.post .reason { color: var(--muted); font-size: 12px; margin-top: 2px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; position: relative; flex: none; }
.avatar .pv { position: absolute; top: -6px; right: -6px; font-size: 11px; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--panel-2); }
.tag { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; font-size: 11px; border: 1px solid var(--line); background: #0b1322; }
.state-tag { color: #0b1322; font-weight: 700; border: 0; }

/* person */
.person-head { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; }
.person-head .avatar { width: 64px; height: 64px; font-size: 34px; }
.person-head .avatar .pv { width: 26px; height: 26px; font-size: 14px; top: -4px; right: -4px; }
.person-head h2 { margin: 0; font-size: 18px; }
.person-head .sub { color: var(--muted); font-size: 12px; }
.traits { display: grid; grid-template-columns: 84px 1fr 30px; gap: 4px 8px; align-items: center; font-size: 12px; }
.meter { height: 7px; background: #0b1322; border-radius: 4px; overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.timeline { display: flex; flex-direction: column; gap: 8px; border-left: 2px solid var(--line); padding-left: 12px; }
.tl-item { position: relative; font-size: 12.5px; line-height: 1.5; }
.tl-item::before { content: ''; position: absolute; left: -18px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--dot, var(--accent)); border: 2px solid var(--panel); }
.tl-item small { color: var(--muted); display: block; }
.friends { display: flex; flex-wrap: wrap; gap: 5px; }
.friends button { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: #0b1322; border: 1px solid var(--line); cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.friends button i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.chat { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.msg { padding: 7px 10px; border-radius: 12px; max-width: 88%; line-height: 1.5; font-size: 13px; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: #27407a; border-bottom-right-radius: 3px; }
.msg.assistant { align-self: flex-start; background: #0b1322; border: 1px solid var(--line); border-bottom-left-radius: 3px; }
.msg .who { font-size: 11px; color: var(--muted); display: block; margin-bottom: 2px; }
.chat-form { display: flex; gap: 6px; }
.chat-form input { flex: 1; }
.empty { color: var(--muted); text-align: center; padding: 30px 10px; line-height: 1.8; }
.profile-box { background: #0b1322; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 12.5px; line-height: 1.6; }
.profile-box dt { color: var(--muted); font-size: 11px; margin-top: 4px; }
.profile-box dd { margin: 0; }

/* towns */
.town { padding: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.town:hover { border-color: #33476e; }
.town h3 { margin: 0 0 6px; font-size: 14px; color: var(--text); display: flex; align-items: center; gap: 6px; }
.town h3 i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.town .sub { font-size: 12px; color: var(--muted); margin-bottom: 6px; }

/* report */
.md h1, .md h2 { font-size: 15px; margin: 14px 0 6px; }
.md h3 { font-size: 13px; margin: 10px 0 4px; }
.md p, .md li { line-height: 1.7; font-size: 13px; }
.md ul { padding-left: 18px; margin: 4px 0; }
.quote { padding: 8px 10px; border-radius: 10px; background: #0b1322; border-left: 3px solid var(--accent); font-size: 12.5px; line-height: 1.6; cursor: pointer; }
.quote small { color: var(--muted); display: block; }
.past-svc { font-size: 12px; padding: 8px; border: 1px dashed var(--line); border-radius: 10px; }

/* dialogs */
.dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 18px; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 40px); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.dialog.wide { width: min(980px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(3,6,14,.7); backdrop-filter: blur(3px); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.dlg-head h2 { margin: 0; font-size: 17px; }
.preset-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.provider-list { display: flex; flex-direction: column; gap: 10px; }
.pv-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--panel-2); border-left: 4px solid var(--pvc, var(--accent)); }
.pv-card.off { opacity: .55; }
.pv-top { display: grid; grid-template-columns: auto 170px 1fr 120px auto; gap: 8px; align-items: center; }
.pv-top .icon-input { text-align: center; font-size: 18px; padding: 4px; }
.pv-top input[type=color] { padding: 2px; height: 34px; width: 44px; }
.pv-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin-top: 10px; }
.pv-fields label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--muted); }
.pv-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.pv-foot .grow { flex: 1; }
.pv-stat { font-variant-numeric: tabular-nums; }
.pv-err { color: #ffb4b4; font-size: 12px; margin-top: 6px; word-break: break-all; }
.share-bar { margin-top: 14px; }
.share-bar .bar { display: flex; height: 22px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.share-bar .bar span { display: grid; place-items: center; font-size: 12px; white-space: nowrap; overflow: hidden; color: #0b1322; font-weight: 700; }

@media (max-width: 1200px) {
  .layout { grid-template-columns: 290px 1fr 330px; }
}
@media (max-width: 960px) {
  body { overflow: auto; height: auto; }
  .layout { display: flex; flex-direction: column; }
  .mapwrap { height: 62vh; order: -1; }
  .panel { overflow: visible; }
  .panel.left, .panel.right { border: 0; border-top: 1px solid var(--line); }
  .tab-body { overflow: visible; }
  .top-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
  .legend { max-width: calc(100% - 24px); top: 52px; }
  .pv-top { grid-template-columns: auto 150px 1fr; }
  .clock { min-width: 0; }
}
@media (max-width: 960px) {
  .toasts { position: fixed; left: 16px; right: 16px; bottom: 16px; align-items: stretch; }
  .toast { max-width: none; }
}
@media (max-width: 560px) {
  .topbar { padding: 8px 16px; gap: 8px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .ticker { display: none; }
  .row2 { grid-template-columns: 1fr; }
}

/* ---------- Material Symbols ---------- */
.ms { font-family: 'Material Symbols Rounded'; font-weight: normal; font-style: normal; font-size: 1.2em; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr; -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; vertical-align: -0.22em; user-select: none; overflow: hidden; max-width: 1.2em; }
.btn .ms { font-size: 18px; vertical-align: -4px; }
.btn.icon .ms { font-size: 20px; }
h2 .ms { font-size: 19px; color: var(--accent); vertical-align: -4px; }
.card h2 .ms { margin-right: 2px; }
.icon-field { display: flex; align-items: center; gap: 6px; }
.icon-field .ms { font-size: 24px; color: var(--accent); max-width: none; }
.icon-field, .pv-icon { position: relative; }
.icon-picker { position: absolute; top: calc(100% + 4px); left: 0; z-index: 60; width: 292px; display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: #0b1322; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.icon-picker button { background: var(--panel-2); border: 1px solid var(--line); border-radius: 7px; width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer; padding: 0; }
.icon-picker button:hover { border-color: var(--accent); }
.icon-picker button .ms { font-size: 20px; }
.icon-picker a { width: 100%; font-size: 11px; text-decoration: none; display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.avatar .ms { font-size: 22px; max-width: none; }
.person-head .avatar .ms { font-size: 40px; }
.avatar .pv .ms { font-size: 12px; color: #0b1322; }
.person-head .avatar .pv .ms { font-size: 16px; }
.emo-ic { max-width: none; }
.tag .ms { font-size: 14px; vertical-align: -3px; }
.kpi .ms { font-size: 18px; vertical-align: -3px; }
.post .meta .ms { font-size: 14px; vertical-align: -3px; }
.post.news { grid-template-columns: 36px 1fr; background: linear-gradient(135deg, rgba(251,146,60,.14), rgba(251,146,60,.04)); border-color: #6b4423; cursor: default; }
.post.news .avatar { background: #fb923c; color: #1a0f05; }
.contact-legend { position: absolute; right: 12px; top: 54px; display: flex; flex-direction: column; gap: 4px; background: rgba(10,18,32,.85); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; font-size: 11.5px; backdrop-filter: blur(4px); }
.contact-legend .cl { display: flex; align-items: center; gap: 6px; cursor: pointer; opacity: .55; }
.contact-legend .cl.on { opacity: 1; }
.contact-legend .cl i { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }
.contact-legend .cl b { margin-left: auto; padding-left: 8px; font-variant-numeric: tabular-nums; }
.contact-legend .cl-title { color: var(--muted); font-size: 11px; display: flex; justify-content: space-between; gap: 8px; }
.contact-legend label { display: flex; gap: 4px; align-items: center; color: var(--muted); cursor: pointer; }
.tooltip .tt-head { display: flex; align-items: center; gap: 6px; }
.tooltip .tt-head .ms { font-size: 18px; max-width: none; }
.tooltip .tt-row { color: var(--muted); }
.tooltip .tt-thought { margin-top: 6px; padding: 6px 8px; background: #0b1322; border-radius: 8px; border-left: 3px solid var(--accent); color: var(--text); }
.tooltip .tt-reason { margin-top: 4px; color: #c9d4ee; }
.tooltip .tt-meter { height: 5px; background: #0b1322; border-radius: 3px; overflow: hidden; margin-top: 4px; }
.tooltip .tt-meter i { display: block; height: 100%; }
.tooltip .tt-pv { display: inline-flex; align-items: center; gap: 3px; padding: 0 6px; border-radius: 999px; color: #0b1322; font-weight: 700; font-size: 11px; }
.tooltip .tt-pv .ms { font-size: 13px; }
.msg.company { align-self: flex-end; background: #6b3a14; border-bottom-right-radius: 3px; }
.msg.person { align-self: flex-start; background: #0b1322; border: 1px solid var(--line); border-bottom-left-radius: 3px; }
.msg .who .ms { font-size: 13px; vertical-align: -2px; }
.chat-mode { margin-bottom: 8px; }
.contacts-list { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.contacts-list button { display: flex; gap: 6px; align-items: center; background: none; border: 0; padding: 3px 0; cursor: pointer; text-align: left; color: var(--text); }
.contacts-list button:hover { color: #fff; }
.contacts-list small { color: var(--muted); margin-left: auto; white-space: nowrap; }
.buzz-bar { height: 8px; border-radius: 4px; background: #0b1322; overflow: hidden; margin-top: 4px; }
.buzz-bar i { display: block; height: 100%; background: linear-gradient(90deg, #f59e0b, #ef4444); }
.pr-item { font-size: 12px; padding: 6px 0; border-top: 1px dashed var(--line); margin-top: 6px; }
.pv-top .icon-input { font-family: inherit; font-size: 12px; }
.pv-icon { display: flex; align-items: center; gap: 4px; }
.pv-icon .ms { font-size: 22px; color: var(--pvc); max-width: none; }
@media (max-width: 960px) {
  .contact-legend { top: auto; bottom: 8px; left: 8px; right: 8px; flex-direction: row; flex-wrap: wrap; gap: 4px 10px; padding: 4px 8px; }
  .contact-legend .cl-l, .contact-legend label { display: none; }
  .contact-legend .cl b { padding-left: 2px; }
}
