/* ============================================================
   PinKids — 메인 스타일시트
   모바일 퍼스트 (375px) + PC 반응형 (768px+)
   ============================================================ */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #FF6B9D;
    --color-primary-light: #FFE0EC;
    --color-primary-dark: #E0527E;
    --color-text: #1A1A1A;
    --color-text-secondary: #666;
    --color-text-light: #999;
    --color-bg: #FFFFFF;
    --color-bg-gray: #F5F5F7;
    --color-border: #E8E8E8;
    --color-success: #34C759;
    --color-warning: #FF9500;
    --color-error: #FF3B30;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --header-height: 56px;
    --filter-height: 48px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
    touch-action: manipulation;
}

/* ============================================================
   Header
   ============================================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 var(--spacing-sm);
    gap: var(--spacing-sm);
}

.btn-menu, .btn-profile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    transition: background 0.2s;
}

.btn-menu:hover, .btn-profile:hover {
    background: var(--color-bg-gray);
}

/* 로그인된 프로필 버튼 */
.btn-profile.logged-in {
    padding: 0;
    overflow: hidden;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    border: 2px solid var(--color-primary);
}
.btn-profile .profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.btn-profile .profile-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--color-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border-radius: 50%;
}

/* 프로필 드롭다운 */
.profile-wrapper {
    position: relative;
}
.profile-dropdown {
    display: none;
    position: absolute;
    top: 44px;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    min-width: 160px;
    z-index: 9999;
    overflow: hidden;
}
.profile-dropdown.open {
    display: block;
}
.profile-dropdown-name {
    padding: 14px 16px 10px;
    font-size: 15px;
    font-weight: 600;
    color: #111;
    border-bottom: 1px solid #f0f0f0;
}
.profile-dropdown-item {
    display: block;
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
}
.profile-dropdown-item:hover {
    background: #f8f8f8;
}
.profile-dropdown-item.logout {
    color: #E5004F;
    border-top: 1px solid #f0f0f0;
}

.btn-menu span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--color-text);
    margin: 3px 0;
    border-radius: 1px;
}

.search-bar {
    flex: 1;
    display: flex;
    align-items: center;
    height: 40px;
    background: var(--color-bg-gray);
    border-radius: var(--radius-full);
    padding: 0 var(--spacing-sm) 0 var(--spacing-md);
    transition: background 0.2s, box-shadow 0.2s;
}

.search-bar:focus-within {
    background: var(--color-bg);
    box-shadow: 0 0 0 2px var(--color-primary);
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--color-text);
    outline: none;
}

.search-bar input::placeholder {
    color: var(--color-text-light);
}

.btn-search {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--color-text-secondary);
}

/* ============================================================
   Map
   ============================================================ */
.map-container {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* ============================================================
   Filter Bar
   ============================================================ */
.filter-bar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: var(--filter-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    z-index: 10;
    border-bottom: 1px solid var(--color-border);
}

.filter-scroll {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 8px;
    gap: 6px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filter-scroll::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-bg);
    font-size: 13px;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
}

.filter-chip:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.filter-chip.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.filter-sep {
    width: 1px;
    height: 24px;
    background: #ddd;
    flex-shrink: 0;
    margin: 0 2px;
    align-self: center;
}
.filter-divider {
    background: var(--color-bg-gray) !important;
    border-color: #ddd !important;
    font-weight: 600;
    color: #666 !important;
    flex-shrink: 0;
    min-width: 56px;
    justify-content: center;
}
.filter-divider.has-active {
    background: #fff0f5 !important;
    border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
}
.filter-more-btn {
    background: var(--color-bg-gray) !important;
    border-color: var(--color-bg-gray) !important;
    font-weight: 700;
}

/* 모바일: PC전용 필터 숨김, 더보기 표시 */
.pc-only { display: none; }

/* PC: PC전용 필터 표시, 더보기 숨김 */
@media (min-width: 768px) {
    .pc-only { display: inline-flex !important; }
    .filter-more-btn { display: none !important; }
    .filter-divider { display: none !important; }
}

/* 필터 펼치기 레이어 — 모바일: 하단시트, PC: 상단 드롭다운 */
.filter-expand-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9000;
    background: rgba(0,0,0,0.4);
    animation: fadeIn 0.2s ease;
}

.filter-expand-sheet {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    max-height: 70vh;
    background: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 0 var(--spacing-md) var(--spacing-md);
    padding-bottom: calc(var(--spacing-md) + var(--safe-bottom));
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.filter-expand-handle {
    display: flex;
    justify-content: center;
    padding: 10px 0 6px;
    cursor: grab;
}

.filter-expand-handle::before {
    content: '';
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: #D1D1D6;
}

.filter-expand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
}

.filter-expand-title {
    font-size: 17px;
    font-weight: 700;
}

.filter-expand-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--color-bg-gray);
    border-radius: 50%;
    font-size: 18px;
    color: var(--color-text-secondary);
    cursor: pointer;
}

.filter-expand-section {
    padding: 14px 0;
    border-top: 1px solid var(--color-bg-gray);
}

.filter-expand-section h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-light);
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.filter-expand-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-expand-chips .filter-chip {
    height: 38px;
    padding: 0 14px;
    font-size: 14px;
}

.filter-expand-actions {
    display: flex;
    gap: 8px;
    padding-top: 16px;
}

.filter-reset-btn {
    flex: 1;
    height: 48px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: white;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-secondary);
    cursor: pointer;
}

.filter-apply-btn {
    flex: 2;
    height: 48px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--color-primary);
    font-size: 15px;
    font-weight: 700;
    color: white;
    cursor: pointer;
}

.filter-apply-btn:active {
    background: var(--color-primary-dark);
}

/* PC: 상단 드롭다운으로 변경 */
@media (min-width: 768px) {
    .filter-expand-sheet {
        top: 0; bottom: auto;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
        max-height: 80vh;
        animation: slideDown 0.3s ease;
        padding-bottom: var(--spacing-md);
    }
    @keyframes slideDown {
        from { transform: translateY(-100%); }
        to { transform: translateY(0); }
    }
    .filter-expand-handle { display: none; }
}

.filter-chip.baby-toggle {
    font-weight: 600;
    border-width: 2px;
}

.filter-chip.baby-toggle.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 157, 0.3);
}

.filter-divider {
    width: 1px;
    height: 20px;
    background: var(--color-border);
    flex-shrink: 0;
    margin: 0 4px;
}

/* ============================================================
   Place List (Bottom Sheet)
   ============================================================ */
.place-list {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40vh;
    background: var(--color-bg);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow-lg);
    z-index: 50;
    transition: height 0.3s ease, transform 0.3s ease;
    padding-bottom: var(--safe-bottom);
    overflow: hidden;
}

.place-list.expanded {
    height: calc(100vh - var(--header-height) - var(--filter-height)) !important;
    transform: none !important;
    border-radius: 0;
}

.place-list.collapsed {
    transform: translateY(100%);
}

/* 내 위치 버튼 */
.btn-my-location {
    position: fixed;
    bottom: calc(60px + var(--safe-bottom));
    left: 16px;
    z-index: 55;
    width: 44px;
    height: 44px;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-primary);
}

.btn-my-location:active {
    background: var(--color-bg-gray);
}

/* 내 위치 버튼 숨김은 JS에서 처리 */

/* 목록 열기 버튼 */
.btn-open-list {
    display: none;
    position: fixed;
    bottom: calc(16px + var(--safe-bottom));
    left: 16px;
    z-index: 60;
    padding: 10px 16px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
}

.btn-open-list.show {
    display: block;
    animation: fadeInUp 0.3s ease;
}

.place-list-drag {
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.place-list-handle {
    width: 36px;
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    margin: 10px auto 0;
}

.place-list-header {
    padding: var(--spacing-sm) var(--spacing-md);
}

.place-list-header h2 {
    font-size: 16px;
    font-weight: 700;
}

.place-list-items {
    overflow-y: auto;
    height: calc(100% - 50px);
    padding: 0 var(--spacing-md);
    -webkit-overflow-scrolling: touch;
}

/* Place Card */
.place-card {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--color-bg-gray);
    cursor: pointer;
    transition: background 0.2s;
}

.place-card:hover {
    background: var(--color-bg-gray);
    margin: 0 calc(-1 * var(--spacing-md));
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

.place-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: var(--color-bg-gray);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.place-card-info {
    flex: 1;
    min-width: 0;
}

.place-card-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.place-card-address {
    font-size: 13px;
    color: var(--color-text-light);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.place-card-tags {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.place-tag {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--color-bg-gray);
    color: var(--color-text-secondary);
}

.card-badge {
    display: inline-block;
    font-size: 11px;
    vertical-align: middle;
    margin-left: 3px;
    color: var(--color-text-light);
}

.card-badge.baby {
    color: var(--color-primary);
}

.card-badge.blog {
    color: var(--color-text-secondary);
}

.place-tag.active {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
}

.place-tag.verified {
    background: #E8F5E9;
    color: #2E7D32;
    font-weight: 600;
}

.place-card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--color-warning);
    flex-shrink: 0;
}

/* Map Loading Overlay (API 호출 중) */
.map-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s;
}
.map-loading-overlay.active {
    display: flex;
}
.map-loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--color-bg-gray) 25%, #eee 50%, var(--color-bg-gray) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--color-bg-gray);
}

.skeleton-title {
    height: 16px;
    width: 60%;
    margin-bottom: 8px;
}

.skeleton-text {
    height: 12px;
    width: 80%;
    margin-bottom: 6px;
}

.skeleton-tags {
    height: 20px;
    width: 40%;
}

/* ============================================================
   Reload Map Button
   ============================================================ */
.btn-reload-map {
    display: none;
    position: fixed;
    top: calc(var(--header-height) + var(--filter-height) + 12px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 45;
    padding: 10px 20px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-reload-map:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.btn-reload-map.show {
    display: block;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 9999;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 내 위치 핑크 점 */
.my-location-dot {
    position: relative;
    width: 18px;
    height: 18px;
    background: var(--color-primary);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.my-location-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 107, 157, 0.15);
    animation: locationPulse 2s ease-out infinite;
}

@keyframes locationPulse {
    0% { transform: translate(-50%, -50%) scale(0.4); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

.pin-eyes {
    font-size: 18px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
    animation: bounceIn 0.3s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    60% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.cluster-selected {
    background: var(--color-primary);
    color: white;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    box-shadow: var(--shadow-md);
    white-space: nowrap;
    animation: popIn 0.2s ease;
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* PC 목록 접기/펼치기 버튼 (모바일 숨김, PC에서도 초기 숨김 → JS에서 표시) */
.btn-toggle-panel {
    display: none !important;
}
.btn-toggle-panel.ready {
    display: none;
}

@media (min-width: 768px) {
    .btn-reload-map {
        left: calc((100% - 380px) / 2);
    }

    .btn-open-list {
        display: none !important;
    }

    .btn-toggle-panel.ready {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 50%;
        right: 380px;
        transform: translateY(-50%);
        z-index: 55;
        width: 28px;
        height: 56px;
        background: var(--color-primary);
        border: none;
        border-radius: var(--radius-sm) 0 0 var(--radius-sm);
        box-shadow: var(--shadow-sm);
        font-size: 12px;
        font-weight: 700;
        color: white;
        cursor: pointer;
        transition: right 0.3s ease;
        writing-mode: vertical-rl;
        letter-spacing: 2px;
    }

    .btn-toggle-panel:hover {
        background: var(--color-primary-dark);
    }

    .place-list.collapsed {
        transform: translateX(100%);
    }

    .place-list {
        transition: transform 0.3s ease;
    }

    .place-list.collapsed ~ .btn-toggle-panel,
    .btn-toggle-panel.panel-closed {
        right: 0;
    }
}

/* ============================================================
   Detail Card
   ============================================================ */
.btn-back {
    border: none;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    padding: 4px 0;
}

.detail-card {
    padding: 0 0 var(--spacing-xl);
}

.detail-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-bg-gray);
}

.detail-icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-gray);
    border-radius: var(--radius-md);
}

.detail-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
}
.detail-rating {
    font-size: 14px;
    font-weight: 500;
    color: #f5a623;
}

.detail-category-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.detail-category {
    font-size: 13px;
    color: var(--color-text-light);
}

.action-mini {
    font-size: 11px;
    color: var(--color-text-light);
    text-decoration: none;
    padding: 2px 6px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    transition: all 0.2s;
}

.action-mini:hover {
    background: var(--color-bg-gray);
    color: var(--color-text);
}

.detail-info {
    padding: var(--spacing-md) 0;
}

.detail-row {
    font-size: 14px;
    color: var(--color-text-secondary);
    padding: 4px 0;
}

.detail-section {
    padding: var(--spacing-md) 0;
    border-top: 1px solid var(--color-bg-gray);
}

.detail-section h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.detail-facilities {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.facility-tag {
    font-size: 13px;
    padding: 6px 12px;
    background: var(--color-bg-gray);
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}
.facility-tag:active {
    background: #e0e0e0;
}
.facility-tag .vote-count {
    font-size: 11px;
    color: var(--color-text-light);
}
.facility-review-count {
    font-size: 12px;
    font-weight: 400;
    color: var(--color-text-light);
    margin-left: 6px;
}
.facility-hint {
    font-size: 11px;
    color: var(--color-text-light);
    margin: 6px 0 8px;
}
.vote-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100;
    display: flex;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.vote-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}
.vote-tooltip .vote-item b {
    color: #ff6b9d;
}

.text-muted {
    font-size: 13px;
    color: var(--color-text-light);
}

.review-tip {
    font-size: 14px;
    color: var(--color-text);
    padding: 8px 12px;
    background: var(--color-bg-gray);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-sm);
}

.review-rating {
    font-size: 12px;
    color: var(--color-warning);
    margin-left: 4px;
}

.detail-actions-duo {
    display: flex;
    gap: 6px;
    padding: 6px 0;
}

.action-duo-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-bg);
    text-decoration: none;
    color: var(--color-text-secondary);
    font-size: 12px;
    transition: background 0.2s;
}

.action-duo-btn:hover {
    background: var(--color-bg-gray);
}

.action-duo-btn.secondary {
    background: var(--color-bg);
    color: var(--color-text-secondary);
}

.detail-link {
    color: var(--color-primary);
    text-decoration: none;
}

.naver-place-link {
    display: inline-block;
    font-size: 13px;
    color: #03AA5A;
    text-decoration: none;
    font-weight: 600;
}

.naver-place-link:hover {
    text-decoration: underline;
}

.empty-facility {
    text-align: center;
    padding: var(--spacing-md);
    background: var(--color-bg-gray);
    border-radius: var(--radius-md);
}

.empty-facility p:first-child {
    font-size: 15px;
    margin-bottom: 4px;
}

.blog-tabs {
    display: flex;
    gap: 0;
    margin-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--color-bg-gray);
}

.blog-tab {
    flex: 1;
    padding: 10px 0;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-light);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.blog-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.blog-tab-content {
    display: none;
}

.blog-tab-content.active {
    display: block;
}

.blog-card {
    display: block;
    padding: 12px;
    margin-bottom: var(--spacing-sm);
    background: var(--color-bg-gray);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text);
    transition: background 0.2s;
}

.blog-card:hover {
    background: var(--color-primary-light);
}

.blog-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-desc {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.blog-meta {
    font-size: 11px;
    color: var(--color-text-light);
}

.blog-more {
    display: block;
    width: 100%;
    padding: 12px;
    margin: var(--spacing-sm) 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.blog-more:hover {
    background: var(--color-primary-light);
}

.blog-more:disabled {
    color: var(--color-text-light);
    cursor: default;
}

.blog-source {
    font-size: 11px;
    color: var(--color-text-light);
    text-align: right;
    margin-top: var(--spacing-sm);
}

.blog-pending {
    text-align: center;
    padding: var(--spacing-lg) var(--spacing-md);
    background: var(--color-bg-gray);
    border-radius: var(--radius-md);
}

.blog-pending p:first-child {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.blog-verified {
    border-left: 3px solid var(--color-success);
}

.blog-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    background: #E8F5E9;
    color: #2E7D32;
    margin-right: 4px;
    vertical-align: middle;
}

.blog-badge.baby {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
}

/* ============================================================
   장소 추가 폼
   ============================================================ */
.add-form-hero {
    text-align: center;
    padding: var(--spacing-md) 0 var(--spacing-lg);
}

.add-form-hero-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.add-form-hero p {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
}

.form-section {
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--color-bg-gray);
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
}

.required {
    color: var(--color-primary);
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--color-text);
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--color-primary);
}

.form-input::placeholder {
    color: var(--color-text-light);
}

.form-hint {
    font-size: 12px;
    color: var(--color-text-light);
    margin-top: 4px;
    text-align: right;
}

.form-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.facility-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.facility-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.facility-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.facility-name {
    font-size: 14px;
    font-weight: 600;
    width: 80px;
    flex-shrink: 0;
}

.form-chips-inline {
    display: flex;
    gap: 4px;
    flex: 1;
}

.form-chip-sm {
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-bg);
    font-size: 12px;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.form-chip-sm:hover {
    border-color: var(--color-primary);
}

.form-chip-sm.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.btn-submit {
    display: block;
    width: 100%;
    padding: 14px;
    margin: var(--spacing-lg) 0;
    background: var(--color-primary);
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit:hover {
    background: var(--color-primary-dark);
}

.btn-submit:active {
    transform: scale(0.98);
}

/* ============================================================
   리뷰 레이어 (바텀시트)
   ============================================================ */
.btn-review-inline {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background: var(--color-primary);
    border: none;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-review-inline:hover {
    background: var(--color-primary-dark);
}

.btn-review-small {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background: var(--color-primary);
    border: none;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-review-small:hover {
    background: var(--color-primary-dark);
}

/* 로그인 레이어 팝업 */
.login-popup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9500;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.login-popup {
    width: 300px;
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px 24px 24px;
    text-align: center;
    animation: slideUp 0.3s ease;
}

.login-popup-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.login-popup-title {
    font-size: 17px;
    font-weight: 700;
    color: #111;
    margin-bottom: 8px;
}

.login-popup-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 24px;
}

.login-popup-btn {
    display: block;
    width: 100%;
    border: none;
    cursor: pointer;
    background: none;
    padding: 0;
}

.login-popup-btn.kakao {
    margin-bottom: 12px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.login-popup-btn.cancel {
    padding: 10px;
    font-size: 14px;
    color: #999;
    background: none;
}

.review-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9000;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.review-sheet {
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    background: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: var(--spacing-lg) var(--spacing-md) var(--spacing-xl);
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.review-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.review-sheet-title {
    font-size: 18px;
    font-weight: 700;
}

.review-sheet-close {
    border: none;
    background: none;
    font-size: 24px;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 4px;
}

.review-rating-section {
    margin-top: 16px;
}

.star-rating {
    display: flex;
    gap: 8px;
}

.star {
    font-size: 32px;
    color: var(--color-border);
    cursor: pointer;
    transition: color 0.15s;
    user-select: none;
}

.star.filled {
    color: #FFB800;
}

.review-sheet-place {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-bg-gray);
}

.form-address {
    font-size: 14px;
    color: var(--color-text);
    padding: 10px 12px;
    background: var(--color-bg-gray);
    border-radius: var(--radius-sm);
}

.comment-item {
    font-size: 14px;
    color: var(--color-text-secondary);
    padding: 8px 0;
    border-bottom: 1px solid var(--color-bg-gray);
}

.comment-scroll {
    max-height: 220px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.comment-bubble {
    display: flex;
    flex-direction: column;
    background: #f5f5f5;
    border-radius: 12px 12px 12px 4px;
    padding: 8px 14px;
    margin-bottom: 6px;
    max-width: 100%;
    word-break: break-word;
}
.comment-bubble .comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}
.comment-bubble .comment-nick {
    font-size: 12px;
    font-weight: 600;
    color: #555;
}
.comment-bubble .comment-date {
    font-size: 11px;
    color: #999;
}
.comment-bubble .comment-text {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

/* ============================================================
   장소 신고
   ============================================================ */
.detail-report-section {
    border-top: 1px solid var(--color-bg-gray);
    padding-top: var(--spacing-md);
    margin-top: var(--spacing-sm);
    text-align: center;
}

.btn-report {
    display: inline-block;
    padding: 8px 16px;
    background: none;
    border: 1px solid #ddd;
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-report:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

.btn-report-header {
    float: right;
    padding: 4px 10px;
    background: none;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-report-header:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

.report-sheet {
    max-height: 70vh;
}

.report-type-group {
    margin-top: var(--spacing-md);
}

.report-type-group .form-label {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.report-type-chip.active {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 70px;
    transition: border-color 0.2s;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: var(--color-text-secondary);
    margin-top: 4px;
}

.btn-report-submit {
    background: #e74c3c;
}

.btn-report-submit:hover {
    background: #c0392b;
}

.btn-report-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ============================================================
   PC 반응형 (768px+)
   ============================================================ */
@media (min-width: 768px) {
    .map-container {
        right: 380px;
    }

    .filter-bar {
        right: 380px;
    }

    .place-list {
        top: var(--header-height);
        left: auto;
        right: 0;
        width: 380px;
        height: auto;
        bottom: 0;
        border-radius: 0;
        border-left: 1px solid var(--color-border);
        box-shadow: none;
    }

    .place-list-handle {
        display: none;
    }

    .place-list-items {
        height: calc(100vh - var(--header-height) - 60px);
    }

    .detail-report-section {
        display: none;
    }
}

/* ============================================================
   Install Popup (PWA 홈화면 추가)
   ============================================================ */
.install-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.install-popup {
    width: 280px;
    background: white;
    border-radius: 20px;
    padding: 32px 24px 24px;
    text-align: center;
    position: relative;
    animation: popUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

@keyframes popUp {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.install-popup-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--color-text-secondary);
    cursor: pointer;
}

.install-popup-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    margin-bottom: 16px;
}

.install-popup-title {
    display: block;
    font-size: 20px;
    color: var(--color-text);
    margin-bottom: 8px;
}

.install-popup-desc {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.install-popup-btn {
    width: 100%;
    padding: 14px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.install-popup-btn:active {
    background: var(--color-primary-dark);
}

/* ============================================================
   PC 반응형 (768px+)
   ============================================================ */
@media (min-width: 768px) {
    .map-container {
        right: 380px;
    }

    .filter-bar {
        right: 380px;
    }

    .btn-reload-map {
        left: calc((100% - 380px) / 2);
    }

    .btn-open-list {
        display: none !important;
    }

    .btn-toggle-panel.ready {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 50%;
        right: 380px;
        transform: translateY(-50%);
        z-index: 55;
        width: 28px;
        height: 56px;
        background: var(--color-primary);
        border: none;
        border-radius: var(--radius-sm) 0 0 var(--radius-sm);
        box-shadow: var(--shadow-sm);
        font-size: 12px;
        font-weight: 700;
        color: white;
        cursor: pointer;
        transition: right 0.3s ease;
        writing-mode: vertical-rl;
        letter-spacing: 2px;
    }

    .btn-toggle-panel:hover {
        background: var(--color-primary-dark);
    }

    .place-list {
        top: var(--header-height);
        left: auto;
        right: 0;
        width: 380px;
        height: auto !important;
        bottom: 0;
        border-radius: 0;
        border-left: 1px solid var(--color-border);
        box-shadow: none;
        transform: none !important;
        transition: transform 0.3s ease;
    }

    .place-list.collapsed {
        transform: translateX(100%) !important;
    }

    .place-list.collapsed ~ .btn-toggle-panel,
    .btn-toggle-panel.panel-closed {
        right: 0;
    }

    .place-list-handle {
        display: none;
    }

    .place-list-items {
        height: calc(100vh - var(--header-height) - 60px);
    }

    .pc-only { display: inline-flex !important; }
    .filter-more-btn { display: none !important; }
    .filter-divider { display: none !important; }

    .install-overlay {
        display: none !important;
    }
}

/* ============================================================
   지역 집계 오버레이 (호갱노노 스타일 — PinKids 컬러)
   ============================================================ */
.region-overlay {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(255, 107, 157, 0.3);
    transition: transform 0.15s, box-shadow 0.15s;
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
}
.region-overlay:hover {
    transform: scale(1.06);
    box-shadow: 0 3px 10px rgba(255, 107, 157, 0.45);
}
.region-overlay:active {
    transform: scale(0.96);
}
.region-name {
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}
.region-count {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.85;
    line-height: 1;
}

/* 크기별 차등 */
.region-sm {
    padding: 4px 8px;
    gap: 4px;
}
.region-sm .region-name { font-size: 10px; }
.region-sm .region-count { font-size: 9px; }

.region-md {
    padding: 6px 12px;
}

.region-lg {
    padding: 8px 16px;
    background: var(--color-primary-dark);
    box-shadow: 0 3px 10px rgba(224, 82, 126, 0.4);
}
.region-lg .region-name { font-size: 14px; }
.region-lg .region-count { font-size: 12px; }

/* 지역 목록 아이템 */
