.qo-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(2, 5, 8, 0) 35%, rgba(2, 5, 8, 0.85) 100%);
  opacity: 0;
  transition: opacity 0.7s ease;
  z-index: 9998;
}

.qo-vignette.qo-visible {
  opacity: 1;
}

.qo-container {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 9999;
}

.qo-panel {
  --qo-cyan: #22E5FF;
  --qo-glow: #7BF7FF;
  --qo-void: #020508;

  position: relative;
  min-width: 22ch;
  max-width: 34ch;
  padding: 0 0 1.1em;
  background:
    linear-gradient(rgba(2, 5, 8, 0.05), rgba(2, 5, 8, 0.05)),
    repeating-linear-gradient(
      0deg,
      rgba(34, 229, 255, 0.04) 0px,
      rgba(34, 229, 255, 0.04) 1px,
      rgba(2, 5, 8, 0) 1px,
      rgba(2, 5, 8, 0) 3px
    ),
    rgba(2, 6, 10, 0.92);
  border: 1px solid var(--qo-cyan);
  box-shadow:
    0 0 2px var(--qo-cyan),
    0 0 18px rgba(34, 229, 255, 0.35),
    0 0 48px rgba(34, 229, 255, 0.18),
    inset 0 0 24px rgba(34, 229, 255, 0.06);
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.qo-panel::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(34, 229, 255, 0.35);
  pointer-events: none;
}

.qo-panel.qo-visible {
  opacity: 1;
  transform: scale(1);
}

.qo-panel.qo-fading {
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.qo-titlebar {
  display: block;
  padding: 0.5em 1em;
  margin-bottom: 1em;
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 0.78em;
  letter-spacing: 0.08em;
  color: var(--qo-void);
  background: var(--qo-cyan);
  text-shadow: none;
  text-transform: lowercase;
}

.qo-body {
  padding: 0 1.1em;
  text-align: left;
  font-family: 'VT323', ui-monospace, monospace;
  font-size: clamp(15px, 2.2vw, 22px);
  letter-spacing: 0.03em;
  line-height: 1.6;
  color: var(--qo-glow);
  text-shadow: 0 0 10px rgba(34, 229, 255, 0.75), 0 0 22px rgba(34, 229, 255, 0.4);
}

.qo-prompt {
  color: var(--qo-cyan);
  opacity: 0.85;
}

.qo-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.qo-cursor {
  display: inline-block;
  margin-left: 0.05em;
  color: var(--qo-cyan);
  text-shadow: 0 0 8px rgba(34, 229, 255, 0.9);
  opacity: 1;
}

.qo-cursor.qo-blink {
  animation: qo-cursor-blink 1s steps(1) infinite;
}

@keyframes qo-cursor-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.qo-dots {
  margin-top: 0.4em;
  padding: 0 1.1em;
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 0.85em;
  letter-spacing: 0.3em;
  color: var(--qo-glow);
  opacity: 0.55;
  text-align: left;
}

/* Gesture-gated continue affordance (glyph + hint + explicit button). */
.qo-footer {
  display: flex;
  align-items: center;
  gap: 0.6em;
  flex-wrap: wrap;
  margin-top: 1em;
  padding: 0 1.1em;
  font-family: 'VT323', ui-monospace, monospace;
}

.qo-glyph {
  font-size: 1.5em;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(34, 229, 255, 0.7));
}

.qo-hint {
  flex: 1 1 auto;
  min-width: 12ch;
  font-size: 0.95em;
  letter-spacing: 0.03em;
  color: var(--qo-glow);
  opacity: 0.8;
  text-shadow: 0 0 8px rgba(34, 229, 255, 0.5);
}

.qo-continue {
  pointer-events: auto;
  cursor: pointer;
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 1em;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--qo-void);
  background: var(--qo-cyan);
  border: 1px solid var(--qo-cyan);
  padding: 0.25em 1em;
  box-shadow: 0 0 10px rgba(34, 229, 255, 0.5);
  transition: background 0.15s ease, color 0.15s ease;
}

.qo-continue:hover {
  background: var(--qo-glow);
}
