@font-face {
  font-family: Bricolage;
  src: url(fonts/bricolage-display.woff2) format('woff2');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: DM;
  src: url(fonts/dm-sans.woff2) format('woff2');
  font-weight: 100 1000;
  font-display: swap;
}
:root {
  --cream: #fff0cd;
  --gold: #ffcd63;
  --ink: #192c25;
  --muted: #bfd2ba;
  --felt: #123e34;
  --edge: #ae9254;
  --display: Bricolage, 'Arial Black', sans-serif;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html,
body {
  min-height: 100%;
  margin: 0;
}
body {
  font:
    500 16px/1.45 DM,
    system-ui,
    sans-serif;
  background: #123c33;
  color: var(--cream);
  isolation: isolate;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -3;
  background: radial-gradient(ellipse at 74% 42%, #346752 0%, #204e40 34%, #11392f 72%, #092b26 100%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image: url(art/grain.png);
  opacity: 0.2;
  mix-blend-mode: soft-light;
}
button,
a,
input,
select,
summary {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  font: inherit;
}
button:disabled {
  cursor: default;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #ffd467;
  outline-offset: 5px;
}
dialog :focus-visible {
  outline-color: #88511b;
}
button {
  color: inherit;
}
.symbols,
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.icon,
.tool svg {
  width: 1.22em;
  height: 1.22em;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linejoin: round;
  stroke-linecap: round;
  fill: none;
  flex: none;
}
.topbar {
  max-width: 1510px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(17px, 3.6vh, 38px) clamp(20px, 4.2vw, 76px) 0;
  position: relative;
  z-index: 2;
}
.brand,
.tools,
.actions,
.entry-actions,
.home-meta,
.turn-line,
.board-head,
.hand-heading,
.lobby-foot,
.seat,
.qr,
.code-row {
  display: flex;
  align-items: center;
}
.brand {
  font: 800 19px var(--display);
  gap: 8px;
  text-decoration: none;
  letter-spacing: -0.055em;
}
.brand img {
  object-fit: contain;
  filter: drop-shadow(0 2px 0 #0c3025);
}
.tools {
  gap: 9px;
}
.tool {
  border: 1px solid #c3c39b77;
  border-radius: 50%;
  background: #11372f;
  width: 43px;
  height: 43px;
  display: inline-grid;
  place-items: center;
  color: var(--cream);
}
.tool:hover,
.ghost-btn:hover {
  background: #355a47;
}
.tool svg {
  width: 21px;
  height: 21px;
}
.home {
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - 83px);
  display: grid;
  align-content: center;
  overflow: hidden;
  padding: 35px 5% 65px;
}
.home:after {
  position: absolute;
  inset: 13% -14% -58%;
  border: 2px solid #d3b87829;
  border-radius: 50%;
  outline: 1px dashed #d1bd8959;
  outline-offset: -11px;
  box-shadow: 0 0 0 10px #132f2447;
  content: '';
  z-index: -1;
  transform: rotate(-8deg);
  pointer-events: none;
}
.home-inner {
  width: min(1160px, 100%);
  margin: auto;
  display: grid;
  grid-template-columns: 0.96fr 1.04fr;
  grid-template-rows: auto auto;
  align-items: center;
  position: relative;
}
.intro {
  padding-left: clamp(0px, 2vw, 35px);
  align-self: end;
  position: relative;
  z-index: 1;
}
.suits {
  display: block;
  font:
    22px Georgia,
    serif;
  letter-spacing: 0.28em;
  color: #e1c987;
  transform: rotate(-4deg);
  width: max-content;
  margin: 0 0 12px 5px;
}
.suits i {
  font-style: normal;
  color: #ed9276;
}
.logo {
  font: 800 clamp(100px, 10vw, 152px) / 0.76 var(--display);
  letter-spacing: -0.089em;
  text-transform: uppercase;
  transform: rotate(-5deg);
  width: max-content;
  margin: 0 0 clamp(23px, 3vh, 39px);
  isolation: isolate;
}
.logo span {
  display: block;
  -webkit-text-stroke: 0.058em #202b20;
  paint-order: stroke fill;
  text-shadow:
    0 0.058em 0 #283024,
    0.025em 0.077em 0 #0d251e;
}
.logo span:first-child {
  color: #ffcf73;
}
.logo span + span {
  margin-left: 0.18em;
  color: #fff0cc;
}
.pitch {
  max-width: 30ch;
  font-size: clamp(17px, 1.65vw, 23px);
  line-height: 1.32;
  letter-spacing: -0.035em;
  margin: 0 0 16px;
  font-weight: 660;
}
.home-meta,
.game-kicker,
.hand-heading small,
.invite > p,
.player small,
.clock,
.seats h2 small {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.035em;
}
.home-meta {
  color: #d0dfc7;
  gap: 9px;
}
.home-meta b,
.game-kicker b {
  font-size: 0.65em;
  color: #d6b16b;
  margin: 0 4px;
}
.entry {
  align-self: start;
  padding: 26px 0 0 clamp(0px, 2vw, 35px);
  position: relative;
  z-index: 1;
}
.entry-actions,
.actions {
  flex-wrap: wrap;
  gap: 12px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 49px;
  padding: 10px 19px;
  border: 2px solid #1e2b20;
  border-radius: 11px;
  font: 800 clamp(16px, 1.6vw, 21px) / 1.12 var(--display);
  letter-spacing: -0.04em;
  box-shadow: 0 4px 0 #192c24;
  transition:
    transform 0.14s,
    box-shadow 0.14s;
}
.button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #192c24;
}
.button:not(:disabled):active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #192c24;
}
.button:disabled {
  opacity: 0.5;
}
.gold-btn {
  background: var(--gold);
  color: #32281b;
}
.cream-btn {
  background: var(--cream);
  color: #32281b;
}
.red-btn {
  background: #f39175;
  color: #3f2018;
}
.ghost-btn {
  background: #153b30;
  border-color: #8b9c78;
  color: var(--cream);
}
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 0;
  padding: 10px 3px;
  font-size: 14px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: #c4cba573;
  color: #e3e7c9;
}
.text-button:hover {
  text-decoration-color: currentColor;
}
.entry .text-button {
  margin: 12px 15px 0 0;
}
.artwork {
  grid-column: 2;
  grid-row: 1 / 3;
  width: 100%;
  aspect-ratio: 1.07;
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  pointer-events: none;
}
.orbit {
  position: absolute;
  inset: 16% -3% 7%;
  border: 1px solid #ceb5744a;
  border-radius: 50%;
  transform: rotate(-14deg);
}
.orbit:after {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px dashed #c8bb7b38;
  border-radius: inherit;
}
.fan {
  position: absolute;
  inset: 0;
  filter: drop-shadow(8px 19px 7px #0c2d2780);
}
.fan img {
  position: absolute;
  width: 41%;
  height: auto;
  transform-origin: 50% 81%;
  top: 21%;
  left: 29%;
  filter: drop-shadow(1px 3px 0 #172c25);
}
.fan .left {
  transform: translate(-43%, 4%) rotate(-24deg);
}
.fan .right {
  transform: translate(44%, 3%) rotate(25deg);
}
.fan .king {
  transform: translate(0, -7%) rotate(-5deg);
}
.spark {
  position: absolute;
  color: #e2c57e;
  font-family: Georgia, serif;
  line-height: 1;
}
.s1 {
  top: 9%;
  left: 18%;
  font-size: 6cqw;
}
.s2 {
  top: 10%;
  right: 13%;
  font-size: 10cqw;
}
.s3 {
  bottom: 10%;
  left: 13%;
  font-size: 5cqw;
}
.s4 {
  bottom: 17%;
  right: 4%;
  font-size: 6cqw;
}
.chip {
  --rim: #ffe1a0;
  --tint: #d69737;
  --dark: #885f2c;
  position: absolute;
  width: 13%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid #25352a;
  background: repeating-conic-gradient(var(--rim) 0deg 16deg, var(--tint) 16deg 45deg);
  box-shadow:
    0 3px 0 var(--dark),
    0 5px 0 #293429,
    0 9px 4px #092d2366;
  transform: rotate(-19deg) scaleY(0.76);
}
.chip i {
  width: 73%;
  height: 73%;
  border: 2px solid var(--rim);
  outline: 1px solid var(--dark);
  background: var(--tint);
  display: grid;
  place-content: center;
  border-radius: 50%;
  font: normal 4.5cqw Georgia;
  color: var(--rim);
  text-shadow: 0 1px 0 var(--dark);
}
.chip.gold {
  left: 27%;
  bottom: 1%;
  transform: rotate(18deg) scaleY(0.67);
}
.chip.red {
  --tint: #b95743;
  --rim: #ffe5ae;
  --dark: #733a2b;
  right: 14%;
  bottom: 6%;
  width: 14%;
}
.chip.mint {
  --tint: #5e967b;
  --rim: #e7e3b7;
  --dark: #365a45;
  right: 8%;
  bottom: 3%;
  width: 12%;
}
dialog {
  color-scheme: light;
  color: #2e3428;
  background: #fff2d5;
  border: 2px solid #28362a;
  border-radius: 20px;
  padding: 0;
  width: min(440px, calc(100% - 28px));
  max-height: calc(100svh - 28px);
  box-shadow:
    0 8px 0 #0d2c23,
    0 18px 70px #06281d70;
}
dialog::backdrop {
  background: #08271fd9;
}
#sheet {
  padding: 32px;
  position: relative;
}
.close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 37px;
  height: 37px;
  background: #f0e1c3;
  color: #39402f;
  border-color: #c4b498;
}
dialog h2,
.inner h1,
.inner h2 {
  font: 800 34px/1.05 var(--display);
  letter-spacing: -0.055em;
  margin: 0 0 12px;
}
dialog h2 {
  padding-right: 27px;
}
dialog h2:focus {
  outline: none;
}
form {
  display: grid;
  gap: 9px;
}
form label {
  margin-top: 9px;
  font-weight: 750;
  font-size: 15px;
}
input:not([type='file']),
select {
  display: block;
  background: #fffaf0;
  color: #2d362b;
  border: 1.5px solid #b6ac8c;
  border-radius: 8px;
  width: 100%;
  font: 600 17px DM;
  padding: 11px 12px;
}
#code,
.roomcode {
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.code-row {
  gap: 8px;
}
.tool.light {
  color: #253b2e;
  background: #eee0bd;
  border-color: #c9b999;
  flex: none;
}
.photo {
  font-size: 13px;
  color: #526343;
}
.photo input {
  display: block;
  font-size: 12px;
  max-width: 100%;
}
.photo small {
  font-weight: 400;
}
.hint {
  margin: 0;
  color: #526044;
  font-size: 14px;
}
.form-error {
  margin: 0;
  font-size: 14px;
  color: #9d2c28;
}
.form-error:empty {
  display: none;
}
form .button {
  margin: 10px 0 3px;
}
.rules {
  padding-left: 1.4em;
}
.rules li {
  padding-left: 3px;
  margin: 13px 0;
}
.rules li::marker {
  color: #75561e;
  font-weight: bold;
}
details {
  margin: 16px 0 20px;
}
summary {
  font-weight: 750;
  cursor: pointer;
}
.qr {
  margin: auto;
  justify-content: center;
}
.qr svg {
  width: 185px;
  height: 185px;
}
.qr + .roomcode {
  font-size: 28px;
  text-align: center;
  margin: 4px;
}
.busy .button,
.busy [data-do='card'] {
  cursor: progress;
}
#toast {
  position: fixed;
  z-index: 6;
  bottom: 20px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: #fff0cd;
  color: #233c2b;
  border: 2px solid #263c2c;
  border-radius: 11px;
  padding: 9px 16px;
  text-align: center;
  font-size: 14px;
  max-width: 90vw;
  width: max-content;
  transition: 0.16s;
}
#toast.shown {
  opacity: 1;
  transform: translate(-50%, 0);
}
.inner {
  width: min(900px, calc(100% - 36px));
  margin: clamp(24px, 6vh, 74px) auto 40px;
}
.inner h1 {
  font-size: clamp(42px, 7vw, 80px);
}
.inner h2 {
  font-size: clamp(22px, 3vw, 34px);
}
.game-kicker {
  color: #e0d7a9;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}
.lobby > .game-kicker,
.finish > .game-kicker {
  margin-bottom: 10px;
}
.lobby-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  border-block: 1px solid #b2bf916b;
  padding: 24px 0;
}
.invite > p {
  color: var(--muted);
  margin: 0;
}
.roomcode {
  font: 800 clamp(40px, 6vw, 70px) / 1.2 var(--display);
  display: block;
  color: var(--gold);
  margin: 4px 0 15px;
}
.qr + .roomcode {
  color: #314233;
}
.seat {
  gap: 10px;
  border-bottom: 1px solid #afc29535;
  padding: 6px 0;
}
.seat small {
  margin-left: auto;
  color: var(--muted);
}
.seat b,
.player b {
  overflow-wrap: anywhere;
}
.avatar {
  width: 37px;
  height: 43px;
  object-fit: contain;
  flex: none;
}
.seats h2 small {
  color: var(--muted);
  margin-left: 6px;
}
.lobby-foot {
  justify-content: space-between;
  gap: 12px;
}
.lobby-foot p {
  max-width: 32ch;
}
/* The playing table shares the viewport with the hand. Both expand with the window. */
body:has(.game-board) {
  --gutter: clamp(18px, 3.5vw, 90px);
  --hud-top: clamp(10px, 1.8svh, 23px);
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  background: #102f29;
}
body:has(.game-board)::before {
  background: radial-gradient(ellipse at 50% 17%, #325745, #163b33 60%, #102c27);
}
body:has(.game-board)::after {
  opacity: 0.1;
}
body:has(.game-board) .topbar {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: var(--hud-top) var(--gutter) 0;
  pointer-events: none;
}
body:has(.game-board) .topbar > * {
  pointer-events: auto;
}
#game:has(.game-board) {
  flex: 1;
  display: flex;
}
.game-board {
  --hand-card: clamp(110px, min(14vw, 21svh), 270px);
  --table-card: clamp(76px, min(10vw, 17svh), 204px);
  display: grid;
  grid-template-rows: minmax(min-content, 1fr) auto;
  width: 100%;
  margin: 0;
  padding: clamp(9px, 1.6svh, 22px) var(--gutter) max(18px, 2.5svh, env(safe-area-inset-bottom));
  gap: clamp(14px, 2.3svh, 28px);
}
.board-head {
  position: absolute;
  inset: var(--hud-top) calc(var(--gutter) + 113px) auto calc(var(--gutter) + 215px);
  min-height: 43px;
  justify-content: space-between;
  gap: 12px;
}
.board-head .game-kicker {
  border-left: 1px solid #d3bc784d;
  padding-left: 20px;
}
.arena {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.players {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(10px, 5vw, 120px);
  padding-inline: 8%;
  margin-bottom: -19px;
}
.player {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  max-width: 28%;
  padding: 6px 16px 6px 8px;
  background: #14362d;
  border: 2px solid #78927b;
  border-radius: 14px;
  box-shadow:
    0 4px 0 #142920,
    0 9px 16px #0b241b4d;
}
.player > span {
  min-width: 0;
}
.player small,
.player b {
  display: block;
}
.player b {
  font-size: clamp(14px, 1.2vw, 20px);
  line-height: 1.15;
}
.player small {
  font-size: clamp(11px, 0.9vw, 15px);
  color: #d0d9b7;
  letter-spacing: 0;
}
.player .avatar {
  width: clamp(35px, 3.3vw, 64px);
  height: clamp(40px, 5.8svh, 75px);
}
.seat-stat {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.player small {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1px 8px;
}
.seat-stat .icon,
.token-symbol {
  display: none;
}
.player.active {
  border-color: var(--gold);
  background: #384a34;
}
.player.out {
  opacity: 0.72;
}
.felt {
  position: relative;
  flex: 1;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: clamp(180px, 31svh, 390px);
  padding: clamp(21px, 4svh, 64px) clamp(24px, 6vw, 110px);
  border: clamp(9px, 1.1vw, 19px) solid transparent;
  border-radius: 22% / 50%;
  background:
    radial-gradient(ellipse at 49% 43%, #48775b 0%, #32644c 52%, #20503e 83%, #194634 100%) padding-box,
    linear-gradient(180deg, #c6a26a 0%, #82613f 9%, #694f38 30%, #473e2d 73%, #a37d4b 95%, #7c633e)
      border-box;
  box-shadow:
    0 1px 0 2px #202c20,
    0 7px 0 #3e3627,
    0 10px 0 #192c22,
    0 15px 24px #0a231b61,
    inset 0 0 0 2px #baa46a,
    inset 0 4px 20px #143e2caa;
}
.felt::before,
.felt::after {
  position: absolute;
  content: '';
  pointer-events: none;
  border-radius: inherit;
}
.felt::before {
  inset: 9px;
  border: 1px dashed #d5c48b99;
}
.felt::after {
  inset: 0;
  z-index: -1;
  background: url(art/grain.png);
  opacity: 0.15;
  mix-blend-mode: soft-light;
}
.inlay {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 9px;
  font:
    clamp(15px, 1.45vw, 30px) / 1 Georgia,
    serif;
  color: #d8c68c69;
  pointer-events: none;
}
.inlay::before,
.inlay::after {
  content: '';
  width: clamp(10px, 2vw, 52px);
  height: 1px;
  background: currentColor;
}
.left-inlay {
  left: 12%;
}
.right-inlay {
  left: 88%;
}
.table-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(50px, 8vw, 165px);
}
.table-emblem {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 40px);
}
.table-emblem img {
  display: block;
  width: var(--table-card);
  transform: rotate(-8deg);
  filter: drop-shadow(2px 6px 1px #18322188) drop-shadow(3px 12px 6px #15382644);
}
.table-emblem .game-kicker {
  color: #e9d99d;
}
.table-emblem h2 {
  color: var(--cream);
  font-size: clamp(40px, min(5.4vw, 8svh), 98px);
  margin: 2px 0 0;
  line-height: 0.95;
}
.pile {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #eee2bd;
}
.pile small {
  font-size: clamp(12px, 1.05vw, 18px);
}
.pile-place {
  display: grid;
  place-items: center;
  width: calc(var(--table-card) * 0.78);
  aspect-ratio: 400 / 552;
}
.card-back {
  width: 100%;
  height: 100%;
  border: 4px solid #ffe6b1;
  border-radius: 8%;
  display: grid;
  place-items: center;
  transform: rotate(7deg);
  background-color: #944c35;
  background-image:
    repeating-linear-gradient(45deg, transparent 0 5px, #e0a97472 5px 6px),
    repeating-linear-gradient(-45deg, transparent 0 5px, #e0a97472 5px 6px);
  box-shadow:
    inset 0 0 0 2px #6e362b,
    -3px 3px 0 #8b6c44,
    -5px 5px 0 #e1c599,
    -7px 7px 0 #725b3e,
    -9px 9px 0 #e1c599,
    -8px 11px 8px #1d3b2a80;
}
.card-back i {
  display: grid;
  place-items: center;
  width: 55%;
  aspect-ratio: 1;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: #ffe7b2;
  background: #86452f;
  font:
    normal clamp(22px, 3vw, 50px) / 1 Georgia,
    serif;
}
.pile[data-empty='true'] .card-back {
  transform: none;
  border: 2px dashed #eddaa57a;
  background: #1c4c3770;
  box-shadow: inset 0 0 12px #224f3b33;
}
.pile[data-empty='true'] i {
  background: none;
  border-color: transparent;
  color: #dbcf9d70;
}
.hand-dock {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(200px, 19vw, 360px);
  align-items: center;
  gap: clamp(18px, 2.5vw, 65px);
  padding-top: 3px;
}
.hand-zone {
  min-width: 0;
  display: grid;
  gap: clamp(12px, 2svh, 27px);
}
.hand-heading {
  justify-content: center;
  gap: 10px;
}
.hand-heading h2 {
  font-size: clamp(20px, 1.7vw, 35px);
  margin: 0;
}
.hand-heading small {
  color: #d1ddc5;
  font-size: clamp(12px, 0.9vw, 16px);
  font-weight: 600;
}
.hand-owner {
  min-width: 0;
  overflow-wrap: anywhere;
}
.life-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  padding: 0.35em 0.65em;
  border: 1px solid #bd8b6e;
  border-radius: 12px;
  background: #302b25;
  color: #fff3da;
  font-size: clamp(17px, 1.42vw, 26px);
  white-space: nowrap;
}
.life-badge strong {
  font: 800 1em/1.15 var(--display);
}
.life-badge strong span {
  color: #ffa59a;
  font-family: system-ui, sans-serif;
}
.life-detail {
  border-left: 1px solid #897462;
  padding-left: 0.8em;
  color: #ffe0a5;
  font-size: 0.76em;
  font-weight: 700;
}
.life-badge.eliminated {
  border-style: dashed;
}
.life-badge.eliminated strong span {
  color: #c2b8a9;
}
.hand-heading .avatar {
  width: clamp(32px, 2.8vw, 53px);
  height: clamp(36px, 4.8svh, 62px);
}
.hand {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(4px, 0.65vw, 14px);
  padding: 3px 8px 8px;
  min-height: calc(var(--hand-card) * 1.38);
}
.hand button {
  flex: 0 1 var(--hand-card);
  min-width: 0;
  max-width: var(--hand-card);
  display: block;
  position: relative;
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 8%;
  align-self: flex-start;
  transform-origin: 50% 80%;
  transform: translateY(var(--drop)) rotate(var(--tilt));
  transition: transform 0.14s ease-out;
}
.hand .face img {
  filter: drop-shadow(1px 4px 1px #0c271eb3);
}
@media (hover: hover) and (pointer: fine) {
  .hand button:enabled:hover {
    transform: translateY(-5px) rotate(0deg);
    z-index: 2;
  }
}
.hand button:enabled[aria-pressed='true'] {
  transform: translateY(-9px) rotate(0deg);
  z-index: 3;
  outline: 3px solid var(--gold);
  outline-offset: 1px;
}
.hand button:focus-visible {
  z-index: 4;
}
.face {
  display: block;
  position: relative;
}
.face img {
  display: block;
  width: 100%;
  height: auto;
}
.devil {
  position: absolute;
  bottom: 7%;
  left: 0;
  right: 0;
  background: #8f332c;
  color: white;
  text-align: center;
  font-size: clamp(11px, 1.1vw, 17px);
}
.empty-hand {
  align-self: center;
  color: var(--muted);
  text-align: center;
}
.turn-controls {
  border-left: 1px solid #d5c48b54;
  padding: 4px 0 4px clamp(16px, 2vw, 42px);
}
.turn-line {
  display: block;
}
.turn-line h2 {
  font-size: clamp(24px, 2.3vw, 49px);
  margin: 9px 0 5px;
  overflow-wrap: anywhere;
}
.turn-line p {
  margin: 0;
  color: #d2dfca;
  font-size: clamp(14px, 1.15vw, 19px);
  line-height: 1.35;
}
.clock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.play-actions {
  gap: 9px;
  margin-top: clamp(10px, 1.8svh, 24px);
}
.play-actions .button {
  min-height: 43px;
  padding: 9px 15px;
  font-size: clamp(16px, 1.35vw, 24px);
}
.during-reveal {
  grid-template-columns: minmax(0, 1fr);
  --hand-card: clamp(86px, 13svh, 178px);
}
.reveal {
  max-width: 100%;
  text-align: center;
}
.reveal h2 {
  margin: 3px 0;
}
.reveal p {
  margin: 3px auto 7px;
}
.reveal-cards,
.finish .actions,
.reveal .actions {
  display: flex;
  justify-content: center;
  gap: 7px;
}
.reveal-cards .face {
  width: clamp(48px, min(8vw, 11svh), 120px);
}
.showing-reveal .inlay {
  opacity: 0.6;
}

@media (max-width: 760px), (max-width: 1050px) and (orientation: portrait) {
  .game-board {
    --gutter: clamp(10px, 2.7vw, 19px);
    --table-card: clamp(72px, min(25vw, 21svh), 155px);
    gap: 13px;
    padding-top: 3px;
  }
  .board-head {
    position: static;
    min-height: 30px;
  }
  .board-head .game-kicker {
    border: 0;
    padding-left: 0;
    font-size: 10px;
  }
  .board-head .text-button {
    padding: 5px 2px;
  }
  .game-board {
    grid-template-rows: auto minmax(min-content, 1fr) auto;
  }
  .players {
    padding-inline: 0;
    gap: 5px;
    margin-bottom: -14px;
  }
  .player {
    max-width: 44%;
    padding: 4px 8px;
    gap: 4px;
    border-width: 1px;
    border-radius: 10px;
  }
  .player b {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .player small {
    font-size: 10px;
  }
  .player .avatar {
    width: 27px;
    height: 33px;
  }
  .seat-stat {
    gap: 3px;
  }
  .seat-stat .icon {
    display: inline-block;
    width: 12px;
    height: 12px;
  }
  .seat-stat .token-symbol {
    display: inline-block;
    border: 1px solid currentColor;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    box-shadow:
      inset 0 0 0 2px #234135,
      inset 0 0 0 3px currentColor;
  }
  .stat-unit {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .felt {
    min-height: 137px;
    border-width: 8px;
    border-radius: 20% / 34%;
    padding: 22px 10px 16px;
  }
  .left-inlay,
  .right-inlay {
    display: none;
  }
  .table-center {
    gap: clamp(18px, 8vw, 66px);
  }
  .table-emblem {
    gap: 12px;
  }
  .table-emblem .game-kicker {
    font-size: 10px;
  }
  .table-emblem h2 {
    font-size: clamp(33px, 7vw, 46px);
  }
  .hand-dock {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
    padding: 0;
  }
  .hand-zone {
    gap: 10px;
  }
  .hand-heading {
    justify-content: flex-start;
    gap: 7px;
  }
  .hand-heading .life-badge {
    margin-left: auto;
    gap: 0.45em;
    padding: 0.35em 0.5em;
  }
  .hand-heading h2 {
    font-size: 19px;
  }
  .hand-heading .avatar {
    width: 27px;
    height: 32px;
  }
  .hand-heading small {
    font-size: 11px;
  }
  .hand {
    --card-size: min(clamp(82px, 27vw, 162px), 23svh);
    --overlap: clamp(
      0px,
      calc((var(--count) * var(--card-size) - 100%) / max(1, var(--count) - 1)),
      36px
    );
    padding: 4px 4px 7px;
    min-height: 0;
    gap: 0;
  }
  .hand button {
    flex: 0 1 var(--card-size);
    max-width: var(--card-size);
  }
  .hand button + button {
    margin-left: calc(0px - var(--overlap));
  }
  .hand button:enabled[aria-pressed='true'] {
    z-index: auto;
  }
  .turn-controls {
    padding: 7px 0 0;
    border: 0;
    border-top: 1px solid #d5c48b4a;
    display: grid;
    gap: 8px;
  }
  .turn-line {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 2px 5px;
  }
  .turn-line h2 {
    font-size: 18px;
    margin: 0;
    grid-column: 1;
    grid-row: 1;
  }
  .turn-line .clock {
    grid-column: 2;
    grid-row: 1;
    font-size: 12px;
  }
  .turn-line p {
    grid-column: 1 / -1;
    font-size: 12px;
  }
  .play-actions {
    margin: 0;
    justify-content: flex-start;
    gap: 6px;
  }
  .play-actions .button {
    padding: 8px 10px;
    font-size: 15px;
    min-height: 39px;
  }
  .reveal-cards .face {
    width: clamp(37px, 12vw, 69px);
  }
  .reveal .actions .button {
    padding: 7px 10px;
    min-height: 38px;
  }
}
@media (max-width: 520px) {
  .hand:has(button:nth-child(6)) {
    flex-wrap: wrap;
    gap: 5px 7px;
  }
  .hand:has(button:nth-child(6)) button {
    flex: 0 0 min(calc((100% - 21px) / 4), 13svh);
    max-width: none;
    margin-left: 0;
    transform: none;
  }
  .hand:has(button:nth-child(6)) button[aria-pressed='true'] {
    transform: translateY(-5px);
  }
  .hand:has(button:nth-child(6)) {
    max-width: calc(52svh + 30px);
    justify-self: center;
    width: 100%;
  }
}
@media (max-width: 520px) and (max-height: 700px) {
  .game-board {
    gap: 6px;
    padding-bottom: 10px;
    --table-card: 56px;
  }
  .felt {
    min-height: 106px;
    padding-block: 12px;
  }
  .hand-zone {
    gap: 4px;
  }
  .hand-heading .avatar {
    width: 23px;
    height: 28px;
  }
  .hand:has(button:nth-child(6)) {
    max-width: calc(42svh + 30px);
    gap: 4px 7px;
  }
  .hand:has(button:nth-child(6)) button {
    flex-basis: min(calc((100% - 21px) / 4), 10.5svh);
  }
  .hand-dock {
    gap: 5px;
  }
  .turn-controls {
    gap: 5px;
    padding-top: 5px;
  }
  .play-actions:has(button:nth-child(3)) {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 4px;
  }
  .play-actions .button {
    font-size: 14px;
    padding: 7px 6px;
    gap: 3px;
  }
  .play-actions:has(button:nth-child(3)) .icon {
    display: none;
  }
  .players:has(.player:nth-child(3)) .player {
    flex: 1;
    padding-inline: 4px;
  }
  .player small {
    flex-wrap: nowrap;
    gap: 5px;
  }
  .table-emblem .game-kicker {
    display: block;
    line-height: 1.15;
  }
  .hand-heading {
    line-height: 1.05;
  }
  .hand-heading h2 {
    font-size: 17px;
  }
  .turn-line p {
    line-height: 1.2;
  }
  .board-head {
    min-height: 26px;
  }
  .board-head .text-button {
    padding-block: 2px;
  }
}
@media (max-height: 620px) and (min-width: 761px) {
  .game-board {
    --hand-card: clamp(78px, 20svh, 120px);
    --table-card: clamp(54px, 14svh, 80px);
    padding-block: 3px 12px;
    gap: 12px;
  }
  .felt {
    min-height: 115px;
    padding-block: 10px;
  }
  .player .avatar {
    height: 32px;
  }
  .hand-dock {
    grid-template-columns: minmax(0, 1fr) clamp(245px, 32vw, 345px);
    gap: 12px;
  }
  .turn-controls {
    padding: 0 0 0 13px;
  }
  .play-actions {
    gap: 5px;
    margin-top: 7px;
  }
  .play-actions .button {
    min-height: 33px;
    font-size: 14px;
    padding: 6px 9px;
  }
  .clock {
    font-size: 12px;
  }
  .hand-heading .avatar {
    height: 27px;
  }
  .hand-heading h2 {
    font-size: 16px;
  }
  .turn-line h2 {
    margin: 2px 0;
  }

  .hand-zone {
    gap: 7px;
  }
  .turn-line h2 {
    font-size: 21px;
  }
  .turn-line p {
    font-size: 13px;
  }
}

.finish {
  text-align: center;
}
.finish > img {
  display: block;
  width: 130px;
  height: 155px;
  object-fit: contain;
  margin: 18px auto;
}
.finish p {
  margin-bottom: 28px;
}
@media (min-width: 1550px) {
  .home-inner {
    width: 1240px;
  }
}
@media (max-width: 780px) {
  .topbar {
    padding: 16px 20px 0;
  }
  .home {
    padding: 20px max(5vw, 18px) 42px;
    min-height: calc(100svh - 60px);
  }
  .home-inner {
    grid-template-columns: 1fr 1fr;
  }
  .intro,
  .entry {
    padding-left: 0;
  }
  .logo {
    font-size: clamp(66px, 12vw, 96px);
  }
  .artwork {
    width: 109%;
    margin-left: -4%;
  }
  .button {
    font-size: 16px;
    padding: 10px 14px;
  }
  .entry {
    grid-column: 1/3;
  }
  .lobby-grid {
    gap: 20px;
  }
  .pitch {
    font-size: 17px;
  }
}
@media (max-width: 600px) {
  .brand {
    font-size: 16px;
  }
  .brand img {
    width: 23px;
    height: 29px;
  }
  .tool {
    width: 38px;
    height: 38px;
  }
  .home {
    padding: 4px 18px 23px;
  }
  .home-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .intro {
    text-align: center;
    align-self: center;
    display: contents;
  }
  .suits {
    display: none;
  }
  .logo {
    order: 0;
    font-size: clamp(54px, 13.4vw, 80px);
    line-height: 0.88;
    transform: rotate(-4deg);
    margin: 20px 0 2px;
    display: flex;
    gap: 0.1em;
  }
  .logo span + span {
    margin: 0;
  }
  .artwork {
    order: 1;
    width: min(94vw, 350px, 48svh);
    aspect-ratio: 1.34;
    margin: 0;
  }
  .fan img {
    width: 34%;
    left: 33%;
    top: 17%;
  }
  .spark.s1 {
    top: 8%;
  }
  .chip.gold {
    bottom: 3%;
  }
  .chip.red {
    bottom: 9%;
  }
  .chip.mint {
    bottom: 4%;
  }
  .pitch {
    order: 2;
    text-align: center;
    margin: 12px auto 7px;
    max-width: 29ch;
    font-size: 17px;
  }
  .home-meta {
    order: 3;
    justify-content: center;
    font-size: 12px;
  }
  .entry {
    order: 4;
    width: 100%;
    align-self: center;
    text-align: center;
    padding-top: 17px;
  }
  .entry-actions {
    justify-content: center;
    gap: 9px;
  }
  .entry .text-button {
    margin: 11px 0 0;
    padding: 7px 11px;
  }
  .home:after {
    inset: 19% -72% -54%;
  }
  .lobby-grid {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 17px 0;
  }
  .lobby-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
    margin-bottom: 10px;
  }
  .roomcode {
    font-size: 42px;
  }
  #sheet {
    padding: 26px 21px;
  }
  .close {
    top: 10px;
    right: 10px;
  }
}
@media (max-width: 370px) {
  .entry-actions .button {
    font-size: 15px;
    padding-inline: 10px;
  }
  .pitch {
    font-size: 16px;
  }
  .topbar {
    padding: 12px 14px 0;
  }
  .game-kicker {
    font-size: 10px;
  }
}
@media (max-height: 540px) and (min-width: 601px) {
  .home {
    padding-top: 10px;
    padding-bottom: 22px;
  }
  .home-inner {
    max-width: 800px;
  }
  .logo {
    font-size: 78px;
  }
  .suits {
    font-size: 15px;
  }
  .pitch {
    font-size: 16px;
  }
  .entry {
    padding-top: 15px;
  }
  .artwork {
    max-width: 365px;
  }
  .topbar {
    padding-top: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 600px) {
  .logo {
    gap: 0.19em;
  }
  .home-inner {
    margin-block: clamp(4px, 3vh, 22px);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .fan {
    animation: deal-in 0.5s ease-out both;
  }
  .reveal-cards .face {
    animation: flip-in 0.32s ease-out both;
  }
  .reveal-cards .face:nth-child(2) {
    animation-delay: 0.045s;
  }
  .reveal-cards .face:nth-child(3) {
    animation-delay: 0.09s;
  }
  @keyframes deal-in {
    from {
      opacity: 0;
      transform: translateY(12px) rotate(3deg);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
  @keyframes flip-in {
    from {
      transform: perspective(450px) rotateY(75deg);
    }
    to {
      transform: perspective(450px) rotateY(0);
    }
  }
}
