:root {
  --bg: #f3f1e9;
  --paper: #fcfbf7;
  --ink: #293d36;
  --muted: #879088;
  --green: #28654e;
  --gold: #c4a774;
  --red: #b44f48;
  --line: #253d3013;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 32% 43%, #e5ebe0 0, transparent 60%), var(--bg);
  min-height: 100vh;
}
button,
select,
input {
  font: inherit;
}
button {
  border: 0;
  cursor: pointer;
  color: inherit;
  background: none;
  transition:
    background 0.15s,
    translate 0.15s;
}
button:hover:not(:disabled) {
  filter: brightness(0.96);
}
button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 2px solid #d6ac61;
  outline-offset: 3px;
}
button:active:not(:disabled) {
  translate: 0 1px;
}
button[hidden],
[hidden] {
  display: none !important;
}
header {
  height: 82px;
  padding: 0 45px;
  display: flex;
  align-items: center;
  gap: 48px;
  border-bottom: 1px solid var(--line);
  background: #fcfbf7ba;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  font-size: 22px;
  letter-spacing: 3px;
  font-weight: 650;
}
.brand-icon {
  display: grid;
  place-items: center;
  background: var(--green);
  color: #f3e9c9;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 37px;
  font-weight: 400;
}
.brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 2.8px;
  font-weight: 500;
  margin-top: 4px;
  color: #79877a;
}
.header-info {
  font-size: 12px;
  color: #7d8a80;
  display: flex;
  align-items: center;
  gap: 9px;
}
.header-info i {
  height: 12px;
  width: 1px;
  background: #b6c0b2;
  margin: 0 9px;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #71a086;
  margin-right: 6px;
}
nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}
nav button {
  font-size: 12px;
  color: #748475;
}
.settings-button {
  background: #e9ede3;
  border: 1px solid #dde4d7;
  border-radius: 10px;
  font-size: 21px;
  width: 37px;
  height: 37px;
}
main {
  max-width: 1660px;
  margin: auto;
  padding: 30px 42px 20px;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 17px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: #8c997f;
}
h1 {
  font-size: 25px;
  font-weight: 550;
  letter-spacing: 1px;
  margin: 9px 0;
}
.mode-pills {
  display: flex;
  gap: 10px;
  font-size: 11px;
}
.mode-pills span {
  padding: 8px 12px;
  border-radius: 6px;
  background: #e7ebdf;
  color: #697d63;
}
.mode-pills span:first-child {
  background: #d9e7d8;
  color: #3d694e;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 25px;
}
.game-column {
  min-width: 0;
}
.arena {
  height: 395px;
  position: relative;
  isolation: isolate;
}
.table {
  position: absolute;
  inset: 43px 22px 22px;
  border-radius: 170px;
  background: radial-gradient(
    ellipse at 50% 30%,
    #48816c,
    #326c58 58%,
    #235a46
  );
  border: 11px solid #687a62;
  outline: 1px solid #9f9d7e;
  box-shadow:
    inset 0 0 0 2px #c0bc8d6b,
    inset 0 0 35px #0e3c32a3,
    0 18px 25px #314f3b20,
    0 3px 0 3px #405c49;
}
.table:after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.13;
  background:
    repeating-linear-gradient(
      32deg,
      transparent 0,
      transparent 2px,
      #f6e7be1f 3px,
      transparent 4px
    ),
    repeating-linear-gradient(
      122deg,
      transparent 0,
      transparent 2px,
      #002d221f 3px,
      transparent 4px
    );
  pointer-events: none;
}
.table-inlay {
  position: absolute;
  inset: 19px;
  border-radius: 150px;
  border: 1px solid #ddd6a52b;
}
.table-symbol {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 54px;
  line-height: 1;
  color: #d4ddbc0e;
}
.direction-label {
  position: absolute;
  bottom: 38px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  letter-spacing: 3px;
  color: #acbfa7;
}
.seat {
  position: absolute;
  width: 132px;
  text-align: center;
  z-index: 2;
}
.seat-2 {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}
.seat-1 {
  right: 0;
  top: 144px;
}
.seat-3 {
  left: 0;
  top: 144px;
}
.avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: auto;
  position: relative;
  border: 3px solid #e6e6d9;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--avatar), #c9c9ae);
  color: #faf8e9;
  font-family: Georgia, serif;
  font-size: 25px;
  box-shadow: 0 3px 8px #163b2a20;
}
.seat.active .avatar {
  border-color: #ecd39e;
  box-shadow: 0 0 0 5px #e8d5a222;
}
.seat.active .avatar:before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid #e8d5a2;
  border-radius: 50%;
  animation: pulse 1.8s infinite;
}
.seat-info {
  background: #fcfbf5f2;
  border: 1px solid #e5e7d3;
  border-radius: 9px;
  margin-top: 7px;
  padding: 9px 7px;
  box-shadow: 0 3px 10px #143c2815;
}
.seat-name {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
}
.partner-label {
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 4px;
  background: #e0eade;
  color: #587755;
}
.seat-count {
  font-size: 10px;
  color: #8b9586;
  margin-top: 5px;
}
.seat-count strong {
  font-size: 17px;
  color: #41674b;
  margin-right: 2px;
}
.seat-status {
  margin-top: 8px;
  font-size: 11px;
  color: #e1e6cc;
  text-shadow: 0 1px 3px #173d2e33;
  min-height: 18px;
}
.seat.active .seat-status {
  color: #ffe7b6;
}
.seat.finished .seat-info {
  background: #e2ead8;
}
.seat.finished .avatar {
  border-color: #b7c8a4;
}
.seat .back-stack {
  position: absolute;
  top: 13px;
  left: 89px;
  transform: rotate(13deg);
  z-index: -1;
}
.back-stack:before,
.back-stack:after {
  content: "";
  position: absolute;
  width: 28px;
  height: 41px;
  background: repeating-linear-gradient(
    45deg,
    #729281 0,
    #729281 3px,
    #86a08c 3px,
    #86a08c 4px
  );
  border: 2px solid #e6e3c9;
  border-radius: 3px;
}
.back-stack:after {
  left: 8px;
  top: 3px;
  transform: rotate(9deg);
}
.center-stage {
  position: absolute;
  top: 148px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  text-align: center;
}
.center-title {
  font-size: 11px;
  color: #e0e4c9;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}
.center-title strong {
  font-weight: 600;
  color: #f6e6bb;
}
.played-cards {
  display: flex;
  justify-content: center;
  gap: 5px;
  min-height: 73px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-radius: 7px;
  background: linear-gradient(115deg, #fffef8, #f0efe5);
  box-shadow: 0 2px 5px #122e2730;
  border: 1px solid #fffefa;
  color: #243d38;
  padding: 6px 7px;
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
  user-select: none;
}
.card.red {
  color: #b55048;
}
.card .rank {
  font-size: 23px;
  font-weight: bold;
  letter-spacing: -1px;
}
.card .suit {
  font-size: 18px;
  margin-top: 3px;
}
.card .pip {
  position: absolute;
  right: 6px;
  bottom: 8px;
  font-size: 29px;
}
.card .wild-badge {
  position: absolute;
  right: 3px;
  top: 4px;
  background: #f4e4b4;
  color: #8b6c32;
  border-radius: 3px;
  font:
    9px/1.3 "Microsoft YaHei",
    sans-serif;
  padding: 2px;
}
.card.wild {
  background: linear-gradient(125deg, #fff7d9, #f6ebc9);
  border-color: #e8ce8c;
}
.card .joker-rank {
  font-size: 12px;
  writing-mode: vertical-rl;
  letter-spacing: 1px;
  font-family: "Microsoft YaHei", sans-serif;
}
.card .assigned {
  position: absolute;
  bottom: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: #f2dfa9;
  border-radius: 3px;
  white-space: nowrap;
  padding: 2px 3px;
  font: 8px/1.2 sans-serif;
  color: #736139;
  z-index: 3;
}
.played-cards .card {
  width: 48px;
  height: 70px;
  animation: play 0.3s ease-out both;
}
.played-cards.many {
  gap: 3px;
}
.played-cards.many .card {
  width: 38px;
  padding: 5px;
}
.played-cards.many .pip {
  font-size: 22px;
  right: 3px;
}
.pattern-label {
  font-size: 10px;
  color: #b9cdb5;
  margin-top: 16px;
}
.table-message {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 65%;
  font-size: 11px;
  color: #e2e6cd;
  text-align: center;
  background: #204d3c45;
  border: 1px solid #d3dfbf15;
  border-radius: 18px;
  padding: 7px 15px;
  white-space: nowrap;
}
.welcome-symbol {
  font-size: 40px;
  color: #d8d1ac;
  margin-bottom: 8px;
}
.welcome-title {
  font-size: 20px;
  color: #f1eed8;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: 2px;
}
.welcome-sub {
  font-size: 11px;
  color: #c2d2bb;
}
.hand-panel {
  position: relative;
  background: #fbfaf4;
  border: 1px solid #e1e4d8;
  border-radius: 15px;
  padding: 17px 22px 16px;
  box-shadow: 0 5px 25px #304a2a04;
  margin-top: 15px;
}
.hand-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.you-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.you-label strong {
  font-weight: 600;
}
.you-label > span:last-child {
  color: #9ca495;
  font-size: 11px;
}
.small-avatar {
  background: #e0e8d8;
  color: #557450;
  border: 1px solid #d6decb;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  font-size: 10px;
}
.hand-tools {
  display: flex;
  gap: 18px;
  font-size: 10px;
  align-items: center;
  color: #a48f60;
}
.hand-tools button {
  font-size: 10px;
  color: #85917f;
  padding: 5px;
}
.hand-viewport {
  height: 138px;
  padding-top: 25px;
  overflow: visible;
}
.hand {
  height: 96px;
  position: relative;
  margin: 0 auto;
  max-width: 100%;
  touch-action: none;
}
.hand .card {
  position: absolute;
  top: 0;
  width: 62px;
  height: 94px;
  transition:
    transform 0.14s,
    box-shadow 0.14s;
  cursor: pointer;
  text-align: left;
  touch-action: none;
}
.hand .card:hover {
  transform: translateY(-8px);
  background: #fffdf0;
}
.hand .card.selected {
  transform: translateY(-17px);
  box-shadow:
    0 0 0 2px #548b68,
    0 8px 12px #2b4c3125;
  border-color: #dce9c6;
  background: #f3f7df;
}
.hand .card.selected:after {
  content: "✓";
  position: absolute;
  bottom: 3px;
  left: 6px;
  font: 10px sans-serif;
  color: #4b805c;
}
.hand .card .rank {
  font-size: 25px;
}
.hand .card .suit {
  font-size: 20px;
}
.hand .card .pip {
  font-size: 33px;
}
.hand.empty {
  display: grid;
  place-items: center;
  color: #a6af9c;
  font-size: 12px;
  letter-spacing: 1px;
}
.action-row {
  border-top: 1px solid var(--line);
  padding-top: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 60px;
}
.selection-info {
  min-width: 0;
  font-size: 11px;
  color: #858f80;
}
.selection-info > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 340px;
}
.selection-info #turn-text {
  color: #3e7656;
  font-size: 10px;
  margin-top: 7px;
}
.selection-info select {
  max-width: 260px;
  border: 1px solid #d9e2ce;
  background: #f7f9ee;
  border-radius: 4px;
  font-size: 10px;
  color: #54794d;
  padding: 4px;
  margin-top: 4px;
}
.actions {
  display: flex;
  gap: 9px;
  align-items: center;
}
.actions button {
  min-height: 41px;
  padding: 0 18px;
  border-radius: 7px;
  font-size: 12px;
  white-space: nowrap;
}
.primary {
  background: var(--green);
  color: #faf7e8;
  box-shadow: 0 4px 8px #28654e14;
}
.primary span {
  margin-left: 15px;
  opacity: 0.8;
}
.secondary {
  background: #eaf0e3;
  border: 1px solid #dce4d2;
}
.quiet-button {
  color: #8d9987;
  padding: 0 8px !important;
}
.actions kbd {
  font-family: inherit;
  font-size: 9px;
  color: #91a087;
  margin-left: 8px;
}
footer {
  display: flex;
  justify-content: space-between;
  color: #919c8d;
  font-size: 9px;
  margin-top: 13px;
  gap: 12px;
}
.score-panel,
.history-panel,
.level-panel {
  background: #fcfbf6;
  border: 1px solid #e2e4d8;
  border-radius: 12px;
  padding: 20px;
}
.section-heading {
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}
.section-heading > span {
  font-weight: 400;
  color: #9aa490;
  font-size: 9px;
}
.team-score {
  display: flex;
  justify-content: space-between;
  text-align: center;
  align-items: center;
  margin-top: 23px;
  padding: 0 8px;
}
.team-tag {
  font-size: 10px;
  border-radius: 4px;
  padding: 4px 8px;
}
.team-tag.mine {
  background: #e4ecde;
  color: #507449;
}
.team-tag.theirs {
  background: #eee6dd;
  color: #9b7b5a;
}
.team-score strong {
  font-family: Georgia, serif;
  font-size: 40px;
  display: block;
  font-weight: 400;
  margin: 11px 0 6px;
}
.team-score small {
  font-size: 10px;
  color: #98a18e;
}
.score-colon {
  font-family: Georgia, serif;
  font-size: 23px;
  color: #b6bfaa;
  padding-bottom: 7px;
}
.win-count {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
  font-size: 10px;
  display: flex;
  justify-content: space-between;
  color: #939e8b;
}
.win-count strong {
  font-weight: 500;
  color: #5b7558;
  letter-spacing: 3px;
}
.level-panel {
  margin-top: 14px;
  display: flex;
  gap: 14px;
  padding: 15px 18px;
  align-items: center;
}
.level-card {
  width: 35px;
  height: 48px;
  background: #f3e8cf;
  border: 1px solid #e3d4b2;
  border-radius: 5px;
  color: #b66550;
  font-family: Georgia, serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1.1;
}
.level-card b {
  font-size: 20px;
}
.level-panel strong {
  font-size: 11px;
  font-weight: 500;
}
.level-panel p {
  font-size: 9px;
  line-height: 1.8;
  color: #9ba58f;
  margin: 5px 0 0;
}
.history-panel {
  margin-top: 14px;
  padding-bottom: 12px;
}
#history {
  height: 174px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d0dac7 transparent;
  margin-top: 13px;
}
.log-entry {
  font-size: 10px;
  color: #92a089;
  padding: 6px 0;
  line-height: 1.6;
  border-bottom: 1px solid #edf0e5;
}
.log-entry:last-child {
  color: #537651;
}
.log-entry.new-round {
  color: #a48e63;
}
.team-note {
  padding: 18px 8px;
  display: flex;
  gap: 13px;
  font-size: 10px;
  color: #8d9d7f;
}
.team-note > span {
  font-size: 26px;
}
.team-note p {
  margin: 6px 0 0;
  color: #a4ad99;
  font-size: 9px;
}
.result-head {
  font-size: 23px;
  color: #f4e7b8;
  letter-spacing: 2px;
  margin-bottom: 9px;
}
.result-detail {
  font-size: 11px;
  color: #dce3c6;
}
.result-places {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 19px;
}
.result-places > div {
  background: #214d3d70;
  border: 1px solid #abc8a126;
  border-radius: 8px;
  min-width: 65px;
  padding: 10px 9px;
  font-size: 11px;
  color: #ecedd6;
}
.result-places small {
  display: block;
  margin-top: 7px;
  font-size: 9px;
  color: #b3c8a8;
}
.result-points {
  display: inline-block;
  border: 1px solid #e4cc8c70;
  border-radius: 5px;
  padding: 4px 10px;
  margin-left: 8px;
  font-size: 13px;
}
dialog {
  width: 480px;
  max-width: 92vw;
  background: #fbfaf3;
  border: 1px solid #e0e2d5;
  border-radius: 16px;
  padding: 26px;
  color: var(--ink);
  box-shadow: 0 24px 80px #1236244d;
}
dialog::backdrop {
  background: #173d2b70;
  backdrop-filter: blur(5px);
}
.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 19px;
}
.dialog-top h2 {
  font-size: 20px;
  font-weight: 500;
  margin: 0;
}
.dialog-top button {
  font-size: 25px;
  color: #8a967f;
}
dialog label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
dialog select {
  background: #edf1e5;
  color: #5e7751;
  border: 1px solid #d8dfcd;
  padding: 7px;
  border-radius: 5px;
}
dialog input {
  accent-color: var(--green);
}
dialog p {
  font-size: 11px;
  line-height: 1.85;
  color: #85937b;
}
dialog h3 {
  font-size: 13px;
  margin: 20px 0 8px;
  font-weight: 600;
}
.rule-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  font-size: 11px;
  color: #5b7850;
  background: #eef2e5;
  padding: 12px;
  border-radius: 8px;
}
.practice-note {
  font-size: 11px;
  line-height: 1.9;
  padding: 12px;
  background: #f0e9d9;
  color: #92805b;
  border-radius: 7px;
  margin: 17px 0;
}
dialog a {
  font-size: 10px;
  color: #6e895d;
  text-decoration: none;
}
.full {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 7px;
  margin-top: 18px;
}
.reset-button {
  padding: 12px;
  width: 100%;
  border: 1px solid #d8b5a2;
  color: #ad7665;
  font-size: 11px;
  border-radius: 7px;
  margin-top: 22px;
}
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: #244c39;
  color: #f6f0d8;
  box-shadow: 0 6px 20px #12362130;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 12px;
  z-index: 10;
  display: none;
}
.toast.show {
  display: block;
}
.bomb-flash {
  animation: bomb 0.55s ease-out;
}
@keyframes pulse {
  50% {
    opacity: 0.4;
  }
}
@keyframes play {
  from {
    opacity: 0;
    translate: 0 12px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
@keyframes bomb {
  30% {
    filter: brightness(1.24);
    transform: scale(1.015);
  }
  100% {
    filter: brightness(1);
    transform: scale(1);
  }
}
@media (min-width: 1600px) {
  main {
    padding-top: 35px;
  }
  .arena {
    height: 450px;
  }
  .table {
    inset: 48px 20px 24px;
  }
  .center-stage {
    top: 172px;
  }
  .seat-1,
  .seat-3 {
    top: 176px;
  }
  .hand-panel {
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .hand-viewport {
    height: 151px;
    padding-top: 30px;
  }
  .hand .card {
    height: 100px;
    width: 66px;
  }
  .hand {
    height: 105px;
  }
  .played-cards .card {
    height: 80px;
    width: 56px;
  }
  .played-cards.many .card {
    width: 42px;
  }
  .history-panel #history {
    height: 240px;
  }
}
@media (min-width: 851px) and (max-height: 850px) {
  header {
    height: 62px;
  }
  main {
    padding-top: 17px;
    padding-bottom: 12px;
  }
  .heading {
    margin-bottom: 10px;
  }
  h1 {
    font-size: 22px;
    margin: 6px 0;
  }
  .arena {
    height: 330px;
  }
  .table {
    inset: 37px 19px 17px;
  }
  .seat-1,
  .seat-3 {
    top: 116px;
  }
  .seat-2 {
    top: -2px;
  }
  .center-stage {
    top: 128px;
  }
  .table-message {
    bottom: 39px;
    font-size: 10px;
  }
  .direction-label {
    bottom: 23px;
    font-size: 8px;
  }
  .avatar {
    height: 42px;
    width: 42px;
    font-size: 23px;
  }
  .seat-info {
    padding: 7px;
  }
  .seat-status {
    margin-top: 6px;
    font-size: 10px;
  }
  .played-cards .card {
    height: 63px;
    width: 43px;
  }
  .played-cards .card .rank {
    font-size: 21px;
  }
  .played-cards .card .pip {
    font-size: 25px;
  }
  .played-cards.many .card {
    width: 34px;
  }
  .hand-panel {
    margin-top: 13px;
    padding: 13px 18px;
  }
  .hand-viewport {
    height: 129px;
    padding-top: 22px;
  }
  .hand .card {
    height: 90px;
  }
  .action-row {
    padding-top: 10px;
    min-height: 54px;
  }
  .actions button {
    min-height: 38px;
    padding: 0 15px;
  }
  #history {
    height: 137px;
  }
  .score-panel {
    padding: 17px;
  }
  .team-score {
    margin-top: 17px;
  }
  .win-count {
    margin-top: 16px;
  }
  .team-note {
    padding-top: 13px;
  }
  .result-head {
    font-size: 20px;
  }
  .result-places {
    margin-top: 12px;
  }
  .result-places > div {
    padding: 8px;
  }
  .table-message:empty {
    display: none;
  }
}
@media (max-width: 1150px) {
  main {
    padding-left: 24px;
    padding-right: 24px;
  }
  .layout {
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 16px;
  }
  header {
    padding: 0 25px;
  }
  .seat {
    width: 111px;
  }
  .center-stage {
    width: 65%;
  }
  .actions {
    gap: 6px;
  }
  .actions button {
    padding: 0 11px;
  }
  .actions kbd {
    display: none;
  }
  .hand-tools {
    gap: 8px;
  }
  .score-panel,
  .history-panel {
    padding: 16px;
  }
  .selection-info > span {
    max-width: 240px;
  }
  .mode-pills span {
    font-size: 9px;
    padding: 7px;
  }
  #wild-note {
    font-size: 9px;
  }
  .played-cards.many {
    gap: 2px;
  }
}
@media (max-width: 850px) {
  aside {
    display: none;
  }
  .layout {
    display: block;
  }
  .header-info {
    display: none;
  }
  .heading h1 {
    font-size: 21px;
  }
  main {
    padding: 20px 18px;
  }
  .mode-pills span:last-child {
    display: none;
  }
  .arena {
    height: 350px;
  }
  .center-stage {
    top: 145px;
  }
  .seat-1,
  .seat-3 {
    top: 130px;
  }
  header {
    height: 68px;
  }
  .hand-panel {
    padding: 15px;
  }
  .actions {
    gap: 7px;
  }
  .selection-info > span {
    max-width: 210px;
  }
  footer > span:last-child {
    display: none;
  }
}
@media (max-width: 550px) {
  main {
    padding: 17px 8px;
  }
  .brand {
    font-size: 18px;
  }
  header {
    padding: 0 15px;
    gap: 0;
  }
  nav {
    gap: 10px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .heading h1 {
    font-size: 17px;
  }
  .seat {
    width: 83px;
  }
  .avatar {
    width: 37px;
    height: 37px;
    font-size: 21px;
  }
  .seat-1,
  .seat-3 {
    top: 115px;
  }
  .seat-info {
    padding: 7px 3px;
  }
  .seat-name {
    font-size: 11px;
  }
  .seat-count strong {
    font-size: 14px;
  }
  .seat .back-stack {
    left: 57px;
  }
  .table {
    inset: 43px 1px 10px;
    border-width: 8px;
  }
  .arena {
    height: 330px;
  }
  .center-stage {
    top: 144px;
    width: 66%;
  }
  .played-cards {
    gap: 2px;
  }
  .played-cards .card {
    width: 33px;
    height: 52px;
    padding: 4px;
  }
  .played-cards .card .rank {
    font-size: 17px;
  }
  .played-cards .card .suit {
    font-size: 14px;
  }
  .played-cards .card .pip {
    font-size: 20px;
    right: 3px;
  }
  .played-cards.many .card {
    width: 24px;
    padding: 3px;
  }
  .played-cards.many .pip {
    display: none;
  }
  .table-message {
    bottom: 38px;
    max-width: 85%;
    font-size: 9px;
    white-space: normal;
  }
  .direction-label {
    bottom: 20px;
  }
  .welcome-title {
    font-size: 17px;
  }
  .welcome-sub {
    font-size: 9px;
  }
  .hand-tools {
    font-size: 9px;
  }
  .hand-top strong {
    font-size: 11px;
  }
  .hand-viewport {
    height: 123px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }
  .hand {
    min-width: 540px;
  }
  .hand .card {
    height: 83px;
    width: 53px;
  }
  .hand .card .rank {
    font-size: 23px;
  }
  .hand .card .pip {
    font-size: 26px;
  }
  .hand-panel {
    padding: 11px;
  }
  .action-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .selection-info > span {
    max-width: none;
  }
  .actions {
    justify-content: flex-end;
  }
  .actions button {
    padding: 0 13px;
  }
  .result-places {
    gap: 5px;
  }
  .result-places > div {
    min-width: 47px;
    font-size: 9px;
    padding: 8px 5px;
  }
  .result-head {
    font-size: 19px;
  }
  .result-detail {
    font-size: 10px;
  }
  .hand-tools button {
    padding: 0;
  }
  .pattern-label {
    font-size: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
