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

:root {
    --bg: #f5f5f5;
    --card-bg: white;
    --text: #333;
    --text-muted: #888;
    --accent: #4CAF50;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --radius: 12px;
    --transition: 0.3s ease;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

#app {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* Calendar View */
.calendar-view {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.calendar-view.hidden {
    visibility: hidden;
    position: absolute;
    pointer-events: none;
}

.calendar-grid {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.month-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 1rem 0 0.5rem;
}

.month-label:first-child {
    padding-top: 0;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
}

.day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #ccc;
    position: relative;
    overflow: hidden;
    border: 1px dashed #e8e8e8;
}

.day.empty {
    visibility: hidden;
}

.day.has-photo {
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.day.has-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Photo View */
.photo-view {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100;
}

.photo-view[hidden] {
    display: none;
}

.close-btn {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 2rem;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition);
    z-index: 110;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.close-btn:hover {
    color: rgba(255,255,255,0.9);
}

.photo-scroll {
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.photo-item {
    position: relative;
    flex-shrink: 0;
    aspect-ratio: 1;
    background: rgba(255,255,255,0.05);
    overflow: hidden;
}

.photo-thumb,
.photo-full {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.photo-thumb {
    filter: blur(10px);
    transform: scale(1.1);
    opacity: 0;
}

.photo-thumb.show {
    opacity: 1;
}

.photo-full {
    opacity: 0;
    transition: opacity 0.3s;
}

.photo-full.loaded {
    opacity: 1;
}

.photo-item.loaded .photo-thumb {
    display: none;
}

@media (min-width: 900px) {
    .photo-item {
        height: 100vh;
        height: 100dvh;
        width: auto;
        aspect-ratio: 1;
        margin: 0 auto;
    }
}

.photo-label {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    color: rgba(255,255,255,0.5);
    font-size: 0.7rem;
}

/* Tablet+ (600px+) */
@media (min-width: 600px) {
    .calendar-view {
        padding: 1.5rem 2rem;
    }

    .calendar-grid {
        max-width: 600px;
    }

    .day {
        font-size: 1rem;
    }
}

/* Desktop (900px+) */
@media (min-width: 900px) {
    .calendar-grid {
        max-width: 800px;
    }
}

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .calendar-grid {
        max-width: 1000px;
    }
}
