/* INTRA 0.42.0 — internal chat */
.chat-shell{display:grid;grid-template-columns:minmax(250px,330px) minmax(0,1fr);min-height:calc(100vh - 150px);max-height:calc(100vh - 118px);gap:0;background:#fff;border:1px solid var(--border,#dde5eb);border-radius:18px;overflow:hidden;box-shadow:0 12px 34px rgba(20,35,55,.06)}
.chat-list-panel{min-width:0;border-right:1px solid var(--border,#dde5eb);display:flex;flex-direction:column;background:#f8fafc;overflow:auto}.chat-list-head{display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:1px solid #e6ecf1;position:sticky;top:0;background:#f8fafc;z-index:2}.chat-list-head>div{display:flex;flex-direction:column;min-width:0}.chat-list-head strong{font-size:17px}.chat-list-head small{color:#718096;margin-top:2px}.chat-search-button{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;text-decoration:none;background:white;border:1px solid #dce5eb;font-size:22px;color:#1d4d78}.chat-create,.chat-personal-settings{margin:10px 12px}.chat-create>summary,.chat-personal-settings>summary{cursor:pointer;font-weight:700;color:#24445e}.chat-create-box,.chat-personal-settings form,.chat-popover{margin-top:8px;background:#fff;border:1px solid #dde6ed;border-radius:14px;padding:12px;box-shadow:0 10px 30px rgba(22,42,61,.08)}.chat-create-box form,.chat-personal-settings form,.chat-popover form{display:grid;gap:8px}.chat-create-box form+form,.chat-popover form+form{border-top:1px solid #edf1f4;margin-top:12px;padding-top:12px}.chat-member-checks{display:grid;gap:5px;max-height:170px;overflow:auto;padding:4px}.chat-member-checks label{font-size:13px}.chat-time-pair{display:grid;grid-template-columns:1fr 1fr;gap:6px}.chat-time-pair input{width:100%}
.chat-thread-list{display:flex;flex-direction:column;padding:2px 8px 14px}.chat-thread-link{display:flex;align-items:center;gap:10px;padding:10px;border-radius:13px;color:inherit;text-decoration:none;min-width:0}.chat-thread-link:hover{background:#eef4f8}.chat-thread-link.is-active{background:#e6f2fb;color:#123b5d}.chat-thread-icon{width:34px;height:34px;flex:0 0 34px;border-radius:12px;display:grid;place-items:center;background:white;border:1px solid #dce7ee;font-weight:800}.chat-thread-copy{display:flex;flex-direction:column;min-width:0;flex:1}.chat-thread-copy strong,.chat-thread-copy small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-thread-copy small{color:#7b8995;font-size:11px}.chat-thread-unread,.chat-thread-mention{min-width:22px;height:22px;padding:0 6px;border-radius:999px;display:grid;place-items:center;background:#166bb4;color:#fff;font-size:11px}.chat-thread-mention{background:#a13c86}
.chat-main-panel{min-width:0;display:flex;flex-direction:column;position:relative;background:#f4f7fa}.chat-room-head{min-height:66px;padding:10px 16px;display:flex;align-items:center;justify-content:space-between;gap:10px;background:#fff;border-bottom:1px solid #e1e8ed}.chat-room-head>div:first-child{display:flex;min-width:0;flex-direction:column}.chat-room-head strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-room-head small{color:#7a8996}.chat-room-actions{display:flex;gap:8px;align-items:center}.chat-room-actions details{position:relative}.chat-room-actions summary{list-style:none;cursor:pointer}.chat-popover{position:absolute;right:0;top:38px;width:min(330px,82vw);z-index:10}.chat-empty-state{margin:auto;text-align:center;color:#6d7c88}.chat-empty-state strong{font-size:24px;color:#263c4f}
.chat-pinned{margin:8px 12px 0;background:#fff8df;border:1px solid #f2dfa4;border-radius:12px;padding:8px 10px;z-index:1}.chat-pinned summary{font-weight:700;cursor:pointer}.chat-pinned a{display:block;color:#5b4b14;text-decoration:none;font-size:12px;padding:4px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-messages{flex:1;min-height:220px;overflow:auto;padding:16px;display:flex;flex-direction:column;gap:9px;scroll-behavior:smooth}.chat-message{align-self:flex-start;max-width:min(78%,760px);min-width:180px;background:#fff;border:1px solid #e2e8ee;border-radius:15px 15px 15px 4px;padding:10px 12px;box-shadow:0 3px 10px rgba(30,45,60,.035);overflow-wrap:anywhere}.chat-message.is-mine{align-self:flex-end;background:#e9f5ff;border-color:#cfe6f7;border-radius:15px 15px 4px 15px}.chat-message-meta{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:11px;color:#7b8994;margin-bottom:5px}.chat-message-meta strong{font-size:12px;color:#315168}.chat-message-body{font-size:14px;line-height:1.45;color:#1d2d3a}.chat-reply-quote{border-left:3px solid #5a91bd;background:rgba(255,255,255,.55);padding:5px 8px;margin:0 0 7px;border-radius:6px;display:flex;flex-direction:column;font-size:11px;max-width:100%}.chat-reply-quote span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-image{display:block;margin-top:8px}.chat-image img{display:block;max-width:min(440px,100%);max-height:330px;border-radius:10px;object-fit:contain}.chat-file{margin-top:8px;padding:9px;border-radius:9px;background:rgba(255,255,255,.7);display:flex;gap:8px;text-decoration:none;color:#214b6b;align-items:center}.chat-file span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-file small{margin-left:auto;color:#7b8994}.chat-voice{margin-top:8px;display:grid;gap:6px}.chat-voice audio{width:min(390px,100%)}.chat-transcript{font-size:12px;line-height:1.4;background:rgba(255,255,255,.75);padding:7px;border-radius:8px}.chat-message-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap;opacity:.35;margin-top:7px;transition:opacity .15s}.chat-message:hover .chat-message-actions,.chat-message:focus-within .chat-message-actions{opacity:1}.chat-message-actions button,.chat-reactions button{border:0;background:transparent;padding:2px 3px;font-size:11px;color:#5d7486;cursor:pointer}.chat-reaction-actions{display:flex;gap:1px;margin-left:auto}.chat-reaction-actions button{font-size:14px}.chat-reactions{display:flex;gap:4px;flex-wrap:wrap}.chat-reactions button{background:#f0f5f8;border-radius:999px;padding:2px 7px}.chat-message-status{text-align:right;color:#7d8b95;font-size:10px;margin-top:3px}
.chat-reply-banner{display:flex;align-items:center;justify-content:space-between;padding:7px 14px;background:#f1f6f9;border-top:1px solid #dde6ec;font-size:12px}.chat-reply-banner button{border:0;background:transparent;font-size:20px;cursor:pointer}.chat-compose{background:#fff;border-top:1px solid #dfe7ed;padding:10px 12px;position:relative}.chat-compose textarea{resize:none;min-height:48px;max-height:140px}.chat-compose-tools{display:flex;align-items:center;gap:7px;margin-top:7px;flex-wrap:wrap}.chat-attach{display:inline-flex;align-items:center;cursor:pointer;padding:6px 9px;border:1px solid #dce5eb;border-radius:9px;font-size:12px}.chat-attach input{display:none}.chat-draft-state{font-size:11px;color:#83909a;margin-left:auto}.chat-mention-menu{position:absolute;left:14px;bottom:68px;max-height:220px;overflow:auto;background:#fff;border:1px solid #dce5eb;box-shadow:0 12px 35px rgba(20,35,50,.16);border-radius:12px;padding:6px;z-index:10;min-width:210px}.chat-mention-menu button{display:block;width:100%;border:0;background:transparent;text-align:left;padding:7px;border-radius:7px;cursor:pointer}.chat-mention-menu button:hover{background:#edf4f8}.chat-voice-state{font-size:12px;margin-top:6px;color:#31536d}.chat-forward-dialog{border:0;border-radius:16px;padding:20px;width:min(420px,92vw);box-shadow:0 24px 80px rgba(15,25,35,.25)}.chat-forward-dialog::backdrop{background:rgba(10,20,30,.45)}.chat-dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}
.chat-entity-widget{margin-top:18px}.chat-entity-messages{display:grid;gap:7px;margin:8px 0 12px}.chat-entity-message{border-left:3px solid #8bb5d3;background:#f8fbfd;padding:7px 9px;border-radius:0 9px 9px 0}.chat-entity-message strong{font-size:12px}.chat-entity-message span{font-size:10px;color:#83919b;margin-left:7px}.chat-entity-message p{font-size:13px;margin:4px 0 0;white-space:pre-wrap}.chat-entity-compose{display:grid;gap:7px}.chat-entity-compose>div{display:flex;justify-content:space-between;gap:8px;align-items:center}.chat-search-line{display:flex;gap:8px}.chat-search-results{display:grid;gap:7px}.chat-search-results a{display:block;text-decoration:none;color:inherit;border:1px solid #e0e8ee;padding:10px;border-radius:10px}.chat-search-results a:hover{border-color:#9ebfd8;background:#f8fbfd}.chat-search-results a span{display:block;color:#7a8995;font-size:11px;margin-top:2px}.chat-search-results a p{margin:5px 0 0;font-size:13px}
@media(max-width:820px){.chat-shell{grid-template-columns:1fr;min-height:calc(100dvh - 158px);max-height:none;border-radius:12px}.chat-list-panel{border-right:0;border-bottom:1px solid #dde6ec;max-height:36dvh}.chat-thread-list{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(190px,75vw);overflow-x:auto;overscroll-behavior-x:contain}.chat-thread-link{background:#fff;border:1px solid #e3eaef}.chat-main-panel{min-height:56dvh}.chat-message{max-width:91%;min-width:0}.chat-room-head{position:sticky;top:0;z-index:5}.chat-room-actions .btn{font-size:11px;padding:7px}.chat-compose{position:sticky;bottom:0;padding-bottom:max(10px,env(safe-area-inset-bottom))}.chat-message-actions{opacity:1}.chat-reaction-actions{width:100%;margin-left:0}.chat-search-grid{grid-template-columns:1fr!important}.chat-search-line{flex-direction:column}.chat-entity-compose>div{align-items:stretch;flex-direction:column}.chat-list-head{position:static}}
@media(max-width:520px){.content:has(.chat-shell){padding-left:6px!important;padding-right:6px!important}.chat-shell{border-radius:9px}.chat-list-panel{max-height:31dvh}.chat-messages{padding:10px 8px}.chat-message{max-width:94%;font-size:13px}.chat-room-head{padding:8px}.chat-room-head small{font-size:10px}.chat-room-actions>a{display:none}.chat-compose-tools .btn-secondary{padding:6px 7px}.chat-draft-state{order:9;width:100%;text-align:right}.chat-personal-settings{display:none}}

/* INTRA 0.42.0 HOTFIX — composer always visible */
@media (min-width:821px){
  .chat-shell{
    height:calc(100dvh - 128px);
    min-height:0;
    max-height:none;
  }

  .chat-main-panel{
    height:100%;
    min-height:0;
    overflow:hidden;
  }

  .chat-room-head,
  .chat-pinned,
  .chat-reply-banner,
  .chat-compose{
    flex:0 0 auto;
  }

  .chat-messages{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
  }

  .chat-compose{
    position:relative;
    bottom:auto;
    z-index:4;
  }
}

@media (max-width:820px){
  .chat-shell{
    height:auto;
  }

  .chat-main-panel{
    min-height:0;
  }

  .chat-messages{
    min-height:220px;
  }

  .chat-compose{
    position:sticky;
    bottom:0;
    z-index:6;
  }
}


/* INTRA 0.42.0 HF2 — viewport/composer */
@media (min-width:821px){
  .chat-shell{
    min-height:480px!important;
    max-height:none!important;
  }

  .chat-main-panel{
    height:100%!important;
    min-height:0!important;
    overflow:hidden!important;
  }

  .chat-room-head,
  .chat-pinned,
  .chat-reply-banner,
  .chat-compose{
    flex:0 0 auto!important;
  }

  .chat-messages{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow-y:auto!important;
  }

  .chat-compose{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    position:relative!important;
    bottom:auto!important;
    z-index:8!important;
  }
}

@media (max-width:820px){
  .chat-shell{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
  }

  .chat-list-panel{
    max-height:30dvh!important;
  }

  .chat-main-panel{
    height:62dvh!important;
    min-height:420px!important;
    overflow:hidden!important;
  }

  .chat-messages{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow-y:auto!important;
  }

  .chat-compose{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    position:relative!important;
    bottom:auto!important;
    z-index:8!important;
  }
}

.chat-message-actions{
  opacity:1!important;
}

/* INTRA 0.42.0 R3 — stable chat viewport */
.chat-shell{height:calc(100dvh - 148px)!important;min-height:520px!important;max-height:none!important}
.chat-main-panel{display:grid!important;grid-template-rows:auto auto minmax(0,1fr) auto auto!important;height:100%!important;min-height:0!important;overflow:hidden!important;position:relative!important}
.chat-messages{min-height:0!important;overflow-y:auto!important;position:relative!important;z-index:1!important}
.chat-reply-banner[hidden],.chat-mention-menu[hidden],.chat-voice-state[hidden]{display:none!important}
.chat-compose{display:block!important;position:relative!important;left:auto!important;right:auto!important;bottom:auto!important;visibility:visible!important;opacity:1!important;z-index:20!important;background:#fff!important}
.chat-compose textarea{display:block!important;width:100%!important;min-height:52px!important}
.chat-message{position:relative!important;z-index:2!important}
.chat-message-actions,.chat-message-actions button,.chat-reactions,.chat-reactions button{position:relative!important;z-index:30!important;pointer-events:auto!important}
.chat-message-actions{opacity:1!important}
@media(max-width:820px){.chat-shell{height:auto!important;min-height:calc(100dvh - 122px)!important}.chat-main-panel{height:68dvh!important;min-height:460px!important}.chat-list-panel{max-height:28dvh!important}}

/* INTRA 0.42.1 — @INTRA AI */
.chat-message.is-ai{align-self:stretch;max-width:94%;background:linear-gradient(180deg,#f2f8ff,#edf5fb);border:1px solid #cfe2f1;box-shadow:0 8px 24px rgba(20,70,110,.07)}
.chat-message.is-ai .chat-message-meta strong{color:#155987}.chat-ai-badge{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:800;color:#155987;background:#dfeffc;border-radius:999px;padding:4px 8px}
.chat-ai-meta{margin-top:10px;padding-top:8px;border-top:1px solid #d7e6f0;display:flex;gap:8px;align-items:flex-start;flex-wrap:wrap}.chat-ai-meta details{font-size:11px}.chat-ai-meta summary{cursor:pointer;color:#31536d}
.chat-ai-sources{display:grid;gap:5px;margin-top:7px;min-width:min(560px,78vw)}.chat-ai-sources a,.chat-ai-sources>span{display:flex;justify-content:space-between;gap:10px;padding:7px 8px;border-radius:8px;background:#fff;border:1px solid #dce8f0;text-decoration:none;color:#263746}
.chat-ai-sources span small{display:block;color:#7a8792;margin-left:8px}.chat-ai-button{font-weight:800}.chat-compose-tools [data-chat-ai-web][aria-pressed="true"]{background:#e5f3ff;border-color:#8bbcdf;color:#155987}
@media(max-width:820px){.chat-message.is-ai{max-width:98%}.chat-ai-sources{min-width:0;width:100%}.chat-ai-sources a,.chat-ai-sources>span{flex-direction:column;gap:2px}}

/* INTRA 0.42.2 — confirmed action cards */
.chat-action-card{margin:10px 0 4px;padding:12px;border:1px solid #c7d9e7;border-radius:14px;background:#f8fbfe;display:grid;gap:10px}
.chat-action-head{display:flex;gap:10px;align-items:center;justify-content:space-between}.chat-action-head strong{color:#163a55}
.chat-action-status{font-size:12px;font-weight:800;padding:4px 8px;border-radius:999px;background:#e7eef4}.chat-action-status.is-done{background:#e6f5ea;color:#21643a}.chat-action-status.is-failed{background:#feecec;color:#9b2525}.chat-action-status.is-cancelled,.chat-action-status.is-expired{color:#66717a}
.chat-action-preview{display:grid;gap:6px}.chat-action-preview>div{display:grid;grid-template-columns:minmax(120px,180px) 1fr;gap:10px;border-top:1px solid #e4edf3;padding-top:6px}.chat-action-preview b{font-size:12px;color:#536675}.chat-action-preview span{white-space:normal;overflow-wrap:anywhere}
.chat-action-controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.chat-action-error{padding:8px 10px;border-radius:10px;background:#fff0f0;color:#8d2020}
.chat-command-menu{display:flex;flex-wrap:wrap;gap:6px;padding:9px;border:1px solid #dbe7ef;border-radius:12px;background:#fff}.chat-command-menu[hidden]{display:none!important}.chat-command-menu button{border:1px solid #d1e0ea;background:#f5f9fc;border-radius:9px;padding:6px 9px;cursor:pointer}.chat-command-menu button:hover{background:#eaf4fb}
@media(max-width:820px){.chat-action-preview>div{grid-template-columns:1fr;gap:2px}.chat-compose-tools{gap:5px}.chat-compose-tools .btn-small{padding:6px 8px}.chat-command-menu{max-height:150px;overflow:auto}}

/* INTRA 0.42.2 — final mobile viewport */
@media(max-width:820px){
  .chat-shell{min-height:0!important;max-height:none!important;grid-template-rows:minmax(112px,28%) minmax(0,72%)!important;overflow:hidden!important}
  .chat-list-panel{max-height:none!important;min-height:0!important;overflow:auto!important}
  .chat-main-panel{height:100%!important;min-height:0!important;overflow:hidden!important}
  .chat-messages{min-height:0!important;overflow-y:auto!important}
  .chat-compose{min-height:0!important;max-height:46dvh!important;overflow-y:auto!important}
}

/* INTRA 0.42.3 — Messenger UX */
.chat-shell{grid-template-columns:360px minmax(0,1fr)!important;height:calc(100dvh - 128px)!important;min-height:560px!important;border-radius:14px!important;background:#fff!important;box-shadow:0 12px 40px rgba(15,35,55,.08)!important}
.chat-list-panel{background:#fff!important;border-right:1px solid #e6edf3!important;overflow:hidden!important}
.chat-list-head{height:70px;padding:12px 14px!important;background:#fff!important;border-bottom:0!important;position:static!important}
.chat-list-head strong{font-size:20px!important;letter-spacing:-.02em}.chat-list-head small{font-size:11px!important;color:#8492a0!important}
.chat-list-head-actions{display:flex;align-items:center;gap:6px}.chat-icon-button{width:38px;height:38px;border:0;border-radius:50%;display:grid;place-items:center;background:transparent;color:#53677a;text-decoration:none;font-size:22px;cursor:pointer}
.chat-icon-button:hover{background:#eef4f8;color:#176ca4}.chat-new-menu{position:relative}.chat-new-menu>summary{list-style:none}.chat-new-menu>summary::-webkit-details-marker{display:none}
.chat-new-menu .chat-create-box{position:absolute;right:0;top:44px;width:min(340px,88vw);z-index:60;margin:0!important;box-shadow:0 18px 50px rgba(20,35,50,.18)!important}
.chat-folder-switch{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin:0 12px 10px;padding:4px;background:#f1f5f8;border-radius:10px}.chat-folder-switch a{display:flex;justify-content:center;align-items:center;gap:6px;padding:7px;border-radius:8px;color:#667785;text-decoration:none;font-size:12px;font-weight:750}.chat-folder-switch a.active{background:#fff;color:#176ca4;box-shadow:0 2px 8px rgba(15,35,55,.08)}.chat-folder-switch b{min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#dbe9f3;display:grid;place-items:center;font-size:10px}
.chat-system-list,.chat-thread-list{display:flex!important;flex-direction:column!important;padding:0 6px!important;overflow:visible!important}.chat-system-list{border-bottom:1px solid #eef2f5;padding-bottom:7px!important;margin-bottom:4px}.chat-list-section{padding:10px 16px 5px;color:#8794a0;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.chat-thread-link{min-height:64px;padding:8px 10px!important;border-radius:10px!important;gap:11px!important;border:0!important;background:transparent!important}.chat-thread-link:hover{background:#f3f7fa!important}.chat-thread-link.is-active{background:#e8f3fb!important;color:inherit!important}
.chat-thread-icon{width:46px!important;height:46px!important;flex:0 0 46px!important;border:0!important;border-radius:50%!important;background:linear-gradient(145deg,#267fb8,#15577f)!important;color:#fff!important;font-size:18px!important}.chat-thread-copy{gap:3px}.chat-thread-title{display:flex;align-items:center;gap:8px;min-width:0}.chat-thread-title strong{font-size:14px;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-thread-title time{font-size:10px;color:#8a98a4;font-weight:500}.chat-thread-copy small{font-size:12px!important;color:#7d8a95!important}.chat-thread-star{color:#f0a400;font-size:13px}.chat-thread-unread,.chat-thread-mention{flex:0 0 auto}.chat-empty-list{padding:28px 16px;text-align:center;color:#8997a2}
.chat-main-panel{background:#eef3f7!important;grid-template-rows:auto auto minmax(0,1fr) auto auto!important}
.chat-room-head{height:70px;padding:9px 14px!important;background:#fff!important;border-bottom:1px solid #e6edf3!important}.chat-room-identity{display:flex!important;align-items:center;gap:10px;min-width:0}.chat-room-identity>div{display:flex;flex-direction:column;min-width:0}.chat-room-avatar{width:42px;height:42px;flex:0 0 42px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#267fb8,#15577f);color:#fff;font-weight:800}.chat-room-identity strong{font-size:15px}.chat-room-identity small{font-size:11px;color:#82919d}.chat-mobile-back{display:none;color:#176ca4;font-size:34px;line-height:1;text-decoration:none;margin-right:2px}
.chat-room-menu{position:relative}.chat-room-menu>summary{list-style:none}.chat-room-menu>summary::-webkit-details-marker{display:none}.chat-popover{right:0!important;top:44px!important;width:min(320px,88vw)!important;padding:8px!important;border-radius:12px!important;box-shadow:0 18px 50px rgba(20,35,50,.18)!important}.chat-popover form{gap:6px!important}.chat-popover form+form{margin-top:4px!important;padding-top:4px!important}.chat-popover button{width:100%;text-align:left;border:0;background:transparent;padding:9px 10px;border-radius:8px;color:#334858;cursor:pointer}.chat-popover button:hover{background:#f2f6f9}.chat-popover button.danger{color:#b13b3b}.chat-popover label{font-size:11px;color:#7d8b96}.chat-members-inline>summary{cursor:pointer;padding:8px 10px;font-weight:700;color:#536575}
.chat-empty-state{display:grid;place-items:center;align-content:center;gap:8px}.chat-empty-logo{width:72px;height:72px;border-radius:24px;display:grid;place-items:center;background:linear-gradient(145deg,#267fb8,#15577f);color:#fff;font-size:24px;font-weight:900;box-shadow:0 16px 36px rgba(27,99,145,.2)}
.chat-messages{padding:18px 6% 14px!important;background:linear-gradient(180deg,#edf3f7,#e7eff4)!important;gap:7px!important}.chat-message{max-width:min(72%,720px)!important;border:0!important;border-radius:16px 16px 16px 5px!important;padding:8px 11px!important;box-shadow:0 1px 2px rgba(22,43,60,.08)!important}.chat-message.is-mine{background:#dff0fb!important;border-radius:16px 16px 5px 16px!important}.chat-message.is-ai{align-self:flex-start!important;max-width:min(82%,760px)!important;background:#fff!important;border-left:3px solid #347fb0!important}.chat-message-meta{margin-bottom:3px!important}.chat-message-body{font-size:14px!important;line-height:1.42!important}.chat-message-actions{opacity:.55!important;margin-top:5px!important}.chat-message:hover .chat-message-actions{opacity:1!important}
.chat-pinned{margin:0!important;border:0!important;border-radius:0!important;background:#fff!important;border-bottom:1px solid #e7edf2!important;padding:6px 14px!important}.chat-pinned summary{font-size:11px;color:#557082}.chat-pinned a{font-size:11px!important;color:#536575!important}
.chat-compose{padding:8px 12px max(8px,env(safe-area-inset-bottom))!important;background:#fff!important;border-top:1px solid #e2e9ee!important}.chat-compose-line{display:grid;grid-template-columns:40px minmax(0,1fr) 42px;align-items:end;gap:7px}.chat-compose textarea{min-height:42px!important;max-height:130px!important;border:1px solid #dce5eb!important;border-radius:20px!important;padding:10px 14px!important;resize:none!important;background:#f9fbfc!important}.chat-compose-icon{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;cursor:pointer;font-size:20px;color:#607484}.chat-compose-icon:hover{background:#eef4f8}.chat-compose-icon input{display:none}.chat-compose-send{width:40px;height:40px;border:0;border-radius:50%;background:#2382bd;color:#fff;font-size:18px;cursor:pointer}.chat-compose-send:hover{background:#176b9e}.chat-compose-tools{margin:5px 3px 0!important;gap:5px!important}.chat-tool-button{border:0;background:transparent;color:#657987;padding:5px 7px;border-radius:8px;font-size:11px;cursor:pointer}.chat-tool-button:hover,.chat-tool-button[aria-pressed="true"]{background:#eaf3f9;color:#176ca4}.chat-draft-state{font-size:10px!important}.chat-command-menu{margin-top:6px!important;border:0!important;background:#f4f8fb!important}.chat-command-menu button{font-size:11px!important}
.chat-personal-settings{margin:auto 10px 10px!important;border-top:1px solid #edf1f4;padding-top:8px}.chat-personal-settings>summary{font-size:11px!important;color:#798995!important;font-weight:650!important}.chat-personal-settings form{box-shadow:none!important}.chat-archive-list{padding-top:4px!important}
@media(max-width:820px){
  .content:has(.chat-shell){padding:0!important}.chat-shell{display:block!important;height:calc(100dvh - 66px)!important;min-height:0!important;border:0!important;border-radius:0!important;box-shadow:none!important}.chat-shell.no-room .chat-list-panel{display:flex!important;height:100%!important}.chat-shell.no-room .chat-main-panel{display:none!important}.chat-shell.has-room .chat-list-panel{display:none!important}.chat-shell.has-room .chat-main-panel{display:grid!important;height:100%!important;min-height:0!important}.chat-mobile-back{display:block!important}.chat-room-head{height:58px!important;padding:7px 9px!important}.chat-room-avatar{width:38px;height:38px;flex-basis:38px}.chat-list-panel{max-height:none!important;height:100%!important;overflow-y:auto!important}.chat-thread-link{min-height:66px!important}.chat-system-list,.chat-thread-list{display:flex!important;overflow:visible!important}.chat-personal-settings{margin-top:12px!important}.chat-messages{padding:12px 8px!important}.chat-message,.chat-message.is-ai{max-width:88%!important}.chat-compose{max-height:42dvh!important;overflow-y:auto!important}.chat-message-actions{opacity:.62!important}.chat-new-menu .chat-create-box{position:fixed;left:10px;right:10px;top:74px;width:auto!important;max-height:75dvh;overflow:auto}.chat-popover{position:fixed!important;left:10px!important;right:10px!important;top:70px!important;width:auto!important;max-height:75dvh;overflow:auto}.chat-list-head{height:64px!important}.chat-folder-switch{margin-bottom:6px!important}
}
@media(max-width:520px){.chat-message{font-size:13px!important}.chat-thread-icon{width:44px!important;height:44px!important;flex-basis:44px!important}.chat-compose-line{grid-template-columns:36px minmax(0,1fr) 40px}.chat-compose-icon{width:36px;height:40px}.chat-room-actions{gap:2px!important}}

/* INTRA 0.42.3 QA1 — fixed composer + quieter message actions */
.chat-main-panel{min-height:0!important;overflow:hidden!important}
.chat-messages{min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain!important}
.chat-compose{position:relative!important;bottom:auto!important;z-index:50!important;flex:0 0 auto!important;max-height:none!important;overflow:visible!important}
.chat-md-heading{display:inline-block;margin-top:5px;font-weight:800;color:#1f3445}
.chat-message-body code{padding:1px 4px;border-radius:5px;background:#eef2f5;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.92em}
@media(min-width:821px){
  .chat-message-actions{opacity:0!important;pointer-events:none!important;transition:opacity .12s ease!important}
  .chat-message:hover .chat-message-actions,.chat-message:focus-within .chat-message-actions{opacity:1!important;pointer-events:auto!important}
}
@media(max-width:820px){
  .chat-compose{position:relative!important;bottom:auto!important;max-height:none!important;overflow:visible!important}
  .chat-main-panel{grid-template-rows:auto auto minmax(0,1fr) auto auto!important}
}

/* INTRA 0.42.3 TG MOBILE — final messenger layer */
body[data-current-route="chat"] .ai-fab,
body[data-current-route="chat"] .ai-drawer{display:none!important}
.chat-compose-icon input[type="file"]{display:none!important;position:absolute!important;width:1px!important;height:1px!important;opacity:0!important}
.chat-compose-voice,.chat-compose-send{width:42px;height:42px;border:0;border-radius:50%;display:grid;place-items:center;cursor:pointer;font-size:19px}
.chat-compose-voice{background:transparent;color:#607786}.chat-compose-voice:hover{background:#edf4f8;color:#1681bd}
.chat-compose-send{background:#2a86bd;color:#fff}.chat-compose-send:hover{background:#176f9f}
.chat-compose-voice[hidden],.chat-compose-send[hidden],.chat-recording-bar[hidden]{display:none!important}
.chat-recording-bar{min-height:52px;display:grid;grid-template-columns:auto auto minmax(0,1fr) auto 42px;align-items:center;gap:10px;padding:5px 7px}
.chat-recording-dot{width:10px;height:10px;border-radius:50%;background:#e24545;box-shadow:0 0 0 4px rgba(226,69,69,.11);animation:chatRecPulse 1.2s infinite}
.chat-recording-bar>b{font-variant-numeric:tabular-nums}.chat-recording-bar>span:nth-of-type(2){color:#788895;font-size:12px}
.chat-recording-bar button{border:0;background:transparent;cursor:pointer}.chat-recording-bar>[data-chat-voice-cancel]{color:#ca4545;font-weight:700}
.chat-recording-send{width:42px;height:42px!important;border-radius:50%!important;background:#2a86bd!important;color:#fff;font-size:18px}
@keyframes chatRecPulse{50%{opacity:.45;transform:scale(.82)}}
.chat-voice-player{display:grid;grid-template-columns:42px minmax(120px,240px) auto;align-items:center;gap:8px;min-width:220px;padding:2px 0}
.chat-voice-player audio{display:none!important}.chat-voice-play{width:40px;height:40px;border:0;border-radius:50%;background:#2786bc;color:#fff;cursor:pointer;font-size:16px}
.chat-voice-wave{height:30px;display:flex;align-items:center;gap:2px;overflow:hidden}.chat-voice-wave i{display:block;width:3px;height:var(--h);border-radius:3px;background:#8ab9d2}
.chat-voice-duration{font-size:11px;color:#778994;font-variant-numeric:tabular-nums}.chat-transcript{margin-top:6px;font-size:11px;color:#5f7483}.chat-transcript>div{margin-top:5px;line-height:1.4}
@media(max-width:820px){
 body[data-current-route="chat"] .content{padding:0!important;overflow:hidden!important}
 body[data-current-route="chat"] .content-header{display:none!important}
 .chat-shell{display:block!important;height:calc(100dvh - 66px)!important;max-height:calc(100dvh - 66px)!important;min-height:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:#fff!important;overflow:hidden!important}
 .chat-shell.no-room .chat-list-panel{display:flex!important;height:100%!important;max-height:none!important}.chat-shell.no-room .chat-main-panel{display:none!important}
 .chat-shell.has-room .chat-list-panel{display:none!important}.chat-shell.has-room .chat-main-panel{display:grid!important;height:100%!important;grid-template-rows:58px auto minmax(0,1fr) auto auto!important;min-height:0!important;overflow:hidden!important}
 .chat-list-panel{border:0!important;background:#fff!important;overflow-y:auto!important}.chat-list-head{height:62px!important;padding:10px 14px!important;border-bottom:1px solid #e9eef2!important}.chat-list-head strong{font-size:22px!important}.chat-list-head small{font-size:11px!important}
 .chat-folder-switch{margin:6px 10px 8px!important;padding:3px!important;gap:3px!important}.chat-folder-switch a{min-height:34px!important;font-size:12px!important}
 .chat-system-list,.chat-thread-list{padding:0 6px!important}.chat-list-section{padding:10px 16px 4px!important}.chat-thread-link{min-height:68px!important;padding:9px 10px!important;border-radius:12px!important}
 .chat-thread-icon{width:48px!important;height:48px!important;flex-basis:48px!important}.chat-thread-title strong{font-size:14px!important}.chat-thread-copy small{font-size:12px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
 .chat-personal-settings{margin:12px 12px 20px!important}.chat-room-head{height:58px!important;padding:7px 9px!important;border-bottom:1px solid #e6edf2!important}.chat-mobile-back{display:block!important;width:34px!important;text-align:center!important}
 .chat-room-identity{min-width:0!important;flex:1!important}.chat-room-identity>div{min-width:0!important}.chat-room-identity strong,.chat-room-identity small{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.chat-room-actions{flex:0 0 auto!important}
 .chat-messages{padding:12px 9px 10px!important;gap:5px!important;overflow-y:auto!important;background:#e9f0f4!important}.chat-message,.chat-message.is-ai{max-width:86%!important;padding:8px 10px!important;border-radius:15px 15px 15px 5px!important}.chat-message.is-mine{border-radius:15px 15px 5px 15px!important}
 .chat-message-actions{display:none!important}.chat-reactions{margin-top:4px!important}.chat-message-meta{font-size:10px!important}.chat-message-body{font-size:14px!important;line-height:1.4!important}
 .chat-compose{position:relative!important;bottom:auto!important;max-height:none!important;overflow:visible!important;padding:7px 8px calc(7px + env(safe-area-inset-bottom))!important;border-top:1px solid #dde7ed!important;background:#fff!important}
 .chat-compose-line{display:grid!important;grid-template-columns:40px minmax(0,1fr) 42px 42px!important;gap:5px!important;align-items:end!important}.chat-compose-icon{width:40px!important;height:42px!important;display:grid!important;place-items:center!important;font-size:20px!important}
 .chat-compose textarea{min-height:42px!important;max-height:112px!important;padding:10px 13px!important;border-radius:20px!important;background:#f5f8fa!important;border:1px solid #dbe4e9!important;font-size:14px!important}
 .chat-compose-tools{margin:3px 46px 0!important;min-height:0!important}.chat-compose-tools:empty{display:none!important}.chat-tool-button{font-size:10px!important;padding:4px 6px!important}.chat-draft-state{font-size:9px!important}
 .chat-recording-bar{min-height:48px!important;grid-template-columns:auto auto 1fr auto 42px!important;padding:2px 4px!important}.chat-recording-bar>span:nth-of-type(2){display:none!important}
 .chat-voice-player{min-width:190px!important;grid-template-columns:38px minmax(105px,1fr) auto!important}.chat-voice-play{width:36px;height:36px}.chat-voice-wave{height:26px}
}
@media(max-width:820px){
 .chat-message.is-actions-open{z-index:80!important;box-shadow:0 8px 28px rgba(24,45,61,.18)!important}
 .chat-message.is-actions-open .chat-message-actions{display:flex!important;position:absolute!important;left:0!important;right:auto!important;bottom:calc(100% + 6px)!important;z-index:90!important;min-width:max-content!important;max-width:86vw!important;gap:3px!important;padding:5px!important;border:1px solid #dce5eb!important;border-radius:12px!important;background:#fff!important;box-shadow:0 10px 30px rgba(18,39,55,.2)!important;overflow-x:auto!important}
 .chat-message.is-actions-open .chat-message-actions button{border:0!important;background:transparent!important;padding:7px 8px!important;border-radius:8px!important;font-size:11px!important;white-space:nowrap!important}
 .chat-message.is-actions-open .chat-message-actions button:active{background:#edf4f8!important}
 .chat-message.is-actions-open .chat-reaction-actions{display:flex!important;gap:2px!important}
}

/* INTRA 0.42.3 TG2 — mobile messenger viewport */
@media(max-width:820px){
 body[data-current-route="chat"] .topbar{display:none!important}
 body[data-current-route="chat"] .content{padding:0 0 calc(var(--mobile-tabbar-height) + env(safe-area-inset-bottom))!important;max-width:none!important;height:100dvh!important;overflow:hidden!important}
 body[data-current-route="chat"] .chat-shell{height:calc(100dvh - var(--mobile-tabbar-height) - env(safe-area-inset-bottom))!important;max-height:calc(100dvh - var(--mobile-tabbar-height) - env(safe-area-inset-bottom))!important;min-height:0!important;border-radius:0!important;overflow:hidden!important}
 body[data-current-route="chat"] .chat-shell.has-room .chat-main-panel{height:100%!important;min-height:0!important;display:grid!important;grid-template-rows:58px auto minmax(0,1fr) auto auto!important;overflow:hidden!important}
 body[data-current-route="chat"] .chat-shell.no-room .chat-list-panel{height:100%!important;min-height:0!important;overflow-y:auto!important}
 body[data-current-route="chat"] .chat-messages{min-height:0!important;height:auto!important;overflow-y:auto!important}
 body[data-current-route="chat"] .chat-compose{position:relative!important;inset:auto!important;z-index:8!important;margin:0!important;flex:0 0 auto!important}
 body[data-current-route="chat"] .chat-compose-tools [data-chat-mention]{display:none!important}
 body[data-current-route="chat"].menu-open .chat-compose,body[data-current-route="chat"].menu-open .chat-room-head{z-index:1!important}
 body[data-current-route="chat"].menu-open .sidebar{z-index:100!important}
 body[data-current-route="chat"].menu-open .sidebar-overlay{z-index:95!important}
}

/* INTRA 0.42.3 TG3 — deterministic mobile room stack */
@media(max-width:820px){
  body[data-current-route="chat"] .chat-shell.has-room .chat-main-panel{
    display:flex!important;
    flex-direction:column!important;
    height:100%!important;
    min-height:0!important;
    overflow:hidden!important;
  }
  body[data-current-route="chat"] .chat-room-head,
  body[data-current-route="chat"] .chat-pinned,
  body[data-current-route="chat"] .chat-reply-banner,
  body[data-current-route="chat"] .chat-compose{flex:0 0 auto!important}
  body[data-current-route="chat"] .chat-messages{
    flex:1 1 auto!important;
    min-height:0!important;
    height:auto!important;
    overflow-y:auto!important;
  }
  body[data-current-route="chat"] .chat-forward-dialog{flex:none!important}
}

/* INTRA 0.42.3 TG4 — Android status-bar safe area */
@media(max-width:820px){
  html.intra-android-app body[data-current-route="chat"] .chat-shell{
    padding-top:max(26px,env(safe-area-inset-top))!important;
  }
  html.intra-android-app body[data-current-route="chat"] .chat-main-panel,
  html.intra-android-app body[data-current-route="chat"] .chat-list-panel{
    min-height:0!important;
  }
}

/* INTRA 0.42.3 TG5 — keyboard hugs composer */
@media(max-width:820px){
  body.chat-keyboard-open .mobile-tabbar{display:none!important}
  body.chat-keyboard-open[data-current-route="chat"] .content{padding-bottom:0!important}
  body.chat-keyboard-open[data-current-route="chat"] .chat-shell{padding-bottom:0!important}
}

/* INTRA 0.42.3 TG6 — chat info / participants */
.chat-room-identity[data-chat-info-open]{cursor:pointer;border-radius:12px;padding:2px 5px;margin:-2px -5px;transition:background .15s ease}
.chat-room-identity[data-chat-info-open]:hover{background:rgba(31,111,95,.06)}
.chat-info-dialog{border:0;padding:0;background:transparent;max-width:none;max-height:none}
.chat-info-dialog::backdrop{background:rgba(10,18,28,.46);backdrop-filter:blur(2px)}
.chat-info-sheet{width:min(440px,calc(100vw - 28px));max-height:min(680px,78vh);background:#fff;border-radius:20px;box-shadow:0 24px 70px rgba(10,18,28,.28);overflow:hidden;display:flex;flex-direction:column}
.chat-info-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px 18px;border-bottom:1px solid #e7edf1}
.chat-info-head>div{display:grid;gap:2px;min-width:0}.chat-info-head strong{font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-info-head small{color:#7d8994}
.chat-info-head button{width:36px;height:36px;border:0;border-radius:50%;background:#f0f4f6;font-size:23px;color:#53616c;cursor:pointer}
.chat-info-members{overflow-y:auto;padding:7px 0 12px}
.chat-info-member{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:11px;padding:9px 16px}
.chat-info-member>span{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#2490c0,#176b9d);color:#fff;font-weight:800;font-size:15px}
.chat-info-member>div{display:grid;min-width:0}.chat-info-member strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px}.chat-info-member small{color:#7f8d98;font-size:11px}.chat-info-member em{font-style:normal;color:#1f7d69;font-size:11px;font-weight:700}
@media(max-width:820px){.chat-info-dialog{margin:auto 0 0!important;width:100%!important}.chat-info-sheet{width:100%!important;max-height:72dvh!important;border-radius:20px 20px 0 0!important}.chat-info-head{padding:15px 16px}.chat-info-member{padding:10px 16px}}

/* INTRA 0.42.3 TG7 — reliable attachments */
.chat-compose-icon[data-chat-file-button]{border:0!important;background:transparent!important;padding:0!important;font:inherit!important}
.chat-file-selected{display:inline-flex;align-items:center;max-width:min(360px,70vw);padding:4px 8px;border-radius:9px;background:#eef5f8;color:#426174;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-file-selected[hidden]{display:none!important}
@media(max-width:820px){.chat-file-selected{max-width:58vw}}

/* INTRA 0.42.3 TG7b — direct native file tap */
.chat-file-picker{position:relative;width:40px;height:42px;display:grid;place-items:center;overflow:hidden;border-radius:50%}
.chat-file-picker .chat-compose-icon{pointer-events:none!important}
.chat-file-picker input[type="file"]{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;display:block!important;opacity:0!important;cursor:pointer!important;z-index:3!important;font-size:0!important}
@media(max-width:520px){.chat-file-picker{width:36px;height:40px}}

/* INTRA 0.42.3 TG10 — final deterministic chat viewport */
body[data-current-route="chat"] .chat-main-panel{display:flex!important;flex-direction:column!important;min-height:0!important;overflow:hidden!important}
body[data-current-route="chat"] .chat-room-head,
body[data-current-route="chat"] .chat-pinned,
body[data-current-route="chat"] .chat-reply-banner,
body[data-current-route="chat"] .chat-compose{flex:0 0 auto!important}
body[data-current-route="chat"] .chat-messages{flex:1 1 0!important;min-height:0!important;height:auto!important;overflow-y:auto!important;overscroll-behavior:contain!important}
@media(max-width:820px){
 body[data-current-route="chat"] .chat-shell.has-room{height:calc(100dvh - var(--mobile-tabbar-height) - env(safe-area-inset-bottom))!important;max-height:calc(100dvh - var(--mobile-tabbar-height) - env(safe-area-inset-bottom))!important;min-height:0!important;overflow:hidden!important}
 body[data-current-route="chat"] .chat-shell.has-room .chat-main-panel{height:100%!important;min-height:0!important;overflow:hidden!important}
 body[data-current-route="chat"] .chat-compose{position:relative!important;bottom:auto!important;margin-top:0!important}
 body[data-current-route="chat"] .chat-messages:empty{flex:1 1 0!important;min-height:0!important}
}

/* INTRA 0.42.22 — Telegram-like messenger polish */
.chat-file-card{display:flex;align-items:stretch;gap:6px;margin-top:5px;max-width:440px}
.chat-file-card .chat-file{flex:1;min-width:0;margin:0!important}
.chat-file-download,.chat-voice-download{width:34px;height:34px;flex:0 0 34px;display:grid;place-items:center;border-radius:50%;text-decoration:none;background:#edf4f8;color:#39708e;font-weight:900}
.chat-file-download:hover,.chat-voice-download:hover{background:#dfeef6;color:#176c9e}
.chat-file-selected{gap:5px!important;overflow:visible!important}
.chat-file-selected>[data-chat-file-label]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-file-selected>[data-chat-file-clear]{width:20px;height:20px;border:0;border-radius:50%;background:transparent;color:#6d7f8b;font-size:16px;line-height:1;cursor:pointer;flex:0 0 20px}
.chat-file-selected>[data-chat-file-clear]:hover{background:#dce9f0;color:#314957}

.chat-voice-player{grid-template-columns:40px minmax(120px,240px) auto auto 34px!important;gap:7px!important;max-width:min(430px,76vw)}
.chat-voice-wave{position:relative;cursor:pointer;border-radius:8px;background:linear-gradient(90deg,rgba(42,134,189,.14) var(--progress,0%),transparent var(--progress,0%))}
.chat-voice-wave i{transition:background .08s ease}
.chat-voice-speed{min-width:34px;height:28px;border:0;border-radius:10px;background:#edf4f8;color:#39708e;font-weight:800;font-size:11px;cursor:pointer}
.chat-voice-speed:hover{background:#dfeef6}
.chat-transcript-state{margin-top:4px}
.chat-transcript-muted{display:block;color:#8998a3;font-size:10px}

.chat-info-manage{border-top:1px solid #e7edf1;padding:10px 16px 16px}
.chat-info-manage>summary{cursor:pointer;font-weight:750;color:#466477;padding:6px 0}
.chat-info-manage form{display:grid;gap:10px;margin-top:8px}
.chat-info-manage .chat-member-checks{max-height:220px;overflow:auto;border:1px solid #e6edf1;border-radius:12px;padding:7px}
.chat-info-manage .chat-member-checks label{display:flex;align-items:center;gap:8px;padding:7px 6px;border-radius:8px}
.chat-info-manage .chat-member-checks label:hover{background:#f4f8fa}

.chat-file-viewer{display:grid;gap:12px;min-height:calc(100vh - 140px)}
.chat-file-viewer-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 14px;border:1px solid #e1e9ee;border-radius:14px;background:#fff}
.chat-file-viewer-head>div{display:grid;min-width:0}.chat-file-viewer-head strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-file-viewer-head small{color:#7b8d99;margin-top:3px}
.chat-pdf-toolbar{display:flex;align-items:center;justify-content:center;gap:7px;position:sticky;top:8px;z-index:5;width:max-content;max-width:100%;margin:auto;padding:6px 8px;border-radius:14px;background:rgba(255,255,255,.95);box-shadow:0 5px 20px rgba(22,42,58,.12)}
.chat-pdf-toolbar button{width:34px;height:34px;border:0;border-radius:9px;background:#eef4f7;color:#365b70;font-size:18px;cursor:pointer}
.chat-pdf-toolbar span{font-size:12px;font-weight:700;color:#506877;min-width:54px;text-align:center}
.chat-pdf-stage{position:relative;min-height:65vh;overflow:auto;padding:18px;border-radius:14px;background:#dfe6eb;text-align:center}
.chat-pdf-stage canvas{display:block;max-width:none;margin:0 auto;background:#fff;box-shadow:0 4px 24px rgba(20,35,50,.18)}
.chat-pdf-state{position:absolute;inset:0;display:grid;place-items:center;color:#6f808c;font-weight:700}
.chat-pdf-state[hidden]{display:none}
.chat-image-stage,.chat-audio-stage{min-height:60vh;display:grid;place-items:center;padding:18px;border-radius:14px;background:#eef3f6}
.chat-image-stage img{max-width:100%;max-height:75vh;object-fit:contain;border-radius:8px}
.chat-audio-stage audio{width:min(640px,100%)}

@media(max-width:820px){
  .chat-compose{padding:5px 7px calc(5px + env(safe-area-inset-bottom))!important}
  .chat-compose-line{grid-template-columns:36px minmax(0,1fr) 38px 38px!important;gap:4px!important}
  .chat-compose-icon,.chat-compose-voice,.chat-compose-send{width:36px!important;height:38px!important;min-height:38px!important}
  .chat-compose textarea{min-height:38px!important;max-height:112px!important;padding:8px 12px!important;border-radius:19px!important;line-height:20px!important}
  .chat-file-picker{width:36px!important;height:38px!important}
  .chat-compose-tools{margin:2px 40px 0!important}
  .chat-file-selected{max-width:70vw!important}
  .chat-room-actions .chat-icon-button{width:36px!important;height:36px!important}
  .chat-voice-player{grid-template-columns:36px minmax(86px,1fr) auto auto 30px!important;min-width:220px!important;max-width:82vw!important;gap:5px!important}
  .chat-voice-play{width:34px!important;height:34px!important}
  .chat-voice-download{width:30px;height:30px;flex-basis:30px}
  .chat-voice-duration{font-size:10px!important;white-space:nowrap}
  .chat-voice-speed{min-width:31px;height:27px;font-size:10px}
  .chat-info-manage{padding:8px 14px 14px}
  .chat-file-viewer{min-height:calc(100dvh - var(--mobile-tabbar-height) - env(safe-area-inset-bottom) - 20px)}
  .chat-file-viewer-head{grid-template-columns:auto minmax(0,1fr);padding:8px;gap:8px}
  .chat-file-viewer-head>.btn:last-child{grid-column:1/3;width:100%}
  .chat-pdf-stage{padding:8px;min-height:62dvh}
  .chat-pdf-toolbar{top:4px}
}
