@charset "utf-8";

/* [폰트 불러오기] 명조체(본문용) + 고딕체(브랜드헤더용) + 아이콘 */
@import url('https://fonts.googleapis.com/css2?family=Nanum+Myeongjo:wght@400;700;800&family=Noto+Sans+KR:wght@400;500;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* ==========================================================================
   1. 기본 설정 (Reset & Layout) - [기존 소스 기반]
   ========================================================================== */
body {
    background: #f1f1f1;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 15px;
    color: #444;
    margin: 0; padding: 0;
    overflow-x: hidden;
}

#basic_box {
    background: #fff;
    max-width: 480px;      /* 모바일 최적화 너비 */
    margin: 0 auto;        /* 중앙 정렬 */
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.03); /* 살짝 그림자 추가 */
}

/* 유틸리티 클래스 */
.text-myeongjo { font-family: 'Nanum Myeongjo', serif; }
.fw-bold { font-weight: 700; }
.fw-light { font-weight: 300; }
.clearfix::after { content: ""; display: block; clear: both; }
.float-left { float: left; }
.float-right { float: right; }
.d-none { display: none; }
a { text-decoration: none; color: inherit; }

/* ==========================================================================
   [0] 상단 브랜드 로고 (신규 추가됨)
   ========================================================================== */
.top-brand-header {
    position: relative; width: 100%; height: 95px;
    background-color: #fff;
    overflow: hidden;
    border-bottom: 1px solid #f5f5f5;
}
.header-flower-img {
    position: absolute; top: 0; left: 0; width: 100px; height: auto; z-index: 1;
}
.header-logo-area {
    position: absolute; top: 0; right: 15px; height: 36px;
    display: flex; align-items: center; justify-content: flex-end;
    z-index: 10; text-decoration: none;
}
.brand-logo-img { height: 16.5px; width: auto; display: block; object-fit: contain; }
.brand-text-fallback {
    font-family: 'Noto Sans KR', sans-serif; font-size: 15px; font-weight: 500; color: #777; letter-spacing: -0.5px;
}

/* ==========================================================================
   2. 부고 본문 타이포그래피 (기존 스타일 유지)
   ========================================================================== */
.msg-bugo-main {
    font-family: 'Nanum Myeongjo', serif;
    font-size: 20.3px;
    text-align: center;
    line-height: 1.6;
    font-weight: 400;
    margin-top: 30px;
    margin-bottom: 10px;
    color: #222;
}

.msg-goin-detail {
    font-size: 12pt;
    text-align: center;
    font-weight: 300;
    color: #666;
}

.msg-goin-position {
    font-size: 12pt;
    text-align: center;
    font-weight: 400;
    color: #666;
    margin-top: 15px;
    padding: 0 30px;
    word-break: keep-all;
}

.text-command-body {
    font-family: 'Nanum Myeongjo', serif;
    line-height: 1.6;
    font-size: 15.3px;
    padding-left: 5px;
    color: #444;
}

/* ==========================================================================
   3. 섹션 레이아웃 (간격 및 구조)
   ========================================================================== */
.section-wrap { padding: 0 30px; }
.section-wrap-narrow { padding: 0 25px; }

/* 섹션별 상단 여백 */
.section-sangju   { margin-top: 60px; }
.section-command  { margin-top: 50px; }
.section-schedule { margin-top: 50px; }
.section-funeral  { margin-top: 50px; }
.section-flower   { margin-top: 60px; }
.section-guest    { margin-top: 60px; }
.section-footer-banner { margin-top: 100px; margin-bottom: 0; }
.capture-footer   { margin-top: 80px; margin-bottom: 0; padding-bottom: 120px; }

/* 헤더 스타일 (리본 아이콘 + 제목) */
.header-section {
    display: flex; align-items: center; margin-bottom: 20px;
}
.header-icon {
    width: 12px; margin-right: 5px; padding-top: 2px; flex-shrink: 0;
}
.header-title {
    font-size: 13pt; color: #444; margin: 0;
}
.header-right { margin-left: auto; text-align: right; }

/* ==========================================================================
   4. 상주 정보 및 일정 (기존 스타일)
   ========================================================================== */
.sangju-list { padding-left: 5px; }
.sangju-row {
    display: flex; align-items: flex-start; margin-bottom: 10px;
}
.sj-relation {
    width: 70px; padding-top: 4px; flex-shrink: 0;
    font-family: 'Nanum Myeongjo', serif;
}
.sj-names {
    flex: 1; font-family: 'Nanum Myeongjo', serif;
    font-size: 15.3px; font-weight: bold; color: #555;
    line-height: 1.7; letter-spacing: 1.5px; word-break: keep-all;
}

.schedule-row {
    display: flex; align-items: flex-start; margin-bottom: 10px;
}
.info-table { width: 100%; border-collapse: collapse; }
.info-table td { vertical-align: top; padding-bottom: 5px; }
.icon-cell { width: 27px; color: #aaa; }

.btn-copy-address {
    height: 22px; background-color: #fff; border: 1px solid #ddd;
    font-size: 9.2pt; color: #999; border-radius: 3px;
    cursor: pointer; padding: 0 8px;
}
.link-write { font-size: 11pt; font-weight: 300; }

/* ==========================================================================
   [1] 상단/하단 플로팅 버튼 (글래스모피즘 & 액션버튼) - [신규]
   ========================================================================== */
.glass-menu-btn {
    position: fixed; top: 20px; right: 20px; z-index: 9991;
    width: 45px; height: 45px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border: 1px solid #eee; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; opacity: 0; visibility: hidden;
    transform: translateY(-10px); transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.glass-menu-btn.show { opacity: 1; visibility: visible; transform: translateY(0); }
.f-icon-top { font-size: 20px; color: #333; }

.bottom-action-group {
    position: fixed; bottom: 20px; right: 20px; z-index: 9990;
    display: flex; gap: 8px; align-items: flex-end;
}
.action-item { display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.action-item:active .circle-icon-box { transform: scale(0.95); }

.circle-icon-box {
    width: 46px; height: 46px; background-color: #fff;
    border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.10);
    overflow: hidden; padding: 0; transition: transform 0.2s;
    box-sizing: border-box;
}
.point-border { border: 1px solid #c3c3c3; } /* 근조화환 강조 테두리 */
.circle-icon-box img { width: 100%; height: 100%; object-fit: cover; display: block; }

.action-label {
    margin-top: 2px; background-color: #fff; border-radius: 3px;
    font-size: 11px; color: #777; letter-spacing: -0.5px;
    font-weight: 600; padding: 1px 4px;
}

/* ==========================================================================
   [2] 카카오맵 커스텀 오버레이 (말풍선) - [신규]
   ========================================================================== */
.custom-overlay {
    position: relative; bottom: 35px; border-radius: 5px;
    border: 1px solid #ccc; background-color: white;
    box-shadow: 0px 2px 3px rgba(0,0,0,0.15);
    padding: 8px 10px; text-align: center; font-size: 12px;
}
.custom-overlay::after {
    content: ''; position: absolute; bottom: -8px; left: 50%;
    transform: translateX(-50%); width: 0; height: 0;
    border-left: 8px solid transparent; border-right: 8px solid transparent;
    border-top: 8px solid white;
    filter: drop-shadow(0px 2px 1px rgba(0, 0, 0, 0.2));
}

/* ==========================================================================
   [3] 마음 전하는 곳 (계좌번호 섹션) - [신규]
   ========================================================================== */
.section-bank { margin-top: 60px; }
.bank-box {
    background-color: #fff; width: 100%;
    border: 1px solid #e0e0e0; border-radius: 3px;
    margin-top: 10px; box-sizing: border-box; padding: 15px;
    display: flex; justify-content: space-between; align-items: center;
}
.bank-text { display: flex; flex-direction: column; justify-content: center; }
.bank-info-top { font-size: 14px; color: #888; margin-bottom: 5px; font-weight: 400; }
.bank-num-text { font-size: 15.3px; color: #555; font-weight: 300; }
.bank-divider { color: #ccc; margin: 0 4px; font-size: 9pt; }
.btn-copy-bank {
    width: 50px; height: 32px; background-color: #f5f5f5;
    border: 1px solid #eee; font-size: 10pt; color: #555;
    border-radius: 6px; cursor: pointer; font-weight: 500;
}
.btn-copy-bank:hover { background-color: #e8e8e8; }
.bank-empty-msg { font-size: 10pt; color: #999; text-align: center; width: 100%; }

/* ==========================================================================
   [4] 본문 중간 화환 보내기 버튼 & 물음표 - [기존/신규 공통]
   ========================================================================== */
#flower_send {
    width: 78px; height: 32px; color: #777; font-size: 9.5pt;
    background: #f8f8f8; border-radius: 3px; border: 1px solid #d7d7d7;
    cursor: pointer;
}
#example_flower {
    width: 20px; height: 20px; color: #ba6e6d; background: #fee9e8;
    border-radius: 50%; border: 0px solid #aaa; cursor: pointer;
}
#close_flower {
    width: 30px; height: 30px; color: #333; background: #ffff;
    border: 0px solid #aaa; font-size: 15px; cursor: pointer;
}

/* ==========================================================================
   [5] 조문 메시지 (방명록) - [신규 스타일 적용]
   ========================================================================== */
.guest-box {
    background-color: #fff; width: 100%; border: 1px solid #ddd;
    border-radius: 3px; margin-top: 10px; padding: 15px; box-sizing: border-box;
}
.guest-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 8px; border-bottom: 1px solid #f9f9f9; padding-bottom: 5px;
}
.guest-name { font-size: 10pt; color: #333; font-weight: bold; }
.guest-date { font-size: 9pt; color: #999; }
.guest-content-wrap { font-size: 11pt; color: #444; line-height: 1.6; word-break: break-all; }
.btn-more, .btn-close {
    color: #888; font-size: 9pt; cursor: pointer;
    text-decoration: underline; margin-left: 5px;
}
.full-text { display: none; }
.guest-actions { text-align: right; }
.guest-btn { font-size: 9.5pt; color: #888; text-decoration: none; margin-left: 8px; }

/* ==========================================================================
   [6] 우측 사이드 메뉴 (드로어) - [신규]
   ========================================================================== */
.drawer-container {
    position: fixed; top: 0; right: 0;
    width: 75%; max-width: 300px; height: 100%; z-index: 9999;
    background: #fff; box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    overflow-y: auto;
    transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.drawer-container.open { transform: translateX(0); }
.drawer-header {
    padding: 20px 20px 15px; display: flex; align-items: center;
    justify-content: space-between; margin-bottom: 10px;
}
.drawer-title { font-size: 16px; font-weight: 600; color: #333; }
.btn-close-drawer { font-size: 26px; color: #999; cursor: pointer; padding: 5px; line-height: 1; }
.drawer-overlay {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 9998;
}

.menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 20px 30px; }
.d-menu-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: #f9f9f9; border-radius: 12px; padding: 15px 5px;
    text-decoration: none; color: #555; cursor: pointer; border: 1px solid #f0f0f0;
}
.d-menu-item:active { background: #eee; transform: scale(0.98); }
.d-icon {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    font-size: 20px; border-radius: 50%; background: #fff;
    margin-bottom: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); color: #666;
}
.d-text { font-size: 12px; font-weight: 500; letter-spacing: -0.5px; color: #333; }
.bg-1 { background: #E3F2FD; color: #2196F3; }
.bg-3 { background: #FFF3E0; color: #FF9800; }
.bg-5 { background: #ECEFF1; color: #455A64; }

.navi-expand {
    display: none; grid-column: 1 / -1;
    background: #f0f2f5; padding: 15px; border-radius: 12px; margin-top: 0; margin-bottom: 0;
}
.navi-btn {
    display: flex; align-items: center; padding: 10px; font-size: 13px; color: #333;
    text-decoration: none; border-bottom: 1px solid #e0e0e0; background: #fff;
    margin-bottom: 5px; border-radius: 8px;
}
.navi-btn:last-child { margin-bottom: 0; }
.navi-btn div {
    width: 24px; height: 24px; border-radius: 50%; text-align: center;
    line-height: 24px; color: #fff; font-weight: 900; font-size: 11px;
    margin-right: 10px; flex-shrink: 0;
}

/* ==========================================================================
   7. 팝업 및 하단 고정 요소 (Legacy & New)
   ========================================================================== */
/* Legacy 팝업 (전체화면) - 기존 호환용 */
#ex_flower_pop, #visit_manner_pop {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 10000;
}
#ex_flower_popmenu, #visit_manner_popmenu {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 320px; max-width: 90%; background: #fff; border-radius: 10px; overflow: hidden;
}
#ex_flower_popmenu { height: 480px; background: #f7f7f7; }
#visit_manner_popmenu { height: 480px; padding-top: 40px; }
#ex_flower_exit, #visit_manner_exit {
    position: absolute; right: 10px; top: 20px;
    width: 30px; height: 30px; background: #fff; font-size: 17pt;
    border: none; cursor: pointer; z-index: 10;
}
#visit_manner {
    background-color: #fff; border: 1px solid #ddd; border-radius: 5px;
    padding: 10px; display: flex; align-items: center; justify-content: center;
    width: 100%; box-sizing: border-box; cursor: pointer;
}

/* ==========================================================================
   [7] 하단 팝업 시트 (공유하기 & 근조화환) - [신규 적용]
   ========================================================================== */
#send_bugo_pop, #flower_sheet {
    display: block !important; position: fixed; bottom: 0; left: 0;
    width: 100%; height: auto !important; top: auto !important;
    z-index: 9999; background: #fff; border-radius: 20px 20px 0 0;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.15);
    transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#send_bugo_pop { padding-bottom: 35px; max-height: 90vh; overflow-y: auto; }
#send_bugo_pop.open, #flower_sheet.open { transform: translateY(0); }

#send_bugo_pop .drawer-header, #flower_sheet .drawer-header {
    display: block; position: relative; text-align: center;
    padding: 15px 0 10px; border: none; background: transparent;
}
.drawer-handle-bar {
    width: 40px; height: 5px; background: #e0e0e0;
    border-radius: 5px; margin: 0 auto 15px auto;
}
.btn-close-sheet {
    position: absolute; top: 15px; right: 20px;
    font-size: 28px; color: #999; cursor: pointer;
    line-height: 1; width: auto; height: auto;
}

/* 공유하기 그리드 */
.share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; padding: 10px 25px 20px; }
.share-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: #fff; cursor: pointer; padding: 10px 0;
    border-radius: 10px; transition: 0.1s;
}
.share-item:active { transform: scale(0.95); background: #f9f9f9; }
.share-icon-img { width: 50px; height: 50px; margin-bottom: 8px; object-fit: contain; }
.share-text { font-size: 13px; color: #333; font-weight: 500; }

/* 편의기능 배너 버튼 (공유 팝업 내부) */
.convenience-banner-btn {
    width: calc(100% - 50px); margin: 0 auto; background: #f8f9fa;
    border: 1px solid #eee; border-radius: 12px; padding: 14px 0;
    cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center; position: relative;
}
.convenience-banner-btn:active { background: #f0f0f0; transform: scale(0.98); }
.c-content-group { display: flex; align-items: center; justify-content: center; gap: 6px; }
.c-banner-text { font-size: 14px; color: #444; font-weight: 600; letter-spacing: -0.5px; }
.c-banner-sub { font-size: 12px; color: #888; font-weight: 400; }
.c-arrow-icon { position: absolute; right: 15px; color: #bbb; font-size: 12px; transition: transform 0.3s; }
.convenience-banner-btn.active .c-arrow-icon { transform: rotate(180deg); }

/* 확장 영역 아이콘 */
#convenience_expand_area { display: none; padding: 20px 25px 10px; background: #fff; }
.conv-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.conv-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: #fcfcfc; border: 1px solid #f0f0f0; border-radius: 10px; padding: 15px 5px;
    cursor: pointer; text-decoration: none;
}
.conv-item:active { background: #f0f0f0; }
.conv-icon {
    font-size: 20px; color: #555; margin-bottom: 8px; width: 36px; height: 36px;
    background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.conv-text { font-size: 12px; color: #333; letter-spacing: -0.5px; }
.ic-flower { color: #ba6e6d; } .ic-bank { color: #2196F3; } .ic-map { color: #FF9800; }
.ic-navi { color: #455A64; } .ic-park { color: #9C27B0; } .ic-img { color: #E91E63; }

/* ==========================================================================
   8. 애니메이션 및 하단 배너
   ========================================================================== */
.scroll_wrap { overflow: hidden; }
.scroll_on { opacity: 0; transition: all 0.8s; }
.scroll_on.active { opacity: 1 !important; transform: translate(0, 0) !important; }
.scroll_on.type_bottom { transform: translate(0, 100px); }

#pixfooter {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 480px; text-align: center; pointer-events: none; z-index: 500;
}
#sample_pix {
    position: fixed; top: 0; width: 100%; z-index: 999; pointer-events: none;
}