/* Shared, readable game framing. Page scrolling remains available at enlarged text sizes. */
.top nav{display:flex;align-items:center;gap:20px}.top nav a{min-height:40px;display:inline-flex;align-items:center}.tw-next{display:flex;flex-wrap:wrap;gap:14px 25px;align-items:center;border-top:1px solid #3a5963;margin:20px 0 8px;padding:18px 0;font-size:.9375rem}.tw-next a{color:#a7ece0;text-underline-offset:4px;min-height:36px;display:inline-flex;align-items:center}.tw-next h2,.tw-next>p{width:100%;margin:0}.tw-next h2{font-size:1.35rem}.scan-details>summary,.column-panel>summary{padding:10px 0;cursor:pointer;color:#b6e8e0;font-size:.9375rem}.scan-details{border-top:1px solid #3a5963;margin-top:12px}.scan-details .probe{margin-top:0}.mission-panel{max-height:none;min-height:0;overflow:visible;scrollbar-gutter:auto}.column-panel>summary{margin-bottom:6px}.column-panel:not([open]){align-self:start}.image-panel{align-self:start}.stigmation .screen{min-height:300px}.play-grid{align-items:start}.game-intro{padding-block:12px!important;margin-block:0 14px!important}.game-intro h1{font-size:2rem!important;line-height:1.15!important}.game-intro .lede{font-size:1rem!important}.game-intro .eyebrow{margin-bottom:6px}.permission-note{font-size:.875rem}.range-control small,.probe-top span{font-size:.75rem}.scan-actions button,.response-actions button,.tools button{font-size:.875rem}#method-text{border-left:3px solid #a1efdd;padding:10px 12px;background:#193c43;font-size:.9375rem}#inspect-reference{margin:0 0 12px}#comparison-reference{font-size:.875rem}.verdict{font-size:.875rem!important;line-height:1.5}.bench.review .answer-row{align-items:start}.tw-next~p{margin-top:0}
@media(min-width:981px){.image-panel{position:sticky;top:12px}.bench{overflow:visible}.bench>.column-panel{border-radius:12px 0 0 12px}}
@media(max-width:980px){.bench:has(#beam-diagram){display:flex;flex-direction:column}.bench:has(#beam-diagram) .image-panel{order:0;width:100%;border-right:0}.bench:has(#beam-diagram) .mission-panel{order:1;width:100%}.bench:has(#beam-diagram) .column-panel{order:2;width:100%;border-top:1px solid #34545f;border-right:0}.bench:has(#beam-diagram) #column{height:360px}.bench:has(#beam-diagram) .screen{height:260px;min-height:0}.bench:has(#beam-diagram) .image-actions{flex-direction:row}.bench:has(#beam-diagram) .image-note{margin-bottom:2px}.bench:has(#beam-diagram) .panel-head{margin-bottom:6px}.bench:has(#beam-diagram) .mission-panel{padding:12px}.bench:has(#beam-diagram) #instruction{margin-bottom:10px}.bench:has(#beam-diagram) .control-note{margin:8px 0}.bench:has(#beam-diagram) #status{margin-top:10px}.stigmation .beam-sides{margin-top:8px}.workspace:has(.play-panel){grid-template-columns:1fr}.images:has(.scan-details) .image-wrap{max-height:none}.images:has(.scan-details) #image{max-height:300px;object-fit:contain}.scan-details:not([open]){margin-bottom:4px}.play-panel{padding:14px!important}.play-panel .task-description{font-size:.9375rem}.play-panel h2{font-size:1.25rem}.play-panel .controls{margin-top:10px}.play-panel .range-control>span{font-size:.875rem}.play-panel .response-box p{font-size:.875rem}.play-panel .terms{font-size:.875rem}.heading h1{font-size:2rem!important}.heading .intro{font-size:.9375rem!important}.heading .eyebrow{font-size:.75rem}.heading{margin-bottom:10px!important}.history{font-size:.75rem}.status-row{font-size:.875rem}.playback{font-size:.875rem}}
@media(max-width:600px){.top nav{gap:15px}.top nav a{font-size:.875rem}.game-intro .lede{margin-top:8px!important}.play-grid{grid-template-columns:1fr!important}.viewer-column{padding:10px!important}.viewport{height:230px!important;min-height:0!important}.controls-column{padding:12px!important}.play-modes{gap:6px!important;padding:10px!important}.play-modes>span{display:none}.play-modes button{font-size:.875rem!important;padding:8px!important}.puzzle-head{gap:10px}.puzzle-head p,#target-status,.task-copy{font-size:.875rem!important}.puzzle-head h3{font-size:1.1rem!important}#target-preview{width:82px!important;min-width:82px!important}#target-preview img{width:70px!important;height:70px!important}#target-preview span{font-size:.75rem!important}#target-status{margin-block:6px}.controls-column .task{padding:10px 0!important}.controls-column .help{font-size:.875rem!important}.controls-column legend{font-size:.875rem!important}.controls-column .task-copy,.controls-column .step-kicker,.controls-column #task-title,.controls-column .permission-note{display:none}.puzzle-actions{gap:6px!important}.puzzle-actions button{font-size:.875rem!important}.puzzle-feedback{font-size:.875rem!important}.channels span{font-size:.875rem!important}.view-top,.view-bottom{font-size:.75rem!important}.game-intro .eyebrow{font-size:.75rem!important}.bench:has(#beam-diagram) .screen{height:210px}.bench:has(#beam-diagram).stigmation .screen{height:210px;min-height:210px}.bench:has(#beam-diagram) .image-note{font-size:.75rem}.journey{grid-template-columns:repeat(4,minmax(0,1fr))}.journey li{font-size:.75rem;padding:6px 4px}.journey span{font-size:.75rem}.heading>div>p:not(.eyebrow){font-size:.9375rem}.image-wrap:has(#image){padding:8px}.image-top>span{font-size:.75rem}.scan-actions{display:flex;flex-wrap:wrap}.scan-actions button{flex:1;font-size:.875rem}.images:has(.scan-details) .image-top{padding:8px 10px}.images:has(.scan-details) .image-wrap{height:auto}.images:has(.scan-details) #image{height:245px;width:100%}.line-progress{font-size:.75rem}.scan-details>summary{padding:9px 10px}.status-row{display:block}.status-row>span{display:block}.status-row .status{font-size:.75rem;margin-top:3px}.tw-next{font-size:.875rem}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

/* Primary image and active controls share the working view; secondary explanations follow them. */
.scan-details{grid-column:1/-1;background:#102833;border:1px solid #385666;border-radius:10px;margin:0;padding:0 12px}.scan-details[open]{padding-bottom:12px}.workspace>.images{display:block}.workspace>.images>.image-wrap{position:static}.workspace>.scan-details{order:5}.workspace>.play-panel{order:2}.workspace>.images{order:1}.images .image-top{border:0;padding:0}.image-panel:has(#surface){position:static}.bench.review .verdict{max-width:none}
body.detective .notebook{max-height:none;min-height:0;overflow:visible;scrollbar-gutter:auto}
@media(min-width:781px){.viewer:has(#drop){position:sticky;top:10px;align-self:start}}
@media(max-width:700px){
 .top:has(+main .game-intro){height:56px;width:calc(100% - 24px)}
 main:has(.game-intro){width:calc(100% - 24px)}
 .game-intro{padding:10px 0!important;margin-bottom:8px!important}.game-intro h1{font-size:1.75rem!important}.game-intro .lede{font-size:.875rem!important;line-height:1.4}
 .play-modes{padding:6px 0!important;margin-bottom:8px;flex-wrap:nowrap!important}.play-modes button{padding:6px 9px!important;min-height:40px;font-size:.8125rem!important}.play-modes #reset{margin-left:auto}
 .play-grid .viewer-column{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:start;position:sticky;top:0;padding:8px!important;z-index:3}
 .play-grid .viewer-column:has(#puzzle-panel[hidden]){display:block}
 .play-grid .view-top{grid-column:1/-1;margin-bottom:0}
 .play-grid .viewer-column .viewport{width:100%;height:156px!important;max-height:156px!important;aspect-ratio:auto;grid-row:2}
 .play-grid .viewer-column:has(#puzzle-panel[hidden]) .viewport{height:210px!important;max-height:210px!important;margin-top:8px}
 .play-grid .viewer-column #puzzle-panel{grid-column:2;grid-row:2;min-width:0;padding:0;border:0;margin:0}
 .play-grid .viewer-column .puzzle-head{display:flex;flex-direction:column-reverse;gap:4px}
 .play-grid .viewer-column #target-preview{width:100%!important;min-width:0!important;height:156px;border:1px solid #4c727c;padding:4px;display:flex;align-items:center;justify-content:center;flex-direction:column;background:#000c14;border-radius:10px}
 .play-grid .viewer-column #target-preview img{width:112px!important;height:112px!important;object-fit:contain}
 .play-grid .viewer-column .puzzle-head>div,.play-grid .viewer-column #target-status{display:none}
 .play-grid .viewer-column #target-status:not(:empty){font-size:.75rem}
 .play-grid .viewer-column .view-bottom{grid-column:1/-1;align-items:center;gap:8px;margin-top:0}
 .play-grid .view-bottom #legend{font-size:.75rem}.play-grid .view-bottom #compare{font-size:.75rem;min-height:36px;padding:4px 8px}
 .view-badges{left:4px;right:4px;bottom:4px;gap:3px;font-size:.625rem}.view-badges span{padding:3px 4px;font-size:.625rem}#zoom-label{display:none}
 .play-grid .controls-column{padding:10px!important}.play-grid .task{padding:0!important}.play-grid .task fieldset{margin-top:8px!important}.play-grid .task legend{margin-bottom:1px!important}.play-grid .range-ends{font-size:.75rem}
 .play-grid #puzzle-response{margin-top:10px}.play-grid .puzzle-feedback{margin:8px 0 0;padding:8px;line-height:1.4}.play-grid .permission-note{display:none}
 .play-grid .task .help{display:none}.play-grid .channels{gap:6px}.play-grid .channels label span{padding:6px!important;min-height:42px}.play-grid .channels label{min-width:0}.play-grid .puzzle-actions button{min-height:42px;padding:8px 12px!important}
 .workspace>.images{position:sticky;top:0;z-index:3;padding:8px}.workspace>.images .image-wrap{position:static;margin:0;max-width:none;padding:6px}.workspace>.images .image-top{display:flex;gap:8px;align-items:center}.workspace>.images .image-top h2{font-size:.9375rem;margin:0}.workspace>.images .image-top>span{font-size:.625rem;margin:0 0 6px;max-width:145px}
 .workspace>.images #image{width:100%;height:205px;max-height:205px;object-fit:contain}.workspace:has(.play-panel){gap:10px}.workspace>.play-panel .kicker{display:none}.workspace>.play-panel{padding:10px!important}.workspace>.play-panel h2{font-size:1.125rem;margin-bottom:6px}.workspace>.play-panel .task-description{font-size:.875rem;margin-bottom:8px}.workspace>.play-panel .controls{gap:8px}.workspace>.play-panel .range-control{gap:3px}.workspace>.play-panel .control-explain{font-size:.875rem}.scan-details>summary{padding:10px 0}
 .heading:has(+.history) .intro{font-size:.875rem!important}.heading:has(+.history) .round-count{margin-top:5px}.heading:has(+.history) h1{font-size:1.75rem!important}.status-row{margin-bottom:6px}
 body.detective .drop-wrap{height:270px}.notebook{padding:12px!important}body.detective #case-title{font-size:1.2rem}body.detective #evidence-options label{font-size:.9375rem}
 .bench:has(#beam-diagram) .image-panel{position:sticky;top:0;z-index:3;background:#0b222d}.bench:has(#beam-diagram){overflow:visible}.bench:has(#beam-diagram) .screen{height:180px}.bench:has(#beam-diagram).stigmation .screen{height:190px;min-height:190px}.bench:has(#beam-diagram) .image-note{line-height:1.3}
}
@media(max-width:360px){.play-grid .viewer-column .viewport,.play-grid .viewer-column #target-preview{height:135px!important;max-height:135px!important}.play-grid .viewer-column #target-preview img{width:90px!important;height:90px!important}.game-intro .eyebrow{letter-spacing:.04em}.play-grid .view-top{font-size:.6875rem}.play-grid .tag{font-size:.6875rem;letter-spacing:0}.workspace>.images #image{height:180px;max-height:180px}.bench:has(#beam-diagram) .screen{height:160px}.bench:has(#beam-diagram).stigmation .screen{height:170px;min-height:170px}}
/* At larger user text sizes, normal scrolling takes priority over sticky drawings. */
@media(max-width:700px) and (min-resolution:2dppx){.play-grid,.workspace{scroll-margin-top:0}}

@media(max-width:700px){.play-grid .viewer-column #target-status:not([data-state=ready]){display:block;font-size:.75rem!important;margin:5px 0}.play-grid:has(#puzzle-panel[hidden]) .task #task-title,.play-grid:has(#puzzle-panel[hidden]) .task .task-copy,.play-grid:has(#puzzle-panel[hidden]) .task .step-kicker,.play-grid:has(#puzzle-panel[hidden]) .task .help{display:block}.view-badges span,.workspace>.images .image-top>span{font-size:.75rem}.workspace>.images .image-top{align-items:start}.workspace>.images .image-top>span{max-width:150px}}
.large-text .image-panel,.large-text .workspace>.images,.large-text .viewer-column,.large-text .viewer{position:static!important}.large-text .top{height:auto;min-height:56px;flex-wrap:wrap;padding-block:8px}.large-text .play-modes{flex-wrap:wrap!important}.large-text .play-grid .viewer-column{position:static!important}
@media(max-height:550px){.image-panel,.workspace>.images,.viewer-column,.viewer{position:static!important}}

.game-intro>div{min-width:0}.game-intro .eyebrow{overflow-wrap:anywhere;white-space:normal}.large-text .game-intro h1{letter-spacing:normal}

#tw-help-dialog{max-width:640px;width:calc(100% - 24px);max-height:85svh;overflow:auto;padding:24px;border:1px solid #709298;border-radius:12px;background:#15313c;color:#eef9f5}#tw-help-dialog::backdrop{background:#04131be3}#tw-help-dialog .close{float:right;min-width:44px;min-height:44px}#tw-help-dialog h2{font-size:1.5rem;line-height:1.25}#tw-help-dialog p{font-size:1rem;line-height:1.6}.tw-about-button{margin:18px 0}#tw-how{font:inherit;font-size:.875rem;min-height:40px;background:transparent;color:inherit;border:1px solid #6a8a95;border-radius:6px;padding:7px 10px}.top nav{flex-wrap:wrap}@media(max-width:450px){.top{height:auto;min-height:56px;flex-wrap:wrap;padding-block:8px}.top nav{gap:10px}}

/* Wrapped header links and copyable URLs must remain usable at enlarged text sizes. */
@media(max-width:700px){.top:has(+main .game-intro){height:auto;min-height:56px;flex-wrap:wrap;padding-block:8px}.top:has(+main .game-intro) nav{flex-wrap:wrap}}
.large-text .top:has(+main .game-intro){height:auto;min-height:56px;flex-wrap:wrap}
#share-link,#share-url{width:100%;max-width:100%;min-width:0;box-sizing:border-box}.after>div{min-width:0}
