/* ==========================================================================
   Ruleta de becas + pensum con registro (public/home/ruleta.js).
   Hoja propia y autocontenida: la usan la portada, /egresados y el asistente
   /inscribete, que tienen hojas de estilo distintas. Prefijo .rl en todo.
   ========================================================================== */
html.rl-open, html.rl-open body { overflow: hidden; }

.rl { position: fixed; inset: 0; z-index: 400; display: flex; align-items: flex-end; justify-content: center; background: rgba(4, 7, 22, .82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; animation: rl-fade .25s ease; }
.rl[hidden] { display: none; }
.rl *, .rl *::before, .rl *::after { box-sizing: border-box; }

.rl__box { position: relative; width: 100%; max-width: 460px; max-height: 94dvh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; border-radius: 28px 28px 0 0; padding: 26px 20px calc(22px + env(safe-area-inset-bottom, 0px)); color: #fff; text-align: center;
  background: radial-gradient(520px 300px at 50% -60px, rgba(34, 197, 94, .30), transparent 70%), radial-gradient(420px 320px at 110% 110%, rgba(124, 58, 237, .30), transparent 70%), #0B1233;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .5); animation: rl-up .38s cubic-bezier(.2, .8, .2, 1); }
.rl__x { position: absolute; z-index: 5; top: 12px; right: 12px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 16px; cursor: pointer; display: grid; place-items: center; }
.rl__x:hover { background: rgba(255, 255, 255, .22); }
.rl__confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; }
.rl__in { position: relative; z-index: 3; }

.rl__kicker { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(190, 242, 100, .14); border: 1px solid rgba(190, 242, 100, .4); color: #D9F99D; font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.rl__kicker--win { background: rgba(253, 224, 71, .16); border-color: rgba(253, 224, 71, .5); color: #FEF08A; }
.rl h2 { margin: 12px 0 0; font-family: "Sora", "Plus Jakarta Sans", system-ui, sans-serif; font-size: clamp(25px, 7vw, 31px); font-weight: 800; line-height: 1.12; letter-spacing: -.025em; color: #fff; }
.rl h2 em { font-style: normal; background: linear-gradient(90deg, #BEF264, #4ADE80 50%, #22C55E); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rl h2 em.rl__big { font-size: 1.9em; line-height: 1; display: block; filter: drop-shadow(0 6px 18px rgba(74, 222, 128, .35)); animation: rl-pop .6s cubic-bezier(.2, 1.4, .4, 1); }
.rl__lead { margin: 8px auto 0; max-width: 360px; font-size: 14.5px; line-height: 1.5; color: rgba(255, 255, 255, .82); }
.rl__lead strong { color: #fff; }
.rl__fine { margin: 12px 0 0; font-size: 12px; color: rgba(255, 255, 255, .6); }
.rl__fine a { color: inherit; }
.rl__note { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(253, 224, 71, .12); border: 1px solid rgba(253, 224, 71, .3); font-size: 13px; color: #FEF9C3; }
.rl__err { margin: 8px 0 0; min-height: 0; font-size: 13px; font-weight: 700; color: #FCA5A5; }
.rl__err:empty { display: none; }
.rl__legal { margin: 8px 0 0; font-size: 11.5px; line-height: 1.5; color: rgba(255, 255, 255, .62); text-align: left; }
.rl__loading { margin: 30px 0; color: inherit; opacity: .7; }

/* ── La rueda ── */
.rl__wheel { position: relative; width: min(74vw, 300px); margin: 18px auto 0; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .5)); }
.rl__svg { display: block; width: 100%; height: auto; }
.rl__disc { transform-origin: 150px 150px; transform-box: view-box; will-change: transform; }
.rl__pct { font-family: "Sora", system-ui, sans-serif; font-size: 25px; font-weight: 800; fill: #fff; paint-order: stroke; stroke: rgba(0, 0, 0, .25); stroke-width: 2px; }
.rl__lbl { font-size: 9.5px; font-weight: 800; letter-spacing: .14em; fill: rgba(255, 255, 255, .85); }
.rl__hub { font-family: "Sora", system-ui, sans-serif; font-size: 11px; font-weight: 800; letter-spacing: .06em; fill: #FDE68A; }
.rl__light { fill: #FDE68A; animation: rl-blink 1.4s ease-in-out infinite; }
.rl__light.is-b { animation-delay: .7s; }
.rl.is-spinning .rl__light { animation-duration: .35s; }
.rl__pin { position: absolute; z-index: 2; left: 50%; top: -9px; width: 30px; height: 36px; transform: translateX(-50%); background: linear-gradient(180deg, #FEF08A, #F59E0B); clip-path: polygon(50% 100%, 0 0, 100% 0); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .45)); }

/* ── Botones ── */
.rl__btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px; margin-top: 16px; padding: 14px 20px; border: 0; border-radius: 999px; background: linear-gradient(135deg, #22C55E, #15803D); color: #fff; font: inherit; font-size: 17px; font-weight: 800; cursor: pointer; box-shadow: 0 12px 28px rgba(34, 197, 94, .42); transition: transform .12s ease, filter .2s; }
.rl__btn:active { transform: scale(.97); }
.rl__btn:disabled { filter: grayscale(.4) brightness(.85); cursor: default; }
.rl__btn--spin { background: linear-gradient(135deg, #FDE047, #F59E0B); color: #3B2300; box-shadow: 0 12px 30px rgba(245, 158, 11, .45); text-transform: uppercase; letter-spacing: .04em; animation: rl-pulse 1.8s ease-in-out infinite; }
.rl__btn--spin:disabled { animation: none; }
.rl__skip, .rl__link { margin-top: 10px; border: 0; background: none; color: rgba(255, 255, 255, .62); font: inherit; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rl__link { margin: 0; color: #FDE68A; }
.rl__wa { display: block; margin-top: 12px; color: #86EFAC; font-size: 14px; font-weight: 800; text-decoration: none; }
.rl__wa:hover { text-decoration: underline; }

/* ── Precio ganado ── */
.rl__price { margin: 14px 0 0; padding: 14px 14px 12px; border-radius: 18px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); }
.rl__price small { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .62); }
.rl__price p { margin: 0; }
.rl__was { margin-top: 6px !important; font-size: 13px; color: rgba(255, 255, 255, .66); }
.rl__was s { color: #FCA5A5; font-weight: 700; }
.rl__now { margin-top: 4px !important; font-size: 14px; color: rgba(255, 255, 255, .85); }
.rl__now b { font-family: "Sora", system-ui, sans-serif; font-size: clamp(19px, 5.4vw, 23px); color: #fff; letter-spacing: -.02em; white-space: nowrap; }
.rl__now span { opacity: .6; margin: 0 2px; }
.rl__save { margin-top: 6px !important; font-size: 13px; font-weight: 800; color: #BEF264; }

/* ── Formulario ── */
.rl__form { margin: 14px 0 0; text-align: left; }
.rl__form-t { margin: 0 0 10px; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, .88); text-align: center; }
.rl__f { display: block; margin-top: 10px; }
.rl__f > span { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; font-weight: 800; color: rgba(255, 255, 255, .85); margin-bottom: 5px; }
.rl__f > span small { font-weight: 600; opacity: .6; }
.rl__f input { width: 100%; height: 52px; padding: 0 15px; border-radius: 14px; border: 1.5px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .96); color: #0A0E27; font: inherit; font-size: 16px; font-weight: 600; outline: none; }
.rl__f input:focus { border-color: #4ADE80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .25); }
.rl__f input::placeholder { color: #94A3B8; font-weight: 500; }
.rl__consent { margin: 10px 0 0; font-size: 11.5px; line-height: 1.45; color: rgba(255, 255, 255, .58); text-align: center; }

/* ── Beca reservada ── */
.rl__meta { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.rl__chip { padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); font-size: 12.5px; font-weight: 700; color: rgba(255, 255, 255, .9); }
.rl__chip b { font-variant-numeric: tabular-nums; color: #FDE68A; }
.rl__chip--code b { letter-spacing: .06em; color: #fff; }
.rl__chip--warn { background: rgba(248, 113, 113, .16); border-color: rgba(248, 113, 113, .45); color: #FECACA; }
.rl__inc { margin-top: 12px; text-align: left; padding: 12px 14px; border-radius: 18px; background: rgba(34, 197, 94, .1); border: 1px solid rgba(74, 222, 128, .28); }
.rl__inc > b { display: block; font-size: 13px; color: #BBF7D0; }
.rl__inc > b em { font-style: normal; font-weight: 700; color: rgba(255, 255, 255, .7); }
.rl__inc ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.rl__inc li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: baseline; font-size: 13px; color: rgba(255, 255, 255, .92); }
.rl__inc li i { font-style: normal; }
.rl__inc li small { font-size: 11.5px; color: rgba(255, 255, 255, .55); text-decoration: line-through; white-space: nowrap; }
.rl__inc-note { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, .8); }

/* ── Pensum (tema claro: es para leer) ── */
.rl[data-v="pensum"] .rl__box { max-width: 620px; background: #fff; color: #0A0E27; text-align: left; padding-top: 22px; }
.rl[data-v="pensum"] .rl__x { background: #F1F4FA; color: #2B3352; }
.rl[data-v="pensum"] h2 { margin: 2px 0 0; color: #0A0E27; font-size: clamp(20px, 5.6vw, 25px); }
.rl[data-v="pensum"] .rl__err { color: #DC2626; }
.rl__pen-head { display: flex; align-items: center; gap: 12px; padding-right: 44px; }
.rl__pen-head > i { flex: none; width: 52px; height: 52px; border-radius: 16px; background: #EEF2FF; display: grid; place-items: center; font-style: normal; font-size: 26px; }
.rl__pen-head small { font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #16A34A; }
.rl__enfoque { margin: 12px 0 0; font-size: 14px; line-height: 1.55; color: #2B3352; }
.rl__facts { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.rl__facts span { padding: 6px 10px; border-radius: 999px; background: #F5F7FC; border: 1px solid #E4E8F2; font-size: 12px; font-weight: 700; color: #2B3352; }
.rl__meses { margin-top: 14px; display: grid; gap: 10px; }

.rl__mes { border: 1.5px solid #E4E8F2; border-radius: 16px; padding: 0; background: #fff; overflow: hidden; }
.rl__mes summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; cursor: pointer; list-style: none; outline: none; }
.rl__mes summary::-webkit-details-marker { display: none; }

.rl__mes.is-locked summary { cursor: default; pointer-events: none; }
.rl__locked-sum { font-size: 11.5px; font-weight: 700; color: #64748B; white-space: normal; text-align: right; }

.rl__chev { width: 24px; height: 24px; display: grid; place-items: center; transition: transform 0.2s; color: #64748B; font-style: normal; }
.rl__chev::before { content: "▼"; font-size: 12px; }
.rl__mes[open] .rl__chev { transform: rotate(-180deg); }
.rl__mes.is-locked .rl__chev { display: none; }
.rl__mes-body { padding: 0 14px 12px; border-top: 1px dashed #E4E8F2; margin-top: 4px; }
.rl__mes.is-locked .rl__mes-body { border-top: none; }

.rl__mes h4 { margin: 0; display: flex; align-items: center; gap: 8px; font-family: "Sora", system-ui, sans-serif; font-size: 15px; font-weight: 800; color: #0A0E27; }
.rl__mes h4 b { flex: none; width: 26px; height: 26px; border-radius: 9px; background: #0A0E27; color: #fff; display: grid; place-items: center; font-size: 12.5px; }
.rl__mes h4 em { font-style: normal; font-family: "Plus Jakarta Sans", system-ui, sans-serif; font-size: 11.5px; font-weight: 800; color: #7C3AED; background: #EDE9FE; padding: 3px 8px; border-radius: 999px; }
.rl__mes ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.rl__mes li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 14px; font-weight: 700; color: #0A0E27; line-height: 1.3; }
.rl__mes li i { font-style: normal; }
.rl__mes li small { display: block; margin-top: 1px; font-size: 11.5px; font-weight: 600; color: #6B7391; }
.rl__mes.is-locked { background: #F8FAFC; border-style: dashed; padding: 9px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rl__mes.is-locked h4 { font-size: 14px; color: #475569; }
.rl__mes.is-locked h4 b { background: #CBD5E1; }
.rl__locked span { font-size: 12.5px; font-weight: 700; color: #64748B; white-space: normal; }
.rl__form--pen { margin: 0; padding: 16px; border-radius: 20px; color: #fff; background: radial-gradient(400px 220px at 100% 0, rgba(34, 197, 94, .35), transparent 70%), #0B1233; box-shadow: 0 14px 34px rgba(7, 11, 31, .25); }
.rl[data-v="pensum"] .rl__form--pen .rl__err { color: #FCA5A5; }
.rl__pen-foot { position: sticky; bottom: calc(-22px - env(safe-area-inset-bottom, 0px)); margin: 14px -20px calc(-22px - env(safe-area-inset-bottom, 0px)); padding: 0 20px calc(16px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 34%); }
.rl__pen-foot:empty { display: none; }
.rl__pen-foot .rl__btn { margin-top: 18px; }

/* ── Animaciones ── */
@keyframes rl-fade { from { opacity: 0; } }
@keyframes rl-up { from { transform: translateY(40px); opacity: 0; } }
@keyframes rl-pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes rl-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes rl-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }

@media (min-width: 640px) {
  .rl { align-items: center; padding: 20px; }
  .rl__box { border-radius: 28px; padding: 30px 30px 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08); max-height: calc(100dvh - 40px); }
  .rl__wheel { width: 300px; }
  .rl__pen-foot { bottom: -26px; margin: 14px -30px -26px; padding: 0 30px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .rl, .rl__box, .rl__light, .rl__btn--spin, .rl h2 em.rl__big { animation: none; }
}


