:root{font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;color:#243337;background:#f8f5ed;font-synthesis:none}*{box-sizing:border-box}body{margin:0}a{color:inherit}button,input{font:inherit}button{cursor:pointer}button:disabled{opacity:.55;cursor:default}:focus-visible{outline:3px solid #cb8218;outline-offset:3px}.top{display:flex;align-items:center;justify-content:space-between;gap:1.5rem;padding:17px clamp(16px,4vw,60px);border-bottom:1px solid #deddd5;background:#fffcf6;flex-wrap:wrap}.brand{font-size:1.35rem;text-decoration:none;color:#0c6767;letter-spacing:-.05em}.top nav{display:flex;gap:clamp(9px,2vw,25px);flex-wrap:wrap;font-size:.9rem}.top nav a{text-decoration:none;color:#52605e}.top nav a:hover{text-decoration:underline}main{max-width:1480px;margin:auto;padding:30px clamp(14px,3vw,48px) 70px}.eyebrow{text-transform:uppercase;letter-spacing:.17em;color:#007979;font-size:.72rem;font-weight:800}.game-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:24px}.game-head h1,h1{font-size:clamp(1.9rem,3vw,3rem);letter-spacing:-.05em;line-height:1.12;margin:8px 0}.game-head p{margin:8px 0 0;color:#566362}.tag{background:#e7eee9;border-radius:30px;padding:10px 15px;font-size:.8rem;color:#006962;white-space:nowrap}.game-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(290px,.8fr);align-items:start;gap:22px}.board-panel,.workbench{border:1px solid #e1ddd3;background:#fffcf6;border-radius:16px;overflow:hidden;box-shadow:0 8px 32px #253b3311}.board-top{padding:17px 22px;display:flex;justify-content:space-between;gap:10px}.board-top span{font-size:.8rem;color:#5b6865}#board-wrap{background:#faf8f1;aspect-ratio:5/4}#board{width:100%;height:100%;display:block}.gridline{stroke:#dce5df;stroke-width:.7}.axis{stroke:#91aaa1;stroke-width:1.6}.tick{font-size:11px;fill:#7d9389}.track{fill:none;stroke:#0b8681;stroke-width:7;stroke-linejoin:round;stroke-linecap:round}.obstacle{fill:none;stroke:#4b5b5b;stroke-width:6}.target{fill:#f3c45b;stroke:#ba831b;stroke-width:2}.target.collected{fill:#dee6cf;stroke:#64967d}.target-label{font-size:12px;text-anchor:middle;fill:#65460a;font-weight:800}.marble{fill:#e47750;stroke:#873c2a;stroke-width:2}.board-desc{font-size:.78rem;line-height:1.5;padding:0 22px;color:#64726a}.status{margin:14px 22px;padding:15px;background:#e9f0eb;border-left:3px solid #14847f;border-radius:4px;min-height:60px;line-height:1.5}.action-bar{display:flex;padding:0 22px 20px;gap:10px;flex-wrap:wrap}.primary,.secondary,.pill{padding:12px 17px;border-radius:8px;min-height:44px;font-weight:700;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}.primary{background:#006e6b;color:white;border:1px solid #006e6b}.primary:hover{background:#005651}.secondary,.pill{background:#f8f8f2;color:#1b4949;border:1px solid #b8cbc5}.secondary:hover{background:#ecf3ed}.subtle{background:transparent;border:0;color:#286c68;padding:8px}.subtle:hover{text-decoration:underline}.workbench{padding:22px}.workbench h2{font-size:1.15rem;margin:0}.workbench-top p{font-size:.86rem;line-height:1.5;color:#64716c}.eq-row{padding:15px;background:#f3f5ee;border:1px solid #d7e0d7;border-radius:10px;margin-top:14px}.row-heading{display:flex;justify-content:space-between;align-items:center;font-weight:700;font-size:.88rem}.row-heading input{accent-color:#007d75}.input-label{display:block;margin:12px 0 5px;font-size:.8rem}.equation{width:100%;background:white;border:1px solid #a6bdb5;border-radius:7px;padding:12px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:1rem;min-height:45px}.domain{display:flex;gap:12px;margin-top:10px}.domain label{font-size:.77rem;flex:1;min-width:0}.domain input{width:100%;padding:9px;border:1px solid #b8c6be;border-radius:6px;margin-top:5px}.row-error{color:#a12c25;font-size:.76rem;margin:5px 0 0}.row-error:empty{display:none}.full{width:100%;margin-top:12px}.chips{font-size:.79rem;color:#64716c;margin-top:15px}.chips button{display:block}.tools{display:flex;gap:5px;flex-wrap:wrap;margin-top:15px}.save-status{font-size:.73rem;color:#6b786e;margin-top:15px}.simple{max-width:820px;margin:36px auto}.simple p{line-height:1.75;color:#55635e}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(215px,1fr));gap:13px;margin-top:25px}.card-link{border:1px solid #d9dfd6;background:#fffcf6;border-radius:12px;padding:23px;text-decoration:none;display:flex;flex-direction:column;gap:10px}.card-link span{color:#69736d;font-size:.87rem}.stats{display:flex;gap:20px;flex-wrap:wrap}.stats>div{padding:25px;background:white;border:1px solid #d9dfd6;border-radius:10px;min-width:150px;display:grid}.stats strong{font-size:2rem;color:#00736e}.stats span{font-size:.85rem}footer{padding:25px;text-align:center;font-size:.78rem;color:#6c7872;border-top:1px solid #e3e1d9}footer a{margin:0 5px}@media(max-width:860px){main{padding:18px 12px 90px}.game-layout{grid-template-columns:minmax(0,1fr)}.workbench{padding:15px}.game-head{align-items:start}.tag{display:none}.action-bar{position:sticky;bottom:0;background:#fffcf6;padding:10px 14px;z-index:3;box-shadow:0 -7px 16px #24333710}.action-bar button{flex:1;padding:12px 8px}.board-top{padding:12px 15px}.board-desc{padding:0 15px}.status{margin:10px 14px}.top{gap:10px;padding:12px}.top nav{font-size:.8rem;gap:12px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Public beta information, distinct from gameplay status messages. */
.beta-banner{margin:0 auto;padding:7px 18px;max-width:1180px;text-align:center;font-size:.79rem;font-weight:600;color:#21483f;background:#e7f1eb;border:1px solid #bdd6c8;border-radius:0 0 12px 12px}

/* Advanced equation entry: keyboard-first, accessible, native MathML preview. */
.new-feature{font-size:.62rem;color:#04776d;letter-spacing:.06em;font-weight:800;vertical-align:super}
.equation{font-size:1.04rem;font-family:ui-monospace,monospace}
.notation{display:flex;align-items:center;gap:.5rem;min-height:49px;margin-top:6px;padding:8px 12px;overflow-x:auto;white-space:nowrap;border:1px solid #d2ddd4;border-radius:8px;background:#fbfbf7;color:#224b43}
.notation math{font-size:1.3rem;line-height:1.5;max-width:none;flex-shrink:0}
.notation-placeholder{font-size:.82rem;color:#667f75;font-style:italic;white-space:pre}
.eq-row:focus-within{border-color:#19837c;box-shadow:0 0 0 1px #19837c33}

/* MathLive is the EDITABLE field, not a second read-only preview. */
.math-editor-status{font-size:.78rem;line-height:1.5;margin:10px 0;color:#496b63}
.equation[hidden],.notation[hidden]{display:none!important}
math-field.rich-equation{display:block;box-sizing:border-box;min-height:62px;width:100%;padding:12px 14px;border:1.5px solid #7fa69b;border-radius:10px;background:#fff;color:#122e2b;font-family:inherit;font-size:1.37rem;line-height:1.5;overflow-x:auto;--caret-color:#007a70;--selection-background-color:#d9efe8;--keyboard-zindex:100;--contains-highlight-background-color:#edf6f2}
math-field.rich-equation:focus-within{outline:3px solid #ae7d22;outline-offset:2px;border-color:#0a8176}
@media(max-width:540px){math-field.rich-equation{font-size:1.2rem;min-height:58px}}


/* Fast play: Launch is directly above the graph, and stays visible while
   the board is scrolled through. Does not cover the formula editor. */
.board-panel{overflow:visible}
.board-top{background:#fffcf6;border-radius:16px 16px 0 0;align-items:center;padding-bottom:9px}
.action-bar{position:sticky;top:0;z-index:5;display:flex;gap:9px;align-items:center;padding:9px 18px 11px;background:#fffcf6ed;backdrop-filter:blur(10px);border-block:1px solid #e2e9e0;box-shadow:0 3px 9px #1b454314}
.action-bar .primary{flex:1.2;white-space:nowrap}
.action-bar .secondary{flex:0 1 auto;white-space:nowrap}
.board-extras{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:7px;padding:8px 18px;color:#42675c;background:#fbf9f1;font-size:.79rem}
#marble-count{color:#647970;font-size:.73rem}
.board-panel .status{margin-block:12px 20px}

/* Faceted collectibles instead of numbered circular targets. */
.gem-aura{fill:#ffc962;opacity:.18;transform-origin:center;animation:gem-glow 1.8s ease-in-out infinite alternate}
.gem-shape{fill:#ffc342;stroke:#a76416;stroke-width:2.2;stroke-linejoin:round;filter:drop-shadow(0 1px 2px #9b5a2250)}
.gem-facet{fill:#fff1a0;stroke:#e8a134;stroke-width:.7;opacity:.9}
.gem-glint{stroke:white;stroke-width:2.1;stroke-linecap:round;opacity:.92}
.gem-spark{fill:white;filter:drop-shadow(0 0 2px #fff8d7)}
.gem-target.collected .gem-shape{fill:#afdac9;stroke:#5b9c84;opacity:.42}
.gem-target.collected .gem-facet,.gem-target.collected .gem-glint,.gem-target.collected .gem-spark{opacity:0}
.gem-target.collected .gem-aura{fill:#8ad4b9;opacity:.15;animation:none}
@keyframes gem-glow{from{opacity:.10;transform:scale(.92)}to{opacity:.33;transform:scale(1.1)}}
/* Glossy, colored marbles with three distinct tints. */
.marble-shadow{fill:#172f34;opacity:.17}
.marble{fill:#ed8052;stroke:#91462d;stroke-width:1.8}
.marble-ball.ball-1 .marble{fill:#60b9bd;stroke:#247481}
.marble-ball.ball-2 .marble{fill:#ad91db;stroke:#674a99}
.marble-shine{fill:white;opacity:.87}
.marble-swirl{fill:none;stroke:#ffebb0;stroke-width:1;opacity:.67}
.marble-ball.ball-1 .marble-swirl{stroke:#ddffff}
.marble-ball.ball-2 .marble-swirl{stroke:#ecddff}
@media(max-width:860px){
 .action-bar{position:sticky;top:0;bottom:auto;padding:9px 10px}
 .action-bar button{flex:0 1 auto;min-height:42px;padding:10px 9px;font-size:.82rem}
 .action-bar .primary{flex:1 1 auto}
 .board-extras{padding:8px 12px}
}
@media(prefers-reduced-motion:reduce){.gem-aura{animation:none}}

/* Fifteen-marble stream: fixed emitter, individual drops, no optional extras. */
.stream-label{font-size:.76rem;color:#3e6960;font-weight:650;line-height:1.4}
#marble-count{white-space:nowrap;color:#006e6b;font-size:.8rem;font-variant-numeric:tabular-nums}

/* Simplify the MathLive context menu via filtered items, retaining its
   keyboard toggle and normal editing actions. */
/* Normal editing menu remains available; excluded options are filtered in JS. */

/* Less heavy-looking geometry: visual width only; physical radii unchanged. */
.track{stroke-width:5.5}

/* Visible maths keyboard control, placed beside the equation label. */
.equation-label-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:12px 0 7px}
.equation-label-row .input-label{margin:0}
.show-math-keyboard{font-size:.8rem;font-weight:700;padding:6px 9px;border-radius:7px;white-space:nowrap}
.show-math-keyboard[hidden]{display:none!important}
math-field.rich-equation{font-family:ui-serif,Georgia,serif;min-height:74px;font-size:1.55rem}
math-field.rich-equation::part(virtual-keyboard-toggle){display:inline-flex!important}
math-field.rich-equation::part(menu-toggle){display:none}
@media(max-width:540px){math-field.rich-equation{min-height:68px;font-size:1.34rem}.show-math-keyboard{font-size:.76rem}}

/* Track-specific relational bounds, hidden until requested. */
.track-advanced{margin-top:15px;border:1px solid #c8d9d0;border-radius:9px;background:#f9faf6;overflow:hidden}
.track-advanced>summary{cursor:pointer;padding:12px 13px;font-size:.85rem;font-weight:700;color:#1c6059;list-style-position:inside}
.track-advanced[open]>summary{border-bottom:1px solid #d9e3db;background:#ecf4ed}
.bound-count{font-weight:500;color:#57766c}
.advanced-body{padding:11px 13px 14px}
.bound-description,.bound-hint{font-size:.76rem;line-height:1.5;color:#556d62;margin:4px 0 12px}
.bound-item{display:flex;align-items:end;gap:8px;margin:9px 0}
.bound-item label{flex:1;min-width:0;font-size:.76rem;color:#416056}
.bound-source{display:block;width:100%;margin-top:4px;background:white;border:1px solid #a7c2b3;border-radius:6px;padding:10px;font:inherit;font-size:.87rem;color:#173b32}
.remove-bound{font-size:1.3rem;min-width:38px;min-height:39px}
.add-bound{margin-top:9px;font-size:.78rem;padding:9px 12px;min-height:39px}
.bound-hint{margin:11px 0 0}

/* Automatic parameter sliders live inside each track's Advanced settings.
   Controls are deliberately compact, touch-friendly and never obstruct the
   typeset equation field or the launch button. */
.slider-section{padding:3px 0 14px;border-bottom:1px solid #d9e5dc;margin-bottom:14px}
.slider-section h3,.bounds-section h3{font-size:.92rem;line-height:1.4;margin:0 0 5px;color:#1d5f59}
.slider-tag{font-size:.56rem;font-weight:800;letter-spacing:.055em;color:#0d796c;border:1px solid #a3d8bf;background:#edfaf0;border-radius:4px;padding:3px 5px;vertical-align:middle;margin-left:4px}
.slider-description,.slider-help{font-size:.76rem;line-height:1.5;color:#5d7169;margin:5px 0 12px}
.parameter-slider{padding:12px;margin:10px 0;border:1px solid #c7ddd2;background:#fff;border-radius:10px;min-width:0}
.slider-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}
.slider-head label{font-size:1.03rem;font-weight:600;color:#145e58}
.slider-head strong{font-size:1.17rem;font-family:ui-serif,Georgia,serif;font-style:italic}
.slider-subtitle{font-size:.70rem;color:#657a70;font-weight:450;font-style:normal;margin-left:4px}
.slider-value{width:98px;max-width:42%;min-height:39px;text-align:right;font-size:.9rem;font-variant-numeric:tabular-nums;font-weight:700;border:1px solid #a4c5b5;border-radius:7px;padding:7px 9px;background:#f5fbf7;color:#164d42}
.slider-range{display:block;width:100%;height:28px;margin:7px 0 8px;cursor:pointer;accent-color:#078b7b;touch-action:pan-y}
.slider-config{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.slider-config label{font-size:.70rem;color:#5a6e64;font-weight:550}
.slider-limit{width:100%;display:block;min-width:0;margin-top:3px;font-size:.80rem;font-variant-numeric:tabular-nums;border:1px solid #c2d5c8;background:#fafdf9;border-radius:6px;padding:8px 7px;min-height:35px}
.slider-error{min-height:0;font-size:.75rem;color:#b22617;line-height:1.4;margin:6px 0 0}
.slider-error:empty{display:none}
.bounds-section{padding:2px 0}
@media(max-width:540px){.slider-head{gap:7px}.slider-config{gap:5px}.slider-limit{padding:7px 5px}.parameter-slider{padding:10px}.slider-value{max-width:38%}}

/* Polar tracks keep the standard equation field and use compact θ controls. */
.add-track-actions{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}
.add-track-actions button{flex:1 1 170px}
.curve-mode-section{margin:0 0 20px;padding-bottom:16px;border-bottom:1px solid #c8dacf}
.curve-kind-label{display:flex;align-items:center;gap:12px;justify-content:space-between;font-weight:650}
.curve-type{font:inherit;color:#145d54;background:#fff;border:1px solid #a6c6bc;border-radius:8px;padding:9px;max-width:180px}
.polar-interval{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0}
.polar-interval label{display:grid;gap:7px}
.polar-interval input{width:100%;padding:8px;border:1px solid #a6c6bc;border-radius:8px}
@media(max-width:400px){.curve-kind-label{flex-direction:column;align-items:stretch}.curve-type{max-width:none}}

/* Developer clean-up: display only tools that directly operate on a track. */
.game-head{margin-bottom:14px}
.game-head .tag{display:none}
.workbench-top{margin-bottom:6px}
.workbench{padding:18px}
.board-extras{justify-content:flex-end;padding:5px 16px}
#marble-count{font-size:.74rem}
.status:empty,.save-status:empty,.math-editor-status:empty{display:none}
.track-extra-actions{margin-top:13px;border-top:1px solid #e1e9df;padding-top:7px}
.track-extra-actions summary{font-size:.75rem;cursor:pointer;color:#47665e;padding:7px 0}
.track-extra-actions .tools{margin:4px 0 0}
.slider-section[hidden]{display:none}
.legacy-domain-warning{font-size:.78rem;line-height:1.4;color:#986110;border:1px solid #ecd6a0;background:#fff8e8;border-radius:8px;padding:9px}

#share[hidden]{display:none!important}


/* Soft-launch track cards: the first is open, the remaining tracks fold into
   one-line summaries. Track toggles do not re-mount MathLive or lose drafts. */
.eq-row{padding:12px 14px;min-width:0;margin-top:11px;box-shadow:0 1px 3px #204b3a09}
.row-heading{display:flex;gap:10px;align-items:center;min-height:44px}
.track-heading-text{display:flex;align-items:center;min-width:0;gap:10px;flex:1}
.track-enable{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;font-size:.95rem;font-weight:750;min-height:44px;cursor:pointer}
.track-enable input{width:19px;height:19px;margin:0;flex:none}
.track-mini-preview{display:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;color:#5b716a;font-family:ui-serif,Georgia,serif;font-size:.94rem;font-weight:450}
.eq-row.is-collapsed .track-mini-preview{display:block}
.eq-row.is-collapsed{background:#f8faf6}
.eq-row.is-collapsed .row-heading{min-height:44px}
.track-actions{display:flex;align-items:center;gap:3px;flex:none}
.track-actions button{min-width:43px;min-height:44px;display:inline-flex;justify-content:center;align-items:center;touch-action:manipulation;border-radius:8px}
.track-toggle{font-size:1.28rem;line-height:1;outline-offset:2px}
.track-body[hidden]{display:none!important}
.eq-row .row-error:empty{display:none}
.eq-row.is-collapsed .row-error:not(:empty){border-top:1px solid #f1d4c9;margin-top:8px;padding-top:7px}
.eq-row .equation-label-row{margin-top:8px}

/* Header navigation stays usable on narrow phones without a wall of links. */
.top nav{align-items:center;gap:clamp(8px,1.8vw,20px)}
.nav-more{position:relative;font-size:inherit;color:#52605e}
.nav-more>summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;min-height:38px;gap:5px}
.nav-more>summary::-webkit-details-marker{display:none}
.nav-more>summary:after{content:'⌄';font-size:1rem}
.nav-more-links{position:absolute;right:0;top:100%;display:grid;gap:2px;padding:7px;min-width:140px;background:#fffdfa;border:1px solid #d4e3d9;border-radius:10px;box-shadow:0 10px 28px #193c351c;z-index:20}
.nav-more-links a{display:block;padding:10px;border-radius:7px;white-space:nowrap}
.nav-more-links a:hover{background:#eef6f0;text-decoration:none}
@media(min-width:1100px){.game-layout{grid-template-columns:minmax(0,1.45fr) minmax(345px,.85fr);gap:20px}.board-panel{min-width:0}.workbench{min-width:0}}
@media(max-width:860px){.top{align-items:center}.top nav{justify-content:flex-start}.game-layout{display:flex;flex-direction:column;gap:16px}.board-panel,.workbench{width:100%;min-width:0}.game-head{margin-bottom:12px}.board-top{padding:10px 14px}.workbench{padding:13px}.eq-row{padding:11px}}
@media(max-width:540px){.top{gap:4px;padding:10px 12px 8px}.top nav{width:100%;justify-content:space-between;gap:5px;font-size:.81rem}.top nav a{min-height:38px;display:inline-flex;align-items:center}.brand{font-size:1.27rem}.nav-more-links{right:0}.beta-banner{font-size:.71rem;padding:6px 12px}main{padding:13px 9px 60px}.game-head h1{font-size:1.55rem}.action-bar{padding:7px 9px;gap:6px}.action-bar button{font-size:.76rem;padding:9px 7px;min-height:44px}.action-bar .primary{min-width:0}.workbench{border-radius:12px}.track-heading-text{gap:8px}.track-enable{font-size:.85rem}.track-mini-preview{font-size:.83rem}.track-actions button{min-width:40px}.eq-row{border-radius:10px}.bound-source,.slider-limit,.slider-value,.polar-interval input,.curve-type,.equation{font-size:16px;min-height:44px}.slider-config{grid-template-columns:repeat(3,minmax(0,1fr))}.curve-kind-label{gap:8px}}
@media(max-width:360px){.action-bar .secondary{font-size:.72rem}.track-mini-preview{max-width:85px}.top nav{font-size:.75rem}.workbench{padding:10px}}
@media(prefers-reduced-motion:reduce){.track-toggle{transition:none}}
