:root {
  --bg: #f6f1e8;
  --card: #ffffff;
  --ink: #16130f;
  --muted: #6f675c;
  --line: #ebe4d8;
  --gold: #b8862f;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(22, 19, 15, .04), 0 8px 24px rgba(22, 19, 15, .06);
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: radial-gradient(1200px 600px at 100% -10%, #efe3cc 0%, transparent 60%), var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.wrap { max-width: 1320px; margin: 0 auto; padding: 28px 24px 80px; }

/* Encabezado */
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.eyebrow { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px #f1e3c6; }
h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1; margin: 10px 0 0; font-weight: 800; letter-spacing: -.03em; }
h1 em { display: block; font-family: var(--serif); font-weight: 400; font-style: italic; color: var(--gold); letter-spacing: 0; font-size: .92em; margin-top: 2px; }
.user { display: flex; align-items: center; gap: 10px; background: var(--card); padding: 6px 6px 6px 14px; border-radius: 999px; box-shadow: var(--shadow); font-size: 14px; font-weight: 600; }
.user small { color: var(--muted); font-weight: 500; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 26px 0 18px; }
.seg { display: inline-flex; background: #ece4d6; border-radius: 999px; padding: 4px; }
.seg button { border: 0; background: transparent; padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.weeknav { display: inline-flex; align-items: center; gap: 6px; }
.btn { border: 1px solid var(--line); background: var(--card); padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.btn:hover { border-color: #d8ccb8; }
.btn.icon { width: 38px; height: 38px; padding: 0; justify-content: center; font-size: 18px; }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.dark:hover { background: #2b2620; }
.btn.gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--ink); width: 16px; height: 16px; }

/* Resumen */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { background: var(--card); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.stat .n { font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat .n small { font-size: 16px; color: var(--muted); font-weight: 600; }
.stat .l { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.stat.warn .n { color: #c2410c; }
.stat.alert .n { color: #b91c1c; }
.bar { height: 6px; background: #efe8dc; border-radius: 99px; overflow: hidden; margin-top: 12px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #16a34a, #22c55e); border-radius: 99px; transition: width .4s; }

/* Vista por día */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.day h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 4px 10px; font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.day h3 span { font-weight: 600; letter-spacing: 0; text-transform: none; }
.day.today h3 { color: var(--gold); }
.day .stack { display: flex; flex-direction: column; gap: 12px; }
.empty-day { border: 1.5px dashed #ddd3c2; border-radius: 18px; padding: 16px; font-size: 13px; color: #a79d8e; text-align: center; }

/* Tarjeta de post */
.post { background: var(--card); border-radius: 18px; padding: 14px 14px 12px; box-shadow: var(--shadow); cursor: pointer; border: 1.5px solid transparent; transition: transform .12s, border-color .12s; position: relative; overflow: hidden; text-align: left; width: 100%; }
.post::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--c, #999); }
.post:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 35%, transparent); }
.post .type { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c); }
.post .type::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.post h4 { margin: 6px 0 10px; font-size: 16px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
.post .meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.post .flags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.who-stack { display: inline-flex; flex: none; }
.post .meta { flex-wrap: wrap; }
.post .meta > .row { min-width: 0; }
.post .who-stack .avatar { width: 24px; height: 24px; font-size: 10px; }
.who-stack .avatar { box-shadow: 0 0 0 2px #fff; }
.who-stack .avatar + .avatar { margin-left: -8px; }
.avatar.more { background: #f1f0f5; color: #5b5470; font-size: 10px; }
/* Encargados: aparece al pasar el mouse; en pantallas táctiles se ve siempre. */
.post .who-line { display: none; margin-top: 8px; font-size: 12px; color: #5b5470; line-height: 1.35; }
.post .who-line b { font-weight: 700; color: #1f1a2e; }
.post:hover .who-line, .post:focus-visible .who-line { display: block; }
@media (hover: none) { .post .who-line { display: block; } }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--s) 14%, white); color: color-mix(in srgb, var(--s) 80%, black); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--s); }
.flag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: #fdecec; color: #b91c1c; }
.flag.soon { background: #fff4e0; color: #b45309; }
.flag.ok { background: #e8f7ee; color: #15803d; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: #efe6d6; color: #6b5a3e; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; flex: none; }
.avatar.none { background: transparent; border: 1.5px dashed #d8ccb8; color: #b3a893; }
.progress { font-size: 12px; font-weight: 700; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.progress .ring { width: 16px; height: 16px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), #eee6d8 0); }

/* Vista por etapa */
.stages { display: grid; grid-template-columns: repeat(6, minmax(190px, 1fr)); gap: 14px; margin-top: 18px; overflow-x: auto; padding-bottom: 8px; }
.stage { background: rgba(255, 255, 255, .45); border-radius: var(--radius); padding: 12px; min-height: 200px; border: 1.5px solid transparent; transition: border-color .15s, background .15s; }
.stage.over { border-color: var(--s); background: color-mix(in srgb, var(--s) 8%, white); }
.stage h3 { display: flex; justify-content: space-between; align-items: center; margin: 2px 4px 12px; font-size: 14px; }
.stage h3 .count { font-size: 12px; color: var(--muted); background: var(--card); border-radius: 99px; padding: 2px 9px; }
.stage .stack { display: flex; flex-direction: column; gap: 10px; }
.post[draggable="true"] { cursor: grab; }

/* ---------- Login con Noé ---------- */
:root {
  --nc-purple: #7c3aed;
  --nc-pink: #db2777;
  --nc-blue: #2563eb;
  --nc-teal: #0d9488;
  --nc-green: #16a34a;
  --nc-gold: #d4a032;
}
.login { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 24px; padding: 32px clamp(20px, 5vw, 72px); overflow: hidden; isolation: isolate; background: #f4f0fb; }
/* Manchas suaves con degradados (sin filter: blur) para que vaya fluido en celulares sencillos. */
.login-bg { position: absolute; inset: -20%; z-index: -1; }
.login-bg i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; will-change: transform; animation: drift 22s ease-in-out infinite alternate; }
.login-bg i:nth-child(1) { background: radial-gradient(circle, rgba(167, 139, 250, .55), transparent 62%); left: 0; top: -5%; }
.login-bg i:nth-child(2) { background: radial-gradient(circle, rgba(244, 114, 182, .45), transparent 62%); right: -5%; top: 5%; animation-duration: 26s; animation-delay: -6s; }
.login-bg i:nth-child(3) { background: radial-gradient(circle, rgba(96, 165, 250, .45), transparent 62%); left: 15%; bottom: -15%; animation-duration: 30s; animation-delay: -12s; }
.login-bg i:nth-child(4) { background: radial-gradient(circle, rgba(45, 212, 191, .38), transparent 62%); right: 10%; bottom: -10%; animation-duration: 24s; animation-delay: -3s; }
.login-bg i:nth-child(5) { background: radial-gradient(circle, rgba(252, 211, 77, .45), transparent 62%); left: 40%; top: 25%; width: 36vmax; height: 36vmax; animation-duration: 20s; animation-delay: -9s; }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(6vmax, -4vmax) scale(1.12); } 100% { transform: translate(-5vmax, 5vmax) scale(.95); } }

.hero { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero .eyebrow { justify-content: center; }
.hero h2 { font-size: clamp(30px, 4.2vw, 54px); line-height: 1.02; letter-spacing: -.035em; font-weight: 800; margin: 26px 0 8px; }
.hero h2 em { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; background: linear-gradient(90deg, var(--nc-purple), var(--nc-pink), var(--nc-gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { color: #5b5470; font-size: 16px; margin: 0; max-width: 420px; }

/* Escena: Noé + órbita + ondas */
.scene { position: relative; width: min(420px, 80vw); aspect-ratio: 1; display: grid; place-items: center; margin-top: 8px; }
.orbit { position: absolute; inset: 0; animation: spin 40s linear infinite; }
.orbit span { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .75); backdrop-filter: blur(8px); box-shadow: 0 10px 30px rgba(76, 29, 149, .15), inset 0 0 0 1px rgba(255, 255, 255, .9); transform: rotate(calc(var(--i) * 72deg)) translate(min(190px, 36vw)) rotate(calc(var(--i) * -72deg)); }
.orbit span b { position: relative; display: grid; place-items: center; width: 100%; height: 100%; animation: spin 40s linear infinite reverse; color: var(--c); }
.orbit span svg { width: 26px; height: 26px; }
.orbit span small { position: absolute; bottom: -18px; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--c); white-space: nowrap; }
@keyframes spin { to { transform: rotate(360deg); } }

.say { position: absolute; top: 4%; right: -2%; max-width: 230px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.35; padding: 12px 16px; border-radius: 18px 18px 18px 6px; box-shadow: 0 12px 30px rgba(76, 29, 149, .14); z-index: 3; transition: opacity .25s, transform .25s; text-align: left; }
.say.swap { opacity: 0; transform: translateY(6px) scale(.97); }

/* Noé (burbuja de vidrio) */
.noe { --ex: 0px; --ey: 0px; position: relative; width: 210px; height: 210px; z-index: 2; animation: float 5s ease-in-out infinite; transition: transform .3s; }
.h-glow { position: absolute; inset: -30px; border-radius: 50%; background: radial-gradient(circle, rgba(167, 139, 250, .55), transparent 65%); filter: blur(10px); animation: breathe 4s ease-in-out infinite; }
.h-ear { position: absolute; top: 50%; width: 38px; height: 84px; margin-top: -42px; border-radius: 40px; background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(165, 180, 252, .55)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .8), 0 8px 20px rgba(99, 102, 241, .25); }
.h-ear.l { left: -22px; transform: rotate(-8deg); }
.h-ear.r { right: -22px; transform: rotate(8deg); }
.h-body { position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .95) 0 12%, transparent 30%),
    radial-gradient(circle at 70% 80%, rgba(236, 72, 153, .35), transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(20, 184, 166, .30), transparent 45%),
    radial-gradient(circle at 50% 50%, #c7d2fe 0%, #818cf8 60%, #6d28d9 100%);
  box-shadow: inset 0 -18px 40px rgba(76, 29, 149, .45), inset 0 10px 30px rgba(255, 255, 255, .7), 0 25px 50px rgba(76, 29, 149, .35), 0 0 0 6px rgba(255, 255, 255, .45); }
.h-shine { position: absolute; left: 18%; top: 10%; width: 40%; height: 22%; border-radius: 50%; background: linear-gradient(180deg, rgba(255, 255, 255, .85), transparent); transform: rotate(-20deg); }
.h-face { position: absolute; left: 50%; top: 50%; display: flex; gap: 34px; transform: translate(calc(-50% + var(--ex)), calc(-50% + var(--ey))); transition: transform .12s ease-out; }
.h-eye { width: 30px; height: 56px; border-radius: 20px; background: linear-gradient(180deg, #fde68a, var(--nc-gold) 55%, #92400e); box-shadow: inset 0 -6px 10px rgba(0, 0, 0, .25), 0 0 18px rgba(253, 224, 71, .45); transform-origin: center; animation: blink 5.5s infinite; transition: height .2s, border-radius .2s, background .2s, transform .2s; }
.h-eye.r { background: linear-gradient(180deg, #bfdbfe, var(--nc-blue) 55%, #1e3a8a); box-shadow: inset 0 -6px 10px rgba(0, 0, 0, .25), 0 0 18px rgba(96, 165, 250, .5); }
.h-blush { position: absolute; top: 62%; width: 30px; height: 14px; border-radius: 50%; background: rgba(244, 114, 182, .55); filter: blur(3px); opacity: 0; transition: opacity .3s; }
.h-blush.l { left: 20%; }
.h-blush.r { right: 20%; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes blink { 0%, 44%, 48%, 100% { transform: scaleY(1); } 46% { transform: scaleY(.08); } }

/* Estados de ánimo */
.noe[data-mood="shy"] .h-eye { height: 8px; border-radius: 8px; animation: none; transform: translateY(8px); }
.noe[data-mood="shy"] .h-blush, .noe[data-mood="happy"] .h-blush { opacity: 1; }
.noe[data-mood="peek"] .h-eye.l { height: 8px; border-radius: 8px; animation: none; transform: translateY(8px); }
.noe[data-mood="peek"] .h-eye.r { animation: none; transform: scale(1.1); }
.noe[data-mood="happy"] { animation: jump .7s ease-in-out infinite; }
.noe[data-mood="happy"] .h-eye { height: 26px; width: 34px; background: transparent !important; border: 7px solid var(--nc-gold); border-bottom: 0; border-radius: 30px 30px 0 0; box-shadow: none; animation: none; }
.noe[data-mood="happy"] .h-eye.r { border-color: var(--nc-blue); }
.noe[data-mood="error"] { animation: shake .5s ease-in-out; }
.noe[data-mood="error"] .h-eye { height: 34px; animation: none; transform: translateY(8px) rotate(-12deg); }
.noe[data-mood="error"] .h-eye.r { transform: translateY(8px) rotate(12deg); }
.noe[data-mood="think"] .h-face { transform: translate(calc(-50% + 10px), calc(-50% - 12px)); }
.noe[data-mood="think"] .h-eye { animation: none; height: 44px; }
@keyframes jump { 0%, 100% { transform: translateY(0) scale(1); } 40% { transform: translateY(-26px) scale(1.04, .96); } 60% { transform: translateY(-26px) scale(.98, 1.03); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-14px) rotate(-4deg); } 40% { transform: translateX(12px) rotate(3deg); } 60% { transform: translateX(-8px) rotate(-2deg); } 80% { transform: translateX(5px); } }

.wave { position: absolute; bottom: 6%; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; height: 44px; z-index: 1; }
.wave i { width: 5px; height: 30%; border-radius: 4px; background: linear-gradient(180deg, var(--nc-blue), var(--nc-purple)); opacity: .45; transition: height .15s; }
.wave.on i { animation: eq 1s ease-in-out infinite; opacity: .8; }
@keyframes eq { 0%, 100% { height: 20%; } 50% { height: 100%; } }

/* Tarjeta del formulario */
.login-card { position: relative; width: min(440px, 100%); justify-self: center; background: rgba(255, 255, 255, .72); backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4); border-radius: 32px; padding: 38px 34px 30px; box-shadow: 0 30px 80px rgba(76, 29, 149, .18), inset 0 0 0 1px rgba(255, 255, 255, .8); animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }
.brand-logo { display: block; width: 72px; height: 72px; border-radius: 50%; box-shadow: 0 10px 26px rgba(17, 17, 17, .25); margin-bottom: 16px; transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.login-card:hover .brand-logo { transform: rotate(-8deg) scale(1.04); }
.brand-row { display: flex; align-items: center; gap: 16px; }
.brand-logo.sm { width: 56px; height: 56px; margin: 0; flex: none; box-shadow: 0 6px 16px rgba(17, 17, 17, .18); }
.login-card h1 { font-size: 34px; margin-top: 8px; }
.login-card h1 em { font-size: 1em; display: inline; background: linear-gradient(90deg, var(--nc-purple), var(--nc-pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-card .hello { color: #5b5470; margin: 6px 0 20px; font-size: 15px; }
.fl { position: relative; margin-top: 14px; }
.fl input { width: 100%; height: 58px; border: 1.5px solid rgba(124, 58, 237, .15); background: rgba(255, 255, 255, .85); border-radius: 18px; padding: 22px 52px 6px 18px; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
.fl label { position: absolute; left: 19px; top: 19px; font-size: 15px; color: #7a7290; pointer-events: none; transition: all .15s; }
.fl input:focus, .fl input:not(:placeholder-shown) { background: #fff; }
.fl input:focus { border-color: var(--nc-purple); box-shadow: 0 0 0 5px rgba(124, 58, 237, .12); }
.fl input:focus + label, .fl input:not(:placeholder-shown) + label { top: 9px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--nc-purple); }
.fl .eye { position: absolute; right: 8px; top: 9px; width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent; color: #7a7290; display: grid; place-items: center; }
.fl .eye:hover { background: rgba(124, 58, 237, .08); color: var(--nc-purple); }
.fl .eye svg { width: 22px; height: 22px; }
.login-card.bad { animation: shake .45s; }
.go { position: relative; margin-top: 24px; width: 100%; height: 56px; border: 0; border-radius: 18px; color: #fff; font-weight: 800; font-size: 16px; letter-spacing: .01em; background: linear-gradient(100deg, var(--nc-purple), var(--nc-pink) 55%, #f59e0b); background-size: 200% 100%; box-shadow: 0 14px 30px rgba(219, 39, 119, .3); overflow: hidden; transition: transform .15s, box-shadow .15s, background-position .5s; }
.go:hover { transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 18px 36px rgba(219, 39, 119, .38); }
.go:active { transform: translateY(0) scale(.99); }
.go::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%); transform: translateX(-100%); animation: shimmer 3.2s ease-in-out infinite; }
.go:disabled { opacity: .8; cursor: wait; }
.go .spin { display: inline-block; width: 18px; height: 18px; border: 3px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes shimmer { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.login-card .err { background: #fdecef; color: #be123c; border-radius: 14px; padding: 10px 14px; font-size: 14px; }
.sso-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; color: #8a829e; font-size: 13px; }
.sso-or::before, .sso-or::after { content: ""; flex: 1; height: 1px; background: rgba(76, 29, 149, .15); }
.sso-btn { width: 100%; height: 52px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid rgba(76, 29, 149, .18); border-radius: 18px; background: #fff; color: #1f1a2e; font-weight: 700; font-size: 15px; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.sso-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(76, 29, 149, .12); }
.login-foot { margin-top: 18px; text-align: center; font-size: 12px; color: #8a829e; }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--dx), 110vh) rotate(var(--r)); } }
.login.leave { animation: leave .6s ease-in forwards .5s; }
@keyframes leave { to { opacity: 0; transform: scale(1.04); filter: blur(6px); } }

@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; padding-top: 20px; gap: 0; }
  .hero p.sub { display: none; }
  .hero h2 { font-size: 28px; margin: 2px 0 16px; }
  .scene { width: min(300px, 78vw); margin-bottom: 34px; }
  .noe { width: 150px; height: 150px; }
  .h-eye { width: 22px; height: 40px; }
  .h-face { gap: 24px; }
  .orbit span { width: 46px; height: 46px; margin: -23px; transform: rotate(calc(var(--i) * 72deg)) translate(min(138px, 37vw)) rotate(calc(var(--i) * -72deg)); }
  .orbit span svg { width: 20px; height: 20px; }
  .say { top: -2%; right: 0; max-width: 190px; font-size: 13px; }
  .login-card { margin-top: -10px; padding: 30px 22px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .login *, .login *::before, .login *::after { animation: none !important; transition: none !important; }
}

/* Campos */
label.f { display: block; font-size: 13px; font-weight: 700; margin: 14px 0 6px; }
label.f small { font-weight: 500; color: var(--muted); }
.in { width: 100%; border: 1.5px solid var(--line); background: #fcfaf6; border-radius: 14px; padding: 11px 14px; font-size: 15px; outline: none; transition: border-color .12s, background .12s; }
.in:focus { border-color: var(--gold); background: #fff; }
textarea.in { min-height: 90px; resize: vertical; line-height: 1.45; }
.row { display: flex; gap: 8px; align-items: center; }
.row .in { flex: 1; }
.err { color: #b91c1c; font-size: 14px; font-weight: 600; margin-top: 12px; }

/* Panel lateral (formulario) */
.scrim { position: fixed; inset: 0; background: rgba(22, 19, 15, .28); backdrop-filter: blur(2px); z-index: 20; animation: fade .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--bg); z-index: 21; display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0, 0, 0, .15); animation: slide .2s ease-out; }
.drawer header { padding: 22px 24px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.drawer header .x { float: right; }
.drawer header h2 { margin: 8px 0 4px; font-size: 24px; letter-spacing: -.02em; }
.drawer header .when { color: var(--muted); font-size: 14px; font-weight: 600; }
.drawer .body { flex: 1; overflow-y: auto; padding: 8px 24px 24px; }
.drawer footer { padding: 14px 24px calc(14px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.section { background: var(--card); border-radius: 18px; padding: 4px 18px 18px; margin-top: 14px; box-shadow: var(--shadow); }
.section h5 { margin: 14px 0 0; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.obj { font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.35; color: #4a4238; margin: 14px 0 0; }

.stepper { display: flex; gap: 4px; margin-top: 14px; }
.stepper div { flex: 1; }
.stepper i { display: block; height: 5px; border-radius: 99px; background: #ebe3d5; }
.stepper div.done i { background: var(--s); }
.stepper div.cur i { background: var(--s); box-shadow: 0 0 0 3px color-mix(in srgb, var(--s) 25%, transparent); }
.stepper span { display: block; font-size: 10px; font-weight: 700; color: #a79d8e; margin-top: 6px; line-height: 1.2; }
.stepper div.cur span { color: var(--ink); }

.checks { list-style: none; padding: 0; margin: 10px 0 0; }
.checks li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #f3eee5; font-size: 15px; cursor: pointer; }
.checks li:last-child { border-bottom: 0; }
.checks input { width: 20px; height: 20px; accent-color: #16a34a; margin: 0; flex: none; cursor: pointer; }
.checks li.on span { color: var(--muted); text-decoration: line-through; }

.missing { background: #fff4e0; color: #92400e; border-radius: 14px; padding: 12px 14px; font-size: 14px; margin-top: 14px; }
.missing ul { margin: 6px 0 0; padding-left: 18px; }
.comment { border-top: 1px solid #f3eee5; padding: 10px 0; font-size: 14px; }
.comment b { font-size: 13px; }
.comment small { color: var(--muted); margin-left: 6px; }
.comment div { margin-top: 4px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 14px; z-index: 40; box-shadow: var(--shadow); }
.toast.bad { background: #b91c1c; }
.loading { text-align: center; color: var(--muted); padding: 80px 0; font-weight: 600; }
.nodata { background: var(--card); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--muted); margin-top: 18px; box-shadow: var(--shadow); }

/* ---------- Dashboard con el estilo del login ---------- */
:root {
  --bg: #f4f0fb;
  --ink: #1a1530;
  --muted: #6b6485;
  --line: rgba(124, 58, 237, .14);
  --gold: #7c3aed;
  --glass: rgba(255, 255, 255, .7);
  --shadow: 0 1px 2px rgba(76, 29, 149, .05), 0 12px 32px rgba(76, 29, 149, .10);
  --grad: linear-gradient(100deg, #7c3aed, #db2777 55%, #f59e0b);
}
body { background: var(--bg); }
.dash { position: relative; isolation: isolate; min-height: 100vh; min-height: 100dvh; }
.dash .login-bg { position: fixed; inset: 0; overflow: hidden; opacity: .75; }

.eyebrow::before { background: var(--grad); box-shadow: 0 0 0 3px rgba(124, 58, 237, .14); }
h1 em { background: linear-gradient(90deg, var(--nc-purple), var(--nc-pink), var(--nc-gold)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .1em; }

.user, .seg, .stat, .hello-card { background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, .8); }
.avatar { background: #ede9fe; color: #5b21b6; }
.avatar.me { width: 34px; height: 34px; font-size: 12px; color: #fff; background: var(--grad); margin-left: -8px; }
.seg { padding: 5px; }
.seg button.on { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(219, 39, 119, .28); }
.btn { background: rgba(255, 255, 255, .8); border-color: rgba(124, 58, 237, .14); transition: transform .12s, border-color .12s, box-shadow .12s; }
.btn:hover { border-color: rgba(124, 58, 237, .4); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(76, 29, 149, .12); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.dark, .btn.gold { background: var(--grad); background-size: 200% 100%; color: #fff; border-color: transparent; box-shadow: 0 10px 22px rgba(219, 39, 119, .28); transition: background-position .4s, transform .12s; }
.btn.dark:hover, .btn.gold:hover { background: var(--grad); background-size: 200% 100%; background-position: 100% 0; }
.btn:disabled:hover { transform: none; }
.toggle input { accent-color: var(--nc-purple); }

/* Saludo de Noé */
.hello-card { display: flex; align-items: center; gap: 18px; margin-top: 22px; padding: 14px 22px 14px 18px; border-radius: 26px; animation: rise .6s cubic-bezier(.2, .8, .2, 1) both; }
.mini-h { position: relative; width: 84px; height: 76px; flex: none; }
.mini-h > div { position: absolute; left: 6px; top: 2px; width: 210px; height: 210px; transform: scale(.34); transform-origin: 0 0; }
.mini-h .h-glow { inset: -10px; }
.hello-txt b { font-size: 18px; letter-spacing: -.01em; }
.hello-txt p { margin: 4px 0 0; color: #5b5470; font-size: 15px; line-height: 1.4; }

/* Resumen */
.stat { position: relative; overflow: hidden; border-radius: 24px; padding: 18px 20px 18px; transition: transform .15s; }
.stat:hover { transform: translateY(-2px); }
.stat::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%); }
.stat > * { position: relative; z-index: 1; }
.stat .ic { float: right; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); position: relative; z-index: 1; }
.stat .ic svg { width: 20px; height: 20px; }
.stat.warn .n { color: #b45309; }
.stat.alert .n { color: #be123c; }
.bar { background: rgba(124, 58, 237, .1); }
.bar i { background: linear-gradient(90deg, var(--nc-teal), var(--nc-green)); }

/* Días y etapas */
.day h3 { color: var(--muted); }
.day.today h3 { color: #fff; background: var(--grad); border-radius: 999px; padding: 6px 12px; margin: -6px 0 10px; box-shadow: 0 8px 18px rgba(219, 39, 119, .25); }
.day.today h3 span { color: rgba(255, 255, 255, .85); }
.empty-day { border-color: rgba(124, 58, 237, .2); color: #9c95b5; background: rgba(255, 255, 255, .3); }
.post { background: rgba(255, 255, 255, .86); border-radius: 20px; box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, .9); transition: transform .15s, border-color .15s, box-shadow .15s; }
.post::before { inset: 0 0 auto 0; width: auto; height: 4px; background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 40%, white)); }
.post:hover { transform: translateY(-3px); box-shadow: 0 16px 36px color-mix(in srgb, var(--c) 22%, transparent), inset 0 0 0 1px rgba(255, 255, 255, .9); }
.progress .ring { background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(124, 58, 237, .12) 0); }
.stage { background: rgba(255, 255, 255, .4); border-radius: 26px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7); }
.stage h3 .count { background: rgba(255, 255, 255, .85); }

/* Panel lateral y campos */
.scrim { background: rgba(26, 21, 48, .3); backdrop-filter: blur(4px); }
.drawer { background: rgba(244, 240, 251, .94); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-radius: 28px 0 0 28px; overflow: hidden; }
.drawer header, .drawer footer { background: rgba(255, 255, 255, .7); }
.section { border-radius: 22px; background: rgba(255, 255, 255, .85); }
.obj { color: #4c4466; }
.in { background: rgba(255, 255, 255, .85); border-color: rgba(124, 58, 237, .15); }
.in:focus { border-color: var(--nc-purple); box-shadow: 0 0 0 4px rgba(124, 58, 237, .12); }
.stepper i { background: rgba(124, 58, 237, .12); }
.checks li { border-bottom-color: rgba(124, 58, 237, .08); }
.comment { border-top-color: rgba(124, 58, 237, .08); }
.toast { background: #1a1530; box-shadow: 0 14px 30px rgba(26, 21, 48, .3); }
.loading { padding-top: 22vh; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.nodata { background: var(--glass); backdrop-filter: blur(18px); }
@media (max-width: 760px) {
  .hello-card { padding: 10px 16px 10px 10px; gap: 10px; border-radius: 22px; }
  .hello-txt > b { font-size: 16px; }
  .hello-txt p { font-size: 14px; }
  .drawer { border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .dash *, .dash *::before, .dash *::after { animation: none !important; }
}

/* ---------- Semana, fechas y temporizadores ---------- */
h1 .rel { display: inline-block; vertical-align: middle; margin-left: 12px; font-size: 13px; font-weight: 800; letter-spacing: .02em; padding: 5px 12px; border-radius: 999px; background: rgba(124, 58, 237, .1); color: #6d28d9; }
h1 .rel.now { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(219, 39, 119, .25); }
.when-line { font-size: 12px; font-weight: 700; color: var(--muted); margin: -4px 0 8px; }
.timer-row { margin-bottom: 10px; }
.post { box-shadow: 0 4px 16px rgba(76, 29, 149, .07), inset 0 0 0 1px rgba(255, 255, 255, .9); }
.post h4 { margin-bottom: 12px; }
.post .timer { font-size: 11px; padding: 3px 9px; }
.post .timer.today { animation: none; }
.post .pill { font-size: 11px; }
.post .flags:empty { display: none; }
.timer { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: rgba(124, 58, 237, .09); color: #5b21b6; }
.timer::before { content: "⏳"; font-size: 11px; }
.timer.soon { background: #fff4e0; color: #b45309; }
.timer.today { background: linear-gradient(100deg, #fde68a, #fbcfe8); color: #9d174d; animation: pulse 2s ease-in-out infinite; }
.timer.late { background: #fdecef; color: #be123c; }
.timer.ok { background: #e8f7ee; color: #15803d; }
.timer.ok::before { content: none; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(219, 39, 119, .25); } 50% { box-shadow: 0 0 0 5px rgba(219, 39, 119, 0); } }

.hello-txt { flex: 1; min-width: 0; }
.next-up { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; border: 0; background: rgba(255, 255, 255, .8); border-left: 4px solid var(--c); padding: 7px 12px; border-radius: 12px; font-size: 13px; color: var(--ink); text-align: left; box-shadow: 0 4px 12px rgba(76, 29, 149, .08); }
.next-up:hover { background: #fff; }
.verse { margin: 10px 0 0; font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.35; color: #4c1d95; }
.verse cite { display: block; margin-top: 2px; font-family: var(--sans); font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #a21caf; }
.msg .verse { font-size: 15px; background: linear-gradient(100deg, #f5f3ff, #fdf2f8); padding: 10px 12px; border-radius: 12px; }

/* ---------- Burbuja del mensaje del pastor ---------- */
.story { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; padding: 4px; }
.story-ring { position: relative; width: 78px; height: 78px; border-radius: 50%; padding: 4px; background: #d8d2ea; display: grid; place-items: center; transition: transform .2s; }
.story.new .story-ring { background: conic-gradient(from 0deg, #7c3aed, #db2777, #f59e0b, #7c3aed); animation: ringspin 3s linear infinite; }
.story.empty .story-ring { background: repeating-conic-gradient(#a78bfa 0 10deg, transparent 10deg 20deg); }
.story:hover .story-ring { transform: scale(1.06); }
.story-face { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #1a1530, #4c1d95); color: #fff; font-weight: 800; font-size: 22px; border: 3px solid #fff; }
.story.new .story-face { animation: ringspin 3s linear infinite reverse; }
.story.empty .story-face { background: #fff; color: #7c3aed; font-size: 30px; }
.story-ring i { position: absolute; right: 0; bottom: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 10px; color: #fff; background: var(--grad); border: 2px solid #fff; }
.story small { font-size: 12px; font-weight: 800; color: #5b21b6; white-space: nowrap; }
.story.new small { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes ringspin { to { transform: rotate(360deg); } }

.story-card { position: relative; width: min(420px, 100%); max-height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; background: rgba(255, 255, 255, .95); border-radius: 28px; padding: 16px; box-shadow: 0 40px 100px rgba(26, 21, 48, .45); animation: rise .35s cubic-bezier(.2, .8, .2, 1) both; }
.story-card header { display: flex; align-items: center; gap: 10px; }
.story-card header > div { flex: 1; min-width: 0; }
.story-card header b { display: block; }
.story-card header small { display: block; color: var(--muted); font-size: 12px; }
.story-card .avatar.me { margin: 0; width: 40px; height: 40px; font-size: 14px; }
.story-bar { height: 4px; border-radius: 99px; background: rgba(124, 58, 237, .15); overflow: hidden; }
.story-bar i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .25s linear; }
.story-video { position: relative; aspect-ratio: 9 / 16; max-height: 62vh; border-radius: 20px; overflow: hidden; background: #0f0c1d; }
.story-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-video.rec video { transform: scaleX(-1); }
.story-video.rec video[controls] { transform: none; object-fit: contain; }
.story-video .viewer-wait[hidden] { display: none; }
.story-video .viewer-wait { padding: 20px; text-align: center; z-index: 1; }
.story-caption { margin: 0; font-size: 15px; line-height: 1.45; }
.story-card footer { display: flex; justify-content: flex-end; gap: 8px; }
.rec-time { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 2; background: rgba(0, 0, 0, .55); color: #fff; font-weight: 800; font-size: 13px; padding: 5px 12px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.rec-controls { display: flex; align-items: center; justify-content: center; gap: 16px; }
.rec-btn { width: 72px; height: 72px; border-radius: 50%; border: 0; padding: 5px; background: conic-gradient(#db2777 calc(var(--p) * 1%), rgba(124, 58, 237, .2) 0); display: grid; place-items: center; }
.rec-btn[hidden] { display: none; }
.rec-btn i { width: 100%; height: 100%; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.rec-btn i::after { content: ""; width: 26px; height: 26px; border-radius: 50%; background: #e11d48; transition: all .2s; }
.rec-btn.on i::after { border-radius: 6px; width: 22px; height: 22px; }
.rec-controls label { cursor: pointer; }
/* ---------- Avatares y perfil ---------- */
.avatar.av { background: none; padding: 0; overflow: visible; }
.avatar.av svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 4px rgba(76, 29, 149, .25)); }
.avatar.av.me { background: none; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; vertical-align: middle; margin-right: 6px; }
.story-face.has-av { background: linear-gradient(135deg, #ede9fe, #fce7f3); padding: 4px; }
.story-face svg { width: 100%; height: 100%; }
.me-btn { display: inline-flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; font-weight: 600; font-size: 14px; text-align: left; }
.me-btn .avatar.me { margin-left: -8px; }
.me-btn .gear { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); background: rgba(124, 58, 237, .08); font-size: 14px; transition: transform .3s; }
.me-btn:hover .gear { transform: rotate(60deg); color: #6d28d9; }

.pf-form h5 { margin: 4px 0 8px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pf-form h5:not(:first-child) { margin-top: 18px; }
.pf-big { width: 120px; height: 120px; margin: 0 auto 10px; animation: float 5s ease-in-out infinite; }
.pf-big svg { width: 100%; height: 100%; filter: drop-shadow(0 12px 20px rgba(76, 29, 149, .3)); }
.pf-kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pf-kinds button { border: 2px solid transparent; background: rgba(124, 58, 237, .06); border-radius: 16px; padding: 8px 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: border-color .15s, transform .15s; }
.pf-kinds button:hover { transform: translateY(-2px); }
.pf-kinds button.on { border-color: var(--nc-purple); background: #fff; box-shadow: 0 6px 16px rgba(124, 58, 237, .18); }
.pf-kinds svg { width: 52px; height: 52px; }
.pf-kinds small { font-size: 11px; font-weight: 700; color: var(--muted); }
.pf-colors { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.pf-colors button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; background: var(--c); box-shadow: 0 0 0 1.5px rgba(124, 58, 237, .2); transition: transform .15s; }
.pf-colors button.on { transform: scale(1.18); box-shadow: 0 0 0 2.5px var(--c); }
.pf-form .in:disabled { opacity: .65; }
.pf-pwd { margin-top: 16px; border-top: 1px solid rgba(124, 58, 237, .1); padding-top: 12px; }
.pf-pwd summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.pf-form footer { margin-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
/* ---------- Configurar equipo ---------- */
.story-card.admin { width: min(820px, 100%); }
.adm-tabs { align-self: flex-start; }
.adm-hint { margin: 0 0 12px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.adm-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.adm-team, .adm-post { background: rgba(124, 58, 237, .05); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.adm-team h4 { margin: 0; display: flex; justify-content: space-between; font-size: 15px; }
.adm-team h4 small { color: var(--muted); font-weight: 700; }
.adm-team select.in { padding: 8px 10px; font-size: 13px; }
.adm-empty { font-size: 12px; color: var(--muted); }
.adm-new { margin-top: 14px; }
.inv-form { display: grid; gap: 6px; background: rgba(124, 58, 237, .05); border-radius: 18px; padding: 14px; }
.inv-form .f { margin-top: 4px; }
.inv-form button[type="submit"] { margin-top: 10px; justify-self: start; }
.inv-teams { display: flex; flex-wrap: wrap; gap: 6px; }
.inv-chk { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px rgba(124, 58, 237, .18); font-size: 13px; font-weight: 600; cursor: pointer; }
.inv-chk:has(input:checked) { background: var(--nc-purple); color: #fff; box-shadow: none; }
.inv-chk input { accent-color: #fff; margin: 0; }
.inv-h { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 8px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.inv-list { display: grid; gap: 8px; }
.inv-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border-radius: 16px; padding: 10px 12px; box-shadow: inset 0 0 0 1px rgba(124, 58, 237, .12); }
.inv-who { display: grid; gap: 2px; min-width: 0; }
.inv-who small { color: var(--muted); overflow-wrap: anywhere; }
.inv-st { font-size: 12px; font-weight: 700; color: #b45309; }
.inv-st.ok { color: #15803d; }
.inv-st.bad { color: #be123c; }
.inv-act { display: flex; gap: 6px; flex-wrap: wrap; }
.btn.mini { padding: 6px 10px; font-size: 12px; min-height: 0; }
.inv-qr { margin-top: 16px; }
.inv-qr summary { cursor: pointer; font-weight: 700; }
.inv-qr img { display: block; margin: 12px auto 6px; border-radius: 16px; background: #fff; padding: 10px; }
.login-card.thanks { text-align: center; }
.login-card.thanks .brand-logo { margin: 0 auto; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { display: inline-flex; align-items: center; gap: 2px; background: #fff; border: 1.5px solid rgba(124, 58, 237, .14); border-radius: 999px; padding: 3px 10px 3px 4px; font-size: 13px; font-weight: 600; position: relative; }
.pchip .avatar.sm { margin-right: 4px; }
.pchip button { border: 0; background: none; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 0 0 6px; }
.pchip button:hover { color: #be123c; }
.pick .pchip { cursor: pointer; opacity: .6; transition: opacity .12s, border-color .12s; }
.pick .pchip.on { opacity: 1; border-color: var(--nc-purple); background: #f5f3ff; }
.pick .pchip em { font-style: normal; font-size: 10px; font-weight: 800; color: #fff; background: var(--grad); border-radius: 999px; padding: 1px 6px; margin-left: 6px; }
.adm-posts { display: flex; flex-direction: column; gap: 10px; }
.adm-post-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.seg.mini button { padding: 5px 12px; font-size: 12px; }
.adm-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.story-card.admin { width: min(940px, 100%); }
.adm-dnd { display: grid; grid-template-columns: 230px 1fr; gap: 12px; align-items: start; }
.adm-pool { position: sticky; top: 0; z-index: 2; display: flex; flex-direction: column; gap: 8px; max-height: 68vh; overflow-y: auto; background: #fff; border: 1.5px dashed rgba(124, 58, 237, .28); border-radius: 18px; padding: 12px; }
.adm-pool h4 { margin: 4px 0 0; display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.adm-teams { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.adm-team, .adm-post { transition: background .15s, box-shadow .15s; }
.adm-slot { min-height: 32px; align-items: center; }
.pchip.drag { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; transition: transform .12s, box-shadow .12s, border-color .12s, opacity .12s; }
.pchip.drag:hover { transform: translateY(-1px); border-color: var(--nc-purple); box-shadow: 0 6px 14px rgba(124, 58, 237, .16); }
.pchip.drag em { font-style: normal; font-size: 10px; font-weight: 800; color: #fff; background: var(--grad); border-radius: 999px; padding: 1px 6px; margin-left: 6px; }
.pchip.team { padding-left: 10px; background: #f5f3ff; border-color: rgba(124, 58, 237, .35); }
.pchip.team small { margin-left: 6px; color: var(--muted); font-weight: 800; }
.pchip.dragging { opacity: .3; }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 10001; pointer-events: none; background: #fff; border-color: var(--nc-purple); box-shadow: 0 18px 36px rgba(26, 21, 48, .3); }
.is-dragging .adm-team, .is-dragging .adm-post { box-shadow: inset 0 0 0 2px rgba(124, 58, 237, .18); }
.adm-team.drop-on, .adm-post.drop-on { background: #ede9fe; box-shadow: inset 0 0 0 2px var(--nc-purple); }
.adm-pool.drop-on { border-color: #be123c; }
.adm-trash { position: fixed; left: 50%; bottom: 24px; z-index: 10000; transform: translate(-50%, 180%); padding: 14px 26px; border-radius: 999px; background: #fff1f2; color: #be123c; font-weight: 800; box-shadow: 0 14px 30px rgba(190, 18, 60, .25); transition: transform .2s, background .15s; pointer-events: none; }
.is-dragging .adm-trash { transform: translate(-50%, 0); pointer-events: auto; }
.adm-trash.drop-on { background: #be123c; color: #fff; transform: translate(-50%, 0) scale(1.08); }
.ue-switch { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.ue-switch input { width: 20px; height: 20px; accent-color: var(--nc-purple); }
@media (max-width: 760px) {
  .adm-dnd { grid-template-columns: 1fr; }
  .adm-pool { max-height: 32vh; }
}
/* ---------- Habilidades ---------- */
.pf-form h5 small { text-transform: none; letter-spacing: 0; font-weight: 600; margin-left: 6px; }
.pf-streak { display: grid; grid-template-columns: auto auto 1fr; gap: 10px; align-items: center; }
.pf-fire { display: grid; place-items: center; min-width: 74px; padding: 10px 8px; border-radius: 18px; background: linear-gradient(160deg, #fff7ed, #ffedd5); box-shadow: inset 0 0 0 1.5px rgba(234, 88, 12, .2); }
.pf-fire b { font-size: 26px; line-height: 1; color: #ea580c; }
.pf-fire small { font-size: 11px; font-weight: 700; color: #9a3412; margin-top: 3px; }
.pf-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-badges span { display: grid; place-items: center; width: 62px; padding: 6px 2px; border-radius: 14px; font-size: 22px; background: #f4f4f5; filter: grayscale(1); opacity: .45; }
.pf-badges span.on { filter: none; opacity: 1; background: #fef9c3; box-shadow: 0 4px 12px rgba(202, 138, 4, .2); }
.pf-badges small { font-size: 9.5px; font-weight: 700; text-align: center; line-height: 1.15; color: var(--muted); }
.pf-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; }
.pf-ok { font-size: 13px; font-weight: 700; color: #047857; }
.pf-push { width: 100%; justify-content: center; margin: 4px 0 8px; }
@media (max-width: 480px) { .pf-streak { grid-template-columns: 1fr 1fr; } .pf-badges { grid-column: 1 / -1; } }
.sk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.sk-item { display: flex; align-items: center; gap: 8px; text-align: left; border: 1.5px solid rgba(124, 58, 237, .14); background: #fff; border-radius: 12px; padding: 8px 10px; font-size: 13px; font-weight: 600; color: var(--muted); transition: border-color .12s, background .12s, color .12s; }
.sk-item span { font-size: 17px; filter: grayscale(1); opacity: .55; transition: filter .12s, opacity .12s; }
.sk-item.on { border-color: var(--nc-purple); background: #f5f3ff; color: var(--ink, #1a1530); }
.sk-item.on span { filter: none; opacity: 1; }
.sk-item.on::after { content: "✓"; margin-left: auto; color: var(--nc-purple); font-weight: 900; }
.pchip .sk { font-style: normal; font-size: 12px; margin-left: 4px; }

/* ---------- Calendario de cobertura ---------- */
.cv { margin-top: 18px; }
.cv-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cv-month { min-width: 150px; text-align: center; font-size: 18px; }
.cv-sum { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--glass, rgba(255, 255, 255, .75)); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; box-shadow: 0 4px 14px rgba(26, 21, 48, .06); }
.cv-sum .bad { color: #be123c; }
.cv-sum .good { color: #047857; }
.cv-prog { width: 70px; height: 7px; border-radius: 999px; background: rgba(124, 58, 237, .12); overflow: hidden; }
.cv-prog i { display: block; height: 100%; background: linear-gradient(90deg, #10b981, #34d399); border-radius: inherit; }
.cv-tag { margin-left: auto; font-size: 10px; font-weight: 800; border-radius: 999px; padding: 2px 7px; }
.cv-tag.ok { background: #d1fae5; color: #047857; }
.cv-day.covered { box-shadow: inset 0 0 0 2px rgba(16, 185, 129, .45); }
.cv-wrap.admin { display: grid; grid-template-columns: 230px 1fr; gap: 12px; align-items: start; }
.cv-pool { top: 12px; max-height: calc(100vh - 24px); }
.cv-pool .btn { justify-content: center; }
.cv-grid { display: grid; grid-template-columns: repeat(var(--cols, 7), minmax(0, 1fr)); gap: 10px; }
.cv-grid .cv-row .pchip { font-size: 12px; }
.cv-legend { margin: 10px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.pchip .st { font-style: normal; font-size: 11px; margin-left: 3px; }
.cv-act { border: 0; border-radius: 999px; padding: 4px 10px; font-size: 11.5px; font-weight: 800; cursor: pointer; background: #fff; box-shadow: 0 0 0 1.5px rgba(124, 58, 237, .25); color: var(--nc-purple); transition: transform .12s; }
.cv-act:hover { transform: translateY(-1px); }
.cv-act.ok { background: #059669; color: #fff; box-shadow: none; }
.cv-act.yo { background: var(--grad); color: #fff; box-shadow: none; }
.cv-act.no { color: #be123c; box-shadow: 0 0 0 1.5px rgba(190, 18, 60, .25); }
.cv-act.warn { align-self: flex-start; background: #fff7ed; color: #c2410c; box-shadow: 0 0 0 1.5px rgba(194, 65, 12, .3); }
.cv-warned { font-size: 11px; font-weight: 800; color: #c2410c; }
.cv-alerts { position: relative; font-size: 13px; }
.cv-alerts summary { list-style: none; cursor: pointer; background: #fff7ed; color: #c2410c; border-radius: 999px; padding: 6px 14px; font-weight: 700; box-shadow: 0 0 0 1.5px rgba(194, 65, 12, .25); }
.cv-alerts summary::-webkit-details-marker { display: none; }
.cv-alerts.hot summary { background: #fff1f2; color: #be123c; animation: pulse 2s infinite; }
.cv-alerts[open] summary { animation: none; }
.cv-alerts[open] { flex-basis: 100%; }
.cv-alerts[open] > .cv-alert { margin-top: 6px; background: #fff7ed; }
.cv-alert { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; background: #fff; border-radius: 12px; padding: 7px 10px; }
.seg button .badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 999px; background: #e11d48; color: #fff; font-size: 11px; font-weight: 800; animation: pulse 2s infinite; }
.adm-suggest { width: 100%; justify-content: flex-start; margin-top: 12px; border: 1.5px dashed rgba(124, 58, 237, .4); background: #f5f3ff; }
.adm-suggest small { color: var(--muted); font-weight: 600; margin-left: 6px; }
.chat-badge { position: absolute; top: -2px; right: -2px; z-index: 2; min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: #e11d48; color: #fff; font-size: 12px; font-weight: 800; box-shadow: 0 0 0 3px #fff; animation: pulse 2s infinite; }
.chat-hint.alert { background: #fff7ed; color: #c2410c; font-weight: 800; animation: none; opacity: 1; transform: translate(0, -50%); }
.chat-act { border: 0; border-radius: 999px; padding: 5px 11px; margin-top: 5px; font-size: 12px; font-weight: 800; cursor: pointer; background: #fff; color: var(--nc-purple); box-shadow: 0 0 0 1.5px rgba(124, 58, 237, .3); }
.chat-act.ok { background: #059669; color: #fff; box-shadow: none; }
.chat-act.yo { background: var(--grad); color: #fff; box-shadow: none; }
.chat-act.no { color: #be123c; box-shadow: 0 0 0 1.5px rgba(190, 18, 60, .3); }
.chat-act:disabled { opacity: .5; }
.msg ul { margin: 6px 0; padding-left: 18px; }
.msg li { margin-bottom: 6px; }
.msg hr { border: 0; border-top: 1px solid rgba(124, 58, 237, .15); margin: 8px 0; }
.cvd-list { display: flex; flex-direction: column; gap: 6px; }
.cvd-row { display: grid; grid-template-columns: 22px 90px 1fr; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; background: rgba(124, 58, 237, .04); }
.cvd-row.on { background: #f5f3ff; }
.cvd-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--nc-purple); }
.cvd-row .in { padding: 8px 10px; font-size: 13px; }
.cvd-row .in:disabled { opacity: .45; }
.cv-dow { text-align: center; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cv-day { background: rgba(255, 255, 255, .8); border-radius: 16px; padding: 8px; min-height: 118px; display: flex; flex-direction: column; gap: 5px; box-shadow: 0 4px 14px rgba(26, 21, 48, .05); border: 1.5px solid transparent; }
.cv-day.out { opacity: .35; }
.cv-day.past { opacity: .6; }
.cv-day.ev { background: #fff; border-color: rgba(124, 58, 237, .18); }
.cv-day.today { border-color: var(--nc-purple); box-shadow: 0 0 0 3px rgba(124, 58, 237, .15); }
.cv-day.mine { background: linear-gradient(160deg, #fff, #f5f3ff); }
.cv-h { all: unset; display: flex; align-items: baseline; gap: 6px; cursor: pointer; }
.cv-h:disabled { cursor: default; }
.cv-h b { font-size: 17px; }
.cv-h small { font-size: 11px; color: var(--muted); font-weight: 700; }
.cv-me { margin-left: auto; font-size: 10px; font-weight: 800; color: #fff; background: var(--grad); border-radius: 999px; padding: 2px 7px; }
.cv-ev { font-size: 11px; font-weight: 700; color: var(--nc-purple); line-height: 1.25; }
.cv-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 28px; border-radius: 10px; padding: 2px 4px; transition: background .12s, box-shadow .12s; }
.cv-row .pchip { font-size: 11px; padding: 2px 6px 2px 2px; max-width: 100%; min-width: 0; }
.cv-row .pchip .pc-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cv-row .pchip .avatar.sm { width: 20px; height: 20px; font-size: 9px; }
.cv-ic { font-size: 14px; }
.cv-row.miss { background: #fff1f2; }
.cv-miss { font-size: 10.5px; font-weight: 800; color: #be123c; }
.is-dragging .cv-row[data-drop] { box-shadow: inset 0 0 0 1.5px rgba(124, 58, 237, .25); }
.cv-row.drop-on { background: #ede9fe !important; box-shadow: inset 0 0 0 2px var(--nc-purple) !important; }
/* Tablet vertical: la lista de fotógrafos arriba y el calendario en sus columnas (Vie · Dom). */
@media (max-width: 900px) {
  .cv-wrap.admin { grid-template-columns: 1fr; }
  .cv-pool { position: sticky; top: 0; z-index: 2; max-height: 30vh; }
  .cv-pool.closed > :not(h4) { display: none; }
  .cv-pool h4 { cursor: pointer; }
  .cv-pool h4::after { content: "▾"; margin-left: 8px; transition: transform .2s; }
  .cv-pool:not(.closed) h4::after { transform: rotate(180deg); }
  .cv-day { min-height: 0; }
}
/* Celular: lista de un día por fila. */
@media (max-width: 600px) {
  .cv-grid { grid-template-columns: 1fr; }
  .cv-dow, .cv-day.out, .cv-day.quiet { display: none; }
  .cv-h b { font-size: 15px; }
}

/* ---------- Tarjeta de persona ---------- */
.hcard { position: fixed; z-index: 10002; width: 290px; background: rgba(255, 255, 255, .97); backdrop-filter: blur(14px); border-radius: 20px; padding: 14px; box-shadow: 0 24px 60px rgba(26, 21, 48, .28); border: 1px solid rgba(124, 58, 237, .14); display: flex; flex-direction: column; gap: 10px; animation: hc-in .16s ease-out both; pointer-events: none; }
.hcard.tap { pointer-events: auto; }
@keyframes hc-in { from { opacity: 0; transform: translateY(6px) scale(.97); } }
.hc-top { display: flex; align-items: center; gap: 10px; }
.hc-top b { display: block; font-size: 15px; }
.hc-top small { color: var(--muted); font-size: 12px; }
.hcard .avatar.hc-av { width: 48px; height: 48px; margin: 0; font-size: 16px; box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(124, 58, 237, .25); }
.hc-line { font-size: 12.5px; line-height: 1.4; }
.hc-skills { display: flex; flex-wrap: wrap; gap: 5px; }
.hc-skills span { font-size: 11.5px; font-weight: 700; background: #f5f3ff; color: #5b21b6; border-radius: 999px; padding: 3px 9px; }
.hc-skills .hc-none { background: #f4f4f5; color: var(--muted); }
.hc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.hc-stats span { background: linear-gradient(135deg, rgba(124, 58, 237, .08), rgba(219, 39, 119, .08)); border-radius: 12px; padding: 7px 9px; font-size: 11.5px; line-height: 1.3; }
.hc-stats b { font-size: 15px; }
.adm-sync { font-size: 12px; font-weight: 600; color: var(--muted); }
.adm-sync .ok { color: #047857; }
.adm-sync .warn { color: #b45309; background: #fffbeb; border-radius: 8px; padding: 3px 8px; display: inline-block; }
.adm-foot .adm-hint { margin: 0 auto 0 0; align-self: center; }
.hc-sub { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: -4px; }
.hc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.hc-list small { color: var(--muted); font-weight: 600; margin-left: 2px; }
.hc-warn { font-style: normal; font-size: 11px; font-weight: 800; color: #b45309; }
.adm-soon { text-align: center; padding: 20px 10px; }
.adm-soon-ic { font-size: 34px; margin-bottom: 8px; }
.adm-soon p { font-size: 14px; line-height: 1.5; max-width: 520px; margin: 8px auto; }
.msg-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.msg-tools .btn { flex: 1 1 auto; justify-content: center; padding: 9px 12px; font-size: 13px; }
.btn.danger { color: #be123c; border-color: rgba(190, 18, 60, .25); }
.btn.danger:hover { background: #fdecef; border-color: #be123c; }
.cap-edit { display: flex; flex-direction: column; gap: 8px; }
.cap-edit .row { justify-content: flex-end; }
.limit-row { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); border-top: 1px solid rgba(124, 58, 237, .1); padding-top: 12px; }
.limit-row input { width: 70px; height: 36px; border: 1.5px solid rgba(124, 58, 237, .2); border-radius: 10px; padding: 0 10px; font-weight: 700; }
.limit-row .btn { margin-left: auto; padding: 7px 14px; }
@media (max-width: 760px) {
  .story { align-self: flex-start; padding: 0; gap: 2px; }
  .story-ring { width: 48px; height: 48px; padding: 3px; }
  .story-face { font-size: 15px; }
  .story small { font-size: 10px; }
  .story-card { border-radius: 0; height: 100%; width: 100%; }
  .story-video { max-height: none; flex: 1 1 auto; min-height: 50vh; }
  .verse { font-size: 16px; }
}

/* ---------- Vista previa de Drive ---------- */
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.previews:empty { display: none; }
.pv { border: 0; padding: 0; background: #fff; border-radius: 16px; overflow: hidden; text-align: left; box-shadow: 0 6px 18px rgba(76, 29, 149, .12), inset 0 0 0 1px rgba(124, 58, 237, .1); transition: transform .15s, box-shadow .15s; }
.pv:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(76, 29, 149, .2); }
.pv-img { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; background: linear-gradient(135deg, #ede9fe, #fce7f3 60%, #fef3c7); overflow: hidden; }
.pv-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pv-img i { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 15px; color: #fff; background: var(--grad); box-shadow: 0 6px 16px rgba(219, 39, 119, .4); }
.pv-txt { display: block; padding: 8px 12px 10px; }
.pv-txt b { display: block; font-size: 14px; }
.pv-txt small { color: var(--muted); font-size: 11px; font-weight: 600; }

.viewer { position: fixed; inset: 0; z-index: 35; display: grid; place-items: center; padding: 20px; background: rgba(26, 21, 48, .55); backdrop-filter: blur(6px); animation: fade .15s; }
.viewer-card { width: min(1000px, 100%); max-height: 100%; display: flex; flex-direction: column; background: rgba(255, 255, 255, .92); border-radius: 28px; padding: 16px; box-shadow: 0 40px 100px rgba(26, 21, 48, .4); animation: rise .35s cubic-bezier(.2, .8, .2, 1) both; }
.viewer-card header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 2px 4px 12px; }
.viewer-card header b { font-size: 18px; }
.viewer-frame { position: relative; flex: none; width: 100%; border-radius: 18px; overflow: hidden; background: #0f0c1d; aspect-ratio: 16 / 9; max-height: calc(100vh - 170px); }
.viewer-frame.document, .viewer-frame.spreadsheets, .viewer-frame.folder { aspect-ratio: auto; height: calc(100vh - 170px); background: #fff; }
.viewer-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.viewer-wait { position: absolute; inset: 0; display: grid; place-items: center; color: #a5a0c0; font-weight: 600; }
.viewer-note { margin: 10px 4px 0; font-size: 12px; color: var(--muted); }

/* ---------- Chat con Noé ---------- */
.chat-fab { position: fixed; right: 22px; bottom: 22px; z-index: 30; width: 68px; height: 68px; border: 0; padding: 0; border-radius: 50%; background: rgba(255, 255, 255, .75); backdrop-filter: blur(12px); box-shadow: 0 14px 34px rgba(76, 29, 149, .3), inset 0 0 0 1px rgba(255, 255, 255, .9); transition: transform .2s, bottom .2s; }
.chat-fab:hover { transform: scale(1.06); }
.chat-fab .mini-h { position: absolute; left: 4px; top: 6px; width: 60px; height: 56px; }
.chat-fab .mini-h > span { position: absolute; left: 7px; top: 3px; width: 210px; height: 210px; transform: scale(.22); transform-origin: 0 0; }
.chat-hint { position: absolute; right: 78px; top: 50%; transform: translateY(-50%); white-space: nowrap; background: #fff; padding: 8px 14px; border-radius: 16px 16px 4px 16px; font-size: 13px; font-weight: 700; box-shadow: 0 10px 24px rgba(76, 29, 149, .18); animation: hint 6s ease-in-out 1.5s both; pointer-events: none; }
@keyframes hint { 0% { opacity: 0; transform: translate(10px, -50%); } 8%, 80% { opacity: 1; transform: translate(0, -50%); } 100% { opacity: 0; transform: translate(10px, -50%); } }
#chat-root.open .chat-hint { display: none; }
body.drawer-open .chat-fab { bottom: 92px; }

.chat-panel { position: fixed; right: 22px; bottom: 104px; z-index: 30; width: min(390px, calc(100vw - 24px)); height: min(600px, calc(100vh - 130px)); display: flex; flex-direction: column; border-radius: 28px; overflow: hidden; background: rgba(250, 248, 255, .9); backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4); box-shadow: 0 30px 80px rgba(76, 29, 149, .28), inset 0 0 0 1px rgba(255, 255, 255, .9); transform-origin: bottom right; opacity: 0; transform: translateY(16px) scale(.92); pointer-events: none; transition: opacity .2s, transform .25s cubic-bezier(.2, .8, .2, 1); }
#chat-root.open .chat-panel { opacity: 1; transform: none; pointer-events: auto; }
body.drawer-open .chat-panel { bottom: 174px; height: min(560px, calc(100vh - 200px)); }
@media (min-width: 1000px) {
  body.drawer-open .chat-panel { right: 580px; bottom: 22px; height: min(600px, calc(100vh - 44px)); transform-origin: bottom right; }
  body.drawer-open .chat-fab { bottom: 22px; right: 580px; }
  body.drawer-open #chat-root.open .chat-fab { display: none; }
}
.chat-panel header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: linear-gradient(100deg, rgba(124, 58, 237, .12), rgba(219, 39, 119, .1)); }
.chat-panel header > div:nth-child(2) { flex: 1; min-width: 0; }
.chat-panel header b { display: block; font-size: 16px; }
.chat-panel header small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-av { width: 50px; height: 46px; }
.chat-av > div { position: absolute; left: 6px; top: 2px; width: 210px; height: 210px; transform: scale(.19); transform-origin: 0 0; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.45; animation: rise .25s ease-out both; }
.msg.h { align-self: flex-start; background: #fff; border-bottom-left-radius: 6px; box-shadow: 0 4px 14px rgba(76, 29, 149, .08); }
.msg.u { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 6px; font-weight: 600; }
.msg ul, .msg ol { margin: 6px 0 0; padding-left: 18px; }
.msg li { margin: 3px 0; }
.msg p { margin: 8px 0 0; }
.typing { display: flex; gap: 4px; padding: 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #a78bfa; animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }
.chat-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.chat-task { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: #f7f4ff; border-left: 4px solid var(--c); padding: 8px 10px; border-radius: 10px; font-size: 13px; font-weight: 600; }
.chat-task:hover { background: #efe9ff; }
.chat-task span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; width: 30px; flex: none; }
.chat-task em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; color: var(--s); flex: none; }
.chat-pv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.chat-chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 14px 8px; scrollbar-width: none; }
.chat-chips button { flex: none; border: 1px solid rgba(124, 58, 237, .2); background: #fff; color: #5b21b6; border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 700; transition: background .12s; }
.chat-chips button:hover { background: #f3efff; }
.chat-form { display: flex; gap: 8px; padding: 10px 14px 14px; }
.chat-form input { flex: 1; min-width: 0; height: 44px; border: 1.5px solid rgba(124, 58, 237, .18); border-radius: 999px; padding: 0 16px; background: #fff; outline: none; font-size: 15px; }
.chat-form input:focus { border-color: var(--nc-purple); box-shadow: 0 0 0 4px rgba(124, 58, 237, .12); }
.chat-form button { width: 44px; height: 44px; border: 0; border-radius: 50%; color: #fff; background: var(--grad); font-size: 16px; box-shadow: 0 8px 18px rgba(219, 39, 119, .3); }
@media (max-width: 760px) {
  .chat-fab { right: 14px; bottom: 14px; width: 60px; height: 60px; }
  .chat-fab .mini-h { left: 0; top: 2px; }
  .chat-panel { right: 0; left: 0; bottom: 0; width: 100%; height: 82vh; height: 82dvh; border-radius: 26px 26px 0 0; }
  body.drawer-open .chat-panel { bottom: 0; height: 82dvh; }
  #chat-root.open .chat-fab { display: none; }
  .viewer { padding: 0; }
  .viewer-card { border-radius: 0; height: 100%; }
  .viewer-frame, .viewer-frame.document, .viewer-frame.spreadsheets, .viewer-frame.folder { aspect-ratio: auto; height: auto; max-height: none; flex: 1 1 0; }
}

@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

@media (max-width: 1180px) {
  .days { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* Barra inferior tipo app: solo en celular. */
.bnav { display: none; }

@media (max-width: 760px) {
  .wrap {
    padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) calc(96px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  }
  .days { grid-template-columns: 1fr; }
  .day .empty-day { display: none; }
  .day:has(.empty-day) { display: none; }
  .drawer { width: 100%; }
  .stages { grid-template-columns: repeat(6, 78vw); scroll-snap-type: x mandatory; }
  .stage { scroll-snap-align: start; }

  /* Encabezado en una línea; perfil y salir pasan a la barra inferior. */
  .top { flex-wrap: nowrap; align-items: center; }
  .top .user { display: none; }
  .brand-row { gap: 10px; }
  .brand-logo.sm { width: 40px; height: 40px; }
  .eyebrow { display: none; }
  h1 { font-size: 26px; margin: 0; }
  h1 .rel { font-size: 11px; padding: 3px 9px; margin-left: 8px; }
  h1 em { font-size: 17px; margin-top: 1px; }

  /* Saludo de Noé plegado: 2 líneas; al tocarlo se abre con versículo. */
  .hello-card { flex-wrap: nowrap; align-items: flex-start; margin-top: 12px; }
  .hello-card { gap: 8px; padding: 10px 12px 10px 8px; }
  .hello-card .mini-h { width: 50px; height: 46px; }
  .hello-card .mini-h > div { left: 2px; top: 0; transform: scale(.21); }
  .story small { display: none; }
  .next-up b { font-size: inherit; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); border-radius: 18px; text-align: center; }
  .hello-card:not(.open) .hello-txt p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .hello-card:not(.open) .verse { display: none; }
  .hello-txt > b::after { content: " ▾"; font-size: 12px; color: var(--muted); }
  .hello-card.open .hello-txt > b::after { content: " ▴"; }
  .next-up { margin-top: 6px; padding: 5px 10px; font-size: 12px; }

  /* Barra de herramientas: Cobertura y Equipo viven en la barra inferior. */
  .toolbar { margin: 14px 0 10px; }
  .seg [data-mode="cobertura"], #team-admin { display: none; }
  .dash.cov .toolbar { display: none; }

  /* Números de la semana en una fila compacta. */
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .stat { padding: 10px 8px; border-radius: 16px; }
  .stat .ic { display: none; }
  .stat .n { font-size: 22px; }
  .stat .n small { font-size: 12px; }
  .stat .l { font-size: 10.5px; line-height: 1.2; }

  .bnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
    display: flex; justify-content: space-around;
    padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    background: rgba(255, 255, 255, .86); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
    box-shadow: 0 -8px 24px rgba(76, 29, 149, .1), inset 0 1px 0 rgba(255, 255, 255, .9);
  }
  .bnav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: none; padding: 4px 0; font-size: 11px; font-weight: 700; color: var(--muted); }
  .bnav .bi { position: relative; display: grid; place-items: center; width: 44px; height: 30px; border-radius: 999px; font-size: 19px; transition: background .15s; }
  .bnav .bi .avatar { width: 26px; height: 26px; margin: 0; font-size: 10px; }
  .bnav .on { color: var(--nc-purple); }
  .bnav .on .bi { background: rgba(124, 58, 237, .12); }
  .bnav .badge { position: absolute; top: -3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: #e11d48; color: #fff; font-size: 10.5px; font-style: normal; font-weight: 800; display: grid; place-items: center; }

  /* Noé por encima de la barra inferior y sin globo que tape botones. */
  .chat-fab { bottom: calc(72px + env(safe-area-inset-bottom)); width: 54px; height: 54px; }
  .chat-fab .mini-h { transform: scale(.9); transform-origin: top left; }
  .chat-hint { display: none; }
}
