body {
    margin: 0;
    overflow: hidden;
    background: #000;
}

#v3d-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.fullscreen-button {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    background-size: 100% 100%;
    display: none;
    z-index: 1;
}

.fullscreen-open  { background-image: url('media/fullscreen_open.svg'); }
.fullscreen-close { background-image: url('media/fullscreen_close.svg'); }

/* Remove tap highlight on iOS */
* { -webkit-tap-highlight-color: rgba(0,0,0,0); }

/* Photo overlay */
#photo-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(0,0,0,0.88);
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}
#photo-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    cursor: zoom-out;
}

/* Wrapper keeps image + caption together */
#photo-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 95vw;
    cursor: default;
}

#photo-img-wrap {
    position: relative;
    display: inline-block;
    line-height: 0;
}

#photo-img {
    max-width: 100%;
    max-height: 86vh;
    object-fit: contain;
    display: block;
}

#photo-caption {
    text-align: center;
    color: rgba(255,255,255,0.85);
    font-family: 'Noto Sans', sans-serif;
    font-size: 13px;
    letter-spacing: 0.06em;
    padding: 0 10px 4px;
    pointer-events: none;
}

#photo-close {
    position: absolute;
    top: -28px;
    right: 0;
    font-size: 16px;
    color: rgba(255,255,255,0.8);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 51;
    line-height: 1;
    padding: 4px 6px;
}
#photo-close:hover { color: #fff; }
