.card-room {
  max-width: 960px;
}
.room-header #sound {
  flex-shrink: 0;
  font-size: 12px;
}
.deal-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  margin: 0 4px 10px;
}
.deal-line #deal-label {
  color: var(--gold);
  font-weight: 700;
}
.top-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.draw-piles,
.foundation-piles {
  display: flex;
  gap: 12px;
}
.pile {
  position: relative;
  min-width: 0;
  text-align: center;
}
.pile-label {
  color: #d5dabb;
  font-size: 11px;
  font-weight: 650;
  margin-bottom: 8px;
  white-space: nowrap;
}
.pile-count {
  display: block;
  color: #c6d6bd;
  font-size: 10px;
  height: 14px;
  margin-top: 7px;
}
.foundation-piles .pile-label {
  font-size: 14px;
}
.foundation-piles .pile-label.red-label {
  color: #ffb6b4;
}
.card-slot {
  padding: 0;
}
.stock-empty {
  background: #0a271a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d6c884;
  font-size: 27px;
}
.stock-empty:hover {
  background: #143c28;
}
.tableau {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}
.column {
  position: relative;
  min-width: 0;
  min-height: var(--card-height);
}
.column-number {
  text-align: center;
  color: #a5c29c;
  font-size: 10px;
  margin-bottom: 7px;
  width: var(--card-width);
}
.column-stack {
  position: relative;
  min-height: var(--card-height);
}
.column .playing-card,
.column .card-slot {
  position: absolute;
  left: 0;
  top: var(--card-top, 0);
}
.tableau-card .card-corner:not(.bottom) {
  flex-direction: row;
  gap: 4px;
  align-items: baseline;
}
.tableau-card .card-corner:not(.bottom) > span {
  font-size: 17px;
  margin-top: 0;
}
.tableau-card.covered .card-center,
.tableau-card.covered .bottom {
  visibility: hidden;
}
.column .playing-card:hover {
  transform: none;
}
.column .playing-card.selected {
  transform: none;
  border-color: #b89334;
  outline-offset: -3px;
  outline: 3px solid #e6ad39;
}
.column .playing-card.selected .card-corner:not(.bottom) {
  background: #ffe9a2;
  border-radius: 3px;
  padding: 0 3px;
  left: 3px;
}
.column.legal-column .column-stack {
  background: #81d9a918;
  box-shadow: 0 0 0 2px #83e5ac;
  border-radius: 8px;
}
.column.legal-column .playing-card:last-child {
  box-shadow: 0 0 0 3px #83e5ac;
}
.card-slot.legal {
  border-style: solid;
  border-color: #83e5ac;
  box-shadow: 0 0 0 3px #83e5ac;
}
.pile .card-slot {
  font-size: 29px;
}
.empty-waste {
  opacity: 0.65;
}
.table-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 46px;
  margin-top: 20px;
  color: #c4d6b7;
  font-size: 12px;
}
.table-bottom #finish {
  font-size: 12px;
}
.result-actions {
  justify-content: center;
}
.reset-panel {
  border: 2px solid var(--gold);
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  z-index: 5;
  max-width: 420px;
  width: calc(100% - 32px);
  box-shadow: 0 0 0 100vmax #020a09b3;
}
.reset-panel h2 {
  margin-bottom: 10px;
}
.reset-panel p {
  color: var(--muted);
}
#help-panel {
  max-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
#help-panel:focus-visible {
  outline: 3px solid #ffe0a0;
  outline-offset: 3px;
}
@media (min-width: 601px) {
  .tableau {
    justify-items: center;
  }
  .column {
    width: var(--card-width);
  }
  .top-row {
    max-width: 824px;
    margin-left: auto;
    margin-right: auto;
  }
  .playing-card:focus-visible {
    z-index: 3;
  }
  .column-stack:has(.playing-card:focus-visible) {
    z-index: 2;
  }
}
@media (max-width: 600px) {
  .card-room {
    padding-left: 8px;
    padding-right: 8px;
  }
  .room-header #sound {
    font-size: 11px;
    padding: 9px 8px;
  }
  .top-row {
    gap: 9px;
    margin-bottom: 18px;
  }
  .draw-piles,
  .foundation-piles {
    gap: 5px;
  }
  .pile-label {
    font-size: 10px;
    margin-bottom: 6px;
  }
  .pile-count {
    font-size: 9px;
    margin-top: 6px;
  }
  .foundation-piles .pile-label {
    font-size: 13px;
  }
  .deal-line {
    font-size: 10px;
    margin-left: 2px;
    margin-right: 2px;
  }
  .tableau {
    gap: 4px;
    justify-items: center;
  }
  .column {
    width: var(--card-width);
  }
  .column-number {
    font-size: 9px;
  }
  .tableau-card .card-corner:not(.bottom) {
    gap: 2px;
    left: 3px;
    top: 5px;
  }
  .tableau-card .card-corner:not(.bottom) > span {
    font-size: 14px;
  }
  .tableau-card .card-corner:not(.bottom) > b {
    font-size: 14px;
  }
  .column .playing-card.selected .card-corner:not(.bottom) {
    left: 1px;
    padding: 0 2px;
  }
  .table-bottom {
    font-size: 10px;
    min-height: 44px;
    margin-top: 14px;
  }
  .pile .card-slot {
    font-size: 23px;
  }
  .top-row .playing-card {
    min-height: 66px;
  }
  .column .card-slot {
    font-size: 12px;
  }
  .toolbar #help {
    margin-left: auto;
  }
  .room-header p {
    max-width: 250px;
  }
  .help-panel {
    font-size: 13px;
  }
}
@media (max-width: 359px) {
  .card-room {
    padding-left: 6px;
    padding-right: 6px;
  }
  .table {
    margin-left: -6px;
    margin-right: -6px;
    padding-left: 0;
    padding-right: 0;
  }
  .top-row {
    gap: 4px;
    margin-left: 6px;
    margin-right: 6px;
  }
  .draw-piles,
  .foundation-piles {
    gap: 3px;
  }
  .tableau {
    gap: 1px;
  }
  .table-bottom {
    margin-left: 6px;
    margin-right: 6px;
  }
  .deal-line {
    font-size: 9px;
  }
}
