.wheelFreedom{margin:14px 0}.wheelFreedom details{border:1px solid #d3d1c7;border-radius:12px;padding:12px}.wheelFreedom summary{cursor:pointer;font-weight:700}.wheelFreedom p{font-size:14px;line-height:1.6;color:#626b7d;margin:8px 0}.wheelFreedom label{display:block;margin:12px 0;font-weight:600}.wheelFreedom input[type=range],.wheelFreedom select{display:block;width:100%;margin-top:8px}.wheelFreedom output{float:right;color:#2443ad}.wheelFreedom .chips{gap:8px;flex-wrap:wrap}.wheelFreedom button[aria-pressed=true]{background:#2443ad;color:#fff}.wheelFreedom select{padding:10px;border:1px solid #ccc;border-radius:8px;background:#fff}.wheelFreedom input[type=checkbox]{width:20px;height:20px;vertical-align:middle}
/* Requested mobile layout: single-row navigation and tool header. */
.stageToolbar{flex-wrap:nowrap;gap:5px;max-width:calc(100% - 16px);overflow:visible;scrollbar-width:none}.stageToolbar::-webkit-scrollbar{display:none}.stageToolbar>*{flex-shrink:0}.stageToolbar button,.stageToolbar summary{white-space:nowrap!important;word-break:keep-all}.stageToolbar .viewMenu{margin-left:0}.stageToolbar .viewDock{flex:0 0 auto;min-width:0}.stage .stageViewSwitch{width:auto;min-height:38px;margin:0;padding:2px}.stage .stageViewSwitch button{flex:none;min-height:34px;padding:5px 8px;font-size:11px}.resultViewDock{flex-basis:auto;max-width:none}.sheetHead{display:flex;flex-wrap:nowrap;align-items:center}.sheetHead>*{flex-shrink:0}.sheetHead h2{flex:1;min-width:0}.sheetHead button{white-space:nowrap!important;word-break:keep-all}.sheetHead #nextBtn{max-width:none;width:auto}
@media(max-width:759px){
 .stageToolbar{gap:3px;overflow-x:auto;overflow-y:hidden}.stageToolbar .corner,.stageToolbar .viewMenu>summary{font-size:10px;padding:5px 6px;min-height:34px;height:34px}.stageToolbar .stageViewSwitch button{font-size:10px;padding:4px 6px;min-height:30px}.stage .stageViewSwitch{min-height:34px}.stageToolbar .rotationControls .corner{width:30px;height:34px;min-height:34px}.stageToolbar .rotationControls{gap:3px}.stageToolbar .viewMenu{margin-left:0}.stageToolbar .resultViewDock button{min-height:34px!important}.sheetHead{padding:7px 9px;gap:6px}.sheetHead h2{font-size:14px}.sheetHead #sheetToggle,.sheetHead #nextBtn,.sheetHead #nextAlt,#stageHelpButton{font-size:11px;min-height:36px;padding:6px 8px}.sheet.open{height:48dvh;max-height:calc(100dvh - 250px)}
 #home{box-sizing:border-box;padding:42px 18px 12px;align-items:center}.homeBox{gap:7px;max-width:400px}.homeMark{width:30px;height:30px}.homeEyebrow{font-size:10px;letter-spacing:.2em}.homeTitle{font-size:46px}.homeSub{font-size:12px;line-height:1.4;margin:0 0 4px}.homeBox .bigBtn{padding:9px 13px;gap:1px;min-height:46px}.homeBox .bigBtn b{font-size:18px;line-height:1.3}.homeBox .bigBtn span{font-size:11px;line-height:1.4}.homeBox .homeFoot{font-size:10px;line-height:1.45;margin:0}.homeBox .homeFoot button,.homeBox .homeFoot a{padding-top:3px;padding-bottom:3px;min-height:0}.homeBox #homeClose{min-height:34px;padding:6px;font-size:12px}#home #tutorialHomeNote{padding:9px 10px;margin:0 auto 8px}#home #tutorialHomeNote strong{font-size:14px;line-height:1.4}#home #tutorialHomeNote span{font-size:11px;line-height:1.4;margin-top:4px}#home #goMarket b{gap:5px;flex-wrap:nowrap}#home #goMarket .communityState{font-size:12px;padding:3px 6px}
}
@media(max-width:759px) and (max-height:650px){#home{padding:38px 16px 8px}.homeBox{gap:5px}.homeMark{width:23px;height:23px}.homeTitle{font-size:34px}.homeSub{font-size:11px;line-height:1.3;margin:0}.homeBox .bigBtn{min-height:40px;padding:6px 12px}.homeBox .bigBtn b{font-size:16px}.homeBox .bigBtn span{font-size:10px}#home #tutorialHomeNote{padding:7px 9px;margin-bottom:6px}#home #tutorialHomeNote strong{font-size:13px}#home #tutorialHomeNote span{font-size:10px}.homeBox .homeFoot{font-size:9px}}
@media(max-width:759px) and (max-height:650px){
 .homeBox{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 8px}.homeBox>*{grid-column:1/-1}.homeBox>.bigBtn{grid-column:auto;min-width:0;padding:6px 9px}.homeBox>.bigBtn span{font-size:10px}.homeBox>.bigBtn b{font-size:16px}#home #goMarket b{font-size:13px;gap:3px}#home #goMarket .communityState{font-size:10px;padding:2px 4px}#home #tutorialHomeNote br{display:none}#home #tutorialHomeNote strong{font-size:12px}#home #tutorialHomeNote span{font-size:10px}#home .home-shop{font-size:10px;padding:6px 8px}
}

/* Overhead controls stay together; long translations scroll horizontally. */
[id^="wheelView-"]>.chips{display:flex;flex-wrap:nowrap;gap:5px;overflow-x:auto}
[id^="wheelView-"]>.chips>button{flex:0 0 auto;white-space:nowrap!important;word-break:keep-all;min-width:0;margin:0;padding:9px 8px;font-size:12px}
.stage>#openKiln{position:absolute;transform:translate(-50%,-50%);z-index:12;white-space:nowrap;min-height:48px;padding:12px 20px;box-shadow:0 4px 18px #141e3633}
.stage>#openKiln[hidden]{display:none!important}
@media(max-width:390px){[id^="wheelView-"]>.chips>button{font-size:11px;padding:9px 6px}}

#potteryToolRack{position:absolute;z-index:12;left:calc((100% - 440px)/2);transform:translateX(-50%);padding:10px 14px 8px;border:1px solid #bc9c73;border-bottom:7px solid #a78058;border-radius:15px;background:linear-gradient(#f3e5ce,#ddc7a5);box-shadow:0 7px 18px #4d392426;max-width:calc(100% - 28px);pointer-events:auto}#potteryToolRack[hidden],#potteryToolRack [hidden]{display:none!important}#potteryToolRack>small{display:block;font-size:10px;color:#725a40;text-align:center;margin-bottom:5px}#potteryToolRack .chips,#rackGlaze{display:flex;gap:7px;align-items:end;flex-wrap:nowrap}#potteryToolRack button{background:#fbf6e9;color:#574c3b;border:1px solid #bba98c;border-radius:9px;margin:0;padding:6px 10px;font-size:11px;white-space:nowrap;min-height:40px}#potteryToolRack .rackTool{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:56px}#potteryToolRack svg{width:28px;height:35px;fill:#e1bf8e;stroke:#685442;stroke-width:1.8;stroke-linejoin:round}#potteryToolRack button[aria-pressed=true]{background:#fff;color:#1f3fa8;border:2px solid #1f3fa8;padding:5px 9px;box-shadow:0 -3px 0 #1f3fa8}#potteryToolRack button[aria-pressed=true] svg{fill:#b5c4e1;stroke:#244686}#finished360{width:min(720px,calc(100% - 20px));max-height:94dvh;padding:20px;background:#faf8f2;border:1px solid #c7c9bf;border-radius:20px;color:#34483e}#finished360::backdrop{background:#1e2c3670}#closeFinished360{display:block;margin-left:auto;padding:8px 12px}#finished360 h2{font-size:20px;margin:6px 0}#finished360 p,#finished360 small{font-size:12px;color:#5b6577}#finished360Canvas{width:100%;max-height:65dvh;object-fit:contain;touch-action:none;background:#e8e1d3;border-radius:14px}#finished360Status{display:block;margin-top:10px}.resultViewDock{max-width:440px!important}
@media(max-width:759px){#potteryToolRack{left:50%;padding:7px 9px 5px;border-bottom-width:5px}#potteryToolRack>small{font-size:8px}#potteryToolRack .chips,#rackGlaze{gap:4px}#potteryToolRack .rackTool{min-width:45px;padding:5px 7px;font-size:10px}#potteryToolRack svg{width:23px;height:28px}#potteryToolRack #dUndo{font-size:9px;padding:7px 5px}#finished360{padding:14px}}

/* A ceramic tool pot on the rear workbench, with directly selectable wooden tools. */
#potteryToolRack{left:auto;right:calc(440px + 36px);top:155px;bottom:auto!important;width:180px;height:178px;max-width:none;transform:none;padding:0;border:0;border-radius:0;background:none;box-shadow:none;isolation:isolate}
#potteryToolRack::before{content:'';position:absolute;z-index:3;left:38px;bottom:20px;width:109px;height:85px;border:1px solid #d3b996;border-radius:13px 13px 30px 30px;background:linear-gradient(100deg,#d6ba92 0%,#fff1cf 23%,#f1dcba 60%,#d4b58c 100%);box-shadow:5px 6px 4px #7f624026;pointer-events:none}
#potteryToolRack::after{content:'';position:absolute;z-index:1;left:36px;top:65px;width:112px;height:20px;border:5px solid #f9e7c8;border-radius:50%;background:#a88b66;box-shadow:0 -2px 0 #cbb08a;pointer-events:none}
#potteryToolRack>small{position:absolute;bottom:0;width:100%;color:#725a40;font-size:10px;text-align:center}
#potteryToolRack #dtools,#potteryToolRack #rackGlaze{position:absolute;inset:0;display:block}
#potteryToolRack .rackTool{position:absolute;top:0;left:39px;width:32px;height:110px;min-width:0;padding:0!important;border:0!important;border-radius:15px;background:transparent!important;box-shadow:none!important;transform:rotate(-20deg);transform-origin:50% 100%;z-index:2;justify-content:flex-start;overflow:visible}
#potteryToolRack .rackTool:nth-child(2){left:66px;top:-9px;transform:rotate(-4deg)}#potteryToolRack .rackTool:nth-child(3){left:91px;top:-3px;transform:rotate(13deg)}#potteryToolRack .rackTool:nth-child(4){left:111px;top:7px;transform:rotate(25deg)}
#potteryToolRack .rackTool svg{width:33px;height:92px;overflow:visible;fill:#d9a86b;stroke:#a67642;stroke-width:1.2;filter:drop-shadow(2px 2px 1px #62452c22)}
#potteryToolRack .rackTool span{position:absolute;top:-16px;left:50%;transform:translateX(-50%);font-size:10px;color:#775635;background:#fff6e4;padding:3px 6px;border-radius:8px;white-space:nowrap;opacity:0}
#potteryToolRack .rackTool:hover span,#potteryToolRack .rackTool:focus-visible span,#potteryToolRack .rackTool[aria-pressed=true] span{opacity:1}
#potteryToolRack .rackTool[aria-pressed=true]{z-index:4;top:-17px;filter:drop-shadow(0 0 2px #fff6d5)}#potteryToolRack .rackTool[aria-pressed=true] svg{fill:#e6b879;stroke:#855b31}
#potteryToolRack .rackTool:focus-visible{outline:2px solid #1f3fa8;outline-offset:3px}
@media(max-width:759px){#potteryToolRack{top:148px;right:13px;width:125px;height:142px;transform:scale(.76);transform-origin:100% 0}#potteryToolRack>small{font-size:11px}#potteryToolRack .rackTool svg{width:33px;height:92px}#potteryToolRack .rackTool{min-width:0;width:32px;font-size:10px}}

/* Full-length tools enter the jar; tooltips stay upright in a separate layer. */
#potteryToolRack{overflow:visible}#potteryToolRack .rackTool{height:150px;width:36px;top:-22px}#potteryToolRack .rackTool:nth-child(2){top:-32px}#potteryToolRack .rackTool:nth-child(3){top:-25px}#potteryToolRack .rackTool:nth-child(4){top:-14px}#potteryToolRack .rackTool svg{width:36px;height:150px;fill:none;stroke:#936b41;stroke-width:1.2;filter:drop-shadow(2px 1px 1px #6b492b20)}#potteryToolRack .rackTool[aria-pressed=true]{top:-40px;z-index:2}#potteryToolRack .rackTool[aria-pressed=true] svg{fill:none;stroke:#77522e}#potteryToolRack .rackTool span{display:none!important}#rackToolName{position:absolute;left:50%;top:-65px;transform:translateX(-50%);z-index:15;display:block;width:max-content;max-width:180px;padding:5px 10px;background:#fff9ed;border:1px solid #d6c2a2;border-radius:10px;color:#624c33;font-size:12px;line-height:1.4;white-space:nowrap;box-shadow:0 3px 10px #765d3420;pointer-events:none}#potteryToolRack::before{background:linear-gradient(100deg,#ccb08a,#fff0d0 22%,#eddbb8 65%,#c5a67e)}#potteryToolRack::after{z-index:1}
@media(max-width:759px){#potteryToolRack .rackTool svg{width:36px;height:150px}#rackToolName{max-width:140px;font-size:12px;top:-61px}}

/* Tool names live outside the clipped stage and rotated prop. */
#rackToolName{position:fixed!important;transform:none!important;max-width:calc(100vw - 16px)!important;overflow:visible!important;clip-path:none!important;white-space:nowrap!important;z-index:10000;min-height:29px;box-sizing:border-box}#rackToolName[hidden]{display:none!important}

/* Compact screens keep the tool pot in its own panel row, outside the vessel. */
@media(max-width:1180px){
 #potteryToolRack.rackDocked{position:relative;inset:auto;transform:none;width:180px;height:178px;margin:64px auto 8px;flex:none;grid-column:1/-1;overflow:visible}
 .stageToolbar{max-width:calc(100% - 20px);overflow-x:auto;overflow-y:hidden;padding-bottom:3px}
 .sheetHead{gap:5px}.sheetHead h2{font-size:15px}
}
@media(min-width:760px) and (max-width:1180px){.stageToolbar{max-width:calc(100% - 454px)}}
@media(max-height:540px) and (min-width:760px){.sheet.open{max-height:calc(100dvh - 16px);top:8px}.sheetHead{padding:5px 8px}}
@media(max-width:359px){.sheetHead{gap:3px;padding-inline:5px}.sheetHead #nextBtn,.sheetHead #sheetToggle,#stageHelpButton{font-size:10px;padding-inline:6px}.sheetHead h2{font-size:12px}}
@media(hover:none){#potteryToolRack .rackTool{min-width:44px}#potteryToolRack .rackTool:active{filter:brightness(1.12)}}

#potteryToolRack #dtools,#potteryToolRack #rackDeco,#potteryToolRack #rackGlaze{overflow:visible!important;clip-path:none!important;contain:none!important;padding-bottom:0;min-height:178px}
#potteryToolRack .rackTool,#potteryToolRack .rackTool svg{overflow:visible!important;clip-path:none!important}

#activeToolCursor{position:fixed;z-index:6;width:32px;height:110px;transform:translate(-6px,-8px) rotate(-32deg);transform-origin:6px 8px;pointer-events:none;filter:drop-shadow(2px 3px 2px #49351d33)}#activeToolCursor[hidden]{display:none!important}#activeToolCursor svg{width:100%;height:100%;fill:none;stroke:#795c3b;stroke-width:1.1;overflow:visible}

/* View and undo actions remain directly below the sheet header. */
#sheetViewBar{flex:none;padding:8px 12px;border-bottom:1px solid #e1dfd6;background:#faf8f2}#sheetViewBar[hidden],#sheetViewBar [hidden]{display:none!important}#sheetViewBar .wheelFreedom{margin:0}#sheetViewBar .chips{display:flex;gap:6px;flex-wrap:nowrap}#sheetViewBar button{min-height:44px;flex:1;min-width:0;padding:8px 5px;font-size:12px;white-space:nowrap} .sheet:not(.open) #sheetViewBar{display:none}
@media(max-width:359px){#sheetViewBar{padding:7px 8px}#sheetViewBar button{font-size:11px}}

/* Supplied ceramic pot: the back sits behind the handles, the front conceals their ends. */
#potteryToolRack::before,#potteryToolRack::after{left:28px;right:auto;top:auto;bottom:20px;width:125px;height:135px;box-sizing:border-box;border:0;border-radius:0;background:transparent url("assets/speckled-tool-pot.webp") no-repeat -45.45px -30.85px / 220px 188.5px;box-shadow:none;pointer-events:none}
#potteryToolRack::before{z-index:1;filter:drop-shadow(3px 5px 3px #62452c26)}
#potteryToolRack::after{z-index:3;clip-path:polygon(0 12%,10% 18%,30% 23%,50% 25%,70% 23%,90% 18%,100% 12%,100% 100%,0 100%)}

#potteryToolRack .rackTool:nth-child(4){left:101px;transform:rotate(17deg)}

/* Photo tools retain their real proportions and generous touch targets. */
#potteryToolRack .rackTool .toolPhoto{fill:none;stroke:none;filter:drop-shadow(1px 2px 1px #49351d24)}
#potteryToolRack .rackTool[data-d="stamp"] .toolPhoto{width:52px;height:106px;transform:rotate(180deg)}
#potteryToolRack .rackTool[data-d="erase"] .toolPhoto{width:42px;height:68px}
#potteryToolRack .rackTool[data-d="erase"]{top:-16px;left:116px;transform:rotate(22deg)}
#potteryToolRack .rackTool[data-d="erase"][aria-pressed=true]{top:-30px}
#activeToolCursor{width:50px;height:130px;transform:translate(-25px,-3px) rotate(-32deg);transform-origin:25px 3px}
#activeToolCursor .toolPhoto{stroke:none;fill:none;filter:none}
#activeToolCursor[data-tool="stamp"]{height:90px}#activeToolCursor[data-tool="stamp"] .toolPhoto{transform:rotate(180deg)}
#activeToolCursor[data-tool="erase"]{height:65px;width:40px;transform:translate(-20px,-10px) rotate(-20deg)}

#potteryToolRack .rackTool[data-d="erase"] .toolPhoto{width:34px;height:54px}
#potteryToolRack .rackTool[data-d="erase"]{top:12px;left:98px;transform:rotate(10deg)}
#potteryToolRack .rackTool[data-d="erase"][aria-pressed=true]{top:0}

/* Wall rail with three cups. Buttons remain upright and do not overlap; only photographs lean. */
#potteryToolRack{width:300px;height:222px;right:464px;left:auto;top:40px;transform:none;max-width:none;overflow:visible;isolation:isolate}
#potteryToolRack::before,#potteryToolRack::after{left:0;right:auto;top:62px;bottom:auto;width:300px;height:148px;border:0;border-radius:0;background:transparent url("assets/wall-tool-holders.webp") center / 100% 100% no-repeat;box-shadow:none;pointer-events:none}
#potteryToolRack::before{z-index:1;filter:drop-shadow(1px 3px 2px #71503230)}
#potteryToolRack::after{z-index:3;clip-path:polygon(0 42%,10% 42%,12% 47%,22% 51%,32% 47%,34% 42%,38% 42%,40% 47%,50% 51%,60% 47%,62% 42%,67% 42%,69% 47%,79% 51%,89% 47%,92% 42%,100% 42%,100% 100%,0 100%)}
#potteryToolRack #rackThrow,#potteryToolRack #rackDeco,#potteryToolRack #rackGlaze,#potteryToolRack #dtools{position:absolute;inset:0;display:block;overflow:visible!important;min-height:0;padding:0;pointer-events:none}
#potteryToolRack .rackTool[data-slot],#potteryToolRack .rackTool[data-slot][aria-pressed=true]{position:absolute;left:var(--tool-x);top:var(--tool-y,0px);width:44px;height:var(--tool-height,146px);min-width:44px;min-height:44px;padding:0!important;transform:none;z-index:2;pointer-events:auto;overflow:visible;align-items:center;justify-content:flex-start;filter:none;outline-offset:2px}
#potteryToolRack .rackTool[data-slot] svg,#potteryToolRack .rackTool[data-slot] .toolPhoto{width:var(--photo-width,38px);height:var(--tool-height,146px);pointer-events:none;transform:rotate(var(--lean,0deg));transform-origin:50% 88%;stroke:none;fill:none;transition:transform .12s ease;filter:drop-shadow(1px 1px 1px #49351d22)}
#potteryToolRack .rackTool[data-slot][aria-pressed=true] svg{transform:translateY(-8px) rotate(var(--lean,0deg));filter:drop-shadow(0 0 2px #fff9e5)}
#potteryToolRack [data-slot="brush"]{--tool-x:20px;--tool-y:14px;--lean:-5deg}
#potteryToolRack [data-slot="carve"]{--tool-x:64px;--tool-y:15px;--lean:3deg}
#potteryToolRack [data-slot="stamp"]{--tool-x:128px;--tool-y:48px;--tool-height:108px;--photo-width:54px;--lean:180deg}
#potteryToolRack [data-slot="erase"]{--tool-x:212px;--tool-y:96px;--tool-height:59px;--photo-width:36px;--lean:0deg}
#potteryToolRack [data-slot="trim"]{--tool-x:46px;--tool-y:14px;--lean:-3deg}
#potteryToolRack [data-slot="sponge"]{--tool-x:128px;--tool-y:107px;--tool-height:48px;--photo-width:52px;--lean:0deg}
#potteryToolRack [data-slot="glaze"]{--tool-x:46px;--tool-y:18px;--photo-width:46px;--lean:-3deg}
#potteryToolRack [data-slot="glazeBrush"]{--tool-x:128px;--tool-y:14px;--lean:3deg}
#activeToolCursor[data-tool="sponge"]{width:56px;height:48px;transform:translate(-28px,-24px);transform-origin:center}
@media(max-width:1440px){#potteryToolRack.rackDocked{position:relative;inset:auto;transform:none;width:300px;height:222px;margin:30px auto 10px;max-width:none;flex:none;grid-column:1/-1}}
@media(max-width:380px){#potteryToolRack.rackDocked{margin-inline:calc((100% - 300px)/2);transform:scale(.90);transform-origin:50% 50%;margin-top:17px;margin-bottom:-4px}}
@media(prefers-reduced-motion:reduce){#potteryToolRack .rackTool[data-slot] svg{transition:none}}

#potteryToolRack .rackTool[data-slot="stamp"] .toolPhoto{transform-origin:50% 50%}
#potteryToolRack [data-slot="glaze"]{--lean:0deg}

/* Each glaze tool owns one panel; utility controls remain available without a tool. */
#glazeBaseSettings[hidden],#freeGlaze[hidden],#fireSettings[hidden],#freeGlaze label[hidden],#glazePaintHint[hidden]{display:none!important}
#glazeBrushPalette{margin:16px 0}#glazeBrushPalette .swatch{display:grid;gap:3px;margin:0;font-size:12.5px}
.stage>#openKiln{right:auto;bottom:auto;width:max-content;height:auto;max-width:calc(100% - 24px);color:#fff;background:#1f3fa8;border-color:#1f3fa8}
.stage>#openKiln:hover,.stage>#openKiln:focus-visible{color:#fff;background:#17307f}
body:has(#home:not([hidden])) #potteryToolRack,body:has(#home:not([hidden])) #rackToolName,body:has(#home:not([hidden])) #activeToolCursor,body:has(#chSel:not([hidden])) #potteryToolRack,body:has(#chSel:not([hidden])) #rackToolName{display:none!important}
@media(max-width:400px){#sheetViewBar .chips{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible}#sheetViewBar [id^="topUndo-"]{grid-column:1/-1}}
