.account-quick {
  position: relative;
  display: grid;
  flex: 0 1 470px;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr)) 76px max-content;
  grid-auto-rows: 44px;
  gap: 7px;
}

.account-quick input,
.account-quick button {
  min-width: 0;
  min-height: 44px;
  padding: 7px 9px;
  border: 1px solid #799581;
  border-radius: 5px;
  font: inherit;
}

.account-quick input { background: #0c2019; color: #fffaf0; font-size: 16px; }
.account-quick input::placeholder { color: #bbcabe; }
.account-quick button { background: #d9e9d6; color: #132b1d; font-size: 13px; font-weight: 700; cursor: pointer; }
.account-quick button:hover { background: #edf4e9; }
.account-quick button:disabled { cursor: wait; }
.account-quick :focus-visible { outline: 2px solid #b3efc3; outline-offset: 2px; }

.account-recovery {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 4px;
  color: #f3eddf;
  font-size: 12px;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.account-recovery:hover { color: #b3efc3; }

.account-quick [role="status"] {
  position: absolute;
  z-index: 1;
  inset: calc(100% + 4px) 0 auto;
  margin: 0;
  padding: 5px 8px;
  border-radius: 4px;
  background: #281f1d;
  color: #ffe0d4;
  font-size: 12px;
  line-height: 1.45;
}

.account-quick [role="status"]:empty { padding: 0; }

.account-google {
  grid-column: 1 / -1;
  display: block;
  width: 230px;
  max-width: 100%;
  height: 44px;
  border: 0;
  color-scheme: light;
  background: transparent;
}
.account-google[inert] { opacity: .55; }
.site-header .header-inner:has(.account-google) { height: auto; min-height: 120px; padding-block: 10px; }

@media (max-width: 1050px) {
  .account-quick { flex-basis: 290px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 7px; }
  .account-quick button { min-width: 76px; justify-self: end; }
  .site-header .header-inner:has(.account-google) { min-height: 154px; }
}

@media (701px <= width <= 1620px) {
  .feature-section-visible .header-inner:has(.account-quick) > .desktop-nav {
    position: static;
    margin-inline-start: auto;
    transform: none;
  }
}

@media (max-width: 700px) {
  body:not(.feature-section-visible) .site-header .header-inner:has(.account-quick) { height: auto; min-height: 76px; flex-wrap: wrap; row-gap: 0; padding-bottom: 10px; }
  body:not(.feature-section-visible) .site-header .header-inner:has(.account-quick) > .brand { margin-block: 8px; }
  .account-quick { order: 1; flex-basis: 100%; }
  body:not(.feature-section-visible) .site-header:has(.account-quick) .mobile-nav { top: 100%; }
  .feature-section-visible .account-quick { display: none; }
}

html:root {
  scrollbar-gutter: stable;
  scroll-behavior: auto;
}

html:has(#account-dialog[open]) { overflow: hidden; }

#account-dialog {
  width: min(408px, calc(100% - 24px));
  height: min(480px, calc(100dvh - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid #a5af98;
  border-radius: 10px;
  background: #f3eddf;
  color: #132a1d;
  box-shadow: 0 18px 60px #02080566;
  overflow: hidden;
}

#account-dialog[open] { display: grid; grid-template-rows: 48px minmax(0, 1fr); }

#account-dialog::backdrop {
  background: #030c0875;
  backdrop-filter: blur(2px);
}

.account-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 4px 6px 0 auto;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #435c49;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.account-close:hover { background: #e8e9dd; }
.account-close:focus-visible { outline: 2px solid #28603c; outline-offset: -4px; }

#account-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #f3eddf;
}

.account-loading {
  display: grid;
  gap: 12px;
  padding: 16px 24px 30px;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  align-content: center;
  min-height: 0;
  overflow: auto;
}

#account-dialog [hidden] { display: none; }
.account-loading a { color: #28603c; text-decoration: underline; text-underline-offset: 4px; }
.account-loading p { color: #526655; }
.account-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.account-noscript { padding: 20px; text-align: center; color: var(--gold); }
.community-counts {
  margin: 0 0 clamp(12px, 2vw, 24px);
  color: #f4f4ed;
  text-align: left;
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.4;
  text-shadow: 0 1px 6px #000;
}
.community-counts-grid {
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
  row-gap: 12px;
  margin: 0;
}
.community-counts-grid > div {
  display: flex;
  flex-direction: row-reverse;
  align-items: baseline;
  gap: 9px;
}
.community-counts-grid > div + div { padding-left: 24px; border-left: 1px solid #e7c58a99; }
.community-counts-grid dt { font-weight: 650; }
.community-counts-grid dd { margin: 0; color: #f3d38b; font-size: clamp(28px, 2.6vw, 40px); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.community-counts-status { margin: 4px 0 0; font-size: 12px; }
@media (max-width: 520px) {
  .community-counts-grid { column-gap: 16px; }
  .community-counts-grid > div { flex-direction: column-reverse; align-items: flex-start; gap: 3px; }
  .community-counts-grid > div + div { padding-left: 16px; }
}
