* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    background: #f5f7fb;
    color: #182033;
    font-family: Vazirmatn, Tahoma, sans-serif;
    min-height: 100vh
}

.ambient {
    position: fixed;
    border-radius: 50%;
    filter: blur(75px);
    pointer-events: none;
    opacity: .3
}

.ambient-a {
    width: 280px;
    height: 280px;
    right: -110px;
    top: -90px;
    background: #a78bfa
}

.ambient-b {
    width: 240px;
    height: 240px;
    left: -100px;
    bottom: -80px;
    background: #67e8f9
}

.app {
    width: min(1080px, calc(100% - 20px));
    margin: 10px auto 85px;
    position: relative
}

.hero {
    background: linear-gradient(145deg, #111827, #29354d);
    color: #fff;
    border-radius: 24px;
    padding: 27px 20px 22px;
    box-shadow: 0 20px 55px #17203322;
    animation: rise .55s ease
}

.brand-line {
    font-size: 10px;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 7px
}

.brand-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #67e8f9;
    box-shadow: 0 0 14px #67e8f9
}

.hero h1 {
    font-size: 25px;
    line-height: 1.55;
    margin: 12px 0 6px;
    font-weight: 800
}

.hero > p {
    font-size: 11px;
    line-height: 1.9;
    color: #cbd5e1;
    margin: 0
}

.progress-box {
    margin-top: 23px
}

.progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    color: #dbe4f0;
    margin-bottom: 8px
}

.progress-track {
    height: 6px;
    background: #ffffff1a;
    border-radius: 99px;
    overflow: hidden
}

.progress-track > div {
    height: 100%;
    width: 20%;
    border-radius: 99px;
    background: linear-gradient(90deg, #67e8f9, #a78bfa);
    transition: width .45s ease
}

.form-section {
    display: none;
    margin-top: 12px;
    background: #fff;
    border: 1px solid #e8ecf2;
    border-radius: 20px;
    padding: 21px 15px;
    box-shadow: 0 14px 40px #1720330c
}

.form-section.active {
    display: block;
    animation: sectionIn .42s ease
}

.section-title {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    padding-bottom: 17px;
    margin-bottom: 19px;
    border-bottom: 1px solid #edf0f5
}

.section-title .icon {
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 13px;
    background: #f1efff;
    display: grid;
    place-items: center;
    font-size: 21px
}

.section-title small {
    color: #7c3aed;
    font-size: 9px;
    font-weight: 800
}

.section-title h2 {
    font-size: 18px;
    margin: 1px 0 3px
}

.section-title p {
    font-size: 10px;
    color: #7b8799;
    margin: 0;
    line-height: 1.8
}

.fields {
    display: grid;
    grid-template-columns:1fr;
    gap: 15px
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px
}

.field > span {
    font-size: 11px;
    font-weight: 650;
    color: #344054
}

.field > span b {
    color: #ef4444
}

.field input, .field textarea {
    font: inherit;
    font-size: 12px;
    color: #182033;
    background: #fafbfd;
    border: 1px solid #dfe5ed;
    border-radius: 12px;
    outline: 0;
    width: 100%;
    transition: .2s
}

.field input {
    height: 46px;
    padding: 0 13px
}

.field textarea {
    padding: 11px 13px;
    resize: vertical;
    line-height: 1.9
}

.field input:focus, .field textarea:focus {
    background: #fff;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px #8b5cf612
}

.field.invalid input, .field.invalid textarea {
    border-color: #ef4444
}

.date-input {
    position: relative
}

.date-input input {
    padding-left: 42px;
    cursor: pointer
}

.date-input button {
    position: absolute;
    left: 5px;
    top: 5px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 9px;
    background: #f1efff;
    color: #6d28d9;
    cursor: pointer
}

.choices {
    display: flex;
    flex-wrap: wrap;
    gap: 7px
}

.choices label {
    position: relative;
    cursor: pointer
}

.choices input {
    position: absolute;
    opacity: 0
}

.choices span {
    display: block;
    padding: 9px 12px;
    border: 1px solid #dfe5ed;
    background: #fafbfd;
    border-radius: 10px;
    font-size: 10px
}

.choices input:checked + span {
    background: #f3efff;
    border-color: #8b5cf6;
    color: #6d28d9
}

.photo-upload {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px;
    margin-bottom: 18px;
    border: 1px dashed #d6d0f9;
    background: linear-gradient(135deg, #faf9ff, #f6fcff);
    border-radius: 16px
}

.photo-preview {
    width: 78px;
    height: 94px;
    flex: none;
    border-radius: 13px;
    background: #eeeef4;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 5px 15px #17203312
}

.photo-preview span {
    font-size: 30px;
    filter: grayscale(1);
    opacity: .4
}

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

.photo-copy {
    min-width: 0
}

.photo-copy strong {
    display: block;
    font-size: 12px
}

.photo-copy p {
    font-size: 9px;
    color: #7b8799;
    margin: 4px 0 9px
}

.outline-btn {
    border: 1px solid #d8d1fa;
    background: #fff;
    color: #6d28d9;
    border-radius: 10px;
    padding: 8px 11px;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer
}

.text-btn {
    border: 0;
    background: transparent;
    color: #ef4444;
    font: inherit;
    font-size: 9px;
    cursor: pointer;
    margin-right: 7px
}

.hidden {
    display: none !important
}

.children-box {
    margin-top: 23px;
    padding-top: 19px;
    border-top: 1px solid #edf0f5
}

.subhead {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px
}

.subhead strong {
    display: block;
    font-size: 12px
}

.subhead small {
    display: block;
    color: #8994a5;
    font-size: 9px;
    margin-top: 3px
}

.child-row {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 8px;
    margin-top: 10px;
    animation: pop .25s ease
}

.child-row input {
    height: 42px;
    border: 1px solid #dfe5ed;
    border-radius: 10px;
    padding: 0 10px;
    font: inherit;
    font-size: 10px;
    outline: 0
}

.child-row input:nth-child(3) {
    grid-column: 1/-1
}

.remove-child {
    grid-column: 1/-1;
    border: 0;
    background: #fff1f2;
    color: #e11d48;
    border-radius: 9px;
    height: 32px;
    font: inherit;
    cursor: pointer
}

.final-card {
    margin-top: 23px;
    border: 1px solid #e3defd;
    background: linear-gradient(135deg, #f7f4ff, #effcff);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 13px
}

.final-card strong {
    font-size: 12px
}

.final-card p {
    font-size: 9px;
    color: #778399;
    margin: 4px 0 0
}

.submit-btn {
    height: 45px;
    border: 0;
    border-radius: 11px;
    background: #111827;
    color: #fff;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 9px 20px #11182720
}

.submit-btn b {
    color: #67e8f9;
    margin-right: 7px
}

.navigation {
    position: fixed;
    z-index: 10;
    bottom: 8px;
    right: 10px;
    left: 10px;
    max-width: 1060px;
    margin: auto;
    padding: 7px;
    border: 1px solid #e6e9ef;
    background: #ffffffdf;
    backdrop-filter: blur(15px);
    border-radius: 15px;
    box-shadow: 0 12px 35px #1720331a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px
}

.navigation #saveState {
    font-size: 8px;
    color: #8a95a6
}

.nav-btn {
    height: 40px;
    padding: 0 15px;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer
}

.nav-btn.next {
    background: #111827;
    color: #fff
}

.nav-btn.back {
    background: #f3f5f8;
    color: #526074
}

.toast {
    position: fixed;
    z-index: 50;
    bottom: 70px;
    right: 50%;
    transform: translateX(50%) translateY(15px);
    opacity: 0;
    pointer-events: none;
    background: #111827;
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 10px;
    transition: .25s
}

.toast.show {
    opacity: 1;
    transform: translateX(50%) translateY(0)
}

.calendar-modal, .success-modal {
    display: none;
    position: fixed;
    z-index: 40;
    inset: 0;
    background: #0f172a88;
    backdrop-filter: blur(6px);
    padding: 16px;
    place-items: end center
}

.calendar-modal.show, .success-modal.show {
    display: grid
}

.calendar-card, .success-box {
    width: min(390px, 100%);
    background: #fff;
    border-radius: 22px;
    padding: 17px;
    box-shadow: 0 25px 70px #0004;
    animation: sheet .3s ease
}

.calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    margin-bottom: 13px
}

.calendar-head button {
    border: 0;
    background: #f3f4f7;
    width: 37px;
    height: 37px;
    border-radius: 10px;
    font-size: 24px;
    cursor: pointer
}

.calendar-head small {
    display: block;
    color: #7c3aed;
    font-size: 10px
}

.calendar-head strong {
    display: block;
    font-size: 16px;
    margin-top: 2px
}

.weekdays, .days {
    display: grid;
    grid-template-columns:repeat(7, 1fr);
    gap: 4px
}

.weekdays span {
    text-align: center;
    color: #94a0b1;
    font-size: 9px;
    padding: 6px
}

.days button {
    height: 43px;
    border: 0;
    background: #fff;
    border-radius: 9px;
    font: inherit;
    font-size: 10px;
    cursor: pointer
}

.days button:hover {
    background: #f3efff
}

.days button.today {
    background: #111827;
    color: #fff
}

.days button.selected {
    background: #8b5cf6;
    color: #fff
}

.days button.empty {
    pointer-events: none
}

.today-btn {
    width: 100%;
    margin-top: 12px;
    height: 40px;
    border: 0;
    background: #f3efff;
    color: #6d28d9;
    border-radius: 11px;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer
}

.success-modal {
    place-items: center
}

.success-box {
    text-align: center
}

.success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 13px;
    border-radius: 18px;
    background: #dcfce7;
    color: #16a34a;
    display: grid;
    place-items: center;
    font-size: 28px;
    font-weight: 800
}

.success-box h2 {
    font-size: 18px
}

.success-box p {
    font-size: 10px;
    color: #728096;
    line-height: 2;
    margin-bottom: 18px
}

@media (min-width: 700px) {
    .app {
        margin-top: 35px
    }

    .hero {
        padding: 38px 40px
    }

    .hero h1 {
        font-size: 34px
    }

    .form-section {
        padding: 30px
    }

    .fields {
        grid-template-columns:repeat(2, minmax(0, 1fr))
    }

    .field.wide {
        grid-column: 1/-1
    }

    .photo-upload {
        max-width: 520px
    }

    .navigation {
        position: static;
        margin-top: 12px;
        background: transparent;
        border: 0;
        box-shadow: none;
        padding: 0
    }

    .navigation #saveState {
        font-size: 10px
    }

    .nav-btn {
        height: 44px
    }

    .final-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between
    }

    .submit-btn {
        width: auto;
        padding: 0 20px
    }

    .calendar-modal {
        place-items: center
    }

    .calendar-card {
        padding: 20px
    }

    .child-row {
        grid-template-columns:1.5fr .6fr 1.2fr 38px
    }

    .child-row input:nth-child(3) {
        grid-column: auto
    }

    .remove-child {
        grid-column: auto;
        height: 42px
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(18px)
    }
    to {
        opacity: 1;
        transform: none
    }
}

@keyframes sectionIn {
    from {
        opacity: 0;
        transform: translateY(12px)
    }
    to {
        opacity: 1;
        transform: none
    }
}

@keyframes pop {
    from {
        opacity: 0;
        transform: scale(.97)
    }
    to {
        opacity: 1;
        transform: none
    }
}

@keyframes sheet {
    from {
        opacity: 0;
        transform: translateY(25px)
    }
    to {
        opacity: 1;
        transform: none
    }
}

/* --- playful cat interaction --- */
.cat-mascot {
    position: fixed;
    left: 18px;
    top: 75vh;
    z-index: 9999;
    pointer-events: none;

    transition:
            left .55s cubic-bezier(.22, 1, .36, 1),
            top .55s cubic-bezier(.22, 1, .36, 1);

    filter: drop-shadow(0 7px 9px rgba(15, 23, 42, .16));
}
.cat-body {
    font-size: 48px;
    line-height: 1;
    transform: rotate(-4deg);
    transition: transform .25s
}

.cat-shadow {
    position: absolute;
    width: 34px;
    height: 8px;
    background: rgba(15, 23, 42, .13);
    border-radius: 50%;
    bottom: -1px;
    left: 8px;
    filter: blur(3px)
}

.cat-bubble {
    position: absolute;
    right: 43px;
    top: -10px;
    width: max-content;
    max-width: 180px;
    background: #fff;
    border: 1px solid #e7eaf0;
    color: #374151;
    border-radius: 12px;
    padding: 7px 10px;
    font: 600 9px Vazirmatn;
    opacity: 0;
    transform: translateY(5px) scale(.95);
    transition: .25s;
    box-shadow: 0 8px 25px rgba(15, 23, 42, .1)
}

.cat-bubble.show {
    opacity: 1;
    transform: none
}

.cat-mascot.walking .cat-body {
    animation: catWalk .16s infinite alternate;
}

.cat-mascot.celebrate .cat-body {
    animation: catJump .55s ease;
}

@keyframes catWalk {
    from {
        transform: translateY(0) rotate(-8deg)
    }
    to {
        transform: translateY(-5px) rotate(8deg)
    }
}

@keyframes catJump {
    0%, 100% {
        transform: translateY(0) rotate(0) scale(1)
    }
    35% {
        transform: translateY(-17px) rotate(-12deg) scale(1.08)
    }
    65% {
        transform: translateY(-7px) rotate(12deg) scale(1.04)
    }
}

.calendar-selectors {
    display: flex;
    gap: 6px;
    align-items: center
}

.calendar-selectors select {
    height: 38px;
    border: 1px solid #e0e5ed;
    background: #fafbfd;
    border-radius: 10px;
    padding: 0 8px;
    font: 600 10px Vazirmatn;
    color: #182033;
    outline: 0;
    cursor: pointer
}

.calendar-selectors select:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px #8b5cf612
}

.calendar-shortcuts {
    display: flex;
    gap: 6px;
    margin: 0 0 12px;
    overflow: auto;
    padding-bottom: 2px
}

.calendar-shortcuts button {
    white-space: nowrap;
    border: 1px solid #e5e7eb;
    background: #fafbfd;
    color: #64748b;
    border-radius: 9px;
    padding: 7px 9px;
    font: 500 9px Vazirmatn;
    cursor: pointer
}

.calendar-shortcuts button:hover {
    background: #f3efff;
    color: #6d28d9;
    border-color: #ddd6fe
}

@media (max-width: 699px) {
    .cat-mascot {
        display: block;
        position: fixed;
        z-index: 9999;
        width: 48px;
        height: 48px;

        /* مقدار اولیه؛ بعداً JS تغییرش می‌دهد */
        left: 50%;
        top: 120px;

        bottom: auto;
        right: auto;
    }

    .cat-body {
        font-size: 39px
    }

    .cat-shadow {
        width: 28px
    }

    .cat-bubble {
        right: 35px;
        top: -8px;
        font-size: 8px
    }

    .calendar-selectors select:first-child {
        width: 92px
    }

    .calendar-selectors select:last-child {
        width: 92px
    }
}

@media (min-width: 700px) {
    .cat-mascot {
        display: block;
    }
    .cat-body {
        font-size: 54px
    }
}
/* وضعیت ارسال فرم */
.submit-loading {
    opacity: .75;
    cursor: not-allowed !important;
    pointer-events: none;
}

.submit-spinner {
    width: 19px;
    height: 19px;
    border: 3px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
    margin-left: 9px;
    animation: submitSpin .7s linear infinite;
}

@keyframes submitSpin {
    to {
        transform: rotate(360deg);
    }
}

/* وضعیت آپلود عکس */
.upload-status {
    display: none;
    align-items: center;
    gap: 9px;
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
}

.upload-status.show {
    display: flex;
}

.upload-status-spinner {
    width: 15px;
    height: 15px;
    border: 2px solid #cbd5e1;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: submitSpin .7s linear infinite;
    flex-shrink: 0;
}