body #aux-window:is([data-kind=magic],[data-kind=ability]){position:fixed;inset:auto 0 auto auto;width:110px;min-width:0;max-width:110px;height:auto;margin:0;padding:0;border:1px solid #9e7b46;border-image:none;border-radius:3px 0 0 3px;background:#10202be8;box-shadow:0 4px 18px #0006;overflow:visible;display:flex;flex-direction:column}
body #aux-window:is([data-kind=magic],[data-kind=ability])>.panel-heading{min-height:30px;height:30px;padding:2px 4px;display:flex;align-items:center;justify-content:space-between;gap:2px;border:0;background:transparent;position:relative}
body #aux-window:is([data-kind=magic],[data-kind=ability]) #aux-title{display:block;margin:0;min-width:0;font:700 12px/1.4 Tahoma,sans-serif;letter-spacing:0;white-space:nowrap;color:#f0e5cb;text-shadow:none}
body #aux-window:is([data-kind=magic],[data-kind=ability]) #close-aux{width:26px;height:26px;min-width:26px;min-height:26px;font:20px/22px Tahoma;padding:0;border:0;box-shadow:none;background:none}
body #aux-window:is([data-kind=magic],[data-kind=ability]) #aux-body{flex:none;padding:0;margin:0;min-height:0;overflow:visible}
:is(#spell-list,#ability-list).spell-icon-grid{display:grid;grid-template-columns:44px 44px;gap:6px;padding:4px 5px 8px;max-height:var(--magic-list-height,70vh);overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#997a43 transparent;scroll-padding:4px}
body #aux-window:is([data-kind=magic],[data-kind=ability]) .spell-icon-cell{display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:1px;border:1px solid #8b7b55;border-radius:2px;background:#172229;box-shadow:inset 0 0 6px #0008;touch-action:manipulation}
.spell-icon-cell img{display:block;width:40px;height:40px;object-fit:contain;image-rendering:pixelated;pointer-events:none}
.spell-icon-cell.is-unlearned img{filter:grayscale(.8);opacity:.45}
body #aux-window:is([data-kind=magic],[data-kind=ability]) .spell-icon-cell:is(:hover,:focus-visible,.is-selected){border-color:#ffe29e;box-shadow:0 0 5px #f7d57a88}
.spell-hover-card{position:absolute;box-sizing:border-box;z-index:80;padding:14px;color:#eee1c2;background:#101d27fa;border:1px solid #b0945b;border-radius:3px;box-shadow:0 8px 28px #0009;overflow:auto;font:12px/1.6 Tahoma,sans-serif;overscroll-behavior:contain}
.spell-hover-card h3{font-size:15px;line-height:1.5;margin:0 0 8px;color:#ffe4a3;overflow-wrap:anywhere}
.spell-hover-card h3 small{display:block;font-size:11px;color:#c4bcaa}
.spell-hover-card p{font-size:12px;line-height:1.6;margin:8px 0;color:#e0d7c2}
.spell-hover-card dl{display:grid;grid-template-columns:auto 1fr;gap:5px 12px;border-block:1px solid #aa925a44;padding:9px 0;margin:10px 0;font-size:11px}
.spell-hover-card dt{color:#b8b2a4}.spell-hover-card dd{margin:0}
.spell-hover-card .spell-requirement-unmet{color:#ff9a9a;font-weight:700}
.spell-hover-card .spell-menu-status{color:#dac38a}
.spell-menu-actions{display:flex;flex-wrap:wrap;gap:6px}
body #aux-window:is([data-kind=magic],[data-kind=ability]) .spell-menu-actions button{min-height:32px;padding:5px 8px;font:11px Tahoma;color:#f6e7c7;border:1px solid #8d774b;background:#302e24;border-radius:2px}
.spell-hover-card .spell-menu-hint{font-size:10px;color:#a8b4b8;margin-bottom:0}
#spell-binding-cursor{position:fixed;z-index:200;pointer-events:none;width:36px;height:36px;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 2px 4px #000);opacity:.95}
@property --spell-border-angle{syntax:'<angle>';initial-value:0deg;inherits:false}
body #spell-bar.is-binding button{isolation:isolate;border-color:#e9c77c;cursor:copy;overflow:visible;box-shadow:0 0 9px #eac97566}
body #spell-bar.is-binding button::after{content:'';position:absolute;inset:-3px;border-radius:inherit;padding:2px;background:conic-gradient(from var(--spell-border-angle),#9f762833,#9f762833 45%,#ffe9a1 65%,#fff 72%,#f2cc65 80%,#9f762833 95%);mask:linear-gradient(#fff 0 0) content-box exclude,linear-gradient(#fff 0 0);pointer-events:none;animation:spell-border-orbit 1.4s linear infinite}
body #spell-bar.is-binding button:hover{background:#b89a4540;box-shadow:0 0 14px #ffe5a599}
@keyframes spell-border-orbit{to{--spell-border-angle:360deg}}
@media(prefers-reduced-motion:reduce){body #spell-bar.is-binding button::after{animation:none;background:#ffe9a1}}
/* Shared number/F-key rows retain twelve columns on narrow screens. */
body #spell-bar{display:grid;grid-template-columns:repeat(12,var(--shortcut-size,40px));grid-template-rows:repeat(2,var(--shortcut-size,40px));gap:4px;flex-basis:auto;justify-content:center;padding:4px;border:0;width:max-content;max-width:none}
body #spell-bar button{width:var(--shortcut-size,40px);height:var(--shortcut-size,40px);padding:3px;min-width:0;min-height:0;border-radius:6px!important;display:grid;place-items:center}
body #spell-bar img{width:calc(var(--shortcut-size,40px) - 10px);height:calc(var(--shortcut-size,40px) - 10px)}
body #spell-bar kbd{z-index:1;inset:2px auto auto 3px;font:8px Tahoma;text-shadow:1px 1px 2px #000}
body #spell-bar small{position:absolute;bottom:1px;right:2px;color:#fff;background:#07121dcc;font:9px Tahoma;padding:1px;border-radius:2px}
body #spell-bar .shortcut-item-icon{pointer-events:none;width:calc(var(--shortcut-size,40px) - 10px);height:calc(var(--shortcut-size,40px) - 10px);image-rendering:pixelated;overflow:hidden}
body #spell-bar button.drag-over{border-color:#fff2af;box-shadow:0 0 12px #ffe598;background:#8e773c66}
.inventory-shortcut-hint{font-size:11px;color:#e5cc91}
.spell-icon-cell:not(.is-unlearned),.combat-native-skill:not(.is-unlearned){touch-action:none;cursor:grab}
.spell-icon-cell:not(.is-unlearned):active,.combat-native-skill:not(.is-unlearned):active{cursor:grabbing}
body #spell-bar button{touch-action:none;cursor:grab}
body #spell-bar button:active{cursor:grabbing}
body #spell-bar{position:relative;padding-top:30px}
body #spell-bar #shortcut-lock{position:absolute;top:0;right:4px;width:auto;height:24px;min-width:72px;display:flex;align-items:center;gap:5px;padding:3px 7px;font:11px Tahoma;background:#152129df;border:1px solid #8b805c;cursor:pointer;touch-action:manipulation}
#shortcut-lock svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.5}
body #spell-bar #shortcut-lock[aria-pressed=true]{border-color:#dbbf75;color:#f3d58e;background:#3d3425e8}
body #spell-bar.is-locked [data-slot],body #spell-bar.is-locked [data-slot]:active{cursor:pointer;touch-action:manipulation}
body #spell-bar.is-binding #shortcut-lock::after{display:none}
body #spell-bar.is-locked [data-slot].drag-over{box-shadow:none;border-color:var(--hud-line)}
@media(max-width:700px){body #joystick{bottom:calc(148px + env(safe-area-inset-bottom))}}
#shortcut-tooltip{position:fixed;z-index:90;pointer-events:none;padding:13px 15px;background:#101d27fa;color:#eee1c2;border:1px solid #aa925a;border-radius:4px;box-shadow:0 8px 26px #0009;font:12px/1.6 Tahoma,sans-serif;overflow:hidden;overflow-wrap:anywhere}
#shortcut-tooltip h3,#shortcut-tooltip .shop-tip-name{color:#ffe2a0;font-size:15px;line-height:1.4;margin:6px 0}
#shortcut-tooltip p{margin:8px 0;font-size:12px;line-height:1.6}
.shortcut-tip-top{display:flex;align-items:center;gap:10px;color:#baad8a;font-size:10px}
.shortcut-tip-icon{display:grid;place-items:center;width:36px;height:36px;flex:none}
.shortcut-tip-icon img,.shortcut-tip-icon svg{width:34px;height:34px;object-fit:contain;image-rendering:pixelated;overflow:hidden}
#shortcut-tooltip dl{display:grid;grid-template-columns:auto 1fr;gap:4px 12px;margin:10px 0;padding:8px 0;border-block:1px solid #aa925a40;font-size:11px}
#shortcut-tooltip dt{color:#b9b4a4}#shortcut-tooltip dd{margin:0}
#shortcut-tooltip .shortcut-tip-help{font-size:10px;color:#aebbc0;margin-bottom:0}
#spell-binding-cursor{display:grid;place-items:center}
#spell-binding-cursor img{width:36px;height:36px;object-fit:contain;image-rendering:pixelated}
#spell-binding-cursor svg{width:36px;height:36px;image-rendering:pixelated;overflow:hidden}
body .adventure-dock{flex-wrap:wrap;justify-content:center;max-width:calc(100vw - 24px);width:max-content;gap:8px}
body .quick-items[hidden]{display:none!important}
@media(max-width:700px){body #spell-bar{--shortcut-size:calc((100vw - 78px)/12);gap:3px;padding:3px}body .adventure-dock{width:max-content;max-width:calc(100vw - 16px);right:8px;left:auto;transform:none}body #spell-bar kbd{font-size:7px;left:1px;top:1px}body #joystick{bottom:calc(120px + env(safe-area-inset-bottom))}}
@media(max-height:500px) and (min-width:701px){body #spell-bar{--shortcut-size:30px;gap:3px}body .adventure-dock{right:12px;left:auto;transform:none}}
body #spell-bar .shortcut-cooldown{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;z-index:1;border-radius:inherit;background:#04101a66}
body #spell-bar .shortcut-cooldown svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.shortcut-cooldown-track{fill:none;stroke:#d4c99e33;stroke-width:3}
.shortcut-cooldown-arc{fill:none;stroke:#f6d984;stroke-width:3;stroke-linecap:round;transition:stroke-dashoffset .08s linear;filter:drop-shadow(0 0 1px #000)}
body #spell-bar .shortcut-cooldown-time{color:#fff6d7;font:700 10px Tahoma;text-shadow:0 1px 3px #000,1px 0 2px #000;line-height:1;z-index:1}
body #spell-bar [data-slot].is-cooling>img{opacity:.5}
body #spell-bar [data-slot] kbd{z-index:2}
@media(max-width:700px){body #spell-bar{padding-top:30px}body #joystick{bottom:calc(148px + env(safe-area-inset-bottom))}body #spell-bar .shortcut-cooldown-time{font-size:8px}}
@media(prefers-reduced-motion:reduce){.shortcut-cooldown-arc{transition:none}}
body #spell-bar [data-slot].is-unavailable>img,body #spell-bar [data-slot].is-unavailable>.shortcut-item-icon,body #spell-bar [data-slot].is-unavailable>.shortcut-box-art{filter:grayscale(1) brightness(.5);opacity:.65}
.shortcut-box-art{position:relative;display:inline-grid;place-items:center;line-height:0;pointer-events:none}
.shortcut-box-badge{position:absolute;top:-2px;right:-2px;display:grid;place-items:center;width:13px;height:13px;background:#241b10;border:1px solid #c8aa68;border-radius:2px;pointer-events:none}
.shortcut-box-badge>.shortcut-item-icon{width:11px!important;height:11px!important}
#shortcut-tooltip .shortcut-tip-errors{margin:10px 0;padding:8px 10px;border:1px solid #c67d624f;border-radius:3px;background:#7e36252b;color:#ffc1a3;font-size:11px}
#shortcut-tooltip .shortcut-tip-errors b{font-size:12px}
#shortcut-tooltip .shortcut-tip-errors ul{padding-left:16px;margin:4px 0 0}
body #spell-bar [data-slot].is-combat-active::before{content:'';position:absolute;inset:-2px;border:2px solid #80f8e4;border-radius:inherit;box-shadow:0 0 7px #63ffdcbb,inset 0 0 5px #63ffdc55;pointer-events:none;z-index:3;animation:combat-shortcut-glow 1.8s ease-in-out infinite}
@keyframes combat-shortcut-glow{50%{box-shadow:0 0 12px #63ffdc,inset 0 0 7px #63ffdc77}}
#shortcut-tooltip .shortcut-tip-active{color:#8cf4d8;font-weight:700}
@media(prefers-reduced-motion:reduce){body #spell-bar [data-slot].is-combat-active::before{animation:none}}
body #spell-bar .combat-active-value{position:absolute;bottom:1px;right:1px;z-index:4;padding:1px 2px;border-radius:2px;background:#06271fea;color:#a9ffe3;font:700 9px/1.2 Tahoma;pointer-events:none;text-shadow:0 1px #000}
body #spell-bar .combat-active-value[data-kind=buff]{color:#fff0af;background:#30280eea}
@media(max-width:700px){body #spell-bar .combat-active-value{font-size:7px;padding:1px}}

body #aux-window[data-kind=ability] #aux-title{font-size:10px;white-space:normal;line-height:1.2}
