/* ═══════════════════════════════════════════════════════════════════════
   dg2-app.css — DarkGamma v2 · kit de componentes de app (levelv2)
   Requiere dg2.css (tokens+fuentes) cargado antes. Contiene: topbar/nav,
   cards, tablas, tabs, filtros, cinta, skeleton, pill online, light mode.
   ═══════════════════════════════════════════════════════════════════════ */

  * { margin: 0; padding: 0; box-sizing: border-box; }
  body { background: var(--bg); font-family: var(--sans); color: var(--tx); min-height: 100vh; }

  /* ── Top bar ── */
  #topbar {
    position: sticky; top: 0; z-index: 50;
    height: 56px; display: flex; align-items: center;
    background: linear-gradient(180deg, rgba(7,15,22,.92), rgba(7,15,22,.72));
    border-bottom: 1px solid var(--ring);
    padding: 0 22px; gap: 22px;
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  }
  #topbar .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: 0 0 auto; }
  .tm-whale { height: 26px; width: auto; flex: 0 0 auto; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); }
  #topbar .logo { color: var(--tx); font-weight: 750; font-size: 15.5px; letter-spacing: -.02em; white-space: nowrap; }
  #main-nav { display: flex; align-items: stretch; gap: 4px; height: 100%; }
  .nav-link {
    display: flex; align-items: center; position: relative;
    padding: 0 12px; text-decoration: none;
    color: var(--tx3); font-size: 13px; font-weight: 550;
    transition: color .13s var(--easing); white-space: nowrap;
  }
  .nav-link:hover { color: var(--tx); }
  .nav-link.active { color: var(--tx); }
  .nav-link.active::after {
    content: ""; position: absolute; left: 10px; right: 10px; bottom: 0;
    height: 2px; background: var(--acc); border-radius: 2px 2px 0 0;
  }
  .nav-link .ext { font-size: 10px; margin-left: 4px; color: var(--tx3); }
  .nav-link:hover .ext { color: var(--acc); }
  #topbar .nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
  .search-wrap {
    display: flex; align-items: center; gap: 7px;
    background: var(--ink); border-radius: 8px;
    box-shadow: inset 0 0 0 1px var(--ring2);
    padding: 0 8px 0 10px; height: 32px;
    transition: box-shadow .13s var(--easing);
  }
  .search-wrap:focus-within { box-shadow: inset 0 0 0 1px var(--acc); }
  .search-wrap svg { flex: 0 0 auto; color: var(--tx3); }
  #global-search {
    background: none; border: none; outline: none;
    color: var(--tx); font-family: var(--mono); font-size: 12px; font-weight: 600;
    width: 130px; text-transform: uppercase;
  }
  #global-search::placeholder { color: var(--tx3); font-weight: 400; text-transform: none; }
  .search-wrap .kbd {
    font-family: var(--mono); font-size: 10px; color: var(--tx3);
    background: var(--surf2); border-radius: 4px; padding: 2px 6px;
  }
  .icon-btn {
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    background: none; border: none; border-radius: 8px; cursor: pointer;
    color: var(--tx2); font-size: 15px; text-decoration: none;
    transition: background .13s var(--easing), color .13s var(--easing);
  }
  .icon-btn:hover { background: var(--surf2); color: var(--tx); }
  #topbar .status { color: var(--tx3); font-size: 10.5px; font-family: var(--mono); white-space: nowrap; }

  /* ── Main ── */
  .main { padding: 20px 22px; max-width: 1600px; margin: 0 auto; }

  .section-title {
    font-family: var(--mono); font-size: 11px; font-weight: 600;
    letter-spacing: .18em; text-transform: uppercase; color: var(--acc);
    margin: 30px 0 12px; display: flex; align-items: center; gap: 14px;
  }
  .section-title:first-child { margin-top: 0; }
  .section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--ring2), transparent); }

  /* ── Stat tiles ── */
  .overview-row {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px; margin-bottom: 8px;
  }
  .card {
    background: linear-gradient(180deg, var(--surf1), color-mix(in srgb, var(--surf1) 55%, var(--bg)));
    box-shadow: inset 0 0 0 1px var(--ring), var(--shadow);
    border: none; border-radius: var(--r);
    padding: 15px 17px;
    transition: box-shadow .15s var(--easing);
  }
  .card:hover { box-shadow: inset 0 0 0 1px var(--ring2), var(--shadow); }
  .card-label { color: var(--tx3); font-family: var(--mono); font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; }
  .card-value { font-family: var(--mono); font-size: 23px; font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 7px; letter-spacing: -.02em; }
  .card-sub { color: var(--tx3); font-size: 11px; margin-top: 3px; }
  .up { color: var(--up); }
  .down { color: var(--down); }
  .call-color { color: var(--up); }
  .put-color { color: var(--down); }
  .premium-color { color: var(--tx); font-variant-numeric: tabular-nums; }
  .ticker-link {
    color: var(--tx); font-family: var(--mono); font-weight: 650; cursor: pointer;
    text-decoration: none; transition: color .13s;
  }
  .ticker-link:hover { color: var(--acc); }

  /* ── Ratio bar (thin) ── */
  .ratio-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin-top: 10px; background: var(--ink); }
  .ratio-bar .seg { height: 100%; }
  .ratio-bar .seg-call, .seg-call { background: var(--up); }
  .ratio-bar .seg-put, .seg-put { background: var(--down); }

  /* ── Grids ── */
  .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
  @media (max-width: 1200px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 800px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

  /* ── Tablas ── */
  .dtable { width: 100%; border-collapse: collapse; font-size: 12px; }
  .dtable th {
    color: var(--tx3); text-align: left; padding: 7px 12px;
    border-bottom: 1px solid var(--ring2);
    font-family: var(--mono); font-size: 9px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .1em;
    position: sticky; top: 0; background: var(--surf1); z-index: 1;
  }
  .dtable td { padding: 7px 12px; border-bottom: 1px solid color-mix(in srgb, var(--ring) 55%, transparent); white-space: nowrap; color: var(--tx2); }
  .dtable td.right, .dtable td[class*=color] { font-family: var(--mono); font-size: 11.5px; font-variant-numeric: tabular-nums; }
  .dtable tr { cursor: pointer; }
  .dtable tr:hover td { background: color-mix(in srgb, var(--acc) 4%, transparent); }
  .dtable tr:last-child td { border-bottom: none; }
  .dtable .right { text-align: right; }
  .dtable .mono { font-family: var(--mono); font-size: 11px; }

  /* ── Paneles ── */
  .scroll-box {
    background: linear-gradient(180deg, var(--surf1), color-mix(in srgb, var(--surf1) 55%, var(--bg)));
    box-shadow: inset 0 0 0 1px var(--ring), var(--shadow);
    border: none; border-radius: var(--r); overflow: hidden;
  }
  .scroll-box .share-table-btn {
    background: none; border: none; box-shadow: inset 0 0 0 1px var(--ring2);
    border-radius: 6px; color: var(--tx3);
    font-size: 10px; padding: 3px 9px; cursor: pointer; margin-left: auto; white-space: nowrap;
    transition: color .13s;
  }
  .scroll-box .share-table-btn:hover { color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc); }
  .scroll-box .box-header {
    padding: 13px 16px 9px;
    display: flex; align-items: center; justify-content: space-between;
  }
  .scroll-box .box-header h4 {
    color: var(--tx2); font-family: var(--mono); font-size: 10.5px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .12em; margin: 0;
  }
  .scroll-box .box-body { max-height: 420px; overflow-y: auto; }
  .scroll-box .box-body::-webkit-scrollbar { width: 6px; }
  .scroll-box .box-body::-webkit-scrollbar-thumb { background: var(--surf3); border-radius: 3px; }

  /* ── Ballenas ── */
  .whale-row {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 16px; cursor: pointer; transition: background .12s;
    border-bottom: 1px solid color-mix(in srgb, var(--ring) 55%, transparent);
  }
  .whale-row:last-child { border-bottom: none; }
  .whale-row:hover { background: color-mix(in srgb, var(--acc) 5%, transparent); }
  .whale-row .rank { color: var(--tx3); font-family: var(--mono); font-size: 10px; width: 20px; text-align: center; }
  .whale-row .wticker { color: var(--tx); font-family: var(--mono); font-weight: 650; font-size: 12.5px; width: 52px; }
  .whale-row .wpremium { color: var(--tx); font-family: var(--mono); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; width: 76px; text-align: right; }
  .whale-row .mini-ratio { flex: 1; display: flex; height: 5px; border-radius: 3px; overflow: hidden; min-width: 80px; background: var(--ink); }
  .whale-row .alerts-badge { color: var(--tx3); font-family: var(--mono); font-size: 10px; width: 46px; text-align: right; }

  /* ── Flow alerts recientes ── */
  .alert-row {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 16px; border-bottom: 1px solid color-mix(in srgb, var(--ring) 55%, transparent);
    cursor: pointer; transition: background .12s; font-size: 11.5px;
  }
  .alert-row:last-child { border-bottom: none; }
  .alert-row:hover { background: color-mix(in srgb, var(--acc) 4%, transparent); }
  .alert-row .aticker { color: var(--tx); font-family: var(--mono); font-weight: 650; width: 48px; }
  .alert-row .atype { font-family: var(--mono); font-weight: 650; font-size: 10.5px; width: 46px; }
  .alert-row .apremium { color: var(--tx); font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; width: 64px; text-align: right; }
  .alert-row .astrike { color: var(--tx3); font-family: var(--mono); font-size: 11px; width: 66px; text-align: right; }
  .alert-row .aexpiry { color: var(--tx3); font-family: var(--mono); font-size: 10.5px; width: 78px; }
  .alert-row .adate { color: var(--tx3); font-family: var(--mono); font-size: 10px; margin-left: auto; opacity: .7; }

  /* ── Sectores ── */
  .sector-row { display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-bottom: 1px solid color-mix(in srgb, var(--ring) 55%, transparent); }
  .sector-row:last-child { border-bottom: none; }
  .sector-row .sname { color: var(--tx2); font-size: 12px; width: 78px; }
  .sector-row .sbar-wrap { flex: 1; height: 5px; background: var(--ink); border-radius: 3px; overflow: hidden; position: relative; }
  .sector-row .sbar { height: 100%; border-radius: 3px; transition: width .4s var(--easing); background: linear-gradient(90deg, var(--accD), var(--acc)); }
  .sector-row .spremium { color: var(--tx); font-family: var(--mono); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; width: 74px; text-align: right; }
  .sector-row .scount { color: var(--tx3); font-family: var(--mono); font-size: 10px; width: 36px; text-align: right; }

  /* ── Watchlist ── */
  .watchlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; padding: 14px 16px; }
  .wl-item {
    background: var(--ink); box-shadow: inset 0 0 0 1px var(--ring);
    border: none; border-radius: 10px;
    padding: 9px 10px; text-align: center; cursor: pointer;
    transition: box-shadow .14s var(--easing), transform .14s var(--easing);
  }
  .wl-item:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 55%, transparent); transform: translateY(-2px); }
  .wl-item .wl-ticker { color: var(--tx); font-family: var(--mono); font-weight: 650; font-size: 13px; }
  .wl-item .wl-price { color: var(--tx2); font-family: var(--mono); font-size: 11px; font-variant-numeric: tabular-nums; margin-top: 3px; }
  .wl-item .wl-change { font-family: var(--mono); font-size: 10px; font-weight: 650; margin-top: 1px; }
  .wl-item .wl-sparkline { margin-top: 4px; }
  .wl-item .wl-remove { color: var(--surf3); font-size: 14px; cursor: pointer; float: right; margin: -4px -2px 0 0; transition: color .12s; }
  .wl-item .wl-remove:hover { color: var(--down); }
  .wl-add {
    background: none; box-shadow: inset 0 0 0 1px var(--ring2); border: none; border-radius: 10px;
    padding: 10px; text-align: center; cursor: pointer;
    color: var(--tx3); font-size: 18px; transition: all .14s var(--easing);
    display: flex; align-items: center; justify-content: center;
  }
  .wl-add:hover { box-shadow: inset 0 0 0 1px var(--acc); color: var(--acc); }

  /* ── Filtros (segmentos) ── */
  .filter-btn {
    background: none; color: var(--tx3); border: none;
    border-radius: 7px; padding: 4px 10px; font-size: 10.5px; font-weight: 550;
    cursor: pointer; transition: color .13s, background .13s; white-space: nowrap;
  }
  .filter-btn:hover { color: var(--tx); }
  .filter-btn.active { background: var(--surf3); color: var(--acc); font-weight: 650; }
  .fa-toggle-btn {
    margin-left: auto; background: none; box-shadow: inset 0 0 0 1px var(--ring2);
    color: var(--tx2); font-size: 11px; font-weight: 600;
    border: none; border-radius: 7px; padding: 5px 12px; cursor: pointer;
    transition: color .13s, box-shadow .13s;
  }
  .fa-toggle-btn:hover, .fa-toggle-btn.on { color: var(--acc); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 55%, transparent); }
  .fa-group-label { color: var(--tx3); font-family: var(--mono); font-size: 8.5px; text-transform: uppercase; letter-spacing: .12em; }
  .fa-reset-btn { background: none; border: none; color: var(--tx3); font-size: 10px; padding: 3px 10px; border-radius: 6px; cursor: pointer; }
  .fa-reset-btn:hover { color: var(--down); }
  #fa-filters { padding: 10px 16px; border-bottom: 1px solid var(--ring); }

  /* ── Sentimiento ── */
  .sg-top { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; }
  .sg-val { font-family: var(--mono); font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
  .sg-tag { font-family: var(--mono); font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; padding: 2px 8px; border-radius: 20px; }
  .sg-tag.up { color: var(--up); background: color-mix(in srgb, var(--up) 14%, transparent); }
  .sg-tag.down { color: var(--down); background: color-mix(in srgb, var(--down) 14%, transparent); }
  .sg-tag.neutral { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
  .sg-bar {
    position: relative; height: 6px; border-radius: 3px; margin-top: 14px;
    background: linear-gradient(90deg,
      var(--down) 0%, color-mix(in srgb, var(--down) 18%, var(--surf3)) 42%,
      color-mix(in srgb, var(--up) 18%, var(--surf3)) 58%, var(--up) 100%);
  }
  .sg-marker {
    position: absolute; top: -4px; width: 3px; height: 14px;
    background: #fff; border-radius: 2px; transform: translateX(-50%);
    box-shadow: 0 0 8px rgba(255,255,255,.55);
  }
  .sentiment-labels { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 8.5px; text-transform: uppercase; letter-spacing: .08em; margin-top: 7px; color: var(--tx3); }

  /* ── Cinta de proximidad ── */
  .tape-wrap { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
  .tape-label { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--acc); flex: 0 0 auto; display: flex; align-items: center; gap: 7px; }
  .tape-label .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--acc); animation: dg-pulse 2s infinite; }
  @keyframes dg-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--acc) 45%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
  .tape { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 94%, transparent); mask-image: linear-gradient(90deg, #000 94%, transparent); }
  .tape::-webkit-scrollbar { display: none; }
  .tape-item {
    flex: 0 0 auto; display: inline-flex; align-items: baseline; gap: 7px;
    padding: 5px 11px; border-radius: 8px; text-decoration: none;
    background: var(--surf1); box-shadow: inset 0 0 0 1px var(--ring);
    transition: box-shadow .13s var(--easing);
  }
  .tape-item:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 55%, transparent); }
  .tape-item .t { font-family: var(--mono); font-weight: 650; font-size: 11.5px; color: var(--tx); }
  .tape-item .d { font-family: var(--mono); font-size: 10.5px; color: var(--acc); font-variant-numeric: tabular-nums; }
  .tape-item .l { font-family: var(--mono); font-size: 10.5px; color: var(--tx3); font-variant-numeric: tabular-nums; }

  /* ── Market bar ── */
  #market-bar { display: flex; gap: 22px; margin-bottom: 14px; padding: 4px 0 14px; flex-wrap: wrap; border-bottom: 1px solid var(--ring); }
  .mb-item { display: flex; align-items: baseline; gap: 7px; font-family: var(--mono); font-size: 12.5px; }
  .mb-t { color: var(--tx); font-weight: 650; }
  .mb-p { color: var(--tx2); font-variant-numeric: tabular-nums; }
  .mb-c { font-weight: 650; font-variant-numeric: tabular-nums; font-size: 11.5px; }

  /* ── Hover preview ── */
  #hover-preview {
    position: fixed; z-index: 999; pointer-events: none;
    background: var(--surf2); border: none;
    box-shadow: inset 0 0 0 1px var(--ring2), 0 24px 60px rgba(0,0,0,.65);
    border-radius: var(--r);
    padding: 10px; display: none; width: 380px; height: 240px;
  }
  #hover-preview .hp-title { font-family: var(--mono); font-size: 11px; font-weight: 650; color: var(--acc); margin-bottom: 4px; display: flex; justify-content: space-between; }
  #hover-preview .hp-title .hp-price { color: var(--tx); font-weight: 400; }
  #hover-preview .hp-chart { width: 100%; height: 200px; }
  #hover-preview .hp-loading { display: flex; align-items: center; justify-content: center; height: 200px; color: var(--tx3); font-size: 11px; }
  body.light-mode #hover-preview { background: #fff; }

  /* ── Loading skeleton ── */
  .loading-overlay { display: flex; flex-direction: column; gap: 14px; padding: 8px 0 40px; }
  .load-msg { color: var(--tx3); font-family: var(--mono); font-size: 12px; padding: 4px 0; }
  .sk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
  @media (max-width: 800px) { .sk-grid { grid-template-columns: 1fr; } }
  .spinner { display: none; }

  /* ── Tabs (subrayado) ── */
  .tab-row { display: flex; gap: 18px; margin-bottom: 0; }
  .tab-btn {
    background: none; color: var(--tx3); border: none;
    padding: 2px 1px 9px; font-size: 12px; font-weight: 550; cursor: pointer;
    position: relative; transition: color .13s;
  }
  .tab-btn:hover { color: var(--tx); }
  .tab-btn.active { color: var(--tx); font-weight: 650; }
  .tab-btn.active::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0;
    height: 2px; background: var(--acc); border-radius: 2px;
  }
  .tab-content { display: none; }
  .tab-content.active { display: block; }

  /* ── Feed segmentado ── */
  .feed-tabs { display: flex; gap: 4px; margin-bottom: 10px; background: var(--surf1); border-radius: 9px; padding: 3px; width: max-content; box-shadow: inset 0 0 0 1px var(--ring); }

  /* ═══ Light Mode ═══ */
  body.light-mode { background: #f2f6f8; color: #22323e; }
  body.light-mode #topbar { background: rgba(242,246,248,.9); border-bottom-color: #dbe5ec; }
  body.light-mode #topbar .logo, body.light-mode .nav-link.active { color: #16242e; }
  body.light-mode .nav-link { color: #62798a; }
  body.light-mode .search-wrap { background: #fff; box-shadow: inset 0 0 0 1px #d5e0e8; }
  body.light-mode #global-search { color: #16242e; }
  body.light-mode .card, body.light-mode .scroll-box {
    background: #fff; box-shadow: inset 0 0 0 1px #e2eaf0, 0 1px 3px rgba(30,50,65,.06);
  }
  body.light-mode .dtable th { background: #fff; color: #7c93a3; border-bottom-color: #e2eaf0; }
  body.light-mode .dtable td { color: #3d5364; border-bottom-color: #eef3f6; }
  body.light-mode .whale-row, body.light-mode .alert-row, body.light-mode .sector-row { border-bottom-color: #eef3f6; }
  body.light-mode .wticker, body.light-mode .aticker, body.light-mode .wpremium, body.light-mode .apremium,
  body.light-mode .ticker-link, body.light-mode .wl-ticker, body.light-mode .premium-color, body.light-mode .spremium { color: #16242e; }
  body.light-mode .wl-item, body.light-mode .tape-item { background: #fff; box-shadow: inset 0 0 0 1px #e2eaf0; }
  body.light-mode .filter-btn.active, body.light-mode .seg-btn.active { background: #e5f6f8; }
  body.light-mode .sbar-wrap, body.light-mode .ratio-bar, body.light-mode .mini-ratio { background: #eef3f6 !important; }
  body.light-mode .sk { background: #e8eef2; }
  body.light-mode .box-header h4 { color: #62798a; }
  body.light-mode #fa-filters { border-bottom-color: #e2eaf0; }

  @media (prefers-reduced-motion: reduce) {
    .tape-label .dot { animation: none; }
    .wl-item, .card, .tape-item, .nav-link { transition: none; }
  }

  /* ── Online: pill flotante discreta + popover (kit) ── */
  #online-bar { position: fixed; bottom: 18px !important; left: 18px !important; right: auto !important; top: auto !important; z-index: 100; width: auto !important; }
  #online-bar.collapsed { transform: none !important; }
  #online-bar .ob-arrow { display: none; }
  #online-bar .ob-label { color: var(--tx3); font-size: 10.5px; font-weight: 500; }
  #online-bar .ob-toggle:hover { background: color-mix(in srgb, var(--surf1) 92%, transparent); }
  #online-bar .ob-toggle {
    border: none !important; border-top: none !important; height: 28px !important; padding: 0 12px !important;
    display: flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 999px;
    background: color-mix(in srgb, var(--surf1) 82%, transparent);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 0 0 1px var(--ring), 0 4px 16px rgba(0,0,0,.22);
    cursor: pointer; font-family: var(--mono); font-size: 10.5px; color: var(--tx3);
    opacity: .55; transition: opacity .18s var(--easing);
  }
  #online-bar:hover .ob-toggle, #online-bar:not(.collapsed) .ob-toggle { opacity: 1; }
  #online-bar .ob-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--up); animation: dg-pulse 2.4s infinite; }
  #online-bar #d-ob-count, #online-bar .ob-count { color: var(--tx2); font-weight: 650; font-variant-numeric: tabular-nums; }
  #online-bar .ob-label { letter-spacing: .08em; }
  #online-bar .ob-body {
    position: absolute; bottom: calc(100% + 10px); left: 0; display: none;
    flex-wrap: wrap; gap: 4px; width: max-content; max-width: 320px; max-height: 220px; overflow-y: auto;
    padding: 10px; border-radius: 12px; background: var(--surf2);
    box-shadow: inset 0 0 0 1px var(--ring2), 0 16px 40px rgba(0,0,0,.4);
  }
  #online-bar:not(.collapsed) .ob-body { display: flex; }
  .d-ob-user, .ob-user {
    display: flex; align-items: center; gap: 6px; padding: 4px 10px;
    background: var(--ink); box-shadow: inset 0 0 0 1px var(--ring); border: none; border-radius: 20px;
    cursor: pointer; transition: box-shadow .13s; font-size: 11px; color: var(--tx2);
  }
  .d-ob-user:hover, .ob-user:hover { box-shadow: inset 0 0 0 1px var(--acc); }
  .d-ob-user img:first-child, .ob-user img:first-child { width: 20px; height: 20px; border-radius: 50%; }
  .d-ob-user img:not(:first-child), .ob-user img:not(:first-child) { width: auto; height: 10px; border-radius: 2px; box-shadow: none; }
