/* Juntos — reward screen, chests and collection previews (loaded with /js/rewards.js) */
:root { --rw-gold-1: #FFF3B8; --rw-gold-2: #FFD23F; --rw-gold-3: #F5A81A; --rw-gold-4: #B87400; --rw-navy-1: #3A3D5C; --rw-navy-2: #1F2137; --rw-coral: #FF6B4A; --rw-orange: #FF9A3C;
  --rw-common: #2FB8A6; --rw-rare: #3E8BFF; --rw-epic: #A855F7; --rw-level: #F5A81A; }
.rw-open { overflow: hidden; } /* the page under it keeps its layout (sticky bars stay put) */
.rw-coin { width: 22px; height: 22px; flex: none; }

/* ---------------------------------------------------------------- overlay */
.rw-ov {
  position: fixed; inset: 0; z-index: 340; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px));
  background: radial-gradient(120% 70% at 50% 0%, #4A4E7A 0%, var(--rw-navy-1) 38%, var(--rw-navy-2) 100%);
  color: #fff; animation: ndj-fade .25s ease both; isolation: isolate;
}
.rw-ov.is-win { background: radial-gradient(120% 60% at 50% 0%, #FFB56B 0%, var(--rw-orange) 22%, var(--rw-coral) 46%, #8A2E4A 78%, var(--rw-navy-2) 100%); }
.rw-ov.is-out { opacity: 0; transition: opacity .25s ease; }
.rw-ov__rays {
  position: fixed; left: 50%; top: 18%; z-index: -1; width: 150vmax; height: 150vmax; margin: -75vmax 0 0 -75vmax; pointer-events: none; opacity: .16;
  background: repeating-conic-gradient(from 0deg, #fff 0 7deg, transparent 7deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 0 18%, transparent 55%); mask: radial-gradient(circle, #000 0 18%, transparent 55%);
  animation: rw-spin 40s linear infinite;
}
@keyframes rw-spin { to { transform: rotate(360deg); } }
.rw-box { width: min(440px, 100%); display: flex; flex-direction: column; align-items: stretch; gap: 14px; margin: auto 0; }
.rw-skip { margin-top: 14px; font-size: .78rem; font-weight: 700; opacity: .55; }

/* wallet counter */
.rw-wallet {
  position: relative; z-index: 2; align-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 6px 18px 6px 6px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(58, 61, 92, .92), rgba(31, 33, 55, .92)); border: 1px solid rgba(255, 210, 63, .55);
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.rw-wallet__coin { width: 40px; height: 40px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
.rw-wallet__n { font: 700 1.7rem/1 var(--font-display); color: var(--rw-gold-2); text-shadow: 0 2px 0 rgba(120, 70, 0, .5); min-width: 2.5ch; }
.rw-wallet.is-bump { animation: rw-bump .28s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes rw-bump { 40% { transform: scale(1.1); } }
.rw-fly { position: fixed; z-index: 400; width: 28px; height: 28px; pointer-events: none; }
.rw-fly .rw-coin { width: 100%; height: 100%; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); }

/* hero */
.rw-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; animation: rw-pop .55s cubic-bezier(.3, 1.5, .5, 1) .1s both; }
.rw-hero__emblem { width: 76px; height: 76px; border-radius: 24px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .35), 0 18px 30px -12px rgba(0, 0, 0, .6); }
.rw-hero__emoji { font-size: 3.4rem; line-height: 1; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .4)); }
.rw-hero__title { font: 700 clamp(2.1rem, 10vw, 2.7rem)/1.05 var(--font-display); letter-spacing: -.02em; text-shadow: 0 3px 0 rgba(0, 0, 0, .18), 0 10px 24px rgba(0, 0, 0, .3); margin-top: 6px; }
.rw-hero__sub { font-weight: 700; opacity: .9; max-width: 32ch; }
@keyframes rw-pop { from { opacity: 0; transform: scale(.7) translateY(10px); } to { opacity: 1; transform: none; } }

/* itemised lines */
.rw-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.rw-line {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 10px 6px 6px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .97), #FFF4EA); color: #2B2D42;
  box-shadow: 0 10px 18px -12px rgba(0, 0, 0, .55), inset 0 -2px 0 rgba(43, 45, 66, .06);
  opacity: 0; transform: translateX(-18px) scale(.96);
}
.rw-line.is-in { opacity: 1; transform: none; transition: opacity .25s ease, transform .35s cubic-bezier(.3, 1.5, .5, 1); }
.rw-line.is-ach { background: linear-gradient(180deg, #FFF8D6, #FFE9A8); }
.rw-line__ic { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 12px; background: #FFEFE3; font-size: 1.3rem; }
.rw-line__t { flex: 1; min-width: 0; font: 600 1rem/1.2 var(--font-display); }
.rw-line__xp { flex: none; padding: 3px 8px; border-radius: 999px; background: #EDE7FF; color: #6B4BD6; font: 700 .76rem var(--font-display); }
.rw-line__c { flex: none; display: inline-flex; align-items: center; gap: 4px; min-width: 62px; justify-content: flex-end; font: 700 1.12rem var(--font-display); color: #C77700; }

/* level bar */
.rw-lvl { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .12); opacity: 0; transform: translateY(8px); }
.rw-lvl.is-in { opacity: 1; transform: none; transition: all .3s ease; }
.rw-lvl.is-flash { animation: rw-flash .6s ease; }
@keyframes rw-flash { 30% { box-shadow: 0 0 0 4px rgba(255, 210, 63, .8), 0 0 40px rgba(255, 210, 63, .7); } }
.rw-lvl__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rw-lvl__row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 700; }
.rw-lvl__row b { font: 700 1.05rem var(--font-display); }
.rw-lvl__txt { font-size: .82rem; opacity: .85; }
.rw-lvl__bar { height: 14px; border-radius: 999px; background: rgba(0, 0, 0, .35); overflow: hidden; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .35); }
.rw-lvl__bar > i { position: relative; display: block; height: 100%; border-radius: inherit; background: linear-gradient(180deg, #C9A8FF, #8B5CF6 55%, #6D3FE0); transition: width .7s cubic-bezier(.3, .9, .4, 1); overflow: hidden; }
.rw-lvl__bar > i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .55) 45%, transparent 60%); animation: rw-shine 2.2s ease-in-out infinite; }
@keyframes rw-shine { from { transform: translateX(-120%); } to { transform: translateX(120%); } }

/* level badge (hexagon-ish shield) */
.rw-lvbadge {
  position: relative; display: grid; place-items: center; flex: none; width: 52px; height: 56px;
  clip-path: polygon(50% 0, 100% 22%, 100% 74%, 50% 100%, 0 74%, 0 22%);
  background: linear-gradient(180deg, #D8C2FF, #8B5CF6 50%, #5B2FC9);
}
.rw-lvbadge::before { content: ""; position: absolute; inset: 4px; clip-path: inherit; background: linear-gradient(180deg, #9D74FF, #6D3FE0); }
.rw-lvbadge__n { position: relative; font: 700 1.35rem/1 var(--font-display); color: #fff; text-shadow: 0 2px 0 rgba(40, 10, 100, .5); }

/* level up */
.rw-up { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 14px 16px; border-radius: 22px; text-align: center;
  background: radial-gradient(circle at 50% 30%, #5B3FB0 0%, #2E2A5E 55%, #1F2137 100%); border: 2px solid #FFD23F;
  box-shadow: 0 0 0 4px rgba(255, 210, 63, .2), 0 0 40px rgba(255, 210, 63, .35); overflow: hidden; animation: rw-pop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.rw-up__burst { position: absolute; inset: -40%; z-index: -1; background: repeating-conic-gradient(rgba(255, 255, 255, .09) 0 10deg, transparent 10deg 24deg); animation: rw-spin 14s linear infinite; }
.rw-up__kicker { font: 700 1.5rem var(--font-display); color: var(--rw-gold-2); text-shadow: 0 2px 0 rgba(120, 70, 0, .55); }
.rw-up__badge { width: 78px; height: 84px; animation: rw-pop .6s cubic-bezier(.3, 1.8, .5, 1) .15s both; }
.rw-up__badge .rw-lvbadge__n { font-size: 2.1rem; }
.rw-up__gifts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; }
.rw-gift { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 120px; padding: 10px; border-radius: 16px; background: rgba(255, 255, 255, .95); color: #2B2D42; box-shadow: 0 12px 20px -14px rgba(0, 0, 0, .6); }
.rw-gift__t { font: 700 .9rem var(--font-display); }
.rw-gift__chest { width: 64px; height: 60px; }
.rw-gift__btn { min-height: 40px; padding: 0 16px; border: 0; border-radius: 12px; cursor: pointer; font: 700 .9rem var(--font-display); color: #0D6B48; background: #5BE0B3; }
.rw-gift__btn:disabled { opacity: .8; cursor: default; }

/* actions */
.rw-actions { display: flex; flex-direction: column; gap: 10px; opacity: 0; transform: translateY(10px); }
.rw-actions.is-in { opacity: 1; transform: none; transition: all .3s ease; }
.rw-btn { min-height: 58px; border-radius: 18px; font-size: 1.15rem; }
.rw-btn--go { color: #4A2E00; background: linear-gradient(180deg, #FFF0A6 0%, var(--rw-gold-2) 50%, var(--rw-gold-3) 100%); border: 1px solid rgba(160, 100, 0, .5); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -3px 0 rgba(160, 90, 0, .25), 0 16px 26px -14px rgba(255, 190, 40, .9); position: relative; overflow: hidden; }
.rw-btn--go::after, .rw-btn--chest::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .6) 48%, transparent 60%); animation: rw-shine 2.8s ease-in-out infinite; pointer-events: none; }
.rw-btn--go.is-2nd { min-height: 50px; font-size: 1rem; color: #fff; background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .25); box-shadow: none; }
.rw-btn--go.is-2nd::after { display: none; }
.rw-btn--chest { position: relative; overflow: hidden; color: #fff; background: linear-gradient(180deg, #FF8A5C 0%, var(--rw-coral) 55%, #E04A2A 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -3px 0 rgba(120, 20, 0, .25), 0 16px 26px -14px rgba(255, 107, 74, .9); }
.rw-btn--chest:disabled { opacity: .85; }
.rw-btn__chest { width: 40px; height: 38px; margin: -6px 0; }
.rw-btn--ghost { color: #fff; background: transparent; border: 1px solid rgba(255, 255, 255, .3); min-height: 48px; font-size: 1rem; }

/* ---------------------------------------------------------------- chest opening */
.rw-ov--chest { justify-content: center; }
.rw-ov--common { background: radial-gradient(110% 70% at 50% 40%, #2C6E6A 0%, var(--rw-navy-1) 45%, var(--rw-navy-2) 100%); }
.rw-ov--rare { background: radial-gradient(110% 70% at 50% 40%, #2D5BC4 0%, #2A2F6B 45%, var(--rw-navy-2) 100%); }
.rw-ov--epic { background: radial-gradient(110% 70% at 50% 40%, #7B3BD6 0%, #3B2468 45%, var(--rw-navy-2) 100%); }
.rw-ov--chest .rw-ov__rays { top: 45%; opacity: .12; }
.rw-ov--chest.is-burst .rw-ov__rays { opacity: .32; animation-duration: 12s; }
.rw-ov--chest.is-burst::after { content: ""; position: fixed; inset: 0; background: #fff; pointer-events: none; animation: rw-whiteout .6s ease-out both; }
@keyframes rw-whiteout { 0% { opacity: .95; } 100% { opacity: 0; } }
.ck-x { position: fixed; right: 14px; top: calc(14px + env(safe-area-inset-top, 0px)); display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; }
.ck-x .ndj-ic { width: 20px; height: 20px; }
.ck-stage { width: min(400px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; margin: auto 0; }
.ck-kicker { padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); font: 700 .8rem var(--font-display); letter-spacing: .12em; text-transform: uppercase; }
.ck-title { font: 700 2rem var(--font-display); text-shadow: 0 3px 0 rgba(0, 0, 0, .2); }
.ck-btn { position: relative; width: min(260px, 70vw); aspect-ratio: 120 / 112; padding: 0; border: 0; background: none; cursor: pointer; margin: 14px 0 4px; }
.ck-btn .ck-art { animation: rw-hover 2.4s ease-in-out infinite; }
.ck-btn::before { content: ""; position: absolute; inset: 10% 5% 0; border-radius: 50%; background: radial-gradient(circle, rgba(255, 230, 140, .55), transparent 65%); filter: blur(6px); z-index: -1; }
.ck-art { width: 100%; height: 100%; filter: drop-shadow(0 20px 22px rgba(0, 0, 0, .45)); overflow: visible; }
.ck-art .rw-chest__lid { transform-origin: 60px 54px; transform-box: view-box; }
.ck-btn.is-shake .ck-art { animation: rw-shake .9s cubic-bezier(.36, .07, .19, .97) both; }
.ck-btn.is-open .ck-art { animation: none; }
.ck-btn.is-open .rw-chest__lid { animation: rw-lid .6s cubic-bezier(.3, 1.4, .5, 1) forwards; }
@keyframes rw-hover { 50% { transform: translateY(-8px); } }
@keyframes rw-shake { 0%, 100% { transform: none; } 10%, 50% { transform: rotate(-7deg) scale(1.03); } 30%, 70% { transform: rotate(7deg) scale(1.06); } 85% { transform: rotate(-3deg) scale(1.1); } }
@keyframes rw-lid { to { transform: translate(-6px, -46px) rotate(-24deg); } }
.ck-hint { font-weight: 700; opacity: .85; min-height: 1.5em; animation: ndj-pulse 1.8s ease-in-out infinite; }
.ck-card {
  position: relative; width: min(300px, 86vw); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 18px 18px; border-radius: 26px;
  background: linear-gradient(180deg, #FFFFFF, #FFF4EA); color: #2B2D42; --rc: var(--rw-common);
  box-shadow: 0 0 0 4px var(--rc), 0 0 50px 4px color-mix(in srgb, var(--rc) 60%, transparent), 0 30px 50px -20px rgba(0, 0, 0, .7);
  animation: rw-reveal .6s cubic-bezier(.3, 1.6, .5, 1) both;
}
.ck-card--rare { --rc: var(--rw-rare); }
.ck-card--epic { --rc: var(--rw-epic); }
.ck-card--level { --rc: var(--rw-level); }
.ck-card--dup { --rc: var(--rw-gold-3); }
@keyframes rw-reveal { 0% { opacity: 0; transform: rotateY(90deg) scale(.6); } 100% { opacity: 1; transform: none; } }
.ck-card__new { position: absolute; top: -14px; padding: 5px 14px; border-radius: 999px; background: var(--rc); color: #fff; font: 700 .85rem var(--font-display); letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 6px 12px -6px rgba(0, 0, 0, .5); }
.ck-card__art { display: grid; place-items: center; width: 132px; height: 132px; border-radius: 30px; background: radial-gradient(circle, color-mix(in srgb, var(--rc) 22%, #fff), #fff 70%); }
.ck-card__art .pv { transform: scale(1.35); }
.ck-card__coin { width: 86px; height: 86px; }
.ck-card__rar { font: 700 .8rem var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--rc); }
.ck-card--common .ck-card__rar { color: #178C7D; }
.ck-card__name { font: 700 1.5rem/1.15 var(--font-display); }
.ck-card .rw-btn { margin-top: 6px; width: 100%; }
.ck-coins { display: inline-flex; align-items: center; gap: 6px; font: 700 1.1rem var(--font-display); color: var(--rw-gold-2); }
.ck-stage .rw-actions { width: min(300px, 86vw); margin-top: 6px; }

/* ---------------------------------------------------------------- medals */
.rw-medal { position: relative; display: inline-grid; place-items: center; width: 46px; height: 52px; flex: none; --m1: #F3C38B; --m2: #C7843F; --m3: #8E5521; }
.rw-medal--silver { --m1: #F4F6FA; --m2: #B9C2D0; --m3: #7D879A; }
.rw-medal--gold { --m1: #FFF3B8; --m2: #F5B81A; --m3: #B87400; }
.rw-medal__ribbon { position: absolute; top: 0; width: 26px; height: 20px; background: linear-gradient(90deg, #FF6B4A 0 50%, #3E8BFF 50%); clip-path: polygon(0 0, 100% 0, 80% 100%, 20% 100%); }
.rw-medal__disc { position: absolute; bottom: 0; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-size: 1.25rem; line-height: 1;
  background: radial-gradient(circle at 35% 30%, var(--m1), var(--m2) 60%, var(--m3)); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .45), 0 4px 8px -3px rgba(0, 0, 0, .45); }

/* ---------------------------------------------------------------- item previews */
.pv { position: relative; display: grid; place-items: center; width: 64px; height: 64px; flex: none; }
.pv.is-locked > :not(.pv__q) { filter: brightness(0) saturate(0); opacity: .2; }
.pv.is-locked { background: none !important; box-shadow: none !important; }
.pv.is-locked::before { filter: brightness(0); opacity: .15; }
.pv__q { position: absolute; inset: 0; display: grid; place-items: center; font: 700 1.6rem var(--font-display); color: rgba(43, 45, 66, .45); }
.pv-frame .ndj-avatar { width: 52px; height: 52px; font-size: 1.4rem; }
.pv-title { border-radius: 18px; background: linear-gradient(135deg, rgba(255, 196, 76, .45), rgba(255, 154, 60, .25)); }
.pv-title__ic { font-size: 2rem; line-height: 1; }
.pv-emotes { grid-template-columns: 1fr 1fr; gap: 0; font-size: 1.45rem; line-height: 1; border-radius: 18px; background: #FFF0E3; }
.pv-emotes span:first-child { grid-column: 1 / -1; font-size: 1.7rem; }
.pv-die {
  width: 54px; height: 54px; border-radius: 13px; padding: 9px; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  background: linear-gradient(145deg, #FFFFFF, #E9E4DA); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12), 0 6px 10px -4px rgba(0, 0, 0, .35); --pip: #2B2D42;
}
.pv-die i { width: 9px; height: 9px; border-radius: 50%; background: var(--pip); place-self: center; }
.pv-die i:nth-child(1) { grid-area: 1 / 1; } .pv-die i:nth-child(2) { grid-area: 1 / 3; } .pv-die i:nth-child(3) { grid-area: 2 / 2; } .pv-die i:nth-child(4) { grid-area: 3 / 1; } .pv-die i:nth-child(5) { grid-area: 3 / 3; }
.pv-die--wood { background: linear-gradient(145deg, #D9A066, #A8693A); --pip: #4A2A10; }
.pv-die--ice { background: linear-gradient(145deg, #E8F7FF, #A8DDF5); --pip: #2E6E9E; }
.pv-die--gold { background: linear-gradient(145deg, #FFF0A6, #F5B81A); --pip: #6B4200; }
.pv-die--neon { background: linear-gradient(145deg, #3A3D5C, #1F2137); --pip: #5BF5E3; box-shadow: 0 0 0 2px #5BF5E3, 0 0 14px rgba(91, 245, 227, .6); }
.pv-die--fiesta { background: linear-gradient(145deg, #B98CFF, #7A4BE0); --pip: #FFE066; }
.pv-card { width: 46px; height: 62px; border-radius: 9px; border: 3px solid #fff; box-shadow: 0 6px 12px -5px rgba(0, 0, 0, .4); }
.pv-card__ic { font-size: 1.2rem; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .2)); }
.pv-card--stars { background: radial-gradient(circle at 30% 30%, #FFE066 2px, transparent 3px) 0 0 / 12px 12px, linear-gradient(160deg, #6C63FF, #A855F7); }
.pv-card--waves { background: repeating-radial-gradient(circle at 50% 120%, #4ECDC4 0 5px, #2E86DE 5px 10px); }
.pv-card--hearts { background: radial-gradient(circle at 50% 50%, #FFB3C7 2px, transparent 3px) 0 0 / 10px 10px, linear-gradient(160deg, #FF5A8F, #E8505B); }
.pv-card--galaxy { background: radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent), radial-gradient(1.5px 1.5px at 70% 60%, #fff, transparent), radial-gradient(circle at 60% 30%, #B45CFF, transparent 60%), linear-gradient(160deg, #1F2137, #3B2468); }
.pv-tile { width: 36px; height: 66px; grid-template-rows: 1fr 1fr; padding: 4px; gap: 3px; border-radius: 8px; background: linear-gradient(145deg, #FFFFFF, #EFE8DA); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12), 0 6px 10px -4px rgba(0, 0, 0, .35); --pip: #2B2D42; transform: rotate(-12deg); }
.pv-tile__half { position: relative; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 2px; width: 100%; height: 100%; }
.pv-tile__half + .pv-tile__half { border-top: 2px solid rgba(0, 0, 0, .15); }
.pv-tile i { width: 6px; height: 6px; border-radius: 50%; background: var(--pip); }
.pv-tile--marble { background: linear-gradient(135deg, #FFFFFF 0%, #E8E8F0 40%, #FFFFFF 55%, #D9D9E6 100%); --pip: #3A3D5C; }
.pv-tile--wood { background: repeating-linear-gradient(170deg, #D9A066 0 4px, #C68A52 4px 7px); --pip: #4A2A10; }
.pv-tile--neon { background: #1F2137; --pip: #5BF5E3; box-shadow: 0 0 0 2px #FF5A9E, 0 0 12px rgba(255, 90, 158, .6); }
.pv-tile--gold { background: linear-gradient(145deg, #FFF0A6, #F5B81A); --pip: #6B4200; }
.pv-board { width: 60px; height: 60px; border-radius: 14px; overflow: hidden; box-shadow: 0 6px 12px -5px rgba(0, 0, 0, .4); }
.pv-board__x { position: absolute; inset: 0; background: linear-gradient(#fff, #fff) center / 16px 100% no-repeat, linear-gradient(#fff, #fff) center / 100% 16px no-repeat; opacity: .85; }
.pv-board__ic { position: relative; font-size: 1.2rem; }
.pv-board--ocean { background: linear-gradient(135deg, #4ECDC4, #2E86DE); }
.pv-board--jungle { background: linear-gradient(135deg, #7ED957, #1F9D55); }
.pv-board--night { background: linear-gradient(135deg, #3B2468, #1F2137); }
.pv-board--night .pv-board__x { opacity: .3; }
.pv-conf { border-radius: 18px; background: #FFF0E3; overflow: hidden; }
.pv-conf::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, var(--c1, #FF6B6B) 2.5px, transparent 3px), radial-gradient(circle, var(--c2, #4ECDC4) 2.5px, transparent 3px), radial-gradient(circle, var(--c3, #A855F7) 2px, transparent 2.5px); background-size: 20px 20px, 24px 24px, 16px 16px; background-position: 3px 4px, 12px 14px, 7px 2px; }
.pv-conf__ic { position: relative; font-size: 1.8rem; }
.pv-conf--hearts { --c1: #FF5A8F; --c2: #FF9EB8; --c3: #E8505B; }
.pv-conf--stars, .pv-conf--gold, .pv-conf--coins { --c1: #FFC93C; --c2: #FF9F43; --c3: #FFE66D; }
.pv-theme { border-radius: 18px; box-shadow: inset 0 0 0 1px rgba(43, 45, 66, .1); }
.pv-theme__ic { font-size: 1.8rem; }
.pv-theme--ocean { background: linear-gradient(160deg, #E3FBFF, #9BD9F2); }
.pv-theme--jungle { background: linear-gradient(160deg, #F1FFE5, #A6E3B5); }
.pv-theme--night { background: linear-gradient(160deg, #3A2C6B, #1F2137); }

/* ---------------------------------------------------------------- "cofre de partidas" (reward screen and in-game sheet) */
.rw-gp { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 18px; text-align: left; }
.rw-gp__art { position: relative; flex: none; width: 56px; height: 52px; }
.rw-gp__chest { width: 100%; height: 100%; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .3)); overflow: visible; }
.rw-gp__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.rw-gp__row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rw-gp__row b { font: 700 1rem var(--font-display); }
.rw-gp__count { font: 700 .95rem var(--font-display); }
.rw-gp__track { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 5px; height: 12px; }
.rw-gp__seg { border-radius: 999px; background: rgba(0, 0, 0, .28); box-shadow: inset 0 2px 3px rgba(0, 0, 0, .3); transition: background .35s ease, box-shadow .35s ease; }
.rw-gp__seg.is-on { background: linear-gradient(180deg, #FFF0A6, var(--rw-gold-2) 55%, var(--rw-gold-3)); box-shadow: 0 0 10px rgba(255, 210, 63, .55), inset 0 1px 0 rgba(255, 255, 255, .7); }
.rw-gp__txt { font: 700 .9rem/1.25 var(--font-body); }
.rw-gp__hint { font-size: .74rem; font-weight: 700; opacity: .7; }
.rw-gp.is-earned .rw-gp__art { animation: rw-gp-pop .7s cubic-bezier(.3, 1.8, .5, 1) both; }
.rw-gp.is-earned .rw-gp__art::after { content: ""; position: absolute; inset: -12px; z-index: -1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 230, 140, .75), transparent 65%); }
.rw-gp.is-earned .rw-gp__txt { color: var(--rw-gold-2); }
@keyframes rw-gp-pop { 0% { transform: scale(.7); } 50% { transform: scale(1.25) rotate(-6deg); } 100% { transform: none; } }
/* on the reward screen: a dark glass card like the level bar */
.rw-gp--reward { background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .12); color: #fff; opacity: 0; transform: translateY(8px); }
.rw-gp--reward.is-in { opacity: 1; transform: none; transition: all .3s ease; }
.rw-gp--reward.is-earned { border-color: rgba(255, 210, 63, .8); box-shadow: 0 0 0 3px rgba(255, 210, 63, .2), 0 0 30px rgba(255, 210, 63, .35); }

/* ---------------------------------------------------------------- in-game "Premios" sheet */
.rw-sheet { position: fixed; inset: 0; z-index: 300; display: flex; align-items: flex-end; justify-content: center; }
.rw-sheet__scrim { position: absolute; inset: 0; background: rgba(20, 20, 40, .5); animation: ndj-fade .2s ease both; }
.rw-sheet__box {
  position: relative; width: min(480px, 100%); max-height: min(88vh, 760px); max-height: min(88dvh, 760px); display: flex; flex-direction: column;
  border-radius: 28px 28px 0 0; background: var(--bg); color: var(--fg); box-shadow: 0 -24px 50px -20px rgba(20, 20, 40, .5);
  animation: ndj-sheet-up .32s cubic-bezier(.2, .9, .3, 1) both; transition: transform .18s ease;
}
.rw-sheet.is-out .rw-sheet__scrim { opacity: 0; transition: opacity .2s; }
.rw-sheet.is-out .rw-sheet__box { transform: translateY(105%); transition: transform .22s ease-in; }
.rw-sheet__head { position: relative; flex: none; display: flex; align-items: center; justify-content: center; min-height: 58px; padding: 14px 64px 4px; touch-action: none; cursor: grab; }
.rw-sheet__grab { position: absolute; left: 50%; top: 8px; width: 46px; height: 5px; margin-left: -23px; border-radius: 99px; background: rgba(43, 45, 66, .18); }
.rw-sheet__title { font: 700 1.4rem var(--font-display); }
.rw-sheet__x { position: absolute; right: 10px; top: 10px; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--fg); cursor: pointer; box-shadow: var(--shadow-sm); }
.rw-sheet__x .ndj-ic { width: 20px; height: 20px; }
.rw-sheet__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 12px; padding: 4px 16px 12px; }
.rw-sheet__foot { flex: none; padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--bg); border-radius: 0; }
.rw-sheet__back { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; border-radius: 16px; border: 0; color: #fff; background: linear-gradient(135deg, var(--rw-coral), var(--rw-orange)); box-shadow: 0 14px 24px -14px rgba(255, 107, 74, .9), inset 0 1px 0 rgba(255, 255, 255, .35); font: 700 1.08rem var(--font-display); }
.rw-sheet__live { width: 10px; height: 10px; border-radius: 50%; background: #5BF0A8; box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); animation: ndj-pulse 1.6s ease-in-out infinite; }
.rw-sheet__back.is-ping { animation: rw-ping .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes rw-ping { 40% { transform: scale(1.04); box-shadow: 0 0 0 6px rgba(255, 154, 60, .35), 0 14px 24px -14px rgba(255, 107, 74, .9); } }
/* coins + level: a navy card in both themes */
.rw-sheet__hero { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 22px; color: #fff;
  background: radial-gradient(120% 90% at 20% 0%, #4A4E7A 0%, var(--rw-navy-1) 45%, var(--rw-navy-2) 100%); box-shadow: 0 18px 30px -20px rgba(31, 33, 55, .9), inset 0 1px 0 rgba(255, 255, 255, .12); }
.rw-sheet__bal { display: flex; align-items: center; gap: 10px; }
.rw-sheet__coin { width: 42px; height: 42px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
.rw-sheet__n { font: 700 2rem/1 var(--font-display); color: var(--rw-gold-2); text-shadow: 0 2px 0 rgba(120, 70, 0, .5); }
.rw-sheet__cap { margin-left: auto; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: .8rem; font-weight: 800; white-space: nowrap; }
.rw-sheet__lv { display: flex; align-items: center; gap: 12px; }
.rw-sheet__badge { width: 44px; height: 48px; }
.rw-sheet__badge .rw-lvbadge__n { font-size: 1.15rem; }
.rw-sheet__lvmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rw-sheet__lvrow { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: .85rem; font-weight: 700; }
.rw-sheet__lvrow b { font: 700 1rem var(--font-display); }
.rw-sheet__lvmain .rw-lvl__bar { height: 12px; }
.rw-gp--sheet { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.rw-gp--sheet .rw-gp__seg:not(.is-on) { background: color-mix(in srgb, var(--fg) 12%, transparent); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12); }
.rw-gp--sheet .rw-gp__count { color: #C77700; }
.rw-gp--sheet .rw-gp__txt { color: var(--fg-2); }
.rw-sheet__sec { display: flex; flex-direction: column; gap: 10px; }
.rw-sheet__sechead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rw-sheet__sechead h3 { font: 700 1.1rem var(--font-display); }
.rw-sheet__sechead span { font-size: .8rem; font-weight: 800; color: var(--fg-2); text-align: right; }
.rw-sheet__chests { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rw-sc { --rc: var(--rw-common); display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 10px 6px 8px; border-radius: 18px; text-align: center; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.rw-sc--rare { --rc: var(--rw-rare); }
.rw-sc--epic { --rc: var(--rw-epic); }
.rw-sc.has { box-shadow: 0 0 0 3px color-mix(in srgb, var(--rc) 35%, transparent), 0 12px 22px -16px var(--rc); }
.rw-sc__art { position: relative; width: 60px; height: 56px; }
.rw-sc.has .rw-sc__art { animation: rw-hover 2.4s ease-in-out infinite; }
.rw-sc__svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .22)); }
.rw-sc__n { position: absolute; right: -8px; top: -6px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: #FF5A5A; color: #fff; font: 700 .8rem var(--font-display); box-shadow: 0 0 0 2px var(--card); }
.rw-sc__name { font: 700 .8rem/1.15 var(--font-display); min-height: 2.3em; display: flex; align-items: center; }
.rw-sc__btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; width: 100%; min-height: 44px; padding: 0 4px; border: 0; border-radius: 13px; cursor: pointer; font: 700 .92rem var(--font-display); }
.rw-sc__btn .ndj-ic, .rw-sc__btn .rw-coin { width: 18px; height: 18px; }
.rw-sc__btn.is-open { color: #fff; background: linear-gradient(180deg, #FF8A5C, #F0502F); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 10px 16px -10px rgba(240, 80, 47, .9); }
.rw-sc__btn.is-buy { color: #4A2E00; background: linear-gradient(180deg, #FFEE9A 0%, #FFD23F 52%, #F5A81A 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 8px 14px -8px rgba(200, 120, 0, .8); }
.rw-sc__btn.is-buy:disabled { opacity: .45; cursor: not-allowed; }
.rw-sc__btn.is-confirm { color: #fff; background: linear-gradient(180deg, #3A3D5C, #1F2137); box-shadow: 0 0 0 2px var(--rw-gold-2); animation: ndj-pulse 1.2s ease-in-out infinite; }
.rw-look { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rw-look__slot { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; min-height: 44px; padding: 8px 4px 8px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); color: var(--fg); cursor: pointer; box-shadow: var(--shadow-sm); }
.rw-look__slot .pv { transform: scale(.78); margin: -6px 0; }
.rw-look__slot.is-open { border-color: var(--rw-coral); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rw-coral) 25%, transparent); }
.rw-look__kind { max-width: 100%; font: 700 .68rem var(--font-display); letter-spacing: .04em; text-transform: uppercase; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rw-look__name { max-width: 100%; font: 700 .8rem/1.15 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-def { border-radius: 18px; background: var(--bg-2); font-size: 1.8rem; line-height: 1; }
.rw-pick { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; padding: 4px 2px 6px; scroll-snap-type: x proximity; }
.rw-pick__it { flex: none; width: 88px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; min-height: 44px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--fg); cursor: pointer; scroll-snap-align: start; }
.rw-pick__it .pv { transform: scale(.72); margin: -8px 0; }
.rw-pick__it.is-on { border-color: #20B27A; box-shadow: 0 0 0 3px rgba(32, 178, 122, .25); }
.rw-pick__t { max-width: 100%; font: 700 .76rem/1.15 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rw-pick__more { flex: none; align-self: center; padding: 0 8px; font-size: .8rem; font-weight: 800; color: var(--fg-2); white-space: nowrap; }
.rw-sheet__note { font-size: .78rem; font-weight: 700; color: var(--fg-2); text-align: center; }
@media (max-width: 370px) {
  .rw-look { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rw-sheet__n { font-size: 1.7rem; }
}
@media (min-width: 600px) {
  .rw-sheet { align-items: center; padding: 16px; }
  .rw-sheet__box { border-radius: 28px; }
  .rw-sheet__foot { border-radius: 0 0 28px 28px; }
  .rw-sheet__grab { display: none; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .rw-sheet__grab { background: rgba(255, 255, 255, .22); }
  :root:not([data-theme="light"]) .rw-gp--sheet .rw-gp__count { color: #FFD23F; }
  :root:not([data-theme="light"]) .rw-sheet__box { box-shadow: 0 -24px 50px -20px rgba(0, 0, 0, .8), 0 -1px 0 rgba(255, 255, 255, .08); }
}
:root[data-theme="dark"] .rw-sheet__grab { background: rgba(255, 255, 255, .22); }
:root[data-theme="dark"] .rw-gp--sheet .rw-gp__count { color: #FFD23F; }

@media (prefers-reduced-motion: reduce) {
  .rw-ov__rays, .rw-up__burst, .ck-btn .ck-art, .rw-lvl__bar > i::after, .rw-btn--go::after, .rw-btn--chest::after { animation: none !important; }
  .rw-line { opacity: 1; transform: none; }
  .rw-gp--reward { opacity: 1; transform: none; }
  .rw-gp.is-earned .rw-gp__art, .rw-sc.has .rw-sc__art, .rw-sheet__live, .rw-sheet__back.is-ping, .rw-sc__btn.is-confirm { animation: none !important; }
  .rw-sheet__box, .rw-sheet__scrim { animation: none !important; transition: none !important; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .rw-line { background: linear-gradient(180deg, #2E2E5A, #26264C); color: #F3F1FF; }
  :root:not([data-theme="light"]) .rw-line.is-ach { background: linear-gradient(180deg, #4A3D22, #3B3019); }
  :root:not([data-theme="light"]) .rw-line__ic { background: rgba(255, 255, 255, .08); }
  :root:not([data-theme="light"]) .rw-line__c { color: #FFD23F; }
  :root:not([data-theme="light"]) .rw-line__xp { background: rgba(167, 139, 250, .2); color: #C9B5FF; }
  :root:not([data-theme="light"]) .rw-gift, :root:not([data-theme="light"]) .ck-card { background: linear-gradient(180deg, #2E2E5A, #23234A); color: #F3F1FF; }
  :root:not([data-theme="light"]) .ck-card__art { background: radial-gradient(circle, color-mix(in srgb, var(--rc) 30%, #23234A), #23234A 70%); }
  :root:not([data-theme="light"]) .pv__q { color: rgba(255, 255, 255, .5); }
  :root:not([data-theme="light"]) .pv.is-locked > :not(.pv__q) { filter: brightness(0) invert(1); opacity: .14; }
}
:root[data-theme="dark"] .rw-line { background: linear-gradient(180deg, #2E2E5A, #26264C); color: #F3F1FF; }
:root[data-theme="dark"] .rw-line__c { color: #FFD23F; }
:root[data-theme="dark"] .rw-gift, :root[data-theme="dark"] .ck-card { background: linear-gradient(180deg, #2E2E5A, #23234A); color: #F3F1FF; }
:root[data-theme="dark"] .pv.is-locked > :not(.pv__q) { filter: brightness(0) invert(1); opacity: .14; }
.pv-conf--juntos { --c1: #E4572E; --c2: #D9A441; --c3: #2B2A4C; }
