:root { color-scheme: light; font: 1rem/1.5 system-ui, sans-serif; color: #322144; background: #f7f0fb; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { max-width: 800px; padding: 1rem 1rem 3rem; margin: auto; }
nav, header, .modes, .controls { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
nav { justify-content: space-between; }
a { color: #633283; text-underline-offset: .2em; }
header { margin: 1rem 0; }
header img { width: 3.5rem; height: 3.5rem; object-fit: contain; }
h1, h2 { font-family: Georgia, serif; margin: 0; }
h1 { font-size: clamp(2rem, 6vw, 3rem); }
section { margin-top: 1rem; padding: clamp(.8rem, 3vw, 1.6rem); background: #fffdf9; border: 1px solid #dbc8e9; border-radius: 1rem; }
section p { margin: .55rem 0 .85rem; }
button, select { font: inherit; min-height: 44px; border: 2px solid #74458b; border-radius: .65rem; padding: .45rem .7rem; }
button { background: #69398a; color: white; font-weight: 650; cursor: pointer; }
.modes button[aria-pressed="true"], .call { background: #ffe177; color: #39244a; }
button:disabled { opacity: .7; cursor: default; }
:focus-visible { outline: 3px solid #a43b16; outline-offset: 3px; }
.status { min-height: 1.5em; font-weight: 600; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.35rem, 2vw, .8rem); max-width: 520px; }
.card { padding: 0; display: grid; place-items: center; overflow: hidden; aspect-ratio: 5/6; }
.card img { width: 100%; height: 100%; object-fit: cover; }
.card[aria-disabled="true"] { cursor: default; }
.card.matched { border-color: #74458b; box-shadow: inset 0 0 0 3px #f8db61; }
.card.matched img { opacity: .67; }
.back { background: #69398a; color: #ffe177; font-size: clamp(1.2rem, 6vw, 2rem); }
.snap-cards, .scores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; max-width: 400px; }
.snap-cards figure { margin: 0; text-align: center; }
.snap-cards .card { max-width: 140px; margin: .3rem auto 0; border: 2px solid #74458b; border-radius: .65rem; }
.scores button { width: 100%; }
