:root {
  color-scheme: dark;
  --bg: #1a1a2e;
  --card: #16213e;
  --accent: #e94560;
  --text: #eee;
  --muted: #b9bed0;
  --line: rgba(238, 238, 238, 0.15);
  --success: #8ed081;
}

* { box-sizing: border-box; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  background: radial-gradient(circle at 50% 0%, #26385b 0, var(--bg) 52%);
}

button { font: inherit; }

.museum { width: min(100% - 2rem, 720px); margin: 0 auto; padding: 3.5rem 0 4rem; }
.masthead { text-align: center; margin-bottom: 2rem; }
.eyebrow, .question-type { margin: 0 0 .5rem; color: var(--accent); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
h1, h2 { font-family: "Cormorant Garamond", Georgia, serif; }
h1 { margin: 0; font-size: clamp(3.5rem, 16vw, 6.5rem); line-height: .8; letter-spacing: -.06em; }
h1 span { color: var(--accent); }
.subtitle { margin: .85rem 0 0; color: var(--muted); font-size: .9rem; }
.game-modes { display: flex; justify-content: center; gap: .5rem; margin-top: 1.2rem; }
.mode-button { padding: .5rem .75rem; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: rgba(10, 17, 37, .32); cursor: pointer; }
.mode-button[aria-pressed="true"] { border-color: var(--accent); color: white; background: rgba(233, 69, 96, .18); }

.quiz-card, .results {
  padding: clamp(1.35rem, 5vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: linear-gradient(145deg, rgba(31, 48, 83, .95), var(--card));
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .25);
}
.quiz-meta { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .8rem; font-weight: 700; }
.progress-track { height: .35rem; margin: .85rem 0 2.2rem; overflow: hidden; border-radius: 99px; background: rgba(238,238,238,.12); }
.progress-fill { width: 6.666%; height: 100%; border-radius: inherit; background: var(--accent); transition: width .45s ease; }
.artwork-frame { margin: 0 0 1.45rem; overflow: hidden; border: 1px solid var(--line); border-radius: .85rem; background: rgba(0,0,0,.22); }
.artwork-stage { aspect-ratio: 16 / 9; min-height: 180px; background: #0d1020; }
.artwork-frame img { display: block; width: 100%; height: 100%; object-fit: contain; background: #0d1020; }
.artwork-frame figcaption { display: flex; justify-content: space-between; gap: .75rem; padding: .65rem .8rem; color: var(--muted); font-size: .76rem; }
.artwork-frame figcaption span:first-child { color: var(--text); font-weight: 700; }
.question-type { min-height: 1em; }
.quiz-card h2 { margin: 0 0 1.5rem; font-size: clamp(1.7rem, 7vw, 2.55rem); line-height: 1.05; }
.answers { display: grid; gap: .75rem; }
.answer-button, .next-button, .restart-button { cursor: pointer; border-radius: .7rem; transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease; }
.answer-button { width: 100%; padding: 1rem 1.1rem; border: 1px solid var(--line); color: var(--text); text-align: left; background: rgba(10, 17, 37, .42); }
.answer-button:hover:not(:disabled), .answer-button:focus-visible { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 .45rem 1.25rem rgba(0,0,0,.18); }
.answer-button:disabled { cursor: default; }
.answer-button.correct { border-color: var(--success); color: #e4ffdd; background: rgba(77, 150, 85, .28); }
.answer-button.incorrect { border-color: var(--accent); color: #ffdfe4; background: rgba(233, 69, 96, .2); }
.explanation { margin-top: 1.5rem; padding: 1.15rem; border-left: 3px solid var(--accent); border-radius: 0 .6rem .6rem 0; background: rgba(0, 0, 0, .18); animation: reveal .3s ease both; }
.explanation p { margin: 0; color: var(--muted); line-height: 1.55; }
.explanation .verdict { margin-bottom: .45rem; color: var(--text); font-weight: 700; }
.next-button, .restart-button { margin-top: 1.1rem; padding: .75rem 1rem; border: 1px solid var(--accent); color: white; font-weight: 700; background: var(--accent); }
.next-button:hover, .restart-button:hover, .next-button:focus-visible, .restart-button:focus-visible { transform: translateY(-2px); background: #f45b73; }
.results { text-align: center; }
.results h2 { margin: .2rem 0 .7rem; font-size: clamp(2rem, 10vw, 3.4rem); }
.results h2 span { color: var(--accent); }
.results p:not(.eyebrow) { color: var(--muted); line-height: 1.5; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@keyframes reveal { from { opacity: 0; transform: translateY(.5rem); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 600px) { .museum { padding-top: 5rem; } .answers { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
