diff --git a/frontend/src/styles/global.css b/frontend/src/styles/global.css index 8466e39..4e44980 100644 --- a/frontend/src/styles/global.css +++ b/frontend/src/styles/global.css @@ -1481,7 +1481,7 @@ inline-code, .icode { .helper-fab { position: fixed; right: 24px; - bottom: 24px; + bottom: calc(24px + env(safe-area-inset-bottom, 0px)); /* 아이폰 홈바 위로 */ width: 56px; height: 56px; border-radius: 50%; @@ -1500,11 +1500,15 @@ inline-code, .icode { .helper-panel { position: fixed; right: 24px; - bottom: 92px; + /* 아이폰 홈바(safe-area)만큼 띄운다. env 미지원 브라우저는 fallback 0. */ + bottom: calc(92px + env(safe-area-inset-bottom, 0px)); width: 360px; max-width: calc(100vw - 32px); height: 480px; + /* ⚠️ 사파리는 100vh에 주소창 높이가 포함돼 패널이 화면 밖으로 밀린다. + dvh(동적 뷰포트)는 실제 보이는 높이라 사파리에서 정확하다. 미지원 브라우저는 vh로 폴백. */ max-height: calc(100vh - 140px); + max-height: calc(100dvh - 140px); background: var(--bg); border: 1px solid var(--line); border-radius: 16px; @@ -1531,7 +1535,9 @@ inline-code, .icode { } .helper-body { flex: 1; + min-height: 0; overflow-y: auto; + overflow-x: hidden; /* 가로 스크롤 차단 */ padding: 14px 16px; display: flex; flex-direction: column; @@ -1548,6 +1554,8 @@ inline-code, .icode { font-size: 14px; line-height: 1.6; white-space: pre-wrap; + overflow-wrap: anywhere; /* 긴 코드 줄이 패널을 넘어 가로 스크롤을 만드는 것 방지 */ + min-width: 0; max-width: 85%; } .helper-user {