/* 체험 모드: 하단 네비 바로 위 메뉴 안내 박스 (콘텐츠 영역 폭 기준) */
.demo-nav-guide-panel {
    bottom: calc(var(--app-bottom-nav-h) + var(--safe-bottom) + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: var(--app-bottom-bar-width);
    max-width: var(--app-bottom-bar-width);
    max-height: calc(100vh - 120px - var(--safe-bottom));
    box-sizing: border-box;
}

.bottom-nav {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 0;
    transform: translateX(-50%);
    width: var(--app-bottom-bar-width);
    max-width: var(--app-bottom-bar-width);
    height: calc(var(--app-bottom-nav-h) + var(--safe-bottom));
    box-sizing: border-box;
    padding: 6px 4px calc(8px + var(--safe-bottom));
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: none;
    border-top: 1px solid var(--line);
    border-radius: 0;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: stretch;
    justify-content: stretch;
    gap: 0;
    z-index: var(--z-app-chrome);
    box-shadow: none;
    transition: transform 0.25s ease-out;
}
.bottom-nav .nav-item {
    border: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 0 0;
    margin: 0;
    -webkit-tap-highlight-color: transparent;
}
.bottom-nav .nav-item i {
    font-size: 20px;
    line-height: 1;
}
.bottom-nav .nav-item .nav-item__label {
    line-height: 1.1;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.bottom-nav .nav-item.active {
    color: var(--ink, #241f1c);
}
/* 아이콘 슬롯 높이 고정 — 전 탭 동일 세로 리듬 */
.bottom-nav .nav-item .nav-item__icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 36px;
    flex-shrink: 0;
    overflow: visible;
}
/* 업데이트·가이드 레드닷: wrap이 전폭이라 -right가 칸 끝에 붙음 → 중앙 아이콘 우상단으로 고정 */
.bottom-nav .nav-item .nav-item__icon-wrap > .nav-feed-update-dot,
.bottom-nav .nav-item .nav-item__icon-wrap > .demo-nav-guide-dot,
.bottom-nav .nav-item .nav-item__icon-wrap > .period-report-update-dot {
    top: 4px;
    right: auto;
    left: calc(50% + 0.45rem);
    transform: none;
}
/*
 * 사진을 등록하면 이 원이 곧 프로필이라 다른 탭의 선 아이콘(1.375rem)보다 커야 읽힌다.
 * 슬롯(.nav-item__icon-wrap)이 36px 로 고정이고 flex-shrink:0 이라, 그 안에 들어가는
 * 34px 까지는 **네비 높이도 세로 리듬도 변하지 않는다.** 더 키우려면 슬롯을 함께 봐야 한다.
 */
.bottom-nav .nav-item .nav-item__avatar {
    width: 2.125rem;
    height: 2.125rem;
    border-radius: 9999px;
    /* overflow:hidden 이면 box-shadow가 잘림 — 배경은 border-radius로 원형 유지 */
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--avatar-fallback-bg, var(--green-soft));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid var(--green-mute, #b4e2cd);
    font-family: var(--avatar-fallback-font);
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--avatar-fallback-fg, var(--green-deep));
    flex-shrink: 0;
    box-shadow: var(--avatar-shadow);
    line-height: 1;
    isolation: isolate;
}
.bottom-nav .nav-item .nav-item__avatar--initial {
    font-family: var(--avatar-fallback-font);
    font-size: 1.125rem;
    font-weight: 700;
}
.bottom-nav .nav-item.active .nav-item__avatar {
    border-color: var(--ink, #241f1c);
}
/* 스크롤 아래로: 하단 네비 숨김 → 뷰포트 하단을 콘텐츠에 양보 (배경 채움 금지).
 * 밀톡 패널은 아래 board-* 규칙이 inset/padding을 줄임. 윈도우 스크롤 탭은 body padding·FAB·모먼트 도크를 함께 내림. */
#navigationBarOverlay {
    transition: background-color 0.2s ease;
}
body.bottom-nav-scroll-hidden .bottom-nav {
    transform: translateX(-50%) translateY(100%);
}
/* 네비 슬롯(~72px)만큼 하단 여백 축소 — 콘텐츠가 아래까지 이어짐. --safe-bottom(nav-slot)만 유지 */
body.bottom-nav-scroll-hidden {
    padding-bottom: calc(12px + var(--safe-bottom));
    --moment-v2-app-nav-top-from-bottom: var(--safe-bottom);
}
body.bottom-nav-scroll-hidden #entryQuickInputFab.entry-quick-input-fab,
body.bottom-nav-scroll-hidden #boardWriteBtn.board-write-fab,
body.bottom-nav-scroll-hidden #mealSyncResendBtn.meal-sync-resend-fab,
body.bottom-nav-scroll-hidden #initialRecordsLoadFab.initial-records-load-fab,
body.bottom-nav-scroll-hidden #galleryMomentsRefreshFab.initial-records-load-fab,
body.bottom-nav-scroll-hidden #timelineRefreshFab.initial-records-load-fab {
    bottom: calc(12px + var(--safe-bottom));
}
/* 글쓰기 FAB 위에 얹힌 동기화/로딩 FAB — 네비 숨김 시에도 한 단만 위로 */
body.bottom-nav-scroll-hidden #initialRecordsLoadFab.initial-records-load-fab.initial-records-load-fab--stacked,
body.bottom-nav-scroll-hidden #mealSyncResendBtn.meal-sync-resend-fab.meal-sync-resend-fab--stacked {
    bottom: calc(68px + var(--safe-bottom));
}
/* 모먼트 사진 휠 오버레이: 타이틀 헤더 위로·하단 앱 네비 아래로 */
body.meal-photo-moment-chrome-hidden #mainAppHeader {
    transform: translateY(-100%);
}
body.meal-photo-moment-chrome-hidden .bottom-nav {
    transform: translateX(-50%) translateY(100%);
}
.prop-bar-container { 
    height: 28px; 
    border-radius: 8px; 
    overflow: hidden; 
    display: flex; 
    background: #f1f5f9; 
}
.prop-segment { 
    height: 100%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 10px; 
    font-weight: 800; 
    color: white; 
}

/* 끼니 등록 모달: flex 중앙정렬 사용 금지 — 패널 absolute top만으로 Y 결정
 * display는 :not(.hidden)에만 — #entryModal{display:block}이면 .hidden을 덮어 항상 노출됨 */
#entryModal {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
}
#entryModal:not(.hidden) {
    display: block;
}
#entryModal.keyboard-open {
    /* 좌우 여백은 유지 — 전체 폭으로 붙이며 레이아웃이 튀는 것 방지 */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
/* overlay: 기록시트 모달 VV 직접 핀(is-ime-open) 또는 루트 시프트 프레임 */
#entryModal.keyboard-open.is-ime-open,
html.ime-root-shifted #entryModal.keyboard-open {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    overflow: hidden;
    box-sizing: border-box;
}
#entryModal > .entry-modal-panel {
    background: var(--card);
    position: absolute !important;
    top: var(--entry-sheet-top, 1rem) !important;
    bottom: auto !important;
    left: 0;
    right: 0;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: auto;
    margin-right: auto;
    /* 높이·top은 JS가 px로 잠금. 상한은 뷰포트 80% */
    height: var(--entry-sheet-h, auto);
    max-height: min(80vh, calc(100% - var(--entry-sheet-top, 1rem) - max(1rem, var(--safe-bottom-gesture))));
    min-height: var(--entry-sheet-min-h, 0px);
}
/* 키보드 열림: JS가 --entry-sheet-top을 상단으로 낮춰 콘텐츠 영역 확보 */
#entryModal.keyboard-open > .entry-modal-panel {
    top: var(--entry-sheet-top, 1rem) !important;
    max-height: calc(100% - var(--entry-sheet-top, 1rem) - 0.5rem);
}
/* 핀/시프트된 모달 안: 패널 상한은 모달 100% 기준 */
#entryModal.keyboard-open.is-ime-open > .entry-modal-panel,
html.ime-root-shifted #entryModal.keyboard-open > .entry-modal-panel {
    max-height: calc(100% - var(--entry-sheet-top, 0.5rem) - 0.25rem) !important;
}
#modalScrollArea {
    /* 패널 높이 잠금(--entry-sheet-h) 시 남는 공간을 흡수, 메모 확장은 이 영역 스크롤로 처리 */
    flex: 1 1 0%;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    /* 세로 스크롤은 네이티브, 가로 스와이프는 탭 전환(JS) */
    touch-action: pan-y;
    /* 포커스·scroll-into-view 시 입력창 상단이 스크롤 영역 상단에서 약 50px 아래에 오도록 */
    scroll-padding-top: max(50px, env(safe-area-inset-top, 0px));
    scroll-padding-bottom: 1rem;
}
/* 팝업·시트 스크롤바: 최대한 눈에 덜 띄는 얇은 트랙 */
#modalScrollArea,
#entrySlotPickerList,
#dailyJournalModalScrollArea,
#dietReportModalBody,
#detailContent,
#contentPopupModalBody,
#notificationList,
#boardWriteContent,
.profile-v2-scroll,
.entry-sheet-body,
[id$='Modal'] .overflow-y-auto,
[id$='Popup'] .overflow-y-auto,
[class*='Modal'] .overflow-y-auto {
    scrollbar-width: thin;
    scrollbar-color: rgba(36, 31, 28, 0.16) transparent;
}
#modalScrollArea::-webkit-scrollbar,
#entrySlotPickerList::-webkit-scrollbar,
#dailyJournalModalScrollArea::-webkit-scrollbar,
#dietReportModalBody::-webkit-scrollbar,
#detailContent::-webkit-scrollbar,
#contentPopupModalBody::-webkit-scrollbar,
#notificationList::-webkit-scrollbar,
#boardWriteContent::-webkit-scrollbar,
.profile-v2-scroll::-webkit-scrollbar,
.entry-sheet-body::-webkit-scrollbar,
[id$='Modal'] .overflow-y-auto::-webkit-scrollbar,
[id$='Popup'] .overflow-y-auto::-webkit-scrollbar,
[class*='Modal'] .overflow-y-auto::-webkit-scrollbar {
    width: 3px;
    height: 3px;
}
#modalScrollArea::-webkit-scrollbar-track,
#entrySlotPickerList::-webkit-scrollbar-track,
#dailyJournalModalScrollArea::-webkit-scrollbar-track,
#dietReportModalBody::-webkit-scrollbar-track,
#detailContent::-webkit-scrollbar-track,
#contentPopupModalBody::-webkit-scrollbar-track,
#notificationList::-webkit-scrollbar-track,
#boardWriteContent::-webkit-scrollbar-track,
.profile-v2-scroll::-webkit-scrollbar-track,
.entry-sheet-body::-webkit-scrollbar-track,
[id$='Modal'] .overflow-y-auto::-webkit-scrollbar-track,
[id$='Popup'] .overflow-y-auto::-webkit-scrollbar-track,
[class*='Modal'] .overflow-y-auto::-webkit-scrollbar-track {
    background: transparent;
}
#modalScrollArea::-webkit-scrollbar-thumb,
#entrySlotPickerList::-webkit-scrollbar-thumb,
#dailyJournalModalScrollArea::-webkit-scrollbar-thumb,
#dietReportModalBody::-webkit-scrollbar-thumb,
#detailContent::-webkit-scrollbar-thumb,
#contentPopupModalBody::-webkit-scrollbar-thumb,
#notificationList::-webkit-scrollbar-thumb,
#boardWriteContent::-webkit-scrollbar-thumb,
.profile-v2-scroll::-webkit-scrollbar-thumb,
.entry-sheet-body::-webkit-scrollbar-thumb,
[id$='Modal'] .overflow-y-auto::-webkit-scrollbar-thumb,
[id$='Popup'] .overflow-y-auto::-webkit-scrollbar-thumb,
[class*='Modal'] .overflow-y-auto::-webkit-scrollbar-thumb {
    background: rgba(36, 31, 28, 0.16);
    border-radius: 999px;
}
#modalScrollArea::-webkit-scrollbar-thumb:hover,
#entrySlotPickerList::-webkit-scrollbar-thumb:hover,
#dailyJournalModalScrollArea::-webkit-scrollbar-thumb:hover,
#dietReportModalBody::-webkit-scrollbar-thumb:hover,
#detailContent::-webkit-scrollbar-thumb:hover,
#contentPopupModalBody::-webkit-scrollbar-thumb:hover,
#notificationList::-webkit-scrollbar-thumb:hover,
#boardWriteContent::-webkit-scrollbar-thumb:hover,
.profile-v2-scroll::-webkit-scrollbar-thumb:hover,
.entry-sheet-body::-webkit-scrollbar-thumb:hover,
[id$='Modal'] .overflow-y-auto::-webkit-scrollbar-thumb:hover,
[id$='Popup'] .overflow-y-auto::-webkit-scrollbar-thumb:hover,
[class*='Modal'] .overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: rgba(36, 31, 28, 0.28);
}
#entryModal #modalScrollArea input[type="text"],
#entryModal #modalScrollArea input[type="search"],
#entryModal #modalScrollArea textarea {
    /* 과도한 scroll-margin은 포커스 시 스크롤 점프·팝업 흔들림을 키움 */
    scroll-margin-top: 0.5rem;
    scroll-margin-bottom: 0.5rem;
}
/* 기록 모달 열림(entry-modal-open은 JS에서 토글): 네비는 가려지므로 액션 패딩에 바 높이를 이중으로 넣지 않음 */
body.entry-modal-open .bottom-nav,
body.entry-modal-open #navigationBarOverlay,
body.entry-modal-open #mealSyncResendBtn.meal-sync-resend-fab,
body.entry-modal-open #entryQuickInputFab.entry-quick-input-fab,
body.entry-modal-open #initialRecordsLoadFab.initial-records-load-fab,
body.entry-modal-open #galleryMomentsRefreshFab.initial-records-load-fab,
body.entry-modal-open #timelineRefreshFab.initial-records-load-fab,
body:has(#entrySlotPickerModal:not(.hidden)) .bottom-nav,
body:has(#entrySlotPickerModal:not(.hidden)) #navigationBarOverlay,
body:has(#entrySlotPickerModal:not(.hidden)) #mealSyncResendBtn.meal-sync-resend-fab,
body:has(#entrySlotPickerModal:not(.hidden)) #entryQuickInputFab.entry-quick-input-fab {
    visibility: hidden !important;
    pointer-events: none !important;
}
/* 하단 버튼 영역: 상·하 여백 대칭 */
#entryModalActions {
    padding-top: 16px !important;
}
/* 센터 팝업: 하단 세이프는 소량만 (시트처럼 홈 인디케이터에 붙지 않음) */
html:not(.platform-web) #entryModal:not(.keyboard-open) #entryModalActions {
    padding-bottom: 16px !important;
}
html.platform-web #entryModal:not(.keyboard-open) #entryModalActions {
    padding-bottom: 16px !important;
}
/* 키보드 열림: nav·CTA는 JS가 #modalScrollArea 끝으로 옮겨 스크롤로 노출 */
#entryModal.keyboard-open #modalScrollArea {
    padding-bottom: 0 !important;
    /* 중간 필드 포커스 시에도 CTA까지 스크롤 여유 */
    scroll-padding-bottom: 5.5rem;
}
#entryModal.keyboard-open #modalScrollArea > #entrySheetNavBar {
    margin-top: 0.75rem;
}
#entryModal.keyboard-open #modalScrollArea > #entryModalActions {
    margin-top: 0.25rem;
}
/* 저장 중: 스크롤 영역·액션 버튼 비활성 (모달은 열린 채 스피너 표시) */
#entryModal.entry-modal-saving #modalScrollArea {
    pointer-events: none;
    opacity: 0.72;
}
#entryModal.entry-modal-saving #entryModalActions button:not(#btnSave) {
    pointer-events: none;
    opacity: 0.45;
}
#entryModal.entry-modal-saving #btnSave {
    cursor: wait;
}
/* 하루 소감 모달: 기록시트와 동일 센터 팝업 */
#dailyJournalModal > .daily-journal-modal-panel {
    background: var(--card);
    max-height: min(88vh, 100%);
    min-height: 0;
}
html:not(.platform-web) #dailyJournalModal #dailyJournalModalActions {
    padding-bottom: calc(16px + var(--safe-bottom-gesture)) !important;
}
html.platform-web #dailyJournalModal #dailyJournalModalActions {
    padding-bottom: calc(16px + var(--safe-bottom-gesture)) !important;
}
body.daily-journal-modal-open .bottom-nav,
body.daily-journal-modal-open #navigationBarOverlay,
body.daily-journal-modal-open #mealSyncResendBtn.meal-sync-resend-fab,
body.daily-journal-modal-open #entryQuickInputFab.entry-quick-input-fab,
body.daily-journal-modal-open #initialRecordsLoadFab.initial-records-load-fab,
body.daily-journal-modal-open #galleryMomentsRefreshFab.initial-records-load-fab,
body.daily-journal-modal-open #timelineRefreshFab.initial-records-load-fab {
    visibility: hidden !important;
    pointer-events: none !important;
}
#dailyJournalModal .daily-journal-metrics-stack {
    border-bottom: 1px solid var(--entry-border-row, #eef2f0);
    background: var(--entry-surface);
}
/* 체중·혈당 입력 행 — 측정값 + 시간 2열, 삭제는 우측 */
#dailyJournalModal .daily-journal-metric-row {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.625rem 0.625rem 0.625rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.875rem;
    background: #fff;
    box-sizing: border-box;
}
#dailyJournalModal .daily-journal-metric-row__main {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 0.5rem 0.625rem;
    align-items: end;
}
#dailyJournalModal .daily-journal-metric-field-label {
    display: block;
    margin: 0 0 0.3rem 0.1rem;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
    line-height: 1;
}
#dailyJournalModal .daily-journal-metric-value-wrap,
#dailyJournalModal .daily-journal-metric-time-block {
    min-width: 0;
}
#dailyJournalModal .daily-journal-metric-value-field {
    display: flex;
    align-items: stretch;
    min-height: 2.625rem;
    overflow: hidden;
    border: 1.5px solid #cbd5e1;
    border-radius: 0.625rem;
    background: #fff;
}
#dailyJournalModal .daily-journal-metric-value-field:focus-within {
    border-color: var(--green, #3cb889);
    box-shadow: 0 0 0 2px var(--entry-accent-ring, rgb(60 184 137 / 0.22));
}
#dailyJournalModal .daily-journal-metric-value {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    padding: 0.55rem 0.35rem 0.55rem 0.7rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #0f172a;
    font-size: 0.9375rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
    outline: none;
}
#dailyJournalModal .daily-journal-metric-value:focus {
    box-shadow: none;
}
#dailyJournalModal .daily-journal-metric-unit {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    padding: 0 0.65rem 0 0.25rem;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
}
#dailyJournalModal .daily-journal-metric-value::placeholder,
#dailyJournalModal .daily-journal-metric-time::placeholder {
    color: #94a3b8;
    font-weight: 500;
}
#dailyJournalModal .daily-journal-metric-time-wrap {
    display: flex;
    align-items: stretch;
    min-height: 2.625rem;
    min-width: 0;
    overflow: hidden;
    border: 1.5px solid #cbd5e1;
    border-radius: 0.625rem;
    background: #fff;
}
#dailyJournalModal .daily-journal-metric-ampm {
    flex: 0 0 3.75rem;
    width: 3.75rem;
    max-width: none;
    padding: 0.45rem 0.2rem;
    border: 0;
    border-right: 1.5px solid #cbd5e1;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.8125rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}
#dailyJournalModal .daily-journal-metric-time {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.55rem 0.65rem;
    border: 0;
    background: #fff;
    color: #0f172a;
    font-size: 0.9375rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
    outline: none;
}
#dailyJournalModal .daily-journal-metric-time:focus,
#dailyJournalModal .daily-journal-metric-ampm:focus {
    background: #fff;
}
#dailyJournalModal .daily-journal-metric-time-wrap:focus-within {
    border-color: var(--green, #3cb889);
    box-shadow: 0 0 0 2px var(--entry-accent-ring, rgb(60 184 137 / 0.22));
}
#dailyJournalModal .daily-journal-metric-ampm:focus {
    background: #eef2f7;
}
#dailyJournalModal .daily-journal-metric-remove {
    display: inline-flex;
    flex-shrink: 0;
    align-self: center;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-top: 0.95rem;
    border: 0;
    border-radius: 0.5rem;
    color: #94a3b8;
    background: transparent;
}
#dailyJournalModal .daily-journal-metric-remove:hover {
    background: #f1f5f9;
    color: #475569;
}
#dailyJournalModal .daily-journal-metric-remove:active {
    background: #e2e8f0;
}
#dailyJournalModal .daily-journal-metric-remove [data-lucide],
#dailyJournalModal .daily-journal-metric-remove .lucide {
    width: 0.875rem;
    height: 0.875rem;
}
@media (max-width: 360px) {
    #dailyJournalModal .daily-journal-metric-row__main {
        grid-template-columns: 1fr;
    }
    #dailyJournalModal .daily-journal-metric-remove {
        margin-top: 0;
        align-self: flex-start;
    }
}
/* 메모: 식사기록과 동일 색·테두리, 하루 소감만 기본 높이 여유 */
#dailyJournalModal .entry-sheet-zone--memo {
    background: var(--entry-surface-band);
}
#dailyJournalModal #dailyJournalCommentInput.entry-comment-textarea {
    background: var(--entry-input-bg);
    border: 1px solid var(--entry-border, #d0c6ba);
    border-radius: var(--entry-radius);
    color: var(--entry-text-primary);
    min-height: 7rem;
    max-height: none;
    height: auto;
    resize: vertical;
    white-space: pre-wrap;
    text-overflow: clip;
    overflow-y: auto;
}
#dailyJournalModal #dailyJournalCommentInput.entry-comment-textarea:focus {
    background: var(--entry-input-bg-focus);
    border-color: var(--entry-accent);
    box-shadow: 0 0 0 3px var(--entry-accent-ring);
}
#dailyJournalModal #dailyJournalCommentInput.entry-comment-textarea::placeholder {
    color: var(--entry-placeholder);
    font-weight: 500;
}
/* 모먼트 피드: 사진 탭 시 확대(라이트박스) 가능함을 표시 */
#galleryContainer .moment-feed-photo {
    cursor: zoom-in;
}
/* 모먼트 피드: 로드 완료 전 고정 슬롯만, 로드 완료 후 이미지 노출 (스피너 없음) */
#galleryContainer img.moment-feed-photo:not(.loaded) {
    opacity: 0 !important;
    visibility: hidden !important;
}
/* 캡처 공유 PNG(h-auto): 로드 전 3:4 플레이스홀더로 영역 확보 */
#galleryContainer .moment-v2-photo-surface--capture-share:not(:has(> img.moment-feed-photo.loaded)) {
    aspect-ratio: 3 / 4;
}
#galleryContainer .moment-v2-photo-surface--capture-share:has(> img.moment-feed-photo.loaded) {
    aspect-ratio: auto;
}
/* 주간·월간 리포트 공유: 이미지가 늘 4:5 라 자리도 4:5 (moment-feed-v2.js buildV2RawPhotoBlock) */
#galleryContainer .moment-v2-photo-surface--capture-share.moment-v2-photo-surface--ratio-4x5:not(:has(> img.moment-feed-photo.loaded)) {
    aspect-ratio: 4 / 5;
}
/* 화면2: 라이트박스 없음 — 돋보기 커서 제거 */
#galleryContainer.moment-feed-layout-v2 .moment-v2-carousel-photo {
    cursor: default;
}
/* 모먼트 보기 2: 팝업형 한 장 캐러셀 + 사진/휠 라벨 분리 (타임라인 오버레이 휠과 동일 톤) */
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope {
    --meal-wheel-viewport-h: 30px;
    --meal-wheel-item-h: 30px;
}
/* 휠 한 줄: 년·월·일(숫자) / 요일·슬롯(텍스트) 열 뷰포트 높이 30px 통일 — 팝업 `#timelineMealPhotosOverlay` `.timeline-meal-photos-caption-footer .meal-photo-wheel-viewport` */
#galleryContainer.moment-feed-layout-v2 .moment-v2-wheel-caption-row .meal-photo-wheel-viewport,
#moment-v2-fixed-caption-layer .moment-v2-wheel-caption-row .meal-photo-wheel-viewport {
    height: var(--meal-wheel-viewport-h);
    min-height: var(--meal-wheel-viewport-h);
    max-height: var(--meal-wheel-viewport-h);
    box-sizing: border-box;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-wheel-caption-row .meal-photo-wheel-viewport--label .meal-photo-wheel-label-strip,
#moment-v2-fixed-caption-layer .moment-v2-wheel-caption-row .meal-photo-wheel-viewport--label .meal-photo-wheel-label-strip {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    justify-content: center;
    width: 100%;
}
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope .meal-photo-wheel-col--slot .meal-photo-wheel-label-strip,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope .meal-photo-wheel-col--slot .meal-photo-wheel-label-strip {
    width: max-content;
    max-width: 100%;
}
/* 시안: 사진은 카드 가로 100% — 구 휠 폭(--meal-wheel-caption-inner-w)에 묶지 않음 */
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope .moment-v2-photo-shell,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope .moment-v2-photo-shell {
    background: #e2e8f0 !important;
    overflow: hidden;
    min-width: 0;
    min-height: min-content;
    width: 100% !important;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope .timeline-meal-photos-carousel-zone,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope .timeline-meal-photos-carousel-zone {
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    min-height: min-content;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-wheel-stage--split-caption .moment-v2-wheel-center-stack {
    align-items: center;
    width: 100%;
}
/* 다장(가로 사진만 스와이프): 사진 영역·라벨 열 전체 너비 — 푸터는 사진 아래 고정 */
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope[data-moment-v2-swipe-photos-only='1'] .moment-v2-wheel-stage--split-caption .moment-v2-wheel-center-stack {
    align-items: stretch;
}
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope[data-moment-v2-swipe-photos-only='1'] .moment-v2-caption-footer--hstrip-below {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope[data-moment-v2-swipe-photos-only='1'] .moment-v2-wheel-center-stack {
    flex: 0 0 auto;
    min-height: 0;
}
/* 사진 래퍼(일반/베스트·일간): 하단만 직각 — 라벨·박스와 수직 1px 간격(부모 column gap) */
#galleryContainer.moment-feed-layout-v2 .moment-v2-photo-surface,
#moment-v2-fixed-caption-layer .moment-v2-photo-surface {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
/* 사진 블록 하단 구분선 (작성자·캡션 위) */
#galleryContainer.moment-feed-layout-v2 .moment-v2-photo-shell,
#moment-v2-fixed-caption-layer .moment-v2-photo-shell {
    border-bottom: 1px solid var(--line, #d0c6ba);
}
/* 캡처 공유 PNG(베스트/하루 기록): 다장 스와이프 슬롯도 뷰포트 폭 100%·흰 배경 */
#galleryContainer.moment-feed-layout-v2 .moment-v2-hstrip .moment-v2-photo-surface--capture-share,
#moment-v2-fixed-caption-layer .moment-v2-hstrip .moment-v2-photo-surface--capture-share {
    width: 100%;
    min-width: 100%;
    background-color: #ffffff !important;
    --tw-ring-color: rgba(226, 232, 240, 0.45) !important;
}
/* 캡처 공유: 휠 라벨 폭(--meal-wheel-caption-inner-w)에 맞추면 PNG가 카드보다 좁아 보임 → 사진 열만 카드 가로 100% */
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope[data-moment-v2-daily-share='1'] .moment-v2-photo-shell,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope[data-moment-v2-daily-share='1'] .moment-v2-photo-shell,
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope[data-moment-v2-daily-share='1'] .timeline-meal-photos-carousel-zone,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope[data-moment-v2-daily-share='1'] .timeline-meal-photos-carousel-zone,
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope[data-moment-v2-best-share='1'] .moment-v2-photo-shell,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope[data-moment-v2-best-share='1'] .moment-v2-photo-shell,
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope[data-moment-v2-best-share='1'] .timeline-meal-photos-carousel-zone,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope[data-moment-v2-best-share='1'] .timeline-meal-photos-carousel-zone {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope[data-moment-v2-daily-share='1'] .moment-v2-wheel-stage,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope[data-moment-v2-daily-share='1'] .moment-v2-wheel-stage,
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope[data-moment-v2-best-share='1'] .moment-v2-wheel-stage,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope[data-moment-v2-best-share='1'] .moment-v2-wheel-stage {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope[data-moment-v2-daily-share='1'] .moment-v2-wheel-center-stack,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope[data-moment-v2-daily-share='1'] .moment-v2-wheel-center-stack,
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope[data-moment-v2-best-share='1'] .moment-v2-wheel-center-stack,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope[data-moment-v2-best-share='1'] .moment-v2-wheel-center-stack {
    align-items: stretch !important;
}
/* 캡처 공유: 뷰포트·이미지에 88vh 상한이 있으면 세로만 맞추느라 가로가 줄고 좌우 빈칸 생김 */
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope[data-moment-v2-daily-share='1'] .moment-v2-carousel-viewport--natural,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope[data-moment-v2-daily-share='1'] .moment-v2-carousel-viewport--natural,
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope[data-moment-v2-best-share='1'] .moment-v2-carousel-viewport--natural,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope[data-moment-v2-best-share='1'] .moment-v2-carousel-viewport--natural {
    max-height: none !important;
    overflow: visible !important;
}
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope[data-moment-v2-daily-share='1'] .moment-v2-capture-share-img,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope[data-moment-v2-daily-share='1'] .moment-v2-capture-share-img,
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope[data-moment-v2-best-share='1'] .moment-v2-capture-share-img,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope[data-moment-v2-best-share='1'] .moment-v2-capture-share-img {
    max-height: none !important;
    width: 100% !important;
    height: auto !important;
    object-fit: initial;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-wheel-stage--split-caption .moment-v2-dock-slab {
    width: var(--meal-wheel-caption-inner-w, 100%);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope .timeline-meal-photos-carousel-frame,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope .timeline-meal-photos-carousel-frame {
    width: 100%;
    min-width: 0;
    min-height: min-content;
    max-height: none;
    overflow: visible;
}
/* 뷰포트: 콘텐츠(세로) 높이에 맞춤 — 뒤쪽 흰 박스(고정 88vh) 제거. 최대만 캡 */
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope .moment-v2-carousel-viewport--natural,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope .moment-v2-carousel-viewport--natural {
    width: 100%;
    min-width: 100%;
    height: auto !important;
    max-height: min(88vh, calc(100dvh - 7rem));
    min-height: min-content;
    overflow: hidden;
}
/* 베스트/인사이트 공유 PNG: aspect-ratio + object-contain 슬롯. 일간은 모먼트에서 자연 높이(너비 100%)로 표시. */
/* 화면2 세로 스택: 단위마다 블러 배경(사진 확대·투명) */
#galleryContainer.moment-feed-layout-v2 .moment-v2-v-unit .moment-v2-v-unit-bg-wrap {
    border-radius: 0.5rem;
    overflow: hidden;
    z-index: 0;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-v-unit-bg-img {
    position: absolute;
    left: 50%;
    top: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%) scale(1.22);
    object-fit: cover;
    filter: blur(32px) saturate(1.05);
    opacity: 0.6;
    pointer-events: none;
}
/* 다장(가로): 게시물 한 덩어리(사진~하단 라벨·코멘트) 뒤 전역 블러 — 활성 사진 URL로 JS 동기화 */
#galleryContainer.moment-feed-layout-v2 .moment-v2-hpost-bg-wrap,
#moment-v2-fixed-caption-layer .moment-v2-hpost-bg-wrap {
    border-radius: 0.5rem;
    overflow: hidden;
    z-index: 0;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-hpost-bg-img,
#moment-v2-fixed-caption-layer .moment-v2-hpost-bg-img {
    position: absolute;
    left: 50%;
    top: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%) scale(1.28);
    object-fit: cover;
    filter: blur(40px) saturate(1.08) brightness(0.9);
    opacity: 0.72;
    pointer-events: none;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-hpost-bg-dim,
#moment-v2-fixed-caption-layer .moment-v2-hpost-bg-dim {
    /* 상단은 음영 약하게(빈 패딩 구간·사진 object-top 잔상에서 ‘상단 띠’ 완화) */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.06), rgba(15, 23, 42, 0.38));
    z-index: 1;
    pointer-events: none;
}
/* 다장 전역 배경: 헤더 정렬용 20px(.instagram-post .moment-v2-wheel-center-stack)보다 특이도 높여 사진·블러 상단을 맞춤 */
#galleryView:not(.hidden) #galleryContainer.moment-feed-layout-v2 .instagram-post[data-moment-card-layout='2'] .moment-v2-hpost-ambient .moment-v2-wheel-center-stack,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope .moment-v2-hpost-ambient .moment-v2-wheel-center-stack {
    padding-top: 0;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-wheel-caption-row--unit {
    border-radius: 0 !important;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-v-unit .moment-v2-author-unit-band:not(.hidden) {
    border-radius: 0 0 0.5rem 0.5rem;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-caption-footer--social-only {
    pointer-events: auto;
    margin-top: 0.25rem;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-wheel-center-stack {
    min-height: 0;
}
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope .timeline-meal-photos-carousel-viewport:not(.moment-v2-carousel-viewport--natural),
#moment-v2-fixed-caption-layer .moment-feed-v2-scope .timeline-meal-photos-carousel-viewport:not(.moment-v2-carousel-viewport--natural) {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 0;
    max-height: min(88vh, calc(100dvh - 7rem));
    overflow: hidden;
}
/* 화면2: 가로 다장 hstrip — 가로만 스냅(세로 피드 스냅과 별개) */
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope .moment-v2-hstrip,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope .moment-v2-hstrip {
    width: 100%;
    height: auto;
    min-height: min-content;
    align-items: stretch;
    gap: 0;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    /* pan-x만 두면 기기에서 세로 피드 스크롤이 사진 위에서 막힘 — 가로 스와이프와 세로 스크롤 공존 */
    touch-action: pan-x pan-y;
    cursor: grab;
}
@media (prefers-reduced-motion: reduce) {
    #galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope .moment-v2-hstrip,
    #moment-v2-fixed-caption-layer .moment-feed-v2-scope .moment-v2-hstrip {
        scroll-behavior: auto;
    }
}
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope .moment-v2-hstrip.moment-v2-hstrip--dragging,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope .moment-v2-hstrip.moment-v2-hstrip--dragging {
    cursor: grabbing;
    user-select: none;
    /* 드래그 중엔 pointermove로 scrollLeft를 직접 쓰므로 smooth 비활성(손/팔로우 지연 방지) */
    scroll-behavior: auto;
}
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope .moment-v2-hstrip .moment-v2-h-slide,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope .moment-v2-hstrip .moment-v2-h-slide {
    box-sizing: border-box;
    width: 100%;
    /* 이미지 로드 전 intrinsic 폭이 0일 때도 슬롯이 ‘세로줄’처럼 쪼그라들지 않게 */
    min-width: 100%;
    height: auto;
    min-height: 0;
    align-self: stretch;
    flex: 0 0 auto;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}
/* 다장: 사진 슬롯 — 시안 wrap #e2e8f0 (회색 반투명 매트 제거) */
#galleryContainer.moment-feed-layout-v2 .moment-v2-hstrip .moment-v2-photo-surface.timeline-meal-photo-aspect-slot,
#moment-v2-fixed-caption-layer .moment-v2-hstrip .moment-v2-photo-surface.timeline-meal-photo-aspect-slot {
    width: 100%;
    background-color: #e2e8f0 !important;
    box-shadow: none !important;
    --tw-ring-color: transparent !important;
}
/* 시안 multi-badge: 우상단 pill · Pretendard 11px */
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope .timeline-meal-photos-carousel-badge,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope .timeline-meal-photos-carousel-badge,
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope .moment-v2-multi-badge {
    top: 12px !important;
    right: 12px !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    display: inline-flex;
    align-items: center;
    gap: 0;
    font-family: 'Pretendard', sans-serif !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    padding: 4px 8px !important;
    border-radius: 9999px !important;
    border: 0 !important;
    background: rgba(15, 23, 42, 0.55) !important;
    color: #ffffff !important;
    text-shadow: none !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: none !important;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-photo-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 12;
    display: flex;
    gap: 5px;
    pointer-events: none;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-photo-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-photo-dots span.on {
    background: #fff;
    width: 16px;
    border-radius: 4px;
}
/* 타임라인 휠 팝업 `.timeline-meal-photos-overlay--wheel .timeline-meal-photos-slide-caption-inner` 와 동일 톤 */
#galleryContainer.moment-feed-layout-v2 .moment-v2-wheel-caption-row.timeline-meal-photo-menu-bar,
#moment-v2-fixed-caption-layer .moment-v2-wheel-caption-row.timeline-meal-photo-menu-bar {
    padding: 2px 0.5rem;
    gap: 0;
    align-items: center;
    line-height: 1;
    font-size: 20px;
    background-color: rgba(38, 40, 46, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #fff !important;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-wheel-caption-row .meal-photo-wheel-sep--colon,
#moment-v2-fixed-caption-layer .moment-v2-wheel-caption-row .meal-photo-wheel-sep--colon {
    color: rgba(255, 255, 255, 0.45);
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-wheel-caption-row [data-wheel-menu-caption] .moment-v2-wheel-anim-strip--menu,
#moment-v2-fixed-caption-layer .moment-v2-wheel-caption-row [data-wheel-menu-caption] .moment-v2-wheel-anim-strip--menu {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-wheel-caption-row [data-wheel-menu-caption],
#moment-v2-fixed-caption-layer .moment-v2-wheel-caption-row [data-wheel-menu-caption] {
    min-width: 0;
    flex: 1 1 0%;
    margin-left: 1em;
    text-align: right;
    align-self: center;
    font-family: '나눔손글씨 가람연꽃', 'Nanum Garam Yeonkot', 'Nanum Pen Script', cursive;
    font-size: 20px;
    font-weight: normal;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.95) !important;
    background: transparent;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    overflow: visible;
}
/* 메뉴@장소: 한 줄(20px) — 넘치면 JS로 .moment-v2-wheel-menu--compact → 18px 두 줄 */
#galleryContainer.moment-feed-layout-v2 .moment-v2-wheel-caption-row [data-wheel-menu-caption]:not(.moment-v2-wheel-menu--compact)
    .moment-v2-wheel-menu-anim-line,
#moment-v2-fixed-caption-layer
    .moment-v2-wheel-caption-row
    [data-wheel-menu-caption]:not(.moment-v2-wheel-menu--compact)
    .moment-v2-wheel-menu-anim-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#galleryContainer.moment-feed-layout-v2
    .moment-v2-wheel-caption-row
    [data-wheel-menu-caption].moment-v2-wheel-menu--compact
    .moment-v2-wheel-anim-strip--menu
    > .meal-photo-wheel-label-line,
#moment-v2-fixed-caption-layer
    .moment-v2-wheel-caption-row
    [data-wheel-menu-caption].moment-v2-wheel-menu--compact
    .moment-v2-wheel-anim-strip--menu
    > .meal-photo-wheel-label-line {
    height: auto !important;
    min-height: 0 !important;
    line-height: 1.25;
    font-size: 18px !important;
    white-space: normal;
    overflow: hidden;
    max-height: calc(18px * 1.25 * 2);
    display: block;
    text-align: right;
    word-break: break-word;
    overflow-wrap: anywhere;
    text-overflow: ellipsis;
    justify-content: flex-start;
    align-items: stretch;
}
/* 메뉴 2줄(compact): 행 높이 확장 — YYYY… 숫자 열은 행 세로 중앙, 메뉴@장소 블록은 상단 기준 */
#galleryContainer.moment-feed-layout-v2
    .moment-v2-wheel-caption-row.timeline-meal-photo-menu-bar:has([data-wheel-menu-caption].moment-v2-wheel-menu--compact),
#moment-v2-fixed-caption-layer
    .moment-v2-wheel-caption-row.timeline-meal-photo-menu-bar:has([data-wheel-menu-caption].moment-v2-wheel-menu--compact) {
    align-items: stretch;
    min-height: calc(max(30px, 18px * 1.25 * 2) + 12px);
    padding-top: 4px;
    padding-bottom: 4px;
}
#galleryContainer.moment-feed-layout-v2
    .moment-v2-wheel-caption-row.timeline-meal-photo-menu-bar:has([data-wheel-menu-caption].moment-v2-wheel-menu--compact)
    .timeline-meal-photos-wheelbar-inner,
#moment-v2-fixed-caption-layer
    .moment-v2-wheel-caption-row.timeline-meal-photo-menu-bar:has([data-wheel-menu-caption].moment-v2-wheel-menu--compact)
    .timeline-meal-photos-wheelbar-inner {
    align-self: center;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-wheel-caption-row [data-wheel-menu-caption].moment-v2-wheel-menu--compact,
#moment-v2-fixed-caption-layer .moment-v2-wheel-caption-row [data-wheel-menu-caption].moment-v2-wheel-menu--compact {
    align-self: flex-start;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-wheel-menu-at-mark,
#moment-v2-fixed-caption-layer .moment-v2-wheel-menu-at-mark {
    display: inline;
    font: inherit;
    color: inherit;
}
#galleryContainer.moment-feed-layout-v2
    .moment-v2-wheel-caption-row
    [data-wheel-menu-caption].moment-v2-wheel-menu--compact
    .moment-v2-wheel-anim-strip--menu,
#moment-v2-fixed-caption-layer
    .moment-v2-wheel-caption-row
    [data-wheel-menu-caption].moment-v2-wheel-menu--compact
    .moment-v2-wheel-anim-strip--menu {
    height: auto;
    min-height: 0;
}
/* 기록 코멘트: 하단 휠 메뉴(우측 캡션)과 동일 서체·크기, 라벨 품과 동일 가로(스테이지 패딩과 JS --meal-wheel-caption-inner-w) */
#galleryContainer.moment-feed-layout-v2 .moment-v2-label-font-body,
#moment-v2-fixed-caption-layer .moment-v2-label-font-body {
    font-family: '나눔손글씨 가람연꽃', 'Nanum Garam Yeonkot', 'Nanum Pen Script', cursive;
    font-size: 20px;
    font-weight: normal;
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: break-word;
}
/* 기록 코멘트(구형 오버레이 band 전용) — 시안 본문 .moment-v2-meal-note에는 적용하지 않음 */
#galleryContainer.moment-feed-layout-v2 [data-moment-v2-author-comment-band] [data-moment-v2-author-comment-body],
#moment-v2-fixed-caption-layer [data-moment-v2-author-comment-band] [data-moment-v2-author-comment-body],
#galleryContainer.moment-feed-layout-v2 [data-moment-v2-author-unit] [data-moment-v2-author-comment-body-unit],
#moment-v2-fixed-caption-layer [data-moment-v2-author-unit] [data-moment-v2-author-comment-body-unit] {
    box-sizing: border-box;
    padding: 0 2ch;
    text-indent: 0;
    font-family: '나눔손글씨 가람연꽃', 'Nanum Garam Yeonkot', 'Nanum Pen Script', cursive;
    font-size: 20px;
    font-weight: normal;
    line-height: 1.35;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.9);
    overflow-x: hidden;
    overflow-y: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
    -webkit-overflow-scrolling: touch;
    max-height: min(3lh, calc(20px * 1.35 * 3));
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.38) transparent;
}
#galleryContainer.moment-feed-layout-v2
    [data-moment-v2-author-comment-band].moment-v2-author-comment-band--expanded
    [data-moment-v2-author-comment-body],
#moment-v2-fixed-caption-layer
    [data-moment-v2-author-comment-band].moment-v2-author-comment-band--expanded
    [data-moment-v2-author-comment-body],
#galleryContainer.moment-feed-layout-v2
    [data-moment-v2-author-unit].moment-v2-author-comment-band--expanded
    [data-moment-v2-author-comment-body-unit],
#moment-v2-fixed-caption-layer
    [data-moment-v2-author-unit].moment-v2-author-comment-band--expanded
    [data-moment-v2-author-comment-body-unit] {
    max-height: min(24lh, 70vh);
    overflow-y: auto;
}
#galleryContainer.moment-feed-layout-v2 [data-moment-v2-author-comment-band].moment-v2-author-comment-band--expandable,
#moment-v2-fixed-caption-layer [data-moment-v2-author-comment-band].moment-v2-author-comment-band--expandable,
#galleryContainer.moment-feed-layout-v2 [data-moment-v2-author-unit].moment-v2-author-comment-band--expandable,
#moment-v2-fixed-caption-layer [data-moment-v2-author-unit].moment-v2-author-comment-band--expandable {
    cursor: pointer;
}
/* 3줄 초과(펼침 가능): 우하단 더보기 — 펼친 뒤에는 접기 */
#galleryContainer.moment-feed-layout-v2 [data-moment-v2-author-comment-band] .moment-v2-author-comment-more-hint,
#moment-v2-fixed-caption-layer [data-moment-v2-author-comment-band] .moment-v2-author-comment-more-hint,
#galleryContainer.moment-feed-layout-v2 [data-moment-v2-author-unit] .moment-v2-author-comment-more-hint,
#moment-v2-fixed-caption-layer [data-moment-v2-author-unit] .moment-v2-author-comment-more-hint {
    display: none;
    position: absolute;
    right: 0.5rem;
    bottom: 0.2rem;
    z-index: 2;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    line-height: 1.2;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-author-comment-band--expandable .moment-v2-author-comment-more-hint,
#moment-v2-fixed-caption-layer .moment-v2-author-comment-band--expandable .moment-v2-author-comment-more-hint {
    display: block;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-author-comment-more-hint-label,
#moment-v2-fixed-caption-layer .moment-v2-author-comment-more-hint-label {
    display: none;
}
#galleryContainer.moment-feed-layout-v2
    .moment-v2-author-comment-band--expandable:not(.moment-v2-author-comment-band--expanded)
    .moment-v2-author-comment-more-hint-label--collapsed,
#moment-v2-fixed-caption-layer
    .moment-v2-author-comment-band--expandable:not(.moment-v2-author-comment-band--expanded)
    .moment-v2-author-comment-more-hint-label--collapsed,
#galleryContainer.moment-feed-layout-v2
    [data-moment-v2-author-unit].moment-v2-author-comment-band--expandable:not(.moment-v2-author-comment-band--expanded)
    .moment-v2-author-comment-more-hint-label--collapsed,
#moment-v2-fixed-caption-layer
    [data-moment-v2-author-unit].moment-v2-author-comment-band--expandable:not(.moment-v2-author-comment-band--expanded)
    .moment-v2-author-comment-more-hint-label--collapsed {
    display: inline;
}
#galleryContainer.moment-feed-layout-v2
    .moment-v2-author-comment-band--expandable.moment-v2-author-comment-band--expanded
    .moment-v2-author-comment-more-hint-label--expanded,
#moment-v2-fixed-caption-layer
    .moment-v2-author-comment-band--expandable.moment-v2-author-comment-band--expanded
    .moment-v2-author-comment-more-hint-label--expanded,
#galleryContainer.moment-feed-layout-v2
    [data-moment-v2-author-unit].moment-v2-author-comment-band--expandable.moment-v2-author-comment-band--expanded
    .moment-v2-author-comment-more-hint-label--expanded,
#moment-v2-fixed-caption-layer
    [data-moment-v2-author-unit].moment-v2-author-comment-band--expandable.moment-v2-author-comment-band--expanded
    .moment-v2-author-comment-more-hint-label--expanded {
    display: inline;
}
#galleryContainer.moment-feed-layout-v2
    .moment-v2-author-comment-band--expandable:not(.moment-v2-author-comment-band--expanded)
    [data-moment-v2-author-comment-body],
#moment-v2-fixed-caption-layer
    .moment-v2-author-comment-band--expandable:not(.moment-v2-author-comment-band--expanded)
    [data-moment-v2-author-comment-body],
#galleryContainer.moment-feed-layout-v2
    [data-moment-v2-author-unit].moment-v2-author-comment-band--expandable:not(.moment-v2-author-comment-band--expanded)
    [data-moment-v2-author-comment-body-unit],
#moment-v2-fixed-caption-layer
    [data-moment-v2-author-unit].moment-v2-author-comment-band--expandable:not(.moment-v2-author-comment-band--expanded)
    [data-moment-v2-author-comment-body-unit] {
    padding-bottom: 1.15rem;
}
#galleryContainer.moment-feed-layout-v2
    .moment-v2-author-comment-band--expandable.moment-v2-author-comment-band--expanded
    [data-moment-v2-author-comment-body],
#moment-v2-fixed-caption-layer
    .moment-v2-author-comment-band--expandable.moment-v2-author-comment-band--expanded
    [data-moment-v2-author-comment-body],
#galleryContainer.moment-feed-layout-v2
    [data-moment-v2-author-unit].moment-v2-author-comment-band--expandable.moment-v2-author-comment-band--expanded
    [data-moment-v2-author-comment-body-unit],
#moment-v2-fixed-caption-layer
    [data-moment-v2-author-unit].moment-v2-author-comment-band--expandable.moment-v2-author-comment-band--expanded
    [data-moment-v2-author-comment-body-unit] {
    padding-bottom: 1.15rem;
}
#galleryContainer.moment-feed-layout-v2 [data-moment-v2-author-comment-body]::-webkit-scrollbar,
#moment-v2-fixed-caption-layer [data-moment-v2-author-comment-body]::-webkit-scrollbar,
#galleryContainer.moment-feed-layout-v2 [data-moment-v2-author-comment-body-unit]::-webkit-scrollbar,
#moment-v2-fixed-caption-layer [data-moment-v2-author-comment-body-unit]::-webkit-scrollbar {
    width: 2px;
}
#galleryContainer.moment-feed-layout-v2 [data-moment-v2-author-comment-body]::-webkit-scrollbar-thumb,
#moment-v2-fixed-caption-layer [data-moment-v2-author-comment-body]::-webkit-scrollbar-thumb,
#galleryContainer.moment-feed-layout-v2 [data-moment-v2-author-comment-body-unit]::-webkit-scrollbar-thumb,
#moment-v2-fixed-caption-layer [data-moment-v2-author-comment-body-unit]::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.38);
    border-radius: 1px;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-social-comments-panel,
#moment-v2-fixed-caption-layer .moment-v2-social-comments-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
/* 토글 기록 코멘트: 팝업 `data-meal-overlay-comment-band`와 동일 톤(HTML에 border/bg 포함, 여기서 보강) */
#galleryContainer.moment-feed-layout-v2 .moment-v2-author-comment-band--toggled:not(.hidden),
#moment-v2-fixed-caption-layer .moment-v2-author-comment-band--toggled:not(.hidden) {
    border-radius: 0 !important;
}

#galleryContainer.moment-feed-layout-v2 .moment-v2-wheel-caption-row .timeline-meal-photos-wheelbar-inner,
#moment-v2-fixed-caption-layer .moment-v2-wheel-caption-row .timeline-meal-photos-wheelbar-inner {
    min-width: 0;
    flex: 0 1 auto;
    overflow: hidden;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-wheel-caption-row .meal-photo-wheel-col,
#moment-v2-fixed-caption-layer .moment-v2-wheel-caption-row .meal-photo-wheel-col {
    min-height: var(--meal-wheel-viewport-h);
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope .meal-photo-wheel-col--slot,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope .meal-photo-wheel-col--slot {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 9rem;
}
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope .meal-photo-wheel-viewport:not(.meal-photo-wheel-viewport--label),
#moment-v2-fixed-caption-layer .moment-feed-v2-scope .meal-photo-wheel-viewport:not(.meal-photo-wheel-viewport--label) {
    width: 2.125rem;
    flex: 0 0 2.125rem;
}
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope .meal-photo-wheel-col--year .meal-photo-wheel-viewport:not(.meal-photo-wheel-viewport--label),
#moment-v2-fixed-caption-layer .moment-feed-v2-scope .meal-photo-wheel-col--year .meal-photo-wheel-viewport:not(.meal-photo-wheel-viewport--label) {
    width: 2.625rem;
    flex: 0 0 2.625rem;
}
/* 숫자 열: `#timelineMealPhotosOverlay.timeline-meal-photos-overlay--wheel .meal-photo-wheel-viewport:not(.meal-photo-wheel-viewport--label)` 와 동일 밝기·마스크 */
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope .meal-photo-wheel-viewport--static:not(.meal-photo-wheel-viewport--label),
#moment-v2-fixed-caption-layer .moment-feed-v2-scope .meal-photo-wheel-viewport--static:not(.meal-photo-wheel-viewport--label) {
    height: var(--meal-wheel-viewport-h);
    min-height: var(--meal-wheel-viewport-h);
    max-height: var(--meal-wheel-viewport-h);
    width: 2.5rem;
    flex: 0 0 2.5rem;
    overflow: hidden;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 0.5%, #000 99.5%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 0.5%, #000 99.5%, transparent 100%);
}
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope .meal-photo-wheel-col--year .meal-photo-wheel-viewport--static,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope .meal-photo-wheel-col--year .meal-photo-wheel-viewport--static {
    width: 3rem;
    flex: 0 0 3rem;
}
/* 요일·슬롯 텍스트 칸: 팝업 `.meal-photo-wheel-viewport--label`(휠 모드) 과 동일 — 0.2 밝기, inset·어두운 배경 제거 */
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope .meal-photo-wheel-viewport--label.meal-photo-wheel-viewport--static,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope .meal-photo-wheel-viewport--label.meal-photo-wheel-viewport--static {
    width: auto;
    min-width: 0.875rem;
    flex: 0 0 auto;
    height: var(--meal-wheel-viewport-h);
    min-height: var(--meal-wheel-viewport-h);
    max-height: var(--meal-wheel-viewport-h);
    touch-action: none;
    -webkit-mask-image: none;
    mask-image: none;
    padding-left: 0.45em;
    padding-right: 0.45em;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    box-shadow: none;
    box-sizing: border-box;
    overflow: hidden;
    align-self: center;
}
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope .meal-photo-wheel-col--slot .meal-photo-wheel-viewport--label,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope .meal-photo-wheel-col--slot .meal-photo-wheel-viewport--label {
    /* flex: 1 1 auto 이면 세로로 늘어나 YYYY/월 열과 높이가 어긋남 */
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    max-width: 9rem;
}
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope .meal-photo-wheel-item,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope .meal-photo-wheel-item {
    box-sizing: border-box;
    width: 100%;
    height: var(--meal-wheel-item-h);
    min-height: var(--meal-wheel-item-h);
    line-height: var(--meal-wheel-item-h);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.95);
    font-size: inherit;
    font-weight: 400;
}
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope .meal-photo-wheel-label-line,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope .meal-photo-wheel-label-line {
    box-sizing: border-box;
    height: var(--meal-wheel-item-h);
    min-height: var(--meal-wheel-item-h);
    line-height: var(--meal-wheel-item-h);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: inherit;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope .meal-photo-wheel-sep--colon,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope .meal-photo-wheel-sep--colon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--meal-wheel-viewport-h);
    min-height: var(--meal-wheel-viewport-h);
    max-height: var(--meal-wheel-viewport-h);
    line-height: 1;
    align-self: center;
    padding: 0 1px;
    box-sizing: border-box;
}
#galleryContainer.moment-feed-layout-v2 .moment-feed-v2-scope .timeline-meal-photos-wheelbar-inner,
#moment-v2-fixed-caption-layer .moment-feed-v2-scope .timeline-meal-photos-wheelbar-inner {
    flex-wrap: nowrap;
    align-items: center;
    min-width: 0;
}
/*
 * 포털 하단 도크: 휠 HTML은 `.moment-feed-v2-scope` 밖에 붙으므로,
 * 팝업 `#timelineMealPhotosOverlay.timeline-meal-photos-overlay--wheel` + 인플로 scope 규칙과 동일한 셀·슬롯 스타일을 이 경로에 복제.
 */
#moment-v2-fixed-caption-layer .moment-v2-caption--dock-fixed {
    --meal-wheel-viewport-h: 30px;
    --meal-wheel-item-h: 30px;
}
#moment-v2-fixed-caption-layer .moment-v2-caption--dock-fixed .meal-photo-wheel-label-strip {
    display: flex;
    flex-direction: column;
    width: 100%;
    will-change: transform;
}
#moment-v2-fixed-caption-layer .moment-v2-caption--dock-fixed .meal-photo-wheel-col--slot .meal-photo-wheel-label-strip {
    width: max-content;
    max-width: 100%;
}
#moment-v2-fixed-caption-layer .moment-v2-caption--dock-fixed .meal-photo-wheel-col--slot {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 9rem;
}
#moment-v2-fixed-caption-layer .moment-v2-caption--dock-fixed .meal-photo-wheel-viewport:not(.meal-photo-wheel-viewport--label) {
    width: 2.125rem;
    flex: 0 0 2.125rem;
}
#moment-v2-fixed-caption-layer .moment-v2-caption--dock-fixed .meal-photo-wheel-col--year .meal-photo-wheel-viewport:not(.meal-photo-wheel-viewport--label) {
    width: 2.625rem;
    flex: 0 0 2.625rem;
}
#moment-v2-fixed-caption-layer .moment-v2-caption--dock-fixed .meal-photo-wheel-viewport--static:not(.meal-photo-wheel-viewport--label) {
    height: var(--meal-wheel-viewport-h);
    min-height: var(--meal-wheel-viewport-h);
    max-height: var(--meal-wheel-viewport-h);
    width: 2.5rem;
    flex: 0 0 2.5rem;
    overflow: hidden;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 0.5%, #000 99.5%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 0.5%, #000 99.5%, transparent 100%);
}
#moment-v2-fixed-caption-layer .moment-v2-caption--dock-fixed .meal-photo-wheel-col--year .meal-photo-wheel-viewport--static {
    width: 3rem;
    flex: 0 0 3rem;
}
#moment-v2-fixed-caption-layer .moment-v2-caption--dock-fixed .meal-photo-wheel-viewport--label.meal-photo-wheel-viewport--static {
    width: auto;
    min-width: 0.875rem;
    flex: 0 0 auto;
    height: var(--meal-wheel-viewport-h);
    min-height: var(--meal-wheel-viewport-h);
    max-height: var(--meal-wheel-viewport-h);
    touch-action: none;
    -webkit-mask-image: none;
    mask-image: none;
    padding-left: 0.45em;
    padding-right: 0.45em;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    box-shadow: none;
    box-sizing: border-box;
    overflow: hidden;
    align-self: center;
}
#moment-v2-fixed-caption-layer .moment-v2-caption--dock-fixed .meal-photo-wheel-col--slot .meal-photo-wheel-viewport--label {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    max-width: 9rem;
}
#moment-v2-fixed-caption-layer .moment-v2-caption--dock-fixed .meal-photo-wheel-item {
    box-sizing: border-box;
    width: 100%;
    height: var(--meal-wheel-item-h);
    min-height: var(--meal-wheel-item-h);
    line-height: var(--meal-wheel-item-h);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.95);
    font-size: inherit;
    font-weight: 400;
}
#moment-v2-fixed-caption-layer .moment-v2-caption--dock-fixed .meal-photo-wheel-label-line {
    box-sizing: border-box;
    height: var(--meal-wheel-item-h);
    min-height: var(--meal-wheel-item-h);
    line-height: var(--meal-wheel-item-h);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: inherit;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
#moment-v2-fixed-caption-layer .moment-v2-caption--dock-fixed .meal-photo-wheel-sep--colon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--meal-wheel-viewport-h);
    min-height: var(--meal-wheel-viewport-h);
    max-height: var(--meal-wheel-viewport-h);
    line-height: 1;
    align-self: center;
    padding: 0 1px;
    box-sizing: border-box;
}
#moment-v2-fixed-caption-layer .moment-v2-caption--dock-fixed .timeline-meal-photos-wheelbar-inner {
    flex-wrap: nowrap;
    align-items: center;
    min-width: 0;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-wheel-stage,
#moment-v2-fixed-caption-layer .moment-v2-wheel-stage {
    position: relative;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-wheel-stage--with-footer {
    background: transparent;
    overflow: hidden;
    padding-bottom: 0;
    min-width: 0;
    align-items: stretch;
}
#moment-v2-fixed-caption-layer .moment-v2-wheel-stage--with-footer {
    background: transparent;
    overflow: visible;
    padding-bottom: 0;
    min-height: min(90dvh, calc(100dvh - 7.5rem - env(safe-area-inset-bottom, 0px)));
    justify-content: center;
    align-items: stretch;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-wheel-body,
#moment-v2-fixed-caption-layer .moment-v2-wheel-body {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: 0 0 auto;
    align-items: stretch;
    box-sizing: border-box;
    gap: 1px;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-wheel-center-stack,
#moment-v2-fixed-caption-layer .moment-v2-wheel-center-stack {
    position: relative;
    width: 100%;
    max-width: 100%;
    background: transparent;
    flex: 0 0 auto;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-wheel-stage--split-caption .moment-v2-caption-footer[data-moment-v2-caption] {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 1px;
    position: relative;
    z-index: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    pointer-events: none;
}
#moment-v2-fixed-caption-layer .moment-v2-caption-footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    z-index: 12;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: static;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    pointer-events: none;
    transition: none;
}
/* 레거시 포털(남은 DOM) — vp-slab / fixed */
#moment-v2-fixed-caption-layer .moment-v2-caption-vp-slab {
    min-height: 0;
    width: 100%;
    flex-shrink: 0;
    pointer-events: none;
}
#moment-v2-fixed-caption-layer .moment-v2-caption-footer.moment-v2-caption-footer--vp-inflow-hidden {
    max-height: 0 !important;
    min-height: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    overflow: hidden !important;
    opacity: 0;
    visibility: hidden;
    background: transparent;
    box-shadow: none;
    flex: 0 0 0;
    pointer-events: none;
}
#moment-v2-fixed-caption-layer .moment-v2-caption-footer.moment-v2-caption-footer--vp-fixed {
    position: fixed;
    left: 0;
    right: 0;
    top: auto;
    bottom: var(--moment-v2-wheel-footer-bottom, calc(20px + 66px + var(--safe-bottom)));
    z-index: var(--z-feed-overlay-panel);
    width: 100%;
    max-width: min(28rem, calc(100% - 1rem));
    margin-left: auto;
    margin-right: auto;
    padding-left: max(0.25rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.25rem, env(safe-area-inset-right, 0px));
    background: #fff;
    box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.06);
    pointer-events: none;
    border-radius: 0.375rem 0.375rem 0 0;
}
/* 화면2 휠: 바·콜론은 고정, 열 안의 값만 세로 슬롯 전환(JS transform) — 팝업 `#timelineMealPhotosOverlay...wheel` 의 `.meal-photo-wheel-label-strip` 과 동일(한 줄 = --meal-wheel-item-h, will-change) */
#galleryContainer.moment-feed-layout-v2 .moment-v2-wheel-anim-strip,
#moment-v2-fixed-caption-layer .moment-v2-wheel-anim-strip {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: 100%;
    will-change: transform;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-wheel-anim-strip > .meal-photo-wheel-label-line,
#moment-v2-fixed-caption-layer .moment-v2-wheel-anim-strip > .meal-photo-wheel-label-line {
    box-sizing: border-box;
    flex-shrink: 0;
    height: var(--meal-wheel-item-h, 30px);
    min-height: var(--meal-wheel-item-h, 30px);
    line-height: var(--meal-wheel-item-h, 30px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: inherit;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-wheel-anim-strip[data-moment-v2-stripe='num'] > .meal-photo-wheel-label-line,
#moment-v2-fixed-caption-layer .moment-v2-wheel-anim-strip[data-moment-v2-stripe='num'] > .meal-photo-wheel-label-line {
    font-variant-numeric: tabular-nums;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-wheel-anim-strip--menu > .meal-photo-wheel-label-line,
#moment-v2-fixed-caption-layer .moment-v2-wheel-anim-strip--menu > .meal-photo-wheel-label-line {
    justify-content: flex-end;
    text-align: right;
    padding-left: 0.25rem;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-caption-footer .moment-v2-wheel-strip,
#moment-v2-fixed-caption-layer .moment-v2-caption-footer .moment-v2-wheel-strip,
#galleryContainer.moment-feed-layout-v2 .moment-v2-caption-footer .moment-v2-wheel-caption-row,
#moment-v2-fixed-caption-layer .moment-v2-caption-footer .moment-v2-wheel-caption-row {
    pointer-events: auto;
    overflow-x: hidden;
}
/* 캡션 푸터는 pointer-events:none — 작성자(프로필 진입)·코멘트 밴드는 다시 수신 */
#galleryContainer.moment-feed-layout-v2 .moment-v2-caption-footer .moment-v2-author-row,
#moment-v2-fixed-caption-layer .moment-v2-caption-footer .moment-v2-author-row,
#galleryContainer.moment-feed-layout-v2 .moment-v2-caption-footer .moment-v2-author-hit,
#moment-v2-fixed-caption-layer .moment-v2-caption-footer .moment-v2-author-hit {
    pointer-events: auto;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-caption-footer .moment-v2-author-comment-band,
#moment-v2-fixed-caption-layer .moment-v2-caption-footer .moment-v2-author-comment-band {
    pointer-events: auto;
    /* 휠↔기록: footer column gap(1px)로 통일 */
    margin-top: 0;
}
#galleryContainer.moment-feed-layout-v2 .moment-v2-caption-footer .moment-v2-social-comments-panel,
#moment-v2-fixed-caption-layer .moment-v2-caption-footer .moment-v2-social-comments-panel {
    pointer-events: auto;
}
/* 휠 라벨(한 줄) 바로 아래 소셜 댓글 박스 — 1px 간격(요청 고정) */
#galleryContainer.moment-feed-layout-v2 .moment-v2-social-below-label {
    margin-top: 1px;
}
/* 모먼트2 소셜 댓글: 하단 시트(좌우 20px) + 스크림 — 열 때 JS가 패널을 body로 옮겨 transform 조상 밖에서 fixed */
html.mv2-social-comment-sheet-open {
    overflow: hidden;
}
body > .moment-v2-social-comments-panel.moment-v2-social-comments-panel--sheet-in-body {
    position: fixed !important;
    inset: 0;
    z-index: var(--z-comment-sheet);
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-sizing: border-box;
    background: transparent !important;
    isolation: isolate;
}
body > .moment-v2-social-comments-panel.moment-v2-social-comments-panel--sheet-in-body.hidden {
    display: none !important;
}
body > .moment-v2-social-comments-panel.moment-v2-social-comments-panel--sheet-in-body:not(.hidden) {
    display: flex !important;
    flex-direction: column;
    justify-content: flex-end;
    /* 앱 본문(max-w-md)과 동일한 최대폭으로 시트를 가운데 — PC 브라우저 전체폭에 늘어나 보이는 것 방지 */
    align-items: center;
}
body > .moment-v2-social-comments-panel.moment-v2-social-comments-panel--sheet-in-body .moment-v2-social-comments-sheet-root {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    width: 100%;
    max-width: min(28rem, 100%);
    margin-left: auto;
    margin-right: auto;
    max-height: 100%;
    min-height: 0;
    padding: 0 max(0px, env(safe-area-inset-left, 0px)) max(10px, env(safe-area-inset-bottom, 0px))
        max(0px, env(safe-area-inset-right, 0px));
    pointer-events: none;
    box-sizing: border-box;
}
body > .moment-v2-social-comments-panel.moment-v2-social-comments-panel--sheet-in-body .moment-v2-social-comments-scrim {
    position: fixed;
    inset: 0;
    z-index: 0;
    display: block;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background: var(--shell-dim);
    pointer-events: auto;
}
body > .moment-v2-social-comments-panel.moment-v2-social-comments-panel--sheet-in-body .moment-v2-social-comments-sheet {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    max-height: min(78dvh, 620px);
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-radius: var(--shell-r-sheet) var(--shell-r-sheet) 0 0;
    border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
    border-bottom: 0;
    background: var(--card);
    color: var(--ink);
    box-shadow: 0 -8px 32px rgba(36, 31, 28, 0.14);
    overflow: hidden;
    pointer-events: auto;
    transform: translate3d(0, 110%, 0);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}
body > .moment-v2-social-comments-panel.moment-v2-social-comments-panel--sheet-in-body:not(.hidden).comment-input-open .moment-v2-social-comments-sheet {
    transform: translate3d(0, 0, 0);
}
body > .moment-v2-social-comments-panel.moment-v2-social-comments-panel--sheet-in-body .moment-v2-social-comments-sheet-handle {
    /* 시각 바는 ::after, 히트 영역은 가로 전체·최소 ~44px */
    position: relative;
    flex: 0 0 auto;
    align-self: stretch;
    width: 100%;
    height: 2.75rem;
    margin: 0;
    border-radius: 0;
    background: transparent;
    touch-action: none;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
}
body > .moment-v2-social-comments-panel.moment-v2-social-comments-panel--sheet-in-body .moment-v2-social-comments-sheet-handle::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 2.25rem;
    height: 0.28rem;
    border-radius: 9999px;
    background: color-mix(in srgb, var(--muted) 45%, transparent);
    pointer-events: none;
}
body > .moment-v2-social-comments-panel.moment-v2-social-comments-panel--sheet-in-body .moment-v2-social-comments-sheet-handle:active {
    cursor: grabbing;
}
body > .moment-v2-social-comments-panel.moment-v2-social-comments-panel--sheet-in-body .moment-v2-social-comments-sheet-header {
    flex: 0 0 auto;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    touch-action: none;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
    padding: 0.35rem 1rem 0.55rem;
}
body > .moment-v2-social-comments-panel.moment-v2-social-comments-panel--sheet-in-body .moment-v2-social-comments-sheet-title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--ink);
}
body > .moment-v2-social-comments-panel.moment-v2-social-comments-panel--sheet-in-body .moment-v2-social-comments-sheet-count {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}
body > .moment-v2-social-comments-panel.moment-v2-social-comments-panel--sheet-in-body .moment-v2-social-comments-sheet-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: min(48vh, 400px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 1rem 0.35rem;
    position: relative;
}
/* 댓글이 있을 때: 빈 상태와 같은 Paper(--page) 톤 */
body > .moment-v2-social-comments-panel.moment-v2-social-comments-panel--sheet-in-body .moment-v2-social-comments-sheet-body:has(.moment-v2-social-comments-list.has-items) {
    background: var(--page);
    border-top: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
    padding-top: 0.35rem;
    padding-bottom: 0.5rem;
}

