#character-toolbar #open-templates{min-height:40px;padding:6px 10px;font-size:13px;white-space:nowrap}
.appearance-template-overlay{position:absolute;inset:0;z-index:90;display:flex;align-items:center;justify-content:center;padding:14px;background:#1d21134f;pointer-events:auto}
.appearance-template-overlay[hidden]{display:none}
.appearance-template-sheet{display:flex;flex-direction:column;gap:10px;width:100%;max-width:420px;max-height:100%;padding:12px;border:8px solid #a65f23;border-image:url('/research-ui/window.png') 8 stretch;background:#ffdfa1;box-shadow:3px 4px #44270c66;color:#653a20}
.appearance-template-sheet header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;gap:8px}
.appearance-template-sheet h2{font-size:20px;margin:0;letter-spacing:.05em}
.appearance-template-sheet .original-close{position:static;flex:0 0 40px;width:40px;height:40px;padding:0;border:0;border-image:none;box-shadow:none;border-radius:0;background:transparent url('/research-ui/close.png') center/32px 32px no-repeat;image-rendering:pixelated;font-size:0;touch-action:manipulation}
.appearance-template-sheet .original-close:focus-visible{outline:2px solid #773c1a;outline-offset:1px}
.appearance-template-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:2px}
.appearance-template-sheet footer:not([hidden]){display:flex;flex-shrink:0;gap:6px}
.appearance-template-sheet footer button{flex:1;min-height:36px;padding:3px;font-size:12px;white-space:nowrap}
.appearance-template-sheet footer button:disabled{opacity:.5}
.appearance-template-status{margin:0;font-size:12px;flex-shrink:0}
.appearance-template-card{min-width:0;min-height:148px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:6px 2px 8px;border:3px solid #ba783b;box-shadow:inset 2px 2px #fff0c1,inset -2px -2px #d79852;background:#f6cf8b;color:#64391d;touch-action:manipulation}
.appearance-template-card[aria-pressed=true]{border-color:#aa321c;box-shadow:inset 0 0 0 2px #fff0c1;background:#ffeab7}
.appearance-template-card:focus-visible{outline:2px solid #773c1a;outline-offset:2px}
.appearance-template-card canvas{width:80px;max-width:100%;height:auto;aspect-ratio:80/104;image-rendering:pixelated;pointer-events:none}
.appearance-template-card span{font-size:14px;font-weight:700;white-space:nowrap}
@media(max-width:359px){.character-toolbar .middle-buttons{gap:8px}.character-toolbar #export{padding:6px 7px}.appearance-template-overlay{padding:10px}.appearance-template-sheet{gap:6px;padding:8px;border-width:6px}.appearance-template-list{gap:5px}.appearance-template-card{min-height:126px}.appearance-template-sheet h2{font-size:18px}.appearance-template-card span{font-size:13px}}
