.workshop-page .intro { margin-block-end: 1px; }
.shop-challenge { align-items: start; grid-template-columns: minmax(0, .87fr) minmax(0, 1.13fr); }
.shop-controls { min-width: 0; align-self: start; }
.shop-controls h2, .shop-guide h2 { font-size: clamp(1.14rem, 1.8vw, 1.46rem); }
.shop-description { margin-block: 6px 15px; color: var(--muted); }
.shop-options { margin-block-end: 12px; }
.shop-options legend, .shop-slider label { font-weight: 700; font-size: .98rem; }
.shop-options .option { margin-block-end: 5px; }
.shop-options .option:last-child { margin-block-end: 0; }
.shop-slider { margin-block: 8px 0; }
.shop-slider input { display: block; width: 100%; min-height: 35px; margin: 0; accent-color: var(--wine); cursor: ew-resize; }
.shop-track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); direction: ltr; gap: 5px; text-align: center; color: var(--muted); font-size: .88rem; }
.shop-track > :first-child { text-align: left; }
.shop-track > :last-child { text-align: right; }
.shop-model .shop-slider input { accent-color: #f2ad67; }
.shop-model .shop-track, .shop-motion-note { color: #ebe1de; }
.shop-jump { margin-block-start: 12px; }
.shop-result { margin-block-start: 15px; padding: 10px 13px; border-inline-start: 3px solid var(--wine); border-radius: 5px; background: var(--mist); color: var(--wine-dark); }
.shop-result p { margin-block-start: 3px; font-size: .93rem; }
.shop-choices, .drill-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-block: 5px 8px; }
.shop-choices label { position: relative; cursor: pointer; }
.shop-choices input[type="radio"] { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.shop-choices .glass-button { min-width: 90px; }
.shop-choices input:checked + .glass-button {
  --glass-ink: #641e34;
  --glass-rim: #a45770;
  --glass-top: #fff6f9;
  --glass-bottom: #e6b4c5;
  box-shadow: inset 0 1px 1px #fff, inset 0 0 0 1px #fff9, 0 2px 4px #6d244c30;
}
.shop-choices input:focus-visible + .glass-button { outline: 2px solid var(--wine); outline-offset: 3px; }
.drill-actions { align-items: center; margin-block-start: 10px; }
.drill-actions button { font-family: inherit; cursor: pointer; }
.glass-button.drill-play {
  --glass-ink: #641b34;
  --glass-rim: #ab566f9e;
  --glass-top: #fff2f7;
  --glass-bottom: #de9eb9d9;
  --glass-glow: #ffffffec;
  min-block-size: 52px;
  min-inline-size: 138px;
  padding-inline: 19px;
  border-radius: 16px;
  box-shadow: inset 0 1px 2px #fff, inset 0 -1px 1px #ffffffaa, 0 4px 11px #702b4330;
}
.glass-button.drill-play:hover { box-shadow: inset 0 1px 3px #fff, inset 0 -1px 1px #ffffffaa, 0 5px 14px #702b4345; }
.shop-options:has(.shop-choices) .intro-link { color: var(--wine-dark); font-size: .85rem; }
.drill-reference { margin-block-start: 12px; }
.drill-reference bdi { overflow-wrap: anywhere; }
#drill-fluid-guide { scroll-margin-block-start: 1rem; }
#drill-fluid-guide details p + p { margin-block-start: 8px; }

.shop-canvas {
  overflow: hidden;
  border: 1px solid #514b50;
  border-radius: 6px;
  background: repeating-linear-gradient(0deg, transparent 0 23px, #ffffff12 23px 24px), repeating-linear-gradient(90deg, transparent 0 23px, #ffffff12 23px 24px), #2d2e32;
}
.shop-canvas canvas { display: block; width: 100%; height: auto; }
.shop-key {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #e7dedc;
  font-size: .87rem;
}
.shop-key li { display: flex; align-items: center; gap: 6px; }
.shop-key li::before, .bend-plan-labels span::before { content: ""; display: inline-block; width: 1.15rem; height: .65rem; border-radius: 2px; background: var(--part-color); }
.shop-key-steel { --part-color: #c5d0d8; }
.shop-key-tools { --part-color: #87bddb; }
.shop-key-support { --part-color: #5eaa96; }
.shop-key-die { --part-color: #94899a; }
.shop-key-risk { --part-color: #f4a54f; }
.shop-key-fluid { --part-color: #68e5f8; }
.shop-photo {
  display: grid;
  grid-template-columns: minmax(80px, 125px) 1fr;
  align-items: center;
  gap: 11px;
  margin-block-start: 5px;
  padding-block-start: 10px;
  border-block-start: 1px solid #514b50;
}
.shop-photo img { width: 100%; height: auto; border-radius: 5px; }
.shop-photo figcaption { color: #e2d9d5; font-size: .84rem; }

.shop-calculator { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; padding: 19px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.shop-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: end; }
.shop-fields label { display: block; color: var(--muted); font-size: .94rem; }
.shop-fields input:not([type="radio"]), .shop-fields select { display: block; width: 100%; min-height: 44px; margin-block-start: 4px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: #fff; font: inherit; }
.shop-fields button { justify-self: start; }
.shop-readings { min-width: 0; }
.reading-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.reading { display: grid; min-width: 0; align-content: start; padding: 9px 11px; border: 1px solid #e5d6db; border-radius: 6px; background: var(--mist); color: var(--wine-dark); }
.reading > span { font-size: .87rem; }
.reading strong { font-size: clamp(1.32rem, 2.4vw, 1.85rem); line-height: 1.35; margin-block: 4px; overflow-wrap: anywhere; }
.shop-field-error { margin-block-end: 7px; color: var(--wine-dark); font-size: .93rem; font-weight: 700; }
.shop-guide { margin-block: 32px; }
.shop-guide h2 { margin-block-end: 8px; }

.direction-options { grid-column: 1 / -1; }
.bend-plan { margin-block: 2px 14px; }
.bend-plan-board {
  --roll-color: #7bf4ff;
  --bend-color: #ffdb8c;
  position: relative;
  overflow: hidden;
  border-radius: 9px;
  border: 1px solid #76565a;
}
.bend-plan-board img { display: block; width: 100%; height: auto; }
.bend-factory-mark { position: absolute; left: 57.9%; top: 44%; width: 8.5%; height: 27%; border: 1px solid var(--roll-color); border-radius: 50%; transform: translate(-50%, -50%) rotate(-25deg); }
.rolling-line, .bend-line { position: absolute; top: 63%; left: 44%; height: 0; filter: drop-shadow(0 1px 1px #48262b); }
.rolling-line { width: 24%; border-top: 2px solid var(--roll-color); transform: translate(-50%, -50%) rotate(-25deg); }
.rolling-line::after { content: ""; position: absolute; left: 0; top: -5px; width: 8px; height: 8px; border: solid var(--roll-color); border-width: 0 0 2px 2px; transform: rotate(45deg); }
.bend-line { width: 16%; border-top: 2px dashed var(--bend-color); transform: translate(-50%, -50%) rotate(65deg); }
.bend-plan[data-direction="parallel"] .bend-line { top: 76%; left: 54%; width: 24%; transform: translate(-50%, -50%) rotate(-25deg); }
.bend-plan-labels { display: flex; flex-wrap: wrap; gap: 3px 11px; align-items: center; color: var(--muted); font-size: .85rem; }
.bend-plan figcaption { margin-block-start: 5px; color: var(--muted); font-size: .82rem; }
.bend-plan-labels span::before { margin-inline-end: 5px; width: .9rem; height: 0; border-block-start: 2px solid var(--part-color); vertical-align: middle; }
.plan-roll-key { --part-color: #365c77; }
.plan-bend-key { --part-color: #865108; }
.bend-plan-labels .plan-bend-key::before { border-block-start-style: dashed; }
.bend-plan-labels strong { flex-basis: 100%; color: var(--ink); }

@media (max-width: 780px) {
  .shop-photo { grid-template-columns: minmax(74px, 101px) 1fr; }
}
@media (max-width: 640px) {
  .shop-challenge, .shop-calculator { grid-template-columns: 1fr; }
  .shop-challenge .shop-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .shop-challenge .shop-options .option { margin-block: 6px 0; padding-inline: 7px; gap: 6px; }
  .shop-calculator { padding: 13px; }
  .shop-challenge .shop-options:has(.shop-choices) { display: block; }
  .drill-reference { padding: 11px; }
  .drill-reference th, .drill-reference td { padding-inline: 5px; font-size: .84rem; }
  .workshop-page .intro { padding-block: 23px; }
}
