/* Official MAX / Telegram icon buttons — /newver/ only. */
body.v2.nv a.nv-msg.m-max,
body.v2.nv a.nv-msg.m-tg,
body.v2.nv .hdr a.nv-msg.m-max,
body.v2.nv .hdr a.nv-msg.m-tg,
body.v2.nv .msgs a.m-max,
body.v2.nv .msgs a.m-tg,
body.v2.nv-light .ftr .msgs a.m-max,
body.v2.nv-light .ftr .msgs a.m-tg,
body.v2.nv-light .msgs a.m-max,
body.v2.nv-light .msgs a.m-tg{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  width:42px;
  height:42px;
  min-width:42px;
  min-height:42px;
  padding:0;
  gap:0;
  border:0;
  border-radius:var(--rb,10px);
  overflow:hidden;
  background:transparent;
  line-height:0;
  flex:none;
  text-decoration:none;
  box-shadow:none;
}
body.v2.nv a.nv-msg.m-max img,
body.v2.nv a.nv-msg.m-tg img,
body.v2.nv .msgs a.m-max img,
body.v2.nv .msgs a.m-tg img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  border:0;
}
@media (max-width:980px){
  body.v2.nv .hdr .nv-actions .nv-msg.m-max,
  body.v2.nv .hdr .nv-actions .nv-msg.m-tg{
    width:38px;
    height:38px;
    min-width:38px;
    min-height:38px;
    border-radius:50%;
  }
  /* burger: same official squares, no captions */
  body.v2.nv .hdr .nv-nav-contacts .nv-msg.m-max,
  body.v2.nv .hdr .nv-nav-contacts .nv-msg.m-tg{
    width:42px;
    height:42px;
    min-width:42px;
    min-height:42px;
    padding:0;
    border-radius:var(--rb,10px);
  }
}
@media (max-width:640px){
  body.v2.nv .hdr .nv-actions .nv-msg.m-max,
  body.v2.nv .hdr .nv-actions .nv-msg.m-tg{
    width:34px;
    height:34px;
    min-width:34px;
    min-height:34px;
    border-radius:50%;
  }
}

/* Header: swap write-letter and search on desktop */
@media (min-width:981px){
  body.v2.nv .nv-mid{flex:0 0 auto}
  body.v2.nv .nv-actions{
    flex:1 1 auto;
    min-width:0;
    justify-content:flex-start;
  }
  body.v2.nv .hdr .nv-actions .nv-nav-search{
    position:relative;
    display:flex;
    align-items:center;
    box-sizing:border-box;
    height:42px;
    margin:0;
    flex:0 0 200px;
    width:200px;
    max-width:200px;
    min-width:200px;
    padding-left:10px;
    box-shadow:none;
  }
  body.v2.nv .hdr .nv-actions .nv-nav-search .s-res{
    z-index:120;
    left:auto;
    right:0;
    width:min(360px, calc(100vw - 64px));
    min-width:100%;
  }
}
@media (max-width:980px){
  /* search now lives in .nv-actions; keep it out of the compact header */
  body.v2.nv .hdr .nv-actions .nv-nav-search{display:none !important}
}

/* Header email next to phones; compact search */
body.v2.nv .nv-mid .nv-mail-hdr{
  display:inline-flex;
  align-items:center;
  gap:6px;
  flex:none;
  font-weight:700;
  font-size:15.5px;
  line-height:1.25;
  color:var(--fg);
  text-decoration:none;
  white-space:nowrap;
  letter-spacing:0;
}
body.v2.nv .nv-mid .nv-mail-hdr .ic{
  width:16px;
  height:16px;
  flex:none;
  color:var(--ac,#3D8BFF);
}
body.v2.nv .nv-mid .nv-mail-hdr:hover{color:var(--ac,#3D8BFF);text-decoration:underline}
@media (min-width:981px) and (max-width:1099.98px){
  /* email may not fit with compact search; hide only on narrow desktop */
  body.v2.nv .nv-mid .nv-mail-hdr{display:none}
}
