/* Saftbaren. Hører sammen med scene.js og game.js. Scenen fylder hele skærmen; bjælkerne ligger ovenpå. */
body.tavernaen { background: #8ed15a; }
.tavernaen .sj-top { position: absolute; top: 0; left: 0; right: 0; }
.tavernaen .sj-bottom { position: absolute; bottom: 0; left: 0; right: 0; pointer-events: none; }
.tavernaen .sj-bottom > * { pointer-events: auto; }
.tavernaen #check span { transform: none; }
.stage { flex: 1 1 auto; min-height: 0; display: flex; }
#scene { flex: 1; width: 100%; height: 100%; display: block; overflow: visible; }

.star { fill: #fff; opacity: .5; stroke: #1d3557; stroke-width: 0; }
.star.on { fill: #ffd23f; opacity: 1; stroke: #c98a00; stroke-width: 3; }

.hit { fill: #fff; opacity: 0; }
.bottle, #glass, #piano { cursor: pointer; outline: none; }
.bottle:focus-visible .hit, #glass:focus-visible .hit, #piano:focus-visible .hit { opacity: .45; }
.bottle-in { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .1s; }
.bottle:active .bottle-in { transform: rotate(-14deg); }
.ring { fill: none; stroke: #fff; stroke-width: 6; stroke-dasharray: 12 10; opacity: 0; }
.bottle.hint .ring { opacity: 1; }

.guest-in { transform-box: fill-box; transform-origin: 50% 100%; }
.m-happy, .m-no { display: none; }
#guest.happy .m-ok, #guest.no .m-ok { display: none; }
#guest.happy .m-happy, #guest.no .m-no { display: inline; }
#guest.happy .guest-in { animation: t-hop .5s ease-in-out 2; }
#guest.no .guest-in { animation: t-no .4s linear; }
body[data-phase="win"] #guest .guest-in { animation: t-hop .5s ease-in-out infinite; }
@keyframes t-hop { 50% { transform: translateY(-24px); } }
@keyframes t-no { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }

.log { opacity: .16; }
.log.on { opacity: 1; }
#fire:not(.lit) .flames { display: none; }
#bubble.empty { display: none; }
.flames-in { transform-box: fill-box; transform-origin: 50% 100%; animation: t-flame .7s ease-in-out infinite alternate; }
@keyframes t-flame { to { transform: scale(1.06, .92); } }
.blink { animation: t-blink 1.6s ease-in-out infinite; }
.blink:nth-of-type(2n) { animation-delay: -.8s; }
@keyframes t-blink { 50% { opacity: .45; } }
.notes { opacity: 0; }
#piano.play .notes { animation: t-note .7s ease-out; }
@keyframes t-note { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-40px); } }

@media (prefers-reduced-motion: reduce) {
    .blink, .flames-in, body[data-phase="win"] #guest .guest-in { animation: none !important; }
    .bottle-in { transition: none; }
}
