:root {
    --bg: #fff8f4;
    --bg-soft: #f7eadf;
    --card: rgba(255, 255, 255, 0.88);
    --ink: #3f2b2a;
    --muted: #806867;
    --accent: #b98274;
    --accent-dark: #8f5149;
    --gold: #c79a51;
    --shadow: 0 24px 80px rgba(89, 53, 48, 0.16);
    --radius: 28px;
    --font: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
    --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 15% 10%, rgba(255, 255, 255, 0.9) 0 16%, transparent 32%),
        radial-gradient(circle at 85% 0%, rgba(199, 154, 81, 0.16) 0 18%, transparent 36%),
        linear-gradient(135deg, #fffaf7 0%, var(--bg) 45%, #f3ddd5 100%);
    font-family: var(--font-sans);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(120deg, rgba(255, 255, 255, 0.45), transparent 42%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23c79a51' stroke-opacity='.16' stroke-width='1'%3E%3Cpath d='M80 24c18 20 18 48 0 72-18-24-18-52 0-72Z'/%3E%3Cpath d='M80 24c-18 20-18 48 0 72 18-24 18-52 0-72Z' transform='rotate(60 80 80)'/%3E%3Cpath d='M80 24c-18 20-18 48 0 72 18-24 18-52 0-72Z' transform='rotate(-60 80 80)'/%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

img {
    display: block;
    width: 100%;
}

a {
    color: inherit;
}

.hero {
    min-height: 62vh;
    display: grid;
    place-items: center;
    padding: 44px 20px 34px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "♡";
    position: absolute;
    right: clamp(18px, 9vw, 140px);
    bottom: 18px;
    color: rgba(143, 81, 73, 0.12);
    font-size: clamp(120px, 22vw, 280px);
    line-height: 1;
    transform: rotate(-10deg);
}

.hero__content {
    width: min(860px, 100%);
    position: relative;
    z-index: 1;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent-dark);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

h1, h2, h3 {
    font-family: var(--font);
    font-weight: 700;
    line-height: 1.05;
}

h1 {
    margin: 0;
    font-size: clamp(3rem, 10vw, 6.8rem);
    letter-spacing: -0.055em;
}

h2 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 5vw, 3.6rem);
    letter-spacing: -0.035em;
}

.hero p:not(.eyebrow), .intro p, .empty-state p, .upload-card__header p {
    color: var(--muted);
    font-size: clamp(1rem, 2.2vw, 1.22rem);
    line-height: 1.65;
}

.hero__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 20px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button--primary {
    color: #fff;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    box-shadow: 0 16px 34px rgba(143, 81, 73, 0.22);
}

.button--ghost {
    color: var(--accent-dark);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(143, 81, 73, 0.18);
}

.button--wide {
    width: 100%;
    min-height: 58px;
    font-size: 1rem;
}

main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 64px;
    position: relative;
    z-index: 1;
}

.notice {
    margin: 18px auto;
    padding: 16px 18px;
    border-radius: 20px;
    background: var(--card);
    box-shadow: 0 12px 36px rgba(89, 53, 48, 0.08);
}

.notice p {
    margin: 0.2rem 0;
}

.notice--success {
    border: 1px solid rgba(89, 140, 89, 0.28);
    color: #315f31;
}

.notice--warning {
    border: 1px solid rgba(199, 154, 81, 0.45);
}

.notice--error {
    border: 1px solid rgba(160, 54, 54, 0.28);
    color: #913232;
    background: #fff7f7;
}

.intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 36px 0 24px;
}

.intro > div:first-child {
    max-width: 760px;
}

.counter {
    min-width: 130px;
    padding: 18px 20px;
    text-align: center;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(143, 81, 73, 0.12);
}

.counter strong {
    display: block;
    font-family: var(--font);
    font-size: 2.6rem;
    line-height: 1;
}

.counter span {
    color: var(--muted);
    font-size: 0.9rem;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr));
    gap: 24px;
}

.photo-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid rgba(143, 81, 73, 0.13);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.photo-card__image,
.photo-card__task button {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.photo-card__image {
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border-radius: 22px;
    background: #edd8d1;
}

.photo-card__image img,
.photo-card__task img {
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.photo-card:hover .photo-card__image img {
    transform: scale(1.035);
}

.photo-card__zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    background: rgba(63, 43, 42, 0.58);
    backdrop-filter: blur(8px);
}

.photo-card__task {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(247, 234, 223, 0.75);
}

.photo-card__task button {
    overflow: hidden;
    aspect-ratio: 1;
    border-radius: 14px;
}

.photo-card__task strong,
.photo-card__task span {
    display: block;
}

.photo-card__task span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.85rem;
}

.photo-card__meta {
    padding: 2px 6px 8px;
}

.photo-card__meta h3 {
    margin: 0 0 6px;
    font-size: 1.35rem;
}

.photo-card__meta p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.empty-state {
    display: grid;
    place-items: center;
    padding: 70px 24px;
    text-align: center;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.7);
    border: 1px dashed rgba(143, 81, 73, 0.25);
}

.rings {
    margin-bottom: 10px;
    color: var(--gold);
    font-size: 4rem;
    line-height: 1;
}

.footer {
    padding: 34px 16px 48px;
    text-align: center;
    color: var(--muted);
}

.lightbox {
    width: min(940px, calc(100vw - 28px));
    padding: 0;
    border: 0;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 30px 120px rgba(0, 0, 0, 0.35);
}

.lightbox::backdrop {
    background: rgba(34, 22, 21, 0.72);
    backdrop-filter: blur(4px);
}

.lightbox img {
    max-height: 82vh;
    object-fit: contain;
    background: #171313;
    border-radius: 26px 26px 0 0;
}

.lightbox p {
    margin: 0;
    padding: 15px 18px 18px;
    color: var(--muted);
}

.lightbox__close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.upload-page {
    display: grid;
    place-items: start center;
}

.upload-shell {
    width: min(820px, calc(100% - 28px));
    margin: 34px auto 54px;
}

.back-link {
    display: inline-flex;
    margin: 0 0 18px;
    color: var(--accent-dark);
    font-weight: 800;
    text-decoration: none;
}

.upload-card {
    padding: clamp(22px, 5vw, 42px);
    border-radius: 34px;
    background: var(--card);
    border: 1px solid rgba(143, 81, 73, 0.14);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.upload-card__header {
    text-align: center;
    margin-bottom: 24px;
}

.upload-card h1 {
    font-size: clamp(2.4rem, 6vw, 4.6rem);
}

.upload-form {
    display: grid;
    gap: 18px;
}

.field {
    display: grid;
    gap: 8px;
    font-weight: 800;
}

.field span em {
    color: var(--muted);
    font-style: normal;
    font-weight: 600;
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid rgba(143, 81, 73, 0.18);
    border-radius: 18px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.9);
    font: inherit;
    outline: none;
    transition: border .18s ease, box-shadow .18s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(185, 130, 116, 0.14);
}

.upload-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.upload-box {
    position: relative;
    display: grid;
    gap: 7px;
    min-height: 220px;
    padding: 22px;
    align-content: center;
    text-align: center;
    border: 2px dashed rgba(143, 81, 73, 0.26);
    border-radius: 26px;
    background: rgba(247, 234, 223, 0.62);
    cursor: pointer;
    transition: transform .18s ease, border .18s ease, background .18s ease;
}

.upload-box:hover {
    transform: translateY(-2px);
    border-color: rgba(143, 81, 73, 0.52);
    background: rgba(247, 234, 223, 0.86);
}

.upload-box__number {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin: 0 auto 8px;
    border-radius: 50%;
    color: #fff;
    background: var(--accent-dark);
    font-weight: 900;
}

.upload-box strong {
    font-size: 1.05rem;
}

.upload-box small,
.file-name {
    color: var(--muted);
    line-height: 1.45;
}

.upload-box input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-name {
    display: inline-flex;
    justify-content: center;
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    font-size: 0.85rem;
    font-weight: 800;
}

@media (max-width: 760px) {
    .hero {
        min-height: 56vh;
    }

    .intro {
        display: grid;
        align-items: start;
    }

    .counter {
        width: 100%;
        display: flex;
        align-items: baseline;
        justify-content: center;
        gap: 10px;
    }

    .upload-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    main {
        width: min(100% - 20px, 1180px);
    }

    .hero__actions {
        display: grid;
    }

    .button {
        width: 100%;
    }

    .gallery {
        gap: 16px;
    }

    .upload-card {
        border-radius: 26px;
    }
}
