*{box-sizing:border-box}html,body{height:100%;margin:0;background:#101014;color:#fafafa;font-family:"Segoe UI",Arial,sans-serif}body{display:grid;place-items:center;touch-action:manipulation}main{width:min(96vw,650px);max-height:100%;padding:12px;display:flex;flex-direction:column;gap:12px}header{display:flex;align-items:center;justify-content:space-between;gap:12px}h1{font-size:clamp(19px,4vw,28px);margin:0 0 7px}p{margin:0;color:#a4a4b0;font-size:13px}button{cursor:pointer;touch-action:manipulation;font:600 14px "Segoe UI",sans-serif}button:focus-visible{outline:3px solid #fff;outline-offset:3px}#restart{border:1px solid #ffffff30;color:white;background:#29292f;padding:12px;border-radius:9px;white-space:nowrap}#board{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;width:min(100%,calc(100vh - 140px));align-self:center}.card{aspect-ratio:1;border-radius:13px;border:1px solid #ff6770;background:linear-gradient(135deg,#e10d24,#970b20);display:grid;place-items:center;color:#fff;font-size:clamp(22px,8vw,42px);box-shadow:inset 0 0 0 4px #ffffff08;transition:background .16s,transform .16s}.card:active{transform:scale(.96)}.card.revealed,.card.matched{background:#f5efe5;border-color:#fff;color:#222}.card.matched{opacity:.55;cursor:default}.card svg{width:55%;height:55%;fill:currentColor;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}#result{text-align:center;min-height:20px}@media(max-height:440px){main{width:min(96vw,850px)}#board{grid-template-columns:repeat(8,1fr);width:min(100%,calc((100vh - 125px)*4))}.card{border-radius:8px}header h1{font-size:19px}main{gap:8px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}
