*{box-sizing:border-box}
:root{
 --bg:#05070c;--rail:#070a10;--panel:#0a0e16;--panel2:#0f1520;--card:#121925;
 --line:rgba(255,255,255,.07);--line2:rgba(255,255,255,.12);--text:#f4f7fb;
 --muted:#788397;--soft:#aeb8ca;--accent:#72a2ff;--violet:#9b7cff;--green:#4de09c;--red:#ff7182;
}
html,body{margin:0;width:100%;height:100%;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;background:var(--bg);color:var(--text)}
body{overflow:hidden}button,input,textarea{font:inherit}.hidden{display:none!important}.eyebrow{display:block;font-size:9px;letter-spacing:.16em;color:#617087;font-weight:800;margin-bottom:5px}
button{cursor:pointer}

/* Login */
.login-page{overflow:auto;background:
 radial-gradient(circle at 12% 12%,rgba(73,118,224,.22),transparent 28%),
 radial-gradient(circle at 92% 82%,rgba(133,77,213,.16),transparent 28%),
 #05070c}
.login-shell{min-height:100vh;display:grid;grid-template-columns:minmax(0,1fr) 440px;gap:8vw;align-items:center;max-width:1180px;margin:auto;padding:60px}
.orbit-logo{width:68px;height:68px;border-radius:22px;display:grid;place-items:center;background:linear-gradient(145deg,#5d91ff,#9b74ff);box-shadow:0 20px 55px rgba(72,91,220,.28);margin-bottom:28px}.orbit-logo span{font-size:27px;font-weight:950}
.kicker{font-size:10px;letter-spacing:.22em;color:#6e7d98;font-weight:800;margin-bottom:15px}
.login-brand h1{font-size:clamp(44px,6vw,76px);line-height:.98;letter-spacing:-.055em;margin:0 0 22px}.login-brand h1 em{font-style:normal;color:#8caaff}.login-brand>p{max-width:620px;color:#7d899d;font-size:16px;line-height:1.7}
.login-points{display:flex;gap:9px;flex-wrap:wrap;margin-top:30px}.login-points span{font-size:10px;color:#8290a6;border:1px solid var(--line);padding:8px 10px;border-radius:999px;background:rgba(255,255,255,.02)}
.login-card{background:rgba(12,17,26,.88);backdrop-filter:blur(30px);border:1px solid var(--line2);border-radius:26px;padding:32px;box-shadow:0 35px 120px rgba(0,0,0,.45)}
.login-card h2{margin:0 0 7px;font-size:24px}.login-card-head p{color:#727e91;font-size:12px;line-height:1.55;margin:0 0 24px}.login-card label,.field-label{display:block;font-size:9px;letter-spacing:.1em;color:#66748a;text-transform:uppercase;font-weight:800;margin:13px 0 6px}
.login-card input,.field{width:100%;height:46px;border:1px solid var(--line);border-radius:12px;background:#080c13;color:white;outline:0;padding:0 13px}.login-card input:focus,.field:focus{border-color:rgba(114,162,255,.42);box-shadow:0 0 0 3px rgba(114,162,255,.06)}
.login-card button,.primary-btn{width:100%;height:46px;border:0;border-radius:12px;background:linear-gradient(135deg,#dfe9ff,#bfcfff);color:#101621;font-weight:900;margin-top:17px}.login-card button span{float:right}.login-footer{text-align:center;color:#4f5b6d;font-size:9px;letter-spacing:.08em;margin-top:20px}
.form-error{background:rgba(255,113,130,.08);border:1px solid rgba(255,113,130,.18);color:#ff9baa;border-radius:10px;padding:9px 10px;font-size:11px;margin-top:10px}

/* Main layout */
.app-shell{height:100vh;display:grid;grid-template-columns:78px 360px minmax(0,1fr);background:radial-gradient(circle at 74% 0,rgba(68,100,180,.08),transparent 36%),#070a10}
.account-rail{background:#06090f;border-right:1px solid var(--line);padding:14px 10px;display:flex;flex-direction:column;align-items:center;gap:9px}
.v10-logo{width:48px;height:48px;border-radius:16px;display:grid;place-items:center;position:relative;background:linear-gradient(145deg,#6699ff,#9578ff);box-shadow:0 12px 32px rgba(71,93,198,.22)}.v10-logo span{font-weight:950}.v10-logo small{position:absolute;right:-3px;bottom:-3px;border:2px solid #06090f;background:#e9eeff;color:#10141c;width:18px;height:18px;border-radius:7px;display:grid;place-items:center;font-size:8px;font-weight:950}
.account-list{width:100%;display:flex;flex-direction:column;align-items:center;gap:8px;overflow:auto;margin-top:6px}.account-pill{width:48px;height:48px;border-radius:16px;border:1px solid var(--line);background:#101620;color:#dce4f2;display:grid;place-items:center;font-weight:900;font-size:11px;position:relative}.account-pill:hover{background:#151d29}.account-pill.active{border-color:rgba(114,162,255,.5);background:linear-gradient(145deg,rgba(114,162,255,.22),rgba(155,124,255,.10));box-shadow:0 0 0 3px rgba(114,162,255,.06)}.account-pill.active:before{content:"";position:absolute;left:-11px;width:3px;height:24px;border-radius:0 4px 4px 0;background:#79a6ff}.account-status{position:absolute;right:-2px;bottom:-2px;width:11px;height:11px;border-radius:50%;border:2px solid #06090f;background:#677287}.account-status.online{background:var(--green)}.account-status.connecting{background:#f1c75b}.account-status.error,.account-status.unauthorized{background:var(--red)}
.rail-button{width:48px;height:48px;border-radius:16px;border:1px dashed rgba(255,255,255,.13);background:transparent;color:#7c8799;font-size:21px}.rail-button:hover{border-color:rgba(114,162,255,.35);color:#dbe5f4;background:rgba(114,162,255,.05)}.rail-space{flex:1}.connection-dot{width:9px;height:9px;border-radius:50%;background:#4c5667;margin:7px}.connection-dot.online{background:var(--green);box-shadow:0 0 13px rgba(77,224,156,.5)}.rail-button.quiet{border:0;font-size:20px}

.conversation-pane{min-width:0;background:#0a0e16;border-right:1px solid var(--line);display:flex;flex-direction:column}
.pane-header,.chat-header{height:82px;flex:0 0 82px;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 20px;background:rgba(9,13,20,.9);backdrop-filter:blur(18px)}
.pane-header{justify-content:space-between}.pane-header h1,.chat-header h2{margin:0;font-size:18px;letter-spacing:-.025em}.round-button{width:37px;height:37px;border-radius:12px;border:1px solid var(--line);background:#111722;color:#c9d1de;font-size:20px}.round-button:hover{background:#171f2b}
.search-box{height:43px;margin:15px 14px 9px;border:1px solid var(--line);border-radius:12px;background:#070b12;display:flex;align-items:center;padding:0 11px;gap:8px;color:#647085}.search-box input{flex:1;min-width:0;background:transparent;border:0;outline:0;color:white}.search-box input::placeholder{color:#566174}.search-box kbd{font-size:8px;color:#596577;border:1px solid var(--line);border-radius:5px;padding:3px 5px}
.pane-meta{display:flex;justify-content:space-between;padding:8px 17px 6px;font-size:9px;letter-spacing:.13em;color:#526074;font-weight:800}
.dialog-list{min-height:0;flex:1;overflow:auto;padding:2px 8px 14px}.dialog{position:relative;min-height:69px;padding:11px 11px 11px 58px;border:1px solid transparent;border-radius:14px;margin:3px 0;cursor:pointer}.dialog:hover{background:#101620}.dialog.active{background:linear-gradient(90deg,rgba(114,162,255,.13),rgba(114,162,255,.035));border-color:rgba(114,162,255,.12)}.dialog-avatar{position:absolute;left:10px;top:13px;width:39px;height:39px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(145deg,#182338,#121a28);border:1px solid var(--line);font-size:11px;font-weight:900;color:#c7d3e7}.dialog-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.dialog b{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dialog p{margin:6px 0 0;color:#687488;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.badge{min-width:20px;height:20px;border-radius:10px;padding:0 5px;display:grid;place-items:center;background:#8eabff;color:#0b1018;font-size:9px;font-weight:950}.empty-list{padding:40px 14px;text-align:center;color:#596577;font-size:12px}

.chat-pane{min-width:0;min-height:0;display:flex;flex-direction:column;position:relative;background:#070b12}.chat-pane:before{content:"";position:absolute;inset:82px 0 0;pointer-events:none;background:radial-gradient(circle at 55% 15%,rgba(77,110,190,.07),transparent 36%);opacity:.9}.chat-pane:after{content:"";position:absolute;inset:82px 0 0;pointer-events:none;opacity:.12;background-image:radial-gradient(circle at 1px 1px,rgba(255,255,255,.12) 1px,transparent 0);background-size:29px 29px;mask-image:linear-gradient(to bottom,#000,transparent 92%)}
.chat-header{position:relative;z-index:4;padding:0 25px}.chat-back{display:none;width:38px;height:38px;border:1px solid var(--line);border-radius:12px;background:#101620;color:#d6deeb;font-size:19px;margin-right:10px}.chat-avatar{width:43px;height:43px;border-radius:15px;display:grid;place-items:center;background:linear-gradient(145deg,#1c2a43,#131c2b);border:1px solid var(--line2);font-size:11px;font-weight:900;color:#d1dcec}.chat-identity{margin-left:12px}.chat-spacer{flex:1}.live-badge{font-size:9px;letter-spacing:.12em;color:#78e7b2;border:1px solid rgba(77,224,156,.14);background:rgba(77,224,156,.045);border-radius:999px;padding:7px 9px}.live-badge i{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--green);margin-right:5px}
.history-loader{position:absolute;z-index:6;top:91px;left:50%;transform:translateX(-50%);background:#111722;border:1px solid var(--line);border-radius:999px;padding:6px 9px;color:#738095;font-size:10px}
.messages{position:relative;z-index:2;min-height:0;flex:1;overflow:auto;padding:28px clamp(24px,5vw,84px) 18px}.hero-state{height:100%;min-height:320px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.hero-glyph{width:76px;height:76px;border-radius:25px;display:grid;place-items:center;font-size:30px;color:#9cb8ff;background:linear-gradient(145deg,rgba(114,162,255,.11),rgba(155,124,255,.045));border:1px solid rgba(114,162,255,.13);box-shadow:0 25px 70px rgba(0,0,0,.16)}.hero-state h3{margin:17px 0 7px;font-size:21px}.hero-state p{max-width:460px;margin:0;color:#708097;font-size:13px;line-height:1.6}.hero-state>div:last-child{display:flex;gap:7px;margin-top:18px}.hero-state>div:last-child span{font-size:9px;color:#68758a;border:1px solid var(--line);border-radius:999px;padding:6px 8px}
.bubble-wrap{display:flex;margin:8px 0}.bubble-wrap.out{justify-content:flex-end}.bubble{max-width:min(700px,76%);padding:11px 13px;border:1px solid var(--line);border-radius:7px 17px 17px 17px;background:#121925;box-shadow:0 9px 27px rgba(0,0,0,.12);font-size:13px;line-height:1.5;white-space:pre-wrap}.out .bubble{background:linear-gradient(145deg,#dce7ff,#c4d3fa);color:#0e1420;border-color:rgba(255,255,255,.28);border-radius:17px 7px 17px 17px}.meta{display:block;margin-top:5px;font-size:9px;opacity:.45}.msg-actions{display:flex;gap:4px;flex-wrap:wrap;margin-top:6px;opacity:0;transition:.15s}.bubble:hover .msg-actions{opacity:1}.msg-actions button{border:0;background:transparent;color:inherit;opacity:.58;border-radius:6px;padding:3px 5px;font-size:10px}.msg-actions button:hover{opacity:1;background:rgba(255,255,255,.06)}.out .msg-actions button:hover{background:rgba(10,15,24,.07)}.media-link{display:inline-flex;margin-top:7px;font-size:11px;color:inherit}.reply-tag{font-size:10px;opacity:.55;border-left:2px solid currentColor;padding-left:7px;margin-bottom:6px}
.reaction-row{display:flex;gap:5px;flex-wrap:wrap;margin-top:7px}.reaction-row:empty{display:none}.reaction-chip{height:25px;display:inline-flex;align-items:center;gap:4px;padding:0 7px;border-radius:999px;border:1px solid var(--line);background:rgba(255,255,255,.03);color:inherit;font-size:12px}.reaction-chip b{font-size:9px;opacity:.65}.reaction-chip.chosen{border-color:rgba(114,162,255,.4);background:rgba(114,162,255,.13)}
.composer-zone{position:relative;z-index:3;flex:0 0 auto;padding:0 clamp(24px,5vw,84px) 20px;background:linear-gradient(to top,#070b12 62%,transparent)}.reply-bar{max-width:920px;margin:0 auto 7px;border:1px solid var(--line);border-left:3px solid var(--accent);border-radius:11px;background:#0e151f;padding:8px 11px;display:flex;align-items:center;justify-content:space-between}.reply-bar div{display:flex;flex-direction:column}.reply-bar small{font-size:8px;color:#66748a;letter-spacing:.1em}.reply-bar b{font-size:11px;color:#aeb8ca;font-weight:500}.reply-bar button{border:0;background:transparent;color:#758197;font-size:20px}
.composer{max-width:920px;height:60px;margin:auto;border:1px solid var(--line2);border-radius:18px;background:rgba(14,20,30,.96);display:flex;align-items:center;padding:8px;box-shadow:0 19px 60px rgba(0,0,0,.24)}.composer:focus-within{border-color:rgba(114,162,255,.34);box-shadow:0 19px 60px rgba(0,0,0,.25),0 0 0 3px rgba(114,162,255,.05)}.attach-btn{width:41px;height:41px;border-radius:12px;display:grid;place-items:center;color:#748197;font-size:22px}.attach-btn:hover{background:rgba(255,255,255,.04);color:#cbd5e3}.composer textarea{flex:1;min-width:0;resize:none;max-height:130px;background:transparent;border:0;outline:0;color:white;padding:11px 8px;font-size:13px}.composer textarea::placeholder{color:#566174}.key-hint{font-size:8px;color:#4b5667;margin-right:9px;white-space:nowrap}.send-btn{width:43px;height:43px;border:0;border-radius:13px;background:linear-gradient(145deg,#73a3ff,#957cff);display:grid;place-items:center}.send-btn svg{width:17px;height:17px;fill:none;stroke:white;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

.modal{position:fixed;inset:0;z-index:30;background:rgba(1,3,7,.74);backdrop-filter:blur(13px);display:grid;place-items:center;padding:20px}.modal-card{width:min(500px,94vw);max-height:80vh;overflow:auto;border:1px solid var(--line2);background:#0c111a;border-radius:22px;padding:21px;box-shadow:0 35px 110px rgba(0,0,0,.55)}.modal-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:16px}.modal-head h3{margin:0;font-size:18px}.modal-head button{border:0;background:transparent;color:#758195;font-size:24px}.modal-search{height:45px;border:1px solid var(--line);background:#070b12;border-radius:12px;display:flex;align-items:center;gap:8px;padding:0 11px}.modal-search input{flex:1;background:transparent;border:0;outline:0;color:white}.people-results{max-height:50vh;overflow:auto;margin-top:10px}.person{padding:11px;border-radius:11px}.person:hover{background:#121925}.person b{font-size:13px}.person small{display:block;color:#6f7b8e;font-size:11px;margin-top:3px}.muted{color:#738095;font-size:12px;line-height:1.6}.primary-btn,.secondary-btn{width:100%;height:45px;border-radius:12px;font-weight:900;margin-top:13px}.secondary-btn{border:1px solid var(--line2);background:#121925;color:#c8d2e0}.qr-card{width:270px;height:270px;background:white;border-radius:20px;padding:14px;margin:18px auto;box-shadow:0 22px 60px rgba(0,0,0,.3)}.qr-card img{width:100%;height:100%;object-fit:contain}.qr-status{text-align:center;font-size:11px;color:#8090a5}.qr-status i{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--green);margin-right:5px}.toast{position:fixed;right:20px;bottom:20px;z-index:50;max-width:360px;background:#121925;border:1px solid var(--line2);color:#dbe3ef;border-radius:12px;padding:11px 13px;font-size:11px;box-shadow:0 18px 60px rgba(0,0,0,.4)}
.reaction-picker{position:fixed;z-index:60;background:#111722;border:1px solid var(--line2);border-radius:14px;padding:6px;display:flex;gap:3px;box-shadow:0 20px 60px rgba(0,0,0,.45)}.reaction-picker button{width:35px;height:35px;border:0;background:transparent;border-radius:9px;font-size:19px}.reaction-picker button:hover{background:rgba(255,255,255,.07)}
*{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.12) transparent}*::-webkit-scrollbar{width:7px;height:7px}*::-webkit-scrollbar-track{background:transparent}*::-webkit-scrollbar-thumb{background:rgba(255,255,255,.11);border-radius:999px}

@media(max-width:900px){.app-shell{grid-template-columns:70px 320px minmax(0,1fr)}.key-hint{display:none}.messages,.composer-zone{padding-left:18px;padding-right:18px}}
@media(max-width:680px){
 body{overflow:hidden}.app-shell{display:block;height:100vh}.account-rail{height:68px;position:relative;z-index:10;flex-direction:row;padding:9px;border-right:0;border-bottom:1px solid var(--line)}.v10-logo,.rail-button,.account-pill{width:44px;height:44px;border-radius:14px}.account-list{width:auto;flex-direction:row;margin:0;overflow:auto}.rail-space{flex:1}.connection-dot{display:none}
 .conversation-pane,.chat-pane{height:calc(100vh - 68px);border-right:0}.chat-back{display:grid;place-items:center}.app-page:not(.chat-open) .chat-pane{display:none}.app-page.chat-open .conversation-pane{display:none}.app-page:not(.chat-open) .conversation-pane{display:flex}.app-page.chat-open .chat-pane{display:flex}
 .pane-header,.chat-header{height:70px;flex-basis:70px}.chat-header{padding:0 12px}.messages{padding:15px 11px}.bubble{max-width:89%}.composer-zone{padding:0 9px 9px}.composer{height:56px}.login-shell{grid-template-columns:1fr;padding:26px}.login-brand{display:none}
}



/* =========================================================
   V10.4 STABLE — ONE RESPONSIVE LAYOUT
   ========================================================= */

:root{--appvh:100dvh}

html,body{
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
  overflow:hidden;
}

.app-shell{
  width:100vw;
  height:var(--appvh);
  min-height:0;
  grid-template-columns:88px 380px minmax(0,1fr);
}

/* Account rail: never overlaps content */
.account-rail{
  height:var(--appvh);
  min-height:0;
  overflow:hidden;
}
.account-list{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  margin:4px 0;
}
.rail-space{display:none}

/* Conversations */
.conversation-pane{
  height:var(--appvh);
  min-width:0;
  min-height:0;
  overflow:hidden;
}
.dialog-list{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
}
.dialog-top,.dialog-top b{min-width:0}
.dialog-top b{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.dialog p{
  width:100%;
  max-width:none!important;
}

/* Chat */
.chat-pane{
  height:var(--appvh);
  min-width:0;
  min-height:0;
  overflow:hidden;
}
.chat-header{height:80px;flex:0 0 80px}
.chat-identity{min-width:0}
.chat-identity h2{
  max-width:55vw;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* REAL chat back button on desktop and phone */
.chat-back{
  display:none!important;
  width:auto!important;
  min-width:92px!important;
  height:38px!important;
  padding:0 12px!important;
  margin-right:10px!important;
  gap:7px!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid rgba(255,255,255,.09)!important;
  background:#101620!important;
  color:#dce4f1!important;
  border-radius:12px!important;
  font-size:12px!important;
  font-weight:800!important;
}
.chat-back::after{
  content:"Chats";
  font-size:11px;
}
body.chat-open .chat-back{display:flex!important}

.messages{
  min-height:0;
  flex:1 1 auto;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  scroll-behavior:auto;
  justify-content:flex-start!important;
  padding:22px clamp(22px,4vw,68px) 22px!important;
}
.messages>.bubble-wrap:first-child{margin-top:5px!important}
.messages:has(.hero-state){justify-content:center!important}
.bubble{
  max-width:min(660px,72%)!important;
  word-break:break-word;
  overflow-wrap:anywhere;
}

.composer-zone{
  flex:0 0 auto;
  padding:8px clamp(22px,4vw,68px) 18px!important;
  border-top:1px solid rgba(255,255,255,.025);
}
.composer{width:100%;max-width:920px}

.history-loader{
  top:88px!important;
  z-index:20!important;
  background:rgba(15,21,32,.96)!important;
  border:1px solid rgba(255,255,255,.10)!important;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
}

/* Laptop */
@media(max-width:1180px) and (min-width:761px){
  .app-shell{grid-template-columns:80px 330px minmax(0,1fr)!important}
  .chat-header,.pane-header{height:74px!important;flex-basis:74px!important}
  .chat-header{padding:0 14px!important}
  .chat-back{min-width:78px!important;padding:0 9px!important}
  .bubble{max-width:78%!important}
  .messages,.composer-zone{padding-left:17px!important;padding-right:17px!important}
}

/* Mobile: one pane at a time */
@media(max-width:760px){
  html,body{
    width:100%;
    height:var(--appvh)!important;
    max-height:var(--appvh)!important;
    overflow:hidden!important;
  }
  body.app-page{position:fixed;inset:0}

  .app-shell{
    display:block!important;
    width:100%!important;
    height:var(--appvh)!important;
    min-height:0!important;
    overflow:hidden!important;
  }

  .account-rail{
    position:absolute!important;
    top:0;left:0;right:0;
    width:100%!important;
    height:58px!important;
    min-height:58px!important;
    flex-direction:row!important;
    padding:6px 7px!important;
    gap:7px!important;
    border-right:0!important;
    border-bottom:1px solid rgba(255,255,255,.07)!important;
    z-index:30;
  }
  .v10-logo,.account-pill,.rail-button{
    width:40px!important;height:40px!important;flex:0 0 40px!important;border-radius:12px!important;
  }
  .account-list{
    height:42px!important;
    min-width:0!important;
    flex:1 1 auto!important;
    flex-direction:row!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    margin:0!important;
    padding:0 2px!important;
  }
  .connection-dot{display:none!important}

  .conversation-pane,.chat-pane{
    position:absolute!important;
    top:58px!important;
    left:0!important;right:0!important;bottom:0!important;
    width:100%!important;
    height:calc(var(--appvh) - 58px)!important;
    min-height:0!important;
  }
  body:not(.chat-open) .conversation-pane{display:flex!important}
  body:not(.chat-open) .chat-pane{display:none!important}
  body.chat-open .conversation-pane{display:none!important}
  body.chat-open .chat-pane{display:flex!important}

  .pane-header,.chat-header{
    height:60px!important;
    flex:0 0 60px!important;
    padding:0 9px!important;
  }
  .search-box{
    height:42px!important;
    flex:0 0 42px!important;
    margin:8px 9px 5px!important;
  }
  .search-box kbd{display:none!important}
  .dialog-list{
    min-height:0!important;
    flex:1 1 auto!important;
    overflow-y:auto!important;
    padding:2px 6px 12px!important;
  }
  .dialog{
    min-height:62px!important;
    padding:9px 9px 9px 55px!important;
    margin:2px 0!important;
  }
  .dialog-avatar{
    width:37px!important;height:37px!important;left:9px!important;top:11px!important;
  }

  .chat-back{
    display:flex!important;
    min-width:68px!important;
    height:38px!important;
    padding:0 8px!important;
    margin-right:7px!important;
  }
  .chat-avatar{
    width:36px!important;height:36px!important;flex:0 0 36px!important;border-radius:12px!important;
  }
  .chat-identity{margin-left:7px!important}
  .chat-identity h2{
    max-width:calc(100vw - 196px)!important;
    font-size:14px!important;
  }
  .chat-identity .eyebrow{font-size:7px!important;margin-bottom:2px!important}
  .live-badge{
    width:27px!important;height:27px!important;padding:0!important;
    display:grid!important;place-items:center!important;font-size:0!important;
  }
  .live-badge i{margin:0!important}

  .messages{
    min-height:0!important;
    flex:1 1 auto!important;
    overflow-y:auto!important;
    padding:12px 9px 10px!important;
  }
  .bubble-wrap{margin:4px 0!important}
  .bubble{
    max-width:87%!important;
    min-width:58px!important;
    padding:9px 11px!important;
    font-size:13px!important;
    line-height:1.42!important;
  }
  .msg-actions{opacity:1!important}

  .composer-zone{
    position:relative!important;
    flex:0 0 auto!important;
    padding:5px 7px calc(7px + env(safe-area-inset-bottom))!important;
    background:#070b12!important;
  }
  .composer{
    width:100%!important;
    height:52px!important;
    min-height:52px!important;
    border-radius:15px!important;
    padding:6px!important;
  }
  .composer textarea{
    font-size:16px!important;
    padding:9px 6px!important;
  }
  .key-hint{display:none!important}
  .attach-btn{width:37px!important;height:37px!important;flex:0 0 37px!important}
  .send-btn{width:39px!important;height:39px!important;flex:0 0 39px!important}
  .history-loader{top:66px!important}

  .modal{
    padding:10px!important;
    align-items:end!important;
  }
  .modal-card{
    width:100%!important;
    max-height:88dvh!important;
    border-radius:20px 20px 12px 12px!important;
  }
  .qr-card{
    width:min(250px,75vw)!important;
    height:min(250px,75vw)!important;
  }
}

@media(max-width:390px){
  .chat-back{
    min-width:42px!important;
    width:42px!important;
    padding:0!important;
  }
  .chat-back::after{display:none!important}
  .chat-identity h2{max-width:calc(100vw - 145px)!important}
}

/* V10.5 — inline Telegram images only */
.inline-image-link{
  display:block;
  margin-top:8px;
  max-width:100%;
  text-decoration:none;
}
.inline-image{
  display:block;
  width:auto;
  height:auto;
  max-width:min(460px,100%);
  max-height:520px;
  object-fit:contain;
  border-radius:12px;
  background:rgba(0,0,0,.18);
  box-shadow:0 8px 24px rgba(0,0,0,.14);
}
.out .inline-image{
  background:rgba(20,30,55,.08);
}
@media(max-width:760px){
  .inline-image{
    max-width:100%;
    max-height:60vh;
    border-radius:10px;
  }
}
