:root{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--rg-bg,#f7f5ef);color:var(--rg-text,#213635)}.beta-header{max-width:1440px;margin:auto;padding:17px clamp(18px,4vw,50px);display:flex;gap:16px;align-items:center;flex-wrap:wrap;border-bottom:1px solid var(--rg-border,#dbe5dd)}.beta-brand{font-size:1.3rem;font-weight:850;letter-spacing:-.05em;color:var(--rg-accent,#08786f);text-decoration:none;display:flex;gap:9px;align-items:center}.beta-chip{font-size:.65rem;font-weight:850;letter-spacing:.12em;color:#91581b;background:#fff0ce;padding:7px 10px;border-radius:99px}.beta-back{margin-left:auto;font-size:.84rem;color:var(--rg-muted,#627670);text-decoration:none}.beta-back:hover{text-decoration:underline}.beta-main{max-width:1440px;margin:auto;padding:clamp(19px,4vw,48px) clamp(14px,4vw,50px) 80px}.beta-intro{display:flex;justify-content:space-between;align-items:center;margin-bottom:21px}.beta-kicker{margin:0;font-size:.72rem;letter-spacing:.16em;text-transform:uppercase;font-weight:800;color:var(--rg-accent,#08786f)}.beta-intro h1{margin:6px 0;font-size:clamp(2rem,4vw,3.2rem);letter-spacing:-.06em}.beta-intro p:last-child{margin:4px 0;color:var(--rg-muted,#627670);font-size:.91rem;line-height:1.6}.beta-modes{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 20px}.beta-modes button,.beta-worlds button{appearance:none;border:1px solid var(--rg-border,#dbe5dd);background:var(--rg-surface,#fffdf8);border-radius:13px;color:var(--rg-text,#213635);padding:15px;cursor:pointer;text-align:left;min-height:73px}.beta-modes button:hover,.beta-worlds button:hover{border-color:var(--rg-accent,#08786f)}.beta-modes button.active,.beta-worlds button.active{border-color:var(--rg-accent,#08786f);background:var(--rg-surface-muted,#edf6ee);box-shadow:inset 0 0 0 1px var(--rg-accent,#08786f)}.beta-modes strong{display:block;font-size:.85rem}.beta-modes small{display:block;margin-top:4px;color:var(--rg-muted,#627670);font-size:.7rem}.beta-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(290px,.75fr);gap:20px;align-items:start}.beta-board-card,.beta-editor-card{background:var(--rg-surface,#fffdf8);border:1px solid var(--rg-border,#dbe5dd);border-radius:19px;overflow:hidden;box-shadow:var(--rg-shadow,0 4px 24px #00000009)}.beta-board-top{padding:18px 20px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px}.beta-board-top strong{font-size:.87rem}.beta-score{display:flex;flex-wrap:wrap;gap:12px;font-size:.75rem;color:var(--rg-muted,#627670)}.beta-score b{color:var(--rg-text,#213635);font-variant-numeric:tabular-nums}.beta-svg-wrap{width:100%;background:var(--rg-board,#faf8f1)}#beta-board{width:100%;height:auto;display:block;touch-action:pan-y}.beta-grid{stroke:var(--rg-grid,#e1e8e1);stroke-width:1}.beta-axis{stroke:var(--rg-axis,#a6bcb1);stroke-width:1.8}.beta-track{fill:none;stroke-width:6;stroke-linecap:round;stroke-linejoin:round}.beta-track.inactive{opacity:.28;stroke-dasharray:8 10;stroke-width:3}.beta-reference{fill:none;stroke:#8f93af;stroke-dasharray:5 8;stroke-width:2.5;opacity:.65}.beta-gate{fill:#b0b7f633;stroke:#717dd0;stroke-width:3;stroke-dasharray:7 5}.beta-gate.passed{fill:#55b99e40;stroke:#2ca184;stroke-dasharray:none}.beta-gate-number{font-size:17px;fill:var(--rg-text,#213635);font-weight:800;text-anchor:middle}.beta-worlds{display:flex;align-items:center;gap:9px;padding:12px 20px 0}.beta-worlds[hidden]{display:none}.beta-worlds button{min-height:38px;padding:9px 13px;font-size:.8rem}.beta-worlds small{color:var(--rg-muted,#627670)}.beta-controls{padding:19px 20px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.beta-controls button{border-radius:11px;padding:11px 18px;min-height:43px;font-weight:800;cursor:pointer}.beta-primary{color:#fff;background:#08786f;border:1px solid #08786f}.beta-primary:disabled{opacity:.55;cursor:default}.beta-secondary{background:var(--rg-control,#fffefa);color:var(--rg-text,#213635);border:1px solid var(--rg-border,#dbe5dd)}#beta-phase{margin-left:auto;font-size:.8rem;font-weight:800;color:var(--rg-accent,#08786f)}.beta-message{border-top:1px solid var(--rg-border,#dbe5dd);padding:13px 20px;font-size:.83rem;color:var(--rg-muted,#627670);min-height:44px}.beta-editor-card{padding:23px}.beta-editor-card h2{font-size:1.13rem;margin:0 0 9px;letter-spacing:-.03em}.beta-editor-card>p{font-size:.83rem;line-height:1.6;color:var(--rg-muted,#627670)}.beta-eq{display:block;margin:18px 0}.beta-eq span{display:block;font-weight:800;font-size:.8rem;margin-bottom:8px}.beta-eq input{width:100%;padding:13px;border-radius:11px;border:1px solid var(--rg-border,#dbe5dd);background:var(--rg-control,#fffefa);color:var(--rg-text,#213635);font:500 .85rem ui-monospace,SFMono-Regular,Consolas,monospace}.beta-eq input:focus{outline:2px solid var(--rg-accent,#08786f);outline-offset:2px}.beta-error{color:#c34538!important;font-weight:700;min-height:22px}.beta-help{font-size:.73rem!important}.beta-note{border-top:1px solid var(--rg-border,#dbe5dd);padding-top:18px;margin-top:24px}.beta-note strong{font-size:.8rem}.beta-note p{font-size:.77rem;line-height:1.6;color:var(--rg-muted,#627670)}@media(max-width:920px){.beta-layout{grid-template-columns:1fr}.beta-modes{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:480px){.beta-header{gap:9px}.beta-chip{font-size:.57rem}.beta-back{font-size:.74rem}.beta-modes{gap:7px}.beta-modes button{padding:11px;min-height:75px}.beta-modes strong{font-size:.78rem}.beta-modes small{font-size:.65rem}.beta-score{gap:8px}.beta-editor-card{padding:17px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
/* Mathematical worlds: the player enters ONE equation, then switches operators. */
.beta-worlds{display:block;padding:14px 19px 0}
.beta-worlds[hidden],.beta-designer[hidden]{display:none!important}
.beta-worlds-title{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin:0 0 10px;flex-wrap:wrap}
.beta-worlds-title strong{font-size:.82rem;color:var(--rg-text,#213635)}
.beta-worlds-title small{font-size:.72rem;color:var(--rg-muted,#627670)}
.beta-worlds-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}
.beta-worlds-grid button{min-height:125px;display:flex;flex-direction:column;align-items:flex-start;gap:5px;text-align:left;padding:11px;overflow-wrap:anywhere;transition:border-color .12s ease,background-color .12s ease}
.beta-worlds-grid button .beta-world-number{font-size:.63rem;font-weight:850;text-transform:uppercase;letter-spacing:.06em;color:var(--rg-accent,#08786f)}
.beta-worlds-grid button strong{font-size:.79rem;line-height:1.2}
.beta-worlds-grid button code{font:500 .72rem/1.4 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:normal;color:var(--rg-text,#213635)}
.beta-worlds-grid button small{font-size:.69rem;margin-top:auto;color:var(--rg-muted,#627670)}
.beta-worlds-grid button.cleared{border-color:#439b84}
.beta-worlds-grid button.cleared small::before{content:'✓ ';color:#31957a;font-weight:900}
.beta-world-operation{font-size:.76rem;line-height:1.55;color:var(--rg-muted,#627670);margin:12px 0 4px}
.beta-banned{fill:rgba(219,65,65,.18);stroke:#d25155;stroke-width:3.4;stroke-dasharray:7 5;pointer-events:none}
.beta-gate-speed{stroke:#c6962e;fill:rgba(211,169,51,.15)}
.beta-gate-timed{stroke:#9d79cd;fill:rgba(147,105,199,.15)}
.beta-gate-direction{stroke:#638bc2;fill:rgba(90,133,189,.16)}
.beta-gate-group text{pointer-events:none}
#beta-board.placing{cursor:crosshair;outline:3px solid var(--rg-accent,#08786f);outline-offset:-3px}
.beta-designer{margin:23px -2px 0;border:1px solid var(--rg-border,#dbe5dd);border-radius:13px;background:var(--rg-surface-muted,#f3f6f0);overflow:hidden}
.beta-designer>summary{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:15px;cursor:pointer;list-style:none;font-weight:800;font-size:.84rem}
.beta-designer>summary::-webkit-details-marker{display:none}
.beta-designer>summary:before{content:'▸';color:var(--rg-accent,#08786f)}
.beta-designer[open]>summary:before{content:'▾'}
.beta-designer>summary small{color:var(--rg-muted,#627670);font-weight:500;font-size:.7rem}
.beta-designer-content{padding:0 14px 15px}
.beta-designer-intro{font-size:.77rem;line-height:1.55;color:var(--rg-muted,#627670);margin:0 0 16px}
.beta-rule-heading{margin:14px 0 9px;color:var(--rg-text,#213635);font-weight:850;font-size:.75rem}
.beta-rule-toggles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.beta-rule-toggles label{display:flex;align-items:center;gap:7px;font-size:.72rem;cursor:pointer;line-height:1.25}
.beta-rule-toggles input{width:17px;height:17px;accent-color:var(--rg-accent,#08786f);flex:none}
.beta-palette{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.beta-palette button{min-height:42px;background:var(--rg-control,#fffefa);border:1px solid var(--rg-border,#dbe5dd);color:var(--rg-text,#213635);border-radius:9px;padding:7px 8px;cursor:pointer;font-size:.73rem;line-height:1.25}
.beta-palette button[aria-pressed="true"]{border:2px solid var(--rg-accent,#08786f);background:var(--rg-control-hover,#edf5ef);font-weight:800}
.beta-numeric-grid{margin-top:13px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.beta-numeric-grid label{font-size:.69rem;color:var(--rg-muted,#627670);display:flex;flex-direction:column;gap:4px;font-weight:700}
.beta-numeric-grid input{width:100%;min-width:0;padding:8px;border-radius:8px;border:1px solid var(--rg-border,#dbe5dd);background:var(--rg-control,#fffefa);color:var(--rg-text,#213635);font-size:.8rem}
.beta-placement-note{padding:10px 11px;margin:14px 0;border:1px solid var(--rg-border,#dbe5dd);border-left:3px solid var(--rg-accent,#08786f);border-radius:8px;background:var(--rg-control,#fffefa);font-size:.74rem;line-height:1.5;color:var(--rg-muted,#627670)}
.beta-rule-item{border-bottom:1px solid var(--rg-border,#dbe5dd);padding:10px 0;display:flex;justify-content:space-between;align-items:center;gap:9px}
.beta-rule-item:last-child{border-bottom:none}
.beta-rule-item b{display:block;font-size:.73rem}
.beta-rule-item small{display:block;font-size:.67rem;line-height:1.55;color:var(--rg-muted,#627670);margin-top:3px}
.beta-rule-item b.beta-warning{color:#bc5551}
.beta-rule-item button{font-size:.7rem;color:#ac5b47;border:1px solid var(--rg-border,#dbe5dd);border-radius:8px;padding:6px 9px;background:var(--rg-control,#fffefa);cursor:pointer}
.beta-designer-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:15px}
.beta-designer-actions button{font-size:.72rem;min-height:38px;cursor:pointer;padding:9px 11px;border-radius:9px}
@media(max-width:1180px){.beta-worlds-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.beta-worlds-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.beta-worlds-grid button{min-height:111px}.beta-worlds{padding:12px 12px 0}.beta-world-operation{font-size:.72rem}.beta-palette button{min-height:42px}.beta-intro h1{font-size:2.05rem}}

/* Production integration: quiet, accessible daily-mode navigation. */
.beta-modes{grid-template-columns:repeat(3,minmax(0,1fr))}
.mini-datebar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:0 0 14px;padding:9px 0;color:var(--rg-muted,#667875);font-size:.78rem}
.mini-datebar label{font-weight:750}
.mini-datebar input{border:1px solid var(--rg-border,#dce6dd);border-radius:9px;padding:6px 9px;color:var(--rg-text);background:var(--rg-surface,#fffdf8);font:inherit}
#minigame-title{color:var(--rg-text)}
.visually-hidden{position:absolute!important;clip:rect(0,0,0,0)!important;white-space:nowrap;width:1px;height:1px;overflow:hidden}
@media(max-width:480px){.beta-modes{grid-template-columns:1fr 1fr}.beta-modes button{padding:10px;min-height:54px}}


/* Main-game parity: graph-first workspace, compact mode switcher and a real
   MathLive track editor. Scoped to minigames so original gameplay is unchanged. */
body:has(#beta-playground){height:100dvh;max-height:100dvh;overflow:hidden}
.minigame-top{flex:0 0 auto;min-height:58px;padding:9px clamp(12px,2vw,30px)}
.minigame-top .brand{font-size:1.33rem;font-weight:850}
.minigame-top nav{display:flex;align-items:center;gap:clamp(7px,1.3vw,19px);margin-left:auto;font-size:.81rem}
.minigame-top nav>a{color:var(--rg-muted);text-decoration:none;white-space:nowrap}
.minigame-top nav>a[aria-current="page"]{color:var(--rg-accent);font-weight:850}
.minigame-top .nav-more{position:relative}
.minigame-top .nav-more summary{cursor:pointer;list-style:none;border:1px solid var(--rg-border);border-radius:9px;padding:7px 10px}
.minigame-top .nav-more summary::-webkit-details-marker{display:none}
.minigame-top .nav-more-links{position:absolute;right:0;top:calc(100% + 6px);z-index:30;width:165px;display:grid;gap:2px;background:var(--rg-surface);border:1px solid var(--rg-border);border-radius:11px;box-shadow:var(--rg-shadow);padding:7px}
.minigame-top .nav-more-links a{padding:9px;text-decoration:none;font-size:.79rem;border-radius:7px;color:var(--rg-text)}
.minigame-top .nav-more-links a:hover{background:var(--rg-control-hover)}
#beta-playground.beta-main{height:calc(100dvh - var(--rg-header-h,60px));max-width:1640px;display:flex;flex-direction:column;gap:9px;min-height:0;padding:8px clamp(8px,1.5vw,20px) 10px;overflow:hidden}
.mini-topline{display:flex;gap:11px;align-items:center;min-width:0;flex-wrap:wrap;padding:0 2px}
.mini-identity{display:grid;gap:2px;margin-right:auto;min-width:130px}
.mini-identity .eyebrow{font-size:.57rem;letter-spacing:.1em}
#minigame-title{font-size:.87rem;font-weight:800;letter-spacing:-.015em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:270px}
#beta-playground .beta-modes{display:flex;align-items:center;gap:5px;flex:0 1 auto;margin:0;min-width:0}
#beta-playground .beta-modes button{min-height:35px;padding:6px 10px;border-radius:10px;text-align:center;white-space:nowrap}
#beta-playground .beta-modes button strong{font-size:.73rem;font-weight:800}
#beta-playground .beta-modes button small{display:none}
#beta-playground .mini-datebar{margin:0;padding:0;gap:6px;font-size:.69rem;flex-wrap:nowrap}
#beta-playground .mini-datebar input{font-size:.72rem;max-width:126px;min-height:34px}
#minigame-date-note{display:none}
#beta-playground .beta-layout{display:grid;grid-template-columns:minmax(0,1.75fr) minmax(295px,.79fr);gap:clamp(9px,1.2vw,17px);height:100%;min-height:0;align-items:stretch}
#beta-playground .beta-board-card{position:relative;display:flex;flex-direction:column;min-width:0;min-height:0;max-height:100%;overflow:hidden;border-radius:16px}
#beta-playground .beta-board-top{min-height:45px;padding:9px 13px;gap:8px;flex:0 0 auto;background:var(--rg-surface)}
#beta-playground .beta-score{gap:10px;font-size:.74rem}
#beta-playground .beta-svg-wrap{flex:1 1 auto;min-height:140px;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}
#beta-board{width:100%;height:100%;max-height:100%;display:block;object-fit:contain;touch-action:pan-y}
#beta-playground .beta-message{flex:0 0 auto;min-height:37px;max-height:78px;overflow:auto;padding:10px 13px;font-size:.76rem;line-height:1.45;background:var(--rg-surface-muted);border-top:1px solid var(--rg-border)}
#beta-playground .beta-editor-card{display:flex;flex-direction:column;min-height:0;max-height:100%;height:100%;overflow:hidden;padding:clamp(10px,1.2vw,16px);border-radius:16px}
#beta-playground .beta-controls{display:flex;align-items:center;flex:0 0 auto;gap:7px;margin:0 0 10px;padding:0;flex-wrap:nowrap}
#beta-playground .beta-controls .primary{flex:1;min-height:43px}
#beta-playground .beta-controls .secondary{flex:0 0 auto;min-height:43px}
#beta-playground .mini-workbench-heading{display:flex;justify-content:space-between;gap:8px;align-items:center;flex:0 0 auto;margin:0;border-top:1px solid var(--rg-border);padding-top:10px}
#beta-playground .mini-workbench-heading h2{margin:0;font-size:1rem}
#beta-phase{font-size:.69rem;font-weight:850;color:var(--rg-accent)}
#beta-description{font-size:.74rem;line-height:1.48;margin:6px 0 9px;color:var(--rg-muted);flex:0 0 auto}
#rich-editor-status:empty{display:none}
#rich-editor-status{flex:0 0 auto;margin:0 0 6px}
#beta-playground #beta-editor{flex:1 1 auto;min-height:85px;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-gutter:stable;padding:0 4px 8px 1px}
#beta-playground .beta-equation-row{margin:4px 0 10px;padding:10px 12px}
#beta-playground .beta-equation-row .row-heading{font-size:.8rem}
#beta-playground .beta-equation-row .row-heading small{font-size:.74rem;font-weight:500;color:var(--rg-muted)}
#beta-playground .beta-equation-row .equation-label-row{margin:6px 0 6px}
#beta-playground .beta-equation-row .input-label{font-size:.76rem;margin:0}
#beta-playground .beta-equation-row .show-math-keyboard{font-size:.73rem;padding:5px 8px}
#beta-playground .beta-equation-row input.equation{width:100%;font-size:.97rem;min-height:51px;background:var(--rg-control);color:var(--rg-text);border:1px solid var(--rg-border)}
#beta-playground math-field.rich-equation{display:block;min-height:73px;width:100%;font-size:1.45rem;line-height:1.45;padding:9px 10px;border-radius:10px;background:var(--rg-control);border:1.5px solid var(--rg-border);color:var(--rg-text);--caret-color:var(--rg-accent);--keyboard-zindex:1000}
#beta-playground math-field.rich-equation::part(virtual-keyboard-toggle){display:inline-flex!important}
#beta-playground math-field.rich-equation::part(menu-toggle){display:none}
#beta-playground .beta-error{flex:0 0 auto;margin:2px 0;font-size:.75rem}
#beta-playground .beta-error:empty{display:none}
#beta-playground .beta-help{flex:0 0 auto;margin:5px 0 0;line-height:1.45;font-size:.70rem!important}
#beta-playground .beta-note{flex:0 0 auto;margin:9px 0 0;padding:8px 0 0}
#beta-playground .beta-note strong{font-size:.75rem}
#beta-playground .beta-note p{font-size:.69rem;line-height:1.4;margin:3px 0}
#beta-parameters{flex:0 0 auto;max-height:32%;overflow-y:auto;border-top:1px solid var(--rg-border);padding:6px 2px}
#beta-parameters:empty{display:none}
.beta-param-title{display:flex;justify-content:space-between;gap:9px;font-size:.76rem;font-weight:850;margin:0 0 5px}
.beta-param-title small{font-size:.68rem;color:var(--rg-muted);font-weight:500}
.beta-param{display:grid;grid-template-columns:20px minmax(0,1fr) 71px;align-items:center;gap:9px;padding:4px 0;font-size:.78rem;font-weight:700}
.beta-param-range{min-width:0;width:100%;accent-color:var(--rg-accent)}
.beta-param-value{min-width:0;width:100%;padding:6px;border:1px solid var(--rg-border);border-radius:7px;background:var(--rg-control);color:var(--rg-text);font-size:.76rem}
#beta-playground .beta-board-card .beta-worlds[hidden],#beta-playground .beta-designer[hidden]{display:none!important}
@media(max-width:1050px){#beta-playground .beta-layout{grid-template-columns:minmax(0,1.35fr) minmax(270px,.85fr)}.mini-topline{gap:7px}#minigame-title{max-width:180px}}
@media(max-width:860px){
 body:has(#beta-playground){overflow:hidden}
 #beta-playground.beta-main{padding:6px 7px 8px;gap:6px}
 #beta-playground .beta-layout{display:flex;flex-direction:column;gap:8px}
 #beta-playground .beta-board-card{flex:0 0 47%;max-height:47%;width:100%}
 #beta-playground .beta-editor-card{flex:1 1 auto;max-height:none;height:auto;width:100%;padding:9px}
 #beta-playground .beta-board-top{min-height:33px;padding:6px 9px}
 #beta-playground .beta-board-top strong{font-size:.79rem}
 #beta-playground .beta-message{padding:6px 9px;font-size:.72rem;min-height:29px;max-height:50px}
 #beta-playground .beta-controls{margin-bottom:6px}
 #beta-playground .beta-controls button{min-height:37px!important;padding:7px 10px}
 #beta-playground .mini-workbench-heading{padding-top:5px}
 #beta-playground .beta-equation-row{padding:8px 9px}
 #beta-playground math-field.rich-equation{min-height:62px;font-size:1.27rem}
 #beta-playground .beta-note{display:none}
 #beta-description{margin:4px 0 5px}
 .minigame-top{padding:7px 9px;min-height:49px}
 .minigame-top nav{gap:9px;font-size:.75rem}
 .mini-topline{flex-wrap:wrap}
 .mini-identity{flex:1 1 auto}
 #beta-playground .mini-datebar{flex:0 0 auto}
 #beta-playground .beta-modes{order:3;width:100%;flex:1 1 100%;justify-content:stretch}
 #beta-playground .beta-modes button{flex:1 1 0;min-width:0}
}
@media(max-width:480px){
 .minigame-top nav>a:not([aria-current="page"]){display:none}
 .minigame-top .brand{font-size:1.19rem}
 #beta-playground .beta-modes button{padding:6px 4px;min-height:34px}
 #beta-playground .beta-modes button strong{font-size:.68rem;white-space:normal;line-height:1.12}
 #beta-playground .mini-datebar label{display:none}
 #beta-playground .beta-board-card{flex-basis:43%;max-height:43%}
 #beta-playground .beta-score{gap:5px;font-size:.66rem}
 #beta-playground #beta-editor{scrollbar-gutter:auto}
 #beta-playground .beta-equation-row .show-math-keyboard{font-size:.69rem}
}


/* Compact play-first minigames, matching the main editor's fixed full graph.
   No document scroll during play: only equation/parameter panes are scrollable. */
body:has(#beta-playground){height:100dvh;overflow:hidden}
#beta-playground.beta-main{
 height:calc(var(--rg-mini-visible-height,100dvh) - var(--rg-header-h,60px));
 max-height:calc(var(--rg-mini-visible-height,100dvh) - var(--rg-header-h,60px));
 min-height:0;max-width:1660px;overflow:hidden;gap:0;
 padding:6px clamp(7px,1.1vw,16px) 8px
}
#beta-playground .beta-layout{
 min-height:0;max-height:100%;height:100%;gap:clamp(8px,1vw,14px);
 grid-template-columns:minmax(0,1.9fr) minmax(280px,.78fr)
}
#beta-playground .beta-board-card{
 min-width:0;min-height:0;height:100%;max-height:100%;
 display:flex;flex-direction:column;overflow:hidden
}
#beta-playground .beta-board-top{
 flex:0 0 auto;min-height:29px;padding:4px 11px;
 gap:4px;justify-content:flex-end;background:var(--rg-surface)
}
#beta-playground .beta-score{margin-left:auto;align-items:center;gap:11px;line-height:1.2;font-size:.68rem}
#beta-playground .beta-svg-wrap{
 flex:1 1 0;min-width:0;min-height:0;height:auto;width:100%;
 display:flex;align-items:center;justify-content:center;overflow:hidden;
 background:var(--rg-board)
}
#beta-playground #beta-board{
 display:block;width:100%;height:100%;min-width:0;min-height:0;
 max-width:100%;max-height:100%;object-fit:contain
}
#beta-playground .beta-editor-card{
 display:flex;flex-direction:column;gap:0;height:100%;max-height:100%;
 min-width:0;min-height:0;overflow:hidden;padding:clamp(9px,1vw,13px)
}
#beta-playground .mini-topline{
 display:flex;flex:0 0 auto;gap:5px;align-items:center;
 flex-wrap:nowrap;min-width:0;padding:0 0 8px;margin:0
}
#beta-playground .mini-identity{
 position:absolute!important;width:1px!important;height:1px!important;
 overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap
}
#beta-playground .beta-modes{
 display:flex;flex:1 1 auto;min-width:0;gap:4px;align-items:center;margin:0
}
#beta-playground .beta-modes button{
 flex:1 1 auto;min-width:0;width:auto;min-height:32px;padding:6px 7px;
 text-align:center;border-radius:8px;white-space:nowrap
}
#beta-playground .beta-modes button strong{font-size:.7rem;letter-spacing:-.01em}
#beta-playground .mini-datebar{flex:0 0 auto;gap:0;min-width:0;margin:0;padding:0}
#beta-playground .mini-datebar label{
 position:absolute!important;width:1px!important;height:1px!important;
 overflow:hidden!important;clip-path:inset(50%)!important
}
#beta-playground .mini-datebar input{
 display:block;max-width:120px;min-width:110px;min-height:32px;padding:5px 6px;
 border-radius:8px;font-size:.69rem
}
#beta-playground .beta-controls{flex:0 0 auto;margin:0 0 7px;gap:6px}
#beta-playground .beta-controls .primary,#beta-playground .beta-controls .secondary{
 min-height:39px;padding:7px 10px;font-size:.8rem
}
#beta-playground .mini-workbench-heading{
 flex:0 0 auto;margin:0;padding:7px 0 0;border-top:1px solid var(--rg-border)
}
#beta-playground .mini-workbench-heading h2{font-size:.91rem}
#beta-playground .beta-message{
 flex:0 0 auto;min-height:0;max-height:43px;overflow:auto;
 margin:0;padding:4px 0 7px;border:0;background:transparent;
 font-size:.7rem;line-height:1.37;color:var(--rg-muted)
}
#beta-playground #beta-editor{
 flex:1 1 auto;min-height:70px;overflow-y:auto;overflow-x:hidden;
 overscroll-behavior:contain;scrollbar-gutter:stable
}
#beta-playground .beta-equation-row{margin:2px 0 8px;padding:8px 10px}
#beta-playground .beta-equation-row .row-heading{font-size:.75rem}
#beta-playground .beta-equation-row .equation-label-row{margin:4px 0}
#beta-playground .beta-equation-row .equation-label-row .input-label{
 position:absolute!important;width:1px!important;height:1px!important;
 overflow:hidden!important;clip-path:inset(50%)!important
}
#beta-playground .beta-equation-row .show-math-keyboard{margin-left:auto;font-size:.70rem;padding:3px 6px}
#beta-playground math-field.rich-equation{min-height:65px;padding:8px 10px;font-size:1.35rem}
#beta-playground .beta-error{font-size:.71rem;margin:2px 0}
#beta-playground #beta-parameters{flex:0 0 auto;max-height:28%;min-height:0;padding:5px 1px}
#beta-playground .mini-rules{
 flex:0 0 auto;margin:5px 0 0;padding:5px 0 0;
 border-top:1px solid var(--rg-border);color:var(--rg-muted)
}
#beta-playground .mini-rules summary{
 display:flex;justify-content:space-between;align-items:center;
 cursor:pointer;list-style:none;font-size:.71rem;font-weight:700;
 color:var(--rg-muted);padding:3px 0
}
#beta-playground .mini-rules summary::-webkit-details-marker{display:none}
#beta-playground .mini-rules[open] summary span{transform:rotate(180deg)}
#beta-playground .mini-rules p{
 font-size:.72rem;line-height:1.4;color:var(--rg-muted);
 margin:5px 0 0;max-height:125px;overflow-y:auto
}
#beta-playground .mini-rules .beta-help{font-size:.69rem!important}
#beta-playground .beta-note{display:none!important}
#beta-playground .beta-designer[hidden]{display:none!important}
@media(max-width:1050px) and (min-width:861px){
 #beta-playground .beta-layout{grid-template-columns:minmax(0,1.45fr) minmax(278px,.85fr)}
 #beta-playground .beta-modes button{padding-inline:4px}
 #beta-playground .mini-datebar input{max-width:112px;min-width:106px}
}
@media(max-width:860px){
 #beta-playground.beta-main{padding:5px 7px 7px}
 #beta-playground .beta-layout{display:flex;flex-direction:column;gap:6px}
 #beta-playground .beta-board-card{
  flex:0 0 min(56%,calc((100vw - 14px)*.69 + 36px));
  max-height:min(56%,calc((100vw - 14px)*.69 + 36px));
  width:100%;height:auto;min-height:0;position:relative;top:auto
 }
 #beta-playground .beta-board-top{min-height:27px;padding:4px 8px}
 #beta-playground .beta-svg-wrap{flex:1 1 0;min-height:0}
 #beta-playground .beta-editor-card{
  flex:1 1 0;min-height:0;max-height:none;height:auto;width:100%;
  padding:8px 10px
 }
 #beta-playground .mini-topline{flex:0 0 auto;gap:6px;padding-bottom:6px;order:0;flex-wrap:nowrap}
 #beta-playground .beta-modes{width:auto;flex:1 1 auto;order:0}
 #beta-playground .beta-modes button{flex:1 1 auto;min-height:31px;padding:5px 6px}
 #beta-playground .mini-datebar{order:0;flex:0 0 auto}
 #beta-playground .beta-controls{margin:0 0 5px}
 #beta-playground .beta-controls button{min-height:36px!important}
 #beta-playground .mini-workbench-heading{padding-top:5px}
 #beta-playground .beta-message{max-height:32px;min-height:0;padding:3px 0}
 #beta-playground #beta-editor{min-height:55px}
 #beta-playground math-field.rich-equation{min-height:58px;font-size:1.23rem}
 #beta-playground .mini-rules{margin-top:3px}
}
@media(max-width:480px){
 #beta-playground .beta-board-card{
  flex-basis:min(55%,calc((100vw - 14px)*.69 + 36px));
  max-height:min(55%,calc((100vw - 14px)*.69 + 36px))
 }
 #beta-playground .mini-topline{gap:4px}
 #beta-playground .beta-modes{width:auto;gap:3px}
 #beta-playground .beta-modes button{min-height:31px;padding:4px 5px}
 #beta-playground .beta-modes button strong{font-size:.67rem}
 #beta-playground .mini-datebar input{width:111px;max-width:111px;min-width:0;padding:5px 4px}
 #beta-playground .beta-score{gap:8px;font-size:.67rem}
 #beta-playground .beta-equation-row{padding:7px 8px}
}

/* Shared maths focus mode for phones and tablets: only graph and active input.
   The editor ends at the top of MathLive's floating virtual keyboard. */
@media(max-width:1180px), (max-width:1400px) and (pointer:coarse){
 body.rg-mobile-math-editing #beta-playground.beta-main{
  height:var(--rg-edit-visible-height,100dvh)!important;
  max-height:var(--rg-edit-visible-height,100dvh)!important;
  padding:3px 6px 4px!important
 }
 body.rg-mobile-math-editing #beta-playground .beta-layout{
  display:flex!important;flex-direction:column!important;
  align-items:stretch!important;height:100%!important;gap:5px!important
 }
 body.rg-mobile-math-editing #beta-playground .beta-board-card{
  flex:0 0 56%!important;max-height:56%!important;min-height:0!important;
  height:56%!important;width:100%
 }
 body.rg-mobile-math-editing #beta-playground .beta-board-top,
 body.rg-mobile-math-editing #beta-playground #beta-worlds{display:none!important}
 body.rg-mobile-math-editing #beta-playground .beta-svg-wrap{flex:1 1 0;min-height:0}
 body.rg-mobile-math-editing #beta-playground .beta-editor-card{
  flex:1 1 0!important;min-height:0!important;max-height:none!important;
  height:auto!important;padding:5px 7px!important
 }
 body.rg-mobile-math-editing #beta-playground .mini-topline,
 body.rg-mobile-math-editing #beta-playground .beta-controls,
 body.rg-mobile-math-editing #beta-playground .mini-workbench-heading,
 body.rg-mobile-math-editing #beta-playground .beta-message,
 body.rg-mobile-math-editing #beta-playground #rich-editor-status,
 body.rg-mobile-math-editing #beta-playground #beta-parameters,
 body.rg-mobile-math-editing #beta-playground #beta-error,
 body.rg-mobile-math-editing #beta-playground #beta-rule-help,
 body.rg-mobile-math-editing #beta-playground #beta-designer{display:none!important}
 body.rg-mobile-math-editing #beta-playground #beta-editor{
  flex:1 1 0!important;min-height:0!important;overflow-y:auto!important;
  padding:0!important
 }
 body.rg-mobile-math-editing #beta-playground #beta-editor .beta-equation-row:not(.rg-mobile-active){
  display:none!important
 }
 body.rg-mobile-math-editing #beta-playground #beta-editor .beta-equation-row.rg-mobile-active{
  margin:0!important;padding:5px 8px!important
 }
 body.rg-mobile-math-editing #beta-playground #beta-editor .rg-mobile-active .row-heading,
 body.rg-mobile-math-editing #beta-playground #beta-editor .rg-mobile-active .equation-label-row,
 body.rg-mobile-math-editing #beta-playground #beta-editor .rg-mobile-active .row-error{
  display:none!important
 }
 body.rg-mobile-math-editing #beta-playground #beta-editor .rg-mobile-active math-field.rich-equation,
 body.rg-mobile-math-editing #beta-playground #beta-editor .rg-mobile-active input.equation:not([hidden]){
  display:block!important;min-height:56px!important;width:100%;max-height:100%
 }
}
