/*! Solar System Repair Co. | Source: https://orbitalforest.com */
/* Bounded repair layouts; the shared TEST and return buttons float above these. */
#answer-grid:has(.is-compact-pattern,.has-sample-art,.has-tall-jigsaw,.has-four-sum-columns,.has-two-cables,.has-six-weights,.has-large-tools,.has-shaped-flow) { container-type:size; }
.compact-module-art img { display:block;width:100%;height:100%;object-fit:contain; }
.compact-module { grid-template-columns:clamp(32px,6cqw,68px) minmax(0,1fr); }
.compact-module-art { height:clamp(36px,10cqh,76px); }
.compact-tray.has-tray-art { position:relative;border:0;background:transparent;padding:18px 12px;isolation:isolate; }
.compact-tray-art { position:absolute;inset:0;width:100%;height:100%;object-fit:fill;z-index:-1;pointer-events:none; }
.compact-tray.has-tray-art.is-matched { filter:drop-shadow(0 0 4px #92c4aa); }
.compact-tray.has-tray-art.is-failed { outline:3px solid #d59979;outline-offset:-8px; }
.compact-tray.has-tray-art> :not(img) { position:relative;background:#102832d9;padding:2px 4px;border-radius:2px; }
.compact-trays:has(.has-tray-art) { grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(2,minmax(0,1fr));gap:8px; }
.compact-tray.has-tray-art { display:grid;grid-template-columns:1fr 1.4fr;align-content:center;justify-items:center;gap:4px;padding:14px max(14px,calc((100% - 330px)/2)); }
.compact-tray.has-tray-art .compact-tray-art { object-fit:contain; }
.compact-tray.has-tray-art .compact-tray-contents { grid-column:1/-1; }
#game-shell #answer-grid :is(.is-compact-pattern,.has-sample-art) { box-sizing:border-box;width:100%;height:100%;min-height:0;overflow:hidden;padding:8px;gap:8px;display:grid; }
#game-shell #answer-grid .is-compact-pattern { grid-template-rows:auto auto minmax(46px,1fr) minmax(48px,1fr) 52px 20px; }
#game-shell #answer-grid :is(.is-compact-pattern,.has-sample-art) .math-machine-header { padding:4px 28px 4px 8px;min-height:0; }
#game-shell #answer-grid :is(.is-compact-pattern,.has-sample-art) .math-guide { margin:0;font:14px/1.35 system-ui,sans-serif; }
#game-shell #answer-grid .is-compact-pattern .easy-loop-reference { margin:0;display:flex;align-items:center;gap:10px;justify-content:center; }
#game-shell #answer-grid .is-compact-pattern .easy-unit-bracket { display:flex;gap:6px;padding:3px 6px; }
#game-shell #answer-grid .is-compact-pattern .easy-loop-item { min-width:36px;gap:0; }
#game-shell #answer-grid .is-compact-pattern .easy-loop-item small { display:none; }
#game-shell #answer-grid .is-compact-pattern .easy-loop-item .easy-symbol { font-size:28px; }
#game-shell #answer-grid .is-compact-pattern :is(.easy-pattern-sequence,.easy-pattern-slots) { display:grid;grid-template-columns:repeat(var(--pattern-cells),minmax(0,1fr));grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:4px;margin:0;min-height:0;align-items:stretch; }
#game-shell #answer-grid .is-compact-pattern :is(.easy-pattern-cell,.easy-pattern-slots .math-action) { min-width:44px;min-height:44px;padding:3px;display:grid;align-content:center;gap:0; }
#game-shell #answer-grid .is-compact-pattern :is(.easy-pattern-cell,.easy-pattern-slots .math-action) small:last-child { display:none; }
#game-shell #answer-grid .is-compact-pattern .easy-pattern-cell { min-width:0; }
#game-shell #answer-grid .is-compact-pattern .easy-symbol { font-size:clamp(24px,6cqh,42px);line-height:1; }
#game-shell #answer-grid .is-compact-pattern .easy-answer-choices { display:grid;grid-template-columns:repeat(4,minmax(44px,1fr));gap:6px;margin:0;padding:3px; }
#game-shell #answer-grid .is-compact-pattern .easy-answer-choices .math-action { min-height:44px;padding:3px;display:flex;align-items:center;justify-content:center;gap:8px; }
#game-shell #answer-grid .is-compact-pattern .easy-answer-choices .easy-symbol { font-size:26px; }
#game-shell #answer-grid .is-compact-pattern .easy-answer-status { margin:0;font-size:11px;padding-right:100px; }
#game-shell #answer-grid :is(.is-compact-pattern,.has-sample-art) .math-controls { display:none; }
#game-shell #answer-grid .has-sample-art { grid-template-rows:auto auto minmax(88px,1fr) 12px minmax(84px,.8fr); }
#game-shell #answer-grid .has-sample-art .math-rule { margin:0;font-size:12px; }
#game-shell #answer-grid .has-sample-art .easy-match-parts { display:grid;grid-template-columns:repeat(6,minmax(44px,1fr));gap:6px;min-height:0; }
#game-shell #answer-grid .has-sample-art .easy-match-parts .math-action { display:grid;grid-template-rows:minmax(0,1fr) auto auto;min-height:44px;min-width:44px;padding:5px;gap:3px; }
.easy-sample-art { display:block;width:100%;height:100%;min-height:0;max-height:150px;object-fit:contain;pointer-events:none; }
#game-shell #answer-grid .has-sample-art .easy-match-mounts { display:grid;grid-template-columns:repeat(2,minmax(44px,1fr));gap:10px;min-height:0;padding:0 100px 0 10px; }
#game-shell #answer-grid .has-sample-art .easy-match-mounts .math-action { min-height:44px;padding:5px;display:flex;align-items:center;justify-content:center;gap:12px; }
#game-shell #answer-grid .has-sample-art .easy-match-down { margin:0;font-size:14px;line-height:12px; }
#game-shell #answer-grid .has-tall-jigsaw .proto-work { grid-template-columns:minmax(110px,1fr) minmax(120px,200px);grid-template-rows:minmax(0,1fr);gap:16px; }
#game-shell #answer-grid .has-tall-jigsaw .proto-jigsaw-board { width:min(100%,calc((100cqh - 170px)*232/432));max-width:none;aspect-ratio:232/432;justify-self:center; }
.has-tall-jigsaw .proto-jigsaw-targets { grid-template-columns:repeat(var(--jigsaw-columns),1fr);grid-template-rows:repeat(var(--jigsaw-rows),1fr);inset:3.704% 6.897%; }
#game-shell #answer-grid .has-tall-jigsaw .proto-jigsaw-pieces { grid-template-columns:repeat(2,minmax(44px,88px));gap:6px; }
#game-shell #answer-grid .has-tall-jigsaw .proto-jigsaw-piece { height:clamp(44px,calc((100cqh - 200px)/4),76px); }
.has-timed-rings .proto-head { display:grid;grid-template-columns:minmax(0,1fr) 110px;gap:4px 8px; }
.has-timed-rings :is(.proto-tag,.proto-howto) { grid-column:1; }
.service-ring-timer { display:grid;grid-column:2;grid-row:1/3;gap:4px; }
.service-ring-time { font:800 24px/28px ui-monospace,monospace;text-align:center;color:#ebdca8;background:#0c252e;border:2px inset #7c9888; }
.service-ring-time[data-expired="true"] { color:#e6a081; }
#game-shell #answer-grid .has-timed-rings .service-ring-timer button { min-height:44px;font-size:13px; }
#game-shell #answer-grid .has-four-sum-columns .proto-sum-grid { grid-template-columns:repeat(4,minmax(44px,1fr)) 52px;gap:6px;width:100%; }
#game-shell #answer-grid .has-four-sum-columns .proto-work { grid-template-columns:minmax(240px,1fr) 140px;gap:12px; }
#game-shell #answer-grid .has-four-sum-columns .proto-number-tiles { grid-template-columns:repeat(2,minmax(44px,64px)); }
.has-large-tools { grid-template-rows:auto minmax(0,1fr) 64px; }
.has-large-tools .bench-bottom { grid-template-columns:236px minmax(0,1fr);padding-right:96px; }
.has-large-tools .bench-tools { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px; }
#game-shell .has-large-tools .bench-tools .bench-button { min-height:56px;font-size:16px; }
.has-two-cables .bench-work { grid-template-columns:minmax(0,1fr) 270px; }
.has-two-cables .bench-slots { grid-template-columns:repeat(3,minmax(44px,1fr));row-gap:12px; }
.has-two-cables .bench-parts { grid-template-columns:repeat(3,minmax(44px,1fr));gap:6px; }
#game-shell .has-two-cables .bench-part { height:clamp(48px,calc((100cqh - 180px)/3),88px); }
#game-shell .has-two-cables .bench-socket { height:clamp(48px,calc((100cqh - 240px)/2),100px); }
.has-two-cables .bench-socket-label { font-size:11px; }
.has-six-weights .bench-work { grid-template-columns:minmax(0,1fr) 220px; }
.has-six-weights .bench-slots { gap:5px 16px; }
#game-shell .has-six-weights .bench-socket { height:clamp(44px,calc((100cqh - 360px)/3),76px); }
.has-six-weights .bench-parts { grid-template-columns:repeat(3,minmax(44px,1fr)); }
.has-shaped-flow .bench-machine { background:transparent;border-color:transparent; }
.has-shaped-flow .bench-art { opacity:.14; }
.bench-pipe-gap { pointer-events:none; }
.proto-jigsaw-controls { display:none; }
.needs-jigsaw-controls .proto-jigsaw-controls { display:grid;grid-template-columns:44px minmax(68px,1fr) 44px;gap:4px; }
#game-shell #answer-grid .proto-jigsaw-controls .proto-button { min-height:44px;font-size:11px;padding:3px; }
#game-shell #answer-grid .needs-jigsaw-controls .proto-jigsaw-slot { min-width:0;min-height:0; }
.needs-jigsaw-controls .proto-jigsaw-slot.is-cursor { outline:2px solid #edce86;outline-offset:-3px; }
.has-large-tools .bench-test { position:absolute;right:0;bottom:0; }
#game-shell #answer-grid .is-compact-pattern .easy-pattern-sequence { min-height:0;padding:2px; }
#game-shell #answer-grid .is-compact-pattern .easy-answer-choices .math-action { max-width:none; }
@container (max-width:619px) {
  .compact-trays:has(.has-tray-art) { grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(0,1fr); }
  .compact-tray.has-tray-art { display:flex;gap:3px;padding:12px 6px; }
  .compact-tray.has-tray-art .compact-tray-art { object-fit:fill; }
  #game-shell #answer-grid :is(.is-compact-pattern,.has-sample-art) { padding:4px;gap:5px; }
  #game-shell #answer-grid :is(.is-compact-pattern,.has-sample-art) .math-guide { font-size:12px; }
  #game-shell #answer-grid .is-compact-pattern .easy-answer-choices .math-action span:last-child { display:none; }
  #game-shell #answer-grid .has-sample-art { grid-template-rows:auto 20px minmax(140px,1fr) 12px 100px; }
  #game-shell #answer-grid .has-sample-art .easy-match-parts { grid-template-columns:repeat(3,minmax(44px,1fr)); }
  #game-shell #answer-grid .has-sample-art .easy-match-mounts { padding-right:88px;gap:4px;padding-left:0; }
  #game-shell #answer-grid .has-sample-art .easy-match-mounts .math-action { flex-wrap:wrap;gap:4px;font-size:11px; }
  #game-shell #answer-grid .has-four-sum-columns .proto-work { grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:6px; }
  #game-shell #answer-grid .has-four-sum-columns .proto-sum-grid { grid-template-columns:repeat(4,minmax(44px,1fr)) 44px;gap:4px; }
  #game-shell #answer-grid .has-four-sum-columns .proto-number-tiles { grid-template-columns:repeat(4,minmax(44px,1fr));gap:4px; }
  #game-shell #answer-grid .has-four-sum-columns .proto-rack-title { display:none; }
  #game-shell #answer-grid .has-four-sum-columns :is(.proto-number-slot,.proto-number-tile,.proto-given) { height:44px;font-size:24px; }
  .has-timed-rings .proto-head { grid-template-columns:minmax(0,1fr) 90px; }
  .has-large-tools .bench-bottom { grid-template-columns:180px minmax(0,1fr);padding-right:88px; }
  #game-shell .has-large-tools .bench-tools .bench-button { font-size:13px;min-height:52px; }
  .has-two-cables .bench-work { grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:6px; }
  .has-two-cables .bench-rack-label { display:none; }
  #game-shell .has-two-cables .bench-part { height:48px; }
  #game-shell .has-two-cables .bench-socket { height:52px; }
  .has-six-weights .bench-work { grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:4px; }
  .has-six-weights .bench-parts { grid-template-columns:repeat(6,minmax(44px,1fr));gap:3px; }
  #game-shell .has-six-weights .bench-part { height:52px; }
  .has-six-weights .bench-rack-label { display:none; }
}
@container (min-width:620px) and (max-height:399px) {
  #game-shell #answer-grid .has-six-weights .bench-slots { grid-template-columns:repeat(6,minmax(44px,1fr));gap:3px; }
  .has-six-weights .bench-socket-group { grid-column:auto!important;grid-row:1!important; }
}
@container (max-width:359px) {
  #game-shell #answer-grid .is-compact-pattern { grid-template-rows:auto 40px minmax(36px,1fr) 92px 52px 20px; }
  #game-shell #answer-grid .is-compact-pattern .easy-pattern-slots { grid-template-columns:repeat(3,minmax(44px,1fr));grid-auto-flow:row;gap:4px; }
  #game-shell #answer-grid .is-compact-pattern .easy-answer-choices { padding:3px; }
  .has-large-tools .bench-bottom { grid-template-columns:168px minmax(0,1fr);padding-right:0; }
  .has-large-tools .bench-feedback { font-size:10px;padding-right:80px; }
}
@container (max-height:399px) {
  #game-shell #answer-grid .is-compact-pattern { grid-template-rows:auto 34px minmax(32px,1fr) 48px 44px 16px;gap:3px;padding:3px; }
  #game-shell #answer-grid .is-compact-pattern .math-guide { font-size:11px;line-height:1.2; }
  #game-shell #answer-grid .is-compact-pattern .easy-pattern-cell { min-height:28px; }
  #game-shell #answer-grid .is-compact-pattern .easy-symbol { font-size:24px; }
  #game-shell #answer-grid .has-sample-art { grid-template-rows:auto 14px minmax(68px,1fr) 12px 68px;gap:3px; }
  #game-shell #answer-grid .has-sample-art .math-guide { font-size:11px;line-height:1.2; }
  #game-shell #answer-grid .has-sample-art .easy-match-parts { grid-template-columns:repeat(6,minmax(44px,1fr)); }
  #game-shell #answer-grid .has-sample-art .easy-match-parts .math-action { font-size:10px;gap:1px; }
  #game-shell #answer-grid .has-tall-jigsaw .proto-jigsaw-board { width:min(100%,calc((100cqh - 134px)*232/432)); }
  #game-shell #answer-grid .has-tall-jigsaw .proto-jigsaw-pieces { grid-template-columns:repeat(4,minmax(44px,66px));gap:4px; }
  #game-shell #answer-grid .has-tall-jigsaw .proto-work { grid-template-columns:minmax(80px,1fr) minmax(188px,1fr);gap:8px; }
  #game-shell #answer-grid .has-tall-jigsaw .proto-jigsaw-piece { height:44px; }
  #game-shell #answer-grid .has-tall-jigsaw { padding:4px;gap:4px;grid-template-rows:auto minmax(0,1fr) 44px; }
  #game-shell #answer-grid .has-tall-jigsaw .proto-rack { gap:4px; }
  #game-shell #answer-grid .has-tall-jigsaw .proto-rack-title { display:none; }
  #game-shell #answer-grid .has-four-sum-columns .proto-work { grid-template-columns:minmax(240px,1fr) 92px;grid-template-rows:minmax(0,1fr);gap:4px; }
  #game-shell #answer-grid .has-four-sum-columns .proto-number-tiles { grid-template-columns:repeat(2,44px); }
  .has-large-tools { grid-template-rows:auto minmax(0,1fr) 56px; }
  .has-large-tools .bench-bottom { grid-template-columns:200px minmax(0,1fr); }
  #game-shell .has-large-tools .bench-tools .bench-button { min-height:48px;font-size:14px; }
  .has-two-cables .bench-work { grid-template-columns:minmax(0,1fr) 220px;grid-template-rows:minmax(0,1fr); }
  .has-two-cables .bench-slots { row-gap:4px; }.has-two-cables .bench-socket-label { font-size:9px;padding:1px; }
  #game-shell .has-two-cables .bench-part { height:44px; }#game-shell .has-two-cables .bench-socket { height:44px; }
  .has-six-weights .bench-work { grid-template-columns:minmax(0,1fr) 200px;grid-template-rows:minmax(0,1fr); }
  .has-six-weights .bench-parts { grid-template-columns:repeat(3,minmax(44px,1fr)); }
  #game-shell .has-six-weights .bench-socket { height:44px; }
  .has-six-weights .bench-socket-label { font-size:9px;padding:1px; }
  .has-six-weights .bench-balance-beam { font-size:10px;padding:2px; }
}
