:root{--bg:#fff;--text:#121212;--muted:#5a5a5a;--tile:#efefe6;--tile-selected:#5a594e;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}*,:before,:after{box-sizing:border-box}body{min-height:100vh;margin:0}button{-webkit-tap-highlight-color:transparent;font-family:inherit}.game{flex-direction:column;align-items:center;gap:12px;width:100%;max-width:560px;margin:0 auto;padding:24px 12px 40px;display:flex}header{text-align:center}.title{margin:0;padding-top:.35em;font-family:Abril Fatface,Georgia,serif;font-size:clamp(2.6rem,11vw,3.6rem);font-weight:400;line-height:1;display:inline-block;position:relative}.doodle{pointer-events:none;transform-origin:0 .5em;font-family:Gochi Hand,cursive;font-size:.5em;animation:3.6s ease-in-out infinite alternate bob;position:absolute;inset:0}.doodle span{transform:rotate(var(--tilt));display:inline-block;position:absolute}.doodle-f{--tilt:-12deg;color:#2a9fd6;top:.35em;left:-.55em}.doodle-plus{--tilt:-16deg;color:var(--text);font-size:.75em;top:.05em;left:-.05em}.doodle-h{--tilt:-12deg;color:#f29ad8;top:-.35em;left:.35em}@keyframes bob{0%{transform:translate(0)rotate(0)}33%{transform:translate(2px,-4px)rotate(2deg)}66%{transform:translate(-2px,-2px)rotate(-1.5deg)}to{transform:translate(1px,-5px)rotate(1deg)}}@media (prefers-reduced-motion:reduce){.doodle{animation:none}}.subtitle{color:var(--muted);margin:4px 0 0}.toast{align-items:center;height:36px;display:flex}.toast span{background:var(--text);color:var(--bg);border-radius:6px;padding:6px 14px;font-weight:600}.board{grid-template-columns:repeat(4,1fr);gap:8px;width:100%;display:grid}.tile{aspect-ratio:4/3;background:var(--tile);color:var(--text);text-transform:uppercase;cursor:pointer;overflow-wrap:anywhere;border:none;border-radius:8px;padding:4px;font-size:clamp(.7rem,3.4vw,1.05rem);font-weight:700;transition:background .15s,transform .1s}.tile:active{transform:scale(.96)}.tile.selected{background:var(--tile-selected);color:#fff}.tile.shake{animation:.4s shake}.solved-group{color:#000;text-transform:uppercase;border-radius:8px;flex-direction:column;grid-column:1/-1;justify-content:center;align-items:center;gap:2px;min-height:72px;animation:.35s ease-out reveal;display:flex}.solved-group strong{font-size:1rem}.solved-group span{font-size:.9rem}.difficulty-1{background:#f9df6d}.difficulty-2{background:#a0c35a}.difficulty-3{background:#b0c4ef}.difficulty-4{background:#ba81c5}.attempts{color:var(--muted);margin:0}.controls{flex-wrap:wrap;justify-content:center;gap:10px;display:flex}.controls button{border:1px solid var(--text);color:var(--text);cursor:pointer;background:0 0;border-radius:999px;padding:12px 20px;font-weight:600}.controls button:disabled{opacity:.4;cursor:default}.controls button.primary:not(:disabled){background:var(--text);color:var(--bg)}.complete{text-align:center}.complete h2{margin:0}@keyframes shake{0%,to{transform:translate(0)}20%,60%{transform:translate(-5px)}40%,80%{transform:translate(5px)}}@keyframes reveal{0%{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}
