:root {
    color-scheme: light;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5e8d5;
    color: #553a40;
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; }

.page {
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 32px 16px;
    background:
        radial-gradient(circle at 8% 0%, rgba(248, 193, 191, .42) 0, transparent 31%),
        radial-gradient(circle at 92% 100%, rgba(239, 198, 151, .32) 0, transparent 34%),
        repeating-linear-gradient(0deg, rgba(128, 86, 67, .025) 0 1px, transparent 1px 4px),
        #f7ecd9;
}

.card {
    position: relative;
    width: min(100%, 620px);
    padding: 96px 0 32px;
}

.floral-decoration {
    position: absolute;
    z-index: 0;
    top: -118px;
    left: 50%;
    width: min(118%, 680px);
    max-width: none;
    transform: translateX(-50%);
    opacity: .7;
    pointer-events: none;
}

.heading, form { position: relative; z-index: 1; }
.heading { text-align: center; }
.eyebrow { margin: 0 0 10px; color: #8e2940; font-size: .96rem; font-weight: 800; letter-spacing: .13em; text-align: center; text-transform: uppercase; }
h1 { margin: 0; color: #5c1e34; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.85rem, 12vw, 4.35rem); font-weight: 400; letter-spacing: -.055em; line-height: .94; text-align: center; }
.intro { max-width: 440px; margin: 18px auto 30px; color: #684d4b; line-height: 1.55; text-align: center; }

label:not(.file-picker) { display: block; margin-bottom: 8px; color: #63333e; font-size: .95rem; font-weight: 700; text-align: center; }
input[type="text"] {
    width: 100%; min-height: 52px; border: 1px solid #dfc6b8; border-radius: 14px;
    padding: 12px 14px; background: rgba(255, 255, 255, .72); color: inherit; font: inherit; font-size: 16px; outline: none;
}
input[type="text"]:focus { border-color: #c66c78; box-shadow: 0 0 0 3px #f9dfe0; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }
.file-picker {
    display: flex; align-items: center; gap: 14px; margin-top: 20px; min-height: 82px; padding: 15px;
    border: 1.5px dashed #d28a91; border-radius: 16px; background: rgba(255, 244, 235, .74); cursor: pointer;
}
.file-picker:hover { border-color: #a94d5c; background: #fff0e8; }
.file-picker strong, .file-picker small { display: block; }
.file-picker small { margin-top: 3px; color: #956f69; font-size: .82rem; }
.file-picker-icon { position: relative; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%; background: #f8d9d2; color: #a94d5c; font-size: 0; }
.file-picker-icon::before, .file-picker-icon::after { position: absolute; top: 50%; left: 50%; width: 17px; height: 2px; border-radius: 2px; background: currentColor; content: ""; transform: translate(-50%, -50%); }
.file-picker-icon::after { transform: translate(-50%, -50%) rotate(90deg); }

.selection-summary { margin: 16px 0 8px; color: #886b65; font-size: .9rem; text-align: center; }
.file-list { display: grid; gap: 8px; max-height: 280px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.file-item { padding: 11px 12px; border-radius: 12px; background: rgba(247, 229, 219, .58); }
.file-meta { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; }
.file-name { overflow: hidden; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.file-size, .file-status { flex: none; color: #9a7770; }
.file-status { margin-top: 5px; font-size: .82rem; }
.file-status.failed { color: #b13e53; }
.file-status.success { color: #4e805f; }
.file-progress { height: 5px; margin-top: 8px; overflow: hidden; border-radius: 99px; background: #edd7d1; }
.file-progress > span, .progress-bar { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #d36e79, #e99085); transition: width .15s linear; }
.retry-button { margin-top: 8px; padding: 5px 9px; border: 1px solid #e0abb0; border-radius: 7px; background: #fffaf2; color: #a34254; font: inherit; font-size: .82rem; cursor: pointer; }

.progress-section { margin-top: 20px; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 7px; color: #886b65; font-size: .87rem; }
.progress-track { height: 8px; overflow: hidden; border-radius: 99px; background: #edd7d1; }
.message { margin: 18px 0 0; padding: 11px 12px; border-radius: 10px; line-height: 1.4; }
.message.error { background: #fff0ef; color: #9e1833; }
.message.success { background: #edf7ee; color: #356b45; }
.upload-button { width: 100%; min-height: 54px; margin-top: 20px; border: 0; border-radius: 14px; background: linear-gradient(135deg, #bb5668, #d97570); color: #fff; font: inherit; font-weight: 750; cursor: pointer; box-shadow: 0 8px 16px rgba(183, 78, 91, .2); }
.upload-button:hover:not(:disabled) { background: linear-gradient(135deg, #a84255, #c65f68); }
.upload-button:disabled { cursor: not-allowed; opacity: .5; }

@media (max-width: 420px) {
    .page { padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
    .card { min-height: auto; padding: 84px 0 26px; }
    .floral-decoration { top: -94px; width: 132%; }
    h1 { font-size: clamp(2.7rem, 14vw, 3.5rem); }
}
