.triangle-sticks{border:2px solid #278079;border-radius:16px;padding:1rem;margin:1rem 0;background:#eff8f5;color:#183c39}
.triangle-sticks h4{margin:.1rem 0 .6rem;font-size:1.22rem}
.triangle-sticks-lengths,.triangle-sticks-actions{display:flex;flex-wrap:wrap;gap:.6rem;margin:.8rem 0}
.triangle-sticks-lengths label{display:flex;align-items:center;gap:.35rem;font-weight:700}
.triangle-sticks-lengths input{width:4.5rem;min-height:44px;font-size:1rem}
.triangle-sticks-actions button{min-height:44px;padding:.55rem .85rem}
.triangle-sticks-scroll{overflow-x:auto;background:white;border:1px solid #98b9b1;border-radius:10px}
.triangle-sticks-board{display:block;width:100%;min-width:650px;height:auto;min-height:324px;touch-action:none;background-color:#fff;background-image:radial-gradient(#dce9e5 1px,transparent 1px);background-size:25px 25px}
.triangle-sticks-board [data-stick-body],.triangle-sticks-board [data-stick-end]{cursor:grab;touch-action:none}
.triangle-sticks-board [data-stick-body]:focus,.triangle-sticks-board [data-stick-end]:focus{outline:3px solid #c67614;outline-offset:3px}
.triangle-sticks-board text{font-weight:700;font-size:17px;fill:#183c39}
@media(max-width:600px){.triangle-sticks{padding:.75rem}.triangle-sticks-scroll{overscroll-behavior-x:contain}}

.rod-tap-tools{display:flex;flex-wrap:wrap;gap:4px 12px;align-items:center;margin:6px 0 10px}
.rod-tap-tools>[role=group]{display:flex;flex-wrap:wrap;gap:5px}
.rod-tap-tools button{min-height:44px;min-width:44px}
.rod-tap-tools button[aria-pressed=true]{background:#daefed!important;color:#134c48!important;border-color:#418d86!important}
.rod-tap-tools p{flex:1 0 135px;margin:2px 0!important;font-size:14px!important;line-height:1.35!important;color:#32536a}

.rod-pickers{display:flex;gap:5px;flex-wrap:wrap;margin:6px 0}
.rod-pickers button{min-height:44px;min-width:58px}

/* Y054 fits the whole construction area to the workspace. */
#mis-studio :is([data-triangle-sticks],[data-triangle-transfer]) {
  box-sizing: border-box;
  max-width: 46rem;
  width: 100%;
  padding: .6rem !important;
  color: #1d3a40;
}
#mis-studio :is([data-triangle-sticks],[data-triangle-transfer]) .y054-instruction {
  margin: 0 0 .36rem !important;
  font-size: .82rem !important;
  line-height: 1.28 !important;
}
#mis-studio :is([data-triangle-sticks],[data-triangle-transfer]) .y054-board-shell {
  width: 100%;
  max-width: 44rem;
  position: relative;
  aspect-ratio: 700 / 360;
  margin: .3rem 0;
  overflow: hidden;
  border: 1px solid #adc6cf;
  border-radius: 11px;
  background-color: #f6fbfd;
  background-image: radial-gradient(#b2cbd6 0.65px,transparent 0.75px);
  background-size: 12px 12px;
}
#mis-studio :is([data-triangle-sticks],[data-triangle-transfer]) .y054-board {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  background: none;
  touch-action: none;
}
.y054-board .y054-rod-line,
.y054-board .y054-rod-anchor,
.y054-board .y054-rod-length,
.y054-board .y054-rod-ring {
  pointer-events: none;
}
.y054-board .y054-rod-line {
  stroke: var(--y054-rod);
  stroke-width: 5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.y054-board .y054-rod-anchor {
  fill: var(--y054-rod);
  stroke: #fff;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.y054-board .y054-rod-ring {
  fill: #fff;
  stroke: var(--y054-rod);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.y054-board .y054-rod-length {
  fill: #1d3a40;
  stroke: #fff;
  stroke-width: 2;
  paint-order: stroke;
  font: 850 27px/1 system-ui,sans-serif;
}
.y054-board .y054-rod-band,
.y054-board .y054-rod-hit {
  vector-effect: non-scaling-stroke;
  stroke: transparent;
  touch-action: none;
  cursor: grab;
}
.y054-board .y054-rod-band {
  stroke-width: 19;
  pointer-events: stroke;
}
.y054-board .y054-rod-hit {
  fill: transparent;
  stroke-width: 25;
  pointer-events: all;
}
.y054-board .y054-rod-hit:focus-visible {
  outline: none;
  stroke: #30206e;
  stroke-width: 3;
}
#mis-studio :is([data-triangle-sticks],[data-triangle-transfer]) .triangle-sticks-lengths,
#mis-studio :is([data-triangle-sticks],[data-triangle-transfer]) .rod-pickers {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: .28rem;
  margin: .3rem 0;
}
#mis-studio [data-triangle-sticks] .triangle-sticks-lengths label {
  display: flex;
  justify-content: space-between;
  white-space: nowrap;
  gap: .12rem;
  margin: 0;
  padding: 0;
  font-size: .72rem;
}
#mis-studio [data-triangle-sticks] .triangle-sticks-lengths input {
  width: 2.4rem;
  min-width: 0;
  min-height: 34px;
  padding: .2rem;
  text-align: center;
}
#mis-studio :is([data-triangle-sticks],[data-triangle-transfer]) .triangle-sticks-actions,
#mis-studio [data-triangle-transfer] .y054-stages {
  display: flex;
  gap: .3rem;
  margin: .35rem 0;
}
#mis-studio [data-triangle-transfer] .y054-stages button {
  flex: 1 1 0%;
}
#mis-studio :is([data-triangle-sticks],[data-triangle-transfer]) button[aria-pressed="true"] {
  background: #dcebf3 !important;
  color: #1e4665 !important;
  border-color: #6c92ac;
}
#mis-studio :is([data-triangle-sticks],[data-triangle-transfer]) .rod-tap-tools {
  gap: .25rem .42rem;
  margin: .3rem 0;
}
#mis-studio :is([data-triangle-sticks],[data-triangle-transfer]) .rod-tap-tools p,
#mis-studio :is([data-triangle-sticks],[data-triangle-transfer]) > [data-geometry-live],
#mis-studio :is([data-triangle-sticks],[data-triangle-transfer]) .y054-feedback {
  margin: .28rem 0 !important;
  padding: .26rem .38rem;
  font-size: .8rem !important;
  line-height: 1.28 !important;
}
#mis-studio :is([data-triangle-sticks],[data-triangle-transfer]) [hidden] {
  display: none !important;
}
#mis-studio :is([data-triangle-sticks],[data-triangle-transfer]) .y054-feedback {
  border-radius: 7px;
  background: #e7f1f7;
}
#mis-studio :is([data-triangle-sticks],[data-triangle-transfer]) .y054-board [data-geometry-gaps] text {
  font-size: 22px;
}
