/* ============================================
   QUIZ — locked diary page
   ============================================ */
.quiz-section {
  text-align: center;
  padding: 70px 0;
}
.diary-lock-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--maroon);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  padding: 15px 38px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(74, 22, 32, 0.3);
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s ease,
    background 0.3s ease;
}
.diary-lock-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(74, 22, 32, 0.4);
  background: var(--maroon-deep);
}
.diary-lock-btn svg {
  width: 18px;
  height: 18px;
}

.quiz-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(59, 42, 30, 0.55);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}
.quiz-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 40px 34px;
  width: 90%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  animation: cardIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.quiz-close {
  position: absolute;
  top: 14px;
  right: 16px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  border-radius: 50%;
  transition: 0.3s;
}
.quiz-close:hover {
  background: var(--paper-soft);
  color: var(--maroon);
}
.quiz-card h2 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--maroon-deep);
  font-size: 1.4rem;
  margin-bottom: 6px;
}
.quiz-card p {
  color: var(--ink-soft);
  margin: 10px 0;
  font-size: 1.05rem;
}
.quiz-card input {
  padding: 11px 18px;
  width: 82%;
  margin-top: 6px;
  border-radius: 2px;
  border: 1.5px solid var(--line);
  background: var(--paper-soft);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  text-align: center;
  outline: none;
  transition: border-color 0.3s ease;
}
.quiz-card input:focus {
  border-color: var(--gold);
}
.quiz-card button {
  background: var(--maroon);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 30px;
  margin-top: 16px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: 0.3s;
}
.quiz-card button:hover {
  background: var(--maroon-deep);
  transform: translateY(-2px);
}
#quizResult {
  margin-top: 12px;
  font-weight: 600;
  font-family: var(--font-body);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes cardIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
