/*
 * AnimeRadar v2.4.230 - Anmelde- und Registrierungsfenster nach Referenz.
 *
 * Referenz: Referenzbilder/Seitendesigns/Login.png
 * (1448 x 1086; links Desktop, rechts ein Smartphone-Mockup. Der
 * Telefonrahmen gehoert nicht zur Website.)
 *
 * Desktop (Massstab der Vorlage 1:1): Modal 842 breit, Radius 22, zwei
 * Spalten zu je 420 (links Artwork, rechts Formular), Formularrand 25,
 * Schliessen-Knopf 40 rund oben rechts, Umschalter 41 hoch, Eingabefelder
 * 51 hoch, Absendeknopf 44, Anbieterknoepfe 46.
 *
 * Artwork-Bereich: Die Flaeche links (Desktop) und das Band oben (Mobil)
 * sind bereits final dimensioniert, enthalten aber absichtlich noch KEIN
 * Bild. Ein spaeteres Motiv wird ausschliesslich ueber eine Custom Property
 * gesetzt, ohne dass sich Groessen, Formularposition oder Umbrueche aendern:
 *
 *   html body dialog#authDialog.ag-2026 {
 *     --auth-artwork-image: url("assets/....webp");
 *   }
 *
 * Optional laesst sich der Bildausschnitt ueber --auth-artwork-position
 * (Desktop) und --auth-artwork-position-mobile steuern.
 *
 * Mobil: keine verkleinerte Kopie des Modals, sondern eine Vollflaeche
 * unterhalb der bestehenden Kopfzeile. Die Kopfzeile und die untere
 * Navigation bleiben sichtbar und bedienbar, deshalb wird der Dialog dort
 * mit show() statt showModal() geoeffnet (Klasse is-sheet, Body-Klasse
 * ag-sheet-open).
 *
 * Alle Regeln sind auf #authDialog.ag-2026 gescopt. Andere Dialoge, Seiten,
 * Sidebar, Kopfzeile und untere Navigation bleiben unberuehrt. Markup-IDs,
 * die Zustandsmaschine aus updateAuthUi() und die Supabase-Anbindung sind
 * unveraendert.
 */

/* ========================================================================== */
/* Grundwerte und Dialogflaeche                                               */
/* ========================================================================== */

html body dialog#authDialog.ag-2026 {
  /* Reservierte Artwork-Ebene, absichtlich leer. */
  --auth-artwork-image: none;
  --auth-artwork-position: center;
  --auth-artwork-position-mobile: center 30%;
  --ag-surface: #090e11;
  --ag-line: rgba(255, 255, 255, .14);
  --ag-line-soft: rgba(255, 255, 255, .09);
  --ag-field: #0f1519;
  --ag-panel: #14171a;
  --ag-text: #ffffff;
  --ag-muted: rgba(255, 255, 255, .72);
  --ag-dim: rgba(255, 255, 255, .45);
  --ag-red: #f91223;
  --ag-red-bright: #ff2b39;
  --ag-radius: 22px;
  position: fixed !important;
  inset: 0 !important;
  z-index: 70;
  box-sizing: border-box !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 32px 24px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--ag-text) !important;
  box-shadow: none !important;
  overflow: visible !important;
}

/* Nur das geoeffnete Fenster spannt die Flaeche auf; sonst wuerde die
   geschlossene Ebene die Seite ueberdecken. */
html body dialog#authDialog.ag-2026:not([open]) {
  display: none !important;
}

html body dialog#authDialog.ag-2026[open] {
  display: grid !important;
  place-items: center !important;
}

html body dialog#authDialog.ag-2026::backdrop {
  background: rgba(4, 6, 9, .74) !important;
  backdrop-filter: blur(3px) !important;
}

html body dialog#authDialog.ag-2026 *,
html body dialog#authDialog.ag-2026 *::before,
html body dialog#authDialog.ag-2026 *::after {
  box-sizing: border-box;
}

html body dialog#authDialog.ag-2026 :where(h2, p, small, strong) {
  margin: 0;
  padding: 0;
}

/* ========================================================================== */
/* Panel und Spalten                                                          */
/* ========================================================================== */

html body dialog#authDialog.ag-2026 .ag-panel {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  width: min(842px, 100%);
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--ag-line);
  border-radius: var(--ag-radius);
  background: var(--ag-surface);
  box-shadow: 0 38px 96px rgba(0, 0, 0, .62);
}

/* -------------------------------------------------------------------------- */
/* Artwork-Bereich (Flaeche steht, Bild folgt spaeter)                        */
/* -------------------------------------------------------------------------- */

html body dialog#authDialog.ag-2026 .ag-artwork {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
  border-right: 1px solid var(--ag-line-soft);
  background:
    radial-gradient(78% 58% at 22% 18%, rgba(176, 20, 42, .34) 0%, rgba(176, 20, 42, .1) 48%, rgba(9, 11, 14, 0) 78%),
    radial-gradient(64% 48% at 88% 92%, rgba(120, 12, 30, .3) 0%, rgba(120, 12, 30, 0) 72%),
    linear-gradient(168deg, #16090e 0%, #0c0d12 58%, #08090c 100%);
}

/* Die Bildebene liegt fertig bereit und bleibt ohne Motiv unsichtbar. */
html body dialog#authDialog.ag-2026 .ag-artwork-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  background-image: var(--auth-artwork-image);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: var(--auth-artwork-position);
  pointer-events: none;
}

/* Verlauf nach unten, damit der Text spaeter auf dem Motiv lesbar bleibt. */
html body dialog#authDialog.ag-2026 .ag-artwork-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 7, 10, 0) 26%, rgba(6, 7, 10, .62) 62%, rgba(6, 7, 10, .92) 100%);
}

html body dialog#authDialog.ag-2026 .ag-artwork-copy {
  position: relative;
  z-index: 1;
  padding: 0 28px 37px;
}

html body dialog#authDialog.ag-2026 .ag-artwork-title {
  color: var(--ag-text);
  font-family: var(--font-display, inherit);
  font-size: 34px;
  font-weight: 800;
  line-height: 39px;
  letter-spacing: -.01em;
}

html body dialog#authDialog.ag-2026 .ag-artwork-sub {
  margin-top: 14px;
  color: var(--ag-text);
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
}

html body dialog#authDialog.ag-2026 .ag-artwork-text {
  margin-top: 12px;
  max-width: 366px;
  color: var(--ag-muted);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 20px;
}

/* ========================================================================== */
/* Formularspalte                                                             */
/* ========================================================================== */

html body dialog#authDialog.ag-2026 .ag-form-col {
  position: relative;
  min-width: 0;
  padding: 63px 25px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

html body dialog#authDialog.ag-2026 .ag-close {
  position: absolute;
  top: 15px;
  right: 13px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, .3) !important;
  border-radius: 50%;
  background: rgba(20, 24, 28, .82);
  color: #ffffff;
  font-size: 0;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}

html body dialog#authDialog.ag-2026 .ag-close svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

html body dialog#authDialog.ag-2026 .ag-close:hover {
  background: rgba(40, 45, 52, .92);
  border-color: rgba(255, 255, 255, .48);
}

html body dialog#authDialog.ag-2026 .ag-close:focus-visible {
  outline: 2px solid var(--ag-red-bright);
  outline-offset: 2px;
}

/* -------------------------------------------------------------------------- */
/* Umschalter Anmelden / Registrieren                                         */
/* -------------------------------------------------------------------------- */

html body dialog#authDialog.ag-2026 .ag-tabs {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0 !important;
  width: 100% !important;
  height: 41px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--ag-line-soft) !important;
  border-radius: 12px !important;
  background: #11161a !important;
  overflow: hidden;
}

html body dialog#authDialog.ag-2026 .ag-tabs.is-hidden {
  display: none !important;
}

html body dialog#authDialog.ag-2026 .ag-tab {
  display: grid !important;
  place-items: center !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 8px !important;
  border: 0 !important;
  border-radius: 11px !important;
  background: transparent !important;
  color: rgba(255, 255, 255, .82) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

html body dialog#authDialog.ag-2026 .ag-tab:hover {
  color: #ffffff !important;
}

html body dialog#authDialog.ag-2026 .ag-tab.active {
  background: var(--ag-red) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

html body dialog#authDialog.ag-2026 .ag-tab:focus-visible {
  outline: 2px solid var(--ag-red-bright);
  outline-offset: -3px;
}

/* -------------------------------------------------------------------------- */
/* Ueberschrift                                                               */
/* -------------------------------------------------------------------------- */

html body dialog#authDialog.ag-2026 .ag-head {
  margin-top: 28px;
}

html body dialog#authDialog.ag-2026 .ag-head h2 {
  color: var(--ag-text) !important;
  font-family: var(--font-display, inherit);
  font-size: 31px !important;
  font-weight: 800 !important;
  line-height: 36px !important;
  letter-spacing: -.01em;
}

html body dialog#authDialog.ag-2026 .ag-head p {
  margin-top: 2px;
  color: var(--ag-muted);
  font-size: 15px;
  font-weight: 400;
  line-height: 20px;
}

/* -------------------------------------------------------------------------- */
/* Formular und Felder                                                        */
/* -------------------------------------------------------------------------- */

html body dialog#authDialog.ag-2026 .ag-form {
  display: block !important;
  gap: 0 !important;
  margin-top: 18px;
}

html body dialog#authDialog.ag-2026 .ag-field {
  display: block !important;
  margin: 0 0 11px !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  color: inherit !important;
  font-size: 0 !important;
}

html body dialog#authDialog.ag-2026 .ag-field.is-hidden {
  display: none !important;
}

/* Sichtbare Beschriftung entfaellt wie in der Vorlage, bleibt aber fuer
   Screenreader erhalten. */
html body dialog#authDialog.ag-2026 .ag-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

html body dialog#authDialog.ag-2026 .auth-input-shell {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  height: 51px !important;
  margin: 0 !important;
  padding: 0 18px !important;
  border: 1px solid var(--ag-line-soft) !important;
  border-radius: 12px !important;
  background: var(--ag-field) !important;
  transition: border-color .18s ease, box-shadow .18s ease;
}

html body dialog#authDialog.ag-2026 .auth-input-shell:focus-within {
  border-color: rgba(249, 18, 35, .62) !important;
  box-shadow: 0 0 0 3px rgba(249, 18, 35, .18) !important;
}

html body dialog#authDialog.ag-2026 .auth-input-icon {
  display: grid !important;
  place-items: center !important;
  flex: none !important;
  width: 22px !important;
  height: 22px !important;
  margin: 0 14px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  color: rgba(255, 255, 255, .74) !important;
}

html body dialog#authDialog.ag-2026 .auth-input-icon svg {
  display: block;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html body dialog#authDialog.ag-2026 .auth-input-shell input {
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--ag-text) !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  box-shadow: none !important;
  outline: none !important;
}

html body dialog#authDialog.ag-2026 .auth-input-shell input::placeholder {
  color: var(--ag-dim) !important;
  opacity: 1;
}

html body dialog#authDialog.ag-2026 .auth-input-shell input:-webkit-autofill {
  -webkit-text-fill-color: var(--ag-text);
  -webkit-box-shadow: 0 0 0 60px var(--ag-field) inset;
}

/* Sichtbarkeit des Passworts */
html body dialog#authDialog.ag-2026 .ag-eye {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  margin: 0 -4px 0 8px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, .68);
  cursor: pointer;
  transition: color .16s ease, background .16s ease;
}

html body dialog#authDialog.ag-2026 .ag-eye svg {
  display: block;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html body dialog#authDialog.ag-2026 .ag-eye .ag-eye-slash {
  opacity: 0;
}

html body dialog#authDialog.ag-2026 .ag-eye.is-visible {
  color: #ffffff;
}

html body dialog#authDialog.ag-2026 .ag-eye.is-visible .ag-eye-slash {
  opacity: 1;
}

html body dialog#authDialog.ag-2026 .ag-eye:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, .07);
}

html body dialog#authDialog.ag-2026 .ag-eye:focus-visible {
  outline: 2px solid var(--ag-red-bright);
  outline-offset: 1px;
}

/* -------------------------------------------------------------------------- */
/* Hilfszeile, Absendeknopf, Status                                           */
/* -------------------------------------------------------------------------- */

html body dialog#authDialog.ag-2026 .ag-helper-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
  min-height: 18px;
}

html body dialog#authDialog.ag-2026 .ag-forgot {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  min-height: 0 !important;
  height: auto !important;
  color: var(--ag-red-bright) !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  line-height: 18px !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  cursor: pointer;
}

html body dialog#authDialog.ag-2026 .ag-forgot:hover {
  color: #ff5a63 !important;
}

html body dialog#authDialog.ag-2026 .ag-forgot.is-hidden {
  display: none !important;
}

html body dialog#authDialog.ag-2026 .ag-submit {
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  margin: 23px 0 0 !important;
  padding: 0 16px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: var(--ag-red) !important;
  color: #ffffff !important;
  font-size: 15.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  cursor: pointer;
  transition: background .16s ease;
}

html body dialog#authDialog.ag-2026 .ag-submit:hover:not(:disabled) {
  background: var(--ag-red-bright) !important;
}

html body dialog#authDialog.ag-2026 .ag-submit:disabled,
html body dialog#authDialog.ag-2026 .ag-submit[aria-busy="true"] {
  opacity: .72;
  cursor: progress;
}

html body dialog#authDialog.ag-2026 .ag-submit:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

html body dialog#authDialog.ag-2026 .ag-submit.is-hidden {
  display: none !important;
}

html body dialog#authDialog.ag-2026 .ag-status {
  margin: 12px 0 0 !important;
  padding: 10px 14px !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .04) !important;
  color: var(--ag-muted) !important;
  font-size: 13px !important;
  line-height: 18px !important;
  text-align: left !important;
}

html body dialog#authDialog.ag-2026 .ag-status:empty {
  display: none !important;
}

html body dialog#authDialog.ag-2026 .ag-status.ok {
  border-color: rgba(60, 190, 120, .45) !important;
  color: #9de7bd !important;
}

html body dialog#authDialog.ag-2026 .ag-status.err {
  border-color: rgba(249, 18, 35, .5) !important;
  background: rgba(249, 18, 35, .1) !important;
  color: #ffb3b8 !important;
}

html body dialog#authDialog.ag-2026 .ag-back {
  display: block !important;
  margin: 14px auto 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  color: var(--ag-muted) !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  cursor: pointer;
}

html body dialog#authDialog.ag-2026 .ag-back:hover {
  color: #ffffff !important;
}

html body dialog#authDialog.ag-2026 .ag-back.is-hidden,
html body dialog#authDialog.ag-2026 .ag-logout.is-hidden {
  display: none !important;
}

html body dialog#authDialog.ag-2026 .ag-logout {
  width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  margin: 14px 0 0 !important;
  border: 1px solid var(--ag-line) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .04) !important;
  color: #ffffff !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
}

html body dialog#authDialog.ag-2026 .auth-signed-panel {
  display: grid !important;
  gap: 2px !important;
  margin: 0 0 14px !important;
  padding: 14px 16px !important;
  border: 1px solid var(--ag-line-soft) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .04) !important;
}

html body dialog#authDialog.ag-2026 .auth-signed-panel.is-hidden {
  display: none !important;
}

/* -------------------------------------------------------------------------- */
/* Anbieter                                                                   */
/* -------------------------------------------------------------------------- */

html body dialog#authDialog.ag-2026 .ag-social {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
}

html body dialog#authDialog.ag-2026 .ag-social.is-hidden {
  display: none !important;
}

html body dialog#authDialog.ag-2026 .ag-divider {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin: 24px 0 0 !important;
  border: 0 !important;
}

html body dialog#authDialog.ag-2026 .ag-divider::before,
html body dialog#authDialog.ag-2026 .ag-divider::after {
  content: '';
  height: 1px;
  background: rgba(255, 255, 255, .12);
}

html body dialog#authDialog.ag-2026 .ag-divider span {
  padding: 0 !important;
  background: none !important;
  color: var(--ag-dim) !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

html body dialog#authDialog.ag-2026 .ag-social-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 12px !important;
  margin-top: 22px !important;
}

html body dialog#authDialog.ag-2026 .ag-provider {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 14px !important;
  width: 100% !important;
  height: 46px !important;
  min-height: 46px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  border: 1px solid var(--ag-line-soft) !important;
  border-radius: 12px !important;
  background: var(--ag-panel) !important;
  color: #ffffff !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}

html body dialog#authDialog.ag-2026 .ag-provider:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, .22) !important;
  background: #1b1f24 !important;
}

html body dialog#authDialog.ag-2026 .ag-provider:disabled {
  opacity: .55;
  cursor: not-allowed;
}

html body dialog#authDialog.ag-2026 .ag-provider:focus-visible {
  outline: 2px solid var(--ag-red-bright);
  outline-offset: 2px;
}

html body dialog#authDialog.ag-2026 .ag-provider .social-auth-icon {
  display: grid !important;
  place-items: center !important;
  flex: none !important;
  width: 22px !important;
  height: 22px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
}

html body dialog#authDialog.ag-2026 .ag-provider .social-auth-icon svg {
  width: 22px;
  height: 22px;
}

html body dialog#authDialog.ag-2026 .social-auth-discord .social-auth-icon {
  color: #5865f2;
}

html body dialog#authDialog.ag-2026 .social-auth-note {
  display: block !important;
  margin: 12px 0 0 !important;
  color: var(--ag-dim) !important;
  font-size: 12px !important;
  line-height: 16px !important;
  text-align: center !important;
}

/* -------------------------------------------------------------------------- */
/* Wechsel zwischen Anmeldung und Registrierung                               */
/* -------------------------------------------------------------------------- */

html body dialog#authDialog.ag-2026 .ag-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 26px;
  color: var(--ag-muted);
  font-size: 13.5px;
  line-height: 18px;
}

html body dialog#authDialog.ag-2026 .ag-switch.is-hidden {
  display: none;
}

html body dialog#authDialog.ag-2026 .ag-switch button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ag-red-bright);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

html body dialog#authDialog.ag-2026 .ag-switch button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

html body dialog#authDialog.ag-2026 .ag-switch button:focus-visible {
  outline: 2px solid var(--ag-red-bright);
  outline-offset: 2px;
}

/* ========================================================================== */
/* Schmale Fenster: Artwork nach oben, Formular darunter                      */
/* ========================================================================== */

@media (max-width: 900px) {
  html body dialog#authDialog.ag-2026 .ag-panel {
    grid-template-columns: minmax(0, 1fr);
    width: min(520px, 100%);
  }

  html body dialog#authDialog.ag-2026 .ag-artwork {
    min-height: 190px;
    border-right: 0;
    border-bottom: 1px solid var(--ag-line-soft);
  }

  html body dialog#authDialog.ag-2026 .ag-artwork-media {
    background-position: var(--auth-artwork-position-mobile);
  }

  html body dialog#authDialog.ag-2026 .ag-artwork-title {
    font-size: 27px;
    line-height: 32px;
  }

  html body dialog#authDialog.ag-2026 .ag-artwork-copy {
    padding: 22px 24px 24px;
  }
}

/* ========================================================================== */
/* Mobil: eigene Vollflaeche unter der bestehenden Kopfzeile                  */
/* ========================================================================== */

html body dialog#authDialog.ag-2026.is-sheet[open] {
  place-items: stretch !important;
}

html body dialog#authDialog.ag-2026.is-sheet {
  top: var(--ag-sheet-top, 0px) !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  z-index: 24;
  padding: 0 !important;
  background: var(--ag-surface) !important;
  overflow: hidden !important;
}

html body dialog#authDialog.ag-2026.is-sheet .ag-panel {
  display: block;
  width: 100%;
  max-height: none;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 760px) {
  html body dialog#authDialog.ag-2026 .ag-artwork {
    /* Bandhoehe der Vorlage; das spaetere Motiv fuellt sie unveraendert. */
    min-height: 172px;
    height: 172px;
    border-right: 0;
    border-bottom: 1px solid var(--ag-line-soft);
  }

  html body dialog#authDialog.ag-2026 .ag-artwork-media {
    background-position: var(--auth-artwork-position-mobile);
  }

  html body dialog#authDialog.ag-2026 .ag-artwork-copy {
    padding: 0 24px 18px;
  }

  html body dialog#authDialog.ag-2026 .ag-artwork-title {
    font-size: 22px;
    line-height: 26px;
  }

  html body dialog#authDialog.ag-2026 .ag-artwork-sub {
    margin-top: 8px;
    font-size: 14.5px;
    line-height: 19px;
  }

  html body dialog#authDialog.ag-2026 .ag-artwork-text {
    display: none;
  }

  html body dialog#authDialog.ag-2026 .ag-form-col {
    padding: 12px 24px 96px;
    overflow: visible;
  }

  /* Die Vorlage zeigt mobil keinen Schliessen-Knopf. Er bleibt trotzdem
     erreichbar und sitzt fest ueber der oberen Flaeche, damit er weder die
     Umschalter ueberdeckt noch beim Blaettern verschwindet. */
  html body dialog#authDialog.ag-2026.is-sheet .ag-close {
    position: fixed;
    top: calc(var(--ag-sheet-top, 0px) + 10px);
    right: 12px;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
  }

  html body dialog#authDialog.ag-2026 .ag-tabs {
    height: 41px !important;
  }

  html body dialog#authDialog.ag-2026 .ag-head {
    margin-top: 19px;
  }

  html body dialog#authDialog.ag-2026 .ag-head h2 {
    font-size: 26px !important;
    line-height: 30px !important;
  }

  html body dialog#authDialog.ag-2026 .ag-head p {
    margin-top: 3px;
    font-size: 14px;
    line-height: 19px;
  }

  html body dialog#authDialog.ag-2026 .ag-form {
    margin-top: 15px;
  }

  html body dialog#authDialog.ag-2026 .ag-field {
    margin-bottom: 12px !important;
  }

  html body dialog#authDialog.ag-2026 .auth-input-shell {
    height: 46px !important;
    padding: 0 16px !important;
  }

  html body dialog#authDialog.ag-2026 .ag-helper-row {
    margin-top: 14px;
  }

  html body dialog#authDialog.ag-2026 .ag-submit {
    height: 44px !important;
    min-height: 44px !important;
    margin-top: 18px !important;
  }

  html body dialog#authDialog.ag-2026 .ag-divider {
    margin-top: 22px !important;
  }

  html body dialog#authDialog.ag-2026 .ag-social-grid {
    margin-top: 20px !important;
  }

  html body dialog#authDialog.ag-2026 .ag-provider {
    height: 46px !important;
    min-height: 46px !important;
  }

  html body dialog#authDialog.ag-2026 .ag-switch {
    margin-top: 24px;
  }
}

@media (max-width: 380px) {
  html body dialog#authDialog.ag-2026 .ag-form-col {
    padding-inline: 16px;
  }

  html body dialog#authDialog.ag-2026 .ag-artwork-copy {
    padding-inline: 16px;
  }

  html body dialog#authDialog.ag-2026 .ag-head h2 {
    font-size: 23px !important;
    line-height: 27px !important;
  }

  html body dialog#authDialog.ag-2026 .ag-provider {
    font-size: 13.5px !important;
    gap: 10px !important;
  }
}

/* Kleine Fensterhoehen: das Panel darf nie ueber den Bildschirm laufen. */
@media (min-width: 761px) and (max-height: 780px) {
  html body dialog#authDialog.ag-2026 {
    padding: 16px !important;
  }
}
