/* 기본 리셋 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body, html { 
    width: 100%; 
    height: 100svh; /* svh 적용 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f3f4f6; 
    overflow: hidden; /* 전체 스크롤 방지 */
}
ul, li { list-style: none; }

/* 레이아웃 wrapper 수정 */
#layout-wrapper { 
    display: flex; 
    width: 100%; 
    height: 100svh; /* svh 적용 */
    overflow: hidden; 
    background-color: white; 
}
#app-container { flex: 1; position: relative; display: flex; flex-direction: column; }

/* 헤더 */
#app-header {
    height: 50px;
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    padding: 0 16px;
    background-color: #ffffff; 
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    z-index: 20; 
    flex-shrink: 0;
}
.header-brand { display: flex; align-items: center; gap: 8px; transition: opacity 0.2s; }
.header-brand:active { opacity: 0.7; }
.brand-icon { font-size: 22px; }
.brand-title { 
    font-size: 17px;
    font-weight: 800; 
    color: #111827; 
    letter-spacing: -0.5px; 
}
#auth-container {
    display: flex;
    align-items: center;
    padding-right: 0; /* 우측 컨테이너 여백 제거 */
}
#user-status { font-size: 14px; color: #6b7280; font-weight: 600; }

/* 지도 */
#map { width: 100%; flex: 1; z-index: 0; }

/* FAB 버튼 */
.fab-btn {
    position: absolute; 
    bottom: calc(25px + env(safe-area-inset-bottom, 20px));
    right: 20px;
    width: 50px; height: 50px; 
    border-radius: 50%;
    background-color: #2563EB; 
    color: white; 
    border: none;
    font-size: 13px; 
    font-weight: 600; 
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    z-index: 5; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    line-height: 1.2;
}
.fab-btn:active { transform: scale(0.92); }

/* 버튼 비활성화 */
.fab-btn.disabled {
    background-color: #9ca3af;
    box-shadow: 0 4px 12px rgba(156, 163, 175, 0.3);
    cursor: not-allowed;
    pointer-events: none;
}

/* 글쓰기 모드 버튼 스타일 */
.fab-btn.write-mode {
    background-color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    animation: writeModeGlow 1.5s ease-in-out infinite;
}

@keyframes writeModeGlow {
    0%, 100% { 
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    }
    50% { 
        box-shadow: 0 4px 20px rgba(239, 68, 68, 0.7);
    }
}

.refresh-btn {
    bottom: calc(155px + env(safe-area-inset-bottom, 20px));
    background-color: white; 
    color: #2563EB; 
    font-size: 18px; 
}

.my-location-btn {
    bottom: calc(90px + env(safe-area-inset-bottom, 20px));
    background-color: white; 
    color: #2563EB; 
    font-size: 18px; 
}

/* 스피너 */
.global-spinner {
    position: absolute;
    top: 65px;
    right: 20px;
    width: 40px; height: 40px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    color: #2563EB; font-size: 20px;
}

/* 위치 로딩 */
.location-loading {
    position: absolute;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    z-index: 50;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.location-loading i {
    font-size: 18px;
    animation: locationPulse 1.2s infinite;
}
@keyframes locationPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* 줌 경고 */
.zoom-warning {
    position: absolute;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    z-index: 50;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    text-align: center;
}

.doodle-marker {
    position: relative;
    width: 42px; 
    height: 42px;
    /* 🔥 핵심: 한쪽 모서리만 0으로 설정하여 뾰족하게 만듦 */
    border-radius: 50% 50% 50% 0; 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 3px solid white;
    /* 🔥 본체를 회전시켜 뾰족한 곳이 아래로 가게 함 */
    transform: rotate(-45deg); 
    display: flex; 
    align-items: center; 
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    cursor: pointer;
}

/* 내부 이모지와 배지가 똑바로 보이도록 반대로 회전 */
.marker-content-wrapper {
    transform: rotate(45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.doodle-marker:hover { transform: rotate(-45deg) scale(1.1); }
.doodle-marker:active { transform: rotate(-45deg) scale(0.95); }
/* 마커 하단 뾰족한 부분 삭제 (더 이상 필요 없음) */
.doodle-marker::after { display: none; }

.marker-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* 패널 */
.bottom-panel {
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 100%;
    background: #ffffff; 
    border-top-left-radius: 24px; 
    border-top-right-radius: 24px;
    box-shadow: 0 -8px 20px rgba(0,0,0,0.15); 
    z-index: 2000;
    display: flex; 
    flex-direction: column;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform: translateY(110%);
    max-height: 80vh;
    overflow-y: auto;
}
.bottom-panel.active { transform: translateY(0); }
.auto-height { height: auto; }
.full-height { height: 90%; }

/* 패널 헤더 */
.panel-header { 
    padding: 16px 20px 8px 20px; 
    text-align: left; 
}
.panel-header h3 { 
    font-size: 18px; 
    color: #1f2937; 
    font-weight: 700; 
}
/* 서브타이틀 및 주소 공통 스타일 */
.write-subtitle {
    font-size: 13px;
    color: #6b7280; /* 부드러운 회색 */
    margin-top: 4px;
    font-weight: 400;
    line-height: 1.4;
    word-break: keep-all; /* 단어 단위 줄바꿈으로 깔끔하게 */
}

/* 주소 텍스트에만 약간의 추가 마진 (필요 시) */
.address-text {
    margin-top: 2px; /* 서브타이틀 바로 아래 붙어서 나오도록 설정 */
    opacity: 0.9;    /* 아주 살짝 투명도를 주어 미세한 위계 형성 */
}


.panel-header-row {
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    padding: 12px 20px 8px 20px; 
    border-bottom: 1px solid #f3f4f6;
}
.title-area { 
    display: flex; 
    flex-direction: column; 
    gap: 2px; 
}
#detail-title { 
    font-size: 18px; 
    font-weight: 700; 
    color: #111827; 
}
#detail-subtitle {
    font-size: 12px;
    color: #9ca3af;
}
.detail-date { 
    font-size: 12px; 
    color: #9ca3af; 
}

/* 패널 컨텐츠 */
.panel-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 20px;
}

/* 낙서 목록 */
#doodle-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.doodle-card {
    background: #f9fafb;
    border-radius: 14px;
    padding: 10px 10px;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.doodle-card.first-doodle {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
}

.first-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f59e0b;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 10px;
    margin-bottom: 8px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.card-date {
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
}

.card-time {
    font-weight: 400;
    color: #9ca3af;
    font-style: italic;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footprint {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6b7280;
}

.btn-delete-small {
    background: #ef4444;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}
.btn-delete-small:active {
    background: #dc2626;
}

.card-content {
    position: relative;
}

.doodle-text {
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 잠금 오버레이 */
.locked-overlay {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
}
.locked-overlay i {
    font-size: 32px;
    color: #9ca3af;
    margin-bottom: 12px;
}
.locked-overlay p {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
    margin: 0;
}
.distance-text {
    font-weight: 700;
    color: #ef4444;
    margin-top: 8px !important;
}
.hint-text {
    font-size: 12px !important;
    color: #9ca3af;
    margin-top: 8px !important;
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}
.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}
.empty-state p {
    font-size: 15px;
    line-height: 1.6;
    margin: 5px 0;
}
.empty-subtext {
    font-size: 13px !important;
    color: #d1d5db !important;
}

.loading-text, .error-text {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
    font-size: 14px;
}
.error-text {
    color: #ef4444;
}

/* 패널 푸터 */
.panel-footer {
    padding: 0 20px 30px 20px; 
    display: flex; 
    gap: 12px; 
    background: white; 
    margin-top: auto;
    flex-shrink: 0;
}
.panel-footer button {
    flex: 1; 
    height: 52px; 
    border: none; 
    border-radius: 12px;
    font-size: 16px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: opacity 0.2s;
}
.panel-footer button:active { opacity: 0.8; }
.panel-footer button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-left { 
    background-color: #F3F4F6; 
    color: #4B5563; 
}
.btn-right { 
    background-color: #2563EB; 
    color: white; 
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2); 
}
.btn-close-theme {
    background-color: #f3f4f6;
    color: #4b5563;
}

/* 폼 스타일 */
.form-group { margin-bottom: 24px; }
.form-label { 
    display: block; 
    font-size: 14px; 
    font-weight: 700; 
    color: #111827; 
    margin-bottom: 8px; 
}
.form-label .req { 
    color: #ef4444; 
    margin-left: 2px; 
}

/* 비밀번호 입력 wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.password-input-wrapper .form-input {
    padding-right: 48px;
}
.btn-toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-toggle-password:hover {
    color: #6b7280;
}

.form-input {
    width: 100%; 
    height: 48px; 
    padding: 0 16px;
    border: 1px solid #d1d5db; 
    border-radius: 12px; 
    font-size: 16px; 
    color: #111827; 
    outline: none;
    transition: border-color 0.2s;
}
.form-input:disabled {
    background-color: #f3f4f6; 
    color: #6b7280; 
    border-color: #e5e7eb; 
    cursor: not-allowed; 
}
.form-input:focus { 
    border-color: #2563EB; 
}
.form-textarea {
    width: 100%; 
    height: 150px; 
    padding: 16px;
    border: 1px solid #d1d5db; 
    border-radius: 12px; 
    font-size: 16px; 
    resize: none; 
    outline: none;
    font-family: inherit;
}
.form-textarea:focus { 
    border-color: #2563EB; 
}
.char-count-text {
    position: absolute;
    bottom: -20px;
    right: 5px;
    font-size: 12px;
    color: #9ca3af;
}
.form-hint {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 6px;
}

.info-banner {
    background: #eff6ff;
    border-left: 4px solid #2563EB;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #1e40af;
    line-height: 1.5;
}
.info-banner i {
    flex-shrink: 0;
    margin-top: 2px;
}

/* 모달 */
/* 수정 */
.custom-modal-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); 
    /* 🔥 z-index를 9999보다 높은 10001로 변경하세요 */
    z-index: 10001; 
    display: none; 
    align-items: center; 
    justify-content: center;
    opacity: 0; 
    transition: opacity 0.2s;
}
.custom-modal-overlay.show { opacity: 1; }

/* 소개 모달(about-modal) 레이아웃 깨짐 수정 */
.custom-modal-box {
    background: white; 
    width: 90%; 
    max-width: 400px; 
    padding: 24px;
    border-radius: 20px; 
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transform: scale(0.9); 
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    max-height: 85dvh; /* 모달 최대 높이 제한 */
}
.custom-modal-overlay.show .custom-modal-box { 
    transform: scale(1); 
}

.custom-modal-title { 
    font-size: 18px; 
    font-weight: 700; 
    color: #111827; 
    margin-bottom: 12px; 
    flex-shrink: 0; 
}

.modal-scroll-content {
    flex: 1;
    overflow-y: auto; /* 내부 스크롤 보장 */
    padding-right: 4px;
    text-align: left;
}
.custom-modal-desc { 
    font-size: 14px; 
    color: #6b7280; 
    line-height: 1.5;
}

.custom-modal-actions {
    display: flex; 
    gap: 10px; 
    flex-shrink: 0;
}
.custom-modal-btn {
    flex: 1;
    height: 48px; 
    border-radius: 12px; 
    border: none; 
    font-size: 15px; 
    font-weight: 600; 
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top:10px;
}
.btn-modal-cancel {
    background-color: #f3f4f6; 
    color: #4b5563;
}
.btn-modal-cancel:active { 
    background-color: #e5e7eb; 
}
.btn-modal-confirm {
    background-color: #2563EB; 
    color: white;
}
.btn-modal-confirm:active { 
    background-color: #1d4ed8; 
}
.btn-action-primary {
    background-color: #2563EB; 
    color: white;
}
.btn-action-primary:active { 
    background-color: #1d4ed8; 
}

/* 소개 모달 */
.compact-modal.tabbed-modal {
    padding: 30px 24px; /* 여백 확대 */
    max-width: 420px;
    border-radius: 28px; /* 더 부드러운 곡선 */
}

.text-left { 
    text-align: left; 
}
.intro-text {
    text-align: center;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.5;
}
.info-box {
    background: #f9fafb;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
}
.info-box h4 {
    font-size: 14px;
    color: #111827;
    margin-bottom: 8px;
}
.info-box ul {
    font-size: 13px;
    color: #374151;
    line-height: 1.6;
}
.info-box li {
    margin-bottom: 4px;
}
.warning-box {
    background-color: #fff1f2;
    color: #e11d48;
    font-size: 12px;
    font-weight: 600;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    line-height: 1.4;
    margin-bottom: 15px;
}
.app-info-footer {
    text-align: center;
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.4;
}
.app-info-footer p { 
    margin: 0; 
}

/* 토스트 알림 */
#toast-container {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 14px 32px; /* 좌우 여백을 32px로 대폭 확대 */
    border-radius: 30px; 
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    
    /* 한 줄로 나오도록 설정 */
    white-space: nowrap; 
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.toast-success {
    background: rgba(34, 197, 94, 0.95);
}
.toast-error {
    background: rgba(239, 68, 68, 0.95);
}
.toast-info {
    background: rgba(59, 130, 246, 0.95);
}

/* 반응형 */
body {
    padding-bottom: env(safe-area-inset-bottom);
}

/* 스크롤바 숨김 */
.bottom-panel::-webkit-scrollbar {
    display: none;
}
.bottom-panel {
    scrollbar-width: none;
}

/* 사용자 위치 마커 */
.user-location-marker {
    position: relative;
    width: 20px;
    height: 20px;
}
.user-location-marker .center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: #3B82F6;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    z-index: 2;
}
.user-location-marker .pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

/* 경고 배너 */
.warning-banner {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    color: #991b1b;
    line-height: 1.5;
    margin-top: 12px;
}
.warning-banner i {
    flex-shrink: 0;
    margin-top: 2px;
    color: #ef4444;
}

/* 신고 버튼 */
.btn-report-small {
    background: #f3f4f6;
    color: #6b7280;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}
.btn-report-small:hover {
    background: #fee2e2;
    color: #ef4444;
}
.btn-report-small:active {
    background: #fecaca;
}

/* 신고 배지 (관리자용) */
.report-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fef2f2;
    color: #ef4444;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
}

/* 신고 모달 */
.report-reasons {
    text-align: left;
    background: #f9fafb;
    padding: 15px;
    border-radius: 12px;
    margin: 15px 0;
    font-size: 13px;
    color: #374151;
    line-height: 1.8;
}
.report-reasons li {
    margin-bottom: 4px;
}
.report-notice {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    margin-top: 10px;
}

/* 탭 모달 */
.tabbed-modal {
    max-width: 420px;
}
.modal-tabs {
    display: flex;
    flex-shrink: 0; /* 탭 메뉴는 줄어들지 않게 */
    gap: 0;
    margin-bottom: 15px;
    background: #f3f4f6;
    border-radius: 10px;
    padding: 4px;
}
.tab-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}
.tab-btn.active {
    background: white;
    color: #111827;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.modal-tab-content {
    display: none;
    flex: 1; /* 남은 공간 차지 */
    min-height: 0; /* 스크롤 작동을 위한 설정 */
}
.modal-tab-content.active {
    display: flex;
    flex-direction: column;
}

/* 개인정보처리방침 스타일 */
.privacy-content {
    font-size: 12px;
    line-height: 1.6;
    max-height: 350px;
}
.privacy-content h4 {
    font-size: 15px;
    color: #111827;
    margin-bottom: 5px;
}
.privacy-date {
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 15px;
}
.privacy-section {
    margin-bottom: 15px;
}
.privacy-section h5 {
    font-size: 13px;
    color: #374151;
    margin-bottom: 6px;
    font-weight: 600;
}
.privacy-section p,
.privacy-section ul {
    color: #6b7280;
    margin-bottom: 6px;
}
.privacy-section ul {
    padding-left: 0;
}
.privacy-section li {
    margin-bottom: 3px;
}

.search-btn {
    /* 다른 버튼들보다 위쪽에 배치 (기존 버튼 높이 간격을 고려) */
    bottom: calc(220px + env(safe-area-inset-bottom, 20px));
    background-color: white; 
    color: #2563EB; 
    font-size: 18px; 
}

/* ========================================
   장소 검색 버튼 - 왼쪽 상단 플로팅
   ======================================== */
.btn-search-floating {
    position: absolute;
    top: 65px;         
    left: 16px;        
    z-index: 15;       
    
    background-color: white;
    color: #2563EB;
    white-space: nowrap;
    flex-shrink: 0; 
    
    border: none;
    padding: 10px 18px;
    border-radius: 25px; 
    
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    
    transition: transform 0.1s, background-color 0.2s;
}

.btn-search-floating:active {
    background-color: #eff6ff;
    transform: scale(0.95);
}

.btn-search-floating i {
    color: #2563EB; 
}

/* 장소 검색 모달 - 상단 배치 */
.search-modal-top {
    align-items: flex-start;
    padding-top: 120px;
}

/* style.css 등에 추가 */
button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    filter: grayscale(0.5); /* 약간 회색빛으로 변경 */
}


/* 하단에 추가 */

#pc-block-screen {
    display: none; /* 기본은 숨김 */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: #f8fafc;
    z-index: 9999;
    overflow-y: auto;
}

/* PC 너비에서만 활성화 */
@media (min-width: 800px) {
    #pc-block-screen { display: flex; align-items: center; justify-content: center; }
    #layout-wrapper { display: none !important; } /* 기존 앱 화면 숨김 */
}

/* 좁고 깔끔한 컨테이너 설정 */
.pc-block-container {
    width: 90%;
    max-width: 420px; /* 화면이 너무 넓게 보이지 않도록 제한 */
    background: white;
    padding: 40px 24px;
    border-radius: 32px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    text-align: center;
}

.pc-icon { font-size: 60px; display: block; margin-bottom: 16px; }
.pc-block-content h1 { font-size: 26px; font-weight: 800; color: #111827; margin-bottom: 12px; }
.pc-desc { font-size: 15px; color: #4b5563; line-height: 1.6; margin-bottom: 30px; }

.qr-section {
    background: #f1f5f9;
    padding: 24px;
    border-radius: 20px;
    margin-bottom: 24px;
}
.qr-section p { font-size: 13px; font-weight: 700; color: #2563eb; margin-bottom: 12px; }
.qr-section img { border-radius: 8px; border: 4px solid white; }

.pc-hint { font-size: 12px; color: #9ca3af; }

/* 추가 */
/* */

/* 1. 상단 헤더 공유 아이콘 버튼 (세련된 테두리 디자인) */

/* 마우스 올렸을 때와 클릭 시 효과 */
@media (hover: hover) {
    .btn-icon-only:hover {
        background: #f1f5f9;
        border-color: #cbd5e1;
        transform: translateY(-1px);
    }
}

/* 2. 소개 모달 내 친구 초대 박스 (정갈한 카드 형태) */
.share-invite-box {
    background: #f8fafc;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    margin-bottom: 24px;
    margin-top: 20px;
}

.share-invite-box p {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 12px;
}

/* 3. 앱 공유 버튼 (브랜드 컬러 그라데이션) */
.btn-share-full {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
    transition: all 0.2s ease;
}

.btn-share-full:active {
    opacity: 0.9;
    transform: scale(0.98);
}


.btn-icon-only {
    background: #f1f5f9;
    border: none; /* 테두리 제거 */
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #2563eb;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-icon-only:active {
    background: #e2e8f0;
    transform: scale(0.92);
}

.btn-pc-share {
    margin-top: 15px;
    width: 100%;
    height: 44px;
    background-color: #2563eb; /* 버튼을 더 강조하기 위해 파란색으로 변경 */
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

/* 하단에 추가 */

.pc-copy-msg {
    display: none; /* 기본적으로 숨김 */
    margin-top: 12px;
    font-size: 14px;
    color: #2563eb; /* 브랜드 파란색 */
    font-weight: 700;
    animation: fadeIn 0.3s; /* 부드럽게 나타나는 효과 */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* style.css 하단 추가 */

.brand-info-icon {
    font-size: 13px;      /* 제목보다 약간 작게 */
    color: #9ca3af;       /* 연한 회색으로 부담스럽지 않게 */
    margin-left: -4px;    /* 제목과 너무 떨어지지 않도록 미세 조정 (gap 영향) */
    opacity: 0.8;
    transition: color 0.2s;
}

/* 헤더 클릭 시 아이콘 색상 변화 효과 */
.header-brand:active .brand-info-icon {
    color: #2563eb;       /* 클릭 시 파란색으로 하이라이트 */
}

/* style.css 추가 */
#auth-container {
    display: flex;
    align-items: center;
    padding-right: 0px; /* 우측 여백 살짝 추가 */
}

/* 헤더 공유 버튼 세련되게 수정 */

#btn-header-share {
    background: transparent;
    border: none;
    width: 34px;           /* 버튼 전체 크기 살짝 축소 */
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 🔥 인포 아이콘 색상(#9ca3af) 및 투명도(0.8)와 일치 */
    color: #9ca3af; 
    opacity: 0.8;
    /* 🔥 아이콘 크기 축소 (기존 20px -> 17px) */
    font-size: 17px; 
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 8px;
    /* 🔥 오른쪽 끝으로 더 붙이기 위해 음수 마진 사용 */
    margin-right: -10px; 
}

/* 터치/클릭 시 반응: 인포 아이콘의 active 효과와 통일 */
#btn-header-share:active {
    background-color: rgba(0, 0, 0, 0.05);
    color: #2563eb;       /* 클릭 시 파란색으로 하이라이트 */
    opacity: 1;
    transform: scale(0.92);
}

/* 아이콘 위치 보정 (화살표 솟은 느낌 유지) */
#btn-header-share i {
    margin-top: -1px;
}

/* 책 펼치는 로더 스타일 */

.book-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 45px 0;
    gap: 10px;
}

/* 책 형태 및 애니메이션 */
.book-wrapper {
    width: 32px;
    height: 12px;
    position: relative;
    background: #e2e8f0;
    border-radius: 2px;
}

.book-page {
    width: 30px;
    height: 40px;
    background: #2563eb; /* 브랜드 파란색 */
    position: absolute;
    top: -34px;
    left: 1px;
    transform-origin: left bottom;
    animation: pageFlip 1.2s infinite ease-in-out;
    border-radius: 2px 4px 4px 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@keyframes pageFlip {
    0% { transform: rotateY(0deg); background: #2563eb; }
    50% { background: #3b82f6; }
    100% { transform: rotateY(-180deg); background: #2563eb; }
}

/* 로딩 문구 스타일 */
.loading-msg {
    font-size: 14px;
    color: #64748b;
    font-weight: 600;
    letter-spacing: -0.02em;
    animation: pulseText 1.5s infinite;
}

@keyframes pulseText {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* 공유된 마커 하이라이트 효과 */
.shared-marker-highlight {
    position: relative;
    width: 120px;
    height: 120px;
}

.highlight-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 3px solid #3B82F6;
    animation: highlightPulse 1.5s ease-out infinite;
}

.highlight-ring.ring-1 {
    width: 40px;
    height: 40px;
    animation-delay: 0s;
}

.highlight-ring.ring-2 {
    width: 70px;
    height: 70px;
    animation-delay: 0.3s;
}

.highlight-ring.ring-3 {
    width: 100px;
    height: 100px;
    animation-delay: 0.6s;
}

@keyframes highlightPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
        border-color: #3B82F6;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
        border-color: #93C5FD;
    }
}

/* ===== PWA 설치 버튼 (헤더) ===== */
.btn-pwa-install {
    position: relative;
    color: #2563EB !important;
    animation: pwaIconPulse 2s ease-in-out infinite;
}

.btn-pwa-install::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
}

@keyframes pwaIconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* iOS 설치 가이드 */
.ios-install-guide {
    padding: 16px 0;
}

.ios-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.ios-step:last-child {
    border-bottom: none;
}

.step-num {
    width: 24px;
    height: 24px;
    background: #2563EB;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.ios-step span {
    font-size: 14px;
    color: #374151;
}

.ios-step i {
    color: #2563EB;
}

/* 인앱 브라우저 설치 안내 모달 */
.pwa-install-guide {
    padding: 20px 0;
}

.pwa-install-desc {
    text-align: center;
    padding: 16px;
    background: #f0f9ff;
    border-radius: 12px;
    margin-bottom: 16px;
}

.pwa-install-desc i {
    font-size: 40px;
    color: #2563EB;
    margin-bottom: 12px;
}

.pwa-install-desc p {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
    margin: 0;
}

.pwa-install-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #fef3c7;
    border-radius: 8px;
}

.pwa-install-note i {
    color: #f59e0b;
    font-size: 14px;
    flex-shrink: 0;
}

.pwa-install-note span {
    font-size: 13px;
    color: #92400e;
}