:root {
  --ao-canvas: #111522; --ao-panel: #1b2232; --ao-card: #20283a; --ao-border: #39445a;
  --ao-text: #f3f5fb; --ao-secondary: #b2bed2; --ao-selection: #ffbc5c; --ao-live: #52d891;
  --ao-idle: #9cadc7; --ao-blocked: #ff827f; --ao-walk: #5fb3ff; --ao-radius: 12px;
  --ao-font: "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ao-canvas); color: var(--ao-text); font-family: var(--ao-font); }
body { display: flex; flex-direction: column; min-height: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ao-selection); outline-offset: 2px; }

/* top bar */
.top { display: flex; align-items: center; gap: 18px; padding: 10px 18px; border-bottom: 1px solid var(--ao-border); background: #0e1220; position: sticky; top: 0; z-index: 20; }
.brand { font-weight: 700; font-size: 20px; white-space: nowrap; }
.logo { color: var(--ao-selection); }
.views { display: flex; gap: 4px; }
.views button { background: none; border: 1px solid transparent; border-radius: 8px; padding: 7px 14px; color: var(--ao-secondary); }
.views button.on { border-color: var(--ao-selection); color: var(--ao-selection); background: rgba(255,188,92,.08); }
.searchbox { position: relative; margin-left: auto; width: min(340px, 34vw); }
.searchbox input { width: 100%; background: var(--ao-panel); border: 1px solid var(--ao-border); border-radius: 10px; padding: 8px 12px; }
.qres { position: absolute; top: 42px; left: 0; right: 0; list-style: none; margin: 0; padding: 4px; background: var(--ao-panel); border: 1px solid var(--ao-border); border-radius: 10px; max-height: 360px; overflow: auto; z-index: 30; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.qres li { padding: 7px 10px; border-radius: 7px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.qres li small { color: var(--ao-secondary); white-space: nowrap; }
.qres li.on, .qres li:hover { background: rgba(255,188,92,.12); }
.conn { display: flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-size: 13px; white-space: nowrap; border: 1px solid var(--ao-border); }
.conn i { width: 9px; height: 9px; border-radius: 50%; background: var(--ao-idle); }
.conn.live { border-color: rgba(82,216,145,.5); background: rgba(82,216,145,.08); } .conn.live i { background: var(--ao-live); box-shadow: 0 0 8px var(--ao-live); }
.conn.connecting i, .conn.reconnecting i { background: var(--ao-selection); animation: blink 1s infinite; }
.conn.offline { border-color: rgba(255,130,127,.5); } .conn.offline i { background: var(--ao-blocked); }
@keyframes blink { 50% { opacity: .3; } }

.kpis { display: flex; gap: 0; border-bottom: 1px solid var(--ao-border); overflow-x: auto; }
.kpis div { padding: 10px 22px; border-right: 1px solid var(--ao-border); white-space: nowrap; color: var(--ao-secondary); font-size: 14px; }
.kpis b { color: var(--ao-selection); font-size: 22px; margin-right: 6px; }

main { flex: 1; min-height: 0; display: flex; }
.view { display: none; flex: 1; min-width: 0; }
.view.on { display: flex; }
#v-office { gap: 14px; padding: 12px 14px; min-height: calc(100vh - 120px); }
.mapcol { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.maptools, .zoombar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.seg { display: flex; border: 1px solid var(--ao-border); border-radius: 9px; overflow: hidden; }
.seg button { background: none; border: 0; padding: 6px 14px; color: var(--ao-secondary); }
.seg button.on { background: var(--ao-selection); color: #1a1408; font-weight: 600; }
.chk { font-size: 13px; color: var(--ao-secondary); display: flex; align-items: center; gap: 6px; }
.mapwrap { position: relative; flex: 1; min-height: 360px; overflow: hidden; border-radius: var(--ao-radius); background: #0c0f1a; border: 1px solid var(--ao-border); cursor: grab; touch-action: none; }
.mapwrap.drag { cursor: grabbing; }
.map { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.map img { display: block; user-select: none; image-rendering: auto; }
.map canvas { position: absolute; left: 0; top: 0; pointer-events: none; }
#labels { position: absolute; inset: 0; pointer-events: none; }
.rl { position: absolute; transform: translate(-50%, -50%) scale(var(--inv, 1)); pointer-events: auto; display: flex; align-items: center; gap: 6px;
  background: rgba(14,18,32,.88); border: 1.5px solid var(--ao-border); border-radius: 9px; padding: 5px 10px; font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--ao-text); }
.rl:hover { border-color: var(--ao-secondary); }
.rl.sel { border-color: var(--ao-selection); box-shadow: 0 0 0 3px rgba(255,188,92,.25), 0 0 18px rgba(255,188,92,.35); color: var(--ao-selection); }
.rl .ic { font-size: 15px; }
.rl .cnt { font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: rgba(82,216,145,.16); color: var(--ao-live); }
.rl .cnt.zero { background: rgba(156,173,199,.12); color: var(--ao-idle); font-weight: 500; }
.rl.dim { opacity: .45; }
.pop { position: absolute; z-index: 5; max-width: 300px; background: #0e1220; border: 1px solid var(--ao-border); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.45; box-shadow: 0 10px 30px rgba(0,0,0,.55); pointer-events: none; }
.pop b { font-size: 14px; } .pop .s { color: var(--ao-secondary); }
.zoom { display: flex; align-items: center; border: 1px solid var(--ao-border); border-radius: 9px; }
.zoom button, #fit { background: none; border: 0; padding: 6px 12px; }
#fit { border: 1px solid var(--ao-border); border-radius: 9px; }
#zval { min-width: 52px; text-align: center; font-size: 14px; }
.legend { margin-left: auto; font-size: 12px; color: var(--ao-secondary); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.d { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-left: 8px; }
.d.work { background: var(--ao-selection); } .d.walk { background: var(--ao-walk); } .d.done { background: var(--ao-live); } .d.idle { background: var(--ao-idle); }

/* details panel */
.panel { width: 380px; flex-shrink: 0; background: var(--ao-panel); border: 1px solid var(--ao-border); border-radius: var(--ao-radius); padding: 16px; overflow-y: auto; max-height: calc(100vh - 130px); }
.ph { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.ph .big { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; font-size: 22px; border: 1.5px solid var(--ao-selection); color: var(--ao-selection); }
.ph h2 { margin: 0; font-size: 19px; } .ph .s { color: var(--ao-secondary); font-size: 13px; }
.tabs { display: flex; border: 1px solid var(--ao-border); border-radius: 9px; overflow: hidden; margin-bottom: 10px; }
.tabs button { flex: 1; background: none; border: 0; padding: 7px; color: var(--ao-secondary); }
.tabs button.on { background: var(--ao-selection); color: #1a1408; font-weight: 600; }
.pfilter { width: 100%; background: var(--ao-canvas); border: 1px solid var(--ao-border); border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; font-size: 13px; }
.items { list-style: none; margin: 0; padding: 0; }
.items li { border: 1px solid var(--ao-border); border-radius: 9px; margin-bottom: 6px; }
.items .row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; background: none; border: 0; width: 100%; text-align: left; }
.items .row .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.items .more { padding: 0 10px 10px; font-size: 13px; color: var(--ao-secondary); line-height: 1.5; }
.items li.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 3px var(--ao-selection); } 100% { box-shadow: 0 0 0 0 transparent; } }
.st { font-size: 12px; white-space: nowrap; }
.st.busy { color: var(--ao-live); } .st.busy::before { content: "● "; }
.st.ready { color: var(--ao-idle); font-style: italic; }
.st.idle { color: var(--ao-idle); }
.st.err { color: var(--ao-blocked); }
.tok { color: var(--ao-secondary); font-size: 12px; }
.sec { margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--ao-secondary); }
.deptlist { list-style: none; margin: 0; padding: 0; }
.deptlist li { display: flex; justify-content: space-between; padding: 7px 4px; border-bottom: 1px solid var(--ao-border); cursor: pointer; font-size: 14px; }
.deptlist li:hover { color: var(--ao-selection); }
.empty { color: var(--ao-secondary); font-style: italic; font-size: 13px; }
.hint { color: var(--ao-secondary); font-size: 12.5px; margin: 6px 0; }
.ghost { background: none; border: 1px solid var(--ao-border); border-radius: 8px; padding: 6px 12px; }

/* activity + directory */
#v-activity, #v-directory { padding: 14px; overflow-y: auto; }
.cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; width: 100%; align-items: start; }
.card { background: var(--ao-panel); border: 1px solid var(--ao-border); border-radius: var(--ao-radius); padding: 16px; width: 100%; }
.card h2 { margin: 0 0 4px; font-size: 17px; }
.mission { border: 1px solid var(--ao-border); border-radius: 10px; padding: 12px; margin-top: 10px; }
.mission.idle { opacity: .62; }
.mission .mh { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.mission .t { font-weight: 600; }
.bar { height: 8px; background: #0e1220; border-radius: 5px; margin: 8px 0; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--ao-live), var(--ao-selection)); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.chip { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--ao-border); cursor: pointer; background: none; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 8px 0; border-bottom: 1px solid var(--ao-border); font-size: 14px; }
.list .m { color: var(--ao-secondary); font-size: 12.5px; }
.who { color: var(--ao-text); font-weight: 600; cursor: pointer; background: none; border: 0; padding: 0; }
.who:hover { color: var(--ao-selection); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.filters input, .filters select { background: var(--ao-canvas); border: 1px solid var(--ao-border); border-radius: 8px; padding: 7px 10px; }
.filters input { flex: 1; min-width: 200px; }
.dlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.ditem { border: 1px solid var(--ao-border); border-radius: 10px; padding: 10px 12px; cursor: pointer; background: none; text-align: left; }
.ditem:hover { border-color: var(--ao-selection); }
.ditem .n { font-weight: 600; } .ditem .m { color: var(--ao-secondary); font-size: 12.5px; margin-top: 3px; }
.ditem .desc { color: var(--ao-secondary); font-size: 12.5px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #2b2210; border: 1px solid var(--ao-selection); color: var(--ao-selection); padding: 8px 14px; border-radius: 9px; font-size: 14px; opacity: 0; transition: opacity .3s; pointer-events: none; }
.toast.on { opacity: 1; }
/* org chart (from Directory) */
.org-depts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 10px; }
.org-dept { border: 1px solid var(--ao-border); border-top: 4px solid var(--c); border-radius: 9px; padding: 10px 12px; }
.org-dept h4 { margin: 0 0 6px; font-size: 14px; }
.org-dept ul { list-style: none; margin: 0; padding-left: 10px; border-left: 2px solid var(--ao-border); font-size: 13px; }
.org-dept li { padding: 2px 0 2px 8px; cursor: pointer; }
.org-dept li:hover { color: var(--ao-selection); }
.org-root { text-align: center; font-weight: 700; padding: 10px; border: 2px solid var(--ao-selection); border-radius: 10px; width: max-content; margin: 6px auto 0; }

/* mobile */
@media (max-width: 900px) {
  .top { flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
  .brand { font-size: 17px; }
  .searchbox { order: 5; width: 100%; margin: 0; }
  .views { order: 4; width: 100%; } .views button { flex: 1; padding: 7px 4px; }
  .kpis div { padding: 8px 12px; } .kpis b { font-size: 18px; }
  #v-office { flex-direction: column; padding: 8px; min-height: 0; }
  .mapwrap { min-height: 46vh; flex: none; height: 46vh; }
  .panel { width: 100%; max-height: none; }
  .legend { display: none; }
  .cols { grid-template-columns: 1fr; }
  .dlist { grid-template-columns: 1fr; }
}
/* Compact labels when the map is small: icon + count, name on hover/focus/selection */
#labels.compact .rl { padding: 4px 7px; font-size: 13px; }
#labels.compact .rl .nm { display: none; }
#labels.compact .rl:hover .nm, #labels.compact .rl:focus-visible .nm, #labels.compact .rl.sel .nm { display: inline; }
#labels.compact .rl:hover, #labels.compact .rl.sel { z-index: 2; }
@media (max-width: 900px) { .mapwrap { height: auto; aspect-ratio: 1672 / 941; min-height: 0; } }
.proj { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; margin: 0 4px; border-radius: 6px; background: rgba(95,179,255,.14); color: #8cc8ff; border: 1px solid rgba(95,179,255,.35); vertical-align: 1px; }
.rl.dispatch { border-style: dashed; background: rgba(14,18,32,.92); }

/* Ticket cards: who assigned what to whom, pinned at the worker's desk */
#tickets { position: absolute; inset: 0; pointer-events: none; }
.tk { position: absolute; transform: translate(-50%, 0) scale(var(--inv, 1)); transform-origin: 50% 0; background: rgba(14,18,32,.93); border: 1.5px solid var(--c, #ffbc5c); border-radius: 8px; padding: 3px 8px; font-size: 12px; line-height: 1.3; white-space: nowrap; box-shadow: 0 6px 16px rgba(0,0,0,.45); max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.tk b { color: var(--c, #ffbc5c); font-weight: 700; }
.tk .d { color: var(--ao-secondary); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.tk.rep { --c: #52d891; }
.tk.compact .d { display: none; }
/* Live feed under the map */
.ticker { display: flex; gap: 8px; overflow: hidden; min-height: 30px; align-items: center; font-size: 12.5px; }
.ticker .ev { flex: none; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--ao-border); background: var(--ao-panel); white-space: nowrap; }
.ticker .ev.as { border-color: rgba(95,179,255,.5); } .ticker .ev.rp { border-color: rgba(82,216,145,.55); } .ticker .ev.er { border-color: rgba(255,130,127,.6); }
.ticker .ev i { color: var(--ao-secondary); font-style: normal; margin-right: 6px; }
.ticker .empty { color: var(--ao-secondary); font-style: italic; }
/* Chain of command */
.chain { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.chain li { padding: 3px 0 3px 14px; border-left: 2px solid var(--ao-border); margin-left: 6px; }
.chain > li { border-left: 0; margin-left: 0; padding-left: 0; }
.chain .who { font-size: 13px; }
.chain .m { color: var(--ao-secondary); font-size: 12px; }

/* Set up your agency */
.setup-btn { background: var(--ao-selection); color: #1a1408; border: 0; border-radius: 999px; padding: 7px 14px; font-weight: 700; white-space: nowrap; }
.setup-btn:hover { filter: brightness(1.08); }
.conn.folder { border-color: rgba(255,188,92,.5); } .conn.folder i { background: var(--ao-selection); }
.setup-dlg { background: var(--ao-panel); color: var(--ao-text); border: 1px solid var(--ao-border); border-radius: 14px; max-width: 560px; padding: 22px 24px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.setup-dlg::backdrop { background: rgba(5,7,14,.7); }
.setup-dlg h2 { margin: 0 0 8px; } .setup-dlg ol { padding-left: 20px; line-height: 1.6; } .setup-dlg code { background: #0e1220; padding: 1px 5px; border-radius: 4px; }
.setup-dlg .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }
.setup-dlg .primary { background: var(--ao-selection); color: #1a1408; border: 0; border-radius: 9px; padding: 9px 16px; font-weight: 700; }
.setup-dlg a { color: var(--ao-selection); }
@media (max-width: 900px) { .setup-btn { order: 3; } }

.conn.demo { border-color: rgba(95,179,255,.5); } .conn.demo i { background: var(--ao-walk); }
.setup-dlg { max-width: 640px; width: calc(100vw - 32px); max-height: calc(100vh - 40px); overflow: auto; }
.setup-dlg .lead { font-size: 15.5px; color: var(--ao-text); line-height: 1.5; }
.setup-dlg .ticks { list-style: none; padding: 0; margin: 12px 0; } .setup-dlg .ticks li { padding: 6px 0 6px 28px; position: relative; line-height: 1.45; }
.setup-dlg .ticks li::before { content: "✓"; position: absolute; left: 4px; color: var(--ao-live); font-weight: 700; }
.setup-dlg .warn { color: #ffd38a; background: rgba(255,188,92,.1); border: 1px solid rgba(255,188,92,.35); border-radius: 8px; padding: 8px 10px; font-size: 13.5px; }
.setup-dlg .tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; } .setup-dlg .tools span { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--ao-border); color: var(--ao-secondary); }
.setup-dlg .tools span.on { border-color: rgba(82,216,145,.6); color: var(--ao-live); }
.setup-dlg .stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 6px 0; }
.setup-dlg .stats div { background: #141a29; border: 1px solid var(--ao-border); border-radius: 10px; padding: 8px; font-size: 12.5px; color: var(--ao-secondary); } .setup-dlg .stats b { display: block; font-size: 20px; color: var(--ao-selection); }
.setup-dlg h3 { margin: 14px 0 6px; font-size: 15px; }
.tips { list-style: none; padding: 0; margin: 0; } .tips li { border: 1px solid var(--ao-border); border-radius: 10px; padding: 9px 11px; margin-bottom: 8px; font-size: 13.5px; line-height: 1.45; }
.tips li div { color: var(--ao-secondary); } .tips li a { color: var(--ao-selection); display: inline-block; margin-top: 4px; } .tips li code { display: block; margin-top: 5px; background: #0e1220; padding: 5px 8px; border-radius: 6px; font-size: 12px; white-space: pre-wrap; }
.tips.small li { padding: 6px 9px; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--ao-border); border-top-color: var(--ao-selection); animation: spin 0.9s linear infinite; margin: 16px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.mapwrap { position: relative; }
.board { position: absolute; top: 10px; right: 10px; width: 300px; max-height: calc(100% - 20px); overflow: auto; background: rgba(12,16,28,.9); border: 1px solid var(--ao-border); border-radius: 12px; padding: 10px 10px 4px; font-size: 12.5px; z-index: 5; box-shadow: 0 10px 28px rgba(0,0,0,.5); backdrop-filter: blur(4px); }
.board .bh { font-weight: 700; font-size: 13.5px; margin-bottom: 6px; } .board .bh span { font-weight: 400; color: var(--ao-secondary); font-size: 11.5px; margin-left: 4px; }
.board .be { color: var(--ao-secondary); line-height: 1.45; padding-bottom: 6px; }
.board .bl { border-top: 1px solid var(--ao-border); padding: 7px 0 4px; }
.board button { all: unset; cursor: pointer; display: flex; align-items: center; gap: 6px; width: 100%; box-sizing: border-box; }
.board button:hover b { text-decoration: underline; }
.board .lead b { color: #ffd54a; } .board em { font-style: normal; font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: rgba(255,188,92,.14); color: #ffcf8a; white-space: nowrap; }
.board .lead em { background: rgba(255,213,74,.14); color: #ffe08a; }
.board ul { list-style: none; margin: 4px 0 0 10px; padding: 0 0 0 10px; border-left: 2px solid rgba(95,179,255,.35); }
.board li { padding: 3px 0; } .board li b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.board .tm { margin-left: auto; color: var(--ao-secondary); font-size: 11px; white-space: nowrap; }
.board .ds { color: var(--ao-secondary); font-size: 11px; margin-left: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .dn em { background: rgba(82,216,145,.14); color: #8be8b4; } .board .solo { color: var(--ao-secondary); font-style: italic; font-size: 11.5px; }
.board .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; } .board .dot.w { background: #ffbc5c; animation: aopulse 1.2s ease-in-out infinite; } .board .dot.ok { background: #52d891; } .board .dot.er { background: #ff827f; }
@keyframes aopulse { 50% { opacity: .35; } }
@media (max-width: 760px) { .board { width: auto; left: 10px; max-height: 40%; } }

.board .bh { cursor: pointer; display: flex; align-items: baseline; } .board .bh i { margin-left: auto; font-style: normal; color: var(--ao-secondary); padding: 0 4px; }
.board.min { width: auto; padding-bottom: 6px; } .board.min > :not(.bh) { display: none; } .board.min .bh { margin: 0; } .board.min .bh i::after { content: "+"; } .board.min .bh i { font-size: 0; } .board.min .bh i::after { font-size: 13px; }

/* Room wall signs: small fixed plaques; counts/projects live in the hover tooltip */
.rl { gap: 4px; padding: 2px 7px 2px 5px; font-size: 11px; font-weight: 600; letter-spacing: .02em; line-height: 1.3; border-radius: 3px; color: #f3e3c3;
  background: linear-gradient(180deg, #3a2c20, #2a1f16); border: 1px solid #8a6a3f; box-shadow: 0 1px 0 rgba(255,214,150,.18) inset, 0 2px 3px rgba(0,0,0,.55); position: absolute; }
.rl::before, .rl::after { content: ""; position: absolute; top: 50%; width: 2px; height: 2px; margin-top: -1px; border-radius: 50%; background: #b99a6a; opacity: .75; }
.rl::before { left: 2px; } .rl::after { right: 2px; }
.rl .ic { font-size: 11px; line-height: 1; }
.rl:hover, .rl:focus-visible { border-color: #e0b36a; z-index: 3; }
.rl.sel { color: var(--ao-selection); border-color: var(--ao-selection); box-shadow: 0 1px 0 rgba(255,214,150,.18) inset, 0 2px 3px rgba(0,0,0,.55), 0 0 0 2px rgba(255,188,92,.22); z-index: 3; }
#labels.compact .rl { padding: 2px 7px 2px 5px; font-size: 11px; }
#labels.compact .rl .nm { display: inline; }
.rl .live { width: 6px; height: 6px; border-radius: 50%; background: var(--ao-live); box-shadow: 0 0 5px var(--ao-live); animation: rlpulse 2s ease-in-out infinite; flex: none; }
@keyframes rlpulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.75); } }
@media (prefers-reduced-motion: reduce) { .rl .live { animation: none; } }
.rl .cnt { display: none; position: absolute; left: 50%; top: calc(100% + 5px); transform: translateX(-50%); z-index: 4; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 5px 9px; border-radius: 6px; font-size: 12px; font-weight: 500; white-space: normal; width: max-content; max-width: 240px; text-align: left;
  background: #0e1220; border: 1px solid var(--ao-border); color: var(--ao-text); box-shadow: 0 6px 18px rgba(0,0,0,.55); pointer-events: none; }
.rl .cnt.zero { color: var(--ao-idle); background: #0e1220; }
.rl .cnt:not(.zero) { color: var(--ao-live); }
.rl .cnt em { font-style: normal; color: #8cc8ff; font-size: 11px; }
.rl:hover .cnt, .rl:focus-visible .cnt, .rl.sel .cnt { display: flex; }
