/* The survival quiz pages: one narrow column, built for phones first. Tokens come from site.css. */
.quiz-page { background: #f7efe1; }
html:has(body.quiz-page) { background: #f7efe1; } /* site.css paints the root, so the body colour alone stops short */

.quiz { width: min(640px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 40px; color: #2e3a46; }
.quiz-step[hidden] { display: none; }
.quiz h1, .quiz h2, .quiz h3 { margin: 0; letter-spacing: -.01em; }
.quiz [tabindex="-1"]:focus { outline: none; }

.quiz-cover { text-align: center; }
.quiz-cover-art { width: 100%; height: auto; border: 3px solid #2e3a46; border-radius: 22px; box-shadow: 6px 8px 0 rgba(46, 58, 70, .16); }
.quiz-cover h1 { text-wrap: balance; margin-top: 28px; font-size: clamp(28px, 7.4vw, 42px); line-height: 1.2; font-weight: 900; }
.quiz-subtitle { margin: 12px 0 26px; font-size: 18px; color: #5b6570; }
.quiz-note { margin: 18px 0 0; font-size: 14px; color: #6b7480; }

.quiz-primary, .quiz-secondary {
  display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 34px;
  border: 3px solid #2e3a46; border-radius: 999px; font: inherit; font-size: 18px; font-weight: 800; cursor: pointer;
  box-shadow: 0 5px 0 #2e3a46; transition: transform .08s ease, box-shadow .08s ease;
}
.quiz-primary { background: var(--accent-deep); color: #fff; }
.quiz-secondary { background: #ffd84d; color: #2e3a46; }
.quiz-primary:active, .quiz-secondary:active { transform: translateY(4px); box-shadow: 0 1px 0 #2e3a46; }
.quiz-primary[hidden], .quiz-secondary[hidden] { display: none; }
.quiz-text-button { display: block; margin: 28px auto 0; border: 0; background: none; font: inherit; font-size: 16px; font-weight: 700; color: #5b6570; text-decoration: underline; cursor: pointer; }

.quiz-progress p { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: #6b7480; }
.quiz-progress-bar { height: 10px; border: 2px solid #2e3a46; border-radius: 999px; background: #fff; overflow: hidden; }
.quiz-progress-bar span { display: block; height: 100%; width: 0; background: #ffd84d; transition: width .25s ease; }
.quiz-scene { display: inline-block; margin: 22px 0 10px; padding: 4px 14px; border-radius: 999px; background: #2e3a46; color: #ffd84d; font-size: 14px; font-weight: 800; }
.quiz-prompt { font-size: 21px; line-height: 1.5; font-weight: 800; }
.quiz-line { margin: 12px 0 0; padding: 14px 18px; border-left: 6px solid #ffd84d; border-radius: 6px; background: #fff; font-size: 22px; font-weight: 700; }
.quiz-line[hidden] { display: none; }
.quiz-options { display: grid; gap: 12px; margin-top: 22px; }
.quiz-option {
  width: 100%; min-height: 58px; padding: 14px 18px; border: 2px solid #2e3a46; border-radius: 16px; background: #fff;
  font: inherit; font-size: 17px; line-height: 1.45; text-align: left; color: #2e3a46; cursor: pointer;
}
.quiz-option:hover:not(:disabled) { background: #fff7d6; }
.quiz-option:disabled { cursor: default; opacity: .55; }
.quiz-option.chosen { opacity: 1; background: #ffd84d; box-shadow: 0 4px 0 #2e3a46; }
.quiz-feedback { margin: 18px 0; }
.quiz-feedback[hidden] { display: none; }
.quiz-react { display: inline-block; margin: 0 0 10px; padding: 8px 16px; border: 2px solid #2e3a46; border-radius: 18px 18px 18px 4px; background: #fff; font-size: 17px; font-weight: 800; line-height: 1.5; animation: quiz-pop .25s ease-out; }
.quiz-tip { margin: 0; padding: 14px 18px; border-radius: 16px; background: #e6f2ea; font-size: 15px; line-height: 1.6; }
@keyframes quiz-pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .quiz-react { animation: none; } }
.quiz-play .quiz-primary { width: 100%; }

.quiz-result { text-align: center; }
.quiz-lead { margin: 10px 0 0; font-size: 18px; font-weight: 700; }
.quiz-days { margin-top: 4px; font-size: clamp(56px, 18vw, 96px); line-height: 1.1; font-weight: 900; color: var(--accent-deep); }
.quiz-title { display: inline-block; margin: 10px 0 0; padding: 8px 22px; border: 3px solid #2e3a46; border-radius: 10px; background: #ffd84d; font-size: 24px; font-weight: 900; transform: rotate(-1.5deg); }
.quiz-comment { margin: 20px 0 0; font-size: 17px; line-height: 1.7; text-align: left; }
.quiz-scenes { display: grid; gap: 10px; margin: 20px 0 0; padding: 16px 18px; border-radius: 16px; background: #fff; text-align: left; }
.quiz-scenes div { display: flex; gap: 12px; align-items: baseline; }
.quiz-scenes dt { flex: none; padding: 2px 10px; border-radius: 999px; color: #fff; font-size: 14px; font-weight: 800; }
.quiz-scenes div:first-child dt { background: #4e8f6a; }
.quiz-scenes div:last-child dt { background: var(--accent-deep); }
.quiz-scenes dd { margin: 0; font-size: 16px; line-height: 1.5; }
.quiz-phrase { margin-top: 20px; padding: 18px; border: 3px dashed #2e3a46; border-radius: 16px; }
.quiz-phrase p { margin: 0; }
.quiz-phrase-label { font-size: 14px; font-weight: 800; color: #6b7480; }
.quiz-phrase-en { margin-top: 6px !important; font-size: 24px; font-weight: 800; }
.quiz-phrase-zh { margin-top: 4px !important; color: #5b6570; }
.quiz-phrase-from { margin-top: 8px !important; font-size: 14px; color: #6b7480; }
.quiz-phrase-from[hidden] { display: none; }

.quiz-poster { margin: 28px 0 0; }
.quiz-poster img { width: min(100%, 420px); height: auto; margin: 0 auto; border-radius: 16px; box-shadow: 0 10px 30px rgba(46, 58, 70, .25); -webkit-touch-callout: default; }
.quiz-poster img[hidden], .quiz-poster-loading[hidden] { display: none; }
.quiz-poster-loading { margin: 0; padding: 60px 0; color: #6b7480; }
.quiz-poster figcaption { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; margin-top: 16px; }
.quiz-save-hint { font-size: 15px; font-weight: 700; color: #5b6570; }
.quiz-save-hint[hidden] { display: none; }

.quiz-desktop { margin-top: 32px; padding: 22px 20px; border-radius: 20px; background: #2e3a46; color: #fff; }
.quiz-desktop h3 { font-size: 21px; color: #ffd84d; }
.quiz-desktop p { margin: 10px 0 18px; font-size: 15px; line-height: 1.7; text-align: left; color: #e6e9ec; }
.quiz-desktop .quiz-primary { border-color: #fff; box-shadow: 0 5px 0 #11171d; }
.quiz-copy-status { margin: 14px 0 0 !important; word-break: break-all; color: #ffd84d !important; }
.quiz-copy-status[hidden], .quiz-copy-field[hidden] { display: none; }
.quiz-copy-field { width: 100%; margin-top: 10px; padding: 12px; border: 0; border-radius: 10px; font: inherit; font-size: 14px; color: #2e3a46; }

.quiz-site[hidden] { display: none; }
.quiz-credit { margin: 32px 0 0; font-size: 14px; font-weight: 700; color: #6b7480; }
.quiz-credit + .quiz-desktop { margin-top: 10px; }
.quiz-disclaimer { width: min(640px, calc(100% - 32px)); margin: 0 auto 24px; font-size: 13px; line-height: 1.6; color: #6b7480; text-align: center; }
.quiz-disclaimer a { text-decoration: underline; }
.quiz-page footer { flex-wrap: wrap; gap: 12px; padding: 20px 0 32px; }
.quiz-page footer nav { flex-wrap: wrap; gap: 14px 20px; }
