/* SENETY GAMES shared shell v1 — rules and storage remain game-specific. */
:root{color-scheme:light;--navy:#13243e;--blue:#2463eb;--bg:#f7f9fc;--ink:#13243e;--muted:#6c7890;--line:#d9e0eb;--paper:#fff;--teal:#13243e;--accent:#2463eb;--panel:#fff;--cell:#edf1f7}html,body{width:100%;height:auto;min-height:100svh;margin:0;overflow-x:clip;overflow-y:auto;background:#f7f9fc;color:#13243e;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;-webkit-text-size-adjust:100%;touch-action:pan-y}*{box-sizing:border-box}body{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}input,select,textarea{-webkit-user-select:text;user-select:text;font-family:inherit}:where(main, dialog) button{font-family:inherit;cursor:pointer}:where(main, dialog) a{color:inherit}:where(main, dialog) button:focus-visible,:where(main, dialog) a:focus-visible,summary:focus-visible{outline:3px solid #8cb8ff;outline-offset:3px}main.sg-main{display:block;width:100%;max-width:480px;height:auto;min-height:0;margin:0 auto;padding:8px 10px max(16px,env(safe-area-inset-bottom));gap:0}.sg-panel{display:block;width:100%;background:#fff;border:1px solid #e0e5ee;border-radius:14px;padding:10px;box-shadow:0 5px 24px #16284a09}.sg-main .board,.sg-main .board-stage,.sg-main .board-shell,.sg-main .game:has(.inline-result:not([hidden])) .board-shell{width:min(100%,max(240px,calc(100svh - 280px)));min-width:0;max-width:100%;aspect-ratio:1;margin:0 auto}.sg-main .actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0 0;padding:0}.sg-main .actions button{height:48px;min-height:48px;padding:8px 3px;border:1px solid #cdd5e2;border-radius:10px;background:#fff;color:#13243e;font-size:13px;font-weight:700;letter-spacing:0;box-shadow:none;white-space:nowrap}.sg-main .actions button:last-child{background:#13243e;border-color:#13243e;color:white}.sg-main .actions button span{font-size:inherit;margin:0}.sg-main .actions button:disabled{opacity:.42;cursor:default}.sg-main details.sg-disclosure,.sg-main .sg-rank{position:static;width:100%;margin:12px 0 0;padding:0 12px;border:1px solid #e0e5ee;border-radius:12px;background:white;color:#13243e;box-shadow:none;font-size:13px;text-align:left}.sg-disclosure>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:48px;height:auto;padding:10px 0;list-style:none;font-family:inherit;font-size:13px!important;font-weight:700;letter-spacing:0;color:#13243e}.sg-disclosure>summary::-webkit-details-marker{display:none}.sg-disclosure>summary:after{content:'+';font-size:17px;color:#2463eb}.sg-disclosure[open]>summary:after{content:'−'}.sg-disclosure>summary span{color:#2463eb;margin-left:auto;font-size:12px;white-space:normal}.sg-disclosure p,.sg-disclosure .instructions{color:#516079;font-size:12px;line-height:1.8}.sg-main details[open] .instructions{position:static;max-height:none;padding:0 0 12px;background:transparent;border:0;border-radius:0;box-shadow:none;overflow:visible}.sg-main .instructions b{color:#13243e}.sg-records{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:12px 4px;font-size:11px;color:#6c7890}.sg-records small{font-size:10px;letter-spacing:1px}.sg-records .record{font-size:11px;line-height:1.6}.sg-sound{display:flex;align-items:center;justify-content:space-between;margin-top:12px;padding:0 12px;min-height:48px;background:#fff;border:1px solid #e0e5ee;border-radius:12px;color:#6c7890;font-size:12px}.sg-sound button{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:7px;min-width:90px;min-height:44px;width:auto;height:44px;padding:8px;border:0;background:transparent!important;color:#13243e!important;border-radius:8px;font-size:13px!important}.sg-sound button span,.sg-sound button small{font-size:11px!important;color:#13243e}.sg-sound button:before{content:none!important}footer.sg-footer{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:100%;max-width:none;margin:16px 0 0;padding:8px 0 0;border-top:1px solid #e0e5ee;color:#8690a0;font-family:inherit;font-size:10px;line-height:1.6;letter-spacing:.6px}footer.sg-footer a{display:flex;align-items:center;justify-content:center;min-height:44px;color:#52647d;text-decoration:none;font-size:10px;letter-spacing:1px}footer.sg-footer span{display:block!important}/* Shift Block adapter */
body.sg-block .board-stage{position:relative;padding:24px;align-self:auto}body.sg-block .board-wrap{padding:5px;border:2px solid #aab2c0;border-radius:12px;background:#fff;box-shadow:none}body.sg-block .cell{background:#edf1f7}body.sg-block .guide{box-shadow:inset 0 0 0 1px #b1c4e9}body.sg-block .edge-arrows button{background:#eff4ff;color:#2463eb;border:1px solid #cdd5e2;box-shadow:none;border-radius:7px;width:26px;height:26px;min-height:26px}body.sg-block .edge-arrows button:after{inset:-9px}body.sg-block .tray{gap:8px;margin:8px 0 0}body.sg-block .piece{height:58px;min-height:58px;background:#f3f6fb;border:1px solid #d9e0eb;box-shadow:none;border-radius:9px}body.sg-block .piece.selected{background:#eaf1ff;border-color:#2463eb}body.sg-block .piece.used{color:#8b98aa;background:#fafbfe;border:1px dashed #d9e0eb}body.sg-block .actions{grid-template-columns:1fr 1fr}body.sg-block .scores{display:flex;margin:12px 0 8px;padding:0 3px;min-height:28px;background:none;border:0;color:#13243e;box-shadow:none}body.sg-block .scores strong,body.sg-block .scores .best strong{font-size:20px;color:#13243e;text-shadow:none}body.sg-block .status{background:none;display:flex;align-items:center;justify-content:space-between;margin:8px 0;padding:0;font-size:9px;letter-spacing:.5px;color:#6c7890}body.sg-block #combo,body.sg-block #shiftStatus{color:#52647d}body.sg-block .shift-help{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;background:#eff4ff;border:0;border-radius:8px;box-shadow:none;color:#2c4770;font-size:10px;margin:8px 0 0}body.sg-block .shift-help span{background:none;color:#2c4770;padding:0;font-size:10px}body.sg-block .message{height:auto;min-height:30px;padding:8px 10px;margin:8px 0 0;background:#f0f5fd;color:#2c4770;border-radius:8px;font-size:11px;overflow:visible}body.sg-block .sg-rank{position:static;display:flex;justify-content:space-between;align-items:center;min-height:48px;height:auto;color:#13243e;font-weight:700;letter-spacing:0}body.sg-block .sg-rank span{color:#2463eb}body.sg-block dialog,body.sg-block #rankDialog{background:#fff;color:#13243e;border-color:#d9e0eb}body.sg-block .dialog-body p,body.sg-block .rank-note{color:#6c7890}body.sg-block .shift-btn{background:#13243e;color:white;border:0;box-shadow:none}body.sg-block .secondary,body.sg-block .rank-heading button{background:#f0f4fa;color:#13243e;border:1px solid #d9e0eb;box-shadow:none}body.sg-block #profileForm input:not([type=checkbox]),body.sg-block #profileForm select{background:white;color:#13243e;border-color:#cdd5e2}body.sg-block #profileForm small,body.sg-block #profileStatus,body.sg-block #rankGameStatus,body.sg-block #rankingStatus{color:#52647d}body.sg-block .rank-table th,body.sg-block .rank-table td{border-color:#d9e0eb}body.sg-block #rankDialog summary{color:#13243e}/* Color Matching adapter */
body.sg-color .board-shell{background:#fff;border:2px solid #aab2c0;border-radius:12px;box-shadow:none;overflow:hidden;padding:0}body.sg-color .board-row{display:grid;grid-template-columns:32px minmax(0,1fr) 32px;align-items:stretch}body.sg-color .row-controls button{width:32px;min-width:32px;height:100%;min-height:0;padding:0;color:#6c7890}body.sg-color .col-controls{margin:0 32px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}body.sg-color .col-controls button{height:32px;min-height:32px;color:#6c7890;padding:0}body.sg-color #board{width:100%;height:auto;display:block;background:#f7f9fc}body.sg-color .game-heading{margin:8px 0 0;padding:0;height:44px;min-height:44px;grid-template-columns:80px minmax(0,1fr) 84px}body.sg-color #stageLabel{color:#52647d;font-size:12px}body.sg-color #stages{color:#13243e;background:#f3f6fb;border:1px solid #e0e5ee;border-radius:8px;min-height:44px}body.sg-color .counters{margin:12px 0 0;display:flex;justify-content:space-between;gap:8px;color:#52647d}body.sg-color .counters b{font-size:20px;color:#13243e}body.sg-color .counters .distance{background:#f0f5fd;border-radius:8px;padding:4px 8px}body.sg-color .counters span{font-family:inherit;font-size:8px}body.sg-color .game-info{border:0;padding:0;margin:0;max-width:none}body.sg-color .game-info>small{display:none}body.sg-color #instructions #help{font-size:13px;letter-spacing:0;min-height:48px;color:#13243e}body.sg-color .game-bottom{display:none}body.sg-color .intro,body.sg-color aside{display:none!important}body.sg-color .instruction-content{padding-bottom:12px}body.sg-color .inline-result strong{color:#2463eb}body.sg-color dialog{background:#fff;color:#13243e}body.sg-color dialog h2{font-family:inherit}body.sg-color .modal-primary{background:#13243e;color:white}
@media(max-width:350px){main.sg-main{padding-inline:8px}.sg-panel{padding:8px}.sg-main .actions button{font-size:12px}.sg-main .board,.sg-main .board-stage,.sg-main .board-shell{min-width:0}body.sg-color .counters span{font-size:7px}}body.sg-block .actions button:first-child{background:white;color:#13243e;border:1px solid #cdd5e2}body.sg-block .scores .label{color:#6c7890}body.sg-color .row-controls button{position:relative}body.sg-color .row-controls button:after{content:"";position:absolute;inset:0 -6px}body.sg-color .col-controls button{position:relative}body.sg-color .col-controls button:after{content:"";position:absolute;inset:-6px 0}main.sg-main{max-width:480px;padding-top:8px}.game-options .controls{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 10px}.game-options .field{display:flex;align-items:center;gap:7px}.game-options label{font-size:10px;margin:0;white-space:nowrap}.game-options select{height:40px;min-height:40px;padding:0 8px;font-size:13px;background:#f5f7fb;border-color:#e0e5ee;border-radius:9px}.sg-main .board{width:min(100%,max(200px,calc(100svh - 292px - env(safe-area-inset-top) - env(safe-area-inset-bottom))))}.sg-main .actions{margin-top:10px}.play-meta{display:grid;grid-template-columns:repeat(3,1fr);text-align:center;background:#f4f6fa;border-radius:10px;padding:11px 0;margin:12px 0 8px;font-size:15px}.play-meta>span+span{border-left:1px solid #dfe4ed}.play-meta .muted{font-size:9px}.status{background:transparent;padding:4px 0;font-size:12px}.rank-game-status{font-size:10px;text-align:center}.sg-main .sg-footer{margin-top:14px;padding:14px 0 0;border-top:1px solid #e0e5ee}.sg-footer a{display:none!important}[hidden]{display:none!important}body.menu-open{overflow:hidden}dialog{width:min(92vw,440px);max-height:85svh;overflow-y:auto;border:1px solid #e4e7ed;border-radius:26px;background:#f2f3f8;color:#13243e;padding:22px;box-shadow:0 24px 90px #13243e30}dialog::backdrop{background:#13243e35;backdrop-filter:blur(8px)}.menu-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 24px}.menu-heading small{font-size:9px;letter-spacing:.18em;color:#7d8799;font-weight:800}.menu-heading h2{margin:9px 0 0;font-size:29px;letter-spacing:-.035em;outline:none}.menu-list{border-radius:20px;background:white;overflow:hidden}.menu-list button{width:100%;display:flex;align-items:center;gap:13px;min-height:76px;padding:16px;border:0;background:white;color:#13243e;text-align:left;font-size:16px;font-weight:700;position:relative}.menu-list button+button:before{content:'';position:absolute;left:64px;right:0;top:0;border-top:1px solid #ebedf3}.menu-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:#ebf1ff;color:#3678e9;font-size:25px;font-weight:400}.menu-list b{margin-left:auto;color:#a2a9b6;font-size:26px;font-weight:400}.menu-list small{display:block;font-size:11px;color:#8290a3;font-weight:500;margin-top:4px}.menu-back{background:none;border:0;color:#3975cb;padding:0 0 10px;min-height:40px;font-size:14px}.menu-help{background:white;border-radius:16px;padding:16px;font-size:14px;line-height:1.8}.menu-help .rule-icons{font-size:18px}dialog .field select{width:100%;min-height:48px;border:1px solid #cdd5e2;background:white;border-radius:11px;padding:0 10px;font-size:16px;color:#13243e}dialog .ranking-title{margin-top:8px}dialog .sg-records{padding:12px;background:white;border-radius:12px;margin:16px 0 0}dialog .level-note{font-size:12px}dialog button{touch-action:manipulation}
@media(max-width:350px){dialog{padding:18px}.menu-list button{font-size:14px}.game-options .field{gap:4px}.game-options select{font-size:12px}}.menu-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.play-meta{grid-template-columns:repeat(3,1fr)}.play-meta small{display:block;margin-top:5px;color:#7d899b;font-size:10px;font-weight:500}.play-meta>span:nth-child(4){border:0}.sg-main .board{width:min(100%,max(200px,calc(100svh - 252px - env(safe-area-inset-top) - env(safe-area-inset-bottom))))}/* Single compact result row. */
.play-meta{grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin-bottom:0;padding:14px 0}.play-meta>span:nth-child(4){border-left:1px solid #dfe4ed}.play-meta strong{font-size:clamp(12px,3.6vw,17px);white-space:nowrap;font-variant-numeric:tabular-nums}.play-meta small{font-size:10px;margin-top:7px}.play-meta #status{display:inline;background:none;padding:0;margin:0;line-height:normal;color:#52647d;font-size:clamp(11px,3vw,14px)}.play-meta #status.cleared{color:#31765a}.sg-main .board{width:min(100%,max(200px,calc(100svh - 220px - env(safe-area-inset-top) - env(safe-area-inset-bottom))))}.stage-note{color:#6c7890;font-size:13px;margin:0 0 16px}.stage-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.stage-choice{position:relative;min-width:0;min-height:48px;border:1px solid #dce2ec;border-radius:10px;background:white;color:#13243e;font-size:14px;font-weight:700;font-variant-numeric:tabular-nums}.stage-choice.completed{background:#edf7f1;color:#31765a}.stage-choice.completed:after{content:'✓';position:absolute;right:4px;top:2px;font-size:9px}.stage-choice[aria-current=true]{background:#13243e;border-color:#13243e;color:white}.stage-choice:hover{border-color:#3678e9}@media(max-width:350px){.stage-grid{gap:6px}.stage-choice{font-size:12px}}.play-meta .my-best{display:block;margin-top:10px;color:#7d899b}.play-meta .my-best b{font-size:11px;font-weight:600;white-space:nowrap;font-variant-numeric:tabular-nums}.play-meta .my-best small{font-size:9px;margin-top:3px}.play-meta{align-items:center}/* Refined grouped menu: crisp line icons. */dialog{padding:22px 20px;border-radius:28px;background:#f2f2f7;border-color:#ffffff80;box-shadow:0 30px 100px #13243e35}.menu-heading{margin-bottom:26px}.menu-heading h2{font-size:32px;font-weight:750;letter-spacing:-.04em}.menu-heading small{font-size:9px;letter-spacing:.2em}.menu-list{border-radius:20px}.menu-list>button{min-height:72px;padding:15px 16px;gap:14px;font-size:15px;transition:background .15s}.menu-list>button:active{background:#f5f6fa}.menu-list>button+button:before{left:66px}.menu-icon{width:34px;height:34px;border-radius:10px;background:#eaf0ff}.menu-icon svg{stroke-width:1.65;width:21px;height:21px}.menu-list [data-view=stages] .menu-icon{color:#418d79;background:#e7f4ef}.menu-list [data-view=leaderboard] .menu-icon{color:#9675cc;background:#f0eafa}.menu-list>button>b{font-size:0;width:8px;height:8px;border-top:1.7px solid #a0a6b2;border-right:1.7px solid #a0a6b2;transform:rotate(45deg);margin-right:4px}.language-picker{border:0;margin:0;padding:0;background:white}.language-picker>summary{position:relative;display:flex;align-items:center;gap:14px;min-height:72px;padding:15px 16px;cursor:pointer;list-style:none;font-size:15px;font-weight:700}.language-picker>summary::-webkit-details-marker{display:none}.language-picker>summary:before{content:'';position:absolute;top:0;left:66px;right:0;border-top:1px solid #ebedf3}.language-picker summary small{margin-left:auto;color:#8a93a2;font-size:12px;font-weight:500}.language-icon{background:#edf2f8;color:#677e95;flex:none}.language-picker summary b{width:8px;height:8px;border-right:1.7px solid #a0a6b2;border-bottom:1.7px solid #a0a6b2;transform:rotate(45deg);margin:0 6px 4px}.language-picker[open] summary b{transform:rotate(225deg);margin-bottom:-2px}#languageOptions{display:grid;padding:0 12px 12px;gap:2px}#languageOptions button{display:flex;align-items:center;justify-content:space-between;min-height:46px;border:0;border-radius:11px;background:white;color:#56647b;text-align:left;padding:10px 16px;font-size:14px;font-weight:600}#languageOptions button[aria-pressed=true]{background:#edf2ff;color:#3069d5}#languageOptions button[aria-pressed=true]:after{content:'✓';font-size:17px}.menu-list button:focus:not(:focus-visible),.language-picker summary:focus:not(:focus-visible){outline:none}.sg-main .actions button{font-size:clamp(10px,2.9vw,13px);white-space:normal}.play-meta small{overflow-wrap:anywhere}.play-meta #status{font-size:clamp(10px,2.7vw,13px);white-space:normal;overflow-wrap:anywhere}.menu-help p{white-space:normal}html[lang=fr] .play-meta .my-best b,html[lang=de] .play-meta .my-best b{font-size:10px}@media(prefers-reduced-motion:reduce){.menu-list>button{transition:none}}

