/* UNO Skyair — thème « nuit néon » */
:root {
  --bg: #0a0e27;
  --bg2: #151a45;
  --glass: rgba(255, 255, 255, .08);
  --glass-b: rgba(255, 255, 255, .16);
  --ink: #f4f6ff;
  --muted: #9aa3d6;
  --accent: #ff4d6d;
  --neon: #5ef2ff;
  --r: #ff4d6d;
  --b: #3d8bff;
  --g: #17c98b;
  --y: #ffc93c;
  --r-d: #c4254a;
  --b-d: #2459c2;
  --g-d: #0b8f61;
  --y-d: #d99a00;
  --cw: clamp(70px, 21vw, 94px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: 'Rubik', system-ui, sans-serif; overflow: hidden; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; touch-action: manipulation; }
input { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* Ciel étoilé */
.sky { position: fixed; inset: 0; z-index: 0; background:
  radial-gradient(60% 40% at 15% 10%, rgba(139, 92, 246, .35), transparent 70%),
  radial-gradient(55% 40% at 90% 30%, rgba(94, 242, 255, .22), transparent 70%),
  radial-gradient(70% 50% at 50% 110%, rgba(255, 77, 109, .28), transparent 70%),
  linear-gradient(180deg, #0a0e27, #131845 60%, #1c1650); }
.sky::before, .sky::after { content: ''; position: absolute; inset: 0; background-image:
  radial-gradient(1.5px 1.5px at 20px 30px, #fff, transparent),
  radial-gradient(1px 1px at 90px 120px, #cfe, transparent),
  radial-gradient(1.5px 1.5px at 160px 60px, #fff, transparent),
  radial-gradient(1px 1px at 230px 180px, #fde, transparent),
  radial-gradient(1px 1px at 300px 90px, #fff, transparent);
  background-size: 320px 220px; opacity: .55; animation: twinkle 6s ease-in-out infinite alternate; }
.sky::after { background-size: 210px 260px; background-position: 40px 70px; animation-delay: -3s; opacity: .35; }
@keyframes twinkle { from { opacity: .25 } to { opacity: .65 } }

#app { position: relative; z-index: 1; height: 100%; max-width: 560px; margin: 0 auto; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; padding: max(14px, env(safe-area-inset-top)) 16px calc(14px + var(--safe-b)); }

/* ----- Boutons / champs ----- */
.btn:hover { filter: brightness(1.1); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 16px; background: var(--glass); border: 1.5px solid var(--glass-b); font-weight: 700; letter-spacing: .02em; transition: transform .12s, filter .12s, background .12s; }
.btn:active { transform: scale(.96); }
.btn.primary { background: linear-gradient(135deg, #ff4d6d, #ff8a4c); border-color: transparent; box-shadow: 0 8px 24px rgba(255, 77, 109, .4), inset 0 1px 0 rgba(255, 255, 255, .4); font-size: 1.05rem; }
.btn.danger { background: rgba(255, 77, 109, .18); border-color: rgba(255, 77, 109, .5); }
.btn.ghost { background: transparent; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: .9rem; border-radius: 12px; }
.btn:disabled { opacity: .4; pointer-events: none; }
.icon-btn { transition: transform .12s, background .2s; }
.icon-btn:active { transform: scale(.9); }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; background: var(--glass); border: 1.5px solid var(--glass-b); font-size: 1.15rem; display: grid; place-items: center; }
input { width: 100%; min-height: 48px; padding: 0 16px; border-radius: 14px; background: rgba(0, 0, 0, .3); border: 1.5px solid var(--glass-b); font-weight: 700; font-size: 1.05rem; outline: none; }
input:focus { border-color: var(--neon); box-shadow: 0 0 0 3px rgba(94, 242, 255, .2); }
.panel { background: var(--glass); border: 1.5px solid var(--glass-b); border-radius: 24px; padding: 18px; display: flex; flex-direction: column; gap: 12px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.panel.mid { align-items: center; text-align: center; }
.lbl { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.error { margin: 0; min-height: 1.2em; color: #ff8fa3; font-weight: 500; text-align: center; font-size: .9rem; }
.hint { margin: 8px 0 0; color: var(--muted); text-align: center; font-size: .9rem; }
.row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--glass-b); }
.join-row { display: flex; gap: 10px; }
.join-row input { text-transform: uppercase; letter-spacing: .3em; text-align: center; flex: 1.1; min-width: 0; }
.join-row .btn { flex: 1; }

/* ----- Accueil ----- */
#home { justify-content: center; gap: 18px; overflow-y: auto; }
.logo { font-family: 'Baloo 2', sans-serif; font-weight: 800; text-align: center; font-size: 4.6rem; line-height: 1; display: flex; justify-content: center; align-items: flex-end; gap: 6px; }
.logo span { display: grid; place-items: center; width: 1.05em; height: 1.3em; border-radius: .22em; color: #fff; text-shadow: 0 3px 0 rgba(0, 0, 0, .25); box-shadow: 0 10px 30px rgba(0, 0, 0, .35), inset 0 2px 0 rgba(255, 255, 255, .35); }
.logo span:nth-child(1) { background: linear-gradient(160deg, var(--r), var(--r-d)); transform: rotate(-9deg); }
.logo span:nth-child(2) { background: linear-gradient(160deg, var(--y), var(--y-d)); transform: translateY(-8px) rotate(2deg); }
.logo span:nth-child(3) { background: linear-gradient(160deg, var(--b), var(--b-d)); transform: rotate(9deg); }
.logo small { align-self: center; margin-left: 10px; font-size: .28em; letter-spacing: .3em; text-transform: uppercase; color: var(--neon); text-shadow: 0 0 12px rgba(94, 242, 255, .8); font-family: 'Rubik'; font-weight: 700; }
.avatars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.avatar-opt { aspect-ratio: 1; border-radius: 16px; background: rgba(0, 0, 0, .25); border: 2px solid transparent; font-size: 1.7rem; display: grid; place-items: center; transition: transform .12s; }
.avatar-opt.sel { border-color: var(--neon); background: rgba(94, 242, 255, .15); box-shadow: 0 0 16px rgba(94, 242, 255, .35); transform: scale(1.08); }
.foot { text-align: center; color: var(--muted); font-size: .85rem; margin: 0; }

/* ----- Salon ----- */
.bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.bar h2 { margin: 0; font-family: 'Baloo 2'; font-size: 1.5rem; }
.bar-spacer { width: 44px; }
.room-code { font-family: 'Baloo 2'; font-weight: 800; font-size: 3.4rem; letter-spacing: .18em; padding-left: .18em; color: var(--neon); text-shadow: 0 0 22px rgba(94, 242, 255, .6); line-height: 1.1; }
.lobby-players { flex: 1; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; padding: 16px 0; }
.slot { border-radius: 20px; background: var(--glass); border: 1.5px solid var(--glass-b); padding: 14px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 130px; justify-content: center; position: relative; }
.slot.empty { border-style: dashed; background: transparent; color: var(--muted); font-size: .85rem; }
.slot .nm { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot .tag { position: absolute; top: 8px; right: 8px; font-size: .68rem; padding: 2px 8px; border-radius: 99px; background: rgba(255, 201, 60, .2); color: var(--y); font-weight: 700; }
.slot .wins { font-size: .75rem; color: var(--muted); }
.slot.off { opacity: .45; }
.lobby-foot { padding-top: 8px; }
.lobby-foot .btn { width: 100%; }

.av { display: grid; place-items: center; width: var(--s, 56px); height: var(--s, 56px); border-radius: 50%; font-size: calc(var(--s, 56px) * .55); background: radial-gradient(circle at 30% 25%, #4a4f9c, #232866); border: 3px solid #ffe28a; box-shadow: 0 4px 14px rgba(0, 0, 0, .45); line-height: 1; }

/* ----- Partie ----- */
#game { padding: 0; }
.hud { display: flex; align-items: center; justify-content: space-between; padding: max(8px, env(safe-area-inset-top)) 12px 4px; gap: 8px; }
.hud-right { display: flex; gap: 8px; }
.hud-code { font-size: .8rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.hud-code b { color: var(--neon); font-family: 'Baloo 2'; font-size: 1.1rem; letter-spacing: .18em; }

.table { position: relative; flex: 1; min-height: 0; margin: 0 10px; }
.ring { position: absolute; inset: 2% 0 0; border-radius: 46% 46% 44% 44% / 42% 42% 52% 52%; background:
  radial-gradient(70% 60% at 50% 45%, #231d63 0%, #15123d 70%),
  #15123d;
  border: 6px solid transparent; background-clip: padding-box; box-shadow: 0 0 0 4px #5b3fd1, 0 0 0 7px rgba(94, 242, 255, .5), 0 0 40px rgba(94, 242, 255, .35), inset 0 0 60px rgba(0, 0, 0, .55); }
.ring::before { content: ''; position: absolute; inset: 10px; border-radius: inherit; border: 2px dashed rgba(255, 255, 255, .12); }
.dir-arrows { position: absolute; left: 50%; top: 50%; width: min(86%, 380px); aspect-ratio: 1; transform: translate(-50%, -48%); pointer-events: none; opacity: .5; }
.dir-arrows { animation: spin 14s linear infinite; will-change: transform; }
.dir-g path { fill: none; stroke: var(--neon); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 2 9; }
.dir-g .head { fill: var(--neon); stroke: none; stroke-dasharray: none; }
.dir-arrows.ccw { animation-direction: reverse; }
@keyframes spin { from { transform: translate(-50%, -48%) rotate(0deg); } to { transform: translate(-50%, -48%) rotate(360deg); } }

.center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; gap: 18px; align-items: center; }
.deck { position: relative; width: calc(var(--cw) * .92); height: calc(var(--cw) * 1.38); }
.deck-stack { position: absolute; inset: 0; border-radius: 12px; }
.deck-stack, .back { background:
  repeating-linear-gradient(45deg, rgba(255, 255, 255, .09) 0 6px, transparent 6px 12px),
  linear-gradient(160deg, #3b2f9e, #1b1654);
  border: 3px solid #f4f6ff; box-shadow: 0 6px 14px rgba(0, 0, 0, .5); }
.deck-stack { box-shadow: 0 6px 14px rgba(0, 0, 0, .5), 3px 3px 0 -1px #2a2380, 3px 3px 0 1px #f4f6ff, 6px 6px 0 -1px #2a2380, 6px 6px 0 1px #f4f6ff; }
.deck-stack::after, .back::after { content: 'U'; position: absolute; inset: 0; display: grid; place-items: center; font-family: 'Baloo 2'; font-weight: 800; font-size: calc(var(--cw) * .5); color: #ffc93c; text-shadow: 0 2px 0 #7a4e00; opacity: .95; }
.deck.can { animation: pulse 1.1s ease-in-out infinite; }
.deck.can .deck-stack { border-color: var(--neon); }
.deck span { position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); font-size: .7rem; background: rgba(0, 0, 0, .65); padding: 1px 8px; border-radius: 99px; color: var(--muted); }
@keyframes pulse { 50% { transform: scale(1.06); filter: drop-shadow(0 0 12px rgba(94, 242, 255, .8)); } }
.discard { position: relative; width: calc(var(--cw) * 1.12); height: calc(var(--cw) * 1.68); }
.discard .card { position: absolute; inset: 0; width: 100%; height: 100%; --cw: calc(var(--cw0) * 1.12); transform: translate(var(--dx, 0), var(--dy, 0)) rotate(var(--r, 0deg)); box-shadow: 0 6px 16px rgba(0, 0, 0, .45); }
.discard .card:not(:last-child) { filter: brightness(.8); }
.discard .card:last-child { box-shadow: 0 10px 26px rgba(0, 0, 0, .55), 0 0 22px color-mix(in srgb, var(--cl) 45%, transparent); }
.discard { --cw0: var(--cw); }
.discard .card.pop { animation: pop .38s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pop { from { scale: 1.4; opacity: .3 } }

.need { transition: border-color .3s, box-shadow .3s; box-shadow: 0 0 16px color-mix(in srgb, var(--cc, #fff) 40%, transparent); position: absolute; left: 50%; top: calc(50% + var(--cw) * 1.12); transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 5px 14px 5px 8px; border-radius: 99px; background: rgba(0, 0, 0, .55); border: 2px solid var(--cc, #fff); font-weight: 800; font-size: .9rem; white-space: nowrap; }
.need .dot { transition: background .3s; width: 22px; height: 22px; border-radius: 50%; background: var(--cc); display: grid; place-items: center; }
.need .dot svg { width: 14px; height: 14px; fill: #fff; }

.banner { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%) scale(.6); font-family: 'Baloo 2'; font-weight: 800; font-size: 2.2rem; padding: 4px 22px; border-radius: 18px; background: rgba(255, 77, 109, .92); box-shadow: 0 8px 30px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; z-index: 20; white-space: nowrap; text-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.banner.show { animation: banner 1.4s ease both; }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4) } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.08) } 25% { transform: translate(-50%, -50%) scale(1) } 80% { opacity: 1 } 100% { opacity: 0; transform: translate(-50%, -80%) scale(1) } }

/* Sièges adverses */
.seat { position: absolute; transform: translate(-50%, -50%) scale(var(--sc, 1)); transition: transform .35s cubic-bezier(.2, 1.3, .4, 1), filter .2s, opacity .2s; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 92px; z-index: 5; }
.seat.turn { --sc: 1.1; z-index: 6; }
.seat .fan { position: relative; height: 40px; width: 70px; margin-bottom: -6px; }
.seat .fan .back { position: absolute; left: 50%; bottom: 0; width: 28px; height: 40px; border-radius: 6px; border-width: 2px; transform-origin: 50% 130%; transform: translateX(-50%) rotate(var(--fr, 0deg)); animation: fanIn .3s cubic-bezier(.2, 1.2, .4, 1) backwards; }
@keyframes fanIn { from { transform: translateX(-50%) rotate(0deg); } }
.seat .count.bump { animation: bump .4s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes bump { 40% { scale: 1.45; } }
.seat .fan .back::after { font-size: 14px; }
.seat .count { position: absolute; right: -2px; top: -4px; z-index: 3; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px; background: #ff4d6d; border: 2px solid #fff; font-weight: 800; font-size: .8rem; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.seat .nm { font-size: .72rem; font-weight: 700; max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 3px #000; }
.seat.off { opacity: .45; filter: grayscale(.6); }
.ringed { position: relative; display: grid; place-items: center; border-radius: 50%; padding: 4px; background: conic-gradient(var(--neon) calc(var(--p, 0) * 1turn), rgba(255, 255, 255, .15) 0); }
.seat:not(.turn) .ringed, .me-seat:not(.turn) .ringed { background: transparent; padding: 4px; }
.av { transition: box-shadow .3s; }
.seat.turn .av, .me-seat.turn .av { box-shadow: 0 0 18px var(--neon); animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 30px var(--neon), 0 0 6px #fff; } }
.ringed.warn { background: conic-gradient(#ff4d6d calc(var(--p, 0) * 1turn), rgba(255, 255, 255, .15) 0); }
.uno-tag { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); background: #ffc93c; color: #3a2a00; font-weight: 900; font-size: .62rem; padding: 1px 7px; border-radius: 99px; letter-spacing: .06em; z-index: 4; animation: pulse 1s infinite; }
.emote { position: fixed; transform: translateX(-50%); font-size: 2rem; animation: emote 2.6s ease both; pointer-events: none; z-index: 10; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)); }
@keyframes emote { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.4) } 12% { opacity: 1; transform: translate(-50%, 0) scale(1.2) } 20% { transform: translate(-50%, 0) scale(1) } 85% { opacity: 1 } 100% { opacity: 0; transform: translate(-50%, -16px) } }

/* Dock du joueur */
.dock { position: relative; margin-top: -34px; z-index: 6; padding: 6px 0 calc(8px + var(--safe-b)); background: linear-gradient(180deg, transparent, rgba(8, 6, 30, .75) 30%); }
.actions { display: flex; align-items: center; gap: 10px; padding: 0 14px; min-height: 58px; }
.me-seat { position: relative; display: flex; align-items: center; gap: 8px; margin-right: auto; }
.me-seat .nm { font-weight: 700; font-size: .85rem; max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer-text { font-family: 'Baloo 2'; font-weight: 800; font-size: 1.3rem; min-width: 2.2ch; text-align: right; color: var(--neon); }
.timer-text.warn { color: #ff4d6d; animation: pulse .6s infinite; }
.btn.pass { background: linear-gradient(135deg, #ff4d6d, #ff8a4c); border-color: transparent; min-width: 96px; }
.btn.pass:disabled { background: var(--glass); border: 1.5px solid var(--glass-b); }

.hand { position: relative; height: calc(var(--cw) * 1.5 + 48px); overflow-x: auto; overflow-y: hidden; display: flex; align-items: flex-end; justify-content: safe center; padding: 22px 16px 16px; touch-action: pan-x; scrollbar-width: none; }
.hand::-webkit-scrollbar { display: none; }
.hand .card { flex: none; margin-left: var(--ov, -40px); transform: translateY(var(--ty, 0)) rotate(var(--rot, 0deg)); transform-origin: 50% 160%; transition: transform .3s cubic-bezier(.2, 1.1, .3, 1), margin-left .3s cubic-bezier(.2, 1, .3, 1), translate .2s ease, filter .25s, box-shadow .25s; will-change: transform; cursor: pointer; }
@media (hover: hover) { .hand .card:not(.sel):hover { translate: 0 -14px; z-index: 40; } }
.hand .card:first-child { margin-left: 0; }
.hand .card.dim { filter: brightness(.68) saturate(.75); }
.hand .card.sel { transform: translateY(-26px) rotate(0deg) scale(1.08); z-index: 50; filter: none; box-shadow: 0 0 0 3px var(--neon), 0 12px 24px rgba(0, 0, 0, .55); }
.hand .card.can:not(.sel) { transform: translateY(calc(var(--ty, 0px) - 8px)) rotate(var(--rot, 0deg)); }
.hand .card.shake { animation: shake .3s; }
@keyframes shake { 25% { translate: -5px 0 } 75% { translate: 5px 0 } }
.hand .card.fresh { animation: deal .4s cubic-bezier(.2, 1, .3, 1) backwards; }
@keyframes deal { from { opacity: 0; translate: 0 -80px; } }

/* ----- Cartes ----- */
.card { position: relative; width: var(--cw); height: calc(var(--cw) * 1.5); border-radius: calc(var(--cw) * .16); background: linear-gradient(160deg, var(--cl), var(--cd)); border: calc(var(--cw) * .05) solid #fdfdff; box-shadow: 0 4px 10px rgba(0, 0, 0, .45); color: #fff; user-select: none; -webkit-user-select: none; overflow: hidden; font-family: 'Rubik'; }
.c-r { --cl: var(--r); --cd: var(--r-d); --cc: var(--r); }
.c-b { --cl: var(--b); --cd: var(--b-d); --cc: var(--b); }
.c-g { --cl: var(--g); --cd: var(--g-d); --cc: var(--g); }
.c-y { --cl: var(--y); --cd: var(--y-d); --cc: var(--y); }
.c-w { --cl: #2a2a3d; --cd: #0e0e1a; --cc: #fff; }
.card::before { content: ''; position: absolute; inset: -8%; background: #fff; clip-path: ellipse(37% 45% at 50% 50%); transform: rotate(26deg); opacity: .97; }
.card .face { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; }
.card .face b { font-family: 'Baloo 2'; font-weight: 800; font-size: calc(var(--cw) * .66); line-height: 1; color: var(--cc); text-shadow: 0 calc(var(--cw) * .025) 0 rgba(0, 0, 0, .18); }
.card .face svg { width: 52%; height: auto; }
.card .face .plus { font-size: calc(var(--cw) * .5); }
.card .face .plus small { font-size: .32em; display: block; letter-spacing: .08em; text-align: center; margin-top: -.2em; }
.card .cn { position: absolute; z-index: 2; font-weight: 900; font-size: calc(var(--cw) * .22); line-height: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; text-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.card .cn svg { width: calc(var(--cw) * .2); height: calc(var(--cw) * .2); fill: #fff; stroke: #fff; }
.card .cn.tl { left: calc(var(--cw) * .07); top: calc(var(--cw) * .06); }
.card .cn.br { right: calc(var(--cw) * .07); bottom: calc(var(--cw) * .06); transform: rotate(180deg); }
.card .face .u { text-decoration: underline; text-underline-offset: .06em; text-decoration-thickness: .06em; }
.card.back { background: none; }
.back { border-radius: 8px; }

/* ----- Fenêtres ----- */
.sheet { position: fixed; inset: 0; z-index: 100; background: rgba(4, 5, 20, .72); display: flex; align-items: flex-end; justify-content: center; backdrop-filter: blur(4px); animation: fade .2s; }
.sheet-card { will-change: transform; width: min(100%, 520px); padding: 22px 18px calc(22px + var(--safe-b)); background: linear-gradient(180deg, #232063, #15123d); border: 1.5px solid var(--glass-b); border-bottom: 0; border-radius: 28px 28px 0 0; display: flex; flex-direction: column; gap: 12px; animation: slide .28s cubic-bezier(.2, 1, .3, 1); text-align: center; }
.sheet-card h3 { margin: 0 0 4px; font-family: 'Baloo 2'; font-size: 1.5rem; }
@keyframes fade { from { opacity: 0 } }
@keyframes slide { from { transform: translateY(100%); } }
.colors { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pick { height: 84px; border-radius: 20px; background: linear-gradient(160deg, var(--cl), var(--cd)); border: 3px solid #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .4); position: relative; }
.pick:active { transform: scale(.95); }
.pick svg { width: 38px; height: 38px; fill: #fff; }
.pick { display: grid; place-items: center; }
.over-card { align-items: stretch; }
.trophy { font-size: 3.4rem; animation: pop .6s cubic-bezier(.2, 1.4, .4, 1); }
.scores { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.scores li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 16px; background: var(--glass); text-align: left; font-weight: 700; }
.scores li.win { background: rgba(255, 201, 60, .2); border: 1.5px solid var(--y); }
.scores li .av { --s: 38px; border-width: 2px; }
.scores li .n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scores li .w { color: var(--muted); font-size: .85rem; }
.scores li .left { color: var(--y); }
.over-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }

.tray { position: absolute; right: 12px; top: 58px; z-index: 40; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 10px; border-radius: 20px; background: rgba(20, 18, 70, .96); border: 1.5px solid var(--glass-b); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.tray button { font-size: 1.7rem; width: 52px; height: 52px; border-radius: 14px; background: var(--glass); }
.tray button:active { transform: scale(.9); }

.toast { transition: opacity .25s, transform .35s cubic-bezier(.2, 1.3, .4, 1) !important; position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -20px) scale(.9); background: rgba(0, 0, 0, .85); border: 1.5px solid var(--glass-b); padding: 10px 18px; border-radius: 99px; font-weight: 500; font-size: .9rem; opacity: 0; transition: .25s; pointer-events: none; z-index: 200; max-width: 90%; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

.screen:not(.hidden) { animation: screenIn .35s cubic-bezier(.2, .9, .3, 1); }
@keyframes screenIn { from { opacity: 0; transform: translateY(12px) scale(.985); } }
.confetti { position: fixed; top: 0; width: 8px; height: 14px; border-radius: 2px; z-index: 150; pointer-events: none; will-change: transform; }
.fly { will-change: transform; position: fixed; z-index: 90; pointer-events: none; margin: 0 !important; transform-origin: top left; }

@media (min-width: 700px) {
  :root { --cw: 90px; }
  #app { border-left: 1px solid var(--glass-b); border-right: 1px solid var(--glass-b); }
}
@media (max-height: 640px) { :root { --cw: 60px; } .logo { font-size: 3.4rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
