@font-face {
  font-family: 'Fredoka';
  src: url('/fonts/fredoka-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}

@property --cur {
  syntax: '<color>';
  inherits: true;
  initial-value: #8a78a0;
}

:root {
  --felt: #2a1d36;
  --felt-hi: #43305a;
  --felt-lo: #1d1426;
  --ink: #fff5e3;
  --mute: #b9a8cc;
  --line: rgba(255, 245, 227, .14);
  --r: #e0352b;
  --y: #f5c518;
  --g: #2f9e44;
  --b: #1c6fd1;
  --k: #1b1420;
  --cur: #8a78a0;
  --hw: clamp(58px, 19vw, 96px);
  --tw: clamp(74px, 24vw, 120px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
  transition: --cur .6s ease;
}
:root[data-color="r"] { --cur: var(--r); }
:root[data-color="y"] { --cur: var(--y); }
:root[data-color="g"] { --cur: var(--g); }
:root[data-color="b"] { --cur: var(--b); }

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: 'Fredoka', system-ui, sans-serif;
  font-weight: 450;
  color: var(--ink);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse 120% 80% at 50% 42%, var(--felt-hi) 0%, var(--felt) 55%, var(--felt-lo) 100%);
  background-color: var(--felt);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, [role="button"]:focus-visible { outline: 3px solid var(--y); outline-offset: 2px; }
[hidden] { display: none !important; }

.screen {
  position: fixed; inset: 0;
  padding: calc(env(safe-area-inset-top) + 12px) 16px calc(env(safe-area-inset-bottom) + 12px);
  max-width: 560px; margin: 0 auto;
}

/* ---------- buttons ---------- */
.btn {
  border: 0; border-radius: 999px;
  padding: 13px 22px;
  font-size: 17px; font-weight: 600;
  background: var(--ink); color: var(--felt);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .25);
  transition: transform .12s var(--ease), opacity .2s, background-color .25s, color .25s;
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }

.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn.danger { background: var(--r); color: #fff; }
.btn.small { padding: 8px 14px; font-size: 15px; }
/* disabled reads as "not yet": an outline, not a faded fill (after .danger/.ghost so it wins) */
.btn:disabled, .btn.danger:disabled {
  background: transparent; color: var(--mute); opacity: .75;
  box-shadow: inset 0 0 0 2px var(--line); transform: none; cursor: default;
}
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255, 245, 227, .08); display: grid; place-items: center;
}
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.icon-btn svg .dot { fill: var(--ink); stroke-width: 2.4; }

/* ---------- login / lobby ---------- */
#login, #lobby { display: flex; flex-direction: column; justify-content: safe center; gap: 22px; overflow-y: auto; }
.brand { display: grid; place-items: center; margin-bottom: 6px; }
.logo {
  width: 150px; height: 96px; border-radius: 50%;
  background: var(--r); transform: rotate(-14deg);
  display: grid; place-items: center;
  box-shadow: 0 0 0 5px var(--ink), 0 10px 30px rgba(0, 0, 0, .4);
}
.logo span {
  font-size: 50px; font-weight: 700; color: var(--y); letter-spacing: 1px;
  transform: skewX(-8deg); text-shadow: 3px 3px 0 var(--k);
}
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack label { color: var(--mute); font-size: 15px; }
input {
  border: 0; border-radius: 16px; padding: 14px 16px; font-size: 18px;
  background: rgba(255, 245, 227, .1); box-shadow: inset 0 0 0 2px var(--line);
  -webkit-user-select: text; user-select: text;
}
input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--y); }
.err { color: #ff8a80; min-height: 1.2em; margin: 0; text-align: center; }
.hint { color: var(--mute); text-align: center; margin: 0; line-height: 1.4; }

.seatlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.seatlist li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 18px;
  background: rgba(255, 245, 227, .07);
}
.seatlist li.free { background: transparent; box-shadow: inset 0 0 0 2px var(--line); box-shadow: inset 0 0 0 2px rgba(255,245,227,.08); color: var(--mute); }
.seatlist li.free .av { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }
.round-status { margin: 0; text-align: center; font-size: 19px; font-weight: 600; }
.seatlist li.gone { opacity: .55; background: transparent; box-shadow: inset 0 0 0 2px rgba(255, 245, 227, .08); }
.seatlist .medal { width: 30px; height: 30px; font-size: 14px; }
.seatlist li.wait { background: transparent; box-shadow: inset 0 0 0 2px rgba(255, 245, 227, .08); }
.seatlist .nm { flex: 1; font-size: 18px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seatlist .you { color: var(--mute); font-weight: 400; font-size: 15px; }
.seatlist .score { color: var(--mute); font-size: 14px; white-space: nowrap; }
.x-btn {
  flex: none; width: 36px; height: 36px; margin: -4px -4px -4px 0; border: 0; border-radius: 50%;
  background: rgba(255, 245, 227, .08); color: var(--mute); font-size: 22px; line-height: 1;
}
.x-btn:active { background: rgba(224, 53, 43, .35); color: #fff; }
.add-bot {
  flex: none; border: 0; border-radius: 999px; padding: 7px 14px;
  font-weight: 600; font-size: 15px; background: var(--ink); color: var(--felt);
}
.round-status .link { border: 0; background: none; padding: 4px 8px; font-size: 16px; font-weight: 500; color: var(--mute); text-decoration: underline; text-underline-offset: 3px; }
.seatlist .kick { border: 0; background: none; color: var(--mute); font-size: 14px; text-decoration: underline; padding: 6px; }
.av {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 600; font-size: 17px;
  background: hsl(var(--h, 280) 42% 46%); color: #fff; position: relative;
}
.av.bot { border-radius: 30%; }
.bot-tag {
  display: inline-block; vertical-align: 2px; margin-left: 4px;
  padding: 1px 7px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--mute); box-shadow: inset 0 0 0 1.5px var(--line);
}
.av.off::after {
  content: ''; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px;
  border-radius: 50%; background: #6d6377; box-shadow: 0 0 0 2px var(--felt);
}

/* ---------- game layout ---------- */
#game {
  display: flex; flex-direction: column;
  padding-left: 0; padding-right: 0;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
}
#opps { position: relative; height: 128px; flex: none; margin: 0 10px; }

/* seats sit on an arc, left to right in play order (JS sets left % and top) */
.seat {
  --sw: 124px;
  position: absolute; width: var(--sw); margin-left: calc(var(--sw) / -2);
  display: flex; flex-direction: column; align-items: center;
  transition: opacity .3s;
}
.seat.sm { --sw: 62px; }
.seat.off { opacity: .55; }

.mini { position: relative; height: 38px; width: 100%; display: flex; justify-content: center; align-items: flex-end; }
.mb {
  position: absolute; left: 50%; bottom: 0;
  width: 22px; height: 33px; margin-left: -11px; border-radius: 4px;
  background: var(--k); box-shadow: 0 0 0 1.5px var(--ink), 0 2px 4px rgba(0, 0, 0, .35);
  transform-origin: 50% 140%;
}
.mb::after { content: ''; position: absolute; inset: 7px 3px; border-radius: 50%; background: var(--r); transform: rotate(-24deg); }
.plate {
  display: flex; align-items: center; gap: 7px;
  max-width: 100%; padding: 4px 10px 4px 4px; margin-top: -4px;
  border-radius: 999px; background: rgba(20, 12, 28, .55);
  box-shadow: 0 0 0 2px transparent;
  transition: box-shadow .35s, background-color .35s;
  position: relative; z-index: 2;
}
.plate .av { width: 28px; height: 28px; font-size: 14px; }
.plate .nm { font-size: 15px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 80px; }
.mini .n {
  position: absolute; left: calc(50% + 24px); bottom: 2px; z-index: 3;
  min-width: 24px; padding: 1px 7px; border-radius: 999px; text-align: center;
  font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums;
  background: var(--felt-lo); color: var(--ink); box-shadow: 0 0 0 1.5px var(--line);
}
/* four or more opponents: one small card + count, avatar, name below */
.seat.sm .mini { height: 30px; }
.seat.sm .mb { width: 18px; height: 27px; margin-left: -20px; transform-origin: 50% 50%; rotate: -8deg; }
.seat.sm .mb::after { inset: 6px 2px; }
.seat.sm .mini .n { left: calc(50% + 1px); bottom: 3px; font-size: 13px; min-width: 22px; padding: 1px 5px; }
.seat.sm .plate { flex-direction: column; gap: 2px; padding: 4px 4px 5px; margin-top: 3px; border-radius: 16px; background: transparent; }
.seat.sm .plate .nm { max-width: 68px; font-size: 12.5px; }
.seat.sm.turn .plate { background: rgba(20, 12, 28, .8); }
.seat.turn .plate { box-shadow: 0 0 0 2.5px var(--cur), 0 0 18px color-mix(in srgb, var(--cur) 70%, transparent); background: rgba(20, 12, 28, .8); }
.seat.turn .mini .n { box-shadow: 0 0 0 2px var(--cur); }
.tag {
  position: absolute; top: 8px; right: 6px; z-index: 3;
  font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  background: var(--r); color: var(--y); transform: rotate(8deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.medal {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 17px; color: var(--k); margin-bottom: 0;
  background: #d9d2e3; box-shadow: 0 2px 0 rgba(0, 0, 0, .3);
}
.medal.p1 { background: #f5c518; }
.medal.p2 { background: #cfd6de; }
.medal.p3 { background: #d89a5b; }
.medal.out { background: transparent; color: var(--mute); box-shadow: inset 0 0 0 2px var(--line); font-size: 13px; }

/* ---------- table centre ---------- */
#table {
  flex: 1 1 auto; min-height: 0; position: relative;
  display: flex; align-items: center; justify-content: center; gap: calc(var(--tw) * .32);
}
#glow {
  position: absolute; left: 50%; top: 50%; width: calc(var(--tw) * 5); height: calc(var(--tw) * 5);
  margin: calc(var(--tw) * -2.5) 0 0 calc(var(--tw) * -2.5);
  background: radial-gradient(circle, color-mix(in srgb, var(--cur) 42%, transparent) 0%, color-mix(in srgb, var(--cur) 12%, transparent) 38%, transparent 62%);
  pointer-events: none;
}
#ring {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--tw) * 3.1); height: calc(var(--tw) * 3.1);
  margin: calc(var(--tw) * -1.55) 0 0 calc(var(--tw) * -1.55);
  color: color-mix(in srgb, var(--cur) 55%, #fff);
  opacity: .5; pointer-events: none;
  animation: spin 26s linear infinite;
}
#ring.ccw { animation-direction: reverse; }
#ring.ccw g { transform: scale(-1, 1); }
@keyframes spin { to { rotate: 360deg; } }

#deck, #pile { position: relative; width: var(--tw); height: calc(var(--tw) * 1.5); }
#deck .card { --cw: var(--tw); left: 0; top: 0; }
#deck .card:nth-child(1) { translate: 3px 4px; }
#deck .card:nth-child(2) { translate: 1.5px 2px; }
#deck.can { cursor: pointer; }
#deck.can .card:last-child { box-shadow: 0 0 0 3px var(--cur), 0 6px 20px rgba(0, 0, 0, .45); animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translateY(-3px); } }
#pile .card { --cw: var(--tw); left: 0; top: 0; }
#pending {
  position: absolute; left: 50%; top: 50%;
  margin-left: calc(var(--tw) * .72); margin-top: calc(var(--tw) * -1.02);
  min-width: 52px; height: 52px; padding: 0 10px; border-radius: 999px;
  display: grid; place-items: center; z-index: 20;
  font-size: 24px; font-weight: 700; color: #fff; background: var(--r);
  box-shadow: 0 0 0 3px var(--ink), 0 6px 18px rgba(0, 0, 0, .45);
  rotate: 10deg;
}
#wildcolor {
  position: absolute; left: 50%; top: 50%; z-index: 20;
  margin-left: calc(var(--tw) * .16); margin-top: calc(var(--tw) * .84);
  padding: 4px 12px; border-radius: 999px; font-weight: 600; font-size: 15px;
  background: var(--cur); color: #fff; box-shadow: 0 0 0 2px var(--ink), 0 4px 12px rgba(0, 0, 0, .35);
}
:root[data-color="y"] #wildcolor { color: var(--k); }

#status { flex: none; text-align: center; padding: 6px 16px 10px; min-height: 58px; }
#st-main { display: block; font-size: 21px; font-weight: 600; }
#st-sub { display: block; font-size: 15px; color: var(--mute); margin-top: 2px; min-height: 1.2em; }
#game.mine #st-main { color: color-mix(in srgb, var(--cur) 45%, #fff); }

#bar { flex: none; display: flex; gap: 10px; align-items: center; justify-content: center; padding: 0 16px 8px; position: relative; }
#draw-btn, #home-btn { flex: 1; max-width: 250px; }
#uno-btn {
  width: 64px; height: 50px; border-radius: 50%; border: 0; flex: none;
  font-weight: 700; font-size: 17px; color: var(--y); background: var(--r);
  box-shadow: 0 0 0 3px var(--ink), 0 3px 0 4px rgba(0, 0, 0, .25);
  rotate: -8deg; transition: opacity .2s, transform .12s;
}
#uno-btn:disabled { background: transparent; color: var(--mute); box-shadow: inset 0 0 0 2px var(--line); opacity: .45; }
#uno-btn:active:not(:disabled) { transform: scale(.94); }
#uno-btn.hot { animation: shout .8s var(--ease) infinite; }
#uno-btn.said { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); opacity: .7; }
@keyframes shout { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.13); } }
#emotes {
  position: absolute; right: 12px; bottom: 58px; z-index: 40;
  display: flex; gap: 4px; padding: 6px; border-radius: 999px;
  background: rgba(20, 12, 28, .92); box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
#emotes button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; font-size: 26px; }
#emotes button:active { background: rgba(255, 245, 227, .12); }

/* ---------- hand ---------- */
#hand {
  flex: none; position: relative; margin: 0 8px;
  padding-top: 16px; box-sizing: content-box;
  transition: height .25s var(--ease);
}
#hand::before {
  content: ''; position: absolute; left: 10%; right: 10%; bottom: -10px; height: 60%;
  background: radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--cur) 50%, transparent), transparent 70%);
  opacity: 0; transition: opacity .4s; pointer-events: none;
}
#game.mine #hand::before { opacity: 1; }
#hand .card { --cw: var(--hw); top: calc(16px + var(--py, 0px)); transition: transform .18s var(--ease), filter .2s; }
#hand .card.ok { transform: translateY(-14px); cursor: pointer; }
#hand .card.dim { filter: brightness(.55) saturate(.7); }
#hand .card.drawn { box-shadow: 0 0 0 3px var(--ink), 0 0 22px var(--cur); }
#hand-empty { text-align: center; color: var(--mute); padding: 20px 0 12px; }

/* ---------- cards ---------- */
.card {
  --cw: 64px;
  position: absolute;
  width: var(--cw); height: calc(var(--cw) * 1.5);
  border-radius: calc(var(--cw) * .12);
  background: #fffaf2;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .15), 0 4px 12px rgba(18, 8, 28, .38);
}
.card .face {
  position: absolute; inset: calc(var(--cw) * .065);
  border-radius: calc(var(--cw) * .08);
  background: var(--cc); overflow: hidden;
}
.card .face::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(155deg, rgba(255, 255, 255, .22), transparent 42%, rgba(0, 0, 0, .1));
}
.c-r { --cc: var(--r); }
.c-y { --cc: var(--y); }
.c-g { --cc: var(--g); }
.c-b { --cc: var(--b); }
.c-k { --cc: var(--k); }
.card .oval {
  position: absolute; left: 50%; top: 50%;
  width: 82%; height: 58%; margin: -29% 0 0 -41%;
  border-radius: 50%; background: #fffaf2;
  transform: rotate(-32deg) scaleY(1.2);
}
.c-k .oval { background: conic-gradient(from -32deg, var(--r) 0 25%, var(--b) 0 50%, var(--y) 0 75%, var(--g) 0); }
.card .big {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 1;
  font-size: calc(var(--cw) * .5); font-weight: 700; line-height: 1;
  color: var(--cc);
  text-shadow: calc(var(--cw) * .02) calc(var(--cw) * .025) 0 rgba(0, 0, 0, .35);
}
.card .big svg { width: 52%; height: auto; filter: drop-shadow(calc(var(--cw) * .02) calc(var(--cw) * .025) 0 rgba(0, 0, 0, .35)); }
.card .big svg * { fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.c-k .big { color: #fffaf2; text-shadow: 0 0 calc(var(--cw) * .06) rgba(0, 0, 0, .8), calc(var(--cw) * .02) calc(var(--cw) * .025) 0 var(--k); }
.card .ix {
  position: absolute; left: 11%; top: 6%; z-index: 1;
  font-size: calc(var(--cw) * .2); font-weight: 700; line-height: 1; color: #fffaf2;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, .3);
}
.card .ix svg { width: calc(var(--cw) * .2); height: calc(var(--cw) * .2); }
.card .ix svg * { fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.card .ix.br { left: auto; top: auto; right: 11%; bottom: 6%; rotate: 180deg; }
.wdot { display: inline-block; width: .8em; height: .8em; border-radius: 50%; background: conic-gradient(var(--r) 0 25%, var(--b) 0 50%, var(--y) 0 75%, var(--g) 0); box-shadow: 0 0 0 1.5px #fffaf2; }
.card .u { text-decoration: underline; text-decoration-thickness: .08em; text-underline-offset: .08em; }
.card.back .face { background: var(--k); }
.card.back .oval { background: var(--r); }
.card.back .big { color: var(--y); font-size: calc(var(--cw) * .26); text-shadow: 1px 1.5px 0 var(--k); rotate: -32deg; letter-spacing: .5px; }

.fly { position: fixed; z-index: 60; pointer-events: none; margin: 0; }

/* ---------- bubbles, toast, sheets ---------- */
.bubble {
  position: fixed; z-index: 70; pointer-events: none;
  translate: -50% -50%;
  padding: 8px 16px; border-radius: 999px;
  font-weight: 700; font-size: 22px; white-space: nowrap;
  background: var(--r); color: var(--y);
  box-shadow: 0 0 0 3px var(--ink), 0 8px 24px rgba(0, 0, 0, .45);
  animation: pop 1.7s var(--ease) forwards;
}
.bubble.soft { background: var(--ink); color: var(--felt); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); font-size: 18px; }
.bubble.emoji { background: none; box-shadow: none; font-size: 44px; padding: 0; animation-duration: 2.2s; }
@keyframes pop {
  0% { opacity: 0; scale: .4; }
  14% { opacity: 1; scale: 1.12; }
  24% { scale: 1; }
  80% { opacity: 1; translate: -50% -60%; }
  100% { opacity: 0; translate: -50% -85%; }
}

#toast {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 14px); z-index: 90;
  translate: -50% 0; max-width: calc(100% - 32px);
  padding: 11px 18px; border-radius: 16px;
  background: var(--ink); color: var(--felt); font-weight: 550; font-size: 16px; text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
  animation: drop .25s var(--ease);
}
@keyframes drop { from { opacity: 0; translate: -50% -12px; } }
#conn {
  position: fixed; left: 12px; top: calc(env(safe-area-inset-top) + 16px); z-index: 80;
  padding: 5px 12px; border-radius: 999px; font-size: 14px;
  background: rgba(20, 12, 28, .85); color: var(--mute);
}

.sheet {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(12, 6, 18, .55);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity .22s;
}
.sheet.open { opacity: 1; }
.sheet .panel {
  width: 100%; max-width: 560px; max-height: 88%;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 22px 18px calc(env(safe-area-inset-bottom) + 20px);
  border-radius: 26px 26px 0 0;
  background: #33253f; box-shadow: 0 -10px 40px rgba(0, 0, 0, .4);
  translate: 0 40px; transition: translate .28s var(--ease);
}
.sheet.open .panel { translate: 0 0; }
.sheet h2 { margin: 0 0 14px; font-size: 22px; font-weight: 600; }
.sheet .row { display: flex; gap: 10px; }
.sheet .row .btn { flex: 1; }
.sheet .stack + .stack, .sheet details + .stack, .sheet .menu-list + details { margin-top: 16px; }

.sheet-note { margin: -6px 0 16px; color: var(--mute); line-height: 1.4; }
.colors { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.colors button {
  height: 88px; border: 0; border-radius: 22px;
  font-size: 20px; font-weight: 600; color: #fff;
  background: var(--cc); box-shadow: 0 4px 0 rgba(0, 0, 0, .28);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  transition: transform .12s;
}
.colors button:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .28); }
.colors button.c-y { color: var(--k); }
.colors small { font-size: 14px; font-weight: 450; opacity: .85; }

.results { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.results li { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 18px; background: rgba(255, 245, 227, .06); }
.results li.first { background: color-mix(in srgb, var(--y) 22%, transparent); }
.results .nm { flex: 1; font-size: 18px; font-weight: 550; }
.results .note { color: var(--mute); font-size: 14px; }
.results .tally { color: var(--mute); font-size: 13px; white-space: nowrap; padding: 2px 8px; border-radius: 999px; background: rgba(255, 245, 227, .07); }
.results .medal { width: 34px; height: 34px; font-size: 16px; }

.menu-list { display: flex; flex-direction: column; gap: 10px; }
.menu-list .btn { width: 100%; }
details.rules { margin-top: 16px; background: rgba(255, 245, 227, .06); border-radius: 18px; padding: 12px 16px; }
details.rules summary { font-weight: 600; font-size: 17px; cursor: pointer; }
details.kicks .menu-list { margin-top: 12px; }
details.rules ul { margin: 10px 0 2px; padding-left: 20px; line-height: 1.45; color: #e9dff3; }
details.rules li + li { margin-top: 6px; }

.confetti { position: fixed; top: -20px; z-index: 55; width: 9px; height: 14px; border-radius: 2px; pointer-events: none; }

@media (min-height: 760px) {
  #opps { height: 140px; }
}
@media (max-height: 720px) {
  :root { --hw: clamp(54px, 16.5vw, 80px); --tw: clamp(66px, 20vw, 100px); }
}
@media (max-height: 640px) {
  :root { --hw: clamp(52px, 15vw, 76px); --tw: clamp(64px, 18vw, 96px); }
  #opps { height: 116px; }
  #status { min-height: 50px; padding-bottom: 6px; }
  #st-main { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  #ring { animation: none; }
}
