/* CCN Casual Games · Doubles · © Computational Classnotes · CC BY-NC-SA 4.0 */
#board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; background: #d9cbb9; padding: 8px; border-radius: 14px; max-width: 460px; margin: 10px 0; touch-action: none; user-select: none; -webkit-user-select: none; }
#board div { aspect-ratio: 1; border-radius: 10px; background: #efe3d4; display: grid; place-items: center; font: 800 clamp(18px, 7vw, 38px) var(--head); color: var(--ink); }
#board div.t2 { background: #fff7ee; } #board div.t4 { background: #ffe9cc; } #board div.t8 { background: #ffd09a; } #board div.t16 { background: #ffb366; }
#board div.t32 { background: #fa8f2b; } #board div.t64 { background: #e46c0b; color: #fff; } #board div.t128 { background: #ffd166; } #board div.t256 { background: #f5c242; }
#board div.t512 { background: #7bd389; } #board div.t1024 { background: #5ec2d6; font-size: clamp(14px, 5.5vw, 30px); } #board div.t2048 { background: #17202b; color: #ffd3a8; font-size: clamp(14px, 5.5vw, 30px); }
#board div.big { background: #6d28d9; color: #fff; font-size: clamp(12px, 4.5vw, 26px); }
#board div.new { animation: pop 0.18s ease; } @keyframes pop { from { transform: scale(0.6); } to { transform: scale(1); } }
.hud { gap: 8px; } .hud h2 { margin-right: auto; } .score { font: 700 2rem var(--head); }
#pad { display: grid; grid-template-columns: repeat(3, 64px); grid-template-rows: repeat(3, 56px); gap: 6px; margin: 8px 0; }
#pad button { justify-content: center; font-size: 1.3rem; background: var(--soft); }
#board { touch-action: none; }
