.cube-game{position:fixed;inset:0;z-index:14;overflow-y:auto;overscroll-behavior:contain;background:radial-gradient(ellipse at 25% 0%,#24475488,transparent 62%),var(--bg)}
.cube-shell{max-width:920px;margin:0 auto;padding:calc(8px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));display:flex;flex-direction:column;justify-content:space-between;align-items:center;gap:6px;height:100dvh;overflow:hidden}
.cube-shell .play-header{width:100%;max-width:820px;gap:10px}
.cube-shell .play-heading h1{font-size:17px;margin:0}
.cube-shell .play-heading .eyebrow{display:none}
.cube-stats{width:100%;max-width:520px;display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--line);border-radius:10px;background:rgba(15,34,43,.65);padding:4px 0;text-align:center}.cube-stats>div{border-right:1px solid var(--line)}.cube-stats>div:last-child{border:0}.cube-stats span{display:inline;color:var(--muted);font-size:9px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;margin-right:4px}.cube-stats strong{display:inline;font-size:13px;font-weight:700;font-variant-numeric:tabular-nums}
.cube-rule,.cube-board-caption,.cube-status{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;pointer-events:none}
.cube-board-wrap{width:min(94vw,calc(100dvh - 165px),820px);min-width:min(100%,280px);flex:1 1 auto;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2px;min-height:0}.cube-board{display:block;width:100%;max-height:100%;height:auto;aspect-ratio:640/600;touch-action:none;user-select:none;-webkit-user-select:none;outline-offset:-2px;border-radius:20px;background:radial-gradient(ellipse at 50% 88%,#68d5ce06,transparent 60%)}.cube-cell{cursor:crosshair;stroke:#8ebdc42e;stroke-width:1;stroke-linejoin:round;transition:fill 110ms}.cube-cell.is-blocked{cursor:not-allowed}.cube-cell.is-keyboard{stroke:#f2f6ed;stroke-width:3}.cube-route{pointer-events:none;stroke-linecap:round;stroke-linejoin:round;fill:none}.cube-endpoint,.cube-svg-label,.cube-seam-marker,.cube-void-mark{pointer-events:none}.cube-svg-label{font-family:inherit;font-weight:700;fill:#b6d0d5;letter-spacing:1.6px}.cube-board-wrap .route-legend{margin-top:0}.cube-board-wrap .route-dot{width:16px;height:16px;font-size:9px}
.cube-view-controls{display:flex;justify-content:center;gap:6px;flex-wrap:wrap}.cube-view-button{min-height:32px;padding:4px 10px;border:1px solid var(--line);border-radius:8px;background:#9ac9cb0a;color:#b8ced2;font-size:11px;font-weight:600}.cube-view-button[aria-pressed=true]{border-color:#c8ef8770;color:var(--accent)}.cube-view-button:hover{background:#9ac9cb14}
.cube-tools{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;width:min(100%,460px);align-self:center}.cube-tools .tool-button{min-height:38px;padding:4px 6px;flex-direction:row;gap:5px;font-size:11px}.cube-tools .tool-button svg{width:15px;height:15px}
.cube-level-navigation{display:flex;justify-content:space-between;gap:10px;max-width:460px;width:100%;align-self:center}.cube-level-navigation .text-button{font-size:11px;min-height:26px;padding:2px 6px}.cube-how-to{margin-top:24px}.cube-how-to strong{font-size:16px}.cube-how-to span{font-size:15px}.cube-how-to~.overlay-copy{font-size:15px}.cube-mode-icon{color:#92dfe4}.explore-card .cube-mode-card{background:linear-gradient(135deg,#68d5ce0d,transparent)}
@media(max-width:600px){.cube-shell{gap:12px;padding-inline:max(16px,env(safe-area-inset-left));padding-top:calc(10px + env(safe-area-inset-top))}.cube-board-wrap{width:100%;max-width:480px;min-width:0}.cube-shell .play-heading h1{font-size:19px}.cube-stats{padding:10px 0}.cube-stats strong{font-size:21px}.cube-stats span{font-size:11px}.cube-rule p{font-size:13px}.cube-view-button{padding:9px 12px}.cube-tools .tool-button{font-size:12px;min-height:62px}.cube-status{font-size:13px}.cube-board-caption{font-size:10px}.cube-board-wrap .route-dot{width:19px;height:19px;font-size:10px}}
@media(orientation:landscape) and (max-height:600px){.cube-shell{display:grid;grid-template-columns:minmax(260px,1fr) minmax(300px,1.2fr);grid-template-rows:auto auto auto auto auto;gap:9px 24px;max-width:1000px;padding:12px 24px}.cube-shell .play-header{grid-column:1;grid-row:1}.cube-stats{grid-column:1;grid-row:2}.cube-rule{grid-column:1;grid-row:3}.cube-tools{grid-column:1;grid-row:4}.cube-status{grid-column:1;grid-row:5}.cube-board-wrap{grid-column:2;grid-row:1/5;width:min(100%,calc(100dvh - 100px));min-width:0;justify-self:center}.cube-view-controls{grid-column:2;grid-row:5;gap:6px}.cube-view-button{padding:7px 10px;font-size:11px}.cube-level-navigation{display:none}.cube-rule p{font-size:12px}.cube-rule strong{font-size:12px}.cube-status{font-size:12px}.cube-board-caption{font-size:9px}.cube-tools .tool-button{min-height:56px;font-size:11px}}
@media(max-width:400px){.cube-view-controls{gap:6px}.cube-view-button{padding-inline:9px}}
