@font-face {
  font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/public/themes/fonts/dm-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/public/themes/fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/*
  V2 sign-in pages (controllers/03-run/00-pages/authPages.js, drawn by portal-login.js): the structure and the
  SoftyFlow design. The Google, Microsoft and Apple designs (portal-login-<id>.css) override it from the later layer
  sf-page.design; the account brand colours (--sf-brand-*, utils/brandColors.js) come in sf-page.brand; the client CSS,
  unlayered, always wins.
  Positions (settings.loginPagePosition): centre = a card over the background; left / right = a full-height panel on
  that side, the background and a welcome text on the other. Under 761px every position becomes a sheet under the
  background.
  Each colour role keeps the design's own value as the fallback of the brand token: no brand, no change.
*/
@layer sf-page.base {
  html { height: 100%; }
  .lg-body { margin: 0; min-height: 100%; background: #0c0f24; }
  .lg {
    --lg-font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --lg-ink: #12141c; --lg-ink-2: #383c49; --lg-muted: #646979; --lg-line: #e3e5ec; --lg-line-strong: #cdd1db;
    --lg-surface: #fff; --lg-field: #f5f6f9; --lg-field-focus: #fff; --lg-hover: rgba(16, 19, 40, .05);
    /* primary: filled buttons, links, active fields; secondary: the signal (focus ring, title dot, glows) */
    --lg-accent: var(--sf-brand-primary, #12141c); --lg-accent-hover: var(--sf-brand-primary-hover, #2a2e3d);
    --lg-on-accent: var(--sf-brand-on-primary, #fff); --lg-accent-rgb: var(--sf-brand-primary-rgb, 18, 20, 28);
    --lg-accent-ui: var(--sf-brand-primary-ui, #12141c); --lg-link: var(--sf-brand-primary-ink, #4f46e5);
    --lg-tonal: var(--sf-brand-primary-soft, #eef0f6); --lg-on-tonal: var(--sf-brand-on-primary-soft, #12141c);
    --lg-tonal-hover: var(--sf-brand-primary-soft-2, #e2e5ef);
    --lg-signal: var(--sf-brand-secondary-ui, #f0263b); --lg-signal-rgb: var(--sf-brand-secondary-rgb, 240, 38, 59);
    --lg-danger: #d1243a; --lg-danger-soft: #fff0f2; --lg-success: #047857; --lg-success-soft: #e8f8f1; --lg-warn: #b45309; --lg-warn-soft: #fff7e6;
    --lg-radius: 28px; --lg-radius-field: 14px; --lg-radius-btn: 14px; --lg-field-h: 48px; --lg-btn-h: 48px;
    --lg-card-w: 448px; --lg-card-pad: 40px 38px 34px; --lg-panel-w: clamp(440px, 38vw, 580px);
    --lg-card-shadow: 0 0 0 1px rgba(16, 19, 40, .06), 0 40px 90px -30px rgba(6, 8, 26, .6);
    --lg-ease: cubic-bezier(.16, .84, .24, 1);
    position: relative; min-height: 100vh; min-height: 100dvh; color: var(--lg-ink); font-family: var(--lg-font);
    font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  }
  .lg *, .lg *::before, .lg *::after { box-sizing: border-box; font-family: inherit; }
  :where(.lg) button, :where(.lg) input { font: inherit; color: inherit; }
  :where(.lg) button { cursor: pointer; }
  :where(.lg) :focus-visible { outline: 2px solid var(--lg-signal); outline-offset: 3px; }
  :where(.lg) .lg-input:focus-visible { outline: 0; }
  .lg-ico { flex-shrink: 0; width: 20px; height: 20px; }

  /* Background: the image of the IDE settings (Connexion > Image de fond), or the artwork of the design */
  .lg-scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #0c0f24; }
  .lg-scene-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: lg-scene-in 1.6s var(--lg-ease) both; }
  .lg-scene-art { position: absolute; inset: 0; overflow: hidden; background: radial-gradient(120% 100% at 0% 0%, #23285f 0%, #0c0f24 58%); }
  .lg-scene-art > i { position: absolute; display: block; }
  .lg-art-a {
    inset: -30%; mix-blend-mode: screen; animation: lg-drift 26s ease-in-out infinite alternate;
    background: radial-gradient(26% 36% at 78% 28%, rgba(var(--sf-brand-secondary-rgb, 255, 58, 88), .55), transparent 70%),
      radial-gradient(32% 42% at 22% 86%, rgba(var(--sf-brand-primary-rgb, 88, 92, 255), .6), transparent 70%);
  }
  .lg-art-b {
    inset: 0; background: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 48px 48px, linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 48px 48px;
    -webkit-mask-image: radial-gradient(70% 90% at 72% 30%, #000, transparent 75%); mask-image: radial-gradient(70% 90% at 72% 30%, #000, transparent 75%);
  }
  .lg-art-c {
    inset: 0; opacity: .12; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }
  .lg-art-d { display: none; }
  .lg-scene-shade { position: absolute; inset: 0; pointer-events: none; }
  .has-image .lg-scene-shade { background: radial-gradient(120% 90% at 50% 40%, rgba(8, 10, 26, .18), rgba(8, 10, 26, .55)); }
  .has-image.is-split .lg-scene-shade { background: linear-gradient(0deg, rgba(8, 10, 26, .82) 0%, rgba(8, 10, 26, .25) 45%, rgba(8, 10, 26, .1) 100%); }

  /* Layout: physical left / right whatever the direction of the language */
  .lg-layout { position: relative; z-index: 1; display: flex; min-height: 100vh; min-height: 100dvh; direction: ltr; }
  .lg-layout > * { direction: var(--lg-dir, ltr); }
  [dir='rtl'] .lg { --lg-dir: rtl; }
  .is-centered .lg-layout { flex-direction: column; align-items: center; justify-content: center; padding: 56px 20px 32px; }
  .is-centered .lg-panel { width: 100%; max-width: var(--lg-card-w); }
  .is-split .lg-layout { align-items: stretch; }
  .is-split .lg-panel {
    position: relative; display: flex; flex: 0 0 var(--lg-panel-w); width: var(--lg-panel-w); min-height: 100vh; min-height: 100dvh;
    background: var(--lg-surface); box-shadow: 0 0 0 1px rgba(16, 19, 40, .06), 0 0 80px -20px rgba(6, 8, 26, .55);
    animation: lg-panel-in .7s var(--lg-ease) backwards;
  }
  .is-left .lg-panel { order: 0; }
  .is-left .lg-aside { order: 1; }
  .is-right .lg-aside { order: 0; }
  .is-right .lg-panel { order: 1; --lg-panel-from: 24px; }
  .lg-panel-inner { display: flex; flex-direction: column; width: 100%; }
  .is-split .lg-panel-inner { max-width: 432px; margin: 0 auto; padding: 48px 36px 24px; }
  .is-split .lg-box { margin-block: auto; }

  /* Welcome text on the background side */
  .lg-aside {
    position: sticky; top: 0; display: flex; flex: 1 1 auto; flex-direction: column; justify-content: flex-end; align-self: flex-start;
    min-width: 0; height: 100vh; height: 100dvh; padding: 64px; color: #fff;
  }
  .lg-aside-inner { max-width: 600px; animation: lg-rise .9s .15s var(--lg-ease) backwards; }
  .lg-aside-title { font-size: clamp(34px, 3.8vw, 56px); font-weight: 700; line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; overflow-wrap: anywhere; }
  .lg-aside-title::after { content: ''; display: inline-block; width: .19em; height: .19em; margin-inline-start: .08em; border-radius: 50%; background: var(--lg-signal); }
  .lg-aside-text { max-width: 460px; margin: 16px 0 0; color: rgba(255, 255, 255, .78); font-size: 17px; line-height: 1.5; }
  .lg-clock { display: none; }
  /* the stage beside the form (portal-login.js STAGE): only the designs that draw it show it */
  .lg-stage { display: none; }

  /* Card */
  .lg-box { position: relative; }
  .is-centered .lg-box {
    padding: var(--lg-card-pad); border-radius: var(--lg-radius); background: var(--lg-surface); box-shadow: var(--lg-card-shadow);
    animation: lg-rise .7s var(--lg-ease) backwards;
  }
  .lg-head { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 26px; }
  .lg-logo { display: flex; align-items: center; min-height: 40px; margin-bottom: 28px; }
  .lg-logo img { display: block; max-width: 210px; max-height: 52px; object-fit: contain; }
  .lg-logo-name { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
  .lg-badge { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 18px; border-radius: 17px; background: var(--lg-tonal); color: var(--lg-on-tonal); }
  .lg-badge .lg-ico { width: 26px; height: 26px; }
  .lg-badge.is-success { background: var(--lg-success-soft); color: var(--lg-success); }
  .lg-badge.is-warn { background: var(--lg-warn-soft); color: var(--lg-warn); }
  .lg-title { margin: 0; color: var(--lg-ink); font-size: 29px; font-weight: 700; line-height: 1.15; letter-spacing: -.028em; outline: 0; overflow-wrap: anywhere; }
  .lg-title::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-inline-start: 3px; border-radius: 50%; background: var(--lg-signal); }
  .lg-subtitle { margin: 8px 0 0; color: var(--lg-muted); font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }

  /* Messages */
  .lg-alert { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; padding: 12px 14px; border-radius: 14px; font-size: 14px; line-height: 1.45; animation: lg-rise .3s var(--lg-ease) backwards; }
  .lg-alert .lg-ico { width: 18px; height: 18px; margin-top: 1px; }
  .lg-alert.is-error { background: var(--lg-danger-soft); color: #a0142a; }
  .lg-alert.is-success { background: var(--lg-success-soft); color: var(--lg-success); }
  .lg-alert.is-info { background: var(--lg-tonal); color: var(--lg-on-tonal); }
  .lg-hint { margin: 0; color: var(--lg-muted); font-size: 14px; line-height: 1.5; }

  /* Fields */
  .lg-fields { display: grid; gap: 16px; }
  .lg-field { position: relative; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
  .lg-label { color: var(--lg-ink-2); font-size: 13px; font-weight: 600; }
  .lg-control { position: relative; display: flex; align-items: center; }
  .lg-input {
    width: 100%; height: var(--lg-field-h); padding: 0 16px; border: 1px solid var(--lg-line); border-radius: var(--lg-radius-field);
    background: var(--lg-field); color: var(--lg-ink); font-size: 15px; outline: 0; -webkit-appearance: none; appearance: none;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
  }
  .lg-input:hover { border-color: var(--lg-line-strong); }
  .lg-input:-webkit-autofill { -webkit-text-fill-color: var(--lg-ink); transition: background-color 600000s 0s, color 600000s 0s; }
  .lg-field.is-focus .lg-input { border-color: var(--lg-accent-ui); background: var(--lg-field-focus); box-shadow: 0 0 0 4px rgba(var(--lg-accent-rgb), .12); }
  .lg-field.is-error .lg-input { border-color: var(--lg-danger); }
  .lg-field.is-error.is-focus .lg-input { box-shadow: 0 0 0 4px rgba(209, 36, 58, .12); }
  .lg-field.is-password .lg-input { padding-inline-end: 52px; }
  .lg-eye {
    position: absolute; inset-inline-end: 6px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0;
    border-radius: 10px; background: transparent; color: var(--lg-muted); transition: background .15s, color .15s;
  }
  .lg-eye:hover { background: var(--lg-hover); color: var(--lg-ink); }
  .lg-eye .lg-ico { width: 19px; height: 19px; }
  .lg-error { display: flex; align-items: flex-start; gap: 6px; color: var(--lg-danger); font-size: 13px; line-height: 1.4; }
  .lg-error .lg-ico { width: 16px; height: 16px; margin-top: 1px; }

  .lg-captcha { display: grid; gap: 12px; margin-top: 16px; }
  .lg-captcha-img { display: flex; justify-content: center; padding: 6px; border: 1px solid var(--lg-line); border-radius: 14px; background: #fff; }
  .lg-captcha-img svg { display: block; max-width: 100%; height: auto; }

  .lg-forgot { display: flex; justify-content: flex-end; margin-top: 12px; }
  .lg-link {
    display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; border: 0; border-radius: 6px; background: none; color: var(--lg-link);
    font-size: 14px; font-weight: 600; text-decoration: none;
  }
  .lg-link:hover { text-decoration: underline; text-underline-offset: 3px; }
  .lg-back .lg-ico { width: 18px; height: 18px; transition: transform .2s var(--lg-ease); }
  .lg-back:hover .lg-ico { transform: translateX(-3px); }
  [dir='rtl'] .lg-back .lg-ico, [dir='rtl'] .lg-btn-arrow { transform: scaleX(-1); }

  /* The account of the reset link, shown instead of asking for its e-mail */
  .lg-account {
    display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; min-width: 0; margin-bottom: 18px;
    padding: 5px 16px 5px 5px; border: 1px solid var(--lg-line); border-radius: 999px; background: var(--lg-surface);
  }
  .lg-account-avatar {
    display: grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
    background: var(--lg-accent); color: var(--lg-on-accent); font-size: 13px; font-weight: 700;
  }
  .lg-account-email { min-width: 0; overflow: hidden; color: var(--lg-ink); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }

  /* Rules of the new password (the default rule, checked while typing) */
  .lg-rules { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--lg-field); font-size: 13px; }
  .lg-rules-title { margin-bottom: 8px; color: var(--lg-ink-2); font-weight: 600; }
  .lg-rules ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 16px; margin: 0; padding: 0; list-style: none; }
  .lg-rules li { display: flex; align-items: flex-start; gap: 7px; color: var(--lg-muted); line-height: 1.4; transition: color .2s; }
  .lg-rules li .lg-ico { width: 16px; height: 16px; margin-top: 1px; }
  .lg-rules li.is-special { grid-column: 1 / -1; }
  .lg-rules li.is-ok { color: var(--lg-success); }
  .lg-rules.is-checked li.is-todo { color: var(--lg-danger); }
  .lg-form > .lg-hint { margin-top: 14px; }
  .lg-form > .lg-hint:first-child { margin-top: 0; }

  /* Buttons */
  .lg-actions { display: flex; margin-top: 24px; }
  .lg-actions > .lg-btn { flex: 1 1 auto; }
  /* a link and a button: side by side, or the button above the link when the card is too narrow */
  .lg-actions.is-split { flex-wrap: wrap-reverse; align-items: center; justify-content: space-between; gap: 14px 18px; }
  .lg-actions.is-split > .lg-btn { flex: 1 0 auto; }
  .lg-actions.is-split > .lg-link { margin-inline: auto; }
  .lg-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: var(--lg-btn-h); padding: 0 24px;
    border: 0; border-radius: var(--lg-radius-btn); font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
    transition: background-color .15s, box-shadow .2s, transform .15s, opacity .15s;
  }
  .lg-btn:active:not(:disabled) { transform: translateY(1px); }
  .lg-btn:disabled { cursor: default; opacity: .72; }
  .lg-btn--primary { background: var(--lg-accent); box-shadow: 0 12px 26px -14px rgba(var(--lg-accent-rgb), .85); color: var(--lg-on-accent); }
  .lg-btn--primary:hover:not(:disabled) { background: var(--lg-accent-hover); }
  .lg-btn--tonal { background: var(--lg-tonal); color: var(--lg-on-tonal); }
  .lg-btn--tonal:hover:not(:disabled) { background: var(--lg-tonal-hover); }
  .lg-btn-arrow { width: 18px; height: 18px; transition: transform .2s var(--lg-ease); }
  .lg-btn:hover .lg-btn-arrow { transform: translateX(3px); }
  [dir='rtl'] .lg-btn:hover .lg-btn-arrow { transform: scaleX(-1) translateX(3px); }
  .lg-spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: lg-spin .7s linear infinite; }

  /* The other ways to sign in */
  .lg-options { margin-top: 24px; }
  .lg-divider { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; color: var(--lg-muted); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
  .lg-divider::before, .lg-divider::after { content: ''; flex: 1; height: 1px; background: var(--lg-line); }
  .lg-options-title { display: none; }
  /* no e-mail form (IDE: « E-mail et mot de passe » off): the other ways are the only content, right under the title */
  .no-password .lg-options { margin-top: 0; }
  .lg-methods { display: grid; gap: 10px; }
  .lg-options.is-grid .lg-methods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg-method {
    display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 0; height: 46px; padding: 0 14px;
    border: 1px solid var(--lg-line); border-radius: var(--lg-radius-btn); background: var(--lg-surface); color: var(--lg-ink);
    font-size: 14px; font-weight: 600; text-decoration: none; transition: background-color .15s, border-color .15s, box-shadow .15s;
  }
  .lg-method:hover { border-color: var(--lg-line-strong); background: var(--lg-field); }
  .lg-method-icon { display: grid; place-items: center; flex-shrink: 0; width: 20px; height: 20px; }
  .lg-method-icon img, .lg-mark, .lg-mark svg { display: block; width: 20px; height: 20px; object-fit: contain; }
  .lg-method-icon .lg-ico { width: 20px; height: 20px; color: var(--lg-ink-2); }
  .lg-method-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* "Continuer avec Google" in a list (1 or 2 ways), "Google" in the grid (3 and more) */
  .lg-method-short, .lg-options.is-grid .lg-method-long { display: none; }
  .lg-options.is-grid .lg-method-short { display: inline; }

  /* Footer: language and copyright */
  .lg-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; font-size: 13px; }
  .is-centered .lg-foot { padding: 0 6px; color: rgba(255, 255, 255, .86); }
  .is-split .lg-foot { padding-top: 28px; color: var(--lg-muted); }
  .lg-lang { position: relative; }
  .lg-lang-btn {
    display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border: 0; border-radius: 999px;
    background: transparent; color: inherit; font-size: 13px; font-weight: 500; transition: background .15s;
  }
  .lg-lang-btn:hover, .lg-lang-btn[aria-expanded='true'] { background: var(--lg-hover); }
  .is-centered .lg-lang-btn { background: rgba(255, 255, 255, .12); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  .is-centered .lg-lang-btn:hover, .is-centered .lg-lang-btn[aria-expanded='true'] { background: rgba(255, 255, 255, .2); }
  .lg-lang-btn .lg-ico { width: 17px; height: 17px; }
  .lg-lang-btn .lg-lang-chevron { width: 15px; height: 15px; opacity: .7; transition: transform .2s; }
  .lg-lang-btn[aria-expanded='true'] .lg-lang-chevron { transform: rotate(180deg); }
  .lg-lang-menu {
    position: absolute; bottom: calc(100% + 8px); inset-inline-start: 0; z-index: 5; min-width: 210px; max-height: min(340px, 60vh); margin: 0; padding: 6px;
    overflow: auto; list-style: none; border-radius: 16px; background: #fff; color: var(--lg-ink);
    box-shadow: 0 0 0 1px rgba(16, 19, 40, .06), 0 24px 50px -16px rgba(14, 18, 48, .42); animation: lg-pop .16s ease-out; transform-origin: bottom left;
  }
  .lg-lang-menu a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; color: inherit; font-size: 14px; text-decoration: none; }
  .lg-lang-menu a:hover { background: #f3f4f8; }
  .lg-lang-menu a[aria-checked='true'] { font-weight: 600; }
  .lg-lang-menu .lg-ico { width: 16px; height: 16px; color: var(--lg-link); }
  .lg-copy { white-space: nowrap; }

  /* IDE preview */
  .lg-preview {
    position: fixed; top: 14px; left: 50%; z-index: 20; display: inline-flex; align-items: center; gap: 9px; padding: 5px 5px 5px 13px;
    border: 1px solid rgba(255, 214, 120, .35); border-radius: 999px; background: rgba(40, 30, 6, .62); color: #ffe2a0;
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-size: 12px; font-weight: 500; white-space: nowrap; transform: translateX(-50%);
  }
  .lg-preview .lg-ico { width: 15px; height: 15px; }
  .lg-preview button { padding: 4px 11px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 12px; font-weight: 600; }
  .lg-preview button:hover { background: rgba(255, 255, 255, .24); }

  /* QR code dialog */
  .lg-dialog-wrap { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; background: rgba(8, 10, 26, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: lg-fade .2s ease-out; }
  .lg-dialog {
    display: grid; gap: 14px; width: min(460px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 24px; border-radius: 24px;
    background: var(--lg-surface); color: var(--lg-ink); box-shadow: 0 40px 90px -30px rgba(6, 8, 26, .6); animation: lg-pop .2s ease-out;
  }
  .lg-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .lg-dialog-title { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
  .lg-dialog-close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--lg-muted); }
  .lg-dialog-close:hover { background: var(--lg-hover); color: var(--lg-ink); }
  .lg-reader { overflow: hidden; border-radius: 16px; background: var(--lg-field); }
  .lg-reader:empty { display: none; }

  /* View changes */
  .lg-swap-enter-active, .lg-swap-leave-active { transition: opacity .18s ease, transform .24s var(--lg-ease); }
  .lg-swap-enter { opacity: 0; transform: translateY(8px); }
  .lg-swap-leave-to { opacity: 0; transform: translateY(-4px); }

  @keyframes lg-rise { from { opacity: 0; transform: translateY(16px); } }
  @keyframes lg-panel-in { from { opacity: 0; transform: translateX(var(--lg-panel-from, -24px)); } }
  @keyframes lg-scene-in { from { opacity: .35; filter: saturate(.6) blur(8px); transform: scale(1.1); } to { opacity: 1; filter: none; transform: scale(1.02); } }
  @keyframes lg-drift { from { transform: translate3d(-3%, -2%, 0) rotate(0deg); } to { transform: translate3d(3%, 2%, 0) rotate(8deg); } }
  @keyframes lg-spin { to { transform: rotate(360deg); } }
  @keyframes lg-pop { from { opacity: 0; transform: scale(.96); } }
  @keyframes lg-fade { from { opacity: 0; } }

  /* Phones and narrow windows: the background on top, the card as a sheet under it */
  @media (max-width: 760px) {
    .is-centered .lg-layout, .is-split .lg-layout { flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 0; }
    .lg-aside { display: none; }
    .is-centered .lg-panel, .is-split .lg-panel {
      display: flex; flex: 1 0 auto; width: 100%; max-width: none; min-height: 0; margin-top: max(120px, 22vh); border-radius: 28px 28px 0 0;
      background: var(--lg-surface); box-shadow: 0 -24px 50px -24px rgba(6, 8, 26, .55); animation: lg-sheet-in .6s var(--lg-ease) backwards;
    }
    .is-centered .lg-panel-inner, .is-split .lg-panel-inner { max-width: 460px; margin: 0 auto; padding: 30px 22px calc(18px + env(safe-area-inset-bottom)); }
    .is-centered .lg-box { padding: 0; border-radius: 0; background: transparent; box-shadow: none; animation: none; }
    .is-split .lg-box { margin-block: 0; }
    .is-centered .lg-foot { margin-top: auto; padding: 28px 0 0; color: var(--lg-muted); }
    .is-centered .lg-lang-btn { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
    .is-centered .lg-lang-btn:hover, .is-centered .lg-lang-btn[aria-expanded='true'] { background: var(--lg-hover); }
    .lg-logo { margin-bottom: 22px; }
    .lg-title { font-size: 25px; }
    .lg-clock.is-top { display: none; }
    .lg-preview { top: 10px; }
  }
  @keyframes lg-sheet-in { from { opacity: 0; transform: translateY(40px); } }
  @media (max-width: 380px) {
    .lg-options.is-grid .lg-methods { grid-template-columns: minmax(0, 1fr); }
    .lg-actions.is-split { flex-direction: column-reverse; align-items: stretch; }
    .lg-actions.is-split > .lg-btn { flex: 1 1 auto; }
    .lg-actions.is-split > .lg-link { justify-content: center; }
  }
  @media (prefers-reduced-motion: reduce) {
    .lg .lg-scene-img, .lg .lg-art-a, .lg .lg-box, .lg .lg-panel, .lg .lg-aside-inner, .lg .lg-alert, .lg .lg-lang-menu, .lg .lg-dialog, .lg .lg-dialog-wrap { animation: none; }
    .lg .lg-swap-enter-active, .lg .lg-swap-leave-active { transition: none; }
  }
}
