:root {
    color-scheme: light;
    --album-bg: #ebecf0;
    --album-text: #3d485c;
    --album-muted: #626d80;
    --album-accent: #3458bd;
    --album-raised: 9px 9px 22px #cdd1dd, -9px -9px 22px #fff;
    --album-raised-small: 4px 4px 10px #cbd0dc, -4px -4px 10px #fff;
    --album-inset: inset 5px 5px 11px #cfd3de, inset -5px -5px 11px #fff;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--album-bg); }
body {
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    color: var(--album-text);
    background: var(--album-bg);
    line-height: 1.55;
}
button, textarea, input { font: inherit; }
button, label[for="photo"] { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
[hidden] { display: none !important; }

.album-shell {
    width: min(100%, 480px);
    margin: 0 auto;
    padding: max(28px, env(safe-area-inset-top)) 26px max(30px, env(safe-area-inset-bottom));
}
.album-header { text-align: center; }
.event-brand { margin-bottom: 24px; color: var(--album-accent); }
.event-crown {
    display: block;
    width: 38px;
    margin: 0 auto 8px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linejoin: round;
}
.event-name { font-size: 27px; font-weight: 650; line-height: 1.15; letter-spacing: -.8px; overflow-wrap: anywhere; }
.event-tagline { margin-top: 5px; font-size: 12px; letter-spacing: .04em; color: var(--album-muted); }
.event-logo { display: block; width: min(100%, 280px); height: 116px; object-fit: contain; margin: 0 auto 24px; }
.album-header h1 {
    margin: 0 0 12px;
    font-size: clamp(26px, 7.4vw, 34px);
    font-weight: 650;
    letter-spacing: -1px;
    line-height: 1.17;
    overflow-wrap: anywhere;
    text-wrap: balance;
}
.album-header p { margin: 0; color: var(--album-muted); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.upload-form { margin-top: 28px; }
.photo-picker {
    position: relative;
    overflow: hidden;
    border: 1px solid #f8f9fb;
    border-radius: 24px;
    background: var(--album-bg);
    box-shadow: var(--album-raised);
}
.photo-picker input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
}
.photo-picker-label { position: relative; display: grid; min-height: 198px; cursor: pointer; place-items: center; }
.photo-picker input:focus-visible + .photo-picker-label { outline: 3px solid var(--album-accent); outline-offset: -5px; }
.photo-placeholder { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 18px; text-align: center; }
.photo-placeholder svg {
    width: 58px;
    height: 58px;
    padding: 11px;
    margin-bottom: 3px;
    border: 1px solid #f8f9fb;
    border-radius: 18px;
    box-shadow: var(--album-raised-small);
    fill: none;
    stroke: var(--album-accent);
    stroke-width: 1.8;
}
.photo-placeholder strong { font-size: 16px; font-weight: 650; color: var(--album-accent); }
.photo-placeholder small { color: var(--album-muted); font-size: 11px; }
#photo-preview { display: none; width: 100%; height: 230px; object-fit: contain; background: #e0e3eb; }
.photo-picker.has-photo.has-preview #photo-preview { display: block; }
.photo-picker.has-photo.has-preview .photo-placeholder { display: none; }
.change-photo {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: none;
    min-height: 40px;
    padding: 10px 14px;
    border: 1px solid #fff;
    border-radius: 14px;
    color: var(--album-accent);
    background: #f4f5f9f5;
    box-shadow: 0 3px 12px #3d485c30;
    font-size: 12px;
    font-weight: 650;
}
.photo-picker.has-photo .change-photo { display: block; }
.field-label { display: block; margin: 26px 0 10px; font-size: 13px; font-weight: 600; }
.message-field {
    position: relative;
    border: 1px solid #f8f9fb;
    border-radius: 18px;
    background: var(--album-bg);
    box-shadow: var(--album-inset);
}
.message-field textarea {
    display: block;
    width: 100%;
    min-height: 124px;
    padding: 17px 17px 31px;
    border: 0;
    border-radius: 18px;
    color: var(--album-text);
    background: transparent;
    font-size: 16px;
    line-height: 1.5;
    resize: vertical;
}
.message-field textarea::placeholder { color: #70798b; opacity: 1; }
.message-field textarea:focus-visible { outline: 3px solid var(--album-accent); outline-offset: 3px; }
#caption-count { position: absolute; right: 15px; bottom: 9px; color: var(--album-muted); font-size: 11px; pointer-events: none; }
.form-error { margin-top: 16px; padding: 12px 15px; border: 1px solid #e4bdc7; border-radius: 14px; color: #942f47; background: #f4e3e8; font-size: 13px; overflow-wrap: anywhere; }
.submit-button, .success-panel button {
    min-height: 54px;
    padding: 14px 22px;
    border: 1px solid #f8f9fb;
    border-radius: 17px;
    color: var(--album-accent);
    background: var(--album-bg);
    box-shadow: var(--album-raised-small);
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    transition: box-shadow .18s ease, background-color .18s ease;
}
.submit-button { width: 100%; margin-top: 23px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.submit-button:hover:not(:disabled), .success-panel button:hover { background: #f1f2f6; }
.submit-button:active:not(:disabled), .success-panel button:active { box-shadow: var(--album-inset); }
.submit-button:focus-visible, .success-panel button:focus-visible { outline: 3px solid var(--album-accent); outline-offset: 4px; }
.submit-button:disabled { cursor: wait; opacity: .6; box-shadow: none; }
.submit-button svg { width: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.upload-progress { height: 4px; margin: 13px 4px 0; overflow: hidden; border-radius: 4px; background: #d4d9e5; opacity: 0; }
.upload-progress.is-active { opacity: 1; }
.upload-progress span { display: block; width: 0; height: 100%; background: var(--album-accent); transition: width .18s ease; }
.upload-progress.is-processing span { width: 100% !important; animation: processing-pulse 1.15s ease-in-out infinite; }
.privacy-note { max-width: 340px; margin: 14px auto 0; color: var(--album-muted); text-align: center; font-size: 11px; line-height: 1.55; }
.success-panel { margin-top: 32px; padding: 32px 24px; border: 1px solid #f8f9fb; border-radius: 24px; box-shadow: var(--album-raised); text-align: center; }
.success-sparkle { color: #2e8061; font-size: 44px; }
.success-panel h2 { margin: 10px 0; font-size: 27px; font-weight: 650; letter-spacing: -.7px; line-height: 1.2; }
.success-panel p { margin: 0 0 24px; color: var(--album-muted); }

@keyframes processing-pulse {
    0%, 100% { opacity: .42; transform: scaleX(.72); }
    50% { opacity: 1; transform: scaleX(1); }
}
@media (min-width: 700px) { .album-shell { padding-top: 44px; padding-bottom: 44px; } }
@media (max-width: 350px) { .album-shell { padding-right: 20px; padding-left: 20px; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
    .upload-progress.is-processing span { animation-duration: .01ms; }
}

.closed-panel { margin-top: 28px; padding: 25px; border-radius: 22px; box-shadow: 8px 8px 20px #cbd0dc, -8px -8px 20px #fff; text-align: center; }
.closed-panel h2 { font-size: 22px; }
