.chat-app-page{
  --chat-sidebar-width:70px;
  --chat-control-slot:44px;
  --chat-png-canvas-size:40px;
  --chat-png-optical-gain:1;
  --chat-avatar-size:40px;
  --chat-svg-shell-size:40px;
  --chat-svg-glyph-size:18px;
  --chat-svg-shell-radius:14px;
  --chat-png-source-hue:345deg;
  --chat-png-depth-filter:
    drop-shadow(1.1px 1.6px 1.5px rgba(var(--shadow-warm-rgb),.10))
    drop-shadow(-.7px -.7px 1px rgba(var(--highlight-tint-rgb),.25));
  position:fixed;
  inset:0;
  z-index:110;
  display:flex;
  flex-direction:column;
  min-width:0;
  overflow:hidden;
  background:var(--ui-color);
  color:rgb(var(--ui-ink-rgb));
  transform:translate3d(18px,0,0);
  transition:opacity .22s ease,transform .27s cubic-bezier(.2,.72,.24,1),visibility 0s linear .27s;
}
.chat-sidebar-item[data-chat-tab="contacts"]{
  --chat-png-optical-gain:1.04;
}
.chat-app-page.active{
  transform:translate3d(0,0,0);
  transition-delay:0s;
}
.chat-login-view,
.chat-main-view{
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
}
.chat-login-view[hidden],
.chat-main-view[hidden],
.chat-switch-popover[hidden],
.chat-overflow-menu[hidden],
.chat-content-page[hidden]{display:none}
.chat-login-scroll{
  width:100%;
  height:100%;
  min-height:0;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior-y:contain;
  scrollbar-width:none;
}
.chat-login-scroll::-webkit-scrollbar{display:none}
.chat-login-layout{
  width:min(100%,560px);
  min-height:100%;
  margin:0 auto;
  padding:calc(env(safe-area-inset-top) + var(--system-status-offset) + 58px) var(--side-pad) calc(env(safe-area-inset-bottom) + 24px);
  display:grid;
  grid-template-rows:auto minmax(190px,1fr) auto auto;
}
.chat-login-hero{
  margin-top:58px;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}
.chat-login-logo{
  appearance:none;
  -webkit-appearance:none;
  width:68px;
  height:68px;
  margin:0;
  padding:0;
  border:var(--app-shell-border);
  border-radius:var(--radius);
  background-color:var(--ui-surface-background);
  color:var(--home-icon-color);
  box-shadow:var(--app-shell-shadow);
  backdrop-filter:var(--ui-surface-backdrop);
  -webkit-backdrop-filter:var(--ui-surface-backdrop);
  display:grid;
  place-items:center;
  transition:transform .14s ease,box-shadow .14s ease;
}
.chat-login-logo:active{
  transform:scale(var(--app-shell-active-scale));
  box-shadow:var(--app-shell-shadow-active);
}
.chat-login-logo .chat-login-logo-icon{
  display:block;
  width:var(--weixin-size);
  height:var(--weixin-size);
  fill:currentColor;
}
.chat-login-title{
  width:fit-content;
  max-width:100%;
  margin:18px auto 0;
  padding:0;
  color:rgb(var(--ui-ink-rgb));
  font-family:var(--global-font-family);
  font-size:21px;
  font-weight:400;
  line-height:1.15;
  letter-spacing:.06em;
  text-indent:.06em;
  cursor:pointer;
  user-select:none;
  -webkit-user-select:none;
  transition:transform .14s ease,opacity .14s ease;
}
.chat-login-title:active{
  transform:scale(.985);
  opacity:.8;
}
.chat-login-form{
  width:100%;
  align-self:center;
  display:flex;
  flex-direction:column;
  gap:18px;
  padding:28px 0 34px;
}
.chat-login-field{
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:7px;
}
.chat-login-label{
  padding-left:3px;
  color:color-mix(in srgb,rgb(var(--ui-ink-rgb)) 66%,transparent);
  font-family:var(--global-font-family);
  font-size:10.5px;
  font-weight:400;
  line-height:1.1;
}
.chat-login-input{
  appearance:none;
  -webkit-appearance:none;
  width:100%;
  min-width:0;
  height:48px;
  margin:0;
  padding:0 15px;
  border:var(--app-shell-border);
  border-radius:18px;
  outline:none;
  background-color:var(--ui-surface-background);
  color:rgb(var(--ui-ink-rgb));
  box-shadow:var(--app-shell-shadow);
  backdrop-filter:var(--ui-surface-backdrop);
  -webkit-backdrop-filter:var(--ui-surface-backdrop);
  font-family:var(--global-font-family);
  font-size:12px;
  font-weight:400;
  line-height:1;
  caret-color:rgb(var(--ui-ink-rgb));
  user-select:text;
  -webkit-user-select:text;
  transition:transform .14s ease,box-shadow .16s ease;
}
.chat-login-input:focus{
  transform:translateY(-1px);
  box-shadow:var(--app-shell-shadow);
}
.chat-login-input::placeholder{
  color:color-mix(in srgb,rgb(var(--ui-ink-rgb)) 34%,transparent);
}
.chat-login-field.is-missing .chat-login-input{
  animation:chat-login-required .34s ease 2;
}
@keyframes chat-login-required{
  50%{transform:translateX(2px);box-shadow:var(--app-shell-shadow-active)}
}
.chat-login-actions{
  width:100%;
  align-self:end;
}
.chat-login-feedback{
  min-height:15px;
  margin:0 0 8px;
  text-align:center;
  color:color-mix(in srgb,rgb(var(--ui-ink-rgb)) 66%,transparent);
  font-family:var(--global-font-family);
  font-size:9.5px;
  font-weight:400;
  line-height:1.4;
  opacity:0;
  transition:opacity .14s ease;
}
.chat-login-feedback.is-visible{opacity:.8}
.chat-login-submit{
  appearance:none;
  -webkit-appearance:none;
  width:100%;
  min-height:52px;
  margin:0;
  padding:0 18px;
  border:var(--app-shell-border);
  border-radius:21px;
  background-color:var(--ui-surface-background);
  color:rgb(var(--ui-ink-rgb));
  box-shadow:var(--app-shell-shadow);
  backdrop-filter:var(--ui-surface-backdrop);
  -webkit-backdrop-filter:var(--ui-surface-backdrop);
  font-family:var(--global-font-family);
  font-size:12px;
  font-weight:500;
  line-height:1;
  letter-spacing:.04em;
  transition:transform .14s ease,box-shadow .14s ease,opacity .14s ease;
}
.chat-login-submit:active{
  transform:scale(.985);
  box-shadow:var(--app-shell-shadow-active);
}
.chat-login-submit:disabled{opacity:.5}
.chat-login-footer{
  min-height:48px;
  padding-top:14px;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  gap:18px;
}
.chat-login-footer-link{
  appearance:none;
  -webkit-appearance:none;
  margin:0;
  padding:7px 3px 2px;
  border:0;
  background:transparent;
  color:color-mix(in srgb,rgb(var(--ui-ink-rgb)) 60%,transparent);
  font-family:var(--global-font-family);
  font-size:10px;
  font-weight:400;
  line-height:1;
  opacity:.72;
  transition:transform .14s ease,opacity .14s ease;
}
.chat-login-footer-link:active{
  transform:scale(.96);
  opacity:1;
}
.chat-login-footer-divider{
  width:1px;
  height:10px;
  margin-bottom:2px;
  background:color-mix(in srgb,rgb(var(--ui-ink-rgb)) 18%,transparent);
}
.chat-main-view{
  position:relative;
  display:grid;
  grid-template-columns:var(--chat-sidebar-width) minmax(0,1fr);
  overflow:hidden;
  background:var(--ui-color);
}
.chat-sidebar{
  position:relative;
  z-index:4;
  min-height:0;
  padding:calc(env(safe-area-inset-top) + var(--system-status-offset) + 14px) 9px calc(env(safe-area-inset-bottom) + 14px);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:9px;
  background:var(--ui-color);
  border-right:1px solid color-mix(in srgb,var(--ui-divider-border) 60%,transparent);
}
.chat-sidebar-avatar,
.chat-sidebar-item,
.chat-sidebar-lucide,
.chat-main-action{
  appearance:none;
  -webkit-appearance:none;
  flex:0 0 auto;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  color:rgb(var(--ui-ink-rgb));
  box-shadow:none;
  display:grid;
  place-items:center;
  transition:transform .14s ease,opacity .14s ease;
}
.chat-sidebar-avatar:active,
.chat-sidebar-item:active,
.chat-sidebar-lucide:active,
.chat-main-action:active{
  transform:scale(.92);
  box-shadow:none;
}
.chat-sidebar-avatar{
  position:relative;
  width:var(--chat-avatar-size);
  height:var(--chat-avatar-size);
  margin-bottom:6px;
  border:var(--app-shell-border);
  border-radius:50%;
  background-color:var(--ui-surface-background);
  box-shadow:var(--app-shell-shadow);
  backdrop-filter:var(--ui-surface-backdrop);
  -webkit-backdrop-filter:var(--ui-surface-backdrop);
}
.chat-sidebar-avatar-image{
  position:absolute;
  inset:0;
  z-index:2;
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:inherit;
}
.chat-sidebar-avatar.has-photo .avatar-silhouette{display:none}
.chat-sidebar-avatar:active{box-shadow:var(--app-shell-shadow-active)}
.chat-sidebar-item{
  --chat-png-scale:1;
  --chat-png-shift-x:0px;
  --chat-png-shift-y:0px;
  width:var(--chat-control-slot);
  height:var(--chat-control-slot);
  border-radius:0;
  opacity:.84;
}
.chat-sidebar-item.is-active{opacity:1}
.chat-sidebar-item img{
  display:block;
  width:var(--chat-png-canvas-size);
  height:var(--chat-png-canvas-size);
  object-fit:contain;
  pointer-events:none;
  user-select:none;
  -webkit-user-drag:none;
  filter:
    hue-rotate(calc(var(--home-png-theme-hue) - var(--chat-png-source-hue)))
    saturate(var(--home-png-theme-saturation))
    brightness(var(--home-png-theme-brightness))
    var(--chat-png-depth-filter);
  transform:translate3d(var(--chat-png-shift-x),var(--chat-png-shift-y),0) scale(var(--chat-png-scale));
  transform-origin:center;
  transition:filter .16s ease,opacity .14s ease,transform .14s ease;
}
.chat-sidebar-item.is-active img{
  filter:
    hue-rotate(calc(var(--home-png-theme-hue) - var(--chat-png-source-hue)))
    saturate(var(--home-png-theme-saturation))
    brightness(var(--home-png-theme-brightness))
    var(--chat-png-depth-filter);
}
.chat-sidebar-lucide{
  width:var(--chat-svg-shell-size);
  height:var(--chat-svg-shell-size);
  border:var(--app-shell-border);
  border-radius:var(--chat-svg-shell-radius);
  background-color:var(--ui-surface-background);
  box-shadow:var(--app-shell-shadow);
  backdrop-filter:var(--ui-surface-backdrop);
  -webkit-backdrop-filter:var(--ui-surface-backdrop);
  opacity:1;
}
#chatSwitchAccount{margin-top:6px}
.chat-sidebar-lucide .lucide-icon,
.chat-main-action .lucide-icon{
  width:var(--chat-svg-glyph-size);
  height:var(--chat-svg-glyph-size);
  fill:none;
  stroke:currentColor;
  stroke-width:1.65;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.chat-sidebar-lucide:active,
.chat-main-action:active{
  opacity:1;
  box-shadow:var(--app-shell-shadow-active);
}
.chat-main-shell{
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  background:var(--ui-color);
}
.chat-main-header{
  position:relative;
  z-index:3;
  flex:0 0 auto;
  min-height:74px;
  padding:calc(env(safe-area-inset-top) + var(--system-status-offset) + 13px) var(--side-pad) 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  background:var(--ui-color);
}
.chat-main-title-stack{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.chat-main-title{
  margin:0;
  color:rgb(var(--ui-ink-rgb));
  font-family:var(--global-font-family);
  font-size:19px;
  font-weight:500;
  line-height:1.05;
  letter-spacing:.02em;
}
.chat-main-subtitle{
  color:color-mix(in srgb,rgb(var(--ui-ink-rgb)) 48%,transparent);
  font-family:var(--global-font-family);
  font-size:8px;
  font-weight:400;
  line-height:1;
  letter-spacing:.16em;
}
.chat-main-actions{
  margin-left:auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:9px;
}
.chat-main-action{
  width:var(--chat-svg-shell-size);
  height:var(--chat-svg-shell-size);
  border:var(--app-shell-border);
  border-radius:var(--chat-svg-shell-radius);
  background-color:var(--ui-surface-background);
  box-shadow:var(--app-shell-shadow);
  backdrop-filter:var(--ui-surface-backdrop);
  -webkit-backdrop-filter:var(--ui-surface-backdrop);
  opacity:1;
}
.chat-content{
  position:relative;
  flex:1 1 auto;
  min-width:0;
  min-height:0;
  overflow:hidden;
}
.chat-content-page{
  position:absolute;
  inset:0;
  padding:18px var(--side-pad) calc(env(safe-area-inset-bottom) + 24px);
  display:grid;
  place-items:center;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-width:none;
  background:var(--ui-color);
}
.chat-content-page::-webkit-scrollbar{display:none}
.chat-switch-popover,
.chat-overflow-menu{
  position:absolute;
  z-index:20;
  border:var(--app-shell-border);
  background-color:var(--ui-surface-background);
  color:rgb(var(--ui-ink-rgb));
  box-shadow:var(--app-shell-shadow);
  backdrop-filter:var(--ui-surface-backdrop-strong);
  -webkit-backdrop-filter:var(--ui-surface-backdrop-strong);
}
.chat-switch-popover{
  left:calc(var(--chat-sidebar-width) + 10px);
  top:50%;
  width:min(244px,calc(100% - var(--chat-sidebar-width) - 24px));
  max-height:min(390px,62vh);
  padding:13px;
  border-radius:22px;
  transform:translateY(-22%);
  overflow:hidden;
}
.chat-popover-title{
  padding:2px 3px 10px;
  color:color-mix(in srgb,rgb(var(--ui-ink-rgb)) 64%,transparent);
  font-family:var(--global-font-family);
  font-size:9px;
  line-height:1;
  letter-spacing:.08em;
}
.chat-switch-list{
  max-height:330px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:8px;
  scrollbar-width:none;
}
.chat-switch-list::-webkit-scrollbar{display:none}
.chat-switch-account{
  appearance:none;
  -webkit-appearance:none;
  width:100%;
  min-width:0;
  min-height:54px;
  margin:0;
  padding:7px 9px;
  border:var(--app-shell-border);
  border-radius:17px;
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  align-items:center;
  gap:10px;
  text-align:left;
  background-color:var(--ui-surface-background);
  color:rgb(var(--ui-ink-rgb));
  box-shadow:var(--app-shell-shadow);
  backdrop-filter:var(--ui-surface-backdrop);
  -webkit-backdrop-filter:var(--ui-surface-backdrop);
  transition:transform .14s ease,box-shadow .14s ease,opacity .14s ease;
}
.chat-switch-account:active{transform:scale(.985);box-shadow:var(--app-shell-shadow-active)}
.chat-switch-account.is-current{box-shadow:var(--app-shell-shadow-active)}
.chat-switch-account-avatar{
  position:relative;
  width:38px;
  height:38px;
  border-radius:50%;
}
.chat-switch-account-avatar img{
  position:absolute;
  inset:0;
  z-index:2;
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:inherit;
}
.chat-switch-account-avatar.has-photo .avatar-silhouette{display:none}
.chat-switch-account-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.chat-switch-account-name,
.chat-switch-account-id{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-family:var(--global-font-family);
}
.chat-switch-account-name{font-size:11px;line-height:1.2}
.chat-switch-account-id{font-size:8.5px;line-height:1.2;color:color-mix(in srgb,rgb(var(--ui-ink-rgb)) 48%,transparent)}
.chat-switch-empty{
  padding:20px 8px;
  text-align:center;
  color:color-mix(in srgb,rgb(var(--ui-ink-rgb)) 52%,transparent);
  font-family:var(--global-font-family);
  font-size:9px;
}
.chat-overflow-menu{
  right:var(--side-pad);
  top:calc(env(safe-area-inset-top) + var(--system-status-offset) + 60px);
  width:112px;
  padding:7px;
  border-radius:17px;
}
.chat-overflow-action{
  appearance:none;
  -webkit-appearance:none;
  width:100%;
  min-height:38px;
  margin:0;
  padding:0 10px;
  border:0;
  border-radius:12px;
  background:transparent;
  color:rgb(var(--ui-ink-rgb));
  font-family:var(--global-font-family);
  font-size:10px;
  font-weight:400;
  text-align:center;
}
.chat-overflow-action:active{background:color-mix(in srgb,rgb(var(--ui-ink-rgb)) 6%,transparent)}
:root[data-theme-texture="solid"] .chat-app-page{
  --chat-png-depth-filter:drop-shadow(0 0 0 rgba(0,0,0,0));
}
:root[data-theme-texture="glass"] .chat-app-page{
  --chat-png-depth-filter:
    drop-shadow(1.2px 2px 2px rgba(var(--shadow-deep-rgb),.12))
    drop-shadow(-.8px -.8px 1.2px rgba(var(--highlight-tint-rgb),.22));
}
@media (max-width:360px){
  .chat-app-page{
    --chat-sidebar-width:66px;
    --chat-control-slot:42px;
    --chat-png-canvas-size:38px;
    --chat-avatar-size:38px;
    --chat-svg-shell-size:38px;
    --chat-svg-glyph-size:17px;
    --chat-svg-shell-radius:13px;
  }
  .chat-login-layout{
    padding-left:12px;
    padding-right:12px;
    padding-top:calc(env(safe-area-inset-top) + var(--system-status-offset) + 50px);
  }
  .chat-login-hero{margin-top:54px}
  .chat-login-logo{width:64px;height:64px}
  .chat-login-title{margin-top:16px;font-size:20px}
  .chat-login-form{padding-top:24px;padding-bottom:28px}
  .chat-sidebar{padding-left:8px;padding-right:8px;gap:8px}
  .chat-main-header{padding-left:13px;padding-right:13px}
  .chat-main-actions{gap:7px}
  .chat-content-page{padding-left:13px;padding-right:13px}
}
@media (max-height:700px){
  .chat-login-layout{
    padding-top:calc(env(safe-area-inset-top) + var(--system-status-offset) + 38px);
    grid-template-rows:auto minmax(150px,1fr) auto auto;
  }
  .chat-login-logo{width:60px;height:60px}
  .chat-login-title{margin-top:14px;font-size:19px}
  .chat-login-form{gap:14px;padding:20px 0 22px}
  .chat-login-footer{min-height:42px;padding-top:10px}
  .chat-sidebar{gap:8px}
  .chat-sidebar-avatar{margin-bottom:3px}
  #chatSwitchAccount{margin-top:3px}
  .chat-switch-popover{max-height:54vh}
}
@media (prefers-reduced-motion:reduce){
  .chat-app-page,
  .chat-login-logo,
  .chat-login-title,
  .chat-login-input,
  .chat-login-submit,
  .chat-login-footer-link,
  .chat-login-feedback,
  .chat-sidebar-avatar,
  .chat-sidebar-item,
  .chat-sidebar-lucide,
  .chat-main-action,
  .chat-switch-account{transition:none}
  .chat-login-field.is-missing .chat-login-input{animation:none}
}
