:root {
  font-family: "Avenir Next", Avenir, "Trebuchet MS", sans-serif;
  background: #f2ede4;
  color: #332b30;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(ellipse at 10% 0%, #fcf7ef, transparent 70%);
}
button {
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button:focus-visible,
summary:focus-visible {
  outline: 3px solid #bd8c43;
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.48;
  cursor: default;
}
main {
  max-width: 1120px;
  margin: auto;
  padding: 26px 44px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #d4ccbf;
  padding-bottom: 22px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 2px;
  font-size: 11px;
  font-weight: 700;
}
.wordmark b {
  font-size: 29px;
  color: #733f55;
}
.edition {
  font-size: 12px;
  font-weight: 700;
}
.edition i {
  font-style: normal;
  font-size: 9px;
  letter-spacing: 2px;
  margin-left: 15px;
  color: #827077;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 29px 0 25px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 2.7px;
  font-weight: 700;
  margin: 0 0 10px;
}
h1 {
  font-family: Georgia, serif;
  font-size: 57px;
  letter-spacing: -2.7px;
  font-weight: 400;
  margin: 0;
}
h1 em {
  color: #875067;
  font-weight: 400;
}
.outline {
  color: #533847;
  border: 1px solid #bdb0af;
  background: transparent;
  padding: 12px 17px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
}
.table {
  background: radial-gradient(ellipse at 50% 25%, #513b4c, #332334);
  border: 1px solid #654652;
  border-radius: 18px;
  box-shadow:
    0 9px 22px #34222c20,
    inset 0 0 0 7px #342433,
    inset 0 0 0 8px #7d596040;
  position: relative;
  overflow: hidden;
  color: #f1e4d5;
  padding: 23px 30px 16px;
}
.table:before,
.table:after {
  content: "◇";
  font-family: Georgia, serif;
  font-size: 270px;
  line-height: 1;
  color: #e1b27705;
  position: absolute;
  top: 3px;
  pointer-events: none;
}
.table:before {
  left: -5px;
}
.table:after {
  right: -5px;
}
.table-top {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  letter-spacing: 2px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.pill {
  border: 1px solid #b88e61aa;
  border-radius: 20px;
  padding: 6px 11px;
  color: #e9c488;
  font-size: 8px;
}
.opponent {
  display: flex;
  justify-content: center;
  gap: 10px;
  align-items: center;
  margin: 11px 0 16px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border: 1px solid #bc9675;
  border-radius: 50%;
  font:
    18px Georgia,
    serif;
  color: #eacb9a;
}
.opponent strong {
  font-size: 12px;
  font-weight: 600;
  display: block;
}
.opponent span {
  font-size: 9px;
  color: #c7b6bd;
  display: block;
  margin-top: 3px;
}
.mini-hand {
  height: 31px;
  display: flex;
  margin-left: 10px;
  transform: rotate(5deg);
}
.mini-hand i {
  width: 20px;
  height: 29px;
  background: repeating-linear-gradient(
    45deg,
    #8d695a 0px,
    #8d695a 1px,
    #453241 1px,
    #453241 5px
  );
  border: 1px solid #b2957c;
  border-radius: 3px;
  margin-left: -10px;
  transform: rotate(-6deg);
}
.piles {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 29px;
  position: relative;
}
.pile {
  background: none;
  color: #ecd8c4;
  border: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  position: relative;
}
.pile > span:last-child {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 1.8px;
}
.pile b {
  background: #e1c48e1c;
  border: 1px solid #b48e5755;
  border-radius: 4px;
  padding: 2px 5px;
  margin-left: 3px;
  font-size: 8px;
}
.pile:disabled {
  opacity: 0.85;
}
.stack {
  height: 98px;
  width: 66px;
  display: block;
  filter: drop-shadow(1px 5px 4px #0f0a1740);
}
.stack svg {
  height: 100%;
  width: 100%;
}
.pile:not(:disabled):hover .stack {
  transform: translateY(-4px);
  transition: transform 0.18s;
}
.wild-marker {
  display: flex;
  gap: 13px;
  align-items: center;
  padding-left: 27px;
  margin-left: 7px;
  border-left: 1px solid #b7947a44;
}
.wild-marker > div:first-child {
  width: 50px;
  transform: rotate(7deg);
  filter: drop-shadow(1px 4px 4px #160d1744);
}
.wild-marker svg {
  display: block;
  width: 100%;
}
.wild-marker span {
  font-size: 8px;
  letter-spacing: 1.4px;
  display: block;
  color: #d4baa8;
}
.wild-marker strong {
  font:
    30px Georgia,
    serif;
  display: block;
  margin: 2px 0;
}
.wild-marker small {
  font-size: 9px;
  line-height: 1.5;
  color: #c7b2bb;
}
.table-caption {
  text-align: center;
  margin-top: 22px;
  font-size: 7px;
  letter-spacing: 3px;
  color: #bba1a9;
}
.message {
  border-left: 3px solid #b48b53;
  background: #e9e1d2;
  padding: 12px 16px;
  font-size: 12px;
  line-height: 1.6;
  margin: 18px 0 24px;
  min-height: 44px;
}
.hand-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.hand-heading > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hand-heading .eyebrow {
  margin: 0;
}
.hand-heading b {
  font-size: 8px;
  color: #8a7b78;
  font-weight: 500;
  letter-spacing: 1px;
}
.hand-tools {
  display: flex;
  gap: 15px;
}
.hand-tools button {
  border: 0;
  background: none;
  font-size: 10px;
  color: #705668;
  padding: 7px 0;
}
.trays {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.tray {
  border: 1px solid #d3c5c6;
  background: #ece5df;
  border-radius: 8px;
  padding: 11px 9px;
  min-height: 121px;
  min-width: 0;
}
.tray.valid {
  border-color: #829486;
  background: #e5e8df;
}
.tray-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 8px;
  letter-spacing: 0.8px;
  color: #76616b;
  margin-bottom: 12px;
  gap: 4px;
}
.tray-header strong {
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0;
  text-align: right;
}
.tray.valid .tray-header {
  color: #425d4c;
}
.cards {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  min-height: 68px;
  align-content: flex-start;
}
.card {
  background: none;
  border: 0;
  border-radius: 6px;
  padding: 0;
  width: 50px;
  min-width: 42px;
  flex: 0 0 50px;
  position: relative;
  transition: transform 0.16s;
  filter: drop-shadow(0 2px 2px #4d354d18);
  touch-action: manipulation;
}
.card svg {
  width: 100%;
  height: auto;
  display: block;
}
.card.selected {
  transform: translateY(-10px);
  outline: 3px solid #975a74;
  outline-offset: 2px;
}
.card.picked:after {
  content: "↑";
  position: absolute;
  right: 3px;
  top: 2px;
  font-size: 12px;
  color: #9b6c20;
}
.tray.loose {
  grid-column: 1/-1;
  min-height: 108px;
  background: transparent;
  border-style: dashed;
}
.tray.loose .cards {
  min-height: 0;
}
.group-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 15px 0;
}
.group-tools > span {
  font-size: 10px;
  color: #8d7781;
}
.group-tools > div {
  display: flex;
  gap: 5px;
}
.group-tools button {
  font-size: 10px;
  padding: 7px 11px;
  border: 1px solid #c8babe;
  border-radius: 4px;
  background: #f8f3ea;
  color: #694b5b;
}
.actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 22px 0 28px;
}
.actions button {
  min-width: 175px;
  padding: 13px 20px;
  font-size: 11px;
}
.primary {
  background: #5a354c;
  color: #fff6e7;
  border: 1px solid #5a354c;
  border-radius: 5px;
  font-weight: 600;
}
.result {
  border: 1px solid #58715a;
  background: #e0e8d8;
  padding: 22px 25px;
  margin-bottom: 24px;
  border-radius: 8px;
}
.result h2 {
  font:
    32px Georgia,
    serif;
  color: #334e38;
  margin: 0 0 7px;
}
.result p {
  font-size: 12px;
  line-height: 1.7;
  margin: 0;
}
.result .result-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}
.result-groups span {
  font-size: 11px;
  background: #f3f4e8;
  padding: 6px 9px;
  border-radius: 4px;
}
.result-groups .red {
  color: #a3464e;
}
footer {
  display: flex;
  justify-content: space-between;
  letter-spacing: 1.5px;
  font-size: 8px;
  color: #8d7c7d;
  border-top: 1px solid #d1c6bc;
  padding: 18px 0;
}
.rules {
  border-top: 1px solid #d1c6bc;
  margin-top: 13px;
}
.rules summary {
  list-style: none;
  cursor: pointer;
  padding: 21px 0;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
}
.rules summary span {
  font-size: 20px;
}
.rules-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 45px;
  padding: 10px 0 20px;
}
.rules h2 {
  font:
    30px Georgia,
    serif;
  margin: 0 0 20px;
}
.rules h3 {
  font-size: 12px;
  margin-top: 20px;
}
.rules p,
.rules li {
  font-size: 12px;
  line-height: 1.8;
  color: #715f66;
}
.rules ul {
  padding-left: 17px;
}
.rules li {
  margin: 7px 0;
}
.fine {
  font-size: 10px !important;
}
kbd {
  border: 1px solid #bdb0ad;
  padding: 1px 4px;
  border-radius: 3px;
}
code {
  font-size: 10px;
}
@media (max-width: 750px) {
  main {
    padding: 20px 18px;
  }
  .edition i {
    display: none;
  }
  .intro {
    padding: 25px 0 21px;
  }
  h1 {
    font-size: 40px;
    letter-spacing: -1.9px;
  }
  .intro .outline {
    font-size: 9px;
    padding: 10px 12px;
    max-width: 97px;
    line-height: 1.6;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 2px;
  }
  .table {
    padding: 19px 19px 15px;
    border-radius: 13px;
  }
  .piles {
    gap: 19px;
  }
  .wild-marker {
    padding-left: 16px;
    gap: 10px;
    margin-left: 0;
  }
  .wild-marker > div:first-child {
    width: 42px;
  }
  .stack {
    height: 85px;
    width: 58px;
  }
  .wild-marker strong {
    font-size: 26px;
  }
  .table-caption {
    font-size: 6px;
    letter-spacing: 1.9px;
  }
  .trays {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .tray {
    min-height: 120px;
    padding: 10px 7px;
  }
  .cards {
    gap: 5px;
  }
  .card {
    width: 44px;
    flex-basis: 44px;
    min-width: 44px;
  }
  .tray.loose .cards {
    gap: 4px;
  }
  .tray.loose {
    min-height: 85px;
  }
  .hand-heading > div:first-child {
    display: block;
  }
  .hand-heading b {
    display: block;
    margin-top: 6px;
  }
  .hand-tools {
    gap: 13px;
  }
  .group-tools {
    align-items: flex-start;
    gap: 10px;
  }
  .group-tools > span {
    max-width: 90px;
    line-height: 1.5;
  }
  .group-tools button {
    padding: 8px 8px;
    font-size: 9px;
  }
  .group-tools > div {
    gap: 4px;
  }
  .actions button {
    min-width: 0;
    flex: 1;
    padding: 13px 8px;
    font-size: 10px;
  }
  .message {
    font-size: 11px;
    margin: 15px 0 20px;
  }
  .rules-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  footer {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .table-top {
    font-size: 7px;
    letter-spacing: 1.4px;
  }
  .pill {
    font-size: 7px;
    padding: 5px 8px;
  }
  .opponent {
    margin-top: 14px;
  }
  .wild-marker span {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .wild-marker small {
    font-size: 8px;
  }
  .pile > span:last-child {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .pile b {
    margin-left: 0;
  }
  .result {
    padding: 19px;
  }
  .result h2 {
    font-size: 29px;
  }
}
@media (max-width: 390px) {
  main {
    padding-left: 14px;
    padding-right: 14px;
  }
  h1 {
    font-size: 36px;
  }
  .table {
    padding-left: 14px;
    padding-right: 14px;
  }
  .piles {
    gap: 15px;
  }
  .wild-marker {
    padding-left: 12px;
    gap: 8px;
  }
  .wild-marker > div:first-child {
    width: 37px;
  }
  .card {
    width: 43px;
    flex-basis: 43px;
    min-width: 43px;
  }
  .cards {
    gap: 4px;
  }
  .table-caption {
    letter-spacing: 1.6px;
  }
  .trays {
    gap: 7px;
  }
  .hand-tools button {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
