@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Montserrat:wght@300;400;500&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    color: #1a1a1a;
    background: #fff;
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
}

.page {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.line-left {
    position: fixed;
    left: 40px;
    top: 0;
    bottom: 0;
    width: 1.5px;
    background: #1a1a1a;
}

.line-bottom {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 120px;
    height: 1.5px;
    background: #1a1a1a;
}

@media (max-width: 768px) {
    .line-left { display: none; }
    .line-bottom { right: 16px; width: 80px; bottom: 24px; }
    .page { padding: 40px 16px; }
    .names { position: relative; }
    .names::before {
        content: '';
        position: absolute;
        left: -20px;
        top: -100vh;
        bottom: 0;
        width: 1.5px;
        background: #1a1a1a;
    }
}

.names {
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
    max-width: 500px;
}

.names img {
    width: 100%;
    height: auto;
}

.date-block {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
    letter-spacing: 0.3em;
    font-size: 0.85rem;
}

.date-block .day {
    font-size: 2.5rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.date-block .separator {
    width: 1.5px;
    height: 50px;
    background: #1a1a1a;
}

.subtitle {
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-size: 0.75rem;
    text-align: center;
    margin: 10px 0;
}

.scan-hint {
    margin-top: 50px;
    letter-spacing: 0.15em;
    font-size: 0.8rem;
    color: #999;
    text-align: center;
}

.btn-row {
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 320px;
}

/* camera button */

.camera-btn {
    flex: 1;
    padding: 28px 20px;
    border: 1.5px solid #1a1a1a;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
}

.camera-btn:active {
    background: #1a1a1a;
    color: #fff;
}

.camera-btn svg {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.camera-btn.small {
    padding: 16px 20px;
    flex-direction: row;
    justify-content: center;
    gap: 12px;
}

.camera-btn.small svg {
    width: 24px;
    height: 24px;
}

.camera-btn span {
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 400;
}

.camera-btn input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (hover: hover) {
    .camera-btn:hover {
        background: #1a1a1a;
        color: #fff;
    }
}

/* toast */

.upload-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a1a1a;
    color: #fff;
    padding: 12px 28px;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 100;
}

.upload-toast.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* gallery link */

.gallery-link {
    margin-top: 24px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.65rem;
    color: #999;
    text-decoration: none;
    padding: 8px 0;
}

.gallery-link:hover { color: #1a1a1a; }

/* gallery page */

h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: 2.5rem;
    margin-bottom: 40px;
}

.back-link {
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.65rem;
    color: #999;
    text-decoration: none;
    margin-bottom: 40px;
    align-self: flex-start;
}

.back-link:hover { color: #1a1a1a; }

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 4px;
    width: 100%;
}

@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 2px;
    }
}

.gallery-item {
    position: relative;
    background: #f0f0f0;
}

.gallery-item img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item img.loaded {
    opacity: 1;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    pointer-events: none;
    padding-left: 3px;
}

.delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.gallery-item:hover .delete-btn { opacity: 1; }

@media (hover: none) {
    .delete-btn {
        opacity: 0.7;
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

.gallery img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.3s;
}

.gallery img:hover {
    opacity: 0.85;
}

.empty {
    text-align: center;
    padding: 80px 20px;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    color: #999;
}

.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.lightbox.active { display: flex; }

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: none;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    padding: 10px;
    opacity: 0.7;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    z-index: 10;
    padding: 20px;
    opacity: 0.5;
    transition: opacity 0.2s;
    -webkit-user-select: none;
    user-select: none;
}

.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }

.lightbox-prev { left: 0; }
.lightbox-next { right: 0; }

.lightbox-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 16px;
    z-index: 10;
}

.lightbox-btn {
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 8px 16px;
    -webkit-user-select: none;
    user-select: none;
}

.lightbox-btn:hover { opacity: 1; }

.lightbox-counter {
    color: #fff;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .lightbox-prev, .lightbox-next { display: none; }
}
