/* Browser shell; the authenticated workspace uses the desktop's shared UI. */
:root{color-scheme:dark;--web-line:rgba(255,255,255,.12)}
html.web-document{height:auto;min-height:100%;overflow-y:auto;overflow-x:clip;background:#000}
html.web-document:has(body.signed-in){overflow:hidden}
body.web-client{margin:0;padding:0;background:#000;font-family:Inter,"Segoe UI",system-ui,sans-serif;height:auto;min-height:100dvh;overflow:auto;color:#f5f5f5}
body.web-client:before{content:none}
.web-client .ambient,.web-ambient{display:none}
.web-client .titlebar{display:none!important}
.web-client #updateBanner{display:none!important}
.web-nav{position:relative;z-index:2;width:min(1280px,calc(100% - 96px));margin:auto;height:96px;display:flex;justify-content:space-between;align-items:center;border:0}
.web-brand{display:flex;align-items:center;gap:11px;color:#f2f2f2;text-decoration:none;font-size:17px;font-weight:650;letter-spacing:-.045em}
.web-brand img{width:35px;height:35px;object-fit:contain}
.web-client .auth{position:relative;z-index:1;min-height:calc(100dvh - 96px);height:auto;padding:64px 48px 76px;display:grid;place-items:center;background:none;overflow:visible}
.web-client .auth.hidden{display:none!important}
.web-client .auth-card{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(370px,.9fr);gap:clamp(40px,7vw,128px);width:min(1180px,100%);height:auto;min-height:540px;max-height:none;border:0;border-radius:0;background:none;box-shadow:none;backdrop-filter:none;overflow:visible}
.web-client .auth-art{padding:48px 0 28px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;border:0;background:none;gap:44px;position:relative}
.web-client .auth-art h1{position:relative;font-size:clamp(56px,5.5vw,82px);line-height:1.04;letter-spacing:-.07em;font-weight:700;margin:0 0 24px;color:#dedede;text-shadow:0 0 14px #ffffff24,0 0 42px #ffffff12}
.web-client .title-sheen{position:absolute;inset:0;display:block;pointer-events:none;user-select:none;color:transparent;text-shadow:none;background:linear-gradient(110deg,transparent 43%,#ffffffb3 48%,#fff 50%,#fff 52%,transparent 58%);background-size:260% 100%;background-position:100% 0;background-clip:text;-webkit-background-clip:text;filter:drop-shadow(0 0 5px #fff) drop-shadow(0 0 16px #ffffff80);animation:neon-text-sweep 6s cubic-bezier(.45,0,.2,1) infinite}
.web-client .auth-art p{font-size:17px;line-height:1.75;color:#a4a4a8;max-width:360px;margin:0}
.web-download{margin-top:28px}
.web-download-link{display:inline-flex;align-items:center;justify-content:center;gap:10px;max-width:100%;min-height:50px;padding:14px 22px;border:1px solid #ffffffb3;border-radius:14px;background:#fff;color:#080808;text-decoration:none;font-size:14px;font-weight:650;line-height:1.4;box-shadow:0 0 24px #ffffff15;transition:transform .2s,box-shadow .2s}
.web-download-link svg{flex:0 0 20px}
.web-download-link:hover{transform:translateY(-2px);box-shadow:0 0 30px #ffffff30}
.web-download-link:active{transform:translateY(0)}
.web-client .auth-form{padding:40px 38px 30px;align-self:center;position:relative;isolation:isolate;overflow:visible;border:1px solid #ffffffb3;border-radius:28px;background:#000;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:0 0 3px #ffffff90,0 0 18px #ffffff26,0 0 52px #ffffff12;animation:card-arrive .65s cubic-bezier(.2,.7,.2,1) both}
.web-client .auth-form:before{content:"";position:absolute;inset:-1px;border:1px solid #fff;border-radius:inherit;box-shadow:0 0 7px #ffffff85,0 0 28px #ffffff33,inset 0 0 9px #ffffff14;opacity:.7;pointer-events:none;animation:neon-outline 5s ease-in-out infinite}
.web-client .auth-form h2{font-size:29px;font-weight:650;letter-spacing:-.045em;margin:0 0 8px;line-height:1.2}
.web-client .auth-form>p{font-size:14px;line-height:1.6;margin:0 0 29px;color:#99999e}
.web-client .auth-form .field{margin-bottom:18px;gap:8px}
.web-client .auth-form .field>span{font-size:12px;letter-spacing:.09em;font-weight:600;color:#b9b9bd}
.web-client .auth-form .input{height:51px;background:#000;border:1px solid #ffffff24;border-radius:12px;color:#eee;padding:0 15px;font-size:15px;transition:border-color .2s,box-shadow .2s}
.web-client .auth-form .input::placeholder{color:#616166}
.web-client .auth-form .input:focus{border-color:#ffffff65;box-shadow:0 0 0 3px #ffffff05;outline:none}
.web-client .auto-login{border:0;background:none;padding:1px 0 12px;margin:0 0 14px;border-radius:0;min-height:0}
.web-client .auto-login-copy b{font-size:13px;font-weight:450;color:#adadb2}.web-client .auto-login-copy small{display:none}
.web-client .auto-login .toggle{transform:scale(.84);transform-origin:right center}
.web-client .auth-submit{border-radius:12px;height:51px;min-height:51px;padding:0 16px;font-size:14px;font-weight:650;box-shadow:0 3px 24px #ffffff0c;transition:transform .2s,box-shadow .2s;display:flex;align-items:center;justify-content:center;gap:10px}
.web-client .auth-submit:not(:disabled):hover{transform:translateY(-1px);box-shadow:0 5px 32px #ffffff26}
.web-client .auth-submit:disabled{opacity:.65;cursor:wait}
.web-client .auth-submit.loading:before{content:"";width:13px;height:13px;border:2px solid #0004;border-top-color:#111;border-radius:50%;animation:spin .8s linear infinite}
.web-client .auth-error{font-size:13px;line-height:1.5;min-height:0;margin:12px 0 0;color:#e0e0e4}
.web-client .auth-error:empty{margin:0}
.web-client .auth-switch{margin:25px 0 0;font-size:13px;color:#a2a2a7;line-height:1.5}.web-client .auth-switch b{font-weight:600;color:#fff}
.password-wrap{position:relative}.web-client .password-wrap .input{padding-right:74px;width:100%}.password-toggle{position:absolute;right:12px;top:0;height:51px;border:0;background:none;color:#aaa;font:12px inherit;cursor:pointer}
.web-password-help{font-size:12px;color:#929297;line-height:1.5;margin:7px 0 0}
.web-client :focus-visible{outline:2px solid #ddd;outline-offset:4px}
.web-client.signed-in{height:100dvh;min-height:0;overflow:hidden}
.signed-in .web-nav{height:54px;width:100%;padding:0 20px;background:#0a0a0ab8;backdrop-filter:blur(20px)}
.signed-in .web-brand{font-size:14px}.signed-in .web-brand img{width:26px;height:26px}
.signed-in .web-ambient{opacity:.12}
.web-client .app{position:relative;z-index:1;height:calc(100dvh - 54px);min-height:0;border-radius:0}
.web-client .app.hidden{display:none!important}.web-client .call-layer{top:0}.web-client .active-call-bar{bottom:18px}
.web-back{display:none}.web-notification-setting .btn{flex-shrink:0;padding:9px 13px}
@keyframes neon-text-sweep{0%,12%{background-position:100% 0}68%,100%{background-position:0% 0}}
@keyframes neon-outline{0%,100%{opacity:.55}50%{opacity:.95}}
@keyframes card-arrive{from{opacity:0;transform:translateY(15px)}to{opacity:1;transform:none}}
@keyframes spin{to{transform:rotate(360deg)}}
@media(min-width:1600px){.web-client .auth-card{gap:140px}.web-client .auth-form{padding:46px 42px 36px}}
@media(max-width:1000px){.web-nav{width:calc(100% - 64px)}.web-client .auth{padding:45px 32px}.web-client .auth-card{gap:35px;grid-template-columns:minmax(0,1fr) minmax(350px,1fr)}.web-client .auth-art h1{font-size:58px}.web-client .auth-form{padding:32px 26px}.web-client .auth-art p{font-size:15px}}
@media(max-width:760px){.web-nav{height:76px;width:calc(100% - 40px)}.web-client .auth{padding:38px 20px 44px;min-height:calc(100dvh - 76px)}.web-client .auth-card{display:flex;flex-direction:column;gap:30px;max-width:430px;min-height:0}.web-client .auth-art{padding:0;gap:0}.web-client .auth-art>img,.web-client .auth-signature{display:none}.web-client .auth-art h1{font-size:43px;margin:0 0 12px;letter-spacing:-.065em}.web-client .auth-art h1 br{display:none}.web-client .auth-art h1 br:after{content:" "}.web-client .auth-art p{font-size:14px;line-height:1.65;max-width:350px}.web-client .auth-form{width:100%;padding:28px 24px;border-radius:22px}.web-client .auth-form h2{font-size:25px}.web-client .auth-form>p{margin-bottom:24px}.web-brand{font-size:15px}.web-brand img{width:29px;height:29px}.web-nav-link{font-size:13px;gap:12px}}
@media(max-width:700px){.web-client .app{display:grid;grid-template-columns:62px minmax(0,1fr)}.web-client .side{display:flex;width:auto;min-width:0}.web-client .chat,.web-client .profile{display:none}.web-client.web-chat-open .app{display:block}.web-chat-open .server-rail,.web-chat-open .side{display:none}.web-client.web-chat-open .chat{display:flex;height:100%;min-height:0}.web-back{display:inline-flex;flex-shrink:0}.web-client .chat-header{padding:0 10px;gap:6px}.web-client .header-actions{gap:0}.web-client .header-actions .iconbtn{width:29px;height:32px}.web-client .chat-title{min-width:0}.web-client .chat-title b{font-size:13px}.web-client #headerAvatar{display:none}.web-client .messages{padding:20px 12px}.web-client .composer-wrap{padding:8px}.web-client .composer{padding:6px;gap:4px}.web-client .composer-tools{gap:1px}.web-client #messageInput{padding:8px;font-size:14px}.web-client .modal{max-width:calc(100vw - 24px);padding:20px}.web-client .settings-grid{grid-template-columns:1fr}.web-client .settings-nav{display:flex}.web-client .peer-volume-row{grid-template-columns:minmax(90px,1fr) minmax(70px,1fr) 38px}.web-client .web-nav{height:48px}.web-client .app{height:calc(100dvh - 48px)}.web-client .active-call-bar{left:8px;right:8px;bottom:8px}.web-client .call-chat-panel{width:100%;max-width:100%}}
@media(prefers-reduced-motion:reduce){.web-client *, .web-client *:before{animation:none!important;transition:none!important;scroll-behavior:auto!important}.web-ambient i{will-change:auto}}
@media(prefers-reduced-motion:reduce){.web-client .title-sheen{display:none}}
@media(max-width:700px){.web-client .dock-copy{display:block;min-width:0;flex:1}.web-client .dock-name{font-size:12px}.web-client .dock-tag{font-size:11px}.web-client .header-actions .iconbtn{display:inline-flex}}

/* Small screens: touch targets, keyboard-aware height and no fixed-height auth card. */
body.web-client{overflow-x:clip}
.web-client .auth-form{min-width:0}
@media(max-width:760px){
  .web-client .auth{padding:28px max(16px,env(safe-area-inset-right)) max(28px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));align-items:start}
  .web-client .auth-card{height:auto;min-height:0}
  .web-client .auth-form .input,.web-client textarea.input,.web-client #messageInput,.web-client #callChatInput{font-size:16px}
  .web-client .auth-form .auto-login-copy{overflow-wrap:anywhere}
  .web-client .auth-switch,.web-client .web-nav-link{min-height:44px}
  .web-client .password-toggle{min-width:60px;font:13px inherit}
  .web-client .web-nav{height:76px}
}
@media(max-width:700px){
  .web-client.signed-in{position:relative;height:var(--web-viewport-height,100dvh)}
  .web-client.signed-in .web-nav{height:48px}
  .web-client .app{height:calc(var(--web-viewport-height,100dvh) - 48px)}
  .web-client.web-chat-open .chat{display:grid;grid-template-rows:auto minmax(0,1fr) auto}
  .web-client .chat-header{height:auto;min-height:98px;flex-wrap:wrap;padding:3px 10px;gap:0 8px}
  .web-client .web-back{width:44px;height:44px}
  .web-client .header-actions{flex-basis:100%;justify-content:space-between}
  .web-client .header-actions .iconbtn{width:44px;height:44px;flex:0 0 44px}
  .web-client .composer{display:grid;grid-template-columns:44px minmax(0,1fr);grid-template-rows:auto auto;gap:4px}
  .web-client #messageInput{grid-column:1/-1;grid-row:1;width:100%;min-width:0;max-height:120px}
  .web-client .composer-tools:first-child{grid-column:1;grid-row:2}
  .web-client .composer-tools:last-child{grid-column:2;grid-row:2;justify-self:end}
  .web-client .composer-tools .iconbtn{min-width:40px;height:40px}
  .web-client .composer-wrap{padding-bottom:max(8px,env(safe-area-inset-bottom))}
  .web-client .message{grid-template-columns:36px minmax(0,1fr);gap:8px;padding:6px}
  .web-client .message-actions{position:static;grid-column:2;max-width:100%;width:fit-content;margin:5px 0 0 auto;opacity:1;transform:none;gap:3px}
  .web-client .message-actions button{width:38px;height:38px;flex-basis:38px}
  .web-client .modal-layer{height:var(--web-viewport-height,100dvh);bottom:auto;padding:12px}
  .web-client .modal{max-height:calc(var(--web-viewport-height,100dvh) - 24px)}
  .web-client .settings-modal .settings-nav{position:static}
  .web-client .settings-modal .settings-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible;gap:4px}
  .web-client .settings-modal .settings-nav button{min-width:0;min-height:44px;padding:8px 4px;white-space:normal;font-size:12px}
  .web-client .call-layer{height:var(--web-viewport-height,100dvh);bottom:auto}
  .web-client .videos{grid-template-columns:minmax(0,1fr)}
  .web-client .call-controls{height:auto;min-height:72px;padding:10px 8px max(10px,env(safe-area-inset-bottom));gap:6px}
  .web-client .call-controls .iconbtn{width:44px;height:44px;flex:0 0 44px;border-radius:13px}
  .web-client .active-call-bar{position:absolute;left:8px;right:8px;width:auto;max-width:none;min-height:64px;padding:8px;gap:8px}
  .web-client .active-call-copy>span{display:flex;align-items:center;gap:4px;white-space:nowrap}
  .web-client .active-call-copy>span span{display:inline;overflow:hidden;text-overflow:ellipsis}
  .web-client .active-call-copy .call-live-dot{display:inline-block}
  .web-client:has(#activeCallBar:not(.hidden)) .composer-wrap{padding-bottom:90px}
  .web-client .crop-card{padding:18px;max-height:calc(var(--web-viewport-height,100dvh) - 24px);overflow:auto}
  .web-client .crop-canvas{max-width:100%;height:auto;aspect-ratio:1}
}
@media(hover:none){.web-client .attachment-media-actions{opacity:1;inset:0 0 auto;min-height:48px;padding:6px;justify-content:flex-end;background:linear-gradient(#0009,transparent);backdrop-filter:none}}
@media(max-width:360px){.web-client .auth-art h1{font-size:36px}.web-client .auth-form{padding:24px 18px}.web-client .auth-form h2{font-size:24px}.web-client .web-brand{font-size:14px}.web-client .web-nav-link{gap:8px}.web-client .web-nav{width:calc(100% - 32px)}}
@media(max-width:360px){.web-client .message-actions{gap:2px}.web-client .message-actions button{width:36px;height:36px;flex-basis:36px}}
