:root {
    --primary: #ff6848;
    --primary-dark: #ec5739;
    --primary-soft: #fff0e9;
    --cream: #fff9f5;
    --white: #fff;
    --text: #302b28;
    --sub: #817771;
    --line: #eaded8;
    --placeholder: #b8afaa;
    --success: #5ea573;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-width: 320px;
    min-height: 100%;
}

body {
    font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    color: var(--text);
    background: #f8f4f1;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

.register-page {
    min-height: 100vh;
    padding: 24px;
}

.register-wrap {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    width: 100%;
    max-width: 1260px;
    min-height: calc(100vh - 48px);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid #eee4de;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(85, 57, 45, 0.08);
}

.register-side {
    display: flex;
    flex-direction: column;
    padding: 34px 30px;
    background: linear-gradient(180deg, #fff9f5 0%, #fff0e5 100%);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: #fff;
    background: var(--primary);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-text strong {
    font-size: 21px;
    font-weight: 900;
}

.brand-text small {
    margin-top: 2px;
    color: #8a817b;
    font-size: 9px;
}

.side-message {
    margin-top: 115px;
}

.side-message > span {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.side-message h2 {
    margin: 15px 0 0;
    font-size: 27px;
    line-height: 1.5;
    letter-spacing: -1px;
}

.side-message h2 strong {
    color: var(--primary);
}

.side-message p {
    margin: 25px 0 0;
    color: #716963;
    font-size: 14px;
    line-height: 1.8;
}

.side-features {
    display: grid;
    gap: 15px;
    margin-top: auto;
}

.side-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #716963;
    font-size: 13px;
    font-weight: 700;
}

.side-feature span {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--primary);
    background: #fff;
}

.side-feature p {
    margin: 0;
}

.register-top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 70px;
    padding: 0 42px;
    border-bottom: 1px solid #f1ebe7;
}

.mobile-brand {
    display: none;
}

.login-guide {
    display: flex;
    gap: 12px;
    color: #8a817c;
    font-size: 13px;
}

.login-guide a {
    color: var(--primary);
    font-weight: 800;
}

.register-content {
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
    padding: 36px 34px 45px;
}

.register-heading {
    margin-bottom: 25px;
}

.register-eyebrow {
    color: var(--primary);
    font-size: 15px;
    font-weight: 900;
}

.register-heading h1 {
    margin: 6px 0 9px;
    font-size: 39px;
    letter-spacing: -2px;
}

.register-heading p {
    margin: 0;
    color: var(--sub);
    font-size: 14px;
}

.form-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 7px 25px rgba(79, 54, 44, 0.035);
}

.form-card + .form-card {
    margin-top: 17px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 21px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 900;
}

.section-number {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    color: #fff;
    background: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.required-guide {
    margin: 0;
    color: #918781;
    font-size: 11px;
}

.required,
.required-guide span {
    color: var(--primary);
}

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

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 800;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    outline: none;
    background: #fff;
    color: var(--text);
    font-size: 13px;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 104, 72, 0.09);
}

.form-input::placeholder {
    color: var(--placeholder);
}

.form-input[readonly] {
    background: #faf9f8;
}

.form-help,
.form-message {
    min-height: 15px;
    margin: 5px 0 -3px;
    color: #9b928d;
    font-size: 10px;
}

.form-message.success {
    color: var(--success);
}

.form-message.error {
    color: #e2523b;
}

.password-wrap {
    position: relative;
}

.password-wrap .form-input {
    padding-right: 55px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    border: 0;
    background: transparent;
    color: #918781;
    font-size: 11px;
    transform: translateY(-50%);
}

.postcode-row {
    display: grid;
    grid-template-columns: minmax(0, 180px) 110px;
    gap: 9px;
}

.address-field {
    margin-top: 9px;
}

.phone-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px;
    gap: 9px;
}

.primary-small-btn {
    height: 48px;
    border: 0;
    border-radius: 11px;
    color: #fff;
    background: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.primary-small-btn.verified {
    background: var(--success);
}

.add-child-btn {
    height: 37px;
    padding: 0 14px;
    border: 1px solid #ffc4b4;
    border-radius: 20px;
    color: var(--primary);
    background: #fff;
    font-size: 12px;
    font-weight: 800;
}

.child-card {
    padding: 18px;
    border: 1px solid #f0ddd3;
    border-radius: 15px;
    background: #fffaf7;
}

.child-card + .child-card {
    margin-top: 15px;
}

.child-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 17px;
}

.remove-child-btn {
    padding: 5px 11px;
    border: 1px solid #f0d6cb;
    border-radius: 20px;
    color: #dd694e;
    background: #fff;
    font-size: 10px;
}

.toggle-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.toggle-btn {
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 24px;
    color: #817771;
    background: #fff;
}

.toggle-btn.active {
    border-color: #efc37d;
    color: #d47c3c;
    background: #fff0d4;
}

.therapy-area {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 20px;
    max-height: 300px;
    margin-top: 18px;
    padding-top: 17px;
    overflow: hidden;
    border-top: 1px dashed #ead7cc;
    transition: 0.25s;
}

.therapy-area.hidden {
    max-height: 0;
    margin-top: 0;
    padding-top: 0;
    border: 0;
    opacity: 0;
}

.therapy-item label {
    display: block;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 800;
}

.therapy-item label span {
    color: #999;
    font-size: 9px;
}

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

.chip {
    min-height: 31px;
    padding: 0 13px;
    border: 1px solid #f0d3a4;
    border-radius: 18px;
    color: #b97c43;
    background: #fff9ee;
    font-size: 11px;
}

.chip.active {
    border-color: #ecb55f;
    background: #ffe8bb;
}

.agreement-card {
    background: #fffefd;
}

.agree-all {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 17px;
    border-radius: 13px;
    background: #fff2ec;
    cursor: pointer;
}

.agree-all input,
.agreement-row input {
    width: 19px;
    height: 19px;
    margin: 0;
    accent-color: var(--primary);
}

.agree-all span {
    display: flex;
    flex-direction: column;
}

.agree-all strong {
    font-size: 14px;
}

.agree-all small {
    margin-top: 3px;
    color: #8f8580;
    font-size: 10px;
}

.agreement-list {
    margin-top: 12px;
}

.agreement-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 10px 3px;
    border-bottom: 1px solid #f0e9e5;
}

.agreement-row label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #655c57;
    font-size: 12px;
    line-height: 1.5;
    cursor: pointer;
}

.agreement-row strong {
    color: var(--primary);
}

.agreement-row em {
    color: #8b817b;
    font-style: normal;
    font-weight: 700;
}

.agreement-view {
    flex: 0 0 auto;
    border: 0;
    border-bottom: 1px solid #9a918c;
    color: #817771;
    background: transparent;
    font-size: 11px;
}

.register-btn {
    width: 100%;
    height: 58px;
    margin-top: 17px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #ff7352, #ff5d3e);
    font-size: 16px;
    font-weight: 900;
}

.policy-modal {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(31, 25, 22, 0.55);
}

.policy-modal.active {
    display: flex;
}

.policy-modal-box {
    width: min(100%, 560px);
    max-height: 80vh;
    padding: 22px;
    overflow-y: auto;
    border-radius: 18px;
    background: #fff;
}

.policy-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.policy-modal-head h3 {
    margin: 0;
    font-size: 20px;
}

.modal-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #f7f2ef;
    font-size: 22px;
}

.policy-modal-body {
    color: #625a56;
    font-size: 13px;
    line-height: 1.75;
}

.policy-modal-body h4 {
    margin: 18px 0 4px;
    color: #312b28;
}

.policy-warning {
    padding: 12px;
    border-radius: 10px;
    background: #fff2ec;
}

.modal-confirm {
    width: 100%;
    height: 48px;
    margin-top: 20px;
    border: 0;
    border-radius: 11px;
    color: #fff;
    background: var(--primary);
    font-weight: 800;
}

@media (max-width: 1050px) {
    .register-page {
        padding: 0;
    }

    .register-wrap {
        display: block;
        max-width: none;
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .register-side {
        display: none;
    }

    .register-top {
        justify-content: space-between;
        padding: 0 20px;
    }

    .mobile-brand {
        display: flex;
        gap: 7px;
        font-size: 18px;
    }

    .mobile-brand span {
        color: var(--primary);
    }

    .login-guide span {
        display: none;
    }
}

@media (max-width: 720px) {
    body,
    .register-main {
        background: var(--cream);
    }

    .register-content {
        padding: 25px 14px 30px;
    }

    .register-heading h1 {
        font-size: 31px;
    }

    .form-card {
        padding: 18px 14px;
        border-radius: 17px;
    }

    .form-grid,
    .child-grid,
    .therapy-area {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .register-content {
        padding-left: 10px;
        padding-right: 10px;
    }

    .postcode-row,
    .phone-row {
        grid-template-columns: 1fr;
    }

    .required-guide {
        display: none;
    }

    .agreement-row {
        align-items: flex-start;
    }

    .agreement-row label {
        font-size: 11px;
    }
}
