/* CatCat - one layout, four skins. Everything a skin changes is a custom property on :root;
   the neon skin is the default, the others override near the end of this file. */

:root {
  --vh: 1vh;

  /* neon skin (the default): blue-black ground, cyan light on one side, hot orange on the other */
  --void: oklch(0.12 0.035 258);
  --night: oklch(0.165 0.045 258);
  --panel: oklch(0.215 0.055 258);
  --panel-2: oklch(0.275 0.065 256);
  --line: oklch(0.45 0.09 250);
  --mute: oklch(0.8 0.04 250);
  --fg: oklch(0.97 0.01 250);
  --acid: oklch(0.93 0.2 108);
  --acid-dk: oklch(0.6 0.14 106);
  --acid-t: var(--acid);
  --on-acid: oklch(0.14 0.04 258);
  --cyan: oklch(0.87 0.14 200);
  --cyan-dk: oklch(0.5 0.1 205);
  --cyan-t: var(--cyan);
  --on-cyan: oklch(0.14 0.04 258);
  --hot: oklch(0.57 0.22 28);
  --hot-dk: oklch(0.4 0.17 28);
  --on-hot: oklch(0.99 0.005 250);
  --ok: oklch(0.92 0.1 190);
  --err: oklch(0.8 0.15 25);
  --shade: oklch(0 0 0 / 0.5);
  --hover: var(--hover);
  --scrim: oklch(0.08 0.03 258 / 0.8);
  --on-scrim: oklch(0.97 0.01 250);
  --pop: var(--acid);
  --glow-a: oklch(0.36 0.12 205 / 0.55);
  --glow-b: oklch(0.38 0.16 32 / 0.42);
  --gl-a: oklch(0.66 0.24 28);
  --gl-b: var(--cyan);
  --toast-bg: var(--fg);
  --toast-fg: var(--on-acid);
  --soft-dk: var(--void);
  --face: oklch(0.14 0.04 258);
  --face-rat: oklch(0.16 0.07 20);
  --edge-1: oklch(0.5 0.06 250);
  --edge-2: oklch(0.3 0.06 252);
  --back-bg: var(--panel);
  --back-img: linear-gradient(128deg, var(--panel-2) 0 50%, var(--panel) 50% 100%);
  --back-edge: var(--acid);
  --back-fg: var(--cyan);
  --pw-peek: oklch(0.87 0.14 200);
  --pw-swap: oklch(0.8 0.16 55);
  --pw-draw2: oklch(0.93 0.2 108);
  --on-pw: oklch(0.14 0.04 258);

  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;
  --r-card: 8% / 5.7%;
  --r-btn: 0px;
  --r-tag: 0px;
  --r-av: 0px;
  --cut: 10px;
  --chamfer: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  --av-clip: polygon(22% 0, 100% 0, 100% 78%, 78% 100%, 0 100%, 0 22%);

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;

  --display: 'Karantina', 'Rubik', system-ui, sans-serif;
  --dz: 1; /* display type scale: wide display faces need smaller sizes than Karantina */
  --nz: 1; /* card number scale */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 150ms;
  --base: 220ms;
  --slow: 360ms;

  --z-sheet: 20;
  --z-bar: 30;
  --z-pop: 40;
  --z-fx: 50;
  --z-toast: 60;

  --cw: min(20.5vw, calc(var(--vh) * 12), 104px); /* my cards */
  --pw: min(18vw, calc(var(--vh) * 10), 88px);  /* deck and pile */
  --tilt: 9deg;
}
@supports (height: 1dvh) {
  :root { --vh: 1dvh; }
}

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; scrollbar-color: var(--line) var(--void); }
body {
  margin: 0;
  min-height: calc(var(--vh) * 100);
  font-family: 'Rubik', system-ui, 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--fg);
  background:
    radial-gradient(85% 50% at 100% 0%, var(--glow-a), transparent 62%),
    radial-gradient(85% 50% at 0% 100%, var(--glow-b), transparent 62%),
    var(--void);
  background-attachment: fixed;
  overflow-x: hidden;
  overscroll-behavior-y: contain; /* no pull-to-refresh in the middle of a round */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  caret-color: var(--acid);
}
::selection { background: var(--acid); color: var(--on-acid); }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: default; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
[hidden] { display: none !important; }
.skip { position: absolute; inset-inline-start: var(--s4); top: -60px; background: var(--acid); color: var(--on-acid); padding: var(--s2) var(--s4); z-index: var(--z-toast); font-weight: 700; }
.skip:focus { top: var(--s2); }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: var(--z-bar);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  min-height: 52px;
  padding: var(--s1) var(--s3);
  padding-top: max(var(--s1), env(safe-area-inset-top));
  /* the bar stays put while the lobby scrolls under it, so it needs its own ground */
  background: color-mix(in oklch, var(--void) 86%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.bar-ctx { display: flex; align-items: center; gap: var(--s2); min-width: 0; font-weight: 700; font-size: 14px; }
.bar-tools { display: flex; gap: 2px; margin-inline-start: auto; }
.tool { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--mute); transition: background-color var(--fast), color var(--fast); }
.tool:hover { background: var(--hover); color: var(--cyan-t); }
.tool svg { width: 24px; height: 24px; }
.tool-text { width: auto; padding-inline: var(--s3); font-weight: 700; font-size: 14px; }
.chip { display: inline-flex; align-items: center; min-height: 32px; padding: 0 var(--s3); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--cyan-dk); color: var(--cyan-t); font-family: var(--display); font-size: calc(24px * var(--dz)); font-weight: 700; letter-spacing: 0.14em; line-height: 1; direction: ltr; --cut: 6px; clip-path: var(--chamfer); }
.round { color: var(--mute); white-space: nowrap; }

/* ---------- shared controls ---------- */
.screen { max-width: 520px; margin-inline: auto; padding: var(--s2) var(--s4) var(--s6); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 52px; padding: 12px 26px 15px;
  clip-path: var(--chamfer); border-radius: var(--r-btn);
  font-weight: 700; font-size: 17px; line-height: 1.2; text-align: center;
  text-decoration: none;
  user-select: none;
  transition: transform var(--fast) var(--ease-out), box-shadow var(--fast) var(--ease-out), filter var(--fast);
}
.btn-block { width: 100%; }
.btn-primary { background: var(--acid); color: var(--on-acid); box-shadow: inset 0 -4px 0 var(--acid-dk); }
.btn-soft { background: var(--panel-2); color: var(--fg); box-shadow: inset 0 -4px 0 var(--soft-dk), inset 0 0 0 1px var(--line); }
.btn-call { background: var(--hot); color: var(--on-hot); box-shadow: inset 0 -4px 0 var(--hot-dk); }
.btn-wa { background: oklch(0.5 0.145 150); color: #fff; box-shadow: inset 0 -4px 0 oklch(0.36 0.11 150); }
.btn:hover:not(:disabled) { filter: brightness(1.1); }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 -1px 0 var(--shade); }
.btn:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--fg); }
.btn:disabled { opacity: 0.45; }
.btn-sm { min-height: 44px; padding: 8px 18px 11px; font-size: 15px; --cut: 8px; }
.link { display: inline-flex; align-items: center; min-height: 44px; color: var(--cyan-t); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.link:hover { color: var(--fg); }

.field { display: grid; gap: var(--s2); }
.label { font-weight: 500; color: var(--mute); }
.input {
  width: 100%; padding: 12px 16px;
  font: inherit; font-size: 18px; font-weight: 500;
  color: var(--fg); background: var(--void);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  transition: border-color var(--fast), box-shadow var(--fast);
}
.input::placeholder { color: var(--mute); opacity: 1; }
.input:focus { outline: none; border-color: var(--cyan-t); box-shadow: 0 0 0 3px color-mix(in oklch, var(--cyan) 22%, transparent); }
.input.code-in { font-family: var(--display); font-size: calc(30px * var(--dz)); line-height: 1.1; text-transform: uppercase; letter-spacing: 0.3em; text-align: center; font-weight: 700; direction: ltr; color: var(--cyan-t); }
.err { color: var(--err); font-weight: 500; font-size: 14px; min-height: 21px; }

.av { position: relative; display: block; width: 100%; aspect-ratio: 1; background: var(--void); box-shadow: inset 0 0 0 1.5px var(--av-c, var(--line)); clip-path: var(--av-clip); border-radius: var(--r-av); overflow: hidden; }
.av svg { display: block; width: 100%; height: 100%; transform: scale(0.84); }
.av-bot { position: absolute; inset-inline-end: 0; bottom: 0; width: 42%; color: var(--cyan-t); line-height: 0; }
.av-bot svg { transform: none; }

/* ---------- home ---------- */
.home { display: grid; gap: var(--s5); padding-top: var(--s4); }
.brand { display: grid; gap: var(--s2); }
.logo { display: inline-flex; align-items: center; gap: var(--s3); direction: ltr; }
.logo-cat { width: 84px; flex: none; }
.logo-cat svg { display: block; width: 100%; }
.logo-word { font-family: var(--display); font-size: calc(84px * var(--dz)); font-weight: 700; letter-spacing: 0.01em; line-height: 0.8; color: var(--fg); text-shadow: 3px 0 0 var(--gl-a), -3px 0 0 var(--gl-b); }
.logo-word b { color: var(--acid-t); font-weight: 700; }
.tagline { color: var(--mute); }
.avatars { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: var(--s1); }
.av-pick { padding: 3px; border: 2px solid transparent; border-radius: var(--r-sm); opacity: 0.6; transition: transform var(--fast) var(--ease-out), border-color var(--fast), opacity var(--fast); }
.av-pick:hover { transform: translateY(-2px); opacity: 1; }
.av-pick[aria-checked='true'] { border-color: var(--acid-t); opacity: 1; }
.av-pick { position: relative; }
.stats { margin: 0; font-size: 13px; color: var(--mute); text-align: center; }
/* who I am: my face next to my name, then the characters I can switch to */
.me-row { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: end; gap: var(--s4); }
.me-av .av { box-shadow: inset 0 0 0 2px var(--acid-t); }
.av-more { display: grid; place-content: center; justify-items: center; gap: 1px; aspect-ratio: 1; border: 1.5px dashed var(--line); border-radius: var(--r-sm); color: var(--mute); font-size: 11px; line-height: 1.1; transition: border-color var(--fast), color var(--fast); }
.av-more b { font-size: 15px; font-weight: 800; color: var(--fg); }
.av-more:hover { border-color: var(--acid-t); color: var(--fg); }
.me-photo { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s4); margin: 0; font-size: 14px; color: var(--mute); }
.me-photo .link { min-height: 44px; }
/* the purse: always in sight on the start screen, one tap from the shop */
.purse { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--s3); background: var(--panel-2); border-radius: 999px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acid) 55%, transparent); color: var(--fg); font-size: 15px; white-space: nowrap; transition: transform var(--fast) var(--ease-out); }
.purse b { font-weight: 800; font-variant-numeric: tabular-nums; }
.purse span { padding-inline-start: var(--s2); border-inline-start: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--mute); }
.purse:hover { transform: translateY(-1px); }
.purse:active { transform: translateY(0); }
.btn.daily { flex-direction: column; gap: 2px; }
.btn.daily span { font-size: 13px; font-weight: 500; color: var(--mute); }
.av-photo { background: var(--panel-2); }
.ph-cv { display: block; width: min(100%, 256px); aspect-ratio: 1; margin-inline: auto; border: 1px solid var(--line); border-radius: var(--r-md); touch-action: none; cursor: grab; }
.ph-zoom { width: 100%; min-height: 44px; accent-color: var(--acid); }
.ph-src { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.ph-src .btn { padding-inline: var(--s2); }
.callarm { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; background: var(--panel-2); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); border-radius: max(var(--r-btn), 0px); clip-path: var(--chamfer); --cut: 7px; font-size: 13px; font-weight: 700; white-space: nowrap; transition: background-color var(--fast), color var(--fast); }
.callarm span { font-size: 20px; line-height: 1; }
.callarm[aria-pressed='true'] { background: var(--hot); color: var(--on-hot); box-shadow: inset 0 -3px 0 var(--hot-dk); }
select.input { min-height: 52px; appearance: auto; }
.home-acts { display: grid; gap: var(--s3); }
.join-box { display: grid; gap: var(--s3); padding: var(--s4); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); }
.join-title { font-size: 20px; font-weight: 800; }
.center-row { display: flex; justify-content: center; }

/* ---------- lobby ---------- */
.lobby { display: grid; gap: var(--s5); }
.code-box { display: grid; gap: var(--s3); justify-items: center; padding: var(--s5) var(--s4); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); text-align: center; }
.code-l { color: var(--mute); font-weight: 500; }
.code { font-family: var(--display); font-size: calc(88px * var(--dz)); font-weight: 700; letter-spacing: 0.12em; line-height: 0.85; direction: ltr; color: var(--acid-t); padding-inline-start: 0.12em; text-shadow: 3px 0 0 var(--gl-a), -3px 0 0 var(--gl-b); }
.share-row { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s3); margin-top: var(--s2); }
.sec-title { font-size: 18px; font-weight: 700; margin-bottom: var(--s3); }
.plist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.prow { display: flex; align-items: center; gap: var(--s3); min-height: 60px; padding: var(--s2) var(--s3); background: var(--panel); border: 1px solid color-mix(in oklch, var(--line) 50%, transparent); border-radius: var(--r-md); }
.prow .av { width: 44px; flex: none; }
.prow .nm { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow.off .nm, .prow.off .av { opacity: 0.5; }
.tag { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: max(2px, var(--r-tag)); background: var(--panel-2); color: var(--fg); white-space: nowrap; }
.tag-host { background: var(--acid); color: var(--on-acid); }
.x-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--mute); font-size: 22px; line-height: 1; }
.x-btn:hover { background: var(--hover); color: var(--fg); }
.opts { display: grid; gap: var(--s4); }
.opt { display: grid; gap: var(--s2); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--void); border: 1px solid var(--line); border-radius: var(--r-md); }
.seg button { min-height: 44px; padding-inline: var(--s3); border-radius: var(--r-sm); font-weight: 700; font-size: 15px; color: var(--mute); transition: background-color var(--fast), color var(--fast); }
.seg button[aria-pressed='true'] { background: var(--cyan); color: var(--on-cyan); }
.seg button:not(:disabled):not([aria-pressed='true']):hover { color: var(--fg); }
.wait { text-align: center; color: var(--mute); font-weight: 500; min-height: 52px; display: grid; place-items: center; }
.dots::after { content: ''; display: inline-block; width: 1.2em; text-align: start; animation: dots 1.4s steps(4, end) infinite; }

/* ---------- cards ---------- */
.card { position: relative; display: block; width: 100%; aspect-ratio: 5 / 7; perspective: 600px; container-type: inline-size; border-radius: var(--r-card); transition: transform var(--base) var(--ease-out); }
.card-in { position: absolute; inset: 0; border-radius: inherit; transform-style: preserve-3d; transform: rotateX(var(--tilt)); transition: transform var(--slow) var(--ease-out); }
.card.up .card-in { transform: rotateX(var(--tilt)) rotateY(180deg); }
.card-b, .card-f {
  position: absolute; inset: 0; border-radius: inherit; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  /* stacked edges read as the thickness of the card */
  box-shadow: 0 max(1px, 1.4cqw) 0 var(--edge-1), 0 max(2px, 2.8cqw) 0 var(--edge-2), 0 max(3px, 7cqw) max(4px, 9cqw) var(--shade);
}
.card-b { display: grid; place-items: center; background: var(--back-img); border: max(1.5px, 2.6cqw) solid var(--back-edge); color: var(--back-fg); }
.card-b svg { width: 70%; display: block; }
.card-f { transform: rotateY(180deg); background: var(--face); color: var(--fg); }
.card-f::after { content: ''; position: absolute; inset: 0; background: linear-gradient(112deg, transparent 30%, oklch(1 0 0 / 0.16) 44%, oklch(1 0 0 / 0.03) 52%, transparent 60%); pointer-events: none; }

.face { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; font-weight: 800; background: linear-gradient(160deg, color-mix(in oklch, var(--c) 30%, var(--face)) 0%, var(--face) 58%); box-shadow: inset 0 0 0 max(1.5px, 2.6cqw) var(--c); border-radius: inherit; }
.face .n1, .face .n2 { position: absolute; font-family: var(--display); font-weight: 700; font-size: calc(44cqw * var(--nz)); line-height: 0.8; color: var(--c); direction: ltr; }
.face .n1 { top: 7cqw; left: 9cqw; }
.face .n2 { bottom: 7cqw; right: 9cqw; } /* upright on purpose: a turned 6 reads as a 9 */
.face .ch { width: 94cqw; aspect-ratio: 1; display: grid; place-items: center; margin-top: 4cqw; background: radial-gradient(closest-side, color-mix(in oklch, var(--c) 52%, transparent), transparent); }
.face .ch svg { width: 90%; display: block; }
.v0 { --c: oklch(0.93 0.2 108); }
.v1 { --c: oklch(0.87 0.14 200); }
.v2 { --c: oklch(0.9 0.12 185); }
.v3 { --c: oklch(0.9 0.17 95); }
.v4 { --c: oklch(0.82 0.16 65); }
.v5 { --c: oklch(0.8 0.13 235); }
.v6 { --c: oklch(0.72 0.17 262); }
.v7 { --c: oklch(0.74 0.19 40); }
.v8 { --c: oklch(0.7 0.22 28); }
.v9 { --c: oklch(0.65 0.24 20); }
.face.rat { background: linear-gradient(160deg, color-mix(in oklch, var(--c) 46%, var(--face)) 0%, var(--face-rat) 62%); }
.face.pw { gap: 3cqw; color: var(--c); background: linear-gradient(160deg, color-mix(in oklch, var(--c) 42%, var(--face)) 0%, var(--face) 70%); }
.face.pw .ch { width: 60cqw; margin-top: 0; background: none; }
.face.pw .ch svg { width: 100%; }
.face svg, .burst svg { direction: ltr; } /* keeps the "+2" on the Draw 2 icon from flipping in Hebrew */
.face.pw .lbl { font-size: 15cqw; line-height: 1.1; text-align: center; padding-inline: 4cqw; color: var(--fg); }
.pw.peek { --c: var(--pw-peek); }
.pw.swap { --c: var(--pw-swap); }
.pw.draw2 { --c: var(--pw-draw2); }
@container (max-width: 46px) {
  .face .ch, .face .n2, .face .lbl { display: none; }
  .face .n1 { position: static; font-size: calc(96cqw * var(--nz)); }
  .face.pw .ch { display: grid; width: 74cqw; }
}

.card.can { cursor: pointer; outline: 2px solid var(--acid); outline-offset: 3px; animation: pulse 1.3s var(--ease-out) infinite; }
.card.can:hover { transform: translateY(-6%); }
.card.sel { outline: 2px solid var(--ok); outline-offset: 3px; transform: translateY(-10%); animation: none; }
.card.peeking { transform: translateY(-14%) scale(1.06); z-index: 2; }
.card.peeking::after { content: ''; position: absolute; top: -20%; left: 50%; width: 46cqw; height: 6cqw; translate: -50% 0; background: var(--cyan); clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%); }
.ghost { visibility: hidden; }
.card.flash { animation: flash 0.9s var(--ease-out); }

/* ---------- table ---------- */
.table { max-width: 980px; display: flex; flex-direction: column; gap: var(--s2); padding: 0 var(--s3); min-height: calc(var(--vh) * 100 - 52px); }
.notice { align-self: center; padding: 6px var(--s4); background: var(--hot); color: var(--on-hot); font-size: 14px; font-weight: 700; text-align: center; --cut: 7px; clip-path: var(--chamfer); }

.opponents { display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start; gap: var(--s2); --seat-w: min(44vw, 190px, calc(var(--vh) * 26)); }
.opponents[data-n='3'], .opponents[data-n='5'] { --seat-w: min(calc((100vw - 42px) / 3), 170px, calc(var(--vh) * 24)); }
.opponents[data-n='3'] .seat-head .av, .opponents[data-n='5'] .seat-head .av { width: 24px; }
.seat { position: relative; flex: 0 1 var(--seat-w); max-width: var(--seat-w); min-width: 0; padding: 6px 6px 9px; border-radius: var(--r-md); background: color-mix(in oklch, var(--panel) 72%, transparent); border: 1px solid color-mix(in oklch, var(--line) 50%, transparent); transition: background-color var(--base), border-color var(--base), box-shadow var(--base), opacity var(--base); }
.seat.turn { border-color: var(--cyan-t); background: color-mix(in oklch, var(--cyan) 20%, var(--panel)); box-shadow: 0 6px 22px color-mix(in oklch, var(--cyan) 28%, transparent); }
.seat.won { border-color: var(--acid-t); background: color-mix(in oklch, var(--acid) 24%, var(--panel)); box-shadow: 0 6px 22px color-mix(in oklch, var(--acid) 30%, transparent); }
.seat.off { opacity: 0.5; }
.seat.hit { animation: shake 0.45s var(--ease-out); }
.seat-head { position: relative; display: flex; align-items: center; gap: 6px; width: 100%; min-height: 30px; margin-bottom: 4px; text-align: start; border-radius: var(--r-sm); }
.seat-head::after { content: ''; position: absolute; inset: -7px; }
.seat-head .av { width: 28px; flex: none; }
.seat-head .nm { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-head .st { font-size: 12px; font-weight: 700; color: var(--acid-t); white-space: nowrap; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; direction: ltr; }
.heldspot { position: absolute; bottom: -8px; inset-inline-end: -8px; width: 23%; display: grid; pointer-events: none; rotate: 9deg; z-index: 2; }
.heldspot .card { grid-area: 1 / 1; }
.heldspot .card + .card { translate: -30% 12%; }
.sumtag { position: absolute; bottom: -12px; inset-inline-start: 50%; translate: -50% 0; z-index: 3; min-width: 38px; padding: 0 10px 2px; background: var(--acid); color: var(--on-acid); font-family: var(--display); font-size: calc(26px * var(--dz)); line-height: 1; font-weight: 700; text-align: center; --cut: 6px; clip-path: var(--chamfer); }
[dir='rtl'] .sumtag { translate: 50% 0; }
.calltag { position: absolute; top: -10px; inset-inline-start: -4px; font-size: 20px; line-height: 1; z-index: 2; }

.center { display: flex; justify-content: center; align-items: flex-start; gap: var(--s6); margin-block: auto; padding-block: var(--s3); }
.pile { position: relative; display: grid; justify-items: center; gap: 6px; border-radius: var(--r-md); }
.pile-slot { position: relative; display: block; width: var(--pw); aspect-ratio: 5 / 7; border-radius: var(--r-card); transition: transform var(--base) var(--ease-out); }
.pile-slot .card { position: absolute; inset: 0; }
.pile-slot.empty { border: 1px dashed var(--line); background: color-mix(in oklch, var(--void) 50%, transparent); transform: perspective(600px) rotateX(var(--tilt)); }
.pile-slot.stack::before { content: ''; position: absolute; inset: 0; translate: 0 7px; transform: perspective(600px) rotateX(var(--tilt)); border-radius: inherit; background: var(--panel); box-shadow: 0 -2px 0 var(--acid-dk), 0 -4px 0 var(--panel-2), 0 5px 12px var(--shade); }
.pile-n { position: absolute; top: -8px; inset-inline-end: -12px; z-index: 2; min-width: 28px; height: 24px; padding: 0 6px 2px; display: grid; place-items: center; background: var(--cyan); color: var(--on-cyan); font-family: var(--display); font-size: calc(22px * var(--dz)); line-height: 1; font-weight: 700; --cut: 5px; clip-path: var(--chamfer); }
.pile-l { font-size: 12px; font-weight: 700; color: var(--mute); }
.pile.can .pile-slot { outline: 2px solid var(--acid); outline-offset: 4px; animation: pulse 1.3s var(--ease-out) infinite; }
.pile.can:hover .pile-slot { transform: translateY(-4%); }
.pile:disabled { cursor: default; }
.pile.shuffling .pile-slot { animation: shake 0.5s var(--ease-out); }

.tray { min-height: calc(var(--cw) * 1.26 + 10px); display: flex; align-items: center; justify-content: center; gap: var(--s3); text-align: center; }
.tray-text { display: grid; gap: 2px; max-width: 32ch; }
.tray-text b { font-size: 20px; line-height: 1.25; font-weight: 800; text-wrap: balance; }
.tray-text span { font-size: 14px; line-height: 1.35; color: var(--mute); text-wrap: balance; }
.tray-text.me b { color: var(--acid-t); }
.peekbox { display: flex; align-items: center; justify-content: center; gap: var(--s3); }
.peekbox b { font-size: 20px; line-height: 1.25; font-weight: 800; color: var(--cyan-t); text-wrap: balance; }
.tray .held { display: flex; gap: var(--s2); flex: none; }
.tray .held .card { width: calc(var(--cw) * 0.9); }
.tray-side { display: grid; gap: var(--s2); justify-items: stretch; min-width: 0; }
.tray-side .hint { font-size: 14px; line-height: 1.35; color: var(--mute); max-width: 20ch; text-wrap: balance; }
.tray-side .hint b { display: block; color: var(--fg); font-size: 16px; }
.count { font-family: var(--display); font-size: calc(72px * var(--dz)); font-weight: 700; line-height: 0.8; color: var(--cyan-t); font-variant-numeric: tabular-nums; min-width: 1.2ch; text-shadow: 2px 0 0 var(--gl-a); }
.callbox { display: grid; gap: var(--s2); justify-items: center; }
.callbox-btns { display: flex; gap: var(--s3); align-items: center; }
.timer { display: block; width: 100%; height: 4px; background: var(--void); overflow: hidden; }
.timer i { display: block; height: 100%; background: var(--acid); transform-origin: 0 50%; transform: scaleX(var(--p, 1)); }
[dir='rtl'] .timer i { transform-origin: 100% 50%; }

.mine-wrap { position: relative; align-self: center; padding: var(--s2) var(--s3) var(--s3); border-radius: var(--r-md); border: 1px solid transparent; transition: background-color var(--base), border-color var(--base), box-shadow var(--base); }
.mine-wrap.turn { border-color: var(--cyan-t); background: color-mix(in oklch, var(--cyan) 20%, var(--panel)); box-shadow: 0 8px 26px color-mix(in oklch, var(--cyan) 28%, transparent); }
.mine-wrap.turn:has(.card.can) { border-color: transparent; background: none; box-shadow: none; }
.mine-wrap.won { border-color: var(--acid-t); background: color-mix(in oklch, var(--acid) 24%, var(--panel)); box-shadow: 0 8px 26px color-mix(in oklch, var(--acid) 30%, transparent); }
.mine-wrap.hit { animation: shake 0.45s var(--ease-out); }
.mine { display: flex; justify-content: center; gap: var(--s3); direction: ltr; }
.mine .card { width: var(--cw); flex: none; }
.watching { align-self: center; padding: var(--s4); color: var(--mute); text-align: center; font-weight: 500; }

.mebar { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-top: var(--s2); padding-bottom: max(var(--s2), env(safe-area-inset-bottom)); }
.me-id { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.me-id .av { width: 40px; flex: none; }
.me-id .st { font-size: 14px; font-weight: 700; color: var(--acid-t); white-space: nowrap; }
.reacts { display: flex; gap: 0; }
.react { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-sm); font-size: 24px; line-height: 1; transition: transform var(--fast) var(--ease-out), background-color var(--fast); }
.react:hover { background: var(--hover); }
.react:active { transform: scale(0.82); }
.react .rx { width: 34px; height: 34px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3)); transition: transform var(--fast) var(--ease-out); pointer-events: none; user-select: none; }
.react:hover .rx { transform: translateY(-2px) scale(1.08); }
.react-say { color: var(--mute); }
.react-say svg { width: 28px; height: 28px; }
.bubble .rx { display: block; width: 1.4em; height: 1.4em; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35)); }

/* ---------- results sheet ---------- */
.sheet { position: fixed; inset-inline: 0; bottom: 0; z-index: var(--z-sheet); max-height: calc(var(--vh) * 84); overflow-y: auto; padding: var(--s5) var(--s4) max(var(--s4), env(safe-area-inset-bottom)); background: var(--night); border-top: 2px solid var(--cyan); box-shadow: 0 -14px 40px var(--shade); animation: sheet-in var(--slow) var(--ease-out); }
.sheet-in { max-width: 560px; margin-inline: auto; display: grid; gap: var(--s4); }
.sheet h2 { font-family: var(--display); font-size: calc(46px * var(--dz)); line-height: 0.95; font-weight: 700; letter-spacing: 0.01em; color: var(--acid-t); text-wrap: balance; }
.sheet .sub { color: var(--mute); font-size: 14px; font-weight: 500; }
.rlist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.rrow { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); border-radius: var(--r-md); background: var(--panel); border: 1px solid color-mix(in oklch, var(--line) 50%, transparent); }
.rrow.win { background: color-mix(in oklch, var(--acid) 24%, var(--panel)); border-color: var(--acid-t); }
.rrow .who { min-width: 0; display: grid; }
.rrow .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rrow .meta { font-size: 13px; color: var(--mute); white-space: nowrap; }
.rrow .rc { display: grid; grid-template-columns: repeat(4, 26px); gap: 3px; direction: ltr; --tilt: 0deg; }
.rrow .sum { min-width: 2ch; font-family: var(--display); font-size: calc(40px * var(--dz)); font-weight: 700; line-height: 0.8; text-align: center; font-variant-numeric: tabular-nums; }
.rrow.win .sum { color: var(--acid-t); }
.rrow .rav { position: relative; }
.rrow .medal { position: absolute; top: -9px; inset-inline-start: -9px; font-size: 21px; font-style: normal; line-height: 1; }
.sheet-acts { display: grid; gap: var(--s3); }
.note { font-size: 14px; color: var(--mute); }

/* ---------- popover, dialog, toasts ---------- */
.pop { position: fixed; z-index: var(--z-pop); display: flex; flex-wrap: wrap; gap: 4px; max-width: min(92vw, 320px); padding: var(--s2); border-radius: var(--r-md); background: var(--panel-2); border: 1px solid var(--cyan); color: var(--fg); box-shadow: 0 10px 28px var(--shade); animation: pop-in var(--fast) var(--ease-out); }
.pop .say { min-height: 44px; padding: 8px 14px; border-radius: var(--r-sm); background: var(--night); font-weight: 700; font-size: 15px; }
.pop .say:hover { background: var(--cyan); color: var(--on-cyan); }
.pop-title { flex: 1 0 100%; padding: 2px 6px; font-size: 13px; font-weight: 700; color: var(--mute); }

.dlg { width: min(92vw, 480px); max-height: 86vh; padding: var(--s5); border: 1px solid var(--cyan); border-radius: var(--r-md); background: var(--night); color: var(--fg); box-shadow: 0 20px 60px var(--shade); }
.dlg::backdrop { background: var(--scrim); }
.dlg h2 { margin-bottom: var(--s4); font-family: var(--display); font-size: calc(44px * var(--dz)); line-height: 0.95; font-weight: 700; color: var(--acid-t); }
.set { display: grid; gap: var(--s3); margin-bottom: var(--s5); }
.set-h { font-size: 13px; font-weight: 700; color: var(--cyan-t); padding-bottom: var(--s2); border-bottom: 1px solid var(--line); }
.dlg .seg button { font-size: 14px; padding-inline: var(--s2); }
.dlg .seg button:disabled[aria-pressed='true'] { background: var(--panel-2); color: var(--fg); }
.rules { list-style: none; margin: 0 0 var(--s5); padding: 0; display: grid; gap: var(--s3); }
.rules li { display: grid; grid-template-columns: 32px 1fr; gap: var(--s2); }
.rules .ico { font-size: 22px; line-height: 1.3; }

.toasts { position: fixed; top: calc(var(--vh) * 31); inset-inline: 0; z-index: var(--z-toast); display: grid; justify-items: center; gap: 6px; padding-inline: var(--s4); pointer-events: none; }
.toast { max-width: 100%; padding: 9px 20px 11px; background: var(--toast-bg); color: var(--toast-fg); font-size: 15px; font-weight: 700; text-align: center; --cut: 8px; clip-path: var(--chamfer); animation: toast-in var(--base) var(--ease-out); }
.toast.bad { background: var(--hot); color: var(--on-hot); }
.toast.out { opacity: 0; transition: opacity var(--base); }

/* ---------- effects layer ---------- */
.fx { position: fixed; inset: 0; z-index: var(--z-fx); pointer-events: none; overflow: hidden; }
.card.fly { position: absolute; margin: 0; will-change: transform; }
.bubble { position: absolute; font-size: 36px; line-height: 1; will-change: transform, opacity; }
.say-bubble { position: absolute; padding: 5px 14px 7px; background: var(--cyan); color: var(--on-cyan); font-size: 15px; font-weight: 700; white-space: nowrap; --cut: 7px; clip-path: var(--chamfer); }
.banner { position: absolute; inset: 0; display: grid; place-items: center; color: var(--on-scrim); background: var(--scrim); }
.banner-in { display: grid; gap: var(--s3); justify-items: center; text-align: center; padding: var(--s4); }
.banner-in .av { width: 112px; }
.banner-in b { font-family: var(--display); font-size: calc(clamp(72px, 24vw, 96px) * var(--dz)); font-weight: 700; line-height: 0.85; letter-spacing: 0.01em; color: var(--pop); text-shadow: 4px 0 0 var(--gl-a), -4px 0 0 var(--gl-b); animation: glitch 0.7s steps(2, end) 2; }
.banner-in span { font-size: 20px; font-weight: 700; }
.burst { position: absolute; display: grid; place-items: center; width: 120px; height: 120px; color: var(--on-pw); --cut: 26px; clip-path: var(--chamfer); }
.burst svg { width: 66%; }
.confetti { position: absolute; width: 12px; height: 5px; will-change: transform, opacity; }

/* ---------- motion ---------- */
@keyframes pulse { 0%, 100% { outline-color: var(--acid-t); } 50% { outline-color: color-mix(in oklch, var(--acid) 25%, transparent); } }
@keyframes flash { 0%, 60% { outline: 3px solid var(--ok); outline-offset: 3px; } 100% { outline: 3px solid transparent; outline-offset: 3px; } }
@keyframes shake { 0%, 100% { translate: 0 0; } 20% { translate: -5px 0; } 40% { translate: 5px 0; } 60% { translate: -3px 0; } 80% { translate: 3px 0; } }
@keyframes glitch { 0% { text-shadow: -7px 0 0 var(--gl-a), 7px 0 0 var(--gl-b); translate: 3px 0; } 50% { text-shadow: 6px 0 0 var(--gl-a), -6px 0 0 var(--gl-b); translate: -3px 0; } 100% { text-shadow: 4px 0 0 var(--gl-a), -4px 0 0 var(--gl-b); translate: 0 0; } }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.94); } }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }

/* ---------- TV mode: the whole table on one big screen ---------- */
.tv-on, .tv-on body { height: 100%; overflow: hidden; }
.tv { display: grid; grid-template-rows: auto auto 1fr; gap: 2vh; height: calc(var(--vh) * 100); padding: 3vh 3vw; }
.tv-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2vw; }
.tv-logo .logo-cat { width: 7vh; }
.tv-logo .logo-word { font-size: calc(8vh * var(--dz)); text-shadow: none; }
.tv-join { display: flex; align-items: baseline; gap: 1.2vw; font-size: 2.6vh; color: var(--mute); }
.tv-join .code { font-size: calc(8vh * var(--dz)); line-height: 1; padding: 0; text-shadow: none; }
.tv-url { direction: ltr; color: var(--fg); font-weight: 700; }
.tv-round { justify-self: end; font-size: 2.8vh; font-weight: 700; color: var(--mute); }
.tv-status { min-height: 6vh; text-align: center; font-size: 4.4vh; line-height: 1.2; font-weight: 800; text-wrap: balance; }
.tv-flash { color: var(--acid-t); }
.tv-main { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3vw; min-height: 0; }
.tv-seats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2vh 1.6vw; align-content: center; }
.tv-seats[data-n='2'], .tv-seats[data-n='4'] { grid-template-columns: repeat(2, 1fr); }
.tv-seat { position: relative; display: grid; gap: 1vh; padding: 1.6vh 1.2vw 2vh; background: color-mix(in oklch, var(--panel) 80%, transparent); border: 2px solid color-mix(in oklch, var(--line) 50%, transparent); border-radius: var(--r-md); transition: border-color var(--base), background-color var(--base); }
.tv-seat.turn { border-color: var(--cyan); background: color-mix(in oklch, var(--cyan) 20%, var(--panel)); }
.tv-seat.won { border-color: var(--acid); background: color-mix(in oklch, var(--acid) 24%, var(--panel)); }
.tv-seat.off { opacity: 0.5; }
.tv-who { display: flex; align-items: center; gap: 1vw; min-width: 0; }
.tv-who .av { width: 6vh; flex: none; }
.tv-who .nm { flex: 1; min-width: 0; font-size: 3.2vh; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-who .st { font-size: 2.8vh; font-weight: 700; color: var(--acid-t); white-space: nowrap; }
.tv-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8vw; direction: ltr; max-width: 44vh; }
.tv-sum { position: absolute; top: 1.2vh; inset-inline-end: 1vw; min-width: 6vh; padding: 0 1vh; background: var(--acid); color: var(--on-acid); font-family: var(--display); font-size: calc(5.4vh * var(--dz)); line-height: 1.15; font-weight: 700; text-align: center; border-radius: var(--r-tag); }
.tv-seat.won .tv-who .st { display: none; }
.tv-seat:has(.tv-sum) .tv-who .st { display: none; }
.tv-piles { display: flex; gap: 2vw; }
.tv-pile { display: grid; justify-items: center; gap: 1vh; width: 16vh; font-size: 2.2vh; font-weight: 700; color: var(--mute); }
.tv-empty { width: 100%; aspect-ratio: 5 / 7; border: 2px dashed var(--line); border-radius: var(--r-card); }
@media (orientation: portrait) {
  .tv-main { grid-template-columns: 1fr; }
  .tv-piles { justify-content: center; }
  .tv-seats, .tv-seats[data-n='2'], .tv-seats[data-n='4'] { grid-template-columns: repeat(2, 1fr); }
  .tv-top { grid-template-columns: 1fr; justify-items: center; }
  .tv-round { justify-self: center; }
}

/* ---------- family league ---------- */
.lg-open { justify-content: space-between; text-align: start; }
.lg-open b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-open span { flex: none; font-size: 13px; font-weight: 500; color: var(--mute); }
.lg-code { display: flex; align-items: center; gap: var(--s3); }
.lg-code .chip { direction: ltr; letter-spacing: 0.08em; }
.lg-code .btn { margin-inline-start: auto; }
.lg-table { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.lg-row { display: grid; grid-template-columns: 28px 40px 1fr auto; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); background: var(--panel-2); border: 1px solid transparent; border-radius: var(--r-md); }
.lg-row.me { border-color: var(--acid); }
.lg-pos { font-family: var(--display); font-size: calc(26px * var(--dz) + 4px); font-weight: 700; text-align: center; color: var(--mute); }
.lg-who { display: grid; min-width: 0; }
.lg-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-who span { font-size: 13px; color: var(--mute); }
.lg-pts { font-size: 13px; color: var(--mute); white-space: nowrap; }
.lg-pts b { font-family: var(--display); font-size: calc(34px * var(--dz) + 4px); line-height: 1; color: var(--acid-t); }
.lg-games { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); font-size: 14px; }
.lg-games li { display: grid; gap: 2px; }
.lg-games span { font-size: 13px; color: var(--mute); }
.lg-games b { font-weight: 500; }
.lg-badge { display: grid; gap: var(--s1); justify-items: center; padding: var(--s3); text-align: center; font-size: 14px; background: color-mix(in srgb, var(--acid) 12%, var(--panel)); border: 1px solid var(--acid); border-radius: var(--r-md); } /* srgb: an oklch mix of two far-apart hues passes through green or purple */
.lg-badge span { color: var(--mute); }

/* ---------- coins and the shop ---------- */
.coin { display: inline-block; width: 0.95em; height: 0.95em; vertical-align: -0.12em; border-radius: 50%; background: radial-gradient(circle at 35% 30%, oklch(0.95 0.12 96), oklch(0.84 0.17 88) 55%, oklch(0.72 0.16 78)); box-shadow: inset 0 0 0 0.09em oklch(0.6 0.14 72), inset 0 0 0 0.2em oklch(0.9 0.15 92); }
.coin-gain { justify-self: center; padding: var(--s1) var(--s4); font-size: 15px; background: color-mix(in srgb, var(--acid) 16%, var(--panel)); border: 1px solid var(--acid); border-radius: 999px; }
.coin-gain b { font-size: 18px; }
.shop-purse { display: flex; align-items: baseline; justify-content: center; gap: var(--s2); padding: var(--s3); background: var(--panel-2); border-radius: var(--r-md); color: var(--mute); }
.shop-purse b { font-family: var(--display); font-size: calc(44px * var(--dz) + 6px); line-height: 1; color: var(--fg); }
.shop-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.shop-card { display: grid; justify-items: center; gap: var(--s2); padding: var(--s3) var(--s2); background: var(--panel-2); border-radius: var(--r-md); }
.shop-av { width: 56px; }
.shop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.shop-row { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); background: var(--panel-2); border-radius: var(--r-md); }
.shop-emoji { font-size: 26px; line-height: 1; text-align: center; }
.shop-own { font-size: 14px; font-weight: 700; color: var(--mute); white-space: nowrap; }
.shop-card .btn, .shop-row .btn { min-width: 84px; white-space: nowrap; }
.shop-row .btn[aria-pressed='true'] { background: var(--acid); color: var(--on-acid); }
.rain { position: absolute; line-height: 1; font-style: normal; will-change: transform; }
.spark { position: absolute; width: 8px; height: 8px; border-radius: 50%; will-change: transform, opacity; }

/* ---------- big screen waiting to be paired ---------- */
.tv-pair { display: grid; grid-template-columns: auto 1fr; align-items: center; justify-content: center; gap: 6vw; min-height: 0; padding: 2vh 4vw; grid-row: span 2; }
.tv-qr { width: min(46vh, 34vw); padding: 1.6vh; background: #fff; border-radius: var(--r-md); }
.tv-qr svg { display: block; width: 100%; }
.tv-pair-t { display: grid; gap: 2vh; justify-items: start; max-width: 46vw; }
.tv-pair-h { font-size: 4.6vh; line-height: 1.2; font-weight: 800; text-wrap: balance; }
.tv-pair-or { font-size: 2.8vh; line-height: 1.4; color: var(--mute); text-wrap: balance; }
.tv-digits { display: flex; gap: 1.4vw; direction: ltr; }
.tv-digits b { display: grid; place-items: center; width: 11vh; height: 14vh; font-family: var(--display); font-size: calc(13vh * var(--dz) + 2vh); line-height: 1; background: var(--panel); border: 2px solid var(--line); border-radius: var(--r-md); color: var(--acid-t); }
.tv-pair .tv-url { font-size: 2.6vh; color: var(--mute); }
.tv-screen { display: block; font-size: 2vh; font-weight: 500; }
.tv-addr { font-size: 20px; font-weight: 800; text-align: center; padding: var(--s3); background: var(--panel-2); border-radius: var(--r-md); overflow-wrap: anywhere; }
@media (orientation: portrait) {
  .tv-pair { grid-template-columns: 1fr; justify-items: center; }
  .tv-pair-t { justify-items: center; text-align: center; max-width: 90vw; }
}

/* ---------- Korean: its letters come from css/fonts-ko.css (Jua), a wide face that needs room ---------- */
html:lang(ko) { --dz: 0.62; word-break: keep-all; }
html:lang(ko) :is(.logo-word, .code, .count, .sheet h2, .dlg h2, .rrow .sum, .banner-in b, .chip, .sumtag, .pile-n, .tv-status, .tv-pair-h) { line-height: 1.2; }
html:lang(ko) :is(.sheet h2, .dlg h2, .banner-in b) { letter-spacing: 0; font-weight: 800; }

/* ---------- the "versus" screen and the knockout ---------- */
.vs { position: absolute; inset: 0; overflow: hidden; background: var(--void); }
.vs-half { position: absolute; inset: 0; display: grid; place-items: center; }
.vs-half::before { content: ''; position: absolute; inset: -40%; background: repeating-conic-gradient(from 0deg at 50% 50%, oklch(1 0 0 / 0.09) 0 6deg, transparent 6deg 12deg); }
.vs-them { clip-path: polygon(0 0, 100% 0, 100% 43%, 0 57%); padding-bottom: 50vh; background: radial-gradient(circle at 50% 30%, var(--hot), var(--hot-dk)); color: var(--on-hot); }
.vs-me { clip-path: polygon(0 57%, 100% 43%, 100% 100%, 0 100%); padding-top: 52vh; background: radial-gradient(circle at 50% 74%, var(--cyan), var(--cyan-dk)); color: var(--on-cyan); }
.vs-row { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 18px; max-width: 92vw; }
.vs-who { display: grid; justify-items: center; gap: 8px; width: 104px; }
.vs-who .av { width: 96px; border: 4px solid currentColor; }
.vs-who b { max-width: 100%; padding: 2px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; background: oklch(0 0 0 / 0.35); color: #fff; border-radius: 999px; }
.vs-row[data-n='4'] .vs-who, .vs-row[data-n='5'] .vs-who { width: 78px; }
.vs-row[data-n='4'] .av, .vs-row[data-n='5'] .av { width: 66px; }
.vs-me .vs-who { width: 150px; }
.vs-me .av { width: 132px; }
.vs-me .vs-who b { font-size: 21px; }
.vs-bolt { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 0 8px var(--acid)); }
.vs-bolt polyline { fill: none; stroke: var(--acid); stroke-width: 9; stroke-linejoin: miter; vector-effect: non-scaling-stroke; }
.vs-badge { position: absolute; top: 50%; left: 50%; font-family: var(--display); font-size: calc(132px * var(--dz) + 22px); line-height: 0.8; font-weight: 800; font-style: italic; color: var(--acid);
  -webkit-text-stroke: 3px var(--void); paint-order: stroke fill; text-shadow: 0 6px 0 var(--void), 0 0 26px oklch(0 0 0 / 0.5); }
.seat.ko, .mine-wrap.ko, .tv-seat.ko { filter: saturate(0.6) brightness(0.9); transition: filter 0.5s; }
@keyframes dizzy { to { transform: rotate(360deg); } }

/* ---------- finishing moves ---------- */
.flash { position: absolute; inset: 0; background: #fff; pointer-events: none; }
.seat.frozen, .mine-wrap.frozen, .tv-seat.frozen { filter: saturate(0.4) brightness(1.1) hue-rotate(170deg); outline: 3px solid oklch(0.85 0.08 230); }
.seat.spun, .mine-wrap.spun, .tv-seat.spun { animation: spun 0.7s var(--ease-out); }
@keyframes spun { from { rotate: 0deg; scale: 1; } 50% { scale: 0.8; } to { rotate: 720deg; scale: 1; } }

/* ---------- choosing and performing the finish ---------- */
.fin-pick { position: fixed; inset: 0; z-index: var(--z-toast); display: grid; align-items: end; background: var(--scrim); }
.fin-in { display: grid; gap: var(--s3); padding: var(--s4) var(--s4) var(--s5); background: var(--panel); border-top: 3px solid var(--acid); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.fin-in h2 { text-align: center; font-family: var(--display); font-size: calc(46px * var(--dz) + 6px); line-height: 1; color: var(--acid-t); }
.fin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.fin-btn { display: grid; justify-items: center; gap: 4px; min-height: 92px; padding: var(--s3) var(--s1); background: var(--panel-2); border: 2px solid var(--line); border-radius: var(--r-md); color: var(--fg); transition: transform var(--fast) var(--ease-out), border-color var(--fast); }
.fin-btn:hover, .fin-btn:active { transform: translateY(-3px) scale(1.04); border-color: var(--acid); }
.fin-btn span { font-size: 38px; line-height: 1; }
.fin-btn .coin { font-size: 34px; }
.fin-btn b { font-size: 14px; }
.fin-bar { display: block; height: 6px; border-radius: 6px; background: var(--acid); transform-origin: inline-start; animation: fin-bar 6s linear both; }
@keyframes fin-bar { to { transform: scaleX(0); } }
.fin-wait { position: fixed; inset: auto var(--s4) 22vh var(--s4); z-index: var(--z-toast); padding: var(--s3) var(--s4); text-align: center; font-weight: 700; background: var(--panel); border: 2px solid var(--acid); border-radius: var(--r-md); animation: pop-in var(--base) var(--ease-out); }
.spot { position: absolute; top: 44%; left: 50%; display: grid; justify-items: center; gap: 8px; }
.spot .av { width: 132px; box-shadow: 0 0 0 5px var(--acid), 0 0 44px var(--acid); }
.spot b { padding: 2px 14px; font-size: 20px; background: var(--acid); color: var(--on-acid); border-radius: 999px; }
.pow { position: absolute; display: grid; place-items: center; width: 150px; height: 150px; font-family: var(--display); font-size: calc(46px * var(--dz) + 8px); font-style: italic; color: var(--hot); background: var(--acid);
  -webkit-text-stroke: 1.5px var(--void); clip-path: polygon(50% 0, 61% 22%, 85% 10%, 79% 35%, 100% 44%, 81% 58%, 93% 82%, 68% 76%, 60% 100%, 46% 80%, 26% 96%, 27% 70%, 2% 68%, 19% 50%, 0 30%, 26% 28%, 26% 4%, 42% 20%); }
.seat.out { transform: translate(0, -160%) rotate(38deg); opacity: 0; transition: transform 0.5s cubic-bezier(0.3, 0, 0.9, 0.5), opacity 0.5s; }
.tv-seat.out { transform: translateY(-130%) rotate(24deg); opacity: 0; transition: transform 0.6s cubic-bezier(0.3, 0, 0.9, 0.5), opacity 0.6s; }
.tv-on .spot .av { width: 24vh; }
.tv-on .spot b { font-size: 4vh; padding: 0.4vh 2vw; }
.tv-on .pow { width: 26vh; height: 26vh; font-size: 9vh; }
.tv-on .bubble { font-size: 8vh; }
.mine-wrap.out { transform: translate(0, 60%) rotate(-12deg); opacity: 0.35; transition: transform 0.5s, opacity 0.5s; }
.seat.splat::before, .mine-wrap.splat::before, .tv-seat.splat::before { content: ''; position: absolute; inset: -6px; z-index: 2; border-radius: 46% 54% 40% 60% / 55% 42% 58% 45%; background: radial-gradient(circle at 40% 40%, oklch(0.62 0.22 28 / 0.9), oklch(0.5 0.2 27 / 0.82)); pointer-events: none; }

.seat.droop .av, .mine-wrap.droop .av, .tv-seat.droop .av { filter: grayscale(0.7); }
.seat.zapped .av, .mine-wrap.zapped .av, .tv-seat.zapped .av { filter: sepia(0.8) brightness(0.65) contrast(1.2); }
.seat.tilted .av, .mine-wrap.tilted .av, .tv-seat.tilted .av { rotate: 8deg; }
.piece { position: absolute; pointer-events: none; will-change: transform; }
.piece .it { width: 100%; height: 100%; }
.crack { position: absolute; inset: 0; pointer-events: none; }
.shard { position: absolute; background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(200, 225, 255, 0.35)); pointer-events: none; }
.stuck { position: absolute; display: grid; place-items: center; pointer-events: none; }
.stuck .it { width: 100%; height: 100%; }
.seat.wet, .mine-wrap.wet, .tv-seat.wet { filter: saturate(0.7) hue-rotate(160deg) brightness(0.95); }
.seat.egged::before, .mine-wrap.egged::before, .tv-seat.egged::before { content: '🍳'; position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; font-size: 44px; pointer-events: none; }
.seat.stink::before, .mine-wrap.stink::before, .tv-seat.stink::before { content: '〰️〰️'; position: absolute; top: -18px; inset-inline: 0; z-index: 2; text-align: center; font-size: 20px; letter-spacing: 4px; filter: sepia(1) saturate(3) hue-rotate(10deg); animation: stink 0.8s ease-in-out infinite alternate; pointer-events: none; }
@keyframes stink { from { transform: translateY(0); opacity: 0.9; } to { transform: translateY(-8px); opacity: 0.4; } }

/* ---------- the guide cat ---------- */
.coach { position: fixed; inset-inline: var(--s2); top: 56px; z-index: var(--z-pop); display: flex; align-items: flex-end; gap: var(--s2); max-width: 520px; margin-inline: auto; pointer-events: none; animation: coach-in var(--slow) var(--ease-out) both; }
.coach-cat { flex: none; width: 84px; height: 84px; object-fit: contain; object-position: bottom; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4)); }
.coach-bub { flex: 1; min-width: 0; padding: var(--s3) var(--s4); background: var(--panel); color: var(--fg); border: 2px solid var(--acid); border-radius: var(--r-lg); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); pointer-events: auto; }
.coach-bub p { margin: 0; font-size: 15px; line-height: 1.45; font-weight: 500; }
.coach-bub .link { margin-top: var(--s1); padding: var(--s1) 0; font-size: 12px; color: var(--mute); }
.coach-hand { position: fixed; z-index: var(--z-pop); width: 44px; pointer-events: none; filter: drop-shadow(0 0 1px rgba(40, 20, 0, 0.9)) drop-shadow(0 4px 5px rgba(0, 0, 0, 0.5)); animation: coach-bob 0.7s ease-in-out infinite alternate; }
.coach-hand img { display: block; width: 100%; height: auto; }
.coach-hand.down img { transform: rotate(180deg); }
.coach-hello { display: grid; justify-items: center; gap: var(--s2); text-align: center; }
.coach-hello img { width: min(46vw, 190px); height: auto; }
.daily-line { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s1) var(--s3); margin: 0; font-size: 14px; color: var(--mute); text-align: center; }
.daily-line b { color: var(--fg); }
@keyframes coach-in { from { opacity: 0; transform: translateY(-10px); } }
@keyframes coach-bob { from { transform: translateY(0); } to { transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .coach, .coach-hand { animation: none; } }

/* ---------- the table background from the shop: behind the lobby and the table, veiled in the style's own colour ---------- */
html[data-bg]:is([data-screen='table'], [data-screen='lobby']) body {
  background: linear-gradient(color-mix(in srgb, var(--void) var(--bg-veil, 30%), transparent), color-mix(in srgb, var(--void) var(--bg-veil, 30%), transparent)), var(--table-bg) center / cover no-repeat fixed, var(--void);
}
.shop-bgs .shop-card { padding: var(--s2); }
.shop-bgs .shop-card b { font-size: 13px; font-weight: 600; text-align: center; line-height: 1.25; }
.shop-bg { display: block; width: 100%; aspect-ratio: 9 / 14; overflow: hidden; border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--line); }
.shop-bg img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- drawn items ---------- */
.it { display: block; width: 1.25em; height: 1.25em; object-fit: contain; pointer-events: none; user-select: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3)); }
.shop-emoji .it { width: 36px; height: 36px; }
.shop-emoji { display: grid; place-items: center; }
.react .it { width: 32px; height: 32px; }
.fin-btn .it { width: 52px; height: 52px; margin-inline: auto; }
.rain .it { width: 1em; height: 1em; }
.shop-row:has(.shop-try) { grid-template-columns: 36px 1fr auto auto; }
.shop-try { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 var(--s2); border-radius: var(--r-sm); color: var(--mute); font-size: 13px; font-weight: 600; }
.shop-try svg { width: 16px; height: 16px; }
.shop-try:hover { color: var(--fg); background: var(--hover); }
.fin-demo { position: fixed; inset: 0; z-index: calc(var(--z-fx) - 1); display: flex; justify-content: center; align-items: flex-start; gap: 18vw; padding-top: 16vh; background: var(--void); }
.demo-seat { position: relative; width: 84px; padding: 6px; background: var(--panel); border-radius: var(--r-md); }
.demo-me { position: absolute; bottom: 14vh; left: 50%; translate: -50% 0; }

.pop-safety { display: flex; gap: var(--s2); width: 100%; padding-top: var(--s2); margin-top: var(--s1); border-top: 1px solid var(--line); }
.pop-safety .say { flex: 1; min-height: 44px; font-size: 13px; }

/* ---------- the opening screen ---------- */
#splash { position: fixed; inset: 0; z-index: 999; display: grid; align-content: end; justify-items: center; gap: 14px; padding: 0 24px max(40px, env(safe-area-inset-bottom)); background: #0b1433 url(../art/splash.webp) center / cover no-repeat; transition: opacity 0.45s ease, visibility 0.45s; }
#splash::before { content: ''; position: absolute; inset: 55% 0 0 0; background: linear-gradient(180deg, transparent, rgba(8, 13, 34, 0.9) 60%); }
#splash.gone { opacity: 0; visibility: hidden; }
#splash b { position: relative; font: 700 clamp(64px, 22vw, 104px)/0.85 'Karantina', 'Rubik', sans-serif; letter-spacing: 1px; color: #fff6df; direction: ltr; -webkit-text-stroke: 3px #101b3d; paint-order: stroke fill; text-shadow: 0 6px 0 #101b3d, 0 0 30px rgba(0, 0, 0, 0.6); animation: splash-in 0.7s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
#splash b i { font-style: normal; color: #ff8a1f; }
#splash span { position: relative; width: min(220px, 60vw); height: 14px; border: 3px solid #101b3d; border-radius: 999px; background: #fff6df; overflow: hidden; }
#splash span::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #ff8a1f, #ffc93c); transform-origin: left; animation: splash-bar 1.9s cubic-bezier(0.3, 0, 0.4, 1) both; }
@keyframes splash-in { from { transform: scale(2.4) rotate(-6deg); opacity: 0; } }
@keyframes splash-bar { from { transform: scaleX(0.05); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { #splash b, #splash span::after { animation: none; } }

/* ---------- shapes that follow the skin ---------- */
.chip, .notice, .sumtag, .pile-n, .toast, .say-bubble, .burst { border-radius: var(--r-tag); }

/* ---------- style picker (first run) ---------- */
.wiz { display: grid; gap: var(--s5); padding-top: var(--s4); }
.wiz-title { font-size: 24px; line-height: 1.25; font-weight: 800; text-wrap: balance; }
.wiz-sub { color: var(--mute); margin-top: var(--s1); }
.wiz-cards { display: flex; justify-content: center; gap: var(--s3); direction: ltr; padding-block: var(--s2) var(--s3); }
.wiz-cards .card { width: min(21vw, 96px); flex: none; }
.skins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.skin-pick { display: grid; gap: var(--s2); padding: var(--s2); text-align: start; background: var(--panel); border: 2px solid color-mix(in oklch, var(--line) 60%, transparent); border-radius: var(--r-md); transition: transform var(--fast) var(--ease-out), border-color var(--fast); }
.skin-pick:hover { transform: translateY(-2px); }
.skin-pick[aria-checked='true'] { border-color: var(--acid); box-shadow: 0 0 0 2px var(--acid); }
.skin-prev { display: flex; align-items: center; justify-content: center; gap: 6%; aspect-ratio: 16 / 9; border-radius: var(--r-sm); overflow: hidden; }
.skin-prev svg { display: block; width: 40%; }
.skin-name { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding-inline: var(--s1); font-weight: 800; font-size: 17px; }
.skin-name i { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); }
.skin-pick[aria-checked='true'] .skin-name i { border-color: var(--acid); background: radial-gradient(circle, var(--acid) 0 45%, transparent 50%); }
.skin-desc { padding-inline: var(--s1); padding-bottom: var(--s1); font-size: 13px; line-height: 1.35; color: var(--mute); }

.legal { display: flex; flex-wrap: wrap; justify-content: center; column-gap: var(--s4); padding-top: var(--s4); border-top: 1px solid color-mix(in oklch, var(--line) 50%, transparent); }
.legal a { display: inline-flex; align-items: center; min-height: 44px; color: var(--mute); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.legal a:hover { color: var(--fg); }
.dlg .seg.wrap { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); }
.dlg .seg.pair { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); }
.worlds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) var(--s3); }
.world { display: grid; grid-template-rows: auto 1fr; gap: var(--s2); min-width: 0; }
.world.wide { grid-column: 1 / -1; }
.world:not(.wide) .skins { grid-template-columns: minmax(0, 1fr); }
.world-h { margin: 0; font-size: 14px; font-weight: 700; color: var(--mute); }
.world-more { grid-column: 1 / -1; }
.world-more.cell { grid-column: auto; display: grid; place-items: center; padding: var(--s3); text-align: center; border: 2px dashed color-mix(in srgb, var(--line) 70%, transparent); border-radius: var(--r-md); }
.skin-prev img { display: block; width: 40%; aspect-ratio: 1; object-fit: cover; border-radius: 14%; }
.av img.pic { display: block; width: 100%; height: 100%; object-fit: cover; }
.logo-cat img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 18%; }
.face .ch img.pic { display: block; width: 100%; height: 100%; object-fit: cover; }

/* =====================================================================
   toon: warm paper daylight, round soft shapes, three-tone characters
   ===================================================================== */
[data-skin='toon'] {
  --void: oklch(0.955 0.03 88);
  --night: oklch(0.985 0.012 88);
  --panel: oklch(0.995 0.006 88);
  --panel-2: oklch(0.925 0.04 232);
  --line: oklch(0.78 0.055 240);
  --mute: oklch(0.45 0.05 258);
  --fg: oklch(0.27 0.07 262);
  --acid: oklch(0.79 0.165 64);
  --acid-dk: oklch(0.6 0.16 50);
  --acid-t: oklch(0.5 0.16 45);
  --on-acid: oklch(0.24 0.07 262);
  --cyan: oklch(0.55 0.15 248);
  --cyan-dk: oklch(0.42 0.13 252);
  --cyan-t: oklch(0.46 0.15 252);
  --on-cyan: oklch(0.99 0.005 250);
  --hot: oklch(0.57 0.22 27);
  --hot-dk: oklch(0.43 0.18 27);
  --ok: oklch(0.55 0.15 248);
  --err: oklch(0.5 0.2 27);
  --shade: oklch(0.3 0.07 262 / 0.22);
  --hover: oklch(0.3 0.07 262 / 0.08);
  --scrim: oklch(0.2 0.06 262 / 0.8);
  --pop: oklch(0.88 0.17 85);
  --glow-a: oklch(0.86 0.09 230 / 0.85);
  --glow-b: oklch(0.9 0.11 80 / 0.85);
  --gl-a: transparent;
  --gl-b: transparent;
  --toast-bg: oklch(0.27 0.07 262);
  --toast-fg: oklch(0.99 0.005 250);
  --soft-dk: oklch(0.82 0.05 236);
  --face: oklch(0.99 0.01 88);
  --edge-1: oklch(0.87 0.03 88);
  --edge-2: oklch(0.74 0.045 80);
  --back-bg: oklch(0.55 0.15 248);
  --back-img: radial-gradient(circle at 30% 22%, oklch(0.68 0.13 240), oklch(0.5 0.15 252));
  --back-edge: oklch(0.99 0.005 88);
  --back-fg: oklch(0.99 0.005 88 / 0.92);
  --pw-peek: oklch(0.74 0.12 235);
  --pw-swap: oklch(0.78 0.16 58);
  --pw-draw2: oklch(0.87 0.16 92);
  --on-pw: oklch(0.24 0.07 262);
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-card: 12% / 8.6%;
  --r-btn: 999px;
  --r-tag: 999px;
  --r-av: 50%;
  --chamfer: none;
  --av-clip: none;
  --display: 'Fredoka', 'Rubik', system-ui, sans-serif;
  --dz: 0.6;
  --nz: 0.76;
  --tilt: 7deg;
}
[data-skin='toon'] .v0 { --c: oklch(0.8 0.16 92); }
[data-skin='toon'] .v1 { --c: oklch(0.72 0.12 228); }
[data-skin='toon'] .v2 { --c: oklch(0.74 0.11 202); }
[data-skin='toon'] .v3 { --c: oklch(0.78 0.15 76); }
[data-skin='toon'] .v4 { --c: oklch(0.72 0.17 56); }
[data-skin='toon'] .v5 { --c: oklch(0.62 0.15 250); }
[data-skin='toon'] .v6 { --c: oklch(0.5 0.14 262); }
[data-skin='toon'] .v7 { --c: oklch(0.66 0.19 36); }
[data-skin='toon'] .v8 { --c: oklch(0.6 0.21 28); }
[data-skin='toon'] .v9 { --c: oklch(0.52 0.2 22); }
[data-skin='toon'] .face, [data-skin='toon'] .face.rat { background: radial-gradient(circle at 50% 46%, var(--face) 0 22%, color-mix(in oklch, var(--c) 34%, var(--face)) 78%); box-shadow: inset 0 0 0 max(2px, 4cqw) var(--c), inset 0 0 0 max(3px, 5.4cqw) var(--face); }
[data-skin='toon'] .face .n1, [data-skin='toon'] .face .n2 { color: color-mix(in oklch, var(--c) 60%, black); line-height: 1; }
[data-skin='toon'] .face .n1 { top: 7cqw; left: 11cqw; }
[data-skin='toon'] .face .n2 { bottom: 7cqw; right: 11cqw; }
[data-skin='toon'] .face .ch { background: none; width: 82cqw; }
[data-skin='toon'] .face.pw { color: var(--fg); background: color-mix(in oklch, var(--c) 62%, var(--face)); }
[data-skin='toon'] .face.pw .lbl { color: var(--fg); }
[data-skin='toon'] .card-f::after { background: linear-gradient(112deg, transparent 30%, oklch(1 0 0 / 0.5) 44%, oklch(1 0 0 / 0.1) 52%, transparent 60%); }
[data-skin='toon'] .av { background: color-mix(in oklch, var(--av-c) 30%, var(--panel)); box-shadow: inset 0 0 0 2px var(--av-c); }
[data-skin='toon'] .btn { font-family: var(--display); font-weight: 600; font-size: 18px; }
[data-skin='toon'] .btn-sm { font-size: 16px; }

/* =====================================================================
   flat: cut paper. no light, no depth, one hard offset for shadow
   ===================================================================== */
[data-skin='flat'] {
  --void: oklch(0.965 0.008 250);
  --night: oklch(0.99 0.004 250);
  --panel: oklch(0.995 0.003 250);
  --panel-2: oklch(0.93 0.016 250);
  --line: oklch(0.24 0.06 262);
  --mute: oklch(0.42 0.04 260);
  --fg: oklch(0.24 0.06 262);
  --acid: oklch(0.88 0.17 96);
  --acid-dk: oklch(0.24 0.06 262);
  --acid-t: oklch(0.44 0.18 260);
  --on-acid: oklch(0.24 0.06 262);
  --cyan: oklch(0.5 0.18 260);
  --cyan-dk: oklch(0.24 0.06 262);
  --cyan-t: oklch(0.44 0.18 260);
  --on-cyan: oklch(0.99 0.004 250);
  --hot: oklch(0.57 0.22 27);
  --hot-dk: oklch(0.24 0.06 262);
  --ok: oklch(0.5 0.18 260);
  --err: oklch(0.5 0.2 27);
  --shade: oklch(0.24 0.06 262 / 0.18);
  --hover: oklch(0.24 0.06 262 / 0.08);
  --scrim: oklch(0.2 0.06 262 / 0.82);
  --pop: oklch(0.88 0.17 96);
  --glow-a: transparent;
  --glow-b: transparent;
  --gl-a: transparent;
  --gl-b: transparent;
  --toast-bg: oklch(0.24 0.06 262);
  --toast-fg: oklch(0.99 0.004 250);
  --soft-dk: oklch(0.24 0.06 262);
  --face: oklch(0.995 0.003 250);
  --back-bg: oklch(0.24 0.06 262);
  --back-img: none;
  --back-edge: oklch(0.24 0.06 262);
  --back-fg: oklch(0.88 0.17 96);
  --pw-peek: oklch(0.82 0.1 222);
  --pw-swap: oklch(0.8 0.15 60);
  --pw-draw2: oklch(0.88 0.17 96);
  --on-pw: oklch(0.24 0.06 262);
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-card: 9% / 6.4%;
  --r-btn: 10px;
  --r-tag: 6px;
  --r-av: 26%;
  --chamfer: none;
  --av-clip: none;
  --display: 'Rubik', system-ui, sans-serif;
  --dz: 0.58;
  --nz: 0.78;
  --tilt: 0deg;
}
[data-skin='flat'] .v0 { --c: oklch(0.9 0.16 98); }
[data-skin='flat'] .v1 { --c: oklch(0.84 0.1 222); }
[data-skin='flat'] .v2 { --c: oklch(0.87 0.09 196); }
[data-skin='flat'] .v3 { --c: oklch(0.87 0.14 80); }
[data-skin='flat'] .v4 { --c: oklch(0.82 0.15 60); }
[data-skin='flat'] .v5 { --c: oklch(0.76 0.12 246); }
[data-skin='flat'] .v6 { --c: oklch(0.7 0.13 262); }
[data-skin='flat'] .v7 { --c: oklch(0.78 0.15 40); }
[data-skin='flat'] .v8 { --c: oklch(0.72 0.18 28); }
[data-skin='flat'] .v9 { --c: oklch(0.66 0.2 22); }
[data-skin='flat'] .card-b, [data-skin='flat'] .card-f { box-shadow: max(2px, 3.6cqw) max(2px, 3.6cqw) 0 var(--fg); }
[data-skin='flat'] .card-b { background: var(--back-bg); }
[data-skin='flat'] .card-f::after { display: none; }
[data-skin='flat'] .face, [data-skin='flat'] .face.rat, [data-skin='flat'] .face.pw { background: var(--c); box-shadow: inset 0 0 0 max(1.5px, 2.4cqw) var(--fg); color: var(--fg); }
[data-skin='flat'] .face .n1, [data-skin='flat'] .face .n2 { color: var(--fg); font-weight: 800; line-height: 1; }
[data-skin='flat'] .face .ch { background: none; width: 80cqw; }
[data-skin='flat'] .face.pw .lbl { color: var(--fg); }
[data-skin='flat'] .btn-primary, [data-skin='flat'] .btn-call, [data-skin='flat'] .btn-soft, [data-skin='flat'] .btn-wa { box-shadow: inset 0 0 0 2px var(--fg), inset 0 -5px 0 var(--fg); }
[data-skin='flat'] .btn:active:not(:disabled) { box-shadow: inset 0 0 0 2px var(--fg); }
[data-skin='flat'] .btn { font-weight: 800; }
[data-skin='flat'] .av { background: color-mix(in oklch, var(--av-c) 26%, var(--panel)); box-shadow: inset 0 0 0 2px var(--fg); }
[data-skin='flat'] .join-box, [data-skin='flat'] .code-box, [data-skin='flat'] .prow, [data-skin='flat'] .rrow, [data-skin='flat'] .skin-pick { border: 2px solid var(--fg); }
[data-skin='flat'] .seat { border-width: 2px; }
[data-skin='flat'] .sheet, [data-skin='flat'] .dlg, [data-skin='flat'] .pop { border-color: var(--fg); border-width: 2px; }
[data-skin='flat'] .pile-slot.stack::before { box-shadow: none; background: var(--fg); translate: 5px 5px; transform: none; }

/* =====================================================================
   pixel: arcade cabinet. square everything, stepped corners, sprites
   ===================================================================== */
[data-skin='pixel'] {
  --void: oklch(0.17 0.035 262);
  --night: oklch(0.2 0.04 262);
  --panel: oklch(0.24 0.045 262);
  --panel-2: oklch(0.3 0.05 260);
  --line: oklch(0.52 0.06 255);
  --mute: oklch(0.8 0.03 255);
  --fg: oklch(0.96 0.01 255);
  --acid: oklch(0.87 0.17 92);
  --acid-dk: oklch(0.6 0.14 78);
  --on-acid: oklch(0.15 0.03 262);
  --cyan: oklch(0.82 0.12 222);
  --cyan-dk: oklch(0.5 0.1 232);
  --on-cyan: oklch(0.15 0.03 262);
  --ok: oklch(0.96 0.01 255);
  --scrim: oklch(0.1 0.03 262 / 0.84);
  --glow-a: transparent;
  --glow-b: transparent;
  --gl-a: transparent;
  --gl-b: transparent;
  --face: oklch(0.15 0.03 262);
  --face-rat: oklch(0.17 0.06 22);
  --edge-1: oklch(0.1 0.02 262);
  --edge-2: oklch(0.1 0.02 262);
  --back-img: repeating-conic-gradient(var(--panel-2) 0 25%, var(--panel) 0 50%) 0 0 / 25% 17.86%;
  --pw-peek: oklch(0.82 0.12 222);
  --pw-draw2: oklch(0.87 0.17 92);
  --r-sm: 0px;
  --r-md: 0px;
  --r-lg: 0px;
  --r-card: 0px;
  --cut: 4px;
  --chamfer: polygon(0 var(--cut), var(--cut) var(--cut), var(--cut) 0, calc(100% - var(--cut)) 0, calc(100% - var(--cut)) var(--cut), 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, var(--cut) calc(100% - var(--cut)), 0 calc(100% - var(--cut)));
  --av-clip: polygon(0 12%, 12% 12%, 12% 0, 88% 0, 88% 12%, 100% 12%, 100% 88%, 88% 88%, 88% 100%, 12% 100%, 12% 88%, 0 88%);
  --display: 'Handjet', 'Rubik', system-ui, monospace;
  --dz: 0.95;
  --nz: 1.05;
  --tilt: 0deg;
}
[data-skin='pixel'] body { background: linear-gradient(oklch(1 0 0 / 0.035) 2px, transparent 2px) 0 0 / 100% 16px, linear-gradient(90deg, oklch(1 0 0 / 0.035) 2px, transparent 2px) 0 0 / 16px 100%, var(--void); background-attachment: fixed; }
[data-skin='pixel'] .chip, [data-skin='pixel'] .sumtag, [data-skin='pixel'] .pile-n, [data-skin='pixel'] .btn-sm, [data-skin='pixel'] .toast, [data-skin='pixel'] .say-bubble, [data-skin='pixel'] .notice { --cut: 3px; }
[data-skin='pixel'] .card-b, [data-skin='pixel'] .card-f { box-shadow: max(2px, 4cqw) max(2px, 4cqw) 0 oklch(0 0 0 / 0.55); }
[data-skin='pixel'] .card-f::after { display: none; }
[data-skin='pixel'] .face, [data-skin='pixel'] .face.rat { background: var(--face); box-shadow: inset 0 0 0 max(2px, 3.4cqw) var(--c), inset 0 0 0 max(3px, 5.6cqw) var(--face), inset 0 0 0 max(4px, 7cqw) color-mix(in oklch, var(--c) 45%, var(--face)); }
[data-skin='pixel'] .face.rat { background: var(--face-rat); }
[data-skin='pixel'] .face.pw { background: color-mix(in oklch, var(--c) 22%, var(--face)); }
[data-skin='pixel'] .face .ch { background: none; width: 88cqw; margin-top: 12cqw; }
[data-skin='pixel'] .face.pw .ch { width: 60cqw; margin-top: 0; }
[data-skin='pixel'] .face .n1 { top: 8cqw; left: 12cqw; }
[data-skin='pixel'] .face .n2 { bottom: 8cqw; right: 12cqw; }
[data-skin='pixel'] .logo-word { text-shadow: 4px 4px 0 var(--hot); letter-spacing: 0.04em; }
[data-skin='pixel'] .code { text-shadow: 4px 4px 0 var(--hot-dk); }
[data-skin='pixel'] .banner-in b { text-shadow: 5px 5px 0 var(--hot); animation: none; }
[data-skin='pixel'] .btn { font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: 0.03em; padding-bottom: 14px; }
[data-skin='pixel'] .btn-sm { font-size: 20px; }
[data-skin='pixel'] .av { background: var(--panel-2); box-shadow: none; }
[data-skin='pixel'] .skin-pick[aria-checked='true'] { box-shadow: none; outline: 4px solid var(--acid); outline-offset: 0; }

/* =====================================================================
   gross: back-alley grime. mustard and rust on dark brown, picture cards
   ===================================================================== */
[data-skin='gross'] {
  --void: oklch(0.19 0.03 72);
  --night: oklch(0.225 0.035 72);
  --panel: oklch(0.265 0.04 74);
  --panel-2: oklch(0.33 0.05 76);
  --line: oklch(0.46 0.035 78);
  --mute: oklch(0.82 0.05 88);
  --fg: oklch(0.95 0.035 92);
  --acid: oklch(0.8 0.16 86);
  --acid-dk: oklch(0.56 0.12 76);
  --on-acid: oklch(0.2 0.04 62);
  --cyan: oklch(0.86 0.04 88);
  --cyan-dk: oklch(0.5 0.04 80);
  --on-cyan: oklch(0.2 0.04 62);
  --hot: oklch(0.55 0.2 30);
  --hot-dk: oklch(0.38 0.15 30);
  --ok: oklch(0.95 0.035 92);
  --scrim: oklch(0.12 0.03 70 / 0.84);
  --glow-a: oklch(0.5 0.08 86 / 0.14);
  --glow-b: oklch(0.4 0.08 45 / 0.14);
  --gl-a: transparent;
  --gl-b: transparent;
  --face: oklch(0.2 0.035 72);
  --face-rat: oklch(0.2 0.035 72);
  --edge-1: oklch(0.42 0.06 76);
  --edge-2: oklch(0.14 0.03 70);
  --back-img: repeating-linear-gradient(135deg, oklch(0.33 0.06 76) 0 9%, oklch(0.28 0.05 74) 9% 18%);
  --pw-peek: oklch(0.86 0.1 92);
  --pw-swap: oklch(0.74 0.13 56);
  --pw-draw2: oklch(0.8 0.16 86);
  --on-pw: oklch(0.2 0.04 62);
  --r-sm: 5px;
  --r-md: 9px;
  --r-lg: 12px;
  --r-card: 7% / 5%;
  --r-btn: 7px;
  --r-tag: 5px;
  --r-av: 20%;
  --chamfer: none;
  --av-clip: none;
  --tilt: 5deg;
  --acid-t: oklch(0.9 0.07 90);
  --cyan-t: oklch(0.86 0.04 88);
  --back-edge: oklch(0.44 0.04 78);
  --back-fg: oklch(0.6 0.05 82);
  --back-img: repeating-linear-gradient(135deg, oklch(0.29 0.03 76) 0 9%, oklch(0.255 0.028 74) 9% 18%);
}
[data-skin='gross'] .v0, [data-skin='gross'] .v1, [data-skin='gross'] .v2, [data-skin='gross'] .v3, [data-skin='gross'] .v4, [data-skin='gross'] .v5, [data-skin='gross'] .v6 { --c: oklch(0.82 0.12 88); }
[data-skin='gross'] .v7, [data-skin='gross'] .v8, [data-skin='gross'] .v9 { --c: oklch(0.68 0.2 36); }
[data-skin='gross'] .face, [data-skin='gross'] .face.rat { background: var(--face); box-shadow: inset 0 0 0 max(2px, 3cqw) var(--c); }
:is([data-skin='gross'], [data-skin='human'], [data-skin='bugs']) .face .ch { width: 100cqw; margin-top: 0; background: none; padding: max(2px, 3cqw); }
:is([data-skin='gross'], [data-skin='human'], [data-skin='bugs']) .face .ch img.pic { border-radius: 4%; }
:is([data-skin='gross'], [data-skin='human'], [data-skin='bugs']) .face .n1, :is([data-skin='gross'], [data-skin='human'], [data-skin='bugs']) .face .n2 { z-index: 1; min-width: 30cqw; padding: 0 5cqw 3cqw; background: var(--face); color: var(--c); text-align: center; font-size: calc(40cqw * var(--nz)); }
:is([data-skin='gross'], [data-skin='human'], [data-skin='bugs']) .face .n1 { top: 0; left: 0; border-end-end-radius: 16cqw; box-shadow: inset 0 0 0 max(2px, 3cqw) var(--c); }
:is([data-skin='gross'], [data-skin='human'], [data-skin='bugs']) .face .n2 { bottom: 0; right: 0; border-start-start-radius: 16cqw; box-shadow: inset 0 0 0 max(2px, 3cqw) var(--c); }
[data-skin='gross'] .face.pw { background: color-mix(in oklch, var(--c) 26%, var(--face)); }
:is([data-skin='gross'], [data-skin='human'], [data-skin='bugs']) .face.pw .ch { width: 60cqw; padding: 0; }
:is([data-skin='gross'], [data-skin='human']) .card-f::after { background: linear-gradient(112deg, transparent 30%, oklch(1 0 0 / 0.1) 44%, transparent 58%); }
[data-skin='gross'] .av { background: var(--panel-2); box-shadow: none; outline: 2px solid var(--line); outline-offset: -2px; }
[data-skin='gross'] .seat.turn, [data-skin='gross'] .mine-wrap.turn { border-color: var(--acid); background: color-mix(in oklch, var(--acid) 10%, var(--panel)); box-shadow: none; }
[data-skin='gross'] .logo-word { text-shadow: 4px 4px 0 oklch(0.14 0.03 70); }
@container (max-width: 46px) {
  :is([data-skin='gross'], [data-skin='human'], [data-skin='bugs']) .face .n1 { background: none; box-shadow: none; padding: 0; min-width: 0; font-size: calc(96cqw * var(--nz)); }
}

/* =====================================================================
   human: a costume party in a photo studio. navy stage, instant-photo cards,
   stage-curtain card backs
   ===================================================================== */
[data-skin='human'] {
  --void: oklch(0.185 0.06 264);
  --night: oklch(0.22 0.07 264);
  --panel: oklch(0.265 0.078 264);
  --panel-2: oklch(0.325 0.085 264);
  --line: oklch(0.5 0.075 262);
  --mute: oklch(0.85 0.03 262);
  --fg: oklch(0.975 0.008 90);
  --acid: oklch(0.76 0.165 58);
  --acid-dk: oklch(0.56 0.15 50);
  --acid-t: oklch(0.83 0.13 65);
  --on-acid: oklch(0.18 0.06 264);
  --cyan: oklch(0.94 0.035 90);
  --cyan-dk: oklch(0.62 0.04 85);
  --cyan-t: oklch(0.94 0.035 90);
  --on-cyan: oklch(0.2 0.07 264);
  --hot: oklch(0.56 0.21 27);
  --hot-dk: oklch(0.4 0.16 27);
  --ok: oklch(0.94 0.035 90);
  --scrim: oklch(0.1 0.05 264 / 0.84);
  --glow-a: oklch(0.42 0.13 262 / 0.5);
  --glow-b: oklch(0.45 0.13 50 / 0.16);
  --gl-a: transparent;
  --gl-b: transparent;
  --face: oklch(0.975 0.008 90);
  --face-rat: oklch(0.975 0.008 90);
  --edge-1: oklch(0.8 0.015 90);
  --edge-2: oklch(0.5 0.04 264);
  --back-bg: oklch(0.4 0.15 27);
  --back-img: repeating-linear-gradient(90deg, oklch(0.43 0.16 27) 0 7%, oklch(0.35 0.14 27) 7% 14%);
  --back-edge: oklch(0.94 0.035 90);
  --back-fg: oklch(0.94 0.035 90);
  --pw-peek: oklch(0.86 0.09 235);
  --pw-swap: oklch(0.87 0.14 88);
  --pw-draw2: oklch(0.72 0.19 42);
  --on-pw: oklch(0.18 0.06 264);
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-card: 6% / 4.3%;
  --r-btn: 10px;
  --r-tag: 6px;
  --r-av: 50%;
  --chamfer: none;
  --av-clip: none;
  --tilt: 5deg;
}
[data-skin='human'] .v0, [data-skin='human'] .v1, [data-skin='human'] .v2, [data-skin='human'] .v3, [data-skin='human'] .v4, [data-skin='human'] .v5, [data-skin='human'] .v6 { --c: oklch(0.4 0.15 262); }
[data-skin='human'] .v7, [data-skin='human'] .v8, [data-skin='human'] .v9 { --c: oklch(0.52 0.21 27); }
/* a number card is an instant photo: white paper all round, the number printed on it */
[data-skin='human'] .face, [data-skin='human'] .face.rat { background: var(--face); box-shadow: none; }
[data-skin='human'] .face .n1, [data-skin='human'] .face .n2 { box-shadow: none; }
[data-skin='human'] .face .ch img.pic { border-radius: 2%; }
/* power cards stay dark so they never read as a photo */
[data-skin='human'] .face.pw { --face: oklch(0.22 0.07 264); background: var(--face); box-shadow: inset 0 0 0 max(2px, 3cqw) var(--c); } /* no tint: red mixed into navy turns purple */
[data-skin='human'] .av { background: var(--panel-2); box-shadow: none; outline: 2px solid var(--cyan); outline-offset: -2px; }
[data-skin='human'] .seat.turn, [data-skin='human'] .mine-wrap.turn { border-color: var(--acid); background: color-mix(in srgb, var(--acid) 12%, var(--panel)); box-shadow: none; }
[data-skin='human'] .logo-cat img { border-radius: 50%; }
[data-skin='human'] .logo-word { text-shadow: 3px 3px 0 oklch(0.12 0.05 264); }

/* =====================================================================
   bugs: a summer morning. pale sky, white cards, ladybird red and bee yellow.
   the pests keep their own night: dark cards on a light table
   ===================================================================== */
[data-skin='bugs'] {
  --void: oklch(0.93 0.045 232);
  --night: oklch(0.965 0.025 232);
  --panel: oklch(0.995 0.005 232);
  --panel-2: oklch(0.9 0.05 232);
  --line: oklch(0.76 0.07 238);
  --mute: oklch(0.44 0.06 255);
  --fg: oklch(0.26 0.07 258);
  --acid: oklch(0.87 0.17 95);
  --acid-dk: oklch(0.68 0.15 85);
  --acid-t: oklch(0.45 0.15 250);
  --on-acid: oklch(0.24 0.07 258);
  --cyan: oklch(0.56 0.16 245);
  --cyan-dk: oklch(0.43 0.14 250);
  --cyan-t: oklch(0.47 0.16 250);
  --on-cyan: oklch(0.99 0.005 250);
  --hot: oklch(0.58 0.22 27);
  --hot-dk: oklch(0.44 0.18 27);
  --ok: oklch(0.5 0.16 248);
  --err: oklch(0.5 0.2 27);
  --shade: oklch(0.3 0.08 255 / 0.22);
  --hover: oklch(0.3 0.08 255 / 0.08);
  --scrim: oklch(0.22 0.07 255 / 0.8);
  --pop: oklch(0.87 0.17 95);
  --glow-a: oklch(0.99 0.01 230 / 0.9);
  --glow-b: oklch(0.99 0.01 230 / 0.6); /* white, not sun yellow: yellow light on sky blue turns green */
  --gl-a: transparent;
  --gl-b: transparent;
  --toast-bg: oklch(0.26 0.07 258);
  --toast-fg: oklch(0.99 0.005 250);
  --soft-dk: oklch(0.8 0.06 236);
  --face: oklch(0.99 0.008 95);
  --face-rat: oklch(0.2 0.06 262);
  --edge-1: oklch(0.86 0.03 232);
  --edge-2: oklch(0.7 0.05 240);
  --back-bg: oklch(0.58 0.22 27);
  --back-img: radial-gradient(circle at 30% 22%, oklch(0.67 0.2 30), oklch(0.52 0.21 27));
  --back-edge: oklch(0.99 0.008 95);
  --back-fg: oklch(0.2 0.04 262);
  --pw-peek: oklch(0.7 0.14 245);
  --pw-swap: oklch(0.78 0.16 58);
  --pw-draw2: oklch(0.88 0.17 96);
  --on-pw: oklch(0.24 0.07 258);
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-card: 10% / 7.2%;
  --r-btn: 999px;
  --r-tag: 999px;
  --r-av: 50%;
  --chamfer: none;
  --av-clip: none;
  --display: 'Fredoka', 'Rubik', system-ui, sans-serif;
  --dz: 0.6;
  --nz: 0.76;
  --tilt: 6deg;
}
[data-skin='bugs'] .v0, [data-skin='bugs'] .v1, [data-skin='bugs'] .v2, [data-skin='bugs'] .v3, [data-skin='bugs'] .v4, [data-skin='bugs'] .v5, [data-skin='bugs'] .v6 { --c: oklch(0.52 0.16 245); }
[data-skin='bugs'] .face { background: var(--face); box-shadow: inset 0 0 0 max(2px, 3cqw) var(--c); }
/* a pest card is dark all through, so it reads as bad news from across the table */
[data-skin='bugs'] .face.rat { --face: oklch(0.2 0.06 262); --c: oklch(0.72 0.19 32); background: var(--face); }
[data-skin='bugs'] .face .n1, [data-skin='bugs'] .face .n2 { line-height: 1; padding: 2cqw 5cqw 3cqw; }
[data-skin='bugs'] .face.pw { --face: white; color: var(--fg); background: color-mix(in oklch, var(--c) 50%, white); box-shadow: inset 0 0 0 max(2px, 3cqw) var(--c); } /* mixed with pure white only: blue into cream, or yellow into navy, comes out green */
[data-skin='bugs'] .face.pw .lbl { color: var(--fg); }
[data-skin='bugs'] .card-f::after { background: linear-gradient(112deg, transparent 30%, oklch(1 0 0 / 0.35) 44%, oklch(1 0 0 / 0.08) 52%, transparent 60%); }
[data-skin='bugs'] .av { background: var(--panel-2); box-shadow: none; outline: 2px solid var(--line); outline-offset: -2px; }
[data-skin='bugs'] .logo-cat img { border-radius: 50%; }
[data-skin='bugs'] .btn { font-family: var(--display); font-weight: 600; font-size: 18px; }
[data-skin='bugs'] .btn-sm { font-size: 16px; }

/* wide display faces sit on a normal line box */
:is([data-skin='toon'], [data-skin='flat'], [data-skin='bugs']) :is(.logo-word, .code, .count, .sheet h2, .dlg h2, .rrow .sum, .banner-in b, .chip, .sumtag, .pile-n) { line-height: 1.05; }
:is([data-skin='toon'], [data-skin='flat'], [data-skin='bugs']) .logo-word { font-weight: 700; letter-spacing: -0.02em; }
[data-skin='flat'] .logo-word, [data-skin='flat'] .code, [data-skin='flat'] .sheet h2, [data-skin='flat'] .dlg h2, [data-skin='flat'] .banner-in b { font-weight: 800; letter-spacing: -0.03em; }
:is([data-skin='toon'], [data-skin='flat'], [data-skin='bugs']) .code { letter-spacing: 0.08em; }
:is([data-skin='toon'], [data-skin='flat'], [data-skin='bugs']) .sumtag { padding: 2px 10px; }
:is([data-skin='toon'], [data-skin='flat'], [data-skin='bugs']) .pile-n { padding: 0 7px; }

@media (min-width: 760px) {
  .table { gap: var(--s4); padding-inline: var(--s5); }
  .opponents { gap: var(--s4); --seat-w: min(22vw, 190px, calc(var(--vh) * 26)); }
  .opponents[data-n='3'], .opponents[data-n='5'] { --seat-w: min(18vw, 170px, calc(var(--vh) * 24)); }
  .seat { padding: var(--s2) var(--s2) var(--s3); }
  .seat-head .av { width: 32px; }
  .seat-head .nm { font-size: 14px; }
  .home { padding-top: var(--s7); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
