/* puzzle.css — the wait, occupied. One more Amiga Workbench 1.3 window, the
   same chrome as pay.css (blue ground, white/black bevels, the orange
   highlight, the .wb-bar gadgets), floating over the render loader while a
   reel is in the lab. Never wider or taller than 80% of the screen; the
   drift's own toast at the bottom stays uncovered. */

#pz-veil {
  position: fixed;
  inset: 0;
  z-index: 9500;                 /* over the drift (9000), under the account window (9600) */
  display: none;
  align-items: center;
  justify-content: center;
  padding: 8px;
  pointer-events: none;          /* only the window itself takes the pointer */
  font-family: var(--px-body);
  image-rendering: pixelated;
  -webkit-font-smoothing: none;
  font-smooth: never;
  user-select: none;
  -webkit-user-select: none;
}
#pz-veil.on { display: flex; }
/* the surfaced console owns the screen: the wait window steps aside */
body.term-over #pz-veil { display: none !important; }

#pz-win {
  pointer-events: auto;
  width: min(720px, 80vw);
  height: min(660px, 80vh);
  max-width: 80vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: var(--wb-blue);
  color: var(--wb-white);
  border: 2px solid;
  border-color: var(--wb-white) var(--wb-black) var(--wb-black) var(--wb-white);
  box-shadow: 0 0 0 2px var(--wb-black), 8px 8px 0 0 rgba(0, 0, 0, 0.45);
  outline: none;
  font-size: 22px;
  line-height: 1.15;
}
/* a phone: the window takes what it can, still inside the eight tenths */
@media (max-width: 560px) {
  #pz-win { width: 80vw; height: 80vh; font-size: 19px; }
}

/* the one sentence, under the bar */
.pz-instr {
  flex: none;
  margin: 0;
  padding: 8px 12px;
  background: var(--wb-black);
  color: var(--wb-orange);
  font-family: var(--px-ui);
  font-size: 0.8em;
  line-height: 1.25;
  border-bottom: 2px solid var(--wb-black);
}
.pz-instr.wait { color: var(--wb-white); opacity: 0.8; }

/* the stage: the document itself, bevelled in */
.pz-stage {
  flex: 1 1 auto;
  min-height: 0;
  margin: 6px;
  background: var(--wb-black);
  border: 2px solid;
  border-color: var(--wb-black) var(--wb-white) var(--wb-white) var(--wb-black);
  overflow: hidden;
}
.pz-stage iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--wb-black);
}

/* the status line: the score, the clock */
.pz-status {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 6px;
  font-family: var(--px-ui);
  font-size: 0.78em;
  letter-spacing: 1px;
  border-top: 2px solid var(--wb-black);
}
.pz-status .pz-lbl { opacity: 0.75; }
.pz-status .pz-n {
  font-family: var(--px-title);
  font-size: 0.95em;
  color: var(--wb-orange);
}
.pz-status .pz-gap { flex: 1 1 auto; }
.pz-status .pz-clock { color: var(--wb-white); opacity: 0.8; }

/* a flex box beats the browser's own [hidden] rule: say it again, louder */
#pz-win [hidden] { display: none !important; }

/* the pixel spinner while the document is still being written */
.pz-wait {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 6px;
  background: var(--wb-black);
}
.pz-wait i {
  display: block;
  width: 10px; height: 10px;
  background: var(--wb-orange);
  animation: pz-blink 1.1s steps(2) infinite;
}
.pz-wait i:nth-child(2) { animation-delay: 0.18s; }
.pz-wait i:nth-child(3) { animation-delay: 0.36s; }
.pz-wait i:nth-child(4) { animation-delay: 0.54s; }
@keyframes pz-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.15; } }
