* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: #f3f4f1;
    color: #20231f;
    font-family: Arial, Helvetica, sans-serif;
}

body { min-width: 320px; }

.view {
    width: calc(100% - 60px);
    max-width: 1860px;
    margin: 0 auto;
    padding: 24px 0 35px;
}

.view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid #d7dbd3;
}

.view-logo {
    display: block;
    width: 180px;
    height: auto;
}

.admin-link,
.footer a {
    color: #68715f;
    text-decoration: none;
    font-size: .76rem;
}

.event-intro {
    padding: 25px 0 20px;
}

.eyebrow {
    margin-bottom: 7px;
    color: #7d8c4d;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .16em;
}

.event-intro h1 {
    margin: 0;
    font-size: 2.25rem;
    line-height: 1.05;
    font-weight: 700;
}

.event-intro p {
    margin: 8px 0 0;
    color: #687066;
    font-size: .9rem;
}

.event-intro .instruction {
    margin-top: 12px;
    font-size: .92rem;
}

.gallery-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 11px;
}

.gallery-head h2 {
    margin: 0;
    font-size: 1.15rem;
}

.camera-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.camera-tabs a {
    padding: 7px 11px;
    border: 1px solid #cbd0c6;
    background: #fff;
    color: #626a5d;
    text-decoration: none;
    font-size: .78rem;
}

.camera-tabs a.active {
    background: #9aa65b;
    border-color: #9aa65b;
    color: #11130f;
    font-weight: 700;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 9px;
}

.photo-card {
    min-width: 0;
    background: #fff;
    border: 1px solid #d6dad2;
}

.photo-link {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e7e9e5;
}

.photo-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .15s ease;
}

.photo-link:hover img { transform: scale(1.02); }

.select-photo {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 7px 7px;
    color: #687066;
    font-size: .7rem;
    cursor: pointer;
}

.select-photo input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #87934e;
}

.request-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 15px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #d6dad2;
    font-size: .82rem;
}

.request-bar button {
    border: 0;
    padding: 9px 15px;
    background: #d28e3b;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.request-bar button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.empty {
    padding: 45px 20px;
    text-align: center;
    background: #fff;
    border: 1px solid #d6dad2;
    color: #737a70;
}

.footer {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding-top: 20px;
    color: #81877d;
    font-size: .72rem;
}

.viewer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(10, 12, 9, .94);
}

.viewer.open { display: flex; }

.viewer-image {
    max-width: 88vw;
    max-height: 86vh;
    object-fit: contain;
}

.viewer-close,
.viewer-prev,
.viewer-next {
    position: fixed;
    z-index: 1001;
    border: 1px solid #59604f;
    background: #20231f;
    color: #fff;
    cursor: pointer;
}

.viewer-close {
    top: 20px;
    right: 25px;
    width: 42px;
    height: 42px;
    font-size: 28px;
}

.viewer-prev,
.viewer-next {
    top: 50%;
    width: 45px;
    height: 60px;
    margin-top: -30px;
    font-size: 36px;
}

.viewer-prev { left: 20px; }
.viewer-next { right: 20px; }

.viewer-caption {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    color: #dce0d9;
    font-size: .75rem;
}

@media (max-width: 1450px) {
    .photo-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 1150px) {
    .photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
    .view { width: calc(100% - 28px); }
    .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gallery-head { align-items: stretch; flex-direction: column; }
    .camera-tabs a { flex: 1 1 auto; text-align: center; }
    .request-bar { display: block; }
    .request-bar button { width: 100%; margin-top: 9px; }
    .viewer-caption { width: 90vw; justify-content: center; flex-wrap: wrap; }
}
