/* 기본 레이아웃: 모바일 뷰포트 문제(주소창 높이 등)를 피하려면 dvh 사용 */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    background-color: #ffffff;
    box-sizing: border-box;
    font-family: sans-serif;
    font-size: clamp(14px, 4.4vw, 25px);
    font-family: "Noto Sans KR", sans-serif;
}

/* 페이지 전체를 최소 화면 높이로 채우도록 하고, safe-area는 내부 요소에서 처리 */
.page-container {
    width: 100%;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: #ffffff;
}

/* Top App Bar */
/* Top App Bar: fixed 대신 normal flow에 두고 내부 패딩으로 safe-area 지원 */
.app-bar {
    position: relative;
    left: 0;
    right: 0;
    height: 3.75rem; /* 내부 패딩 포함한 높이(디자인 여유) */
    background-color: #f1f3fd;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: calc(0.5rem + env(safe-area-inset-top)) 0.25rem 0.5rem 0.25rem;
}

.back-button {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    background: transparent;
    border-radius: 100px;
    transition: opacity 0.2s;
}

.back-button:hover {
    opacity: 0.8;
}

.back-icon-wrapper {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
}

.app-bar-title {
    flex: 1;
    height: 1.75rem;
    font-size: 1.5rem;
    line-height: 1.75rem;
    color: #191c20;
    font-weight: 400;
    display: flex;
    align-items: center;
}

/* Body Container */
/* Body는 문서 흐름에서 앱바 아래에 위치하도록 변경하여 절대 위치로 인한 레이아웃 문제 제거 */
.body-container {
    position: relative;
    margin-top: 0; /* 앱바가 문서 흐름에 있으므로 별도 마진을 줄 필요 없음 */
    left: 0;
    right: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem 1rem calc(1.5rem + env(safe-area-inset-bottom)) 1rem; /* 상단 패딩을 줄여 콘텐츠가 너무 아래로 내려가지 않게 함 */
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 1rem;
}

.content-center {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; /* 가로 중앙 정렬 유지 */
    justify-content: flex-start; /* 세로는 상단 정렬 */
}

.inner-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    padding: 2rem 0.5rem;
}

/* Primary button */
.primary-button {
    display: flex;
    flex-direction: column;
    font-size: 1.375rem;
    gap: 0.5rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 100px;
    background-color: #3d5f90;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, background-color 0.2s;
    padding: 0;
}

.primary-button:hover:not(.disabled) {
    background-color: #2a4467;
}

.primary-button.disabled {
    background-color: #9bb0c9 !important;
    pointer-events: none;
    opacity: 0.7;
}

.button-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.button-inner {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.5rem;
    width: 100%;
    height: 100%;
}

.button-text {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.25rem;
    color: #ffffff;
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.125rem;
}

/* Description */
.description {
    width: 100%;
    font-size: 1rem;
    line-height: 1.5rem;
    color: #181c22;
    text-align: center;
    letter-spacing: 0.05rem;
    font-weight: 400;
}

.description strong {
    font-weight: 700;
}
