/* NOXIGY OS — Noxi ✦, la mascota: tour guiado del portal y ayuda flotante. */

/* ---------- Mascota (minimal) ---------- */
.noxi { --s: 64px; position: relative; width: var(--s); height: calc(var(--s) * 1.16); display: inline-flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.noxi-body { position: relative; width: var(--s); height: var(--s); animation: noxiFloat 4s ease-in-out infinite; }
.noxi-body img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 0 10px rgba(201,243,29,.28)); }
.noxi-face { position: absolute; inset: 0; width: 100%; height: 100%; }
.noxi-eyes { transform-box: fill-box; transform-origin: center; animation: noxiBlink 5s infinite; }
.noxi-look { animation: noxiLook 9s ease-in-out infinite; }
.noxi-mouth-open { opacity: 0; }
.noxi.talking .noxi-mouth { animation: noxiTalkA .34s steps(1) infinite; }
.noxi.talking .noxi-mouth-open { animation: noxiTalkB .34s steps(1) infinite; }
.noxi-shadow { width: 46%; height: calc(var(--s) * .07); margin-top: calc(var(--s) * .08); border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.55), transparent); animation: noxiShadow 4s ease-in-out infinite; }
.noxi.hop .noxi-body { animation: noxiHop .55s cubic-bezier(.2,.8,.2,1), noxiFloat 4s ease-in-out .55s infinite; }
@keyframes noxiFloat { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-4%) rotate(2deg); } }
@keyframes noxiShadow { 0%, 100% { transform: scaleX(1); opacity: .9; } 50% { transform: scaleX(.85); opacity: .6; } }
@keyframes noxiBlink { 0%, 94%, 100% { transform: scaleY(1); } 96.5% { transform: scaleY(.12); } }
@keyframes noxiLook { 0%, 40%, 100% { transform: translateX(0); } 45%, 58% { transform: translateX(2.2px); } 63%, 76% { transform: translateX(-2.2px); } 81% { transform: translateX(0); } }
@keyframes noxiTalkA { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes noxiTalkB { 0% { opacity: 0; } 50% { opacity: 1; } }
@keyframes noxiHop { 0% { transform: translateY(18%) scale(.6); opacity: 0; } 70% { transform: translateY(-6%) scale(1.04); opacity: 1; } 100% { transform: translateY(0) scale(1) rotate(-2deg); } }

/* ---------- Tour ---------- */
.tour { position: fixed; inset: 0; z-index: 400; animation: fadeIn .25s ease; }
.tour.out { animation: fadeOut .22s forwards; }
.tour-dim { position: absolute; inset: 0; background: rgba(4,4,6,.62); }
.tour:has(.tour-spot:not([hidden])) .tour-dim { background: transparent; }
.tour-spot {
  position: fixed; border-radius: 12px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(4,4,6,.66), 0 0 0 2px var(--accent), 0 0 24px 4px rgba(201,243,29,.35);
  transition: left .35s var(--ease), top .35s var(--ease), width .35s var(--ease), height .35s var(--ease);
}
.tour-card {
  position: fixed; width: min(400px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--border); border-radius: 20px;
  padding: 20px 20px 16px; box-shadow: var(--shadow-pop), 0 0 0 1px rgba(201,243,29,.08); display: grid; grid-template-columns: auto 1fr; gap: 6px 16px;
  transition: left .35s var(--ease), top .35s var(--ease);
}
.tour-card.in { animation: tourIn .35s var(--ease); }
@keyframes tourIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.tour-noxi { grid-row: span 2; padding-top: 2px; }
.tour-txt h3 { font-size: 19px; margin: 4px 0 6px; }
.tour-txt p { font-size: 14px; line-height: 1.55; color: var(--text-dim); min-height: 4.6em; cursor: pointer; }
.tour-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border-soft); margin-top: 6px; flex-wrap: wrap; }
.tour-dots { display: flex; gap: 5px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--panel-3); transition: all .25s; }
.tour-dots i.done { background: var(--text-faint); }
.tour-dots i.on { background: var(--accent); width: 18px; border-radius: 4px; }
/* Presentación y despedida: tarjeta centrada y Noxi grande */
.tour.centered .tour-card { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); grid-template-columns: 1fr; text-align: center; width: min(440px, calc(100vw - 32px)); padding: 28px 26px 18px; }
.tour.centered .tour-card.in { animation: tourInC .45s var(--ease); }
@keyframes tourInC { from { opacity: 0; transform: translate(-50%, -46%) scale(.96); } }
.tour.centered .tour-noxi { grid-row: auto; display: flex; justify-content: center; }
.tour.centered .tour-noxi .noxi { --s: 104px !important; }
.tour.centered .tour-txt h3 { font-size: 26px; }
.tour.centered .tour-txt p { min-height: 0; }
@media (max-width: 980px) {
  .tour:not(.centered) .tour-card { left: 12px !important; right: 12px; top: auto !important; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: auto; }
  .tour .tour-card .noxi { --s: 54px !important; }
}

/* ---------- Noxi en la barra lateral (escritorio) y en la barra superior (móvil) ---------- */
.noxi-dock {
  margin-top: auto; display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 8px 10px 10px;
  cursor: pointer; text-align: left; color: var(--text-dim); border-radius: 12px; transition: background var(--t-fast);
}
.noxi-dock:hover { background: rgba(255,255,255,.03); }
.noxi-dock .noxi { height: auto; }
.noxi-dock .noxi-shadow { display: none; }
.noxi-dock span { display: flex; flex-direction: column; line-height: 1.25; }
.noxi-dock b { font: 600 13px var(--font-display); color: var(--text); }
.noxi-dock em { font-style: normal; font-size: 11.5px; color: var(--text-faint); transition: color var(--t-fast); }
.noxi-dock:hover em { color: var(--accent); }
.sidebar .noxi-dock + .sidebar-footer { margin-top: 0; }
.noxi-top { background: none; border: 0; padding: 0 2px; cursor: pointer; align-items: center; }
.noxi-top .noxi { height: auto; }
.noxi-top .noxi-shadow { display: none; }
.noxi-panel {
  position: fixed; z-index: 95; width: min(380px, calc(100vw - 24px)); max-height: min(70vh, 560px); overflow-y: auto;
  background: var(--panel); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-pop); animation: popIn var(--t-med) var(--ease);
}
.noxi-panel-head { display: flex; gap: 12px; align-items: center; padding: 16px 14px 10px 16px; }
.noxi-panel-head > div:not(.noxi) { flex: 1; min-width: 0; }
.noxi-panel-head b { font: 700 15.5px var(--font-display); display: block; }
.noxi-panel-head p { font-size: 13px; color: var(--text-dim); margin-top: 2px; min-height: 1.3em; }
.noxi-panel .noxi-shadow { display: none; }
.noxi-qs { display: flex; flex-direction: column; padding: 4px 8px 10px; }
.noxi-qs button { display: flex; align-items: center; gap: 10px; text-align: left; background: none; border: 0; border-radius: 12px; padding: 11px 10px; color: var(--text); font: 500 13.5px var(--font-body); cursor: pointer; }
.noxi-qs button:hover { background: var(--panel-2); }
.noxi-qs button span { flex: 1; }
.noxi-qs button i { font-style: normal; color: var(--text-faint); }
.noxi-qs [data-tour] { color: var(--accent); }
.noxi-answer { padding: 0 16px 10px; font-size: 14px; line-height: 1.6; color: var(--text-dim); min-height: 5em; }
@media (max-width: 980px) { .noxi-panel { width: auto; } }
@media (prefers-reduced-motion: reduce) { .noxi-body, .noxi-body img, .noxi-shadow { animation: none !important; } }

/* ---------- Tarjeta de Noxi en las páginas ---------- */
.noxi-card {
  position: relative; background: linear-gradient(135deg, rgba(201,243,29,.06), transparent 45%), var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 22px;
  animation: viewIn .4s var(--ease); transition: opacity .26s, transform .26s;
}
.noxi-card.out { opacity: 0; transform: translateY(-6px); }
.noxi-card-head { display: flex; align-items: center; gap: 14px; }
.noxi-card-head > div:not(.noxi) { flex: 1; min-width: 0; }
.noxi-card-head > .noxi { flex: none; }
.noxi-card-head b { font: 700 16px var(--font-display); display: block; }
.noxi-card-head p { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.noxi-card .noxi-shadow { display: none; }
.noxi-card-x { font-size: 12px; flex-shrink: 0; }
.noxi-items { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; }
.noxi-items li { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--border-soft); font-size: 13.5px; }
.noxi-items li.warn .nt { color: var(--text); }
.noxi-items li.warn .ni { background: var(--warn-dim); }
.noxi-items .ni { width: 30px; height: 30px; border-radius: 9px; background: var(--panel-2); display: grid; place-items: center; flex-shrink: 0; font-size: 14px; }
.noxi-items .nt { flex: 1; min-width: 0; color: var(--text-dim); line-height: 1.45; }
.noxi-items .btn-outline { flex-shrink: 0; }
.noxi-empty { margin: 10px 0 0; font-size: 13px; color: var(--text-dim); }
@media (max-width: 640px) { .noxi-items li { flex-wrap: wrap; row-gap: 8px; } .noxi-items .nt { flex: 1 1 calc(100% - 42px); } .noxi-items .btn-outline { margin-left: 42px; } }

/* ---------- Celebración + valoración ---------- */
.rate-layer { position: fixed; inset: 0; z-index: 420; background: rgba(4,4,6,.6); display: grid; place-items: center; padding: 16px; animation: fadeIn .25s ease; }
.rate-layer.out { animation: fadeOut .24s forwards; }
.rate-card { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--border); border-radius: 22px; padding: 24px 22px 18px; text-align: center; box-shadow: var(--shadow-pop); animation: popIn .4s var(--ease); }
.rate-noxi { display: flex; justify-content: center; margin-bottom: 6px; }
.rate-card h3 { font-size: 21px; margin-bottom: 6px; }
.rate-card > p { font-size: 13.5px; margin-bottom: 16px; }
.rate-faces { display: flex; gap: 10px; justify-content: center; margin-bottom: 12px; }
.rate-faces button { flex: 1; background: var(--panel-2); border: 1px solid var(--border); border-radius: 16px; padding: 12px 6px 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-dim); transition: all var(--t-fast); }
.rate-faces button span { font-size: 30px; transition: transform var(--t-med) var(--ease); }
.rate-faces button em { font-style: normal; font-size: 11.5px; font-weight: 600; }
.rate-faces button:hover span { transform: scale(1.15); }
.rate-faces button.on { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }
.rate-faces button.on span { transform: scale(1.2); }
.rate-card textarea { margin-top: 4px; }

/* ---------- Resumen semanal y extras del portal ---------- */
.week { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 26px; }
.week-col { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; }
.week-col h3 { font-size: 14.5px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.week-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.week-col li { font-size: 13px; color: var(--text-dim); line-height: 1.45; }
.week-col li b { color: var(--text); font-weight: 600; }
.week-col li small { display: block; color: var(--text-faint); font-size: 11.5px; }
.week-col .none { color: var(--text-faint); font-size: 12.5px; }
@media (max-width: 1000px) { .week { grid-template-columns: 1fr; } }
.opp-card { display: flex; gap: 16px; align-items: center; padding: 18px; margin-bottom: 26px; border: 1px dashed rgba(201,243,29,.35); border-radius: var(--radius-lg); background: rgba(201,243,29,.04); }
.opp-card .opp-emoji { font-size: 30px; width: 56px; height: 56px; border-radius: 16px; background: var(--panel-2); display: grid; place-items: center; flex-shrink: 0; }
.opp-card > div:not(.opp-emoji):not(.row) { flex: 1; min-width: 0; }
.opp-card b { font: 700 16px var(--font-display); display: block; margin: 2px 0 4px; }
.opp-card p { font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.opp-card .row { flex-shrink: 0; }
@media (max-width: 760px) { .opp-card { flex-wrap: wrap; } .opp-card .row { width: 100%; justify-content: flex-end; } }
.ideas-box { display: flex; gap: 10px; align-items: flex-start; }
.ideas-box textarea { flex: 1; min-height: 44px; }
.idea-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.idea { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 14px; font-size: 13px; line-height: 1.5; }
.idea a { color: var(--accent); word-break: break-all; }
.idea small { display: block; margin-top: 8px; color: var(--text-faint); font-size: 11.5px; }
.sat { display: flex; align-items: center; gap: 18px; }
.sat-big { font: 700 44px var(--font-display); line-height: 1; }
.sat-faces { font-size: 22px; letter-spacing: 4px; }
