.contraptions{--ct-ink:#263b49;--ct-paper:#f6f3eb;--ct-line:#d7dedb;--ct-teal:#247f86;max-width:1600px;margin:20px auto 60px;padding:0 24px;color:var(--ct-ink)}
.contraptions button{border:1px solid #c5d0ce;border-radius:7px;background:#fffdf7;color:var(--ct-ink);padding:8px 13px;font:inherit;font-size:.88rem;font-weight:650;cursor:pointer;transition:background .15s}
.contraptions button:hover:not(:disabled){background:#e8f1ed}.contraptions button:disabled{opacity:.45;cursor:default}.contraptions button:focus-visible,.contraptions canvas:focus-visible{outline:3px solid #318e99;outline-offset:3px}.contraptions button.ct-primary{background:var(--ct-teal);border-color:var(--ct-teal);color:#fff;padding:10px 24px;font-weight:800}
.contraptions nav{font-size:.85rem;margin-bottom:25px;display:flex;gap:12px}.contraptions a{color:var(--ct-teal)}.ct-header{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:26px}.ct-eyebrow{font-size:.67rem;letter-spacing:.15em;font-weight:800;margin:0 0 8px;color:#597373}.ct-header h1{font-size:clamp(2rem,4vw,3.3rem);letter-spacing:-.055em;font-weight:850;margin:0 0 10px}.ct-header h1 span{color:#d88369}.ct-header p:last-child{margin:0;color:#607278}.ct-header-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.ct-header-actions a{font-size:.85rem;margin-left:10px}.ct-layout{display:grid;grid-template-columns:minmax(0,1fr) 286px;gap:20px;align-items:start}.ct-workshop{background:var(--ct-paper);border:1px solid var(--ct-line);border-radius:15px;overflow:hidden;box-shadow:0 6px 24px #263b4908}.ct-level-head{padding:20px 23px 14px;display:flex;justify-content:space-between;align-items:center;gap:15px}.ct-level-head h2{font-size:1.5rem;letter-spacing:-.02em;margin:0;font-weight:750}.ct-state{background:#dce9df;border:1px solid #b8d0bd;padding:5px 12px;border-radius:5px;font-size:.75rem;font-weight:850;letter-spacing:.12em}.ct-state[data-run=true]{background:#f4dfb3;border-color:#dec184}.ct-controls{display:flex;gap:9px;align-items:center;flex-wrap:wrap;padding:0 23px 17px}.ct-controls span{font-size:.78rem;color:#61737a;font-variant-numeric:tabular-nums}.ct-controls #ct-sound{margin-left:auto;font-size:.75rem;padding:6px 9px}.ct-viewport{position:relative;border-top:1px solid var(--ct-line);border-bottom:1px solid var(--ct-line);background:#eaf0e9}.ct-viewport canvas{display:block;width:100%;height:auto;aspect-ratio:1000/650;touch-action:none;cursor:crosshair}.ct-view-controls{position:absolute;bottom:12px;right:12px;display:flex;gap:4px}.ct-view-controls button{font-size:.72rem;padding:5px 10px;background:#fffdf7ed}.ct-selection{display:flex;gap:6px;flex-wrap:wrap;align-items:center;padding:10px 23px;border-bottom:1px solid var(--ct-line)}.ct-selection strong{font-size:.8rem;margin-right:8px}.ct-selection button{font-size:.74rem;padding:5px 9px}.ct-status{min-height:25px;margin:15px 23px 10px;font-size:.86rem;font-weight:600}.ct-footer{padding:4px 23px 12px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.ct-footer label{font-size:.77rem;margin-right:auto;display:flex;align-items:center;gap:6px}.ct-footer button{font-size:.73rem;padding:6px 9px}.ct-small{font-size:.76rem;line-height:1.55;color:#667b80}.ct-workshop> .ct-small{margin:0;padding:0 23px 18px}.ct-sidebar{display:flex;flex-direction:column;gap:16px}.ct-toolbox,.ct-objectives,.ct-account{border:1px solid var(--ct-line);background:var(--ct-paper);border-radius:12px;padding:19px}.ct-sidebar h2{font-size:1.08rem;margin:0 0 8px;font-weight:750}.ct-toolbox header>p:last-child{font-size:.77rem;color:#64777b;line-height:1.5}.ct-inventory{display:grid;grid-template-columns:1fr 1fr;gap:8px;max-height:490px;overflow:auto;padding:3px}.ct-inventory button{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:9px 3px;position:relative;min-height:91px;touch-action:none;font-size:.7rem}.ct-inventory button[aria-pressed=true]{background:#dceee8;border-color:#35868a}.ct-inventory canvas{width:66px;height:46px;pointer-events:none}.ct-inventory small{position:absolute;top:3px;right:6px;font-size:.65rem;color:#678}.ct-objectives ol{padding-left:18px;font-size:.79rem;line-height:1.6}.ct-objectives li{margin-bottom:9px}.ct-objectives li[data-done=true]{color:#267d62}.ct-stations{display:flex;flex-wrap:wrap;gap:5px}.ct-stations button{font-size:.67rem;padding:5px 7px}.ct-account{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:.77rem}.ct-result{margin:12px 23px 20px;background:#dfede1;border:1px solid #b6cfba;border-radius:10px;padding:20px;display:flex;align-items:center;justify-content:space-between;gap:16px}.ct-result h3{font-size:1.45rem;margin:0 0 8px;font-weight:800;letter-spacing:-.02em}.ct-result p:last-child{font-size:.8rem;margin:0}.ct-stars{color:#a47624;font-size:1.3rem;letter-spacing:.18em;margin:0 0 5px}.ct-dialog{width:min(1100px,95vw);max-height:90vh;border:1px solid #b8c9c6;border-radius:15px;background:var(--ct-paper);color:var(--ct-ink);padding:25px}.ct-dialog::backdrop{background:#182f3dbc;backdrop-filter:blur(3px)}.ct-dialog header{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:22px}.ct-dialog header h2{font-size:1.6rem;font-weight:750}.ct-dialog header p{font-size:.85rem}.ct-dialog section{margin-bottom:25px}.ct-dialog section h3{font-size:1.1rem}.ct-campaign-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px}.ct-campaign-grid button{text-align:left;padding:12px;min-height:109px;display:flex;flex-direction:column;gap:4px;font-size:.74rem}.ct-campaign-grid button span{color:#806829;letter-spacing:.08em}.ct-campaign-grid button small{font-weight:400;font-size:.65rem;color:#60767a}.ct-campaign-grid button[aria-current=true]{border:2px solid #287e86;background:#e1eeea}.ct-component-guide{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px;margin-top:25px}.ct-component-guide article{padding:12px;border:1px solid var(--ct-line);border-radius:8px;font-size:.78rem}.ct-component-guide canvas{float:left;margin-right:12px}.ct-component-guide h3{font-size:.86rem;font-weight:700}.ct-dialog #ct-help{font-size:.88rem;line-height:1.7}.ct-viewport:fullscreen{background:#eaf0e9;display:flex;align-items:center;justify-content:center}.ct-viewport:fullscreen canvas{height:100%;width:auto;max-width:100%;object-fit:contain}.contraptions [hidden]{display:none!important}
.ct-selection label{display:flex;align-items:center;gap:6px;font-size:.72rem}.ct-selection input{width:100px}.ct-selection output{width:32px}
.contraptions .ct-rotate-handle{position:absolute;z-index:2;transform:translate(-50%,-50%);width:38px;height:38px;padding:0;border:2px solid #147e89;border-radius:50%;background:#fffdf7;color:#145e67;font-size:27px;line-height:1;box-shadow:0 2px 8px #263b4930;cursor:grab;touch-action:none;user-select:none}.contraptions .ct-rotate-handle:active{cursor:grabbing;background:#dceee8}
.contraptions{--site-text:var(--ct-ink);--site-muted:#4b6068;--bs-heading-color:var(--ct-ink);--bs-link-color:#1d646b;--bs-link-hover-color:#134b52;color-scheme:light;background:var(--ct-paper);border-radius:16px;padding-top:22px;padding-bottom:22px}
.contraptions :is(h1,h2,h3,h4){color:var(--ct-ink)}
.contraptions button.ct-primary:hover:not(:disabled){background:#1d6b73;border-color:#1d6b73;color:#fff}
#contraptions a{color:#1d646b}#contraptions a:hover{color:#134b52}
#contraptions>nav{background:var(--ct-paper)!important;color:var(--ct-ink)}
.contraptions :is(.ct-eyebrow,.ct-small,.ct-controls span,.ct-header p:last-child,.ct-toolbox header>p:last-child,.ct-inventory small,.ct-campaign-grid button small){color:#4b6068}
.contraptions .ct-inventory button{font-size:.8rem}.contraptions .ct-inventory small{font-size:.75rem}.contraptions .ct-objectives ol{font-size:.9rem}.contraptions .ct-small{font-size:.85rem}.contraptions .ct-toolbox header>p:last-child{font-size:.88rem}.contraptions .ct-status{font-size:.95rem}
.contraptions button:disabled{opacity:1;background:#e7ece7;color:#56666c;border-color:#c5d0ce}.contraptions button.ct-primary:disabled{background:#dce8e6;color:#40595f;border-color:#b8cbca}
.ct-level-navigation{display:flex;gap:4px;flex-wrap:wrap}.contraptions .ct-level-navigation button{padding:7px 9px;font-size:.8rem}.contraptions #ct-choose-level{border-color:#247f86;color:#1d646b}.contraptions .ct-controls #ct-sound{margin-left:0}
.contraptions #ct-levels{box-sizing:border-box;width:min(1100px,calc(100% - 28px));max-height:calc(100dvh - 32px);overflow:auto}.contraptions #ct-levels header button{flex-shrink:0}
.ct-viewport:fullscreen{flex-direction:column;gap:0;border:0;background:#dce6e2;padding-top:50px;box-sizing:border-box}.ct-viewport:fullscreen canvas{flex:none;max-width:none;object-fit:fill}.ct-viewport:fullscreen .ct-view-controls{top:10px;right:12px;bottom:auto}.ct-viewport:fullscreen .ct-controls{box-sizing:border-box;width:100%;margin-top:auto;justify-content:center;flex-shrink:0;padding:12px 16px;background:#f6f3eb;border-top:1px solid #b8c9c6}.ct-viewport:fullscreen .ct-controls #ct-sound{margin-left:12px}.ct-viewport:fullscreen .ct-controls span{color:#425c65}
.contraptions .ct-dialog{--site-text:var(--ct-ink);--site-muted:#4b5f66;--bs-heading-color:var(--ct-ink);color-scheme:light}
.contraptions .ct-dialog :is(h2,h3,h4,p,li,dt,dd,strong){color:var(--ct-ink)}
.contraptions #ct-guide{box-sizing:border-box;width:min(1100px,calc(100% - 28px));max-height:calc(100dvh - 32px);overflow:auto}
.contraptions #ct-guide>header{align-items:flex-start}.contraptions #ct-guide>header button{flex-shrink:0}.contraptions #ct-guide>header p{font-size:.93rem;line-height:1.6;margin:8px 0 0}.contraptions #ct-guide>header .ct-eyebrow{font-size:.7rem;margin:0 0 8px}
.contraptions #ct-help{font-size:.95rem;line-height:1.7}.contraptions #ct-help :is(ol,ul){padding-left:24px}.contraptions #ct-help li{margin:0 0 12px}.contraptions #ct-help h3,.contraptions #ct-guide-parts-title{font-size:1.15rem;font-weight:750;margin:0 0 14px}.contraptions #ct-help section{margin-bottom:28px}
.contraptions .ct-guide-nav{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 24px}.contraptions .ct-guide-nav a{display:block;padding:7px 11px;border:1px solid #c6d5ce;border-radius:6px;background:#fffdf7;color:#1d646b;font-size:.83rem;text-decoration:underline;text-underline-offset:3px}
.contraptions .ct-component-guide{display:block;margin-top:0}.contraptions .ct-component-guide>section{scroll-margin-top:16px;margin-bottom:30px}.contraptions .ct-component-guide>section>h3{font-size:1.15rem;font-weight:750;margin:0 0 14px;padding-bottom:10px;border-bottom:1px solid #c6d5ce}
.ct-guide-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(270px,100%),1fr));gap:14px}.contraptions .ct-guide-cards article{background:#fffdf7;padding:17px;border:1px solid #cbd6cf;border-radius:10px;font-size:.88rem;line-height:1.65}.contraptions .ct-guide-cards article header{display:flex;align-items:center;justify-content:flex-start;gap:12px;margin:0 0 15px}.contraptions .ct-guide-cards canvas{float:none;flex-shrink:0;margin:0;border-radius:7px;background:#e9eee9}.contraptions .ct-guide-cards h4{font-size:1.05rem;font-weight:750;margin:0}.ct-guide-cards dl{margin:0}.ct-guide-cards dt{font-size:.78rem;font-weight:800;margin:14px 0 4px}.ct-guide-cards dd{margin:0}.ct-guide-cards dt:first-child{margin-top:0}
.ct-completion{box-sizing:border-box;width:min(480px,calc(100% - 28px));max-height:calc(100dvh - 32px);padding:30px 26px;border:3px solid #c6aa67;text-align:center;box-shadow:0 20px 80px #263b4960}.ct-completion[open]{animation:ct-win-arrive .2s ease-out}.ct-completion h2{font-size:1.8rem;letter-spacing:-.035em;font-weight:800;margin:10px 0}.ct-completion-stars{display:flex;justify-content:center;gap:12px;margin:18px 0;font-size:clamp(2.7rem,10vw,3.9rem);line-height:1.2;color:#cbd5cf}.ct-completion-stars .earned{color:#e5ae3e;text-shadow:0 3px 0 #b58228,0 0 18px #e8bf6650}.ct-completion p:not(.ct-eyebrow){font-size:.85rem;line-height:1.6}.ct-completion-up-next{padding:12px;background:#e4ece3;border-radius:8px;font-weight:700}.ct-completion-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:20px}.ct-completion-actions .ct-primary{grid-column:1/-1;padding:13px;font-size:1rem}.ct-completion-actions button{min-width:0}@keyframes ct-win-arrive{from{opacity:0;transform:translateY(12px) scale(.97)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.ct-completion[open]{animation:none}}
@media(max-width:1000px){.ct-layout{grid-template-columns:minmax(0,1fr) 230px}.ct-header{align-items:flex-start}.ct-header-actions{max-width:230px}.ct-toolbox,.ct-objectives,.ct-account{padding:14px}.contraptions{padding:0 14px}}
@media(max-width:720px){.ct-header{display:block}.ct-header-actions{max-width:none;margin-top:17px}.ct-layout{display:flex;flex-direction:column}.ct-workshop,.ct-sidebar{width:100%}.ct-sidebar{display:grid;grid-template-columns:1fr 1fr}.ct-toolbox{grid-column:1/-1}.ct-inventory{grid-template-columns:repeat(auto-fill,minmax(85px,1fr));max-height:230px}.ct-account{align-items:flex-start;flex-direction:column}.ct-level-head,.ct-controls{padding-left:14px;padding-right:14px}.ct-result{margin-left:14px;margin-right:14px;display:block}.ct-result button{margin-top:15px}.ct-footer{padding-left:14px;padding-right:14px}.ct-view-controls{bottom:6px;right:6px}.ct-view-controls button{padding:4px 7px}.ct-dialog{padding:16px}.ct-campaign-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.ct-viewport:fullscreen{display:grid;grid-template-columns:minmax(0,1fr) 260px;grid-template-rows:50px minmax(0,1fr) auto;padding:0;align-items:stretch;justify-content:stretch;overflow:hidden}
.ct-fullscreen-stage{grid-column:1;grid-row:2;min-width:0;min-height:0;display:flex;align-items:center;justify-content:center;overflow:hidden}
.ct-fullscreen-tools{grid-column:2;grid-row:2;min-width:0;min-height:0;overflow:auto;background:var(--ct-paper);border-left:1px solid #b8c9c6;overscroll-behavior:contain}
.ct-fullscreen-tools .ct-inventory canvas{width:66px;height:46px;max-width:66px;aspect-ratio:auto;cursor:inherit}
.ct-connection-guide{margin:12px 0;font-size:.82rem;line-height:1.55}.ct-connection-guide summary{cursor:pointer;font-weight:750;color:#1d646b}.ct-connection-guide p{margin:10px 0}.ct-wire-key,.ct-rope-key{display:inline-block;width:24px;vertical-align:middle;margin-right:6px;border-top:3px dashed #247f86}.ct-rope-key{border-top:3px solid #ae8e65}
@media(max-width:720px){.ct-viewport:fullscreen .ct-fullscreen-tools{overflow:auto}}
.ct-viewport:fullscreen .ct-controls{grid-column:1/-1;grid-row:3;margin:0}.ct-fullscreen-tools .ct-toolbox{padding:14px;border:0;border-radius:0;background:transparent}.ct-fullscreen-tools .ct-toolbox h2{font-size:1.1rem;margin:0 0 8px}.ct-fullscreen-tools .ct-inventory{grid-template-columns:1fr 1fr;max-height:none;overflow:visible}.ct-fullscreen-tools .ct-selection{padding:12px;position:sticky;top:0;z-index:3;background:var(--ct-paper)}
@media(max-width:720px){.ct-viewport:fullscreen{grid-template-columns:minmax(0,1fr);grid-template-rows:42px minmax(0,1fr) auto auto}.ct-fullscreen-tools{grid-column:1;grid-row:3;max-height:180px;border-left:0;border-top:1px solid #b8c9c6}.ct-viewport:fullscreen .ct-controls{grid-row:4;padding:8px;gap:5px}.ct-fullscreen-tools .ct-toolbox{padding:8px}.ct-fullscreen-tools .ct-toolbox header{display:none}.ct-fullscreen-tools .ct-inventory{grid-auto-flow:column;grid-auto-columns:96px;grid-template-columns:none;grid-template-rows:1fr;overflow-x:auto;max-height:110px}.ct-fullscreen-tools .ct-inventory button{min-height:85px}.ct-fullscreen-tools .ct-selection{position:static;padding:8px}.ct-viewport:fullscreen .ct-view-controls{top:7px}}
.ct-fullscreen-tools{display:flex;flex-direction:column;overflow:hidden}.ct-fullscreen-tools .ct-objectives{flex-shrink:0;max-height:30vh;overflow:auto;padding:12px;border:0;border-bottom:1px solid #b8c9c6;border-radius:0}.ct-fullscreen-tools .ct-objectives h2{font-size:1.1rem;margin:0 0 8px}.ct-fullscreen-tools .ct-objectives ol{margin:8px 0}.ct-fullscreen-tools .ct-selection{flex-shrink:0;max-height:26vh;overflow:auto;position:static}.ct-fullscreen-tools .ct-status{flex-shrink:0;margin:0;padding:8px 12px;font-size:.82rem;line-height:1.5;max-height:95px;overflow:auto;border-bottom:1px solid #b8c9c6}.ct-fullscreen-tools .ct-toolbox{flex:1;min-height:100px;overflow:auto}
@media(max-width:720px){.ct-fullscreen-tools{max-height: min(42dvh,340px)}.ct-fullscreen-tools .ct-objectives{max-height:100px;padding:8px}.ct-fullscreen-tools .ct-objectives .ct-eyebrow{display:none}.ct-fullscreen-tools .ct-objectives h2{font-size:.95rem}.ct-fullscreen-tools .ct-objectives ol{font-size:.8rem}.ct-fullscreen-tools .ct-selection{max-height:85px}.ct-fullscreen-tools .ct-status{font-size:.75rem;padding:5px 8px;max-height:44px}.ct-fullscreen-tools .ct-toolbox{flex:none;overflow:visible}.ct-fullscreen-tools .ct-inventory{max-height:100px}}


.ct-connection-tools{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}.ct-connection-tools button[aria-pressed=true]{background:#dceee8;border-color:#35868a}

.ct-toolbox .ct-selection{padding:10px 0;margin-bottom:10px;border-top:1px solid var(--ct-line);border-bottom:1px solid var(--ct-line)}.ct-toolbox .ct-selection strong{flex-basis:100%;margin-right:0}.ct-toolbox .ct-selection input{max-width:100%}.ct-fullscreen-tools .ct-toolbox .ct-selection{max-height:none;overflow:visible}

@media(max-width:720px){.ct-fullscreen-tools .ct-toolbox{flex:1;min-height:80px;overflow:auto}}

.ct-gear-help{margin:0 0 12px;padding:9px 10px;background:#e5eee7;border-left:3px solid #267d62;color:var(--ct-ink)}

.ct-controls #ct-music{margin-left:auto;font-size:.75rem;padding:6px 9px}.ct-controls #ct-sound{margin-left:0}.contraptions .ct-controls button.ct-primary>span{color:inherit;font-size:inherit}.ct-spinner{display:inline-block;width:12px;height:12px;margin-right:7px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;vertical-align:middle;animation:ct-spin .8s linear infinite}@keyframes ct-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.ct-spinner{animation:none}}


.contraptions #ct-run:not(:disabled){background:var(--ct-teal);border-color:var(--ct-teal);color:#fff}.contraptions #ct-run:hover:not(:disabled){background:#1d646b;border-color:#1d646b;color:#fff}

.contraptions #ct-run{transition:none}.contraptions #ct-run[aria-busy=true]{background:var(--ct-teal);border-color:var(--ct-teal);color:#fff}
