body.quiz-page {
  background: #fff;
  --pageBg: #fff;
}

.quiz-header {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  background: #FFD3F0;
  border-radius: 0 0 1.25rem 1.25rem;
  padding: 1rem 1rem 0.85rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.quiz-header-row {
  display: grid;
  grid-template-columns: 1.2rem 1fr 1.2rem;
  align-items: center;
  margin-bottom: 0.45rem;
}

.quiz-back img {
  width: 1.05rem;
  display: block;
}

.quiz-progress {
  width: 14.4rem;
  max-width: 70vw;
  height: 0.45rem;
  margin: 0 auto;
  border-radius: 1rem;
  background: rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: relative;
}

.quiz-progress-fill {
  height: 100%;
  width: 0%;
  background: #FF93EC;
  border-radius: 1rem;
  transition: width 0.4s ease;
}

.quiz-title {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  color: #000;
  padding: 0 0.25rem;
}

.quiz-body {
  max-width: var(--max-w);
  margin: 0 auto;
  /* clear fixed pink header; native BOTTOM_ANCHOR needs no reserved chrome */
  padding: 6.1rem 0 calc(2.5rem + env(safe-area-inset-bottom, 0px));
}

.question-card {
  width: 100%;
  padding: 0 1rem;
  margin: 1.25rem 0 0.95rem;
  color: #666;
  opacity: 0.45;
  font-size: 1.05rem;
  line-height: 1.5;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.question-card.is-active {
  opacity: 1;
  pointer-events: auto;
}
.question-card.is-done {
  opacity: 0.7;
  pointer-events: none;
}

.question-text {
  color: #222;
  font-weight: 600;
  padding-bottom: 0.65rem;
}

.likert-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0 0.2rem;
}

.likert-circle {
  border-radius: 50%;
  border: 2px solid var(--c, #A5A5A5);
  background: transparent;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.12s ease;
}
.likert-circle.is-selected {
  background-color: var(--c);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 55%;
  transform: scale(1.05);
}

.likert-labels {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0 0;
  font-size: 1.05rem;
  font-weight: 600;
}
.likert-labels .disagree { color: #43DA84; cursor: pointer; }
.likert-labels .agree { color: #E04CF4; cursor: pointer; }

/* Coach-mark mask */
.coach-mask {
  inset: 0;
  z-index: 1100;
  position: fixed;
  pointer-events: none;
}
.coach-mask.hidden { display: none; }
.coach-mask svg { width: 100%; height: 100%; }

.coach-hand {
  position: absolute;
  left: var(--hand-left, 8%);
  width: 80px;
  height: 80px;
  display: none;
  z-index: 1101;
  transform: rotate(-8deg);
  animation: hand-disagree-agree 2.2s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(83, 23, 72, 0.28));
}
.coach-hand img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}
.coach-mask:not(.hidden) .coach-hand { display: block; }

/* Slide back and forth between Disagree (left) and Agree (right) */
@keyframes hand-disagree-agree {
  0% {
    left: var(--hand-left, 8%);
    transform: rotate(-14deg) translateY(0);
  }
  45% {
    left: var(--hand-right, 72%);
    transform: rotate(6deg) translateY(4px);
  }
  55% {
    left: var(--hand-right, 72%);
    transform: rotate(6deg) translateY(4px);
  }
  100% {
    left: var(--hand-left, 8%);
    transform: rotate(-14deg) translateY(0);
  }
}

body.coach-lock { overflow: hidden; }
