

@media (min-width: 981px) {
  .board-workspace {
    min-height: auto;
  }

  .board-preview {
    padding-top: 16px;
    padding-bottom: 14px;
  }

  .board-copy {
    padding-top: 6vh;
  }

  .board-stage {
    align-self: start;
    align-items: flex-start;
    padding-top: 55px;
  }

  .board-stage.size-small {
    min-height: 498px;
  }

  .measure-height {
    top: 55px;
  }

  .board-stage::before {
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
  }
}

.board-tagline {
  color: var(--ink) !important;
  font-size: clamp(17px, 1.4vw, 21px) !important;
  font-weight: 750;
  line-height: 1.35 !important;
}

.maker-rule {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 26px;
  color: var(--orange);
}

.maker-rule b {
  font: 800 19px monospace;
  letter-spacing: 0.08em;
}

.maker-rule span {
  width: min(170px, 42%);
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.board-stage {
  min-height: 650px;
}

.measure-height {
  right: 5px;
}

.measure-height span {
  right: -38px;
}

.measure-width {
  position: absolute;
  z-index: 2;
  top: var(--measure-top);
  left: 50%;
  width: var(--board-width);
  border-top: 1px solid color-mix(in srgb, var(--orange) 55%, transparent);
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.measure-width::before,
.measure-width::after {
  content: "";
  position: absolute;
  top: -5px;
  height: 10px;
  border-left: 1px solid color-mix(in srgb, var(--orange) 55%, transparent);
}

.measure-width::before {
  left: 0;
}

.measure-width::after {
  right: 0;
}

.measure-width span {
  position: absolute;
  top: -17px;
  left: 50%;
  padding: 0 6px;
  transform: translateX(-50%);
  background: var(--paper);
  color: var(--orange);
  font: 700 9px monospace;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.board-stage::before {
  content: "";
  position: absolute;
  z-index: 0;
  width: min(48vw, 720px);
  aspect-ratio: 1;
  background: url("../../the-extruder-logo.svg") center / contain no-repeat;
  opacity: 0.18;
  pointer-events: none;
}

html[data-theme="light"] .board-stage::before {
  opacity: 0.12;
  filter: grayscale(1);
}

.board-canvas {
  width: auto;
  max-width: none;
  height: var(--board-height);
  object-fit: contain;
  transition: height 0.3s ease;
}

.mobile-marker-name {
  display: none;
}

.size-medium {
  --board-height: 590px;
  --board-width: 441px;
  --measure-top: 34px;
}

.size-small {
  --board-height: 438px;
  --board-width: 362px;
  --measure-top: 34px;
}

.scale-note {
  bottom: 5px;
  justify-content: center;
  min-width: 82px;
  padding-inline: 15px;
}

.scale-note span {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 980px) {
  .board-stage {
    min-height: 530px;
  }

  .board-stage::before {
    width: min(62vw, 440px);
  }

  .size-medium {
    --board-height: 440px;
    --board-width: 329px;
    --measure-top: 24px;
  }

  .size-small {
    --board-height: 327px;
    --board-width: 270px;
    --measure-top: 80px;
  }
}

@media (max-width: 560px) {
  .board-stage {
    min-height: 410px;
  }

  .board-stage::before {
    width: min(78vw, 340px);
  }

  .size-medium {
    --board-height: 340px;
    --board-width: 254px;
    --measure-top: 14px;
  }

  .size-small {
    --board-height: 252px;
    --board-width: 208px;
    --measure-top: 58px;
  }

  .mobile-marker-name {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    display: flex;
    width: 48%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    clip-path: inset(0 100% 0 0);
    color: rgba(31, 36, 39, 0.88);
    font-family: "Marker Felt", "Bradley Hand", "Comic Sans MS", cursive;
    font-size: clamp(22px, 8vw, 34px);
    font-weight: 700;
    line-height: 1.05;
    text-align: center;
    filter: drop-shadow(0 1px 0 rgba(20, 24, 26, 0.12));
    pointer-events: none;
  }

  .mobile-marker-name.is-writing {
    animation: mobile-marker-write 1.05s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }
}

/* Adopt the mobile content sequence as soon as the desktop columns stack. */
@media (max-width: 980px) {
  .board-workspace { display: flex; flex-direction: column; }
  .board-preview, .board-controls { display: contents; }
  .board-copy { order: 1; padding: 30px 20px 8px; }
  .board-controls > .step { order: 2; margin: 12px 20px 0; }
  .board-controls > h2 { order: 2; margin: 7px 20px 4px; }
  .board-controls > .intro { order: 2; margin: 0 20px; }
  .fields { order: 3; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 20px 0; }
  .board-stage { order: 4; width: 100%; }
  .selection-summary { order: 5; margin-left: 20px; margin-right: 20px; }
  .tool-share { order: 6; width: auto; margin-left: 20px; margin-right: 20px; }
  .shop { order: 7; margin-left: 20px; margin-right: 20px; }
  .note { order: 8; margin-left: 20px; margin-right: 20px; }
  .status { order: 9; }
}

/* Match the established Dummy 13 purchase-button treatment. */
.shop { gap: 11px; justify-content: flex-start; min-height: 52px; padding: 6px 14px 6px 9px; border: 0; border-radius: 9px; line-height: 1.25; font: 700 13px Arial, Helvetica, sans-serif; }
.shop .shop-mark { flex: 0 0 38px; width: 38px; height: 38px; filter: brightness(0) invert(1) drop-shadow(0 1px 2px #0003); }
html[data-theme="light"] .shop .shop-mark { filter: brightness(0) saturate(100%) drop-shadow(0 1px 1px #fff5); }
.shop-copy { flex: 1; text-align: center; }
.shop-copy strong { font-weight: 900; letter-spacing: .055em; white-space: nowrap; }
.shop-arrow { flex: 0 0 auto; font-size: 17px; }
html[data-theme="dark"] .shop { background: #ff5a1f; color: #111; }
html[data-theme="light"] .shop { background: #ed4b1a; color: #fff; }

@media (max-width: 560px) {
  .shop { font-size: 11px; padding-right: 11px; }
  .shop .shop-mark { flex-basis: 34px; width: 34px; height: 34px; }
  .shop-arrow { font-size: 15px; }
}

@keyframes mobile-marker-write {
  to {
    clip-path: inset(0 0 0 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-marker-name.is-writing {
    animation-duration: 0.01ms;
  }
}

@media (max-width: 560px) {
  .board-workspace {
    display: grid;
    min-height: auto;
    grid-template-columns: 1fr;
    padding-bottom: 0;
    background-image:
      linear-gradient(color-mix(in srgb, var(--ink) 8%, transparent) 1px, transparent 1px),
      linear-gradient(90deg, color-mix(in srgb, var(--ink) 8%, transparent) 1px, transparent 1px);
    background-size: 34px 34px;
  }

  .board-preview,
  .board-controls {
    display: contents;
  }

  .board-copy {
    order: 1;
    padding: 22px 18px 0;
  }

  .board-copy h1 {
    margin-block: 9px;
    font-size: 38px;
  }

  .board-tagline {
    margin: 0;
    font-size: 15px !important;
  }

  .maker-rule {
    margin-top: 14px;
  }

  .board-controls > .step {
    order: 2;
    margin: 18px 18px 0;
  }

  .board-controls > h2 {
    order: 2;
    margin: 6px 18px 3px;
    font-size: 26px;
  }

  .board-controls > .intro {
    order: 2;
    margin: 0 18px;
    font-size: 12px;
    line-height: 1.45;
  }

  .fields {
    order: 3;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    margin: 13px 18px 0;
  }

  .field {
    min-width: 0;
    gap: 6px;
  }

  .selectrow select {
    height: 45px;
    padding-right: 30px;
    font-size: 11px;
  }

  .field:last-child select {
    padding-left: 43px;
  }

  .selectrow::after {
    right: 10px;
    top: 9px;
  }

  .board-stage {
    order: 4;
    min-height: 360px;
    margin: 0;
    align-items: flex-start;
    padding-top: 45px;
  }

  .board-stage.size-small {
    min-height: 300px;
  }

  .measure-height {
    top: 45px;
    right: 28px;
  }

  .measure-height span {
    right: 8px;
  }

  .board-stage::before {
    width: min(76vw, 310px);
  }

  .size-medium {
    --board-height: 300px;
    --board-width: 224px;
    --measure-top: 23px;
  }

  .size-small {
    --board-height: 223px;
    --board-width: 184px;
    --measure-top: 23px;
  }

  .selection-summary {
    order: 5;
    margin: 0 18px 12px;
    padding-top: 13px;
  }

  .tool-share {
    order: 6;
    width: auto;
    min-height: 58px;
    margin: 0 18px;
  }

  .shop {
    order: 7;
    margin: 10px 18px 0;
  }

  .note {
    order: 8;
    margin: 11px 24px 0;
  }

  .status {
    order: 9;
  }
}
