body[data-ui="game-2048"] .shell,body[data-ui="lights-out"] .shell{max-width:1080px;padding-bottom:64px}
body[data-ui="game-2048"] .intro,body[data-ui="lights-out"] .intro{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:18px}
body[data-ui="game-2048"] .intro h1,body[data-ui="lights-out"] .intro h1{font-size:clamp(34px,5vw,52px)}
.board-2048,.lights-board{width:min(100%,620px);margin:auto;user-select:none;-webkit-user-select:none}
.board-2048{position:relative;display:grid;grid-template-columns:repeat(4,1fr);gap:9px;aspect-ratio:1;padding:9px;border-radius:18px;background:#214b58;touch-action:none;box-shadow:0 10px 24px #24464045}.board-2048.is-moving>.tile-2048{opacity:0}.tile-flight-layer{position:absolute;inset:0;pointer-events:none;z-index:2}.tile-flight-layer .tile-2048{position:absolute;margin:0;transition:transform .17s ease-in-out}
.tile-2048{display:grid;place-items:center;min-width:0;border-radius:11px;background:#d9e4d8;color:#19343b;font-size:clamp(23px,5vw,52px);font-weight:1000;line-height:1;transition:background-color .18s,color .18s,transform .18s;box-shadow:inset 0 -4px #0002}
.tile-2048[data-value="0"]{background:#ffffff26;box-shadow:none}.tile-2048[data-value="2"]{background:#e7fae9}.tile-2048[data-value="4"]{background:#bdf1dc}.tile-2048[data-value="8"]{background:#86dce9}.tile-2048[data-value="16"]{background:#6fc5ef}.tile-2048[data-value="32"]{background:#746bd1;color:#fff}.tile-2048[data-value="64"]{background:#a85dc2;color:#fff}.tile-2048[data-value="128"]{background:#d9538d;color:#fff}.tile-2048[data-value="256"]{background:#f58c66}.tile-2048[data-value="512"]{background:#f6c454}.tile-2048[data-value="1024"]{background:#addd70}.tile-2048[data-value="2048"]{background:#ffe477;color:#302a20}.tile-2048[data-value="4096"]{background:#e69bec}.tile-2048[data-value="8192"]{background:#80dfba}.tile-2048[data-value="1024"],.tile-2048[data-value="2048"],.tile-2048[data-value="4096"],.tile-2048[data-value="8192"]{font-size:clamp(17px,3.5vw,36px)}
.tile-2048.new{animation:tile-pop .25s ease both}.tile-2048.merged{animation:tile-bounce .28s ease both}@keyframes tile-pop{from{transform:scale(.45);opacity:.2}to{transform:scale(1);opacity:1}}@keyframes tile-bounce{50%{transform:scale(1.12)}}
.direction-pad{display:grid;justify-content:center;gap:5px}.direction-pad>button{justify-self:center}.direction-pad>div{display:flex;gap:5px}.direction-pad button{width:46px;height:42px;border:1px solid #95c9bd;border-radius:11px;background:#dff6ed;color:#1b5b58;font-size:23px;font-weight:900;cursor:pointer}.direction-pad button:hover{background:#2fc6bd}
.lights-board{display:grid;grid-template-columns:repeat(var(--size),1fr);gap:8px;aspect-ratio:1;padding:12px;border:9px solid #174d58;border-radius:21px;background:repeating-linear-gradient(135deg,#123f49,#123f49 12px,#164a54 12px,#164a54 24px);box-shadow:0 10px 24px #24464045}.lights-board.completed{animation:board-clear .6s ease}@keyframes board-clear{50%{box-shadow:0 0 0 8px #8fe9c7,0 0 42px #8fe9c7}}.light-cell{display:grid;place-items:center;min-width:0;min-height:0;border:2px solid #416d72;border-radius:16px;background:#214d56;cursor:pointer;transition:background-color .23s,border-color .23s,box-shadow .23s,transform .17s}.light-cell span{display:block;width:55%;aspect-ratio:1;border-radius:50%;background:#50737a;box-shadow:inset 0 4px 8px #092d36b0;transition:background-color .23s,box-shadow .23s,transform .23s}.light-cell[data-on="true"]{background:#2d837f;border-color:#8ce5c8;box-shadow:0 0 18px #69dfb970}.light-cell[data-on="true"] span{background:#fff2ac;box-shadow:0 0 15px 5px #ffe790,0 0 32px 9px #e9cc5b80,inset 0 -3px 4px #e39f5680;transform:scale(1.12)}.light-cell:active{transform:scale(.94)}.light-cell:focus-visible{outline:3px solid #f052a0;outline-offset:2px}.little-light{display:block;width:25px;height:25px;border-radius:50%;background:#fff2a5;box-shadow:0 0 0 6px #287b78,0 0 18px #f7d964}
.lights-shell{position:relative;width:min(100%,620px);margin:auto}.lights-board{width:100%;background:#123c47}.lights-start{position:absolute;inset:0;display:grid;align-content:center;justify-items:center;gap:16px;padding:28px;border-radius:20px;background:#102e37de;color:#fffdf8;text-align:center}.lights-start[hidden]{display:none}.lights-start p{max-width:34ch;margin:0;color:#fffdf8;font-size:clamp(17px,3vw,23px);font-weight:900;line-height:1.35}.lights-start button{min-width:150px;min-height:50px;padding:10px 22px;border:0;border-radius:11px;background:#2fc6bd;color:#172f35;font:1000 17px 'Nunito Sans',sans-serif;cursor:pointer}.lights-start button:hover{background:#81eee1}.lights-start button:focus-visible,.direction-pad button:focus-visible{outline:3px solid #ffe477;outline-offset:3px}body[data-ui="lights-out"] .level-picker{max-width:100%;overflow-x:auto}
@media(max-width:720px){body[data-ui="game-2048"] .intro,body[data-ui="lights-out"] .intro{display:block}.direction-pad{grid-column:1/-1}.lights-board{gap:5px;padding:8px}}
@media(max-width:520px){body[data-ui="game-2048"] .shell,body[data-ui="lights-out"] .shell{width:min(100% - 20px,1080px);padding-top:16px}.tile-2048{font-size:clamp(19px,7vw,40px)}.board-2048{gap:5px;padding:5px}.lights-board{border-width:6px;gap:4px}.light-cell{border-radius:9px}}
@media(prefers-reduced-motion:reduce){.tile-2048,.light-cell,.light-cell span,.lights-board{animation:none!important;transition:none!important}}
body[data-ui="game-2048"] .home .mark{overflow:hidden;background:#214b58}
body[data-ui="game-2048"] .home .mark img{display:block;width:100%;height:100%;object-fit:cover}
