/* Refined event enquiry dialog: warm paper, wine accents, and a calm editorial layout. */
#quiz.modal {
  box-sizing: border-box;
  width: min(1040px, calc(100vw - 48px));
  max-width: 1040px;
  max-height: min(900px, calc(100dvh - 48px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #c9b2a8;
  border-radius: 22px;
  background: #f8f3ee;
  color: #2b2021;
  box-shadow: 0 35px 120px #1f07164d, 0 4px 18px #1f07161f;
  overscroll-behavior: contain;
}

#quiz.modal::backdrop {
  background: rgb(24 8 15 / 72%);
  backdrop-filter: blur(9px);
}

#quiz.modal[open] { animation: quiz-premium-enter .42s cubic-bezier(.2,.75,.25,1) both; }
@keyframes quiz-premium-enter { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }

#quiz .quiz-shell {
  grid-template-columns: minmax(0, 1.08fr) minmax(310px, .92fr);
  min-height: min(660px, calc(100dvh - 50px));
}

#quiz .quiz-main {
  position: relative;
  min-width: 0;
  max-height: min(900px, calc(100dvh - 48px));
  padding: clamp(26px, 3vw, 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #c7aaa1 transparent;
}

#quiz .quiz-brand { display: flex; width: fit-content; flex-direction: column; align-items: center; gap: 4px; margin: 0 0 clamp(20px, 2.6vw, 30px); }
#quiz .quiz-brand-mark { display: block; width: clamp(150px, 17vw, 190px); height: 27px; overflow: hidden; }
#quiz .quiz-brand-mark img { display: block; width: 100% !important; max-width: none !important; height: auto !important; margin: 0 !important; }
#quiz .quiz-brand-caption { color: #80666a; font: 500 8px/1.5 'Manrope', Arial, sans-serif; letter-spacing: .28em; text-transform: uppercase; }
#quiz .quiz-progress { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; color: #681024; font: 600 10px/1.4 'Manrope', sans-serif; letter-spacing: .16em; }
#quiz .quiz-progress progress { width: min(155px, 32vw); height: 3px; accent-color: #681024; }
#quiz .quiz-main h2 { max-width: 19ch; margin-bottom: 12px; color: #681024; font: 400 clamp(29px, 3vw, 39px)/1.02 'Cormorant Garamond', Georgia, serif; letter-spacing: -.02em; }
#quiz .quiz-hint { max-width: 46ch; margin-bottom: 24px; color: #756663; font: 400 13px/1.7 'Manrope', Arial, sans-serif; }
#quiz .quiz-options { gap: 9px; margin: 22px 0; }
#quiz .quiz-option { min-width: 0; border: 1px solid #ded1c9; border-radius: 9px; background: #fffaf6; color: #342729; transition: border-color .2s, background .2s, transform .2s; }
#quiz .quiz-option:hover { border-color: #a87e82; transform: translateY(-1px); }
#quiz .quiz-option:has(input:checked) { border-color: #681024; background: #6810240c; }
#quiz .field { margin: 16px 0; color: #715f5d; font: 500 11px/1.5 'Manrope', Arial, sans-serif; }
#quiz .field input { min-height: 48px; border: 1px solid #d9c9c0; border-radius: 8px; background: #fffdfa; color: #2b2021; font: 400 15px/1.4 'Manrope', Arial, sans-serif; }
#quiz .field input:focus-visible { border-color: #681024; outline: 2px solid #68102430; outline-offset: 2px; }
#quiz .legal-consent { display: flex; align-items: flex-start; gap: 10px; color: #766866; font: 400 10px/1.6 'Manrope', Arial, sans-serif; }
#quiz .legal-consent input { flex: 0 0 auto; margin-top: 2px; accent-color: #681024; }
#quiz .legal-consent a { color: #681024; text-underline-offset: 2px; }
#quiz .quiz-nav { margin-top: 26px; }
#quiz .quiz-nav .back { padding: 10px 0; color: #681024; font: 500 11px 'Manrope', sans-serif; }
#quiz .quiz-nav .back:disabled { opacity: .35; }
#quiz .quiz-nav .button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 13px 24px; border: 1px solid #681024; border-radius: 28px; background: #681024; color: #fffaf6; font: 500 11px 'Manrope', sans-serif; transition: background .2s, transform .2s, box-shadow .2s; }
#quiz .quiz-nav .button:hover { transform: translateY(-2px); background: #4d0d1e; box-shadow: 0 9px 22px #6810242b; }
#quiz .close { z-index: 3; top: 18px; right: 18px; display: grid; place-items: center; width: 42px; height: 42px; padding: 0 !important; border: 1px solid #ffffff85; border-radius: 50%; background: #f8f3eee8; color: #681024; font: 0/0 'Manrope', sans-serif; cursor: pointer; transition: transform .2s, background .2s; }
#quiz .close::before, #quiz .close::after { position: absolute; top: 50%; left: 50%; width: 14px; height: 1.5px; border-radius: 2px; background: currentColor; content: ''; transform: translate(-50%, -50%) rotate(45deg); }
#quiz .close::after { transform: translate(-50%, -50%) rotate(-45deg); }
#quiz .close:hover { transform: rotate(90deg); background: #fff; }
#quiz .quiz-side { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: 100%; padding: 42px; overflow: hidden; background-position: center; background-size: cover; color: #fffaf6; font: 400 clamp(30px, 3.5vw, 46px)/.98 'Cormorant Garamond', Georgia, serif; text-shadow: 0 2px 18px #21081266; }
#quiz .quiz-side::before { position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, #270b1b12 10%, #270b1bbd 100%); content: ''; }
#quiz .error { min-height: 20px; margin: 12px 0 0; color: #8d1730; font: 500 11px/1.5 'Manrope', sans-serif; }

@media (max-width: 760px) {
  #quiz.modal { width: min(560px, calc(100vw - 20px)); max-height: calc(100dvh - max(20px, env(safe-area-inset-top) + 10px) - env(safe-area-inset-bottom)); border-radius: 19px; }
  #quiz .quiz-shell { display: block; min-height: 0; }
  #quiz .quiz-main { max-height: calc(100dvh - max(20px, env(safe-area-inset-top) + 10px) - env(safe-area-inset-bottom)); padding: 22px 22px calc(22px + env(safe-area-inset-bottom)); }
  #quiz .quiz-brand { gap: 3px; margin-bottom: 18px; }
  #quiz .quiz-brand-mark { width: 160px; height: 23px; }
  #quiz .quiz-brand-caption { font-size: 7px; letter-spacing: .25em; }
  #quiz .quiz-progress { margin-bottom: 16px; }
  #quiz .quiz-main h2 { max-width: 21ch; font-size: clamp(28px, 8vw, 35px); }
  #quiz .quiz-hint { margin-bottom: 17px; font-size: 12px; }
  #quiz .quiz-options { gap: 7px; margin: 16px 0; }
  #quiz .quiz-option { font-size: 11px; }
  #quiz .quiz-side { display: none; }
  #quiz .close { position: fixed; top: max(10px, env(safe-area-inset-top)); right: max(10px, calc((100vw - min(560px, 100vw - 20px))/2 + 10px)); width: 38px; height: 38px; }
  #quiz .quiz-nav { gap: 12px; margin-top: 20px; }
  #quiz .quiz-nav .button { min-height: 46px; padding-inline: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  #quiz.modal[open] { animation: none; }
  #quiz .quiz-option, #quiz .quiz-nav .button, #quiz .close { transition: none; }
}
