/* Gameplay layout: the board receives the space left after real controls. */
body:not([data-state=ready]) .shell{max-width:1040px;padding:10px 14px 18px;display:block;min-height:0;height:auto}body:not([data-state=ready]) .lobby-utilities{display:none}
body:not([data-state=ready]) .game{width:100%;max-width:100%;height:calc(100svh - 28px);min-height:580px;max-height:1000px;display:grid;grid-template-rows:auto auto auto auto minmax(0,1fr) auto auto;gap:7px;align-items:stretch;margin:0;padding:0;justify-content:normal}
.game-heading,.stats,.timer-track,.board-toolbar,.selection-info,.tools{width:100%;max-width:none!important;margin:0!important;box-sizing:border-box}.game-heading{min-height:37px}.game-heading>div{min-width:0}.game-heading h2{font-size:18px;white-space:nowrap}.game-heading small{font-size:8px}.stats{padding:6px 14px 5px;border-radius:17px;box-shadow:0 3px 0 #a9ccd6}.stats strong{font-size:27px;line-height:1.15}.stats span{font-size:10px}.timer-track{height:6px}.board-toolbar{min-height:33px;font-size:11px}.board-toolbar #hint{padding:5px 10px;min-height:32px}.target-badge{padding:3px 8px}.board-stage{min-height:0;min-width:0;display:flex;align-items:center;justify-content:center;padding:2px 0 7px}
.game .board-wrap{width:var(--fitted-width,300px);height:var(--fitted-height,480px);max-width:none;max-height:none;flex-shrink:0;margin:0;border:3px solid #f6ffff;border-radius:18px;overflow:hidden;aspect-ratio:auto;box-shadow:inset 0 2px 6px #478e9b20,0 4px 0 #93becd,0 8px 15px #417f9618}
.game #board{position:relative;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:5px;gap:3px;aspect-ratio:auto;grid-template-columns:repeat(var(--columns,10),minmax(0,1fr));grid-template-rows:repeat(var(--rows,16),minmax(0,1fr));contain:layout style}
.game .cell{font:700 var(--tile-font,18px)/1 Jua,'Segoe UI',sans-serif;aspect-ratio:auto;transform:none!important;transition:none!important;box-shadow:none!important;border-radius:6px}.game .cell::before{transition:none;transform:none!important}.game .cell.selected{background:#7ca7ff26}.game .cell.selected.valid{background:#35d7b526;box-shadow:none!important;z-index:0}.game .cell.hinted{box-shadow:inset 0 0 0 2px #9c8adc!important;background:#eee8ff}
#drag-frame{position:absolute;pointer-events:none;z-index:3;border:2px solid #7995d7;background:#7ea4e515;border-radius:9px;will-change:transform,width,height;box-sizing:border-box;transition:border-color .08s,background .08s}#drag-frame[hidden]{display:none}#drag-frame.valid{border-color:#11a78c;background:#5de2bb20;box-shadow:0 0 0 2px #ffffff66,0 0 14px #2ee0be55}
.selection-info{min-height:36px;font-size:11px}.sum-pill{padding:3px 9px;font-size:11px;box-shadow:0 2px 0 #b1ced9}.sum-pill b{font-size:20px}.tools{padding:0;gap:8px}.tools button{padding:7px 5px;font-size:12px;min-height:34px}.game .keyboard{display:none!important}.cover{gap:3px}.cover h2{font-size:20px}.cover p{font-size:12px}.cover-symbol{width:54px;height:54px;font-size:28px}.cover .primary{padding:9px 20px}.result-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:10px}.result-actions button,.utility-button{background:#f8ffff;border:2px solid white;border-radius:12px;box-shadow:0 3px 0 #b6d1de;color:#35758a;padding:9px 12px;font:600 12px 'Segoe UI','Malgun Gothic',sans-serif}.result-actions[hidden]{display:none}.cover-links{display:flex;gap:12px;align-items:center;justify-content:center;flex-wrap:wrap;margin-top:10px}.cover-links .secondary{margin:0}.portal-link{color:#3f7287;font-size:12px;text-decoration:none;padding:7px 0}.lobby-utilities{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:24px 0 8px}.record-note{font-size:11px;color:#6c889a;text-align:center;line-height:1.6}dialog{max-width:420px;width:calc(100% - 28px);max-height:85svh;overflow:auto;border:2px solid white;border-radius:20px;background:#f4fcff;color:#285667;padding:22px;box-shadow:0 10px 35px #28566730}dialog::backdrop{background:#173e4970;backdrop-filter:blur(4px)}.dialog-top{display:flex;justify-content:space-between;align-items:center;gap:12px}.dialog-top h2{font-size:20px;margin:0}.dialog-top button{background:none;font-size:25px}.record-row{padding:13px 0;border-bottom:1px solid #d5e8f0;display:flex;gap:12px;justify-content:space-between;align-items:center}.record-row strong{font-size:25px;color:#168f94}.record-row span{display:grid;gap:4px;font-size:12px}.record-row small{font-size:10px;color:#718897}.record-actions{display:flex;gap:8px;justify-content:center;margin-top:16px}#share-text{width:100%;min-height:130px;padding:12px;border:1px solid #c5dce7;border-radius:10px;background:white;font:14px/1.7 'Segoe UI',sans-serif;color:#285667}.toast{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);padding:11px 18px;background:#204c5eed;border-radius:14px;color:#fff;font-size:12px;max-width:90vw;text-align:center;z-index:100;pointer-events:none}.toast[hidden]{display:none}
.pop-jelly{position:absolute;display:grid;place-items:center;border-radius:48% 48% 44% 16%;background:linear-gradient(145deg,#d2fff1,#62d6c4);border:1px solid white;box-shadow:inset 0 2px #ffffffb0,0 2px 0 #46a997;color:#14665f;font:700 var(--tile-font,18px)/1 Jua,sans-serif;animation:jelly-burst .24s cubic-bezier(.2,.8,.2,1) both;pointer-events:none}@keyframes jelly-burst{0%{transform:scale(1);opacity:1}35%{transform:scale(1.25,.85);opacity:1}100%{transform:scale(.05);opacity:0}}.pop-flash{animation-duration:.22s;box-shadow:inset 0 0 24px #5decd5;background:#7cf3dc10}.pop-wave{animation-duration:.35s}.pop-star{font-size:23px}.burst-drop{animation-duration:.38s}.game .board-wrap.impact{animation:impact .14s ease-out}@keyframes impact{30%{translate:0 1.5px}65%{translate:0 -1px}}
@media(min-width:900px){body:not([data-state=ready]) .game{max-width:940px;margin:auto;min-height:580px;height:min(940px,calc(100svh - 28px))}.game-heading h2{font-size:22px}.game .stats{padding:8px 25px}.stats strong{font-size:32px}}
@media(max-width:480px){body:not([data-state=ready]) .shell{padding:7px 10px 14px}body:not([data-state=ready]) .game{height:calc(100svh - 18px);min-height:570px;gap:5px}.board-toolbar>span:nth-child(2){font-size:10px}.game-heading h2{font-size:17px}.game-heading small{display:none}.game-heading .icon{height:32px;min-width:32px;width:32px}.stats{padding:4px 12px}.stats strong{font-size:24px}.stats span{font-size:9px}.cover h2{font-size:18px}.site-header nav{gap:5px}}
@media(orientation:landscape) and (max-height:600px){body:not([data-state=ready]) .game{min-height:400px;height:calc(100svh - 16px);gap:4px}.game-heading small{display:none}.game-heading{min-height:30px}.game-heading .icon{height:29px;width:32px;min-width:32px}.game .stats{padding:3px 18px}.stats strong{font-size:22px}.stats span{font-size:9px}.board-toolbar{min-height:29px}#hint{min-height:28px!important}.tools button{min-height:28px;padding:4px}.cover-symbol{display:none}.cover h2{font-size:17px}.cover p{margin:2px 0 5px}.cover .primary{padding:5px 15px}.result-actions{margin-top:5px}.cover-links{margin-top:4px}}
@media(prefers-reduced-motion:reduce){.pop-jelly{display:none}.game .board-wrap.impact{animation:none!important}}
/* Pointed glass drops: the number stays upright while the silhouette turns. */
.game .cell::before{border-radius:4% 55% 52% 55%;inset:12% 13% 10%;transform:rotate(45deg)!important;background:radial-gradient(ellipse at 25% 20%,#ffffffdf 0,transparent 27%),linear-gradient(140deg,var(--jelly-top),var(--jelly-bottom));box-shadow:inset 2px 2px 3px #ffffffc0,inset -2px -2px 3px #248e9630,1px 2px 2px #207c841c}.game .cell::after{width:12%;height:20%;top:25%;left:23%;transform:rotate(26deg);opacity:.9}.game .cell{padding-top:12%;color:#075e6b;text-shadow:0 1px #e9ffff}.game .cell[data-value="1"],.game .cell[data-value="2"],.game .cell[data-value="3"]{--jelly-top:#cbfaff;--jelly-bottom:#7ccee5;--jelly-edge:#56b7ce}.game .cell[data-value="7"],.game .cell[data-value="8"],.game .cell[data-value="9"]{--jelly-top:#bfffea;--jelly-bottom:#75d8ba;--jelly-edge:#50b79b}
.merging-drop,.merged-ten{position:absolute;display:grid;place-items:center;isolation:isolate;color:#075e6b;font:700 var(--tile-font,18px)/1 Jua,sans-serif;font-style:normal;padding-top:7%;text-shadow:0 1px #e9ffff}.merging-drop::before,.merged-ten::before{content:'';position:absolute;z-index:-1;inset:12%;border-radius:4% 55% 52% 55%;transform:rotate(45deg);border:1px solid #69c8c5;background:radial-gradient(ellipse at 25% 20%,white,transparent 30%),linear-gradient(140deg,#ccfff4,#5ccabd);box-shadow:inset 2px 2px 3px white,inset -2px -2px 3px #248e9630}.merging-drop{animation:merge-in .22s cubic-bezier(.35,0,.8,.7) both;padding-top:0}.merged-ten{width:64px;height:68px;padding-top:7px;font-size:27px;animation:ten-pop .38s .12s cubic-bezier(.2,.8,.2,1) both;filter:drop-shadow(0 0 8px #73f2e9)}@keyframes merge-in{0%{opacity:1;transform:translate(0,0) scale(1)}35%{opacity:1;scale:1.1}100%{opacity:0;transform:translate(var(--merge-x),var(--merge-y)) scale(.3)}}@keyframes ten-pop{0%{opacity:0;transform:translate(-50%,-50%) scale(.25)}25%{opacity:1;transform:translate(-50%,-50%) scale(1.02)}48%{opacity:1;transform:translate(-50%,-50%) scale(1.23,.95)}70%{opacity:1;transform:translate(-50%,-50%) scale(.95,1.12)}100%{opacity:0;transform:translate(-50%,-50%) scale(1.5)}}#pop-feedback.pop{animation-delay:280ms}.jelly-mascot{border-radius:8% 56% 52% 56%;rotate:45deg}.jelly-mascot .jelly-eyes{rotate:-45deg;left:40px;top:38px}.jelly-mascot .jelly-smile{rotate:-45deg;left:63px;top:65px}.jelly-mascot .jelly-cheeks{rotate:-45deg;left:29px;top:54px}.jelly-mascot .jelly-plus{rotate:-30deg}.jelly-mascot .jelly-shine{left:18px;top:21px;rotate:0deg}
@media(prefers-reduced-motion:reduce){.merging-drop,.merged-ten{display:none!important}}
[hidden]{display:none!important}#drag-frame{left:0;top:0}.game .board-wrap.impact{animation:none}.cover-symbol[hidden]{display:none!important}
@media(orientation:landscape) and (max-height:600px) and (min-width:700px){body:not([data-state=ready]) .game{height:calc(100svh - 24px);min-height:300px;grid-template-columns:160px minmax(0,1fr);grid-template-rows:auto auto auto auto 1fr auto auto;column-gap:15px}.game .board-stage{grid-column:2;grid-row:1 / 8;padding:2px 0 7px}.game-heading,.stats,.timer-track,.board-toolbar,.selection-info,.tools{grid-column:1}.game-heading>div{display:none}.game-heading{justify-content:space-between}.game-heading .icon{min-width:34px}.game .stats{padding:6px 3px}.game .stats>div{min-width:0;padding:0 2px}.game .stats strong{font-size:19px}.game .stats span{font-size:8px}.game .stats small{font-size:9px}.board-toolbar>span:nth-child(2){display:none}.target-badge{padding:3px 6px;font-size:10px}.target-badge b{font-size:15px}.board-toolbar{gap:5px}.game .selection-info{justify-content:center;flex-direction:column;font-size:10px;text-align:center;gap:7px}.tools{display:grid;grid-template-columns:1fr;gap:6px}.tools button{font-size:10px}.cover .result-score{font-size:46px}}
#drag-frame{transition:transform 45ms linear,width 45ms linear,height 45ms linear,border-color .08s,background .08s}
