body {
    margin: 0;
    padding: 0;
    background: #000;
    font-family: sans-serif;
    color: white;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#header {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    background: #eee;
    color: #000;
    flex-shrink: 0;
}

.h-left, .h-center { font-weight: bold; }
.h-right img { height: 40px; }

#viewer {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
}

.media {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: none;
}

#nav {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #111;
    flex-shrink: 0;
}

.btn {
    width: 32%;
    background: #d32f2f;
    color: white;
    padding: 15px 0;
    text-align: center;
    border-radius: 10px;
    font-size: 18px;
    border: none;
    cursor: pointer;
}

.btn:active { background: #b71c1c; transform: scale(0.98); }

#gallery {
    height: 150px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    padding: 5px;
    overflow-y: auto;
    background: #000;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
}

#gallery img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 5px;
}

#mapPopup {
    display: none;
    position: fixed;
    inset: 0;
    background: black;
    z-index: 9999;
}

#mapClose {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 35px;
    z-index: 10001;
    color: white;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#map { width: 100%; height: 100%; }
