* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f6f4ef;
    color: #252525;
}

body {
    min-height: 100vh;
}

.page-shell {
    min-height: 100vh;
    padding: 28px 16px;
}

.content {
    width: 100%;
}

.wizard-card {
    width: min(760px, 100%);
    margin: 0 auto;
    background: #fff;
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 10px 35px rgba(0,0,0,.08);
}

.welcome-card,
.photo-card,
.thank-you-card {
    width: min(560px, 100%);
}

h1 {
    text-align: center;
    font-size: 1.8rem;
    margin: 8px 0 10px;
}

.subtle {
    text-align: center;
    color: #666;
    margin: 0 0 25px;
}

.step-indicator {
    text-align: center;
    font-size: .85rem;
    font-weight: 600;
    color: #765a1d;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.logo-wrap {
    text-align: center;
    margin: 24px 0 30px;
}

.logo {
    width: 150px;
    max-width: 45%;
    height: auto;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-group {
    margin-bottom: 18px;
}

.form-grid .form-group {
    margin-bottom: 0;
}

.form-group.full {
    grid-column: 1 / -1;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 7px;
}

.form-control {
    width: 100%;
    min-height: 46px;
    border: 1px solid #d2d2d2;
    border-radius: 9px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
    outline: none;
}

textarea.form-control {
    resize: vertical;
}

.form-control:focus {
    border-color: #8d6c24;
    box-shadow: 0 0 0 3px rgba(141,108,36,.12);
}

.readonly {
    background: #f1f1f1;
}

.mobile-input {
    display: flex;
    align-items: center;
    border: 1px solid #d2d2d2;
    border-radius: 9px;
    overflow: hidden;
}

.mobile-input:focus-within {
    border-color: #8d6c24;
    box-shadow: 0 0 0 3px rgba(141,108,36,.12);
}

.mobile-input span {
    padding: 0 12px;
    font-weight: 600;
    color: #555;
    border-right: 1px solid #ddd;
}

.mobile-input .form-control {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.btn-primary,
.btn-secondary {
    min-height: 46px;
    padding: 10px 22px;
    border-radius: 9px;
    border: 0;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.btn-primary {
    background: #765a1d;
    color: #fff;
}

.btn-primary:hover {
    background: #624a17;
}

.btn-primary:disabled {
    opacity: .6;
    cursor: default;
}

.btn-secondary {
    background: #ececec;
    color: #333;
}

.full-width {
    width: 100%;
}

.button-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 26px;
}

.alert {
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
}

.error {
    background: #fff0f0;
    color: #a01818;
    border: 1px solid #f1caca;
}

.validation-message {
    color: #b42318;
    font-size: .85rem;
    margin-top: 5px;
}

.help-text,
.selected-file {
    color: #666;
    font-size: .85rem;
    margin-top: 7px;
}

.centered {
    text-align: center;
}

.loading {
    text-align: center;
    padding: 35px;
}

.photo-preview {
    width: 180px;
    height: 180px;
    margin: 25px auto;
    border-radius: 50%;
    overflow: hidden;
    background: #eee;
    border: 5px solid #f0eadb;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #777;
}

.success-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    margin: 10px auto 18px;
    display: grid;
    place-items: center;
    background: #e7f5ea;
    color: #287a37;
    font-size: 2.5rem;
    font-weight: 700;
}

.thank-you-card > p {
    text-align: center;
}

.member-count {
    text-align: center;
    margin: 30px 0;
    padding: 22px;
    border-radius: 14px;
    background: #faf7ef;
}

.member-count strong {
    display: block;
    font-size: 2.4rem;
    color: #765a1d;
}

.member-count span {
    display: block;
    margin-top: 5px;
}

.link-button {
    display: inline-block;
    text-decoration: none;
}

@media (max-width: 650px) {
    .page-shell {
        padding: 12px;
    }

    .wizard-card {
        padding: 22px 17px;
        border-radius: 14px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full {
        grid-column: auto;
    }

    .button-row > * {
        flex: 1;
    }
}
