.character-grid-modal{display:grid;grid-template-columns:repeat(6,1fr);row-gap:10px;column-gap:2px}.modal-character{text-align:center;cursor:pointer;border:2px solid transparent}.modal-character:hover{border:2px solid #ff00ff65}.modal-character-img-wrap{width:84px;height:56px;overflow:hidden;line-height:0;margin:0 auto 4px}.modal-character img{width:100%;height:100%;object-fit:contain;transition:transform .15s ease}.modal-character:hover img{transform:scale(1.2)}.modal-character p{margin:-5px 0 0;font-size:.75rem}.modal-character.touched{border:2px solid #ff00ff}.undo-redo-container{position:fixed;right:20px;bottom:20px;z-index:900;display:flex;gap:4px;transform-origin:bottom right;transition:transform .1s ease;pointer-events:none}.undo-redo-container .undo-button,.undo-redo-container .redo-button{width:34px;height:34px;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;background:#ffffffd9;color:#2563eb;border:1px solid rgba(37,99,235,.5);border-radius:4px;cursor:pointer;padding:0;margin:0;transition:opacity .15s,background-color .15s;pointer-events:auto}.undo-redo-container .undo-button svg,.undo-redo-container .redo-button svg{width:24px;height:24px;display:block}.undo-redo-container .undo-button:active:enabled,.undo-redo-container .redo-button:active:enabled{opacity:.6}.undo-redo-container .undo-button:disabled,.undo-redo-container .redo-button:disabled{opacity:.3;cursor:not-allowed}body.dark-mode .undo-redo-container .undo-button,body.dark-mode .undo-redo-container .redo-button{background:#1e1e1ed9;color:#67e8f9;border-color:#67e8f980}.character-modal-filters{display:flex;flex-wrap:nowrap;gap:28px;margin:8px 0 0;padding:12px 10px 8px;background:#f8f8f8;border-radius:6px;align-items:center;flex-shrink:0;overflow-x:auto;overflow-y:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-x;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.25) transparent}.tab-content.character-grid-modal{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.25) transparent}.tab-content.character-grid-modal::-webkit-scrollbar{width:6px;height:6px}.tab-content.character-grid-modal::-webkit-scrollbar-track{background:transparent}.tab-content.character-grid-modal::-webkit-scrollbar-thumb{background:#0003;border-radius:3px}.tab-content.character-grid-modal::-webkit-scrollbar-thumb:hover{background:#00000059}.tab-content.character-grid-modal::-webkit-scrollbar-button{display:none;width:0;height:0}.tab-content.character-grid-modal::-webkit-scrollbar-corner{background:transparent}body.dark-mode .tab-content.character-grid-modal{scrollbar-color:rgba(255,255,255,.25) transparent}body.dark-mode .tab-content.character-grid-modal::-webkit-scrollbar-thumb{background:#fff3}body.dark-mode .tab-content.character-grid-modal::-webkit-scrollbar-thumb:hover{background:#ffffff59}body.dark-mode .character-modal-filters{background:#1f1f1f;scrollbar-color:rgba(255,255,255,.25) transparent}.character-modal-filters::-webkit-scrollbar{width:6px;height:6px}.character-modal-filters::-webkit-scrollbar-track{background:transparent}.character-modal-filters::-webkit-scrollbar-thumb{background:#0003;border-radius:3px}.character-modal-filters::-webkit-scrollbar-thumb:hover{background:#00000059}.character-modal-filters::-webkit-scrollbar-button{display:none;width:0;height:0}.character-modal-filters::-webkit-scrollbar-corner{background:transparent}body.dark-mode .character-modal-filters::-webkit-scrollbar-thumb{background:#fff3}body.dark-mode .character-modal-filters::-webkit-scrollbar-thumb:hover{background:#ffffff59}.character-modal-filter-group{display:flex;flex-direction:column;gap:4px;flex-shrink:0}.character-modal-filter-label{font-size:10px;color:#888;text-transform:uppercase;letter-spacing:.5px;white-space:nowrap;line-height:1}body.dark-mode .character-modal-filter-label{color:#999}.character-modal-filter-buttons{display:flex;gap:3px;flex-wrap:nowrap;flex-shrink:0}.character-modal-filter-btn{width:36px;height:36px;padding:0;border:2px solid transparent;border-radius:6px;background:#2a2a2a;cursor:pointer;overflow:hidden;box-sizing:border-box;display:flex;align-items:center;justify-content:center;transition:border-color .15s;flex-shrink:0}.character-modal-filter-btn img{width:105%;height:105%;object-fit:contain;display:block;pointer-events:none}.character-modal-filter-btn.active{border-color:#eb259f;border-width:3px}body.dark-mode .character-modal-filter-btn.active{border-color:#67e8f9;border-width:3px}.character-modal-filter-reset{width:36px;height:36px;background:none;color:#2563eb;border:none;cursor:pointer;padding:0;display:flex;align-items:center;justify-content:center;transition:opacity .15s;flex-shrink:0;align-self:flex-end}body.dark-mode .character-modal-filter-reset{color:#67e8f9}.character-modal-filter-reset:active{opacity:.6}.character-modal-filter-reset svg{transform:rotate(-90deg);width:24px;height:24px}.modal-character.character-modal-filter-hidden{display:none!important}.character-modal-header{display:flex;align-items:center;gap:28px;padding-right:50px}.character-modal-header h3{flex-shrink:0;margin-top:.7em}.character-modal-selected-filters{display:flex;align-items:center;gap:3px;flex:1;min-width:0;overflow-x:auto;overflow-y:hidden;overscroll-behavior:contain;touch-action:pan-x;-ms-overflow-style:none;scrollbar-width:none}.character-modal-selected-filters::-webkit-scrollbar{display:none}.character-modal-selected-filters.character-modal-selected-empty{display:none}.character-modal-selected-icon{width:28px;height:28px;padding:0;border:none;border-radius:5px;background:#2a2a2a;cursor:pointer;overflow:hidden;box-sizing:border-box;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:opacity .15s}.character-modal-selected-icon:hover{opacity:.8}.character-modal-selected-icon img{width:105%;height:105%;object-fit:contain;display:block;pointer-events:none}.character-modal-header-reset{width:28px;height:28px;align-self:center}.character-modal-header-reset svg{width:20px;height:20px}@media screen and (max-width: 768px){.character-modal-filters{gap:18px;padding:8px}.character-modal-filter-btn,.character-modal-filter-reset{width:32px;height:32px}.character-modal-filter-reset svg{width:22px;height:22px}.character-modal-selected-icon,.character-modal-header-reset{width:22px;height:22px}.character-modal-header-reset svg{width:16px;height:16px}.character-modal-header{padding-right:40px;gap:16px}}
