@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard-gov.min.css");

img{
    width: 100%;
    height: 100%;
    -webkit-user-drag: none;
    user-select: none;
}

*{
    font-family: "Pretendard GOV Variable", "Pretendard GOV", -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0;
    word-break: keep-all;
    line-height: 1.4;
}

.title {
    font-weight: 600;
    font-size: 22px;
}

.subtitle {
    font-weight: 500;
    font-size: 16px;
}

.subtitle-400 {
    font-weight: 400;
    font-size: 16px;
}

.title-large {
    font-weight: 800;
    font-size: 18px;
}

.text-small {
    font-weight: 400;
    font-size: 12px;
}

.text {
    font-weight: 400;
    font-size: 14px;
}

.text-medium {
    font-weight: 500;
    font-size: 14px;
}

.color01{
    color: #111111;
}
.color02{
    color: #505050;
}
.color03{
    color: #00715B;
}
.color04{
    color: #FF0000;
}
.color05{
    color: #777777;
}
.color06{
    color: #FFFFFF;
}

.underline {
    text-decoration: underline;
}

.text-center {
    text-align: center;
}

/* Mobile */
.container {
    padding: 20px;
    max-width: 650px; /* limit width */
    margin-left: auto; /* center on large screens */
    margin-right: auto;
    width: 100%;
}
/* Mobile End */

/* Header logo visibility */
.header img{
    width: auto;
    height: auto;
}
.header .pc{ display: none; }
.header .mobile{ display: block; width: 52px; }

.header {
    border-bottom: 1px solid #D8D8D8;
    padding-bottom: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-content {
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info[style*="display: none"] {
    display: none !important;
}

.user-name {
    font-size: 14px;
    color: #505050;
    font-weight: 500;
}

.logout-btn {
    background: transparent;
    border: 1px solid #D8D8D8;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    color: #505050;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: #F5F5F5;
    border-color: #00715B;
    color: #00715B;
}

.logout-btn:active {
    transform: translateY(1px);
}
.footer{
    border-top: 1px solid #D8D8D8;
    padding-top: 12px;
    margin-top: 24px;
}

/* Content: Info box (top guide) */
.info-box{
    border: 1px solid #00715B;
    border-radius: 6px;
    padding: 16px;
}

.main {
    margin-bottom: 24px;
}

.margin01{
    margin-bottom: 4px;
}
.margin02{
    margin-bottom: 8px;
}
.margin03{
    margin-bottom: 12px;
}
.margin04{
    margin-bottom: 16px;
    position: relative;
}
.margin05{
    margin-bottom: 20px;
}
.margin06{
    margin-bottom: 24px;
}

/* Terms Dropdown Styles */
.terms-wrapper{
    width: 100%;
}

.terms-toggle{
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    width: 100%;
    height: 46px;
    background: #B7CEC9;
    border: 1px solid #E5E5E5;
    border-radius: 6px;
    cursor: pointer;
}
.terms-toggle-left{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}
.terms-toggle .empty-checkbox,
.terms-toggle .checked-checkbox{
    width: 30px;
    height: 30px;
}
.terms-toggle .arrow-icon{
    width: 20px;
    height: 20px;
    transition: transform .2s ease;
}
.terms-toggle[data-folded="true"] .arrow-icon{
    transform: rotate(180deg);
}

.terms-content{
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 8px;
    background: #ffffff;
    border: 1px solid #E5E5E5;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height .28s ease, opacity .28s ease, padding .28s ease;
}
.terms-toggle[data-folded="false"] + .terms-content{
    max-height: none;
    opacity: 1;
    padding: 12px 8px;
}

.terms-item{ display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.terms-item .item{ display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.terms-item .checkbox-item.empty-checkbox,
.terms-item .checkbox-item.checked-checkbox{ width: 24px; height: 24px; }

/* Checkbox state via class */
.item .checked-checkbox{ display: none; }
.item.is-checked .checked-checkbox{ display: inline-block; }
.item.is-checked .empty-checkbox{ display: none; }

/* terms link-like button */
.terms-item button{
    background: transparent;
    border: 0;
    padding: 0;
}

/* Terms detail (약관보기 펼침) */
.terms-detail{
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .28s ease, opacity .28s ease;
    padding-left: 20px;
    padding-right: 10px;
}
.terms-detail.open{
    opacity: 1;
}

.section-line{
    width: 100%;
    height: 1px;
    background: #00715B;
}

/* Section title rows (icon + title on one line) */
.section-title-row{
    display: flex;
    align-items: center;
}
.section-title-row > img{
    width: 24px;
    height: 24px;
    margin-right: 4px;
    flex-shrink: 0;
}
.section-title-row > .title-large{ margin: 0; }

/* Inputs - base and focus (Figma spec) */
input[type="text"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="email"],
input[type="password"],
select,
textarea{
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 12px;
    gap: 10px;
    width: 100%;
    height: 44px;
    background: #FFFFFF;
    border: 1px solid #D8D8D8;
    border-radius: 6px;
}

input::placeholder,
textarea::placeholder{
    color: #777777;
}

input:focus,
select:focus,
textarea:focus{
    outline: none;
    border-color: #00715B;
}

/* Resident registration number split */
.rrn-row{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}
.rrn-row .rrn-input{
    flex: 1 1 0;
    width: 100%;
}
.rrn-row .rrn-hyphen{ color: #505050; }

/* Input with right icon (주소 검색) */
.input-with-icon{ position: relative; }
.input-with-icon input{
    padding: 12px 8px 12px 12px;
}
.input-with-icon .icon{
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px; height: 20px;
    pointer-events: auto;
    cursor: pointer;
}

/* Gender selector: one-line, 30px icons, 4px icon margin, 8px gap between options */
.gender-row{ display:flex; align-items:center; }
.gender-option{ display:inline-flex; align-items:center; cursor:pointer; }
.gender-option + .gender-option{ margin-left: 8px; }
.gender-option .radio{ width:30px; height:30px; margin-right:4px; }
.gender-option .checked{ display:none; }
.gender-option.is-checked .checked{ display:inline-block; }
.gender-option.is-checked .empty{ display:none; }

/* Select with custom arrow (30px width, right margin 8px) */
.select-with-arrow{ position: relative; }
.select-with-arrow select{
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    width: 100%;
    padding-right: 48px;
}
.select-with-arrow .select-arrow{
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 30px; height: auto; pointer-events: none;
}

/* Native date icon alignment */
.date-native{ position: relative; overflow: visible; }
.date-native input[type="date"]{
    width: 100%;
    box-sizing: border-box;
    padding: 10px 40px 10px 12px; /* 상하 패딩으로 라인높이 대신 처리 */
    height: 44px;
    line-height: normal;
    font-size: 16px; /* iOS 줌 방지 */
    -webkit-appearance: none;
            appearance: none;
    border: 1px solid #D8D8D8;
    border-radius: 6px;
    background-color: #fff;
}
.date-native input[type="date"]::-webkit-calendar-picker-indicator{
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; margin: 0; padding: 0;
}

/* iOS Safari 보정 */
@supports (-webkit-touch-callout: none) {
  .date-native input[type="date"]{
    height: 44px; line-height: normal; font-size: 16px;
  }
}
.date-native input[type="date"]::-webkit-calendar-picker-indicator{
    width: 15px; height: 15px; margin: 0; padding: 0; cursor: pointer;
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
}

/* Submit button states */
.primary-btn{
    display: flex; flex-direction: row; justify-content: center; align-items: center;
    padding: 16px; gap: 10px; width: 100%; height: 54px; border-radius: 6px; border: none;
    color: #FFFFFF; font-weight: 600; font-size: 16px; background: rgba(0,113,91,.4);
}
.primary-btn:disabled{ background: rgba(0,113,91,.4); cursor: not-allowed; }
.primary-btn:not(:disabled){ background: #00715B; cursor: pointer; }
.primary-btn:not(:disabled):active{ transform: translateY(1px); }

/* Pointer cursor for interactive elements */
button, .gender-option, .terms-toggle, .terms-item .underline, .signature-clear { cursor: pointer; }

/* Signature pad */
.signature-pad{
    position: relative;
    box-sizing: border-box;
    width: 100%;
    height: 140px;
    background: #FAFAFA;
    border: 1px solid #00715B;
    border-radius: 6px;
    z-index: 1;
    overflow: hidden;
}
.signature-pad canvas{
    width: 100%;
    height: 100%;
    display: block;
}
.signature-clear{
    position: absolute;
    top: 8px;
    right: 12px;
    cursor: pointer;
}

/* Error and status messages */
.error-message {
    background: #FFE0E0;
    color: #FF0000;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.status-message {
    background: #E8F5F1;
    color: #00715B;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* Autocomplete list */
.autocomplete-list {
    display: none;
    position: absolute;
    top: 70px;
    left: 0px;
    right: 0px;
    background: white;
    border: 1px solid #D8D8D8;
    border-top: 1px solid #D8D8D8;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.autocomplete-item {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #E5E5E5;
    font-size: 14px;
}

.autocomplete-item:hover {
    background: #F5F5F5;
}

/* Important label: inline flex, icon + text */
.text-medium.color04 {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.text-medium.color04 img {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.terms-detail p {
    white-space: pre-line;
  }