/* Shared stone and gold controls, with a compact game equipment screen. */
.maker-page{--maker-ink:#191309;--maker-line:#100c06;--maker-muted:#b9aa8d;--maker-gold:#ffff00;--maker-orange:#ff981f}
.maker-page [hidden]{display:none!important}
.maker-symbols{position:absolute;width:0;height:0;overflow:hidden}
.maker-page svg{fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:square;stroke-linejoin:miter}
.maker-page .dice-dots{stroke-width:3.5}
.maker-page .visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.maker-page .site-header{height:70px;min-height:70px;position:relative;z-index:20}
.maker-page .nav-wrap{height:70px;min-height:70px;flex-wrap:nowrap}
.maker-page .brand img{width:32px;height:37px;object-fit:contain;image-rendering:pixelated}
.maker-page .nav-wrap nav .current{color:var(--maker-orange)}
.maker-page .back-home{margin-left:auto;gap:7px;min-height:40px;padding:9px 14px;font-size:19px}
.maker-page .back-home img{width:18px;height:22px;object-fit:contain;image-rendering:pixelated}
.maker-page button:disabled{opacity:.4;cursor:not-allowed}
.editor-main{width:calc(100% - 120px);max-width:1536px;padding-top:19px;padding-bottom:18px}
.editor-layout{display:grid;grid-template-columns:minmax(0,1fr) 444px;align-items:start;gap:22px;margin-bottom:67px}
.editor-viewport,.editor-bank{height:max(613px,calc(100dvh - 102px));max-height:880px;border:2px solid #211b13;border-radius:3px;background:linear-gradient(110deg,#625b4f,#514a3e);box-shadow:inset 0 0 0 2px #897b62,2px 3px #08060480}
.editor-viewport{display:grid;place-items:center;padding:10px;position:relative;min-width:0}
.editor-viewport:after{inset:0;border-radius:1px;box-shadow:inset 0 0 0 1px #9f907270;pointer-events:none}
.viewport-rail,.render-instructions{display:none}
.render-area{position:relative;aspect-ratio:1;width:min(100%,calc(100dvh - 126px));max-width:856px;max-height:100%;background:radial-gradient(circle at 50% 38%,#5b4a33 0,#2c241a 62%,#17120c 100%);border:3px solid #17120c;outline:2px solid #87765c;outline-offset:-5px;overflow:hidden}
.render-area[data-background=parchment]{background:#b6a078}
.render-area[data-background=forest]{background:radial-gradient(circle at 50% 38%,#3e5035,#233325 62%,#101b13)}
.render-area[data-background=night]{background:radial-gradient(circle at 50% 38%,#333c59,#171b2e 62%,#0b0c17)}
.render-area[data-background=transparent]{background-color:#2c291f;background-image:linear-gradient(45deg,#3b362a 25%,transparent 25%),linear-gradient(-45deg,#3b362a 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#3b362a 75%),linear-gradient(-45deg,transparent 75%,#3b362a 75%);background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0}
#dwarf-canvas{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none;cursor:grab}
#dwarf-canvas:active{cursor:grabbing}
#dwarf-canvas:focus-visible{outline:2px solid #ffff00;outline-offset:-5px}
.maker-page:has(.render-mode[data-mode="2d"].active) #dwarf-canvas{cursor:default}
.canvas-caption{position:absolute;left:47px;right:47px;top:35px;text-align:center;pointer-events:none;font:25px/1.15 var(--pixel);color:#ffff00;text-shadow:2px 2px #000;white-space:pre-line;overflow-wrap:anywhere}
.view-switch,.picture-tools,.zoom-tools{position:absolute;z-index:2;display:flex;gap:8px}
.view-switch{top:8px;left:8px;flex-direction:column}
.picture-tools{top:8px;right:8px;flex-direction:column}
.zoom-tools{bottom:8px;left:8px}
.view-switch button,.mini-control{position:relative;width:36px;height:36px;min-width:36px;min-height:36px;display:grid;place-items:center;padding:0;color:#ffff00;background:#0b0906c7;border:1px solid #17120c;box-shadow:none;opacity:.6;cursor:pointer;font:22px/1 var(--pixel);text-shadow:1px 1px #000}
.view-switch button svg,.mini-control svg{width:23px;height:23px}
.view-switch button>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
.view-switch button.selected,.mini-control[aria-pressed=true]{opacity:1;background:#0b0906e6;border-color:#967013;box-shadow:inset 0 0 0 1px #ffd21f59}
.view-switch button:hover,.mini-control:hover{opacity:1;color:#ff981f}
.view-switch button:active,.mini-control:active{filter:brightness(.82)}
.render-area[data-hud=off] .view-switch,.render-area[data-hud=off] .zoom-tools,.render-area[data-hud=off] #turntable,.render-area[data-hud=off] #hold-pose{display:none}
.render-area[data-hud=off] #hide-hud{opacity:.25}
.render-area[data-hud=off] #hide-hud:hover{opacity:1}
.render-loading{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:16px;background:#1b170ff2;color:#ffff00;font:22px var(--pixel);z-index:3;text-align:center;padding:20px}
.render-loading img{object-fit:contain;image-rendering:pixelated;filter:drop-shadow(2px 3px #0009)}
.renderer-message{position:absolute;left:20px;right:20px;bottom:60px;padding:13px;background:#221c12ee;border:1px solid #81663a;color:#efce8c;font:18px/1.3 var(--pixel);text-align:center;z-index:4}
.editor-bank{position:relative;display:flex;flex-direction:column;overflow:visible;padding:0;background:#4b463c}
.editor-bank:after{pointer-events:none}
.editor-toprail{height:53px;flex:none;display:flex;align-items:flex-end;gap:4px;padding:2px 8px 0;background:#18140d;border-bottom:2px solid #100c06}
.editor-tabs{display:flex;align-items:flex-end;gap:0;flex:1;min-width:0;height:49px}
.editor-tabs button{position:relative;min-width:44px;width:48px;min-height:48px;flex:none;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:1px;padding:0 2px;border:0;background:none;color:#dfc99b;font:13px/1 var(--pixel);text-shadow:1px 1px #000;opacity:.55;cursor:pointer}
.editor-tabs button:before{content:"";position:absolute;left:2px;top:0;width:44px;height:35px;background:linear-gradient(#694236,#37251d);border:2px solid #231b14;box-shadow:inset 1px 1px #967455,inset -2px -2px #1b140e;z-index:0}
.editor-tabs button svg{position:relative;width:30px;height:30px;color:#a69870;filter:drop-shadow(1px 1px #000);margin:0 0 3px;z-index:1}
.editor-tabs button>span{position:relative;height:13px;line-height:13px;font-size:13px;z-index:1;white-space:nowrap}
.editor-tabs button.selected{opacity:1;transform:translateY(-2px);color:#ff981f}
.editor-tabs button.selected:before{background:linear-gradient(#944b36,#542d20)}
.editor-tabs button.selected svg{color:#dccba0}
.editor-tabs button:hover{opacity:.85}
.editor-tabs button:focus-visible{outline:2px solid #ffd21f;outline-offset:-2px}
#export-dwarf{width:110px;min-width:110px;min-height:40px;height:40px;margin:0 0 4px;padding:8px 8px;justify-content:center;font:17px/1 var(--pixel);gap:0}
.editor-panel{position:relative;flex:1;min-height:0;padding:0 20px 12px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#776650 #29231b;background-color:#4d483d;background-image:repeating-linear-gradient(113deg,#e0d0a908 0 1px,transparent 1px 5px)}
.editor-panel:before{content:"";position:absolute;inset:0 0 auto;height:100%;min-height:490px;pointer-events:none;box-shadow:inset 3px 0 #24211b,inset -3px 0 #29251d,inset 5px 0 #80735d,inset -5px 0 #756851;z-index:0}
.editor-panel>*{position:relative;z-index:1}
.panel-heading{display:flex;align-items:center;justify-content:center;height:70px;padding:0 8px;margin:0 -20px 0;background:transparent;border:0;box-shadow:none;text-align:center}
.panel-heading h2{font:34px/1 var(--pixel);font-weight:400;letter-spacing:0;color:#ff981f;text-shadow:2px 2px #000;margin:0;display:block}
.panel-description{color:#c4b596;font:16px/1.35 var(--pixel);margin:0 0 17px;text-shadow:1px 1px #0008}
#editor-equipment{padding:0 20px 9px;overflow:hidden}
.equipment-diagram{position:relative;width:min(380px,100%);aspect-ratio:380/404;margin:0 auto;isolation:isolate;background:var(--equipment-cross,none) center/100% 100% no-repeat}
.equipment-spine{position:absolute;z-index:-1;top:8%;bottom:9%;left:50%;width:12px;transform:translateX(-50%);border:2px solid #24221b;background:repeating-linear-gradient(0deg,#685f4e 0 4px,#373329 4px 9px);box-shadow:1px 0 #8b7c61}
.equipment-spine:before,.equipment-spine:after{content:"";position:absolute;left:50%;transform:translateX(-50%);width:248px;height:12px;border:2px solid #24221b;background:repeating-linear-gradient(90deg,#685f4e 0 4px,#373329 4px 9px);box-shadow:0 1px #8b7c61}
.equipment-spine:before{top:45%}.equipment-spine:after{bottom:0;width:224px}
.equipment-slot,.equipment-action{position:absolute;display:flex;align-items:center;justify-content:center;padding:5px;border:2px solid #23211a;outline:1px solid #7b705b;outline-offset:-5px;background:linear-gradient(135deg,#666253,#4d493e);box-shadow:inset 2px 2px #92887260,inset -2px -2px #302c235e,1px 2px #25201570;color:#292e25;cursor:pointer;text-shadow:1px 1px #000}
.equipment-slot{width:18.9474%;height:17.8218%}
.equipment-slot .slot-icon{width:70%;height:70%;filter:drop-shadow(1px 1px #9e95704d);opacity:.58}
.equipment-slot .slot-name{display:none}
.equipment-slot img{width:85%;height:85%;max-width:62px;max-height:62px;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(1px 2px #0008)}
.equipment-slot.selected,.equipment-slot[aria-pressed=true]{outline:2px solid #ffff00;outline-offset:-3px}
.equipment-slot:not(:disabled):hover,.equipment-action:hover{filter:brightness(1.12)}
.equipment-slot:not(:disabled):active,.equipment-action:active{filter:brightness(.82)}
.maker-page .equipment-slot:disabled{opacity:1;cursor:default;filter:none}
.equipment-slot:disabled .slot-icon{opacity:.35}
.equipment-action{top:1.9802%;height:17.8218%;gap:5px;font:18px/1 var(--pixel);color:#ffff00;background:linear-gradient(#555144,#403c33)}
.equipment-action svg{display:none}
.roll-action{left:0;width:24.2105%}.strip-action{right:0;width:23.1579%}.strip-icon{display:none}
.slot-hat{left:41.0526%;top:1.9802%}
.slot-cape{left:19.4737%;top:21.2871%}.slot-amulet{left:41.0526%;top:21.2871%}.slot-ammo{left:62.6316%;top:21.2871%}
.slot-weapon{left:11.5789%;top:40.5941%}.slot-body{left:41.0526%;top:40.5941%}.slot-shield{left:70.5263%;top:40.5941%}
.slot-legs{left:41.0526%;top:60.396%}.slot-hands{left:11.5789%;top:80.198%}.slot-feet{left:41.0526%;top:80.198%}.slot-ring{left:70.5263%;top:80.198%}
.equipment-hint{font:13px/1.2 var(--pixel);color:#c6b696;text-align:center;margin:8px 0 0;white-space:nowrap;text-shadow:1px 1px #000}
.model-examine{display:none}
.equipment-bank{position:absolute;z-index:5;inset:8px;padding:10px;background:#4d483d;border:3px solid #242019;outline:1px solid #807258;box-shadow:inset 0 0 0 1px #998669,2px 3px 9px #0008;display:flex;flex-direction:column}
.bank-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:-8px -8px 11px;padding:10px 9px;background:#3e382e;border-bottom:2px solid #262018}
.bank-title h3{font:27px/1 var(--pixel);color:#ff981f;text-shadow:2px 2px #000;margin:0}
.bank-tools{display:flex;gap:6px;margin-bottom:10px}

/* Original game interface sprites, displayed at integer pixel scales. */
.editor-panel{background:#514b40 url('assets/ui/panel-background.png') center/380px 522px repeat-y}
.editor-panel:before{background-image:url('assets/ui/frame-top-left.png'),url('assets/ui/frame-top-right.png'),url('assets/ui/frame-bottom-left.png'),url('assets/ui/frame-bottom-right.png'),url('assets/ui/frame-edge-top.png'),url('assets/ui/frame-edge-bottom.png'),url('assets/ui/frame-edge-left.png'),url('assets/ui/frame-edge-right.png');background-position:left top,right top,left bottom,right bottom,left top,left bottom,left top,right top;background-size:50px 60px,50px 60px,50px 60px,50px 60px,72px 12px,72px 12px,12px 72px,12px 72px;background-repeat:no-repeat,no-repeat,no-repeat,no-repeat,repeat-x,repeat-x,repeat-y,repeat-y;image-rendering:pixelated;box-shadow:none}
.equipment-slot{background:transparent url('assets/ui/slot-filled.png') center/100% 100% no-repeat;border:0;outline:0;box-shadow:none;image-rendering:pixelated}
.equipment-slot:before{content:"";position:absolute;width:74%;height:74%;left:13%;top:13%;background:var(--slot-art) center/contain no-repeat;image-rendering:pixelated;opacity:.55;pointer-events:none}
.equipment-slot:has(img):before{display:none}
.equipment-slot .slot-icon{display:none}
.slot-hat{--slot-art:url('assets/ui/equipment-head.png')}.slot-cape{--slot-art:url('assets/ui/equipment-cape.png')}.slot-amulet{--slot-art:url('assets/ui/equipment-neck.png')}.slot-ammo{--slot-art:url('assets/ui/equipment-tool.png')}.slot-weapon{--slot-art:url('assets/ui/equipment-tool.png')}.slot-body{--slot-art:url('assets/ui/equipment-top.png')}.slot-shield{--slot-art:url('assets/ui/equipment-shield.png')}.slot-legs{--slot-art:url('assets/ui/equipment-legs.png')}.slot-hands{--slot-art:url('assets/ui/equipment-gloves.png')}.slot-feet{--slot-art:url('assets/ui/equipment-boots.png')}.slot-ring{--slot-art:url('assets/ui/equipment-ring.png')}
.equipment-action{border:0;outline:0;box-shadow:none;background:transparent url('assets/ui/button-wide.png') center/100% 100% no-repeat;image-rendering:pixelated}
.equipment-spine{background:transparent url('assets/ui/frame-edge-left.png') center/12px 72px repeat-y;border:0;box-shadow:none;image-rendering:pixelated}
.equipment-spine:before,.equipment-spine:after{background:transparent url('assets/ui/frame-edge-top.png') center/72px 12px repeat-x;border:0;box-shadow:none}
.editor-tabs button:before,.editor-tabs button.selected:before{background:transparent url('assets/ui/button-square-active.png') center/100% 100% no-repeat;border:0;box-shadow:none;image-rendering:pixelated}
.editor-tabs button svg{visibility:hidden}
.editor-tabs button:after{content:"";position:absolute;left:9px;top:3px;width:30px;height:30px;background:var(--tab-art) center/contain no-repeat;image-rendering:pixelated;pointer-events:none}
#edit-tab-equipment{--tab-art:url('assets/ui/tab-equipment.png')}#edit-tab-character{--tab-art:url('assets/ui/tab-stats.png')}#edit-tab-motion{--tab-art:url('assets/ui/tab-walk.png')}#edit-tab-chat{--tab-art:url('assets/ui/tab-emotes.png')}#edit-tab-options{--tab-art:url('assets/ui/tab-settings.png')}

/* Controls and the searchable model bank. */
.bank-tools #bank-search{flex:1;min-width:0;font-size:16px;height:35px;padding:6px 8px}
.bank-tools #bank-filter{width:108px;font-size:15px;height:35px;padding:6px}
.model-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-content:start;gap:6px;padding:7px;flex:1;min-height:0;max-height:380px;overflow-y:auto;background:#2a2318;border:2px solid #17110a;border-radius:3px;box-shadow:inset 0 0 0 1px #8b795942;scrollbar-color:#c99a18 #1e170d;scrollbar-width:thin}
.model-option{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0;min-height:68px;padding:6px 3px;border:2px solid #18110a;border-radius:3px;background:linear-gradient(#32291b,#21190f);box-shadow:inset 0 0 0 1px #806c4040,0 2px #0b0704;color:#c8b492;font:12px/1.05 var(--pixel);text-align:center;overflow-wrap:anywhere;text-shadow:1px 1px #000}
.model-option img,.model-option canvas{width:39px;height:39px;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(1px 2px #000b)}
.model-option.selected,.model-option[aria-pressed=true]{box-shadow:inset 0 0 0 2px #ffff00,0 2px #0b0704;color:#ffff00}
.model-option:hover{background:linear-gradient(#4a3a21,#2e2112);box-shadow:inset 0 0 0 2px #ffc95890,0 2px #0b0704}
.model-option:active{transform:translateY(1px)}
.model-option .model-era{font:10px var(--pixel);color:#9f8c65}
.bank-empty{font:17px/1.35 var(--pixel);color:#b9aa8d;text-align:center;padding:40px 15px}
.bank-count{font:12px/1 var(--pixel);color:#b5a182;text-align:right;padding:9px 3px 0;min-height:20px;text-shadow:1px 1px #000}
.model-examine{margin-top:12px;padding:10px 0 0;border-top:1px solid #8b79544d;text-shadow:1px 1px #0008}
.model-examine>span{font:12px/1 var(--pixel);color:#a3906d}
.model-examine h3{font:21px/1.1 var(--pixel);color:#ffff00;margin:4px 0}
.model-examine p{font:14px/1.3 var(--pixel);color:#c4b493;margin:0;min-height:34px}
.tiny-button{font:17px/1 var(--pixel);color:#ffcb62;background:linear-gradient(#3c3020,#231a0e);border:1px solid #171009;box-shadow:inset 1px 1px #a78c5554,inset -1px -1px #0007,0 2px #100b05;padding:8px 10px;white-space:nowrap;text-shadow:1px 1px #000}
.tiny-button:hover{color:#ffff00;background:linear-gradient(#5c482b,#352615)}
.tiny-button:active{transform:translateY(1px);box-shadow:inset 1px 1px #0008}
.close-bank{min-width:29px;height:29px;padding:1px 7px;font-size:24px;background:#663322;color:#ffca77}
.editor-panel label,.editor-panel legend{font:19px/1.15 var(--pixel);color:#dfc99b;text-shadow:1px 1px #0009}
.editor-panel>label{display:block;margin:20px 0 8px}
.editor-panel fieldset{border:0;padding:0;margin:20px 0}
.editor-panel legend{margin-bottom:10px}
.editor-panel input:not([type=range]):not([type=checkbox]),.editor-panel select,.editor-panel textarea{width:100%;min-width:0;border-radius:0;background:#1e170e;color:#e2cda4;border:2px solid #6e5b3b;box-shadow:inset 2px 2px #0007;padding:9px 10px;font:19px/1.1 var(--pixel);text-shadow:1px 1px #000;accent-color:#ffd21f}
.editor-panel input:not([type=range]):not([type=checkbox]),.editor-panel select{height:41px}
.editor-panel textarea{resize:vertical;min-height:70px;max-height:160px}
.editor-panel input::placeholder,.editor-panel textarea::placeholder{color:#8d7b5d;opacity:1}
.editor-panel select{cursor:pointer;padding-right:20px}
.editor-panel select:focus-visible,.editor-panel input:focus-visible,.editor-panel textarea:focus-visible{outline:2px solid #ffcd43;outline-offset:2px}
.character-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 12px}
.character-fields label{display:block;font-size:17px}
.character-fields select{display:block;margin-top:6px;font-size:17px}
.colour-field{margin:17px 0!important}
.colour-field legend{font-size:17px;margin-bottom:7px}
.colour-swatches{display:flex;flex-wrap:wrap;gap:7px;min-height:27px}
.colour-swatches button{width:28px;height:28px;background:var(--swatch,var(--color,#554026));border:2px solid #171108;box-shadow:inset 1px 1px #ffffff35,1px 2px #0007;padding:0;color:#fff;font:12px var(--pixel);text-shadow:1px 1px #000}
.colour-swatches button.selected,.colour-swatches button[aria-pressed=true]{outline:2px solid #ffff00;outline-offset:1px}
.colour-swatches button:hover{outline:1px solid #d8c779;outline-offset:1px}
.name-input-row{display:flex;gap:7px}
.name-input-row .tiny-button{min-width:40px;font-size:25px}
.editor-panel .check-label{display:flex;align-items:center;gap:9px;margin:16px 0 0;cursor:pointer;font:18px var(--pixel);color:#d2bc8f}
.check-label input{width:17px;height:17px;margin:0;accent-color:#e7ba31}
.range-label{display:flex!important;align-items:center;justify-content:space-between;gap:15px}
.range-label output{color:#ffcd5d;font-size:17px}
.editor-panel input[type=range]{width:100%;height:21px;accent-color:#dcb12b;cursor:pointer}
.motion-play{width:100%;margin:20px 0 8px;justify-content:center;font-size:21px!important}
.motion-play>span{padding-right:5px}
.motion-note{display:flex;align-items:center;justify-content:center;gap:20px;margin:32px 0 24px;border:1px solid #746346;padding:22px 12px;background:#2a2217;box-shadow:inset 1px 1px #0006}
.motion-note svg{width:52px;height:52px;color:#a9914e;filter:drop-shadow(2px 2px #000)}
.motion-note p{font:22px/1.35 var(--pixel);color:#debb70;text-shadow:2px 2px #000;margin:0}
.control-note{font:14px/1.4 var(--pixel);color:#b4a180;margin:14px 0 0;text-shadow:1px 1px #0008}
.background-swatches{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.background-swatches button{display:flex;align-items:center;gap:6px;min-width:0;padding:7px 5px;background:#211a10;border:1px solid #7b6340;color:#c4ad84;font:15px var(--pixel);text-shadow:1px 1px #000}
.background-swatches button i{flex-shrink:0;width:16px;height:16px;background:var(--swatch);border:1px solid #a995665c}
.background-swatches .selected{color:#ffff00;border-color:#ffff00}
.background-swatches button:hover{background:#473820}
.checker-swatch{background:repeating-conic-gradient(#333 0% 25%,#aaa 0% 50%) 50%/8px 8px!important}
.style-options{display:flex;gap:7px}
.style-options button{flex:1;padding:9px 12px;border:1px solid #78603a;background:#241a0f;color:#c7b18a;font:20px var(--pixel);text-shadow:1px 1px #000}
.style-options button.selected{border-color:#ffff00;color:#ffff00;background:#4e3c1e}
.reset-fit{display:block;margin-top:22px}

/* Modes and sharing stay underneath the game screen. */
.editor-save-bar{position:absolute;top:calc(100% + 8px);left:0;right:0;min-height:57px;padding:6px 10px 5px;border:1px solid #4b3e2a;background:#211b13;display:grid;grid-template-columns:auto 1fr;align-items:center;gap:3px 8px}
.render-modes{display:flex;gap:3px}
.render-mode{padding:5px 8px;border:1px solid #76603b;background:#21190f;color:#b6a17d;font:14px/1 var(--pixel);text-shadow:1px 1px #000;white-space:nowrap}
.render-mode.active{color:#ffff00;border-color:#a47a20;background:#45371f}
.render-mode:hover{color:#ffff00;background:#493a24}
.share-actions{display:flex;justify-content:flex-end;gap:8px}
.share-actions .tiny-button{padding:4px 0;border:0;background:none;box-shadow:none;font:13px/1 var(--pixel);color:#c4b28a;text-decoration:underline;text-underline-offset:2px}
.share-actions .tiny-button:hover{color:#ffff00}
#export-status{grid-column:1/-1;font:12px/1.2 var(--pixel);color:#a49475;min-height:14px;margin:0;text-align:center;text-shadow:1px 1px #000}
.editor-bottom{display:flex;justify-content:space-between;gap:16px;margin-top:12px;color:#8e7e62;font:12px/1.35 var(--pixel);text-shadow:1px 1px #0008}
.editor-bottom a{color:#b9a27a;text-decoration:underline}
.editor-bottom p{margin:0}
@media(min-width:1450px){.editor-layout{grid-template-columns:minmax(0,1fr) 448px}.editor-main{width:calc(100% - 128px)}}
@media(max-width:1150px){.editor-main{width:calc(100% - 48px)}.editor-layout{gap:16px;grid-template-columns:minmax(0,1fr) 416px}.editor-tabs button{width:45px;min-width:44px}.editor-toprail{padding-inline:6px}#export-dwarf{width:103px;min-width:103px}.editor-panel{padding-inline:16px}.panel-heading{margin-inline:-16px}#editor-equipment{padding-inline:16px}.maker-page .nav-wrap nav{gap:17px}.maker-page .nav-wrap nav a{font-size:18px}}
@media(max-width:940px){.maker-page .nav-wrap nav{display:none}.editor-main{width:calc(100% - 28px)}.editor-layout{grid-template-columns:minmax(0,1fr) 380px;gap:12px}.editor-toprail{padding-inline:3px;gap:0}.editor-tabs button{width:44px}.editor-tabs button>span{font-size:12px}#export-dwarf{width:96px;min-width:96px;font-size:16px}.editor-panel{padding-inline:12px}.panel-heading{margin-inline:-12px}#editor-equipment{padding-inline:12px}.share-actions{gap:6px}.share-actions .tiny-button{font-size:12px}.render-mode{padding:5px 6px;font-size:13px}}
@media(max-width:760px){.editor-main{width:calc(100% - 20px);padding-top:12px}.editor-layout{display:flex;flex-direction:column;gap:12px}.editor-viewport{width:100%;height:auto;max-height:none;padding:8px}.render-area{width:100%;max-width:580px;height:auto;max-height:none}.editor-bank{width:100%;height:619px;max-height:none}.editor-toprail{padding-inline:8px;gap:4px}.editor-tabs button{width:48px}.editor-tabs button>span{font-size:13px}#export-dwarf{width:110px;min-width:110px;font-size:17px}.editor-panel{padding-inline:20px}.panel-heading{margin-inline:-20px}#editor-equipment{padding-inline:20px}.equipment-diagram{width:min(380px,100%)}.editor-bottom{display:block;font-size:11px;margin-top:11px}.editor-bottom p+p{margin-top:3px}.maker-page .back-home{font-size:18px;padding:8px 10px}.maker-page .nav-wrap{width:calc(100% - 28px);gap:10px}.canvas-caption{font-size:22px;top:32px}.share-actions .tiny-button{font-size:13px}.render-mode{font-size:14px;padding:5px 7px}.equipment-bank{inset:6px}.model-grid{max-height:none}.editor-save-bar{padding-inline:9px}}
@media(max-width:420px){.editor-tabs button{width:43px;min-width:43px}.editor-tabs button:before{left:1px;width:41px}.editor-tabs button>span{font-size:12px}.editor-toprail{padding-inline:5px;gap:0}#export-dwarf{width:101px;min-width:101px;font-size:16px}.editor-panel{padding-inline:12px}.panel-heading{margin-inline:-12px}#editor-equipment{padding-inline:12px}.equipment-spine:before{width:218px}.equipment-spine:after{width:197px}.editor-bank{height:585px}.equipment-hint{font-size:12px}.share-actions{gap:7px}.share-actions .tiny-button{font-size:12px}.render-mode{padding:5px 6px;font-size:13px}.editor-save-bar{padding-inline:7px;column-gap:7px}.background-swatches{gap:5px}.background-swatches button{font-size:14px}.character-fields{gap:12px 9px}.character-fields select{font-size:16px}.model-grid{gap:4px;padding:5px}.model-option{min-height:62px}.model-option img{width:34px;height:34px}}
@media(prefers-reduced-motion:reduce){.maker-page *{scroll-behavior:auto!important}}

/* Keep bitmap captions at their native width, including the longer tabs. */
.editor-tabs button{width:auto;min-width:44px}
.editor-tabs button:before{left:50%;width:44px;transform:translateX(-50%)}
.editor-tabs button:after{left:50%;transform:translateX(-50%)}
.editor-tabs button>span{flex:none}
.model-grid{grid-template-columns:repeat(auto-fill,72px);grid-auto-rows:72px;justify-content:center;gap:4px;padding:7px;background:#443f34;border:0;box-shadow:none}
.model-option{width:72px;height:72px;min-height:72px;padding:5px;background:transparent url('assets/ui/slot-filled.png') center/100% 100% no-repeat;border:0;border-radius:0;box-shadow:none;image-rendering:pixelated}
.model-option img,.model-option canvas{width:60px;height:60px;filter:drop-shadow(1px 2px #0008)}
.model-option>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.model-option.empty-option>span{position:static;width:auto;height:auto;clip:auto;font-size:14px}
.model-option.selected,.model-option[aria-pressed=true]{outline:2px solid #ffff00;outline-offset:-3px;box-shadow:none}
.model-option:hover{background:transparent url('assets/ui/slot-filled.png') center/100% 100% no-repeat;box-shadow:none;filter:brightness(1.12)}
/* Pixel measurements from the original Chathead interface. */
.editor-panel{background:#4b453a url('assets/ui/brown-tile.png') 0 0/176px 120px repeat}.panel-heading:after{content:"";position:absolute;bottom:0;left:0;right:0;height:12px;background:url('assets/ui/frame-edge-top.png') 0 0/72px 12px repeat-x;image-rendering:pixelated}.editor-panel:before{z-index:2}.editor-viewport{background:radial-gradient(circle at 14px 14px,#76684f 0 2.5px,transparent 3px),radial-gradient(circle at calc(100% - 14px) 14px,#76684f 0 2.5px,transparent 3px),radial-gradient(circle at 14px calc(100% - 14px),#76684f 0 2.5px,transparent 3px),radial-gradient(circle at calc(100% - 14px) calc(100% - 14px),#76684f 0 2.5px,transparent 3px),linear-gradient(#4a3e2f,#33291e)}.editor-tabs button:before,.editor-tabs button.selected:before{background-image:url('assets/ui/gp-ui-atlas.png');background-size:508px 565px;background-position:-185px -462px;background-repeat:no-repeat}.editor-tabs button:after{background-image:url('assets/ui/gp-ui-atlas.png');background-size:508px 565px;background-position:var(--tab-position);background-repeat:no-repeat}.editor-tabs button svg{visibility:hidden}#edit-tab-equipment{--tab-position:-373px -500px}#edit-tab-character{--tab-position:-469px -500px}#edit-tab-motion{--tab-position:-97px -534px}#edit-tab-chat{--tab-position:-309px -500px}#edit-tab-options{--tab-position:-65px -534px}.equipment-action{color:#ff981f}.equipment-action svg{display:block;width:24px;height:24px;color:#fff8cf;flex-shrink:0}.equipment-slot:has(img[hidden]):before{display:block}.equipment-slot .equipped-art{position:absolute;inset:7.5%;pointer-events:none}.slot-ammo:before,.slot-ring:before{display:none}.view-switch button svg{display:none}.view-switch button:before{content:"";position:absolute;inset:3px;background:currentColor;mask:var(--hud-icon) center/contain no-repeat}.view-switch [data-frame=head]{--hud-icon:url('assets/ui/equipment-head.png')}.view-switch [data-frame=body]{--hud-icon:url('assets/ui/equipment-top.png')}#hold-pose svg{display:none}#hold-pose:before{content:"";position:absolute;inset:3px;background:currentColor;mask:url('assets/ui/tab-walk.png') center/contain no-repeat}


/* The phone uses the original compact equipment layout. */
.maker-page #maker-menu-toggle{display:none}
#export-status a{color:#ffff00;text-decoration:underline}
@media(max-width:940px){
  .maker-page #maker-menu-toggle{display:flex;flex:none}
  .maker-page #maker-site-nav.open{position:absolute;top:70px;left:0;right:0;width:100%;display:flex;flex-direction:column;align-items:stretch;gap:0;padding:10px 20px 16px;background:#17120c;border-bottom:2px solid #6b5530;box-shadow:0 6px 12px #0008;z-index:30}
  .maker-page #maker-site-nav.open a{display:block;padding:10px 8px;font-size:21px}
}
@media(max-width:760px){
  .maker-page .site-header,.maker-page .nav-wrap{height:70px;min-height:70px}
  .maker-page .nav-wrap{width:calc(100% - 40px);gap:12px}
  .maker-page .brand>span{display:none}
  .maker-page .brand{flex:none;margin-right:auto}
  .maker-page .brand img{width:30px;height:36px}
  .maker-page .back-home{margin-left:auto;padding:9px 12px;font-size:18px;min-height:40px;white-space:nowrap}
  .maker-page #maker-menu-toggle{width:32px;height:40px;padding:5px;gap:5px}
  .editor-main{width:100%;max-width:none;padding:5px 0 16px}
  .editor-layout{display:flex;flex-direction:column;gap:6px;margin-bottom:68px;width:100%}
  .editor-viewport{width:calc(100% - 40px);height:calc(min(300px,100vw - 56px) + 16px);min-height:0;max-height:none;margin:0 20px;padding:6px;flex:none}
  .render-area{width:min(300px,calc(100vw - 56px));max-width:100%;height:auto;max-height:none;aspect-ratio:1}
  .editor-bank{width:100%;height:439px;min-height:0;max-height:none;flex:none;border-radius:0;margin:0}
  .editor-toprail{height:53px;min-height:53px;padding:2px 7px 0;gap:4px}
  .editor-tabs{height:49px;min-width:0;gap:0}
  .editor-tabs button{width:auto;min-width:44px;max-width:none;padding:0 2px}
  .editor-tabs button>span{font-size:13px}
  #export-dwarf{width:113px;min-width:113px;height:40px;min-height:40px;font-size:17px;margin-bottom:4px;padding:8px}
  .editor-panel{padding:12px 12px 10px;margin:0 2px;background-size:88px 60px}
  .editor-panel:before{min-height:0;background-size:25px 30px,25px 30px,25px 30px,25px 30px,36px 6px,36px 6px,6px 36px,6px 36px}
  .editor-panel .panel-heading{display:none}
  .editor-panel .panel-description{display:none}
  #editor-equipment{padding:8px 8px 0;overflow:hidden}
  #editor-equipment:before{height:calc(100% - 36px)}
  .equipment-diagram{width:190px;height:202px;max-width:100%;aspect-ratio:190/202;margin:0 auto}
  .equipment-slot{width:36px;height:36px}
  .equipment-slot:before{width:74%;height:74%;left:13%;top:13%}
  .equipment-slot img{max-width:31px;max-height:31px}
  .equipment-spine{width:6px;background-size:6px 36px}
  .equipment-spine:before,.equipment-spine:after{height:6px;width:124px;background-size:36px 6px}
  .equipment-spine:after{width:112px}
  .equipment-action{top:293px;width:60px;height:32px;min-height:32px;padding:3px;gap:3px;font-size:14px}
  .equipment-action svg{width:16px;height:16px}
  .roll-action{left:20px}.strip-action{right:20px}
  .equipment-hint{position:absolute;top:351px;left:0;right:0;margin:0;font-size:13px;line-height:13px;text-align:center;white-space:nowrap}
  .equipment-bank{inset:4px;padding:8px}
  .bank-title{padding:6px 7px;margin:-6px -6px 8px}
  .bank-title h3{font-size:23px}
  .bank-tools{margin-bottom:7px}
  .model-grid{grid-template-columns:repeat(auto-fill,56px);grid-auto-rows:56px;gap:4px;padding:4px;max-height:none}
  .model-option{width:56px;height:56px;min-height:56px;padding:4px}
  .model-option img,.model-option canvas{width:47px;height:47px}
  .editor-save-bar{left:8px;right:8px;top:calc(100% + 7px);padding:5px 7px;column-gap:7px;min-height:57px}
  .editor-bottom{margin:10px 20px 0;font-size:11px;max-width:calc(100% - 40px)}
  .canvas-caption{font-size:20px;top:29px;left:44px;right:44px}
  .character-fields{gap:10px 9px}
  .character-fields select{height:36px;font-size:16px}
  .editor-panel>label{margin-top:13px}
  .editor-panel fieldset{margin:13px 0}
  .colour-field{margin:12px 0!important}
  .colour-swatches{gap:7px}.colour-swatches button{width:26px;height:26px}
  .motion-note{margin:20px 0 14px;padding:14px 10px}
  .motion-note svg{width:36px;height:36px}.motion-note p{font-size:19px}
}
@media(max-width:380px){
  .maker-page .nav-wrap{gap:9px;width:calc(100% - 32px)}
  .maker-page .back-home{font-size:17px;padding:9px 10px}
  .editor-toprail{padding-inline:5px;gap:3px}
  .editor-tabs button{width:36px;min-width:36px;max-width:36px;padding:0 1px}
  .editor-tabs button:before{width:36px;height:35px}
  .editor-tabs button:after{width:28px;height:30px}
  .editor-tabs button>span{width:34px;max-width:34px;height:13px;font-size:10px;overflow:visible;text-align:center}
  .editor-tabs .rs-bitmap-text{max-width:34px;height:auto!important;vertical-align:bottom}
  #export-dwarf{width:113px;min-width:113px;font-size:16px}
  .editor-save-bar{grid-template-columns:1fr;gap:5px;padding:6px 8px}
  .render-modes{justify-content:center}.share-actions{justify-content:center}
  .editor-layout{margin-bottom:88px}
}
