/* ---------- launcher button ---------- */
.ssq-btn-wrap { text-align: center; margin: 24px auto; width: 100%; }
.ssq-open-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 42px; font: inherit; font-size: 1.15rem; font-weight: 600; line-height: 1.2;
  color: #fffffe; background: linear-gradient(135deg, #6d3ce6 0%, #5c29d5 100%);
  border: none; border-radius: 10px; cursor: pointer; text-decoration: none;
  box-shadow: 0 8px 24px rgba(92, 41, 213, .28);
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.ssq-open-btn:hover  { background: linear-gradient(135deg, #5c29d5 0%, #4a1fb5 100%); transform: translateY(-1px); }
.ssq-open-btn:active { transform: translateY(0); }
.ssq-open-btn:focus-visible { outline: 2px solid #e8c877; outline-offset: 3px; }

/* ---------- overlay: both hiding mechanisms, and they win ---------- */
.quiz-modal-overlay[hidden],
.quiz-modal-overlay.is-hidden { display: none !important; }

.quiz-modal-overlay {
  position: fixed; inset: 0; width: 100%; height: 100%;
  background: radial-gradient(120% 120% at 50% 0%, rgba(48,24,96,.55) 0%, rgba(5,3,10,.92) 60%);
  display: flex; justify-content: center; align-items: center; z-index: 2147483647;
  box-sizing: border-box; padding: 16px;
}
.quiz-modal-content {
  background: linear-gradient(180deg, #160e29 0%, #0b0713 100%);
  padding: 40px 32px; border-radius: 16px; max-width: 500px; width: 90%; position: relative;
  color: #f4f1ff; box-shadow: 0 30px 80px rgba(0,0,0,.6); border: 1px solid rgba(232,200,119,.22);
  font-family: inherit; max-height: 92vh; overflow-y: auto; box-sizing: border-box;
}
.quiz-close-btn {
  position: absolute; top: 10px; right: 15px; background: none; border: none;
  font-size: 28px; cursor: pointer; color: #b9b0d6; z-index: 2; line-height: 1;
}
.quiz-close-btn:hover { color: #e8c877; }

.quiz-progress { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: rgba(255,255,255,.06); border-radius: 16px 16px 0 0; overflow: hidden; }
.quiz-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #7c4dff, #e8c877); transition: width .5s ease; }

.quiz-counter { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: #c9a85a; margin: 4px 0 12px; }
.quiz-title { font-size: 26px; line-height: 1.25; color: #f4f1ff; margin: 0 0 6px; font-weight: 500; }
.quiz-sub { font-size: 14px; color: #b9b0d6; margin: 0 0 20px; line-height: 1.5; }

.quiz-option-btn {
  display: block; width: 100%; margin: 10px 0; padding: 15px 16px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(232,200,119,.18); border-radius: 11px;
  cursor: pointer; text-align: left; font-size: 15px; font-family: inherit; color: #f4f1ff;
  box-sizing: border-box; transition: border-color .2s, background .2s;
}
.quiz-option-btn:hover { background: rgba(124,77,255,.16); border-color: #e8c877; }

.quiz-img-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.quiz-img-btn {
  aspect-ratio: 1/1; width: 100%; border-radius: 14px; cursor: pointer;
  border: 2px solid rgba(232,200,119,.2); background-size: cover; background-position: center;
  background-color: #241a3d; transition: transform .2s, border-color .2s;
}
.quiz-img-btn:hover { transform: scale(1.02); border-color: #e8c877; }

.quiz-bd-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; margin-top: 6px; }
.quiz-bd-grid.two { grid-template-columns: 1fr 1fr; }
.quiz-modal-content select {
  width: 100%; height: 50px; padding: 0 12px; font-size: 15px; font-family: inherit; color: #f4f1ff;
  background: rgba(255,255,255,.05); border: 1px solid rgba(232,200,119,.22); border-radius: 10px;
  -webkit-appearance: none; -moz-appearance: none; appearance: none; cursor: pointer; box-sizing: border-box;
}
.quiz-modal-content select option { background: #160e29; color: #f4f1ff; }

.quiz-continue-btn {
  width: 100%; margin-top: 16px; padding: 14px; background: linear-gradient(90deg, #e8c877, #c9a85a);
  color: #0b0713; border: none; border-radius: 10px; cursor: pointer; font-size: 15px; font-weight: 600; font-family: inherit;
}
.quiz-continue-btn:disabled { opacity: .4; cursor: not-allowed; }
.quiz-skip-btn { display: block; width: 100%; margin-top: 10px; background: none; border: none; color: #b9b0d6; font-size: 13px; font-family: inherit; cursor: pointer; text-decoration: underline; }
.quiz-back-btn { margin-top: 18px; background: none; border: none; color: #b9b0d6; font-size: 13px; font-family: inherit; cursor: pointer; }
.quiz-back-btn:hover { color: #e8c877; }

.quiz-email-input {
  width: 100%; padding: 14px 16px; margin: 6px 0; box-sizing: border-box; font-size: 15px; font-family: inherit; color: #f4f1ff;
  background: rgba(255,255,255,.05); border: 1px solid rgba(232,200,119,.25); border-radius: 10px;
}
.quiz-email-input::placeholder { color: #b9b0d6; }
.quiz-submit-btn {
  width: 100%; padding: 14px; background: linear-gradient(90deg, #e8c877, #c9a85a);
  color: #0b0713; border: none; border-radius: 10px; cursor: pointer; font-size: 16px; font-weight: 600; font-family: inherit;
}
.quiz-submit-btn:disabled { opacity: .6; cursor: progress; }
.quiz-fine { font-size: 11.5px; color: #b9b0d6; margin-top: 12px; line-height: 1.5; }
.quiz-err { color: #ff8080; font-size: 13px; margin-top: 8px; min-height: 16px; }

.quiz-center { text-align: center; }
.quiz-arch { color: #e8c877; font-style: italic; }
.quiz-result-name { font-size: 34px; font-style: italic; color: #e8c877; margin: 6px 0 4px; line-height: 1.1; }
.quiz-result-body { font-size: 16px; line-height: 1.6; color: #f4f1ff; text-align: left; margin: 14px 0 20px; }
.quiz-facts { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 0 0 22px; }
.quiz-fact { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #c9a85a; border: 1px solid rgba(232,200,119,.22); border-radius: 999px; padding: 7px 14px; }
.quiz-block { text-align: left; border: 1px solid rgba(168,130,255,.35); background: rgba(124,77,255,.08); border-radius: 12px; padding: 16px 18px; margin: 0 0 22px; }
.quiz-block-label { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: #c9a0ff; margin-bottom: 8px; }
.quiz-block-text { font-size: 15px; line-height: 1.55; color: #f4f1ff; }
.quiz-cta { display: block; text-align: center; padding: 15px; border-radius: 10px; text-decoration: none; font-weight: 600; color: #0b0713; background: linear-gradient(90deg, #e8c877, #c9a85a); }
.quiz-cta[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.quiz-cta-note { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #b9b0d6; margin: 10px 0 0; }

/* utility */
.quiz-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ssq-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
body.ssq-locked { overflow: hidden; }
.quiz-consent { display: flex; gap: 10px; align-items: flex-start; text-align: left; margin: 12px 0 4px; font-size: 12.5px; color: #b9b0d6; line-height: 1.45; }
.quiz-consent input { margin-top: 2px; flex: 0 0 auto; }

@media (max-width: 480px) {
  .quiz-modal-content { padding: 32px 20px; width: 100%; max-height: 96vh; }
  .quiz-title { font-size: 22px; }
  .ssq-open-btn { width: 100%; padding: 16px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .quiz-progress-fill, .ssq-open-btn, .quiz-option-btn, .quiz-img-btn { transition: none !important; }
}