/* The finished page is always the real homepage, underneath this temporary set. */
.construction-enabled .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}
.construction-enabled
  :is(.hero-image, .hero-kicker, h1 span, .hero-description, .hero-actions) {
  animation: none;
}
.construction-enabled :is(h1 span, .hero-description, .hero-kicker) {
  width: fit-content;
}
.construction-enabled [data-build-kind][data-build-state='pending'] {
  opacity: 0;
  pointer-events: none;
}
.construction-enabled [data-build-kind][data-build-state='working'] {
  opacity: min(1, calc(var(--build-progress, 0) * 7));
  clip-path: inset(0 calc((1 - var(--build-progress, 0)) * 100%) 0 0);
}
.construction-enabled [data-build-kind='image'][data-build-state='working'] {
  clip-path: inset(
    calc((1 - var(--build-progress, 0)) * 45%)
      calc((1 - var(--build-progress, 0)) * 45%)
      calc((1 - var(--build-progress, 0)) * 45%)
      calc((1 - var(--build-progress, 0)) * 45%)
  );
}
.construction-enabled .research-stage[data-build-state='working'] .chart-path {
  animation: none;
  stroke-dashoffset: calc((1 - var(--build-progress, 0)) * 1000);
}
.construction-layer {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}
.construction-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(#467af008 1px, transparent 1px),
    linear-gradient(90deg, #467af008 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000, transparent 83%);
}
.construction-guide {
  position: absolute;
  background: #3778ff;
  opacity: 0.2;
}
.construction-guide.is-vertical {
  top: 0;
  bottom: 0;
  width: 1px;
}
.construction-guide.is-horizontal {
  left: 0;
  right: 0;
  height: 1px;
}
.construction-frame {
  position: absolute;
  top: 0;
  left: 0;
  border: 1px solid #3778ff;
  background: #3778ff04;
  will-change: transform, opacity;
}
.construction-frame > i {
  position: absolute;
  width: 5px;
  height: 5px;
  background: var(--sp-bg-1);
  border: 1px solid #3778ff;
}
.construction-frame > i:nth-child(1) {
  top: -3px;
  left: -3px;
}
.construction-frame > i:nth-child(2) {
  top: -3px;
  right: -3px;
}
.construction-frame > i:nth-child(3) {
  bottom: -3px;
  right: -3px;
}
.construction-frame > i:nth-child(4) {
  bottom: -3px;
  left: -3px;
}
.construction-dimension {
  position: absolute;
  right: -1px;
  bottom: -18px;
  padding: 3px 5px;
  background: #3778ff;
  color: white;
  white-space: nowrap;
  font:
    8px/1.2 'Plex Mono',
    monospace;
  border-radius: 0 0 2px 2px;
}
.construction-cursor,
.construction-trail {
  position: absolute;
  top: 0;
  left: 0;
  width: 21px;
  height: 25px;
  will-change: transform;
}
.construction-cursor {
  filter: drop-shadow(0 2px 2px #10233f1c);
}
.construction-cursor svg,
.construction-trail svg {
  display: block;
  width: 21px;
  height: 25px;
  overflow: visible;
}
.construction-cursor span {
  position: absolute;
  top: 21px;
  left: 13px;
  padding: 3px 6px;
  border-radius: 0 4px 4px;
  background: var(--cursor-color);
  color: white;
  font:
    9px/1.3 -apple-system,
    BlinkMacSystemFont,
    'PingFang SC',
    sans-serif;
  white-space: nowrap;
}
.construction-controls {
  position: fixed;
  z-index: 31;
  bottom: 23px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 15px;
  border: 1px solid #ffffffb3;
  border-radius: 40px;
  background: #fffdf7ed;
  box-shadow:
    0 4px 24px #10233f12,
    0 0 0 1px #10233f08;
  backdrop-filter: blur(16px);
  color: var(--sp-ink-1);
  font-size: 10px;
  white-space: nowrap;
}
.construction-dots {
  display: flex;
  padding-left: 2px;
}
.construction-dots i {
  width: 7px;
  height: 7px;
  border: 1px solid var(--sp-bg-1);
  border-radius: 50%;
  margin-left: -2px;
  background: var(--cursor-color);
}
.construction-progress {
  width: 58px;
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--sp-line);
}
.construction-progress i {
  display: block;
  height: 100%;
  background: var(--sp-accent);
  transform: scaleX(var(--scene-progress, 0));
  transform-origin: left;
}
.construction-controls button {
  padding: 5px 10px;
  border-radius: 20px;
  background: var(--sp-bg-2);
  font-size: 10px;
}
.construction-controls button:hover {
  background: var(--sp-bg-3);
}
.construction-controls.is-idle {
  left: 50%;
  bottom: 19px;
  transform: translateX(-50%);
  padding: 0;
  border: 1px solid var(--sp-line);
  box-shadow: none;
  opacity: 0.7;
}
.construction-controls.is-idle > :not(button) {
  display: none;
}
.construction-controls.is-idle button {
  padding: 9px 13px;
  background: var(--sp-bg-1);
}
@media (max-width: 720px) {
  .construction-cursor span {
    font-size: 8px;
    padding: 2px 4px;
  }
  .construction-controls {
    bottom: 13px;
    gap: 10px;
  }
  .construction-controls.is-idle {
    bottom: 12px;
  }
  .construction-dimension {
    font-size: 7px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .construction-layer,
  .construction-controls {
    display: none !important;
  }
  .construction-enabled [data-build-kind][data-build-state] {
    opacity: 1;
    clip-path: none;
    pointer-events: auto;
  }
}
