.g2-board { --n: 4; --gap: clamp(8px, 2.4vw, 14px); position: relative; width: min(100%, 480px); aspect-ratio: 1; margin: 8px auto 0; padding: var(--gap); background: #0a3d33; border-radius: 16px; box-shadow: var(--shadow-lg); touch-action: none; user-select: none; -webkit-user-select: none; outline: none; }
.g2-bg { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); width: 100%; height: 100%; }
.g2-bg span { border-radius: 10px; background: rgba(255,255,255,.08); }
.g2-tiles { position: absolute; inset: var(--gap); }
.g2-tile { --size: calc((100% - 3 * var(--gap)) / 4); position: absolute; width: var(--size); height: var(--size); left: calc(var(--x) * (var(--size) + var(--gap))); top: calc(var(--y) * (var(--size) + var(--gap))); transition: left .11s ease, top .11s ease; z-index: 1; }
.g2-tile span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 10px; font: 800 clamp(1.4rem, 7vw, 2.6rem)/1 var(--font-display); background: #eee6d2; color: #3b3326; letter-spacing: -0.03em; }
.g2-tile.new span { animation: g2-in .16s ease .1s backwards; }
.g2-tile.merged { z-index: 2; }
.g2-tile.merged span { animation: g2-pop .18s ease .08s; }
.g2-tile.gone { z-index: 0; }
@keyframes g2-in { from { transform: scale(0); } }
@keyframes g2-pop { 50% { transform: scale(1.14); } }
.g2-tile[data-v="4"] span { background: #e8d9b0; }
.g2-tile[data-v="8"] span { background: #f2b179; color: #fff; }
.g2-tile[data-v="16"] span { background: #f59563; color: #fff; }
.g2-tile[data-v="32"] span { background: #f67c5f; color: #fff; }
.g2-tile[data-v="64"] span { background: #e5533b; color: #fff; }
.g2-tile[data-v="128"] span { background: #6fc3a8; color: #fff; font-size: clamp(1.2rem, 6vw, 2.2rem); }
.g2-tile[data-v="256"] span { background: #3fa688; color: #fff; font-size: clamp(1.2rem, 6vw, 2.2rem); }
.g2-tile[data-v="512"] span { background: #1d8a6c; color: #fff; font-size: clamp(1.2rem, 6vw, 2.2rem); }
.g2-tile[data-v="1024"] span { background: #e3c25a; color: #2a2000; font-size: clamp(1rem, 5vw, 1.8rem); }
.g2-tile[data-v="2048"] span { background: #c9a227; color: #fff; font-size: clamp(1rem, 5vw, 1.8rem); box-shadow: 0 0 20px rgba(201,162,39,.7); }
.g2-tile[data-v="big"] span { background: #16181d; color: #f1dd8e; font-size: clamp(.9rem, 4.4vw, 1.6rem); }
@media (prefers-reduced-motion: reduce) { .g2-tile { transition: none; } .g2-tile span { animation: none !important; } }
