:root{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#10243b;background:#edf2f7;color-scheme:light;--navy:#133d66;--blue:#2469b7;--line:#dbe4ee;--muted:#6f8193;--panel:#fff;--soft:#f6f9fc;--bubble:#fff;--bubble-out:#e6f1ff}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#edf2f7}.hidden{display:none!important}button,input,textarea{font:inherit}.topbar{height:62px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:7px 18px;gap:16px;position:sticky;top:0;z-index:20}.top-logo{width:138px;height:auto;display:block}.top-copy{display:flex;flex-direction:column;gap:1px}.top-copy strong{font-size:.98rem}.top-copy span{font-size:.76rem;color:var(--muted)}.pair-shell{max-width:960px;margin:0 auto;padding:30px 20px}.card{background:#fff;border:1px solid #dfe7f0;border-radius:22px;padding:24px;box-shadow:0 12px 34px rgba(22,48,82,.08)}.pair-card h1{margin:8px 0 4px}.pair-card p{color:#5f7285;line-height:1.45}.status{display:inline-flex;padding:7px 11px;border-radius:999px;background:#eef3fa;color:#34516f;font-weight:650;font-size:.86rem}.status.ok{background:#e9f8f1;color:#176842}.status.error{background:#fff0f0;color:#9b2d2d}.field{display:grid;gap:7px;margin:18px 0}.field span{font-weight:650}.field input{padding:12px 14px;border:1px solid #c9d5e3;border-radius:12px;outline:none}.pair-grid{display:grid;grid-template-columns:minmax(240px,340px) 1fr;gap:28px;align-items:center}.qr-wrap{display:grid;place-items:center;min-height:310px;background:#fff;border-radius:18px;border:1px solid #e2e8f0;padding:18px}#qr{width:100%;display:grid;place-items:center;min-height:231px}#qr svg{display:block;width:min(280px,100%);height:auto;background:#fff}.qr-fallback{width:min(280px,100%);min-height:231px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#153958;font-weight:700}.secondary,.ghost,.send-btn,.icon-btn,.file-action{appearance:none;cursor:pointer}.secondary{border:1px solid #c8d5e4;background:#f8fbff;color:#163958;font-weight:650;border-radius:12px;padding:11px 14px;margin:6px 6px 6px 0}
.app-shell{height:calc(100vh - 78px);min-height:620px;display:grid;grid-template-columns:286px minmax(0,1fr);margin:8px 10px;background:var(--panel);border:1px solid #d7e1eb;border-radius:18px;overflow:hidden;box-shadow:0 10px 30px rgba(28,52,78,.08)}.sidebar{background:#f8fafc;border-right:1px solid var(--line);display:flex;flex-direction:column;min-width:0}.identity-card{display:flex;gap:12px;align-items:center;padding:16px;border-bottom:1px solid var(--line);background:#fff}.identity-icon,.room-avatar,.avatar-surface,.message-avatar,.peer-avatar{overflow:hidden;display:grid;place-items:center;background:#eaf0f7;color:#153958;flex:0 0 auto}.identity-icon img,.room-avatar img,.avatar-surface img,.message-avatar img,.peer-avatar img{width:100%;height:100%;object-fit:cover;display:block}.identity-icon{width:46px;height:46px;border-radius:50%;font-size:1.45rem}.identity-card strong{display:block;max-width:190px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.identity-card small{display:block;color:var(--muted);margin-top:3px;font-size:.72rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.side-title{display:flex;justify-content:space-between;padding:15px 16px 8px;font-weight:750;color:#1a3857}.room-list{padding:0 9px 10px;display:grid;gap:4px;overflow:auto}.room-btn{border:0;background:transparent;text-align:left;padding:9px 10px;border-radius:13px;display:grid;grid-template-columns:44px minmax(0,1fr) 10px;gap:10px;align-items:center;cursor:pointer;color:#153958;transition:background .15s}.room-btn:hover{background:#eef4fa}.room-btn.active{background:#e4eef9}.room-btn .ri{width:44px;height:44px;border-radius:14px;font-size:1.25rem}.room-copy{min-width:0;display:flex;flex-direction:column;gap:2px}.room-btn .rn{font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.room-btn .rs{font-size:.72rem;color:#718294}.dot{width:8px;height:8px;border-radius:50%;background:#a9b6c2}.dot.online{background:#1fa66a;box-shadow:0 0 0 3px rgba(31,166,106,.12)}.side-footer{margin-top:auto;padding:11px;border-top:1px solid var(--line)}.ghost{width:100%;border:1px solid #cbd7e4;background:#fff;border-radius:11px;padding:10px;color:#34516f}.room-pane{display:flex;min-width:0;flex-direction:column;background:#fff}.room-header{min-height:72px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:12px;padding:10px 16px}.room-avatar{width:50px;height:50px;border-radius:15px;font-size:1.5rem}.room-heading{min-width:0;flex:1}.room-heading h1{font-size:1.08rem;margin:0 0 3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.room-heading div{font-size:.78rem;color:#687a8c}.room-heading .room-web-count{font-size:.7rem;color:#657b91;font-weight:700;margin-top:1px;line-height:1.1}.room-heading .room-presence-main{font-size:.78rem;color:#687a8c}.location-toggle{display:flex;align-items:center;gap:7px;font-size:.82rem;background:#f6f9fc;border:1px solid #dde6ef;padding:8px 10px;border-radius:11px}.content-grid{min-height:0;flex:1;display:grid;grid-template-columns:minmax(0,1fr) 268px}.chat-column{min-width:0;display:flex;flex-direction:column;background:#f1f5f9}.messages{flex:1;overflow:auto;padding:18px 20px 22px;display:flex;flex-direction:column;gap:8px;scrollbar-gutter:stable}.empty,.empty-state{margin:auto;color:#718396;text-align:center}.empty-state{display:grid;gap:5px;place-items:center}.empty-state .empty-icon{font-size:2rem}.empty-state strong{color:#3f5870}.msg-row{width:100%;display:flex;align-items:flex-end;gap:8px}.msg-row.out{justify-content:flex-end}.message-avatar{width:30px;height:30px;border-radius:50%;font-size:.88rem;margin-bottom:2px}.msg{max-width:min(72%,760px);padding:8px 11px 7px;border-radius:14px 14px 14px 4px;background:var(--bubble);border:1px solid #dce5ee;box-shadow:0 1px 4px rgba(20,46,74,.035)}.msg.out{background:var(--bubble-out);border-color:#c8dcf2;border-radius:14px 14px 4px 14px}.msg-head{display:flex;gap:14px;justify-content:space-between;align-items:center;font-size:.7rem;color:#718295;margin-bottom:3px}.msg-name{font-weight:750;color:#355675}.msg-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:.91rem;line-height:1.35;color:#142a40}.msg-reply{border-left:3px solid #6b95c5;padding:5px 7px;margin:2px 0 6px;background:rgba(255,255,255,.48);border-radius:5px;color:#526b83;font-size:.78rem}.file-card{margin-top:7px;padding:8px;border-radius:11px;background:rgba(255,255,255,.68);display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:8px;align-items:center;border:1px solid rgba(122,150,180,.16)}.file-icon{width:32px;height:32px;border-radius:9px;background:#eef4fa;display:grid;place-items:center}.file-meta{min-width:0;display:flex;flex-direction:column}.file-meta strong{font-size:.79rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.file-meta small{font-size:.68rem;color:#708194;margin-top:1px}.file-action{border:0;background:var(--navy);color:#fff;border-radius:9px;padding:6px 9px;font-size:.73rem;font-weight:700;min-width:68px}.file-action:disabled{opacity:.62;cursor:default}.msg-actions{margin-top:4px;display:flex;gap:8px;justify-content:flex-end}.msg-actions button{border:0;background:transparent;color:#597590;padding:0;font-size:.7rem;cursor:pointer}.reply-bar{display:flex;justify-content:space-between;align-items:center;padding:7px 14px;background:#edf5fd;border-top:1px solid #dbe5ef;font-size:.82rem}.reply-bar button{border:0;background:transparent;font-size:1.2rem;cursor:pointer}.composer{display:flex;align-items:flex-end;gap:8px;padding:10px 12px;border-top:1px solid #dce5ee;background:#fff}.composer textarea{flex:1;resize:none;max-height:140px;border:1px solid #cad6e2;border-radius:14px;padding:10px 12px;outline:none;background:#fbfdff}.composer textarea:focus{border-color:#8eb3d8;box-shadow:0 0 0 3px rgba(36,105,183,.08)}.send-btn{border:0;background:var(--navy);color:#fff;border-radius:12px;padding:10px 15px;font-weight:750}.icon-btn{border:1px solid #cad6e2;background:#f7fafc;border-radius:12px;width:42px;height:42px;font-size:1.3rem}.peers-column{border-left:1px solid var(--line);padding:14px;background:#fbfcfe;overflow:auto}.peers-column h3{font-size:.8rem;text-transform:uppercase;letter-spacing:.04em;color:#6a7c8d;margin:7px 0 9px}.peer-list,.location-list{display:grid;gap:6px;margin-bottom:18px}.peer-item{border:1px solid #e0e7ee;border-radius:11px;padding:7px;display:flex;gap:8px;align-items:center;background:#fff}.peer-avatar{width:34px;height:34px;border-radius:50%;font-size:.95rem}.peer-copy{min-width:0;display:flex;flex-direction:column}.peer-copy strong{font-size:.79rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.peer-copy span{font-size:.68rem;color:#738496}.loc-item{border:1px solid #e0e7ee;border-radius:10px;padding:8px;font-size:.75rem;background:#fff}.muted{color:#768799;font-size:.78rem}.footer{display:none}
@media(max-width:1000px){.app-shell{grid-template-columns:240px 1fr}.content-grid{grid-template-columns:1fr}.peers-column{display:none}.top-copy{display:none}.msg{max-width:82%}}@media(max-width:680px){.topbar{height:56px}.top-logo{width:126px}.app-shell{display:block;height:auto;min-height:calc(100vh - 64px);margin:4px;border-radius:12px}.sidebar{max-height:250px;border-right:0;border-bottom:1px solid var(--line)}.room-pane{min-height:620px}.pair-grid{grid-template-columns:1fr}.msg{max-width:88%}.messages{padding:12px}.location-toggle{padding:7px}.room-header{padding:9px 11px}}

/* ========================================================================== */
/* W2.5 build 117                                                            */
/* ========================================================================== */
.topbar{
  height:58px;
  min-height:58px;
  overflow:hidden;
  padding:5px 16px;
  gap:12px;
}
.top-logo{
  width:auto;
  height:48px;
  max-width:154px;
  object-fit:contain;
  display:block;
  flex:0 0 auto;
}
.top-copy{min-width:0}
.top-copy strong,.top-copy span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.app-shell{height:calc(100vh - 74px)}
.content-grid{
  --right-panel-width:300px;
  grid-template-columns:minmax(360px,1fr) 7px var(--right-panel-width);
}
.chat-column{position:relative}
.panel-splitter{
  width:7px;
  background:#eef3f8;
  border-left:1px solid #e0e7ee;
  border-right:1px solid #e0e7ee;
  cursor:col-resize;
  position:relative;
  touch-action:none;
  z-index:9;
}
.panel-splitter::after{
  content:"";
  position:absolute;
  width:3px;
  height:44px;
  left:1px;
  top:50%;
  transform:translateY(-50%);
  border-radius:3px;
  background:#b8c6d5;
}
.panel-splitter:hover,.resizing-panel .panel-splitter{background:#dceaf7}
.resizing-panel,.resizing-panel *{cursor:col-resize!important;user-select:none!important}
.peers-column{
  border-left:0;
  min-width:0;
  padding:14px 12px;
}
.location-map{
  height:230px;
  min-height:180px;
  width:100%;
  position:relative;
  overflow:hidden;
  border:1px solid #d9e3ec;
  border-radius:12px;
  background:#e8eef4;
  margin:8px 0 4px;
  isolation:isolate;
}
.map-empty{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  text-align:center;
  padding:18px;
  color:#718396;
  font-size:.75rem;
  background:linear-gradient(135deg,#eef3f7,#e4ebf2);
}
.map-tiles,.map-markers{position:absolute;inset:0}
.map-tile{
  position:absolute;
  width:256px;
  height:256px;
  max-width:none;
  user-select:none;
  pointer-events:none;
}
.map-tile.tile-error{visibility:hidden}
.map-markers{pointer-events:none;z-index:3}
.map-marker{
  position:absolute;
  width:14px;
  height:14px;
  transform:translate(-50%,-50%);
  z-index:4;
}
.map-marker-dot{
  position:absolute;
  inset:0;
  width:14px;
  height:14px;
  border-radius:50%;
  background:#176fbd;
  border:3px solid #fff;
  box-shadow:0 1px 7px rgba(21,57,88,.35);
}
.map-marker-label{
  position:absolute;
  left:19px;
  top:50%;
  transform:translateY(-50%);
  max-width:120px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  background:rgba(255,255,255,.94);
  border:1px solid #d4e0eb;
  border-radius:7px;
  padding:3px 5px;
  color:#193b5d;
  font-size:.66rem;
  font-weight:700;
  box-shadow:0 1px 5px rgba(21,57,88,.12);
}
.map-attribution{
  position:absolute;
  right:4px;
  bottom:3px;
  z-index:5;
  background:rgba(255,255,255,.9);
  border-radius:4px;
  padding:2px 4px;
  font-size:.56rem;
  color:#48657f;
  text-decoration:none;
}
.drop-overlay{
  position:absolute;
  inset:12px;
  border:2px dashed #4c8ecc;
  border-radius:16px;
  background:rgba(232,244,255,.93);
  display:none;
  place-items:center;
  z-index:40;
  pointer-events:none;
}
.drop-overlay.active{display:grid}
.drop-overlay>div{display:grid;gap:5px;text-align:center;color:#174873}
.drop-overlay strong{font-size:1.05rem}
.drop-overlay span{font-size:.78rem;color:#5e7a94}
.file-action{white-space:nowrap}

@media (max-width:900px){
  .topbar{height:54px;min-height:54px;padding:4px 10px}
  .top-logo{height:44px;max-width:138px}
  .top-copy span{display:none}
  .app-shell{
    height:calc(100vh - 66px);
    grid-template-columns:220px minmax(0,1fr);
    margin:6px;
  }
  .content-grid{display:grid;grid-template-columns:minmax(0,1fr);overflow:auto}
  .panel-splitter{display:none}
  .peers-column{
    border-left:0;
    border-top:1px solid var(--line);
    max-height:46vh;
    overflow:auto;
  }
  .chat-column{min-height:56vh}
  .location-map{height:260px}
}

@media (max-width:640px){
  .top-copy strong{font-size:.86rem}
  .top-logo{height:40px;max-width:116px}
  .app-shell{display:block;height:auto;min-height:calc(100vh - 64px);overflow:visible}
  .sidebar{max-height:240px;border-right:0;border-bottom:1px solid var(--line)}
  .room-pane{min-height:calc(100vh - 300px)}
  .room-header{position:sticky;top:54px;z-index:12;background:#fff}
  .content-grid{min-height:650px}
}


/* W2.6 build 118: room persistence, stable composer, staged attachments, resizable map */
.room-pane{min-height:0;overflow:hidden}
.content-grid{min-height:0;overflow:hidden}
.chat-column{min-height:0;overflow:hidden}
.messages{min-height:0;overflow:auto}
.composer{flex:0 0 auto;position:relative;z-index:6}
.reply-bar,.pending-attachments{flex:0 0 auto}
.peers-column{min-height:0;overflow:auto}
.pending-attachments{padding:8px 12px;border-top:1px solid #dce5ee;background:#f8fbff;display:grid;gap:7px}
.attachment-preparation{padding:9px 12px;border-top:1px solid #dce5ee;background:#f8fbff;min-height:0;max-height:220px;overflow-y:auto}
.attachment-preparation-list{display:grid;gap:9px}
.attachment-preparation-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 10px;align-items:center;min-width:0;padding-bottom:8px;border-bottom:1px solid #e3eaf2}
.attachment-preparation-item:last-child{padding-bottom:0;border-bottom:0}
.attachment-preparation-copy{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
.attachment-preparation-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#173a5d}
.attachment-preparation-copy span{font-variant-numeric:tabular-nums;color:#5f7285;font-weight:700}
.attachment-preparation-item progress{grid-column:1/2;width:100%;height:10px;accent-color:#2469b7}
.attachment-preparation-item button{grid-column:2/3;grid-row:1/3;margin:0;align-self:center}

.pending-title{display:flex;align-items:baseline;justify-content:space-between;gap:10px;color:#315474}
.pending-title strong{font-size:.78rem}
.pending-title span{font-size:.68rem;color:#718396}
.pending-file-list{display:flex;flex-wrap:wrap;gap:6px}
.pending-file{max-width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto 24px;align-items:center;gap:7px;padding:6px 7px 6px 9px;border:1px solid #d6e1ec;background:#fff;border-radius:10px}
.pending-file-name{max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.75rem;font-weight:700;color:#244762}
.pending-file small{font-size:.65rem;color:#738496}
.pending-file button{width:22px;height:22px;border:0;border-radius:7px;background:#edf2f7;color:#49657e;cursor:pointer;font-size:1rem;line-height:1}
.drop-overlay span::after{content:" · potrai aggiungere un commento prima dell’invio"}
.map-empty-overlay{background:rgba(238,243,247,.72);pointer-events:none}
.map-resize-handle{height:10px;margin:-2px 2px 8px;cursor:row-resize;touch-action:none;position:relative;border-radius:6px}
.map-resize-handle::after{content:"";position:absolute;left:20%;right:20%;top:4px;height:2px;border-radius:2px;background:#b8c6d5}
.map-resize-handle:hover::after,.resizing-map .map-resize-handle::after{background:#6f9bc5}
.resizing-map,.resizing-map *{cursor:row-resize!important;user-select:none!important}
.self-location{border-color:#bfd8ef;background:#f1f8ff}
@media(max-width:900px){.content-grid{overflow:auto}.chat-column{min-height:56vh;overflow:hidden}.peers-column{min-height:260px}.map-resize-handle{display:block}}
@media(max-width:640px){.app-shell{overflow:visible}.room-pane{overflow:visible}.content-grid{overflow:visible}.chat-column{min-height:62vh;max-height:78vh}.composer{position:sticky;bottom:0}.pending-file-name{max-width:160px}}


/* ========================================================================== */
/* W2.7 build 119 · map tile/referrer fix + positions before participants       */
/* ========================================================================== */
.peers-column > h3:first-child{margin-top:2px}
.location-map{margin-top:6px}
.location-list{margin-top:7px;margin-bottom:14px}
.map-tile-warning{position:absolute;left:8px;right:8px;top:8px;z-index:6;padding:7px 9px;border-radius:8px;border:1px solid #d7e1ea;background:rgba(255,255,255,.94);color:#5a6f83;font-size:.7rem;text-align:center;pointer-events:none}


/* ========================================================================== */
/* W2.8 build 120 · interactive map navigation                                */
/* ========================================================================== */
.location-map{touch-action:none;cursor:grab}
.location-map.map-panning{cursor:grabbing}
.map-controls{position:absolute;left:6px;top:6px;z-index:8;display:grid;grid-template-columns:repeat(2,28px);gap:3px;pointer-events:auto}
.map-nav-btn{width:28px;height:28px;min-width:28px;padding:0;border:1px solid #c8d5e1;border-radius:7px;background:rgba(255,255,255,.94);color:#244762;display:grid;place-items:center;font-size:.86rem;font-weight:800;line-height:1;cursor:pointer;box-shadow:0 1px 4px rgba(21,57,88,.12)}
.map-nav-btn:hover{background:#f2f7fb;border-color:#9fb7cc}
.map-nav-btn:active{transform:translateY(1px)}
.map-nav-btn:focus-visible{outline:2px solid #4d88bf;outline-offset:1px}
@media(max-width:640px){.map-controls{grid-template-columns:repeat(2,27px);gap:2px}.map-nav-btn{width:27px;height:27px;min-width:27px;border-radius:6px;font-size:.82rem}}

/* ========================================================================== */
/* W2.9 build 121 · IRC Web                                                    */
/* ========================================================================== */
.main-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:8px 9px;border-bottom:1px solid var(--line);background:#f7fafc}
.main-tab{border:1px solid transparent;background:transparent;border-radius:9px;padding:7px 8px;color:#5a7086;font-size:.78rem;font-weight:750;cursor:pointer}
.main-tab:hover{background:#edf3f8}
.main-tab.active{background:#fff;border-color:#d7e1eb;color:#173d61;box-shadow:0 1px 3px rgba(20,46,74,.05)}
.sidebar-section{min-height:0;display:flex;flex:1;flex-direction:column;overflow:hidden}
.irc-side-title{align-items:center}
.side-mini-btn{border:1px solid #ccd8e4;background:#fff;color:#294d6b;border-radius:8px;width:27px;height:27px;min-width:27px;padding:0;display:grid;place-items:center;font-size:1rem;font-weight:750;cursor:pointer}
.side-empty{margin:8px 10px;padding:12px;border:1px dashed #ccd8e4;border-radius:10px;color:#77889a;text-align:center;font-size:.75rem}
.irc-server-list{padding:0 9px 10px;display:grid;gap:4px;overflow:auto}
.irc-server-btn{border:0;background:transparent;text-align:left;padding:8px 9px;border-radius:12px;display:grid;grid-template-columns:34px minmax(0,1fr) 9px;gap:8px;align-items:center;cursor:pointer;color:#153958}
.irc-server-btn:hover{background:#eef4fa}.irc-server-btn.active{background:#e4eef9}
.irc-server-icon{width:34px;height:34px;border-radius:10px;background:#eaf0f7;display:grid;place-items:center;font-weight:850;color:#173d61}
.irc-server-copy{min-width:0;display:flex;flex-direction:column;gap:2px}.irc-server-copy strong{font-size:.8rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.irc-server-copy small{font-size:.67rem;color:#718396;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.irc-state-dot{width:8px;height:8px;border-radius:50%;background:#a9b6c2}.irc-state-dot.connected{background:#1fa66a;box-shadow:0 0 0 3px rgba(31,166,106,.12)}.irc-state-dot.connecting,.irc-state-dot.registering{background:#df9f22}.irc-state-dot.error{background:#c94a4a}

.irc-pane{display:flex;min-width:0;min-height:0;flex-direction:column;background:#fff;overflow:hidden}
.irc-header{min-height:0;flex:0 0 auto;border-bottom:1px solid var(--line);display:grid;grid-template-rows:auto auto;align-items:stretch;gap:9px;padding:10px 14px;background:#fff}
.irc-header-main{display:flex;align-items:center;gap:12px;min-width:0}
.irc-header-icon{width:46px;height:46px;border-radius:14px;background:#e9f1f9;color:#173d61;display:grid;place-items:center;font-weight:900;font-size:1.3rem}
.irc-header-copy{min-width:0;flex:1}.irc-header-copy h1{font-size:1.06rem;margin:0 0 3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.irc-header-copy div{font-size:.75rem;color:#6b7d8f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.irc-header-actions{display:flex;min-width:0;max-width:100%;align-items:center;gap:5px;flex-wrap:wrap;justify-content:flex-start}.secondary.compact{margin:0;padding:7px 9px;border-radius:9px;font-size:.72rem}.secondary:disabled,.send-btn:disabled,.side-mini-btn:disabled{opacity:.48;cursor:not-allowed}
.irc-grid{min-height:0;flex:1;display:grid;grid-template-columns:190px minmax(320px,1fr) 210px;overflow:hidden;background:#f4f7fa}
.irc-targets-column,.irc-users-column{min-width:0;background:#fbfcfe;display:flex;flex-direction:column;overflow:hidden}
.irc-targets-column{border-right:1px solid var(--line)}.irc-users-column{border-left:1px solid var(--line)}
.irc-column-title{min-height:43px;padding:8px 10px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e1e8ef;color:#587087;font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.irc-target-list,.irc-user-list{min-height:0;overflow:auto;padding:6px;display:flex;flex-direction:column;gap:2px}
.irc-panel-empty{padding:14px 9px;color:#7a8a99;text-align:center;font-size:.72rem}
.irc-target-btn{border:0;background:transparent;border-radius:8px;padding:7px 7px;display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:5px;color:#2b4965;text-align:left;cursor:pointer}
.irc-target-btn:hover{background:#edf3f8}.irc-target-btn.active{background:#dfeaf5;color:#173d61}
.irc-target-icon{display:grid;place-items:center;font-size:.75rem;font-weight:850;color:#6c849a}.irc-target-name{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.76rem;font-weight:700}
.irc-unread{min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#1c5f98;color:#fff;font-size:.61rem;display:grid;place-items:center;font-weight:800}
.irc-target-sep{padding:9px 7px 4px;color:#8795a3;font-size:.62rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.irc-chat-column{min-width:0;min-height:0;display:flex;flex-direction:column;background:#f4f7fa}
.irc-chat-head{min-height:48px;padding:7px 11px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:10px}.irc-chat-head>div{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}.irc-chat-head strong{font-size:.86rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.irc-chat-head span{font-size:.68rem;color:#718396;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.irc-messages{min-height:0;flex:1;overflow:auto;padding:12px 14px 16px;background:#f4f7fa;scrollbar-gutter:stable}
.irc-line{display:grid;grid-template-columns:44px minmax(0,1fr);gap:5px;padding:2px 0;font-size:.78rem;line-height:1.33;color:#294257}.irc-line-time{color:#93a0ad;font-size:.63rem;padding-top:2px;font-variant-numeric:tabular-nums}.irc-line-body{min-width:0;overflow-wrap:anywhere}.irc-line-nick{border:0;background:transparent;padding:0;color:#235d8e;font:inherit;font-weight:800;cursor:pointer}.irc-line.event .irc-line-body{color:#6a7e91;font-style:italic}.irc-line.notice .irc-line-body{color:#6b5b32}.irc-line.error .irc-line-body{color:#a03939;font-weight:650}.irc-line.action .irc-line-body{color:#405d75;font-style:italic}
.irc-composer{display:flex;align-items:flex-end;gap:8px;padding:9px 10px;border-top:1px solid var(--line);background:#fff;flex:0 0 auto}.irc-composer textarea{flex:1;resize:none;max-height:130px;min-height:40px;border:1px solid #cad6e2;border-radius:12px;padding:9px 11px;outline:none;background:#fbfdff}.irc-composer textarea:focus{border-color:#8eb3d8;box-shadow:0 0 0 3px rgba(36,105,183,.08)}
.irc-user-btn{border:0;background:transparent;border-radius:8px;padding:5px 6px;display:grid;grid-template-columns:22px minmax(0,1fr);gap:4px;align-items:center;color:#31516d;text-align:left;cursor:pointer;font-size:.73rem}.irc-user-btn:hover{background:#edf3f8}.irc-user-mode{width:20px;color:#23649d;font-weight:900;text-align:center}
.irc-ws-note{flex:0 0 auto;padding:6px 12px;border-top:1px solid #dde6ee;background:#f8fbfd;color:#738496;font-size:.65rem;text-align:center}

.irc-dialog{width:min(700px,calc(100vw - 28px));max-height:min(82vh,760px);border:1px solid #d4dfe9;border-radius:16px;padding:0;background:#fff;color:#17324d;box-shadow:0 22px 70px rgba(18,43,68,.25)}.irc-dialog::backdrop{background:rgba(19,38,57,.35)}.irc-dialog form{display:flex;flex-direction:column;max-height:min(82vh,760px)}
.irc-dialog-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px 11px;border-bottom:1px solid var(--line)}.dialog-close{border:0;background:transparent;font-size:1.35rem;color:#60778d;cursor:pointer}
.irc-form-grid{padding:4px 16px 10px;overflow:auto;display:grid;grid-template-columns:1fr 1fr;column-gap:14px}.irc-form-grid .field{margin:9px 0;gap:5px}.irc-form-grid .field span{font-size:.72rem}.irc-form-grid .field input{padding:9px 10px;border-radius:9px;font-size:.78rem}.irc-wide{grid-column:1/-1}.irc-check{display:flex;align-items:center;gap:7px;font-size:.73rem;color:#405a72;padding:7px 1px}.irc-check input{width:16px;height:16px}.dialog-error{margin:0 16px 8px;padding:8px 10px;border-radius:8px;background:#fff0f0;color:#9b2d2d;font-size:.72rem}.irc-dialog-actions{display:flex;align-items:center;gap:7px;padding:10px 16px 13px;border-top:1px solid var(--line)}.irc-dialog-actions .spacer{flex:1}.danger-outline{border:1px solid #e0baba;background:#fff7f7;color:#9d3434;border-radius:10px;padding:9px 11px;cursor:pointer}.irc-dialog-actions .secondary{margin:0;padding:9px 11px}

@media(max-width:1100px){.irc-grid{grid-template-columns:170px minmax(300px,1fr) 170px}}
@media(max-width:900px){.irc-grid{grid-template-columns:160px minmax(0,1fr)}.irc-users-column{display:none}.irc-header{padding:8px 10px}.irc-ws-note{text-align:left}}
@media(max-width:640px){.main-tabs{padding:5px 7px}.irc-pane{min-height:650px;overflow:visible}.irc-header{align-items:flex-start;flex-wrap:wrap}.irc-header-icon{width:38px;height:38px;border-radius:11px}.irc-header-actions{width:100%;justify-content:flex-start;padding-left:50px;margin-top:-8px}.irc-grid{display:flex;flex-direction:column;min-height:620px;overflow:visible}.irc-targets-column{max-height:150px;border-right:0;border-bottom:1px solid var(--line);flex:0 0 auto}.irc-target-list{display:flex;flex-direction:row;overflow:auto;padding:5px}.irc-target-btn{min-width:max-content}.irc-target-sep{display:none}.irc-chat-column{min-height:470px;flex:1}.irc-messages{min-height:360px}.irc-composer{position:sticky;bottom:0;z-index:4}.irc-ws-note{font-size:.61rem}.irc-form-grid{grid-template-columns:1fr}.irc-wide{grid-column:auto}.irc-dialog-actions{flex-wrap:wrap}}


/* W2.10 build 122 · Room forward/share */
.msg-forwarded{margin:1px 0 5px;color:#55738f;font-size:.69rem;font-weight:700}
.msg-actions{flex-wrap:wrap}
.msg-actions button{white-space:nowrap}
.forward-dialog{width:min(520px,calc(100vw - 28px))}
.forward-room-list{padding:10px 14px;overflow:auto;display:grid;gap:7px;max-height:min(56vh,520px)}
.forward-room-option{display:grid;grid-template-columns:20px 38px minmax(0,1fr);gap:9px;align-items:center;padding:8px 9px;border:1px solid #dce5ee;border-radius:11px;background:#fbfdff;cursor:pointer}
.forward-room-option:hover{background:#f2f7fc}.forward-room-option input{width:17px;height:17px;margin:0}
.forward-room-icon{width:38px;height:38px;border-radius:11px;overflow:hidden;display:grid;place-items:center;background:#eaf0f7}
.forward-room-icon img{width:100%;height:100%;object-fit:cover}
.forward-room-copy{min-width:0;display:flex;flex-direction:column}.forward-room-copy strong{font-size:.8rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.forward-room-copy small{font-size:.68rem;color:#748698}
@media(max-width:640px){.msg-actions{gap:10px}.forward-room-list{max-height:52vh}}

/* W2.12 build 124 · official WSS resolver */
/* Build 276: server form mirrors the Mobile profile form + Preferenze IRC. */
.irc-port-row{display:flex;align-items:center;gap:10px}.irc-port-row input[type=number]{flex:1 1 auto;min-width:0}.irc-port-row .irc-check{padding:0;flex:0 0 auto}
.irc-form-grid .hidden{display:none!important}
.irc-form-section{margin:12px 0 2px;font-size:.74rem;font-weight:800;color:var(--muted,#607080);text-transform:uppercase;letter-spacing:.04em}
.irc-form-details{border:1px solid var(--line,#dce4ec);border-radius:10px;padding:2px 12px;margin:10px 0 2px}
.irc-form-details>summary{cursor:pointer;font-size:.8rem;font-weight:700;padding:8px 0;list-style-position:inside}
.irc-form-subgrid{display:grid;grid-template-columns:1fr 1fr;column-gap:14px;padding-bottom:6px}
.irc-form-subgrid .field{margin:7px 0;gap:5px}.irc-form-subgrid .field span{font-size:.72rem}.irc-form-subgrid .field input,.irc-form-subgrid .field select{padding:8px 10px;border-radius:9px;font-size:.78rem;border:1px solid var(--line,#abb9c5);background:var(--panel,#fff);color:inherit}
@media(max-width:640px){.irc-form-subgrid{grid-template-columns:1fr}}
.irc-side-actions{display:inline-flex;align-items:center;gap:4px}.irc-mobile-source{grid-column:1/-1;border:1px solid #d7e5f3;background:#f3f8fd;color:#49667f;border-radius:10px;padding:8px 10px;font-size:.76rem;line-height:1.35}

/* W2.12 build 124 · official WSS resolver */
.irc-ws-inputrow{display:flex;gap:7px;align-items:center}.irc-ws-inputrow input{min-width:0;flex:1}.irc-resolve-hint{display:block;min-height:1.1em;margin-top:4px;color:#718396;font-size:.66rem;line-height:1.3}.irc-ws-inputrow .secondary.compact{flex:0 0 auto;padding:8px 10px}

/* IRC hybrid Mobile bridge */
.irc-ws-inputrow #ircOpenWebchatBtn{white-space:nowrap}
@media(max-width:640px){.irc-ws-inputrow{flex-wrap:wrap}.irc-ws-inputrow input{flex-basis:100%}.irc-ws-inputrow .secondary.compact{padding:7px 9px}}

/* W2.18 IRC power control */
.irc-power[aria-pressed="true"]{font-weight:700}.irc-power[aria-pressed="false"]{opacity:.82}

/* W2.18 IRC parity controls */
.irc-chat-actions{display:flex;gap:6px;align-items:center}

/* W2.19 DCC/XDCC Web-local downloads */
.irc-files-dialog{width:min(680px,calc(100vw - 24px));max-height:min(78vh,760px)}
.irc-files-note{margin:4px 0 12px;color:var(--muted);font-size:13px;line-height:1.4}
.irc-files-list{display:flex;flex-direction:column;gap:8px;max-height:55vh;overflow:auto}
.irc-file-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px 11px;border:1px solid var(--line);border-radius:12px;background:#fff}
.irc-file-copy{min-width:0;display:flex;flex-direction:column;gap:3px}.irc-file-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.irc-file-copy small{color:var(--muted)}
.irc-file-actions{display:flex;align-items:center;gap:8px}.irc-file-progress{font-variant-numeric:tabular-nums;font-size:12px;color:var(--muted)}

/* W2.23 inline IRC power */
.irc-server-btn{grid-template-columns:28px minmax(0,1fr) auto 10px}.irc-inline-power{border:1px solid #cbd7e4;background:#fff;color:#31516f;border-radius:8px;padding:4px 7px;font-size:.68rem;font-weight:700;cursor:pointer}.irc-inline-power[aria-pressed="true"]{background:#eef8f3;border-color:#acd8bf;color:#187347}.irc-inline-power[aria-pressed="false"]{background:#f7f9fb;color:#6c7d8e}


/* W2.24 valid IRC server row: no nested <button> elements. */
.irc-server-row{display:grid;grid-template-columns:minmax(0,1fr) auto 28px 10px;gap:8px;align-items:center;padding:0 9px;border-radius:12px;color:#153958}
.irc-server-row:hover{background:#eef4fa}.irc-server-row.active{background:#e4eef9}
.irc-server-select{border:0;background:transparent;color:inherit;text-align:left;padding:8px 0;display:grid;grid-template-columns:28px minmax(0,1fr);gap:8px;align-items:center;min-width:0;cursor:pointer;width:100%}
.irc-server-select:focus-visible,.irc-inline-power:focus-visible,.irc-inline-delete:focus-visible{outline:2px solid currentColor;outline-offset:2px}
.irc-server-row .irc-server-icon{width:28px;height:28px}
.irc-server-row .irc-inline-power{justify-self:end;white-space:nowrap}
.irc-server-row .irc-state-dot{justify-self:end}

/* W2.26 build 138 — IRC LIST + scroll-preserving UI */
.irc-channel-list-dialog{width:min(780px,calc(100vw - 24px));max-height:min(82vh,820px)}
.irc-channel-list-toolbar{display:flex;align-items:center;gap:8px;padding:10px 14px;border-bottom:1px solid var(--line)}
.irc-channel-list-toolbar input{flex:1;min-width:120px;border:1px solid #cad8e5;border-radius:9px;padding:8px 10px;font:inherit}
.irc-channel-list-rows{padding:8px 10px 14px;overflow:auto;max-height:60vh;display:flex;flex-direction:column;gap:5px}
.irc-channel-list-row{display:flex;align-items:center;gap:10px;border:1px solid #e0e7ef;border-radius:10px;padding:8px 10px;background:#fff}
.irc-channel-list-copy{min-width:0;flex:1}.irc-channel-list-name{display:flex;align-items:center;justify-content:space-between;gap:8px}.irc-channel-list-name span{font-size:.68rem;color:#70859a;white-space:nowrap}
.irc-channel-list-copy small{display:block;margin-top:3px;color:#60778d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:640px){.irc-channel-list-toolbar{flex-wrap:wrap}.irc-channel-list-toolbar input{flex-basis:100%}.irc-channel-list-row{align-items:flex-start}.irc-channel-list-copy small{white-space:normal}}

/* W2.27 build 139 — inline/stable IRC channel directory */
.irc-channel-list-panel{border-bottom:1px solid var(--line);background:#f8fbfd;box-shadow:0 7px 18px rgba(18,43,68,.08);max-height:360px;display:flex;flex-direction:column;min-height:0}
.irc-channel-list-panel.hidden{display:none}
.irc-channel-list-toolbar select{border:1px solid #cad8e5;border-radius:9px;padding:8px 9px;background:#fff;color:#31516d;font:inherit;min-width:118px}
.irc-channel-list-panel .irc-channel-list-rows{max-height:290px;min-height:0}
@media(max-width:640px){.irc-channel-list-panel{max-height:330px}.irc-channel-list-toolbar select{flex:1;min-width:112px}.irc-channel-list-panel .irc-channel-list-rows{max-height:250px}}

/* W2.32 build 144: LIST canali compatta e persistente. */
.irc-channel-list-toolbar{padding:6px 10px;gap:6px}
.irc-channel-list-toolbar input{padding:6px 8px;border-radius:7px}
.irc-channel-order-label{display:flex;align-items:center;gap:5px;color:#60778d;font-size:.74rem;white-space:nowrap}
.irc-channel-order-label select{padding:5px 7px!important;border-radius:7px!important;min-width:106px!important}
.irc-channel-list-rows{padding:2px 8px 6px!important;gap:0!important}
.irc-channel-list-row{display:grid!important;grid-template-columns:minmax(110px,180px) 52px minmax(160px,1fr);align-items:center;gap:8px;border:0!important;border-bottom:1px solid #e5ebf1!important;border-radius:0!important;padding:4px 5px!important;background:transparent!important;cursor:default}
.irc-channel-list-row:hover,.irc-channel-list-row:focus{background:#eef5fa!important;outline:none}
.irc-channel-compact-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.82rem}
.irc-channel-compact-users{text-align:right;color:#60778d;font-size:.72rem;font-variant-numeric:tabular-nums}
.irc-channel-compact-topic{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#60778d;font-size:.72rem}
@media(max-width:640px){.irc-channel-list-row{grid-template-columns:minmax(90px,140px) 42px minmax(100px,1fr);gap:5px}.irc-channel-compact-topic{font-size:.68rem}}


/* W2.32 build 144 · compact IRC controls + File dropdown */
.irc-chat-actions{display:flex!important;flex-direction:row!important;align-items:center!important;gap:6px!important;flex:0 0 auto!important;min-width:max-content!important;white-space:nowrap}
.irc-chat-head>.irc-chat-actions{flex:0 0 auto!important;min-width:max-content!important}
.irc-files-panel{border-bottom:1px solid var(--line);background:#f8fbfd;box-shadow:0 7px 18px rgba(18,43,68,.08);max-height:360px;display:flex;flex-direction:column;min-height:0;padding:0 10px 8px}
.irc-files-panel.hidden{display:none}
.irc-files-panel-head{display:flex;align-items:center;gap:10px;padding:7px 2px 5px;min-height:34px}
.irc-files-panel-head strong{font-size:.78rem;color:#31516d;white-space:nowrap}
.irc-files-panel-head span{font-size:.68rem;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.irc-files-panel .irc-files-list{max-height:290px;overflow:auto;gap:0}
.irc-files-panel .irc-file-row{border:0;border-bottom:1px solid #e5ebf1;border-radius:0;padding:6px 5px;background:transparent}
.irc-files-panel .irc-file-row:hover{background:#eef5fa}
@media(max-width:640px){.irc-chat-head{align-items:flex-start;flex-wrap:wrap}.irc-chat-head>.irc-chat-actions{width:100%;justify-content:flex-end}.irc-files-panel{max-height:330px}.irc-files-panel .irc-files-list{max-height:260px}.irc-files-panel-head span{display:none}}

/* W2.33 build 145 — real-save completion notice (Rooms + IRC/DCC). */
.download-completion-notices {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(390px, calc(100vw - 28px));
  pointer-events: none;
}
.download-completion-notice {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--line, rgba(127,127,127,.28));
  border-radius: 12px;
  background: var(--panel, #fff);
  color: var(--text, #111);
  box-shadow: 0 12px 34px rgba(0,0,0,.20);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease;
}
.download-completion-notice.visible {
  opacity: 1;
  transform: translateY(0);
}
.download-completion-notice strong { font-size: 14px; }
.download-completion-notice span { font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .download-completion-notices { right: 14px; bottom: 14px; }
}
\n\n/* W2.35 build 147 — file summary, responsive IRC power and world directory. */\n.irc-inline-power.pending{opacity:.9;cursor:pointer;min-width:68px}\n#ircFilesBtn[data-active="true"]{font-weight:800}\n.irc-directory-dialog{width:min(980px,calc(100vw - 24px));max-height:min(88vh,860px)}\n.irc-directory-shell{display:flex;flex-direction:column;max-height:min(88vh,860px);min-height:min(620px,78vh)}\n.irc-directory-toolbar{display:grid;grid-template-columns:minmax(180px,1fr) 150px auto auto;gap:8px;align-items:center;padding:10px 14px;border-bottom:1px solid var(--line);background:#f8fbfd}\n.irc-directory-toolbar input{min-width:0;border:1px solid #cad8e5;border-radius:9px;padding:8px 10px;font:inherit;color:#31516d;background:#fff}\n.irc-directory-toolbar #ircDirectoryStatus{justify-self:end;font-size:.7rem;white-space:nowrap}\n.irc-directory-grid{display:grid;grid-template-columns:minmax(220px,32%) minmax(0,1fr);min-height:0;flex:1;overflow:hidden}\n.irc-directory-networks{min-height:0;overflow:auto;border-right:1px solid var(--line);padding:6px;background:#fbfcfe}\n.irc-directory-network{width:100%;border:0;background:transparent;color:#294d6b;text-align:left;padding:8px 9px;border-radius:8px;cursor:pointer;font-size:.78rem;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n.irc-directory-network:hover{background:#eef4fa}.irc-directory-network.active{background:#dfeaf5;color:#173d61}\n.irc-directory-detail{min-height:0;overflow:auto;padding:12px 14px}\n.irc-directory-detail-head{display:flex;align-items:center;gap:10px;margin-bottom:10px}.irc-directory-detail-head strong{font-size:.98rem}.irc-directory-detail-head .spacer{flex:1}\n.irc-directory-country{border:1px solid #cad8e5;border-radius:8px;padding:6px 8px;background:#fff;color:#31516d}\n.irc-directory-endpoints{display:flex;flex-direction:column;gap:4px}\n.irc-directory-endpoint{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;padding:8px 9px;border-bottom:1px solid #e5ebf1}\n.irc-directory-endpoint-copy{min-width:0;display:flex;flex-direction:column;gap:2px}.irc-directory-endpoint-copy strong{font-size:.8rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.irc-directory-endpoint-copy small{font-size:.68rem;color:#718396}\n.irc-directory-note{padding:8px 14px;border-top:1px solid var(--line);background:#f8fbfd;color:#718396;font-size:.66rem;line-height:1.35}\n@media(max-width:760px){.irc-directory-shell{min-height:78vh}.irc-directory-toolbar{grid-template-columns:1fr 120px auto}.irc-directory-toolbar #ircDirectoryStatus{grid-column:1/-1;justify-self:start}.irc-directory-grid{grid-template-columns:1fr;grid-template-rows:minmax(150px,32%) minmax(0,1fr)}.irc-directory-networks{border-right:0;border-bottom:1px solid var(--line)}.irc-directory-detail{padding:9px 10px}}\n
/* W2.38 build 150 — catalogo IRC inline + controlli DCC resumable. */
.irc-directory-panel{border-bottom:1px solid var(--line);background:#f8fbfd;max-height:430px;overflow:hidden}
.irc-directory-inline-shell{display:flex;flex-direction:column;min-height:0;max-height:430px}
.irc-directory-inline-shell .irc-directory-toolbar{display:flex;flex-wrap:wrap;gap:7px;align-items:center;padding:8px 10px;border-bottom:1px solid var(--line);background:#f8fbfd}
.irc-directory-inline-shell .irc-directory-toolbar>strong{font-size:.78rem;color:#294d6b;margin-right:2px}
.irc-directory-inline-shell .irc-directory-toolbar input[type="search"]{flex:1 1 220px;min-width:160px}
.irc-directory-inline-shell .irc-directory-toolbar input[type="text"]{flex:0 1 145px;min-width:110px}
.irc-directory-inline-shell .irc-directory-toolbar #ircDirectoryStatus{margin-left:auto;font-size:.68rem;white-space:nowrap}
.irc-directory-inline-shell .irc-directory-grid{display:grid;grid-template-columns:minmax(210px,34%) minmax(0,1fr);min-height:0;overflow:hidden;flex:1}
.irc-directory-inline-shell .irc-directory-networks,.irc-directory-inline-shell .irc-directory-detail{max-height:315px;overflow:auto}
.irc-directory-inline-shell .irc-directory-note{padding:6px 10px;font-size:.62rem}
.irc-file-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap;justify-content:flex-end}
.irc-file-actions .danger-outline.compact{padding:5px 8px;font-size:.68rem}
@media(max-width:760px){
  .irc-directory-panel,.irc-directory-inline-shell{max-height:520px}
  .irc-directory-inline-shell .irc-directory-grid{grid-template-columns:1fr;grid-template-rows:minmax(130px,42%) minmax(0,1fr)}
  .irc-directory-inline-shell .irc-directory-networks{border-right:0;border-bottom:1px solid var(--line);max-height:190px}
  .irc-directory-inline-shell .irc-directory-detail{max-height:230px}
  .irc-directory-inline-shell .irc-directory-toolbar #ircDirectoryStatus{width:100%;margin-left:0}
}

/* W2.38 build 150 — catalogo IRC tabellare + DCC persistente. */
.irc-directory-table-wrap{min-height:0;max-height:310px;overflow:auto;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:#fff}
.irc-directory-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:.75rem;color:#31516d}
.irc-directory-table th{position:sticky;top:0;z-index:1;background:#eef4f8;color:#254765;text-align:left;padding:7px 9px;border-bottom:1px solid #cfdbe5;font-size:.68rem;text-transform:uppercase;letter-spacing:.03em}
.irc-directory-table th:nth-child(1){width:38%}.irc-directory-table th:nth-child(2),.irc-directory-table th:nth-child(3){width:13%}.irc-directory-table th:nth-child(4){width:20%}.irc-directory-table th:nth-child(5){width:16%}
.irc-directory-table td{padding:7px 9px;border-bottom:1px solid #e5ebf1;vertical-align:middle;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.irc-directory-table tr[data-network]{cursor:pointer}.irc-directory-table tr[data-network]:hover{background:#f1f6fa}.irc-directory-table tr.active{background:#e2edf6}
.irc-directory-table .num{text-align:right;font-variant-numeric:tabular-nums}.irc-directory-table .source{font-size:.68rem;color:#718396}
.irc-directory-table .irc-panel-empty{text-align:center;white-space:normal;padding:16px}
.irc-directory-detail-inline{max-height:260px;overflow:auto;padding:10px 12px;background:#fbfcfe}
.irc-file-actions{display:flex;gap:5px;align-items:center;flex-wrap:wrap}.irc-file-progress{font-variant-numeric:tabular-nums;white-space:nowrap}
@media(max-width:760px){.irc-directory-table th:nth-child(3),.irc-directory-table td:nth-child(3),.irc-directory-table th:nth-child(4),.irc-directory-table td:nth-child(4){display:none}.irc-directory-table th:nth-child(1){width:52%}.irc-directory-table th:nth-child(2){width:20%}.irc-directory-table th:nth-child(5){width:28%}.irc-directory-table-wrap{max-height:280px}}

/* W2.41 build 153 — catalogo IRC in tabella unica + righe DCC stabili. */
.irc-directory-table{table-layout:auto}
.irc-directory-table th:nth-child(1){width:24%}
.irc-directory-table th:nth-child(2){width:25%}
.irc-directory-table th:nth-child(3){width:9%}
.irc-directory-table th:nth-child(4){width:8%}
.irc-directory-table th:nth-child(5){width:14%}
.irc-directory-table th:nth-child(6){width:10%}
.irc-directory-table th:nth-child(7){width:10%}
.irc-directory-table td.endpoint-host{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.7rem}
.irc-directory-table td.endpoint-port,.irc-directory-table td.endpoint-tls{text-align:center;font-variant-numeric:tabular-nums}
.irc-directory-table td.endpoint-country{font-size:.68rem;color:#61758a}
.irc-directory-table td.connect-cell{text-align:right;overflow:visible}
.irc-directory-table tr.endpoint-loading td.endpoint-host::after{content:' …';color:#8292a3}
.irc-file-row[data-dcc-key]{min-height:48px}
.irc-file-row[data-dcc-key] .irc-file-progress{min-width:54px;text-align:right}
@media(max-width:900px){
  .irc-directory-table th:nth-child(5),.irc-directory-table td:nth-child(5),
  .irc-directory-table th:nth-child(6),.irc-directory-table td:nth-child(6){display:none}
  .irc-directory-table th:nth-child(1){width:29%}.irc-directory-table th:nth-child(2){width:31%}.irc-directory-table th:nth-child(3){width:11%}.irc-directory-table th:nth-child(4){width:10%}.irc-directory-table th:nth-child(7){width:19%}
}


/* W2.41 build 153 — eliminazione server inline e diagnostica TLS sicura. */
.irc-inline-delete{width:28px;height:28px;border:1px solid #d8c4c4;background:#fff;color:#9d3434;border-radius:8px;padding:0;font-size:1rem;font-weight:800;line-height:1;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.irc-inline-delete:hover{background:#fff3f3;border-color:#d9a3a3;color:#7f2222}
.irc-server-row .irc-inline-delete{justify-self:end}

/* W2.46 build 158 — full IRC topic on mouse hover via native tooltip. */
#ircTopic,.irc-channel-compact-topic{cursor:help}

/* W2.52 build 164 — Acceso/Spento interactive con riconciliazione autoritativa Mobile. */
.irc-inline-power.pending{pointer-events:auto}

/* W2.61 build 173 · videoconference UI: fit-safe video, movable/resizable PiP, speaker/grid, active speaker, filmstrip and pinning. */
.room-call-actions{display:flex;align-items:center;gap:6px;margin-left:auto}
.room-call-actions button{white-space:nowrap}
.call-incoming-dialog{border:0;padding:0;background:transparent;max-width:min(92vw,460px)}
.call-incoming-dialog::backdrop{background:rgba(5,14,24,.58);backdrop-filter:blur(5px)}
.call-incoming-card{display:grid;grid-template-columns:54px minmax(0,1fr);gap:12px;background:#fff;border:1px solid #d9e2ea;border-radius:20px;padding:18px;box-shadow:0 24px 90px rgba(11,34,55,.32)}
.call-incoming-icon{width:54px;height:54px;border-radius:16px;background:#eaf2f8;display:flex;align-items:center;justify-content:center;font-size:26px;color:#123f68}
.call-incoming-copy{display:flex;flex-direction:column;gap:5px;min-width:0}.call-incoming-copy strong{font-size:18px}.call-incoming-copy span{color:#647586;white-space:normal}
.call-incoming-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:8px}

.web-call-panel{position:fixed;inset:auto 18px 18px auto;width:min(900px,calc(100vw - 36px));height:min(76vh,720px);min-width:min(420px,calc(100vw - 16px));min-height:min(360px,calc(100vh - 16px));max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);margin:0;border:0;padding:0;background:transparent;overflow:visible;z-index:40}
.web-call-shell{display:flex;flex-direction:column;width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;background:linear-gradient(180deg,#0d1720 0%,#071117 100%);color:#fff;border:1px solid rgba(255,255,255,.13);border-radius:22px;box-shadow:0 28px 100px rgba(0,0,0,.48);overflow:hidden;position:relative;isolation:isolate}
.web-call-shell::before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 50% -20%,rgba(64,142,201,.14),transparent 42%);z-index:-1}

.web-call-head{cursor:move;touch-action:none;display:flex;justify-content:space-between;align-items:center;gap:16px;min-height:66px;padding:10px 12px 10px 16px;background:rgba(14,31,43,.96);border-bottom:1px solid rgba(255,255,255,.08);backdrop-filter:blur(14px)}
.web-call-title-block{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}.web-call-title-row{display:flex;align-items:center;gap:8px;min-width:0}.web-call-title-row strong{font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.web-call-live-badge{font-size:9px;font-weight:800;letter-spacing:.08em;color:#ffe9e9;background:#9f2f38;border:1px solid rgba(255,255,255,.16);border-radius:999px;padding:2px 6px}.web-call-subline{display:flex;align-items:center;gap:6px;min-width:0;color:#9fb3c2;font-size:11px}.web-call-subline>span{white-space:nowrap}.web-call-subline #webCallStatus{overflow:hidden;text-overflow:ellipsis}.web-call-dot{opacity:.46}.web-call-quality{color:#b9d8ee!important}
.web-call-head-actions{display:flex;align-items:center;gap:6px;flex:0 0 auto}.web-call-head-btn{width:34px;height:34px;border:1px solid rgba(255,255,255,.12);border-radius:10px;background:rgba(255,255,255,.055);color:#eaf4fb;display:inline-flex;align-items:center;justify-content:center;font-size:17px;line-height:1;padding:0;cursor:pointer;transition:background .16s ease,border-color .16s ease,transform .16s ease}.web-call-head-btn:hover{background:rgba(255,255,255,.11);border-color:rgba(255,255,255,.22)}.web-call-head-btn:active{transform:scale(.96)}.web-call-head-btn.active{background:rgba(74,161,221,.2);border-color:rgba(92,190,255,.45);color:#dff4ff}

.web-call-body{display:flex;min-height:0;flex:1;position:relative;background:#050c11}.web-call-main{display:flex;min-width:0;min-height:0;flex:1;position:relative}.web-call-speaker-view{display:grid;grid-template-rows:minmax(0,1fr) auto;gap:10px;min-width:0;min-height:0;width:100%;padding:10px}.web-call-stage{position:relative;min-height:0;overflow:hidden;border-radius:16px;background:#03070a;box-shadow:inset 0 0 0 1px rgba(255,255,255,.055);display:flex;align-items:center;justify-content:center}.web-call-stage::after{content:"";position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 -80px 110px -100px rgba(0,0,0,.78);border-radius:inherit}
.web-call-filmstrip{display:flex;align-items:stretch;gap:8px;overflow-x:auto;overflow-y:hidden;min-height:106px;max-height:132px;padding:0 2px 2px;scrollbar-width:thin}.web-call-filmstrip:empty{display:none}
.web-call-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));grid-auto-rows:minmax(180px,1fr);gap:10px;padding:10px;overflow:auto;min-width:0;min-height:0;width:100%;align-content:center}

.web-call-tile{position:relative;background:#111d25;border:1px solid rgba(255,255,255,.075);border-radius:14px;overflow:hidden;display:flex;align-items:center;justify-content:center;cursor:pointer;contain:paint;min-width:0;min-height:0;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease,background .16s ease}.web-call-tile:hover{border-color:rgba(255,255,255,.17)}.web-call-tile.active-speaker{border-color:rgba(73,197,128,.78);box-shadow:0 0 0 2px rgba(73,197,128,.18),0 12px 34px rgba(0,0,0,.25)}.web-call-tile.pinned{border-color:rgba(87,180,244,.75);box-shadow:0 0 0 2px rgba(87,180,244,.16)}
.web-call-stage>.web-call-tile.focused{width:100%;height:100%;border:0;border-radius:16px;cursor:default;background:#020609}.web-call-filmstrip>.web-call-tile{flex:0 0 clamp(150px,19vw,220px);height:104px;border-radius:12px}.web-call-grid>.web-call-tile{min-height:180px;aspect-ratio:16/9}.web-call-placeholder{font-size:46px;opacity:.72}.web-call-tile video{display:block;width:100%;height:100%;min-width:0;min-height:0;background:#020609;object-position:center center;transition:object-fit .15s ease}.web-call-fit-contain .web-call-tile video{object-fit:contain}.web-call-fit-cover .web-call-tile video{object-fit:cover}
.web-call-tile-label{position:absolute;left:9px;bottom:9px;z-index:5;max-width:calc(100% - 76px);padding:5px 8px;border-radius:9px;background:rgba(0,0,0,.58);backdrop-filter:blur(8px);font-size:11px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.web-call-tile-state{position:absolute;right:9px;top:9px;z-index:5;padding:4px 7px;border-radius:8px;background:rgba(0,0,0,.5);backdrop-filter:blur(7px);font-size:10px;color:#dceaf3}.web-call-tile-badges{position:absolute;left:9px;top:9px;z-index:6;display:flex;align-items:center;gap:5px}.web-call-media-badge{display:inline-flex;align-items:center;justify-content:center;height:24px;min-width:24px;padding:0 6px;border-radius:8px;background:rgba(0,0,0,.52);font-size:11px;color:#eef8ff;backdrop-filter:blur(8px)}.web-call-media-badge.warn{background:rgba(122,38,46,.78)}.web-call-speaker-badge{background:rgba(24,114,69,.82);color:#eafff2}.web-call-pin-btn{position:absolute;right:9px;bottom:9px;z-index:7;width:30px;height:30px;border:1px solid rgba(255,255,255,.13);border-radius:9px;background:rgba(0,0,0,.48);color:#fff;display:flex;align-items:center;justify-content:center;padding:0;cursor:pointer;opacity:.78;transition:opacity .15s ease,background .15s ease}.web-call-pin-btn:hover,.web-call-pin-btn.active{opacity:1;background:rgba(31,121,184,.72)}

.web-call-tile.self-preview{position:absolute!important;right:16px;bottom:16px;width:clamp(150px,22%,260px);height:auto;aspect-ratio:16/9;z-index:20;border:2px solid rgba(255,255,255,.22);border-radius:14px;box-shadow:0 14px 42px rgba(0,0,0,.45);cursor:default;background:#0d1821}.web-call-tile.self-preview.active-speaker{border-color:rgba(73,197,128,.9)}.web-call-tile.self-preview .web-call-preview-drag,.web-call-tile.self-preview .web-call-preview-resize{display:block}.web-call-tile.self-preview .web-call-pin-btn{right:6px;top:6px;bottom:auto}
.web-call-preview-drag{display:none;position:absolute;left:50%;top:6px;z-index:9;transform:translateX(-50%);width:34px;height:14px;border-radius:999px;background:rgba(0,0,0,.5);cursor:move;touch-action:none}.web-call-preview-drag::after{content:'•••';position:absolute;inset:-6px 0 0;text-align:center;font-size:10px;letter-spacing:1px;color:rgba(255,255,255,.76)}.web-call-preview-resize{display:none;position:absolute;right:0;bottom:0;width:24px;height:24px;z-index:9;cursor:nwse-resize;touch-action:none}.web-call-preview-resize::after{content:"";position:absolute;right:5px;bottom:5px;width:8px;height:8px;border-right:2px solid rgba(255,255,255,.75);border-bottom:2px solid rgba(255,255,255,.75)}

.web-call-participants-panel{width:min(290px,34vw);min-width:230px;border-left:1px solid rgba(255,255,255,.08);background:rgba(12,27,37,.97);display:flex;flex-direction:column;min-height:0;animation:webCallDrawerIn .18s ease-out}.web-call-participants-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 12px;border-bottom:1px solid rgba(255,255,255,.07)}.web-call-participant-list{display:flex;flex-direction:column;gap:5px;padding:8px;overflow:auto;min-height:0}.web-call-participant-row{display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:9px;padding:8px;border-radius:11px;background:rgba(255,255,255,.035);border:1px solid transparent}.web-call-participant-row.active-speaker{background:rgba(44,145,88,.11);border-color:rgba(73,197,128,.28)}.web-call-participant-avatar{width:34px;height:34px;border-radius:11px;display:flex;align-items:center;justify-content:center;background:#1b3445;color:#dff3ff;font-size:12px;font-weight:800}.web-call-participant-copy{min-width:0;display:flex;flex-direction:column;gap:2px}.web-call-participant-copy strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.web-call-participant-copy span{font-size:10px;color:#91a6b5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.web-call-participant-icons{display:flex;gap:4px;font-size:11px}.web-call-participant-icons span{width:22px;height:22px;border-radius:7px;background:rgba(255,255,255,.055);display:flex;align-items:center;justify-content:center}.web-call-participant-icons .off{background:rgba(120,35,43,.34);color:#ffb9bf}
@keyframes webCallDrawerIn{from{opacity:0;transform:translateX(14px)}to{opacity:1;transform:none}}

.web-call-controls{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;padding:11px 14px;background:rgba(14,31,43,.97);border-top:1px solid rgba(255,255,255,.08);backdrop-filter:blur(14px)}.web-call-control{min-width:66px;height:48px;border:1px solid rgba(255,255,255,.11);border-radius:15px;background:rgba(255,255,255,.06);color:#edf7fd;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:5px 9px;cursor:pointer;transition:transform .14s ease,background .14s ease,border-color .14s ease}.web-call-control:hover{background:rgba(255,255,255,.11);border-color:rgba(255,255,255,.2)}.web-call-control:active{transform:scale(.96)}.web-call-control.off{background:rgba(116,38,44,.28);border-color:rgba(225,93,102,.25);color:#ffc6cb}.web-call-control.active{background:rgba(35,119,174,.28);border-color:rgba(89,181,243,.4)}.web-call-control:disabled{opacity:.42;cursor:not-allowed}.web-call-control-icon{font-size:17px;line-height:1}.web-call-control-label{font-size:9px;line-height:1.1;white-space:nowrap}.web-call-control-danger{background:#b53640;border-color:#d65760;color:#fff}.web-call-control-danger:hover{background:#c9434e}.web-call-control-danger-soft{background:rgba(177,57,67,.16);border-color:rgba(215,91,100,.33);color:#ffc8cd}

.web-call-resize-handle{position:absolute;right:0;bottom:0;width:30px;height:30px;z-index:40;cursor:nwse-resize;touch-action:none}.web-call-resize-handle::before,.web-call-resize-handle::after{content:"";position:absolute;right:5px;bottom:5px;border-right:2px solid rgba(255,255,255,.6);border-bottom:2px solid rgba(255,255,255,.6);width:11px;height:11px}.web-call-resize-handle::after{right:10px;bottom:10px;width:5px;height:5px;opacity:.7}.resizing-call,.resizing-call *,.dragging-call,.dragging-call *{user-select:none!important}.dragging-call .web-call-head{cursor:grabbing}
.web-call-panel.web-call-maximized{inset:0!important;width:100vw!important;height:100vh!important;max-width:none!important;max-height:none!important}.web-call-panel.web-call-maximized .web-call-shell{width:100vw!important;height:100vh!important;border:0;border-radius:0;box-shadow:none}.web-call-panel.web-call-maximized .web-call-resize-handle,.web-call-shell:fullscreen .web-call-resize-handle{display:none}.web-call-shell:fullscreen{width:100vw!important;height:100vh!important;max-width:none!important;max-height:none!important;border:0;border-radius:0;box-shadow:none;background:#050c11}.web-call-shell:fullscreen .web-call-stage{border-radius:14px}

@media(max-width:900px){.web-call-participants-panel{position:absolute;right:0;top:0;bottom:0;z-index:30;width:min(310px,82vw);box-shadow:-18px 0 50px rgba(0,0,0,.36)}.web-call-grid{grid-template-columns:repeat(auto-fit,minmax(190px,1fr));grid-auto-rows:minmax(150px,1fr)}}
@media(max-width:760px){.room-call-actions{gap:4px}.room-call-actions button{font-size:0;padding:7px 9px}.room-call-actions #roomAudioCallBtn::after{content:'☎';font-size:16px}.room-call-actions #roomVideoCallBtn::after{content:'▣';font-size:16px}.web-call-panel{inset:auto 6px 6px 6px;width:calc(100vw - 12px);height:min(82vh,680px);min-width:0;min-height:340px}.web-call-shell{border-radius:17px}.web-call-head{min-height:58px;padding:8px 9px 8px 12px}.web-call-subline{gap:4px}.web-call-subline #webCallQuality,.web-call-subline .web-call-dot:last-of-type{display:none}.web-call-head-actions{gap:4px}.web-call-head-btn{width:31px;height:31px;border-radius:9px}.web-call-speaker-view{padding:6px;gap:6px}.web-call-filmstrip{min-height:88px;max-height:100px}.web-call-filmstrip>.web-call-tile{flex-basis:132px;height:86px}.web-call-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(120px,1fr);gap:6px;padding:6px}.web-call-grid>.web-call-tile{min-height:120px}.web-call-tile.self-preview{right:9px;bottom:9px;width:clamp(118px,31%,190px);border-radius:11px}.web-call-controls{gap:6px;padding:8px}.web-call-control{min-width:54px;height:44px;border-radius:13px;padding:4px 7px}.web-call-control-label{font-size:8px}.web-call-resize-handle{display:none}}
@media(max-width:480px){.web-call-grid{grid-template-columns:1fr}.web-call-title-row strong{max-width:52vw}.web-call-control-label{display:none}.web-call-control{min-width:44px;width:44px;padding:0}.web-call-control-icon{font-size:18px}.web-call-filmstrip>.web-call-tile{flex-basis:116px}.web-call-tile-label{font-size:10px;left:6px;bottom:6px}.web-call-tile-state{font-size:9px;right:6px;top:6px}.web-call-pin-btn{width:27px;height:27px;right:6px;bottom:6px}}

/* W2.52 build 164 · bridged Web↔Mobile call transport fallback. */


/* W2.61 build 173 · stable participant roster, moderator actions, reconnect states. */
.web-call-participant-row{grid-template-columns:34px minmax(0,1fr) auto auto;cursor:pointer;transition:background .15s ease,border-color .15s ease,box-shadow .15s ease}
.web-call-participant-row:hover{background:rgba(255,255,255,.06)}
.web-call-participant-row.selected{background:rgba(48,132,190,.16);border-color:rgba(87,180,244,.42);box-shadow:inset 3px 0 0 rgba(87,180,244,.8)}
.web-call-participant-row.reconnecting{opacity:.78}
.web-call-participant-actions{display:flex;align-items:center;gap:4px}
.web-call-participant-action{width:28px;height:28px;border-radius:8px;border:1px solid rgba(255,255,255,.11);background:rgba(255,255,255,.055);color:#eef8ff;display:inline-flex;align-items:center;justify-content:center;padding:0;cursor:pointer;font-size:13px}
.web-call-participant-action:hover:not(:disabled){background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.22)}
.web-call-participant-action:disabled{opacity:.35;cursor:default}
@media(max-width:760px){.web-call-participant-row{grid-template-columns:34px minmax(0,1fr) auto}.web-call-participant-icons{display:none}.web-call-participant-actions{grid-column:3}}

/* ========================================================================== */
/* W2.63 build 175 · Stato P2P                                                */
/* ========================================================================== */
.main-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}
.status-contact-list{padding:0 9px 10px;display:grid;gap:4px;overflow:auto;min-height:0}
.status-side-group{font-size:.65rem;font-weight:800;letter-spacing:.05em;color:#708399;padding:8px 9px 3px}
.status-contact-btn{border:0;background:transparent;text-align:left;padding:8px 9px;border-radius:12px;display:grid;grid-template-columns:40px minmax(0,1fr) 10px;gap:9px;align-items:center;cursor:pointer;color:#153958;width:100%}
.status-contact-btn:hover{background:#eef4fa}.status-contact-btn.active{background:#e4eef9}
.status-side-avatar,.status-detail-avatar{overflow:hidden;display:grid;place-items:center;background:#eaf0f7;color:#153958;flex:0 0 auto;border-radius:50%}
.status-side-avatar{width:40px;height:40px;font-size:1.05rem}.status-detail-avatar{width:62px;height:62px;font-size:1.55rem}
.status-side-avatar img,.status-detail-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.status-side-copy{min-width:0;display:flex;flex-direction:column;gap:2px}.status-side-copy strong{font-size:.82rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.status-side-copy small{font-size:.7rem;color:#74869a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.status-pane{display:flex;min-width:0;min-height:0;flex-direction:column;background:#fff;overflow:hidden}
.status-header{min-height:72px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:12px;padding:10px 16px}
.status-header-icon{width:48px;height:48px;border-radius:15px;background:#eaf0f7;display:grid;place-items:center;font-size:1.45rem;color:#153958}.status-header-copy{min-width:0;flex:1}.status-header-copy h1{font-size:1.08rem;margin:0 0 3px}.status-header-copy div{font-size:.78rem;color:#687a8c}
.status-grid{min-height:0;flex:1;overflow:auto;background:#f4f7fa;padding:18px;display:grid;grid-template-columns:minmax(280px,420px) minmax(0,1fr);gap:16px;align-items:start}
.status-own-card,.status-remote-detail{background:#fff;border:1px solid #dce5ee;border-radius:18px;padding:16px;box-shadow:0 2px 10px rgba(20,46,74,.04)}
.status-own-head,.status-remote-head{display:flex;align-items:center;gap:12px}.status-own-head h2,.status-remote-head h2{margin:0 0 3px;font-size:1.05rem}.status-message{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.45;color:#18324b}.status-own-image,.status-remote-image{display:block;width:100%;max-height:360px;object-fit:cover;border-radius:14px;margin:12px 0}
.status-actions{display:flex;gap:7px;flex-wrap:wrap;margin:12px 0}.status-actions .secondary{margin:0}
.status-p2p-note{margin-top:14px;border-top:1px solid #e2e9f0;padding-top:11px;color:#718396;font-size:.73rem;line-height:1.4}
.status-remote-detail h3{margin:18px 0 8px}.status-story-card{border:1px solid #e0e7ee;background:#fbfcfe;border-radius:14px;padding:10px;margin:8px 0}.status-story-card img{display:block;width:100%;max-height:420px;object-fit:cover;border-radius:10px}.status-story-card p{margin:8px 0 0;white-space:pre-wrap}
.status-empty{min-height:300px;display:grid;place-items:center;align-content:center;gap:6px;text-align:center;color:#728497}.status-empty strong{color:#3e5871;font-size:1rem}.status-empty span{font-size:.82rem;max-width:420px}
@media(max-width:900px){.status-grid{grid-template-columns:1fr}.status-remote-detail{min-height:360px}}
@media(max-width:640px){.main-tabs{grid-template-columns:repeat(3,minmax(76px,1fr));overflow:auto}.status-pane{min-height:650px;overflow:visible}.status-grid{padding:10px;overflow:visible}.status-header{padding:9px 11px}.status-actions{gap:5px}}

.status-own-stories{margin:8px 0 2px}.status-own-story-card{position:relative}.status-story-actions{display:flex;justify-content:flex-end;margin-top:8px}.status-story-actions .secondary{margin:0}
.status-message-editor{display:flex;gap:8px;align-items:flex-end;margin:8px 0 12px}.status-message-editor textarea{flex:1;min-height:64px;resize:vertical;border:1px solid #cfdbe7;border-radius:10px;padding:9px 10px;font:inherit;background:#fff;color:#18324b}.status-story-gallery{display:flex;gap:8px;overflow-x:auto;padding:2px 0 4px}.status-story-gallery img{width:210px;min-width:210px;height:150px;object-fit:cover;border-radius:10px}.status-story-thumb-wrap{position:relative;flex:0 0 auto}.status-story-remove-media{position:absolute;top:5px;right:5px;width:28px;height:28px;border:0;border-radius:50%;background:rgba(0,0,0,.62);color:#fff;font-size:20px;line-height:24px;cursor:pointer}.status-story-card h4{margin:0 0 8px;font-size:1rem}.status-story-actions{gap:6px;flex-wrap:wrap}

/* W2.68 build 180 · Stato UX: hero compatta, lightbox immagini e commenti P2P */
.status-remote-image{width:min(240px,100%);height:145px;object-fit:cover;cursor:zoom-in;margin:12px auto;box-shadow:0 4px 18px rgba(0,0,0,.08)}
.status-story-gallery img{cursor:zoom-in}
.status-comments{display:grid;gap:4px;margin-top:10px;padding-top:8px;border-top:1px solid #e6edf3;font-size:.92rem}.status-comment{overflow-wrap:anywhere}.status-comment-composer{display:flex;gap:7px;align-items:center;margin-top:10px}.status-comment-composer input{flex:1;min-width:0;border:1px solid #cfdbe7;border-radius:10px;padding:8px 10px;font:inherit;background:#fff;color:#18324b}
.status-image-overlay{position:fixed;inset:0;z-index:99999;background:rgba(0,0,0,.94);display:flex;align-items:center;justify-content:center;padding:50px 24px 24px;outline:none}.status-image-overlay img{max-width:96vw;max-height:90vh;object-fit:contain;border-radius:8px}.status-image-close{position:fixed;top:12px;right:16px;width:42px;height:42px;border:0;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;font-size:30px;line-height:38px;cursor:pointer}

/* W2.69 status folds + comment avatars */
.status-fold{border:1px solid #dfe7ef;border-radius:13px;background:#fff;overflow:hidden;margin:8px 9px}.status-fold>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 12px;font-weight:750;color:#1a3857;user-select:none}.status-fold>summary::-webkit-details-marker{display:none}.status-fold>summary::after{content:'▾';font-size:.78rem;color:#718294;transition:transform .15s}.status-fold[open]>summary::after{transform:rotate(180deg)}.status-own-stories-fold{margin:10px 0 4px}.status-own-stories-fold>summary{background:#f7fafc}.status-own-stories-fold .status-own-stories{padding:0 10px 10px;margin:0}.status-remote-stories-fold{margin:16px 0 0}.status-remote-stories-list{padding:0 10px 10px}.status-comment-with-avatar{display:flex;gap:8px;align-items:flex-start}.status-comment-avatar{width:28px;height:28px;min-width:28px;border-radius:50%;overflow:hidden;display:grid;place-items:center;background:#eaf0f7;font-size:.82rem}.status-comment-avatar img{width:100%;height:100%;object-fit:cover;display:block}.status-comment-copy{min-width:0;line-height:1.35;padding-top:3px}.status-comment-copy strong{font-weight:750}

/* W2.70 IRC completion */
.irc-line.historical{opacity:.82}
.irc-line-reply{display:inline-block;margin-right:6px;padding:1px 6px;border-left:2px solid currentColor;border-radius:5px;opacity:.72;font-size:.86em}
.irc-line-account{margin-left:3px;opacity:.58;font-size:.76em}


/* W2.73 build 185 · IRC graphical context menus */
.irc-context-menu{position:fixed;z-index:120000;min-width:210px;max-width:min(320px,calc(100vw - 16px));max-height:calc(100vh - 16px);overflow:auto;padding:6px;background:rgba(252,254,255,.98);border:1px solid #cad8e5;border-radius:12px;box-shadow:0 14px 38px rgba(20,46,74,.22);backdrop-filter:blur(14px);font-size:.78rem;color:#183a58}
.irc-context-heading{padding:5px 8px 4px;font-size:.64rem;font-weight:850;letter-spacing:.045em;text-transform:uppercase;color:#7a8da0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.irc-context-separator{height:1px;background:#e3eaf1;margin:5px 3px}
.irc-context-item{width:100%;border:0;background:transparent;border-radius:8px;padding:7px 9px;display:grid;grid-template-columns:22px minmax(0,1fr);gap:6px;align-items:center;text-align:left;color:#1c4263;font:inherit;cursor:pointer}
.irc-context-item:hover,.irc-context-item:focus-visible{background:#eaf2f9;outline:none}
.irc-context-item:disabled{opacity:.38;cursor:default;background:transparent}
.irc-context-item.danger{color:#9d3038}.irc-context-item.danger:hover,.irc-context-item.danger:focus-visible{background:#fbecee}
.irc-context-icon{width:20px;text-align:center;font-weight:850}.irc-context-label{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:640px){.irc-context-menu{min-width:190px;font-size:.82rem}.irc-context-item{padding:9px 10px}}

/* ========================================================================== */
/* W2.75 build 187 · chAPP_over visual parity with Mobile +205               */
/* Standard family: Messenger Premium / chAPP_over                            */
/* ========================================================================== */
:root{
  --co-primary:#3B82F6;
  --co-primary-strong:#2563EB;
  --co-primary-soft:#DBEAFE;
  --co-secondary:#7C9CF5;
  --co-tertiary:#60A5FA;
  --co-surface:#FFFFFF;
  --co-surface-soft:#F6F9FF;
  --co-surface-tint:rgba(255,255,255,.78);
  --co-border:rgba(89,119,166,.18);
  --co-text:#10233B;
  --co-muted:#6A7E96;
  --co-shadow:0 18px 54px rgba(49,86,138,.12);
  --co-shadow-soft:0 8px 26px rgba(49,86,138,.09);
  --co-card-radius:22px;
  --co-control-radius:22px;
  --navy:var(--co-primary-strong);
  --blue:var(--co-primary);
  --line:var(--co-border);
  --muted:var(--co-muted);
  --panel:var(--co-surface);
  --soft:var(--co-surface-soft);
  --bubble:rgba(255,255,255,.92);
  --bubble-out:#DCEBFF;
}

html,body{
  color:var(--co-text);
  background:
    radial-gradient(circle at 12% 6%,rgba(59,130,246,.11),transparent 28%),
    radial-gradient(circle at 86% 16%,rgba(96,165,250,.10),transparent 30%),
    linear-gradient(145deg,#F2F7FF 0%,#F8FAFF 48%,#EEF5FF 100%);
}
body{min-height:100vh}

/* Glass-like top chrome, close to Mobile chAPP_over app bars. */
.topbar{
  height:64px;
  min-height:64px;
  padding:7px 18px;
  background:rgba(255,255,255,.78);
  border-bottom:1px solid rgba(75,112,164,.14);
  box-shadow:0 8px 30px rgba(58,88,130,.06);
  backdrop-filter:blur(18px) saturate(1.25);
}
.top-logo{max-height:50px}
.top-copy strong{font-weight:900;letter-spacing:-.01em;color:#0F2B4D}
.top-copy span{color:#68809B;font-weight:650}

.app-shell{
  height:calc(100vh - 82px);
  margin:9px 12px;
  border:1px solid rgba(79,115,163,.16);
  border-radius:26px;
  background:rgba(255,255,255,.74);
  box-shadow:var(--co-shadow);
  backdrop-filter:blur(18px) saturate(1.12);
}
.sidebar{
  background:linear-gradient(180deg,rgba(250,252,255,.94),rgba(241,247,255,.90));
  border-right:1px solid rgba(79,115,163,.14);
}
.identity-card{
  padding:15px 16px;
  background:rgba(255,255,255,.70);
  border-bottom:1px solid rgba(79,115,163,.12);
}
.identity-icon,.room-avatar,.avatar-surface,.message-avatar,.peer-avatar,.status-side-avatar,.status-detail-avatar,.status-comment-avatar{
  background:linear-gradient(145deg,#EAF3FF,#DCEBFF);
  color:#245DAA;
  box-shadow:inset 0 0 0 1px rgba(59,130,246,.10);
}

.main-tabs{
  gap:6px;
  margin:8px 9px 2px;
  padding:5px;
  border:1px solid rgba(59,130,246,.12);
  border-radius:18px;
  background:rgba(229,239,255,.62);
}
.main-tab{
  border-radius:14px;
  padding:8px 9px;
  color:#5B7390;
  font-weight:850;
}
.main-tab:hover{background:rgba(255,255,255,.65)}
.main-tab.active{
  background:rgba(255,255,255,.94);
  border-color:rgba(59,130,246,.20);
  color:#1E5DB2;
  box-shadow:0 5px 15px rgba(59,130,246,.10);
}

.side-title{color:#244563;font-weight:900;padding-top:13px}
.room-list,.irc-server-list,.status-contact-list{gap:5px}
.room-btn,.irc-server-btn,.irc-server-row,.status-contact-btn{
  border-radius:17px;
  transition:background .15s ease,transform .15s ease,box-shadow .15s ease;
}
.room-btn:hover,.irc-server-btn:hover,.irc-server-row:hover,.status-contact-btn:hover{
  background:rgba(219,234,254,.64);
}
.room-btn.active,.irc-server-btn.active,.irc-server-row.active,.status-contact-btn.active{
  background:linear-gradient(135deg,rgba(219,234,254,.95),rgba(239,246,255,.90));
  box-shadow:inset 3px 0 0 var(--co-primary),0 5px 14px rgba(59,130,246,.08);
}
.room-btn .ri,.irc-server-icon{border-radius:15px;background:linear-gradient(145deg,#E4F0FF,#D7E8FF);color:#2363B8}
.dot.online,.irc-state-dot.connected{background:#22A66D;box-shadow:0 0 0 4px rgba(34,166,109,.12)}

.room-pane,.irc-pane,.status-pane{background:rgba(255,255,255,.78)}
.room-header,.irc-header,.status-header{
  min-height:76px;
  padding:11px 17px;
  background:rgba(255,255,255,.72);
  border-bottom:1px solid rgba(80,116,164,.13);
  backdrop-filter:blur(14px);
}
.room-heading h1,.irc-header-copy h1,.status-header-copy h1{font-weight:900;color:#102A46;letter-spacing:-.01em}
.room-avatar,.irc-header-icon,.status-header-icon{border-radius:18px;background:linear-gradient(145deg,#E4F0FF,#D8E8FF);color:#1E62B9}
.location-toggle{
  border-radius:16px;
  border-color:rgba(59,130,246,.14);
  background:rgba(239,246,255,.78);
}

/* Aurora-bubble texture inspired by the Mobile chAPP_over procedural painter. */
.messages,.irc-messages{
  background-color:#EFF6FF;
  background-image:
    radial-gradient(circle at 28px 32px,rgba(59,130,246,.055) 0 26px,transparent 27px),
    radial-gradient(circle at 56px 48px,transparent 0 13px,rgba(59,130,246,.085) 14px 15px,transparent 16px),
    linear-gradient(35deg,transparent 46%,rgba(59,130,246,.045) 47% 48%,transparent 49%),
    radial-gradient(circle at 100px 18px,rgba(96,165,250,.11) 0 2px,transparent 3px);
  background-size:132px 116px,132px 116px,132px 116px,132px 116px;
  background-position:0 0,0 0,0 0,0 0;
}
.chat-column,.irc-chat-column{background:#EFF6FF}
.messages{padding:18px 22px 24px;gap:9px}
.msg{
  max-width:min(76%,780px);
  padding:10px 14px 9px;
  border-radius:22px 22px 22px 8px;
  border:1px solid rgba(76,112,158,.15);
  background:rgba(255,255,255,.91);
  box-shadow:0 7px 22px rgba(49,86,138,.07);
  backdrop-filter:blur(8px);
}
.msg.out{
  background:linear-gradient(145deg,#DCEBFF,#E8F2FF);
  border-color:rgba(59,130,246,.19);
  border-radius:22px 22px 8px 22px;
}
.msg-name{color:#2A65B4;font-weight:850}
.msg-text{font-size:.92rem;line-height:1.42;color:#132A44}
.msg-head{color:#7A8EA4}
.msg-reply{
  border-left:3px solid var(--co-primary);
  background:rgba(255,255,255,.52);
  border-radius:10px;
}
.file-card{border-radius:15px;background:rgba(255,255,255,.72);border-color:rgba(59,130,246,.12)}
.file-icon{border-radius:12px;background:#EAF3FF}
.msg-actions button{color:#4675AA;font-weight:700}

.reply-bar{
  background:rgba(226,239,255,.92);
  border-top-color:rgba(59,130,246,.12);
}
.composer,.irc-composer{
  gap:9px;
  padding:11px 13px;
  background:rgba(255,255,255,.84);
  border-top:1px solid rgba(73,110,159,.14);
  backdrop-filter:blur(16px);
}
.composer textarea,.irc-composer textarea,.status-message-editor textarea,.status-comment-composer input{
  border-radius:20px;
  border-color:rgba(79,116,165,.18);
  background:rgba(248,251,255,.94);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7);
}
.composer textarea:focus,.irc-composer textarea:focus,.status-message-editor textarea:focus,.status-comment-composer input:focus{
  border-color:rgba(59,130,246,.56);
  box-shadow:0 0 0 4px rgba(59,130,246,.10);
  outline:none;
}
.send-btn,.file-action{
  border-radius:18px;
  background:linear-gradient(135deg,var(--co-primary),var(--co-primary-strong));
  box-shadow:0 7px 18px rgba(37,99,235,.20);
}
.icon-btn,.secondary,.ghost,.side-mini-btn,.irc-inline-power,.web-call-control{
  border-radius:16px;
}
.secondary,.ghost,.icon-btn,.side-mini-btn{
  border-color:rgba(76,112,158,.18);
  background:rgba(255,255,255,.82);
  color:#315B87;
}
.secondary:hover,.ghost:hover,.icon-btn:hover,.side-mini-btn:hover{background:#EAF3FF;border-color:rgba(59,130,246,.28)}

.peers-column,.irc-targets-column,.irc-users-column{
  background:rgba(248,251,255,.86);
  border-color:rgba(79,115,163,.13);
}
.peer-item,.loc-item,.irc-file-row{
  border-radius:16px;
  border-color:rgba(79,115,163,.13);
  background:rgba(255,255,255,.84);
  box-shadow:0 4px 14px rgba(49,86,138,.04);
}

/* W3.32: hierarchical device roster below the map. Explicit associations are
   preferred; a unique legacy nickname match is a display-only fallback. */
.peer-list{gap:5px;margin-top:10px}
.peer-item{position:relative;min-width:0;transition:background-color .15s}
.peer-item.is-parent{border-color:rgba(64,118,185,.25);background:rgba(233,244,255,.96)}
.peer-item.is-child{margin-inline-start:18px;width:calc(100% - 18px);background:rgba(249,252,255,.93)}
.peer-item.is-child::before{content:"";position:absolute;inset-inline-start:-12px;top:-8px;width:7px;height:calc(50% + 8px);border-inline-start:1px solid #A4BCD4;border-bottom:1px solid #A4BCD4;border-end-start-radius:5px;pointer-events:none}
.peer-item.is-child .peer-avatar{width:29px;height:29px;font-size:.84rem}
.peer-item.is-child .peer-copy strong{font-size:.76rem}
.peer-item.is-current .peer-copy span{color:#2475AE;font-weight:650}
.peer-avatar-stack{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:34px;height:34px}
.peer-avatar-stack .peer-avatar{flex:0 0 auto}
.peer-web-badge{display:none;position:absolute;inset-inline-end:-5px;bottom:-5px;width:17px;height:17px;border-radius:6px;border:1.5px solid #fff;background:#DBEAFF;font-size:10px;line-height:1;align-items:center;justify-content:center;box-shadow:0 1px 4px rgba(19,45,78,.22);z-index:1}
.peer-avatar-stack.has-web-badge .peer-web-badge{display:flex}
.peer-online-dot{display:none;position:absolute;inset-inline-start:-3px;bottom:-4px;width:12px;height:12px;border-radius:50%;background:#18B766;border:2px solid #fff;box-shadow:0 0 0 1px rgba(21,143,84,.19);z-index:2}
.peer-item.is-online .peer-online-dot{display:block}
.peer-item.is-child .peer-avatar-stack{width:29px;height:29px}
@media(prefers-color-scheme:dark){
  .peer-item.is-parent{background:rgba(24,54,88,.94);border-color:rgba(112,171,235,.28)}
  .peer-item.is-child{background:rgba(15,30,49,.94);border-color:rgba(145,177,218,.14)}
  .peer-item.is-child::before{border-color:#557B9F}
  .peer-item.is-current .peer-copy span{color:#8EC0FF}
  .peer-web-badge{background:#234E7C;border-color:#142940}
  .peer-online-dot{border-color:#142940}
}

.irc-grid{background:#EFF6FF}
.irc-target-btn,.irc-user-btn{border-radius:13px}
.irc-target-btn:hover,.irc-user-btn:hover{background:#EAF3FF}
.irc-target-btn.active{background:#DCEBFF;color:#1F5CA7}
.irc-unread{background:var(--co-primary);box-shadow:0 3px 10px rgba(59,130,246,.22)}
.irc-chat-head{background:rgba(255,255,255,.76);backdrop-filter:blur(12px)}
.irc-line{font-size:.79rem;line-height:1.38}
.irc-line-nick{color:#2767B9}
.irc-ws-note{background:rgba(247,250,255,.85)}

.irc-dialog,.status-own-card,.status-remote-detail,.status-story-card,.status-fold,.card{
  border-radius:var(--co-card-radius);
  border-color:rgba(79,115,163,.15);
  box-shadow:var(--co-shadow-soft);
}
.irc-dialog{background:rgba(255,255,255,.96);backdrop-filter:blur(18px)}
.irc-privacy-dialog{width:min(520px,calc(100vw - 28px))}
.irc-privacy-dialog .irc-privacy-form{display:flex;flex-direction:column;gap:7px;padding:18px 20px;max-height:min(82vh,760px);overflow-y:auto;overflow-x:hidden}
.irc-privacy-form .field{margin:5px 0;gap:5px}
.irc-privacy-form .field span{font-size:.78rem}
.irc-privacy-form .field input{width:100%;padding:9px 10px;border-radius:9px;font-size:.86rem}
.irc-privacy-form .irc-check{padding:6px 0}
.irc-privacy-form .irc-dialog-actions{margin:6px -20px -18px;padding:12px 20px;flex-wrap:wrap}
.irc-privacy-form #ircPrivacyError{margin:5px 0}
.irc-dialog::backdrop{background:rgba(20,42,68,.36);backdrop-filter:blur(3px)}
.irc-dialog-head{background:rgba(247,250,255,.76)}

.status-grid{
  background:
    radial-gradient(circle at 14% 12%,rgba(59,130,246,.08),transparent 30%),
    linear-gradient(145deg,#F4F8FF,#EEF5FF);
  gap:18px;
}
.status-own-card,.status-remote-detail,.status-story-card{background:rgba(255,255,255,.88)}
.status-own-image,.status-remote-image,.status-story-card img,.status-story-gallery img{border-radius:18px}
.status-fold>summary{color:#244D78}
.status-own-stories-fold>summary{background:#F4F8FF}

.irc-context-menu{
  min-width:220px;
  padding:8px;
  background:rgba(255,255,255,.92);
  border-color:rgba(75,112,164,.18);
  border-radius:20px;
  box-shadow:0 22px 60px rgba(31,61,99,.24);
  backdrop-filter:blur(20px) saturate(1.25);
  color:#183B60;
}
.irc-context-item{border-radius:13px;padding:9px 10px}
.irc-context-item:hover,.irc-context-item:focus-visible{background:#E7F1FF}
.irc-context-heading{color:#7189A4}
.irc-context-separator{background:rgba(79,115,163,.13)}

/* Calls keep the dark stage but use the same chAPP_over blue and rounded chrome. */
.web-call-shell{border-radius:24px!important;border-color:rgba(96,165,250,.22)!important;box-shadow:0 30px 90px rgba(4,14,28,.55)!important}
.web-call-head{background:linear-gradient(135deg,rgba(11,30,51,.98),rgba(17,49,82,.98))!important}
.web-call-control.active{background:rgba(59,130,246,.28)!important;border-color:rgba(96,165,250,.48)!important}
.web-call-pin-btn:hover,.web-call-pin-btn.active{background:rgba(59,130,246,.78)!important}
.web-call-participant-row.selected{background:rgba(59,130,246,.18)!important;border-color:rgba(96,165,250,.44)!important;box-shadow:inset 3px 0 0 #60A5FA!important}

/* Pairing/device onboarding shares the same visual family. */
.pair-shell{padding-top:34px}
.pair-card{background:rgba(255,255,255,.86);backdrop-filter:blur(18px)}
.qr-wrap{border-radius:22px;border-color:rgba(59,130,246,.15);box-shadow:inset 0 0 0 1px rgba(255,255,255,.6)}
.field input{border-radius:16px;border-color:rgba(79,115,163,.20);background:rgba(248,251,255,.95)}
.status{background:#E8F2FF;color:#275D9B}

/* System dark mode mirrors Mobile's system theme while keeping chAPP_over blue. */
@media (prefers-color-scheme:dark){
  :root{
    color-scheme:dark;
    --co-surface:#0B1524;
    --co-surface-soft:#101D2E;
    --co-surface-tint:rgba(11,21,36,.80);
    --co-border:rgba(155,188,230,.14);
    --co-text:#E8F1FC;
    --co-muted:#92A7BF;
    --co-shadow:0 22px 64px rgba(0,0,0,.38);
    --co-shadow-soft:0 9px 28px rgba(0,0,0,.25);
    --panel:#0B1524;
    --soft:#101D2E;
    --bubble:rgba(18,33,53,.92);
    --bubble-out:rgba(36,92,168,.56);
  }
  html,body{color:#E8F1FC;background:radial-gradient(circle at 12% 5%,rgba(59,130,246,.15),transparent 27%),linear-gradient(145deg,#07111D,#0A1626 55%,#0C192A)}
  .topbar{background:rgba(9,20,34,.80);border-bottom-color:rgba(143,176,219,.12)}
  .top-copy strong,.room-heading h1,.irc-header-copy h1,.status-header-copy h1{color:#EAF3FF}
  .app-shell{background:rgba(10,21,36,.76);border-color:rgba(143,176,219,.12)}
  .sidebar{background:linear-gradient(180deg,rgba(13,27,45,.96),rgba(9,21,36,.94));border-right-color:rgba(143,176,219,.11)}
  .identity-card,.room-header,.irc-header,.status-header,.irc-chat-head,.composer,.irc-composer{background:rgba(12,25,42,.82)}
  .main-tabs{background:rgba(26,54,89,.54);border-color:rgba(96,165,250,.13)}
  .main-tab{color:#9CB2CB}.main-tab.active{background:rgba(25,46,72,.96);color:#A9CEFF;border-color:rgba(96,165,250,.22)}
  .room-btn,.irc-server-btn,.irc-server-row,.status-contact-btn{color:#DCE9F7}
  .room-btn:hover,.irc-server-btn:hover,.irc-server-row:hover,.status-contact-btn:hover{background:rgba(31,66,108,.46)}
  .room-btn.active,.irc-server-btn.active,.irc-server-row.active,.status-contact-btn.active{background:linear-gradient(135deg,rgba(30,72,125,.72),rgba(20,46,78,.82))}
  .room-btn .ri,.irc-server-icon,.identity-icon,.room-avatar,.avatar-surface,.message-avatar,.peer-avatar,.status-side-avatar,.status-detail-avatar,.status-comment-avatar,.irc-header-icon,.status-header-icon{background:linear-gradient(145deg,#17375D,#1A4678);color:#A9CEFF}
  .messages,.irc-messages{background-color:#0D1B2C;background-image:radial-gradient(circle at 28px 32px,rgba(96,165,250,.07) 0 26px,transparent 27px),radial-gradient(circle at 56px 48px,transparent 0 13px,rgba(96,165,250,.10) 14px 15px,transparent 16px),linear-gradient(35deg,transparent 46%,rgba(96,165,250,.05) 47% 48%,transparent 49%),radial-gradient(circle at 100px 18px,rgba(125,183,255,.14) 0 2px,transparent 3px)}
  .chat-column,.irc-chat-column,.irc-grid{background:#0D1B2C}
  .msg{background:rgba(18,34,54,.94);border-color:rgba(151,183,224,.12);color:#E7F0FA}.msg.out{background:linear-gradient(145deg,rgba(38,93,166,.75),rgba(31,75,132,.78));border-color:rgba(96,165,250,.24)}
  .msg-text{color:#EDF5FE}.msg-head{color:#9BB0C7}.msg-name{color:#8EC0FF}.msg-reply{background:rgba(10,22,37,.38)}
  .reply-bar{background:rgba(22,53,88,.90)}
  .composer textarea,.irc-composer textarea,.status-message-editor textarea,.status-comment-composer input,.field input{background:rgba(15,29,47,.96);color:#EAF3FD;border-color:rgba(145,177,218,.16)}
  .secondary,.ghost,.icon-btn,.side-mini-btn,.irc-inline-power{background:rgba(18,35,57,.90);color:#B6D5FB;border-color:rgba(145,177,218,.16)}
  .peers-column,.irc-targets-column,.irc-users-column{background:rgba(12,25,42,.92)}
  .peer-item,.loc-item,.irc-file-row,.status-own-card,.status-remote-detail,.status-story-card,.status-fold,.card{background:rgba(15,30,49,.92);border-color:rgba(145,177,218,.12);color:#E5EFFA}
  .irc-target-btn,.irc-user-btn{color:#C9D9EA}.irc-target-btn:hover,.irc-user-btn:hover{background:#173451}.irc-target-btn.active{background:#1D4776;color:#CDE4FF}
  .irc-line{color:#C7D7E8}.irc-line-nick{color:#83B9FF}.irc-ws-note{background:rgba(12,25,42,.9);color:#92A7BF}
  .irc-dialog{background:rgba(12,25,42,.97);color:#E7F0FA;border-color:rgba(145,177,218,.14)}.irc-dialog-head{background:rgba(16,32,52,.90)}
  .status-grid{background:radial-gradient(circle at 14% 12%,rgba(59,130,246,.12),transparent 30%),linear-gradient(145deg,#0C192A,#0D1B2C)}
  .status-fold>summary{color:#B9D8FF}.status-own-stories-fold>summary{background:#10243C}
  .irc-context-menu{background:rgba(13,28,47,.95);color:#DBE9F7;border-color:rgba(145,177,218,.16);box-shadow:0 24px 70px rgba(0,0,0,.46)}
  .irc-context-item{color:#D6E6F7}.irc-context-item:hover,.irc-context-item:focus-visible{background:#17395E}.irc-context-separator{background:rgba(145,177,218,.12)}
  .pair-card,.qr-wrap{background:rgba(15,30,49,.90);border-color:rgba(145,177,218,.13)}
}

@media(max-width:680px){
  .app-shell{margin:4px;border-radius:18px}
  .main-tabs{margin:6px 7px 2px;border-radius:15px}
  .msg{max-width:90%;border-radius:19px 19px 19px 7px}.msg.out{border-radius:19px 19px 7px 19px}
}


/* W2.75 build 187 · IRC reply/quote preview + visible WHOIS */
.irc-reply-bar{display:flex;align-items:center;gap:10px;padding:8px 11px;border-top:1px solid rgba(59,130,246,.16);background:linear-gradient(90deg,rgba(59,130,246,.10),rgba(255,255,255,.88));flex:0 0 auto}
.irc-reply-copy{min-width:0;display:grid;grid-template-columns:auto auto minmax(0,1fr);align-items:center;gap:6px;flex:1;color:var(--text)}
.irc-reply-copy small{font-size:.66rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:#3B82F6}.irc-reply-copy strong{font-size:.76rem;white-space:nowrap}.irc-reply-copy span{font-size:.74rem;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.irc-reply-cancel{width:28px;height:28px;border:0;border-radius:999px;background:rgba(59,130,246,.10);color:#38658b;font-size:1.05rem;cursor:pointer}.irc-reply-cancel:hover{background:rgba(59,130,246,.18)}
.irc-whois-dialog{width:min(560px,calc(100vw - 28px))}.irc-whois-shell{display:flex;flex-direction:column;max-height:min(76vh,640px)}
.irc-whois-body{padding:14px 16px;overflow:auto;display:flex;flex-direction:column;gap:7px;min-height:110px}.irc-whois-line{padding:8px 10px;border:1px solid rgba(59,130,246,.13);border-radius:10px;background:rgba(59,130,246,.055);font-size:.78rem;line-height:1.4}.irc-whois-loading{color:var(--muted);font-size:.78rem;padding:10px 2px}.irc-whois-finished{font-size:.69rem;color:var(--muted);padding-top:4px}
@media(max-width:640px){.irc-reply-copy{grid-template-columns:auto minmax(0,1fr)}.irc-reply-copy span{grid-column:1/-1}.irc-reply-bar{position:sticky;bottom:58px;z-index:4}}
@media(prefers-color-scheme:dark){.irc-reply-bar{background:linear-gradient(90deg,rgba(59,130,246,.18),rgba(12,25,42,.90));border-color:rgba(145,177,218,.14)}.irc-reply-cancel{color:#cfe3f7}.irc-whois-line{background:rgba(59,130,246,.12);border-color:rgba(145,177,218,.14)}}


/* W2.79 build 191 · canonical chAPP₂P → over branding.
   One optical header height across desktop/mobile; no breakpoint-specific logo scaling. */
.top-logo{
  height:44px!important;
  width:auto!important;
  max-height:44px!important;
  max-width:none!important;
  object-fit:contain;
  object-position:left center;
  flex:0 0 auto;
}
@media (max-width:640px){
  .top-logo{height:44px!important;max-height:44px!important;max-width:none!important}
}

/* W2.79 build 191 · WHOIS card, emoji picker, IRC reading-mode scroll lock */
.irc-whois-body{gap:8px}
.irc-whois-field{display:grid;grid-template-columns:118px minmax(0,1fr);gap:10px;align-items:start;padding:9px 10px;border:1px solid rgba(59,130,246,.12);border-radius:12px;background:rgba(59,130,246,.045)}
.irc-whois-key{font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.035em;color:#6480a0;padding-top:1px}
.irc-whois-value{min-width:0;font-size:.8rem;line-height:1.4;color:var(--text);overflow-wrap:anywhere}
.irc-whois-channels{display:flex;flex-wrap:wrap;gap:5px}
.irc-whois-chip{display:inline-flex;align-items:center;min-height:22px;padding:2px 7px;border-radius:999px;background:rgba(59,130,246,.10);border:1px solid rgba(59,130,246,.13);font-size:.72rem;color:#315f93}
.irc-whois-extra-title{margin-top:5px;font-size:.66rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:#72879e}
.irc-whois-status{font-size:.72rem;color:var(--muted)}

.emoji-picker{position:fixed;z-index:10040;width:min(350px,calc(100vw - 16px));max-height:min(380px,70vh);display:flex;flex-direction:column;background:rgba(255,255,255,.97);border:1px solid rgba(79,115,163,.18);border-radius:18px;box-shadow:0 22px 64px rgba(31,61,99,.28);backdrop-filter:blur(18px) saturate(1.2);overflow:hidden}
.emoji-picker.hidden{display:none!important}
.emoji-picker-head{display:flex;align-items:center;justify-content:space-between;padding:9px 11px;border-bottom:1px solid rgba(79,115,163,.12);font-size:.78rem;color:#244d78}
.emoji-picker-head button{width:30px;height:30px;border:0;border-radius:999px;background:rgba(59,130,246,.08);color:#315f93;font-size:1.1rem;cursor:pointer}
.emoji-picker-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:3px;padding:8px;overflow:auto}
.emoji-choice{aspect-ratio:1/1;border:0;border-radius:10px;background:transparent;font-size:1.35rem;line-height:1;cursor:pointer;display:grid;place-items:center}
.emoji-choice:hover,.emoji-choice:focus-visible{background:rgba(59,130,246,.11);outline:none}
.emoji-trigger{flex:0 0 auto}

@media(max-width:640px){
  .irc-whois-field{grid-template-columns:96px minmax(0,1fr)}
  .emoji-picker-grid{grid-template-columns:repeat(7,minmax(0,1fr))}
}
@media(prefers-color-scheme:dark){
  .irc-whois-field{background:rgba(59,130,246,.10);border-color:rgba(145,177,218,.13)}
  .irc-whois-key,.irc-whois-extra-title{color:#93abc5}.irc-whois-chip{background:rgba(59,130,246,.18);border-color:rgba(145,177,218,.12);color:#b8d7ff}
  .emoji-picker{background:rgba(13,28,47,.97);border-color:rgba(145,177,218,.16);box-shadow:0 24px 70px rgba(0,0,0,.48)}
  .emoji-picker-head{color:#dbe9f7;border-color:rgba(145,177,218,.12)}
  .emoji-picker-head button{background:rgba(59,130,246,.16);color:#cfe3f7}
  .emoji-choice:hover,.emoji-choice:focus-visible{background:rgba(59,130,246,.18)}
}

/* W2.88 build 200 */
.msg.deleted .msg-text{font-style:italic;opacity:.72}
.msg-actions .danger-link{color:#9d2b2b}

/* W2.89 build 201 · large attachment download controls / progress */
.file-actions{display:flex;align-items:center;gap:6px;justify-content:flex-end;flex-wrap:wrap}
.file-action-secondary{background:transparent;color:var(--navy);border:1px solid rgba(19,61,102,.28)}
.file-action-secondary:hover{background:rgba(19,61,102,.07)}
.file-progress-wrap{grid-column:2/-1;display:grid;grid-template-columns:minmax(120px,1fr) auto;gap:8px;align-items:center;min-width:0;margin-top:1px}
.file-progress-bar{width:100%;height:9px;accent-color:var(--blue)}

.file-progress-text{min-width:38px;text-align:right;font-size:.7rem;font-weight:750;color:#4d6883;font-variant-numeric:tabular-nums}
@media(max-width:640px){.file-card{grid-template-columns:32px minmax(0,1fr)}.file-actions{grid-column:2;justify-content:flex-start}.file-progress-wrap{grid-column:1/-1}}

/* W3.25 build 237: stable multi-peer tracks; precise progress is in labels. */
.attachment-peer-track{position:relative;display:flex;overflow:hidden;align-items:stretch;width:100%;height:10px;min-width:0;background:#e0e9f1;border-radius:6px;grid-column:1;grid-row:1}
.attachment-peer-track[hidden],.file-progress-bar[hidden]{display:none}
.attachment-peer-track .attachment-peer-lane{position:absolute;left:0;height:100%;top:0;background:var(--blue);transition:width .2s linear}
.attachment-peer-track .attachment-source-segment{height:100%;flex:none;transition:width .2s linear}
.attachment-peer-track .attachment-source-unknown{background:#95aabb}
.file-progress-wrap .file-progress-bar{grid-column:1;grid-row:1}
.file-progress-wrap .file-progress-text{grid-column:2;grid-row:1}
.attachment-peer-legend{grid-column:1/-1;display:flex;align-items:center;gap:4px 12px;flex-wrap:wrap;font-size:.68rem;color:#47657e;line-height:1.25}
.attachment-peer-legend:empty{display:none}
.attachment-peer-chip{display:inline-flex;align-items:center;gap:4px;white-space:normal;overflow-wrap:anywhere}
.attachment-peer-color{display:inline-block;flex:none;width:7px;height:7px;border-radius:2px}
.attachment-upload-status,.attachment-source-status{grid-template-columns:minmax(0,1fr);row-gap:5px}
.attachment-upload-status .file-progress-text,.attachment-source-status .file-progress-text{grid-column:1;grid-row:2;text-align:left;min-width:0}
.attachment-upload-status .attachment-peer-legend,.attachment-source-status .attachment-peer-legend{grid-row:3}

/* W2.93 build 205 · deterministic attachment pause/resume queue + save-state UI + W2.92 storage safety */

/* W2.94 attachment post-download state */
.file-downloaded-status{display:inline-flex;align-items:center;max-width:260px;padding:6px 9px;border-radius:9px;background:rgba(19,61,102,.08);color:var(--navy);font-size:.72rem;font-weight:700;line-height:1.2;text-align:left}

/* W3.14: local source-relink failure remains visible on the file tile. */
.source-relink-error { color:#b83535; background:#fff0f0; border:1px solid #e7aaaa; border-radius:6px; padding:6px 8px; font-size:0.82em; margin-top:5px; overflow-wrap:anywhere; }

/* W3.41: IRC identity/title and action toolbar occupy independent rows.
   Keep the entire header in normal flow; no command may cover the channel. */
.irc-header{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;gap:9px;flex-shrink:0;height:auto;max-width:100%}
.irc-header-main{display:flex;min-width:0;align-items:center;gap:12px}
.irc-header-copy{min-width:0;flex:1}
.irc-header-actions{min-width:0;max-width:100%;width:100%;margin:0;padding:0;display:flex;flex-wrap:wrap;justify-content:flex-start;gap:6px}
.irc-chat-head{flex:0 0 auto}
@media(max-width:640px){.irc-header{align-items:stretch}.irc-header-actions{padding:0;margin:0}}
/* W3.52: peer on Room signalling without a direct channel (never green). */
.peer-item.is-signal-only .peer-online-dot{display:block;background:#E3A21A;box-shadow:0 0 0 1px rgba(170,112,8,.25)}
.peer-item.is-p2p-blocked .peer-online-dot{background:#D9534F;box-shadow:0 0 0 1px rgba(160,40,36,.25)}
.peer-item.is-p2p-blocked [data-role="peer-status"]{color:#B23B37}
.peer-item.is-signal-only:not(.is-p2p-blocked) [data-role="peer-status"]{color:#9A6B0E}
@media(prefers-color-scheme:dark){
  .peer-item.is-p2p-blocked [data-role="peer-status"]{color:#FF9B96}
  .peer-item.is-signal-only:not(.is-p2p-blocked) [data-role="peer-status"]{color:#F5C766}
}

/* W3.57 build 272: command selector shared in purpose with Mobile (explicit send). */
/* Build 278: command picker on ONE row — [command][/code][parameters][Invia][Chiudi]. */
.irc-command-panel{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:6px 8px;border:1px solid var(--line,#dce4ec);border-radius:10px;background:var(--panel,var(--surface,#fff));margin:6px 0;min-width:0;max-width:760px}
.irc-command-panel.hidden{display:none}
.irc-command-panel select{flex:0 1 auto;width:auto;max-width:240px;min-width:9.5rem;border-radius:7px;padding:5px 6px;border:1px solid var(--line,#abb9c5);color:inherit;background:var(--panel,var(--surface,#fff));font-size:.85rem}
.irc-command-panel input{flex:1 1 160px;min-width:0;border-radius:7px;padding:5px 8px;border:1px solid var(--line,#abb9c5);color:inherit;background:var(--panel,var(--surface,#fff));font-size:.85rem}
.irc-command-panel button{flex:0 0 auto;padding:5px 10px}
.irc-command-code{flex:0 0 auto;padding:5px 7px;border-radius:7px;background:var(--soft,rgba(127,127,127,.12));font-size:.82rem;font-weight:700;white-space:nowrap}
@media(max-width:560px){.irc-command-panel select{flex:1 1 0;max-width:none}}

/* Build 279: ONE scrollbar per dialog. The <dialog> itself never scrolls (UA
   default is overflow:auto and its 1px border made the inner form 2px too tall,
   so both scrolled); its content shrinks to fit and only the inner area scrolls. */
.irc-dialog{overflow:hidden}
.irc-dialog[open]{display:flex;flex-direction:column}
.irc-dialog[open]>form,.irc-dialog[open]>.irc-whois-shell{flex:1 1 auto;min-height:0;max-height:100%}
.irc-dialog .irc-form-grid,.irc-dialog .forward-room-list,.irc-dialog .irc-whois-body{flex:1 1 auto;min-height:0}
.irc-dialog .irc-dialog-head,.irc-dialog form>.irc-dialog-actions{flex:0 0 auto}
/* "Visibilità IRC": the action bar stays visible while the fields scroll. */
.irc-privacy-form .irc-dialog-actions{position:sticky;bottom:-18px;z-index:1;background:#f7faff}
@media (prefers-color-scheme:dark){.irc-privacy-form .irc-dialog-actions{background:#102034}}

/* Build 280: "Azioni" drop-down menu (contains "Stato IRCv3"). */
.irc-actions-wrap{position:relative;display:inline-flex}
.irc-actions-menu{position:fixed;top:0;left:0;z-index:1000;min-width:220px;display:flex;flex-direction:column;padding:4px;border:1px solid var(--line,#dce4ec);border-radius:10px;background:var(--panel,#fff);box-shadow:0 12px 32px rgba(18,43,68,.18)}
.irc-actions-menu.hidden{display:none}
.irc-actions-menu button{all:unset;cursor:pointer;padding:8px 10px;border-radius:7px;font-size:.85rem;white-space:nowrap;color:inherit}
.irc-actions-menu button:hover,.irc-actions-menu button:focus-visible{background:var(--soft,rgba(127,127,127,.12))}
@media (prefers-color-scheme:dark){.irc-actions-menu{background:#102034;border-color:rgba(145,177,218,.18)}}

/* Build 281: channel list in dark mode. The page text turns light, but the
   panel and its rows kept light backgrounds: the channel name (which inherits
   the text colour) became white on white and the column looked missing. */
@media (prefers-color-scheme:dark){
  .irc-channel-list-panel{background:#0E1B2C;box-shadow:0 7px 18px rgba(0,0,0,.35)}
  .irc-channel-list-row{background:transparent!important;border-bottom-color:rgba(145,177,218,.14)!important}
  .irc-channel-list-row:hover,.irc-channel-list-row:focus{background:#173451!important}
  .irc-channel-compact-name{color:#E8F1FC}
  .irc-channel-compact-users,.irc-channel-compact-topic{color:#9FB4CA}
  .irc-channel-list-toolbar select{background:#13253A;color:#D6E6F7;border-color:rgba(145,177,218,.22)}
}
/* Light mode: the name colour is explicit, never inherited from the page. */
@media (prefers-color-scheme:light){.irc-channel-compact-name{color:#10233B}}

/* build 282: interface language picker */
.top-lang{margin-left:auto;display:flex;align-items:center;gap:6px;font-size:.86rem;color:var(--muted);flex:0 0 auto}
.top-lang select{font:inherit;border:1px solid #c8d5e4;border-radius:10px;background:#f8fbff;color:#163958;padding:5px 8px;max-width:220px}
@media(max-width:680px){.top-lang select{max-width:112px}}
/* build 282: Arabic text runs right-to-left inside each block while the layout stays as designed. */
html[lang="ar"] body :is(h1,h2,h3,p,li,label,span,small,strong,button,td,th,div,option,textarea,input){unicode-bidi:plaintext}
html[lang="ar"] body :is(ol,ul){direction:rtl}

/* W3.57 build 284: delivery/read receipts and inline media previews */
.msg-head .msg-receipt{margin-left:auto;font-weight:800;letter-spacing:-.18em;padding-right:.18em;color:#8a9bad;font-size:.74rem;line-height:1}
.msg-head .msg-receipt.delivered{color:#6f8193}
.msg-head .msg-receipt.read{color:#2b8ae6}
.msg-media-preview{position:relative;display:block;margin:6px 0 2px;padding:0;border:0;border-radius:12px;overflow:hidden;background:#dfe7f0;cursor:pointer;width:min(280px,100%);aspect-ratio:280/205;overflow-anchor:none}
.msg-media-preview.video{aspect-ratio:280/178}
/* Build 285: fixed box, independent of decoding: the chat height never changes when the image arrives */
.msg-media-preview img{display:block;width:100%;height:100%;object-fit:cover}
.msg-media-play{position:absolute;left:50%;top:50%;width:52px;height:52px;margin:-26px 0 0 -26px;border-radius:50%;background:rgba(0,0,0,.58);color:#fff;display:grid;place-items:center;font-size:1.3rem;padding-left:4px;box-sizing:border-box;pointer-events:none}
.msg-media-preview:focus-visible{outline:3px solid rgba(36,105,183,.45);outline-offset:2px}

/* Build 286: full-screen media viewer */
.media-viewer{position:fixed;inset:0;z-index:1000;background:rgba(6,12,20,.94);display:flex;flex-direction:column;color:#fff}
.media-viewer-bar{display:flex;align-items:center;gap:10px;padding:10px 14px;background:rgba(0,0,0,.35)}
.media-viewer-info{min-width:0;flex:1;display:flex;flex-direction:column}
.media-viewer-info strong{font-size:.92rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.media-viewer-info span{font-size:.74rem;color:#b7c6d6}
.media-viewer-btn{appearance:none;border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.08);color:#fff;border-radius:10px;padding:7px 12px;font-weight:700;font-size:.8rem;cursor:pointer}
.media-viewer-btn:hover{background:rgba(255,255,255,.16)}
.media-viewer-close{width:38px;padding:7px 0;font-size:1rem}
.media-viewer-stage{flex:1;min-height:0;overflow:hidden;display:flex;align-items:center;justify-content:center;padding:12px}
.media-viewer-stage.actual{overflow:auto;display:block;padding:0;cursor:grab}
.media-viewer-stage.actual:active{cursor:grabbing}
.media-viewer-media{display:block;max-width:100%;max-height:100%;object-fit:contain;user-select:none;-webkit-user-drag:none}
.media-viewer-stage:not(.actual) img.media-viewer-media{cursor:zoom-in}
.media-viewer-stage.actual .media-viewer-media{max-width:none;max-height:none;margin:auto;cursor:inherit}
.media-viewer-media.preview{width:min(92vw,960px);height:auto;max-height:100%;filter:blur(1.5px);opacity:.9}
.media-viewer-status{min-height:1.6em;padding:6px 14px 12px;text-align:center;font-size:.82rem;color:#d7e3ef}

/* Build 287: icon-only message actions with an immediate hover tooltip */
.msg-actions{gap:4px}
.msg-actions .msg-action-icon{position:relative;width:28px;height:24px;padding:0;border-radius:7px;font-size:.95rem;line-height:24px;text-align:center;font-weight:700;color:#4675AA}
.msg-actions .msg-action-icon:hover,.msg-actions .msg-action-icon:focus-visible{background:rgba(70,117,170,.12)}
.msg-actions .msg-action-icon.danger-link{color:#9d2b2b}
.msg-actions .msg-action-icon.danger-link:hover{background:rgba(157,43,43,.1)}
.msg-actions .msg-action-icon[data-tip]:hover::after,.msg-actions .msg-action-icon[data-tip]:focus-visible::after{content:attr(data-tip);position:absolute;bottom:calc(100% + 6px);right:0;z-index:30;white-space:nowrap;max-width:260px;overflow:hidden;text-overflow:ellipsis;padding:5px 8px;border-radius:7px;background:#1b2b3d;color:#fff;font-size:.72rem;font-weight:600;line-height:1.25;box-shadow:0 4px 14px rgba(0,0,0,.18);pointer-events:none}
@media(hover:none){.msg-actions .msg-action-icon{width:34px;height:30px;line-height:30px}}

/* Build 288: modal sheets (Info messaggio, Commento, Gestione gruppo) */
.room-manage-btn{font-size:1.05rem;min-width:38px}
dialog.web-sheet{border:0;padding:0;border-radius:16px;width:min(440px,calc(100vw - 32px));max-height:min(80vh,720px);box-shadow:0 18px 50px rgba(15,35,60,.28);color:#10243b;background:#fff}
dialog.web-sheet.wide{width:min(560px,calc(100vw - 32px))}
dialog.web-sheet::backdrop{background:rgba(10,22,37,.45)}
.web-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 16px 8px;position:sticky;top:0;background:inherit;z-index:1}
.web-sheet-head h2{margin:0;font-size:1.05rem}
.web-sheet-close{border:0;background:transparent;font-size:1.05rem;cursor:pointer;color:#5b6f84;width:32px;height:32px;border-radius:8px}
.web-sheet-close:hover{background:#eef3f8}
.web-sheet-body{padding:0 16px 16px;overflow:auto;max-height:calc(min(80vh,720px) - 56px)}
.web-sheet-sub,.web-sheet-note{margin:0 0 12px;color:#62768a;font-size:.8rem;line-height:1.4}
.web-sheet-note{background:#f3f7fb;border:1px solid #e1e9f2;border-radius:10px;padding:8px 10px}
.web-sheet-section{margin:10px 0 14px}
.web-sheet-section h3{margin:0 0 6px;font-size:.78rem;text-transform:uppercase;letter-spacing:.04em;color:#6a7c8d}
.web-sheet-empty{font-size:.8rem;color:#8193a5;padding:4px 0}
.web-sheet-row{display:flex;align-items:center;gap:10px;padding:6px 0;border-bottom:1px solid #eef2f6}
.web-sheet-row:last-child{border-bottom:0}
.web-sheet-icon{width:30px;height:30px;border-radius:50%;background:#eaf0f7;display:grid;place-items:center;flex:0 0 auto}
.web-sheet-copy{min-width:0;flex:1;display:flex;flex-direction:column}
.web-sheet-copy strong{font-size:.84rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.web-sheet-copy span{font-size:.72rem;color:#6f8193}
.web-sheet-badge{color:#1fa66a;font-size:.8rem}
.web-sheet-room{display:flex;align-items:center;gap:12px;margin:2px 0 10px}
.web-sheet-room-avatar{width:48px;height:48px;border-radius:14px;overflow:hidden;display:grid;place-items:center;background:#eaf0f7;font-size:1.5rem;flex:0 0 auto}
.web-sheet-room-avatar img{width:100%;height:100%;object-fit:cover}
.web-sheet-room strong{display:block;font-size:1rem}
.web-sheet-room>div>span{font-size:.74rem;color:#6f8193}
.web-sheet-details{margin-top:6px;border:1px solid #e1e9f2;border-radius:10px;padding:8px 10px}
.web-sheet-details summary{cursor:pointer;font-weight:700;font-size:.84rem}
.web-sheet-kv{display:grid;grid-template-columns:110px 1fr;gap:8px;padding:6px 0;font-size:.78rem;border-top:1px solid #eef2f6}
.web-sheet-kv span{overflow-wrap:anywhere;color:#40566c}
.web-sheet-field{display:grid;gap:6px;font-size:.82rem;font-weight:650}
.web-sheet-field textarea{resize:vertical;border:1px solid #cad6e2;border-radius:10px;padding:8px 10px;font:inherit;font-weight:400}
.web-sheet-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
.web-sheet-room .web-sheet-room-avatar{font-size:1.9rem;line-height:1}
.web-sheet-actions button{margin:0;min-height:38px;padding:8px 16px;font-size:.88rem;border-radius:12px}
.web-sheet-field textarea:focus{outline:2px solid #2469b7;outline-offset:0;border-color:transparent}
@media (prefers-color-scheme:dark){
  dialog.web-sheet{background:#0E1B2C;color:#E7F0FA;box-shadow:0 22px 70px rgba(0,0,0,.55)}
  dialog.web-sheet::backdrop{background:rgba(2,8,16,.62)}
  .web-sheet-close{color:#9FB4CA}.web-sheet-close:hover{background:#173451}
  .web-sheet-sub,.web-sheet-copy span,.web-sheet-room>div>span,.web-sheet-empty{color:#9FB4CA}
  .web-sheet-note{background:#13253A;border-color:rgba(145,177,218,.18);color:#BBD0E6}
  .web-sheet-section h3{color:#8EA6BF}
  .web-sheet-row,.web-sheet-kv{border-color:rgba(145,177,218,.14)}
  .web-sheet-icon,.web-sheet-room-avatar{background:#173451}
  .web-sheet-details{border-color:rgba(145,177,218,.18)}
  .web-sheet-kv span{color:#BBD0E6}
  .web-sheet-field textarea{background:#13253A;color:#E7F0FA;border-color:rgba(145,177,218,.22)}
  .web-sheet-badge{color:#34d399}
}
