/* ============================================================
   DESIGN SYSTEM — 땡피싱 v2
   ============================================================ */
:root {
    /* ── Brand ── */
    --brand-primary: #2563eb;
    --brand-primary-hover: #1d4ed8;
    --brand-primary-light: #dbeafe;
    --brand-primary-50: #eff6ff;
    --brand-secondary: #0ea5e9;
    --brand-accent: #f59e0b;
    --brand-accent-light: #fef3c7;

    /* ── Neutrals ── */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* ── Semantic ── */
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --info: #06b6d4;
    --info-light: #cffafe;

    /* ── Typography ── */
    --font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;

    /* ── Spacing ── */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;

    /* ── Radius ── */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* ── Shadow ── */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);

    /* ── Layout ── */
    --header-height: 64px;
    --sidebar-width: 260px;
    --container-max: 1200px;
}

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

body {
    font-family: var(--font-family);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

html { overflow-x: clip; }

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* 드로어 열릴 때 스크롤 잠금 */
body.drawer-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    touch-action: none;
}

/* 모바일 헤더 유저 배지 (기본 숨김 → 768px 이하 표시) */
.mobile-user-badge {
    display: none;
    align-items: center;
    gap: var(--space-2);
    margin-left: auto;
    padding: var(--space-1) var(--space-3) var(--space-1) var(--space-1);
    border-radius: var(--radius-full);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    transition: background 0.15s;
    flex-shrink: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-decoration: none;
}

.mobile-user-badge:hover { background: var(--gray-100); }

.mobile-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    font-weight: 700;
    font-size: 11px;
}

.mobile-user-avatar-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.mobile-user-name {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--gray-700);
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    height: var(--header-height);
}

.header-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
    height: 100%;
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: 800;
    font-size: var(--text-xl);
    color: var(--brand-primary);
    white-space: nowrap;
}

.header-logo-img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
}

/* 로고 이미지 로드 실패 시 숨김 */
.header-logo-img.is-hidden { display: none; }

.header-nav {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    flex: 1;
}

.nav-item { position: relative; }

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--gray-600);
    border-radius: var(--radius-md);
    transition: all 0.15s;
    cursor: pointer;
}

.nav-link:hover,
.nav-item.active > .nav-link {
    color: var(--brand-primary);
    background: var(--brand-primary-50);
}

.nav-link .bi-chevron-down {
    font-size: 10px;
    transition: transform 0.2s;
}

.nav-item:hover .nav-link .bi-chevron-down { transform: rotate(180deg); }

.nav-dropdown {
    position: absolute;
    top: calc(100% + var(--space-2));
    left: 0;
    min-width: 180px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s;
    z-index: 200;
}

.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown a {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    color: var(--gray-600);
    border-radius: var(--radius-md);
    transition: all 0.15s;
}

.nav-dropdown a:hover {
    color: var(--brand-primary);
    background: var(--brand-primary-50);
}

.nav-dropdown a i {
    font-size: var(--text-base);
    width: 20px;
    text-align: center;
    color: var(--gray-400);
}

.nav-dropdown a:hover i { color: var(--brand-primary); }

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.header-search {
    display: flex;
    align-items: center;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    padding: var(--space-2) var(--space-4);
    width: 220px;
    transition: all 0.2s;
    border: none;
}

.header-search:focus-within {
    background: #fff;
    box-shadow: 0 0 0 2px var(--brand-primary);
    width: 280px;
}

.header-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: var(--text-sm);
    width: 100%;
    color: var(--gray-800);
}

.header-search i {
    color: var(--gray-400);
    margin-right: var(--space-2);
}

.header-profile {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3) var(--space-1) var(--space-1);
    border-radius: var(--radius-full);
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}

.header-profile:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    font-weight: 600;
    font-size: var(--text-sm);
}

.header-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.header-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.header-user-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-800);
}

.header-user-level {
    font-size: var(--text-xs);
    color: var(--brand-primary);
    font-weight: 500;
}

/* ── 프로필 드롭다운 ── */
.profile-dropdown {
    position: absolute;
    top: calc(100% + var(--space-2));
    right: 0;
    min-width: 180px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s;
    z-index: 200;
}

.profile-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    color: var(--gray-600);
    border-radius: var(--radius-md);
    transition: all 0.15s;
}

.profile-dropdown-item:hover {
    color: var(--brand-primary);
    background: var(--brand-primary-50);
}

.profile-dropdown-divider {
    height: 1px;
    background: var(--gray-100);
    margin: var(--space-1) 0;
}

.btn-login-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-5);
    background: var(--brand-primary);
    color: #fff;
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-login-header:hover {
    background: var(--brand-primary-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ── PC: 알림 아이콘 + 드롭다운 ── */
.header-noti {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: var(--text-lg);
    color: var(--gray-600);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: color 0.15s, background 0.15s;
}

.header-noti:hover {
    color: var(--brand-primary);
    background: var(--gray-50);
}

.noti-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 420px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1100;
    overflow: hidden;
}

.noti-dropdown.is-open { display: flex; flex-direction: column; }

.noti-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--gray-100);
}

.noti-dropdown-title {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--gray-900);
}

.noti-dropdown-body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.noti-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-10) var(--space-5);
    color: var(--gray-400);
}

.noti-empty i { font-size: 2rem; }
.noti-empty p { font-size: var(--text-sm); margin: 0; }

.noti-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-5);
    border-bottom: 1px solid var(--gray-50);
    transition: background 0.12s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.noti-item:hover { background: var(--gray-50); }
.noti-item.is-unread { background: #f0f7ff; }
.noti-item.is-unread:hover { background: #e3f0ff; }

.noti-item-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: var(--text-sm);
}

.noti-item-content { flex: 1; min-width: 0; }

.noti-item-text {
    font-size: var(--text-sm);
    color: var(--gray-800);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.noti-item-time {
    font-size: var(--text-xs);
    color: var(--gray-400);
    margin-top: 2px;
}

/* ============================================================
   BANNER CAROUSEL
   ============================================================ */
.banner-carousel {
    position: relative;
    overflow: hidden;
    background: var(--gray-100);
}

.banner-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.banner-slide {
    min-width: 100%;
    cursor: pointer;
}

.banner-img {
    width: 100%;
    aspect-ratio: 4 / 1;
    display: block;
    object-fit: cover;
    max-height: 340px;
}

.banner-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: var(--text-xl);
    color: var(--gray-700);
    box-shadow: var(--shadow-md);
    transition: all 0.2s;
    z-index: 10;
    opacity: 0;
}

.banner-carousel:hover .banner-btn { opacity: 1; }

.banner-btn:hover {
    background: #fff;
    box-shadow: var(--shadow-lg);
}

.banner-btn-prev { left: var(--space-4); }
.banner-btn-next { right: var(--space-4); }

.banner-indicators {
    position: absolute;
    bottom: var(--space-4);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--space-2);
    z-index: 10;
}

.banner-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.banner-indicator.active {
    background: #fff;
    width: 24px;
    border-radius: var(--radius-full);
}

/* ---- Content-type banner overlay ---- */
.banner-slide--content {
    position: relative;
    cursor: default;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: #000;
    pointer-events: none;
}

.banner-overlay--0  { opacity: 0; }
.banner-overlay--10 { opacity: 0.1; }
.banner-overlay--20 { opacity: 0.2; }
.banner-overlay--30 { opacity: 0.3; }
.banner-overlay--40 { opacity: 0.4; }
.banner-overlay--50 { opacity: 0.5; }
.banner-overlay--60 { opacity: 0.6; }
.banner-overlay--70 { opacity: 0.7; }
.banner-overlay--80 { opacity: 0.8; }
.banner-overlay--90 { opacity: 0.9; }
.banner-overlay--100 { opacity: 1; }

.banner-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 var(--space-12);
    max-width: var(--container-max);
    margin: 0 auto;
    z-index: 2;
}

.banner-content--left { align-items: flex-start; text-align: left; }
.banner-content--center { align-items: center; text-align: center; }
.banner-content--right { align-items: flex-end; text-align: right; }

.banner-content--light { color: #fff; }
.banner-content--dark { color: #1a1a1a; }

.banner-content__title {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 var(--space-2) 0;
}

.banner-content__subtitle {
    font-size: clamp(0.875rem, 1.5vw, 1.125rem);
    opacity: 0.85;
    margin: 0 0 var(--space-6) 0;
    line-height: 1.6;
}

.banner-content__actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.banner-content__btn {
    padding: var(--space-2) var(--space-6);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: var(--text-sm);
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.banner-content__btn--primary {
    background: #fff;
    color: var(--brand-primary);
}

.banner-content__btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--brand-primary);
}

.banner-content--dark .banner-content__btn--primary {
    background: var(--brand-primary);
    color: #fff;
}

.banner-content--dark .banner-content__btn--primary:hover {
    color: #fff;
}

.banner-content__btn--ghost {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(4px);
}

.banner-content__btn--ghost:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

.banner-content--dark .banner-content__btn--ghost {
    background: rgba(0,0,0,0.08);
    color: #1a1a1a;
    border-color: rgba(0,0,0,0.2);
}

.banner-content--dark .banner-content__btn--ghost:hover {
    background: rgba(0,0,0,0.15);
    color: #1a1a1a;
}

@media (max-width: 768px) {
    .banner-content {
        padding: 0 var(--space-4);
    }
    .banner-content__actions {
        flex-direction: column;
        align-items: stretch;
    }
    .banner-content__btn {
        text-align: center;
    }
}

/* ============================================================
   HERO BANNER (배너 없을 때 대체)
   ============================================================ */
.hero-banner {
    background: linear-gradient(135deg, var(--brand-primary) 0%, #7c3aed 100%);
    padding: var(--space-12) 0;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero-banner::after {
    content: '';
    position: absolute;
    right: -60px;
    bottom: -60px;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}

.hero-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
    position: relative;
    z-index: 1;
}

.hero-content { max-width: 560px; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-4);
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-4);
    backdrop-filter: blur(4px);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--space-4);
}

.hero-desc {
    font-size: var(--text-lg);
    opacity: 0.85;
    margin-bottom: var(--space-8);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: var(--space-3);
}

.btn-hero {
    padding: var(--space-3) var(--space-8);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: var(--text-base);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-hero-primary {
    background: #fff;
    color: var(--brand-primary);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--brand-primary);
}

.btn-hero-ghost {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(4px);
}

.btn-hero-ghost:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
    min-width: 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--space-8);
    align-items: start;
    min-width: 0;
}

.content-grid > * { min-width: 0; }

/* ── 섹션 헤더 ── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-5);
}

.section-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.section-title i { color: var(--brand-primary); font-size: var(--text-lg); }

.section-more {
    font-size: var(--text-sm);
    color: var(--gray-500);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.section-more:hover { color: var(--brand-primary); }

/* ============================================================
   POST CARD
   ============================================================ */
.post-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: var(--space-5);
    transition: all 0.2s;
    cursor: pointer;
    min-width: 0;
    overflow: hidden;
}

.post-card:hover {
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.post-card + .post-card { margin-top: var(--space-3); }

.post-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.post-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.post-card-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-icon {
    font-size: 20px;
    color: var(--gray-400);
}

.avatar-initial-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.post-card-meta { flex: 1; min-width: 0; }

.post-card-author {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.post-card-author .level-tag {
    font-size: var(--text-xs);
    padding: 0;
    font-weight: 600;
    background: none;
    color: var(--gray-500);
}

.post-card-author .admin-badge {
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    background: var(--warning);
    padding: 1px 6px;
    border-radius: var(--radius-full);
}

.level-admin { color: var(--brand-primary); }

.level-tag i { font-size: 9px; margin-right: 2px; }

/* 관리자 레벨 텍스트 */
.level-admin-text { color: var(--brand-primary); font-weight: 600; }
.level-admin-text i { margin-right: 2px; }

.post-card-date {
    font-size: var(--text-xs);
    color: var(--gray-400);
}

.post-card-board {
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    background: var(--gray-100);
    color: var(--gray-600);
    font-weight: 500;
}

.post-card-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-2);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.post-card-excerpt {
    font-size: var(--text-sm);
    color: var(--gray-500);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: var(--space-3);
    word-break: break-word;
}

.post-card-footer {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    font-size: var(--text-xs);
    color: var(--gray-400);
}

.post-card-stat {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.post-card-stat.liked { color: var(--danger); }

.post-card-images {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.post-card-images img {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { display: flex; flex-direction: column; gap: var(--space-6); }

.sidebar-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
}

.sidebar-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.sidebar-title {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: 0;
}

.sidebar-title-row + .notice-item,
.sidebar-title + .hot-post-item { margin-top: 0; }

.sidebar-icon-notice { color: var(--danger); }
.sidebar-icon-hot { color: var(--brand-accent); }

.sidebar-empty {
    font-size: var(--text-sm);
    color: var(--gray-400);
    text-align: center;
    padding: var(--space-4) 0;
}

/* ── 인기글 ── */
.hot-post-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
}

.hot-post-item:last-child { border-bottom: none; }
.hot-post-item:hover .hot-post-title { color: var(--brand-primary); }

.hot-post-rank {
    font-size: var(--text-sm);
    font-weight: 800;
    color: var(--brand-primary);
    min-width: 20px;
}

.hot-post-rank.top3 { color: var(--danger); }

.hot-post-info { flex: 1; min-width: 0; }

.hot-post-title {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--gray-700);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s;
}

.hot-post-meta {
    font-size: var(--text-xs);
    color: var(--gray-400);
    margin-top: 2px;
    display: flex;
    gap: var(--space-3);
}

/* ── 공지사항 사이드바 ── */
.notice-item {
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--gray-100);
}

.notice-item:last-child { border-bottom: none; }

.notice-item-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    background: var(--danger-light);
    color: var(--danger);
    margin-right: var(--space-2);
}

.notice-item a {
    font-size: var(--text-sm);
    color: var(--gray-700);
    font-weight: 500;
}

.notice-item a:hover { color: var(--brand-primary); }

.notice-item-date {
    font-size: var(--text-xs);
    color: var(--gray-400);
    margin-top: 2px;
}

/* ── 비어있는 상태 ── */
.empty-state {
    text-align: center;
    padding: var(--space-12) var(--space-6);
    color: var(--gray-400);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    display: block;
}

.empty-state p {
    font-size: var(--text-base);
    margin-bottom: var(--space-5);
}

/* ============================================================
   BTN COMMON
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-5);
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-primary {
    background: var(--brand-primary);
    color: #fff;
}

.btn-primary:hover { background: var(--brand-primary-hover); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--gray-800);
    color: var(--gray-400);
    padding: var(--space-6) 0;
    margin-top: var(--space-12);
    font-size: var(--text-xs);
}

.footer-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--gray-700);
    gap: var(--space-6);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

.footer-phone {
    font-size: var(--text-sm);
    font-weight: 700;
    color: #fff;
}

.footer-hours {
    font-size: var(--text-xs);
    color: var(--gray-500);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-1) var(--space-4);
}

.footer-nav a {
    font-size: var(--text-xs);
    color: var(--gray-400);
    transition: color 0.15s;
    white-space: nowrap;
}

.footer-nav a:hover { color: #fff; }

.footer-social {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

.footer-social a {
    display: flex;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.footer-social a:hover { opacity: 1; }

.footer-social-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.footer-bottom {
    padding-top: var(--space-4);
}

.footer-business-info {
    line-height: 1.8;
    margin-bottom: var(--space-1);
}

.footer-biz-link {
    color: var(--brand-primary-light);
}

.footer-biz-link:hover { color: #fff; }

.footer-copyright {
    color: var(--gray-500);
}

/* ============================================================
   HAMBURGER BUTTON
   ============================================================ */
.hamburger-btn {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: var(--radius-md);
    transition: background 0.15s;
}

.hamburger-btn:hover { background: var(--gray-100); }

.hamburger-btn .bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all 0.3s;
    position: relative;
}

.hamburger-btn .bar::before,
.hamburger-btn .bar::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger-btn .bar::before { top: -6px; }
.hamburger-btn .bar::after { top: 6px; }

.hamburger-btn.is-active .bar { background: transparent; }
.hamburger-btn.is-active .bar::before { top: 0; transform: rotate(45deg); }
.hamburger-btn.is-active .bar::after { top: 0; transform: rotate(-45deg); }

/* ============================================================
   MOBILE: SIDE DRAWER
   ============================================================ */
.mobile-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.mobile-drawer-overlay.is-open { opacity: 1; pointer-events: auto; }

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: #fff;
    z-index: 301;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.mobile-drawer.is-open { transform: translateX(0); }

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5);
    border-bottom: 1px solid var(--gray-200);
}

.drawer-user {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.drawer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    font-weight: 700;
    font-size: var(--text-sm);
}

.drawer-user-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-800);
}

.drawer-user-level {
    font-size: var(--text-xs);
    color: var(--brand-primary);
    font-weight: 500;
}

.drawer-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    color: var(--gray-500);
    font-size: var(--text-lg);
}

.drawer-close:hover { background: var(--gray-100); }

.drawer-nav {
    flex: 1;
    padding: var(--space-3);
}

.drawer-section { margin-bottom: var(--space-2); }

.drawer-section-title {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--gray-700);
    border-radius: var(--radius-md);
    transition: all 0.15s;
    min-height: 44px;
}

.drawer-link:hover,
.drawer-link.active {
    color: var(--brand-primary);
    background: var(--brand-primary-50);
}

.drawer-link i {
    width: 20px;
    text-align: center;
    color: var(--gray-400);
    font-size: var(--text-base);
}

.drawer-link:hover i,
.drawer-link.active i { color: var(--brand-primary); }

.drawer-divider {
    height: 1px;
    background: var(--gray-100);
    margin: var(--space-2) var(--space-3);
}

.drawer-footer {
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--gray-200);
}

.drawer-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.drawer-footer-links a {
    font-size: var(--text-xs);
    color: var(--gray-400);
}

/* ============================================================
   MOBILE: NOTIFICATION & SEARCH
   ============================================================ */
.mobile-noti-btn {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-600);
    font-size: var(--text-lg);
    border-radius: var(--radius-md);
    position: relative;
}

.mobile-noti-btn:hover { color: var(--gray-800); }

.mobile-noti-dropdown { display: none; }

.mobile-search-btn {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-600);
    font-size: var(--text-lg);
    border-radius: var(--radius-md);
}

.mobile-search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 250;
    padding: var(--space-3) var(--space-4);
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-search-overlay.is-open { transform: translateY(0); pointer-events: auto; }

.mobile-search-inner {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.mobile-search-input {
    flex: 1;
    height: 44px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 0 var(--space-4);
    font-size: var(--text-base);
    outline: none;
    font-family: inherit;
}

.mobile-search-input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-primary-light);
}

.mobile-search-cancel {
    padding: var(--space-2) var(--space-3);
    background: none;
    border: none;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    white-space: nowrap;
    min-height: 44px;
}

/* ============================================================
   RESPONSIVE — TABLET (1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .content-grid { grid-template-columns: 1fr; }
    .sidebar { display: none; }

    /* ── Header → 모바일 전환 ── */
    .header-nav { display: none; }
    .header-search { display: none; }
    .header-profile { display: none; }
    .header-noti { display: none; }
    .btn-login-header { display: none; }
    .profile-dropdown { display: none; }
    .noti-dropdown { display: none !important; }
    .hamburger-btn { display: flex; }
    .mobile-noti-btn { display: flex; }
    .mobile-search-btn { display: flex; }
    .mobile-search-overlay { display: block; }
    .mobile-drawer-overlay { display: block; }
    .header-logo-text { display: none; }
    .mobile-user-badge { display: flex; }

    /* ── 모바일 알림 드롭다운 ── */
    .mobile-noti-dropdown {
        display: none;
        position: fixed;
        top: 60px;
        left: var(--space-3);
        right: var(--space-3);
        max-height: 420px;
        z-index: 1100;
        background: #fff;
        flex-direction: column;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
        border: 1px solid var(--gray-200);
        overflow: hidden;
        animation: notiSlideDown 0.2s ease;
    }
    .mobile-noti-dropdown.is-open { display: flex; }

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

    .mobile-noti-dropdown .noti-dropdown-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: var(--space-4) var(--space-5);
        border-bottom: 1px solid var(--gray-100);
    }

    .mobile-noti-dropdown .noti-dropdown-body {
        flex: 1;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .header-inner { gap: var(--space-2); }
    .header-logo { font-size: var(--text-lg); }
    .header-logo-img { width: 30px; height: 30px; }
}

/* ============================================================
   RESPONSIVE — MOBILE (768px)
   ============================================================ */
@media (max-width: 768px) {
    /* ── Hero ── */
    .hero-banner { padding: var(--space-8) 0; }
    .hero-title { font-size: var(--text-2xl); }
    .hero-desc { font-size: var(--text-sm); margin-bottom: var(--space-5); }
    .hero-actions { flex-direction: column; gap: var(--space-2); }
    .btn-hero { width: 100%; justify-content: center; padding: var(--space-3) var(--space-6); }

    /* ── Banner ── */
    .banner-img { aspect-ratio: 16 / 7; }
    .banner-btn { width: 36px; height: 36px; font-size: var(--text-base); }
    .banner-btn-prev { left: var(--space-2); }
    .banner-btn-next { right: var(--space-2); }

    /* ── Main content ── */
    .main-content { padding: var(--space-5) var(--space-4); }
    .post-card { padding: var(--space-4); }
    .post-card-images img { height: 140px; }

    /* ── Footer ── */
    .footer-top { flex-direction: column; align-items: center; gap: var(--space-4); }
    .footer-contact { align-items: center; }
    .footer-nav { justify-content: center; }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE (480px)
   ============================================================ */
@media (max-width: 480px) {
    .main-content { padding: var(--space-4) var(--space-3); }

    .hero-title { font-size: var(--text-xl); }
    .hero-badge { font-size: var(--text-xs); }

    .banner-img { aspect-ratio: 16 / 9; }

    .post-card-header { gap: var(--space-2); }
    .post-card-avatar { width: 32px; height: 32px; }
    .post-card-title { font-size: var(--text-sm); }
    .post-card-images img { height: 120px; }

    .footer-top { text-align: center; align-items: center; }
    .footer-nav { justify-content: center; }
    .footer-bottom { text-align: center; }
}