:root {
    color-scheme: light;
    --ink: #231816;
    --muted: #75615d;
    --panel: rgba(255, 255, 255, 0.78);
    --rose: #c97873;
    --gold: #b88a44;
    --shadow: 0 24px 70px rgba(71, 35, 28, 0.16);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at 20% 10%, rgba(255, 214, 201, 0.9), transparent 30rem), radial-gradient(circle at 80% 0%, rgba(245, 210, 142, 0.45), transparent 25rem), linear-gradient(135deg, #fffaf6 0%, #f7e8dc 100%);
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 64px;
}

.hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 28px;
    align-items: stretch;
    margin-bottom: 24px;
}

.hero > div, .upload, .empty, .toolbar, .notice {
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 30px;
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero > div { padding: clamp(28px, 5vw, 58px); }

.eyebrow {
    margin: 0 0 14px;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }

h1 {
    max-width: 760px;
    margin-bottom: 18px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3rem, 8vw, 7rem);
    line-height: 0.88;
    letter-spacing: -0.07em;
}

.intro {
    max-width: 620px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.6;
}

.upload {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: 28px;
}

.upload label {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    line-height: 1;
}

.upload input {
    width: 100%;
    padding: 14px;
    border: 1px dashed rgba(35, 24, 22, 0.28);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.upload button {
    border: 0;
    border-radius: 999px;
    padding: 15px 22px;
    color: white;
    background: linear-gradient(135deg, var(--rose), #9f514e);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.upload small, .toolbar p, .empty p { color: var(--muted); }
.notice { padding: 16px 20px; }
.error { color: #8d1d22; background: rgba(255, 232, 233, 0.9); }
.success { color: #276c3a; background: rgba(232, 255, 238, 0.9); }
.empty, .toolbar { margin-top: 24px; padding: 24px; }

.album-form {
    margin: 0;
}

.toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.toolbar h2 {
    margin-bottom: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3.4rem);
}

.toolbar p { margin-bottom: 0; }

.download-selected,
.download-one {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    color: white;
    background: linear-gradient(135deg, var(--ink), #69423b);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.download-one {
    padding: 9px 13px;
    background: linear-gradient(135deg, var(--rose), #9f514e);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
    gap: 20px;
    margin-top: 24px;
}

.card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 242, 232, 0.72));
    box-shadow: 0 18px 44px rgba(71, 35, 28, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.74);
}

.card:has(input:checked) {
    border-color: rgba(201, 120, 115, 0.95);
    box-shadow: 0 18px 44px rgba(159, 81, 78, 0.24);
}

.photo-link {
    display: grid;
    place-items: center;
    min-height: 260px;
    padding: 12px;
    background: radial-gradient(circle at top, rgba(255, 255, 255, 0.9), rgba(234, 216, 202, 0.38));
}

.card img {
    width: 100%;
    height: auto;
    max-height: 72vh;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 10px 26px rgba(71, 35, 28, 0.12);
    transition: transform 0.45s ease, filter 0.45s ease;
}

.card:hover img {
    transform: scale(1.015);
    filter: saturate(1.06) contrast(1.03);
}

.photo-number {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    color: white;
    background: rgba(35, 24, 22, 0.48);
    font-size: 0.78rem;
    font-weight: 800;
}

.card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
}

.select-photo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
}

.select-photo input {
    width: 18px;
    height: 18px;
    accent-color: var(--rose);
}

@media (max-width: 900px) {
    .hero, .gallery { grid-template-columns: repeat(2, 1fr); }
    .hero > div, .upload { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
    .page { width: min(100% - 20px, 1180px); padding-top: 18px; }
    .hero > div, .upload, .empty, .toolbar, .notice { border-radius: 22px; }
    .hero > div, .upload { padding: 22px; }
    .toolbar { display: block; }
    .download-selected { width: 100%; margin-top: 16px; }
    .gallery { grid-template-columns: 1fr; gap: 16px; }
    .card { border-radius: 18px; }
    .photo-link { min-height: 180px; padding: 10px; }
    .card-actions { padding: 12px; }
}
