/* Fixed diagram heights keep the embedded document independent of its iframe height. */
:root { background: #fff; }
.recommendedDetails { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.customLength { grid-column: 1 / -1; min-width: 0; padding: 8px 12px; display: flex; flex-direction: column; justify-content: center; gap: 4px; border-top: 1px solid #e3edf1; }
.lengthChoice { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.lengthChoice button { padding: 5px 4px; border: 1px solid #d6e4ea; border-radius: 4px; background: #f5f7f8; color: #8496a0; font-size: 11px; }
.lengthChoice button.active { border-color: #8aafc2; background: #eaf4f8; color: #306f8b; font-weight: 600; }
.customLength label { color: #5e7886; font-size: 11px; white-space: nowrap; }
.customLengthRow { display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: center; gap: 6px; }
.customInputWrap { position: relative; min-width: 0; }
.customLengthRow input { display: block; width: 100%; min-width: 0; padding: 6px 32px 6px 8px; border: 1px solid #b8d1dd; border-radius: 4px; color: #315e75; font-size: 12px; appearance: textfield; -moz-appearance: textfield; }
.customLengthRow input:focus-visible { outline: 2px solid #7faec1; outline-offset: 1px; border-color: #7faec1; }
.customLengthRow input::-webkit-inner-spin-button, .customLengthRow input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.customLengthRow input:disabled { background: #e9edf0; border-color: #d4dde2; color: #9aaab2; opacity: 1; }
.customInputWrap span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #7d949f; font-size: 11px; pointer-events: none; }
.customLength p { margin: 0; color: #849ba7; font-size: 10px; line-height: 1.4; }
.customLength:has(#customError:not([hidden])) #customHint { display: none; }
.openingChoice { display: grid; gap: 3px; }
.openingChoiceLabel { color: #6b8794; font-size: 10px; line-height: 1.2; }
@media (min-width: 761px) {
  .workspace { height: 470px; min-height: 470px; }
  .calculator { align-self: stretch; min-height: 0; grid-template-rows: auto auto auto 1fr auto; }
  .adjustments { align-self: end; padding: 4px 14px; }
}
@media (max-width: 760px) {
  .pageHeader { display: block; }
  .pageHeader .lead { display: block; margin: 6px 0 0; font-size: 11px; line-height: 1.5; }
  .customLength { padding: 12px 14px; }
  #scene { height: 180px; min-height: 180px; flex: none; }
}
@media (max-width: 370px) {
  #scene { height: 150px; min-height: 150px; }
}
/* Longer translated labels stay above the input instead of being clipped. */
html[lang="en"] .customLengthRow, html[lang="es"] .customLengthRow { grid-template-columns: 1fr; gap: 2px; }
@media (min-width: 761px) {
  html[lang="en"] .workspace, html[lang="es"] .workspace { height: 525px; min-height: 525px; }
}
