:root {
  color-scheme: dark;
  --paper: #f2eddf;
  --navy: #20263e;
  --gold: #e9b967;
  --felt: #245348;
  --ink: #f2eddf;
  --muted: #bdc8b9;
  --line: #66786e;
  --accent: #e9b967;
  font-family: ui-monospace, 'SFMono-Regular', 'PingFang SC', monospace;
  color: var(--paper);
  background: #111824;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: 16px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.48;
}
button,
select,
input,
textarea {
  border-radius: 4px;
}
button:focus-visible,
select:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h2 {
  font-size: 24px;
}
p {
  line-height: 1.65;
}
small,
.fine {
  font-size: 12px;
  line-height: 1.6;
}
.fine,
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold);
}
.screen {
  max-width: 1800px;
  margin: auto;
  min-height: calc(100dvh - 32px);
  border-radius: 9px;
  position: relative;
  isolation: isolate;
  overflow: clip;
  background:
    radial-gradient(ellipse at 5% 0%, #3b3150, transparent 52%),
    radial-gradient(ellipse at 95% 30%, #30334b, transparent 55%), #161e2a;
}
.primary,
.secondary,
.quiet,
.pixel-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 15px;
  border: 2px solid #93818a;
  color: #f3ebda;
  background: #3f394f;
  box-shadow: 0 4px 0 #101723;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
}
.primary {
  background: #b95260;
  border-color: #e59693;
}
.secondary {
  background: #39364b;
}
.quiet {
  background: #254c43;
  border-color: #72867b;
}
.primary:active,
.secondary:active,
.quiet:active,
.pixel-button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #101723;
}
button:hover:not(:disabled) {
  filter: brightness(1.1);
}
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.menu-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 280px;
}
.menu-actions > button {
  width: 100%;
  min-height: 49px;
  justify-content: flex-start;
  padding-left: 20px;
}
.notice {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5000;
  max-width: min(650px, 90vw);
  background: #eeddb0;
  color: #302b3b;
  border: 2px solid #bd9a5e;
  padding: 14px 22px;
  box-shadow: 5px 7px 0 #101723cc;
}
.menu-table,
.felt {
  position: absolute;
  inset: 111px -75px -150px;
  border: 12px solid #655365;
  border-radius: 44% 44% 0 0 / 23% 23% 0 0;
  background: radial-gradient(ellipse at 60% 30%, #2e655a, transparent 68%), var(--felt);
  box-shadow:
    0 -4px 0 #c59970,
    0 -13px 0 #242539,
    inset 0 7px 0 #122b2a88;
  pointer-events: none;
  z-index: -1;
}
.felt:after,
.menu-table:after {
  content: '';
  position: absolute;
  inset: 10px;
  border: 2px solid #c9b77550;
  border-radius: inherit;
}
.menu-table {
  inset: 48% -14% -45%;
  border-radius: 50% 50% 0 0;
}
.menu-layout {
  max-width: 1120px;
  min-height: calc(100dvh - 84px);
  padding: 65px 50px 85px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin: auto;
}
.menu-copy h1 {
  font-size: clamp(54px, 7vw, 96px);
  letter-spacing: 0.04em;
  text-shadow: 5px 6px 0 #171b2b;
  margin: 16px 0 10px;
}
.tagline {
  color: #dacdaf;
  margin-bottom: 35px;
}
.menu-summary {
  font-size: 12px;
  max-width: 330px;
  line-height: 1.8;
  margin: 25px 0 0;
  color: #c6d1be;
}
.menu-art {
  position: relative;
  width: 100%;
  height: 380px;
  pointer-events: none;
}
.menu-art .mini {
  position: absolute;
  width: 165px;
  height: 247px;
  left: 50%;
  top: 55px;
  filter: drop-shadow(9px 16px 0 #0e242558);
  transform-origin: 50% 110%;
}
.menu-art .mini:nth-child(1) {
  transform: translateX(-115%) rotate(-23deg);
}
.menu-art .mini:nth-child(2) {
  transform: translateX(-78%) rotate(-7deg);
}
.menu-art .mini:nth-child(3) {
  transform: translateX(-39%) rotate(10deg);
}
.menu-art .mini:nth-child(4) {
  transform: translateX(0) rotate(24deg);
}
.menu-art .mini .corner {
  font-size: 32px;
  width: 40px;
}
.menu-art .mini .corner .suit {
  font-size: 36px;
}
.menu-art .mini .illustration {
  left: 43px;
  right: 12px;
  top: 14px;
  bottom: 14px;
}
.menu-art .mini .joker-art {
  left: 27px;
  right: 8px;
  top: 10px;
  bottom: 10px;
}
.menu-art .mini .joker-index {
  width: 30px;
  height: 47px;
}
.menu-footer {
  position: absolute;
  bottom: 20px;
  left: 30px;
  right: 30px;
  display: flex;
  justify-content: space-between;
  color: #c3c8b2;
  font-size: 11px;
  letter-spacing: 0.04em;
  align-items: center;
}
.menu-footer .audio-toggle { font-size: 11px; min-height: 34px; padding: 6px 10px; color: #e5d2a7; }
.settings-screen {
  padding: 32px 42px;
}
.page-heading {
  display: flex;
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid #77787a55;
  padding-bottom: 24px;
  margin-bottom: 25px;
}
.page-heading h1 {
  margin: 0;
  font-size: 30px;
}
.language-picker {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.65fr);
  gap: 35px;
  max-width: 1300px;
  margin: auto;
}
.settings-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.settings-card {
  padding: 22px;
  background: #1f3435;
  border: 1px solid #6c7b6966;
  border-radius: 6px;
}
.settings-card h2 {
  font-size: 19px;
}
.seat-form {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid #78887444;
}
.seat-form > div:last-child.provider-options {
  grid-column: 2;
}
.seat-letter {
  display: grid;
  place-items: center;
  width: 36px;
  height: 40px;
  background: #4d6757;
  border: 2px solid #80967b;
  border-radius: 3px;
  margin-top: 20px;
}
.seat-letter.team-1 {
  background: #55485c;
  border-color: #92778c;
}
.seat-form label,
.provider-options > label {
  display: block;
  color: #d1d2c0;
  font-size: 12px;
  margin: 0 0 6px;
}
.seat-form .setup-seat-heading {
  color: var(--paper);
  font-size: 16px;
  font-weight: 700;
}
.setup-seat-position {
  margin: 0 0 10px;
  color: #d1d2c0;
  font-size: 12px;
}
.provider-options {
  max-width: 100%;
}
.option-row {
  display: flex !important;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin: 14px 0;
  font-size: 13px !important;
}
.option-row input[type='checkbox'] {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
  min-height: 0;
}
.option-row input[type='number'] {
  width: 110px;
}
.option-row select {
  width: min(235px, 62%);
}
input,
select,
textarea {
  border: 1px solid #7b8277;
  background: #172c2c;
  color: var(--paper);
  padding: 10px;
  min-height: 42px;
  max-width: 100%;
}
select {
  width: 100%;
}
.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}
.preset {
  border: 1px solid #788573;
  background: #2d5046;
  color: var(--paper);
  padding: 8px 11px;
  min-height: 38px;
}
.options,
.model-catalog {
  border: 1px solid #64776788;
  border-radius: 5px;
  padding: 14px;
  margin: 15px 0;
}
.options summary,
.model-catalog summary {
  cursor: pointer;
  font-weight: 700;
}
.model-catalog table {
  font-size: 11px;
  width: 100%;
  margin: 18px 0;
  border-collapse: collapse;
}
.model-catalog th,
.model-catalog td {
  padding: 8px 6px;
  text-align: left;
  border-bottom: 1px solid #66786e44;
}
.model-catalog small {
  display: block;
}
.start {
  margin-top: 15px;
}
.connection-note {
  display: block;
  margin-top: 8px;
  color: #c4ccb8;
}
.provider-options .model-label {
  margin-top: 14px;
}
.game-screen {
  min-height: 0;
}
.pixel-game {
  position: relative;
  height: max(740px, calc(100dvh - 32px));
  min-height: 740px;
  overflow: clip;
  border-radius: inherit;
  isolation: isolate;
  --card-w: 100px;
  --card-h: 150px;
}
.game-top {
  position: absolute;
  top: 18px;
  left: 22px;
  right: 22px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  z-index: 50;
}
.game-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.game-tools .quiet {
  background: #3f394f;
  border-color: #8c7d80;
}
.game-tools button[aria-pressed='true'] {
  border-color: var(--gold);
  color: #ffe5a8;
}
.match-tag {
  display: block;
  font-size: 11px;
  color: #c9c5b7;
  margin-top: 9px;
}
.trump-marker {
  position: absolute;
  left: 31px;
  top: 132px;
  z-index: 8;
  display: flex;
  gap: 12px;
  align-items: center;
  transform: rotate(-3deg);
}
.trump-tile {
  display: grid;
  place-content: center;
  text-align: center;
  background: var(--paper);
  color: var(--navy);
  width: 61px;
  height: 88px;
  border: 2px solid #c4b596;
  border-radius: 3px;
  box-shadow: 4px 5px 0 #13242388;
  font-size: 24px;
  line-height: 1.25;
}
.trump-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 130px;
  font-size: 13px;
}
.trump-copy small {
  font-size: 10px;
  color: #cdd2b9;
}
.score-ticket {
  position: absolute;
  right: 28px;
  top: 139px;
  z-index: 8;
  padding: 10px 16px;
  background: #dfd2a8;
  color: #353146;
  border: 2px solid #bba176;
  box-shadow: 4px 5px 0 #13242388;
  transform: rotate(3deg);
  font-size: 14px;
}
.score-ticket strong {
  display: block;
  font-size: 31px;
  line-height: 1.3;
}
.score-ticket strong small {
  font-size: 22px;
}
.score-ticket > span:last-child {
  font-size: 11px;
}
.seat {
  position: absolute;
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
  max-width: 150px;
}
.seat.north {
  top: 29px;
  left: 50%;
  transform: translateX(-50%);
}
.seat.west {
  left: 22px;
  top: 36%;
}
.seat.east {
  right: 22px;
  top: 36%;
}
.seat.south {
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
}
.seat.self-seat {
  display: none;
}
.portrait {
  width: 65px;
  height: 76px;
  image-rendering: pixelated;
  filter: drop-shadow(4px 5px 0 #131b2888);
}
.seat-name {
  background: #1b2533;
  padding: 6px 10px;
  box-shadow: 3px 4px 0 #131b28;
  font-weight: 650;
}
.seat-role {
  font-size: 12px;
  color: #c4ccb4;
  max-width: 145px;
  overflow-wrap: anywhere;
}
.seat-count {
  font-size: 16px;
  color: #d4ceba;
}
.dealer {
  position: absolute;
  top: 49px;
  left: calc(50% + 40px);
  border: 4px double #765337;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: #e5bc6c;
  color: #45363b;
}
.seat.active .seat-name {
  outline: 2px solid #e9c169;
}
.seat.thinking .portrait {
  animation: thinking-pulse 1.2s ease-in-out infinite;
}
.thinking-dots {
  position: absolute;
  top: 0;
  right: -10px;
  display: flex;
  gap: 3px;
}
.thinking-dots i {
  display: block;
  width: 4px;
  height: 4px;
  background: #f0d17c;
  animation: thinking-pulse 1s infinite;
}
.thinking-dots i:nth-child(2) {
  animation-delay: 0.15s;
}
.thinking-dots i:nth-child(3) {
  animation-delay: 0.3s;
}
.backs {
  display: flex;
  height: 29px;
  padding-right: 12px;
}
.backs .card-back {
  width: 22px;
  height: 30px;
  margin-right: -12px;
  transform: rotate(-5deg);
}
.backs .card-back:nth-child(even) {
  transform: rotate(5deg);
}
.won-marker {
  border: 1px solid #bab187;
  background: #1c3f36;
  color: #e9d8a4;
  border-radius: 3px;
  font-size: 10px;
  padding: 4px 8px;
}
.face {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 4px;
  border: 2px solid #c7bea8;
  background: var(--paper);
  box-shadow: 3px 5px 0 #102b2788;
  color: #202943;
  pointer-events: none;
}
.face[data-suit='H'],
.face[data-suit='D'] {
  color: #bf274e;
}
body[data-four-color='on'] .face[data-suit='D'] {
  color: #c34e1c;
}
body[data-four-color='on'] .face[data-suit='C'] {
  color: #12634f;
}
.corner {
  position: absolute;
  left: 3px;
  top: 3px;
  z-index: 4;
  width: 27px;
  display: flex;
  flex-direction: column;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.03;
  background: var(--paper);
}
.corner .suit {
  font-size: 25px;
}
.corner.bottom {
  left: auto;
  right: 3px;
  top: auto;
  bottom: 3px;
  transform: rotate(180deg);
}
.pips {
  position: absolute;
  left: 34px;
  right: 10px;
  top: 17px;
  bottom: 19px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  font-weight: 700;
}
.pip {
  position: absolute;
  transform: translate(-50%, -50%);
  font-style: normal;
  line-height: 1;
}
.pip.flip {
  transform: translate(-50%, -50%) rotate(180deg);
}
.pips.ace {
  font-size: 47px;
}
.illustration,
.joker-index,
.card-back {
  background-image: url('/assets/cards/pixel-court.webp');
  background-size: 400% 400%;
  image-rendering: pixelated;
}
.illustration {
  position: absolute;
  left: 29px;
  right: 6px;
  top: 9px;
  bottom: 9px;
}
.joker-art {
  left: 19px;
  right: 4px;
  top: 7px;
  bottom: 7px;
}
.joker-index {
  position: absolute;
  left: 2px;
  top: 4px;
  width: 24px;
  height: 37px;
  z-index: 4;
}
.card-back {
  display: block;
  width: 100%;
  height: 100%;
  background-position: 66.666667% 100%;
  background-color: var(--paper);
  border: 2px solid #dfd6ba;
  border-radius: 3px;
  box-shadow: 2px 3px 0 #101d2966;
}
.mini {
  display: block;
  position: relative;
  width: 57px;
  height: 85px;
  flex: 0 0 auto;
}
.mini .corner {
  font-size: 13px;
  left: 3px;
  top: 2px;
  width: 17px;
}
.mini .corner .suit {
  font-size: 15px;
}
.mini .corner.bottom {
  left: auto;
  right: 3px;
  top: auto;
  bottom: 2px;
}
.mini .illustration {
  left: 19px;
  right: 4px;
  top: 4px;
  bottom: 4px;
}
.mini .joker-art {
  left: 12px;
  right: 3px;
  top: 4px;
  bottom: 4px;
}
.mini .joker-index {
  width: 13px;
  height: 21px;
  left: 1px;
  top: 3px;
}
.mini .pips {
  left: 21px;
  right: 6px;
  top: 12px;
  bottom: 13px;
  font-size: 13px;
}
.mini .pips.ace {
  font-size: 28px;
}
.deck-center {
  position: absolute;
  top: 33%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 15px;
  z-index: 10;
  text-align: center;
  color: #e2d7b7;
}
.deck-stack {
  width: 66px;
  height: 96px;
  position: relative;
  margin-bottom: 8px;
}
.deck-stack .card-back {
  position: absolute;
  inset: 0;
}
.deck-stack .card-back:first-child {
  transform: rotate(-10deg) translate(-6px, -3px);
}
.deck-stack .card-back:nth-child(2) {
  transform: rotate(9deg) translate(5px, -3px);
}
.closing-clock {
  font-size: 26px;
  color: #f3d083;
}
.kitty-pocket {
  position: absolute;
  left: 27px;
  bottom: 245px;
  display: flex;
  gap: 5px;
  align-items: center;
  font-size: 10px;
  color: #cfc6aa;
  z-index: 12;
}
.kitty-pocket .card-back {
  width: 25px;
  height: 37px;
}
.kitty-pocket .card-back + .card-back {
  margin-left: -17px;
}
.played-slot {
  position: absolute;
  transform: translateX(-50%);
  z-index: 12;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  max-width: 30%;
}
.played-slot.north {
  left: 50%;
  top: 33%;
}
.played-slot.west {
  left: 24%;
  top: 46%;
}
.played-slot.east {
  left: 76%;
  top: 46%;
}
.played-slot.south {
  left: 50%;
  top: 57%;
}
.played-fan {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: none;
  color: var(--paper);
  isolation: isolate;
}
.flip-card {
  display: block;
  width: 57px;
  height: 85px;
  perspective: 400px;
}
.flip-card + .flip-card {
  margin-left: -17px;
}
.flip-inner {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}
.card-front,
.flip-inner > .card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
}
.flip-inner > .card-back {
  transform: rotateY(180deg);
}
.play-caption {
  font-size: 10px;
  color: #d9cfb4;
  text-align: center;
  max-width: 210px;
}
.fan-overflow {
  font-size: 11px;
  padding: 5px;
  border: 1px solid #b8b18a;
  background: #273743;
  margin-left: 4px;
}
.played-slot[data-phase='flip'] .flip-inner {
  animation: flip-cards 0.3s both;
}
.played-slot[data-phase='collect'] .flip-inner {
  transform: rotateY(180deg);
}
.played-slot[data-phase='collect'] .played-fan {
  animation: collect-cards 0.45s both;
}
.played-slot[data-phase='collect'] .play-caption {
  opacity: 0;
}
.drop-target {
  position: absolute;
  left: 27%;
  right: 27%;
  bottom: 260px;
  height: 126px;
  display: grid;
  place-items: center;
  z-index: 16;
  border: 2px dashed #d4c386;
  border-radius: 8px;
  background: #d8c18112;
  color: #dbd4af;
  opacity: 0;
  pointer-events: none;
}
.dragging-card .drop-target {
  opacity: 1;
}
.dragging-card .drop-target.over {
  background: #e9cb6633;
  border-color: #f2d688;
  color: #fff0c0;
}
.drag-ghost {
  position: fixed;
  z-index: 4000;
  pointer-events: none;
  will-change: transform;
  filter: drop-shadow(5px 12px 4px #0d222865);
}
.drag-ghost .face {
  animation: none !important;
  box-shadow: none;
}
.hand-panel {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 15px;
  z-index: 25;
}
.hand {
  height: 202px;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  touch-action: pan-x;
  scrollbar-width: thin;
  scrollbar-color: #c4b58066 transparent;
}
.hand-content {
  height: 100%;
  position: relative;
  min-width: 100%;
}
.hand-slot {
  position: absolute;
  bottom: 0;
  height: var(--card-h);
  background: transparent;
  border: 0;
  padding: 0;
  touch-action: pan-x;
  user-select: none;
  overflow: visible;
  color: var(--navy);
  opacity: 1 !important;
}
.hand-slot:hover {
  filter: none !important;
}
.lift {
  display: block;
  width: var(--card-w);
  height: var(--card-h);
  pointer-events: none;
  will-change: transform;
}
.hand-slot[aria-pressed='true'] .face {
  border-color: #f3c262;
  box-shadow:
    0 3px 0 #eab658,
    3px 7px 0 #102b2788;
}
.hand-slot.is-drag-source .lift {
  opacity: 0.16;
}
.hand-slot .face {
  animation: card-bob 4.5s ease-in-out infinite;
  animation-delay: var(--bob-delay, 0s);
}
.hand[data-hovered-card] .face,
.dragging-card .hand-slot .face,
body:has(dialog[open]) .hand-slot .face {
  animation-play-state: paused;
}
.hand-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 14px;
  min-height: 42px;
}
.hand-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
  font-size: 15px;
  color: #dddcc5;
}
.hand-info small {
  color: #becbbc;
  font-size: 11px;
}
.hand-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.hand-help {
  font-size: 11px;
  color: #c6d0bc;
}
.turn-message {
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: 218px;
  text-align: center;
  z-index: 20;
  color: #f1d484;
  font-size: 16px;
  line-height: 1.5;
  pointer-events: none;
}
.turn-message small {
  display: block;
  color: #cbd0bd;
  font-size: 11px;
}
.bid-options {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.bidding-footer {
  position: absolute;
  bottom: 221px;
  left: 13%;
  right: 13%;
  z-index: 30;
  text-align: center;
}
.bidding-footer > p {
  font-size: 12px;
  color: #d4d4b4;
  margin-bottom: 12px;
}
.bidding-footer button {
  min-height: 37px;
  padding: 6px 12px;
}
.empty-hand {
  text-align: center;
  color: #c4cdbb;
  padding: 100px 0 20px;
  font-size: 12px;
}
.curtain {
  background: #203e37e8;
  padding: 35px;
  bottom: 90px;
  border: 2px solid #b0a477;
  text-align: center;
  z-index: 35;
}
.round-result {
  position: absolute;
  left: 50%;
  top: 49%;
  transform: translate(-50%, -50%);
  z-index: 40;
  text-align: center;
  width: min(680px, 80%);
  padding: 28px 35px;
  background: #eee5ce;
  color: #292b3d;
  border: 3px solid #c09f68;
  box-shadow: 9px 12px 0 #102820aa;
  border-radius: 6px;
}
.round-result h2 {
  font-size: 34px;
  margin: 12px 0;
}
.result-score {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  color: #a34854;
}
.result-score small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #645b58;
  margin-top: 5px;
}
.round-result p {
  font-size: 13px;
  margin: 12px 0;
}
.round-result .dialog-actions {
  justify-content: center;
}
.result-kitty {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 15px;
}
.result-kitty .mini {
  width: 39px;
  height: 59px;
}
.round-result > .eyebrow {
  color: #90734b;
}
.round-result > small {
  display: block;
  margin-top: 12px;
  color: #665b52;
}
dialog {
  color: var(--navy);
  background: #eee7d6;
  border: 3px solid #b7a17a;
  border-radius: 6px;
  box-shadow: 9px 12px 0 #080e1b77;
  padding: 30px;
  max-width: min(940px, 94vw);
  width: 900px;
  max-height: 88dvh;
  overflow: auto;
}
dialog::backdrop {
  background: #0b1226be;
  backdrop-filter: blur(3px);
}
dialog .fine,
dialog .muted {
  color: #646556;
}
dialog .eyebrow {
  color: #8d7045;
}
dialog p {
  font-size: 14px;
}
dialog .dialog-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 33px;
  height: 33px;
  border: 1px solid #ae9c82;
  background: #dcd2bc;
  color: #292b3d;
  font-size: 23px;
  line-height: 1;
  padding: 0;
  box-shadow: 0 3px 0 #a99a83;
}
dialog h2 {
  padding-right: 20px;
}
dialog input,
dialog select,
dialog textarea {
  background: #fffaf0;
  color: #252d35;
  border-color: #a99f86;
}
dialog .menu-actions {
  max-width: none;
}
dialog .secondary {
  background: #454052;
}
dialog .primary {
  background: #af535b;
}
dialog .quiet {
  background: #425d50;
  color: #f2eddf;
}
.small-dialog {
  width: 460px;
}
.book-dialog {
  width: 720px;
  min-height: 420px;
  background: repeating-linear-gradient(#eee7d6 0 30px, #dfd8c7 30px 31px);
  border-left-width: 12px;
}
.book-tabs {
  display: flex;
  gap: 8px;
  margin: 20px 0 25px;
}
.book-tabs button {
  min-height: 34px;
  font-size: 12px;
  padding: 6px 15px;
}
.book-tabs [aria-pressed='true'] {
  border-color: #ddad60;
}
.history-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 10px;
  font-size: 12px;
  line-height: 1.65;
  border-bottom: 1px solid #afa58a55;
  padding: 10px 0;
}
.history-row .number {
  color: #867752;
}
.history-row .points {
  font-weight: 700;
  color: #8b523e;
}
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.stat strong {
  display: block;
  font-size: 23px;
}
.stat small {
  display: block;
}
.stat em {
  font-size: 11px;
  font-style: normal;
}
.archives {
  font-size: 12px;
  border-top: 1px solid #b8aa8e;
  padding-top: 15px;
  margin-top: 15px;
}
.archive-row {
  padding: 10px 0;
}
.notebook-jokers {
  display: flex;
  gap: 25px;
}
.notebook-jokers > div {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}
.notebook-jokers small {
  display: block;
}
.notebook-suits {
  margin-top: 20px;
}
.notebook-suit {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid #c0b69b77;
  padding: 10px 0;
}
.notebook-void {
  line-height: 1.8;
}
.quiz-options {
  display: grid;
  gap: 10px;
}
.quiz-choice {
  padding: 12px;
  border: 1px solid #a99a7b;
  background: #dfd8bf;
  color: #2e3343;
  text-align: left;
}
.quiz-choice.selected {
  border: 2px solid #bd794e;
}
.quiz-answer {
  padding: 15px;
  background: #d9debf;
  border-left: 3px solid #6d8757;
}
.quiz-title {
  font-size: 12px;
  color: #7b6a40;
}
.quiz-question {
  font-weight: 650;
}
.training-panel #training {
  margin: 25px 0;
}
.trick-review {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 15px;
  border-top: 1px solid #c3b99f;
  padding: 15px 0;
}
.trick-review > span {
  font-size: 13px;
}
.trick-review small {
  display: block;
}
.trick-review > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.rules-guide {
  line-height: 1.65;
}
.rules-guide h3 {
  margin-top: 25px;
}
.rules-guide table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
.rules-guide td,
.rules-guide th {
  padding: 8px;
  border: 1px solid #b3a88c;
}
.rules-guide ul {
  padding-left: 20px;
}
.guide-cards,
.rule-cards {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.guide-card,
.rule-card {
  background: #fff9e9;
  border: 1px solid #b9a67e;
  padding: 7px;
  color: #242d43;
  border-radius: 3px;
}
.red {
  color: #b52c4e;
}
.credits-list {
  line-height: 1.8;
  font-size: 13px;
}
.credits-list a {
  color: #794859;
}
.connection-choice {
  color: var(--navy) !important;
}
.connection-explanation {
  font-size: 12px;
}
@keyframes card-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-1.7px);
  }
}
@keyframes thinking-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}
@keyframes flip-cards {
  from {
    transform: rotateY(0);
  }
  to {
    transform: rotateY(180deg);
  }
}
@keyframes collect-cards {
  to {
    transform: translate(var(--collect-x), var(--collect-y)) scale(0.28);
    opacity: 0;
  }
}
body[data-motion='off'] .face,
body[data-motion='off'] .portrait,
body[data-motion='off'] .thinking-dots i {
  animation: none !important;
}
@media (max-width: 1050px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .settings-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .menu-layout {
    gap: 15px;
    padding: 45px 35px 80px;
  }
  .menu-art .mini {
    width: 130px;
    height: 195px;
  }
}
@media (max-width: 700px) {
  body {
    padding: 8px;
  }
  .screen {
    min-height: calc(100dvh - 16px);
  }
  .menu-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 35px 30px 80px;
  }
  .menu-copy {
    z-index: 2;
  }
  .menu-copy h1 {
    font-size: 57px;
  }
  .menu-art {
    position: absolute;
    right: 15px;
    bottom: 30px;
    width: 200px;
    height: 270px;
    opacity: 0.5;
  }
  .menu-art .mini {
    width: 93px;
    height: 139px;
  }
  .menu-art .mini .corner {
    font-size: 20px;
    width: 25px;
  }
  .menu-art .mini .illustration {
    left: 27px;
    right: 7px;
  }
  .menu-art .mini .joker-art {
    left: 18px;
    right: 5px;
  }
  .menu-art .mini .joker-index {
    width: 22px;
    height: 34px;
  }
  .menu-actions {
    max-width: 250px;
  }
  .menu-footer {
    left: 20px;
    right: 20px;
    font-size: 9px;
    gap: 15px;
  }
  .menu-footer span:last-child {
    max-width: 150px;
    text-align: right;
  }
  .settings-screen {
    padding: 20px 18px;
  }
  .page-heading {
    gap: 12px;
    flex-wrap: wrap;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .language-picker {
    width: 100%;
    justify-content: flex-end;
  }
  .settings-side {
    display: flex;
  }
  dialog {
    padding: 25px 19px;
    max-width: 95vw;
  }
  .book-dialog {
    border-left-width: 7px;
  }
  .book-tabs {
    gap: 5px;
  }
  .book-tabs button {
    padding: 5px 10px;
  }
  .notebook-suit {
    font-size: 11px;
    grid-template-columns: 24px 1fr;
  }
  .notebook-suit small {
    grid-column: 2;
  }
  .trick-review {
    grid-template-columns: 75px 1fr;
    gap: 8px;
  }
  .trick-review .mini {
    width: 44px;
    height: 66px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    scroll-behavior: auto !important;
  }
  .played-slot[data-phase='flip'] .flip-inner {
    transform: rotateY(180deg);
  }
}
.atlas-0 {
  background-position: 0% 0%;
}
.atlas-1 {
  background-position: 33.333333% 0%;
}
.atlas-2 {
  background-position: 66.666667% 0%;
}
.atlas-3 {
  background-position: 100% 0%;
}
.atlas-4 {
  background-position: 0% 33.333333%;
}
.atlas-5 {
  background-position: 33.333333% 33.333333%;
}
.atlas-6 {
  background-position: 66.666667% 33.333333%;
}
.atlas-7 {
  background-position: 100% 33.333333%;
}
.atlas-8 {
  background-position: 0% 66.666667%;
}
.atlas-9 {
  background-position: 33.333333% 66.666667%;
}
.atlas-10 {
  background-position: 66.666667% 66.666667%;
}
.atlas-11 {
  background-position: 100% 66.666667%;
}
.atlas-12 {
  background-position: 0% 100%;
}
.atlas-13 {
  background-position: 33.333333% 100%;
}
.atlas-14 {
  background-position: 66.666667% 100%;
}
.atlas-15 {
  background-position: 100% 100%;
}
.pips-1 .pip:nth-child(1) {
  left: 50%;
  top: 50%;
}
.pips-2 .pip:nth-child(1) {
  left: 50%;
  top: 15%;
}
.pips-2 .pip:nth-child(2) {
  left: 50%;
  top: 85%;
}
.pips-3 .pip:nth-child(1) {
  left: 50%;
  top: 15%;
}
.pips-3 .pip:nth-child(2) {
  left: 50%;
  top: 50%;
}
.pips-3 .pip:nth-child(3) {
  left: 50%;
  top: 85%;
}
.pips-4 .pip:nth-child(1) {
  left: 20%;
  top: 15%;
}
.pips-4 .pip:nth-child(2) {
  left: 80%;
  top: 15%;
}
.pips-4 .pip:nth-child(3) {
  left: 20%;
  top: 85%;
}
.pips-4 .pip:nth-child(4) {
  left: 80%;
  top: 85%;
}
.pips-5 .pip:nth-child(1) {
  left: 20%;
  top: 15%;
}
.pips-5 .pip:nth-child(2) {
  left: 80%;
  top: 15%;
}
.pips-5 .pip:nth-child(3) {
  left: 50%;
  top: 50%;
}
.pips-5 .pip:nth-child(4) {
  left: 20%;
  top: 85%;
}
.pips-5 .pip:nth-child(5) {
  left: 80%;
  top: 85%;
}
.pips-6 .pip:nth-child(1) {
  left: 20%;
  top: 15%;
}
.pips-6 .pip:nth-child(2) {
  left: 80%;
  top: 15%;
}
.pips-6 .pip:nth-child(3) {
  left: 20%;
  top: 50%;
}
.pips-6 .pip:nth-child(4) {
  left: 80%;
  top: 50%;
}
.pips-6 .pip:nth-child(5) {
  left: 20%;
  top: 85%;
}
.pips-6 .pip:nth-child(6) {
  left: 80%;
  top: 85%;
}
.pips-7 .pip:nth-child(1) {
  left: 20%;
  top: 15%;
}
.pips-7 .pip:nth-child(2) {
  left: 80%;
  top: 15%;
}
.pips-7 .pip:nth-child(3) {
  left: 50%;
  top: 32%;
}
.pips-7 .pip:nth-child(4) {
  left: 20%;
  top: 50%;
}
.pips-7 .pip:nth-child(5) {
  left: 80%;
  top: 50%;
}
.pips-7 .pip:nth-child(6) {
  left: 20%;
  top: 85%;
}
.pips-7 .pip:nth-child(7) {
  left: 80%;
  top: 85%;
}
.pips-8 .pip:nth-child(1) {
  left: 20%;
  top: 15%;
}
.pips-8 .pip:nth-child(2) {
  left: 80%;
  top: 15%;
}
.pips-8 .pip:nth-child(3) {
  left: 50%;
  top: 32%;
}
.pips-8 .pip:nth-child(4) {
  left: 20%;
  top: 50%;
}
.pips-8 .pip:nth-child(5) {
  left: 80%;
  top: 50%;
}
.pips-8 .pip:nth-child(6) {
  left: 50%;
  top: 68%;
}
.pips-8 .pip:nth-child(7) {
  left: 20%;
  top: 85%;
}
.pips-8 .pip:nth-child(8) {
  left: 80%;
  top: 85%;
}
.pips-9 .pip:nth-child(1) {
  left: 20%;
  top: 10%;
}
.pips-9 .pip:nth-child(2) {
  left: 80%;
  top: 10%;
}
.pips-9 .pip:nth-child(3) {
  left: 20%;
  top: 36%;
}
.pips-9 .pip:nth-child(4) {
  left: 80%;
  top: 36%;
}
.pips-9 .pip:nth-child(5) {
  left: 50%;
  top: 50%;
}
.pips-9 .pip:nth-child(6) {
  left: 20%;
  top: 64%;
}
.pips-9 .pip:nth-child(7) {
  left: 80%;
  top: 64%;
}
.pips-9 .pip:nth-child(8) {
  left: 20%;
  top: 90%;
}
.pips-9 .pip:nth-child(9) {
  left: 80%;
  top: 90%;
}
.pips-10 .pip:nth-child(1) {
  left: 20%;
  top: 10%;
}
.pips-10 .pip:nth-child(2) {
  left: 80%;
  top: 10%;
}
.pips-10 .pip:nth-child(3) {
  left: 50%;
  top: 23%;
}
.pips-10 .pip:nth-child(4) {
  left: 20%;
  top: 36%;
}
.pips-10 .pip:nth-child(5) {
  left: 80%;
  top: 36%;
}
.pips-10 .pip:nth-child(6) {
  left: 20%;
  top: 64%;
}
.pips-10 .pip:nth-child(7) {
  left: 80%;
  top: 64%;
}
.pips-10 .pip:nth-child(8) {
  left: 50%;
  top: 77%;
}
.pips-10 .pip:nth-child(9) {
  left: 20%;
  top: 90%;
}
.pips-10 .pip:nth-child(10) {
  left: 80%;
  top: 90%;
}
.turn-message #resumeInline {
  display: block;
  pointer-events: auto;
  margin: 10px auto 0;
}
.spectator .hand-panel {
  display: none;
}
.spectator .seat.south {
  bottom: 30px;
}
.settings-screen .connection-note {
  color: #c4ccb8;
  font-size: 11px;
}
.settings-screen #connectionsButton {
  margin-left: 0;
}
dialog {
  --border: #b8aa8e;
}
.guide-joker {
  width: 96px;
  height: 144px;
}
.guide-card-example {
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: center;
  margin: 8px 18px 18px 0;
  font-size: 12px;
}
.rules-detail h3 {
  margin-top: 26px;
}
.rules-detail p {
  font-size: 13px;
}
.notebook-jokers b {
  display: block;
}
.turn-message {
  bottom: 236px;
}
.hand-info.is-dealer {
  padding-left: 43px;
  position: relative;
}
.dealer-inline {
  position: absolute;
  left: 0;
  top: 0;
  border: 4px double #765337;
  border-radius: 50%;
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  background: #e5bc6c;
  color: #45363b;
  font-size: 16px;
}
.settings-card #settingsUsage {
  margin-top: 10px;
}
.seat-role,
.seat-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-gallery {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 10px 0 25px;
}
.card-gallery .mini {
  width: 62px;
  height: 93px;
}
.deal-flight {
  position: absolute;
  left: 50%;
  top: 33%;
  width: 44px;
  height: 66px;
  z-index: 23;
  pointer-events: none;
  animation: deal-flight 0.38s ease-out both;
}
.hand-slot[data-arriving='true'] .face {
  animation: card-arrive 0.35s ease-out both;
}
@keyframes deal-flight {
  from {
    transform: translate(-50%, 0) rotate(-5deg);
    opacity: 1;
  }
  to {
    transform: translate(calc(var(--fly-x) - 50%), var(--fly-y)) scale(0.5) rotate(7deg);
    opacity: 0;
  }
}
@keyframes card-arrive {
  from {
    transform: translateY(15px) rotateY(80deg);
    opacity: 0;
  }
  to {
    transform: translateY(0) rotateY(0);
    opacity: 1;
  }
}

/* One game, with configurable scale rather than alternative layouts. */
body {
  --text-scale: 1;
  --hand-scale: 1;
  --table-scale: 1;
  font-size: calc(16px * var(--text-scale));
}
.screen {
  max-width: 1920px;
}
.menu-language {
  position: absolute;
  right: 30px;
  top: 24px;
  z-index: 4;
  gap: 9px;
}
.menu-language select {
  width: auto;
  background: #29293cc7;
  border: 2px solid #817589;
  color: #efe8d5;
  min-width: 103px;
}
.menu-language svg {
  color: #e5d9ba;
}
.menu-summary {
  font-size: calc(12px * var(--text-scale));
}
.general-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 26px;
  max-width: 1100px;
  margin: auto;
}
.general-settings .settings-card {
  padding: 28px;
  min-width: 0;
}
.option-row {
  font-size: calc(14px * var(--text-scale)) !important;
}
.option-row input[type='range'] {
  width: min(180px, 50%);
  min-height: 20px;
  padding: 0;
  accent-color: #e9b967;
}
.appearance-preview {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 25px 0 30px;
}
.appearance-preview .mini {
  width: calc(75px * var(--hand-scale));
  flex: 0 1 calc(75px * var(--hand-scale));
  min-width: 0;
  height: auto;
  aspect-ratio: 2 / 3;
}
.appearance-preview .mini:nth-child(odd) {
  transform: rotate(-4deg);
}
.appearance-preview .mini:nth-child(even) {
  transform: rotate(4deg);
}
.setup-compass {
  display: grid;
  grid-template-columns: 1fr 24px 1fr;
  gap: 12px 8px;
  place-items: center;
  margin: 22px auto;
  width: min(100%, 300px);
}
.setup-compass span {
  padding: 9px 10px;
  border: 2px solid #80967b;
  background: #355b4e;
  font-size: 13px;
  text-align: center;
  overflow-wrap: anywhere;
}
.compass-north {
  grid-area: 1/1/2/4;
}
.compass-west {
  grid-area: 2/1;
}
.setup-compass b {
  grid-area: 2/2;
  color: #e3ce9c;
  font-weight: 400;
}
.compass-east {
  grid-area: 2/3;
}
.compass-south {
  grid-area: 3/1/4/4;
}
.setup-compass .compass-east,
.setup-compass .compass-west {
  border-color: #92778c;
  background: #53435a;
}
.credit-repo {
  display: flex;
  margin: 22px 0 16px;
  min-height: 54px;
  font-size: 18px;
  color: var(--paper) !important;
}
.credit-author {
  display: block;
  text-align: center;
  font-size: 16px;
  margin: 15px 0 27px;
  font-weight: 700;
}
.credits-list hr {
  border: 0;
  border-top: 1px solid #b9aa8b;
  margin-bottom: 22px;
}
.pixel-game {
  --hand-h: 162px;
  --table-w: calc(clamp(80px, 7vw, 112px) * var(--table-scale));
  min-height: 850px;
  height: max(850px, calc(100dvh - 32px));
}
.pixel-game:after,
.menu-screen:after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  background: repeating-linear-gradient(0deg, transparent 0 3px, #0c171611 3px 4px);
  opacity: 0.35;
  mix-blend-mode: multiply;
}
body[data-texture='off'] .pixel-game:after,
body[data-texture='off'] .menu-screen:after {
  display: none;
}
.game-top button {
  font-size: calc(15px * var(--text-scale));
}
.match-tag {
  font-size: calc(12px * var(--text-scale));
}
.seat-role {
  font-size: calc(12px * var(--text-scale));
  max-width: 180px;
}
.seat-name {
  font-size: calc(17px * var(--text-scale));
}
.seat-count {
  font-size: calc(17px * var(--text-scale));
}
.seat-count small {
  display: block;
  font-size: calc(11px * var(--text-scale));
}
.seat {
  max-width: 190px;
}
.portrait {
  width: 70px;
  height: 81px;
}
.seat.west {
  left: 28px;
  top: 35%;
}
.seat.east {
  right: 28px;
  top: 35%;
}
.backs {
  margin-top: 3px;
}
.backs .card-back {
  width: 25px;
  height: 34px;
}
.backs {
  height: 34px;
}
.won-marker {
  font-size: calc(12px * var(--text-scale));
}
.trump-marker {
  top: 143px;
}
.trump-tile {
  width: 73px;
  height: 105px;
  font-size: 31px;
}
.trump-copy {
  font-size: calc(16px * var(--text-scale));
}
.trump-copy small {
  font-size: calc(12px * var(--text-scale));
  line-height: 1.5;
}
.score-ticket {
  top: 137px;
  min-width: 164px;
  padding: 0 15px 12px;
  font-size: calc(16px * var(--text-scale));
  transform: rotate(2deg);
}
.score-ticket .team-role {
  display: block;
  margin: 0 -15px 12px;
  padding: 8px 12px;
  background: #49445b;
  color: #fff0cd;
  font-size: calc(17px * var(--text-scale));
  letter-spacing: 0.05em;
}
.score-ticket.attacking .team-role {
  background: #a65050;
}
.score-ticket strong {
  font-size: calc(39px * var(--text-scale));
  line-height: 1.25;
}
.score-ticket strong small {
  font-size: calc(24px * var(--text-scale));
}
.score-ticket > span:last-child {
  font-size: calc(12px * var(--text-scale));
}
.face {
  border-radius: 4px;
  border-color: #bfb69f;
}
.mini .face,
.hand-slot .face,
.drag-ghost .face {
  container-type: inline-size;
}
.mini .corner,
.hand-slot .corner,
.drag-ghost .corner {
  font-size: 21cqw;
  width: 23cqw;
  left: 3cqw;
  top: 3cqw;
  line-height: 1.03;
}
.mini .corner .suit,
.hand-slot .corner .suit,
.drag-ghost .corner .suit {
  font-size: 19cqw;
}
.mini .corner.bottom,
.hand-slot .corner.bottom,
.drag-ghost .corner.bottom {
  left: auto;
  right: 3cqw;
  top: auto;
  bottom: 3cqw;
}
.mini .illustration,
.hand-slot .illustration,
.drag-ghost .illustration {
  left: 18cqw;
  right: auto;
  top: 50%;
  bottom: auto;
  width: 64cqw;
  height: 96cqw;
  transform: translateY(-50%);
  clip-path: inset(1%);
  filter: contrast(1.14) brightness(1.1);
  mix-blend-mode: multiply;
}
.mini .joker-art,
.hand-slot .joker-art,
.drag-ghost .joker-art {
  left: 19cqw;
  right: 4cqw;
  top: 7cqw;
  bottom: 7cqw;
  width: auto;
  height: auto;
  transform: none;
}
.mini .joker-index,
.hand-slot .joker-index,
.drag-ghost .joker-index {
  left: 2cqw;
  top: 4cqw;
  width: 24cqw;
  height: 37cqw;
}
.mini .pips,
.hand-slot .pips,
.drag-ghost .pips {
  left: 28cqw;
  right: 28cqw;
  top: 18cqw;
  bottom: 18cqw;
  font-size: 20cqw;
}
.mini .pips.ace,
.hand-slot .pips.ace,
.drag-ghost .pips.ace {
  font-size: 47cqw;
}
.played-slot .mini,
.played-slot .flip-card {
  width: var(--table-w);
  height: calc(var(--table-w) * 1.5);
}
.played-slot .flip-card + .flip-card {
  margin-left: calc(var(--table-w) * -0.25);
}
.play-caption {
  font-size: calc(15px * var(--text-scale));
  line-height: 1.5;
  max-width: 290px;
  color: #eee1be;
}
.played-slot {
  gap: 12px;
}
.played-slot.north {
  top: 30%;
}
.played-slot.west,
.played-slot.east {
  top: 42%;
}
.played-slot.south {
  top: 53%;
}
.fan-overflow {
  font-size: calc(13px * var(--text-scale));
}
.played-fan .flip-card:nth-child(2) {
  transform: rotate(2deg);
}
.played-fan .flip-card:nth-child(3) {
  transform: rotate(-1deg);
}
.hand {
  height: calc(var(--card-h) + 80px);
}
.hand-panel {
  bottom: 18px;
  left: 22px;
  right: 22px;
}
.hand-footer {
  margin-top: 17px;
  min-height: 48px;
}
.hand-info {
  font-size: calc(17px * var(--text-scale));
}
.hand-info small,
.hand-help {
  font-size: calc(12px * var(--text-scale));
}
.hand-actions button {
  font-size: calc(15px * var(--text-scale));
  min-height: 46px;
}
.hand-slot[aria-pressed='true'] .face {
  border-color: #e8b457;
  box-shadow:
    0 4px 0 #e4b04f,
    3px 8px 0 #102b2788;
}
.hand-slot[aria-pressed='true']:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 4px;
  width: calc(100% - 8px);
  max-width: 22px;
  height: 4px;
  background: #e8c77a;
  border-radius: 1px;
  pointer-events: none;
}
.turn-message {
  bottom: calc(var(--hand-h) + 129px);
  font-size: calc(19px * var(--text-scale));
}
.turn-message small {
  font-size: calc(12px * var(--text-scale));
  line-height: 1.55;
}
.bidding-footer {
  bottom: calc(var(--hand-h) + 128px);
}
.bidding-footer > p {
  font-size: calc(15px * var(--text-scale));
}
.bidding-footer button {
  font-size: calc(15px * var(--text-scale));
  padding: 9px 15px;
}
.drop-target {
  left: 19%;
  right: 19%;
  bottom: calc(var(--hand-h) + 142px);
  height: 160px;
  border-style: dashed;
  background: #172b2817;
  font-size: calc(17px * var(--text-scale));
}
.kitty-pocket {
  bottom: calc(var(--hand-h) + 162px);
  font-size: calc(11px * var(--text-scale));
}
.declaration-pile {
  position: absolute;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  transform: translateX(-50%);
  z-index: 16;
  font-size: calc(14px * var(--text-scale));
  color: #d4cfb1;
  max-width: 28%;
  text-align: center;
}
.declaration-pile.north {
  left: 50%;
  top: 27%;
}
.declaration-pile.west {
  left: 26%;
  top: 42%;
}
.declaration-pile.east {
  left: 74%;
  top: 42%;
}
.declaration-pile.south {
  left: 50%;
  bottom: calc(var(--hand-h) + 180px);
}
.declaration-cards {
  display: flex;
}
.declaration-cards > span + span {
  margin-left: -20px;
}
.declaration-cards .mini {
  width: 80px;
  height: 120px;
}
.declaration-pile.current .face {
  border-color: #eac676;
  box-shadow:
    0 0 0 2px #eac67655,
    4px 6px 0 #102b2788;
}
.declaration-pile.current > span {
  color: #f6d889;
}
.declaration-cards > span {
  animation: declaration-reveal 0.25s ease-out both;
}
.pixel-game[data-phase='dealing'] .deck-center,
.pixel-game[data-phase='closing'] .deck-center {
  top: 46%;
  font-size: calc(16px * var(--text-scale));
  gap: 10px;
}
.pixel-game[data-phase='dealing'] .deck-stack,
.pixel-game[data-phase='closing'] .deck-stack {
  width: 48px;
  height: 72px;
}
.pixel-game[data-phase='dealing'] .deck-center small,
.pixel-game[data-phase='closing'] .deck-center small {
  font-size: calc(12px * var(--text-scale));
}
.hand-slot[data-recalled='true'] .face {
  animation: declaration-return 0.42s ease-out both;
}
body[data-hints='off'] .hand-help {
  visibility: hidden;
}
body[data-motion='off'] .declaration-cards > span {
  animation: none;
}
@keyframes declaration-reveal {
  from {
    transform: translateY(-16px) rotate(-8deg);
    opacity: 0;
  }
  to {
    transform: translateY(0) rotate(0);
    opacity: 1;
  }
}
@keyframes declaration-return {
  from {
    transform: translateY(-65px) rotate(-5deg);
    opacity: 0.4;
  }
  to {
    transform: translateY(0) rotate(0);
    opacity: 1;
  }
}
@media (max-width: 1050px) {
  .general-settings {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .menu-language {
    top: 15px;
    right: 15px;
    width: auto;
  }
  .menu-language select {
    min-width: 90px;
    min-height: 35px;
    font-size: 12px;
  }
  .menu-layout {
    padding-top: 72px;
  }
  .general-settings .settings-card {
    padding: 21px;
  }
}
.rank-glyph {
  display: block;
  height: 0.86em;
  width: 100%;
  margin-bottom: 0.15em;
}
.rank-glyph svg {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
}
.suit-glyph {
  display: block;
  width: 0.8em;
  height: 0.85em;
}
.suit-glyph svg {
  display: block;
  width: 100%;
  height: 100%;
}
.pip svg {
  display: block;
  width: 0.8em;
  height: 0.88em;
}
.face .corner {
  background: none;
}
.mini .pips.ace .pip svg,
.hand-slot .pips.ace .pip svg,
.drag-ghost .pips.ace .pip svg {
  width: 0.95em;
  height: 1em;
}
.burial-guide {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: min(500px, 64%);
  text-align: center;
  color: #e8d6ad;
  z-index: 14;
}
.burial-guide strong {
  font-size: calc(19px * var(--text-scale));
}
.burial-guide p {
  max-width: 400px;
  margin: 15px auto;
  font-size: calc(13px * var(--text-scale));
  color: #c4ccba;
}
.burial-progress {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0 0 20px;
}
.burial-progress i {
  width: 18px;
  height: 18px;
  border: 2px solid #c5b890;
  box-shadow: 2px 3px 0 #152b2988;
  border-radius: 2px;
}
.burial-progress .filled {
  background: #e4b567;
  border-color: #f3d48f;
}
dialog p {
  font-size: calc(14px * var(--text-scale));
}
.trump-tile[data-suit='H'] > span,
.trump-tile[data-suit='D'] > span {
  color: #bf274e;
}
body[data-four-color='on'] .trump-tile[data-suit='C'] > span {
  color: #12634f;
}
body[data-four-color='on'] .trump-tile[data-suit='D'] > span {
  color: #c34e1c;
}
/* Modal chrome stays still while the document inside it scrolls. */
dialog.framed-dialog {
  padding: 0;
  overflow: hidden;
  max-height: min(90dvh, 1100px);
}
dialog.framed-dialog[open] {
  display: flex;
  flex-direction: column;
}
.dialog-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex: 0 0 auto;
  padding: 20px 24px 16px;
  background: #eee7d6;
  border-bottom: 1px solid #b8aa8e80;
  z-index: 2;
}
.dialog-heading {
  min-width: 0;
}
.dialog-heading h2 {
  margin: 0;
  padding: 0;
  font-size: 24px;
}
.dialog-heading .eyebrow {
  display: block;
  margin-bottom: 7px;
}
.dialog-toolbar .dialog-close {
  position: static;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  font-size: 27px;
  margin: 0;
  box-shadow: 0 3px 0 #a99a83;
}
.dialog-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 22px 26px 28px;
}
.dialog-body > :last-child {
  margin-bottom: 0;
}
.connection-seat-hint {
  padding: 11px 14px;
  border-left: 3px solid #aa7751;
  background: #e3d7bb;
  color: #564936;
  font-size: 13px;
}
.seat-connection-route {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 18px;
}
.seat-connection-route button {
  flex: 0 0 auto;
  font-size: 12px;
  min-height: 36px;
  padding: 7px 10px;
}
.seat-connection-route small {
  font-size: 12px;
  color: #c4ccb8;
  max-width: 320px;
}
.dialog-body .connections-layout {
  margin-top: 15px;
}
.framed-dialog .dialog-actions {
  padding-bottom: 4px;
}
@media (max-width: 700px) {
  .dialog-toolbar {
    padding: 16px;
  }
  .dialog-heading h2 {
    font-size: 22px;
  }
  .dialog-body {
    padding: 18px 16px 23px;
  }
  dialog.framed-dialog {
    max-height: 92dvh;
  }
  .framed-dialog .dialog-close {
    min-height: 38px;
  }
  #connectionsDialog.framed-dialog {
    padding: 0;
    margin: auto;
  }
}
.wordmark {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.wordmark-floor {
  fill: #101827;
  stroke: #101827;
  stroke-width: 7;
  stroke-linejoin: round;
}
.wordmark-depth {
  fill: #a87546;
  stroke: #392e36;
  stroke-width: 5;
  stroke-linejoin: round;
}
.wordmark-face {
  fill: #f4e5bf;
  stroke: #392e36;
  stroke-width: 2;
  stroke-linejoin: miter;
}
.wordmark-light {
  fill: none;
  stroke: #fff6de;
  stroke-width: 2;
  stroke-linecap: square;
}
.wordmark-inlay {
  fill: #bb5260;
}
.menu-copy #menuTitle {
  max-width: 460px;
  margin: 22px 0 14px;
  line-height: 0;
  letter-spacing: 0;
  text-shadow: none;
}
.wordmark-en {
  max-width: 480px;
}
.menu-copy:has(.wordmark-en) #menuTitle {
  max-width: 480px;
}
.menu-copy .tagline {
  margin-top: 16px;
}
.menu-copy .eyebrow {
  letter-spacing: 0.16em;
}
body:has(dialog[open]) {
  overflow: hidden;
}
@media (max-width: 700px) {
  .menu-copy #menuTitle {
    max-width: 310px;
    margin-top: 24px;
  }
  .menu-copy:has(.wordmark-en) #menuTitle {
    max-width: 320px;
  }
  .menu-layout {
    padding-left: 25px;
    padding-right: 25px;
  }
}
/* Menu cards use the same centered court composition as the playable deck. */
.menu-art .mini .illustration:not(.joker-art) {
  left: 18cqw;
  right: auto;
  top: 50%;
  bottom: auto;
  width: 64cqw;
  height: 96cqw;
}

/* Carried selections keep individual paper edges and settle as one short fan. */
.drag-ghost {
  isolation: isolate;
  container-type: inline-size;
  transform-origin: 50% 50%;
  filter: drop-shadow(4px 9px 0 #0c202650) drop-shadow(0 14px 10px #071a2940);
}
.drag-card {
  position: absolute;
  inset: 0;
  will-change: transform;
  transform-origin: 50% 85%;
}
.drag-ghost .drag-card .face {
  border-color: #ead099;
  box-shadow:
    2px 3px 0 #a28d60,
    3px 5px 0 #102b2780;
}
.drag-count {
  position: absolute;
  top: clamp(-22px, -21cqw, -15px);
  z-index: 100;
  min-width: clamp(18px, 28cqw, 29px);
  height: clamp(18px, 28cqw, 29px);
  display: grid;
  place-items: center;
  padding: 0 4px;
  background: #efcf86;
  color: #29343a;
  border: 2px solid #6e593d;
  box-shadow: 3px 3px 0 #13262b;
  font-size: clamp(10px, 16cqw, 17px);
  font-weight: 800;
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
}
.dragging-card,
.dragging-card * {
  cursor: grabbing !important;
}
.drop-target {
  padding: 12px 20px;
  place-items: start;
  text-align: left;
  border-style: solid;
  border-color: #d4c38670;
  border-radius: 4px;
  background: #102d2930;
  text-shadow: 0 2px #132c2a;
  transition:
    background-color 0.1s,
    border-color 0.1s,
    box-shadow 0.1s;
}
.dragging-card .drop-target.over[data-drop-state='ready'] {
  background: #dfca7020;
  border-color: #f3d787;
  box-shadow:
    inset 0 0 0 3px #e2c67525,
    0 3px 0 #102b2750;
}
.dragging-card .drop-target[data-drop-state='invalid'] {
  color: #f3c7bd;
  border-color: #b77f7380;
}
.dragging-card .drop-target.over[data-drop-state='invalid'] {
  background: #a6544520;
  border-color: #d39c88;
  box-shadow: none;
}
@media (prefers-reduced-motion: reduce) {
  .drop-target {
    transition: none;
  }
}
body[data-motion='off'] .drop-target {
  transition: none;
}
