.workshop-game {
  min-height: 410px;
  padding: clamp(10px, 3vw, 26px);
  display: grid;
  grid-template-columns: minmax(150px, 0.85fr) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  color: #344536;
  background: linear-gradient(90deg, #fbf4dc1a, #fbf4dc01), var(--room-image) center / cover;
}
.workshop-header,
.workshop-playing {
  border: 1px solid #76624d65;
  border-radius: 17px;
  box-shadow: 0 4px 0 #4f463318, 0 12px 26px #49372621;
  background: #fcf7e9f2;
}
.workshop-header {
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 9px;
}
.workshop-header p, .workshop-note {
  margin: 0;
  color: #536451;
  font-size: 12px;
  font-weight: 700;
}
.workshop-header h2 {
  margin: 4px 0;
  font: 700 clamp(18px, 3vw, 33px)/1.05 Georgia, serif;
  color: #35483a;
}
.workshop-reset, .workshop-control {
  color: #304838;
  border: 1px solid #a4ab91;
  background: #e2ead0;
  border-radius: 9px;
  font: 700 13px/1.15 var(--body-font, system-ui);
  padding: 7px 11px;
  min-height: 36px;
}
.workshop-playing { padding: clamp(10px, 2vw, 18px); }
.workshop-instructions {
  margin: 4px 0 12px;
  font-size: 13px;
  line-height: 1.35;
}
.workshop-grid {
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  gap: clamp(3px, 0.9vw, 7px);
  margin-bottom: 8px;
}
.workshop-square, .workshop-slide, .workshop-nonogram { max-width: 265px; margin-inline: auto; }
.workshop-tile {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 1.13;
  padding: 1px;
  background: linear-gradient(#fff9ea, #ebddc3);
  color: #384c38;
  border: 1px solid #a38e716b;
  border-radius: 8px;
  box-shadow: 0 2px #9a806629;
}
.workshop-tile:not(:disabled):hover { border-color: #4b6650; background: #f6f0da; }
.workshop-tile:focus-visible, .workshop-control:focus-visible, .workshop-reset:focus-visible {
  outline: 2px solid #304838;
  outline-offset: 2px;
}
.workshop-tile[aria-pressed="true"] { background: #dce7cb; border-color: #637d5d; }
.workshop-empty { box-shadow: none; border-style: dashed; background: #c1a98535; }
.workshop-inked[aria-pressed="true"] { background: #66826b; border-color: #4e6a52; }
.workshop-matched { opacity: .44; background: #dce6ce; }
.workshop-card { background: linear-gradient(155deg, #f2e7d3, #dcbda9); }
.workshop-reference { background: #dce7cb80; }
.workshop-crate { align-items: end; aspect-ratio: auto; min-height: 103px; }
.workshop-stack { display: flex; flex-direction: column-reverse; width: 100%; align-items: center; }
.workshop-stack .workshop-object { width: 82%; max-width: 36px; margin-top: -6px; }
.workshop-object {
  width: 90%;
  max-width: 62px;
  aspect-ratio: 1;
  background: url("/assets/art/workshop-props.webp") var(--object-x) var(--object-y) / 800% 500% no-repeat;
}
.workshop-bin { grid-template-rows: minmax(18px, 1fr) auto; gap: 1px; aspect-ratio: auto; min-height: 55px; padding: 3px; background: #e4ead6; }
.workshop-bin .workshop-object { max-width: 34px; }
.workshop-caption { font-size: clamp(8px, 1vw, 11px); line-height: 1.1; overflow-wrap: anywhere; }
.workshop-number { position: absolute; bottom: 2px; right: 5px; font-size: 11px; font-weight: 800; }
.workshop-mark { font-size: clamp(17px, 4vw, 27px); line-height: 1; }
.workshop-player { color: #365741; background: #ced9bb; }
.workshop-tools { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.workshop-colors { display: flex; gap: 5px; min-width: 100px; }
.workshop-colors .workshop-tile { width: 29px; box-shadow: none; }
.workshop-swatch { width: 66%; aspect-ratio: 1; border: 1px solid #614e3c55; border-radius: 7px; background: var(--piece); }
.workshop-lamp { width: 52%; aspect-ratio: 1; border: 1px solid #696047; border-radius: 50%; background: #b0af99; box-shadow: inset 0 2px 2px #6c635140; }
.workshop-lit .workshop-lamp { background: #ffe19c; box-shadow: 0 0 8px #f0be61, inset 0 1px 3px #f9f4c7; }
.workshop-pipe { position: absolute; inset: 0; --pipe: 23%; --pipe-color: #738b66; }
.workshop-pipe b, .workshop-pipe i, .workshop-pipe em { position: absolute; display: block; background: var(--pipe-color); }
.workshop-pipe i { inset: 38.5%; border-radius: 50%; }
.workshop-pipe b[data-direction="0"] { top: 0; height: 50%; left: 38.5%; width: var(--pipe); }
.workshop-pipe b[data-direction="1"] { right: 0; width: 50%; top: 38.5%; height: var(--pipe); }
.workshop-pipe b[data-direction="2"] { bottom: 0; height: 50%; left: 38.5%; width: var(--pipe); }
.workshop-pipe b[data-direction="3"] { left: 0; width: 50%; top: 38.5%; height: var(--pipe); }
.workshop-pipe em { inset: 37%; border-radius: 50%; background: #b36b52; border: 1px solid #fff9e3; }
.workshop-nonogram { --clue-size: 34px; grid-template-columns: var(--clue-size) repeat(calc(var(--columns) - 1), minmax(0, 1fr)); }
.workshop-nonogram > span { text-align: center; align-self: center; font-size: 10px; line-height: 1.1; font-weight: 700; }
.workshop-status { min-height: 17px; margin: 6px 0 0; font-size: 12px; color: #7c513e; }
.workshop-win { display: grid; gap: 12px; min-height: 125px; place-content: center; padding: 15px; text-align: center; }
.workshop-win strong { font: 700 24px/1.1 Georgia, serif; }
.stage:has(.workshop-game) { aspect-ratio: auto; }
@media (max-width: 720px) {
  .workshop-game { grid-template-columns: 1fr; background-position: 38% center; gap: 9px; }
  .workshop-header { width: 100%; }
  .workshop-playing { width: min(100%, 430px); margin-inline: auto; }
  .workshop-crate { min-height: 80px; }
}
