/* Inviting doors: the shop is bright inside and the light escapes through the open door,
   spilling out onto the street. When the door swings wider, more light pours out. */
.storefront-glow{position:absolute;z-index:5;pointer-events:none;display:block}
.storefront-glow>i{display:none}

/* the bright room behind the door */
html body.ui2[data-place=town] .hunter-shop:not(.locked):not(.entering) .storefront-opening{
 background:radial-gradient(ellipse at 50% 40%,#ffffff 0%,#fff6cf 30%,#ffe08a 65%,#f5b450 100%);
 box-shadow:inset 0 0 8px #fffbe6;filter:brightness(1.15)}

/* light streaming out of the doorway and down onto the cobbles */
html body.ui2[data-place=town] .hunter-shop:not(.locked):not(.entering) .storefront-glow::before{
 content:'';position:absolute;left:-70%;right:-70%;top:97%;height:62%;
 clip-path:polygon(31% 0,69% 0,100% 100%,0 100%);
 background:linear-gradient(180deg,#fff6d0f2 0%,#ffe39bb3 30%,#ffd56a55 65%,#ffd56a00 100%);
 filter:blur(1.5px);mix-blend-mode:plus-lighter;opacity:.45}
/* the bright patch where the light lands */
html body.ui2[data-place=town] .hunter-shop:not(.locked):not(.entering) .storefront-glow::after{
 content:'';position:absolute;left:50%;top:100%;width:300%;height:40%;transform:translateX(-50%);border-radius:50%;
 background:radial-gradient(ellipse at 50% 40%,#fff1c2e6,#ffd56a80 38%,#ffd56a00 72%);
 filter:blur(2px);mix-blend-mode:plus-lighter;opacity:.45}
/* little glints carried out on the light */
html body.ui2[data-place=town] .hunter-shop.is-current:not(.locked):not(.entering) .storefront-glow>i{
 display:block;position:absolute;left:45%;top:90%;width:20%;aspect-ratio:1;min-width:4px;border-radius:50%;
 background:radial-gradient(circle,#ffffff 0 30%,#ffe7a0 55%,#ffe7a000 72%);opacity:0}

@media(prefers-reduced-motion:no-preference){
 html body.ui2[data-place=town] .hunter-shop.is-current:not(.locked):not(.entering) .storefront-door{animation:sq-door-swing 1.8s ease-in-out infinite alternate}
 /* the light follows the door: a sliver when it's ajar, a flood when it swings open */
 html body.ui2[data-place=town] .hunter-shop.is-current:not(.locked):not(.entering) .storefront-glow::before,
 html body.ui2[data-place=town] .hunter-shop.is-current:not(.locked):not(.entering) .storefront-glow::after{animation:sq-door-glowswing 1.8s ease-in-out infinite alternate}
 html body.ui2[data-place=town] .hunter-shop.is-current:not(.locked):not(.entering) .storefront-glow>i{animation:sq-door-mote 3.6s ease-out infinite}
 html body.ui2[data-place=town] .hunter-shop.is-current:not(.locked):not(.entering) .storefront-glow>i:nth-child(2){animation-delay:.25s;left:30%}
 html body.ui2[data-place=town] .hunter-shop.is-current:not(.locked):not(.entering) .storefront-glow>i:nth-child(3){animation-delay:.5s;left:62%}
 @keyframes sq-door-beckon{
  0%,40%,100%{transform:perspective(500px) rotateY(28deg)}
  52%{transform:perspective(500px) rotateY(62deg)}
  62%{transform:perspective(500px) rotateY(40deg)}
  71%{transform:perspective(500px) rotateY(52deg)}
  86%{transform:perspective(500px) rotateY(28deg)}
 }
 /* always moving: the door swings between just-ajar and wide open, and the light follows it */
 @keyframes sq-door-swing{from{transform:perspective(500px) rotateY(16deg)}to{transform:perspective(500px) rotateY(60deg)}}
 @keyframes sq-door-glowswing{from{opacity:.45}to{opacity:1}}
 @keyframes sq-door-light{
  0%,40%,100%{opacity:.5}
  52%{opacity:1}
  62%{opacity:.72}
  71%{opacity:.9}
  86%{opacity:.5}
 }
 /* glints drift out only while the door is open wide */
 @keyframes sq-door-mote{
  0%,10%{opacity:0;translate:-50% 0;scale:.5}
  20%{opacity:1}
  80%{opacity:.6}
  92%,100%{opacity:0;translate:-50% 260%;scale:1}
 }
}
@media(prefers-reduced-motion:reduce){
 html body.ui2[data-place=town] .hunter-shop:not(.locked) .storefront-door{transform:perspective(500px) rotateY(34deg)}
 html body.ui2[data-place=town] .hunter-shop:not(.locked) .storefront-glow::before,
 html body.ui2[data-place=town] .hunter-shop:not(.locked) .storefront-glow::after{opacity:.75}
}
/* Shops drawn without a separate door (Cloud Cone, Toy Truck): light pooling out in front of the entrance */
html body.ui2[data-place=town] .hunter-shop:not(.locked) .shop-building:not(.layered-building)::after{
 content:'';position:absolute;left:50%;bottom:0;width:46%;height:16%;transform:translateX(-50%);border-radius:50%;pointer-events:none;
 background:radial-gradient(ellipse at 50% 40%,#fff1c2cc,#ffd56a00 70%);mix-blend-mode:plus-lighter}
@media(prefers-reduced-motion:no-preference){
 html body.ui2[data-place=town] .hunter-shop.is-current:not(.locked) .shop-building:not(.layered-building)::after{animation:sq-door-light 4s ease-in-out infinite}
}
/* the lit room fills the whole doorway (the shop front hides anything outside the arch), so no sky peeks through */
html body.ui2[data-place=town] .hunter-shop:not(.locked) .storefront-opening{border-radius:0!important;transform:scale(1.08,1.06);transform-origin:50% 100%}
/* idle "tap here" nudge: the doorway light swells (there's no Go inside button on open shops any more) */
html body.ui2[data-place=town] .hunter-shop.is-current.v2l-glow:not(.locked) .storefront-glow::before,
html body.ui2[data-place=town] .hunter-shop.is-current.v2l-glow:not(.locked) .storefront-glow::after{opacity:1!important;scale:1.15}

/* Every open shop is lit inside with its door resting ajar so the light escapes; only the shop in view swings its door. */
html body.ui2[data-place=town] .hunter-shop:not(.locked):not(.is-current):not(.entering) .storefront-door{transform:perspective(500px) rotateY(28deg)}
