/* 서비스 이용약관 고도화 스타일 */

.terms-container {
    padding: 0 20px;
    background: #fff;
    min-height: 100vh;
}

.terms-content {
    max-width: 800px;
    /* 가독성을 위한 최적 너비 */
    margin: 0 auto;
    font-family: 'Noto Sans KR', sans-serif;
    color: #333;
}

.terms-body {
    padding: 0;
    line-height: 1.75;
    color: #444;
    font-size: 15px;
    word-break: keep-all;
    overflow-wrap: break-word;
    /* 긴 단어 대응 */
}

/* 장(Chapter) 스타일 */
.terms-body h2 {
    font-size: 22px;
    font-weight: 700;
    color: #6A34FF;
    margin: 20px 0 25px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #F3EEFF;
    letter-spacing: -0.02em;
}

/* 조(Article) 스타일 */
.terms-body b {
    display: block;
    font-size: 17px;
    font-weight: 700;
    color: #111;
    margin-top: 35px;
    margin-bottom: 15px;
    letter-spacing: -0.01em;
}

/* 리스트 스타일 고도화 */
.terms-body ol {
    margin: 10px 0;
    padding-left: 0;
    list-style-type: none;
}

.terms-body ol>li {
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
}

/* 1단계 리스트 아이템 간격 */
.terms-body>ol>li {
    margin-bottom: 20px;
}

/* 다단계 리스트 들여쓰기 - 계층 가시화 */
.terms-body ol ol {
    margin: 15px 0 15px 20px;
    padding-left: 15px;
    border-left: 1px solid #eee;
}

.terms-body ol ol>li {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

/* 약관 푸터 */
.terms-footer {
    margin-top: 80px;
    padding: 40px 0;
    border-top: 1px solid #eee;
}

.terms-footer p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

/* TOP 버튼 디자인 및 위치 수정 */
.top-button {
    position: fixed;
    /* 전체 화면 중앙에서 860px 너비(왼쪽360+오른쪽500)의 레이아웃 우측 끝에 위치하도록 계산 */
    right: calc(50% - 430px + 20px);
    bottom: 40px;
    width: 56px;
    height: 56px;
    background: #6A34FF;
    color: white;
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 8px 16px rgba(106, 52, 255, 0.25);
}

.top-button.show {
    opacity: 1;
    visibility: visible;
}

.top-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(106, 52, 255, 0.35);
    background: #5627E0;
}

.top-button i {
    font-size: 18px;
    margin-bottom: 2px;
}

.top-button span {
    font-size: 10px;
    font-weight: 700;
}

/* 화면 너비가 작아져서 전체 레이아웃이 화면 우측에 붙을 경우 대응 */
@media (max-width: 800px) {
    .top-button {
        right: 20px;
    }
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .terms-container {
        padding: 40px 16px;
    }

    .terms-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .terms-body h2 {
        font-size: 19px;
        margin-top: 40px;
    }

    .terms-body b {
        font-size: 16px;
        margin-top: 25px;
    }

    .top-button {
        right: 15px;
        bottom: 20px;
        width: 48px;
        height: 48px;
    }
}