/* Schermata dei risultati a fine partita e promozioni (js/result.js) */
.rs, .pm { position: fixed; inset: 0; color: #fff; font-family: var(--font); user-select: none; -webkit-user-select: none; overflow: hidden; }
.rs { z-index: 90; display: flex; flex-direction: column; animation: rsin .25s ease-out; --g1: #3a5fd8; --g2: #0b1038; --tc: #ffd24a; }
@keyframes rsin { from { opacity: 0; } }
.rs.win { --g1: #4a6cf0; --g2: #0b1038; --tc: #ffd24a; } .rs.mid { --g1: #5b46c8; --g2: #100b30; --tc: #d8c8ff; }
.rs.draw { --g1: #66728e; --g2: #12151f; --tc: #e8edf5; } .rs.lose { --g1: #8c2c3a; --g2: #1a080e; --tc: #ff8a8a; }
.rs-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 18%, var(--g1) 0%, color-mix(in srgb, var(--g1) 35%, var(--g2)) 40%, var(--g2) 85%); overflow: hidden; }
.rs-rays { position: absolute; left: 50%; top: 12%; width: 220vmax; height: 220vmax; transform: translate(-50%, -50%); opacity: .35; animation: rsspin 40s linear infinite;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .5) 0 6deg, transparent 6deg 18deg); -webkit-mask: radial-gradient(circle, #000 0, transparent 46%); mask: radial-gradient(circle, #000 0, transparent 46%); }
.rs.lose .rs-rays, .rs.draw .rs-rays { opacity: .1; }
@keyframes rsspin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.rs-fx, .pm-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 6; pointer-events: none; }
.rs-flash { position: absolute; inset: 0; z-index: 7; pointer-events: none; }

.rs-top { position: relative; z-index: 3; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: calc(1.6vh + var(--safe-t)) calc(2.5vw + var(--safe-r)) 0 calc(2.5vw + var(--safe-l)); }
.rs-title { grid-column: 2; text-align: center; animation: rsslam .7s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes rsslam { 0% { transform: scale(3.2); opacity: 0; } 55% { transform: scale(.92); opacity: 1; } 100% { transform: none; } }
.rs-title h1 { margin: 0; font-size: clamp(30px, 10vh, 84px); line-height: 1; letter-spacing: 3px; color: var(--tc); -webkit-text-stroke: clamp(5px, 1.2vh, 10px) var(--ink); paint-order: stroke fill; text-shadow: 0 .6vh 0 var(--ink), 0 0 3vh color-mix(in srgb, var(--tc) 60%, transparent); }
.rs-title small { display: block; margin-top: .4vh; font-size: clamp(11px, 2.2vh, 17px); color: #dde3f5; letter-spacing: 1.5px; text-transform: uppercase; opacity: .9; }
.rs-cur { grid-column: 3; justify-self: end; }
.rs-cur span { transition: transform .15s; }

.rs-main { position: relative; z-index: 3; flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 33%) minmax(0, 1fr); gap: 3vw; align-items: center; padding: 1.2vh calc(4vw + var(--safe-r)) 0 calc(4vw + var(--safe-l)); max-width: 1180px; width: 100%; margin: 0 auto; }
.rs-hero { height: 100%; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2vh; }
.rs-card { position: relative; height: min(100%, 58vh); aspect-ratio: 3 / 3.6; border-radius: 16px; border: 4px solid var(--ink); overflow: hidden; background: radial-gradient(ellipse at 50% 38%, color-mix(in srgb, var(--rc) 55%, #fff) 0%, var(--rc) 45%, color-mix(in srgb, var(--rc) 55%, #000) 100%); box-shadow: 0 .8vh 2vh rgba(0, 0, 0, .55), 0 0 0 3px color-mix(in srgb, var(--rc) 80%, #fff), 0 0 4vh color-mix(in srgb, var(--rc) 70%, transparent); animation: rscard .6s .3s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes rscard { from { transform: translateX(-60px) scale(.8); opacity: 0; } }
.rs-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 8%; }
.rs.lose .rs-card img { filter: grayscale(.6) brightness(.8); }
.rs-hn { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.4vh 4px .8vh; text-align: center; font-size: clamp(16px, 3.6vh, 28px); text-transform: uppercase; letter-spacing: 1.5px; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; background: linear-gradient(transparent, rgba(8, 6, 4, .85) 60%); }

.rs-streak { display: flex; align-items: center; gap: 1vh; opacity: 0; transform: scale(.4); transition: opacity .3s, transform .5s cubic-bezier(.2, 1.6, .4, 1); font-size: clamp(11px, 2.1vh, 16px); letter-spacing: 1px; }
.rs-streak.in { opacity: 1; transform: none; }
.rs-streak span { -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.rs-streak em { font-style: normal; color: #ffb347; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; padding: 2px 8px; border-radius: 10px; background: rgba(0, 0, 0, .45); border: 2px solid #ff8a1f; }
.rs-fl { position: relative; width: 7.4vh; height: 7.4vh; min-width: 34px; min-height: 34px; display: grid; place-items: center; animation: rsfire .7s ease-in-out infinite alternate; filter: drop-shadow(0 0 1.4vh rgba(255, 130, 30, .9)); }
.rs-fl .ico { position: absolute; inset: 0; width: 100%; height: 100%; }
.rs-fl b { position: relative; margin-top: 22%; font-size: clamp(14px, 3.4vh, 26px); font-weight: 400; -webkit-text-stroke: 4px #5a1400; paint-order: stroke fill; }
.rs-fl.out { filter: grayscale(1) brightness(.7); animation: none; }
@keyframes rsfire { to { transform: scale(1.1) rotate(-3deg); filter: drop-shadow(0 0 2.2vh rgba(255, 170, 40, 1)); } }

.rs-list { display: flex; flex-direction: column; justify-content: center; gap: 1.5vh; min-height: 0; }
.rs-row { display: flex; align-items: center; gap: 1.8vh; padding: 1.2vh 1.8vh; border-radius: 14px; border: 3px solid var(--ink); background: linear-gradient(rgba(22, 18, 48, .82), rgba(9, 7, 22, .92)); box-shadow: 0 .5vh 1.2vh rgba(0, 0, 0, .45), inset 0 2px 0 rgba(255, 255, 255, .12);
  opacity: 0; transform: translateX(60px); transition: opacity .3s, transform .45s cubic-bezier(.2, 1.3, .4, 1); }
.rs-row.in { opacity: 1; transform: none; }
.rs-body { flex: 1; min-width: 0; display: grid; gap: .5vh; }
.rs-line { display: flex; align-items: baseline; gap: 1.4vh; }
.rs-lab { font-weight: 400; font-size: clamp(12px, 2.3vh, 18px); letter-spacing: 1.5px; color: #c9d2f0; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-num { font-size: clamp(22px, 5.6vh, 44px); line-height: 1; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; }
.rs-d { font-style: normal; font-size: clamp(16px, 3.6vh, 28px); color: #7dff9a; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; } .rs-d.neg { color: #ff6a5a; }
.rs-tr .rs-ico { width: clamp(44px, 10vh, 80px); height: clamp(44px, 10vh, 80px); } .rs-ico .ico { width: 100%; height: 100%; filter: drop-shadow(0 .4vh 0 rgba(0, 0, 0, .5)); }
.rs-rk { display: flex; align-items: center; gap: 1.2vh; } .rs-rk .rs-bar { flex: 1; }
.rs-emb { display: block; line-height: 0; } .rs-emb svg { height: clamp(30px, 6.4vh, 52px); width: auto; filter: drop-shadow(0 .3vh 0 rgba(0, 0, 0, .5)); }
.rs-bar { height: clamp(18px, 3.2vh, 26px); border-width: 3px; } .rs-bar b { font-size: clamp(10px, 1.9vh, 14px); -webkit-text-stroke: 2.5px var(--ink); }
.rs-bonus { display: flex; align-items: center; gap: .6vh; font-size: clamp(10px, 1.9vh, 14px); color: #ffb347; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; animation: rsbon 1s ease-in-out infinite alternate; }
.rs-bonus .ico { width: 2.4vh; height: 2.4vh; min-width: 14px; min-height: 14px; }
@keyframes rsbon { to { filter: brightness(1.35); } }

.rs-cu { gap: 3vh; } .rs-cell { flex: 1; display: flex; align-items: center; gap: 1.2vh; min-width: 0; }
.rs-cell .cico { height: clamp(30px, 6.4vh, 52px); max-width: 60px; }
.rs-cell small { display: block; font-size: clamp(10px, 1.9vh, 14px); letter-spacing: 1.5px; color: #c9d2f0; -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill; }
.rs-cell b { display: block; font-size: clamp(20px, 4.4vh, 34px); font-weight: 400; color: #ffe27a; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; }
.rs-cell[data-k="crystals"] b { color: #f0c8ff; }
.rs-lvl { position: relative; flex: none; width: clamp(40px, 8vh, 64px); height: clamp(40px, 8vh, 64px); display: grid; place-items: center; }
.rs-lvl .ico { position: absolute; inset: 0; width: 100%; height: 100%; }
.rs-lvn { position: relative; z-index: 1; margin-top: 8%; font-size: clamp(16px, 3.6vh, 28px); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; }
.rs-xp .rs-bar i { background: linear-gradient(#bfe4ff, #3b9dff 60%, #1a5fc8); }
.rs-tm { flex: none; line-height: 0; } .rs-tm svg { height: clamp(40px, 8.4vh, 66px); width: auto; filter: drop-shadow(0 .3vh 0 rgba(0, 0, 0, .5)); }
.rs-hr .rs-bar i { background: linear-gradient(#fff3a0, #f5a300); }

.rs-fly { position: fixed; left: 0; top: 0; z-index: 8; width: clamp(26px, 6vh, 48px); height: clamp(26px, 6vh, 48px); pointer-events: none; will-change: transform; }
.rs-fly .ico, .rs-fly .cico { width: 100%; height: 100%; max-width: none; filter: drop-shadow(0 0 1vh rgba(255, 210, 80, .9)); }
.rs-fly.lost .ico { filter: grayscale(.8) drop-shadow(0 0 1vh rgba(255, 60, 60, .8)); }

.rs-bot { position: relative; z-index: 3; display: flex; justify-content: center; gap: 2.4vw; padding: 1.4vh 0 calc(2vh + var(--safe-b, 0px)); opacity: 0; transform: translateY(40px); pointer-events: none; transition: opacity .35s, transform .5s cubic-bezier(.2, 1.4, .4, 1); }
.rs-bot .btn { min-width: clamp(110px, 18vw, 200px); font-size: clamp(16px, 3.4vh, 26px); }
.rs.done .rs-bot { opacity: 1; transform: none; pointer-events: auto; }
.rs-tap { position: absolute; z-index: 3; bottom: 1.4vh; left: 0; right: 0; text-align: center; font-size: clamp(10px, 1.8vh, 14px); letter-spacing: 2px; color: #fff; opacity: .5; text-transform: uppercase; pointer-events: none; }
.rs.done .rs-tap { display: none; }
@media (max-height: 460px) { .rs-main { gap: 2.4vw; } .rs-row { padding: .8vh 1.4vh; } .rs-list { gap: 1vh; } .rs-card { height: min(100%, 54vh); } .rs-streak em { display: none; } .rs-bonus { display: none; } }
@media (max-width: 700px) { .rs-main { grid-template-columns: minmax(0, 28%) minmax(0, 1fr); } .rs-hero .rs-streak span { display: none; } }

/* promozioni a tutto schermo */
.pm { z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #05030a; cursor: pointer; animation: rsin .3s ease-out; }
.pm-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 50%, rgba(var(--pcr), .32) 0%, rgba(var(--pcr), .1) 38%, #05030a 75%); transition: background .6s; }
.pm.shown .pm-bg { background: radial-gradient(ellipse at 50% 50%, rgba(var(--pcr), .7) 0%, rgba(var(--pcr), .28) 42%, #05030a 80%); }
.pm-rays { position: absolute; left: 50%; top: 50%; width: 200vmax; height: 200vmax; transform: translate(-50%, -50%); opacity: 0; transition: opacity .8s; animation: rsspin 30s linear infinite;
  background: repeating-conic-gradient(from 0deg, rgba(var(--pcr), .55) 0 7deg, transparent 7deg 20deg); -webkit-mask: radial-gradient(circle, #000 0, transparent 42%); mask: radial-gradient(circle, #000 0, transparent 42%); }
.pm.shown .pm-rays { opacity: .75; }
.pm-title { position: relative; z-index: 3; margin: 0; font-size: clamp(24px, 8vh, 66px); letter-spacing: 3px; text-align: center; color: #fff; -webkit-text-stroke: clamp(5px, 1.1vh, 9px) var(--ink); paint-order: stroke fill; text-shadow: 0 0 3vh rgba(var(--pcr), .9); animation: rsslam .7s cubic-bezier(.2, 1.4, .4, 1) both; }
.pm-sub { position: relative; z-index: 3; margin-top: .6vh; font-size: clamp(14px, 3vh, 24px); letter-spacing: 3px; text-transform: uppercase; color: rgb(var(--pcr)); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; }
.pm-stage { position: relative; z-index: 3; width: var(--px); height: var(--px); margin: 1.2vh 0 .4vh; display: grid; place-items: center; }
.pm-old, .pm-new { position: absolute; inset: 0; display: grid; place-items: center; }
.pm-old svg, .pm-new svg { max-width: 100%; max-height: 100%; filter: drop-shadow(0 1vh 2vh rgba(0, 0, 0, .6)); }
.pm-old { animation: pmold .8s ease-out both; }
@keyframes pmold { from { transform: scale(.3); opacity: 0; } }
.pm.shake .pm-old { animation: pmshake .09s linear infinite; filter: brightness(1.4); }
@keyframes pmshake { 0% { transform: translate(-1.2vh, .5vh) scale(1.03); } 50% { transform: translate(1.2vh, -.6vh) scale(1.06); } 100% { transform: translate(-.6vh, -.8vh) scale(1.03); } }
.pm.gone .pm-old { opacity: 0; transform: scale(1.4); transition: opacity .12s, transform .2s; animation: none; }
.pm-new { opacity: 0; transform: scale(0); }
.pm.shown .pm-new { animation: pmnew 1s cubic-bezier(.2, 1.5, .4, 1) forwards; }
@keyframes pmnew { 0% { opacity: 0; transform: scale(.1) rotate(-25deg); filter: brightness(5); } 55% { opacity: 1; transform: scale(1.14) rotate(4deg); filter: brightness(1.6); } 100% { opacity: 1; transform: none; filter: none; } }
.pm.quick .pm-old, .pm.quick .pm-new, .pm.quick .pm-title { animation-duration: .01s !important; }
.pm-name { position: relative; z-index: 3; height: clamp(32px, 8vh, 62px); width: 100%; }
.pm-name span { position: absolute; left: 0; right: 0; top: 0; text-align: center; font-size: clamp(22px, 6vh, 48px); letter-spacing: 3px; text-transform: uppercase; -webkit-text-stroke: clamp(4px, .9vh, 8px) var(--ink); paint-order: stroke fill; }
.pm-name .o { color: #d8d8e4; } .pm-name .n { color: rgb(var(--pcr)); text-shadow: 0 0 3vh rgba(var(--pcr), .9); opacity: 0; }
.pm.gone .pm-name .o { opacity: 0; transition: opacity .15s; }
.pm.shown .pm-name .n { animation: pmname .6s .15s ease-out forwards; }
@keyframes pmname { from { opacity: 0; transform: translateY(2.4vh) scale(.6); } to { opacity: 1; transform: none; } }
.pm-hint { position: relative; z-index: 3; margin-top: 1vh; font-size: clamp(12px, 2.6vh, 20px); letter-spacing: 3px; text-transform: uppercase; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; opacity: 0; }
.pm.ready .pm-hint { animation: pkpulse 1.2s ease-in-out infinite; }
.pm-lv { position: relative; width: calc(var(--px) * .86); height: calc(var(--px) * .86); display: grid; place-items: center; }
.pm-lv .ico { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; }
.pm-lv b { position: relative; margin-top: 8%; font-size: calc(var(--px) * .36); font-weight: 400; -webkit-text-stroke: calc(var(--px) * .035) var(--ink); paint-order: stroke fill; }

/* chip serie di vittorie (home) */
.streakchip { display: flex; align-items: center; gap: 5px; padding: 3px 12px 3px 8px; font-family: var(--font); }
.streakchip .ico { width: clamp(22px, 3.8vh, 30px); height: clamp(22px, 3.8vh, 30px); filter: drop-shadow(0 0 6px rgba(255, 140, 30, .9)); animation: rsfire .7s ease-in-out infinite alternate; }
.streakchip b { font-size: clamp(16px, 3vh, 24px); font-weight: 400; color: #ffb347; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.streakchip small { font-size: clamp(11px, 2vh, 15px); color: #7dff9a; -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill; }
@media (max-width: 900px) { .streakchip small { display: none; } .streakchip { padding: 3px 9px 3px 6px; } }

/* schede Characters: livello (in alto a sinistra) e Tier (in alto a destra) sono le due cose piu' importanti */
.card .lvbadge { top: 4px; left: 4px; width: clamp(46px, 4.6vw, 62px); height: clamp(46px, 4.6vw, 62px); font-size: clamp(20px, 2.1vw, 28px); filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .7)); z-index: 3; }
.card .lvbadge span { margin-top: 5px; -webkit-text-stroke: 4px var(--ink); }
.card .tieremb { top: 2px; left: auto; right: 2px; z-index: 3; }
.card .tieremb .tieremb-svg { height: clamp(66px, 6.6vw, 92px); width: auto; }
.card .tieremb.t0 { opacity: .85; }
.card .rolei { top: auto; right: auto; left: 6px; bottom: 56px; width: 26px; height: 26px; font-size: 15px; z-index: 3; }
.card .lock { top: 6px; left: 7px; }
.rs-want { position: absolute; z-index: 4; left: 0; right: 0; bottom: clamp(70px, 16vh, 130px); text-align: center; pointer-events: none; font-family: var(--font); font-size: clamp(14px, 3.4vh, 26px); color: #fff; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink); letter-spacing: .6px; display: grid; gap: 4px; }
.rs-want b { color: #ffd35a; font-weight: 400; }
.rs-want > div { animation: pulse 1.2s ease-in-out infinite; }
.rs-bot .btn.wait { opacity: .7; }

/* carta personaggio: barra del Tier sopra la barra delle souls */
.card .souls.tierc { bottom: 30px; height: 24px; }
.card .souls.tierc .tieremb-svg { position: absolute; left: -8px; top: 50%; transform: translateY(-50%); height: 36px; width: auto; z-index: 2; filter: drop-shadow(0 2px 3px rgba(0,0,0,.7)); }
.card .souls.tierc .pbar { height: 20px; border-width: 3px; margin-left: 18px; }
.card .souls.tierc .pbar b { font-size: 13px; -webkit-text-stroke: 2.5px var(--ink); } .card .souls.tierc .pbar b .ico { height: 1em; width: 1em; }
.card .souls.tierc .pbar i { background: linear-gradient(#fff, var(--tc, #e0a020)); }
.card .souls.tierc.max .pbar { box-shadow: 0 0 10px var(--tc); }
.card .cname { bottom: 54px; }
.card .rolei { bottom: 80px; }
.card .up { bottom: 60px; }
.card.locked .cname { bottom: 30px; } .card.locked .rolei { bottom: 56px; }
