/* Лингора «Уно» 2026-10-08 — original card look (CSS/SVG). */
.uno { position: fixed; inset: 0; z-index: 58; display: flex; flex-direction: column; background: var(--bg); overflow: hidden;
  background-image: radial-gradient(90% 55% at 50% 42%, rgba(178, 107, 255, .20), transparent 70%), radial-gradient(100% 50% at 0% 100%, var(--bg-glow-1), transparent 60%);
  padding: max(8px, env(safe-area-inset-top)) 12px max(10px, env(safe-area-inset-bottom)); animation: onbIn .3s var(--ease-out, ease) both; touch-action: manipulation;
  -webkit-user-select: none; user-select: none; }
.uno.out { animation: onbOut .2s ease both; }
.uno-topbar { flex: 0 0 auto; gap: 8px; flex-wrap: nowrap; }
.uno-topbar .gm-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 16px; }
.uno-dirchip { min-width: 38px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); font-size: 20px; font-weight: 900; color: var(--lilac, #F0C8FF); }

/* cards */
.uc { --c1: #F23A4B; --c2: #C21F35; position: relative; display: block; width: var(--uc-w, 64px); aspect-ratio: 2 / 3; border-radius: 10px; color: #fff;
  background: linear-gradient(150deg, var(--c1), var(--c2)); box-shadow: 0 0 0 3px #fff inset, 0 4px 10px rgba(10, 0, 30, .35); overflow: hidden; flex: 0 0 auto; }
.uc.c-r { --c1: #FF4D5E; --c2: #D21F3A; }
.uc.c-y { --c1: #FFD24A; --c2: #F2A900; color: #fff; }
.uc.c-g { --c1: #2FCB86; --c2: #12945C; }
.uc.c-b { --c1: #4593FF; --c2: #1C5FD6; }
.uc.c-w { --c1: #2A2340; --c2: #120E20; }
.uc-oval { position: absolute; left: 14%; right: 14%; top: 16%; bottom: 16%; border-radius: 50%; background: #fff; transform: rotate(24deg);
  display: grid; place-items: center; box-shadow: 0 2px 0 rgba(0, 0, 0, .08) inset; }
.uc.c-w .uc-oval { background: #0F0B1A; }
.uc-big { transform: rotate(-24deg); display: grid; place-items: center; color: var(--c2); font-weight: 900; line-height: 1; }
.uc-big b { font-size: calc(var(--uc-w, 64px) * .5); letter-spacing: -.04em; text-shadow: 1px 1px 0 rgba(0, 0, 0, .12); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.uc-big svg { width: calc(var(--uc-w, 64px) * .5); height: calc(var(--uc-w, 64px) * .5); }
.uc.c-w .uc-big svg { width: calc(var(--uc-w, 64px) * .58); height: calc(var(--uc-w, 64px) * .58); }
.uc.c-w .uc-big b { color: #fff; background: conic-gradient(#F23A4B 0 25%, #2E7DF7 0 50%, #22B573 0 75%, #FFC22E 0); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-shadow: none; }
.uc-k { position: absolute; font-size: calc(var(--uc-w, 64px) * .2); font-weight: 900; line-height: 1; text-shadow: 0 1px 1px rgba(0, 0, 0, .35); font-family: system-ui, -apple-system, Roboto, sans-serif; }
.uc-k svg { width: calc(var(--uc-w, 64px) * .22); height: calc(var(--uc-w, 64px) * .22); display: block; }
.uc-k.tl { left: 8%; top: 5%; }
.uc-k.br { right: 8%; bottom: 5%; transform: rotate(180deg); }
.uc.back { background: linear-gradient(150deg, #8B2FD9, #C2268E); }
.uc.back .uc-oval { background: rgba(255, 255, 255, .14); }
.uc.back .uc-big { color: #FFE07A; font-size: calc(var(--uc-w, 64px) * .42); transform: rotate(-24deg); }
.uc.mini { --uc-w: 30px; border-radius: 5px; box-shadow: 0 0 0 1.5px #fff inset; }
.uc.mini .uc-k { display: none; }
.uc.pile.chosen-r { box-shadow: 0 0 0 3px #fff inset, 0 0 0 4px #FF4D5E, 0 0 26px #FF4D5E; }
.uc.pile.chosen-y { box-shadow: 0 0 0 3px #fff inset, 0 0 0 4px #FFD24A, 0 0 26px #FFD24A; }
.uc.pile.chosen-g { box-shadow: 0 0 0 3px #fff inset, 0 0 0 4px #2FCB86, 0 0 26px #2FCB86; }
.uc.pile.chosen-b { box-shadow: 0 0 0 3px #fff inset, 0 0 0 4px #4593FF, 0 0 26px #4593FF; }

/* lobby */
.uno-lobby { flex: 1 1 auto; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 6px 4px 12px; text-align: center; }
.uno-hero { position: relative; width: 220px; height: 150px; flex: 0 0 auto; }
.uno-hero-cards .uc { --uc-w: 72px; position: absolute; top: 18px; left: 50%; animation: unoFan .7s var(--spring, ease) both; }
.uno-hero-cards .h1 { transform: translateX(-130%) rotate(-16deg); animation-delay: .05s; }
.uno-hero-cards .h2 { transform: translateX(-50%) translateY(-8px); animation-delay: .12s; z-index: 1; }
.uno-hero-cards .h3 { transform: translateX(30%) rotate(16deg); animation-delay: .19s; }
.uno-hero-lori.mascot { position: absolute; right: -18px; bottom: -6px; width: 70px; height: 70px; z-index: 2; }
.uno-l-title { margin-top: 4px; }
.uno-l-label { font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.uno-n { width: min(100%, 320px); }
.uno-n button { min-height: 52px; font-size: 20px; font-weight: 900; }
.uno-tw { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; border-radius: 14px; background: var(--surface-2); font-size: 14px; font-weight: 700; text-align: left; max-width: 340px; cursor: pointer; }
.uno-tw input { width: 22px; height: 22px; accent-color: #B26BFF; flex: 0 0 22px; }
.uno-go { max-width: 340px; min-height: 56px; font-size: 18px; font-weight: 900; }
.uno-rules { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.uno-rules > span { display: flex; flex-direction: column; align-items: center; gap: 4px; }
@keyframes unoFan { from { opacity: 0; top: 60px; } }

/* table */
.uno-opps { flex: 0 0 auto; display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 6px; margin-top: 2px; }
.uno-opps.n1 { --n: 1; } .uno-opps.n2 { --n: 2; } .uno-opps.n3 { --n: 3; }
.uno-opp { position: relative; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 16px; background: var(--surface-2); border: 1.5px solid var(--line); min-width: 0; transition: border-color .2s, box-shadow .2s, transform .2s; }
.uno-opps.n1 .uno-opp { justify-content: center; }
.uno-opp.turn { border-color: #FFC45C; box-shadow: 0 0 0 3px rgba(255, 196, 92, .22); transform: translateY(1px); }
.uno-opp.last .uno-cnt { background: #FF4D5E; }
.uno-avw { flex: 0 0 auto; display: block; }
.uno-av.mascot { width: 40px; height: 40px; display: block; }
.uno-opp.turn .uno-av svg { animation: lpJump 1s ease-in-out infinite; }
.uno-opp-t { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.uno-opp-t b { font-size: 13px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uno-fan { position: relative; height: 18px; width: 44px; display: block; }
.uno-fan i { position: absolute; left: calc(var(--j) * 5px); top: 0; width: 12px; height: 18px; border-radius: 3px; background: linear-gradient(150deg, #8B2FD9, #C2268E); box-shadow: 0 0 0 1px #fff inset; }
.uno-cnt { position: absolute; right: 6px; top: 6px; min-width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; background: #6A3FB8; color: #fff; font-size: 12px; font-weight: 900; padding: 0 5px; }
.uno-opps.n3 .uno-opp { flex-direction: column; text-align: center; gap: 2px; padding: 6px 4px; }
.uno-opps.n3 .uno-opp-t { align-items: center; width: 100%; }
.uno-opps.n3 .uno-opp-t b { max-width: 100%; }
.uno-say { position: absolute; left: 50%; bottom: -12px; transform: translate(-50%, 0) scale(.6); opacity: 0; pointer-events: none; z-index: 3; white-space: nowrap;
  padding: 4px 10px; border-radius: 999px; background: #FFC45C; color: #2A1142; font-size: 13px; font-weight: 900; box-shadow: 0 6px 16px rgba(0, 0, 0, .3); }
.uno-say.on { animation: unoSay 1.6s var(--spring, ease) both; }
@keyframes unoSay { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.6); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.08); } 25% { transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -6px) scale(.95); } }

.uno-mid { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.uno-center { position: relative; width: min(78vw, 290px); height: min(44vw, 170px); max-height: 100%; display: flex; align-items: center; justify-content: center; gap: 26px; }
.uno-center::before { content: ""; position: absolute; inset: -8px -10px; border-radius: 50%; background: radial-gradient(closest-side, var(--glow, rgba(255, 77, 94, .35)), transparent); transition: background .35s; pointer-events: none; }
.uno-center.col-r { --glow: rgba(255, 77, 94, .38); } .uno-center.col-y { --glow: rgba(255, 210, 74, .34); } .uno-center.col-g { --glow: rgba(47, 203, 134, .34); } .uno-center.col-b { --glow: rgba(69, 147, 255, .38); }
.uno-arrows { position: absolute; inset: -4px 0; display: grid; place-items: center; color: rgba(255, 255, 255, .16); pointer-events: none; }
.uno-arrows svg { width: min(46vw, 180px); height: min(46vw, 180px); animation: unoSpin 9s linear infinite; }
.uno-center.ccw .uno-arrows svg { animation-direction: reverse; transform: scaleX(-1); }
@keyframes unoSpin { to { transform: rotate(360deg); } }
.uno-deck { position: relative; width: 74px; height: 111px; border: 0; padding: 0; background: none; cursor: pointer; z-index: 1; border-radius: 12px; }
.uno-deck .uc { --uc-w: 74px; position: absolute; left: 0; top: 0; }
.uno-deck .d1 { transform: translate(-4px, 4px); } .uno-deck .d2 { transform: translate(-2px, 2px); }
.uno-deck.hint .d3 { animation: unoHint 1.2s ease-in-out infinite; }
.uno-deck:disabled { cursor: default; }
@keyframes unoHint { 0%, 100% { transform: translateY(0); box-shadow: 0 0 0 3px #fff inset, 0 0 0 0 rgba(255, 196, 92, 0); } 50% { transform: translateY(-6px); box-shadow: 0 0 0 3px #fff inset, 0 0 0 5px rgba(255, 196, 92, .6); } }
.uno-pile { position: relative; z-index: 1; width: 84px; height: 126px; }
.uno-pile .uc { --uc-w: 84px; animation: unoLand .28s var(--spring, ease) both; }
@keyframes unoLand { from { transform: scale(1.15) rotate(-6deg); } to { transform: none; } }
.uno-call { min-height: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; line-height: 1.2; }
.uno-call b { font-size: 17px; font-weight: 900; }
.uno-call span { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.uno-call.col-r b { color: #FF7A86; } .uno-call.col-y b { color: #FFD24A; } .uno-call.col-g b { color: #4FE0A0; } .uno-call.col-b b { color: #7DB2FF; }
.uno-call.pop { animation: unoPop .35s var(--spring, ease) both; }
@keyframes unoPop { from { transform: scale(.7); opacity: .3; } }
.uno-status { flex: 0 0 auto; min-height: 26px; text-align: center; font-weight: 800; font-size: 15px; color: var(--muted); transition: color .2s; }
.uno-status.me { color: var(--ink); }
.uno-status.shout { color: #FFC45C; animation: unoPop .35s var(--spring, ease) both; }
.uno-actions { flex: 0 0 auto; min-height: 52px; display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; }
.uno-actions .btn { min-height: 48px; padding: 0 18px; font-weight: 900; }
.uno-btn-uno { background: linear-gradient(135deg, #FFB547, #FF4D5E); color: #fff; border: 0; font-size: 18px; animation: unoPulse 1s ease-in-out infinite; }
.uno-btn-catch { background: linear-gradient(135deg, #3EDBB0, #2E7DF7); color: #fff; border: 0; }
@keyframes unoPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

.uno-hand { flex: 0 0 auto; display: flex; justify-content: center; align-items: flex-end; padding: 16px 8px 4px; min-height: calc(var(--uc-w, 70px) * 1.5 + 22px); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.uno-hand::-webkit-scrollbar { display: none; }
.uno-hand.wide { justify-content: flex-start; }
.uno-hc { flex: 0 0 auto; padding: 0; border: 0; background: none; border-radius: 10px; cursor: pointer; transition: transform .18s var(--spring, ease), filter .18s; position: relative; z-index: 0; animation: unoDeal .3s var(--ease-out, ease) both; animation-delay: calc(var(--k) * 25ms); }
.uno-hc + .uno-hc { margin-left: calc(var(--uc-step, 40px) - var(--uc-w, 70px)); }
.uno-hc.ok { transform: translateY(-12px); }
.uno-hc.ok .uc { box-shadow: 0 0 0 3px #fff inset, 0 0 0 2px #FFC45C, 0 8px 18px rgba(255, 196, 92, .35); }
.uno-hc.no { filter: brightness(.62) saturate(.8); }
.uno-hc.ok:active { transform: translateY(-18px) scale(1.04); }
.uno-hc.shake { animation: unoShake .35s ease; }
@keyframes unoShake { 25% { translate: -5px 0; } 75% { translate: 5px 0; } }
@keyframes unoDeal { from { opacity: 0; translate: 0 30px; } }
.uno-fly { position: fixed; z-index: 90; pointer-events: none; --uc-w: 64px; will-change: transform; }

/* colour picker + result */
.uno-cs, .uno-res { position: absolute; inset: 0; z-index: 5; display: flex; align-items: flex-end; justify-content: center; background: rgba(12, 2, 28, .55); animation: onbIn .2s ease both; padding: 16px 12px max(16px, env(safe-area-inset-bottom)); }
.uno-res { align-items: center; }
.uno-cs-card, .uno-res-card { width: min(100%, 420px); background: var(--surface); border: 1px solid var(--line-2); border-radius: 24px; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; animation: lpIn .35s var(--spring, ease) both; transform: none; }
@keyframes unoUp { from { transform: translateY(30px); opacity: 0; } }
.uno-cs-card, .uno-res-card { animation: unoUp .35s var(--spring, ease) both; }
.uno-cs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.uno-cs-b { min-height: 76px; border: 0; border-radius: 18px; color: #fff; font: inherit; font-weight: 900; font-size: 17px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; }
.uno-cs-b span { font-size: 14px; font-weight: 800; opacity: .92; }
.uno-cs-b.col-r { background: linear-gradient(150deg, #FF4D5E, #D21F3A); } .uno-cs-b.col-y { background: linear-gradient(150deg, #FFD24A, #E89E00); color: #3A2400; }
.uno-cs-b.col-g { background: linear-gradient(150deg, #2FCB86, #12945C); } .uno-cs-b.col-b { background: linear-gradient(150deg, #4593FF, #1C5FD6); }
.uno-cs-b:active { transform: scale(.96); }
.uno-res-lori.mascot { width: 96px; height: 96px; }
.uno-res-lori.jump svg { animation: lpJump .8s ease-in-out 3; }
.uno-res-card .gm-actions { width: 100%; display: flex; gap: 10px; }
.uno-res-card .gm-actions .btn { flex: 1 1 0; min-height: 52px; }

@media (max-height: 700px) {
  .uno-hand { padding-top: 10px; }
  .uno-deck { width: 64px; height: 96px; } .uno-deck .uc { --uc-w: 64px; }
  .uno-pile { width: 72px; height: 108px; } .uno-pile .uc { --uc-w: 72px; }
  .uno-center { height: 130px; }
  .uno-arrows svg { width: 150px; height: 150px; }
  .uno-av.mascot { width: 34px; height: 34px; }
  .uno-call { min-height: 34px; }
  .uno-call b { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .uno-arrows svg, .uno-btn-uno, .uno-deck.hint .d3, .uno-opp.turn .uno-av svg { animation: none !important; }
  .uno-hc, .uno-pile .uc, .uno-hero-cards .uc { animation: none !important; }
}
html.lite .uno-arrows svg { animation: none; }
@media (min-height: 760px) {
  .uno-deck { width: 90px; height: 135px; } .uno-deck .uc { --uc-w: 90px; }
  .uno-pile { width: 100px; height: 150px; } .uno-pile .uc { --uc-w: 100px; }
  .uno-center { height: 200px; gap: 30px; }
  .uno-arrows svg { width: 230px; height: 230px; }
  .uno-call b { font-size: 19px; }
}
/* rd2: no empty bands — lobby centred, table scales up on tall phones */
.uno-lobby { justify-content: safe center; }
@media (min-height: 780px) {
  .uno-hero { width: 260px; height: 184px; }
  .uno-hero-cards .uc { --uc-w: 88px; }
  .uno-hero-lori.mascot { width: 84px; height: 84px; }
  .uno-lobby { gap: 16px; }
  .uno-opp { min-height: 74px; padding: 10px; }
  .uno-fan { height: 24px; width: 60px; } .uno-fan i { width: 16px; height: 24px; left: calc(var(--j) * 7px); }
  .uno-deck { width: 104px; height: 156px; } .uno-deck .uc { --uc-w: 104px; }
  .uno-pile { width: 116px; height: 174px; } .uno-pile .uc { --uc-w: 116px; }
  .uno-center { width: min(86vw, 330px); height: 236px; gap: 34px; }
  .uno-arrows svg { width: 270px; height: 270px; }
  .uno-call b { font-size: 21px; }
  .uno-status { font-size: 17px; }
}
@media (min-height: 820px) {
  .uno-deck { width: 116px; height: 174px; } .uno-deck .uc { --uc-w: 116px; }
  .uno-pile { width: 130px; height: 195px; } .uno-pile .uc { --uc-w: 130px; }
  .uno-center { width: min(90vw, 350px); height: 270px; }
  .uno-arrows svg { width: 300px; height: 300px; }
  .uno-mid { gap: 14px; }
}

/* rd3: the hand fills the free space — big cards in rows, no overlap (overlap only for very big hands) */
.uno-mid { flex: 0 1 auto; }
.uno-hand { flex: 1 1 0; min-height: 110px; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; align-items: center; gap: 6px;
  padding: 14px 6px 6px; overflow: hidden; margin: 0 auto; width: 100%; }
.uno-hand:not(.over) { max-width: calc(var(--uno-row, 100%) + 12px); }
.uno-hand:not(.over) .uno-hc + .uno-hc { margin-left: 0; }
.uno-hand.over { flex-wrap: nowrap; align-content: normal; align-items: flex-end; justify-content: center; gap: 0; overflow-x: auto; }
.uno-hand.over.wide { justify-content: flex-start; }
.uno-hand.over .uno-hc + .uno-hc { margin-left: calc(var(--uc-step, 40px) - var(--uc-w, 70px)); }
.uno-hc.ok { transform: translateY(-8px); }
@media (max-height: 700px) { .uno-hand { min-height: 96px; } }
@media (min-height: 780px) { .uno-opps { margin-bottom: 4px; } .uno-status { min-height: 30px; } }

/* rd5: real card game feel — no hints, fanned hand (tap = lift, tap again = play), paced moves, big effect icons */
.uno-call { display: none; }
.uno-arrows { color: rgba(255, 255, 255, .2); }
.uno-arrows svg, .uno-center.ccw .uno-arrows svg { animation: none; }
.uno-center.ccw .uno-arrows svg { transform: scaleX(-1); }
.uno-arrows.flip { animation: unoFlip .9s cubic-bezier(.3, .7, .3, 1); color: rgba(255, 255, 255, .55); }
@keyframes unoFlip { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.uno-bigfx { position: absolute; left: 50%; top: 50%; width: 128px; height: 128px; margin: -64px 0 0 -64px; border-radius: 50%; display: grid; place-items: center;
  pointer-events: none; opacity: 0; z-index: 4; color: #fff; background: radial-gradient(closest-side, var(--fx, #B26BFF) 62%, transparent 64%); box-shadow: 0 0 40px var(--fx, #B26BFF); }
.uno-bigfx.col-r { --fx: #FF4D5E; } .uno-bigfx.col-y { --fx: #F2A900; } .uno-bigfx.col-g { --fx: #12B070; } .uno-bigfx.col-b { --fx: #2E7DF7; }
.uno-bigfx svg { width: 70px; height: 70px; }
.uno-bigfx b { font-size: 56px; font-weight: 900; letter-spacing: -.03em; font-family: system-ui, -apple-system, Roboto, sans-serif; }
.uno-bigfx.on { animation: unoBig .85s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes unoBig { 0% { opacity: 0; transform: scale(.3); } 25% { opacity: 1; transform: scale(1.12); } 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.35); } }
.uno-pile { position: relative; }
.uno-pile .uno-dot { position: absolute; right: -8px; top: -8px; width: 26px; height: 26px; border-radius: 50%; border: 3px solid #fff; z-index: 2; box-shadow: 0 3px 10px rgba(0, 0, 0, .35); animation: unoPop .35s var(--spring, ease) both; }
.uno-dot.col-r { background: #FF4D5E; } .uno-dot.col-y { background: #FFD24A; } .uno-dot.col-g { background: #2FCB86; } .uno-dot.col-b { background: #4593FF; }
.uno-opp.turn { border-color: #FFC45C; box-shadow: 0 0 0 3px rgba(255, 196, 92, .35), 0 0 22px rgba(255, 196, 92, .35); transform: scale(1.03); }
.uno-opp.turn .uno-av svg { animation: none; }
.uno-btn-uno { animation: none; min-width: 120px; letter-spacing: .04em; }
.uno-btn-uno.said { background: var(--surface-2); color: var(--muted); }
.uno-btn-uno.shake, .uno-hc.shake { animation: unoShake .38s ease; }
.uno-hand { position: relative; display: block; flex: 1 1 0; min-height: 132px; padding: 0; overflow: visible; width: 100%; max-width: none !important; margin: 0; }
.uno-hand .uno-hc { position: absolute; left: 0; top: 0; margin: 0 !important; animation: none; transform-origin: 50% 130%;
  transform: translate(var(--x, 0), var(--y, 0)) rotate(var(--r, 0deg)); transition: transform .32s cubic-bezier(.2, .8, .2, 1); filter: none; }
.uno-hand .uno-hc .uc { box-shadow: 0 0 0 3px #fff inset, -3px 4px 10px rgba(10, 0, 30, .45); }
.uno-hand .uno-hc.sel { transform: translate(var(--x, 0), calc(var(--y, 0px) - 26px)) rotate(0deg) scale(1.07); z-index: 300 !important; }
.uno-hand .uno-hc.sel .uc { box-shadow: 0 0 0 3px #fff inset, 0 0 0 3px rgba(255, 255, 255, .9), 0 16px 28px rgba(10, 0, 30, .55); }
.uno-hand .uno-hc.shake { animation: unoShake .38s ease; }
.uno.my-turn .uno-status { color: var(--ink); }
@media (max-height: 700px) { .uno-hand { min-height: 120px; } }
@media (prefers-reduced-motion: reduce) { .uno-bigfx.on, .uno-arrows.flip { animation-duration: .01s; } .uno-hand .uno-hc { transition: none; } }
.uno-mid { flex: 0 0 auto; }
.uno-actions, .uno-status { position: relative; z-index: 400; }
.uno-hand { z-index: 1; }
.uno-actions, .uno-status { z-index: 2; }
.uno-cs, .uno-res { z-index: 10; }
.uno-hand { flex: 0 0 auto; min-height: 0; }
.uno-mid { flex: 1 1 auto; justify-content: center; }

/* rd8: drag-to-play + play until last loser (1st out, 2nd out... last loser) */
.uno-hand .uno-hc { touch-action: none; -webkit-user-select: none; user-select: none; cursor: grab; will-change: transform; }
.uno-hand .uno-hc.dragging { cursor: grabbing; z-index: 650 !important; transition: none !important; }
.uno-hand .uno-hc.dragging .uc { box-shadow: 0 0 0 3px #fff inset, 0 0 0 3px rgba(255, 214, 107, .92), 0 22px 38px rgba(8, 0, 24, .68); }
.uno-hand .uno-hc.nudge { animation: unoNudge .34s cubic-bezier(.22, 1, .36, 1); }
@keyframes unoNudge { 0%, 100% { translate: 0 0; } 45% { translate: 0 -10px; } }

.uno-pile { transition: transform .22s cubic-bezier(.22, 1, .36, 1), filter .22s; }
.uno-pile.drop-target::after {
  content: ""; position: absolute; inset: -10px; border-radius: 16px;
  border: 2.5px dashed rgba(255, 255, 255, .45); pointer-events: none;
  transition: transform .2s, border-color .2s, box-shadow .2s, background .2s;
}
.uno-pile.drop-target.drop-ok::after {
  border-color: rgba(79, 224, 160, .85);
  box-shadow: 0 0 24px rgba(47, 203, 134, .45);
  background: rgba(47, 203, 134, .10);
}
.uno-pile.drop-target.drop-no::after {
  border-color: rgba(255, 110, 122, .65);
  background: rgba(255, 77, 94, .08);
}
.uno-pile.drop-target.drop-hover { transform: scale(1.08); }
.uno-pile.drop-target.drop-ok.drop-hover::after {
  border-style: solid; border-color: #4FE0A0;
  box-shadow: 0 0 34px rgba(79, 224, 160, .78), 0 0 0 4px rgba(79, 224, 160, .24);
  background: rgba(79, 224, 160, .18);
}
.uno-pile.drop-target.drop-no.drop-hover::after {
  border-style: solid; border-color: #FF6E7A;
  box-shadow: 0 0 26px rgba(255, 77, 94, .55);
}

/* Opponent out-of-hand winner badge & kicked badge (strictly inside .uno-opp) */
.uno-opp { box-sizing: border-box; }
.uno-opp-t { max-width: 100%; overflow: hidden; box-sizing: border-box; }
.uno-opp.out-win { border-color: rgba(79, 224, 160, .65); background: linear-gradient(145deg, rgba(47, 203, 134, .16), var(--surface-2)); }
.uno-opp.out-win .uno-cnt { background: #12945C; color: #fff; }
.uno-opp.out-kick { border-color: rgba(255, 77, 94, .55); background: linear-gradient(145deg, rgba(255, 77, 94, .14), var(--surface-2)); opacity: .82; }
.uno-opp.out-kick .uno-cnt { background: #D21F3A; color: #fff; }
.uno-opp.out-win .uno-fan,
.uno-opp.out-kick .uno-fan {
  width: 100%; max-width: 100%; height: auto; min-height: 20px;
  display: flex; align-items: center; justify-content: center;
}
.uno-opps.n2 .uno-opp.out-win .uno-fan,
.uno-opps.n2 .uno-opp.out-kick .uno-fan { justify-content: flex-start; }
.uno-opp-out-pill,
.uno-opp-out-badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  max-width: 100%; box-sizing: border-box; padding: 2px 8px; margin: 0 auto; border-radius: 999px;
  background: rgba(47, 203, 134, .22); color: #6FF5B8; font-size: 11px; font-weight: 900;
  line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.uno-opps.n2 .uno-opp-out-pill,
.uno-opps.n2 .uno-opp-out-badge { margin: 0; }
.uno-opp-out-pill.kicked,
.uno-opp-out-badge.kicked { background: rgba(255, 77, 94, .22); color: #FF8A94; }
html[data-theme="light"] .uno-opp-out-pill,
html[data-theme="light"] .uno-opp-out-badge { background: rgba(18, 148, 92, .16); color: #0D7A49; }
html[data-theme="light"] .uno-opp-out-pill.kicked,
html[data-theme="light"] .uno-opp-out-badge.kicked { background: rgba(210, 31, 58, .15); color: #B81830; }

/* Turn timer (60s per turn, 4 timeouts = kick) */
.uno-status-row {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap; min-height: 28px; position: relative; z-index: 2;
}
.uno-turn-timer {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line);
  color: var(--ink); font-size: 12.5px; font-weight: 900; font-variant-numeric: tabular-nums;
  white-space: nowrap; transition: background .2s, color .2s, border-color .2s;
}
.uno-turn-timer:empty { display: none; }
.uno-turn-timer.low {
  background: rgba(229, 72, 77, .24); border-color: #FF4D5E; color: #FF8A94;
  animation: unoPulse 1s ease-in-out infinite;
}
.uno-me-out.kicked {
  background: linear-gradient(145deg, rgba(255, 77, 94, .22), rgba(139, 47, 217, .20));
  border-color: rgba(255, 77, 94, .55);
}

/* Human already finished banner */
.uno-me-out {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  max-width: 380px; margin: 8px auto 0; padding: 12px 16px; border-radius: 20px;
  background: linear-gradient(145deg, rgba(47, 203, 134, .22), rgba(139, 47, 217, .24));
  border: 1.5px solid rgba(79, 224, 160, .5); text-align: left;
}
.uno-me-medal { font-size: 32px; line-height: 1; flex: 0 0 auto; }
.uno-me-out-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.uno-me-out-t b { font-size: 15px; font-weight: 900; color: var(--ink); }
.uno-me-out-t span { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.uno-btn-fast { background: linear-gradient(135deg, #8B2FD9, #2E7DF7); color: #fff; border: 0; font-size: 14px; }

/* Podium on game-over screen */
.uno-podium { padding: 10px 12px; text-align: left; }
.uno-pod-list { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.uno-pod-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px;
  background: rgba(255, 255, 255, .05); font-size: 13.5px;
}
html[data-theme="light"] .uno-pod-row { background: rgba(0, 0, 0, .04); }
.uno-pod-row.is-me { outline: 1.5px solid rgba(255, 214, 107, .65); background: rgba(255, 214, 107, .10); }
.uno-pod-row.is-loser { background: rgba(255, 77, 94, .12); }
.uno-pod-place { font-weight: 900; font-size: 12.5px; min-width: 112px; flex: 0 0 auto; }
.uno-pod-row.is-out .uno-pod-place { color: #4FE0A0; }
.uno-pod-row.is-loser .uno-pod-place { color: #FF7A86; }
html[data-theme="light"] .uno-pod-row.is-out .uno-pod-place { color: #0E9A57; }
html[data-theme="light"] .uno-pod-row.is-loser .uno-pod-place { color: #D2334A; }
.uno-pod-name { flex: 1 1 auto; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uno-pod-sub { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
