/* ============================================================
 *  QUIZ — Pretest / Posttest Pembekalan TEP
 *  Mobile-native questions (registration-style sticky dock)
 * ============================================================ */

:root {
  --qz-navy: #0b1330;
  --qz-navy-2: #14224d;
  --qz-navy-accent: #1c3c7a;
  --qz-gold: #c39a3c;
  --qz-gold-soft: #ead29c;
  --qz-paper: #ffffff;
  --qz-ink: #0d1326;
  --qz-muted: #6b7385;
  --qz-line: #e8edf5;
  --qz-ok: #0f766e;
  --qz-bad: #b91c1c;
  --qz-radius: 18px;
  --qz-dock-h: 88px;
}

.qz-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--qz-ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(195, 154, 60, 0.18), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(28, 60, 122, 0.35), transparent 50%),
    linear-gradient(180deg, #070d22 0%, #0b1330 42%, #101a3a 100%);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

.qz-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  background: rgba(7, 13, 34, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.qz-topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  min-width: 0;
}
.qz-topbar__brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.qz-topbar__title { font-size: 13px; font-weight: 700; line-height: 1.2; }
.qz-topbar__sub { font-size: 11px; color: var(--qz-gold-soft); }
.qz-topbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 600;
  max-width: 45%;
}
.qz-topbar__right span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qz-linkbtn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--qz-gold-soft);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.qz-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px calc(48px + env(safe-area-inset-bottom, 0px));
}
.qz-body.is-quiz .qz-main {
  padding-bottom: calc(var(--qz-dock-h) + 28px + env(safe-area-inset-bottom, 0px));
}

.qz-step[hidden] { display: none !important; }

/* ---- Portal (identitas, seperti pertanyaan) ---- */
.qz-portal {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
  color: #fff;
  animation: qz-fade-up 0.55s ease both;
}
.qz-portal__logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin: 8px auto 14px;
  display: block;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}
.qz-portal__eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--qz-gold-soft);
  font-weight: 700;
}
.qz-portal__title {
  margin: 0 0 10px;
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.55rem, 4vw, 2.05rem);
  line-height: 1.2;
}
.qz-portal__lead {
  margin: 0 auto 16px;
  max-width: 34em;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}
.qz-portal__links {
  margin: 0 0 18px;
  font-size: 13px;
}
.qz-portal__links a {
  color: var(--qz-gold-soft);
  font-weight: 700;
  text-decoration: none;
}
.qz-portal__links span {
  color: rgba(255, 255, 255, 0.35);
  margin: 0 8px;
}
.qz-portal__card {
  text-align: left;
  background: var(--qz-paper);
  border-radius: var(--qz-radius);
  padding: 20px 18px 22px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  color: var(--qz-ink);
}
.qz-portal__card .qz-btn {
  width: 100%;
  margin-top: 4px;
  min-height: 52px;
}

.qz-chip-id {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(195, 154, 60, 0.12);
  border: 1px solid rgba(195, 154, 60, 0.35);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--qz-navy);
}
.qz-chip-id span { min-width: 0; word-break: break-word; }
.qz-chip-id button {
  appearance: none;
  border: none;
  background: var(--qz-navy);
  color: var(--qz-gold-soft);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  padding: 8px 12px;
  border-radius: 8px;
  flex-shrink: 0;
  min-height: 40px;
}

.qz-profil {
  margin: 14px 0 16px;
  padding: 14px;
  border-radius: 14px;
  background: #f5f7fb;
  border: 1px solid var(--qz-line);
}
.qz-profil[hidden] { display: none; }
.qz-profil__title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--qz-gold);
}
.qz-profil__grid {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}
.qz-profil__grid dt {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--qz-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.qz-profil__grid dd {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--qz-navy);
  line-height: 1.35;
  word-break: break-word;
}
.qz-profil__note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--qz-muted);
  line-height: 1.4;
}

.qz-field { margin-bottom: 16px; position: relative; }
.qz-field__label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--qz-navy);
  margin-bottom: 6px;
}
.qz-field__hint,
.qz-field__help {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--qz-muted);
}
.qz-input, .qz-select, .qz-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--qz-line);
  border-radius: 12px;
  padding: 14px 14px;
  font: inherit;
  font-size: 16px; /* avoid iOS zoom */
  color: var(--qz-ink);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.qz-input:focus, .qz-select:focus, .qz-textarea:focus {
  outline: none;
  border-color: rgba(28, 60, 122, 0.55);
  box-shadow: 0 0 0 3px rgba(28, 60, 122, 0.12);
}
.qz-textarea { resize: vertical; min-height: 140px; line-height: 1.55; }

.qz-ac { position: relative; }
.qz-ac__list {
  position: absolute;
  z-index: 20;
  left: 0; right: 0; top: calc(100% + 4px);
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--qz-line);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
  max-height: 260px;
  overflow: auto;
}
.qz-ac__list[hidden] { display: none; }
.qz-ac__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  font: inherit;
  padding: 12px 12px;
  border-radius: 8px;
  cursor: pointer;
  min-height: 48px;
}
.qz-ac__item:hover, .qz-ac__item.is-active { background: #f3f6fc; }
.qz-ac__name { font-size: 14px; font-weight: 700; color: var(--qz-navy); }
.qz-ac__meta { font-size: 12px; color: var(--qz-muted); }
.qz-ac__empty { padding: 14px; font-size: 13px; color: var(--qz-muted); }

.qz-btn,
.qz-submit {
  appearance: none;
  border: none;
  border-radius: 14px;
  padding: 14px 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #1c3c7a 0%, #0b1330 100%);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(11, 19, 48, 0.28);
  transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s;
}
.qz-btn--primary { color: #fff; }
.qz-btn:hover,
.qz-submit:hover { transform: translateY(-1px); }
.qz-btn:active,
.qz-submit:active { transform: translateY(0); }
.qz-btn:disabled,
.qz-submit:disabled { opacity: 0.65; cursor: wait; transform: none; }

.qz-error {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--qz-bad);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
}
.qz-error[hidden] { display: none; }

/* ============================================================
 *  QUIZ STEP — mobile-native question flow
 * ============================================================ */

.qz-quizhead {
  color: #fff;
  margin-bottom: 18px;
  animation: qz-fade-up 0.45s ease both;
}
.qz-progress {
  display: flex;
  gap: 5px;
  margin-bottom: 14px;
}
.qz-progress span {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
  transition: background 0.25s ease, transform 0.25s ease;
}
.qz-progress span.is-done { background: var(--qz-gold); }
.qz-progress span.is-active {
  background: var(--qz-gold-soft);
  transform: scaleY(1.35);
}
.qz-quizhead__eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--qz-gold-soft);
  font-weight: 700;
}
.qz-quizhead__title {
  margin: 0 0 8px;
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.35rem, 4.5vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.qz-quizhead__meta {
  margin: 0;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.72);
  font-variant-numeric: tabular-nums;
}
.qz-quizhead__meta strong {
  color: var(--qz-gold-soft);
  font-weight: 700;
}

.qz-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Full-bleed question blocks (registration / pertanyaan cards) */
.qz-block {
  background: var(--qz-paper);
  border-radius: 20px;
  padding: 20px 16px 18px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 16px 36px -18px rgba(7, 13, 34, 0.55);
  animation: qz-fade-up 0.55s ease both;
}
.qz-block:nth-of-type(2) { animation-delay: 0.06s; }
.qz-block__head {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--qz-line);
}
.qz-block__head h2 {
  margin: 0 0 4px;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--qz-navy);
  letter-spacing: -0.01em;
}
.qz-block__head p {
  margin: 0;
  font-size: 13px;
  color: var(--qz-muted);
  line-height: 1.4;
}

/* ---- MCQ ---- */
.qz-mcq {
  margin: 0 0 18px;
  padding: 0;
  border: none;
  background: transparent;
}
.qz-mcq:last-child { margin-bottom: 4px; }
.qz-mcq + .qz-mcq {
  padding-top: 18px;
  border-top: 1px solid var(--qz-line);
}
.qz-mcq__prompt {
  margin: 0 0 12px;
  padding: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--qz-navy);
  line-height: 1.45;
  float: none;
  width: 100%;
}
.qz-mcq__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65em;
  height: 1.65em;
  margin-right: 6px;
  padding: 0 6px;
  border-radius: 8px;
  background: rgba(195, 154, 60, 0.14);
  color: var(--qz-gold);
  font-weight: 800;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  vertical-align: 1px;
}
.qz-mcq__opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.qz-mcq__opt {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 52px;
  padding: 14px 14px;
  margin: 0;
  border-radius: 14px;
  border: 1.5px solid var(--qz-line);
  background: #fafbfd;
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
  -webkit-user-select: none;
  user-select: none;
}
.qz-mcq__opt:active { transform: scale(0.985); }
.qz-mcq__opt:hover {
  border-color: rgba(28, 60, 122, 0.28);
  background: #fff;
}
.qz-mcq__opt input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}
.qz-mcq__key {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin-top: 1px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(28, 60, 122, 0.1);
  color: var(--qz-navy-accent);
  font-size: 12px;
  font-weight: 800;
  transition: background 0.16s, color 0.16s;
}
.qz-mcq__text {
  flex: 1;
  min-width: 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--qz-ink);
  font-weight: 500;
  padding-top: 3px;
}
.qz-mcq__opt:has(input:checked),
.qz-mcq__opt.is-selected {
  border-color: var(--qz-navy-accent);
  background: linear-gradient(180deg, #fff 0%, #eef3fb 100%);
  box-shadow:
    0 0 0 2px rgba(28, 60, 122, 0.1),
    0 8px 18px -12px rgba(11, 19, 48, 0.35);
}
.qz-mcq__opt:has(input:checked) .qz-mcq__key,
.qz-mcq__opt.is-selected .qz-mcq__key {
  background: var(--qz-navy);
  color: var(--qz-gold-soft);
}
.qz-mcq__opt:has(input:focus-visible) {
  outline: 2px solid var(--qz-gold);
  outline-offset: 2px;
}

/* ---- Essays (pilih satu) ---- */
.qz-essay {
  margin: 0 0 12px;
  padding: 0;
  border: 1.5px solid var(--qz-line);
  border-radius: 16px;
  background: #fafbfd;
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}
.qz-essay:last-child { margin-bottom: 2px; }
.qz-essay.is-selected {
  border-color: rgba(195, 154, 60, 0.65);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(195, 154, 60, 0.12);
}
.qz-essay.is-dimmed {
  opacity: 0.55;
}
.qz-essay__pick {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 14px 14px 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.qz-essay__pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.qz-essay__pick-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.qz-essay__pick-body strong {
  font-size: 14.5px;
  font-weight: 750;
  color: var(--qz-navy);
  line-height: 1.3;
}
.qz-essay__n {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65em;
  height: 1.65em;
  margin-top: 1px;
  padding: 0 6px;
  border-radius: 8px;
  background: rgba(195, 154, 60, 0.14);
  color: var(--qz-gold);
  font-weight: 800;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 0 0 1.5px transparent;
  transition: box-shadow 0.15s ease, background 0.15s ease;
}
.qz-essay.is-selected .qz-essay__n {
  background: var(--qz-gold);
  color: #fff;
}
.qz-essay__prompt {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #3a4258;
  white-space: pre-wrap;
  font-weight: 450;
}
.qz-essay .qz-textarea,
.qz-essay textarea.qz-input {
  display: block;
  width: calc(100% - 28px);
  margin: 0 14px 14px;
  min-height: 132px;
  border-radius: 14px;
  padding: 14px 15px;
  background: #fff;
  line-height: 1.55;
}
.qz-essay .qz-textarea[hidden],
.qz-essay textarea.qz-input[hidden] {
  display: none !important;
}
.qz-essay .qz-textarea:focus,
.qz-essay textarea.qz-input:focus {
  background: #fff;
}
.qz-essay__pick:has(input:focus-visible) .qz-essay__n {
  box-shadow: inset 0 0 0 2px var(--qz-navy);
}

/* Inline form error above dock */
.qz-form > .qz-error {
  margin: 0;
}

/* ---- Sticky bottom dock (registration navbar style) ---- */
.qz-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  padding: 0 12px calc(10px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(7, 13, 34, 0.55) 28%,
    rgba(7, 13, 34, 0.92) 100%
  );
}
.qz-dock[hidden] { display: none !important; }
.qz-dock__inner {
  pointer-events: auto;
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid rgba(232, 237, 245, 0.95);
  border-radius: 22px;
  padding: 10px 10px 10px 16px;
  box-shadow:
    0 18px 40px -16px rgba(0, 0, 0, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
}
.qz-dock__status {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.qz-dock__step {
  font-size: 12.5px;
  color: var(--qz-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.qz-dock__step strong {
  color: var(--qz-navy);
  font-weight: 800;
  font-size: 15px;
}
.qz-dock__bar {
  height: 6px;
  background: #e8edf5;
  border-radius: 999px;
  overflow: hidden;
  max-width: 160px;
}
.qz-dock__bar > div {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--qz-navy-accent), var(--qz-gold));
  border-radius: inherit;
  transition: width 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.qz-btn--submit {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  min-height: 48px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  color: var(--qz-navy);
  background: linear-gradient(180deg, #d4b15a 0%, #c39a3c 100%);
  box-shadow: 0 10px 20px -8px rgba(179, 138, 43, 0.65);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.qz-btn--submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -10px rgba(179, 138, 43, 0.75);
}
.qz-btn--submit:active { transform: translateY(0); }
.qz-btn--submit:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}
.qz-dock__note {
  pointer-events: none;
  max-width: 720px;
  margin: 8px auto 0;
  padding: 0 6px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  line-height: 1.35;
}

/* Success overlay (already polished) */
.qz-success {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(6, 13, 34, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: qz-overlay-in 0.28s ease both;
}
.qz-success[hidden] { display: none !important; }
.qz-success__card {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 28px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.4);
  animation: qz-sheet-up 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.qz-success__badge {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--qz-gold), var(--qz-gold-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--qz-navy);
}
.qz-success__title {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.55rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--qz-navy);
  letter-spacing: -0.02em;
}
.qz-success__lead {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--qz-muted);
  line-height: 1.5;
}
.qz-success__score-wrap {
  margin: 0 0 16px;
  padding: 18px 16px;
  border-radius: 14px;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(195, 154, 60, 0.14), transparent 55%),
    #f8fafc;
  border: 1px solid var(--qz-line);
}
.qz-success__score {
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(2.4rem, 8vw, 3rem);
  font-weight: 700;
  color: var(--qz-navy);
  line-height: 1;
  letter-spacing: -0.03em;
}
.qz-success__pct {
  margin: 8px 0 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #1c3c7a;
}
.qz-success__meta {
  text-align: left;
  background: #f8fafc;
  border: 1px solid var(--qz-line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 13px;
  display: grid;
  gap: 10px;
}
.qz-success__meta div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.qz-success__meta span {
  color: var(--qz-muted);
  flex-shrink: 0;
}
.qz-success__meta strong {
  color: var(--qz-ink);
  text-align: right;
  font-weight: 700;
  word-break: break-word;
}
.qz-success__btn {
  width: 100%;
  min-height: 48px;
}

@keyframes qz-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes qz-sheet-up {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}
@keyframes qz-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* Desktop: centered content, dock floats like registration pill */
@media (min-width: 720px) {
  .qz-main { padding: 28px 20px 56px; }
  .qz-body.is-quiz .qz-main {
    padding-bottom: calc(var(--qz-dock-h) + 40px);
  }
  .qz-block {
    padding: 26px 24px 22px;
    border-radius: 22px;
  }
  .qz-mcq__prompt { font-size: 15.5px; }
  .qz-mcq__text { font-size: 15px; }
  .qz-mcq__opt { padding: 15px 16px; min-height: 54px; }
  .qz-essay__prompt { font-size: 14.5px; }
  .qz-dock {
    padding: 0 20px calc(18px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(
      180deg,
      transparent 0%,
      rgba(7, 13, 34, 0.35) 40%,
      rgba(7, 13, 34, 0.75) 100%
    );
  }
  .qz-dock__inner {
    border-radius: 999px;
    padding: 8px 8px 8px 22px;
    gap: 18px;
  }
  .qz-dock__status {
    flex-direction: row;
    align-items: center;
    gap: 14px;
  }
  .qz-dock__bar { max-width: 120px; min-width: 100px; flex: 1; }
  .qz-btn--submit {
    padding: 12px 24px;
    min-width: 180px;
  }
  .qz-dock__note { margin-top: 10px; }
  .qz-success {
    align-items: center;
    padding: 24px;
  }
  .qz-success__card {
    border-radius: 18px;
    max-width: 440px;
    padding: 32px 28px 26px;
    animation-name: qz-fade-up;
  }
}

/* Narrow phones: stacked dock like registration mobile */
@media (max-width: 560px) {
  .qz-main { padding-left: 12px; padding-right: 12px; }
  .qz-portal__card { padding: 16px 14px 18px; }
  .qz-profil__grid { grid-template-columns: 1fr; }
  .qz-block { padding: 18px 14px 16px; border-radius: 18px; }
  .qz-quizhead__title { font-size: 1.4rem; }
  .qz-dock__inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    border-radius: 20px;
    padding: 12px;
    gap: 10px;
  }
  .qz-dock__status {
    order: -1;
    padding: 2px 4px 0;
  }
  .qz-btn--submit {
    width: 100%;
    min-height: 52px;
    font-size: 15px;
    border-radius: 14px;
  }
  :root { --qz-dock-h: 128px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
