/* Saved loadouts and spell tokens (special-items-ui.js). Gold for what you own, greyed locks for what you can buy. */
.academy-app .loadout-sets{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:-4px 0 2px}
.academy-app .loadout-set{all:unset;box-sizing:border-box;display:grid;place-items:center;width:34px;height:34px;border-radius:10px;cursor:pointer;font:800 15px/1 inherit;color:#f3e3bd;background:linear-gradient(#3d2c52,#2a1f3a);border:2px solid #8a6fa5;box-shadow:inset 0 -3px 0 #1a1226;transition:transform .12s,border-color .12s,background .12s}
.academy-app .loadout-set:hover:not(:disabled){transform:translateY(-1px);border-color:#e3c27a}
.academy-app .loadout-set:focus-visible{outline:2px solid #ffe7a4;outline-offset:2px}
.academy-app .loadout-set[aria-pressed=true]{color:#3a2508;background:linear-gradient(#ffe7a4,#d6a84f);border-color:#fff1c6;box-shadow:inset 0 -3px 0 #a87a2c,0 0 12px #f0c45a66}
.academy-app .loadout-set.locked{position:relative;color:#a596b6;background:#241b31;border-color:#4d3d60;border-style:dashed;box-shadow:none}
.academy-app .loadout-set.locked svg{width:14px;height:14px;opacity:.8}
.academy-app .loadout-set.locked span{position:absolute;right:3px;bottom:1px;font-size:9px;opacity:.7}
.academy-app .loadout-set.locked:disabled{opacity:.45;cursor:not-allowed}
.academy-app .loadout-set.buyable{color:#e9cf8f;border-color:#a98a52}
.academy-app .loadout-set.buyable:hover{background:#30243f}
.academy-app .loadout-set-price{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:700;color:#e9cf8f;white-space:nowrap}
.academy-app .loadout-set-price img{width:14px;height:14px}
.academy-app .spell-token-count{display:flex;align-items:center;gap:8px;margin-top:auto;padding:8px 10px;border-radius:12px;background:#2f2343;border:1px solid #a98a5288;color:#f3e3bd;font-size:12px}
.academy-app .spell-token-count svg{width:26px;height:26px;flex:0 0 26px}
.academy-app .spell-token-count strong{color:#ffe08f}
.spell-token-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;margin-top:8px;padding:8px 14px;border-radius:14px;cursor:pointer;font:700 13px/1.1 inherit;color:#ffe9b0;background:linear-gradient(#4a3466,#33244a);border:2px solid #d9b464;box-shadow:inset 0 -3px 0 #22172f,0 0 14px #f0c45a33}
.spell-token-button:hover{border-color:#ffe7a4;box-shadow:inset 0 -3px 0 #22172f,0 0 18px #f0c45a66}
.spell-token-button:focus-visible{outline:2px solid #ffe7a4;outline-offset:2px}
.spell-token-button svg{width:24px;height:24px;flex:0 0 24px}
.spell-token-confirm .spell-token-emblem{display:grid;place-items:center;margin:0 auto 6px}
.spell-token-confirm .spell-token-emblem svg{width:72px;height:72px;filter:drop-shadow(0 0 14px #f0c45a88)}
.spell-token-confirm .spell-token-action{padding:10px 18px;font-weight:800}
.spell-token-reveal{display:flex;flex-direction:column;align-items:center;gap:2px;margin-top:12px;color:#ffe9b0;text-align:center;animation:spell-token-in .7s cubic-bezier(.2,1.4,.4,1) both}
.spell-token-reveal svg{width:70px;height:70px;filter:drop-shadow(0 0 16px #f0c45acc)}
.spell-token-reveal strong{font-size:18px;letter-spacing:.06em;color:#ffe08f}
.spell-token-reveal small{font-size:12px;color:#e6dbf3}
.spell-token-line{display:flex;align-items:center;gap:8px;color:#ffe9b0;font-weight:700}
.spell-token-line svg{width:28px;height:28px;flex:0 0 28px}
.inventory-spell-token{justify-content:center;margin:4px 0 8px}
@keyframes spell-token-in{from{transform:scale(.3) rotate(-25deg);opacity:0}to{transform:none;opacity:1}}
@media(prefers-reduced-motion:reduce){.spell-token-reveal{animation:none}}
html[data-motion=gentle] .spell-token-reveal{animation:none}
/* Phones and short screens: the loadout panel is a strip along the bottom, so the loadout buttons sit in a narrow
   column of tall buttons at its left and the token count moves to the spell pages. */
@media(max-height:600px),(max-width:760px){
 .academy-app .academy-kit:has(.loadout-sets){grid-template-columns:auto repeat(4,minmax(0,1fr))!important}
 .academy-app .loadout-sets{flex-wrap:nowrap;gap:3px;margin:0;align-self:stretch}
 .academy-app .loadout-set{width:24px;height:auto;min-height:40px;border-radius:8px;font-size:12px}
 .academy-app .loadout-set.locked svg{width:11px;height:11px}
 .academy-app .loadout-set.locked span{display:none}
 .academy-app .loadout-set-price,.academy-app .spell-token-count{display:none!important}
}
.spell-token-confirm .purchase-actions .spell-token-action{color:#3a2508;background:linear-gradient(#ffe7a4,#d6a84f);border-color:#fff1c6}
.loot-summary .spell-token-line{grid-column:1/-1;justify-content:center}
@media(max-height:500px){
 /* Landscape phones: the coin fills the stage, so the token stands in the empty space at the right. */
 .spell-token-reveal{position:fixed;right:max(18px,env(safe-area-inset-right));top:50%;width:150px;margin:0;translate:0 -50%}
 .spell-token-reveal svg{width:56px;height:56px}
 .spell-token-reveal strong{font-size:14px}
 .spell-token-reveal small{font-size:11px}
}
.loot-summary .spell-token-line svg{width:34px!important;height:34px!important;flex-basis:34px}
/* Inventory (tap your wizard on the main menu) and the Study brew note on the match results. */
body #overlay#overlay#overlay .rr-enhanced .rr-study-brew{margin-left:auto;padding:1px 8px;border-radius:999px;border:1px solid #d9b464;background:#3a2850;color:#ffe08f;font-size:11px;font-weight:800;white-space:nowrap}
/* The inventory is a grid of square slots like a block-game inventory (owner, Oct 11): sunken slots with a dark
   top-left and lit bottom-right edge, the stack count in the corner, a gold ring on the picked slot and its
   details below the grid. Rarity shows as a soft glow at the bottom of a slot. It fills the main panel of the
   Inventory screen (the old Chests screen); slots size themselves to that panel so nothing scrolls. */
html body #hub-dialog#hub-dialog#hub-dialog #hub-content .vault-stage.inventory-stage:not(:has(>.inventory-summary)){display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;gap:6px!important;overflow:hidden!important;text-align:left}
html body #hub-dialog #hub-content .inventory-stage>.inventory-host{flex:1 1 0;min-height:0;min-width:0;container-type:size;display:flex;justify-content:center}
html body #hub-dialog #hub-content .inventory-stage>.inventory-status:empty{display:none}
.inventory-box{--slot:min(64px,calc((100cqw - 48px) / 9),calc((100cqh - 190px) / 3));box-sizing:border-box;display:flex;flex-direction:column;gap:8px;width:max-content;max-width:100%;height:100%;min-height:0;color:#f3e3bd}
html body .inventory-box>header{min-height:0!important;height:auto!important;inset:auto!important;position:static!important;background:none!important;border:0!important;box-shadow:none!important;display:flex!important;width:100%;align-items:center;justify-content:space-between!important;gap:12px;margin:0;padding:0}
html body .inventory-box h2{margin:0 6px 0 0!important;font:700 24px/1.1 Georgia,serif!important;color:var(--hx-gold,#f0d8a4)!important;text-shadow:0 2px #120c22;letter-spacing:normal!important;text-transform:none!important}
.inventory-box .inventory-notice{margin:0;padding:6px 12px;border-radius:10px;background:#1f3a3a;border:1px solid #7fe3d366;color:var(--hx-teal,#7fe3d3);font:700 13px system-ui,sans-serif}
.inventory-box .inventory-body{display:flex;flex-direction:column;gap:8px;min-height:0;flex:1}
.inventory-box .inventory-grid{display:grid;grid-template-columns:repeat(9,var(--slot));gap:4px;padding:8px;border-radius:10px;background:#1a1226;border:2px solid #5c4675;box-shadow:inset 0 0 0 1px #0d0816,0 2px 0 #0d0816;align-self:center}
html body .inventory-box .inventory-slot{all:unset;box-sizing:border-box;position:relative;display:grid;place-items:center;width:var(--slot);height:var(--slot);border-radius:4px;background:#2b2040;box-shadow:inset 3px 3px 0 #140d20,inset -3px -3px 0 #4b3a64}
.inventory-box .inventory-slot.has-item{cursor:pointer}
.inventory-box .inventory-slot.has-item::before{content:'';position:absolute;inset:3px;border-radius:2px;pointer-events:none;background:radial-gradient(ellipse at 50% 100%,var(--rarity,#0000) ,#0000 70%);opacity:.45}
.inventory-box .inventory-slot.has-item::after{content:'';position:absolute;inset:3px;border-radius:2px;background:#fff;opacity:0;pointer-events:none;transition:opacity .08s}
.inventory-box .inventory-slot.has-item:hover::after{opacity:.16}
html body .inventory-box .inventory-slot[aria-pressed=true]{box-shadow:inset 3px 3px 0 #140d20,inset -3px -3px 0 #4b3a64,0 0 0 2px var(--hx-gold-strong,#f5c86a),0 0 12px #f0c45a88;z-index:1}
.inventory-box .inventory-slot:focus-visible{outline:2px solid #fff1c6;outline-offset:2px}
.inventory-box .inventory-slot-art{display:grid;place-items:center;width:78%;height:78%;transition:transform .14s cubic-bezier(.2,1.6,.4,1)}
html body .inventory-box .inventory-slot-art :is(svg,img){display:block;width:100%;height:100%;max-height:none;object-fit:contain;filter:drop-shadow(0 2px 0 #0d0816aa)}
.inventory-box .inventory-slot[aria-pressed=true] .inventory-slot-art{transform:scale(1.1)}
.inventory-box .inventory-slot-count{position:absolute;right:3px;bottom:0;color:#fff;font:900 15px/1 system-ui,sans-serif;text-shadow:2px 2px 0 #3a2a10,0 0 3px #000;pointer-events:none;z-index:2}
.inventory-box .rarity-common{--rarity:#cfc6dc}.inventory-box .rarity-uncommon{--rarity:#6fd27c}.inventory-box .rarity-rare{--rarity:#5aa7ff}.inventory-box .rarity-epic{--rarity:#c77dff}.inventory-box .rarity-legendary{--rarity:#ffc94d}
.inventory-box .inventory-detail{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 12px;border:1px solid #c0a27166;border-radius:12px;background:linear-gradient(#3a2b4ccc,#2b2139cc);min-height:0;overflow:auto;overscroll-behavior:contain}
.inventory-box .inventory-detail.is-empty{grid-template-columns:minmax(0,1fr)}
.inventory-box .inventory-detail-art{--slot:64px}
html body .inventory-box h3{margin:0 0 3px!important;font:700 17px/1.2 Georgia,serif!important;color:var(--rarity,#f5e2b8)!important;letter-spacing:normal!important;text-transform:none!important}
.inventory-box .inventory-stack{color:var(--hx-gold-strong,#f5c86a);font:800 14px system-ui,sans-serif}
.inventory-box .inventory-text{min-width:0}
html body .inventory-box .inventory-text p{margin:0;color:#d9cbe6;font:600 13px/1.35 system-ui,sans-serif;text-align:left}
html body .inventory-box .inventory-text .inventory-item-status{margin-top:3px;color:#ffe08f}
.inventory-box .inventory-odds{margin-top:4px}
html body .inventory-box .inventory-odds summary{cursor:pointer;color:var(--hx-gold,#f0d8a4);font:800 12px system-ui,sans-serif;list-style-position:inside}
html body .inventory-box .inventory-odds p{margin-top:3px;font-size:12px;color:#c9b8dc}
.inventory-box .inventory-buttons{display:flex;flex-direction:column;gap:6px;align-self:center}
html body .inventory-box .inventory-use{min-height:0;height:auto;width:auto;margin:0;padding:10px 18px;border-radius:11px;cursor:pointer;font:800 14px/1 system-ui,sans-serif;color:#3a2508;background:linear-gradient(#ffe7a4,#d6a84f);border:1px solid #fff1c6;border-bottom:3px solid #a87a2c;white-space:nowrap;text-transform:none;letter-spacing:normal;box-shadow:none}
html body .inventory-box .inventory-buttons .inventory-use+.inventory-use{color:#f3e3bd;background:linear-gradient(#5a4372,#3a2a50);border-color:#c0a271;border-bottom-color:#665039}
html body .inventory-box .inventory-use:disabled{opacity:.45;cursor:not-allowed}
.inventory-box .inventory-use:focus-visible{outline:2px solid #ffe7a4;outline-offset:2px}
.inventory-box .inventory-tip{position:fixed;z-index:5;display:flex;flex-direction:column;gap:2px;padding:6px 9px;border-radius:6px;background:#160d24f2;border:2px solid #3a1f66;box-shadow:inset 0 0 0 1px #c0a27188,0 4px 12px #0008;pointer-events:none;white-space:nowrap}
.inventory-box .inventory-tip[hidden]{display:none}
.inventory-box .inventory-tip strong{font:700 14px Georgia,serif;color:var(--rarity,#fff3d6)}
.inventory-box .inventory-tip small{font:600 11.5px system-ui,sans-serif;color:#b7a8cc}
.inventory-box .inventory-slot-badge{position:absolute;left:2px;top:2px;padding:1px 4px;border-radius:5px;background:#3a2850;border:1px solid #d9b464;color:#ffe08f;font:900 9px/1.1 system-ui,sans-serif;text-transform:uppercase;pointer-events:none;z-index:2}
.inventory-box .inventory-tag{display:inline-block;padding:1px 8px;border-radius:999px;background:#3a2850;border:1px solid #d9b464;color:#ffe08f;font:800 11px/1.4 system-ui,sans-serif;font-style:normal;vertical-align:2px;white-space:nowrap}
.inventory-box .inventory-tip .inventory-tag{align-self:flex-start}
/* Page tabs and the paid next page sit in the header beside the title. */
.inventory-box .inventory-pages{display:flex;align-items:center;gap:6px;margin-right:auto;flex-wrap:wrap}
html body .inventory-box .inventory-page{all:unset;box-sizing:border-box;display:grid;place-items:center;width:32px;height:32px;border-radius:8px;cursor:pointer;font:800 14px/1 system-ui,sans-serif;color:#f3e3bd;background:#2b2040;box-shadow:inset 2px 2px 0 #140d20,inset -2px -2px 0 #4b3a64}
html body .inventory-box .inventory-page[aria-pressed=true]{color:#3a2508;background:linear-gradient(#ffe7a4,#d6a84f);box-shadow:inset 0 -3px 0 #a87a2c,0 0 10px #f0c45a66}
html body .inventory-box .inventory-page:focus-visible,html body .inventory-box .inventory-page-buy:focus-visible{outline:2px solid #fff1c6;outline-offset:2px}
html body .inventory-box .inventory-page-buy{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:5px;height:32px;padding:0 12px;border-radius:9px;cursor:pointer;font:800 13px/1 system-ui,sans-serif;color:#3a2508;background:linear-gradient(#ffe7a4,#d6a84f);border:1px solid #fff1c6;border-bottom:3px solid #a87a2c;white-space:nowrap}
html body .inventory-box .inventory-page-buy img{width:16px;height:16px}
html body .inventory-box .inventory-page-buy:disabled{opacity:.5;cursor:not-allowed}
.inventory-box .inventory-full{letter-spacing:normal;text-transform:none;color:#ffe08f;font:700 12px system-ui,sans-serif;white-space:nowrap}
html[data-motion=gentle] .inventory-box .inventory-slot-art{transition:none}
/* The Inventory screen's own button and summary styles are strong, so the grid restates its look on top of them. */
html body #hub-dialog#hub-dialog#hub-dialog #hub-content .inventory-box .inventory-slot{padding:0!important;margin:0!important;min-height:0!important;min-width:0!important;width:var(--slot)!important;height:var(--slot)!important;border:0!important;border-radius:4px!important;background:#2b2040!important;color:inherit!important;font:inherit!important;transform:none!important;filter:none!important}
html body #hub-dialog#hub-dialog#hub-dialog #hub-content .inventory-box .inventory-use{min-height:0!important;height:auto!important;width:auto!important;margin:0!important;padding:10px 18px!important;border-radius:11px!important;font:800 14px/1 system-ui,sans-serif!important;color:#3a2508!important;background:linear-gradient(#ffe7a4,#d6a84f)!important;border:1px solid #fff1c6!important;border-bottom:3px solid #a87a2c!important;box-shadow:none!important;text-transform:none!important;letter-spacing:normal!important}
html body #hub-dialog#hub-dialog#hub-dialog #hub-content .inventory-box .inventory-buttons .inventory-use+.inventory-use{color:#f3e3bd!important;background:linear-gradient(#5a4372,#3a2a50)!important;border-color:#c0a271!important;border-bottom-color:#665039!important}
html body #hub-dialog#hub-dialog#hub-dialog #hub-content .inventory-box .inventory-use:disabled{opacity:.45!important}
html body #hub-dialog#hub-dialog#hub-dialog #hub-content .inventory-box .inventory-odds summary{min-height:0!important;padding:2px 0!important;margin:0!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;color:var(--hx-gold,#f0d8a4)!important;font:800 12px system-ui,sans-serif!important;text-transform:none!important;letter-spacing:normal!important}
html body #hub-dialog#hub-dialog#hub-dialog #hub-content .inventory-box .inventory-odds{padding:0!important;margin:4px 0 0!important;border:0!important;background:none!important;box-shadow:none!important}
html body #hub-dialog#hub-dialog#hub-dialog #hub-content .inventory-box .inventory-page{min-height:0!important;padding:0!important;border:0!important;width:32px!important;height:32px!important;border-radius:8px!important;color:#f3e3bd!important;background:#2b2040!important;font:800 14px/1 system-ui,sans-serif!important}
html body #hub-dialog#hub-dialog#hub-dialog #hub-content .inventory-box .inventory-page[aria-pressed=true]{color:#3a2508!important;background:linear-gradient(#ffe7a4,#d6a84f)!important}
html body #hub-dialog#hub-dialog#hub-dialog #hub-content .inventory-box .inventory-page-buy{min-height:0!important;height:32px!important;padding:0 12px!important;color:#3a2508!important;background:linear-gradient(#ffe7a4,#d6a84f)!important;font:800 13px/1 system-ui,sans-serif!important}
/* The screen title already says Inventory; the panel's header only carries page tabs when there are any. */
.inventory-embed h2{display:none!important}
.inventory-embed>header:has(.inventory-pages[hidden]){display:none!important}
html body #hub-dialog #hub-content .inventory-stage>.inventory-host{align-items:center}
.inventory-embed{height:auto;max-height:100%}
@media(min-height:501px){.inventory-box{--slot:min(76px,calc((100cqw - 48px) / 9),calc((100cqh - 190px) / 3))}}
/* Landscape phones: the screen title already says Inventory, so the panel drops its own heading (the page tabs
   stay) and the details shrink to one tight row under the grid. */
@media(max-height:500px){
 .inventory-box{--slot:min(52px,calc((100cqw - 40px) / 9),calc((100cqh - 120px) / 3));gap:5px}
 .inventory-box h2{display:none!important}
 .inventory-box>header:has(.inventory-pages[hidden]){display:none!important}
 html body .inventory-box .inventory-page{width:26px;height:26px;font-size:12px}
 html body .inventory-box .inventory-page-buy{height:26px;font-size:12px;padding:0 9px}
 .inventory-box .inventory-body{gap:5px}
 .inventory-box .inventory-grid{gap:3px;padding:5px}
 .inventory-box .inventory-detail{gap:8px;padding:6px 8px;border-radius:10px}
 .inventory-box .inventory-detail-art{--slot:40px}
 html body .inventory-box h3{font-size:14px!important;margin-bottom:1px!important}
 html body .inventory-box .inventory-text p{font-size:11px;line-height:1.25}
 html body .inventory-box .inventory-text>p:not(.inventory-item-status){display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 html body .inventory-box .inventory-odds summary{font-size:11px}
 .inventory-box .inventory-buttons{gap:4px}
 html body #hub-dialog#hub-dialog#hub-dialog #hub-content .inventory-box .inventory-use{padding:7px 12px!important;font-size:12px!important;border-bottom-width:2px!important}
 html body #hub-dialog#hub-dialog#hub-dialog #hub-content .inventory-box .inventory-page{width:26px!important;height:26px!important;font-size:12px!important}
 html body #hub-dialog#hub-dialog#hub-dialog #hub-content .inventory-box .inventory-page-buy{height:26px!important;font-size:12px!important;padding:0 9px!important}
 html body #hub-dialog#hub-dialog#hub-dialog #hub-content .inventory-box .inventory-odds summary{font-size:11px!important}
 .inventory-box .inventory-slot-count{font-size:12px}
 .inventory-box .inventory-slot-badge{font-size:8px;padding:0 3px}
}
