.workshop {
  --tracing: #245a73;
  --score: #457d9d;
  --cut: #3b3932;
  --kraft: #d4c3a1;
  --beat: #a34d33;
}
.workshop .settings {
  gap: 14px;
}
.workshop .desk-preview {
  min-height: 460px;
}
.workshop .canvas-guide,
.panel-caption {
  font-size: 13px;
  color: #66695f;
  margin: 0 0 16px;
  line-height: 1.6;
}
.workshop .stage-bar {
  font-variant-numeric: tabular-nums;
}
.workshop input[type="range"] {
  accent-color: var(--tracing);
}
.workshop #preview {
  touch-action: none;
}
.workshop[data-ready] #empty {
  display: none;
}
.line-key {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}
.line-key span:nth-child(2) {
  color: var(--score);
}
.line-key span:nth-child(3) {
  color: #8a7050;
}
.tile-map {
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: 4px;
  max-width: 420px;
  margin: 20px auto 0;
}
.tile-map span {
  padding: 10px;
  border: 1px dashed #bac3c5;
  font-size: 12px;
  text-align: center;
}
.palette {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  max-height: 340px;
  overflow: auto;
}
.palette button {
  display: flex;
  gap: 8px;
  align-items: center;
  text-align: left;
  padding: 8px;
  font-size: 12px;
  min-height: 42px;
}
.palette button[aria-pressed="true"] {
  outline: 2px solid var(--tracing);
  outline-offset: -2px;
}
.swatch {
  width: 23px;
  height: 23px;
  border: 1px solid #8888;
  flex-shrink: 0;
  border-radius: 2px;
}
.bead-scroll {
  overflow: auto;
  max-height: 750px;
}
.bead-scroll #preview {
  max-width: none;
  image-rendering: pixelated;
  cursor: crosshair;
}
.bracket-title {
  font-size: 20px;
  font-weight: 650;
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}
.bracket {
  display: flex;
  align-items: stretch;
  gap: 28px;
  overflow: auto;
  min-height: 340px;
  padding-bottom: 16px;
}
.bracket-round {
  display: flex;
  flex-direction: column;
  min-width: 180px;
  flex: 1;
}
.bracket-round h3 {
  font-size: 13px;
  font-weight: 500;
  color: #6b6f65;
  margin: 0 0 12px;
}
.match-list {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 18px;
  flex: 1;
}
.match {
  position: relative;
  background: #fff;
  border: 1px solid #d5d8ce;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.match button {
  width: 100%;
  border: 0;
  border-radius: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 14px;
}
.match button + button {
  border-top: 1px solid #e9ebe5;
}
.match button.winner {
  background: #e4eef0;
  color: #173f50;
  font-weight: 650;
}
.match button:disabled {
  opacity: 1;
  color: #858b80;
  cursor: default;
}
.match-label {
  font-size: 11px;
  padding: 5px 12px;
  background: #f8f8f5;
  color: #7b8173;
}
.champion {
  background: #ece8db;
  border-left: 3px solid #9c844b;
  padding: 14px 18px;
  margin-bottom: 22px;
  font-size: 17px;
  overflow-wrap: anywhere;
}
.transport {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  margin-bottom: 20px;
}
.sequencer-scroll {
  overflow: auto;
}
.sequencer {
  display: grid;
  grid-template-columns: 130px repeat(var(--steps), minmax(26px, 1fr));
  gap: 4px;
  min-width: 650px;
}
.track-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding-right: 8px;
}
.track-label input {
  width: 68px;
  min-width: 0;
  padding: 0;
}
.step-num {
  font-size: 11px;
  text-align: center;
  color: #777;
  align-self: center;
}
.sequencer .step {
  min-height: 36px;
  padding: 0;
  border: 1px solid #d6d8ce;
  border-radius: 3px;
  background: #eeeee8;
  position: relative;
}
.sequencer .step.beat-start {
  border-left: 2px solid #aaa998;
}
.sequencer .step[data-value="1"] {
  background: #cfa28f;
  border-color: #bc8a75;
}
.sequencer .step[data-value="2"] {
  background: #8d4934;
  border-color: #783a29;
}
.sequencer .step.playing {
  outline: 2px solid #253a43;
  outline-offset: 1px;
  z-index: 1;
}
.step-key {
  display: flex;
  gap: 18px;
  font-size: 12px;
  color: #726b60;
  margin-top: 20px;
}
body[data-tool="rhythm-maker"] .desk-preview {
  background: #f5f3eb;
}
body[data-tool="drawing-compare"] #preview {
  cursor: move;
}
body[data-tool="box-template"] .desk-preview {
  background: #e9ebe6;
}
body[data-tool="bead-pattern"] .desk-preview {
  background: #e9ebe6;
}
body[data-tool="tournament-bracket"] .desk-preview {
  background: #f2f3ee;
}
.workshop button:focus-visible {
  outline: 2px solid var(--tracing);
  outline-offset: 2px;
}
@media (min-width: 1000px) {
  body:has(.workshop) main {
    max-width: 1380px;
  }
  .workshop {
    grid-template-columns: 300px minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .workshop .desk-preview {
    min-height: 280px;
    padding: 16px;
  }
  .palette {
    max-height: 230px;
  }
  .sequencer {
    grid-template-columns: 100px repeat(var(--steps), 30px);
  }
  .track-label {
    flex-direction: column;
    align-items: flex-start;
  }
  .workshop .line-key {
    gap: 8px;
  }
  .bracket {
    gap: 20px;
  }
  .bracket-title {
    font-size: 18px;
  }
}
.workshop:fullscreen {
  overflow: auto;
  padding: 24px;
  background: #f5f5f0;
  width: 100%;
  height: 100%;
  align-content: start;
}
.workshop .stage-bar #expand {
  padding: 6px 12px;
  font-size: 12px;
  min-height: 30px;
  margin-left: auto;
}
.bracket {
  position: relative;
}
.bracket-round {
  position: relative;
  z-index: 1;
}
.bracket-lines {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  overflow: visible;
  max-width: none;
}
.bracket-lines path {
  fill: none;
  stroke: #b5c2bc;
  stroke-width: 1.2;
}
.mobile-worknav {
  display: none;
}
@media (max-width: 760px) {
  body:has(.workshop) {
    padding-bottom: 78px;
  }
  .mobile-worknav {
    display: flex;
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    gap: 4px;
    padding: 4px;
    background: #fffffff2;
    border: 1px solid #d2d7cc;
    border-radius: 8px;
    box-shadow: 0 3px 14px #29372b15;
  }
  .mobile-worknav button {
    min-width: 100px;
    padding: 10px;
    font-size: 13px;
    border: 0;
    background: transparent;
  }
  .mobile-worknav button:last-child {
    background: #245a73;
    color: white;
    border-radius: 5px;
  }
  .workshop .settings,
  .workshop .stage {
    scroll-margin-top: 12px;
  }
}
