/* Painted workstations used by Pip's neighbors. */
.dialog:has(.sp-world){width:min(100%,710px);padding:15px;background:#312632}
.sp-world{--sp-ink:#211925;--sp-line:#aa8768;--sp-gold:#f3cc85;--sp-shine:#fff0b6;--sp-shadow:#3d3035;color:#fff1d8}
.sp-world[data-chapter="1"]{--sp-shadow:#5b3b2b}.sp-world[data-chapter="2"]{--sp-shadow:#293e4b}.sp-world[data-chapter="3"]{--sp-shadow:#5b3340}.sp-world[data-chapter="4"]{--sp-shadow:#40405c}.sp-world[data-chapter="5"]{--sp-shadow:#47354d}
.sp-heading{display:flex;align-items:center;gap:12px;padding-right:48px;font:14px var(--pixel);color:var(--sp-gold)}.sp-place{flex:1}.sp-part{border-bottom:2px solid #80655b}
.dialog .sp-world h2{margin:3px 38px 9px 0;line-height:1.06;font-size:clamp(23px,3.6vw,32px)}
.sp-theatre{image-rendering:pixelated;background-image:linear-gradient(0deg,#241c2799,transparent 80%),var(--sp-scenery);background-size:cover;background-position:center;border:2px solid #9d7f61;box-shadow:inset 0 0 0 2px #402e3b;min-height:290px;display:flex;flex-direction:column;justify-content:space-between;overflow:hidden;padding:9px}
.sp-voice{display:flex;align-items:center;gap:8px;align-self:start;padding:3px 9px 3px 3px;background:#221b25eb;border:1px solid #987a69;box-shadow:0 2px #201b23;max-width:94%;min-height:49px}
.sp-sprite{image-rendering:pixelated;object-fit:contain;pointer-events:none;flex:none;display:block}
.dialog .sp-voice p{margin:0;font:15px/1.3 var(--body);color:#fff0d9}
.sp-bench{width:min(100%,565px);margin:19px auto 0;display:flex;flex-direction:column;align-items:center;gap:7px;padding:10px;background:linear-gradient(0deg,#251c26f7,var(--sp-shadow) 135%);border:2px solid #b18c67;box-shadow:0 4px 0 #211922,inset 0 2px #68505b}
.dialog .sp-instruction,.dialog .sp-success{margin:0 0 5px;text-align:center;font:19px/1.2 var(--pixel);color:#ffe4aa}
.sp-rail,.sp-tools,.sp-noterow,.sp-gear-rack,.sp-loom,.sp-crew,.sp-plates{display:flex;align-items:center;justify-content:center;gap:7px;flex-wrap:wrap}
.sp-token,.sp-small,.sp-gold,.sp-plate,.sp-piece,.sp-switch,.sp-wheel,.sp-reflector,.sp-hole,.sp-note{font:17px var(--pixel);border:2px solid #a18468;color:#ffe9c1;background:#52404a;box-shadow:inset 0 2px #806566,inset 0 -3px #382e38,0 2px #1f1a22;min-height:44px;min-width:44px}
.sp-small,.sp-gold{padding:5px 12px}.sp-gold{background:#d3a362;color:#2d2028;border-color:#f9d692;box-shadow:inset 0 2px #ffdfa4,inset 0 -3px #996c4b,0 2px #1f1a22}
.sp-world button:not(:disabled):hover,.sp-world button:not(:disabled):focus-visible{filter:brightness(1.2);border-color:#ffe8a0}
.sp-world button:disabled{opacity:.46}.sp-token,.sp-plate,.sp-wheel,.sp-marker,.sp-note,.sp-strand{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px}
.sp-token{padding:3px 9px}.sp-caption{display:block;color:inherit;font:15px/1.1 var(--pixel);white-space:nowrap}
.sp-feedback{font:14px/1.3 var(--body);color:#ffe0a0}.sp-feedback:not(:empty){padding:7px 2px 1px}
.sp-tools{justify-content:flex-start;margin-top:10px}.sp-help{margin-left:auto}.sp-hint{outline:3px dashed #fff49f;outline-offset:2px;box-shadow:0 0 13px #f7c468}
.sp-envelope{display:flex;align-items:center;justify-content:center;gap:8px;min-width:125px;padding:4px 15px;background:#d6bb97;border:3px solid #7c5652;box-shadow:inset 0 -4px #ad8d79,0 3px #201821}
.sp-yards{width:100%;height:clamp(160px,23vh,193px);position:relative;isolation:isolate;background:repeating-linear-gradient(0deg,#44353e 0 2px,#392c35 2px 19px);border:1px solid #7f6661;overflow:hidden}
.sp-track,.sp-ray{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.sp-yards>.sp-marker,.sp-yards>.sp-switch{position:absolute;transform:translate(-50%,-50%)}
.sp-outbox,.sp-house{background:#3a2d37;padding:2px 4px;border:1px solid #816658}.sp-house{display:flex;flex-direction:row;min-width:67px}.sp-destination{border-color:#ffe391;background:#574737}.sp-house .sp-caption{font-size:12px}
.sp-switch{border-radius:50%;font-size:23px;background:#907052;color:#fff2bb;min-width:38px;min-height:38px;line-height:1}
.sp-measure{display:flex;align-items:center;gap:8px;justify-content:center;width:100%;background:#3a303c;border:1px solid #75656a;padding:6px}.sp-ruler{display:flex;flex:1;height:32px;border:2px solid #9a7d6b;max-width:340px;background:#2d2330}
.sp-ruler i{flex:1;border-right:1px solid #89746b;position:relative}.sp-ruler i.sp-filled{background:linear-gradient(#d8ad64 3px,#b17749 4px 65%,#94603c 66%)}.sp-ruler i.sp-target:after{content:'';position:absolute;width:4px;background:#fff09d;top:-6px;bottom:-4px;right:-2px;box-shadow:0 0 5px #f3d86c}
.sp-bridge{background:repeating-linear-gradient(0deg,#34525c 0 3px,#3b5967 3px 7px)}.sp-bridge .sp-ruler{border-width:0 3px;background:#2f4c5d}.sp-bridge .sp-filled{border:1px solid #462f31}.sp-hoist .sp-filled{background:#b98d9b!important}.sp-counter{font:19px var(--pixel)}
.sp-chunks,.sp-length,.sp-buns{display:flex;gap:2px;align-items:center;justify-content:center}.sp-chunks i,.sp-length i{display:block;width:10px;height:17px;background:#dcaa72;border:1px solid #86644f;border-top-color:#ffe0a1}
.sp-plate{min-width:83px;padding:4px;position:relative}.sp-buns{min-height:29px;background:#d6bea5;box-shadow:inset 0 -3px #a98978;border-radius:33%}.sp-buns .sp-ghost{opacity:.35;filter:grayscale(1)}
.sp-note{width:clamp(35px,9vw,55px);height:49px;min-height:40px;min-width:0;background:#444455;border-color:#887b9b;color:#bbacc0}.sp-noterow{flex-wrap:nowrap}
.sp-fabric{display:grid;grid-template-columns:repeat(var(--holes),minmax(40px,1fr));gap:3px;background:repeating-linear-gradient(90deg,#945c64 0 3px,#a86d72 3px 5px);padding:7px;border:2px solid #d3a58d}
.sp-holes{display:grid;gap:3px}.sp-hole{border-radius:50%;background:#5c3c48;box-shadow:inset 0 2px #372b33;min-height:37px;min-width:37px}.sp-hole.sp-guide{border-color:#ffdfa5}.sp-hole.sp-threaded{background:#d5a665;color:#462d40}
.sp-piecework{width:75%;min-height:72px;display:grid;place-items:end center;border-bottom:6px solid #ae8260;background:linear-gradient(0deg,#67505d44,transparent)}
.sp-stack{width:80%;display:flex;flex-direction:column-reverse;align-items:center;gap:2px;padding:2px}.sp-stack i{height:9px;border:1px dashed #9c838d}.sp-stack i.sp-built{border:1px solid #af7550;background:#dcad7d}.sp-cake i.sp-built{background:#e4a6ac;border-top-color:#ffe1ad}
.sp-shelf{flex-direction:row;width:100%;justify-content:center;gap:4px}.sp-piece{display:inline-flex;align-items:center;justify-content:center;gap:1px;padding:4px;background:#6d4e4e}.sp-piece:disabled{opacity:.25}
.sp-gear-rack{width:100%;justify-content:center;gap:3px}.sp-wheel{background:#312933;padding:3px;min-width:0}.sp-metal{position:relative}.sp-pointer{position:absolute;inset:3px 44%;transform-origin:center center;background:linear-gradient(#fff2b1 0 32%,transparent 32%);filter:drop-shadow(1px 1px 0 #3a2434)}.sp-right{border-color:#bedb90}
.sp-loom{gap:19px}.sp-strand{padding:4px 5px;background:#3f3540;min-width:45px;border-top:3px solid #c99c70;border-bottom:3px solid #c99c70}.sp-strand i{width:9px;height:27px;background:var(--ribbon);box-shadow:inset 3px 0 #fff4}
.sp-board{position:relative;width:min(100%,341px);aspect-ratio:5/3.25;background:repeating-linear-gradient(0deg,#304958 0 3px,#354d5d 3px 21px);border:2px solid #728f96;isolation:isolate}
.sp-wind{background:repeating-linear-gradient(0deg,#4f4057 0 2px,#51465c 2px 21px);border-color:#a18b99}
.sp-raycells{position:absolute;inset:0;display:grid;grid-template-columns:repeat(5,1fr);grid-template-rows:repeat(4,1fr);align-items:center;justify-items:center}
.sp-reflector{width:min(87%,43px);min-width:0;height:min(90%,43px);min-height:0;font:bold 28px/1 var(--body);padding:0;background:#50616d;border-color:#b9c7c9}
.sp-end{opacity:.7}.sp-end.sp-on{filter:drop-shadow(0 0 7px #ffe693);opacity:1}.sp-gift,.sp-crew{margin:7px}.sp-gift{filter:drop-shadow(0 0 9px #f1bd7299)}
@media(max-width:540px){.dialog:has(.sp-world){padding:10px;max-height:92svh}.sp-theatre{padding:5px}.sp-bench{padding:7px 4px;margin-top:12px}.sp-voice{max-width:100%;gap:4px}.sp-voice img{width:36px;height:36px}.dialog .sp-voice p{font-size:13px}.sp-yards{height:174px}.sp-house{min-width:46px;flex-direction:column;gap:0;padding:1px 2px}.sp-house .sp-sprite{width:21px;height:21px}.sp-house .sp-caption{font-size:10px}.sp-outbox .sp-sprite{width:30px;height:30px}.sp-outbox .sp-caption{font-size:10px}.sp-tools,.sp-rail{gap:4px}.sp-small,.sp-gold{padding:5px 7px;font-size:15px}.sp-world .sp-wheel img{width:48px;height:48px}.sp-plate{min-width:60px}.sp-plate img{max-width:26px;height:auto}.sp-buns{gap:0}.sp-buns img{width:15px;height:19px}.sp-piece{padding:3px;min-width:36px}.sp-piece img{width:17px;height:19px}.sp-length{gap:0}.sp-length i{width:6px}.sp-loom{gap:10px}.sp-token{padding:3px 6px}}
@media(max-height:510px) and (orientation:landscape){.dialog:has(.sp-world){max-height:94svh}.sp-theatre{min-height:180px}.sp-bench{margin-top:5px}.sp-board{max-width:240px}.sp-yards{height:140px}}

.sp-instruction-row{display:flex;align-items:center;justify-content:center;gap:6px}
.sp-voice p{flex:1}.sp-speak{display:grid;place-items:center;width:38px;min-height:38px;flex:none;border:1px solid #8b735f;background:#493b46;box-shadow:inset 0 1px #68505a}
.sp-peg{position:absolute;inset:0 44%;background:linear-gradient(#ffe086 0 14%,transparent 14%);filter:drop-shadow(1px 1px #6e4739)}
@media(pointer:coarse){.sp-switch,.sp-speak,.sp-hole{min-height:44px;min-width:44px}.sp-reflector{min-height:min(100%,44px);min-width:min(100%,44px)}}
