/* The place: 1200×675 at most, smaller to fit the screen, always 16:9 */
#stage
{
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(1200px, 100vw, calc(100vh * 1200 / 675));
    width: min(1200px, 100vw, calc(100dvh * 1200 / 675));
    aspect-ratio: 1200 / 675;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}
#place
{
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* REVEAL: what hovering would point out, for a moment (stage.js) */
#hints
{
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.hint
{
    position: absolute;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 24px;
    min-height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 6px;
    background-color: rgba(0, 182, 200, 0.3);
    animation: hint 2.5s ease-in forwards;
}
.hint > img{ width: 24px; height: 24px; filter: drop-shadow(0 0 2px #000); }
@keyframes hint
{
    0%, 70%{ opacity: 1; }
    100%{ opacity: 0; }
}

/* only where there is no mouse to hover with (mobile.css) */
#reveal-btn
{
    display: none;
    position: fixed;
    left: 8px;
    bottom: 8px;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 1;
}
#reveal-btn > img{ width: 28px; height: 28px; }

/* GOING SOMEWHERE ELSE: the old image fades out over the new one (stage.js) */
#place_video, #place_ghost
{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
#place_ghost{ opacity: 0; }
#place_ghost.fading{ animation: ghost 0.4s ease-out forwards; }
@keyframes ghost
{
    from{ opacity: 1; }
    to{ opacity: 0; }
}

/* THE ITEM IN HAND (stage.js): see-through, next to the sight (objects/*.gif: no background) */
#held
{
    position: fixed;
    width: 90px;
    opacity: 0.7;
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.8));
    pointer-events: none;
    z-index: 1;
}
#held.held_corner{ left: 8px; top: 8px; opacity: 0.9; }

/* AN ITEM LAID OVER THE VIEW (stage.js): at the scale of the place, cut at its edges */
#overlay
{
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
#overlay > img
{
    position: absolute;
    max-width: none;
}
/* the finger drags the item: no scrolling, no zooming of the page meanwhile */
#stage[data-overlay]{ touch-action: none; }
#overlay-close
{
    position: fixed;
    left: 8px;
    top: 8px;
    width: 48px;
    height: 48px;
    border: 2px solid #e9e9ed;
    font-size: 26px;
    background-color: rgba(97, 141, 144, 0.85);
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
    z-index: 1;
}
#overlay-close:hover{ background-color: #618d90; }
