/**
 * 가치사자 (buytogether) — index_buytogether.html 전용
 * 공통 레이아웃은 style.css, 브랜드·테마만 이 파일에서 로드.
 */
html[data-community="buytogether"] {
    --primary-color: #42130c;
    --primary-gradient-end: #6b2a1f;
    --bg-color: #fff8f5;
    --hover-bg: rgba(66, 19, 12, 0.07);
    --border-color: rgba(66, 19, 12, 0.14);
    --card-bg: #ffffff;
}

html[data-community="buytogether"] .loading-overlay {
    background: linear-gradient(135deg, #42130c 0%, #5c2419 100%);
}

html[data-community="buytogether"] .navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-gradient-end) 100%);
    box-shadow: 0 4px 12px rgba(66, 19, 12, 0.35);
}

/* 네비 로고 크롭·정렬: index_buytogether.html #brand-buytogether 인라인에 둠(공용 .logo .logo-icon 규칙·캐시 이슈 회피) */

html[data-community="buytogether"] .welcome-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-gradient-end) 100%);
    box-shadow: 0 8px 32px rgba(66, 19, 12, 0.28);
}

html[data-community="buytogether"] .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-gradient-end) 100%);
}

html[data-community="buytogether"] .btn-primary:hover {
    background: linear-gradient(135deg, #36100a 0%, #4a1812 100%);
    box-shadow: 0 4px 12px rgba(66, 19, 12, 0.35);
}

html[data-community="buytogether"] .message-bubble-me {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-gradient-end) 100%);
}

html[data-community="buytogether"] .message-avatar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-gradient-end) 100%);
    box-shadow: 0 2px 8px rgba(66, 19, 12, 0.25);
}

html[data-community="buytogether"] .ttl-pill.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-gradient-end) 100%) !important;
}

html[data-community="buytogether"] .preference-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-gradient-end) 100%);
    box-shadow: 0 4px 16px rgba(66, 19, 12, 0.3);
}

html[data-community="buytogether"] .register-preference-preview-pill {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-gradient-end) 100%);
}

html[data-community="buytogether"] .post-prefix {
    color: var(--primary-color);
    border-color: rgba(66, 19, 12, 0.45);
}

html[data-community="buytogether"] .home-active-users .active-users-count {
    background: var(--primary-color);
}

html[data-community="buytogether"] .home-active-users .active-user-item.active-user-me {
    background-color: rgba(66, 19, 12, 0.08);
    border-left-color: var(--primary-color);
}

html[data-community="buytogether"] .home-active-users .active-user-item.active-user-me:hover {
    background-color: rgba(66, 19, 12, 0.12);
}

html[data-community="buytogether"] .webrtc-btn-primary {
    background: var(--primary-color);
}

html[data-community="buytogether"] .webrtc-btn-primary:hover {
    background: #36100a;
}

html[data-community="buytogether"] .post-image-placeholder--hide-preview {
    background: linear-gradient(165deg, rgba(66, 19, 12, 0.09), rgba(66, 19, 12, 0.02));
    border-color: rgba(66, 19, 12, 0.22);
}

html[data-community="buytogether"] .post-image-placeholder--hide-preview .post-image-placeholder__icon-svg {
    color: #6b2a1f;
}

@media (min-width: 1024px) {
    html[data-community="buytogether"] .home-highlights .highlight-icon {
        background: linear-gradient(135deg, var(--primary-color), var(--primary-gradient-end));
    }
}

/* 가치사자 · 다크 모드 */
html[data-community="buytogether"][data-theme="dark"] {
    --primary-color: #d4a090;
    --primary-gradient-end: #9e5c4a;
    --bg-color: #1a1412;
    --card-bg: #261f1c;
    --text-primary: #f5ebe6;
    --text-secondary: #b5a399;
    --border-color: rgba(212, 160, 144, 0.22);
    --hover-bg: rgba(212, 160, 144, 0.1);
}

html[data-community="buytogether"][data-theme="dark"] .navbar {
    background: linear-gradient(135deg, #4a2218 0%, #36100a 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

html[data-community="buytogether"][data-theme="dark"] .welcome-card {
    background: linear-gradient(135deg, #4a2218 0%, #36100a 100%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

html[data-community="buytogether"][data-theme="dark"] .btn-primary {
    background: linear-gradient(135deg, #5c2e24 0%, #42130c 100%);
}

html[data-community="buytogether"][data-theme="dark"] .btn-primary:hover {
    background: linear-gradient(135deg, #6b3a2e 0%, #4f1810 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

html[data-community="buytogether"][data-theme="dark"] .message-bubble-me {
    background: linear-gradient(135deg, #5c2e24 0%, #42130c 100%);
}

html[data-community="buytogether"][data-theme="dark"] .message-avatar {
    background: linear-gradient(135deg, #5c2e24 0%, #42130c 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

html[data-community="buytogether"][data-theme="dark"] .stat-number {
    color: #e8b5a5;
    text-shadow: 0 0 12px rgba(232, 181, 165, 0.25);
}

html[data-community="buytogether"][data-theme="dark"] .ttl-pill.active {
    background: linear-gradient(135deg, #5c2e24 0%, #42130c 100%) !important;
    border-color: #6b3a2e !important;
}

html[data-community="buytogether"][data-theme="dark"] .preference-btn.active {
    background: linear-gradient(135deg, #5c2e24 0%, #42130c 100%);
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(66, 19, 12, 0.45);
}

html[data-community="buytogether"][data-theme="dark"] .footer-brand {
    color: #e8b5a5;
}

@media (max-width: 767px) {
    html[data-community="buytogether"][data-theme="dark"] .nav-item.active {
        box-shadow: 0 10px 24px rgba(66, 19, 12, 0.45);
    }

    html[data-community="buytogether"][data-theme="dark"] .nav-item.active::before {
        filter: drop-shadow(0 6px 12px rgba(212, 160, 144, 0.35));
    }

    html[data-community="buytogether"][data-theme="dark"] .nav-item.active::after {
        background: linear-gradient(90deg, rgba(212, 160, 144, 0.95), rgba(180, 120, 100, 0.95));
    }
}

@media (min-width: 1024px) {
    html[data-community="buytogether"][data-theme="dark"] .nav-item:hover {
        background: rgba(212, 160, 144, 0.12) !important;
    }

    html[data-community="buytogether"][data-theme="dark"] .nav-item.active {
        background: linear-gradient(135deg, #5c2e24 0%, #42130c 100%) !important;
        box-shadow: 0 10px 26px rgba(66, 19, 12, 0.45) !important;
    }
}

html[data-community="buytogether"][data-theme="dark"] .home-active-users .active-user-item.active-user-me {
    background-color: rgba(212, 160, 144, 0.15);
    border-left-color: var(--primary-color);
}

html[data-community="buytogether"][data-theme="dark"] .home-active-users .active-user-item.active-user-me:hover {
    background-color: rgba(212, 160, 144, 0.22);
}
