
#splash-game {padding:20px 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#0f172a}
#splash-game * {box-sizing:border-box}
#splash-game [hidden] {display:none!important}
#splash-game .js-game {--ink:#0f172a;--page:#f0faff;--surface:#fff;--muted:#536879;--edge:#d4e9f3;--accent:#007bb2;--tile:#d8f2fd;max-width:590px;margin:auto;padding:25px;border:1px solid var(--edge);border-radius:30px;background:var(--page);color:var(--ink);box-shadow:0 16px 40px #0f172a12}
#splash-game .js-header {display:flex;align-items:center;gap:13px;margin-bottom:20px}
#splash-game .js-brand {width:58px;height:58px;object-fit:contain;background:#e4f8ff;border-radius:16px}
#splash-game h2 {font-size:29px;line-height:1.1;letter-spacing:-1.1px;margin:3px 0 7px;font-weight:750}
#splash-game .js-kicker {color:var(--accent);font-size:10px;letter-spacing:1.7px;font-weight:750;text-transform:uppercase}
#splash-game .js-sub {font-size:14px;color:var(--muted);margin:0;line-height:1.5}
#splash-game .js-levels {display:flex;gap:10px;justify-content:center;margin-bottom:18px}
#splash-game button {font:inherit}
#splash-game .js-levels button {width:44px;min-height:44px;background:var(--surface);border:1px solid var(--edge);border-radius:50%;color:var(--ink);font-weight:650}
#splash-game .js-levels [aria-pressed="true"] {background:#007bb2;color:#fff;border-color:#007bb2}
#splash-game .js-status {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}
#splash-game .js-status strong {font-size:17px}
#splash-game .js-count {font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
#splash-game .js-playfield {display:grid;grid-template-columns:minmax(0,1fr) 105px;gap:20px;align-items:start}
#splash-game .js-board {display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:3px;padding:7px;background:var(--surface);border:1px solid var(--edge);border-radius:18px;aspect-ratio:8/10}
#splash-game .js-cell {min-width:0;aspect-ratio:1;border-radius:8px;background:color-mix(in srgb,var(--edge) 34%,transparent);display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden}
#splash-game .js-filled {background:var(--tile);box-shadow:inset 0 -3px 0 #007bb218}
#splash-game .js-active {background:#67e8f9;box-shadow:inset 0 -3px 0 #007bb244}
#splash-game .js-ghost {outline:1px dashed var(--accent);outline-offset:-3px;background:color-mix(in srgb,var(--tile) 35%,transparent)}
#splash-game .js-cell img {display:block;width:97%;height:97%;object-fit:contain}
#splash-game .js-cell svg {width:55%;height:55%;color:var(--accent);fill:color-mix(in srgb,var(--accent) 20%,transparent)}
#splash-game .js-side {display:flex;flex-direction:column;align-items:center;gap:13px;text-align:center}
#splash-game .js-small-label {font-size:11px;color:var(--muted);letter-spacing:.8px;text-transform:uppercase;font-weight:650}
#splash-game .js-jar {height:132px;width:79px;border:3px solid #93c7df;border-radius:20px 20px 17px 17px;position:relative;margin:10px 0 0;background:var(--surface)}
#splash-game .js-jar:before {content:'';position:absolute;width:43px;height:13px;background:#007bb2;border-radius:5px;left:15px;top:-14px}
#splash-game .js-jar:after {content:'';position:absolute;right:-19px;top:35px;width:15px;height:46px;border:3px solid #93c7df;border-left:0;border-radius:0 10px 10px 0}
#splash-game .js-water-shell {position:absolute;inset:0;overflow:hidden;border-radius:17px 17px 14px 14px}
#splash-game .js-water {position:absolute;bottom:0;left:0;right:0;background:linear-gradient(#67e8f9,#0ea5e9);height:8%;transition:height .4s ease}
#splash-game .js-percent {font-size:18px;font-weight:700;font-variant-numeric:tabular-nums}
#splash-game .js-drop {font-size:20px;line-height:1}
#splash-game .js-active svg {color:#007bb2;fill:#ffffff66}
#splash-game .js-next {display:flex;gap:3px;max-width:100%;justify-content:center}
#splash-game .js-next .js-cell {width:29px;height:29px}
#splash-game .js-controls {display:flex;gap:8px;margin-top:16px;flex-wrap:wrap}
#splash-game .js-control {border:1px solid var(--edge);background:var(--surface);color:var(--ink);border-radius:13px;padding:11px;min-height:46px;flex:1;font-size:15px;display:flex;align-items:center;justify-content:center;gap:7px}
#splash-game .js-control svg {width:17px;height:17px}
#splash-game .js-primary {background:#007bb2;color:white;border-color:#007bb2;font-weight:650;flex:1.5}
#splash-game .js-instructions {font-size:12px;color:var(--muted);text-align:center;line-height:1.5;margin:14px 0 0}
#splash-game .js-message {font-size:13px;min-height:20px;text-align:center;color:var(--accent);margin:12px 0 0}
#splash-game .js-win {min-height:360px;background:var(--surface);border-radius:24px;padding:28px 20px;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px}
#splash-game .js-win img {width:155px;height:155px;object-fit:contain}
#splash-game .js-win h3 {font-size:28px;font-weight:750;letter-spacing:-1px;margin:0}
#splash-game .js-win p {margin:0;color:var(--muted);font-size:15px;line-height:1.5;max-width:300px}
#splash-game .js-win .js-control {flex:initial;width:100%;max-width:280px}
#splash-game .js-share {background:linear-gradient(135deg,#d3f4fe,#b5eaff);color:#0f172a;border-radius:20px;padding:24px;width:100%;max-width:310px}
#splash-game .js-share strong {display:block;font-size:21px;margin:8px 0}
#splash-game .js-share small {font-size:12px;color:#365569}
#splash-game .js-share p {color:#365569}
#splash-game .js-footer {border-top:1px solid var(--edge);padding-top:16px;margin-top:17px;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:11px;color:var(--muted)}
#splash-game .js-footer span:last-child {color:var(--accent)}
@media(max-width:390px) {#splash-game .js-game {padding:17px;border-radius:24px} #splash-game .js-playfield {grid-template-columns:minmax(0,1fr) 73px;gap:10px} #splash-game .js-jar {width:53px;height:99px} #splash-game .js-jar:before {width:33px;left:7px} #splash-game .js-next .js-cell {width:20px;height:20px} #splash-game .js-control {font-size:13px;padding:9px;gap:4px} #splash-game .js-control svg {width:14px} #splash-game .js-board {gap:2px;padding:5px} #splash-game h2 {font-size:26px} #splash-game .js-status strong {font-size:15px}}
@media(max-width:390px) {
 #splash-game .js-playfield {grid-template-columns:1fr}
 #splash-game .js-side {order:-1;flex-direction:row;justify-content:center;gap:20px;margin:0 0 10px}
 #splash-game .js-side .js-small-label:last-of-type,#splash-game .js-next {display:none}
 #splash-game .js-jar {width:36px;height:50px;margin:8px 0 0;border-width:2px;border-radius:10px}
 #splash-game .js-jar:before {width:24px;height:8px;left:4px;top:-9px}
 #splash-game .js-jar:after {width:8px;height:20px;right:-10px;top:13px;border-width:2px}
 #splash-game .js-water-shell {border-radius:8px}
 #splash-game .js-drop {font-size:18px}
}
@media(prefers-reduced-motion:reduce) {#splash-game .js-water {transition:none}}

#splash-game .js-board {aspect-ratio:8/12}
#splash-game .js-playfield {grid-template-columns:minmax(0,320px) 105px;justify-content:center}
#splash-game .js-round-metrics {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:16px;padding-bottom:15px;border-bottom:1px solid var(--edge)}
#splash-game .js-round-metrics span {display:block;color:var(--muted);font-size:11px;margin-bottom:5px}
#splash-game .js-round-metrics strong {font-size:20px;font-variant-numeric:tabular-nums}
#splash-game .js-round-metrics .js-lime-count {font-size:16px}
#splash-game .js-start-controls {display:flex;gap:10px}
#splash-game .js-run-state {font-size:12px;color:var(--muted);text-align:center;margin:10px 0 18px}
#splash-game .js-control:disabled {opacity:.45;cursor:not-allowed}
#splash-game .js-lime {display:block;width:62%;height:62%;aspect-ratio:1;border-radius:50%;border:2px solid #4f821d;background:repeating-conic-gradient(#d4f593 0deg 39deg,#f5ffcf 40deg 44deg);box-shadow:inset 0 0 0 2px #90c33b;flex-shrink:0}
#splash-game .js-lime-active {background:#dcf8af;box-shadow:inset 0 -3px 0 #6c9f35}
#splash-game .js-lime-key {display:flex;flex-direction:column;align-items:center;gap:8px;font-size:11px;color:var(--muted);line-height:1.5;margin-top:16px}
#splash-game .js-lime-key .js-lime {width:30px;height:30px}
#splash-game .js-row-count {font-size:12px;color:var(--muted)}
#splash-game .js-burst {background:#d6f69c!important;box-shadow:inset 0 0 0 2px #6b9c31;animation:js-splash-pop .4s ease-out}
@keyframes js-splash-pop {0%{transform:scale(.75)}50%{transform:scale(1.08)}100%{transform:scale(1)}}
@media(max-width:390px){#splash-game .js-playfield{grid-template-columns:1fr}#splash-game .js-lime-key{display:none}#splash-game .js-round-metrics strong{font-size:18px}#splash-game .js-round-metrics .js-lime-count{font-size:14px}#splash-game .js-row-count{display:none}#splash-game .js-side .js-small-label:last-of-type{display:block}}
@media(prefers-reduced-motion:reduce){#splash-game .js-burst{animation:none}}

@media(max-width:390px){
 #splash-game{padding:8px 0}
 #splash-game .js-header{margin-bottom:12px}
 #splash-game .js-brand{width:42px;height:42px}
 #splash-game .js-sub{display:none}
 #splash-game .js-kicker{font-size:9px;letter-spacing:1px}
 #splash-game .js-header h2{font-size:24px;margin:4px 0}
 #splash-game .js-levels{gap:8px;margin-bottom:12px}
 #splash-game .js-status{margin-bottom:10px}
 #splash-game .js-round-metrics{padding-bottom:10px;margin-bottom:10px}
 #splash-game .js-run-state,#splash-game .js-side,#splash-game .js-instructions{display:none}
 #splash-game .js-runbar{margin-bottom:12px}
 #splash-game .js-playfield{grid-template-columns:minmax(0,208px);justify-content:center}
 #splash-game .js-controls{margin-top:10px}
 #splash-game .js-message{font-size:11px;margin-top:10px}
 #splash-game .js-footer{margin-top:10px;padding-top:10px;font-size:10px;gap:6px}
 #splash-game .js-footer span{font-size:10px}
}

#splash-game {scroll-margin-top:0}
#splash-game .js-board:focus-visible {outline:3px solid var(--action);outline-offset:4px}
#splash-game.is-running .js-board {touch-action:none}
#splash-game .js-best {margin:0;font-size:11px;color:var(--muted)}
#splash-share-text {width:100%;min-height:110px;padding:12px;border:1px solid var(--line);border-radius:12px;font:inherit;color:var(--navy);background:white}
.game-layout {display:grid;grid-template-columns:minmax(0,590px) minmax(0,1fr);gap:48px;align-items:start}
.game-guide {padding-top:20px}
.game-guide h2 {font-size:28px;letter-spacing:-1px}
.game-guide p,.game-guide li {color:var(--muted)}
.game-guide li {margin-bottom:14px}
.game-guide ol {padding-left:22px}
.game-guide .tool-aside {margin:30px 0}
#splash-game [hidden] {display:none!important}
@media(max-width:900px){.game-layout {grid-template-columns:1fr}.game-guide {padding-top:0}}

/* Keep the board and movement controls together during active desktop play. */
@media(min-width:681px) and (max-height:1050px){
 #splash-game.is-engaged .js-header,#splash-game.is-engaged .js-levels,#splash-game.is-engaged .js-run-state,#splash-game.is-engaged .js-instructions,#splash-game.is-engaged .js-footer{display:none}
 #splash-game.is-engaged .js-game{padding:18px}
 #splash-game.is-engaged .js-status{margin-bottom:10px}
 #splash-game.is-engaged .js-round-metrics{padding-bottom:8px;margin-bottom:10px}
 #splash-game.is-engaged .js-round-metrics span{display:inline;margin:0 6px 0 0}
 #splash-game.is-engaged .js-round-metrics strong{font-size:16px}
 #splash-game.is-engaged .js-runbar{margin-bottom:12px}
 #splash-game.is-engaged .js-playfield{grid-template-columns:minmax(0,224px) 105px}
 #splash-game.is-engaged .js-controls{margin-top:10px}
 #splash-game.is-engaged .js-message{margin-top:8px}
}
