/* Rocket Lab: large touch targets, one live model, and no animation during play. */
#buildShipBtn {
  display: block;
  width: min(300px, 100%);
  margin: 14px auto 0;
  padding: 13px 18px;
  color: #b9fff0;
  background: #102d36ed;
  border: 1px solid #6de0c29c;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1.7px;
}
#buildShipBtn:hover {
  background: #1b5054;
}
#settingsBuildBtn {
  width: 100%;
  margin-top: 22px;
  color: #a4f5d7;
}
/* The additional title-screen button keeps the original logo comfortably in view. */
.launch-title {
  width: min(100%, 800px, 76vh);
}
#shipyard {
  margin: auto;
  width: min(1100px, calc(100vw - 32px));
  max-width: none;
  height: min(850px, calc(100dvh - 32px));
  max-height: none;
  padding: 0;
  border: 1px solid #5fa5b963;
  border-radius: 18px;
  overflow: hidden;
  background: #101c2e;
  color: #f3f4e9;
  box-shadow: 0 24px 100px #000a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
#shipyard[open] {
  display: flex;
  flex-direction: column;
}
#shipyard::backdrop {
  background: #050919e8;
}
#shipyard [hidden] {
  display: none !important;
}
#shipyard button {
  border-radius: 9px;
  font-size: 12px;
  min-height: 42px;
  line-height: 1.25;
  padding: 10px 13px;
  background: #203148;
  border-color: #56758970;
  color: #d8e3ee;
  transition:
    background 0.12s,
    border-color 0.12s;
}
#shipyard button:hover {
  background: #2d4660;
  border-color: #84dec8;
}
#shipyard button[aria-pressed="true"] {
  background: #23483f;
  border: 2px solid #98f0c8;
  color: #d5ffe9;
}
#shipyard button:focus-visible {
  outline: 3px solid #ffd58f;
  outline-offset: 2px;
}
#shipyard button:disabled {
  opacity: 0.45;
  cursor: default;
}
.lab-header {
  padding: 22px 28px 19px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #8eabc226;
  background: linear-gradient(100deg, #1c2c40, #142135);
  flex-shrink: 0;
}
.lab-kicker {
  color: #91b5c3;
  letter-spacing: 2px;
  font-size: 8px;
}
#labTitle {
  font:
    bold 32px/1.1 Arial,
    Helvetica,
    sans-serif;
  letter-spacing: -0.5px;
  margin: 6px 0 0;
  color: #f1f1dd;
}
#labTitle em {
  font-style: normal;
  color: #97ecc2;
}
#labTitle span {
  color: #ffd98b;
  font-size: 25px;
  padding-left: 13px;
}
#labClose {
  font-size: 17px !important;
  width: 44px;
  background: transparent !important;
}
.lab-layout {
  display: grid;
  grid-template-columns: 46% 54%;
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.lab-preview {
  padding: 23px 28px 20px;
  background: radial-gradient(
    ellipse at 50% 30%,
    #244450,
    #162c3e 57%,
    #122437
  );
  border-right: 1px solid #7699b52e;
}
.lab-preview-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 7px;
  color: #96c1d3;
  letter-spacing: 1px;
}
#labPreviewMode {
  color: #9df0c8;
}
.lab-stage {
  position: relative;
  background:
    linear-gradient(#68b8bf0c 1px, transparent 1px),
    linear-gradient(90deg, #68b8bf0c 1px, transparent 1px);
  background-size: 24px 24px;
  margin: 12px auto 10px;
  max-width: 360px;
}
#labCanvas {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1;
}
#labCanvas.is-painting {
  touch-action: none;
  cursor: crosshair;
}
.lab-stage-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7px;
  text-align: center;
  font-size: 7px;
  color: #749aa9;
  letter-spacing: 2px;
  pointer-events: none;
}
.lab-name-label {
  display: block;
  font-size: 10px;
  color: #a5c4cf;
  margin-bottom: 8px;
}
#labName {
  width: 100%;
  min-height: 45px;
  padding: 11px 14px;
  border-radius: 9px;
  border: 1px solid #89b3c45e;
  background: #101f33;
  color: #fff5d4;
  font:
    700 18px Arial,
    Helvetica,
    sans-serif;
}
.lab-preview-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.lab-preview-actions button {
  flex: 1;
}
#labRandom {
  color: #e7c6ff !important;
}
#labTest {
  color: #a8e7f6 !important;
}
#labPreviewHint {
  font-size: 9px;
  color: #92b4c4;
  text-align: center;
  line-height: 1.7;
  margin-top: 13px;
}
.lab-workbench {
  padding: 20px 24px;
  overflow: auto;
}
.lab-tabs {
  display: flex;
  padding: 4px;
  gap: 5px;
  background: #091527;
  border-radius: 12px;
  margin-bottom: 21px;
}
.lab-tabs button {
  flex: 1;
  border: 0;
  background: transparent !important;
  color: #9bb0c5 !important;
}
.lab-tabs button[aria-selected="true"] {
  background: #365644 !important;
  color: #d0ffd9 !important;
}
.lab-tab-panel h3 {
  font:
    700 19px/1.3 Arial,
    Helvetica,
    sans-serif;
  color: #e7f1ed;
  margin-bottom: 6px;
}
.lab-tab-panel > p,
.lab-doodle-box > p {
  font-size: 10px;
  color: #91aabd;
  line-height: 1.75;
  margin-bottom: 18px;
}
.lab-part-group {
  padding: 0;
  margin: 0 0 15px;
  border: 0;
}
.lab-part-group legend,
.lab-paint-row h4,
.lab-doodle-heading h4 {
  font-size: 10px;
  color: #b4c7d9;
  margin-bottom: 8px;
  font-weight: normal;
}
.lab-part-options {
  display: flex;
  gap: 7px;
}
.lab-part-options button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 10px !important;
  padding: 8px 5px !important;
}
.lab-part-options button span {
  font-size: 19px;
  color: #b6d8e8;
}
.lab-part-options button[aria-pressed="true"] span {
  color: #aff0ce;
}
.lab-part-group:last-child {
  margin-bottom: 0;
}
.lab-paint-row {
  margin-top: 20px;
}
.lab-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
#shipyard .lab-swatches button {
  min-height: 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  background: var(--swatch);
  border: 3px solid transparent;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px #ffffff33;
}
#shipyard .lab-swatches button[aria-pressed="true"] {
  border-color: #fff;
  outline: 2px solid #a4dbc480;
  outline-offset: 2px;
}
.lab-doodle-box {
  margin-top: 24px;
  border-top: 1px solid #7699b52e;
  padding-top: 20px;
}
.lab-doodle-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.lab-doodle-heading h4 {
  margin: 0;
}
#labDoodle {
  font-size: 10px !important;
}
.lab-brushes {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
  font-size: 10px;
  color: #aac3d7;
}
#labBrush {
  color: #d8e3ee;
  padding: 9px;
  border-radius: 7px;
  border: 1px solid #56758970;
  background: #203148;
  min-height: 42px;
}
.lab-brushes button {
  font-size: 10px !important;
}
.lab-sound-slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.lab-sound-slots button {
  font-size: 11px !important;
}
.lab-recorder {
  margin-top: 18px;
  background: #0b1729;
  border: 1px solid #4d698253;
  border-radius: 13px;
  padding: 17px;
}
.lab-recorder-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}
#labSoundBadge {
  color: #88d7b7;
  font-size: 7px;
}
.lab-mic-display {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 22px 0 15px;
  color: #819bb0;
}
.lab-mic-display > span {
  font-size: 30px;
  color: #9dc7d4;
}
.lab-mic-display strong {
  font-size: 11px;
  font-weight: normal;
}
.lab-mic-display.recording,
.lab-mic-display.recording > span {
  color: #ff9d8b;
}
#labRecordProgress {
  width: 100%;
  height: 5px;
  accent-color: #ff9177;
  border: 0;
}
#labSoundMessage {
  min-height: 45px;
  font-size: 10px;
  color: #b1c3d4;
  line-height: 1.65;
}
.lab-recorder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 8px;
}
#labRecord {
  background: #543243 !important;
  color: #ffc6ca !important;
  flex: 1;
}
#labUseSound {
  color: #bbffcf !important;
  flex-basis: 100%;
}
#labListen {
  flex: 1;
}
#shipyard .lab-text-button {
  background: transparent;
  border-color: transparent;
  color: #9eb9c9;
  font-size: 10px;
}
.lab-private {
  margin-top: 12px;
  font-size: 9px !important;
  text-align: center;
}
.lab-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  border-top: 1px solid #7699b530;
  background: #152236;
  flex-shrink: 0;
}
#labStatus {
  font-size: 11px;
  color: #d1e3db;
  line-height: 1.5;
}
.lab-footer > div > span {
  display: block;
  font-size: 8px;
  margin-top: 5px;
  color: #7e9baf;
}
.lab-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
#shipyard #labFly {
  white-space: nowrap;
  padding: 15px 23px;
  min-width: 160px;
  background: #b8f2ba;
  color: #162e30;
  border: 1px solid #d6ffba;
  font-weight: bold;
  font-size: 13px;
  box-shadow: 0 3px 0 #498777;
}
#shipyard #labFly:hover {
  background: #d4ffd0;
}
@media (max-height: 780px) and (min-width: 761px) {
  #shipyard {
    height: calc(100dvh - 24px);
  }
  .lab-header {
    padding: 15px 24px;
  }
  .lab-stage {
    max-width: 270px;
  }
  .lab-preview {
    padding-top: 18px;
  }
  .lab-footer {
    padding: 12px 24px;
  }
  .lab-workbench {
    padding-top: 15px;
  }
  .lab-part-group {
    margin-bottom: 11px;
  }
  .lab-tabs {
    margin-bottom: 14px;
  }
}
@media (max-width: 760px) {
  #shipyard {
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
    border-radius: 13px;
  }
  .lab-header {
    padding: 14px 18px;
  }
  #labTitle {
    font-size: 27px;
  }
  .lab-layout {
    display: block;
  }
  .lab-preview {
    padding: 16px 20px 18px;
    border-right: 0;
    border-bottom: 1px solid #7699b52e;
  }
  .lab-stage {
    max-width: 230px;
    margin: 0 auto;
  }
  .lab-name-label {
    font-size: 10px;
  }
  .lab-workbench {
    overflow: visible;
    padding: 18px;
  }
  .lab-footer {
    padding: 12px 16px;
  }
  .lab-footer > div > span {
    display: none;
  }
  .lab-footer-actions {
    gap: 5px;
  }
  #labStatus {
    font-size: 9px;
    max-width: 130px;
  }
  #shipyard #labFly {
    padding: 13px 15px;
    min-width: 120px;
    font-size: 11px;
  }
  #labClassic {
    max-width: 65px;
    padding: 5px !important;
    font-size: 8px !important;
  }
  .lab-preview-actions button {
    font-size: 11px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  #shipyard button {
    transition: none;
  }
}
@media (max-width: 760px) {
  .lab-layout {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .lab-preview {
    display: grid;
    grid-template-columns: minmax(125px, 42%) 1fr;
    grid-template-rows: auto auto 1fr;
    gap: 7px 13px;
    flex-shrink: 0;
    padding: 12px 16px;
  }
  .lab-preview-top,
  .lab-stage-label,
  #labPreviewHint {
    display: none;
  }
  .lab-stage {
    grid-column: 1;
    grid-row: 1 / span 3;
    width: 100%;
    max-width: 180px;
    align-self: center;
  }
  .lab-name-label {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    align-self: end;
    font-size: 9px;
  }
  #labName {
    grid-column: 2;
    grid-row: 2;
    font-size: 14px;
    min-height: 36px;
    padding: 8px;
  }
  .lab-preview-actions {
    grid-column: 2;
    grid-row: 3;
    display: flex;
    flex-direction: column;
    margin: 0;
    gap: 5px;
  }
  #shipyard .lab-preview-actions button {
    min-height: 34px;
    font-size: 9px !important;
    padding: 7px;
  }
  .lab-workbench {
    flex: 1;
    min-height: 0;
    overflow: auto;
  }
  .lab-part-options button {
    font-size: 9px !important;
  }
}

.lab-workbench,
.lab-layout {
  scrollbar-width: thin;
  scrollbar-color: #506d84 transparent;
}
.lab-tabs {
  position: sticky;
  top: 0;
  z-index: 1;
}
