.personal-explorer{display:inline-block;height:100%;aspect-ratio:160/208;background-position-x:0}
.personal-explorer.walking{animation:explorer-walk .64s steps(1) infinite}
@keyframes explorer-walk{0%{background-position-x:0}25%{background-position-x:33.333%}50%{background-position-x:66.667%}75%{background-position-x:100%}}
.cave-floor .personal-explorer{position:absolute;bottom:0;transform:translateX(-50%);transition:left .8s ease}
.explorer-studio{width:min(92vw,440px);max-height:92vh;overflow:auto;border:2px solid #b19762;border-radius:20px;background:#fff6e3;color:#36264e;padding:20px;font:inherit}
.explorer-studio::backdrop{background:#130f28b8}
.explorer-stage{height:clamp(125px,26vh,215px);text-align:center;border-radius:14px;background:#263845 url('/assets/spellmaster/crystal-cavern.webp') center/cover}
.explorer-studio fieldset{margin:12px 0;border:0;padding:0}.explorer-studio legend{font-weight:bold;margin-bottom:5px}.explorer-studio button{margin:3px;padding:8px 12px;border-radius:10px;min-height:42px;cursor:pointer}.explorer-studio button[aria-pressed=true]{outline:3px solid #80601c;outline-offset:1px}
@media(prefers-reduced-motion:reduce){.personal-explorer.walking{animation:none}.cave-floor .personal-explorer{transition:none}}
.cave-floor .personal-explorer.walking{animation-duration:.4s;animation-iteration-count:2}
.personal-explorer{position:relative}
.personal-explorer .explorer-gear{position:absolute;inset:0;pointer-events:none;background-image:url('/assets/spellmaster/explorer-gear.webp');background-size:400% 1400%;background-position-x:inherit;background-repeat:no-repeat}
.explorer-shop{width:min(94vw,560px)}
.shop-items{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:6px;margin:12px 0}
.shop-items button{background:#fffaf0;color:#412e51;border:1px solid #bda571;min-height:54px}
.shop-items small{display:block}.explorer-shop .shop-action{background:#523577;color:#fff}
.shop-colours button::before{content:"";display:inline-block;vertical-align:middle;margin-right:5px;width:.85em;height:.85em;border:1px solid #493d54;border-radius:50%;background:var(--tint,linear-gradient(45deg,#9f7953,#77509a,#2899a7))}
[data-tint=teal]{--tint:#229d96}[data-tint=rose]{--tint:#d25780}[data-tint=gold]{--tint:#db9c28}[data-tint=blue]{--tint:#488ad2}
.explorer-shop{box-sizing:border-box;width:min(960px,96vw);padding:0;background:#fbf3df;border:2px solid #c3a168;box-shadow:0 22px 80px #150e27aa}
.shop-head{display:flex;align-items:center;gap:12px;padding:12px 22px;color:#fff4d6;background:linear-gradient(110deg,#30223f,#513452);border-bottom:3px double #dcb878}.shop-head h2{font: bold clamp(22px,4vw,33px) Georgia,serif;margin:0;color:inherit}.shop-head p{margin:0 0 0 auto;font-weight:700}.shop-head .shop-close{background:transparent;color:inherit;border:1px solid #bda77f}
.shop-layout{display:grid;grid-template-columns:minmax(220px,.8fr) 1.4fr;gap:22px;padding:20px}.shop-fitting{align-self:start;background:#382940;border:3px double #caa467;border-radius:14px;overflow:hidden;color:#fff1ce;text-align:center}.shop-fitting .explorer-stage{height:clamp(215px,40vh,340px);border-radius:0;background:linear-gradient(0deg,#31203940,transparent 52%),url('/assets/spellmaster/library-cinematic.webp') center/cover;padding-top:18px;box-sizing:border-box}.shop-selection{font:bold 21px Georgia,serif;margin:14px 6px;color:inherit}
.shop-stock{min-width:0}.shop-items{margin:0;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.shop-items button{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:3px;margin:0;padding:5px 4px 8px;background:radial-gradient(ellipse at 50% 30%,#fffcf1,#f2dfb8);font-weight:700;line-height:1.15}.shop-items small{font-weight:500}.shop-sample{display:block;width:min(100%,100px);aspect-ratio:144/112;background:url('/assets/spellmaster/wardrobe-samples.webp') 0 50%/700% 100% no-repeat}.shop-colours button,.shop-action{border:1px solid #ae9769}.shop-colours button{background:#fffaf0;color:#34243f}.shop-action{font-weight:bold}.shop-stock [role=status]{margin:6px 0}
@media(max-width:640px){.shop-layout{display:block;padding:12px}.shop-fitting{display:flex;align-items:center;margin-bottom:12px}.shop-fitting .explorer-stage{width:48%;height:122px;padding-top:4px}.shop-selection{flex:1;font-size:18px}.shop-head{padding:8px;gap:6px}.shop-head p{font-size:13px}.shop-sample{max-width:70px}}

.personal-explorer .explorer-body{position:absolute;inset:0;background:url('/assets/spellmaster/explorer-walk.webp') 0 var(--pose-row)/400% 600% no-repeat;background-position-x:inherit}
.personal-explorer.wearing-hat :is(.explorer-body,.explorer-hair){clip-path:polygon(0 0,38% 0,33% 12%,83% 12%,83% 0,100% 0,100% 100%,0 100%)}
.personal-explorer.wearing-dress .explorer-body{background-image:url('/assets/spellmaster/explorer-dress-walk.webp')}

.sm-avatar-illustration{display:grid;place-items:center}.sm-avatar-illustration>img{width:100%;height:100%;object-fit:contain}.sm-avatar-illustration>.personal-explorer{max-width:100%;height:auto;width:auto;aspect-ratio:160/208;align-self:stretch;justify-self:center}
#app .reward-room{border:3px double #c29a58;border-radius:20px;background:linear-gradient(#fff7e5ed,#fff1d4f5),url('/assets/spellmaster/library-cinematic.webp') center/cover;text-align:center;padding:clamp(14px,3vw,32px)}
.reward-receipt{display:inline-block;background:#ffedac;color:#4b3617;border:1px solid #c38c38;border-radius:14px;padding:10px 16px;font-weight:bold}
.avatar-choice-item .shop-sample{display:block;margin:auto;width:90px;max-width:100%}

#app .reward-scene{height:clamp(105px,17vh,162px);border-radius:14px;background:#263845 url('/assets/spellmaster/crystal-cavern.webp') center 64%/cover;display:flex;align-items:end;justify-content:center;margin-bottom:12px}
.reward-scene>img{height:100%}
body.lesson-active .sm-side{opacity:1}
#sm-rewards,#sm-profile{border:3px double #caab74;border-radius:17px;background:#fff2d6;box-shadow:0 4px 0 #402a42,0 8px 22px #17122355}
#sm-rewards summary,#sm-profile summary{color:#fff0d1;background:linear-gradient(115deg,#33263e,#513451);border:0}
#sm-rewards summary{justify-content:start;gap:8px;padding:9px}
#sm-rewards summary:after{margin-left:auto}
#sm-rewards summary strong{display:block;color:#ffda78;font-size:1.15em}
.purse-art{object-fit:contain;display:block;width:clamp(54px,5vw,84px);height:68px}
.satchel-stats{display:grid;grid-template-columns:1fr 1fr;text-align:center;gap:5px;font-size:12px}.satchel-stats span+span{border-left:1px solid #d8bd93}.satchel-stats b{display:block;font-size:19px;color:#56314c}
#sm-profile .sm-side-body{padding:0 9px 10px;text-align:center}
.wardrobe-portrait{height:112px;margin:0 -9px 6px;padding:4px;background:linear-gradient(0deg,#27163745,transparent),url('/assets/spellmaster/library-cinematic.webp') center 63%/cover}
.wardrobe-portrait img{height:100%;width:auto}
#sm-open-shop{color:#fff3d5;background:#583b69}
.pocket-deposit{display:inline-flex;vertical-align:middle;margin-left:6px}.pocket-deposit .purse-art{width:44px;height:44px}
.flying-spell-coin{pointer-events:none;position:fixed;z-index:1000;display:grid;place-items:center;width:24px;height:24px;color:#885407;border:2px solid #a17523;border-radius:50%;font:900 16px/1 Georgia;background:radial-gradient(circle at 32% 24%,#fff3ae,#efb337 62%,#bc7817);box-shadow:inset 0 0 0 2px #ffdc76,0 2px 4px #55301055}
.pocket-deposit-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.pocket-deposit{flex:none}
.new-shop-sample{background-image:url('/assets/spellmaster/wardrobe-new-icons.webp');background-size:400% 600%}
.explorer-gear[data-fabric=teal]{filter:sepia(1) saturate(2.8) hue-rotate(115deg)}
.explorer-gear[data-fabric=rose]{filter:sepia(1) saturate(3) hue-rotate(285deg)}
.explorer-gear[data-fabric=gold]{filter:sepia(1) saturate(2)}
.explorer-gear[data-fabric=blue]{filter:sepia(1) saturate(3) hue-rotate(165deg)}
.shop-filter{display:flex;align-items:center;gap:8px;font-weight:bold;margin-bottom:8px}
.shop-filter select{flex:1;min-width:0;padding:8px;color:#402a50;background:#fff9eb;border:1px solid #b79d76;border-radius:8px}
.shop-items{max-height:clamp(200px,38vh,420px);overflow-y:auto;padding:4px}
