/* ---------- Mr. Nimbus (mascota) ---------- */
.nimbus { display: block; position: relative; width: 150px; cursor: pointer; perspective: 600px; user-select: none; -webkit-user-select: none; }
.nimbus.full { aspect-ratio: 368 / 500; }
.nimbus.face { aspect-ratio: 1; }
.nimbus .body { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .25s ease-out, filter .4s;
  transform: rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)); animation: bob 3.2s ease-in-out infinite; transform-origin: 50% 90%;
  filter: drop-shadow(0 14px 26px rgba(20, 184, 166, .45)) drop-shadow(0 0 1px rgba(255,255,255,.4)); }
.nimbus img { width: 100%; height: 100%; display: block; pointer-events: none; }
@keyframes bob { 0%, 100% { translate: 0 0; rotate: -1.5deg; } 50% { translate: 0 -7px; rotate: 1.5deg; } }
.nimbus .shades { position: absolute; transform: translateY(-260%); opacity: 0; transition: transform .7s cubic-bezier(.3, 1.6, .5, 1), opacity .15s; }
.nimbus .shades svg { width: 100%; display: block; filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
.nimbus[data-mood="cool"] .shades, .nimbus[data-mood="party"] .shades { transform: none; opacity: 1; }
.nimbus .zz, .nimbus .sweat, .nimbus .anger { position: absolute; font-size: 26px; opacity: 0; transition: opacity .3s; pointer-events: none; }
.nimbus .zz { right: 4%; top: 0; }
.nimbus .sweat { right: 18%; top: 8%; }
.nimbus .anger { right: 12%; top: 2%; }
.nimbus.face .zz, .nimbus.face .sweat, .nimbus.face .anger { font-size: 18px; }
.nimbus[data-mood="sleep"] .zz { opacity: 1; animation: floatz 2s infinite; }
@keyframes floatz { from { transform: translate(0, 6px) scale(.8); } to { transform: translate(8px, -10px) scale(1.1); opacity: .2; } }
.nimbus[data-mood="sleep"] .body { filter: saturate(.6) brightness(.85); }
.nimbus[data-mood="sad"] .sweat { opacity: 1; animation: drip 1.4s infinite; }
@keyframes drip { from { transform: translateY(-4px); } to { transform: translateY(14px); opacity: 0; } }
.nimbus[data-mood="sad"] .body { filter: grayscale(.55) drop-shadow(0 10px 20px rgba(0,0,0,.5)); animation: sadbob 3s ease-in-out infinite; }
@keyframes sadbob { 0%, 100% { translate: 0 4px; rotate: -4deg; } 50% { translate: 0 8px; rotate: -6deg; } }
.nimbus[data-mood="angry"] .anger { opacity: 1; }
.nimbus[data-mood="angry"] .body { animation: rage .12s linear infinite; filter: drop-shadow(0 0 18px rgba(255, 60, 60, .7)); }
@keyframes rage { 0%, 100% { translate: -2px 0; } 50% { translate: 2px 0; } }
.nimbus[data-mood="wow"] .body { animation: wow .6s cubic-bezier(.3, 1.8, .5, 1) both, bob 3.2s .6s ease-in-out infinite; }
@keyframes wow { from { scale: .85; } to { scale: 1.06; } }
.nimbus[data-mood="cool"] .body { filter: drop-shadow(0 0 22px rgba(250, 204, 21, .6)) drop-shadow(0 14px 26px rgba(20, 184, 166, .5)); }
.nimbus[data-mood="think"] .body { animation: think 2.4s ease-in-out infinite; }
@keyframes think { 0%, 100% { rotate: -6deg; translate: 0 0; } 50% { rotate: 6deg; translate: 0 -6px; } }
.nimbus[data-mood="party"] .body { animation: party .45s ease-in-out infinite; filter: drop-shadow(0 0 26px rgba(163, 230, 53, .7)); }
@keyframes party { 0%, 100% { translate: 0 0; rotate: -9deg; scale: 1; } 50% { translate: 0 -18px; rotate: 9deg; scale: 1.06; } }
.nimbus.talking .body { animation: talk .32s ease-in-out infinite alternate; }
@keyframes talk { from { scale: 1 1; translate: 0 0; } to { scale: 1.035 .975; translate: 0 2px; } }
.nimbus.poke .body { animation: poke .55s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes poke { 0% { scale: 1; } 30% { scale: 1.15 .85; } 60% { scale: .92 1.1; } 100% { scale: 1; } }
/* burbujas al pensar */
.nimbus .bubbles { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; }
.nimbus[data-mood="think"] .bubbles { opacity: 1; }
.nimbus .bubbles i { position: absolute; bottom: 30%; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(165, 243, 252, .8);
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.8), rgba(165,243,252,.15) 40%, transparent 70%); animation: rise 2.2s ease-in infinite; }
.nimbus .bubbles i:nth-child(1) { left: 8%; animation-delay: 0s; }
.nimbus .bubbles i:nth-child(2) { left: 80%; animation-delay: -.5s; width: 10px; height: 10px; }
.nimbus .bubbles i:nth-child(3) { left: 20%; animation-delay: -1s; width: 18px; height: 18px; }
.nimbus .bubbles i:nth-child(4) { left: 70%; animation-delay: -1.5s; }
.nimbus .bubbles i:nth-child(5) { left: 45%; animation-delay: -1.9s; width: 8px; height: 8px; }
@keyframes rise { from { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; } to { transform: translateY(-260%) scale(1.1); opacity: 0; } }
.brand .logo { width: 36px; height: 36px; border-radius: 12px; object-fit: cover; box-shadow: 0 0 0 2px rgba(255,255,255,.7), 0 4px 14px rgba(20, 184, 166, .5); }
@media (prefers-reduced-motion: reduce) { .nimbus .body { animation: none !important; } }
/* tamaños del Nimbus según el sitio */
.msg .who .nimbus { width: 44px; filter: none; }
.msg .who .nimbus .body { animation: none; }
.hero .nimbus.face { width: 84px; }
.feedback .nimbus.face { width: 60px; }
.loading .nimbus.full { width: 150px; }
.celebrate .nimbus.full { width: min(240px, 56vw); }
.handsfree .nimbus.full { width: min(230px, 54vw); }
.composer .att-prev { position: absolute; }
/* GIFs de acierto / fallo */
.gifpop { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: 20px; background: rgba(2, 12, 27, .45);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: gfade .25s both; cursor: pointer; }
.gifpop .frame { width: min(420px, 92vw); border-radius: 26px; overflow: hidden; background: #000; animation: gin .55s cubic-bezier(.3, 1.6, .5, 1) both;
  box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 0 4px rgba(255,255,255,.9); }
.gifpop.acierto .frame { box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 0 4px #a3e635, 0 0 50px rgba(163, 230, 53, .6); rotate: -2deg; }
.gifpop.fallo .frame { box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 0 4px #fb7185, 0 0 50px rgba(251, 113, 133, .5); rotate: 2deg; }
.gifpop img { width: 100%; display: block; aspect-ratio: 498 / 374; object-fit: cover; }
.gifpop .cap { padding: 12px 16px; font-family: var(--display); font-weight: 600; font-size: 20px; text-align: center; color: #fff;
  background: linear-gradient(135deg, #0d9488, #4f46e5); }
.gifpop.fallo .cap { background: linear-gradient(135deg, #e11d48, #7c3aed); }
.gifpop.out { animation: gfade .3s reverse both; }
.gifpop.out .frame { animation: gout .3s both; }
@keyframes gfade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gin { from { transform: scale(.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes gout { to { transform: scale(.7) translateY(30px); opacity: 0; } }
.celebrate .gif { width: min(360px, 84vw); border-radius: 22px; display: block; margin: 0 auto 6px; box-shadow: 0 0 0 4px #a3e635, 0 0 60px rgba(163, 230, 53, .6); }
/* ---------- botón tecnológico (login) ---------- */
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.btn-tech { position: relative; isolation: isolate; width: 100%; border: 0; padding: 0; border-radius: 20px; cursor: pointer; background: none;
  color: #e6fffb; font-family: var(--display); filter: drop-shadow(0 10px 28px rgba(20, 184, 166, .35)); transition: transform .12s, filter .25s; }
.btn-tech::before { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -2;
  background: conic-gradient(from var(--ang), #14b8a6, #22d3ee, #7c5cff, #ff5c8a, #a3e635, #14b8a6); animation: spinb 3.5s linear infinite; }
.btn-tech::after { content: ""; position: absolute; inset: 2px; border-radius: 18px; z-index: -1;
  background: radial-gradient(120% 140% at 50% -20%, rgba(45, 212, 191, .35), transparent 60%), linear-gradient(180deg, #082640, #041528);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 0 24px rgba(34, 211, 238, .15); }
@keyframes spinb { to { --ang: 360deg; } }
.btn-tech .bt-in { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px 14px; overflow: hidden; border-radius: 18px; }
.btn-tech .bt-in::before { content: ""; position: absolute; inset: 0; opacity: .25; pointer-events: none;
  background-image: linear-gradient(rgba(94,234,212,.25) 1px, transparent 1px), linear-gradient(90deg, rgba(94,234,212,.25) 1px, transparent 1px); background-size: 14px 14px;
  mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent); }
.btn-tech .bt-in::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent); animation: sweep 2.8s ease-in-out infinite; }
@keyframes sweep { 0%, 35% { left: -60%; } 75%, 100% { left: 130%; } }
.btn-tech .bt-ico { font-size: 22px; filter: drop-shadow(0 0 8px rgba(250, 204, 21, .8)); }
.btn-tech .bt-txt { font-size: 18px; font-weight: 700; letter-spacing: 2.5px; white-space: nowrap; text-transform: uppercase; text-shadow: 0 0 14px rgba(94, 234, 212, .8); }
.btn-tech .bt-arr { font-size: 22px; letter-spacing: -2px; color: #5eead4; animation: arr 1.2s ease-in-out infinite; }
@keyframes arr { 0%, 100% { transform: translateX(0); opacity: .6; } 50% { transform: translateX(6px); opacity: 1; } }
.btn-tech:hover { filter: drop-shadow(0 10px 34px rgba(34, 211, 238, .6)); }
.btn-tech:active { transform: scale(.97); }
.btn-tech .bt-scan { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: linear-gradient(90deg, #22d3ee, #a3e635); box-shadow: 0 0 12px #22d3ee; }
.btn-tech.busy { pointer-events: none; }
.btn-tech.busy::before { animation-duration: .8s; }
.btn-tech.busy .bt-scan { animation: scan 1.1s ease-in-out infinite; }
.btn-tech.busy .bt-arr { display: none; }
@keyframes scan { 0% { width: 0; left: 0; } 50% { width: 100%; left: 0; } 100% { width: 0; left: 100%; } }
.btn-tech.ok::before { background: #a3e635; }
.btn-tech.fail::before { background: #fb7185; animation: none; }
.auth .status { display: flex; justify-content: center; gap: 14px; margin-top: 14px; font-size: 12px; font-weight: 800; letter-spacing: 1px; color: #5eead4; text-transform: uppercase; }
.auth .status i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #a3e635; box-shadow: 0 0 10px #a3e635; margin-right: 6px; animation: throb 1.6s infinite; }
.plan-head h2 { font-size: 22px; line-height: 1.15; }
.plan-head .em { font-size: 40px; flex: none; }
.celebrate.solid { background: radial-gradient(circle at 50% 30%, rgba(13, 148, 136, .35), rgba(2, 12, 27, .97) 60%); }
/* ---------- instalar en la pantalla de inicio ---------- */
.install-card .app-ico { width: 52px; height: 52px; border-radius: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.4); flex: none; }
.install-tut { position: fixed; inset: 0; z-index: 90; background: rgba(2, 12, 27, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); animation: gfade .25s both; }
.install-tut.out { animation: gfade .3s reverse both; }
.install-tut .sheet { position: relative; width: min(480px, 100%); background: linear-gradient(160deg, #0b2a4a, #071b33); border: 1px solid rgba(94, 234, 212, .4);
  border-radius: 26px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.6); animation: gin .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.install-tut .sheet .x { position: absolute; top: 12px; right: 12px; }
.install-tut .sheet h2 { font-size: 21px; padding-right: 40px; }
.install-tut .nimbus.face { width: 64px; }
.tut-steps { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.tut-steps li { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: rgba(255,255,255,.06); border: 1px solid var(--line);
  animation: viewIn .45s both; }
.tut-steps .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; flex: none;
  background: linear-gradient(135deg, #14b8a6, #4f46e5); }
.tut-steps .i { font-size: 24px; width: 40px; height: 40px; display: grid; place-items: center; flex: none; border-radius: 12px; background: rgba(255,255,255,.95); color: #0a84ff; }
.tut-steps .t { line-height: 1.35; }
.tut-arrow { position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column-reverse; align-items: center;
  color: #5eead4; font-size: 30px; animation: point 1s ease-in-out infinite; filter: drop-shadow(0 0 10px rgba(94, 234, 212, .8)); pointer-events: none; }
.tut-arrow.top { bottom: auto; top: calc(8px + env(safe-area-inset-top)); left: auto; right: 14px; transform: none; flex-direction: column; animation-name: pointup; }
.tut-arrow.top + .sheet, .install-tut:has(.tut-arrow.top) { align-items: center; }
@keyframes point { 0%, 100% { translate: 0 0; } 50% { translate: 0 10px; } }
@keyframes pointup { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
/* barra superior compacta: logo + 4 fichas + avatar tienen que caber en 360 px */
.topbar { gap: 6px; }
.topbar .sp { min-width: 0; }
.topbar .chip { padding: 5px 8px; font-size: 13px; gap: 4px; }
@media (max-width: 440px) { .topbar .brand b { display: none; } .topbar .avatar.sm { width: 32px; height: 32px; font-size: 18px; } }
@media (max-width: 350px) { .topbar .chip.fire { display: none; } }
html, body { max-width: 100%; overflow-x: hidden; }
