.wmx-army-builder-active {
  overflow-x: hidden;
}

.wmx-builder-page {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(185, 148, 74, 0.08) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(rgba(185, 148, 74, 0.06) 1px, transparent 1px) 0 0 / 48px 48px,
    #080b08;
}

.wmx-builder {
  width: min(calc(100% - 32px), 1560px);
  margin: 0 auto;
  padding: 36px 0 28px;
}

.wmx-builder__masthead {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(185, 148, 74, 0.34);
  padding-bottom: 20px;
}

.wmx-builder__masthead > * {
  min-width: 0;
}

.wmx-builder__eyebrow {
  margin: 0 0 6px;
  color: #c59a34;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.wmx-builder h1 {
  margin: 0;
  color: #f4ead3;
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 950;
  line-height: 0.98;
  letter-spacing: 0;
  text-transform: uppercase;
}

.wmx-builder__intro {
  max-width: 850px;
  margin: 12px 0 0;
  color: #bdb7a6;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.wmx-builder__actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
}

.wmx-builder__actions button,
.wmx-builder__actions a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(185, 148, 74, 0.52);
  border-radius: 2px;
  background: #1d2419;
  color: #f4ead3;
  padding: 0 14px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.wmx-builder__actions button:hover,
.wmx-builder__actions button:focus-visible,
.wmx-builder__actions a:hover,
.wmx-builder__actions a:focus-visible {
  border-color: #c59a34;
  background: #303a26;
  color: #fff4d2;
}

.wmx-builder__frame-wrap {
  position: relative;
  height: clamp(680px, calc(100vh - 168px), 980px);
  min-height: 680px;
  overflow: hidden;
  border: 1px solid rgba(185, 148, 74, 0.44);
  border-radius: 4px;
  background: #111510;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.wmx-builder__frame-wrap:fullscreen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
}

.wmx-builder__frame {
  width: 100%;
  min-width: 0;
  height: 100%;
  display: block;
  border: 0;
  background: #fff;
}

.wmx-builder__loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: #111510;
  color: #f4ead3;
  text-transform: uppercase;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.wmx-builder__loading.is-ready {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.wmx-builder__spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(185, 148, 74, 0.22);
  border-top-color: #c59a34;
  border-radius: 50%;
  animation: wmx-builder-spin 700ms linear infinite;
}

.wmx-builder__credit {
  margin: 12px 0 0;
  color: #8f917f;
  font-size: 12px;
  text-align: right;
}

.wmx-builder__credit a {
  color: #c6a45f;
}

.wmx-builder__language-dialog {
  width: min(calc(100% - 32px), 560px);
  border: 1px solid rgba(197, 154, 52, 0.72);
  border-radius: 4px;
  background: #111510;
  color: #e8e2d2;
  padding: 0;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.72);
}

.wmx-builder__language-dialog::backdrop {
  background: rgba(3, 5, 3, 0.82);
  backdrop-filter: blur(4px);
}

.wmx-builder__language-dialog form {
  position: relative;
  padding: 34px;
}

.wmx-builder__language-dialog h2 {
  margin: 0 0 20px;
  color: #f4ead3;
  font-size: 28px;
  line-height: 1.05;
  text-transform: uppercase;
}

.wmx-builder__language-dialog ol {
  margin: 0 0 20px;
  padding-left: 24px;
}

.wmx-builder__language-dialog li + li {
  margin-top: 10px;
}

.wmx-builder__language-dialog strong {
  color: #d8b45d;
}

.wmx-builder__dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 0;
  background: transparent;
  color: #aaa997;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.wmx-builder__dialog-confirm {
  min-height: 44px;
  width: 100%;
  border: 1px solid rgba(197, 154, 52, 0.72);
  border-radius: 2px;
  background: #303a26;
  color: #fff4d2;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

@keyframes wmx-builder-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .wmx-builder__masthead {
    align-items: start;
    flex-direction: column;
  }

  .wmx-builder__actions {
    width: 100%;
  }

  .wmx-builder__actions button,
  .wmx-builder__actions a {
    flex: 1 1 auto;
  }
}

@media (max-width: 640px) {
  .wmx-builder {
    width: 100%;
    padding-top: 24px;
  }

  .wmx-builder__masthead,
  .wmx-builder__credit {
    margin-right: 16px;
    margin-left: 16px;
  }

  .wmx-builder__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .wmx-builder__actions button,
  .wmx-builder__actions a {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  .wmx-builder h1 {
    font-size: 34px;
  }

  .wmx-builder__frame-wrap {
    height: calc(100vh - 130px);
    min-height: 620px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .wmx-builder__credit {
    text-align: left;
  }

  .wmx-builder__language-dialog form {
    padding: 30px 22px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wmx-builder__spinner {
    animation-duration: 1.8s;
  }
}
