.card-flight-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}
.card.flying-card {
  position: absolute;
  margin: 0;
  transform-origin: center;
  will-change: transform;
}
.reaction-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.reaction-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  text-align: left;
  background: #fff;
  border: 1px solid #d6d8dc;
  border-radius: 6px;
  min-width: 0;
}
.reaction-choice span {
  font-size: 26px;
}
.reaction-choice strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.reaction-choice.red {
  color: #c42c54;
}
.wide-reaction {
  grid-column: 1 / -1;
}
.round-drama {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: #23282c;
  background: #ffde56;
  font-weight: 800;
  font-size: 17px;
  padding: 6px 14px;
  border-radius: 3px;
}
.round-drama.sudden-death {
  color: #fff;
  background: #c91b4a;
  text-shadow: 0 2px 12px #fa285c;
}
.drawfest-status {
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--table-ink);
  padding: 4px;
}
.winner-trophy {
  display: inline-block;
  font-size: 34px;
  vertical-align: middle;
  margin-right: 8px;
}
.confetti-shower {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  overflow: hidden;
}
.confetti-shower span {
  position: absolute;
  top: 0;
  width: 9px;
  height: 15px;
}
.draw-hand {
  position: absolute;
  top: 25%;
  left: 85%;
  z-index: 5;
  font-size: 48px;
  pointer-events: none;
}
.pile-block {
  position: relative;
}
:root {
  color-scheme: light;
  --ink: #202b27;
  --green: #216751;
  --pink: #f4b8c8;
  --paper: #fff;
  --red: #bb3151;
  --line: #dce5e0;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f5f8f6;
  color: var(--ink);
}
button,
input,
select {
  font: inherit;
}
button,
a,
input {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #e9a028;
  outline-offset: 4px;
}
button {
  border: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: 22px;
}
h2 {
  font-size: 25px;
}
.masthead {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: white;
}
.back,
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.back {
  font-size: 14px;
}
.brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.eight-mark {
  width: 32px;
  height: 42px;
  border: 2px solid var(--ink);
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 28px;
  transform: rotate(-8deg);
  background: var(--pink);
}
.icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: transparent;
  color: inherit;
}
.icon-button:hover {
  background: #e9efeb;
}
.shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100svh - 80px);
}
.sidebar {
  padding: 32px 24px;
  background: white;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.eyebrow {
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
  color: #63756a;
  margin-bottom: 12px;
}
.form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.form label {
  font-size: 13px;
  font-weight: 600;
  display: grid;
  gap: 8px;
}
input,
select {
  width: 100%;
  border: 1px solid #bccdc4;
  border-radius: 5px;
  background: white;
  color: var(--ink);
  height: 44px;
  padding: 0 12px;
}
.primary,
.secondary {
  padding: 12px 16px;
  border-radius: 6px;
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  font-weight: 650;
  min-height: 46px;
}
.primary {
  background: var(--ink);
  color: white;
}
.primary:hover {
  background: #365443;
}
.secondary {
  background: #edf3ef;
  color: var(--ink);
}
.secondary:hover {
  background: #dcebe2;
}
.small {
  font-size: 12px;
  line-height: 1.6;
}
.muted {
  color: #6b7b72;
}
.sidebar .muted {
  line-height: 1.6;
}
.room-link {
  font-size: 12px;
  overflow-wrap: anywhere;
  line-height: 1.5;
  background: #f3f7f4;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.roster {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.roster li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: #d9ede1;
  color: #275941;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
}
.roster-name {
  flex: 1;
  overflow-wrap: anywhere;
  font-size: 14px;
}
.online-dot {
  width: 7px;
  height: 7px;
  background: #32875e;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}
.offline-dot {
  background: #a0aaa4;
}
.table-area {
  background: var(--green);
  color: white;
  padding: 24px 28px 0;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.table-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  font-size: 13px;
  color: #d5e8dd;
}
.connection {
  display: flex;
  align-items: center;
  gap: 7px;
}
.table {
  flex: 1;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 26px;
  padding: 24px 0;
}
.opponents {
  display: flex;
  justify-content: center;
  gap: 26px;
  flex-wrap: wrap;
  min-height: 100px;
  width: 100%;
}
.opponent {
  text-align: center;
  max-width: 130px;
  padding: 8px;
  border: 2px solid transparent;
  border-radius: 7px;
}
.opponent.active {
  border-color: var(--pink);
}
.opponent .avatar {
  margin: auto;
  background: #e9f2ec;
}
.opponent-name {
  font-size: 13px;
  margin: 8px 0 6px;
  overflow-wrap: anywhere;
}
.opponent-count {
  font-size: 12px;
  color: #d7e9df;
}
.mini-cards {
  height: 24px;
  display: flex;
  justify-content: center;
  margin-top: 7px;
}
.mini-card {
  display: block;
  width: 17px;
  height: 24px;
  background: #f4b8c8;
  border: 2px solid #fce2ea;
  border-radius: 3px;
  margin-left: -6px;
  box-shadow: 0 1px 3px #0003;
}
.mini-card:first-child {
  margin-left: 0;
}
.center-piles {
  display: flex;
  align-items: center;
  gap: 32px;
  position: relative;
  min-height: 145px;
}
.pile-block {
  display: grid;
  justify-items: center;
  gap: 11px;
}
.pile-label {
  font-size: 11px;
  color: #d6e8de;
  text-transform: uppercase;
  font-weight: 650;
}
.card {
  width: 92px;
  height: 132px;
  border: 1px solid #dae1dc;
  border-radius: 7px;
  background: white;
  color: var(--ink);
  box-shadow: 0 4px 8px #0002;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 9px;
  position: relative;
  flex-shrink: 0;
  font-family: Georgia, serif;
  text-align: left;
}
.card.red {
  color: var(--red);
}
.card-corner {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: flex-start;
  font-size: 20px;
  line-height: 1;
}
.card-corner span {
  font-size: 15px;
  margin-top: 2px;
}
.card-corner.bottom {
  align-self: flex-end;
  transform: rotate(180deg);
}
.card-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 43px;
  pointer-events: none;
}
.card-back {
  background: #f4b8c8;
  border: 5px solid #fff0f5;
  display: grid;
  place-items: center;
  color: #522637;
  font-family: Georgia, serif;
  font-size: 48px;
  box-shadow:
    3px 3px 0 #fce2ea,
    6px 6px 0 #ba8696,
    0 6px 8px #0002;
}
.turn-banner {
  text-align: center;
  min-height: 56px;
  display: grid;
  gap: 8px;
  align-content: center;
}
.turn-title {
  font-size: 21px;
  font-weight: 650;
}
.turn-detail {
  color: #dceae2;
  font-size: 13px;
  max-width: 480px;
  line-height: 1.5;
}
.active-suit {
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.suit-token {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: white;
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 20px;
}
.suit-token.red {
  color: var(--red);
}
.hand-area {
  border-top: 1px solid #ffffff30;
  padding: 18px 0 20px;
}
.hand-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  font-size: 14px;
  gap: 12px;
}
.hand {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 146px;
  padding: 8px 4px;
}
.hand .card {
  transition:
    transform 0.15s,
    box-shadow 0.15s;
  opacity: 1;
}
.hand .card:disabled {
  opacity: 0.6;
}
.hand .card:not(:disabled) {
  border: 2px solid #f4b8c8;
}
.hand .card:not(:disabled):hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 20px #0004;
}
.hand .card.selected {
  transform: translateY(-8px);
}
.draw-button {
  background: var(--pink);
  color: #462738;
}
.welcome-note {
  text-align: center;
  max-width: 350px;
  color: #e0eee6;
  font-size: 15px;
  line-height: 1.7;
}
.status-pill {
  padding: 5px 10px;
  border: 1px solid #ffffff50;
  border-radius: 4px;
  font-size: 12px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.separator {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.error {
  color: #a52344;
  font-size: 13px;
  line-height: 1.5;
}
.winner {
  color: #f7d4df;
}
dialog {
  border: 0;
  border-radius: 8px;
  padding: 28px;
  width: min(440px, calc(100% - 32px));
  color: var(--ink);
  box-shadow: 0 20px 80px #0004;
}
dialog::backdrop {
  background: #15281fc4;
}
.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
}
dialog p {
  font-size: 14px;
  line-height: 1.7;
  margin: 12px 0;
}
.suit-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.suit-choice {
  display: grid;
  justify-items: center;
  gap: 8px;
  background: #edf3ef;
  padding: 18px;
  border-radius: 6px;
  font-size: 14px;
}
.suit-choice span {
  font-size: 40px;
  font-family: Georgia, serif;
}
.suit-choice.red {
  color: var(--red);
}
#notice {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 18px;
  box-shadow: 0 4px 24px #0002;
  font-size: 13px;
  max-width: 90%;
  text-align: center;
  pointer-events: none;
  z-index: 10;
}
#notice:empty {
  display: none;
}
.leave {
  margin-top: auto;
  font-size: 13px;
  align-self: flex-start;
}
.result-actions {
  margin-top: 10px;
}
.empty-hand {
  align-self: center;
  color: #dceae2;
}
.match-log {
  font-size: 12px;
  line-height: 1.6;
  color: #64746b;
  max-height: 120px;
  overflow: auto;
}
.offline-banner {
  background: #fff1c6;
  color: #58471a;
  padding: 10px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.5;
}
.lobby-code {
  font-size: 13px;
  font-family: ui-monospace, monospace;
}
@media (max-width: 850px) {
  .shell {
    grid-template-columns: 230px 1fr;
  }
  .sidebar {
    padding: 24px 18px;
  }
  .masthead {
    padding: 0 20px;
  }
  .table-area {
    padding: 20px 18px 0;
  }
  .center-piles {
    gap: 26px;
  }
  .hand {
    gap: 6px;
  }
  .hand .card {
    width: 74px;
    height: 110px;
  }
  .hand .card-center {
    font-size: 34px;
  }
  .opponents {
    gap: 12px;
  }
}
@media (max-width: 600px) {
  .masthead {
    height: 68px;
    padding: 0 12px;
  }
  .back span {
    display: none;
  }
  .brand {
    gap: 9px;
  }
  h1 {
    font-size: 20px;
  }
  .eight-mark {
    width: 27px;
    height: 36px;
    font-size: 24px;
  }
  .shell {
    display: flex;
    flex-direction: column;
    min-height: calc(100svh - 68px);
  }
  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 18px;
    gap: 16px;
  }
  .sidebar.room-sidebar {
    padding: 12px 16px;
    display: block;
  }
  .room-sidebar > .eyebrow,
  .room-sidebar > .roster,
  .room-sidebar > .match-log,
  .room-sidebar > .leave {
    display: none;
  }
  .room-sidebar .share-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .room-sidebar .room-link {
    display: none;
  }
  .room-sidebar .separator {
    border: 0;
    padding-top: 10px;
  }
  .room-sidebar h2 {
    font-size: 20px;
  }
  .table-area {
    padding: 14px 14px 0;
    min-height: 520px;
  }
  .table {
    min-height: 270px;
    padding: 15px 0;
    gap: 16px;
  }
  .opponents {
    min-height: 70px;
    gap: 8px;
  }
  .opponent {
    padding: 4px;
    max-width: 105px;
  }
  .opponent .avatar {
    width: 30px;
    height: 30px;
  }
  .mini-cards {
    display: none;
  }
  .opponent-name {
    margin: 5px 0 3px;
    font-size: 12px;
  }
  .card {
    width: 74px;
    height: 108px;
  }
  .card-center {
    font-size: 35px;
  }
  .card-corner {
    font-size: 17px;
  }
  .center-piles {
    min-height: 128px;
  }
  .turn-title {
    font-size: 18px;
  }
  .hand-area {
    padding-top: 14px;
  }
  .hand-heading {
    font-size: 13px;
    margin-bottom: 10px;
  }
  .hand {
    min-height: 122px;
    gap: 5px;
    justify-content: center;
  }
  .hand .card {
    width: 62px;
    height: 93px;
    padding: 6px;
  }
  .hand .card-center {
    font-size: 29px;
  }
  .hand .card-corner {
    font-size: 15px;
  }
  .hand .card-corner span {
    font-size: 12px;
  }
  .primary,
  .secondary {
    min-height: 42px;
    font-size: 13px;
    padding: 10px 12px;
  }
  .turn-detail {
    font-size: 12px;
  }
  .table-heading {
    font-size: 12px;
  }
  .welcome-note {
    font-size: 14px;
  }
  .setup-sidebar .form {
    display: grid;
    grid-template-columns: 1fr 110px;
    gap: 12px;
  }
  .setup-sidebar .form .primary,
  .setup-sidebar .form .error {
    grid-column: 1/-1;
  }
  .setup-sidebar h2 {
    font-size: 23px;
  }
  .setup-sidebar .small {
    font-size: 12px;
  }
  .setup-sidebar .separator {
    display: none;
  }
}
.table-area {
  padding-top: 16px;
}
.table {
  gap: 8px;
  padding: 4px 0;
}
.opponents {
  min-height: 100px;
}
.opponent {
  padding: 4px;
}
.opponent .avatar {
  width: 32px;
  height: 32px;
}
.opponent-name {
  margin: 4px 0;
}
.mini-cards {
  height: 18px;
  margin-top: 4px;
}
.mini-card {
  height: 18px;
  width: 14px;
}
.hand-area {
  padding: 10px 0 12px;
}
.hand-heading {
  margin-bottom: 8px;
}
.hand-heading .primary {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
}
.hand {
  min-height: 132px;
  padding: 6px 4px;
}
.hand .card {
  width: 84px;
  height: 120px;
}
.hand .card-center {
  font-size: 37px;
}
@media (max-width: 600px) {
  .hand .card {
    width: 62px;
    height: 93px;
  }
  .hand .card-center {
    font-size: 29px;
  }
  .hand {
    min-height: 105px;
  }
  .table-area {
    padding-top: 14px;
  }
  .opponents {
    min-height: 70px;
  }
  .opponent .avatar {
    width: 30px;
    height: 30px;
  }
  .hand-heading {
    align-items: center;
  }
  .hand-heading > span {
    flex-shrink: 0;
  }
  .hand-heading .primary {
    font-size: 12px;
    padding: 8px;
  }
  .table {
    gap: 12px;
    padding: 12px 0;
  }
  .hand-area {
    padding-top: 14px;
  }
  .room-sidebar .leave {
    display: inline-flex;
    position: absolute;
    right: 16px;
    top: 126px;
    padding: 6px;
    min-height: 30px;
    background: transparent;
  }
  .room-sidebar .leave svg {
    width: 16px;
    height: 16px;
  }
  .room-sidebar .roster:has([data-remove]) {
    display: grid;
    margin-top: 12px;
  }
  .room-sidebar .separator {
    padding-right: 95px;
  }
}
.header-actions {
  display: flex;
  align-items: center;
}
.header-leave {
  display: none;
}
@media (max-width: 600px) {
  .header-leave:not([hidden]) {
    display: inline-grid;
  }
  .room-sidebar .leave {
    display: none;
  }
}
@media (max-width: 360px) {
  h1 {
    font-size: 17px;
  }
  .brand {
    gap: 6px;
  }
  .header-actions .icon-button {
    width: 34px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

:root {
  --page-bg: #f5f8f6;
  --chrome-ink: #202b27;
  --table-ink: #fff;
}
body,
.masthead,
.sidebar {
  background: var(--page-bg);
  color: var(--chrome-ink);
}
.masthead,
.sidebar {
  border-color: color-mix(in srgb, var(--chrome-ink) 15%, transparent);
}
.sidebar .muted,
.eyebrow,
.match-log {
  color: color-mix(in srgb, var(--chrome-ink) 70%, transparent);
}
.icon-button:hover {
  background: color-mix(in srgb, var(--chrome-ink) 10%, transparent);
}
.table-area {
  color: var(--table-ink);
}
.table-heading,
.pile-label,
.opponent-count,
.turn-detail,
.empty-hand,
.welcome-note {
  color: color-mix(in srgb, var(--table-ink) 85%, transparent);
}
.hand-area,
.status-pill {
  border-color: color-mix(in srgb, var(--table-ink) 28%, transparent);
}
.appearance {
  display: grid;
  gap: 14px;
  grid-column: 1/-1;
  padding: 4px 0;
}
.color-picker {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.color-picker legend {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}
.swatches {
  display: flex;
  align-items: center;
  gap: 10px;
}
.swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--swatch);
  border: 1px solid #9998;
  flex-shrink: 0;
}
.swatch[aria-pressed="true"] {
  outline: 2px solid var(--chrome-ink);
  outline-offset: 3px;
}
.swatches input[type="color"] {
  width: 34px;
  height: 34px;
  padding: 2px;
  border: 1px solid #9998;
  border-radius: 6px;
  cursor: pointer;
  margin-left: 4px;
  background: white;
}
.card {
  background: #fffdf8;
  border-color: #e1d8ca;
  box-shadow:
    0 3px 0 #ded4c8,
    0 5px 12px #0003;
  overflow: hidden;
}
.card-corner {
  z-index: 1;
}
.room-link {
  color: var(--ink);
}
.hand .card:disabled {
  opacity: 0.82;
}
.eight-mark {
  color: var(--ink);
}
.sidebar .primary {
  background: var(--chrome-ink);
  color: var(--page-bg);
}
.table-area .primary {
  background: var(--table-ink);
  color: var(--green);
}
.pip-art {
  position: absolute;
  inset: 23px 18px;
  pointer-events: none;
}
.pip {
  position: absolute;
  font-size: 17px;
  line-height: 1;
  font-family: Georgia, serif;
}
.ace-art .pip {
  font-size: 40px;
}
.court-frame {
  position: absolute;
  inset: 20px 16px;
  pointer-events: none;
}
svg.court-art {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
.card-back {
  background: #7d304b url("assets/card-back.svg") center/100% 100% no-repeat;
  border: 0;
  box-shadow:
    3px 3px 0 #e2d1bb,
    6px 6px 0 #a8927d,
    0 8px 14px #0004;
}
.draw-deck {
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}
.draw-deck:disabled {
  opacity: 1;
}
.draw-deck:not(:disabled) {
  outline: 2px solid #f3cd9d;
  outline-offset: 5px;
}
.draw-deck:not(:disabled):hover {
  transform: translateY(-5px) rotate(-3deg);
  box-shadow:
    3px 5px 0 #e2d1bb,
    6px 8px 0 #a8927d,
    0 12px 20px #0004;
}
.draw-deck:not(:disabled):active {
  transform: translateY(-1px) scale(0.98);
}
.hand .card {
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.hand .card:not(:disabled):hover {
  transform: translateY(-9px) rotate(-2deg);
}
@media (max-width: 600px) {
  .appearance {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .swatches {
    gap: 8px;
  }
  .swatch {
    width: 24px;
    height: 24px;
  }
  .swatches input[type="color"] {
    width: 27px;
    height: 29px;
    margin-left: 0;
  }
  .hand .pip-art {
    inset: 18px 14px;
  }
  .hand .pip {
    font-size: 12px;
  }
  .hand .ace-art .pip {
    font-size: 29px;
  }
  .hand .court-frame {
    inset: 16px 13px;
  }
  .hand-heading {
    min-height: 24px;
  }
  .winner {
    color: var(--table-ink);
  }
}
@media (max-width: 360px) {
  .appearance {
    grid-template-columns: 1fr;
  }
  .swatches {
    gap: 12px;
  }
}
.championship-setup {
  display: grid;
  gap: 10px;
  grid-column: 1/-1;
}
.championship-setup .secondary {
  font-size: 13px;
  padding: 10px 8px;
  width: 100%;
}
.championship-setup label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.championship-setup select {
  width: 95px;
  height: 34px;
}
.standings {
  border-top: 1px solid color-mix(in srgb, var(--chrome-ink) 15%, transparent);
  padding-top: 15px;
}
.standings summary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
.standings summary::-webkit-details-marker {
  display: none;
}
.standings ol {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 10px;
}
.standings li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  min-height: 30px;
}
.standings li > span {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-wrap: anywhere;
  min-width: 0;
}
.standings strong {
  white-space: nowrap;
  font-size: 15px;
}
.standings strong span {
  font-size: 11px;
}
.standings svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.champion-row {
  color: #d59121;
  font-weight: 700;
}
.championship-sidebar .roster {
  display: none;
}
.taunt-stage {
  height: 44px;
  position: absolute;
  top: 8px;
  left: 100px;
  right: 100px;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  pointer-events: none;
}
.taunt-bubble {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #fffdf8;
  color: #202b27;
  padding: 7px 18px;
  border-radius: 6px;
  box-shadow: 0 3px 12px #0003;
  animation: taunt-pop 0.22s ease-out;
}
.taunt-bubble.red .taunt-symbol {
  color: var(--red);
}
.taunt-symbol {
  font-family: Georgia, serif;
  font-size: 30px;
}
.taunt-bubble small {
  display: block;
  font-size: 10px;
  max-width: 200px;
  overflow-wrap: anywhere;
}
.taunt-bubble strong {
  font-size: 17px;
}
.taunt-bubble {
  max-width: 100%;
  min-width: 0;
}
.taunt-bubble > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.taunt-bubble.long-shout strong {
  font-size: 12px;
  line-height: 1.35;
  display: block;
}
.taunt-stage:has(.long-shout) {
  align-items: flex-start;
  top: 42px;
  left: 12px;
  right: 12px;
  height: auto;
}
.taunt-symbol {
  flex-shrink: 0;
}
.taunt-toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin: 0 0 4px;
  flex-wrap: wrap;
}
.taunt-button {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  background: #fffdf8;
  color: #202b27;
  padding: 7px 13px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  min-height: 34px;
  transition: transform 0.15s;
}
.taunt-button > span {
  font-size: 20px;
  font-family: Georgia, serif;
}
.taunt-button.red > span {
  color: var(--red);
}
.taunt-button:not(:disabled):hover {
  transform: translateY(-3px);
}
.taunt-toolbar .icon-button {
  width: 34px;
  height: 34px;
  color: var(--table-ink);
}
.turn-title svg {
  vertical-align: middle;
  color: #e4b34f;
  margin-right: 8px;
}
@keyframes taunt-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@media (max-width: 600px) {
  .championship-setup {
    grid-template-columns: 1fr 90px;
    align-items: end;
    gap: 12px;
  }
  .championship-setup label {
    display: grid;
    gap: 4px;
  }
  .championship-setup select {
    width: 100%;
    height: 42px;
  }
  .room-sidebar .standings {
    padding-top: 8px;
    border: 0;
    margin-top: 8px;
  }
  .room-sidebar .standings summary {
    font-size: 12px;
  }
  .room-sidebar .standings ol {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
  }
  .room-sidebar .standings li {
    font-size: 11px;
    flex: 1 1 40%;
    min-height: 22px;
  }
  .taunt-stage {
    height: 36px;
    top: 4px;
    left: 76px;
    right: 70px;
  }
  .taunt-bubble {
    padding: 5px 12px;
  }
  .taunt-toolbar {
    gap: 5px;
    min-height: 40px;
    margin-bottom: 5px;
  }
  .taunt-button {
    padding: 6px 8px;
    font-size: 11px;
    gap: 4px;
  }
  .taunt-button > span {
    font-size: 17px;
  }
  .taunt-toolbar .icon-button {
    width: 28px;
    height: 32px;
  }
  .table {
    gap: 8px;
    padding: 6px 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .taunt-bubble {
    animation: none;
  }
  .taunt-button {
    transition: none;
  }
}

.taunt-stage,
.taunt-stage:has(.long-shout) {
  position: relative;
  inset: auto;
  height: auto;
  min-height: 90px;
  width: 100%;
  max-width: 600px;
  margin: 2px auto 10px;
  align-items: center;
}
.taunt-bubble {
  position: relative;
  padding: 12px 18px;
  gap: 12px;
  background: #ffed87;
  border: 2px solid #202b27;
  color: #202b27;
  box-shadow: 0 5px 0 #0003;
}
.taunt-bubble::after {
  content: "";
  position: absolute;
  bottom: -11px;
  left: 30px;
  width: 16px;
  height: 16px;
  background: #ffed87;
  border-right: 2px solid #202b27;
  border-bottom: 2px solid #202b27;
  transform: rotate(45deg);
}
.speech-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #202b27;
  color: white;
  font-weight: 800;
  font-size: 20px;
}
.taunt-bubble small {
  font-size: 12px;
  font-weight: 700;
}
.taunt-bubble strong {
  font-size: 24px;
}
.taunt-bubble.long-shout strong {
  font-size: 16px;
}
.taunt-symbol {
  font-size: 38px;
}
.taunt-toolbar {
  flex-wrap: wrap;
}
.reactions-button {
  background: #ffed87;
  color: #202b27;
  font-weight: 800;
  min-height: 36px;
  padding: 6px 12px;
}
@media (max-width: 600px) {
  .taunt-stage,
  .taunt-stage:has(.long-shout) {
    min-height: 96px;
  }
  .taunt-bubble {
    padding: 10px 12px;
    gap: 8px;
  }
  .taunt-bubble strong {
    font-size: 20px;
  }
  .taunt-bubble.long-shout strong {
    font-size: 14px;
  }
  .speech-avatar {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }
  .taunt-symbol {
    font-size: 30px;
  }
  .taunt-toolbar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .reactions-button {
    grid-column: 1 / 4;
    justify-content: center;
  }
  .taunt-toolbar .icon-button {
    justify-self: center;
  }
}

/* Casino dealer intro */
.dealer-intro {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 50% 30%, #7a3b2ef0 0%, #3a1646f2 55%, #12081cfa 100%);
  backdrop-filter: blur(6px);
  cursor: pointer;
  perspective: 1000px;
}
.dealer-spot {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, #ffd98a55, transparent 45%),
    radial-gradient(circle at 20% 80%, #ff5fa233, transparent 35%),
    radial-gradient(circle at 80% 70%, #5fd0ff2e, transparent 35%);
}
.dealer-stage {
  position: relative;
  width: min(620px, 96vw);
  height: min(560px, 72vh);
  margin-top: 70px;
  transform-style: preserve-3d;
}
.dealer-figure {
  position: absolute;
  left: 50%;
  top: 0;
  width: 64%;
  transform-origin: 50% 100%;
  margin-left: -32%;
  filter: drop-shadow(0 22px 22px #0008);
}
.dealer-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.dealer-head,
.dealer-arm {
  transform-box: fill-box;
}
.dealer-head {
  transform-origin: 50% 90%;
}
.dealer-felt {
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: 0;
  height: 40%;
  border-radius: 50% 50% 0 0 / 70% 70% 0 0;
  background: radial-gradient(ellipse at 50% 20%, #2e8b6c, #14513f 75%);
  box-shadow: inset 0 12px 30px #0007, 0 -4px 0 #7a4a24, 0 -10px 0 #b9783c, 0 -14px 24px #0008;
  overflow: visible;
}
.dealer-rim {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 6px 0 #fff2;
}
.dealer-deck {
  position: absolute;
  left: 50%;
  top: 22%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}
.dealer-half,
.dealer-pile {
  position: absolute;
  left: 0;
  top: 0;
  transform-style: preserve-3d;
}
.dealer-card {
  position: absolute;
  width: 72px;
  height: 104px;
  margin: -52px 0 0 -36px;
  border-radius: 8px;
  background: #7d304b url("assets/card-back.svg") center/100% 100% no-repeat;
  box-shadow: 0 2px 6px #0007, inset 0 0 0 1px #fff5;
  will-change: transform;
}
.dealer-pile {
  width: 72px;
  height: 104px;
  margin: -52px 0 0 -36px;
  border-radius: 6px;
  background: #7d304b url("assets/card-back.svg") center/100% 100% no-repeat;
  box-shadow: 0 1px 0 #3b1624, 0 3px 0 #fffaf4, 0 4px 0 #3b1624, 0 6px 0 #fffaf4, 0 8px 12px #000a;
  transform: rotateX(58deg);
}
.dealer-card.tossed {
  left: 50%;
  top: 25%;
  opacity: 0;
}
.dealer-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -34px;
  text-align: center;
  color: #ffe9b0;
  font: 800 20px/1 Georgia, serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 #7a4a24, 0 0 16px #ffd98a88;
}

.dealer-room {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.dealer-window {
  position: absolute;
  top: 18%;
  width: 11vw;
  max-width: 130px;
  min-width: 56px;
  height: 34vh;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(#ffd98a, #ff8fb1 55%, #7a5cff);
  opacity: 0.55;
  box-shadow: 0 0 60px 10px #ffb86b88, inset 0 0 0 5px #ffffff22;
  animation: dealer-glow 2.4s ease-in-out infinite alternate;
}
.dealer-window:nth-child(1) { left: 4%; }
.dealer-window:nth-child(2) { left: 17%; animation-delay: -0.8s; background: linear-gradient(#a8f0ff, #6aa8ff 60%, #b05cff); }
.dealer-window:nth-child(3) { right: 17%; animation-delay: -1.2s; }
.dealer-window:nth-child(4) { right: 4%; animation-delay: -0.4s; background: linear-gradient(#a8f0ff, #6aa8ff 60%, #b05cff); }
.dealer-bokeh {
  position: absolute;
  border-radius: 50%;
  filter: blur(3px);
  animation: dealer-glow 2s ease-in-out infinite alternate;
}
.dealer-chandelier {
  position: absolute;
  left: 50%;
  top: 0;
  width: min(300px, 60vw);
  margin-left: calc(min(300px, 60vw) / -2);
  height: auto;
  filter: drop-shadow(0 0 28px #ffd98acc);
  animation: dealer-sway 3.4s ease-in-out infinite alternate;
  transform-origin: 50% 0;
}
@keyframes dealer-glow {
  from { opacity: 0.35; transform: scale(0.96); }
  to { opacity: 0.85; transform: scale(1.04); }
}
@keyframes dealer-sway {
  from { transform: rotate(-1.4deg); }
  to { transform: rotate(1.4deg); }
}
.dealer-felt::before {
  content: "";
  position: absolute;
  inset: 8px 14px 0;
  border-radius: inherit;
  border: 2px solid #f2c45288;
  border-bottom: 0;
}
.dealer-felt::after {
  content: "\2660   \2665   \2663   \2666";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  text-align: center;
  color: #f2c45299;
  font: 22px/1 Georgia, serif;
  letter-spacing: 0.4em;
}

.play-hand {
  position: absolute;
  pointer-events: none;
  will-change: transform;
}
.play-hand-arm {
  position: absolute;
  left: 50%;
  top: 50%;
  filter: drop-shadow(0 8px 10px #0006);
}
.play-hand-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  margin-top: -2%;
}

/* ---------- Casino atmosphere ---------- */
.table-area {
  --table-ink: #fff;
  color: #fff;
  background: linear-gradient(180deg, #0d0a1f 0%, #1a1038 38%, #0b0712 100%);
  isolation: isolate;
  perspective: 1200px;
}
.table-area > * {
  position: relative;
  z-index: 2;
}
.table-area > .casino-bg,
.table-area > .felt-3d,
.table-area > .chips-layer {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}
.table-area .pile-label,
.table-area .opponent-count,
.table-area .turn-detail,
.table-area .table-heading {
  text-shadow: 0 1px 8px #000b;
}
.casino-bg {
  inset: -4% -4% 40% -4%;
  transform: translate(calc(var(--px, 0) * -14px), calc(var(--py, 0) * -8px));
  transition: transform 0.5s ease-out;
  background:
    radial-gradient(ellipse at 20% 30%, #ff9a3c44, transparent 40%),
    radial-gradient(ellipse at 80% 25%, #3d7bff44, transparent 42%),
    radial-gradient(ellipse at 50% 0%, #ff4f6d33, transparent 50%);
}
.bokeh-layer {
  position: absolute;
  inset: 0;
}
.bokeh {
  position: absolute;
  border-radius: 50%;
  filter: blur(5px);
  opacity: 0.45;
  mix-blend-mode: screen;
  animation: bokeh-pulse 4s ease-in-out infinite alternate;
}
@keyframes bokeh-pulse {
  from { opacity: 0.18; transform: scale(0.9) translateY(0); }
  to { opacity: 0.62; transform: scale(1.1) translateY(-8px); }
}
.light-sweep {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, #ffffff14 50%, transparent 62%);
  background-size: 250% 100%;
  animation: sweep 7s linear infinite;
}
@keyframes sweep {
  from { background-position: 150% 0; }
  to { background-position: -100% 0; }
}
.felt-3d {
  left: -12%;
  right: -12%;
  top: 22%;
  bottom: -28%;
  transform-origin: 50% 0;
  transform: rotateX(calc(34deg + var(--py, 0) * 2deg)) rotateY(calc(var(--px, 0) * 2.5deg));
  transition: transform 0.5s ease-out;
  background:
    radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--green) 78%, #fff) 0%, var(--green) 45%, color-mix(in srgb, var(--green) 40%, #000) 100%);
  border-top: 14px solid transparent;
  border-image: linear-gradient(90deg, #5a5f6b, #e9edf5, #8b919d, #e9edf5, #5a5f6b) 1;
  border-radius: 0;
  box-shadow: 0 -18px 50px #0009, inset 0 30px 60px #0006;
}
.felt-shine {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(45deg, #ffffff06 0 2px, transparent 2px 6px),
    radial-gradient(ellipse at 50% 0%, #ffffff22, transparent 55%);
}
.chips-layer {
  inset: 0;
  transform: translate(calc(var(--px, 0) * 22px), calc(var(--py, 0) * 10px));
  transition: transform 0.45s ease-out;
}
.chip-stack {
  position: absolute;
  bottom: 24%;
  width: 56px;
  height: 90px;
  filter: drop-shadow(0 10px 8px #0008);
}
.chip-stack.left { left: 3%; }
.chip-stack.left.two { left: 9%; bottom: 20%; transform: scale(0.85); }
.chip-stack.right { right: 4%; bottom: 22%; }
.chip-stack.right.two { right: 10%; bottom: 27%; transform: scale(0.8); }
.chip-stack i {
  position: absolute;
  left: 0;
  bottom: calc(var(--i) * 7px);
  width: 56px;
  height: 22px;
  border-radius: 50%;
  background:
    repeating-conic-gradient(#fff 0 12deg, transparent 12deg 30deg) center/100% 100% no-repeat,
    var(--c);
  box-shadow: inset 0 0 0 3px var(--c), inset 0 0 0 5px #fff8, 0 3px 0 color-mix(in srgb, var(--c) 55%, #000);
  animation: chip-bob 3.6s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * -0.18s);
}
@keyframes chip-bob {
  from { transform: translateY(0); }
  to { transform: translateY(-2px); }
}
@media (max-width: 760px) {
  .chips-layer { display: none; }
}

/* fanned hand */
.hand-area {
  position: relative;
  border-top: 0;
  padding-bottom: 0;
  overflow: visible;
}
.hand {
  position: relative;
  display: block;
  height: 210px;
  min-height: 0;
  padding: 0;
}
.hand .card {
  position: absolute;
  left: 50%;
  bottom: 28px;
  margin-left: -42px;
  transform-origin: 50% 360%;
  transform: translateY(var(--y, 0)) rotate(var(--r, 0deg)) scale(var(--s, 1));
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 0.2s;
  box-shadow: 0 8px 18px #0008;
}
.hand .card:not(:disabled):hover,
.hand .card.selected {
  transform: translateY(var(--y, 0)) rotate(var(--r, 0deg)) scale(var(--s, 1));
}
.hand .card.fan-focus:not(:disabled) {
  box-shadow: 0 0 0 3px #ffd98a, 0 0 28px #ffd98aaa, 0 18px 26px #000a;
}
@media (max-width: 600px) {
  .hand { height: 160px; }
  .hand .card { margin-left: -31px; transform-origin: 50% 310%; bottom: 22px; }
}
.hand-rig {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -26px;
  height: 120px;
  pointer-events: none;
  z-index: 200;
}
.rig-hand {
  position: absolute;
  bottom: 0;
  width: 92px;
  transform: translate(var(--hx, 0), var(--hy, 0)) rotate(var(--hr, 0deg));
  transform-origin: 50% 100%;
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
  filter: drop-shadow(0 8px 10px #000a);
}
.rig-left { left: calc(50% - 215px - 46px); --hr: 22deg; }
.rig-right { left: calc(50% + 215px - 46px); --hr: -22deg; }
.rig-right .play-hand-svg { transform: scaleX(-1); }
.rig-hand .play-hand-svg { width: 100%; margin: 0; }
@media (max-width: 600px) {
  .rig-hand { width: 64px; }
  .rig-left { left: calc(50% - 130px - 32px); }
  .rig-right { left: calc(50% + 130px - 32px); }
}
.opponent.active {
  box-shadow: 0 0 24px #ffd98a88;
  border-color: #ffd98a;
}
.mini-card {
  transform: rotate(calc((var(--k, 0) - 2) * 7deg));
}

.hand-heading {
  justify-content: center;
  position: relative;
  z-index: 3;
  text-shadow: 0 1px 8px #000b;
}

/* three.js lounge behind the table */
.room3d {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  display: none;
}
#app {
  position: relative;
  z-index: 1;
}
.masthead {
  position: relative;
  z-index: 2;
}
body.has-room3d .table-area {
  background: transparent;
}
body.has-room3d .casino-bg,
body.has-room3d .felt-3d,
body.has-room3d .chips-layer {
  display: none;
}
body.has-room3d .table-area::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 62%, transparent 40%, #0009 100%);
}

/* Playable and unplayable cards look identical: no hints, you have to think */
.hand .card,
.hand .card:disabled,
.hand .card:not(:disabled) {
  opacity: 1;
  border: 1px solid #dae1dc;
}
.hand .card.fan-focus,
.hand .card.fan-focus:not(:disabled) {
  box-shadow: 0 14px 24px #000a;
}
.draw-deck:disabled,
.draw-deck:not(:disabled) {
  outline: none;
  opacity: 1;
}
.draw-deck:hover,
.draw-deck:disabled:hover {
  transform: translateY(-4px) rotate(-2deg);
}
.draw-deck {
  cursor: pointer;
}
.hand .card {
  cursor: pointer;
}

/* phones: horizontal drags scrub the fan instead of scrolling; vertical drags still scroll the page */
.hand-area {
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
.hand .card {
  touch-action: pan-y;
}

/* phones: fit the whole table and the hand on one screen so you never scroll mid-game */
@media (max-width: 600px) {
  .table-area {
    padding: 8px 12px 0;
  }
  .table-heading {
    min-height: 24px;
  }
  .table {
    min-height: 0;
    gap: 4px;
    padding: 0;
  }
  .opponents {
    min-height: 0;
  }
  .opponent .avatar {
    width: 26px;
    height: 26px;
  }
  .opponent-name {
    margin: 2px 0;
  }
  .center-piles {
    min-height: 0;
    gap: 22px;
  }
  .center-piles .card {
    width: 66px;
    height: 94px;
  }
  .turn-banner {
    padding: 0;
  }
  .taunt-toolbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    min-height: 34px;
    margin: 2px 0;
    scrollbar-width: none;
  }
  .taunt-toolbar::-webkit-scrollbar {
    display: none;
  }
  .taunt-toolbar > * {
    flex: none;
  }
  .hand-area {
    padding: 0;
  }
  .hand-heading {
    margin-bottom: 0;
    font-size: 12px;
  }
  .hand {
    height: 150px;
  }
  .hand .card {
    bottom: 18px;
  }
  .hand-rig {
    bottom: -30px;
  }
}
@media (max-width: 600px) {
  .table-area .taunt-toolbar {
    flex-wrap: nowrap;
    min-height: 32px;
    height: 36px;
  }
  .table-area .taunt-button {
    padding: 4px 7px;
  }
  .table-area .reactions-button {
    padding: 4px 9px;
  }
  .hand {
    height: 132px;
  }
  .hand .card {
    bottom: 8px;
  }
}
