.workshop-room {
  --workshop-ink: #fff5ec;
  --workshop-muted: #e2cde4;
  --workshop-gold: #ffdb9a;
  width: 100%;
  padding: clamp(10px, 2.8vw, 24px);
  border: 1px solid #79567e;
  border-radius: 22px;
  background: radial-gradient(ellipse at 10% 0%, #633568, transparent 70%), linear-gradient(145deg, #392347, #241f3e 74%);
  color: var(--workshop-ink);
  box-shadow: inset 0 1px #fff3, 0 12px 30px #27183438;
  container-type: inline-size;
}
.workshop-room [hidden] { display: none; }
.workshop-roster { display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; }
.workshop-player {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  min-width: 0;
  border: 1px solid #ab88ad60;
  border-radius: 22px;
  color: #decbe7;
  background: #281c3b;
  font-size: .875rem;
}
.workshop-player span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workshop-player strong { white-space: nowrap; color: var(--workshop-gold); font-variant-numeric: tabular-nums; }
.workshop-player.is-playing { border-color: #dbb184; color: #fff; }
.workshop-stage { display: grid; align-items: start; gap: 12px; max-width: 800px; margin: auto; }
.workshop-field, .workshop-panel { min-width: 0; width: 100%; max-width: 490px; margin: auto; }
.workshop-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: clamp(1px, .7vw, 4px);
  width: 100%;
  padding: clamp(3px, 1vw, 8px);
  border: 1px solid #b183b6;
  border-radius: 11px;
  background: #241a35;
  box-shadow: inset 0 2px 6px #130a1f;
}
.workshop-grid .workshop-square, .workshop-tile {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1px solid #b989ba40;
  border-radius: 5px;
  aspect-ratio: 1;
  background: #38294b;
  color: #ffcbed;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.workshop-square.is-star { color: #e3c9ff; background: #543c77; }
.workshop-square.is-center { color: var(--workshop-gold); background: #774958; }
.workshop-square.is-placed, .workshop-square.is-draft, .workshop-tile:not(:disabled) {
  border-color: #dfab79;
  background: linear-gradient(150deg, #fff4d9, #efc28b 80%);
  color: #502c40;
  box-shadow: inset 0 -2px #ad724652;
}
.workshop-square.is-draft { border-color: #efb9e8; color: #4a2c64; background: linear-gradient(145deg, #f8e2ff, #dcb0ee); }
.workshop-square.is-last { box-shadow: inset 0 0 0 2px #ab683b; }
.workshop-square:hover:not(:disabled), .workshop-tile:hover:not(:disabled) { filter: brightness(1.13); }
.workshop-letter { font-size: clamp(.85rem, 3.4vw, 1.55rem); line-height: 1; }
.workshop-value { position: absolute; inset: auto 2px 1px auto; font-size: clamp(.42rem, 1.45vw, .65rem); line-height: 1; }
.workshop-legend, .workshop-progress, .workshop-status { margin: 6px 0 0; color: var(--workshop-muted); font-size: .875rem; line-height: 1.35; }
.workshop-legend { text-align: center; }
.workshop-progress { margin: 0 0 6px; color: var(--workshop-gold); font-weight: 750; }
.workshop-status { min-height: 2.7em; color: var(--workshop-ink); }
.workshop-handoff { display: grid; justify-items: start; gap: 8px; }
.workshop-handoff strong { font-size: 1.05rem; overflow-wrap: anywhere; }
.workshop-rack { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.workshop-rack .workshop-tile { min-height: 40px; max-height: 58px; border-radius: 8px; }
.workshop-tile:disabled { border-style: dashed; background: #2c203e; }
.workshop-tile[aria-pressed=true] { outline: 2px solid #f2caff; outline-offset: 1px; border-color: #a673ba; background: #f0cbf6; }
.workshop-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 9px; }
.workshop-button {
  min-height: 44px;
  min-width: 0;
  padding: 7px;
  color: var(--workshop-ink);
  border: 1px solid #876891;
  border-radius: 8px;
  background: #4c355e;
  font-size: .875rem;
  font-weight: 730;
}
.workshop-button:hover:not(:disabled) { filter: brightness(1.14); }
.workshop-button:disabled { opacity: .44; }
.workshop-primary { color: #4a2b3c; border-color: #f1c891; background: #ffdb9a; }
.workshop-room button:focus-visible { z-index: 1; outline: 2px solid #fff4c4; outline-offset: -2px; }

@container (min-width: 620px) {
  .workshop-stage { grid-template-columns: minmax(0, 1fr) minmax(220px, .63fr); align-items: center; gap: 22px; }
  .workshop-rack { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
