/* Compact visual workshop. Shared advanced controls stay available in Options. */
.visual-palette{position:absolute;z-index:9;left:50%;bottom:18px;transform:translateX(-50%);width:min(760px,calc(100% - 32px));padding:12px 14px 9px;border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none;color:#fff4d6;font:12px 'Trebuchet MS','Segoe UI',sans-serif;text-shadow:0 1px 3px #162820,0 1px 7px #162820}
.visual-palette[hidden]{display:none!important}.visual-palette header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px}.palette-tabs,.palette-actions,.palette-history{display:flex;gap:5px;align-items:center}.visual-palette button{font:inherit;color:#e8e6ce;border:1px solid #bec69b47;background:#d3deb20d;border-radius:6px;cursor:pointer;min-height:30px;padding:5px 10px}.visual-palette button:hover{background:#b9bd7640;border-color:#f0d99c}.visual-palette button:focus-visible{outline:2px solid #f8e2a7;outline-offset:3px}.visual-palette button.selected{color:#fff3c8;background:#adab6933;border-color:#f0d89c;box-shadow:inset 0 0 0 1px #e7d18b35}.visual-palette button:disabled{opacity:.3;cursor:default}.palette-tabs button{font-weight:bold;border-color:transparent;background:transparent;padding:7px 12px}.palette-actions button{font-size:10px;padding:5px 8px;color:#d7ddc0}.palette-cards{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:6px;max-height:190px;overflow-y:auto;padding:3px;scrollbar-width:thin}.palette-cards button{display:flex;flex-direction:column;align-items:center;gap:4px;padding:5px 3px 7px;min-height:83px;background:linear-gradient(150deg,#a3ab7e14,#172e2428);border-radius:9px}.palette-cards canvas{display:block;width:100%;height:52px;object-fit:contain;pointer-events:none}.palette-cards button span{font-size:10px;line-height:1.15;text-align:center;min-height:12px}.palette-cards button.selected{border-color:#f6dea0;box-shadow:0 0 0 2px #e6cc7b46}.visual-palette footer{display:flex;align-items:center;gap:12px;border-top:1px solid #b8c49b29;padding-top:10px;margin-top:9px}.palette-brush-size{display:flex;align-items:center;gap:8px;font-size:11px;white-space:nowrap}.palette-brush-size input{width:115px;accent-color:#e6d296}.palette-brush-size output{font-size:10px;min-width:43px;font-variant-numeric:tabular-nums;color:#d2dab9}#paletteSelection{flex:1;font-size:11px;color:#dfdbb1}#paletteTest{background:#a9ba6630;border-color:#bac87b8a;font-weight:bold;padding:6px 13px}.palette-history button{min-width:30px;padding:3px;font-size:20px;line-height:1}.visual-palette p{margin:8px 0 0;text-align:center;color:#bec9a8;font-size:9px;line-height:1.4}.visual-palette p b{color:#dcdcb9;font-weight:normal}
.simple-editor .paint-dock,.simple-editor #editorToolsToggle{display:none!important}.simple-editor .editor-panel{top:94px;max-height:calc(100dvh - 300px);width:330px}.simple-editor .editor-panel .legacy-editor-tools,.simple-editor .editor-panel .legacy-basic-controls,.simple-editor .editor-panel>#editorTest,.simple-editor .editor-panel>#editorTips{display:none!important}.simple-editor .editor-panel .bench-label>span{display:none}.simple-editor .editor-panel .bench-label strong{font-size:22px}.simple-editor .editor-panel #creatorCapacity{font-size:9px}.simple-editor .editor-materials canvas{display:block;width:100%;height:45px;object-fit:contain}.visual-palette.testing{width:auto;min-width:220px}.visual-palette.testing header,.visual-palette.testing .palette-cards,.visual-palette.testing .palette-brush-size,.visual-palette.testing #paletteSelection,.visual-palette.testing .palette-history{display:none}.visual-palette.testing footer{border:0;padding:0;margin:0;justify-content:center}.catalog-open .visual-palette,.character-open .visual-palette{visibility:hidden}
@media(max-width:760px){.visual-palette{bottom:10px;width:calc(100% - 20px);padding:9px}.visual-palette header{gap:4px;margin-bottom:7px}.palette-tabs{gap:1px}.palette-tabs button{font-size:11px;padding:6px 8px}.palette-actions{gap:3px}.palette-actions button{font-size:9px;padding:5px}.palette-cards{gap:4px}.palette-cards button{min-height:71px;padding:3px 1px 5px}.palette-cards canvas{height:42px}.palette-cards button span{font-size:9px}.visual-palette footer{gap:6px;padding-top:7px;margin-top:7px}.palette-brush-size input{width:75px}.palette-brush-size{font-size:10px;gap:4px}#paletteSelection{font-size:10px}.visual-palette p{font-size:8px}.simple-editor .editor-panel{max-height:calc(100dvh - 310px);right:12px;top:90px}}
@media(max-width:520px){.palette-cards{grid-template-columns:repeat(4,minmax(0,1fr));max-height:156px}.palette-actions #paletteSave{display:none}.palette-tabs button{padding:5px 7px}.visual-palette footer{flex-wrap:wrap}.palette-brush-size{flex:1}.palette-brush-size input{width:95px}#paletteSelection{display:none}.visual-palette p{max-width:300px;margin:6px auto 0}.simple-editor .editor-panel{max-height:calc(100dvh - 365px)}}
@media(max-height:600px){.visual-palette{bottom:8px;padding:7px 10px}.visual-palette header{margin-bottom:4px}.palette-cards{max-height:125px}.palette-cards button{min-height:62px}.palette-cards canvas{height:37px}.visual-palette footer{padding-top:5px;margin-top:4px}.visual-palette p{margin-top:5px}.simple-editor .editor-panel{top:85px;max-height:calc(100dvh - 265px)}}
/* Preview canvases belong to their buttons, never to the game viewport. */
.game .palette-cards canvas,.game .editor-materials canvas{position:static;inset:auto;display:block;flex:none;max-width:100%;object-fit:contain;pointer-events:none}
.visual-palette button,.visual-palette button.selected,.visual-palette button:hover,.palette-cards button,.palette-cards button.selected,.palette-tabs button,.palette-tabs button.selected,.palette-actions button,#paletteTest{background:transparent;box-shadow:none;text-shadow:0 1px 3px #162820,0 1px 7px #162820;color:#fff4d6}
.palette-cards button{border-color:#f0e8c759;overflow:hidden}.palette-cards button.selected{border:2px solid #ffe5a7;padding:4px 2px 6px}.palette-tabs button.selected{border-color:transparent;border-bottom-color:#ffe5a7;border-radius:0}.visual-palette footer{border-top:0}.visual-palette p,.visual-palette p b,#paletteSelection,.palette-brush-size output{color:#fff0cb}
.simple-editor .editor-panel,.simple-editor .world-heading,.simple-editor .game-bar,.simple-editor .game-top-right{background:transparent;box-shadow:none;backdrop-filter:none;border-color:transparent;text-shadow:0 1px 4px #162820,0 1px 8px #162820}
