:root {
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #293e34;
  background: #f6f5ef;
  font-synthesis: none;
  --green: #214e40;
  --muted: #879087;
  --gold: #dec68c;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
html {
  scrollbar-gutter: stable;
}
html.is-dragging {
  overflow: hidden;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: default;
  opacity: 0.35;
}
button,
a {
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #ddad49;
  outline-offset: 4px;
}
button {
  border: 0;
  background: none;
}
a {
  color: inherit;
  text-decoration: none;
}
.header {
  height: 94px;
  border-bottom: 1px solid #e3e5dc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 25px;
  font-weight: 650;
  letter-spacing: 2px;
}
.brand-mark {
  width: 43px;
  height: 49px;
  border-radius: 8px;
  background: var(--green);
  color: #eddfb9;
  display: grid;
  place-items: center;
  font-size: 32px;
  transform: rotate(-7deg);
}
.brand div > span {
  display: block;
  font-size: 9px;
  letter-spacing: 2.5px;
  font-weight: 500;
  margin-top: 3px;
}
.header nav {
  display: flex;
  height: 100%;
  gap: 39px;
  align-items: center;
}
.nav-item {
  height: 100%;
  font-size: 14px;
  color: #7c867e;
  position: relative;
  padding: 0 2px;
}
.nav-item.active {
  color: var(--green);
  font-weight: 650;
}
.nav-item.active:after {
  content: "";
  height: 3px;
  border-radius: 3px;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--green);
}
.local-badge {
  font-size: 11px;
  letter-spacing: 1px;
  color: #7a8479;
  display: flex;
  gap: 8px;
  align-items: center;
}
i {
  font-style: normal;
}
.local-badge i,
.save-state i {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #89a88b;
}
main {
  max-width: 1480px;
  margin: auto;
  padding: 0 5%;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 38px 0 29px;
  gap: 20px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.2px;
  font-weight: 650;
  color: #899383;
  margin: 0 0 13px;
}
h1 {
  font-size: 30px;
  font-weight: 550;
  letter-spacing: 1px;
  line-height: 1.4;
  margin: 0 0 12px;
}
h1 > span {
  color: #b8aa79;
}
h2,
h3,
p {
  margin-top: 0;
}
.intro-copy {
  font-size: 13px;
  color: #899087;
  margin: 0;
  letter-spacing: 0.5px;
}
.text-button {
  font-size: 12px;
  border-bottom: 1px solid #c8cfc0;
  padding: 10px 0;
  white-space: nowrap;
}
.text-button span {
  margin-left: 16px;
}
.game-panel {
  background: #194b3e;
  border-radius: 17px;
  box-shadow: 0 12px 35px #18372815;
  overflow: hidden;
  color: #e1e9db;
  position: relative;
  border: 1px solid #2c5748;
}
.game-toolbar {
  min-height: 91px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 19px 27px;
  border-bottom: 1px solid #ffffff12;
  gap: 20px;
  background: #143d333f;
}
.game-name {
  display: flex;
  gap: 12px;
  align-items: center;
}
.tiny-spade {
  font-size: 32px;
  color: #d9c696;
}
.game-name h2 {
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 5px;
  letter-spacing: 1px;
}
.game-name div > span {
  font-size: 8px;
  letter-spacing: 2px;
  color: #9fb2a3;
}
.difficulty {
  display: flex;
  background: #0e342b66;
  padding: 4px;
  border: 1px solid #ffffff08;
  border-radius: 7px;
  gap: 3px;
}
.difficulty button {
  font-size: 12px;
  color: #b2c4b5;
  padding: 9px 12px;
  border-radius: 4px;
  white-space: nowrap;
}
.difficulty button span {
  font-size: 10px;
  margin-left: 6px;
  opacity: 0.6;
}
.difficulty button.active {
  background: #e9e4d3;
  color: #274b3a;
  box-shadow: 0 1px 4px #0002;
}
.stats {
  display: flex;
  gap: 25px;
}
.stats div {
  min-width: 31px;
}
.stats small {
  display: block;
  font-size: 9px;
  color: #9ab09e;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.stats b {
  font-size: 17px;
  font-weight: 450;
  font-variant-numeric: tabular-nums;
}
.stats em {
  font-size: 11px;
  color: #9bb09d;
  font-style: normal;
}
.table-scroll {
  overflow-x: auto;
  max-height: 72dvh;
  overscroll-behavior: contain;
  overflow-anchor: none;
  background: radial-gradient(ellipse at 50% 10%, #2c62504d, transparent 75%);
}
#table {
  padding: 28px 27px 21px;
  min-width: 700px;
}
#columns {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
  min-height: 355px;
}
.column {
  position: relative;
}
.empty-slot {
  position: absolute;
  top: 0;
  width: 100%;
  aspect-ratio: 0.7;
  border: 1px solid #9bbfa429;
  border-radius: 7px;
  color: #bcd0bb19;
  display: grid;
  place-items: center;
}
.empty-slot > span {
  font-size: 30px;
}
.card-slot {
  position: absolute;
  left: 0;
  width: 100%;
  user-select: none;
  touch-action: none;
}
.card-slot[role="button"] {
  cursor: grab;
}
.card-slot.selected .card {
  box-shadow:
    0 0 0 3px #e7c371,
    0 4px 12px #0003;
  filter: brightness(1.04);
}
.hinted .card {
  box-shadow: 0 0 0 3px #ecd294;
}
.hint-target .empty-slot {
  border: 2px dashed #efd490;
  background: #efd49022;
}
.hint-target:after {
  content: "↓";
  position: absolute;
  top: -27px;
  left: 42%;
  color: #efd490;
  font-size: 22px;
}
.card {
  width: 100%;
  aspect-ratio: 0.7;
  background: var(--paper, #fffcf3);
  color: var(--ink, #234d43);
  position: relative;
  border: 1px solid #c7c8b6;
  box-shadow: 0 2px 3px #0720172e;
  overflow: hidden;
  container-type: inline-size;
  user-select: none;
}
.shape-standard {
  border-radius: 7px;
}
.shape-soft {
  border-radius: 19px;
}
.shape-cut {
  border-radius: 0;
  clip-path: polygon(
    10% 0,
    90% 0,
    100% 7%,
    100% 93%,
    90% 100%,
    10% 100%,
    0 93%,
    0 7%
  );
}
.card.face {
  background-image: linear-gradient(120deg, #fff3, transparent 60%, #82734b07);
}
.corner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.95;
  width: 23%;
  gap: 3px;
  z-index: 2;
}
.corner.top {
  top: 6%;
  left: 3%;
}
.corner.bottom {
  bottom: 6%;
  right: 3%;
  transform: rotate(180deg);
}
.corner b {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22cqw;
  font-weight: 600;
  letter-spacing: -1.3px;
}
.corner svg {
  width: 12cqw;
  height: 12cqw;
}
.pips {
  position: absolute;
  inset: 18% 22%;
}
.pip {
  position: absolute;
  width: 34%;
  transform: translate(-50%, -50%);
  display: flex;
}
.pip svg {
  width: 100%;
}
.pip.ace {
  width: 91%;
}
.court {
  position: absolute;
  inset: 2% -2%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 30% 30% 8% 8%;
  opacity: 0.9;
  gap: 3%;
}
.court > svg {
  width: 55%;
  max-height: 43%;
}
.court strong {
  font:
    600 32cqw Georgia,
    serif;
  line-height: 1;
}
.court small {
  font-size: 5.2cqw;
  letter-spacing: 1px;
}
.crown {
  font-size: 19cqw;
  line-height: 1;
  color: #bba16b;
}
.card.back {
  background: var(--paper);
  padding: 5%;
}
.back-pattern {
  width: 100%;
  height: 100%;
  border: 1px solid #d4c49c;
  border-radius: 3px;
  background:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 4px,
      #e4d5a414 4px,
      #e4d5a414 5px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 4px,
      #e4d5a414 4px,
      #e4d5a414 5px
    ),
    var(--back);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #e5d9b3;
  position: relative;
}
.back-pattern:before {
  content: "";
  position: absolute;
  inset: 6%;
  border: 1px solid #d6ca9e77;
  border-radius: 35% 35% 35% 35%;
}
.back-emblem {
  font-size: 42cqw;
}
.back-pattern > span {
  font-size: 6cqw;
  letter-spacing: 1px;
  margin-top: 6%;
}
.joker-label {
  position: absolute;
  left: 10%;
  top: 7%;
  font:
    600 12cqw Georgia,
    serif;
  letter-spacing: 1px;
}
.joker-art {
  position: absolute;
  inset: 26% 12%;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transform: rotate(-20deg);
}
.joker-art > span {
  font-size: 68cqw;
  line-height: 1;
}
.joker-art > i {
  position: absolute;
  top: -12%;
  right: -7%;
  font-size: 26cqw;
}
.joker-foot {
  position: absolute;
  bottom: 9%;
  width: 100%;
  text-align: center;
  font-size: 10cqw;
}
.table-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 31px;
  min-height: 116px;
  gap: 25px;
}
.stock-button {
  display: flex;
  flex-direction: column;
  padding: 0;
  color: #d3dbc8;
  gap: 16px;
}
.stock-stack {
  position: relative;
  display: block;
  width: 139px;
  height: 83px;
}
.stock-stack > span {
  position: absolute;
  display: block;
  width: 57px;
  top: 0;
}
.stock-button > span:last-child {
  font-size: 10px;
}
.stock-button b {
  font-size: 9px;
  color: #b7bfa5;
  font-weight: 400;
  margin-left: 15px;
}
.stock-empty {
  width: 60px;
  height: 80px;
  border: 1px solid #ffffff20;
  border-radius: 6px;
  display: grid !important;
  place-items: center;
}
.table-signature {
  align-self: center;
  color: #bdd0b328;
  text-align: center;
  font-family: serif;
  font-size: 30px;
  letter-spacing: 8px;
  padding-top: 20px;
}
.table-signature span {
  display: block;
  font: 7px sans-serif;
  letter-spacing: 3px;
  margin-top: 11px;
}
#foundation {
  display: flex;
  gap: 7px;
  padding-bottom: 27px;
}
.foundation-slot {
  width: 39px;
  aspect-ratio: 0.7;
  border: 1px solid #c4d1b326;
  border-radius: 5px;
  display: grid;
  place-items: center;
  color: #bcd0bb25;
  font-size: 18px;
}
.foundation-slot.filled {
  border: 0;
}
.board-actions {
  min-height: 67px;
  border-top: 1px solid #ffffff12;
  background: #143d3340;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 25px;
  gap: 15px;
}
.save-state {
  font-size: 9px;
  color: #9db39d;
  display: flex;
  align-items: center;
  gap: 7px;
}
.board-actions > div {
  display: flex;
  gap: 10px;
}
.board-actions > div > button {
  padding: 9px 18px;
  font-size: 12px;
  border: 1px solid #ffffff20;
  border-radius: 6px;
  color: #e0e5d8;
  background: #ffffff04;
}
.board-actions > div > button:hover {
  background: #ffffff12;
}
.board-actions button > span {
  font-size: 18px;
  vertical-align: -1px;
  margin-right: 6px;
}
.help-circle {
  border: 1px solid #b3c6ac55;
  border-radius: 50%;
  width: 23px;
  height: 23px;
  font:
    13px Georgia,
    serif;
}
.under-board {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 17px 0 24px;
  font-size: 10px;
  color: #8b9487;
}
.under-board p {
  margin: 0;
}
.under-board p > span {
  font-size: 17px;
  margin-right: 6px;
  color: #9baa8f;
}
.under-board button {
  font-size: 10px;
}
.under-board button > span {
  margin-left: 14px;
  color: #4f735a;
}
.studio-teaser {
  position: relative;
  overflow: hidden;
  min-height: 160px;
  border: 1px solid #dfe3d4;
  border-radius: 12px;
  background: #edeee3;
  display: flex;
  gap: 23px;
  align-items: center;
  padding: 27px 30px;
  margin: 10px 0 45px;
}
.teaser-icon {
  color: #8e9f7d;
  font-size: 49px;
}
.studio-teaser .eyebrow {
  font-size: 8px;
  margin-bottom: 11px;
}
.studio-teaser h3 {
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 10px;
}
.studio-teaser p:last-child {
  font-size: 11px;
  color: #8b9481;
  margin: 0;
}
.outline-button {
  border: 1px solid #b9c5af;
  border-radius: 6px;
  padding: 12px 18px;
  font-size: 12px;
  white-space: nowrap;
}
.outline-button span {
  margin-left: 13px;
}
.studio-teaser > .outline-button {
  margin-left: auto;
  margin-right: 170px;
}
.teaser-cards {
  position: absolute;
  right: 30px;
  bottom: -21px;
  width: 130px;
  height: 152px;
}
.teaser-cards > .card {
  width: 89px;
  position: absolute;
  transform: rotate(-13deg);
  left: 0;
  top: 3px;
}
.teaser-cards > .card:last-child {
  transform: rotate(12deg);
  left: 57px;
  top: 15px;
}
.primary-button {
  background: #244f40;
  color: #fffbed;
  border-radius: 7px;
  padding: 13px 21px;
  font-size: 12px;
}
.primary-button:hover {
  background: #346950;
}
footer {
  display: flex;
  max-width: 1480px;
  padding: 21px 5% 30px;
  margin: auto;
  justify-content: space-between;
  border-top: 1px solid #e0e4d8;
  color: #989f90;
  font-size: 9px;
  letter-spacing: 1px;
}
.theme-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 10px 0 30px;
}
.theme-tile {
  padding: 0;
  border: 1px solid #dce1d4;
  border-radius: 12px;
  background: #fffef9;
  overflow: hidden;
  text-align: left;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.theme-tile:hover {
  transform: translateY(-3px);
}
.theme-tile.chosen {
  border: 2px solid #4f735a;
}
.theme-preview {
  height: 190px;
  background: var(--theme-wash);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow: hidden;
}
.theme-preview > .card {
  width: 82px;
  flex-shrink: 0;
  transform: rotate(-13deg) translateX(18px);
}
.theme-preview > .card:nth-child(2) {
  transform: rotate(0);
  z-index: 1;
  margin-left: -20px;
}
.theme-preview > .card:nth-child(3) {
  transform: rotate(13deg) translateX(-18px);
  margin-left: -20px;
}
.theme-meta {
  padding: 20px 15px 16px;
}
.theme-meta h3 {
  font-size: 15px;
  font-weight: 550;
  margin: 0 0 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.theme-meta h3 span {
  font-size: 9px;
  color: #7c8e70;
  font-weight: 400;
}
.theme-meta p {
  font-size: 11px;
  color: #8c9586;
  margin: 0;
}
.atelier-settings {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #eeefe5;
  border: 1px solid #e0e4d5;
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 39px;
  gap: 20px;
}
.atelier-settings h2 {
  font-size: 21px;
  font-weight: 500;
  margin: 0 0 10px;
}
.atelier-settings p:last-child {
  font-size: 12px;
  color: #8b9382;
  margin: 0;
}
.shape-options {
  display: flex;
  gap: 12px;
}
.shape-options > button {
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  border: 1px solid #d5ddca;
  border-radius: 8px;
}
.shape-options > button.active {
  background: #fffdf2;
  border-color: #54765b;
}
.shape-sample {
  display: flex;
  flex-direction: column;
  background: #fdfcf4;
  border: 1px solid #9ea991;
  width: 30px;
  height: 43px;
  font:
    14px Georgia,
    serif;
  padding: 4px;
  text-align: left;
}
.shape-sample.shape-soft {
  border-radius: 10px;
}
.shape-sample small {
  font-size: 11px;
}
.gallery-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.gallery-heading h2 {
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 10px;
}
.gallery-heading h2 > span {
  font-size: 11px;
  font-weight: 400;
  color: #8b957f;
  margin-left: 15px;
}
.gallery-heading p:last-child {
  font-size: 12px;
  color: #8b9382;
  margin: 0;
}
.gallery-note {
  font-size: 10px;
  line-height: 1.9;
  color: #8b9382;
  text-align: right;
}
.all-cards {
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  gap: 23px 12px;
  padding-bottom: 45px;
}
.gallery-card > span {
  display: block;
  font-size: 9px;
  text-align: center;
  color: #92998a;
  margin-top: 9px;
}
.game-library {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 15px 0 25px;
}
.game-library-card {
  border: 1px solid #dce1d5;
  border-radius: 13px;
  padding: 25px;
  background: #f0f0e8;
}
.game-library-card.ready {
  background: #e7eee1;
}
.library-art {
  font-size: 90px;
  color: #90a484;
  height: 143px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #d4ddcd;
  margin-bottom: 25px;
}
.game-library-card:nth-child(2) .library-art {
  color: #bf9384;
}
.game-library-card h2 {
  font-size: 23px;
  font-weight: 500;
}
.game-library-card > p:not(.eyebrow) {
  font-size: 12px;
  color: #7f8b79;
  line-height: 1.9;
  min-height: 47px;
}
.coming-soon {
  display: inline-block;
  padding: 13px 21px;
  background: #e5e7dc;
  color: #97a08c;
  border-radius: 7px;
  font-size: 12px;
}
.library-note {
  font-size: 12px;
  color: #8b9382;
  margin: 30px 0 70px;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  background: #203b31f5;
  color: #f5f2e5;
  padding: 14px 23px;
  border-radius: 9px;
  box-shadow: 0 8px 30px #0002;
  z-index: 1000;
  pointer-events: none;
  font-size: 12px;
  line-height: 1.6;
  transition: 0.2s;
  max-width: min(90vw, 520px);
  text-align: center;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
dialog {
  border: 1px solid #dddccf;
  background: #faf9f0;
  color: #304a3c;
  border-radius: 16px;
  padding: 36px;
  max-width: 520px;
  width: calc(100% - 35px);
  box-shadow: 0 24px 100px #102b3955;
}
dialog::backdrop {
  background: #102d2466;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font-size: 25px;
  font-weight: 500;
  margin: 0 0 22px;
}
.dialog-close {
  position: absolute;
  right: 14px;
  top: 11px;
  font-size: 25px;
  color: #8f9988;
}
.rules-list {
  padding-left: 22px;
  line-height: 1.7;
  font-size: 13px;
}
.rules-list li {
  padding-left: 6px;
  margin-bottom: 13px;
}
.rules-list b {
  font-weight: 550;
}
.rules-list p {
  font-size: 12px;
  color: #87907e;
  margin: 4px 0 0;
}
.dialog-note {
  font-size: 11px;
  color: #929986;
  background: #eeefe5;
  padding: 13px;
  border-radius: 6px;
  line-height: 1.9;
}
.full {
  width: 100%;
  margin-top: 12px;
}
.dialog-copy {
  font-size: 13px;
  color: #87907e;
  line-height: 1.9;
}
.dialog-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 28px;
}
.win-symbol {
  font-size: 70px;
  color: #b79852;
  text-align: center;
}
.drag-source {
  opacity: 0.2;
}
.drag-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 900;
  filter: drop-shadow(0 12px 10px #0003);
  transform: rotate(2deg);
}
.drag-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1700;
  contain: layout paint;
}
.fullscreen-toggle {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid #c4d0b344;
  border-radius: 6px;
  color: #eee4c8;
  font-size: 12px;
  white-space: nowrap;
}
.fullscreen-toggle:hover {
  background: #ffffff12;
}
html.table-fullscreen {
  overflow: hidden;
  scrollbar-gutter: auto;
  background: #194b3e;
}
.table-fullscreen .header,
.table-fullscreen footer,
.table-fullscreen #main > :not(.game-panel) {
  display: none;
}
.table-fullscreen #main {
  margin: 0;
  padding: 0;
  max-width: none;
}
.table-fullscreen .game-panel {
  position: fixed;
  inset: 0;
  border: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}
.table-fullscreen .game-toolbar,
.table-fullscreen .board-actions {
  flex: 0 0 auto;
}
.table-fullscreen .table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}
@media (max-width: 720px) {
  .game-toolbar {
    gap: 12px;
  }
  .fullscreen-toggle {
    margin-left: auto;
    padding: 8px;
    font-size: 11px;
  }
  .table-fullscreen .game-toolbar {
    min-height: 0;
    padding: 10px 14px;
  }
  .table-fullscreen .board-actions {
    padding: 8px 14px;
  }
}
@media (min-width: 1500px) {
  #columns {
    min-height: 390px;
  }
  .table-bottom {
    margin-top: 26px;
  }
  .foundation-slot {
    width: 45px;
  }
  .game-toolbar {
    min-height: 99px;
  }
}
@media (max-width: 1100px) {
  .header {
    padding: 0 4%;
  }
  main {
    padding: 0 3%;
  }
  .game-toolbar {
    padding: 17px;
  }
  .difficulty button {
    padding: 8px;
  }
  .difficulty button span {
    display: none;
  }
  .stats {
    gap: 15px;
  }
  #table {
    padding: 25px 18px 19px;
  }
  #columns {
    gap: 9px;
  }
  .table-signature {
    display: none;
  }
  .theme-grid {
    gap: 13px;
  }
  .theme-preview {
    height: 164px;
  }
  .shape-options > button {
    padding: 12px;
  }
  .studio-teaser > .outline-button {
    margin-right: 130px;
  }
  .board-actions {
    padding: 12px 18px;
  }
  .board-actions > div > button {
    padding: 8px 13px;
  }
  .all-cards {
    grid-template-columns: repeat(9, 1fr);
  }
}
@media (max-width: 720px) {
  .header {
    height: 75px;
    gap: 10px;
    padding: 0 5%;
  }
  .brand {
    font-size: 20px;
    gap: 9px;
  }
  .brand-mark {
    width: 33px;
    height: 39px;
    font-size: 26px;
  }
  .brand div > span {
    font-size: 7px;
    letter-spacing: 1.5px;
  }
  .header nav {
    gap: 18px;
  }
  .nav-item {
    font-size: 11px;
  }
  .local-badge {
    display: none;
  }
  main {
    padding: 0 4%;
  }
  .intro {
    padding: 29px 0 23px;
  }
  .intro h1 {
    font-size: 23px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1.6px;
  }
  .intro-copy {
    font-size: 11px;
    line-height: 1.8;
  }
  .text-button {
    font-size: 10px;
  }
  .game-toolbar {
    flex-wrap: wrap;
    gap: 16px;
    padding: 17px;
  }
  .game-name {
    gap: 8px;
  }
  .game-name h2 {
    font-size: 16px;
  }
  .game-name div > span {
    font-size: 6px;
  }
  .tiny-spade {
    font-size: 27px;
  }
  .difficulty {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .difficulty button {
    flex: 1;
    font-size: 11px;
  }
  .difficulty button span {
    display: inline;
  }
  .stats {
    gap: 20px;
  }
  .stats b {
    font-size: 15px;
  }
  .table-scroll {
    overscroll-behavior-x: contain;
  }
  #table {
    min-width: 720px;
  }
  #columns {
    gap: 9px;
    min-height: 327px;
  }
  .card-slot .corner b {
    font-size: 24cqw;
  }
  .board-actions {
    flex-wrap: wrap;
    justify-content: center;
    padding: 13px;
  }
  .board-actions .save-state {
    order: 2;
    width: 100%;
    justify-content: center;
    font-size: 8px;
  }
  .board-actions .help-circle {
    position: absolute;
    right: 15px;
    bottom: 12px;
  }
  .board-actions > div > button {
    font-size: 11px;
    padding: 7px 15px;
  }
  .under-board {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
    font-size: 9px;
  }
  .under-board button {
    padding: 0;
  }
  .studio-teaser {
    padding: 25px 20px;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 25px;
  }
  .teaser-icon {
    display: none;
  }
  .studio-teaser h3 {
    font-size: 16px;
  }
  .studio-teaser p:last-child {
    font-size: 10px;
    max-width: 220px;
    line-height: 1.7;
  }
  .studio-teaser > .outline-button {
    margin-left: 0;
    z-index: 1;
    font-size: 10px;
    padding: 10px 12px;
    margin-right: 110px;
  }
  .teaser-cards {
    right: 12px;
    bottom: -20px;
    transform: scale(0.85);
    transform-origin: bottom right;
  }
  .theme-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .theme-preview {
    height: 155px;
    padding: 15px;
  }
  .theme-preview > .card {
    width: 64px;
  }
  .theme-meta {
    padding: 14px 11px;
  }
  .theme-meta h3 {
    font-size: 13px;
    flex-wrap: wrap;
  }
  .theme-meta h3 span {
    font-size: 8px;
  }
  .atelier-settings {
    padding: 21px;
    flex-direction: column;
    align-items: flex-start;
  }
  .shape-options {
    gap: 7px;
    width: 100%;
    justify-content: space-between;
  }
  .shape-options > button {
    padding: 9px 7px;
    font-size: 9px;
    gap: 7px;
  }
  .shape-sample {
    width: 25px;
    height: 36px;
    font-size: 12px;
  }
  .atelier-settings p:last-child {
    font-size: 10px;
  }
  .gallery-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .gallery-note {
    text-align: left;
    font-size: 9px;
  }
  .gallery-heading h2 {
    font-size: 20px;
  }
  .gallery-heading h2 > span {
    font-size: 9px;
  }
  .gallery-heading p:last-child {
    font-size: 11px;
    line-height: 1.8;
  }
  .all-cards {
    grid-template-columns: repeat(5, 1fr);
    gap: 19px 9px;
  }
  .gallery-card > span {
    font-size: 8px;
  }
  .game-library {
    grid-template-columns: 1fr;
  }
  .game-library-card {
    display: block;
  }
  .library-art {
    height: 105px;
    font-size: 70px;
  }
  .game-library-card > p:not(.eyebrow) {
    min-height: 0;
  }
  .intro .primary-button {
    padding: 10px;
    font-size: 10px;
    white-space: nowrap;
  }
  footer {
    padding: 22px 5%;
    font-size: 8px;
    line-height: 1.8;
    gap: 12px;
  }
  footer > span:last-child {
    text-align: right;
  }
  .library-note {
    font-size: 11px;
    line-height: 1.8;
  }
  dialog {
    padding: 30px 23px;
  }
}
.card-slot .corner.top {
  flex-direction: row;
  width: auto;
  left: 7%;
  top: 5px;
  gap: 3px;
  align-items: center;
}
.card-slot .corner.top b {
  font-size: clamp(12px, 18cqw, 21px);
  letter-spacing: -0.7px;
}
.card-slot .corner.top svg {
  width: clamp(8px, 11cqw, 13px);
  height: clamp(8px, 11cqw, 13px);
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* Keep the complete opening table in view on shorter desktop windows. */
@media (min-width: 721px) and (max-height: 850px) {
  .header {
    height: 70px;
  }
  .intro {
    padding: 23px 0 20px;
  }
  .intro h1 {
    font-size: 26px;
    margin-bottom: 8px;
  }
  .intro .eyebrow {
    margin-bottom: 9px;
  }
  .game-toolbar {
    min-height: 73px;
    padding-top: 13px;
    padding-bottom: 13px;
  }
  #columns {
    min-height: 217px;
  }
  #table {
    padding-top: 21px;
    padding-bottom: 17px;
  }
  .table-bottom {
    min-height: 101px;
    margin-top: 17px;
  }
  .stock-stack {
    height: 69px;
  }
  .stock-stack > span {
    width: 49px;
  }
  .stock-button {
    gap: 11px;
  }
  .board-actions {
    min-height: 56px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
}
@media (max-width: 720px) {
  .table-scroll::before {
    content: "左右滑动查看 10 列 · 横屏更舒适";
    display: block;
    padding: 13px 18px 0;
    font-size: 9px;
    color: #b0c3ae;
  }
}
/* Card proportions: shared by previews, live cards, and animation copies. */
.card .pips {
  inset: 16% 17%;
}
.card .pip {
  width: 32%;
}
.card .pip.ace {
  width: 61%;
}
.card .corner {
  gap: 2px;
  width: 22%;
}
.card .corner b {
  font-size: 23cqw;
  font-weight: 650;
  letter-spacing: -1px;
}
.card .corner svg {
  width: 14cqw;
  height: 14cqw;
}
.card .corner.top {
  top: 5%;
  left: 2%;
}
.card .corner.bottom {
  bottom: 5%;
  right: 2%;
}
.card-slot .card .corner.top {
  left: 6%;
  top: 6px;
  flex-direction: row;
  width: auto;
  gap: 4px;
}
.card-slot .card .corner.top b {
  font-size: clamp(15px, 21cqw, 25px);
  line-height: 1;
}
.card-slot .card .corner.top svg {
  width: clamp(10px, 13cqw, 16px);
  height: clamp(10px, 13cqw, 16px);
}
.card[data-rank="11"] .pips,
.card[data-rank="12"] .pips,
.card[data-rank="13"] .pips {
  inset: 15% 15%;
}
.card .court {
  position: absolute;
  inset: 0;
  display: block;
  border: 1px solid #b49c6870;
  border-radius: 2px;
  opacity: 1;
  overflow: hidden;
  background: #faf3df;
}
.court-portrait {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.court-badge {
  position: absolute;
  width: 19%;
  height: auto;
  display: flex;
  background: var(--paper);
  border-radius: 50%;
  padding: 2%;
}
.court-badge.top {
  top: 2%;
  right: 2%;
}
.court-badge.bottom {
  bottom: 2%;
  left: 2%;
  transform: rotate(180deg);
}
.court-badge svg {
  width: 100%;
}
.card[data-theme="midnight"] .court {
  border-color: #d5b875;
}
.effects-layer {
  position: fixed;
  inset: 0;
  z-index: 1600;
  pointer-events: none;
  overflow: hidden;
  perspective: 900px;
}
.flying-card {
  position: absolute;
  pointer-events: none;
  transform-origin: top left;
  will-change: transform;
  filter: drop-shadow(0 8px 8px #071a2230);
}
.flying-card .card {
  width: 100%;
  height: 100%;
}
.drag-ghost {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 1700;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  filter: drop-shadow(0 13px 10px #0005);
}
.drag-ghost .card-slot {
  cursor: grabbing;
}
.drag-source {
  opacity: 0.15;
}
.drag-count {
  position: absolute;
  left: 50%;
  top: -29px;
  transform: translateX(-50%);
  font-size: 10px;
  white-space: nowrap;
  background: #eee4c8;
  color: #244e3c;
  padding: 5px 9px;
  border-radius: 20px;
  box-shadow: 0 2px 6px #0002;
}
.column.drop-allowed {
  outline: 1px dashed #d9cb8644;
  outline-offset: 4px;
  border-radius: 6px;
}
.column.drop-target {
  outline: 2px solid #e8cc7e;
  outline-offset: 4px;
  background: #efd89017;
  border-radius: 6px;
}
.column.drop-target::after {
  content: "放在这里";
  position: absolute;
  top: -25px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 10px;
  color: #efd48b;
}
.column.drop-reject {
  outline: 1px dashed #d9927780;
  outline-offset: 4px;
  border-radius: 6px;
}
.sound-toggle {
  color: #d6dfca;
  font-size: 10px;
  padding: 7px 8px;
  border: 1px solid #c4d0b32b;
  border-radius: 5px;
  white-space: nowrap;
}
.board-actions .save-state {
  margin-right: auto;
}
.game-panel[aria-busy="true"] .card-slot {
  cursor: wait;
}
.game-panel[aria-busy="true"] .board-actions button:not(.sound-toggle) {
  opacity: 0.5;
}
@media (max-width: 720px) {
  .board-actions .sound-toggle {
    order: 2;
    font-size: 9px;
  }
  .board-actions .save-state {
    width: auto;
    margin-right: 0;
  }
  .board-actions {
    gap: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .drag-ghost,
  .flying-card {
    filter: none;
  }
}
