.download-page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: white;
}

.download-page > .test-warning { flex: none; }
.download-main { display: flex; flex: 1; }

.download-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  flex: 1;
  min-width: 0;
  min-height: 36rem;
  overflow: hidden;
}

.download-art { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.download-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: left bottom; }

.download-control { position: relative; max-width: calc(100% - 40px); text-align: center; }
.download-button {
  display: block;
  max-width: 100%;
  min-height: 64px;
  padding: 18px 30px;
  border: 2px solid var(--purple);
  border-radius: 4px;
  background: var(--purple);
  color: white;
  font: 700 1.125rem/1.5 Verdana, Arial, sans-serif;
  letter-spacing: 0;
  text-align: center;
  overflow-wrap: anywhere;
}
.download-button:disabled { opacity: 1; cursor: not-allowed; }
.download-status {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 100%;
  margin: 0;
  color: var(--ink);
  font-size: .8125rem;
  line-height: 1.6;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Fit the complete portrait artwork; soften its join with the white canvas. */
@media (max-aspect-ratio: 1/1) {
  .download-art img {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: auto;
    mask-image: linear-gradient(to bottom, transparent, black 10%);
  }
  .download-button { padding-inline: 24px; }
}

/* Avoid cropping the lamp on unusually wide or short windows. */
@media (min-aspect-ratio: 2/1) {
  .download-art img {
    width: auto;
    max-width: 100%;
    object-fit: contain;
    mask-image: linear-gradient(to right, black 70%, transparent);
  }
}
