.app-shell.guest {
  display: block;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
}

.app-shell.guest .auth-page {
  box-sizing: border-box;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 16px !important;
}

/* Reset inherited grid gaps and margins so spacing is counted only once. */
.auth-page .auth-card {
  width: min(440px, 100%) !important;
  padding: 22px 26px !important;
  gap: 0;
}

.auth-page .auth-brand {
  margin: 0;
  gap: 9px !important;
  font-size: 12px !important;
}

.auth-page .auth-brand .cloud-brand-mark {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px;
}

.auth-page .auth-title {
  margin: 10px 0 4px !important;
  font-size: 24px !important;
  line-height: 1.2;
}

.auth-page .auth-subtitle {
  margin: 0 auto 12px !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}

.auth-page .auth-tabs {
  padding: 3px !important;
}

.auth-page .auth-tab {
  min-height: 38px !important;
}

.auth-page .auth-form {
  margin-top: 12px !important;
  gap: 10px;
}

.auth-page .auth-field {
  margin: 0 !important;
  gap: 4px !important;
}

.auth-page .auth-field input {
  min-height: 44px !important;
  height: 44px !important;
  padding: 9px 12px !important;
}

.auth-page .auth-submit {
  min-height: 44px !important;
  margin-top: 2px !important;
}

.auth-page .auth-switcher {
  display: flex !important;
  margin-top: 0 !important;
  min-height: 0;
  gap: 0 10px !important;
}

.auth-page .auth-switcher .link {
  min-height: 30px !important;
  padding: 4px 0 !important;
}

.auth-downloads {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--br-cloud-line);
}

.auth-downloads__title {
  margin: 0 0 8px;
  color: var(--br-cloud-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

.auth-downloads__stores {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auth-downloads__store {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 6px 10px;
  border: 1px solid var(--br-cloud-line);
  border-radius: 12px;
  color: var(--br-cloud-ink);
  background: var(--br-cloud-surface-soft);
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease;
}

.auth-downloads__store:hover {
  color: var(--br-cloud-teal);
  border-color: var(--br-cloud-teal);
}

.auth-downloads__store > span {
  display: grid;
  gap: 2px;
}

.auth-downloads__store small {
  color: var(--br-cloud-muted);
  font-size: 10px;
  line-height: 1.4;
}

.auth-downloads__store strong {
  font-size: 16px;
  font-weight: 750;
  line-height: 1.25;
  white-space: nowrap;
}

.auth-page .auth-downloads__platform {
  width: 28px;
  height: 28px;
  fill: currentColor;
  stroke: none;
}

.auth-downloads__eye {
  fill: var(--br-cloud-surface-soft);
}

.auth-downloads__direct {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 54px;
  margin-top: 4px;
  text-align: center;
}

.auth-downloads__apk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  color: var(--br-cloud-teal);
  font-size: 12px;
  font-weight: 650;
  text-underline-offset: 3px;
}

.auth-page .auth-downloads__apk svg {
  width: 17px;
  height: 17px;
}

.auth-downloads__details {
  color: var(--br-cloud-muted);
  font-size: 11px;
  line-height: 1.5;
}

.auth-downloads__retry {
  min-height: 40px;
  padding: 5px 10px;
  border: 0;
  color: var(--br-cloud-teal);
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  cursor: pointer;
}

.auth-downloads a:focus-visible,
.auth-downloads button:focus-visible {
  outline: 2px solid var(--br-cloud-teal);
  outline-offset: 3px;
}

@media (max-width: 460px) {
  .app-shell.guest .auth-page { padding: 54px 10px 12px !important; }
  .auth-page .auth-card { padding: 16px 18px !important; }
  .auth-page .auth-field input { font-size: 16px !important; }
  .auth-page .auth-theme-switcher { top: 10px !important; right: 10px !important; }
}

@media (max-width: 360px) {
  .auth-downloads__store { gap: 7px; padding: 8px 6px; }
  .auth-downloads__store strong { font-size: 15px; }
  .auth-page .auth-downloads__platform { width: 24px; height: 24px; }
}

@media (max-width: 460px) and (max-height: 700px) {
  .app-shell.guest .auth-page { padding-bottom: 8px !important; }
  .auth-page .auth-card { padding: 12px 14px !important; }
  .auth-page .auth-brand .cloud-brand-mark { width: 28px !important; height: 28px !important; min-width: 28px; }
  .auth-page .auth-title { margin-top: 6px !important; }
  .auth-page .auth-subtitle { margin-bottom: 8px !important; }
  .auth-page .auth-form { margin-top: 8px !important; gap: 8px; }
  .auth-page .auth-field { gap: 3px !important; }
  .auth-downloads { margin-top: 8px; padding-top: 8px; }
  .auth-downloads__title { margin-bottom: 6px; }
}
