@import url(/static/fonts/fonts.css);

/* A dark violet felt so that the four card colours shine: red, yellow,
   green and blue cards with a white tilted oval, black wild cards. */
:root {
  --felt-hi: #43388a;
  --felt: #251d57;
  --felt-lo: #0f0b29;
  --ink: #1c1733;
  --night: #16131f;
  --ink-shadow: #16131f;
  --red: #e5202e;
  --red-dark: #9c1019;
  --yellow: #f5c400;
  --green: #2a9d3c;
  --blue: #0b64c9;
  --blue-dk: #063c7a;
  --paper: #ffffff;
  --muted: #6a6585;
  --line: #e2dff0;
  --good: #2a9d3c;
  --bad: #e5202e;
  --radius: 16px;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
html { background: var(--felt-lo); }
body {
  min-height: 100vh;
  background: radial-gradient(ellipse 120% 900px at 50% 320px, var(--felt-hi) 0%, var(--felt) 45%, var(--felt-lo) 100%) var(--felt-lo);
  color: var(--ink); font-family: Montserrat, system-ui, sans-serif; font-size: 15px; line-height: 1.45;
}
main { max-width: 1100px; margin: 0 auto; padding: 16px; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; }
h2 { font-weight: 800; color: var(--ink); }
p { margin: 0 0 .5rem; }
a { color: var(--blue); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center-text { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- logo */
.logo { display: inline-block; position: relative; font-weight: 900; font-style: italic; line-height: 1; padding: .2em .5em .22em; transform: rotate(-8deg); white-space: nowrap; }
.logo::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 .07em #fff, .05em .09em 0 .07em var(--night); }
.logo-txt { position: relative; color: var(--yellow); letter-spacing: -.01em; -webkit-text-stroke: .09em var(--night); paint-order: stroke fill; text-shadow: .05em .07em 0 var(--night); }
.hero-logo { font-size: clamp(3.2rem, 14vw, 6.4rem); }
.brand-logo { font-size: 1.15rem; }
.gbar-logo { font-size: .95rem; }

/* ---------------------------------------------------------------- topbar */
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: rgba(10, 6, 30, .55); color: #fff; flex-wrap: wrap; backdrop-filter: blur(6px); }
.topbar a, .topbar .linkbtn { color: #fff; text-decoration: none; font-weight: 600; }
.brand { display: flex; align-items: center; padding: 4px 8px; }
.topbar nav { margin-left: auto; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

/* ---------------------------------------------------------------- forms */
label { display: block; font-weight: 700; font-size: .85rem; margin-bottom: 4px; color: var(--ink); }
input, select { width: 100%; padding: 11px 12px; border: 2px solid var(--line); border-radius: 10px; font: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(245, 196, 0, .35); }
button, .btn { font: inherit; font-weight: 800; border: 0; border-radius: 12px; padding: 11px 18px; cursor: pointer; background: var(--blue); color: #fff; text-decoration: none; display: inline-block; box-shadow: 0 3px 0 var(--blue-dk); transition: transform .08s, filter .15s; }
button:hover { filter: brightness(1.08); }
button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--blue-dk); }
button:disabled { opacity: .45; cursor: default; }
.btn-accent { background: var(--red); box-shadow: 0 3px 0 var(--red-dark); }
.btn-accent:active { box-shadow: 0 1px 0 var(--red-dark); }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn-small { padding: 6px 12px; font-size: .85rem; }
.btn-block { width: 100%; }
.sso-btn::before { content: '🔑 '; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.check input { width: auto; }
.code-input { text-transform: uppercase; letter-spacing: .3em; font-weight: 900; font-size: 1.4rem; text-align: center; }

/* ---------------------------------------------------------------- layout */
.panel { background: var(--paper); border-radius: var(--radius); padding: 18px; box-shadow: 0 10px 30px rgba(5, 2, 20, .45), inset 0 -4px 0 rgba(28, 23, 51, .07); }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 8px; align-items: center; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.notice { padding: 12px 14px; border-radius: 10px; background: #fff; border-left: 5px solid var(--blue); }
.notice.err { border-left-color: var(--bad); }
.notice.ok { border-left-color: var(--good); background: #f1faf2; }
.pill { display: inline-block; font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #ece9f8; color: var(--ink); margin-right: 4px; }
.pill.off { background: #f3f3f3; color: #888; }
.pill.gold { background: var(--yellow); color: var(--ink); }
.dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex: none; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0,0,0,.15); }
.copybox { display: flex; gap: 6px; }
.copybox input { font-size: .85rem; }
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; border-left: 5px solid var(--yellow); z-index: 2000; max-width: calc(100vw - 32px); font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.35); animation: toast-in .25s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }
.spinner { width: 14px; height: 14px; border: 3px solid rgba(255,255,255,.35); border-top-color: var(--yellow); border-radius: 50%; display: inline-block; vertical-align: -2px; margin-right: 8px; animation: spin 0.9s linear infinite; }
.panel .spinner { border-color: var(--line); border-top-color: var(--red); }
@keyframes spin { to { transform: rotate(360deg); } }
.wait { color: var(--muted); font-weight: 600; }

/* confetti (ui.js) */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 3000; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { top: 110vh; transform: rotate(720deg) translateX(40px); } }

/* ---------------------------------------------------------------- home */
.hero { text-align: center; margin: 10px 0 26px; color: #fff; }
.hero-cards { display: flex; justify-content: center; height: 150px; margin: 10px 0 2px; --cw: 80px; }
.hero-cards .card { margin: 0 -14px; transform-origin: 50% 120%; animation: hero-in .7s cubic-bezier(.2,.8,.3,1.2) backwards; }
.hero-cards .tilt-l { transform: rotate(-24deg) translateY(16px); animation-delay: .05s; }
.hero-cards .tilt-m { transform: rotate(-12deg) translateY(4px); animation-delay: .12s; }
.hero-cards .tilt-c { transform: translateY(-4px); z-index: 2; animation-delay: .19s; }
.hero-cards .tilt-n { transform: rotate(12deg) translateY(4px); animation-delay: .26s; }
.hero-cards .tilt-r { transform: rotate(24deg) translateY(16px); animation-delay: .33s; }
@keyframes hero-in { from { opacity: 0; transform: translateY(80px) rotate(0); } }
.subtitle { font-size: 1.1rem; font-weight: 600; color: #e4defc; margin-top: 14px; }
.rules { padding-left: 1.3rem; margin: 0; }
.rules li { margin-bottom: .55rem; }
.rules li::marker { color: var(--red); font-weight: 900; }

/* ---------------------------------------------------------------- cards */
.card {
  --w: var(--cw, 80px);
  position: relative; width: var(--w); aspect-ratio: 2 / 3; flex: none; overflow: hidden;
  border-radius: calc(var(--w) * .11); container-type: inline-size; isolation: isolate; user-select: none; -webkit-user-select: none;
  background: var(--k, #fff);
  /* the white edge is a real border, so no shadow (hover, drag, flight) can paint over it */
  border: calc(var(--w) * .055) solid #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.1), 0 2px 6px rgba(5, 2, 20, .45);
}
.k-red { --k: var(--red); }
.k-yellow { --k: var(--yellow); }
.k-green { --k: var(--green); }
.k-blue { --k: var(--blue); }
.k-black { --k: var(--night); }
.card .oval { position: absolute; left: 50%; top: 50%; width: 70cqw; height: 118cqw; transform: translate(-50%, -50%) rotate(30deg); border-radius: 50%; background: #fff; z-index: 0; }
.card.wild .oval { background: conic-gradient(from 30deg, var(--red) 0 25%, var(--blue) 0 50%, var(--yellow) 0 75%, var(--green) 0); box-shadow: 0 0 0 3cqw #fff; }
.card.k-black.wild[data-v="13"] .oval { width: 66cqw; }
.card .cn {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 1;
  font-weight: 900; font-style: italic; font-size: 70cqw; color: var(--k); line-height: 1;
  text-shadow: 3.5cqw 3.5cqw 0 var(--night); translate: -2.5cqw -1.75cqw;
}
.card .cn.ul { text-decoration: underline; text-decoration-thickness: 4cqw; text-underline-offset: 5cqw; }
.card .csym { position: absolute; left: 50%; top: 50%; width: 68cqw; height: 68cqw; transform: translate(calc(-50% - 1.25cqw), calc(-50% - 1.25cqw)); color: var(--k); z-index: 1; filter: drop-shadow(2.5cqw 2.5cqw 0 var(--night)); }
.card.wild .csym { width: 76cqw; height: 76cqw; }
.card .ci { position: absolute; z-index: 2; color: #fff; font-weight: 900; font-style: italic; font-size: 21cqw; line-height: 1; text-shadow: 1.2cqw 1.2cqw 0 var(--night); }
.card .ci svg { width: 22cqw; height: 22cqw; display: block; color: #fff; filter: drop-shadow(1cqw 1cqw 0 var(--night)); }
.card .tl { left: 5cqw; top: 4cqw; }
.card .br { right: 5cqw; bottom: 4cqw; transform: rotate(180deg); }
.mini-wild { display: block; width: 15cqw; height: 22cqw; border-radius: 50%; transform: rotate(30deg); background: conic-gradient(var(--red) 0 25%, var(--blue) 0 50%, var(--yellow) 0 75%, var(--green) 0); box-shadow: 0 0 0 1.4cqw #fff; }

/* back */
.card.back { background: var(--night); }
.card.back .oval { background: var(--red); box-shadow: 0 0 0 2.5cqw var(--yellow); }
.card .card-logo { position: absolute; z-index: 1; left: 50%; top: 50%; font-size: 21cqw; transform: translate(-50%, -50%) rotate(-30deg); padding: 0; }
.card .card-logo::before { display: none; }

/* empty place */
.card.slot { border: 0; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 2px rgba(255,255,255,.3); }
.card.mini { --cw: 26px; display: inline-block; vertical-align: middle; margin-right: -8px; box-shadow: 0 1px 2px rgba(0,0,0,.4); }

/* ---------------------------------------------------------------- lobby */
.lobby { margin-top: 8px; }
.code-text { font-size: clamp(2.4rem, 10vw, 3.4rem); font-weight: 900; font-style: italic; letter-spacing: .18em; color: var(--yellow); -webkit-text-stroke: 3px var(--night); paint-order: stroke fill; text-shadow: 3px 4px 0 var(--red); }
.qr { width: 180px; height: 180px; display: block; margin: 0 auto; border-radius: 12px; border: 6px solid #fff; box-shadow: 0 0 0 3px var(--red); }
.players .tags { margin-top: 2px; }
.lobby-wrap main { padding-bottom: 40px; }

/* ---------------------------------------------------------------- table */
body.in-game { overflow: hidden; overscroll-behavior: none; }
.table {
  --cw: min(19vw, 11.5svh, 104px);
  --ocw: calc(var(--cw) * .4);
  height: 100svh; display: flex; flex-direction: column; color: #fff; max-width: 980px; margin: 0 auto;
  padding: 0 max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
}
.gbar { display: flex; align-items: center; gap: 10px; padding: max(10px, env(safe-area-inset-top)) 4px 6px; flex: none; }
.gcode { font-weight: 900; letter-spacing: .15em; background: rgba(255,255,255,.15); border-radius: 8px; padding: 2px 8px; font-size: .85rem; }
.ground { font-size: .8rem; opacity: .85; font-weight: 600; }
.icon-btn { margin-left: auto; background: rgba(255,255,255,.15); box-shadow: none; padding: 6px 12px; font-size: 1.1rem; }

.badge { position: absolute; z-index: 5; right: -6px; bottom: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--yellow); color: var(--ink); font-weight: 900; font-size: 12px; display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.muted-w { opacity: .75; font-size: .8rem; font-weight: 600; }

/* opponents */
.opps { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; flex: none; scrollbar-width: none; }
.opps::-webkit-scrollbar { display: none; }
.opp { position: relative; flex: 1 0 auto; min-width: max-content; background: rgba(10, 5, 35, .4); border-radius: 12px; padding: 6px 10px 10px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.08); transition: box-shadow .3s, background .3s; }
.opp.active { background: rgba(245, 196, 0, .16); box-shadow: inset 0 0 0 2px var(--yellow), 0 0 18px rgba(245, 196, 0, .35); }
.opp.exposed { box-shadow: inset 0 0 0 2px var(--red), 0 0 20px rgba(229, 32, 46, .6); }
.opp.offline { opacity: .6; }
.opp-head { display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; margin-bottom: 5px; }
.opp-head .dot { width: 10px; height: 10px; }
.opp-name { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opp-fan { position: relative; height: calc(var(--ocw) * 1.5); width: calc(var(--ocw) * (1 + max(var(--n) - 1, 0) * .28)); min-width: var(--ocw); }
.opp-fan .card { --cw: var(--ocw); position: absolute; top: 0; left: calc(var(--i) * var(--ocw) * .28); }
.opp-fan .badge { min-width: 18px; height: 18px; font-size: 11px; right: -8px; bottom: -4px; padding: 0 5px; }
.zack-pill { background: var(--red); color: var(--yellow); font-style: italic; }
.catch-btn { position: absolute; right: 6px; bottom: 6px; background: var(--red); box-shadow: 0 2px 0 var(--red-dark); padding: 3px 8px; font-size: .72rem; animation: throb .6s ease-in-out infinite alternate; z-index: 6; }

/* centre: deck and discard pile */
.center { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: calc(var(--cw) * 1.5 + 40px); }
.center-row { display: flex; gap: calc(var(--cw) * .7); align-items: center; }
.deck { position: relative; width: var(--cw); }
.deck .under { position: absolute; left: 0; top: 0; transform: translate(calc(var(--u) * -2px), calc(var(--u) * 2px)); }
.deck > .card:not(.under) { position: relative; }
.deck.drawable { cursor: pointer; }
.deck.shake { animation: shake .5s; }
@keyframes shake { 20% { transform: rotate(-6deg); } 40% { transform: rotate(5deg) translateY(-3px); } 60% { transform: rotate(-4deg); } 80% { transform: rotate(2deg); } }
.pile { position: relative; width: var(--cw); aspect-ratio: 2 / 3; }
.pile > .card { position: absolute; inset: 0; transform: rotate(var(--r, 0deg)); }
.ring { position: absolute; inset: -18% -46%; border-radius: 50%; border: 4px solid var(--rc); box-shadow: 0 0 22px var(--rc), inset 0 0 18px color-mix(in srgb, var(--rc) 60%, transparent); opacity: .9; pointer-events: none; transition: border-color .4s, box-shadow .4s; }
.ring.pulse { animation: ring-pulse .6s ease-out; }
.ring.flip-dir { animation: ring-flip .6s ease-in-out; }
@keyframes ring-pulse { 0% { transform: scale(.8); opacity: 0; } 60% { transform: scale(1.08); } }
@keyframes ring-flip { 50% { transform: scaleX(-1); } }
.arrows { position: absolute; inset: 0; animation: spin 14s linear infinite; }
.ring.ccw .arrows { animation-direction: reverse; }
.arrow { position: absolute; left: 50%; color: var(--rc); font-size: calc(var(--cw) * .2); line-height: 1; text-shadow: 0 0 8px var(--rc); }
.arrow.a1 { top: 0; transform: translate(-50%, -55%); }
.arrow.a2 { bottom: 0; transform: translate(-50%, 55%) rotate(180deg); }
.ring.ccw .arrow.a1 { transform: translate(-50%, -55%) scaleX(-1); }
.ring.ccw .arrow.a2 { transform: translate(-50%, 55%) rotate(180deg) scaleX(-1); }
.chip { position: absolute; z-index: 8; right: -12%; top: -8%; width: calc(var(--cw) * .3); height: calc(var(--cw) * .3); border-radius: 50%; box-shadow: 0 0 0 3px #fff, 0 2px 6px rgba(0,0,0,.5); }
.ticker { margin-top: 14px; font-size: .78rem; opacity: .85; text-align: center; max-width: 100%; padding: 0 8px; animation: fade-in .4s; }
@keyframes fade-in { from { opacity: 0; } }

/* targets */
.target { cursor: pointer; }
.target::after { content: ''; position: absolute; inset: -5px; border-radius: calc(var(--cw) * .14); box-shadow: 0 0 0 3px var(--yellow), 0 0 22px 4px rgba(245, 196, 0, .6); animation: glow 1s ease-in-out infinite alternate; pointer-events: none; z-index: 9; }
.drop-over::after { box-shadow: 0 0 0 5px #fff, 0 0 30px 8px rgba(255, 255, 255, .8); }
@keyframes glow { from { opacity: .55; } to { opacity: 1; } }

/* status + catching */
.status { flex: none; text-align: center; font-size: .82rem; font-weight: 600; padding: 6px 10px; margin: 4px auto 6px; border-radius: 999px; background: rgba(10, 5, 35, .45); display: flex; align-items: center; gap: 6px; justify-content: center; flex-wrap: wrap; max-width: 100%; }
.status.mine { background: var(--yellow); color: var(--ink); box-shadow: 0 4px 14px rgba(245, 196, 0, .35); animation: pop .35s; }
.status.mine strong { font-weight: 900; text-transform: uppercase; letter-spacing: .03em; }
.status button { padding: 4px 12px; }
.catchbar { flex: none; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.catch-big { animation: throb .5s ease-in-out infinite alternate; font-size: .9rem; }
@keyframes throb { from { transform: scale(1); } to { transform: scale(1.07); } }

/* my area */
.mine { position: relative; flex: none; background: rgba(10, 5, 35, .4); border-radius: 18px; padding: 6px 8px 10px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.08); transition: box-shadow .3s; }
.mine.active { box-shadow: inset 0 0 0 2px var(--yellow), 0 0 26px rgba(245, 196, 0, .3); }
.mine.exposed { box-shadow: inset 0 0 0 2px var(--red), 0 0 26px rgba(229, 32, 46, .5); }
.mine-head { display: flex; align-items: center; gap: 8px; font-size: .85rem; padding: 0 4px; }
.hand { display: flex; justify-content: center; padding: calc(var(--cw) * .26) 4px 2px; min-height: calc(var(--cw) * 1.76); overflow: visible; }
.hand.scroll { justify-content: flex-start; overflow-x: auto; scrollbar-width: thin; }
.hand .card { transition: transform .16s; }
.hand .card + .card { margin-left: calc(var(--ov, 0px) * -1); }
.hand .card.can { cursor: grab; touch-action: none; transform: translateY(-9%); box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 6px 12px rgba(5, 2, 20, .55); }
.hand .card.dim::after { content: ''; position: absolute; inset: 0; z-index: 3; background: rgba(12, 6, 36, .5); border-radius: calc(var(--w) * .06); }
.hand .card.sel { transform: translateY(-24%) scale(1.06); box-shadow: 0 0 0 3px var(--yellow), 0 12px 24px rgba(0,0,0,.5); z-index: 7; }
@media (hover: hover) { .hand .card.can:hover { transform: translateY(-16%); z-index: 6; } }
.card.nope { animation: nope .35s; }
@keyframes nope { 25% { translate: -5px 0; } 75% { translate: 5px 0; } }
.zack-btn {
  position: absolute; right: 10px; top: calc(var(--cw) * -.55); z-index: 20; width: calc(var(--cw) * .95); height: calc(var(--cw) * .95); min-width: 74px; min-height: 74px;
  border-radius: 50%; padding: 0; background: var(--red); color: var(--yellow); font-weight: 900; font-style: italic; font-size: 1.15rem;
  -webkit-text-stroke: 1px var(--night); text-shadow: 2px 2px 0 var(--night);
  box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--yellow), 0 8px 22px rgba(0,0,0,.5); transform: rotate(-10deg); animation: zack-throb .7s ease-in-out infinite alternate;
}
.zack-btn.urgent { animation-duration: .3s; }
@keyframes zack-throb { from { transform: rotate(-10deg) scale(1); } to { transform: rotate(-4deg) scale(1.1); } }

.lifted { opacity: .25; }
.incoming { visibility: hidden; }
.landed { animation: pop .35s ease-out; }
.flip-in { animation: flip-in .3s ease-out; }
@keyframes pop { 0% { scale: 1.18; } 100% { scale: 1; } }
@keyframes flip-in { from { rotate: y 90deg; } }

/* flying cards, bubbles */
.fly-layer { position: fixed; inset: 0; pointer-events: none; z-index: 1500; }
.flying { position: fixed !important; margin: 0; z-index: 1500; will-change: transform; }
.ghost { position: fixed; left: 0; top: 0; z-index: 1600; pointer-events: none; box-shadow: 0 18px 34px rgba(0,0,0,.5); }
.bubble { position: fixed; z-index: 1700; transform: translate(-50%, -50%); font-weight: 900; font-style: italic; font-size: 1.8rem; color: var(--yellow); white-space: nowrap;
  -webkit-text-stroke: 2px var(--night); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--night); animation: bubble 1.6s ease-out forwards; }
.bubble.b-zack { background: var(--red); padding: .25em .6em; border-radius: 50%; box-shadow: 0 0 0 3px #fff, 0 6px 18px rgba(0,0,0,.5); font-size: 2.2rem; }
.bubble.b-caught { color: #fff; background: var(--night); padding: .2em .6em; border-radius: 14px; box-shadow: 0 0 0 3px var(--red); font-size: 1.4rem; -webkit-text-stroke: 0; }
.bubble.b-skip { font-size: 3rem; color: #fff; font-style: normal; }
.bubble.b-penalty { font-size: 2.4rem; color: #fff; text-shadow: 3px 3px 0 var(--red); }
@keyframes bubble { 0% { opacity: 0; scale: .3; } 15% { opacity: 1; scale: 1.15; } 25% { scale: 1; } 75% { opacity: 1; translate: 0 -12px; } 100% { opacity: 0; translate: 0 -34px; } }

/* colour picker */
.picker { background: #fff; border-radius: 22px; padding: 18px; width: min(340px, 100%); text-align: center; color: var(--ink); animation: pop .3s; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.picker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.pick { aspect-ratio: 1; border-radius: 18px; font-size: 1.1rem; color: #fff; text-shadow: 1px 2px 0 rgba(0,0,0,.35); box-shadow: inset 0 0 0 5px #fff, 0 4px 0 rgba(0,0,0,.25); }
.pick-red { background: var(--red); }
.pick-yellow { background: var(--yellow); color: var(--ink); text-shadow: none; }
.pick-green { background: var(--green); }
.pick-blue { background: var(--blue); }

/* menu + overlays */
.menu { position: fixed; right: 12px; top: calc(max(8px, env(safe-area-inset-top)) + 44px); z-index: 1200; background: #fff; border-radius: 14px; padding: 6px; display: flex; flex-direction: column; min-width: 220px; box-shadow: 0 12px 30px rgba(0,0,0,.4); animation: pop .2s; }
.menu button { background: none; box-shadow: none; color: var(--ink); text-align: left; padding: 10px 12px; font-weight: 700; }
.menu button:hover { background: #f1eefc; }
.overlay { position: fixed; inset: 0; z-index: 1300; background: rgba(8, 4, 26, .6); display: grid; place-items: center; padding: 16px; animation: fade-in .3s; backdrop-filter: blur(3px); }
.modal { width: min(480px, 100%); max-height: calc(100svh - 32px); overflow: auto; color: var(--ink); animation: pop .35s; }
.over { text-align: center; }
.over h2 { font-size: 1.8rem; font-weight: 900; font-style: italic; color: var(--red); }
.over-cards { display: flex; justify-content: center; --cw: 64px; height: 104px; margin-top: -4px; }
.over-cards .tilt-l { transform: rotate(-12deg) translateX(10px); }
.over-cards .tilt-r { transform: rotate(12deg) translateX(-10px); }
.over-points { display: inline-block; background: var(--yellow); color: var(--ink); font-weight: 900; padding: 4px 14px; border-radius: 999px; margin-bottom: 12px; }
.match-banner { font-weight: 900; font-size: 1.15rem; background: linear-gradient(90deg, #ffe58a, var(--yellow)); border-radius: 12px; padding: 8px; margin: 6px 0 10px; }
.scores li { text-align: left; }
.scores li.win { background: #fff6cf; border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.score { color: var(--ink); white-space: nowrap; }
.left-cards { margin-top: 4px; display: flex; flex-wrap: wrap; padding-right: 8px; }
.left-cards .card.mini { margin-right: -7px; margin-bottom: 2px; }

/* wider screens: more room for the cards */
@media (min-width: 700px) and (min-height: 700px) {
  .table { --cw: min(12vw, 12svh, 112px); --ocw: calc(var(--cw) * .45); }
  .status { font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.status.zack-now { margin-right: calc(max(var(--cw) * .95, 74px) + 18px); background: var(--red); color: var(--yellow); font-weight: 900; box-shadow: 0 4px 16px rgba(229, 32, 46, .5); animation: throb .4s ease-in-out infinite alternate; }
