/* ==========================================================================
   Liquid Glass – Portal, Startseite und Rechtstexte
   --------------------------------------------------------------------------
   Eigene Ebene über portal.css. Alles hängt an <html class="lg">; glass.js
   nimmt die Klasse im MDT-Modus weg (dort bleibt die CAD-Optik) und legt in
   Chromium-Browsern zusätzlich die Lichtbrechung an den Glaskanten an.
   Das Dashboard (index.html/style.css) lädt diese Datei nicht.

   Aufbau: Die Flächenfarben von portal.css (--bg-2/3/4, --border…) werden
   durchscheinend, dadurch wird jede Karte automatisch zu Glas. Dazu kommen
   Lichtkanten, schwebende Leisten mit Weichzeichner und Federanimationen.
   ========================================================================== */

@property --lg-hl { syntax: "<number>"; inherits: false; initial-value: 0; }

:root.lg {
  --bg: #08090d;
  --bg-2: rgba(255, 255, 255, .055);
  --bg-3: rgba(255, 255, 255, .08);
  --bg-4: rgba(255, 255, 255, .12);
  --bg-deep: rgba(0, 0, 0, .26);
  --border: rgba(255, 255, 255, .14);
  --border-soft: rgba(255, 255, 255, .095);
  --radius: 22px;
  --radius-sm: 13px;
  --top-h: 84px;

  /* Glas über scrollendem Inhalt (Leisten, Menüs, Dialoge) */
  --lg-float: rgba(24, 26, 33, .56);
  --lg-float-strong: rgba(22, 24, 30, .78);
  --lg-blur: blur(24px) saturate(185%);
  --lg-edge: rgba(255, 255, 255, .12);

  /* Lichtkante oben + feiner Rand, darunter weicher Schatten */
  --shadow-1:
    inset 0 1px 0 rgba(255, 255, 255, .15), inset 0 -1px 0 rgba(255, 255, 255, .035),
    inset 0 44px 56px -46px rgba(255, 255, 255, .075),
    0 1px 2px rgba(0, 0, 0, .2), 0 18px 44px -26px rgba(0, 0, 0, .8);
  --shadow-2:
    inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(255, 255, 255, .05),
    inset 0 40px 50px -42px rgba(255, 255, 255, .08),
    0 2px 8px rgba(0, 0, 0, .28), 0 34px 90px -28px rgba(0, 0, 0, .9);

  /* Federn: Fallback als Bézierkurve, echte gedämpfte Feder per linear() */
  --lg-spring: cubic-bezier(.34, 1.56, .64, 1);
  --lg-spring-soft: cubic-bezier(.3, 1.25, .5, 1);
  --lg-spring-bouncy: cubic-bezier(.34, 1.8, .6, 1);
}
@supports (transition-timing-function: linear(0, 1)) {
  :root.lg {
    /* Daempfung .42 – sichtbares Nachfedern */
    --lg-spring: linear(0, 0.101 2.9%, 0.337 5.9%, 0.620 8.8%, 0.880 11.8%, 1.076 14.7%, 1.192 17.6%, 1.233 20.6%, 1.216 23.5%, 1.165 26.5%, 1.099 29.4%, 1.037 32.4%, 0.988 35.3%, 0.958 38.2%, 0.946 41.2%, 0.948 44.1%, 0.959 47.1%, 0.974 50%, 0.989 52.9%, 1.001 55.9%, 1.009 58.8%, 1.012 61.8%, 1.012 64.7%, 1.010 67.6%, 1.007 70.6%, 1.003 73.5%, 1 76.5%, 0.998 79.4%, 0.997 82.4%, 0.997 85.3%, 0.998 88.2%, 0.998 91.2%, 0.999 94.1%, 1);
    /* Daempfung .62 – ruhiger, fuer grosse Flaechen */
    --lg-spring-soft: linear(0, 0.047 2.9%, 0.161 5.9%, 0.311 8.8%, 0.471 11.8%, 0.624 14.7%, 0.758 17.6%, 0.869 20.6%, 0.954 23.5%, 1.015 26.5%, 1.054 29.4%, 1.076 32.4%, 1.083 35.3%, 1.081 38.2%, 1.072 41.2%, 1.060 44.1%, 1.047 47.1%, 1.034 50%, 1.022 52.9%, 1.013 55.9%, 1.005 58.8%, 1 61.8%, 0.996 64.7%, 0.994 67.6%, 0.993 70.6%, 0.993 73.5%, 0.994 76.5%, 0.995 79.4%, 0.996 82.4%, 0.997 85.3%, 0.998 88.2%, 0.999 91.2%, 0.999 94.1%, 1);
    /* Daempfung .3 – Schalter und kleine Knoepfe */
    --lg-spring-bouncy: linear(0, 0.194 2.9%, 0.615 5.9%, 1.036 8.8%, 1.303 11.8%, 1.371 14.7%, 1.282 17.6%, 1.120 20.6%, 0.969 23.5%, 0.880 26.5%, 0.864 29.4%, 0.903 32.4%, 0.964 35.3%, 1.018 38.2%, 1.047 41.2%, 1.050 44.1%, 1.033 47.1%, 1.010 50%, 0.991 52.9%, 0.982 55.9%, 0.982 58.8%, 0.989 61.8%, 0.997 64.7%, 1.004 67.6%, 1.007 70.6%, 1.006 73.5%, 1.004 76.5%, 1.001 79.4%, 0.998 82.4%, 0.997 85.3%, 0.998 88.2%, 0.999 91.2%, 1 94.1%, 1);
  }
}

/* ---------------------------------------------------------------- Hintergrund
   Glas braucht Licht dahinter – hier bewusst ohne Farbe (Nutzerwunsch):
   nur weiches, neutrales Licht auf Dunkel, fest am Fenster und unbewegt,
   sonst müsste jede Glasfläche bei jedem Bild neu weichzeichnen. */
:root.lg body { background: var(--bg); }
:root.lg body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-color: var(--bg);
  background-image:
    var(--grain),
    radial-gradient(70vmax 44vmax at 50% -14%, rgba(255, 255, 255, .11), transparent 70%),
    radial-gradient(42vmax 34vmax at 100% 18%, rgba(255, 255, 255, .045), transparent 70%),
    radial-gradient(46vmax 36vmax at 0% 70%, rgba(255, 255, 255, .035), transparent 70%),
    radial-gradient(60vmax 40vmax at 70% 110%, rgba(255, 255, 255, .04), transparent 70%);
  background-blend-mode: overlay, normal, normal, normal, normal;
}

/* ---------------------------------------------------------------- Lichtkante
   Der helle Rand, an dem Glas das Licht fängt: oben links und unten rechts
   heller, an den Seiten fast unsichtbar. */
:root.lg :is(.top, .sidebar, .account-menu, .modal-wrap:not(:has(.rp-modal, .cl-modal)), .toast, .btn, .back-btn, .account-btn, .modal-close, .lg-rim)::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  padding: 1px;
  background: linear-gradient(140deg,
    rgba(255, 255, 255, .5) 0%, rgba(255, 255, 255, .14) 16%, rgba(255, 255, 255, 0) 36%,
    rgba(255, 255, 255, 0) 64%, rgba(255, 255, 255, .1) 84%, rgba(255, 255, 255, .32) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

/* ---------------------------------------------------------------- Kopfleiste */
:root.lg .top {
  top: 12px; margin: 12px 12px 0;
  height: 60px; padding: 0 10px 0 clamp(14px, 2vw, 22px); gap: 20px;
  border-radius: 22px; border: 1px solid var(--lg-edge);
  background: var(--lg-float);
  -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur);
  box-shadow: var(--shadow-2);
}
:root.lg .top-nav a {
  border-radius: 999px; padding: 8px 15px;
  transition: color .2s, background-color .25s, transform .5s var(--lg-spring);
}
:root.lg .top-nav a:hover { background: rgba(255, 255, 255, .09); }
:root.lg .top-nav a:active { transform: scale(.92); transition-duration: .12s; }

:root.lg .account-btn {
  position: relative; background: rgba(255, 255, 255, .07); border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
  transition: background-color .2s, transform .55s var(--lg-spring);
}
:root.lg .account-btn:hover { background: rgba(255, 255, 255, .12); transform: scale(1.03); }
:root.lg .account-btn:active { transform: scale(.95); transition-duration: .12s; }

:root.lg .account-menu {
  top: calc(100% + 14px); width: 248px; padding: 8px; border-radius: 22px;
  background: var(--lg-float-strong); border: 1px solid var(--lg-edge);
  -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur);
  box-shadow: var(--shadow-2);
  transform-origin: calc(100% - 30px) -10px;
  animation: lg-drop .55s var(--lg-spring) both;
}
:root.lg .account-menu a, :root.lg .account-menu button:not(.btn) {
  border-radius: 13px; transition: background-color .18s, color .18s, transform .45s var(--lg-spring);
}
:root.lg .account-menu a:active, :root.lg .account-menu button:not(.btn):active { transform: scale(.97); }

/* ---------------------------------------------------------------- Knöpfe
   Kapseln mit Lichtkante. Unter dem Mauszeiger wandert ein weicher
   Glanzpunkt mit (Position setzt glass.js), beim Drücken federn sie. */
:root.lg .btn {
  position: relative; border-radius: 999px;
  border-color: rgba(255, 255, 255, .11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 8px 20px -14px rgba(0, 0, 0, .7);
  background-image: radial-gradient(110px circle at var(--lg-x, 50%) var(--lg-y, 0%),
    rgba(255, 255, 255, calc(var(--lg-hl) * .2)), transparent 70%);
  transition: transform .6s var(--lg-spring), background-color .2s, border-color .2s,
              box-shadow .25s, color .2s, filter .2s, --lg-hl .35s;
}
:root.lg .btn:hover { --lg-hl: 1; transform: translateY(-1px) scale(1.025); border-color: rgba(255, 255, 255, .2); }
:root.lg .btn:active { transform: scale(.94); transition-duration: .12s, .2s, .2s, .25s, .2s, .2s, .2s; }
:root.lg .btn:disabled { transform: none; }
:root.lg .btn-lg { border-radius: 999px; padding: 14px 26px; }
:root.lg .btn-primary {
  background-color: rgba(255, 255, 255, .94); color: #121318; border-color: transparent;
  background-image: radial-gradient(120px circle at var(--lg-x, 50%) var(--lg-y, 0%),
    rgba(255, 255, 255, calc(var(--lg-hl) * 1)), transparent 70%);
  box-shadow: inset 0 1px 0 #fff, inset 0 -3px 8px rgba(0, 0, 0, .07),
              0 10px 28px -12px rgba(255, 255, 255, .4);
}
:root.lg .btn-primary:hover { filter: none; border-color: transparent; }
:root.lg .btn-line { background-color: rgba(255, 255, 255, .045); }
:root.lg .btn-line:hover { background-color: rgba(255, 255, 255, .09); }
:root.lg .btn-ghost { background-color: transparent; border-color: transparent; box-shadow: none; }
:root.lg .btn-ghost:hover { background-color: rgba(255, 255, 255, .08); border-color: transparent; }
:root.lg .btn-danger { background-color: rgba(238, 92, 112, .14); border-color: rgba(238, 92, 112, .24); }
:root.lg .btn-danger:hover { border-color: rgba(238, 92, 112, .55); }
:root.lg .btn-discord { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 10px 26px -12px rgba(63, 203, 135, .55); }
:root.lg .btn.is-fav { border-color: color-mix(in srgb, var(--brass) 40%, transparent); }
:root.lg .btn-ghost::after { opacity: .5; }
/* Knöpfe im Handy behalten ihr eigenes Aussehen */
:root.lg .ios-stage .btn { border-radius: var(--radius-sm); transform: none; }
:root.lg .ios-stage .btn::after { content: none; }

:root.lg .back-btn {
  position: relative; background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 10px 24px -16px rgba(0, 0, 0, .7);
  transition: background-color .2s, transform .6s var(--lg-spring);
}
:root.lg .back-btn:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .16); transform: translateX(-2px) scale(1.02); }
:root.lg .back-btn:hover svg { transform: translateX(-2px); }
:root.lg .back-btn svg { transition: transform .5s var(--lg-spring); }
:root.lg .back-btn:active { transform: scale(.94); transition-duration: .12s; }

:root.lg :is(.icon-btn, .modal-close) {
  border-radius: 999px;
  transition: color .15s, border-color .15s, background-color .15s, transform .55s var(--lg-spring-bouncy);
}
:root.lg :is(.icon-btn, .modal-close):hover { transform: scale(1.1); }
:root.lg :is(.icon-btn, .modal-close):active { transform: scale(.86); transition-duration: .1s; }
:root.lg .modal-close {
  background: rgba(255, 255, 255, .08); border-color: transparent; z-index: 2;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}

/* Chips und Badges: Kapseln mit feinem Lichtrand in ihrer eigenen Farbe */
:root.lg :is(.chip, .type-chip, .badge, .rank, .mem-chip) {
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 0 0 1px color-mix(in srgb, currentColor 16%, transparent);
}
:root.lg :is(.hello-av, .cp-av, .tile-logo, .app-card-ic, .cp-ic, .notice-ic) {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 6px 16px -10px rgba(0, 0, 0, .7);
}
:root.lg .side-logo { box-shadow: 0 0 0 1px var(--border-soft), inset 0 1px 0 rgba(255, 255, 255, .14); }

/* Suchfelder mit Lupe als Glas-Kapseln */
:root.lg :is(.job-search) {
  border-radius: 999px; padding-left: 16px; border-color: rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .28);
}
:root.lg :is(.job-search):focus-within {
  border-color: rgba(255, 255, 255, .34);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .28), 0 0 0 4px rgba(255, 255, 255, .07);
}

/* Filter-Chips (Jobsuche): weiße Glasfläche gleitet zur Auswahl (glass.js) */
:root.lg .job-chips { position: relative; }
:root.lg .fchip {
  position: relative; z-index: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
  transition: background-color .25s, color .25s, border-color .2s, transform .55s var(--lg-spring);
}
:root.lg .fchip:hover { background: rgba(255, 255, 255, .08); }
:root.lg .fchip:active { transform: scale(.92); transition-duration: .12s; }
:root.lg .lg-has-seg > .fchip.active { background: transparent; border-color: transparent; box-shadow: none; color: #121318; }
:root.lg .lg-seg-glider {
  position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none;
  border-radius: 999px; background: rgba(255, 255, 255, .92);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 5px rgba(0, 0, 0, .08), 0 4px 14px rgba(0, 0, 0, .3);
  transition: transform .62s var(--lg-spring), width .5s var(--lg-spring-soft), height .5s var(--lg-spring-soft), opacity .2s;
}
:root.lg .lg-seg-glider.lg-instant { transition: none; }

/* ---------------------------------------------------------------- Karten
   Farbe kommt über die Variablen; hier nur Form und Bewegung. */
:root.lg :is(.hello, .server-head) { border-radius: 28px; }
:root.lg .tile {
  transition: border-color .25s, background-color .25s, transform .7s var(--lg-spring), box-shadow .3s;
}
:root.lg .tile:not(:disabled, .locked, .tile-placeholder):hover {
  transform: translateY(-4px) scale(1.012);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 26px 50px -26px rgba(0, 0, 0, .9);
}
:root.lg .tile:not(:disabled, .locked, .tile-placeholder):active { transform: scale(.975); transition-duration: .14s; }
:root.lg .tile::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(260px circle at var(--lg-x, 50%) var(--lg-y, 0%), rgba(255, 255, 255, .085), transparent 65%);
  opacity: 0; transition: opacity .35s;
}
:root.lg .tile:hover::after { opacity: 1; }
:root.lg .tile-add { background: rgba(255, 255, 255, .015); }
:root.lg .tile-logo { border-radius: 15px; }
:root.lg .srv-live-dot { border-color: #15171d; }

:root.lg :is(button.app-card, .auth-btn, .lic-card-btn) {
  transition: border-color .2s, background-color .2s, transform .6s var(--lg-spring);
}
:root.lg :is(button.app-card, .auth-btn):hover { transform: translateY(-2px) scale(1.01); }
:root.lg :is(button.app-card, .auth-btn, .lic-card-btn):active { transform: scale(.97); transition-duration: .12s; }

/* Auswahlknöpfe in Dialogen (Anmelden mit Roblox/Discord, Werbe-Server):
   Glas-Kapseln mit rundem Symbol, Pfeil rechts und Glanz unter der Maus */
:root.lg .auth-choice { gap: 12px; }
:root.lg .auth-btn {
  position: relative; border-radius: 999px; padding: 9px 20px 9px 9px; gap: 14px;
  background-color: rgba(255, 255, 255, .055); border-color: rgba(255, 255, 255, .12);
  background-image: radial-gradient(180px circle at var(--lg-x, 50%) var(--lg-y, 0%),
    rgba(255, 255, 255, calc(var(--lg-hl) * .13)), transparent 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 12px 28px -20px rgba(0, 0, 0, .9);
  transition: background-color .2s, border-color .2s, transform .6s var(--lg-spring), --lg-hl .35s;
}
:root.lg .auth-btn:hover {
  --lg-hl: 1; background-color: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .2);
}
:root.lg .auth-btn::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; padding: 1px;
  background: linear-gradient(140deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .1) 18%, rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0) 64%, rgba(255, 255, 255, .08) 84%, rgba(255, 255, 255, .24));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
:root.lg .auth-btn::after {
  content: ""; flex-shrink: 0; margin-left: auto; width: 16px; height: 16px;
  background: var(--text-3);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M9 6l6 6-6 6'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M9 6l6 6-6 6'/></svg>") center / contain no-repeat;
  transition: transform .5s var(--lg-spring), background-color .2s;
}
:root.lg .auth-btn:hover::after { transform: translateX(3px); background: var(--text); }
:root.lg .auth-btn .mark {
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 6px 14px -8px rgba(0, 0, 0, .7);
}
/* Titel lag im Erbe der Untertitel-Farbe (grau) – Titel hell, Zusatz bleibt gedämpft */
:root.lg .auth-btn b { color: var(--text); font-size: 14.5px; }

:root.lg .empty { border-color: rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .02); }

/* ---------------------------------------------------------------- Felder */
:root.lg :is(label.field input, label.field select, label.field textarea, .row-copy input, .q-field textarea) {
  border-radius: 14px; border-color: rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .28);
}
:root.lg :is(label.field input, label.field select, label.field textarea, .row-copy input, .q-field textarea):focus {
  border-color: rgba(255, 255, 255, .34);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .28), 0 0 0 4px rgba(255, 255, 255, .07);
}
:root.lg option, :root.lg optgroup { background-color: #17191f; color: var(--text); }

/* Schalter: Glasknopf, der beim Drücken in die Breite zieht und nachfedert */
:root.lg .sw i { width: 38px; height: 22px; background: rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35); transition: background-color .3s; }
:root.lg .sw i::after {
  top: 2px; left: 2px; width: 18px; height: 18px; background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35), inset 0 -1px 1px rgba(0, 0, 0, .08);
  transform-origin: left center;
  transition: transform .55s var(--lg-spring-bouncy), width .35s var(--lg-spring), background-color .2s;
}
:root.lg .sw input:checked + i { background: var(--text); }
:root.lg .sw input:checked + i::after { transform: translateX(16px); background: var(--bg); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
:root.lg .sw:active i::after { width: 24px; }
:root.lg .sw:active input:checked + i::after { transform: translateX(10px); }

/* ---------------------------------------------------------------- Seitenleiste */
:root.lg .side-nav { position: relative; }
:root.lg .nav-item { border-radius: 13px; z-index: 1; transition: background-color .2s, color .2s, transform .5s var(--lg-spring); }
:root.lg .nav-item:hover { background: rgba(255, 255, 255, .06); }
:root.lg .nav-item:active { transform: scale(.96); transition-duration: .12s; }
:root.lg .nav-item.active::before { display: none; }
:root.lg .lg-has-glider .nav-item.active { background: transparent; }
:root.lg .lg-glider {
  position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none;
  border-radius: 13px;
  background: rgba(255, 255, 255, .11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 0 0 1px rgba(255, 255, 255, .06), 0 6px 18px -10px rgba(0, 0, 0, .6);
  transition: transform .62s var(--lg-spring), width .5s var(--lg-spring-soft), height .5s var(--lg-spring-soft), opacity .2s;
}
:root.lg .lg-glider.lg-instant { transition: none; }

@media (min-width: 901px) {
  :root.lg .sidebar {
    margin: 12px 0 12px 12px; top: var(--top-h);
    height: calc(100vh - var(--top-h) - 12px);
    border: 1px solid var(--lg-edge); border-radius: 26px;
    background: var(--lg-float);
    -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur);
    box-shadow: var(--shadow-2);
  }
  :root.lg .sidebar .side-nav { overflow-x: hidden; }
}
@media (max-width: 900px) {
  :root.lg .sidebar {
    position: relative; top: auto; margin: 12px 12px 0; width: auto;
    border: 1px solid var(--lg-edge); border-radius: 22px;
    background: var(--lg-float); box-shadow: var(--shadow-1);
  }
}

/* ---------------------------------------------------------------- Dialoge */
:root.lg .modal-backdrop {
  background: rgba(4, 5, 8, .46);
  -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
  animation: lg-fade .35s ease-out both;
}
:root.lg .modal-wrap:not(:has(.rp-modal, .cl-modal)) {
  border-radius: 28px;
  animation: lg-modal-in .62s var(--lg-spring) both;
}
:root.lg .modal:not(.rp-modal, .cl-modal) {
  border-radius: 28px; border: 1px solid var(--lg-edge);
  /* dichtes Milchglas: helle Flächen dahinter sollen nicht als Fleck durchscheinen */
  background: rgba(24, 26, 33, .8);
  -webkit-backdrop-filter: blur(44px) saturate(160%); backdrop-filter: blur(44px) saturate(160%);
  box-shadow: var(--shadow-2);
  animation: none;
}
:root.lg .modal-close { top: 16px; right: 16px; }
/* ohne Untertitel klebte der Titel am Inhalt */
:root.lg .modal #modal-sub:empty { height: 20px; }
/* Leisten, unter denen im Dialog Inhalt durchscrollt */
:root.lg .app-progress {
  background: rgba(30, 32, 40, .55);
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent);
}
:root.lg :is(.app-form-foot, .mem-bulk, .set-bar) {
  background: rgba(30, 32, 40, .62);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
}
:root.lg :is(.mem-bulk, .set-bar) { border-radius: 18px; border-color: var(--lg-edge); box-shadow: var(--shadow-2); }
:root.lg :is(.db-suggest, .mc-suggest, .biz-suggest, .biz-tip, .disp-tip, .disp-menu, .disp-map-foot) {
  background: var(--lg-float-strong);
  -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur);
}

/* Ausblenden: glass.js legt beim Schließen eine Kopie darüber */
.lg-leaving { position: fixed; inset: 0; z-index: 89; pointer-events: none; animation: lg-fade-out .26s ease-in both; }
.lg-leaving .modal-wrap { animation: lg-modal-out .26s ease-in both !important; }

/* ---------------------------------------------------------------- Meldungen */
:root.lg .toast {
  position: relative; padding: 13px 18px 13px 36px; border-radius: 20px;
  border: 1px solid var(--lg-edge); border-left: 1px solid var(--lg-edge);
  background: var(--lg-float-strong);
  -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur);
  box-shadow: var(--shadow-2);
  animation: lg-toast-in .7s var(--lg-spring) both;
  transform-origin: 100% 100%;
}
:root.lg .toast::before {
  content: ""; position: absolute; left: 16px; top: 19px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 22%, transparent);
}
:root.lg .toast.err::before { background: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 22%, transparent); }
:root.lg .toast.warn::before { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 22%, transparent); }

/* ---------------------------------------------------------------- Startseite */
:root.lg #view-landing { overflow-x: clip; }
:root.lg .hero .chip.team {
  padding: 7px 15px; font-size: 12.5px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 8px 24px -14px rgba(0, 0, 0, .8);
}
:root.lg .hero-facts { color: var(--text-dim); }

:root.lg .tilt .frame {
  border-radius: 22px; border-color: rgba(255, 255, 255, .16);
  box-shadow:
    0 0 0 9px rgba(255, 255, 255, .045), 0 0 0 10px rgba(255, 255, 255, .1),
    0 50px 110px -40px rgba(0, 0, 0, .95), 0 2px 8px rgba(0, 0, 0, .35);
}
:root.lg .tilt-hero .frame { border-radius: 24px; }
:root.lg .tilt.is-hover .frame { border-color: rgba(255, 255, 255, .28); }
:root.lg .live-hint {
  display: table; margin: 26px auto 0; padding: 8px 16px; border-radius: 999px;
  color: var(--text-dim); background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

:root.lg .wide-tab {
  border-radius: 22px; background: var(--bg-2); border-color: var(--border-soft);
  box-shadow: var(--shadow-1);
  transition: background-color .25s, border-color .25s, color .25s, transform .6s var(--lg-spring);
}
:root.lg .wide-tab:hover { background: rgba(255, 255, 255, .075); transform: translateY(-3px); }
:root.lg .wide-tab:active { transform: scale(.97); transition-duration: .12s; }
:root.lg .wide-tab.is-active {
  background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 20px 44px -26px rgba(0, 0, 0, .9);
}
:root.lg .wide-bar { left: 22px; right: 22px; bottom: 10px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .85); }

:root.lg .more-grid { gap: 14px; background: none; border: none; border-radius: 0; overflow: visible; }
:root.lg .more-item {
  position: relative; border-radius: 22px; background: var(--bg-2);
  border: 1px solid var(--border-soft); box-shadow: var(--shadow-1);
  transition: background-color .25s, transform .65s var(--lg-spring);
}
:root.lg .more-item:hover { background: rgba(255, 255, 255, .075); transform: translateY(-4px); }

:root.lg footer.foot {
  border: 1px solid var(--border-soft); border-radius: 22px;
  margin-bottom: 24px; padding: 20px 26px;
  background: var(--bg-2); box-shadow: var(--shadow-1);
}
:root.lg .legal-wrap .legal { position: relative; }

/* ---------------------------------------------------------------- Auftritt
   Beim Seitenwechsel – sobald der Inhalt geladen ist (glass.js setzt dann .lg-enter kurz) – gleiten Inhalte
   gestaffelt herein und federn aus. */
/* Warten, bis geladen ist (glass.js): neuer Inhalt kurz unsichtbar,
   die Ladeanzeige bleibt sichtbar */
:root.lg.lg-pending :is(.app-view:not(#view-loading), .char-body) > *,
:root.lg.lg-pending .tiles > * { opacity: 0; }
:root.lg.lg-enter :is(.app-view, .char-body) > *,
:root.lg.lg-enter .tiles > * {
  animation: lg-rise .8s var(--lg-spring-soft) both;
}
:root.lg.lg-enter :is(.app-view, .char-body) > :nth-child(2) { animation-delay: .05s; }
:root.lg.lg-enter :is(.app-view, .char-body) > :nth-child(3) { animation-delay: .1s; }
:root.lg.lg-enter :is(.app-view, .char-body) > :nth-child(4) { animation-delay: .15s; }
:root.lg.lg-enter :is(.app-view, .char-body) > :nth-child(n+5) { animation-delay: .2s; }
:root.lg.lg-enter .tiles > :nth-child(1) { animation-delay: .12s; }
:root.lg.lg-enter .tiles > :nth-child(2) { animation-delay: .18s; }
:root.lg.lg-enter .tiles > :nth-child(3) { animation-delay: .24s; }
:root.lg.lg-enter .tiles > :nth-child(4) { animation-delay: .3s; }
:root.lg.lg-enter .tiles > :nth-child(n+5) { animation-delay: .34s; }

@keyframes lg-rise { from { opacity: 0; transform: translateY(22px) scale(.97); } }
@keyframes lg-fade { from { opacity: 0; } }
@keyframes lg-fade-out { to { opacity: 0; } }
@keyframes lg-modal-in { from { opacity: 0; transform: translateY(18px) scale(.9); } }
@keyframes lg-modal-out { to { opacity: 0; transform: translateY(8px) scale(.95); } }
@keyframes lg-drop { from { opacity: 0; transform: translateY(-8px) scale(.82); } }
@keyframes lg-toast-in { from { opacity: 0; transform: translateY(18px) scale(.86); } }

/* ---------------------------------------------------------------- Handy-Breite */
@media (max-width: 560px) {
  :root.lg { --top-h: 72px; }
  :root.lg .top { top: 8px; margin: 8px 8px 0; height: 56px; border-radius: 20px; gap: 12px; }
  :root.lg .toasts { left: 12px; right: 12px; bottom: 12px; }
  :root.lg .toast { max-width: none; }
}

/* ---------------------------------------------------------------- Rücksicht */
@media (prefers-reduced-motion: reduce) {
  :root.lg *, :root.lg *::before, :root.lg *::after { animation-duration: .01ms !important; animation-delay: 0s !important; }
  :root.lg :is(.btn, .tile, .back-btn, .nav-item, .lg-glider, .lg-seg-glider, .fchip, .wide-tab, .more-item, .sw i::after) { transition-duration: .01ms !important; }
}
@media (prefers-reduced-transparency: reduce) {
  :root.lg { --lg-float: #181a20; --lg-float-strong: #181a20; --bg-2: #15171c; --bg-3: #1d1f25; --bg-4: #25282f; }
}
