:root {
  /* surfaces */
  --bg: #0b0a12; --panel: #15131f; --panel2: #1d1a2b; --line: #2c2840;
  --glass: #15131ff2; --glass-bar: #0b0a12cc; --scrim: #000000b3;
  /* text */
  --ink: #f4f1ff; --ink-2: #d8d3f0; --dim: #9a94b8;
  /* accents (+ deep variants for text-on-colour contrast and pressed shadows) */
  --red: #ff2e63; --red2: #c4123f; --red-deep: #d0144b; --red-dark: #6d0020;
  --gold: #ffd23f; --gold-dark: #9c7400;
  --blue: #3dd6ff; --blue-dark: #0a6d85;
  --green: #7cff6b; --green2: #2fbf3a; --green-dark: #145a1b; --green-ink: #062b0a;
  --purple: #c86bff; --orange: #ffad4d;
  /* shape */
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-pill: 999px; --r: var(--r-md);
  /* depth */
  --shadow-pop: 0 4px 0 #000a; --shadow-float: 0 20px 60px #000c; --shadow-modal: 0 30px 90px #000;
  --head: 'Bungee', Impact, sans-serif;
  color-scheme: dark;
}
/* ---- Colour themes (Settings). Each one only redefines the palette; everything else follows. ---- */
:root[data-theme="arcade"] {
  --bg: #070b1a; --panel: #0e1530; --panel2: #152042; --line: #26325e;
  --glass: #0e1530f2; --glass-bar: #070b1acc;
  --ink: #f0f6ff; --ink-2: #cfe0ff; --dim: #8a98c8;
  --red: #ff4fd8; --red2: #c21fa6; --red-deep: #c4199f; --red-dark: #5e0c50;
  --gold: #fff35c; --gold-dark: #9a8f00;
  --blue: #4dffea; --blue-dark: #0a7569;
  --green: #7dff5a; --green2: #3fcf25; --green-dark: #1a5a10; --green-ink: #072b02;
  --purple: #8a7bff; --orange: #ffb347;
}
:root[data-theme="ocean"] {
  --bg: #06121a; --panel: #0c1c27; --panel2: #122634; --line: #1f3a4d;
  --glass: #0c1c27f2; --glass-bar: #06121acc;
  --ink: #eef8ff; --ink-2: #cfe6f5; --dim: #86a3b8;
  --red: #3da5ff; --red2: #1f6fd1; --red-deep: #1a62c0; --red-dark: #0b2f5e;
  --gold: #ffcf5a; --gold-dark: #94700a;
  --blue: #5ef2d6; --blue-dark: #0b6e5f;
  --green: #8cf27a; --green2: #3cb84a; --green-dark: #17501d; --green-ink: #072a0b;
  --purple: #b28cff; --orange: #ffa95a;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; overflow-x: clip; }
body { background: var(--bg); color: var(--ink); font: 15px/1.4 Inter, system-ui, sans-serif; overflow-x: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; }
a { color: inherit; }
img { display: block; }
.dim { color: var(--dim); }
small { color: var(--dim); }

/* background */
#bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.blob { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .22; animation: drift 24s ease-in-out infinite alternate; }
.b1 { background: var(--red); top: -25vmax; left: -15vmax; }
.b2 { background: var(--purple); bottom: -30vmax; right: -20vmax; animation-delay: -8s; }
.b3 { background: var(--blue); top: 30%; left: 40%; width: 35vmax; height: 35vmax; opacity: .1; animation-delay: -16s; }
body.myturn .b1 { opacity: .4; animation-duration: 6s; }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.15); } }
.grain { position: absolute; inset: -50%; background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence baseFrequency='.9' numOctaves='2'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='.5'/></svg>"); opacity: .06; animation: grain 1s steps(4) infinite; }
@keyframes grain { 50% { transform: translate(-3%, 2%); } }

/* logo */
.logo { font-family: 'Bungee Shade', var(--head); font-size: 64px; letter-spacing: 2px; color: var(--red); text-decoration: none; text-shadow: 0 0 30px color-mix(in srgb, var(--red) 50%, transparent); transform: rotate(-3deg); display: inline-block; }
.logo.sm { font-size: 24px; transform: rotate(-4deg); }
.logo.huge { font-size: clamp(56px, 14vw, 150px); animation: logoIn .9s cubic-bezier(.2,1.6,.4,1) both; }
.logo .o { display: inline-block; animation: wobble 2.4s ease-in-out infinite; color: var(--gold); }
.logo.pulse { animation: pulse 1s ease-in-out infinite alternate; }
@keyframes logoIn { from { transform: scale(3) rotate(-20deg); opacity: 0; filter: blur(10px); } }
@keyframes wobble { 50% { transform: rotate(18deg) scale(1.15); } }
@keyframes pulse { to { opacity: .5; transform: rotate(-3deg) scale(.96); } }

/* buttons & chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--r-sm); padding: 12px 20px; background: var(--panel2); font-family: var(--head); letter-spacing: 1px; text-decoration: none; box-shadow: var(--shadow-pop); transition: transform .1s, box-shadow .1s, filter .2s; }
.btn:hover { filter: brightness(1.15); transform: translateY(-2px); box-shadow: 0 6px 0 #000a; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #000a; }
.btn.red { background: linear-gradient(180deg, var(--red), var(--red2)); color: #fff; }
.btn.big { font-size: 22px; padding: 16px 30px; }
.btn.sm { padding: 8px 14px; font-size: 13px; }
.btn.ghost { background: transparent; border: 2px solid var(--line); box-shadow: none; }
.chip { border: 1px solid var(--line); background: var(--panel); border-radius: var(--r-pill); padding: 7px 13px; font-size: 13px; font-weight: 600; transition: all .15s; }
.chip:hover { border-color: var(--dim); }
.chip.icon.off { opacity: .45; text-decoration: line-through; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.code b { font-family: var(--head); color: var(--gold); letter-spacing: 2px; }
.x { border: 0; background: transparent; color: var(--dim); font-size: 14px; padding: 4px 8px; border-radius: var(--r-sm); }
.x:hover { background: color-mix(in srgb, var(--red) 20%, transparent); color: var(--red); }
input { background: #0006; border: 2px solid var(--line); border-radius: var(--r-sm); padding: 11px 14px; color: var(--ink); outline: none; transition: border-color .2s, box-shadow .2s; width: 100%; }
input:focus { border-color: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 13%, transparent); }
.card { background: color-mix(in srgb, var(--panel) 88%, transparent); border: 1px solid var(--line); border-radius: var(--r); backdrop-filter: blur(10px); }

/* home */
.center { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 20px; padding: 20px 16px; text-align: center; }
.home { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 40px 16px; text-align: center; }
.tagline { font-size: 20px; color: var(--dim); margin: 0; animation: up .6s .3s both; }
.tagline b { color: var(--ink); }
.home-steps { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; animation: up .6s .45s both; }
.home-steps div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 8px 14px 8px 8px; font-weight: 600; }
.home-steps b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--red); margin-right: 8px; font-family: var(--head); font-size: 12px; }
#create { animation: up .6s .6s both, glow 2s 1.2s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 4px 0 #000a, 0 0 40px var(--red); } }
.joinc { display: flex; gap: 8px; width: min(360px, 100%); animation: up .6s .7s both; }
@keyframes up { from { opacity: 0; transform: translateY(24px); } }
.deck { position: relative; height: 150px; width: min(560px, 100%); margin-top: 20px; }
.deck img { position: absolute; left: 50%; top: 0; width: 230px; border-radius: var(--r-sm); box-shadow: 0 10px 30px #000c; transform: translateX(-50%) rotate(calc((var(--i) - 2) * 9deg)) translateX(calc((var(--i) - 2) * 70px)); animation: deal .7s calc(.8s + var(--i) * .1s) cubic-bezier(.2,1.4,.4,1) both; }
.deck img:nth-child(2), .deck img:nth-child(4) { filter: grayscale(1) brightness(.5); }
@keyframes deal { from { transform: translateX(-50%) translateY(200px) rotate(0); opacity: 0; } }
.deck-stamp { position: absolute; left: 50%; top: 40px; transform: translateX(-50%) rotate(-14deg); font-family: var(--head); font-size: 44px; color: var(--red); border: 6px solid var(--red); padding: 0 14px; border-radius: var(--r-sm); mix-blend-mode: screen; animation: stampIn .5s 1.7s cubic-bezier(.3,1.8,.5,1) both; }

/* join */
.join { width: min(440px, calc(100vw - 32px)); padding: 24px; display: grid; gap: 14px; text-align: left; animation: up .5s both; }
.join h2 { margin: 0; font-family: var(--head); font-weight: 400; }
.codebig { color: var(--gold); letter-spacing: 3px; }
.join label { display: grid; gap: 6px; font-weight: 600; font-size: 13px; color: var(--dim); }
.hint { margin: -6px 0 0; font-size: 12px; color: var(--dim); }
.who { display: flex; align-items: center; gap: 4px; }
.who .dim { margin-left: 8px; font-size: 13px; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: var(--glass-bar); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar-right { display: flex; gap: 8px; margin-left: auto; }
.stepper { display: flex; align-items: center; gap: 6px; margin: 0 auto; font-size: 12px; font-weight: 600; color: var(--dim); }
.step { display: flex; align-items: center; gap: 6px; white-space: nowrap; transition: color .3s; }
.step b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); font-family: var(--head); font-size: 10px; }
.step.on { color: var(--ink); } .step.on b { background: var(--red); border-color: var(--red); animation: beat 1.2s infinite; }
.step.done b { background: var(--line); }
.stepper .sep { width: 16px; height: 2px; background: var(--line); }
@keyframes beat { 50% { transform: scale(1.2); box-shadow: 0 0 14px var(--red); } }
body.offline .topbar::after { content: 'reconnecting…'; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); background: var(--gold); color: #000; font-weight: 800; font-size: 12px; padding: 3px 12px; border-radius: 0 0 8px 8px; }

.main { padding: 20px; max-width: 1400px; margin: 0 auto; }

/* avatars */
.av { --s: 32px; width: var(--s); height: var(--s); border-radius: 50%; display: inline-grid; place-items: center; background: hsl(var(--h) 70% 45%); font-style: normal; font-weight: 800; overflow: hidden; flex: none; border: 2px solid var(--bg); vertical-align: middle; position: relative; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.xs { --s: 22px; font-size: 10px; margin-right: -6px; }
.av.lg { --s: 44px; font-size: 18px; }
.av.xl { --s: 64px; font-size: 26px; }
.av.away { filter: grayscale(1) opacity(.5); }

/* lobby */
.phase-lobby { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; padding-bottom: 120px; align-items: start; }
.players { padding: 16px; position: sticky; top: 72px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sec-h h2 { font-size: 1.17em; margin: 0; font-family: var(--head); font-weight: 400; letter-spacing: 1px; }
.plist { display: grid; gap: 8px; }
.pl { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-md); background: var(--panel2); animation: slideIn .5s cubic-bezier(.2,1.4,.4,1) both; border: 1px solid transparent; }
.pl.ok { border-color: color-mix(in srgb, var(--green) 20%, transparent); }
.pl.private, .pl.error { border-color: color-mix(in srgb, var(--gold) 33%, transparent); }
.pl-info { flex: 1; min-width: 0; display: grid; }
.pl-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* your own row in the squad: outlined in your accent instead of a label */
.pl.me { border: 2px solid var(--red-deep); box-shadow: 0 0 14px color-mix(in srgb, var(--red) 20%, transparent); padding: 7px; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-30px) scale(.9); } }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--dim); border-top-color: var(--red); border-radius: 50%; animation: rot .7s linear infinite; vertical-align: -2px; }
@keyframes rot { to { transform: rotate(360deg); } }
#mylink { margin-top: 12px; display: grid; gap: 10px; }
.linkf { display: flex; gap: 6px; }
.linkbtn { background: none; border: 0; color: var(--dim); font-size: 12px; text-decoration: underline; justify-self: start; padding: 0; }
.private { background: color-mix(in srgb, var(--gold) 8%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 33%, transparent); border-radius: var(--r-md); padding: 12px; font-size: 13px; animation: up .4s both; }
.private h4 { margin: 0 0 6px; color: var(--gold); }
.private ol { margin: 0 0 10px; padding-left: 18px; display: grid; gap: 4px; }
.private.err { color: var(--gold); }

.pool { padding: 16px; min-height: 60vh; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tab { border: 0; background: transparent; padding: 10px 14px; border-radius: var(--r-sm); font-weight: 800; color: var(--dim); position: relative; transition: color .2s, background .2s; }
.tab b { background: var(--panel2); border-radius: var(--r-xs); padding: 1px 7px; margin-left: 4px; font-size: 12px; }
.tab.on { color: var(--ink); background: var(--panel2); }
.tab.on::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 3px; border-radius: 2px; background: var(--red); animation: grow .3s both; }
@keyframes grow { from { transform: scaleX(0); } }
.tools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.tools > input { flex: 1; min-width: 180px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.pool-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tile { background: var(--panel2); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; border: 2px solid transparent; transition: transform .2s, border-color .2s, box-shadow .2s; animation: pop .45s calc(var(--d) * 25ms) cubic-bezier(.2,1.5,.4,1) both; }
.tile:hover { transform: translateY(-4px) rotate(-.5deg); box-shadow: 0 14px 30px #000a; }
.tile.nominated { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 20%, transparent), 0 10px 30px color-mix(in srgb, var(--gold) 13%, transparent); }
@keyframes pop { from { opacity: 0; transform: scale(.85) translateY(20px); } }
.art { position: relative; aspect-ratio: 460/215; background: #000; overflow: hidden; }
.art img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.tile:hover .art img { transform: scale(1.06); }
.ribbon { position: absolute; top: 8px; left: 8px; background: #000c; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: var(--r-xs); }
.ribbon.hot { color: var(--orange); }
.pitchtile .ribbon { background: var(--purple); }
.tb { padding: 10px 12px 4px; flex: 1; display: grid; gap: 6px; align-content: start; }
.tn { font-weight: 800; line-height: 1.2; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--dim); }
.tag { font-size: 10px; font-weight: 800; letter-spacing: .5px; padding: 2px 7px; border-radius: var(--r-xs); background: var(--line); color: var(--ink); }
.tag.mp { background: color-mix(in srgb, var(--blue) 15%, transparent); color: var(--blue); }
.tag.solo { background: #ffffff10; color: var(--dim); }
/* player-count fit */
.tag.fit { cursor: help; white-space: nowrap; }
.tag.fit.fits { background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--green); }
.tag.fit.rpt { background: color-mix(in srgb, var(--gold) 12%, transparent); color: var(--gold); }
.tag.fit.misfit { background: var(--red); color: #fff; }
.tile.misfit .art img { filter: grayscale(.7) brightness(.7); }
.tile.misfit .tn { color: var(--ink-2); }
.tag.ok { background: color-mix(in srgb, var(--green) 13%, transparent); color: var(--green); }
.tag.warn { background: color-mix(in srgb, var(--gold) 13%, transparent); color: var(--gold); }
.tag.pitch { background: color-mix(in srgb, var(--purple) 16%, transparent); color: var(--purple); }
.owners { font-weight: 700; color: var(--gold); }
.missing { font-size: 12px; color: var(--dim); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.missing span { margin-left: 8px; }
.price { font-weight: 800; color: var(--green); white-space: nowrap; }
.price s { color: var(--dim); font-weight: 400; }
.disc { background: color-mix(in srgb, var(--green) 26%, var(--bg)); color: var(--green); padding: 0 4px; border-radius: 3px; }
.tactions { display: flex; align-items: center; gap: 8px; padding: 8px 12px 12px; }
.noms { display: flex; flex: 1; padding-left: 4px; }
.nom { border: 2px solid var(--line); background: transparent; border-radius: var(--r-sm); padding: 6px 12px; font-family: var(--head); font-size: 12px; letter-spacing: .5px; transition: all .15s; }
.nom:hover { border-color: var(--gold); color: var(--gold); transform: scale(1.05); }
.nom.on { background: var(--gold); border-color: var(--gold); color: #000; animation: nomPop .4s cubic-bezier(.2,2,.4,1); }
@keyframes nomPop { 40% { transform: scale(1.25) rotate(-4deg); } }
.reacts { display: flex; gap: 6px; }
.react { border: 1px solid var(--line); background: var(--panel); border-radius: var(--r-pill); padding: 6px 12px; font-size: 13px; font-weight: 600; transition: all .15s; }
.react.on { background: var(--green); color: #000; border-color: var(--green); transform: scale(1.05); }
.react.no.on { background: var(--red); color: #fff; border-color: var(--red); }
.react-avs { display: flex; padding-left: 4px; min-height: 22px; }
.empty { grid-column: 1/-1; text-align: center; padding: 60px 20px; color: var(--ink); font-weight: 600; }
.bigemoji { font-size: 56px; animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px) rotate(6deg); } }
.searchbox { position: relative; flex: 1; }
.search-res { display: grid; gap: 6px; margin-top: 8px; }
.sr { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto auto; grid-template-areas: "art name price btn"; align-items: center; column-gap: 12px; row-gap: 6px;
  background: var(--panel2); padding: 8px; border-radius: var(--r-sm); animation: up .3s both; }
.sr-art { grid-area: art; position: relative; aspect-ratio: 460 / 215; border-radius: var(--r-xs); overflow: hidden; background: linear-gradient(135deg, var(--panel), #000); }
.sr-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sr-art i { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 18px; color: #fff; text-shadow: 0 2px 8px #000; background: #0003; opacity: .75; transition: opacity .15s, background .15s; }
.sr:hover .sr-art i { opacity: 1; background: #0006; }
.sr-name { grid-area: name; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.sr-price { grid-area: price; text-align: right; }
.sr-btn { grid-area: btn; justify-self: end; white-space: nowrap; }

/* tray */
.tray { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 15; display: flex; align-items: center; gap: 20px; padding: 12px 16px; border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow-float); backdrop-filter: blur(14px); width: max-content; max-width: calc(100vw - 32px); animation: trayUp .6s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes trayUp { from { transform: translate(-50%, 150%); } }
.tray .lbl { font-size: 11px; font-weight: 800; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; display: block; }
.tray-mine { display: flex; align-items: center; gap: 8px; }
.tray-mine .lbl { margin-right: 4px; }
.tray-slots { display: flex; gap: 8px; }
.ready-avs { display: flex; gap: 2px; margin-top: 4px; justify-content: center; }
.rav { position: relative; display: inline-block; transition: transform .3s, filter .3s; filter: grayscale(1) opacity(.45); }
.rav.ok { filter: none; animation: nomPop .5s cubic-bezier(.2,2,.4,1); }
.rav.ok::after { content: '✓'; position: absolute; right: -3px; bottom: -3px; width: 15px; height: 15px; border-radius: 50%; background: var(--green); color: #000; font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.tray-group .lbl b { color: var(--gold); }
.hostwait { display: grid; justify-items: center; gap: 4px; }
.waitingbtn { opacity: .55; filter: grayscale(.6); font-size: 18px; }
.nb { font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: var(--r-xs); background: var(--line); color: var(--dim); white-space: nowrap; }
.nb.ok { background: color-mix(in srgb, var(--green) 13%, transparent); color: var(--green); animation: nomPop .5s cubic-bezier(.2,2,.4,1); }
.rav.noanim:not(.ok) { animation: none; }
.tray-mine .lbl b { color: var(--gold); }
.slot { width: 74px; height: 35px; border-radius: var(--r-xs); border: 2px dashed var(--line); background: transparent; padding: 0; overflow: hidden; position: relative; display: block; }
.slot.full { border: 2px solid var(--gold); animation: nomPop .4s; }
.slot img { width: 100%; height: 100%; object-fit: cover; }
.slot span { position: absolute; inset: 0; display: grid; place-items: center; background: #000a; opacity: 0; transition: opacity .2s; font-weight: 800; }
.slot.full:hover span { opacity: 1; }
.tray-group { text-align: center; }
.bigcount { font-family: var(--head); font-size: 26px; color: var(--gold); display: block; line-height: 1; }
.tray-group small { font-size: 10px; }
.start.ready { animation: glow 1.6s ease-in-out infinite; }
.waiting { color: var(--dim); font-weight: 600; animation: pulse 1.2s infinite alternate; }

/* veto */
.phase-veto { padding-bottom: 60px; }
.turnbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.turn { display: flex; align-items: center; gap: 16px; animation: turnIn .6s cubic-bezier(.2,1.5,.4,1) both; }
.tlabel { font-family: var(--head); font-size: clamp(26px, 4.5vw, 48px); line-height: 1; }
body.myturn .tlabel { color: var(--red); text-shadow: 0 0 30px var(--red); animation: throb 1s ease-in-out infinite; }
body.myturn .turn .av { box-shadow: 0 0 0 4px var(--red), 0 0 30px var(--red); }
@keyframes throb { 50% { transform: scale(1.04); } }
@keyframes turnIn { from { transform: translateX(-60px); opacity: 0; } }
.tsub { color: var(--dim); margin-top: 6px; }
.tsub b { color: var(--gold); }
.timer { position: relative; width: 84px; height: 84px; flex: none; }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 7; }
.timer .trk { stroke: var(--line); }
.timer .prg { stroke: var(--green); stroke-linecap: round; transition: stroke-dashoffset .2s linear, stroke .3s; }
.timer b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--head); font-size: 28px; }
.timer.urgent .prg { stroke: var(--gold); }
.timer.panic .prg { stroke: var(--red); }
.timer.panic { animation: panic .5s ease-in-out infinite; }
.timer.panic b { color: var(--red); }
@keyframes panic { 25% { transform: rotate(-6deg) scale(1.08); } 75% { transform: rotate(6deg) scale(1.08); } }
.order { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.ord { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: var(--r-pill); background: var(--panel); border: 1px solid var(--line); font-size: 13px; font-weight: 600; transition: all .3s; opacity: .6; }
.ord.on { opacity: 1; background: var(--red-deep); border-color: var(--red-deep); transform: scale(1.1); box-shadow: 0 0 20px color-mix(in srgb, var(--red) 50%, transparent); }
.ord .sh { font-style: normal; font-size: 12px; }
.order .arrow { color: var(--line); font-style: normal; font-weight: 800; }
.vwrap { display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; perspective: 1000px; }
.vcard { position: relative; background: var(--panel2); border-radius: var(--r-md); overflow: visible; border: 2px solid var(--line); cursor: pointer; transition: transform .25s cubic-bezier(.2,1.5,.4,1), border-color .2s, box-shadow .2s, filter .6s; animation: dealCard .6s calc(var(--i) * 70ms) cubic-bezier(.2,1.4,.4,1) both; }
.vcard .art { border-radius: var(--r-md) var(--r-md) 0 0; }
@keyframes dealCard { from { opacity: 0; transform: translateY(-80px) rotateX(60deg) rotate(calc((var(--i) - 3) * 4deg)); } }
.vcard.hunt:hover { transform: translateY(-6px) rotate(-1deg); border-color: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 25%, transparent), 0 18px 40px #000c; }
.vcard.hunt:hover .art::after, .vcard.sel .art::after { content: '⌖'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 90px; color: color-mix(in srgb, var(--red) 80%, transparent); text-shadow: 0 0 20px #000; animation: aim 1s ease-in-out infinite; }
@keyframes aim { 50% { transform: scale(1.15) rotate(45deg); } }
.vcard.sel { transform: translateY(-10px) scale(1.04); border-color: var(--red); box-shadow: 0 0 0 4px var(--red), 0 0 50px color-mix(in srgb, var(--red) 44%, transparent); z-index: 3; }
.vb { padding: 10px 12px 12px; display: grid; gap: 6px; }
.vn { font-weight: 800; font-size: 16px; line-height: 1.2; }
.vm { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vby { display: flex; padding-left: 4px; min-height: 22px; }
.hp { color: var(--dim); letter-spacing: 2px; font-size: 16px; }
.hp i { font-style: normal; transition: color .3s; }
.hp i.full { color: var(--red); text-shadow: 0 0 8px var(--red); }
.vcard.k-pitch { border-color: color-mix(in srgb, var(--purple) 40%, transparent); }
.vetobtn { position: absolute; left: 50%; top: 32%; transform: translate(-50%, -50%); z-index: 5; font-family: var(--head); font-size: 30px; letter-spacing: 2px; color: #fff; background: linear-gradient(180deg, var(--red), var(--red2)); border: 4px solid #fff; border-radius: var(--r-md); padding: 8px 26px; box-shadow: 0 6px 0 var(--red-dark), 0 0 40px var(--red); animation: vetoIn .35s cubic-bezier(.2,2,.4,1) both, vetoPulse .8s .35s ease-in-out infinite; }
.vetobtn:active { transform: translate(-50%, -45%); box-shadow: 0 2px 0 var(--red-dark); }
@keyframes vetoIn { from { transform: translate(-50%, -50%) scale(0) rotate(-30deg); } }
@keyframes vetoPulse { 50% { transform: translate(-50%, -50%) scale(1.08); } }
.shieldbtn { position: absolute; right: 8px; top: 8px; z-index: 4; border: 2px solid var(--blue); background: color-mix(in srgb, var(--bg) 80%, transparent); border-radius: var(--r-sm); width: 38px; height: 38px; font-size: 18px; opacity: .75; transition: all .2s; }
.shieldbtn:hover { opacity: 1; transform: scale(1.15); box-shadow: 0 0 20px var(--blue); }
.vcard.shielded { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 33%, transparent), 0 0 40px color-mix(in srgb, var(--blue) 27%, transparent); }
.shieldfx { position: absolute; inset: -6px; pointer-events: none; border-radius: var(--r-lg); z-index: 2; }
.shieldfx .hex { position: absolute; inset: 0; border-radius: var(--r-lg); background: repeating-linear-gradient(60deg, color-mix(in srgb, var(--blue) 6%, transparent) 0 10px, transparent 10px 20px), radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--blue) 19%, transparent), transparent 70%); animation: shimmer 2s linear infinite, shieldUp .5s cubic-bezier(.2,1.8,.4,1) both; }
@keyframes shimmer { to { background-position: 40px 0, 0 0; } }
@keyframes shieldUp { from { transform: scale(1.4); opacity: 0; } }
.shieldfx span { position: absolute; top: 14px; left: 14px; background: var(--blue); color: #000; font-weight: 800; font-size: 11px; padding: 3px 8px; border-radius: var(--r-xs); }
/* dead */
/* Grey out the card's art and text, not the card itself, so the red stamp and gold last words keep their colour. */
.vcard.dead .art, .vcard.dead .vb { filter: grayscale(1) brightness(.55); }
.vcard.dead { cursor: default; transform: scale(.96) rotate(calc((var(--i) % 3 - 1) * 1.5deg)); border-color: color-mix(in srgb, var(--red) 20%, transparent); }
.stamp { position: absolute; left: 50%; top: 38%; z-index: 6; transform: translate(-50%, -50%) rotate(-16deg); font-family: var(--head); font-size: 42px; letter-spacing: 3px; color: var(--red); border: 6px solid var(--red); border-radius: var(--r-sm); padding: 0 14px; filter: grayscale(0); mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='80'><filter id='r'><feTurbulence baseFrequency='.08' numOctaves='3' seed='4'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 -2.2 1.6'/></filter><rect width='200' height='80' filter='url(%23r)'/></svg>"); mask-size: 180px; pointer-events: none; }
.vcard.dead .stamp { filter: none; }
.vcard.dead { --stampC: var(--red); }
.killer { position: absolute; left: 0; right: 0; top: 62%; text-align: center; z-index: 6; font-weight: 800; color: #fff; text-shadow: 0 2px 6px #000; font-size: 13px; }
.crack { position: absolute; inset: 0; opacity: 0; background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 460 215'><g fill='none' stroke='white' stroke-width='3' opacity='.9'><path d='M230 100 L180 40 L150 0 M230 100 L300 30 L330 0 M230 100 L120 130 L40 150 M230 100 L320 160 L420 215 M230 100 L240 215 M180 40 L130 60 M300 30 L360 50 M120 130 L100 200'/></g></svg>") center/cover; }
.vcard.k-pitch .crack { opacity: var(--cracked, 0); }
.vcard.k-pitch:has(.hp i:not(.full)) .crack { opacity: .9; }
/* patched nodes skip their entrance animation (fx-* rules below still win) */
.noanim, .noanim .stamp, .noanim .killer { animation: none; }
.noanim .shieldfx .hex { animation: shimmer 2s linear infinite; }
/* fresh event animations */
.vcard.fx-veto { animation: kill .9s cubic-bezier(.2,1.2,.4,1) both; z-index: 5; }
.vcard.fx-veto .stamp { animation: stampIn .45s .1s cubic-bezier(.3,1.8,.5,1) both; }
.vcard.fx-veto .killer { animation: up .4s .5s both; }
@keyframes kill { 0% { filter: none; transform: scale(1.08); } 15% { transform: scale(.9) rotate(-3deg); filter: brightness(2) saturate(3) hue-rotate(-30deg); } 30% { transform: scale(1.02) rotate(2deg); } 100% { filter: none; } }
@keyframes stampIn { 0% { transform: translate(-50%, -50%) rotate(-30deg) scale(4); opacity: 0; } 60% { transform: translate(-50%, -50%) rotate(-14deg) scale(.9); opacity: 1; } 100% { transform: translate(-50%, -50%) rotate(-16deg) scale(1); } }
.vcard.fx-hit { animation: hit .6s both; }
.vcard.fx-hit .crack { animation: crackIn .3s both; }
@keyframes hit { 20% { transform: translateX(-12px) rotate(-3deg); filter: brightness(2); } 40% { transform: translateX(10px) rotate(2deg); } 60% { transform: translateX(-6px); } }
@keyframes crackIn { from { opacity: 0; transform: scale(1.4); } to { opacity: .9; } }
.vcard.fx-block { animation: blocked .8s both; }
.vcard.fx-block::after { content: '🛡️'; position: absolute; left: 50%; top: 40%; font-size: 90px; z-index: 7; animation: shatter .8s both; pointer-events: none; }
@keyframes blocked { 15% { transform: scale(1.08); box-shadow: 0 0 0 10px var(--blue), 0 0 80px var(--blue); } 40% { transform: scale(.97) rotate(-1deg); } }
@keyframes shatter { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 1; } 40% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(2.4) rotate(30deg); opacity: 0; filter: blur(6px); } }
.vcard.fx-shield .shieldfx .hex { animation: shimmer 2s linear infinite, shieldUp .7s cubic-bezier(.2,1.8,.4,1) both; }
.vlog { padding: 14px; position: sticky; top: 76px; max-height: calc(100vh - 100px); overflow: auto; }
.vlog h2 { font-size: 1em; margin: 0 0 10px; font-family: var(--head); font-weight: 400; letter-spacing: 1px; }
.logl { font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--line); animation: slideIn .4s both; }
.logl:first-of-type { background: linear-gradient(90deg, color-mix(in srgb, var(--red) 13%, transparent), transparent); }
.logl i { color: var(--dim); }
.l-block b { color: var(--blue); }
.myshield .hidden-count { display: block; margin-top: 6px; color: var(--ink); animation: throb 1.6s ease-in-out infinite; }
.myshield { margin-top: 12px; font-size: 12px; color: var(--blue); background: color-mix(in srgb, var(--blue) 7%, transparent); padding: 8px 10px; border-radius: var(--r-sm); }

/* roulette */
.phase-roulette { display: grid; place-items: center; }
.roul { display: grid; justify-items: center; gap: 18px; padding-top: 10px; }
.rtitle { font-family: var(--head); font-weight: 400; font-size: clamp(26px, 5vw, 52px); margin: 0; letter-spacing: 3px; background: linear-gradient(90deg, var(--gold), var(--red), var(--purple), var(--blue), var(--gold)); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: rainbow 3s linear infinite, up .6s both; }
@keyframes rainbow { to { background-position: 300% 0; } }
.wheelwrap { --wheel: min(560px, 86vw); position: relative; width: var(--wheel); aspect-ratio: 1; animation: wheelIn 1s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes wheelIn { from { transform: scale(0) rotate(-180deg); opacity: 0; } }
.wheelwrap canvas { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 10px var(--panel2), 0 0 0 14px var(--gold), 0 0 80px color-mix(in srgb, var(--gold) 33%, transparent), 0 30px 80px #000; }
.wheelwrap.won canvas { animation: wonGlow 1s ease-in-out infinite alternate; }
@keyframes wonGlow { to { box-shadow: 0 0 0 10px var(--panel2), 0 0 0 14px var(--gold), 0 0 160px var(--gold), 0 30px 80px #000; } }
.lights { position: absolute; inset: -30px; pointer-events: none; }
.lights i { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px var(--gold); transform: rotate(var(--a)) translateY(calc(var(--wheel) / -2 - 16px)); animation: blink .5s calc(var(--i) * 40ms) infinite alternate; }
.wheelwrap.won .lights i { animation-duration: .15s; }
@keyframes blink { to { opacity: .2; background: var(--red); box-shadow: 0 0 12px var(--red); } }
.pointer { position: absolute; left: 50%; top: -22px; transform: translateX(-50%); width: 0; height: 0; border-left: 22px solid transparent; border-right: 22px solid transparent; border-top: 50px solid #fff; filter: drop-shadow(0 4px 6px #000) drop-shadow(0 0 10px var(--red)); z-index: 3; transform-origin: 50% 0; }
.pointer.flick { animation: flick .12s; }
@keyframes flick { 50% { transform: translateX(-50%) rotate(-18deg); } }
.hub { position: absolute; left: 50%; top: 50%; width: 90px; height: 90px; margin: -45px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--gold) 40%, var(--gold-dark)); display: grid; place-items: center; font-family: var(--head); font-size: 40px; color: #000; box-shadow: 0 6px 20px #000a; }
.rnames { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; font-weight: 800; }
.rnames i { color: var(--dim); font-family: var(--head); font-style: normal; }
.rnames span { transition: all .4s; }
.rnames span.win { color: var(--gold); transform: scale(1.3); text-shadow: 0 0 20px var(--gold); }
.wheelwrap.won ~ .rnames span:not(.win) { opacity: .35; text-decoration: line-through; }

/* result */
.result { position: relative; }
.herobg { position: fixed; inset: 0; z-index: -1; background: var(--hero) center/cover; filter: blur(18px) brightness(.35) saturate(1.4); transform: scale(1.1); animation: heroIn 2s both; }
@keyframes heroIn { from { opacity: 0; transform: scale(1.4); } }
.res-grid { display: grid; grid-template-columns: minmax(220px, 360px) 1fr; gap: 40px; align-items: center; padding: 30px 0; }
.coverwrap { position: relative; border-radius: var(--r-md); overflow: hidden; box-shadow: 0 30px 80px #000, 0 0 0 4px var(--gold), 0 0 80px color-mix(in srgb, var(--gold) 40%, transparent); animation: coverIn 1.1s cubic-bezier(.2,1.3,.4,1) both; transform-style: preserve-3d; }
@keyframes coverIn { 0% { transform: perspective(900px) rotateY(-540deg) scale(.3); opacity: 0; } 100% { transform: perspective(900px) rotateY(0) scale(1); } }
.cover { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.cover.wide { aspect-ratio: 460/215; }
.shine { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, #ffffff55 45%, transparent 60%); animation: shine 3s 1.2s ease-in-out infinite; transform: translateX(-100%); }
@keyframes shine { 40%, 100% { transform: translateX(100%); } }
.res-info { display: grid; gap: 18px; justify-items: start; }
.kicker { font-family: var(--head); color: var(--gold); letter-spacing: 3px; animation: up .5s .6s both; }
.wname { font-family: var(--head); font-weight: 400; font-size: clamp(36px, 6vw, 80px); line-height: 1; margin: 0; text-shadow: 0 6px 30px #000; }
.wname span { display: inline-block; animation: wordIn .6s calc(.8s + var(--i) * .12s) cubic-bezier(.2,1.8,.4,1) both; }
@keyframes wordIn { from { transform: translateY(60px) scale(.3) rotate(10deg); opacity: 0; } }
.repeat { background: color-mix(in srgb, var(--gold) 13%, transparent); border: 1px solid var(--gold); color: var(--gold); padding: 10px 14px; border-radius: var(--r-sm); font-weight: 700; animation: up .5s 1.3s both, wiggle 1s 2s; }
@keyframes wiggle { 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }
.launch { font-size: 28px; padding: 18px 40px; background: linear-gradient(180deg, var(--green), var(--green2)); color: var(--green-ink); box-shadow: 0 6px 0 var(--green-dark), 0 0 50px color-mix(in srgb, var(--green) 40%, transparent); animation: up .5s 1.4s both, launchPulse 1.6s 2s ease-in-out infinite; }
@keyframes launchPulse { 50% { box-shadow: 0 6px 0 var(--green-dark), 0 0 90px color-mix(in srgb, var(--green) 67%, transparent); transform: scale(1.04); } }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; }
.buy { font-size: 17px; animation: up .5s 1.3s both; }
.survivors { color: var(--dim); font-size: 13px; animation: up .5s 1.6s both; }
.survivors .w { color: var(--gold); font-weight: 800; }
.res-info > .btn.red, .res-info > p { animation: up .5s 1.8s both; }
.res-bottom { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; padding-bottom: 40px; }
.stats, .hist { padding: 16px; animation: up .6s 2s both; }
.stats h2, .hist h2 { margin: 0 0 12px; font-family: var(--head); font-weight: 400; letter-spacing: 1px; }
.statgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.stat { display: flex; gap: 12px; align-items: center; background: var(--panel2); border-radius: var(--r-md); padding: 12px; animation: pop .5s calc(2.2s + var(--i) * .12s) cubic-bezier(.2,1.6,.4,1) both; }
.stat .se { font-size: 34px; }
.stat > div:last-child { display: grid; }
.stat small { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; font-weight: 800; }
.stat b { font-size: 17px; }
.stat span { font-size: 12px; color: var(--dim); }
.hrow { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.hrow img { width: 70px; border-radius: var(--r-xs); }
.hrow b { flex: 1; font-size: 13px; }

/* overlays */
#flash { position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: 0; }
#flash.go { animation: flash .5s ease-out; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }
#announce { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 60; }
#announce .ann { font-family: var(--head); font-size: clamp(44px, 10vw, 120px); text-align: center; line-height: .95; color: #fff; text-shadow: 0 0 40px var(--red), 0 8px 0 var(--red2); opacity: 0; }
#announce .ann small { display: block; font-family: Inter, sans-serif; font-weight: 800; font-size: clamp(16px, 2.5vw, 26px); text-shadow: 0 2px 10px #000; color: var(--ink); letter-spacing: 2px; text-transform: uppercase; margin-top: 10px; }
#announce.go .ann { animation: ann 2.6s cubic-bezier(.2,1.4,.4,1) both; }
#announce .ann.block { color: var(--blue); text-shadow: 0 0 40px var(--blue), 0 8px 0 var(--blue-dark); }
#announce .ann.win { color: var(--gold); text-shadow: 0 0 60px var(--gold), 0 8px 0 var(--gold-dark); font-size: clamp(36px, 8vw, 96px); max-width: 90vw; }
#announce .ann.yourturn { color: var(--red); }
#announce .ann.snake { color: var(--green); text-shadow: 0 0 40px var(--green), 0 8px 0 var(--green-dark); }
#announce .ann.snake .emo { width: .75em; height: .75em; vertical-align: -.05em; margin-right: .12em; }
/* Every keyframe sets filter + opacity explicitly so the text stays sharp until the exit. */
@keyframes ann {
  0% { opacity: 0; transform: scale(3) rotate(-8deg); filter: blur(12px); }
  15% { opacity: 1; transform: scale(.95) rotate(-3deg); filter: blur(0); }
  22% { opacity: 1; transform: scale(1.02) rotate(-3deg); filter: blur(0); }
  86% { opacity: 1; transform: scale(1.06) rotate(-3deg); filter: blur(0); animation-timing-function: ease-in; }
  100% { opacity: 0; transform: scale(1.4) rotate(-3deg); filter: blur(10px); }
}
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 55; }
#toasts { position: fixed; right: 16px; bottom: 16px; align-content: end; display: grid; gap: 8px; z-index: 70; width: min(340px, calc(100vw - 32px)); }
.toast { background: var(--glass); border: 1px solid var(--line); border-left: 4px solid var(--dim); padding: 10px 14px; border-radius: var(--r-sm); font-size: 14px; box-shadow: var(--shadow-float); animation: toastIn .4s cubic-bezier(.2,1.5,.4,1) both; }
.toast.bad { border-left-color: var(--red); } .toast.good { border-left-color: var(--blue); } .toast.warn { border-left-color: var(--gold); }
.toast.out { animation: toastOut .4s both; }
@keyframes toastIn { from { transform: translateX(120%); } }
body[data-phase=lobby] #toasts { bottom: 120px; }
@keyframes toastOut { to { transform: translateX(120%); opacity: 0; } }
body.shake #app { animation: shake .4s; }
body.shake-big #app { animation: shakeBig .55s; }
@keyframes shake { 20% { transform: translate(-6px, 3px); } 40% { transform: translate(5px, -4px); } 60% { transform: translate(-4px, 2px); } 80% { transform: translate(3px, -1px); } }
@keyframes shakeBig { 10% { transform: translate(-14px, 8px) rotate(-1deg); } 25% { transform: translate(12px, -10px) rotate(1deg); } 40% { transform: translate(-10px, 6px); } 60% { transform: translate(6px, -4px); } 80% { transform: translate(-3px, 2px); } }

/* responsive */
@media (max-width: 900px) {
  .phase-lobby { grid-template-columns: minmax(0, 1fr); }
  .players { position: static; }
  .vwrap { grid-template-columns: 1fr; }
  .vlog { position: static; max-height: 240px; }
  .res-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .res-info { justify-items: center; }
  .coverwrap { width: min(260px, 70vw); }
  .res-bottom { grid-template-columns: 1fr; }
  .stepper { display: none; }
  .tray { gap: 10px; flex-wrap: wrap; justify-content: center; }
  .tray .start { font-size: 16px; padding: 12px 18px; }
  .slot { width: 56px; height: 27px; }
}
@media (max-width: 520px) {
  .main { padding: 14px 16px; }
  .topbar { padding: 10px 16px; gap: 8px; }
  .vgrid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .vn { font-size: 13px; }
  .stamp { font-size: 24px; border-width: 4px; }
  .vetobtn { font-size: 20px; padding: 6px 14px; }
  .pool-list { grid-template-columns: 1fr; }
  .tray-group { display: none; }
}
/* Reduced motion (e.g. Windows "Animation effects" off): calm the ambient and repeating motion, but keep
   the short one-off effects, because the game's feedback (stamps, banners, reveals, throwables) lives in
   them. Squashing every animation to zero would leave those elements stuck at their invisible end state. */
@media (prefers-reduced-motion: reduce) {
  .blob, .grain { animation: none !important; }
  body.shake #app, body.shake-big #app { animation: none !important; }
  .logo .o, .logo.pulse, .step.on b, #create, .start.ready, .waiting, .timer.panic, body.myturn .tlabel, .launch, .bigemoji,
  .vcard.hunt:hover .art::after, .vcard.sel .art::after, .wheelwrap.won canvas, .lights i, .rtitle, .shine, .myshield .hidden-count {
    animation-iteration-count: 1 !important;
  }
  .vetobtn { animation: vetoIn .35s cubic-bezier(.2,2,.4,1) both !important; }
}

/* throwables */
#throwbar { position: fixed; right: 12px; top: 50%; transform: translate(140%, -50%); z-index: 30; display: grid; gap: 6px; padding: 8px 6px; border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow-float); backdrop-filter: blur(10px); transition: transform .5s cubic-bezier(.2,1.4,.4,1); }
#throwbar.on { transform: translate(0, -50%); }
#throwbar button { width: 42px; height: 42px; padding: 7px; border: 0; border-radius: var(--r-sm); background: transparent; line-height: 0; cursor: grab; touch-action: none; transition: transform .15s, background .15s; }
#throwbar button:hover { background: var(--panel2); transform: rotate(-8deg); }
#throwbar button:hover .emo { transform: scale(1.15); }
#throwbar button:active { cursor: grabbing; transform: scale(.9); }
#throwbar button.cool { animation: cool .45s ease-out; }
@keyframes cool { 0% { transform: scale(.7); opacity: .4; } 100% { transform: scale(1); opacity: 1; } }
.throw-ghost { position: fixed; left: 0; top: 0; margin: -28px 0 0 -28px; width: 56px; height: 56px; pointer-events: none; z-index: 80; filter: drop-shadow(0 6px 10px #000a); }
.vcard.throw-target { outline: 4px dashed var(--gold); outline-offset: 4px; }
#throwfx { position: fixed; inset: 0; pointer-events: none; z-index: 58; overflow: hidden; }
.projectile { position: absolute; left: 0; top: 0; width: 80px; height: 80px; filter: drop-shadow(0 8px 10px #0009); will-change: transform; }
#throwfx > div:not(.projectile) { position: absolute; transform: translate(-50%, -50%); }
.splat { width: 190px; height: 190px; animation: splatIn .14s ease-out both, fadeOut .8s 1.8s ease-in forwards; }
.splat svg { width: 100%; height: 100%; transform: rotate(var(--rot)); filter: drop-shadow(0 3px 2px #0006); }
@keyframes splatIn { from { transform: translate(-50%, -50%) scale(.2); } to { transform: translate(-50%, -50%) scale(1); } }
@keyframes fadeOut { to { opacity: 0; transform: translate(-50%, -30%) scale(1); } }
.juice { width: 10px; height: 10px; border-radius: 50%; background: #e0303c; animation: juice .7s ease-out forwards; }
@keyframes juice { to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 40px)) scale(.3); opacity: 0; } }
.bounce-off { width: 84px; height: 84px; animation: bounceOff 1.1s cubic-bezier(.3,0,.8,.6) forwards; }
@keyframes bounceOff { 0% { transform: translate(-50%, -50%) scale(1); } 20% { transform: translate(-50%, -110%) rotate(-20deg) scale(.9); } 100% { transform: translate(60%, 600px) rotate(220deg) scale(.65); opacity: .6; } }
.word { font-family: var(--head); font-size: 34px; color: #fff; text-shadow: 0 0 14px var(--red), 0 3px 0 #000; animation: wordPop .9s cubic-bezier(.2,1.8,.4,1) forwards; }
@keyframes wordPop { 0% { transform: translate(-50%, -50%) scale(0) rotate(-15deg); } 30% { transform: translate(-50%, -120%) scale(1.2) rotate(-8deg); } 100% { transform: translate(-50%, -160%) scale(1) rotate(-8deg); opacity: 0; } }
.poof { width: 150px; height: 150px; animation: poof .9s ease-out forwards; }
@keyframes poof { from { transform: translate(-50%, -50%) scale(.15); opacity: 1; } to { transform: translate(-50%, -60%) scale(1); opacity: 0; } }
.fade-up { width: 84px; height: 84px; animation: fadeUp 1s ease-out forwards; }
@keyframes fadeUp { 0% { transform: translate(-50%, -50%) scale(1); } 100% { transform: translate(-50%, -180%) scale(.62); opacity: 0; } }
.sparkle { width: 110px; height: 110px; animation: poof 1s ease-out forwards; }
.burst { width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, #fff 0 10%, var(--gold) 25%, #ff7a1a 45%, color-mix(in srgb, var(--red) 0%, transparent) 70%); animation: burst .7s ease-out forwards; }
@keyframes burst { from { transform: translate(-50%, -50%) scale(.2); opacity: 1; } to { transform: translate(-50%, -50%) scale(1.6); opacity: 0; } }
.scorch { width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, #000c 0 30%, #2a1408aa 50%, transparent 70%); animation: fadeOut .9s 1.1s forwards; }
.thrower { width: auto !important; height: auto !important; font-size: 11px; font-weight: 800; background: #000b; color: #fff; padding: 2px 8px; border-radius: var(--r-pill); white-space: nowrap; margin-top: 54px; animation: fadeUp 1.3s ease-out forwards; }
.vcard.hit-wobble { animation: hitWobble .5s; }
@keyframes hitWobble { 25% { transform: rotate(-3deg) scale(.97); } 60% { transform: rotate(2deg); } }
/* keep the bar off the content: a gutter on desktop, a slim see-through strip on small screens */
@media (min-width: 901px) { body.throwing .main { padding-right: 80px; } }
@media (max-width: 900px) {
  #throwbar { right: 0; border-radius: var(--r-lg) 0 0 var(--r-lg); border-right: 0; padding: 6px 3px; gap: 2px; opacity: .55; transition: transform .5s cubic-bezier(.2,1.4,.4,1), opacity .2s; }
  #throwbar:hover, #throwbar:active, #throwbar:focus-within { opacity: 1; }
  #throwbar button { width: 34px; height: 34px; font-size: 20px; }
}

.emo { display: block; width: 100%; height: 100%; pointer-events: none; user-select: none; -webkit-user-drag: none; transition: transform .15s; }
.credits { font-size: 11px; color: var(--dim); margin: -8px 0 0; animation: up .6s .8s both; }
.credits a { color: var(--dim); }

/* settings: icons in the top bar on desktop, a ⚙️ modal on phones */
.desk-only { display: contents; }
.mob-only { display: none; }
#settings { position: fixed; inset: 0; z-index: 90; display: grid; place-items: end center; background: var(--scrim); backdrop-filter: blur(6px); animation: fadeIn .2s both; }
@keyframes fadeIn { from { opacity: 0; } }
.set-card { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 8px; animation: sheetUp .35s cubic-bezier(.2,1.2,.4,1) both; }
@keyframes sheetUp { from { transform: translateY(100%); } }
.set-head { display: flex; align-items: center; justify-content: space-between; }
.set-head h3 { margin: 0; font-family: var(--head); font-weight: 400; letter-spacing: 1px; }
.set-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; border-radius: var(--r-md); background: var(--panel2); padding: 12px; }
.set-ic { font-size: 22px; }
.set-txt { flex: 1; display: grid; }
.set-txt small { font-size: 12px; }
.switch { width: 46px; height: 28px; border-radius: var(--r-pill); background: var(--line); position: relative; transition: background .2s; flex: none; }
.switch i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s cubic-bezier(.2,1.4,.4,1); }
.switch.on { background: var(--green); }
.switch.on i { transform: translateX(18px); }
.set-invite { margin-top: 6px; width: 100%; }
@media (min-width: 701px) { #settings { place-items: center; } .set-card { border-radius: var(--r-lg); box-shadow: var(--shadow-modal); } }
@media (max-width: 700px) {
  .desk-only { display: none; }
  .mob-only { display: inline-grid; place-items: center; }
  .chip.code .lbl { display: none; }
  .topbar { gap: 8px; }
  .logo.sm { font-size: 20px; }
}
@media (max-width: 520px) {
  .deck { transform: scale(.6); transform-origin: top center; height: 100px; }
  .wheelwrap { --wheel: min(560px, 76vw); }
}

/* hours shaming */
.roast { font-size: 12px; font-style: italic; color: var(--orange); line-height: 1.3; }
.roast::before { content: '🔥 '; font-style: normal; }
.vcard.dead .roast { display: none; }

/* last words */
.lastword { position: absolute; left: 8px; right: 8px; top: 72%; z-index: 6; text-align: center; font-family: var(--head); font-size: 15px; color: var(--gold); text-shadow: 0 2px 6px #000, 0 0 12px #000; transform: rotate(-4deg); }
.vcard.fx-veto .lastword { animation: lastIn .5s .75s cubic-bezier(.2,1.8,.4,1) both; }
@keyframes lastIn { from { transform: rotate(-4deg) scale(2.2); opacity: 0; } }
.logl q { color: var(--gold); font-style: italic; }
.lw { position: fixed; left: 50%; bottom: 14px; z-index: 25; width: min(640px, calc(100vw - 24px)); transform: translate(-50%, 160%); transition: transform .4s cubic-bezier(.2,1.3,.4,1); background: var(--glass); border: 1px solid var(--red); border-radius: var(--r-lg); padding: 12px 14px; box-shadow: var(--shadow-float), 0 0 30px color-mix(in srgb, var(--red) 27%, transparent); backdrop-filter: blur(14px); display: grid; gap: 10px; }
.lw.on { transform: translate(-50%, 0); }
.lw-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 700; }
.lw-head b { color: var(--red); }
.lw-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.lw-chip { flex: none; border: 1px solid var(--line); background: var(--panel2); border-radius: var(--r-pill); padding: 6px 12px; font-size: 13px; font-weight: 600; transition: all .15s; }
.lw-chip:hover { border-color: var(--gold); }
.lw-chip.sel { background: var(--gold); color: #000; border-color: var(--gold); transform: scale(1.05); }
.lw-row { display: flex; gap: 8px; }
.lw-row input { flex: 1; min-width: 0; padding: 9px 12px; }
.lw-veto { font-size: 18px; padding: 10px 22px; }
.phase-veto { padding-bottom: 170px; }
/* dead cards: dim the card's own text and give "by X" + last words a band of their own */
.vcard.dead .vb { opacity: .25; }
.vcard.dead::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 58%; border-radius: 0 0 var(--r-md) var(--r-md); background: linear-gradient(transparent, #000c 45%); z-index: 5; pointer-events: none; }
.vcard.dead .killer { top: auto; bottom: 44px; }
.vcard.dead .lastword { top: auto; bottom: 14px; }
.vcard.dead:not(:has(.lastword)) .killer { bottom: 24px; }

/* finale picker (lobby) */
.finale { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.finale .lbl { font-size: 11px; font-weight: 800; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; margin-right: 2px; }
.finale .chip[disabled] { cursor: default; opacity: .8; }
.finale small { font-size: 11px; }

/* cage match */
.arena { display: grid; justify-items: center; gap: 10px; width: 100%; }
.ring { position: relative; width: min(900px, 100%); aspect-ratio: 16 / 10; perspective: 900px; animation: wheelIn .8s cubic-bezier(.2,1.3,.4,1) both; }
.fighter { position: absolute; left: var(--x); top: var(--y); width: clamp(110px, 22%, 210px); transform: translate(-50%, -50%); z-index: 4; animation: walkIn .7s calc(.2s + var(--i) * .25s) cubic-bezier(.2,1.4,.4,1) both; }
@keyframes walkIn { from { transform: translate(-50%, 140%) scale(.6); opacity: 0; } }
.fbody { position: relative; animation: bob .9s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -.3s); }
@keyframes bob { to { transform: translateY(-6px); } }
.fart { width: 100%; aspect-ratio: 460 / 215; object-fit: cover; border-radius: var(--r-sm); border: 3px solid #fff; box-shadow: 0 12px 24px #000c; display: block; }
.glove { position: absolute; top: 30%; width: 34%; height: auto; filter: drop-shadow(0 4px 4px #0008); }
.glove.gl { left: -20%; transform: scaleX(-1) rotate(-15deg); animation: jabL 1.2s ease-in-out infinite; }
.glove.gr { right: -20%; transform: rotate(-15deg); animation: jabR 1.2s ease-in-out infinite .6s; }
@keyframes jabL { 50% { transform: scaleX(-1) rotate(-25deg) translate(-6px, -4px); } }
@keyframes jabR { 50% { transform: rotate(-25deg) translate(6px, -4px); } }
.dizzy { position: absolute; left: 30%; top: -42%; width: 40%; opacity: 0; }
.ftop { display: grid; gap: 3px; margin-bottom: 6px; }
.fname { font-weight: 800; font-size: 12px; text-align: center; text-shadow: 0 2px 4px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hpbar { height: 9px; border-radius: var(--r-xs); background: #0009; border: 1px solid #fff4; overflow: hidden; }
.hpbar i { display: block; height: 100%; width: 100%; background: var(--green); transition: width .35s cubic-bezier(.2,1.2,.4,1), background .3s; }
.hpbar i.mid { background: var(--gold); } .hpbar i.low { background: var(--red); }
.fighter.lunge .fbody { animation: lunge .45s cubic-bezier(.3,1.5,.5,1); }
@keyframes lunge { 45% { transform: translate(var(--dx), var(--dy)) scale(1.12) rotate(-6deg); } }
.fighter.hurt .fart { animation: hurt .45s; }
@keyframes hurt { 15% { transform: translateX(-14px) rotate(-5deg); filter: brightness(3) saturate(0); } 40% { transform: translateX(10px) rotate(3deg); } 70% { transform: translateX(-4px); } }
.fighter.dodge .fbody { animation: dodge .5s cubic-bezier(.3,1.5,.5,1); }
@keyframes dodge { 40% { transform: translateX(-40px) rotate(-12deg); } }
.fighter.ko { z-index: 2; }
.fighter.ko .fbody { animation: koFly 1.2s cubic-bezier(.4,0,.6,1) forwards; }
.fighter.ko .ftop { opacity: .3; transition: opacity .6s; }
.fighter.ko .dizzy { opacity: 1; animation: spin 1s linear infinite; }
.fighter.ko.noanim .fbody { animation: none; transform: translateY(40%) rotate(80deg) scale(.7); filter: grayscale(1) brightness(.6); }
@keyframes koFly { 0% { transform: none; } 30% { transform: translateY(-30%) rotate(-30deg); } 100% { transform: translateY(40%) rotate(80deg) scale(.7); filter: grayscale(1) brightness(.6); } }
@keyframes spin { to { transform: rotate(360deg); } }
.fighter.champ { z-index: 6; }
.fighter.champ .fbody { animation: champ .5s ease-in-out infinite alternate; }
.fighter.champ .fart { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold), 0 0 60px var(--gold); }
.fighter.champ .glove.gl { animation: none; transform: scaleX(-1) rotate(30deg) translate(10px, -60%); }
.fighter.champ .glove.gr { animation: none; transform: rotate(-30deg) translate(10px, -60%); }
@keyframes champ { to { transform: translateY(-14px) scale(1.06); } }
.ringfx { position: absolute; inset: 0; pointer-events: none; z-index: 8; }
.pow { position: absolute; transform: translate(-50%, -50%); font-family: var(--head); font-size: clamp(22px, 4vw, 40px); color: var(--gold); -webkit-text-stroke: 2px #000; text-shadow: 3px 3px 0 var(--red), 0 0 20px #000; white-space: nowrap; animation: powIn .9s cubic-bezier(.2,1.8,.4,1) forwards; }
.pow.slam { color: #fff; text-shadow: 3px 3px 0 var(--red2), 0 0 24px var(--red); font-size: clamp(26px, 5vw, 50px); }
.pow.chair { color: var(--blue); text-shadow: 3px 3px 0 var(--blue-dark); }
.pow.miss { color: #ddd; text-shadow: 2px 2px 0 #555; font-size: clamp(18px, 3vw, 28px); }
@keyframes powIn { 0% { transform: translate(-50%, -50%) scale(0) rotate(-20deg); } 25% { transform: translate(-50%, -60%) scale(1.25) rotate(-8deg); } 70% { opacity: 1; } 100% { transform: translate(-50%, -90%) scale(1) rotate(-8deg); opacity: 0; } }
.dmg { position: absolute; font-weight: 800; font-size: 20px; color: var(--red); text-shadow: 0 2px 0 #000; animation: fadeUp .9s ease-out forwards; }
.chairfx { position: absolute; width: 90px; height: 90px; transform: translate(-50%, -50%); animation: chairSwing .7s cubic-bezier(.3,1.4,.5,1) forwards; }
@keyframes chairSwing { 0% { transform: translate(-150%, -150%) rotate(-120deg); } 45% { transform: translate(-50%, -50%) rotate(20deg); } 100% { transform: translate(-30%, 40%) rotate(60deg); opacity: 0; } }
.ringcall { min-height: 70px; font-family: var(--head); text-align: center; }
.ringcall span { display: inline-block; font-size: clamp(30px, 6vw, 64px); color: #fff; text-shadow: 0 0 30px var(--red), 0 5px 0 var(--red2); line-height: 1; }
.ringcall small { display: block; font-size: .4em; color: var(--gold); text-shadow: 0 0 20px var(--gold); margin-top: 6px; }
.ringcall.go span { animation: callIn .6s cubic-bezier(.2,1.8,.4,1) both; }
@keyframes callIn { from { transform: scale(3) rotate(-8deg); opacity: 0; } }
@media (max-width: 700px) {
  .ring { aspect-ratio: 4 / 5; }
  .fighter { width: 38%; }
}
@media (prefers-reduced-motion: reduce) { .fbody, .glove { animation-iteration-count: 1 !important; } }

/* phones: the throw bar is a single tab until opened */
.tb-toggle { display: none; }
@media (max-width: 900px) {
  #throwbar { opacity: 1; }
  #throwbar .tb-toggle { display: block; }
  #throwbar:not(.open) button[data-item] { display: none; }
  #throwbar:not(.open) { padding: 4px 3px; background: color-mix(in srgb, var(--panel) 70%, transparent); }
  #throwbar.open .tb-toggle { opacity: .5; transform: rotate(-20deg) scale(.85); }
}

/* ring outline: drawn in perspective (see ringSvg) */
.ring-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ring-svg.back { z-index: 1; filter: drop-shadow(0 30px 40px #000c); }
.ring-svg.front { z-index: 5; }
.ring-svg .mat-line { fill: none; stroke: #ffffff22; stroke-width: 2; stroke-dasharray: 8 6; }
.ring-svg .apron { fill: var(--red2); stroke: var(--red-dark); stroke-width: 2; }
.ring-svg .post { stroke: #d9d9e3; stroke-width: 12; stroke-linecap: round; }
.ring-svg.back .post { stroke: #a9a9b8; stroke-width: 9; }
.ring-svg .cap { stroke: var(--gold); stroke-width: 16; stroke-linecap: round; }
.ring-svg.back .cap { stroke-width: 12; }
.ring-svg .rope { stroke-width: 4; stroke-linecap: round; }
.ring-svg .rope.back { stroke: color-mix(in srgb, var(--red) 67%, transparent); stroke-width: 3; }
.ring-svg .rope.side { stroke: color-mix(in srgb, var(--ink) 73%, transparent); stroke-width: 3.5; }
.ring-svg .rope.front { stroke: var(--blue); stroke-width: 5; filter: drop-shadow(0 2px 3px #000a); }
.ring-svg .rope.front:nth-child(2) { stroke: #fff; }
.ring-svg .rope.front:nth-child(3) { stroke: var(--red); }
.spot { position: absolute; width: 46%; aspect-ratio: 2 / 1; transform: translate(-50%, -30%); border-radius: 50%; background: radial-gradient(ellipse, color-mix(in srgb, var(--gold) 40%, transparent), transparent 65%); z-index: 2; opacity: 0; transition: opacity .6s; pointer-events: none; }
.ring.over .spot { opacity: 1; }
.ring-svg.front .rope { opacity: .5; }

/* store details modal (pitches) */
.sr { cursor: pointer; transition: background .15s, transform .15s; }
.sr:hover { background: color-mix(in srgb, var(--panel2), var(--ink) 7%); box-shadow: inset 3px 0 0 var(--red); } /* highlight without moving, so lists never overflow sideways */
.pitchtile .art { cursor: pointer; }
.art-more { position: absolute; right: 8px; bottom: 8px; background: #000c; color: #fff; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: var(--r-xs); opacity: 0; transition: opacity .2s; }
.pitchtile .art:hover .art-more { opacity: 1; }
#details { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px; background: var(--scrim); backdrop-filter: blur(6px); animation: fadeIn .2s both; overflow-y: auto; }
.dt-card { position: relative; width: min(960px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-modal); animation: up .35s cubic-bezier(.2,1.3,.4,1) both; }
.dt-x { position: absolute; top: 10px; right: 10px; z-index: 3; background: #000a; color: #fff; width: 36px; height: 36px; border-radius: 50%; font-size: 16px; }
.dt-loading { padding: 60px 20px; text-align: center; color: var(--dim); }
.dt-card > .btn { margin: 0 0 20px 20px; }
.dt-stage { position: relative; aspect-ratio: 16 / 9; background: #000; }
.dt-track { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.dt-track::-webkit-scrollbar { display: none; }
.dt-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; }
.dt-slide img, .dt-slide video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.dt-count { position: absolute; left: 12px; top: 12px; background: #000a; color: #fff; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: var(--r-pill); pointer-events: none; font-variant-numeric: tabular-nums; }
.dt-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; background: #000a; color: #fff; font-size: 34px; line-height: 1; border-radius: var(--r-sm); opacity: .7; transition: opacity .2s; }
.dt-nav:hover { opacity: 1; }
.dt-nav.prev { left: 10px; } .dt-nav.next { right: 10px; }
.dt-novideo { display: grid; place-items: center; height: 100%; color: #fff; font-weight: 800; font-size: 18px; text-decoration: none; }
.dt-thumbs { display: flex; gap: 8px; padding: 10px 14px; overflow-x: auto; background: var(--bg); scrollbar-width: thin; }
.dt-thumb { position: relative; flex: none; width: 120px; aspect-ratio: 16 / 9; padding: 0; border: 2px solid transparent; border-radius: var(--r-sm); overflow: hidden; background: #000; opacity: .6; transition: opacity .15s, border-color .15s; }
.dt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dt-thumb.on { border-color: var(--red); opacity: 1; }
.dt-thumb:hover { opacity: 1; }
.dt-thumb i { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 22px; color: #fff; text-shadow: 0 2px 8px #000; background: #0004; }
.dt-info { padding: 16px 20px 20px; display: grid; gap: 10px; }
.dt-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dt-title h3 { margin: 0; font-family: var(--head); font-weight: 400; font-size: clamp(20px, 3vw, 30px); }
.dt-title .price { font-size: 18px; }
.dt-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.dt-desc { margin: 0; color: var(--ink-2); line-height: 1.5; }
.dt-meta { font-size: 13px; color: var(--dim); }
.dt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.dt-web { font-size: 13px; color: var(--dim); }
@media (max-width: 700px) {
  #details { padding: 0; place-items: stretch; }
  .dt-card { border-radius: 0; min-height: 100%; border: 0; }
  .dt-thumb { width: 96px; }
  .dt-nav { width: 36px; height: 52px; font-size: 28px; }
}

/* ---------- polish pass: accessibility + modern mobile basics ---------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* A clear focus ring for keyboard users only (mouse and touch clicks don't show it). */
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: var(--r-sm); }
input:focus-visible { outline: none; }
/* Full-size, invisible click target over cards (the real buttons inside sit above it). */
.vcard, .sr { position: relative; }
.card-hit { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; border: 0; padding: 0; background: transparent; border-radius: inherit; cursor: pointer; }
.card-hit:focus-visible { outline-offset: 4px; border-radius: var(--r-md); }
.sr .btn, .sr > *:not(.card-hit) { position: relative; z-index: 2; }
.sr > .sr-art, .sr > .sr-name, .sr > .sr-price { pointer-events: none; }
.vcard .shieldbtn, .vcard .vetobtn { z-index: 6; }
/* Comfortable tap targets for the small text buttons. */
.linkbtn { padding: 6px 0; min-height: 28px; }
.credits a { display: inline-block; padding: 6px 2px; }
/* Phones: respect the notch / home indicator, avoid input zoom and double-tap delay. */
.topbar { padding-top: max(10px, env(safe-area-inset-top)); padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.tray { bottom: max(16px, env(safe-area-inset-bottom)); }
.lw { bottom: max(14px, env(safe-area-inset-bottom)); }
#throwbar { right: max(12px, env(safe-area-inset-right)); }
button, a, .chip, [role=button] { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (max-width: 700px) { input { font-size: 16px; } #throwbar { right: env(safe-area-inset-right); } }
/* Touch screens have no hover: show the hover-only hints. */
@media (hover: none) { .pitchtile .art .art-more { opacity: 1; } }
html { scrollbar-color: var(--line) transparent; scrollbar-gutter: stable; } /* reserve the scrollbar space, so switching to a short tab (no scrollbar) never makes the page wider and re-wraps the layout */
::selection { background: color-mix(in srgb, var(--red) 40%, transparent); }
button:disabled { cursor: not-allowed; }
.sr-msg { padding: 14px; border-radius: var(--r-sm); background: var(--panel2); color: var(--dim); font-weight: 600; }
.dt-err { justify-content: center; padding: 0 20px 24px; }

/* ---------- theme: shared building blocks ---------- */
/* Every section heading: display font, same weight and tracking. */
.join h2, .sec-h h2, .vlog h2, .stats h2, .hist h2, .set-head h3, .dt-title h3 { font-family: var(--head); font-weight: 400; letter-spacing: 1px; margin: 0; }
.vlog h2, .stats h2, .hist h2 { margin-bottom: 12px; }
/* Every small uppercase label. */
.lbl, .tray .lbl, .finale .lbl, .stat small { font-size: 11px; font-weight: 800; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; }
/* One close button for both modals. */
.set-head .x, .dt-x { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border-radius: 50%; background: var(--panel2); color: var(--ink); font-size: 15px; }
.dt-x { background: #000a; }
.set-head .x:hover, .dt-x:hover { background: var(--red-deep); color: #fff; }
/* Pills: chips, reactions and last-words chips share hover and selected states. */
.react:hover, .lw-chip:hover { border-color: var(--dim); }
.react.on, .lw-chip.sel { transform: none; }

/* One "selected" colour for every toggle pill: gold (pitch reactions keep their buy/nope colours). */
.chip.on { background: var(--gold); color: #000; border-color: var(--gold); }
.finale { display: grid; gap: 8px; }
.finale-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.finale-opts .chip { flex: 1; text-align: center; white-space: nowrap; }
.who:empty + * , .who .dim:first-child { margin-left: 0; }
.who { gap: 4px; }
.who .dim { margin-left: 4px; }
.credits { margin: 8px 0 0; }
/* Toasts lift above the last-words strip while it's open. */
body:has(.lw.on) #toasts { bottom: calc(max(14px, env(safe-area-inset-bottom)) + 170px); }

/* the pause after the last veto */
.lockbadge { width: 64px; height: 64px; display: grid; place-items: center; font-size: 34px; border-radius: 50%; background: var(--panel2); box-shadow: 0 0 0 4px var(--gold), 0 0 30px color-mix(in srgb, var(--gold) 40%, transparent); animation: nomPop .5s cubic-bezier(.2,2,.4,1); }
.tlabel.final { color: var(--gold); text-shadow: 0 0 30px color-mix(in srgb, var(--gold) 53%, transparent); }
.timer.locked { display: grid; place-items: center; }
.timer-lock { font-size: 34px; position: static !important; }

/* Phone search results: title gets the full width beside the art, price and button sit underneath */
@media (max-width: 560px) {
  .sr { grid-template-columns: 104px minmax(0, 1fr) auto; grid-template-areas: "art name name" "art price btn"; align-items: start; }
  .sr-price { text-align: left; align-self: center; font-size: 14px; }
  .sr-price .price s { display: none; }
  .sr-btn { align-self: center; }
  .sr:hover { transform: none; }
}

/* ---- sudden death ---- */
.ring { transition: width .5s cubic-bezier(.2,1,.4,1); }
.arena.sd-on .ring { width: min(560px, 100%); }
.arena.sd-on .ringcall { display: none; }
.arena.sd-on .rtitle { font-size: clamp(20px, 3.5vw, 32px); }
.arena.sd-on .fighter.ko { opacity: .25; }
.sd { width: min(760px, 100%); display: grid; gap: 10px; padding: 14px; border-radius: var(--r-lg); background: var(--glass); border: 2px solid var(--red); box-shadow: 0 0 40px color-mix(in srgb, var(--red) 33%, transparent), var(--shadow-float); text-align: center; animation: up .4s cubic-bezier(.2,1.4,.4,1) both; }
.sd[hidden] { display: none; }
.sd.out { animation: sdOut .5s ease-in both; }
@keyframes sdOut { to { opacity: 0; transform: translateY(12px) scale(.97); } }
.sd-title { font-family: var(--head); font-size: clamp(26px, 6vw, 44px); letter-spacing: 3px; color: #fff; text-shadow: 0 0 24px var(--red), 0 4px 0 var(--red2); line-height: 1; }
.sd.live .sd-title { animation: sdPulse .5s ease-in-out infinite alternate; }
.sd.panic .sd-title { animation-duration: .25s; color: var(--gold); }
@keyframes sdPulse { to { transform: scale(1.06); } }
.sd-sub { font-weight: 800; color: var(--ink-2); min-height: 1.4em; }
.sd-sub b { color: var(--gold); }
.sd-meter { --p: 50%; position: relative; display: flex; justify-content: space-between; align-items: center; height: 34px; border-radius: var(--r-pill); overflow: hidden;
  background: linear-gradient(90deg, var(--blue) 0 var(--p), var(--red) var(--p) 100%); transition: background .15s; box-shadow: inset 0 2px 8px #0008; }
.sd-meter b { position: relative; z-index: 1; padding: 0 14px; font-family: var(--head); font-size: 20px; color: #fff; text-shadow: 0 2px 4px #000a; font-variant-numeric: tabular-nums; }
.sd-meter i { position: absolute; top: -4px; bottom: -4px; left: var(--p); width: 6px; margin-left: -3px; background: #fff; box-shadow: 0 0 14px #fff; transition: left .15s; }
.sd-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sd-b { position: relative; display: grid; grid-template-columns: 116px minmax(0, 1fr); grid-template-rows: 1fr auto; align-items: center; column-gap: 10px; row-gap: 2px; padding: 8px; text-align: left; border-radius: var(--r-md); border: 3px solid transparent; color: #fff; font-weight: 800; cursor: pointer; overflow: hidden;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .08s, opacity .3s, filter .3s; }
.sd-b.s0 { background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 20%, transparent), color-mix(in srgb, var(--blue) 7%, transparent)); border-color: var(--blue); }
.sd-b.s1 { background: linear-gradient(180deg, color-mix(in srgb, var(--red) 20%, transparent), color-mix(in srgb, var(--red) 7%, transparent)); border-color: var(--red); }
.sd-b img { grid-row: span 2; width: 100%; aspect-ratio: 460 / 215; object-fit: cover; border-radius: var(--r-sm); pointer-events: none; }
.sd-b span { font-size: 14px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sd-b small { font-family: var(--head); font-size: 18px; letter-spacing: 2px; display: flex; align-items: center; gap: 8px; }
.sd-b kbd { font-family: inherit; font-size: 13px; padding: 1px 7px; border-radius: var(--r-xs); background: #ffffff1a; border: 1px solid #ffffff33; letter-spacing: 0; }
@media (hover: none) { .sd-b kbd { display: none; } }
.sd.live .sd-b:not(:disabled) small { animation: sdPulse .35s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .sd.live .sd-title, .sd.live .sd-b small { animation-iteration-count: 1 !important; } }
.sd-b:disabled { cursor: default; }
.sd:not(.live) .sd-b:disabled { opacity: .75; }
.sd-b.hit { animation: sdHit .12s ease-out; }
@keyframes sdHit { 50% { transform: scale(.94); filter: brightness(1.5); } }
.sd-b.won { opacity: 1 !important; box-shadow: 0 0 30px var(--gold); border-color: var(--gold); }
.sd-b.lost { opacity: .35 !important; filter: grayscale(1); }
.sd-plus { position: absolute; top: 40%; font-style: normal; font-family: var(--head); font-size: 22px; color: #fff; text-shadow: 0 2px 6px #000; pointer-events: none; animation: sdPlus .6s ease-out both; }
@keyframes sdPlus { to { transform: translateY(-60px); opacity: 0; } }
.sd-foot { display: flex; justify-content: space-between; align-items: center; font-weight: 800; color: var(--dim); min-height: 40px; }
.sd-count { font-family: var(--head); font-size: 40px; color: var(--gold); text-shadow: 0 0 20px var(--gold); line-height: 1; }
.sd.panic .sd-count { color: var(--red); text-shadow: 0 0 20px var(--red); }
@media (max-width: 560px) {
  .sd { padding: 10px; }
  .sd-b { grid-template-columns: 1fr; text-align: center; min-height: 150px; }
  .sd-b img { grid-row: auto; }
  .sd-b small { font-size: 15px; justify-content: center; }
}

/* ---- bribes ---- */
.bribebtn { position: absolute; left: 8px; top: 8px; z-index: 6; width: 38px; height: 38px; padding: 6px; border: 2px solid var(--gold); background: color-mix(in srgb, var(--bg) 80%, transparent); border-radius: var(--r-sm); opacity: .8; transition: transform .15s, opacity .2s, box-shadow .2s; }
.bribebtn .emo { width: 100%; height: 100%; display: block; }
.bribebtn:hover, .bribebtn:focus-visible { opacity: 1; transform: scale(1.15) rotate(-8deg); box-shadow: 0 0 20px var(--gold); }
.bribebtn:active { transform: scale(.92); }
.offers { position: absolute; left: 8px; top: 52px; z-index: 5; display: flex; align-items: center; gap: 4px; padding: 3px 8px 3px 4px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--gold) 9%, var(--bg)); border: 1px solid var(--gold); color: var(--gold); font-weight: 800; font-size: 12px; box-shadow: 0 0 16px color-mix(in srgb, var(--gold) 33%, transparent); animation: offerIn .35s cubic-bezier(.2,1.8,.4,1) both; pointer-events: none; }
.offers .emo { width: 18px; height: 18px; }
.offers .av { margin-left: -4px; }
@keyframes offerIn { from { transform: scale(.4); opacity: 0; } }
.ord .coins { font-style: normal; font-size: 11px; font-weight: 800; color: var(--gold); }
.wallet { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; font-size: 12px; color: var(--gold); background: color-mix(in srgb, var(--gold) 7%, transparent); padding: 8px 10px; border-radius: var(--r-sm); line-height: 1.4; }
.wallet > .emo { width: 22px; height: 22px; flex: none; }
.wallet .emo.inl { display: inline-block; width: 15px; height: 15px; vertical-align: -3px; }
.wallet b { color: var(--ink); }
.lb { display: block; margin-top: 2px; font-size: 11px; font-weight: 800; }
.lb.snake { color: var(--green); }
.lb.deal { color: var(--gold); }
.tag.fit.quick { background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--blue); }
.tag.fit.long { background: color-mix(in srgb, var(--purple) 14%, transparent); color: var(--purple); }

.finale-opts.tight { display: grid; grid-template-columns: repeat(3, auto); gap: 4px; }
.finale-opts.tight .chip { padding: 7px 2px; font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.1px; }

/* ---- finale vote (lobby) ---- */
.finale-opts.vote { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.finale-opts.vote .chip { position: relative; padding: 7px 4px; font-size: 12px; white-space: nowrap; }
.finale-opts.vote .chip.mine { box-shadow: inset 0 0 0 2px var(--red); }
.finale-opts.vote .chip.on.mine { box-shadow: inset 0 0 0 2px var(--red-dark); }
.finale-opts.vote .vc { position: absolute; top: -6px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: var(--r-pill); background: var(--red); color: #fff; font-size: 11px; line-height: 18px; text-align: center; box-shadow: 0 2px 6px #0008; }

/* ---- quick draw ---- */
.duel { --paper: #f1dfb8; --paper-ink: #3b2412; --dust: #c8823a; position: relative; display: grid; justify-items: center; gap: 14px; width: 100%; padding: 8px 0 24px; }
.duel::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(120% 80% at 50% 110%, #ff9a3c55, transparent 60%), linear-gradient(180deg, transparent 40%, #5a2a0a55); transition: opacity .6s; }
.duel.standoff::before { background: radial-gradient(120% 80% at 50% 110%, #ff6a1c77, transparent 60%), linear-gradient(180deg, #00000055 0%, #5a2a0a88); }
.dw-sub { font-weight: 800; color: var(--ink-2); text-align: center; min-height: 1.4em; max-width: 640px; padding: 0 12px; }
.dw-sub b { color: var(--gold); }
.dw-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 14px; width: min(720px, 100%); justify-content: center; }
.dw-card { position: relative; display: grid; gap: 6px; justify-items: center; padding: 10px 10px 12px; border: 0; border-radius: 4px; background: var(--paper); color: var(--paper-ink); box-shadow: 0 10px 24px #0009, inset 0 0 30px #b8894a66; transform: rotate(var(--r, 0deg)); transition: transform .2s, box-shadow .2s, opacity .4s, filter .4s; font-family: Georgia, 'Times New Roman', serif; cursor: default; }
.dw-card:nth-child(1) { --r: -2deg; } .dw-card:nth-child(2) { --r: 1deg; } .dw-card:nth-child(3) { --r: -1deg; }
.dw-card:not(:disabled) { cursor: pointer; }
.dw-card:not(:disabled):hover { transform: rotate(0deg) translateY(-4px) scale(1.03); }
.dw-card.mine { box-shadow: 0 0 0 4px var(--red), 0 10px 24px #0009, inset 0 0 30px #b8894a66; }
.dw-wanted { font-family: var(--head); font-size: 22px; letter-spacing: 3px; line-height: 1; }
.dw-card img { width: 100%; aspect-ratio: 460 / 215; object-fit: cover; filter: sepia(.55) contrast(1.05); border: 3px solid var(--paper-ink); }
.dw-name { font-weight: 700; font-size: 14px; line-height: 1.2; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dw-backers { display: flex; min-height: 24px; justify-content: center; padding-left: 6px; }
.dw-backers .void .av { filter: grayscale(1); opacity: .4; }
.dw-count { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; min-height: 1.2em; }
.dw-card.won { transform: rotate(0deg) scale(1.08); box-shadow: 0 0 0 4px var(--gold), 0 0 50px var(--gold), 0 10px 24px #0009; z-index: 1; }
.dw-card.lost { opacity: .4; filter: grayscale(.8); }
.dw-stage { display: grid; justify-items: center; gap: 10px; min-height: 130px; }
.dw-big { font-family: var(--head); font-size: clamp(48px, 12vw, 110px); line-height: 1; color: #fff; text-shadow: 0 0 30px var(--dust), 0 6px 0 #6d3410; min-height: 1em; }
.duel.drawn .dw-big { color: var(--gold); text-shadow: 0 0 50px var(--gold), 0 6px 0 var(--gold-dark); animation: callIn .4s cubic-bezier(.2,1.8,.4,1) both; }
.duel.standoff:not(.drawn) .dw-shoot:not(:disabled) { background: linear-gradient(180deg, #5b4a3a, #3a2d22); box-shadow: 0 6px 0 #1e160f, 0 10px 30px #0008; color: var(--ink-2); }
.dw-shoot { font-family: var(--head); font-size: 26px; letter-spacing: 2px; padding: 14px 34px; border: 0; border-radius: var(--r-pill); color: #fff; background: linear-gradient(180deg, #a0522d, #6d3410); box-shadow: 0 6px 0 #3b1a06, 0 10px 30px #0008; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.dw-shoot:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 #3b1a06; }
.dw-shoot:disabled { opacity: .85; font-size: 20px; }
.duel.drawn .dw-shoot:not(:disabled) { background: linear-gradient(180deg, var(--red), var(--red2)); box-shadow: 0 6px 0 var(--red-dark), 0 0 40px var(--red); animation: sdPulse .25s ease-in-out infinite alternate; }
.dw-shoot kbd { font-family: inherit; font-size: 12px; padding: 1px 6px; margin-left: 6px; border-radius: var(--r-xs); background: #ffffff26; vertical-align: 3px; }
@media (hover: none) { .dw-shoot kbd { display: none; } }
.dw-shots { display: grid; gap: 4px; width: min(420px, 100%); }
.dw-shot { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: var(--r-sm); background: var(--panel2); font-size: 14px; animation: up .3s both; }
.dw-shot b { flex: 1; }
.dw-shot span { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--ink-2); }
.dw-shot.first { box-shadow: inset 0 0 0 2px var(--gold); }
.dw-shot.first span { color: var(--gold); }
.dw-shot.early span { color: var(--red); }
@media (max-width: 560px) {
  .dw-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 0 8px; }
  .dw-card { padding: 6px 5px 8px; }
  .dw-wanted { font-size: 13px; letter-spacing: 1px; }
  .dw-name { font-size: 11.5px; }
  .dw-count { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { .duel.drawn .dw-shoot:not(:disabled) { animation-iteration-count: 1 !important; } }
.duel.standoff:not(.drawn) .dw-big { font-size: clamp(36px, 8vw, 72px); color: var(--ink-2); text-shadow: 0 0 24px #6d3410; animation: steady 1.6s ease-in-out infinite; }
@keyframes steady { 50% { opacity: .45; transform: scale(.97); } }
@media (prefers-reduced-motion: reduce) { .duel.standoff:not(.drawn) .dw-big { animation: none; } }

/* ---- new finales: shared ---- */
.mini { display: grid; justify-items: center; gap: 14px; width: 100%; padding: 8px 12px 24px; }
.mini-sub { font-weight: 800; color: var(--ink-2); text-align: center; min-height: 1.4em; max-width: 640px; }
.mini-sub b { color: var(--gold); }

/* ---- slot machine ---- */
.cabinet { --cell: clamp(64px, 14vw, 96px); position: relative; width: min(640px, 100%); padding: 18px 64px 22px 18px; border-radius: 26px 26px 18px 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--red) 32%, #000), color-mix(in srgb, var(--red) 14%, #000)); border: 3px solid var(--gold-dark); box-shadow: 0 0 0 6px color-mix(in srgb, var(--red) 8%, #000), 0 20px 50px #000c, inset 0 2px 0 color-mix(in srgb, var(--red) 40%, transparent); }
.marquee { position: relative; display: flex; justify-content: space-between; align-items: center; height: 46px; margin-bottom: 14px; padding: 0 10px; border-radius: 14px; background: color-mix(in srgb, var(--red) 6%, #000); border: 2px solid var(--gold-dark); overflow: hidden; }
.marquee b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--head); font-size: 24px; letter-spacing: 4px; color: var(--gold); text-shadow: 0 0 14px var(--gold); }
.marquee i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); opacity: .3; animation: bulbs .8s steps(2) infinite; }
.marquee i:nth-child(odd) { animation-delay: .4s; }
@keyframes bulbs { 50% { opacity: 1; box-shadow: 0 0 10px var(--gold); } }
.cabinet.won .marquee b { animation: pulse .3s ease-in-out infinite alternate; }
.cabinet.won .marquee i { animation-duration: .2s; }
.reels { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px; border-radius: 12px; background: var(--bg); box-shadow: inset 0 8px 20px #000, inset 0 -8px 20px #000; }
.reel { height: calc(var(--cell) * 1.6); overflow: hidden; border-radius: 8px; background: #f4efe6; box-shadow: inset 0 18px 18px -10px #0009, inset 0 -18px 18px -10px #0009; }
.strip { will-change: transform; }
.strip .cell { height: var(--cell); display: grid; grid-template-rows: 1fr auto; padding: 6px; gap: 2px; }
.strip .cell img { width: 100%; height: 100%; min-height: 0; object-fit: cover; border-radius: 4px; }
.strip .cell span { font-size: 10px; font-weight: 800; color: #2a1020; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.payline { position: absolute; left: 4px; right: 4px; top: 50%; height: 2px; background: var(--red); box-shadow: 0 0 10px var(--red); opacity: .7; pointer-events: none; }
.cabinet.won .reel { box-shadow: 0 0 0 3px var(--gold), 0 0 24px var(--gold), inset 0 18px 18px -10px #0009, inset 0 -18px 18px -10px #0009; }
.lever { position: absolute; right: 16px; top: 34%; width: 12px; height: 110px; border-radius: 6px; background: linear-gradient(90deg, #888, #ddd, #888); transform-origin: 50% 100%; }
.lever i { position: absolute; left: 50%; top: -14px; width: 30px; height: 30px; margin-left: -15px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--red) 55%, #fff), var(--red) 55%, var(--red-dark)); box-shadow: 0 4px 10px #0008; }
.lever.pull { animation: leverPull .7s cubic-bezier(.3,1.5,.5,1); }
@keyframes leverPull { 30% { transform: scaleY(-.35); } }
@media (max-width: 560px) { .cabinet { padding: 14px 44px 18px 12px; } .lever { right: 10px; height: 80px; } .marquee b { font-size: 18px; } }

/* ---- claw machine ---- */
.clawbox { position: relative; width: min(560px, 100%); aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 100%, color-mix(in srgb, var(--purple) 30%, var(--bg)), color-mix(in srgb, var(--purple) 8%, var(--bg)) 70%); border: 6px solid color-mix(in srgb, var(--purple) 22%, var(--bg)); box-shadow: 0 0 0 4px var(--purple), 0 20px 50px #000c; }
.clawbox .rail { position: absolute; left: 0; right: 0; top: 6%; height: 8px; background: linear-gradient(180deg, #aaa, #555); }
.clawbox .chute { position: absolute; left: 2%; bottom: 0; width: 20%; height: 30%; border: 3px solid var(--gold-dark); border-bottom: 0; border-radius: 10px 10px 0 0; background: linear-gradient(180deg, #0008, #000); display: grid; place-items: start center; padding-top: 8px; }
.clawbox .chute span { font-family: var(--head); font-size: 12px; letter-spacing: 2px; color: var(--gold); }
.cable { position: absolute; left: 0; top: 6%; width: 3px; margin-left: -1.5px; background: #ccc; transform-origin: top; }
.clawhead { position: absolute; left: 0; top: 0; width: 64px; height: 44px; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, #ddd, #888); box-shadow: 0 4px 10px #0008; z-index: 3; }
.clawhead .prong { position: absolute; top: 30px; width: 10px; height: 36px; background: linear-gradient(90deg, #999, #eee); border-radius: 0 0 6px 6px; transition: transform .25s; }
.clawhead .prong.l { left: 6px; transform-origin: top; transform: rotate(28deg); }
.clawhead .prong.r { right: 6px; transform-origin: top; transform: rotate(-28deg); }
.clawhead.closed .prong.l { transform: rotate(4deg); }
.clawhead.closed .prong.r { transform: rotate(-4deg); }
.prize { position: absolute; left: 0; top: 0; width: clamp(84px, 22%, 120px); display: grid; gap: 4px; padding: 5px; border-radius: 12px; background: #ffffffe8; box-shadow: 0 8px 18px #0009; z-index: 2; transition: opacity .3s; }
.prize img { width: 100%; aspect-ratio: 460 / 215; object-fit: cover; border-radius: 7px; }
.prize span { font-size: 10px; font-weight: 800; color: #1a1030; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prize.gone { opacity: 0; }
.prize.won { box-shadow: 0 0 0 3px var(--gold), 0 0 30px var(--gold); }
.clawbox .glass { position: absolute; inset: 0; pointer-events: none; z-index: 4; background: linear-gradient(115deg, #ffffff14 0 18%, transparent 18% 30%, #ffffff0d 30% 36%, transparent 36%); }
@media (max-width: 560px) {
  .prize { width: 21%; padding: 3px; }
  .prize span { font-size: 9px; }
  .clawhead { width: 52px; height: 36px; }
  .clawhead .prong { top: 24px; height: 28px; width: 8px; }
  .marquee i:nth-child(n+4):nth-child(-n+11) { display: none; }
}

/* ---- shared lots (auction + trivia crown picker) ---- */
.mini-big { font-family: var(--head); font-size: clamp(40px, 9vw, 72px); line-height: 1; color: #fff; text-shadow: 0 0 24px var(--red), 0 5px 0 var(--red2); min-height: 1em; }
.lots { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 12px; width: min(720px, 100%); justify-content: center; }
.lot { position: relative; display: grid; gap: 6px; justify-items: center; align-content: start; padding: 10px; border-radius: var(--r-md); background: var(--panel); border: 2px solid var(--line); color: var(--ink); box-shadow: var(--shadow-float); transition: transform .3s, opacity .4s, filter .4s, box-shadow .3s, border-color .3s; }
.lot img { width: 100%; aspect-ratio: 460 / 215; object-fit: cover; border-radius: var(--r-sm); }
.lot-name { font-weight: 800; font-size: 14px; text-align: center; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lot.won { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold), 0 0 40px var(--gold); transform: scale(1.06); z-index: 1; }
.lot.lost { opacity: .45; filter: grayscale(.8); }

/* ---- blind auction ---- */
.auction .lots { perspective: 900px; }
.lot-no { font-family: var(--head); font-size: 12px; letter-spacing: 2px; color: var(--gold); }
.lot.mine { border-color: var(--red); }
.bidctl { display: flex; align-items: center; gap: 10px; }
.bidctl button { width: 40px; height: 40px; border-radius: 50%; border: 0; font-size: 22px; font-weight: 800; color: #fff; background: linear-gradient(180deg, var(--gold), color-mix(in srgb, var(--gold), var(--gold-dark) 45%)); box-shadow: 0 3px 0 var(--gold-dark); touch-action: manipulation; }
.bidctl button[data-d="-1"] { background: var(--panel2); color: var(--ink); box-shadow: 0 3px 0 #000; }
.bidctl button:disabled { opacity: .35; }
.bidctl b { min-width: 30px; text-align: center; font-family: var(--head); font-size: 24px; color: var(--gold); }
.auction.closed .bidctl { display: none; }
.lot-total { font-family: var(--head); font-size: 26px; color: var(--gold); min-height: 0; }
.lot-total:empty { display: none; }
.lot-bidders { display: grid; gap: 3px; font-size: 12px; width: 100%; }
.lot-bidders span { display: flex; align-items: center; gap: 6px; }
.lot-bidders b { margin-left: auto; color: var(--gold); }
.lot.flipped { animation: lotFlip .55s cubic-bezier(.3,1.4,.5,1); }
@keyframes lotFlip { 0% { transform: rotateY(0); } 50% { transform: rotateY(90deg); } 100% { transform: rotateY(0); } }
.au-wallet { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--gold); min-height: 1.6em; }
.au-wallet .emo { width: 24px; height: 24px; }
.au-wallet b { color: var(--ink); }
.au-placed { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: 13px; color: var(--dim); }
.au-placed span { display: inline-flex; align-items: center; gap: 4px; }
.au-placed span.in { color: var(--ink); }

/* ---- hours trivia ---- */
.quiz-q { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 16px; width: min(640px, 100%); padding: 14px; border-radius: var(--r-lg); background: var(--panel); border: 2px solid var(--blue); box-shadow: 0 0 30px color-mix(in srgb, var(--blue) 20%, transparent); font-size: clamp(18px, 3vw, 24px); font-weight: 800; line-height: 1.3; }
.quiz-q img { width: 100%; border-radius: var(--r-sm); }
.quiz-q b { color: var(--blue); }
.quiz-q small { display: block; font-size: 13px; font-weight: 600; color: var(--dim); margin-top: 4px; }
.tq-form { display: flex; gap: 8px; width: min(440px, 100%); }
.tq-form input { flex: 1; min-width: 0; font-size: 20px; font-weight: 800; padding: 12px 14px; border-radius: var(--r-md); }
.tq-form[hidden] { display: none; }
.tq-answer { font-size: 18px; font-weight: 800; color: var(--ink-2); }
.tq-answer b { font-family: var(--head); font-size: clamp(48px, 10vw, 84px); color: var(--blue); text-shadow: 0 0 30px var(--blue); margin-right: 8px; }
.tq-guesses { display: grid; gap: 4px; width: min(440px, 100%); }
.tq-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: var(--r-sm); background: var(--panel2); font-size: 14px; animation: up .3s both; }
.tq-row b { flex: 1; }
.tq-row span { font-weight: 800; font-variant-numeric: tabular-nums; }
.tq-row small { color: var(--dim); min-width: 90px; text-align: right; }
.tq-row.first { box-shadow: inset 0 0 0 2px var(--gold); }
.tq-row.first small { color: var(--gold); }
.tq-pick[hidden] { display: none; }
.tq-pick .lot { cursor: default; font: inherit; }
.tq-pick.mine .lot:not(:disabled) { cursor: pointer; border-color: var(--gold); }
.tq-pick.mine .lot:not(:disabled):hover { transform: translateY(-4px); }
.tq-pick .crown { font-size: 12px; font-weight: 800; color: var(--gold); opacity: 0; }
.tq-pick.mine .lot:not(:disabled) .crown { opacity: 1; }
@media (max-width: 560px) {
  .lots { gap: 6px; }
  .lot { padding: 6px; }
  .lot-name { font-size: 11.5px; }
  .bidctl { gap: 4px; } .bidctl button { width: 32px; height: 32px; font-size: 18px; } .bidctl b { font-size: 18px; min-width: 20px; }
  .quiz-q { grid-template-columns: 1fr; text-align: center; }
  .quiz-q img { max-width: 240px; justify-self: center; }
}

/* ---- hot potato ---- */
.pt-table { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 200px)); gap: 18px; width: min(680px, 100%); justify-content: center; padding: 40px 10px 10px; }
.pt-seat { position: relative; display: grid; gap: 6px; padding: 8px; border-radius: var(--r-md); background: var(--panel); border: 2px solid var(--line); transition: transform .2s, box-shadow .2s, opacity .5s, filter .5s; }
.pt-seat img { width: 100%; aspect-ratio: 460 / 215; object-fit: cover; border-radius: var(--r-sm); }
.pt-seat span { font-weight: 800; font-size: 14px; text-align: center; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pt-seat.hot { border-color: var(--orange); box-shadow: 0 0 30px color-mix(in srgb, var(--orange) 53%, transparent); animation: hotShake .18s linear infinite; }
@keyframes hotShake { 25% { transform: translate(-2px, 1px) rotate(-1deg); } 75% { transform: translate(2px, -1px) rotate(1deg); } }
.pt-seat.blown { opacity: .35; filter: grayscale(1) brightness(.6); animation: none; }
.pt-seat .pt-scorch { position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at 50% 45%, #000c 0 25%, transparent 60%); opacity: 0; }
.pt-seat.blown .pt-scorch { opacity: 1; }
.pt-seat.won { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold), 0 0 40px var(--gold); transform: scale(1.06); animation: none; opacity: 1; filter: none; }
.pt-bomb { position: absolute; left: 0; top: 0; z-index: 3; width: 70px; height: 70px; transition: transform .28s cubic-bezier(.3,1.4,.5,1); filter: drop-shadow(0 8px 10px #000a); pointer-events: none; }
.pt-bomb[hidden] { display: none; }
.pt-bomb .emo { width: 100%; height: 100%; animation: bombPulse .35s ease-in-out infinite alternate; }
@keyframes bombPulse { to { transform: scale(1.12) rotate(-6deg); } }
.pt-bomb .spark { position: absolute; right: 6px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(#fff, var(--gold) 40%, var(--orange) 70%, transparent 72%); box-shadow: 0 0 14px var(--gold); animation: spark .12s steps(2) infinite; }
@keyframes spark { 50% { transform: scale(1.5); opacity: .6; } }
.pt-pass { font-family: var(--head); font-size: 26px; letter-spacing: 2px; padding: 14px 34px; border: 0; border-radius: var(--r-pill); color: #fff; background: linear-gradient(180deg, var(--orange), color-mix(in srgb, var(--orange), #000 25%)); box-shadow: 0 6px 0 color-mix(in srgb, var(--orange), #000 60%), 0 10px 30px #0008; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.pt-pass small { display: block; font-family: Inter, sans-serif; font-size: 12px; font-weight: 800; letter-spacing: 0; opacity: .9; }
.pt-pass:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 color-mix(in srgb, var(--orange), #000 60%); }
.pt-pass:disabled { opacity: .45; }
.pt-pass[hidden] { display: none; }
.pt-who { min-height: 1.4em; font-weight: 800; color: var(--orange); }

/* ---- derby race ---- */
.track { position: relative; width: min(820px, 100%); padding: 10px 0; border-radius: var(--r-lg); background: repeating-linear-gradient(90deg, #3d6b2e 0 40px, #366128 40px 80px); border: 4px solid #e8e1c8; box-shadow: var(--shadow-float); overflow: hidden; }
.lane { position: relative; height: 74px; border-bottom: 2px dashed #ffffff55; }
.lane:last-of-type { border-bottom: 0; }
.lane.won { background: color-mix(in srgb, var(--gold) 20%, transparent); }
.runner { position: absolute; top: 50%; left: 0; display: grid; grid-template-columns: 70px auto; align-items: center; gap: 6px; padding: 4px 8px 4px 4px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--bg) 87%, transparent); transform: translateY(-50%); white-space: nowrap; }
.runner img { width: 70px; aspect-ratio: 460 / 215; object-fit: cover; border-radius: var(--r-pill); }
.runner span { font-size: 12px; font-weight: 800; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.runner.boost { animation: boost .6s ease-out; box-shadow: -30px 0 30px -6px var(--orange); }
.runner.slip { animation: slip .9s ease-in-out; }
@keyframes boost { from { filter: brightness(1.8); } }
@keyframes slip { 20% { transform: translateY(-50%) rotate(-25deg); } 60% { transform: translateY(-50%) rotate(15deg); } }
.fxi { position: absolute; left: 50%; bottom: 100%; font-style: normal; font-size: 13px; font-weight: 800; white-space: nowrap; color: #fff; text-shadow: 0 2px 4px #000; opacity: 0; }
.fxi.go { animation: fxPop 1.4s ease-out; }
@keyframes fxPop { 10% { opacity: 1; transform: translate(-50%, -4px); } 80% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -18px); } }
.finishline { position: absolute; top: 0; bottom: 0; right: 4%; width: 14px; background: repeating-conic-gradient(#fff 0 25%, #111 0 50%) 0 0 / 14px 14px; opacity: .9; }
.derby-go { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.d-ctrls { display: grid; gap: 6px; width: min(820px, 100%); }
.d-ctrl { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; }
.d-cheer { padding: 12px 14px; border: 0; border-radius: var(--r-md); font-weight: 800; font-size: 15px; text-align: left; color: #fff; background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 27%, transparent), color-mix(in srgb, var(--blue) 13%, transparent)); border: 2px solid var(--blue); touch-action: manipulation; user-select: none; -webkit-user-select: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-cheer.hit { animation: sdHit .12s ease-out; }
.d-item { width: 48px; border-radius: var(--r-md); border: 2px solid var(--gold-dark); background: var(--panel); font-size: 20px; }
.d-cheer:disabled, .d-item:disabled { opacity: .4; }
@media (max-width: 560px) {
  .pt-table { gap: 8px; padding-top: 30px; } .pt-bomb { width: 52px; height: 52px; } .pt-seat span { font-size: 11.5px; }
  .lane { height: 58px; } .runner { grid-template-columns: 52px; padding: 3px; } .runner img { width: 52px; } .runner span { display: none; }
  .d-cheer { padding: 10px; font-size: 13px; } .d-item { width: 42px; }
}
@media (prefers-reduced-motion: reduce) { .pt-seat.hot, .pt-bomb .emo, .pt-bomb .spark { animation-iteration-count: 1 !important; } }
.pt-bomb { width: 84px; height: 84px; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--orange) 80%, transparent)) drop-shadow(0 0 4px #fff8) drop-shadow(0 8px 10px #000a); }
.pt-table { padding-top: 56px; }
.pt-pass small { color: #fffc; }
@media (max-width: 560px) { .pt-bomb { width: 60px; height: 60px; } .pt-table { padding-top: 42px; } }
.fxi { left: 100%; bottom: auto; top: 50%; margin-left: 6px; }
@keyframes fxPop { 10% { opacity: 1; transform: translate(4px, -50%); } 80% { opacity: 1; } to { opacity: 0; transform: translate(14px, -50%); } }

/* ---- wishlists ---- */
.wishbtn { white-space: nowrap; align-self: flex-start; }
#pool-tools:has(.searchbox) { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.wish-h { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.wish-h h3 { margin: 0; font-family: var(--head); font-weight: 400; letter-spacing: 1px; font-size: 18px; }
.wrow { grid-column: 1 / -1; position: relative; display: grid; grid-template-columns: 120px minmax(0, 1fr) auto auto auto; align-items: center; gap: 12px; padding: 8px; border-radius: var(--r-sm); background: var(--panel2); border: 1px solid var(--line); animation: up .3s both; }
.wrow.all { border-color: var(--red); box-shadow: 0 0 20px color-mix(in srgb, var(--red) 20%, transparent); }
.wrow > *:not(.card-hit) { position: relative; z-index: 2; pointer-events: none; }
.wrow .btn { pointer-events: auto; }
.w-main { display: grid; gap: 2px; min-width: 0; }
.w-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-badge { font-size: 12px; font-weight: 800; color: var(--red); }
.wrow:not(.all) .w-badge { color: var(--ink-2); }
.w-avs { display: flex; padding-left: 6px; }
.sr-wish { display: block; font-size: 11px; font-weight: 800; color: var(--red); }
.wishmodal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: var(--scrim); backdrop-filter: blur(6px); animation: fadeIn .2s both; }
.wish-card { width: min(640px, 100%); max-height: min(80vh, 760px); display: grid; grid-template-rows: auto 1fr; gap: 10px; padding: 16px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-modal); animation: up .3s cubic-bezier(.2,1.3,.4,1) both; }
.wish-list { overflow-y: auto; margin: 0; }
@media (max-width: 560px) {
  .wrow { grid-template-columns: 96px minmax(0, 1fr) auto; grid-template-areas: "art main main" "art avs btn"; row-gap: 6px; }
  .wrow .sr-art { grid-area: art; } .wrow .w-main { grid-area: main; } .wrow .w-avs { grid-area: avs; } .wrow .sr-price { display: none; } .wrow .sr-btn { grid-area: btn; }
  .wishmodal { padding: 0; place-items: stretch; } .wish-card { max-height: none; border-radius: 0; }
}
.wrow { grid-template-columns: 120px minmax(0, 1fr) auto auto auto; grid-template-areas: "art main avs price btn"; }
.wrow .sr-art { grid-area: art; } .wrow .w-main { grid-area: main; } .wrow .w-avs { grid-area: avs; } .wrow .sr-price { grid-area: price; } .wrow .sr-btn { grid-area: btn; }
@media (max-width: 560px) { .wrow { grid-template-columns: 96px minmax(0, 1fr) auto; grid-template-areas: "art main main" "art avs btn"; } }
.wish-list { overflow-x: hidden; }

/* ---- long names never stretch a finale wider than the screen ---- */
.mini > *, .duel > *, .arena > * { min-width: 0; max-width: 100%; }
.lot { min-width: 0; }
.lot-bidders span, .tq-row, .dw-shot, .au-placed span { min-width: 0; }
.lot-bidders span > :not(.av):not(b), .tq-row b, .dw-shot b, .w-main b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lot-bidders span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.au-placed span, .pt-who, .mini-sub, .dw-sub { overflow-wrap: anywhere; }
.fxi { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; }
.quiz-q > div { min-width: 0; overflow-wrap: anywhere; }
.lot-bidders .nm { flex: 1; min-width: 0; font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The pool tabs always sit on one row; on narrow screens they tighten up instead of wrapping. */
.tabs { flex-wrap: nowrap; }
.tab { white-space: nowrap; flex: 0 1 auto; min-width: 0; }
@media (max-width: 420px) { .tab { padding: 9px 9px; font-size: 14px; } .tab b { margin-left: 3px; padding: 1px 5px; } .tab.on::after { left: 9px; right: 9px; } }
@media (max-width: 360px) { .tab { padding: 8px 6px; font-size: 12.5px; } .tab b { font-size: 11px; padding: 1px 4px; margin-left: 2px; } .tabs { gap: 2px; } .tab.on::after { left: 6px; right: 6px; } }

/* ---- Calm motion (Settings): the same rules as prefers-reduced-motion above, switched on by the player.
   Keep in step with the @media (prefers-reduced-motion) blocks. ---- */
html.calm .blob,html.calm .grain { animation: none !important; }
html.calm body.shake #app,html.calm body.shake-big #app { animation: none !important; }
html.calm .logo .o,html.calm .logo.pulse,html.calm .step.on b,html.calm #create,html.calm .start.ready,html.calm .waiting,html.calm .timer.panic,html.calm body.myturn .tlabel,html.calm .launch,html.calm .bigemoji,html.calm .vcard.hunt:hover .art::after,html.calm .vcard.sel .art::after,html.calm .wheelwrap.won canvas,html.calm .lights i,html.calm .rtitle,html.calm .shine,html.calm .myshield .hidden-count {
    animation-iteration-count: 1 !important;
  }
html.calm .vetobtn { animation: vetoIn .35s cubic-bezier(.2,2,.4,1) both !important; }
html.calm .fbody,html.calm .glove { animation-iteration-count: 1 !important; }
html.calm .sd.live .sd-title,html.calm .sd.live .sd-b small { animation-iteration-count: 1 !important; }
html.calm .duel.drawn .dw-shoot:not(:disabled) { animation-iteration-count: 1 !important; }
html.calm .duel.standoff:not(.drawn) .dw-big { animation: none; }
html.calm .pt-seat.hot,html.calm .pt-bomb .emo,html.calm .pt-bomb .spark { animation-iteration-count: 1 !important; }

/* ---- settings modal (desktop and phone) ---- */
.set-card { width: min(460px, 100%); max-height: 100dvh; overflow-y: auto; gap: 12px; }
.set-sec { display: grid; gap: 6px; }
.set-sec > .lbl { margin: 4px 2px 0; }
.set-vol { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--panel2); }
.set-vol input { flex: 1; accent-color: var(--red); height: 28px; min-width: 0; }
.set-vol b { min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.set-vol.muted { opacity: .5; }
.set-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.set-chips .chip { flex: 1 1 0; min-width: 0; justify-content: center; text-align: center; white-space: nowrap; }
.set-chips .chip.on { background: var(--gold); color: #111; border-color: var(--gold); }
.theme-chip { display: inline-flex; align-items: center; gap: 8px; }
.theme-chip i { width: 18px; height: 18px; border-radius: 50%; flex: none; background: linear-gradient(135deg, var(--sw) 0 50%, var(--sb) 50%); box-shadow: 0 0 0 2px #fff3; }
.set-note { margin: 0; font-size: 12px; text-align: center; }
.settings-btn { display: inline-flex; align-items: center; gap: 6px; }
.settings-btn .desk-only { font-size: 13px; font-weight: 700; }
@media (max-width: 700px) { .settings-btn .desk-only { display: none; } }
.set-chips.lobby { display: grid; grid-template-columns: 1fr 1fr; }
.set-chips.sound { display: grid; grid-template-columns: 1fr 1fr; }
.snd-chip { display: grid; gap: 2px; padding: 9px 8px; border-radius: var(--r-md); white-space: normal; }
.snd-chip small { font-size: 11px; font-weight: 600; opacity: .75; }
.set-chips.lobby .chip:first-child { grid-column: 1 / -1; }
.snd-chip.on small { color: #111; opacity: .7; }
/* contrast fixes from the theme audit */
.snd-chip small { opacity: 1; color: var(--ink-2); }
.snd-chip.on small { color: #111; opacity: .8; }
.ord.on .coins { color: #fff; }
.nb { color: var(--ink-2); }
.pitchtile .ribbon { color: #14081f; }

/* Lobby columns may never grow past the screen; on very narrow phones the tab emoji drop out first. */
.phase-lobby > * { min-width: 0; }
@media (max-width: 380px) { .tab .ti { display: none; } }
/* Long names in "X's turn" wrap instead of pushing the timer off-screen. */
.turn { min-width: 0; }
.turn > div { min-width: 0; }
.tlabel { overflow-wrap: anywhere; }

/* ---- My wishlist: the list scrolls inside the sheet (it used to grow past the screen on phones) ---- */
html.modal-lock, html.modal-lock body { overflow: hidden; }
.wish-card { display: flex; flex-direction: column; }
.wish-card > * { flex: none; }
.wish-card > .wish-list { flex: 1 1 auto; }
.wish-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-right: 2px; }
.wish-count { font-family: Inter, system-ui, sans-serif; font-size: 13px; font-weight: 700; color: var(--dim); letter-spacing: 0; margin-left: 4px; }
.wish-filter { width: 100%; font-size: 16px; padding: 10px 12px; border-radius: var(--r-md); }
.wish-filter[hidden] { display: none; }
@media (max-width: 560px) {
  .wish-card { height: 100dvh; max-height: 100dvh; gap: 8px; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); }
  .wish-list .sr { grid-template-columns: 88px minmax(0, 1fr) auto; column-gap: 10px; padding: 6px; row-gap: 2px; }
  .wish-list .sr-name { font-size: 14px; }
  .wish-list .sr-btn.btn { padding: 7px 10px; font-size: 12px; }
}
.wish-list .sr-price { min-width: 0; }
@media (max-width: 380px) { .wish-list .sr-price .price { white-space: normal; display: inline-grid; justify-items: start; line-height: 1.15; } }
/* Phones: the store search gets the full width; "My wishlist" sits on its own line underneath,
   left-aligned so it stays clear of the throwables tab on the right edge. */
@media (max-width: 560px) {
  #pool-tools:has(.searchbox) { flex-direction: column; align-items: stretch; gap: 8px; }
  #pool-tools .searchbox { width: 100%; flex: none; }
  #pool-tools .wishbtn { align-self: flex-start; }
}

/* ---------- installable app ---------- */
[data-install][hidden] { display: none !important; }
.install-chip { animation: up .6s .75s both; }
.set-go { margin-left: auto; font-size: 22px; line-height: 1; color: var(--dim); }
.iostip { position: fixed; inset: 0; z-index: 96; display: grid; place-items: end center; background: var(--scrim); backdrop-filter: blur(6px); animation: fadeIn .2s both; }
.ios-card .btn { margin-top: 4px; }
.ios-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: ios; }
.ios-steps li { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-md); background: var(--panel2); text-align: left; }
.ios-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: color-mix(in srgb, var(--blue) 18%, transparent); color: var(--blue); font-size: 18px; }
/* Installed on iPhone the page draws under the status bar: keep content below it (and the home indicator). */
.home { padding-top: max(40px, calc(env(safe-area-inset-top) + 20px)); padding-bottom: max(40px, calc(env(safe-area-inset-bottom) + 20px)); }
.center { padding-top: max(20px, calc(env(safe-area-inset-top) + 12px)); padding-bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px)); }
@media (max-width: 700px) {
  .wish-card { padding-top: max(12px, env(safe-area-inset-top)); }
  #details { padding-top: env(safe-area-inset-top); }
}
html.standalone { overscroll-behavior-y: none; }
