.play-shell {
  background:
    linear-gradient(135deg, rgba(255, 207, 98, 0.12), transparent 38%),
    linear-gradient(225deg, rgba(93, 214, 200, 0.12), transparent 42%),
    var(--bg);
}

.play-stage {
  display: grid;
  gap: 20px;
  margin: 0 auto;
  max-width: 1180px;
  padding: 32px clamp(14px, 4vw, 28px) 72px;
}

.play-header {
  display: grid;
  gap: 14px;
  max-width: 820px;
}

.play-header h1 {
  font-size: clamp(42px, 8vw, 88px);
}

.play-toolbar {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 1fr) repeat(3, auto);
}

.play-field {
  display: grid;
  gap: 7px;
}

.play-field label,
.panel-title {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.play-field select,
.play-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  min-height: 44px;
}

.play-field select {
  appearance: none;
  background: #f7fff1;
  color: #101716;
  padding: 0 38px 0 14px;
}

.play-button {
  background: #f7fff1;
  color: #101716;
  cursor: pointer;
  font-weight: 850;
  padding: 0 14px;
}

.play-button.primary {
  background: linear-gradient(135deg, var(--amber), var(--grass));
  border-color: rgba(255, 207, 98, 0.72);
}

.play-button:hover,
.card-slot:hover,
.tableau-card:hover {
  transform: translateY(-1px);
}

.game-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(320px, 1fr) minmax(240px, 0.42fr);
}

.board-panel,
.side-panel {
  background: rgba(23, 35, 31, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.board-panel {
  display: grid;
  gap: 16px;
  padding: clamp(14px, 3vw, 22px);
}

.board-strip {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

#level-title {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  margin: 0;
}

#status {
  background: rgba(247, 255, 241, 0.08);
  border: 1px solid rgba(93, 214, 200, 0.22);
  border-radius: 8px;
  color: var(--muted);
  margin: 0;
  min-height: 42px;
  max-width: 360px;
  padding: 10px 12px;
}

.top-row {
  align-items: start;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(8px, 2vw, 18px);
  justify-content: space-between;
}

.stock-row,
.foundation-row {
  display: flex;
  gap: clamp(6px, 1.4vw, 10px);
}

.pile-group {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.pile-label {
  color: var(--quiet);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-slot {
  align-items: center;
  border: 1px solid rgba(247, 255, 241, 0.18);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  font: inherit;
  font-size: clamp(0.95rem, 2.4vw, 1.3rem);
  font-weight: 900;
  height: clamp(58px, 10vw, 78px);
  justify-items: center;
  line-height: 1;
  width: clamp(44px, 7.6vw, 58px);
}

.card-slot.empty {
  background: rgba(247, 255, 241, 0.05);
  border-style: dashed;
  cursor: default;
}

.card-slot.face-down {
  background: linear-gradient(135deg, #1d3b6b, #0f2547);
  color: rgba(247, 255, 241, 0.82);
}

.card-slot.recycle {
  background: rgba(93, 214, 200, 0.18);
  color: var(--mint);
  font-size: 1.4rem;
}

.card,
.tableau-card.card {
  background: #f7fff1;
}

.card.black {
  color: #15201c;
}

.card.red {
  color: #c8402f;
}

.card-slot.foundation {
  border-color: rgba(165, 232, 109, 0.34);
}

.card-slot.foundation.empty {
  background: rgba(165, 232, 109, 0.08);
  color: var(--quiet);
  cursor: pointer;
}

.card-slot.selected,
.tableau-card.selected {
  box-shadow: 0 0 0 3px var(--amber);
  outline: none;
}

.klondike-board {
  display: grid;
  gap: clamp(6px, 1.4vw, 12px);
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.tableau-column {
  background: rgba(247, 255, 241, 0.05);
  border: 1px solid rgba(247, 255, 241, 0.12);
  border-radius: 8px;
  display: grid;
  gap: 0;
  grid-auto-rows: clamp(20px, 3.6vw, 26px);
  min-height: clamp(140px, 26vw, 220px);
  min-width: 0;
  padding: 6px 4px;
  position: relative;
}

.tableau-column.empty-column {
  align-content: start;
  cursor: pointer;
  font: inherit;
}

.column-head {
  color: var(--quiet);
  font-size: 0.62rem;
  font-weight: 900;
  text-align: center;
}

.tableau-card {
  align-items: start;
  border: 1px solid rgba(20, 30, 26, 0.5);
  border-radius: 6px;
  cursor: pointer;
  display: grid;
  font: inherit;
  font-size: clamp(0.72rem, 2vw, 1rem);
  font-weight: 900;
  height: clamp(46px, 8vw, 62px);
  justify-items: start;
  line-height: 1;
  padding: 4px 6px;
  width: 100%;
}

.tableau-card.face-down {
  background: linear-gradient(135deg, #1d3b6b, #0f2547);
  cursor: default;
  height: clamp(20px, 3.6vw, 26px);
}

#klondike-board[data-solved="true"] .tableau-column {
  border-color: rgba(165, 232, 109, 0.42);
}

.side-panel {
  align-content: start;
  display: grid;
  gap: 18px;
  padding: 16px;
}

.play-help {
  color: var(--muted);
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.play-help li {
  font-size: 0.9rem;
}

#move-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

#move-list li {
  align-items: center;
  background: rgba(247, 255, 241, 0.08);
  border: 1px solid rgba(93, 214, 200, 0.16);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 38px;
  padding: 6px 10px;
}

@media (max-width: 860px) {
  .play-toolbar,
  .game-layout {
    grid-template-columns: 1fr;
  }

  .play-button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .play-stage {
    padding-top: 20px;
  }

  .board-panel,
  .side-panel {
    padding: 12px;
  }

  .board-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  #status {
    max-width: none;
  }
}
