:root { --burgundy: #6b1d2a; --gold: #d4a843; --cream: #faf6f0; --tan: #d0c4b8; --ink: #1a1a1a; }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: Georgia, "Times New Roman", serif; line-height: 1.6; }
a { color: var(--burgundy); }
.top { display: flex; justify-content: space-between; gap: 1rem; background: var(--burgundy); padding: 0.75rem 1.25rem; font-family: -apple-system, "Segoe UI", Roboto, sans-serif; }
.top a { color: #f3ece0; text-decoration: none; font-weight: 600; }
.top a:hover { color: var(--gold); }
.page { max-width: 880px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
h1 { color: var(--burgundy); margin: 0.5rem 0; }
h2, h3 { color: var(--burgundy); }
.lede { font-size: 1.05rem; }
.notice { background: #fff; border-left: 4px solid var(--gold); padding: 0.75rem 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.btn { background: var(--burgundy); color: #fff; border: 2px solid var(--burgundy); border-radius: 999px; padding: 0.7rem 2rem; font-size: 1.1rem; font-weight: 700; cursor: pointer; font-family: -apple-system, "Segoe UI", Roboto, sans-serif; }
.btn:hover:not(:disabled) { background: #8a2a3a; border-color: var(--gold); }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn--small { padding: 0.3rem 0.9rem; font-size: 0.85rem; background: #fff; color: #444; border-color: #888; }
.btn--small:hover:not(:disabled) { background: #f0ece5; border-color: #444; }

.wheel { text-align: center; margin: 1.5rem 0; }
.wheel__window { position: relative; overflow: hidden; width: 100%; height: 190px; background: #fff; border: 2px solid var(--tan); border-radius: 12px; margin-bottom: 1rem; }
.wheel__pointer { position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; margin-left: -2px; background: var(--gold); z-index: 2; box-shadow: 0 0 0 1px var(--burgundy); }
.wheel__track { position: absolute; top: 15px; left: 0; display: flex; gap: 14px; will-change: transform; }
.card { flex: 0 0 150px; height: 160px; border-radius: 10px; background: var(--burgundy); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 4rem; font-weight: 700; border: 3px solid var(--gold); overflow: hidden; }
.card--landed { background: #fff; color: var(--burgundy); border-color: var(--burgundy); }
.card--landed img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card--landed .card__video { font-size: 2.2rem; }
.card--flip { animation: flip 0.5s ease; }
@keyframes flip { from { transform: rotateY(90deg); } to { transform: rotateY(0); } }

.work { background: #fff; border: 1px solid var(--tan); border-radius: 10px; padding: 1rem; margin: 1.5rem 0; }
.work__media img { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; }
.work__video { position: relative; height: 0; padding-bottom: 56.25%; }
.work__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.work__missing { text-align: center; color: #666; padding: 1.5rem 0; }
.quiz__options { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.quiz__options button { width: 100%; text-align: left; padding: 0.7rem 1rem; border: 2px solid var(--tan); border-radius: 8px; background: var(--cream); font-size: 1rem; font-family: inherit; cursor: pointer; color: var(--ink); }
.quiz__options button:hover:not(:disabled) { border-color: var(--gold); }
.quiz__options button:focus-visible { outline: 3px solid var(--burgundy); outline-offset: 2px; }
.quiz__options button.is-right { border-color: #2d6a4f; background: #ecfdf5; }
.quiz__options button.is-wrong { border-color: #b42318; background: #fef2f2; }
.reveal { border-top: 2px solid var(--tan); margin-top: 1rem; padding-top: 1rem; }
.reveal__verdict { font-weight: 700; }
.reveal__title { margin: 0.2rem 0; }
.reveal__meta { margin: 0; color: #555; }
.reveal__credit { font-size: 0.85rem; color: #666; }

.history { margin-top: 2rem; }
.history__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.history__empty { color: #666; }
.history__list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }
.history__list button { width: 100%; text-align: left; background: #fff; border: 1px solid var(--tan); border-radius: 8px; padding: 0.4rem; cursor: pointer; font-family: inherit; color: var(--ink); }
.history__list button:hover { border-color: var(--gold); }
.history__list button:focus-visible { outline: 3px solid var(--burgundy); }
.history__list .thumb { height: 90px; display: flex; align-items: center; justify-content: center; background: var(--cream); font-size: 1.6rem; margin-bottom: 0.3rem; overflow: hidden; }
.history__list .thumb img { width: 100%; height: 100%; object-fit: cover; }
.history__list .name { font-size: 0.85rem; line-height: 1.3; display: block; }

@media (prefers-reduced-motion: reduce) { .card--flip { animation: none; } .wheel__track { transition: none !important; } }
@media (max-width: 480px) { .card { flex-basis: 120px; height: 130px; font-size: 3rem; } .wheel__window { height: 160px; } }
