/* Main landing only. Account actions grow after the session has been checked. */
.anonymous-chat-home .navigation {
  display: grid;
  grid-template-columns: auto minmax(max-content,1fr) auto auto;
  grid-template-areas: "brand links account theme";
  align-items: center;
  width: min(1200px,calc(100% - 48px));
  gap: 0 clamp(10px,.8vw,12px);
}
.anonymous-chat-home .navigation > .brand {grid-area:brand}
.anonymous-chat-home .navigation > .public-theme-switch {grid-area:theme}
.anonymous-chat-home .navigation > .menu-button {grid-area:menu;display:none}
.anonymous-chat-home .navigation > .nav-links {
  grid-area:links;display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;
  margin:0;padding:0;width:auto;gap:clamp(10px,.9vw,14px);
}
.anonymous-chat-home .navigation > .landing-account {
  grid-area:account;justify-self:end;align-items:center;flex-wrap:nowrap;
  width:auto;margin:0;padding:0;gap:8px;
}
.anonymous-chat-home .landing-account :is(.nav-download,.account-logout) {white-space:nowrap}
.anonymous-chat-home .landing-account [data-auth-status] {white-space:nowrap}
.anonymous-chat-home .landing-account .nav-download {padding-inline:14px;gap:10px}
/* A real login error can be much longer than “Вы вошли”. Keep its full text. */
.anonymous-chat-home .navigation:has(.auth-error:not([hidden]),[data-auth-logout][hidden]) .landing-account [data-auth-status]:not([hidden]) {
  display:block;max-width:16ch;flex-basis:auto;line-height:1.25;white-space:normal;overflow-wrap:anywhere;
}

@media (max-width:77.99em) {
  .anonymous-chat-home .navigation {
    grid-template-columns:minmax(0,1fr) auto auto auto;
    grid-template-areas:"brand account theme menu" "links links links links";
    min-height:68px;padding-block:10px;
  }
  .anonymous-chat-home .navigation > .brand {justify-self:start}
  .anonymous-chat-home .navigation > .menu-button {display:none}
  .js .anonymous-chat-home .navigation > .menu-button {display:inline-grid;place-items:center}
  .anonymous-chat-home .navigation > .nav-links,
  .js .anonymous-chat-home .navigation > .nav-links.open {
    display:grid;grid-template-columns:repeat(auto-fit,minmax(min(10rem,100%),1fr));
    align-items:stretch;gap:0 12px;width:100%;margin-top:10px;padding:8px 0 2px;border-top:1px solid var(--line);
  }
  .js .anonymous-chat-home .navigation > .nav-links:not(.open) {display:none}
  .anonymous-chat-home .navigation > .nav-links a {padding:9px 0;white-space:normal}
  .anonymous-chat-home .landing-account [data-auth-status]:not(.auth-error) {display:none}
}
@media (max-width:30em) {
  .anonymous-chat-home .navigation {width:calc(100% - 24px);column-gap:6px}
  .anonymous-chat-home .navigation .brand-caption {display:none}
  .anonymous-chat-home .navigation:has([data-auth-logout]:not([hidden]),[data-auth-status]:not([hidden])) {
    grid-template-areas:"brand brand theme menu" "account account account account" "links links links links";
  }
  .anonymous-chat-home .navigation:has([data-auth-logout]:not([hidden]),[data-auth-status]:not([hidden])) > .landing-account {
    justify-self:stretch;justify-content:flex-end;margin-top:6px;
  }
  .anonymous-chat-home .landing-account .nav-download {margin-left:0}
  .anonymous-chat-home .navigation > .nav-links,
  .js .anonymous-chat-home .navigation > .nav-links.open {grid-template-columns:1fr 1fr}
}
