.cast button.ready .dot { opacity: 1; }

.upload {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  cursor: pointer;
}

.upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.stage-panel { min-width: 0; }

.status { margin: 0; color: var(--muted); font-size: 14px; }

.stage {
  position: relative;
  min-height: 78vw;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.stage > * { grid-area: 1 / 1; }

.loading { z-index: 2; background: rgba(250, 246, 238, 0.92); width: 100%; height: 100%; display: grid; place-items: center; align-content: center; }

.stage.revealing .loading,
.stage.holding .loading {
  background: transparent;
  align-content: start;
  padding-top: 14px;
}

.stage.revealing .spinner {
  background: rgba(250, 246, 238, 0.94);
  box-shadow: 0 0 0 10px rgba(250, 246, 238, 0.94);
}

.stage.revealing .frame img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.stage.revealing .loading p {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(250, 246, 238, 0.94);
}

.empty, .loading {
  text-align: center;
  padding: 32px;
  color: var(--muted);
}

.empty p, .loading p { margin: 12px 0 0; }

.stud {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, var(--red) 42%, var(--red-deep));
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}

.empty .stud { width: 46px; height: 46px; }

.spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto;
  border: 3px solid var(--cream-deep);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.frame {
  margin: 0;
  width: min(100%, 720px);
  padding: 18px 18px 8px;
}

.frame img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 12px;
  background: #f6f0e6;
  display: block;
}

.frame figcaption {
  padding: 8px 2px 6px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.hidden { display: none !important; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.actions button { flex: 1 1 calc(50% - 10px); min-height: 48px; }
#generate, #spend-yes, #download { flex-basis: 100%; }

.ladder-note, #ladder-note, #storage-note { margin: 10px 0 0; }

