html#SPROCKET-DESIGNER #settings-table-shell {
  width: min(96vw, 1300px);
  padding: 22px 26px 26px;
  color: white;
  text-align: left;
  transform: none;
  max-height: 100%;
  overflow-y: auto;
}

html#SPROCKET-DESIGNER h1 {
  margin: 0 0 8px;
  font-size: 1.7em;
  font-family: 'helvetica', arial black;
  font-weight: bold;
}

html#SPROCKET-DESIGNER .intro {
  margin: 0 0 20px;
  font-size: .95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  max-width: 760px;
}

html#SPROCKET-DESIGNER .designer-grid {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

html#SPROCKET-DESIGNER .download-row {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

html#SPROCKET-DESIGNER .download-button {
  border: 0;
  border-radius: 6px;
  padding: 12px 28px;
  font: bold 1rem sans-serif;
  color: #0b284a;
  background: #8ec5ff;
  cursor: pointer;
}

html#SPROCKET-DESIGNER .download-button:hover {
  background: #baE0FF;
}

html#SPROCKET-DESIGNER .panel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 18px 20px;
}

html#SPROCKET-DESIGNER .panel h2 {
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-family: 'helvetica', arial black;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

html#SPROCKET-DESIGNER #drawing-status {
  color: rgba(255, 255, 255, 0.6);
  font-size: .85rem;
  font-weight: 400;
}

html#SPROCKET-DESIGNER .field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

html#SPROCKET-DESIGNER .field label {
  font-weight: bold;
}

html#SPROCKET-DESIGNER .field input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.35);
  color: white;
  font: 1rem sans-serif;
}

html#SPROCKET-DESIGNER .field input:focus {
  border-color: #8ec5ff;
  outline: 2px solid rgba(142, 197, 255, 0.35);
}

html#SPROCKET-DESIGNER .field-checkbox .checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  cursor: pointer;
}

html#SPROCKET-DESIGNER .field-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #8ec5ff;
  cursor: pointer;
}

html#SPROCKET-DESIGNER .hint {
  color: rgba(255, 255, 255, 0.55);
  font-size: .8rem;
  line-height: 1.35;
}

html#SPROCKET-DESIGNER .view-toggle-stage {
  position: relative;
}

html#SPROCKET-DESIGNER .view-toggle-buttons {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  padding: 3px;
}

html#SPROCKET-DESIGNER .view-toggle-button {
  border: 0;
  border-radius: 4px;
  padding: 6px 12px;
  font: bold .8rem sans-serif;
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  cursor: pointer;
}

html#SPROCKET-DESIGNER .view-toggle-button.is-active {
  background: #8ec5ff;
  color: #0b284a;
}

html#SPROCKET-DESIGNER .drawing-stage {
  display: grid;
  place-items: center;
  min-height: 380px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
}

html#SPROCKET-DESIGNER #sprocket-svg,
html#SPROCKET-DESIGNER #threeD-view-svg {
  grid-area: 1 / 1;
  width: min(100%, 460px);
  height: auto;
  aspect-ratio: 1;
}

html#SPROCKET-DESIGNER .view-hidden {
  display: none;
}

html#SPROCKET-DESIGNER .axis {
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: .8;
  stroke-dasharray: 3 3;
}

html#SPROCKET-DESIGNER .pitch-circle {
  fill: none;
  stroke: #8ec5ff;
  stroke-width: 1.2;
  stroke-dasharray: 5 4;
}

html#SPROCKET-DESIGNER .sprocket {
  fill: #2f7dc9;
  fill-rule: evenodd;
  stroke: #baE0FF;
  stroke-width: 1.2;
}

html#SPROCKET-DESIGNER .sprocket-back {
  fill: #123a63;
  fill-rule: evenodd;
  stroke: #0b284a;
  stroke-width: 1;
}

html#SPROCKET-DESIGNER .sprocket-side {
  fill: #1f5f9f;
  stroke: #123a63;
  stroke-width: .4;
}

html#SPROCKET-DESIGNER .sprocket-hole-side {
  fill: #0b284a;
  stroke: #0b284a;
  stroke-width: .4;
}

html#SPROCKET-DESIGNER .boss-side {
  fill: #3a86d4;
  stroke: #1f5f9f;
  stroke-width: .4;
}

html#SPROCKET-DESIGNER .sprocket-boss {
  fill: #4a94e0;
  fill-rule: evenodd;
  stroke: #baE0FF;
  stroke-width: 1;
}

html#SPROCKET-DESIGNER .dimension {
  stroke: #ffb37a;
  stroke-width: 1.1;
  marker-start: url(#arrow);
  marker-end: url(#arrow);
}

html#SPROCKET-DESIGNER .dimension-label {
  fill: #ffb37a;
  font: 5px Arial, sans-serif;
  text-anchor: middle;
}

html#SPROCKET-DESIGNER .results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

html#SPROCKET-DESIGNER .result {
  padding: 12px;
  background: rgba(142, 197, 255, 0.14);
  border-radius: 6px;
}

html#SPROCKET-DESIGNER .result strong {
  display: block;
  margin-top: 4px;
  color: #8ec5ff;
  font: bold 1.15rem sans-serif;
}

html#SPROCKET-DESIGNER .formula {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: .82rem;
  line-height: 1.45;
}

@media (max-width: 900px) {
  html#SPROCKET-DESIGNER .designer-grid {
    grid-template-columns: 1fr;
  }

  html#SPROCKET-DESIGNER .results {
    grid-template-columns: repeat(2, 1fr);
  }
}
