/* The photo and account flow stay in place; sign-in uses the phone palette. */
@media screen and (max-width: 760px), screen and (max-width: 1000px) and (max-height: 540px) and (orientation: landscape) {
  .auth-shell {
    color-scheme: var(--pwa-color-scheme);
    background: var(--pwa-lens-canvas), var(--pwa-bg) !important;
    color: var(--pwa-ink);
  }

  .auth-shell .auth-form-wrap {
    background: var(--pwa-lens-reflection), var(--pwa-surface) !important;
    border-color: var(--pwa-lens-edge) !important;
    border-radius: var(--pwa-card-radius) !important;
    box-shadow: var(--pwa-lens-depth), var(--pwa-lens-glow) !important;
  }

  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .auth-shell .auth-form-wrap {
      background: var(--pwa-lens-reflection), var(--pwa-lens-fill) !important;
      -webkit-backdrop-filter: var(--pwa-lens-filter);
      backdrop-filter: var(--pwa-lens-filter);
    }
  }

  .auth-shell .auth-form-wrap :is(h2, label, .auth-tab.active) {
    color: var(--pwa-ink) !important;
  }

  .auth-shell .auth-form-wrap :is(
    .eyebrow, p, .auth-footer, .demo-note, .sms-field-hint, .auth-divider,
    .auth-tab:not(.active)
  ) {
    color: var(--pwa-muted) !important;
  }

  .auth-shell .auth-form-wrap .auth-tabs {
    border-color: var(--pwa-line);
  }

  .auth-shell .auth-form-wrap .auth-divider::before,
  .auth-shell .auth-form-wrap .auth-divider::after {
    background: var(--pwa-line);
  }

  .auth-shell .auth-tab.active {
    border-bottom-color: var(--pwa-accent);
  }

  .auth-shell .sms-auth-methods {
    background: var(--pwa-well);
    border-color: var(--pwa-line);
    border-radius: var(--pwa-control-radius);
  }

  .auth-shell .auth-form-wrap .sms-auth-methods button {
    color: var(--pwa-muted) !important;
    border-radius: calc(var(--pwa-control-radius) - 4px);
  }

  .auth-shell .auth-form-wrap .sms-auth-methods button.active {
    background: var(--pwa-surface);
    color: var(--pwa-ink) !important;
    box-shadow: var(--pwa-card-shadow);
  }

  .auth-shell .auth-form :is(input, select, textarea) {
    background: var(--pwa-field);
    color: var(--pwa-ink);
    border-color: var(--pwa-control-line);
    border-radius: var(--pwa-control-radius);
  }

  .auth-shell .auth-form input::placeholder {
    color: var(--pwa-muted);
  }

  .auth-shell .auth-form :is(input, select, textarea):focus {
    background: var(--pwa-field);
    border-color: var(--pwa-focus);
    box-shadow: none;
  }

  .auth-shell .auth-form input[aria-invalid="true"] {
    border-color: var(--pwa-notice-danger);
  }

  .auth-shell .auth-form-wrap .button:not(.secondary, .ghost) {
    border-color: transparent;
    border-radius: var(--pwa-control-radius);
    background: var(--pwa-action);
    color: var(--pwa-action-ink);
  }

  .auth-shell .auth-form-wrap .button.secondary {
    background: var(--pwa-surface);
    color: var(--pwa-ink) !important;
    border-color: var(--pwa-line);
    border-radius: var(--pwa-control-radius);
  }

  .auth-shell .auth-form-wrap :is(.auth-recovery-link, .sms-service-note button) {
    color: var(--pwa-accent) !important;
  }

  .auth-shell .auth-form-wrap :is(.sms-service-note, .admin-login-hint, .auth-recovery-back) {
    border-color: var(--pwa-line);
    border-radius: var(--pwa-control-radius);
    background: var(--pwa-well);
    color: var(--pwa-muted);
  }

  .auth-shell .auth-form-wrap .sms-service-note > .icon {
    color: var(--pwa-accent);
  }

  .auth-shell .auth-form-wrap .sms-auth-feedback:not([hidden]) {
    border-color: var(--pwa-line);
    border-radius: var(--pwa-control-radius);
  }

  html[data-workspace-theme="dark"] .auth-shell .sms-auth-feedback.notice {
    background: var(--pwa-well);
    color: var(--pwa-ink);
  }

  html[data-workspace-theme="dark"] .auth-shell .sms-auth-feedback:is(.red, .error-box) {
    background: #462b31;
    color: #ffc0c7;
  }

  .auth-shell :is(button, input, select, textarea):focus-visible {
    outline-color: var(--pwa-focus);
  }

  @supports (corner-shape: squircle) {
    .auth-shell .auth-form-wrap { corner-shape: squircle; }
  }
}
