/* Children's scene system; all values are registered in design/styleguide.md. */
.game-cover{display:block;width:100%;height:220px;object-fit:contain;border-radius:var(--radius-control);margin-bottom:var(--space-8)}
.ls-game.child-scene{background:var(--color-play-stage)}.child-scene .ls-feedback:empty,.child-scene .ls-path:empty,.child-scene .ls-history:empty{display:none}.child-scene .ls-feedback:not(:empty){min-height:0;margin-top:var(--space-12)}.child-scene .ls-path,.child-scene .ls-history{min-height:0;margin-block:var(--space-12)}.child-scene .game-actions{margin-top:var(--space-16)}
.child-path-stage{position:relative;max-width:560px;margin-inline:auto;isolation:isolate}.child-coordinate-board{display:grid;grid-template-columns:24px repeat(var(--child-cols),minmax(44px,1fr));gap:var(--space-8);width:max-content;max-width:100%;margin-inline:auto}.child-route-cell{position:relative;width:clamp(44px,10vw,72px);height:clamp(44px,10vw,72px);min-width:44px;min-height:44px;border:2px solid var(--color-border);border-radius:var(--radius-control);background:var(--color-play-tile);padding:var(--space-8);display:flex;align-items:center;justify-content:center;color:var(--color-text)}.child-route-blocked{background:var(--color-subtle);border-color:var(--color-border)}.child-route-cell svg{width:28px;height:28px;stroke:var(--color-secondary);stroke-width:2.5;fill:none}.child-route-cell .child-start{fill:var(--color-surface);stroke:var(--color-primary)}.child-route-cell .child-goal{stroke:var(--color-play-goal)}.child-route-cell[aria-pressed=true]{background:var(--color-play-route-surface);border-color:var(--color-play-route)}.child-route-cell[data-current=true],.child-graph-point[data-current=true]{outline:3px solid var(--color-play-route);outline-offset:3px}.child-coordinate{display:flex;align-items:center;justify-content:center;font-size:var(--type-label-size);line-height:var(--type-label-line);font-weight:var(--type-label-weight);color:var(--color-text)}
.child-graph-canvas{position:relative;width:100%;max-height:360px;max-width:480px;margin:auto}.child-graph-lines,.child-path-trace{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.child-graph-lines{overflow:visible}.child-graph-lines line{stroke:var(--color-border);stroke-width:2;vector-effect:non-scaling-stroke}.child-graph-lines text{fill:var(--color-text);font-size:16px}.child-graph-point{position:absolute;transform:translate(-50%,-50%);width:48px;height:48px;min-width:44px;min-height:44px;border:2px solid var(--color-primary);border-radius:50%;background:var(--color-surface);color:var(--color-text);font-size:18px!important;font-weight:600!important;z-index:2}.child-graph-point[aria-pressed=true]{background:var(--color-play-route-surface);border-color:var(--color-play-route)}.child-path-trace{z-index:1;overflow:visible}.child-path-trace line{stroke:var(--color-play-route);stroke-width:6;stroke-linecap:round}.child-path-trace circle{fill:var(--color-surface);stroke:var(--color-play-route);stroke-width:2}.child-path-trace text{fill:var(--color-play-route);font-size:16px;font-weight:600}
.child-scene .ls-path{font-size:16px}.child-scene .ls-path>li{gap:var(--space-4)}.child-scene .ls-peg{background-image:linear-gradient(var(--color-puzzle-wood-line),var(--color-puzzle-wood-line));border-bottom:8px solid var(--color-puzzle-wood);border-radius:var(--radius-control)}.child-scene .ls-disk{border-color:var(--color-puzzle-wood-line);background:var(--color-puzzle-water);border-radius:var(--radius-control);font-weight:600}.child-scene [data-disk="1"]{background:var(--color-selection)}.child-scene [data-disk="2"]{background:var(--color-puzzle-wood)}.child-scene [data-disk][aria-pressed=true]{outline:3px solid var(--color-focus);outline-offset:2px}
.game-finder[aria-busy=true]{opacity:.75}.game-finder-error{color:var(--color-error);margin-top:var(--space-12)}
@media(max-width:760px){.game-tile{display:grid;grid-template-columns:144px minmax(0,1fr);gap:var(--space-8) var(--space-16);padding:var(--space-20)}.game-tile .game-cover{grid-row:1/4;width:144px;height:128px;margin:0}.game-tile h3{align-self:end}.game-tile .text-link{margin:0;padding-top:0}.game-tile .help{grid-column:2}.child-graph-canvas{max-width:360px}.child-coordinate-board{gap:var(--space-4)}.child-route-cell{width:clamp(44px,14vw,64px);height:clamp(44px,14vw,64px)}}
@media(max-width:360px){.game-tile{grid-template-columns:96px minmax(0,1fr);padding:var(--space-16)}.game-tile .game-cover{width:96px;height:128px}.game-tile .help{grid-column:1/-1}.game-tile .game-cover{grid-row:1/3}.game-tile .text-link{grid-column:2}.child-graph-point{width:44px;height:44px}.child-coordinate-board{grid-template-columns:20px repeat(var(--child-cols),44px)}}
.game-run-start{margin-top:var(--space-24)}.game-run{max-width:var(--layout-reading);margin:var(--space-24) auto var(--space-64)}.game-run-toolbar{display:flex;align-items:center;justify-content:space-between;gap:var(--space-16);margin-bottom:var(--space-24)}.game-run-toolbar>div{display:flex;gap:var(--space-16);flex-wrap:wrap}.game-run-toolbar button.text-link{border:0;background:none;color:var(--color-primary);padding:0}.game-run-heading h1{font-size:var(--type-item-title-size);line-height:var(--type-item-title-line);font-weight:var(--type-item-title-weight);letter-spacing:var(--type-item-title-tracking)}.game-run .task{border-top:0;padding-top:var(--space-20);margin-top:0}.game-run [data-learning-followup]{display:none!important}.game-run-success{padding:var(--space-20);border-radius:var(--radius-panel);background:var(--color-success-surface);color:var(--color-success);margin-top:var(--space-24)}.game-run-success>p:first-child{font-size:var(--type-prompt-size);font-weight:600}.game-run-success .game-actions{margin-top:var(--space-16)}
@media(max-width:760px){.game-run-toolbar{align-items:start}.game-run-toolbar>div{gap:var(--space-8) var(--space-16)}}

.child-task-intro{margin-block:var(--space-24)}.child-task-intro+.reading>.task{padding-top:0;margin-top:0;border-top:0}.game-run .ls-scoreboard{margin-block:var(--space-12)}

.ls-game.child-scene .ls-cell{background:var(--color-play-tile)}.ls-game.child-scene .ls-cell[data-mark]:not([data-mark="0"]):not([data-mark="X"]){background:var(--color-play-route-surface);border-color:var(--color-play-route)}.ls-game.child-scene .ls-cell[data-mark="X"]{background:var(--color-subtle);color:var(--color-secondary)}.ls-game.child-scene .child-blocked-mark{width:24px;height:24px;fill:none;stroke:var(--color-secondary);stroke-width:3}.ls-game.child-scene .ls-cell svg{pointer-events:none}.task .task-prerequisites{margin-top:var(--space-16)}

.child-stick-board{max-width:440px;margin-inline:auto}.child-stick-board svg{display:block;width:100%;overflow:visible}.child-stick-line{stroke:var(--color-puzzle-wood-line);stroke-width:8;stroke-linecap:round;vector-effect:non-scaling-stroke}.child-stick-hit{stroke:transparent;stroke-width:44;vector-effect:non-scaling-stroke;cursor:pointer}.child-stick-board [aria-pressed=true] .child-stick-line{stroke:var(--color-border);stroke-dasharray:4 8;opacity:.5}.child-stick-board text{font-family:var(--font-body);font-size:18px;fill:var(--color-text);pointer-events:none}.child-stick-board g:focus-visible .child-stick-line{stroke:var(--color-focus)}

/* Shared scene markers remain inline with the words that explain them. */
.task-prompt .child-route-marker{display:inline-block;width:1em;height:1em;vertical-align:-.15em;max-width:none;stroke-width:2.5;fill:none}.child-route-marker.child-start{stroke:var(--color-primary)}.child-route-marker.child-goal{stroke:var(--color-play-goal)}.child-route-marker.child-blocked{stroke:var(--color-secondary)}

/* Named source groups reflow; the original object data stays intact. */
.readable-objects{gap:var(--space-16);margin-block:var(--space-16);flex-wrap:wrap}.readable-object-group{min-width:0;flex:1 1 180px!important}.readable-objects .ls-object-tray{gap:var(--space-8);min-height:56px;align-content:flex-start}.readable-objects .ls-given-object{width:56px;height:56px;flex:none}.readable-objects span.ls-given-object{cursor:default}.readable-objects .ls-drawing{display:block;width:44px;height:44px;min-width:0;max-width:none}.readable-objects .ls-object-tray:empty{border:1px dashed var(--color-border);border-radius:var(--radius-control)}.readable-objects .ls-target-label{font-size:var(--type-label-size);line-height:var(--type-label-line);margin-bottom:var(--space-8)}.readable-balance-labels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-20);font-size:16px;line-height:26px;text-align:center}.readable-balance-labels p{margin:0}.readable-balance>.ls-drawing{width:100%;height:auto;display:block}
@media(max-width:600px){.readable-objects{flex-direction:column}.readable-object-group{flex:none!important;width:100%}}

.readable-raster{margin-block:var(--space-16)}.readable-panels{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));gap:var(--space-16);align-items:start}.readable-panels figure{min-width:0;margin:0}.readable-panels svg{display:block;width:100%;height:auto;overflow:hidden}.readable-panels figcaption{font-size:16px;line-height:26px;text-align:center;margin-top:var(--space-8)}.readable-panels-sequence{grid-template-columns:repeat(8,minmax(0,1fr));gap:var(--space-4)}.readable-panels-pieces{grid-template-columns:repeat(3,minmax(0,1fr))}.readable-panels-pieces figure:first-child{grid-column:1/-1;width:min(100%,260px);justify-self:center}.readable-panels-nets{grid-template-columns:repeat(2,minmax(0,1fr))}.readable-raster-overview{margin-bottom:var(--space-20)}.readable-raster-overview img{display:block;width:100%;height:auto}.readable-raster-original img{width:100%;height:auto;display:block}.readable-raster-original{margin-top:var(--space-20)}
@media(max-width:600px){.readable-panels-sequence{grid-template-columns:repeat(4,minmax(0,1fr))}.readable-panels-pieces{grid-template-columns:repeat(2,minmax(0,1fr))}.readable-panels-nets{grid-template-columns:1fr}}

.readable-ink{filter:brightness(.7) contrast(3)}
