:root{color-scheme:light;--navy:#13243e;--bg:#f7f9fc;--muted:#6c7890}*{box-sizing:border-box}html,body{width:100%;min-height:100svh;margin:0;overflow-x:clip;background:var(--bg);color:var(--navy);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;-webkit-text-size-adjust:100%}body{user-select:none}:where(main,dialog) :is(button,input){font-family:inherit}:where(main,dialog) button{cursor:pointer}:where(main,dialog) button:disabled{opacity:.42;cursor:default}:where(main,dialog) :is(button,input):focus-visible{outline:3px solid #8cb8ff;outline-offset:2px}[hidden]{display:none!important}main.sg-main{display:block;width:100%;max-width:480px;margin:0 auto;padding:8px 10px max(16px,env(safe-area-inset-bottom))}.sg-panel{background:white;border:1px solid #e0e5ee;border-radius:14px;padding:10px;box-shadow:0 5px 24px #16284a09}.puzzle-meta{display:flex;justify-content:space-between;align-items:center;min-height:39px;margin-bottom:8px;color:#6c7890;font-size:9px;letter-spacing:.08em}.puzzle-meta>span{width:80px}.puzzle-meta>span:last-child{text-align:right}.sum{color:#13243e;font-size:23px;font-weight:750;font-variant-numeric:tabular-nums;letter-spacing:-.5px}.sum small{font-size:11px;color:#8793a6;font-weight:500}.sum.ok{color:#31765a}.board{display:grid;aspect-ratio:1;width:min(100%,max(250px,calc(100svh - 340px - env(safe-area-inset-top) - env(safe-area-inset-bottom))));margin:0 auto;padding:7px;gap:7px;background:#edf1f7;border:2px solid #aab2c0;border-radius:12px;touch-action:none;user-select:none}.tile{aspect-ratio:1;display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;padding:0;border:1px solid #d0d8e5;border-radius:8px;background:#fff;color:#13243e;font-size:clamp(19px,5vw,28px);font-weight:650;touch-action:none;-webkit-tap-highlight-color:transparent;transition:background .12s,transform .12s}.tile[data-n="1"],.tile[data-n="6"]{background:#e7eefb;color:#345e9b}.tile[data-n="2"],.tile[data-n="7"]{background:#f9eddc;color:#906b35}.tile[data-n="3"],.tile[data-n="8"]{background:#ece7f6;color:#75559f}.tile[data-n="4"],.tile[data-n="9"]{background:#e3f1ec;color:#31745b}.tile[data-n="5"]{background:#f6e7e7;color:#995e65}.tile.sel{background:#14243e!important;color:white!important;border-color:#14243e;transform:scale(.95)}.tile.hint{outline:3px solid #dea43d;outline-offset:-4px}.tile.empty{visibility:hidden}.board.large{gap:5px;padding:6px}.board.large .tile{font-size:clamp(18px,4.5vw,25px)}.actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:8px}.actions button,.selection-actions button{min-height:44px;border:1px solid #cdd5e2;border-radius:10px;background:#fff;color:#13243e;font-size:12px;font-weight:650;padding:7px 3px}.actions button:last-child{background:#13243e;color:white;border-color:#13243e}.selection-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:8px}.selection-actions button{min-height:34px;font-size:11px;border-color:#e0e5ee;background:#f7f9fc;font-weight:500}.instruction{min-height:18px;font-size:11px;line-height:1.6;text-align:center;color:#526580;margin:7px 0}.stage-stats{display:grid;grid-template-columns:.8fr .75fr 1.5fr 1fr;align-items:center;background:#f3f5fa;border-radius:10px;padding:9px 3px;margin-top:8px;min-height:84px;text-align:center;font-variant-numeric:tabular-nums}.stage-stats>div{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:0;padding:0 3px}.stage-stats>div+div{border-left:1px solid #dce2ed}.stage-stats strong{font-size:15px;line-height:1.25;white-space:nowrap}.stage-stats small{font-size:9px;color:#7c899e}.stage-stats #time{font-size:14px}.stage-stats #stageBest{font-size:11px;color:#7c899e;margin-top:3px}footer.sg-footer{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;display:block;margin:14px 0 0;padding:14px 0 0;border-top:1px solid #e0e5ee;background:#f7f9fc;color:#8690a0;font-size:10px;font-weight:400;line-height:16px;letter-spacing:.6px;text-align:center}.sg-footer-ad{display:block;width:100%;min-width:0;margin-top:24px}#adPreview{min-height:90px;border:1px dashed #d7dee8;background:#f1f4f9;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px;color:#94a0b1;font-size:9px;letter-spacing:1.3px}#adPreview small{font-size:10px;letter-spacing:0}.game-menu{border:0;color:#13243e}.game-menu input{width:100%;min-height:48px;margin:8px 0 10px;padding:10px 12px;border:1px solid #dce2ec;border-radius:10px;font-size:16px;user-select:text}.game-menu p{font-size:12px;color:#516079;line-height:1.8;margin:0 0 16px}.game-menu .primary{min-height:44px;padding:10px 15px;background:#13243e;border:1px solid #13243e;color:white;border-radius:10px;font-size:13px;font-weight:700}.ranking-table{width:100%;border-collapse:collapse;font-size:11px;font-variant-numeric:tabular-nums}.ranking-table td,.ranking-table th{padding:10px 3px;border-bottom:1px solid #e0e5ee;text-align:left}.ranking-table td:nth-child(3){white-space:nowrap}.stage-grid button{font-weight:700}.stage-legend{font-size:10px;gap:8px}.sg-common-menu .pilot-row[data-menu-label="Profile"] .menu-icon{background:#e5f3ee!important;color:#438e7b!important}.sg-common-menu .pilot-row[data-menu-label="Leaderboard"] .menu-icon{background:#fff3d9!important;color:#b28a30!important}.sg-common-menu .pilot-row[data-menu-label="Stages"] .menu-icon{background:#eee8fc!important;color:#8662cf!important}.sg-common-menu .pilot-row[data-menu-label="How to Play"] .menu-icon{background:#e8efff!important;color:#4b79dc!important}@media(max-width:350px){main.sg-main{padding-inline:8px}.sg-panel{padding:8px}.board{gap:5px;padding:5px}.stage-stats #time{font-size:12px}.stage-stats small{font-size:8px}.actions button{font-size:11px}}@media(prefers-reduced-motion:reduce){.tile{transition:none}}
