.map-spell-panel{position:absolute;z-index:8;right:14px;top:14px;width:310px;max-width:calc(100% - 28px);max-height:calc(100% - 28px);overflow:auto;overscroll-behavior:contain;padding:16px;border:1px solid var(--border);border-radius:16px;background:linear-gradient(var(--panel-strong),var(--panel-strong)),#18191b;box-shadow:0 12px 40px #0006;color:var(--ink);font-size:13px;scrollbar-width:thin}
.map-spell-shapes button{padding-inline:4px!important;white-space:nowrap;font-size:12px!important}.map-spell-actions button{white-space:nowrap;font-size:12px!important;padding-inline:6px!important}
.map-spell-editing .map-token-label,.map-spell-editing .map-chest-warning,.map-spell-editing .map-chest-rarity{pointer-events:none!important}.map-spell-editing>canvas{cursor:crosshair}
.map-spell-panel[hidden]{display:none}.map-spell-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.map-spell-header strong{font-size:15px;font-weight:500;overflow-wrap:anywhere}.map-spell-panel button{min-height:40px;padding:7px 10px;font-size:13px;font-weight:400}.map-spell-shapes{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}.map-spell-panel [aria-pressed=true]{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);background:var(--panel)}
.map-spell-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0}.map-spell-fields label{display:grid;gap:5px;min-width:0}.map-spell-fields input{width:100%;min-width:0;box-sizing:border-box;height:40px;padding:8px;font-size:14px}.map-spell-name{grid-column:1/-1}.map-spell-colors{display:flex;gap:8px}.map-spell-colors button{width:42px;position:relative}.map-spell-colors button:after{content:'';display:block;margin:auto;width:17px;height:17px;border-radius:50%;background:var(--area-color);box-shadow:0 0 12px color-mix(in srgb,var(--area-color) 25%,transparent)}
.map-spell-options{display:flex;flex-wrap:wrap;gap:8px 12px;margin:12px 0}.map-spell-options label{display:flex;align-items:center;gap:6px;min-height:30px;font-size:12px}.map-spell-options input{width:16px;height:16px;accent-color:var(--accent)}.map-spell-actions{display:flex;gap:6px}.map-spell-actions button{flex:1}.map-spell-help{font-size:12px;line-height:1.55;color:var(--muted);margin:12px 0}.map-spell-list{display:grid;gap:6px;max-height:150px;overflow:auto;margin-top:10px}.map-spell-list button{text-align:left;border-left:3px solid var(--area-color);white-space:normal}.map-spell-list p{color:var(--muted)}.map-spell-panel summary{cursor:pointer;padding:7px 0}
@media(max-width:600px){.map-spell-panel{top:auto;bottom:10px;right:10px;width:calc(100% - 20px);max-width:none;box-sizing:border-box;max-height:42%;padding:12px}.map-spell-header{margin-bottom:8px}.map-spell-help{font-size:11px;margin:8px 0}.map-spell-panel button{min-height:44px}.map-spell-fields{margin:8px 0}.map-spell-options{margin:6px 0}}
