/* CAMPUS NIKA — ECOE FINAL de 6.° año (PFO).
   Tema CLARO por defecto (como el resto del campus). body.dark-mode = oscuro; body.tema-premium = violeta (NikaMed+/admin con ese tema elegido).
   Los temas los maneja js/campusTema.js; el hero y los resultados conservan el azul "de egreso" con acento dorado en todos los temas. */
body.pfo {
  --pf-bg: #f1f5f9; --pf-card: #ffffff; --pf-card2: #f8fafc; --pf-bd: #cbd5e1; --pf-tx: #0f172a; --pf-mut: #475569;
  --pf-az: #0284c7; --pf-or: #b45309; --pf-gold: #f59e0b; --pf-ok: #16a34a; --pf-mal: #dc2626; --pf-vi: #7c3aed;
  --pf-top: rgba(255, 255, 255, .88); --pf-hov: rgba(2, 132, 199, .08); --pf-in: #eff6ff; --pf-in-bd: rgba(2, 132, 199, .35); --pf-in-tx: #075985;
  --pf-sh: 0 10px 25px -12px rgba(15, 23, 42, .18);
  --border: var(--pf-bd); --text-main: var(--pf-tx);
  --mi-ease: cubic-bezier(.22, 1, .36, 1);
}
body.pfo.dark-mode {
  --pf-bg: #0a1220; --pf-card: #111c33; --pf-card2: #16233f; --pf-bd: rgba(148, 163, 184, .22); --pf-tx: #e6edf7; --pf-mut: #93a4bf;
  --pf-az: #38bdf8; --pf-or: #fbbf24; --pf-ok: #22c55e; --pf-mal: #f87171; --pf-vi: #a78bfa;
  --pf-top: rgba(10, 18, 32, .82); --pf-hov: rgba(56, 189, 248, .16); --pf-in: rgba(56, 189, 248, .1); --pf-in-bd: rgba(56, 189, 248, .4); --pf-in-tx: #bae6fd;
  --pf-sh: 0 14px 30px -16px rgba(0, 0, 0, .6);
}
body.pfo.tema-premium {
  --pf-bg: #0c0522; --pf-card: rgba(25, 12, 56, .82); --pf-card2: rgba(40, 20, 84, .7); --pf-bd: rgba(168, 85, 247, .32); --pf-tx: #f5f3ff; --pf-mut: #c4b5fd;
  --pf-az: #c084fc; --pf-vi: #c084fc; --pf-top: rgba(12, 6, 34, .72); --pf-hov: rgba(168, 85, 247, .22); --pf-in: rgba(168, 85, 247, .14); --pf-in-bd: rgba(192, 132, 252, .45); --pf-in-tx: #e9d5ff;
  --pf-sh: 0 16px 36px -16px rgba(76, 29, 149, .7);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.pfo { margin: 0; min-height: 100vh; color: var(--pf-tx); font-family: 'Plus Jakarta Sans', system-ui, sans-serif; transition: background-color .35s, color .35s;
  background: radial-gradient(1100px 600px at 80% -10%, rgba(2, 132, 199, .10), transparent 60%), radial-gradient(900px 500px at -10% 10%, rgba(124, 58, 237, .08), transparent 55%), var(--pf-bg); }
body.pfo.dark-mode { background: radial-gradient(1100px 600px at 80% -10%, rgba(56, 189, 248, .14), transparent 60%), radial-gradient(900px 500px at -10% 10%, rgba(167, 139, 250, .14), transparent 55%), var(--pf-bg); }
body.pfo.tema-premium { background: radial-gradient(1200px 640px at 80% -12%, rgba(168, 85, 247, .30), transparent 60%), radial-gradient(900px 500px at -10% 10%, rgba(99, 102, 241, .22), transparent 55%), var(--pf-bg); }

/* ---- barra superior ---- */
.pfo-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px clamp(12px, 3vw, 28px); background: var(--pf-top); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--pf-bd); }
.pfo-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--pf-tx); }
.pfo-brand img { width: 34px; height: 34px; border-radius: 9px; transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); } .pfo-brand:hover img { transform: rotate(-8deg) scale(1.1); }
.pfo-brand span { display: flex; flex-direction: column; line-height: 1.1; } .pfo-brand b { font-size: .88rem; letter-spacing: .04em; } .pfo-brand small { color: var(--pf-or); font-weight: 800; font-size: .7rem; }
.pfo-top-r { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.pl-btn, .pfo-btn-top { display: inline-flex; align-items: center; gap: 7px; color: var(--pf-tx); text-decoration: none; font: inherit; font-size: .78rem; font-weight: 800; padding: 7px 13px; border: 1px solid var(--pf-bd); border-radius: 999px; background: var(--pf-card); cursor: pointer; transition: background .2s, transform .2s, border-color .2s, box-shadow .2s; }
.pl-btn:hover, .pfo-btn-top:hover { background: var(--pf-hov); border-color: var(--pf-az); transform: translateY(-1px); box-shadow: 0 6px 16px -8px rgba(2, 132, 199, .5); }
.pl-btn:active, .pfo-btn-top:active { transform: scale(.96); }
@media (max-width: 760px) { .pfo-btn-top .lbl, .pl-btn .lbl { display: none; } }
.pfo-main { max-width: 1040px; margin: 0 auto; padding: 22px 16px 80px; }
.pfo-cargando { text-align: center; color: var(--pf-mut); padding: 80px 0; }
.pfo-spin { display: inline-block; width: 16px; height: 16px; border: 3px solid var(--pf-bd); border-top-color: var(--pf-az); border-radius: 50%; animation: pfSpin .8s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes pfSpin { to { transform: rotate(360deg); } }

/* ---- entrada escalonada (revelado al aparecer) ---- */
.pfo-rv-w { opacity: 0; transform: translateY(16px); }
.pfo-rv-w.in { opacity: 1; transform: none; transition: opacity .55s var(--mi-ease), transform .55s var(--mi-ease); transition-delay: calc(var(--d, 0) * 70ms); }

/* ---- portada ---- */
.pfo-hero { position: relative; overflow: hidden; border-radius: 24px; padding: clamp(26px, 5vw, 42px) clamp(20px, 4vw, 34px); border: 1px solid rgba(245, 158, 11, .5); color: #fff; background: linear-gradient(135deg, #0f2a5c 0%, #1e3a8a 55%, #4c1d95 120%); box-shadow: 0 26px 60px -30px rgba(30, 58, 138, .8); animation: pfIn .6s var(--mi-ease); }
.pfo-hero::after { content: ''; position: absolute; inset: -40% -10% auto auto; width: 460px; height: 460px; background: radial-gradient(circle, rgba(251, 191, 36, .28), transparent 65%); pointer-events: none; animation: pfOrbe 7s ease-in-out infinite alternate; }
@keyframes pfOrbe { to { transform: translate(-30px, 24px) scale(1.12); } }
.pfo-hero > * { position: relative; z-index: 1; }
.pfo-hero-deco { position: absolute !important; inset: 0; z-index: 0 !important; pointer-events: none; overflow: hidden; }
.pfo-hero-deco i { position: absolute; font-style: normal; opacity: .22; animation: pfFlota var(--t, 7s) ease-in-out infinite; animation-delay: var(--w, 0s); }
@keyframes pfFlota { 0%, 100% { transform: translateY(0) rotate(var(--r0, -8deg)); } 50% { transform: translateY(-16px) rotate(var(--r1, 8deg)); } }
.pfo-ecg { position: absolute !important; left: 0; right: 0; bottom: 0; width: 100%; height: 56px; opacity: .35; z-index: 0 !important; pointer-events: none; }
.pfo-ecg path { fill: none; stroke: #fbbf24; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 900; stroke-dashoffset: 900; animation: pfEcg 4.5s linear infinite; }
@keyframes pfEcg { 0% { stroke-dashoffset: 900; } 55%, 100% { stroke-dashoffset: 0; } }
.pfo-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #fde68a; background: rgba(251, 191, 36, .14); border: 1px solid rgba(251, 191, 36, .45); padding: 5px 12px; border-radius: 999px; }
.pfo-hero h1 { margin: 14px 0 6px; font-size: clamp(1.8rem, 4.6vw, 2.8rem); line-height: 1.1; color: #fff; }
.pfo-hero h1 em { font-style: normal; background: linear-gradient(90deg, #fde68a, #f59e0b, #fde68a); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: pfBrillo 5s linear infinite; }
@keyframes pfBrillo { to { background-position: 200% 0; } }
.pfo-hero p { max-width: 64ch; color: #dbe7fb; line-height: 1.65; margin: 8px 0; }
.pfo-hero .mot { font-style: italic; color: #e9d5ff; border-left: 3px solid #f59e0b; padding-left: 12px; margin-top: 14px; }
.pfo-hero-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.pfo-hero-stats span { font-size: .78rem; font-weight: 800; padding: 7px 13px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); color: #fff; transition: transform .25s, background .25s; }
.pfo-hero-stats span:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .18); }
.pfo-sec { margin-top: 28px; }
.pfo-sec > h2 { font-size: 1.08rem; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.pfo-pasos { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; counter-reset: p; }
.pfo-paso { position: relative; background: var(--pf-card); border: 1px solid var(--pf-bd); border-radius: 16px; padding: 16px 14px 14px 54px; font-size: .88rem; line-height: 1.5; color: var(--pf-tx); counter-increment: p; box-shadow: var(--pf-sh); transition: transform .28s var(--mi-ease), border-color .25s, box-shadow .25s; }
.pfo-paso:hover { transform: translateY(-4px); border-color: var(--pf-gold); }
.pfo-paso::before { content: counter(p); position: absolute; left: 14px; top: 14px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #1c1917; background: linear-gradient(135deg, #fde68a, #f59e0b); transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.pfo-paso:hover::before { transform: scale(1.18) rotate(-8deg); }
.pfo-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.pfo-info-c { background: var(--pf-card); border: 1px solid var(--pf-bd); border-radius: 18px; padding: 18px 18px 16px; box-shadow: var(--pf-sh); transition: transform .28s var(--mi-ease), border-color .25s, box-shadow .25s; }
.pfo-info-c:hover { transform: translateY(-4px); border-color: var(--pf-az); }
.pfo-info-c h3 { margin: 0 0 8px; font-size: 1rem; display: flex; align-items: center; gap: 9px; }
.pfo-info-c h3 .ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; font-size: 1.1rem; background: var(--pf-hov); transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.pfo-info-c:hover h3 .ic { transform: scale(1.18) rotate(-6deg); }
.pfo-info-c p, .pfo-info-c li { font-size: .86rem; line-height: 1.55; color: var(--pf-tx); margin: 6px 0; }
.pfo-info-c ul { margin: 6px 0 0; padding-left: 18px; } .pfo-info-c li::marker { color: var(--pf-gold); }
.pfo-info-c .nota { font-size: .78rem; color: var(--pf-mut); font-style: italic; }
.pfo-est { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.pfo-est-c { position: relative; background: var(--pf-card); border: 1px solid var(--pf-bd); border-radius: 16px; padding: 16px; box-shadow: var(--pf-sh); transition: transform .28s var(--mi-ease), border-color .25s, box-shadow .25s; }
.pfo-est-c:hover { transform: translateY(-5px); border-color: var(--pf-az); box-shadow: 0 18px 34px -18px rgba(2, 132, 199, .55); }
.pfo-est-c .ic { font-size: 1.8rem; display: inline-block; transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); } .pfo-est-c:hover .ic { transform: scale(1.2) rotate(-6deg); }
.pfo-est-c h3 { margin: 6px 0 4px; font-size: .98rem; } .pfo-est-c p { margin: 0; font-size: .82rem; color: var(--pf-mut); line-height: 1.45; }
.pfo-est-c .n { float: right; font-size: .7rem; font-weight: 800; color: var(--pf-or); background: rgba(245, 158, 11, .12); padding: 2px 8px; border-radius: 999px; }
.pfo-reglas { background: var(--pf-card); border: 1px solid var(--pf-bd); border-radius: 16px; padding: 14px 18px 14px 36px; margin: 0; box-shadow: var(--pf-sh); }
.pfo-reglas li { margin: 8px 0; font-size: .88rem; line-height: 1.5; } .pfo-reglas li::marker { color: var(--pf-gold); }
.pfo-aviso { margin-top: 12px; font-size: .84rem; padding: 12px 14px; border-radius: 12px; line-height: 1.55; }
.pfo-aviso.apr { background: rgba(22, 163, 74, .1); border: 1px solid rgba(22, 163, 74, .4); color: var(--pf-ok); font-weight: 600; }
body.pfo:not(.dark-mode) .pfo-aviso.apr { color: #166534; }
.pfo-aviso.inf { background: var(--pf-in); border: 1px solid var(--pf-in-bd); color: var(--pf-in-tx); }
.pfo-aviso.bor { background: rgba(245, 158, 11, .1); border: 1px dashed rgba(245, 158, 11, .6); color: var(--pf-or); }
.pfo-cta { margin-top: 28px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 28px 18px; border-radius: 22px; background: linear-gradient(135deg, rgba(2, 132, 199, .1), rgba(124, 58, 237, .1)); border: 1px solid var(--pf-bd); position: relative; overflow: hidden; }
.pfo-cta h2 { margin: 0; }
.pfo-btn { appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 800; padding: 13px 26px; border-radius: 14px; color: #1c1917; background: linear-gradient(135deg, #fde68a, #f59e0b); box-shadow: 0 12px 28px -12px rgba(245, 158, 11, .85); transition: transform .2s, box-shadow .2s, filter .2s; text-decoration: none; display: inline-block; position: relative; overflow: hidden; }
.pfo-btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 16px 32px -12px rgba(245, 158, 11, .9); } .pfo-btn:active:not(:disabled) { transform: scale(.97); }
.pfo-btn:disabled { opacity: .5; cursor: not-allowed; filter: grayscale(.4); }
.pfo-btn.sec { color: var(--pf-tx); background: var(--pf-card); border: 1px solid var(--pf-bd); box-shadow: none; }
.pfo-btn.pulso:not(:disabled) { animation: pfPulso 2.2s ease-in-out infinite; }
@keyframes pfPulso { 0%, 100% { box-shadow: 0 12px 28px -12px rgba(245, 158, 11, .85), 0 0 0 0 rgba(245, 158, 11, .45); } 50% { box-shadow: 0 12px 28px -12px rgba(245, 158, 11, .85), 0 0 0 12px rgba(245, 158, 11, 0); } }
.pfo-cta small { color: var(--pf-mut); max-width: 58ch; line-height: 1.5; }
.pfo-link { background: none; border: 0; color: var(--pf-mut); cursor: pointer; font: inherit; font-size: .8rem; text-decoration: underline; }
.pfo-trat { display: inline-flex; gap: 6px; padding: 4px; border-radius: 999px; background: var(--pf-card); border: 1px solid var(--pf-bd); }
.pfo-trat button { appearance: none; border: 0; cursor: pointer; font: inherit; font-size: .84rem; font-weight: 800; padding: 8px 16px; border-radius: 999px; color: var(--pf-tx); background: transparent; transition: background .2s, transform .2s, color .2s, box-shadow .2s; }
.pfo-trat button:hover { background: var(--pf-hov); transform: translateY(-1px); }
.pfo-trat button.on { color: #1c1917; background: linear-gradient(135deg, #fde68a, #f59e0b); box-shadow: 0 6px 16px -6px rgba(245, 158, 11, .8); animation: pfPop2 .4s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes pfPop2 { from { transform: scale(.85); } }
.pfo-trat-t { font-size: .8rem; font-weight: 700; color: var(--pf-mut); }
.pfo-hist { display: grid; gap: 8px; } .pfo-hist-i { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--pf-card); border: 1px solid var(--pf-bd); border-radius: 12px; font-size: .84rem; transition: transform .2s; } .pfo-hist-i:hover { transform: translateX(3px); }
.pfo-hist-i b.ok { color: var(--pf-ok); } .pfo-hist-i b.mal { color: var(--pf-mal); }

/* ---- examen ---- */
.pfo-bar { position: sticky; top: 58px; z-index: 15; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; background: var(--pf-top); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--pf-bd); border-radius: 14px; margin-bottom: 12px; box-shadow: var(--pf-sh); animation: pfIn .4s var(--mi-ease); }
.pfo-bar .est { font-weight: 800; font-size: .92rem; } .pfo-bar .est small { display: block; color: var(--pf-mut); font-weight: 600; font-size: .72rem; }
.pfo-puntos { display: flex; gap: 6px; margin-left: auto; } .pfo-puntos i { width: 26px; height: 7px; border-radius: 99px; background: rgba(148, 163, 184, .35); transition: background .3s, transform .3s; } .pfo-puntos i.hecha { background: var(--pf-ok); } .pfo-puntos i.act { background: var(--pf-gold); transform: scaleY(1.5); animation: pfLate 1.8s ease-in-out infinite; }
.pfo-timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.05rem; padding: 6px 12px; border-radius: 10px; background: var(--pf-in); border: 1px solid var(--pf-in-bd); color: var(--pf-in-tx); transition: background .3s, color .3s, border-color .3s; }
.pfo-timer.poco { color: #92400e; border-color: rgba(245, 158, 11, .7); background: rgba(245, 158, 11, .14); }
.pfo-timer.urge { color: #991b1b; border-color: rgba(220, 38, 38, .7); background: rgba(220, 38, 38, .12); animation: pfLate .9s ease-in-out infinite; }
body.pfo.dark-mode .pfo-timer.poco { color: #fde68a; } body.pfo.dark-mode .pfo-timer.urge { color: #fecaca; }
@keyframes pfLate { 50% { transform: scale(1.06); } }
.pfo-turnos { font-size: .78rem; color: var(--pf-mut); font-weight: 700; }
.pfo-bar .pfo-btn-doc { margin-left: 4px; }
.pfo-docs { position: relative; }
.pfo-docs-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 250px; background: var(--pf-card); border: 1px solid var(--pf-bd); border-radius: 14px; padding: 6px; box-shadow: 0 18px 40px -16px rgba(15, 23, 42, .45); animation: pfPop3 .25s var(--mi-ease); transform-origin: top right; }
@keyframes pfPop3 { from { opacity: 0; transform: scale(.92) translateY(-6px); } }
.pfo-docs-menu button { display: flex; width: 100%; align-items: center; gap: 10px; text-align: left; border: 0; background: transparent; color: var(--pf-tx); font: inherit; font-size: .84rem; font-weight: 700; padding: 10px 12px; border-radius: 10px; cursor: pointer; transition: background .2s, transform .2s; }
.pfo-docs-menu button:hover:not(:disabled) { background: var(--pf-hov); transform: translateX(3px); } .pfo-docs-menu button:disabled { opacity: .5; cursor: default; }
.pfo-docs-menu small { display: block; font-weight: 600; color: var(--pf-mut); font-size: .72rem; }
.pfo-chat { background: var(--pf-card); border: 1px solid var(--pf-bd); border-radius: 18px; padding: 14px; min-height: 340px; max-height: 58vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; box-shadow: var(--pf-sh); }
.pfo-msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: .92rem; line-height: 1.5; white-space: pre-wrap; animation: pfBurbuja .35s var(--mi-ease); }
@keyframes pfBurbuja { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes pfIn { from { opacity: 0; transform: translateY(10px); } }
.pfo-msg.ia { align-self: flex-start; background: var(--pf-card2); border: 1px solid var(--pf-bd); border-bottom-left-radius: 4px; }
.pfo-msg.ia.ev { background: var(--pf-in); border-color: var(--pf-in-bd); color: var(--pf-in-tx); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .86rem; }
.pfo-msg.yo { align-self: flex-end; background: linear-gradient(135deg, #1d4ed8, #2563eb); color: #fff; border-bottom-right-radius: 4px; box-shadow: 0 8px 18px -10px rgba(37, 99, 235, .8); }
.pfo-msg.sis { align-self: center; max-width: 94%; background: rgba(245, 158, 11, .1); border: 1px dashed rgba(245, 158, 11, .6); color: var(--pf-or); font-size: .84rem; text-align: center; }
.pfo-pensando { align-self: flex-start; display: inline-flex; gap: 5px; padding: 12px 16px; border-radius: 16px; background: var(--pf-card2); border: 1px solid var(--pf-bd); animation: pfBurbuja .3s var(--mi-ease); }
.pfo-pensando i { width: 7px; height: 7px; border-radius: 50%; background: var(--pf-mut); animation: pfPunto 1.2s ease-in-out infinite; } .pfo-pensando i:nth-child(2) { animation-delay: .15s; } .pfo-pensando i:nth-child(3) { animation-delay: .3s; }
@keyframes pfPunto { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-6px); opacity: 1; } }
.pfo-in { display: flex; gap: 10px; margin-top: 12px; align-items: flex-end; }
.pfo-in textarea, .pfo-proc textarea { flex: 1; width: 100%; resize: vertical; min-height: 56px; max-height: 220px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--pf-bd); background: var(--pf-card); color: var(--pf-tx); font: inherit; font-size: .92rem; transition: border-color .2s, box-shadow .2s; }
.pfo-in textarea:focus, .pfo-proc textarea:focus { outline: none; border-color: var(--pf-az); box-shadow: 0 0 0 4px rgba(2, 132, 199, .18); }
.pfo-acc { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.pfo-acc small { color: var(--pf-mut); }
body.ei-protegido #pfo-main { -webkit-user-select: none; user-select: none; } body.ei-protegido #pfo-main textarea { -webkit-user-select: text; user-select: text; }

/* ---- documentos (recetario embebido) ---- */
.pfo-ov { position: fixed; inset: 0; z-index: 9800; background: rgba(2, 6, 23, .82); display: flex; flex-direction: column; padding: 10px; gap: 8px; animation: pfFade .25s ease-out; }
@keyframes pfFade { from { opacity: 0; } }
.pfo-ov-h { color: #e2e8f0; font-weight: 800; font-size: .9rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .pfo-ov-h small { font-weight: 600; color: #94a3b8; font-size: .78rem; }
.pfo-ov iframe { flex: 1; border: 0; border-radius: 14px; background: #fff; width: 100%; animation: pfPop3 .35s var(--mi-ease); }

/* ---- procedimiento escrito ---- */
.pfo-proc { background: var(--pf-card); border: 1px solid var(--pf-bd); border-radius: 22px; padding: clamp(18px, 3vw, 28px); box-shadow: var(--pf-sh); animation: pfIn .5s var(--mi-ease); }
.pfo-proc-h { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pfo-proc-h .ic { font-size: 2.2rem; animation: pfFlota 4s ease-in-out infinite; }
.pfo-proc-h h2 { margin: 0; font-size: 1.2rem; } .pfo-proc-h small { color: var(--pf-mut); display: block; font-weight: 600; }
.pfo-proc-h .pfo-timer { margin-left: auto; }
.pfo-proc p { color: var(--pf-mut); font-size: .88rem; line-height: 1.55; }
.pfo-proc textarea { min-height: 260px; margin-top: 8px; }
.pfo-proc-f { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 12px; flex-wrap: wrap; } .pfo-proc-f small { color: var(--pf-mut); }

/* ---- transición entre estaciones ---- */
.pfo-trans { text-align: center; padding: 40px 18px; background: var(--pf-card); border: 1px solid var(--pf-bd); border-radius: 24px; animation: pfIn .5s var(--mi-ease); box-shadow: var(--pf-sh); }
.pfo-trans .ic { font-size: 3rem; display: inline-block; } .pfo-trans h2 { margin: 10px 0 6px; } .pfo-trans p { color: var(--pf-mut); max-width: 56ch; margin: 6px auto; line-height: 1.55; }
.pfo-tick { width: 76px; height: 76px; margin: 0 auto 6px; border-radius: 50%; background: linear-gradient(135deg, #22c55e, #16a34a); display: grid; place-items: center; box-shadow: 0 14px 30px -10px rgba(22, 163, 74, .7); animation: pfPop .6s cubic-bezier(.2, .9, .3, 1.4); }
.pfo-tick svg { width: 40px; height: 40px; fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: pfTrazo .5s ease-out .35s forwards; }
@keyframes pfTrazo { to { stroke-dashoffset: 0; } }
.pfo-riel { display: flex; justify-content: center; gap: 8px; margin: 18px 0 8px; flex-wrap: wrap; }
.pfo-riel i { font-style: normal; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--pf-card2); border: 2px solid var(--pf-bd); font-size: 1.05rem; transition: transform .3s; }
.pfo-riel i.hecha { border-color: var(--pf-ok); background: rgba(22, 163, 74, .12); } .pfo-riel i.sig { border-color: var(--pf-gold); transform: scale(1.18); animation: pfLate 1.6s ease-in-out infinite; }

/* ---- corrección en segundo plano y paso entre estaciones ---- */
.pfo-bg { margin: 12px auto 14px; display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; color: var(--pf-mut); padding: 7px 14px; border-radius: 999px; background: var(--pf-card2); border: 1px solid var(--pf-bd); } .pfo-bg:empty { display: none; }
.pfo-barra-c { width: min(320px, 80%); height: 8px; margin: 16px auto 8px; border-radius: 99px; background: rgba(148, 163, 184, .3); overflow: hidden; } .pfo-barra-c b { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #38bdf8, #f59e0b); transition: width .6s var(--mi-ease); }
.pfo-wipe { position: fixed; inset: 0; z-index: 9950; display: grid; place-items: center; background: linear-gradient(135deg, #0f2a5c, #1e3a8a 55%, #4c1d95); animation: pfWipeIn .55s cubic-bezier(.77, 0, .18, 1) forwards; }
.pfo-wipe.sale { animation: pfWipeOut .6s cubic-bezier(.77, 0, .18, 1) forwards; }
@keyframes pfWipeIn { from { transform: translateX(100%); } to { transform: none; } }
@keyframes pfWipeOut { from { transform: none; opacity: 1; } to { transform: translateX(-100%); opacity: 0; } }
.pfo-wipe-c { text-align: center; color: #fff; padding: 20px; } .pfo-wipe-c .ic { font-size: clamp(4rem, 14vw, 6.5rem); display: inline-block; animation: pfPop .7s cubic-bezier(.2, .9, .3, 1.4) .25s backwards; filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .4)); }
.pfo-wipe-c small { display: block; margin-top: 10px; letter-spacing: .3em; text-transform: uppercase; font-weight: 800; color: #fde68a; animation: pfIn .5s ease .4s backwards; } .pfo-wipe-c h2 { margin: 6px 0 0; font-size: clamp(1.5rem, 5vw, 2.4rem); animation: pfIn .5s ease .5s backwards; }
.pfo-wipe-b { width: 160px; height: 4px; margin: 20px auto 0; border-radius: 4px; background: rgba(255, 255, 255, .2); overflow: hidden; } .pfo-wipe-b b { display: block; height: 100%; background: linear-gradient(90deg, #fde68a, #f59e0b); animation: pfCarga .9s ease-in-out .5s backwards; transform-origin: left; } @keyframes pfCarga { from { transform: scaleX(0); } }

/* ---- resultado final ---- */
.pfo-fin { position: relative; text-align: center; border-radius: 26px; padding: clamp(28px, 5vw, 44px) 20px; border: 1px solid var(--pf-bd); background: var(--pf-card); overflow: hidden; box-shadow: var(--pf-sh); }
.pfo-fin > * { position: relative; z-index: 1; }
.pfo-fin.ok { color: #fff; border-color: rgba(245, 158, 11, .7); background: linear-gradient(160deg, #0f2a5c, #2c2566 70%, #5b2a1f 150%); box-shadow: 0 30px 70px -30px rgba(245, 158, 11, .7); }
.pfo-fin.ok::before { content: ''; position: absolute; left: 50%; top: 22%; width: 900px; height: 900px; margin: -450px 0 0 -450px; background: repeating-conic-gradient(from 0deg, rgba(251, 191, 36, .16) 0 8deg, transparent 8deg 20deg); border-radius: 50%; -webkit-mask: radial-gradient(circle, #000 0 28%, transparent 62%); mask: radial-gradient(circle, #000 0 28%, transparent 62%); animation: pfRayos 40s linear infinite; z-index: 0; }
@keyframes pfRayos { to { transform: rotate(360deg); } }
.pfo-fin.no { background: linear-gradient(160deg, var(--pf-card), var(--pf-card2)); }
.pfo-fin.no::before { content: ''; position: absolute; inset: auto -10% -60% -10%; height: 70%; background: radial-gradient(ellipse at 50% 100%, rgba(245, 158, 11, .25), transparent 65%); animation: pfOrbe 6s ease-in-out infinite alternate; z-index: 0; }
.pfo-fin.rev { background: linear-gradient(160deg, var(--pf-card), var(--pf-card2)); border-color: rgba(220, 38, 38, .5); }
.pfo-fin .medal { font-size: 4.4rem; display: inline-block; animation: pfPop .9s cubic-bezier(.2, .9, .3, 1.4), pfFlota 4s ease-in-out 1s infinite; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .35)); }
@keyframes pfPop { from { transform: scale(.2) rotate(-25deg); opacity: 0; } }
.pfo-fin h1 { margin: 8px 0 2px; font-size: clamp(1.7rem, 4.6vw, 2.6rem); animation: pfIn .7s var(--mi-ease) .2s backwards; }
.pfo-fin.ok h1 { background: linear-gradient(90deg, #fde68a, #f59e0b, #fff7d6, #f59e0b, #fde68a); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: pfBrillo 4s linear infinite; }
.pfo-fin .quien { font-size: 1.15rem; font-weight: 800; margin: 2px 0 8px; color: #fde68a; animation: pfIn .7s var(--mi-ease) .35s backwards; }
.pfo-fin p { max-width: 62ch; margin: 8px auto; color: var(--pf-mut); line-height: 1.65; animation: pfIn .7s var(--mi-ease) .5s backwards; }
.pfo-fin.ok p { color: #dbe7fb; }
.pfo-nota { font-size: clamp(3rem, 10vw, 5rem); font-weight: 800; line-height: 1; margin: 14px 0 2px; animation: pfPop .8s cubic-bezier(.2, .9, .3, 1.3) .3s backwards; } .pfo-nota small { font-size: .3em; color: var(--pf-mut); }
.pfo-fin.ok .pfo-nota small { color: #cbd5e1; }
.pfo-fin .sub { color: var(--pf-mut); font-weight: 700; } .pfo-fin.ok .sub { color: #cbd5e1; }
.pfo-pil { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; } .pfo-pil span { font-size: .74rem; padding: 4px 10px; border-radius: 999px; background: rgba(148, 163, 184, .16); border: 1px solid var(--pf-bd); }
.pfo-tabla { display: grid; gap: 8px; margin-top: 18px; text-align: left; }
.pfo-fila { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; background: var(--pf-card); color: var(--pf-tx); border: 1px solid var(--pf-bd); border-radius: 12px; padding: 10px 14px; animation: pfIn .5s var(--mi-ease) backwards; animation-delay: calc(var(--d, 0) * 90ms + .5s); transition: transform .2s; } .pfo-fila:hover { transform: translateX(4px); }
.pfo-fila b.n { font-size: 1.1rem; }
.pfo-reforzar { margin-top: 16px; text-align: left; padding: 14px 16px; border-radius: 14px; background: rgba(245, 158, 11, .1); border: 1px dashed rgba(245, 158, 11, .6); font-size: .86rem; line-height: 1.55; color: var(--pf-tx); } .pfo-reforzar ul { margin: 6px 0 0; padding-left: 18px; }
.pfo-det { margin-top: 14px; text-align: left; background: var(--pf-card); border: 1px solid var(--pf-bd); border-radius: 16px; padding: 4px 16px 14px; box-shadow: var(--pf-sh); }
.pfo-det summary { cursor: pointer; font-weight: 800; padding: 12px 0; }
.pfo-rv { border: 1px solid var(--pf-bd); border-left: 4px solid var(--pf-mut); border-radius: 10px; padding: 10px 12px; margin-top: 8px; background: var(--pf-card2); font-size: .86rem; line-height: 1.5; }
.pfo-rv .h { display: flex; justify-content: space-between; gap: 8px; font-weight: 800; }
.pfo-mod { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--pf-in); border: 1px dashed var(--pf-az); font-size: .86rem; line-height: 1.5; }
.pfo-img { margin-bottom: 12px; background: var(--pf-card); border: 1px solid var(--pf-bd); border-radius: 14px; padding: 4px 14px 12px; } .pfo-img summary { cursor: pointer; font-weight: 800; padding: 10px 0; font-size: .9rem; } .pfo-img img { display: block; max-width: min(520px, 100%); max-height: 46vh; margin: 0 auto; border-radius: 10px; border: 1px solid var(--pf-bd); background: #000; }

/* ---- celebración (togas, birretes y confeti) ---- */
.pfo-conf { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.pfo-cel { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.pfo-cel i { position: absolute; font-style: normal; left: 0; top: 0; will-change: transform; line-height: 1; }
.pfo-cel i.cae { animation: pfCae var(--t, 6s) linear forwards; }
.pfo-cel i.lanza { animation: pfLanza var(--t, 3.4s) cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes pfCae { from { transform: translate3d(var(--x), -12vh, 0) rotate(0deg); opacity: 1; } to { transform: translate3d(calc(var(--x) + var(--dx)), 112vh, 0) rotate(var(--r)); opacity: 1; } }
@keyframes pfLanza { 0% { transform: translate3d(var(--x), 104vh, 0) rotate(0deg); opacity: 0; } 8% { opacity: 1; } 45% { transform: translate3d(calc(var(--x) + var(--dx) * .5), var(--h), 0) rotate(calc(var(--r) * .55)); } 100% { transform: translate3d(calc(var(--x) + var(--dx)), 112vh, 0) rotate(var(--r)); opacity: 1; } }

/* ---- aviso ---- */
.pfo-toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); background: #0f172a; color: #fff; padding: 10px 16px; border-radius: 999px; font-size: .84rem; font-weight: 700; opacity: 0; pointer-events: none; transition: .25s; z-index: 9900; border: 1px solid rgba(255, 255, 255, .15); } .pfo-toast.on { opacity: 1; transform: translate(-50%, 0); }
.mi-rip-host { position: relative; overflow: hidden; }
.pfo :where(a, button, textarea):focus-visible { outline: 2px solid var(--pf-az); outline-offset: 2px; }
@media (max-width: 640px) { .pfo-hero { padding: 24px 18px; } .pfo-msg { max-width: 94%; } .pfo-puntos { margin-left: 0; width: 100%; } .pfo-bar { top: 54px; } .pfo-info { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .pfo *, .pfo-cel i { animation: none !important; transition: none !important; } .pfo-rv-w { opacity: 1; transform: none; } .pfo-cel, .pfo-hero-deco { display: none; } }

/* =====================  PORTADA RENOVADA: héroe compacto, modos, mosaicos desplegables y ventanas  ===================== */
.pfo-hero { padding: clamp(18px, 3vw, 26px) clamp(18px, 3vw, 28px); border-radius: 20px; }
.pfo-hero h1 { margin: 10px 0 2px; font-size: clamp(1.7rem, 3.6vw, 2.3rem); }
.pfo-hero .sub { margin: 0; font-size: .95rem; color: #dbe7fb; font-weight: 600; }
.pfo-hero-stats { margin-top: 14px; gap: 8px; } .pfo-hero-stats span { padding: 5px 11px; font-size: .74rem; }
.pfo-ecg { height: 40px; }
.pfo-chip.plus { color: #f3e8ff; background: rgba(168, 85, 247, .26); border-color: rgba(216, 180, 254, .6); }
.pfo-plus-t { color: #a855f7; } body.pfo.dark-mode .pfo-plus-t, body.pfo.tema-premium .pfo-plus-t { color: #c084fc; }
.pfo-btn.plus { color: #fff; background: linear-gradient(135deg, #7e22ce, #a855f7 60%, #6366f1); box-shadow: 0 12px 28px -12px rgba(168, 85, 247, .8); }
.pfo-modos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 18px; }
.pfo-modo { position: relative; overflow: hidden; text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 16px; border-radius: 20px; border: 1px solid var(--pf-bd); background: var(--pf-card); color: var(--pf-tx); font: inherit; cursor: pointer; box-shadow: var(--pf-sh); transition: transform .3s var(--mi-ease), box-shadow .3s, border-color .25s; }
.pfo-modo::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--g); }
.pfo-modo.exam { --g: linear-gradient(90deg, #f59e0b, #fde68a); } .pfo-modo.prac { --g: linear-gradient(90deg, #7c3aed, #38bdf8); } .pfo-modo.real { --g: linear-gradient(90deg, #0284c7, #22c55e); }
.pfo-modo:hover:not(:disabled) { transform: translateY(-6px); box-shadow: 0 22px 40px -20px rgba(15, 23, 42, .45); border-color: var(--pf-az); } .pfo-modo:active:not(:disabled) { transform: translateY(-1px) scale(.985); }
.pfo-modo:disabled { opacity: .55; cursor: not-allowed; }
.pfo-modo .ic { font-size: 2rem; display: inline-block; transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); } .pfo-modo:hover:not(:disabled) .ic { transform: scale(1.18) rotate(-6deg); }
.pfo-modo b { font-size: 1.02rem; } .pfo-modo small { color: var(--pf-mut); font-size: .82rem; line-height: 1.45; flex: 1; }
.pfo-modo .go { margin-top: 6px; font-weight: 800; font-size: .82rem; color: var(--pf-az); } .pfo-modo .go i { display: inline-block; font-style: normal; transition: transform .25s; } .pfo-modo:hover .go i { transform: translateX(5px); }
.pfo-resume { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding: 14px 18px; border-radius: 16px; background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .5); }
.pfo-resume .ic { font-size: 1.6rem; } .pfo-resume div { flex: 1; min-width: 180px; } .pfo-resume small { display: block; color: var(--pf-mut); }
.pfo-acords { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px 14px; align-items: start; }
.pfo-acord { background: var(--pf-card); border: 1px solid var(--pf-bd); border-radius: 16px; box-shadow: var(--pf-sh); overflow: hidden; transition: border-color .25s, box-shadow .25s; }
.pfo-acord:hover, .pfo-acord.abierto { border-color: var(--pf-az); }
.pfo-acord-h { width: 100%; display: flex; align-items: center; gap: 11px; padding: 13px 16px; border: 0; background: transparent; color: var(--pf-tx); font: inherit; font-weight: 800; font-size: .94rem; text-align: left; cursor: pointer; }
.pfo-acord-h .ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--pf-hov); font-size: 1.1rem; flex: none; transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); } .pfo-acord-h:hover .ic { transform: scale(1.12) rotate(-5deg); }
.pfo-acord-h .t { flex: 1; }
.pfo-acord-h .chev { width: 9px; height: 9px; border-right: 2.5px solid var(--pf-mut); border-bottom: 2.5px solid var(--pf-mut); transform: rotate(45deg); transition: transform .3s var(--mi-ease); flex: none; margin-right: 4px; }
.pfo-acord.abierto .chev { transform: rotate(-135deg); }
.pfo-acord-b { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .38s var(--mi-ease); } .pfo-acord.abierto .pfo-acord-b { grid-template-rows: 1fr; }
.pfo-acord-b .in { overflow: hidden; padding: 0 16px; } .pfo-acord.abierto .pfo-acord-b .in { padding: 0 16px 14px; }
.pfo-acord-b p, .pfo-acord-b li { font-size: .86rem; line-height: 1.55; margin: 6px 0; } .pfo-acord-b ul { margin: 4px 0 0; padding-left: 18px; } .pfo-acord-b li::marker { color: var(--pf-gold); }
.pfo-acord-b h4 { margin: 12px 0 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--pf-mut); } .pfo-acord-b .nota { color: var(--pf-mut); font-style: italic; font-size: .78rem; }
.pfo-acord-b ul.temas li { margin: 5px 0; } .pfo-acord-b ul.temas b { color: var(--pf-az); }
.pfo-casos { display: flex; flex-wrap: wrap; gap: 6px; } .pfo-casos span { font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--pf-card2); border: 1px solid var(--pf-bd); color: var(--pf-mut); transition: transform .2s, color .2s, border-color .2s; } .pfo-casos span:hover { transform: translateY(-2px); color: var(--pf-tx); border-color: var(--pf-az); }
/* ventanas */
.pfo-modal { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 14px; background: rgba(2, 6, 23, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: pfFade .22s ease-out; }
.pfo-modal.sale { opacity: 0; transition: opacity .2s; }
.pfo-modal-c { position: relative; width: min(560px, 100%); max-height: calc(100vh - 28px); display: flex; flex-direction: column; background: var(--pf-card); color: var(--pf-tx); border: 1px solid var(--pf-bd); border-radius: 22px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7); animation: pfPop3 .35s var(--mi-ease); transform-origin: center; }
.pfo-modal-c.ancho { width: min(760px, 100%); }
.pfo-modal-x { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--pf-bd); background: var(--pf-card2); color: var(--pf-tx); font-size: 1.3rem; line-height: 1; cursor: pointer; transition: transform .25s, background .2s; z-index: 2; } .pfo-modal-x:hover { transform: rotate(90deg); background: var(--pf-hov); }
.pfo-modal-h { display: flex; align-items: center; gap: 14px; padding: 20px 56px 14px 22px; border-bottom: 1px solid var(--pf-bd); }
.pfo-modal-h .ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; font-size: 1.6rem; background: linear-gradient(135deg, rgba(245, 158, 11, .25), rgba(124, 58, 237, .2)); animation: pfFlota 4s ease-in-out infinite; }
.pfo-modal-h h2 { margin: 0; font-size: 1.15rem; } .pfo-modal-h small { color: var(--pf-mut); font-weight: 600; }
.pfo-modal-b { padding: 14px 22px; overflow-y: auto; display: grid; gap: 12px; }
.pfo-modal-f { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--pf-bd); flex-wrap: wrap; }
.pfo-bloque { padding: 12px 14px; border-radius: 14px; background: var(--pf-card2); border: 1px solid var(--pf-bd); animation: pfIn .45s var(--mi-ease) backwards; } .pfo-bloque:nth-child(2) { animation-delay: .06s; } .pfo-bloque:nth-child(3) { animation-delay: .12s; } .pfo-bloque:nth-child(4) { animation-delay: .18s; } .pfo-bloque:nth-child(5) { animation-delay: .24s; }
.pfo-bloque h3 { margin: 0 0 6px; font-size: .94rem; } .pfo-bloque p, .pfo-bloque li { font-size: .85rem; line-height: 1.55; margin: 5px 0; } .pfo-bloque ul { margin: 4px 0 0; padding-left: 18px; } .pfo-bloque li::marker { color: var(--pf-gold); }
.pfo-bloque.ia { border-color: rgba(124, 58, 237, .45); background: linear-gradient(135deg, rgba(124, 58, 237, .1), var(--pf-card2)); }
.pfo-bloque.machete { border-color: rgba(245, 158, 11, .6); background: rgba(245, 158, 11, .08); }
.pfo-bloque.nika { border-color: rgba(168, 85, 247, .5); background: linear-gradient(135deg, rgba(168, 85, 247, .12), var(--pf-card2)); }
.pfo-mes { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0; } .pfo-mes span { padding: 7px 16px; border-radius: 999px; font-weight: 800; font-size: .84rem; background: linear-gradient(135deg, #fde68a, #f59e0b); color: #1c1917; animation: pfPop2 .45s cubic-bezier(.34, 1.56, .64, 1) backwards; animation-delay: calc(var(--d) * 90ms + .2s); }
.pfo-camino { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .pfo-camino span { padding: 8px 12px; border-radius: 12px; background: var(--pf-card); border: 1px solid var(--pf-bd); font-weight: 700; font-size: .8rem; } .pfo-camino i { font-style: normal; color: var(--pf-gold); font-weight: 800; }
.pfo-ok { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 2px dashed rgba(245, 158, 11, .6); font-size: .86rem; font-weight: 700; cursor: pointer; } .pfo-ok input { width: 19px; height: 19px; margin-top: 1px; accent-color: #f59e0b; flex: none; }
.pfo-modal .pfo-trat { margin-top: 2px; }
/* práctica */
.pfo-pr-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .pfo-chipb { border: 1px solid var(--pf-bd); background: var(--pf-card2); color: var(--pf-tx); font: inherit; font-size: .78rem; font-weight: 800; padding: 6px 14px; border-radius: 999px; cursor: pointer; transition: transform .2s, background .2s, border-color .2s; } .pfo-chipb:hover { transform: translateY(-1px); background: var(--pf-hov); border-color: var(--pf-az); }
.pfo-sw { margin-left: auto; display: inline-flex; align-items: center; gap: 9px; font-size: .84rem; font-weight: 800; cursor: pointer; } .pfo-sw input { display: none; }
.pfo-sw i { position: relative; width: 40px; height: 22px; border-radius: 99px; background: rgba(148, 163, 184, .5); transition: background .25s; } .pfo-sw i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .3); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.pfo-sw input:checked + i { background: linear-gradient(135deg, #7c3aed, #38bdf8); } .pfo-sw input:checked + i::after { transform: translateX(18px); }
.pfo-pr-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.pfo-pr-t { border: 2px solid var(--pf-bd); border-radius: 16px; background: var(--pf-card2); overflow: visible; position: relative; transition: border-color .25s, box-shadow .25s, transform .25s; animation: pfIn .4s var(--mi-ease) backwards; animation-delay: calc(var(--d) * 50ms); }
.pfo-pr-t.on { border-color: var(--pf-gold); box-shadow: 0 12px 26px -16px rgba(245, 158, 11, .8); } .pfo-pr-t:hover { transform: translateY(-2px); } .pfo-pr-t.abierto { z-index: 5; }
.pfo-pr-sel { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px; border: 0; background: transparent; color: var(--pf-tx); font: inherit; cursor: pointer; text-align: left; }
.pfo-pr-sel .ic { font-size: 1.6rem; transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); } .pfo-pr-t.on .pfo-pr-sel .ic { transform: scale(1.15); }
.pfo-pr-sel .n { flex: 1; display: flex; flex-direction: column; line-height: 1.25; } .pfo-pr-sel b { font-size: .86rem; } .pfo-pr-sel small { color: var(--pf-mut); font-weight: 700; font-size: .72rem; }
.pfo-pr-sel .ck { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--pf-bd); display: grid; place-items: center; flex: none; transition: background .25s, border-color .25s, transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.pfo-pr-sel .ck svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .3s ease .05s; }
.pfo-pr-t.on .ck { background: linear-gradient(135deg, #f59e0b, #d97706); border-color: #d97706; transform: scale(1.1); } .pfo-pr-t.on .ck svg { stroke-dashoffset: 0; }
.pfo-pr-caso { position: relative; padding: 0 10px 10px; display: none; } .pfo-pr-t.on .pfo-pr-caso { display: block; animation: pfIn .3s var(--mi-ease); }
.pfo-pr-cb { width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 10px; border: 1px solid var(--pf-bd); background: var(--pf-card); color: var(--pf-tx); font: inherit; font-size: .76rem; font-weight: 700; cursor: pointer; text-align: left; transition: border-color .2s; } .pfo-pr-cb:hover { border-color: var(--pf-az); }
.pfo-pr-cb .v { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pfo-pr-cb .chev { width: 7px; height: 7px; border-right: 2px solid var(--pf-mut); border-bottom: 2px solid var(--pf-mut); transform: rotate(45deg); transition: transform .25s; } .pfo-pr-t.abierto .pfo-pr-cb .chev { transform: rotate(-135deg); }
.pfo-pr-lista { position: relative; margin-top: 6px; display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--mi-ease); }
.pfo-pr-t.abierto .pfo-pr-lista { grid-template-rows: 1fr; }
.pfo-pr-lista .in { overflow: hidden; background: var(--pf-card); border: 0 solid var(--pf-bd); border-radius: 12px; box-shadow: 0 22px 40px -16px rgba(0, 0, 0, .55); }
.pfo-pr-t.abierto .pfo-pr-lista .in { border-width: 1px; max-height: 210px; overflow-y: auto; }
.pfo-pr-lista .op { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: var(--pf-tx); font: inherit; font-size: .76rem; line-height: 1.35; padding: 9px 12px; cursor: pointer; transition: background .15s, padding-left .2s; } .pfo-pr-lista .op:hover { background: var(--pf-hov); padding-left: 16px; } .pfo-pr-lista .op.on { font-weight: 800; color: var(--pf-or); }
.pfo-pr-res { margin-right: auto; font-size: .82rem; font-weight: 700; color: var(--pf-mut); }
@media (max-width: 640px) { .pfo-modal { padding: 0; align-items: flex-end; } .pfo-modal-c, .pfo-modal-c.ancho { width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; } .pfo-acords { grid-template-columns: 1fr; } }

/* =====================  v2: interruptor Examen / Práctica, mensajes con colores y práctica en línea  ===================== */
.pfo-sel { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.pfo-toggle { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 999px; background: var(--pf-card); border: 1px solid var(--pf-bd); box-shadow: var(--pf-sh); }
.pfo-toggle .pill { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 999px; background: linear-gradient(135deg, #fde68a, #f59e0b); box-shadow: 0 8px 20px -8px rgba(245, 158, 11, .9); transition: transform .45s cubic-bezier(.34, 1.4, .5, 1), background .3s; }
.pfo-toggle[data-m="prac"] .pill { transform: translateX(100%); background: linear-gradient(135deg, #c4b5fd, #7c3aed); box-shadow: 0 8px 20px -8px rgba(124, 58, 237, .9); }
.pfo-toggle button { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 150px; padding: 11px 22px; border: 0; background: transparent; color: var(--pf-mut); font: inherit; font-weight: 800; font-size: .92rem; border-radius: 999px; cursor: pointer; transition: color .25s, transform .2s; }
.pfo-toggle button:hover { transform: translateY(-1px); } .pfo-toggle button.on { color: #1c1917; } .pfo-toggle[data-m="prac"] button.on { color: #fff; }
.pfo-toggle button span { display: inline-block; transition: transform .4s cubic-bezier(.34, 1.56, .64, 1); } .pfo-toggle button.on span { transform: scale(1.25) rotate(-8deg); }
.pfo-real { border: 1px solid var(--pf-bd); background: var(--pf-card); color: var(--pf-tx); font: inherit; font-weight: 800; font-size: .84rem; padding: 11px 18px; border-radius: 999px; cursor: pointer; box-shadow: var(--pf-sh); transition: transform .25s var(--mi-ease), border-color .2s, background .2s; } .pfo-real:hover { transform: translateY(-2px); border-color: var(--pf-az); background: var(--pf-hov); }
.pfo-panes { margin-top: 14px; }
.pfo-pane { display: none; } .pfo-pane.on { display: block; animation: pfPane .45s var(--mi-ease); }
@keyframes pfPane { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.pfo-pane-c { padding: 20px 22px; border-radius: 22px; background: var(--pf-card); border: 1px solid var(--pf-bd); box-shadow: var(--pf-sh); position: relative; overflow: hidden; }
.pfo-pane-c::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, #f59e0b, #fde68a); } .pfo-pane-c.prac::before { background: linear-gradient(90deg, #7c3aed, #38bdf8); }
.pfo-pane-c.exam { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; } .pfo-pane-c.exam .pfo-pane-h { flex: 1; min-width: 260px; }
.pfo-pane-h { display: flex; gap: 14px; align-items: flex-start; } .pfo-pane-h .ic { font-size: 2.2rem; animation: pfFlota 4s ease-in-out infinite; }
.pfo-pane-h h3 { margin: 0 0 4px; font-size: 1.12rem; } .pfo-pane-h p { margin: 0 0 8px; color: var(--pf-mut); font-size: .88rem; line-height: 1.55; }
.pfo-pane-h .chips { display: flex; gap: 7px; flex-wrap: wrap; } .pfo-pane-h .chips span { font-size: .74rem; font-weight: 800; padding: 5px 11px; border-radius: 999px; background: var(--pf-card2); border: 1px solid var(--pf-bd); }
.pfo-pane-c.prac .pfo-pr-top { margin: 14px 0 10px; }
.pfo-pr-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--pf-bd); }
.pfo-pr-bar .pfo-pr-res { margin: 0; }
/* mensajes del examen: cada voz con su color y rótulo */
.pfo-msg { display: flex; flex-direction: column; gap: 4px; }
.pfo-msg .who { font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.pfo-msg .tx { white-space: pre-wrap; }
.pfo-msg.pac { align-self: flex-start; background: var(--pf-card2); border: 1px solid var(--pf-bd); border-left: 4px solid #14b8a6; color: var(--pf-tx); } .pfo-msg.pac .who { color: #0d9488; }
.pfo-msg.ev { align-self: flex-start; background: linear-gradient(135deg, #1e1b4b, #312e81); border: 1px solid #4338ca; color: #e0e7ff; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .86rem; } .pfo-msg.ev .who { color: #fcd34d; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }
.pfo-msg.yo .who { color: #bfdbfe; text-align: right; }
.pfo-msg.consigna { align-self: stretch; max-width: 100%; white-space: normal; background: linear-gradient(135deg, #0f2a5c, #1e3a8a 60%, #4c1d95); border: 1px solid rgba(245, 158, 11, .6); color: #e8efff; box-shadow: 0 16px 30px -18px rgba(30, 58, 138, .9); }
.pfo-msg.consigna .who { color: #fde68a; font-size: .74rem; }
.pfo-msg.consigna .sit { margin: 4px 0 8px; line-height: 1.6; font-size: .92rem; }
.pfo-msg.consigna .obj { padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); } .pfo-msg.consigna .obj b { color: #fde68a; font-size: .8rem; }
.pfo-msg.consigna ol { margin: 6px 0 0; padding-left: 0; list-style: none; counter-reset: o; } .pfo-msg.consigna li { counter-increment: o; position: relative; padding: 4px 0 4px 30px; font-size: .86rem; line-height: 1.45; }
.pfo-msg.consigna li::before { content: counter(o); position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .74rem; font-weight: 800; color: #1c1917; background: linear-gradient(135deg, #fde68a, #f59e0b); }
@media (max-width: 640px) { .pfo-toggle button { min-width: 0; padding: 10px 16px; } .pfo-sel { justify-content: center; } }

.pfo-in-act { display: flex; flex-direction: column; gap: 8px; align-items: stretch; } .pfo-in-act #pfo-mic-slot, .pfo-in-act #pfo-mic-slot2 { display: flex; justify-content: center; }

.pfo-mic-off { width: 44px; height: 44px; border-radius: 50%; border: 1px dashed var(--pf-bd); background: var(--pf-card2); color: var(--pf-mut); font-size: 1.1rem; cursor: not-allowed; opacity: .7; }
