/* Folding never changes the session; cinema also allows desktop profile folding. */
#profile-unfold{position:fixed;top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));width:44px;height:44px;padding:0;overflow:hidden;border:1px solid #7191b4;border-radius:12px;background:#10243a;color:#b5cce6;box-shadow:0 4px 14px #0004;z-index:26}
#profile-unfold .hud-icon{width:30px;height:30px;margin:auto}
#profile-unfold:focus-visible,.profile-fold:focus-visible{outline:2px solid #b9d8ff;outline-offset:2px}
body:has(#start:not([hidden])) :is(#profile-folded-dock,#work-badge){visibility:hidden}
body.bolha-chat-typing #profile-folded-dock{visibility:hidden}
.online-mode-icon,.online-mode-short{display:none}
#bolha-profile .profile-fold{display:grid;place-items:center;flex:none;align-self:flex-start;width:32px;height:32px;padding:0;border:0;border-radius:8px;background:transparent;color:#9bb3ce;font:22px/1 system-ui;cursor:pointer}
#bolha-profile .profile-fold:hover,#bolha-profile .profile-fold:active{background:#ffffff0b;color:#ecf3fc}
@media(max-width:700px),(max-height:500px) and (orientation:landscape){
 body.bolha-hud :is(#phone-unfold,#bolha-public-chat.city-chat-folded){
  border:1px solid #385975;border-radius:12px;background:#0e2234;color:#a8d0ff;
  box-shadow:none
 }
 body.bolha-hud #phone-unfold{width:46px;height:46px;bottom:max(28px,calc(env(safe-area-inset-bottom) + 8px))}
 body.bolha-hud #phone-unfold::before{
  inset:50% auto auto 50%;width:13px;height:20px;box-sizing:border-box;
  transform:translate(-50%,-50%);border:1.5px solid currentColor;border-radius:3px;background:none
 }
 body.bolha-hud #phone-unfold::after{
  inset:calc(50% + 5px) auto auto calc(50% - 1px);width:2px;height:2px;background:currentColor
 }
 body.bolha-hud #bolha-public-chat.city-chat-folded{overflow:visible}
 body.bolha-hud #bolha-public-chat.city-chat-folded .city-chat-toggle{border-radius:11px;color:inherit}
 body.bolha-hud #bolha-public-chat.city-chat-folded .city-chat-toggle .hud-icon{width:19px;height:19px}
 body.bolha-hud :is(#phone-unfold:active,#bolha-public-chat.city-chat-folded .city-chat-toggle:active){background:#284f70}
 body.bolha-hud #stick{opacity:.48;transition:opacity .12s}
 body.bolha-hud #stick:active{opacity:.7}
 body.bolha-hud.profile-folded #work-badge:not([hidden]){display:block!important;top:calc(max(12px,env(safe-area-inset-top)) + 54px);right:max(12px,env(safe-area-inset-right));max-width:190px;min-height:40px;padding:8px 10px;border:1px solid #42648599;border-radius:10px;background:#0b1b2ce8;color:#ecf3fc;font:12px/1.4 system-ui;font-variant-numeric:tabular-nums;z-index:26}
 body.bolha-hud.profile-folded:has(#work-panel:not([hidden])) #work-badge{display:none!important}
 body.bolha-hud.profile-folded.theater-watching #work-badge:not([hidden]){display:none!important}
}
@media(max-width:700px) and (orientation:portrait){
 body.bolha-hud #work-panel.timer-card.compact-work,body.bolha-hud:has(#minimap:not([hidden])) #work-panel.timer-card.compact-work{--work-top:calc(max(12px,env(safe-area-inset-top)) + var(--bolha-profile-height,150px) + 12px)}
}
@media(max-width:700px) and (max-height:740px) and (orientation:portrait){
 body.bolha-phone-open :is(#profile-folded-dock,#work-badge){visibility:hidden}
}

.profile-header-audio:empty{display:none}
body.profile-compact #bolha-profile{width:min(252px,calc(100vw - 24px));padding:6px;background:#0d2033}
body.profile-compact .profile-header{gap:4px;margin-bottom:5px;min-height:48px}
body.profile-compact .profile-header-audio{flex:none}
body.profile-compact .profile-avatar{width:30px;height:32px}
body.profile-compact #bolha-profile .profile-fold{width:27px;height:44px;align-self:center}
body.profile-compact .profile-guest-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.profile-compact #bolha-profile #auth.profile-guest button{min-height:18px;padding:1px 0;font-size:0}
body.profile-compact #bolha-profile #auth.profile-guest button::after{content:'Войти';font-size:11px}
body.profile-compact #bolha-profile #auth:not(.profile-guest){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px}
body.profile-compact #bolha-profile #auth:not(.profile-guest)>span{grid-column:1/-1}
body.profile-compact #bolha-profile #auth:not(.profile-guest)>button{width:24px;height:24px;padding:3px}
body.profile-compact .profile-stats{grid-template-columns:repeat(4,minmax(0,1fr));margin:0;padding:0}
body.profile-compact .profile-stats>button{
 display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
 box-sizing:border-box;min-width:0;min-height:44px;margin:0;padding:3px 2px;
 color:var(--hud-ink);background:none;border:0;font:600 11px/1.2 system-ui;text-align:center
}
body.profile-compact .profile-stats>button+button{border-left:1px solid #42648555}
body.profile-compact .profile-stats .hud-icon{width:15px;height:15px}
body.profile-compact .profile-stats #bolha-online-toggle span{flex:none;font-size:10px}
body.profile-compact .profile-stats #bolha-online-toggle .hud-icon:last-child,
body.profile-compact .profile-stats .online-mode-full,
body.profile-compact .online-header:empty{display:none}
body.profile-compact .profile-stats .online-mode-icon,
body.profile-compact .profile-stats .online-mode-short{display:block}
body.profile-compact .profile-stats .online-mode-short{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.profile-compact .profile-stats :is(.online-voice-mode,#bolha-online-toggle[aria-expanded="true"]){cursor:pointer}
body.profile-compact .profile-stats #bolha-online-toggle[aria-expanded="true"]{background:#19364c}
body.profile-compact .profile-stats>button:focus-visible{outline:2px solid var(--hud-blue);outline-offset:-2px}
body.profile-compact.profile-folded #work-badge:not([hidden]){display:none!important}
body.profile-compact #profile-folded-dock:not([hidden]){
 position:fixed;top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));z-index:26;
 display:flex;align-items:center;gap:4px;padding:4px;border:1px solid #365571;border-radius:12px;background:#0d2033
}
body.profile-compact #profile-folded-dock #profile-unfold{position:static;flex:none;border:0;background:none;box-shadow:none}
body.profile-compact #profile-folded-dock #profile-unfold .avatar-portrait{width:28px;height:28px;margin:auto}
body.profile-compact #profile-folded-dock #profile-unfold .hud-icon{width:27px;height:27px}
body.profile-compact :is(#bolha-profile,#profile-folded-dock) .online-controls .voice-chip{
 position:relative;display:grid;place-items:center;box-sizing:border-box;width:44px;height:44px;
 min-width:44px;padding:0;border:1px solid #42648555;border-radius:9px;background:#132b43;color:var(--hud-blue)
}
body.profile-compact :is(#bolha-profile,#profile-folded-dock) .online-controls .voice-chip.off{color:#ff7d84;background:#301c2a85;border-color:#5b344766}
body.profile-compact #profile-folded-dock .voice-chip .ic{width:19px;height:19px}
body.profile-compact #profile-folded-dock .voice-chip small{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
body.profile-compact #profile-folded-dock .voice-chip.off[data-kind=speaker]::after{
 content:'';position:absolute;left:11px;top:21px;width:20px;height:1.5px;background:currentColor;transform:rotate(-45deg)
}
body.profile-compact #profile-folded-dock .voice-chip:focus-visible{outline:2px solid var(--hud-blue);outline-offset:-2px}
