/* 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}/* DOT JOIN compact play screen and menu. */

main.sg-main{padding-top:12px}.sg-panel{padding:12px}.category-line{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 2px 12px;font-size:12px;font-weight:750}.category-line>span:last-child{font-size:9px;letter-spacing:.12em;color:var(--muted)}.play-meta{margin:0 2px 12px;font-size:12px;gap:6px}.meta-item{display:flex;flex-direction:column;gap:3px;font-size:9px;color:var(--muted);letter-spacing:.06em}.meta-item>span{font-size:14px;font-weight:700;color:var(--navy);letter-spacing:0}.play-meta>span:last-child{display:flex;flex-direction:column-reverse;gap:3px;text-align:right}.play-meta #clock{font-size:17px;line-height:20px}.play-meta .muted{font-size:9px;letter-spacing:.06em}.sg-main .board{width:min(100%,max(220px,calc(100svh - 290px - env(safe-area-inset-top) - env(safe-area-inset-bottom))));border-radius:12px}.progress{margin:12px 0 8px}.status{background:transparent;padding:4px 0;font-size:12px}.rank-game-status{margin:6px 0 0;text-align:center}.sg-footer{margin-top:8px!important}.game-menu{width:min(440px,calc(100% - 24px));max-height:calc(100svh - 40px);padding:22px 18px;border:0;border-radius:28px;background:#f1f2f7;color:var(--navy);box-shadow:0 24px 80px #13243e33;overscroll-behavior:contain}.game-menu::backdrop{background:#13243e55;backdrop-filter:blur(6px)}.menu-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:2px 2px 24px}.menu-heading small{font-size:10px;letter-spacing:.19em;color:#7c8597;font-weight:800}.menu-heading h2{font-size:32px;line-height:1.2;margin:8px 0 0;letter-spacing:-.03em}.menu-list{background:white;border-radius:22px;padding:0 16px;overflow:hidden}.game-menu details{margin:0;padding:0;border:0;border-radius:0;background:white;font-size:13px}.game-menu details+details{border-top:1px solid #e9ebf1}.game-menu summary{min-height:76px;display:flex;align-items:center;gap:12px;font-size:16px!important;font-weight:700;cursor:pointer;list-style:none;padding:12px 0}.game-menu summary::-webkit-details-marker{display:none}.game-menu summary:after{content:'›';font-size:25px;color:#9da5b4;margin-left:auto}.game-menu details[open]>summary:after{content:'⌄'}.game-menu summary>span{font-size:11px;color:var(--muted);margin-left:auto;max-width:40%;overflow-wrap:anywhere}.menu-icon{font-style:normal;display:grid;place-items:center;width:38px;height:38px;border-radius:12px;font-size:25px;flex:none;background:#eaf1ff;color:#3978e9}.person{background:#e8f5f1;color:#338d79}.trophy{background:#fff4dc;color:#b88d30}.grid{background:#f0ebff;color:#8964d2}.game-menu .controls{margin:8px 0 16px}.game-menu .level-note,.game-menu .help p{font-size:12px;line-height:1.8}.game-menu .ranking-title{margin-top:8px}.game-menu .menu-records{margin:16px 6px 0}.game-menu .record{display:flex;gap:12px;font-size:10px}.game-menu .record br{display:none}.game-menu .profile-fields{margin-top:8px;gap:14px}.game-menu #profileStatus{margin-bottom:18px}.game-menu input:focus{border-color:#2463eb}summary:focus:not(:focus-visible){outline:none}
@media(max-width:350px){.game-menu{padding:18px 12px}.menu-list{padding:0 12px}.game-menu summary{font-size:14px!important}.game-menu .record{gap:6px}.play-meta #clock{font-size:15px}.category-line>span:last-child{font-size:8px}}.stage-stats{display:grid;grid-template-columns:.8fr 1fr 1.35fr 1fr;align-items:center;background:#f3f5fa;border-radius:12px;padding:14px 4px;margin-top:12px;text-align:center;min-height:100px;font-variant-numeric:tabular-nums}.stage-stats>div{display:flex;flex-direction:column;align-items:center;gap:7px;min-width:0;padding:0 4px}.stage-stats>div+div{border-left:1px solid #dce2ed}.stage-stats strong{font-size:17px;line-height:1.25;white-space:nowrap}.stage-stats small{font-size:10px;color:#7c899e;letter-spacing:.03em}.stage-stats #stageBest{font-size:12px;color:#7c899e;margin-top:4px}.stage-stats #status{font-size:13px;color:#526580;background:none;margin:0;padding:0;white-space:normal;overflow-wrap:anywhere}.stage-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;padding:8px 0 18px}.stage-grid button{min-height:44px;border:1px solid #dce2ec;border-radius:9px;background:#f6f8fc;color:#13243e;font-size:12px;font-weight:700}.stage-grid button.selected{background:#2463eb;color:white;border-color:#2463eb}.sg-main .board{width:100%;max-width:100%}.sg-panel{padding:10px}.sg-main .actions{margin-top:10px}.sg-footer a{display:none!important}.stage-stats #clock{font-size:16px}.rank-game-status{font-size:10px}


