/* ============================================================
   /seguridad/ — animación con la interfaz real de MollyVett.
   Copia de Mollyvett-app: login (layouts/bare), campos (ui/input),
   botones (ui/button), diálogo de vidrio (ui/shared/dialog),
   escritorio, widgets e íconos estilo "dark". Fondos: wallpapers
   de la app (los desenfocados ya vienen procesados: sin blur en vivo).
   1em = 16px de la app; la base escala con el ancho (container query).
   Solo se anima transform/opacity/clip-path/filter.
   ============================================================ */
.sg {
  container-type: inline-size;
  --e-out: cubic-bezier(.16, 1, .3, 1);
  --e-app: cubic-bezier(.32, .72, 0, 1);     /* zoom de las pantallas de acceso de la app */
  --e-io: cubic-bezier(.65, 0, .35, 1);
  --ink: #fff;
  --rojo: #f45a5a;
}
.sg-window { -webkit-box-reflect: unset; }
/* La regla general `.mv-window img` (capturas) no aplica aquí */
.sg .sg-screen img { width: auto; height: auto; aspect-ratio: auto; background: none; }
.sg-tb--url { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; opacity: .6; flex: none; }

.sg-screen {
  position: relative; aspect-ratio: 1920 / 1024; overflow: hidden; background: #111;
  font-family: var(--font-sans); font-size: clamp(8px, 1.8cqw, 22px); color: var(--ink);
  -webkit-font-smoothing: antialiased; letter-spacing: -.01em;
}

/* ---- Escenas ---- */
.sg-scene {
  position: absolute; inset: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .7s ease, visibility 0s linear .7s;
}
.sg-scene.is-on { opacity: 1; visibility: visible; transition-delay: .1s, 0s; z-index: 2; }
.sg-scene.was-on { visibility: visible; z-index: 1; }
.sg-scene:not(.is-on):not(.was-on) * { animation: none !important; }
.sg.is-paused *, .sg-nav.is-paused * { animation-play-state: paused !important; }
.sg-scene > * { position: relative; z-index: 1; }
.sg-scene > .sg-bg, .sg-scene > .sg-veil { position: absolute; z-index: 0; }
.sg .sg-screen .sg-bg { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sg-bg--nitido { animation: sg-wall 1.8s var(--e-out) both; }
.sg-veil { inset: 0; background: rgb(0 0 0 / .5); }             /* DarkenLayer de la app */
.sg-veil--suave { background: linear-gradient(rgb(0 0 0 / .28), rgb(0 0 0 / .08) 40%, rgb(0 0 0 / .3)); }

.sg-tb { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sg-cursor {
  position: absolute; left: 58%; top: 52%; z-index: 6; width: 1.45em; height: 1.45em; pointer-events: none;
  filter: drop-shadow(0 .15em .3em rgb(0 0 0 / .45)); transform-origin: 20% 15%;
}

@keyframes sg-wall { from { transform: scale(1.06); } to { transform: none; } }
@keyframes sg-up { from { opacity: 0; transform: translateY(.9em); } to { opacity: 1; transform: none; } }
@keyframes sg-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sg-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes sg-app { 0% { opacity: 0; transform: scale(.6); } 70% { opacity: 1; transform: scale(1.04); } 100% { opacity: 1; transform: none; } }
@keyframes sg-click { 50% { scale: .82; } }
@keyframes sg-press { 50% { scale: .96; } }
@keyframes sg-shake { 20% { translate: -.5em 0; } 40% { translate: .45em 0; } 60% { translate: -.3em 0; } 80% { translate: .15em 0; } }
@keyframes sg-cur-in { from { opacity: 0; transform: translate(4.5em, 3.5em); } 25% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes sg-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* ============ Escritorio (home de la app) ============ */
.sg-desk { position: absolute !important; inset: 0; display: flex; flex-direction: column; align-items: center; padding-top: 1.5em; }
.sg .sg-screen .sg-me { position: absolute; top: 1em; right: 1.2em; width: 2.1em; height: 2.1em; border-radius: 50%; animation: sg-in .6s ease .3s both; }
.sg-desk__head { display: flex; flex-direction: column; align-items: center; gap: .45em; animation: sg-up .9s var(--e-out) .15s both; }
.sg .sg-screen .sg-logo { width: auto; }
/* Títulos de la app simulada: div y no h4/h5 para no ensuciar el esquema de encabezados de la página */
.sg .sg-h4, .sg .sg-h5 { font-family: var(--font-heading); letter-spacing: 0; }
.sg .sg-screen .sg-desk__head .sg-logo { height: 2.5em; filter: drop-shadow(0 .3em .6em rgb(0 0 0 / .35)); }
.sg-desk__head .sg-h4 { margin: 0; font-size: 2.1em; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; text-shadow: 0 1px 2px rgb(0 0 0 / .35), 0 .1em .6em rgb(0 0 0 / .25); }
.sg-widgets { display: flex; gap: 1em; margin-top: 1.3em; }
.sg-wd { display: flex; flex-direction: column; align-items: center; gap: .45em; animation: sg-up .9s var(--e-out) both; animation-delay: .45s; }
.sg-wd:nth-child(2) { animation-delay: .55s; }
.sg-wd:nth-child(3) { animation-delay: .65s; }
.sg-wd > p { margin: 0; font-size: .8125em; text-shadow: 0 1px 2px rgb(0 0 0 / .5); }
.sg-widget {
  position: relative; width: 9.6em; height: 5.2em; border-radius: 1.25em; padding: .7em .8em;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgb(23 23 23 / .78); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: inset 0 1px 1px rgb(255 255 255 / .1), 0 .6em 1.6em -.6em rgb(0 0 0 / .5);
}
.sg-widget > small { position: absolute; top: .65em; left: .8em; font-size: .6em; color: rgb(255 255 255 / .5); }
.sg-widget > b { font-size: 2em; font-weight: 700; line-height: 1; }
.sg-widget > span { margin-top: .3em; font-size: .62em; color: rgb(255 255 255 / .6); }
.sg-widget--3 { flex-direction: row; gap: .35em; padding: .45em; }
.sg-widget--3 > span { flex: 1; height: 100%; border-radius: .75em; background: rgb(255 255 255 / .06); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2em; }
.sg-widget--3 b { font-size: 1.15em; font-weight: 700; line-height: 1; }
.sg-widget--3 small { font-size: .5em; color: rgb(255 255 255 / .55); }
.sg-apps { display: grid; grid-template-columns: repeat(6, 5.1em); row-gap: .35em; margin-top: 1em; justify-content: center; }
.sg-app { display: flex; flex-direction: column; align-items: center; gap: .4em; animation: sg-app .55s var(--e-out) both; animation-delay: calc(.9s + var(--k) * .045s); }
.sg .sg-screen .sg-app img { width: 3em; height: 3em; }
.sg-app span { font-size: .72em; text-shadow: 0 1px 2px rgb(0 0 0 / .6); white-space: nowrap; }
.sg-dock {
  position: absolute; left: 0; right: 0; bottom: .9em; margin: auto; width: max-content;
  display: flex; gap: .55em; padding: .45em; border-radius: 1.1em;
  background: rgb(23 23 23 / .5); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08), 0 .5em 1.4em -.5em rgb(0 0 0 / .5);
  animation: sg-up .8s var(--e-out) 1.35s both;
}
.sg .sg-screen .sg-dock img { width: 2.3em; height: 2.3em; }

/* ============ Login (layouts/bare + login.tsx) ============ */
.sg-login { display: flex; flex-direction: column; align-items: center; gap: 1.25em; width: 22em; --d0: .1s; }
.sg-login > * { animation: sg-up .8s var(--e-app) both; animation-delay: calc(var(--d0) + var(--k, 0) * .08s); }
.sg-login > :nth-child(2) { --k: 1; }
.sg-login > :nth-child(3) { --k: 2; }
.sg-login > :nth-child(4) { --k: 3; }
.sg-login > :nth-child(5) { --k: 4; }
.sg-login > :nth-child(6) { --k: 5; }
.sg-login > :nth-child(7) { --k: 6; }
.sg .sg-screen .sg-login .sg-logo { height: 3.4em; opacity: .9; }
.sg-login__t { display: flex; flex-direction: column; align-items: center; gap: .375em; text-align: center; }
.sg-login__t .sg-h4 { margin: 0; font-size: 2em; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; opacity: .85; text-shadow: 0 0 8px rgb(255 255 255 / .2), 0 0 16px rgb(255 255 255 / .15); }
.sg-login__t p { margin: 0; font-size: .9375em; font-weight: 500; color: rgb(255 255 255 / .7); }
.sg-form { display: flex; flex-direction: column; gap: .625em; width: 17.5em; }
.sg-in {
  position: relative; display: flex; align-items: center; height: 3em; padding: 0 1.25em; border-radius: 3em;
  border: 1px solid rgb(255 255 255 / .1); background: rgb(255 255 255 / .04);
  font-size: .9375em; font-weight: 500; color: rgb(255 255 255 / .4);
}
.sg-in--pw { padding-right: 2.75em; }
.sg-eye { position: absolute; right: 1em; top: 0; bottom: 0; display: grid; place-items: center; opacity: .4; }
.sg-ph { color: rgb(255 255 255 / .3); }
.sg-type { display: inline-block; white-space: nowrap; }
.sg-dots { display: inline-flex; gap: .26em; }
.sg-dots i { width: .45em; height: .45em; border-radius: 50%; background: currentColor; }
.sg-err {
  display: flex; align-items: center; gap: .25em; margin-block: -.625em; padding: 0 .25em; height: 0; overflow: hidden;
  font-size: .8125em; color: var(--rojo); opacity: 0;
}
.sg-err .sg-tb { width: 1.1em; height: 1.1em; }
.sg-btn {
  position: relative; display: grid; place-items: center; height: 2.625em; min-width: 7em; padding: 0 1em; border-radius: 3em;
  background: rgb(255 255 255 / .75); color: #000; font-size: .875em; font-weight: 500;
  box-shadow: inset 0 2px 4px #fff;
}
.sg-btn > span { grid-area: 1 / 1; }
.sg-btn__b { opacity: 0; }
.sg-links { display: flex; flex-direction: column; align-items: center; gap: .25em; }
.sg-links p { margin: 0; font-size: .8125em; color: rgb(255 255 255 / .3); }
.sg-links u { color: rgb(255 255 255 / .6); text-underline-offset: 2px; }
/* Campo enfocado (focus-visible de ui/input) */
@keyframes sg-focus {
  0%, 100% { background: rgb(255 255 255 / .04); border-color: rgb(255 255 255 / .1); color: rgb(255 255 255 / .4); }
  8%, 92% { background: rgb(255 255 255 / .1); border-color: rgb(255 255 255 / .5); color: #fff; }
}

/* ============ 1. Tu espacio ============ */
/* (todo lo define el escritorio) */

/* ============ 2. Conexión segura: barra de dirección + aviso del navegador ============ */
.sg-s2__c { display: flex; flex-direction: column; align-items: flex-start; }
.sg-omni {
  display: flex; align-items: center; gap: .65em; width: 26em; height: 3em; padding: 0 1.15em; border-radius: 3em;
  background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .15);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 .8em 2em -1em rgb(0 0 0 / .6); font-size: 1em; font-weight: 500;
  animation: sg-up .8s var(--e-out) .15s both;
}
.sg-omni__lock { position: relative; display: grid; place-items: center; color: rgb(255 255 255 / .75); }
.sg-omni__lock .sg-tb { width: 1.1em; height: 1.1em; }
.sg-omni .sg-type { animation: sg-type .9s steps(13, end) .6s both; }
.sg-omni__lock .sg-cursor { left: 40%; top: 40%; animation: sg-cur-in .9s var(--e-io) 1.9s both, sg-click .3s ease 2.85s; }
.sg-omni__lock::before { /* el clic resalta el candado como en el navegador */
  content: ""; position: absolute; inset: -.45em; border-radius: 50%; background: rgb(255 255 255 / .14); opacity: 0;
  animation: sg-in .25s ease 2.95s both;
}
.sg-pop {
  width: 21em; margin: .55em 0 0 .2em; padding: 1em 1.15em 1.05em; border-radius: .9em;
  background: rgb(36 37 40 / .96); box-shadow: 0 0 0 1px rgb(255 255 255 / .08), 0 1.2em 2.6em -.8em rgb(0 0 0 / .7);
  transform-origin: 1.2em 0; animation: sg-pop .35s var(--e-out) 3.05s both;
}
@keyframes sg-pop { from { opacity: 0; transform: translateY(-.4em) scale(.97); } to { opacity: 1; transform: none; } }
.sg-pop__h { display: flex; align-items: center; gap: .55em; }
.sg-pop__h .sg-tb { width: 1.05em; height: 1.05em; color: rgb(255 255 255 / .8); }
.sg-pop__h b { font-size: .92em; font-weight: 600; }
.sg-pop p { margin: .55em 0 0 1.75em; font-size: .78em; line-height: 1.5; color: rgb(255 255 255 / .68); }
.sg-pop small { display: block; margin: .7em 0 0 1.95em; font-size: .7em; color: rgb(255 255 255 / .4); }

/* ============ 3. Tu contraseña ============ */
.sg-s3 .sg-in--mail { animation: sg-focus 1.2s linear .7s both; }
.sg-s3 .sg-in--mail .sg-type { animation: sg-type .8s steps(21, end) .8s both; }
.sg-s3 .sg-in--pw { animation: sg-focus 1.7s linear 1.75s both; }
.sg-s3 .sg-dots i { animation: sg-in .12s ease both; }
.sg-s3 .sg-dots i:nth-child(1) { animation-delay: 1.9s; }
.sg-s3 .sg-dots i:nth-child(2) { animation-delay: 1.98s; }
.sg-s3 .sg-dots i:nth-child(3) { animation-delay: 2.06s; }
.sg-s3 .sg-dots i:nth-child(4) { animation-delay: 2.14s; }
.sg-s3 .sg-dots i:nth-child(5) { animation-delay: 2.22s; }
.sg-s3 .sg-dots i:nth-child(6) { animation-delay: 2.3s; }
.sg-s3 .sg-dots i:nth-child(7) { animation-delay: 2.38s; }
.sg-s3 .sg-dots i:nth-child(8) { animation-delay: 2.46s; }
.sg-s3 .sg-cur-c { animation: sg-cur-in .8s var(--e-io) 2.45s both, sg-click .3s ease 3.3s, sg-out .2s ease 4s forwards; }
.sg-s3 .sg-btn { animation: sg-up .8s var(--e-app) .42s both, sg-press .3s ease 3.3s; }
.sg-s3 .sg-btn__a { animation: sg-out .15s ease 3.4s both; }
.sg-s3 .sg-btn__b { animation: sg-in .15s ease 3.45s both; }
.sg-s3 .sg-login { animation: sg-login-out .5s var(--e-app) 4.1s both; }
@keyframes sg-login-out { to { opacity: 0; transform: scale(.94); } }
.sg-s3__home { position: absolute !important; inset: 0; opacity: 0; animation: sg-home-in .7s var(--e-app) 4.2s both; }
@keyframes sg-home-in { from { opacity: 0; transform: scale(1.05); } to { opacity: 1; transform: none; } }
.sg-s3__home > .sg-bg, .sg-s3__home > .sg-veil { position: absolute; inset: 0; }
.sg-s3__home .sg-bg--nitido { animation: none; }
.sg-s3__home .sg-desk__head { animation-delay: 4.35s; }
.sg-s3__home .sg-me { animation-delay: 4.4s; }
.sg-s3__home .sg-app { animation-delay: calc(4.55s + var(--k) * .04s); }
.sg-s3__home .sg-dock { animation-delay: 4.9s; }

/* ============ 4. Freno a intrusos (login.tsx: ACCOUNT_LOCKED) ============ */
.sg-login--lock .sg-links { display: none; }
.sg-login--lock { gap: 1em; }
.sg-login--lock .sg-err { margin-block: -.5em; }
.sg .sg-screen .sg-login--lock .sg-logo { height: 2.6em; }
.sg-login--lock .sg-login__t .sg-h4 { font-size: 1.8em; }
.sg-s4 .sg-in--pw { animation: sg-hold 4s linear .5s both, sg-dis .4s ease 4.1s forwards; }
.sg-s4 .sg-in--mail { color: rgb(255 255 255 / .55); animation: sg-dis .4s ease 4.1s forwards; }
@keyframes sg-hold { 0%, 100% { background: rgb(255 255 255 / .1); border-color: rgb(255 255 255 / .5); color: #fff; } }
@keyframes sg-dis { to { opacity: .4; background: rgb(255 255 255 / .04); border-color: rgb(255 255 255 / .1); } }
/* Tres intentos: escribe, clic, error, se borra. Tiempos sobre 8.5 s */
.sg-s4 .sg-dots { animation: sg-s4-dots 8.5s linear both; }
@keyframes sg-s4-dots {
  0%, 8.2% { clip-path: inset(0 100% 0 0); opacity: 1; }
  12.9%, 15.3% { clip-path: inset(0 0 0 0); opacity: 1; }
  15.9% { clip-path: inset(0 0 0 0); opacity: 0; }
  16%, 23.5% { clip-path: inset(0 100% 0 0); opacity: 1; }
  28.2%, 30.6% { clip-path: inset(0 0 0 0); opacity: 1; }
  31.2% { clip-path: inset(0 0 0 0); opacity: 0; }
  31.3%, 38.8% { clip-path: inset(0 100% 0 0); opacity: 1; }
  43.5%, 45.9% { clip-path: inset(0 0 0 0); opacity: 1; }
  46.5%, 100% { clip-path: inset(0 0 0 0); opacity: 0; }
}
.sg-s4 .sg-err { animation: sg-s4-err 8.5s ease both, sg-shake .45s ease 1.35s, sg-shake .45s ease 2.65s; }
@keyframes sg-s4-err {
  0%, 15.8% { opacity: 0; height: 0; margin-top: -.625em; }
  17.5%, 46% { opacity: 1; height: 1.6em; margin-top: -.3em; }
  48%, 100% { opacity: 0; height: 0; margin-top: -.625em; }
}
.sg-s4 .sg-btn { animation: sg-up .8s var(--e-app) .5s both, sg-press .3s ease 1.3s, sg-press .3s ease 2.6s, sg-press .3s ease 3.9s, sg-dis-btn .4s ease 4.1s forwards; }
@keyframes sg-dis-btn { to { opacity: .5; } }
.sg-s4 .sg-btn__a { animation: sg-out .2s ease 4.05s both; }
.sg-s4 .sg-btn__b { animation: sg-in .2s ease 4.1s both; }
.sg-s4 .sg-cur-d { animation: sg-cur-in .7s var(--e-io) .3s both, sg-click .3s ease 1.25s, sg-click .3s ease 2.55s, sg-click .3s ease 3.85s, sg-cur-away .7s var(--e-io) 4.7s forwards; }
@keyframes sg-cur-away { from { opacity: 1; transform: none; } to { opacity: 0; transform: translate(3em, 2.5em); } }
.sg-lockbox { display: grid; grid-template-rows: 0fr; opacity: 0; margin-bottom: -1.25em; width: 19em; }
.sg-s4 .sg-lockbox { animation: sg-box .6s var(--e-out) 4s both; }
@keyframes sg-box { to { grid-template-rows: 1fr; opacity: 1; margin-bottom: 0; } }
.sg-lockbox__in {
  min-height: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: .375em;
  padding: .75em 1.25em; border-radius: 1em; background: rgb(248 113 113 / .1); text-align: center;
}
.sg-lockbox__in p { margin: 0; font-size: .8125em; color: rgb(252 165 165 / .9); }
.sg-lockbox__in b { font-family: ui-monospace, "Roboto Mono", monospace; font-size: 1.5em; font-weight: 600; color: #fecaca; }
.sg-lockbox__in u { font-size: .8125em; color: rgb(255 255 255 / .5); text-underline-offset: 2px; }
/* Cuenta regresiva: una tira de números que sube cada segundo */
.sg-cd { display: inline-block; height: 1.25em; line-height: 1.25em; overflow: hidden; font-variant-numeric: tabular-nums; vertical-align: top; }
.sg-cd i { display: block; font-style: normal; }
.sg-s4 .sg-cd i { animation: sg-cd 4s steps(4, end) 5s both; }
@keyframes sg-cd { to { transform: translateY(-500%); } }
.sg-lockbox .sg-cd { padding-block: .05em; }

/* ============ 5. Tu equipo (settings/consultorio.tsx) ============ */
.sg-sheet {
  width: 30em; padding: 1.75em; border-radius: 1.25em;
  background: rgb(31 31 31 / .72); -webkit-backdrop-filter: blur(36px) saturate(1.4); backdrop-filter: blur(36px) saturate(1.4);
  box-shadow: 0 20px 36px rgb(0 0 0 / .25), inset 0 1px 1px rgb(255 255 255 / .1);
  animation: sg-up .8s var(--e-out) .15s both;
}
.sg-sheet .sg-h4 { margin: 0 0 1.1em; font-size: 1.3em; font-weight: 700; letter-spacing: -.02em; }
.sg-sheet .sg-h5 { margin: 0; font-size: .8125em; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: rgb(255 255 255 / .55); }
.sg-sheet__d { margin: .25em 0 .75em; font-size: .75em; color: rgb(255 255 255 / .55); }
.sg-mems { display: flex; flex-direction: column; gap: .5em; }
.sg-mem { display: flex; align-items: center; gap: .75em; padding: .65em .75em; border-radius: .75em; background: rgb(255 255 255 / .05); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1); }
.sg .sg-screen .sg-mem > img { width: 2.25em; height: 2.25em; border-radius: 50%; flex: none; }
.sg-mem__n { flex: 1; min-width: 0; }
.sg-mem__n p { margin: 0; font-size: .8125em; font-weight: 500; color: rgb(255 255 255 / .9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-mem__n small { display: block; font-size: .6875em; color: rgb(255 255 255 / .55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-mem__in { margin-left: .5em; font-size: .85em; font-weight: 400; color: rgb(255 255 255 / .55); opacity: 0; }
.sg-pill { flex: none; padding: .25em .65em; border-radius: 2em; background: rgb(255 255 255 / .1); font-size: .6875em; font-weight: 500; color: rgb(255 255 255 / .8); }
.sg-sel { flex: none; display: inline-flex; align-items: center; gap: .3em; height: 2.2em; padding: 0 .55em 0 .8em; border-radius: .55em; background: rgb(255 255 255 / .05); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1); font-size: .72em; color: rgb(255 255 255 / .85); }
.sg-sel .sg-tb { width: 1.1em; height: 1.1em; opacity: .6; }
.sg-bs {
  position: relative; flex: none; display: grid; align-items: center; height: 2.1em; padding: 0 .85em; border-radius: 2em;
  background: rgb(255 255 255 / .1); border: .5px solid rgb(255 255 255 / .2); box-shadow: inset 0 1px 0 rgb(255 255 255 / .08);
  font-size: .72em; font-weight: 500;
}
.sg-bs > span { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: .45em; }
.sg-bs .sg-tb { width: 1.15em; height: 1.15em; }
.sg-bs__b { opacity: 0; }
.sg-ov { position: absolute !important; inset: 0; background: rgb(0 0 0 / .6); opacity: 0; }
.sg-dlg {
  position: absolute !important; inset: 0; margin: auto; width: 22em; height: max-content; z-index: 3 !important;
  display: flex; flex-direction: column; align-items: center; gap: .9em; padding: 2em; border-radius: 1.25em; text-align: center;
  background: rgb(31 31 31 / .8); -webkit-backdrop-filter: blur(36px); backdrop-filter: blur(36px);
  box-shadow: 0 20px 36px rgb(0 0 0 / .25), inset 0 1px 1px rgb(255 255 255 / .1);
  opacity: 0;
}
.sg-dlg__ic { display: grid; place-items: center; width: 3em; height: 3em; border-radius: 50%; background: rgb(255 255 255 / .08); }
.sg-dlg__ic .sg-tb { width: 1.5em; height: 1.5em; }
.sg-dlg .sg-h4 { margin: 0; font-size: 1.1em; font-weight: 600; letter-spacing: -.01em; }
.sg-dlg p { margin: 0; font-size: .8125em; line-height: 1.5; color: rgb(255 255 255 / .6); }
.sg-dlg__f { display: flex; gap: .625em; width: 100%; margin-top: .4em; }
.sg-dbtn { position: relative; flex: 1; display: grid; place-items: center; height: 2.4em; border-radius: 2em; font-size: .8125em; font-weight: 500; background: rgb(255 255 255 / .1); border: .5px solid rgb(255 255 255 / .2); }
.sg-dbtn--x { background: #e22c2c; border-color: transparent; box-shadow: inset 0 1px 0 rgb(255 255 255 / .2); }
/* Secuencia: clic en Desactivar → confirmación → Desactivar acceso → fila inactiva */
.sg-s5 .sg-cur-a { left: 50%; top: 45%; animation: sg-cur-in 1s var(--e-io) 1s both, sg-click .3s ease 2.1s, sg-out .2s ease 2.45s forwards; }
.sg-s5 .sg-mem--x .sg-bs { animation: sg-press .3s ease 2.1s; }
.sg-s5 .sg-ov { animation: sg-in .25s ease 2.4s both, sg-out .25s ease 4.2s forwards; }
.sg-s5 .sg-dlg { animation: sg-dlg-in .3s var(--e-out) 2.4s both, sg-dlg-out .2s ease 4.2s forwards; }
@keyframes sg-dlg-in { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: none; } }
@keyframes sg-dlg-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(.95); } }
.sg-s5 .sg-cur-e { left: 45%; top: 40%; animation: sg-cur-e .8s var(--e-io) 2.9s both, sg-click .3s ease 3.85s; }
@keyframes sg-cur-e { from { opacity: 0; transform: translate(4em, 4.5em); } 30% { opacity: 1; } to { opacity: 1; transform: none; } }
.sg-s5 .sg-dbtn--x { animation: sg-press .3s ease 3.85s; }
.sg-s5 .sg-mem--x { animation: sg-dim .5s ease 4.4s both; }
@keyframes sg-dim { to { opacity: .5; } }
.sg-s5 .sg-mem--x .sg-mem__in { animation: sg-in .3s ease 4.45s both; }
.sg-s5 .sg-mem--x .sg-bs__a { animation: sg-out .2s ease 4.4s both; }
.sg-s5 .sg-mem--x .sg-bs__b { animation: sg-in .2s ease 4.45s both; }

/* ============ 6. Sesiones: el escritorio se cierra y pide entrar otra vez ============ */
.sg-s6__home { position: absolute !important; inset: 0; animation: sg-home-out .6s var(--e-app) 3s both; }
@keyframes sg-home-out { to { opacity: 0; transform: scale(.97); } }
.sg-scene > .sg-s6__blur, .sg-scene > .sg-s6__veil { z-index: 1; }
.sg-s6__blur { opacity: 0; animation: sg-in .8s ease 3s both; }
.sg-s6__veil { opacity: 0; animation: sg-in .8s ease 3s both; }
.sg-login--exp { --d0: 3.45s; }
.sg-expired { margin: 0; padding: .375em 1em; border-radius: 2em; background: rgb(251 191 36 / .1); font-size: .8125em; color: rgb(252 211 77 / .9); text-align: center; }
.sg-s6 .sg-expired { animation: sg-app .6s var(--e-out) 4s both !important; }

/* ============ 7. Respaldos (mismo vidrio que los widgets) ============ */
.sg-bk {
  width: 21em; padding: 1.3em 1.3em .9em; border-radius: 1.25em;
  background: rgb(23 23 23 / .72); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: inset 0 1px 1px rgb(255 255 255 / .1), 0 1em 2.4em -1em rgb(0 0 0 / .6);
  animation: sg-up .8s var(--e-out) .15s both;
}
.sg-bk__h { display: flex; align-items: center; gap: .8em; }
.sg-bk__ic { display: grid; place-items: center; width: 2.6em; height: 2.6em; border-radius: .75em; background: rgb(255 255 255 / .08); flex: none; }
.sg-bk__h > div { display: grid; }
.sg-bk__h b { font-size: .9em; font-weight: 600; }
.sg-bk__h small { grid-row: 2; grid-column: 1; font-size: .72em; color: rgb(255 255 255 / .55); margin-top: .15em; }
.sg-bk__b { color: #2dd4bf !important; opacity: 0; }
.sg-s7 .sg-bk__a { animation: sg-out .2s ease 3.35s both; }
.sg-s7 .sg-bk__b { animation: sg-in .3s ease 3.4s both; }
.sg-bar { height: .42em; margin: 1.1em 0 .6em; border-radius: 1em; background: rgb(255 255 255 / .1); overflow: hidden; }
.sg-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e1690d, #f0a469); transform: scaleX(0); transform-origin: left; }
.sg-s7 .sg-bar i { animation: sg-fill 2.3s var(--e-io) 1s both; }
@keyframes sg-fill { to { transform: scaleX(1); } }
.sg-bk__r { display: flex; align-items: center; justify-content: space-between; padding: .62em 0; border-top: 1px solid rgb(255 255 255 / .07); font-size: .78em; color: rgb(255 255 255 / .8); }
.sg-bk__ok { display: grid; place-items: center; width: 1.45em; height: 1.45em; border-radius: 50%; background: rgb(45 212 191 / .15); color: #2dd4bf; opacity: 0; }
.sg-bk__ok .sg-tb { width: .95em; height: .95em; stroke-width: 2.6; }
.sg-s7 .sg-bk__ok { animation: sg-app .45s var(--e-out) both; animation-delay: calc(1.6s + var(--k) * .75s); }

/* ============ Escritorio: pantalla 16:10 a escala real de la app ============
   1em = 16px de una pantalla de ~1330px. Medidas de desktop-preview.tsx:
   celda de ícono 120x110 (ícono 64), separación 30, widget 270x150. */
@container (min-width: 561px) {
  .sg-screen { aspect-ratio: 16 / 10; font-size: 1.2cqw; }
  .sg-cursor { width: 1.25em; height: 1.25em; }
  .sg-desk { padding-top: 2.6em; }
  .sg .sg-screen .sg-me { top: 1.5em; right: 1.8em; width: 2.25em; height: 2.25em; }
  .sg-desk__head { gap: .75em; }
  .sg .sg-screen .sg-desk__head .sg-logo { height: 4em; }
  .sg-desk__head .sg-h4 { font-size: 3em; }
  .sg-widgets { gap: 1.875em; margin-top: 2.2em; }
  .sg-wd { gap: .6em; }
  .sg-widget { width: 16.875em; height: 9.375em; padding: 1em 1.2em; }
  .sg-widget > small { top: 1em; left: 1.2em; font-size: .75em; }
  .sg-widget > b { font-size: 3em; }
  .sg-widget > span { margin-top: .4em; font-size: .8125em; }
  .sg-widget--3 { gap: .5em; padding: .7em; }
  .sg-widget--3 b { font-size: 1.75em; }
  .sg-widget--3 small { font-size: .7em; }
  .sg-apps { grid-template-columns: repeat(6, 7.5em); column-gap: 1.875em; row-gap: .25em; margin-top: 1.4em; }
  .sg-app { gap: .625em; padding-block: .6em; }
  .sg .sg-screen .sg-app img { width: 4em; height: 4em; }
  .sg-app span { font-size: .8125em; }
  .sg-dock { bottom: 1.25em; gap: .75em; padding: .6em; border-radius: 1.4em; }
  .sg .sg-screen .sg-dock img { width: 3.1em; height: 3.1em; }
  .sg .sg-screen .sg-login .sg-logo, .sg .sg-screen .sg-login--lock .sg-logo { height: 4em; }
  .sg-login--lock { gap: 1.25em; }
  .sg-login--lock .sg-login__t .sg-h4 { font-size: 2em; }
  .sg-omni { width: 34em; height: 2.75em; }
  .sg-pop { width: 24em; }
  .sg-sheet { width: 40em; padding: 2.25em; }
  .sg-dlg { width: 27em; }
  .sg-bk { width: 25em; }
}

/* ============ Celular: pantalla vertical, letra más grande ============ */
@container (max-width: 560px) {
  .sg-screen { aspect-ratio: 4 / 5; font-size: 3.9cqw; }
  .sg-desk { padding-top: 1.4em; }
  .sg-desk__head .sg-h4 { font-size: 1.55em; }
  .sg-widgets { gap: .7em; }
  .sg-wd--3 { display: none; }
  .sg-widget { width: 10.5em; }
  .sg-apps { grid-template-columns: repeat(4, 5.4em); row-gap: .7em; margin-top: 1.4em; }
  .sg-app:nth-child(n+9) { display: none; }
  .sg-omni { width: 22em; }
  .sg-pop { width: 20em; }
  .sg-sheet { width: 23.5em; padding: 1.35em; }
  .sg-mem__n small, .sg-sel { display: none; }
  .sg-dlg { width: 21em; padding: 1.6em; }
  .sg-bk { width: 21em; }
}

/* ---- Capítulos debajo de la ventana ---- */
.sg-nav { margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.sg-chapters { display: grid; grid-template-columns: repeat(7, 1fr); gap: .75rem; margin: 0; padding: 0; list-style: none; }
.sg-chapters button {
  display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer;
  font: inherit; color: rgb(9 9 11 / .42); transition: color .5s ease;
}
.sg-chapters button:hover, .sg-chapters button[aria-current] { color: #09090b; }
.sg-chapters button:focus-visible { outline: 2px solid var(--color-mollyvett, #e1690d); outline-offset: 4px; border-radius: 4px; }
.sg-chapters__bar { display: block; height: 2px; border-radius: 2px; background: rgb(9 9 11 / .1); overflow: hidden; }
.sg-chapters__bar i { display: block; height: 100%; background: #e1690d; transform: scaleX(0); transform-origin: left; }
.sg-chapters button.is-done .sg-chapters__bar i { transform: scaleX(1); background: rgb(9 9 11 / .28); }
.sg-chapters button[aria-current] .sg-chapters__bar i { animation: sg-bar var(--t, 6.4s) linear both; }
@keyframes sg-bar { to { transform: scaleX(1); } }
.sg-chapters__t { display: block; margin-top: .7rem; font-family: var(--font-heading, inherit); font-size: .9rem; font-weight: 500; line-height: 1.25; }
.sg-nav__foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; margin-top: 1.25rem; }
.sg-desc { margin: 0; max-width: 40rem; min-height: 3.2em; font-size: 1rem; line-height: 1.6; color: #52525b; transition: opacity .35s ease; }
.sg-desc.is-swap { opacity: 0; }
.sg-play {
  display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  border: 1px solid rgb(9 9 11 / .1); background: rgb(9 9 11 / .04); color: #09090b; cursor: pointer;
  transition: background .4s ease, transform .4s var(--e-out, ease);
}
.sg-play:hover { background: rgb(9 9 11 / .08); }
.sg-play svg { width: 1rem; height: 1rem; fill: currentColor; }
.sg-play__play, .sg-play[aria-pressed="true"] .sg-play__pause { display: none; }
.sg-play[aria-pressed="true"] .sg-play__play { display: block; }
@media (max-width: 767px) {
  .sg-chapters { gap: .35rem; }
  .sg-chapters__t { display: none; }
  .sg-desc { font-size: .95rem; }
  .sg-desc[data-t]::before { content: attr(data-t); display: block; margin-bottom: .2rem; font-family: var(--font-heading, inherit); font-weight: 600; color: #09090b; }
}


/* ============================================================
   Secciones de la página: profundidad suave y texto bien alineado
   ============================================================ */
/* Fondos con el mismo brillo de color del hero (nada plano) */
.sg-sec-suave { background: #fafafa; }
.sg-sec-suave::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40rem 22rem at 12% 0%, rgb(225 105 13 / .09), transparent 70%),
    radial-gradient(36rem 24rem at 92% 30%, rgb(20 184 166 / .08), transparent 70%),
    radial-gradient(34rem 22rem at 40% 100%, rgb(139 92 246 / .07), transparent 70%);
}
.sg-sec-suave::after { /* retícula de puntos muy tenue, como en la portada */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(circle, rgb(9 9 11 / .07) 1px, transparent 1.3px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 80%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 80%);
}
.sg-sec-noche::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(46rem 26rem at 50% -10%, rgb(225 105 13 / .26), transparent 70%),
    radial-gradient(30rem 20rem at 100% 100%, rgb(14 165 233 / .1), transparent 70%);
}
.sg-sec-noche::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(circle, rgb(255 255 255 / .12) 1px, transparent 1.4px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 0%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 0%, #000 10%, transparent 75%);
}

/* Buenas prácticas: filas de vidrio en dos columnas, todas de la misma altura */
.sg-practicas { display: grid; gap: .75rem; padding: 0; list-style: none; }
@media (min-width: 640px) { .sg-practicas { grid-template-columns: repeat(2, 1fr); } }
.sg-practicas li {
  display: flex; align-items: center; gap: .9rem; min-height: 3.75rem; padding: .85rem 1.1rem; border-radius: 1rem;
  font-size: 1rem; line-height: 1.45; color: rgb(255 255 255 / .86);
  background: linear-gradient(180deg, rgb(255 255 255 / .06), rgb(255 255 255 / .03));
  border: 1px solid rgb(255 255 255 / .08); box-shadow: inset 0 1px 0 rgb(255 255 255 / .06);
  transition: background .6s ease, border-color .6s ease, transform .7s cubic-bezier(.16, 1, .3, 1);
}
.sg-practicas li:hover { background: linear-gradient(180deg, rgb(255 255 255 / .09), rgb(255 255 255 / .04)); border-color: rgb(255 255 255 / .14); transform: translateY(-2px); }
.sg-practicas li > span, .sg-consejos li > span { display: grid; place-items: center; flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%; }
.sg-practicas li > span { background: rgb(225 105 13 / .18); color: #f0a469; box-shadow: inset 0 0 0 1px rgb(240 164 105 / .25); }
.sg-practicas .sg-ic, .sg-consejos .sg-ic { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Tu parte también cuenta: tarjeta con borde degradado suave */
.sg-tuparte { padding: 1px; border-radius: 1.5rem; background: linear-gradient(135deg, rgb(225 105 13 / .35), rgb(9 9 11 / .06) 40%, rgb(20 184 166 / .3)); box-shadow: 0 30px 60px -36px rgb(9 9 11 / .28); }
.sg-tuparte__in { border-radius: calc(1.5rem - 1px); padding: 1.75rem; background: radial-gradient(30rem 16rem at 100% 0%, rgb(225 105 13 / .06), transparent 70%), #fff; }
@media (min-width: 640px) { .sg-tuparte__in { padding: 2.5rem; } }
.sg-tuparte__d { margin: .75rem 0 0; font-size: 1rem; line-height: 1.65; color: #52525b; }
.sg-consejos { display: grid; gap: .65rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
@media (min-width: 768px) { .sg-consejos { grid-template-columns: repeat(2, 1fr); column-gap: 1rem; } }
.sg-consejos li {
  display: flex; align-items: center; gap: .8rem; min-height: 3.4rem; padding: .7rem .9rem; border-radius: .9rem;
  font-size: 1rem; line-height: 1.45; color: #3f3f46; background: #fafafa; border: 1px solid rgb(9 9 11 / .06);
}
.sg-consejos li > span { background: rgb(225 105 13 / .1); color: #b04f09; }
/* Si el número de filas es impar, la última ocupa el ancho completo (sin huecos) */
@media (min-width: 640px) { .sg-practicas li:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (min-width: 768px) { .sg-consejos li:last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* Baldosas de ícono dibujadas (las que no existen como imagen) */
.sg-tile { place-items: center; border-radius: .7rem; color: #fff; box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 4px 10px -4px rgb(0 0 0 / .35); }
.sg-tile .sg-ic { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sg-tile--freno { background: linear-gradient(180deg, #fbbf24, #f59e0b); }
.sg-tile--respaldo { background: linear-gradient(180deg, #2dd4bf, #0d9488); }

@media (prefers-reduced-motion: reduce) {
  .mv-card, .mv-card *, .sg-practicas li { transition: none !important; }
  .mv-card:hover, .sg-practicas li:hover { transform: none; }
}

/* ---- Movimiento reducido: sin autoavance; cada escena se muestra ya resuelta ---- */
@media (prefers-reduced-motion: reduce) {
  .sg-scene, .sg-scene * { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition: none !important; }
  .sg-chapters button[aria-current] .sg-chapters__bar i { animation: none; transform: scaleX(1); }
}
