:root {
    --wn-bg-body: #f1f5f9;      /* Slate 100 */
    --wn-bg-panel: #ffffff;
    --wn-sidebar: #0f172a;      /* Slate 900 */
    --wn-border: #e2e8f0;
    --wn-text-main: #0f172a;
    --wn-text-muted: #64748b;
    --wn-primary: #0d9488;      /* Teal 600 */
    --wn-primary-light: #ccfbf1;
    --wn-accent: #14b8a6;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", sans-serif; background: var(--wn-bg-body); color: var(--wn-text-main); line-height: 1.6; }
a { text-decoration: none; color: inherit; }

/* 🌟 APP LAYOUT (좌측 사이드바 + 우측 메인) 🌟 */
.wn-app-layout { display: flex; min-height: 100vh; }

/* 1. Sidebar (고정) */
.wn-sidebar { width: 260px; background: var(--wn-sidebar); color: #f8fafc; flex-shrink: 0; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; z-index: 100; border-right: 1px solid #1e293b; }
.wn-brand { padding: 24px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #1e293b; }
.wn-brand-icon { width: 16px; height: 16px; background: var(--wn-accent); border-radius: 4px; box-shadow: 2px 2px 0 #2dd4bf; }
.wn-brand-text { display: flex; flex-direction: column; }
.wn-brand-name { font-size: 1.05rem; font-weight: 900; letter-spacing: 0.5px; }
.wn-brand-sub { font-size: 0.7rem; color: #94a3b8; font-weight: 600; letter-spacing: 1px; }

.wn-nav-menu { padding: 24px 16px; flex: 1; }
.wn-nav-label { font-size: 0.7rem; color: #64748b; font-weight: 800; letter-spacing: 1px; margin-bottom: 12px; padding-left: 8px; }
.wn-nav-link { display: block; padding: 10px 12px; color: #cbd5e1; font-size: 0.9rem; font-weight: 600; border-radius: 8px; margin-bottom: 4px; transition: background 0.2s, color 0.2s; }
.wn-nav-link:hover, .wn-nav-link.active { background: rgba(20, 184, 166, 0.15); color: #2dd4bf; }

.wn-sidebar-footer { padding: 24px; border-top: 1px solid #1e293b; }

/* 2. Main Content Area */
.wn-main-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wn-top-header { height: 65px; background: #fff; border-bottom: 1px solid var(--wn-border); display: flex; justify-content: space-between; align-items: center; padding: 0 30px; position: sticky; top: 0; z-index: 50; }
.wn-search-dummy { color: #94a3b8; font-size: 0.85rem; background: #f8fafc; padding: 8px 16px; border-radius: 20px; border: 1px solid #e2e8f0; width: 250px; }
.wn-profile-dummy { font-size: 0.85rem; font-weight: 700; color: #475569; display: flex; align-items: center; gap: 8px; }
.wn-status-dot { width: 8px; height: 8px; background: #10b981; border-radius: 50%; }

.wn-content-inner { padding: 30px; flex: 1; max-width: 1200px; width: 100%; margin: 0 auto; }

/* Hero / KPI Cards */
.wn-kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.wn-kpi-card { background: #fff; border: 1px solid var(--wn-border); border-radius: 12px; padding: 24px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.wn-kpi-title { font-size: 0.85rem; font-weight: 700; color: var(--wn-text-muted); margin-bottom: 8px; text-transform: uppercase; }
.wn-kpi-value { font-size: 1.8rem; font-weight: 900; color: var(--wn-text-main); }
.wn-kpi-sub { font-size: 0.8rem; color: #10b981; font-weight: 700; margin-top: 4px; }

/* Page Header */
.wn-page-header { margin-bottom: 30px; }
.wn-page-title { font-size: 1.6rem; font-weight: 900; margin-bottom: 8px; letter-spacing: -0.5px; }
.wn-page-desc { font-size: 0.95rem; color: var(--wn-text-muted); }

/* 🌟 DATA LEDGER RANKING BOARD 🌟 */
.wn-data-board { background: #fff; border: 1px solid var(--wn-border); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.02); margin-bottom: 40px; }
.wn-board-header { display: flex; padding: 16px 24px; background: #f8fafc; border-bottom: 1px solid var(--wn-border); font-size: 0.85rem; font-weight: 800; color: #475569; text-transform: uppercase; }
.wn-col-rank { width: 60px; text-align: center; }
.wn-col-platform { flex: 1.5; padding-left: 20px; }
.wn-col-spec { flex: 2; }
.wn-col-action { width: 180px; text-align: center; }

.wn-ledger-row { display: flex; align-items: center; padding: 20px 24px; border-bottom: 1px solid #f1f5f9; transition: background 0.2s; text-decoration: none; color: inherit; cursor: pointer; }
.wn-ledger-row:hover { background: var(--wn-primary-light); }
.wn-ledger-row:last-child { border-bottom: none; }

.wn-row-rank { width: 60px; text-align: center; font-size: 1.2rem; font-weight: 900; color: var(--wn-primary); }
.wn-row-platform { flex: 1.5; padding-left: 20px; display: flex; align-items: center; gap: 16px; }
.wn-platform-logo { width: 80px; height: 36px; background: #fff; border: 1px solid var(--wn-border); border-radius: 6px; padding: 4px; display: flex; align-items: center; justify-content: center; }
.wn-platform-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.wn-platform-name { font-weight: 900; font-size: 1.05rem; margin-bottom: 4px; }
.wn-platform-rating { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 700; color: var(--wn-text-muted); }
.wn-progress-bar { width: 60px; height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }
.wn-progress-fill { height: 100%; background: #f59e0b; width: 95%; }

.wn-row-spec { flex: 2; padding-right: 20px; }
.wn-spec-benefit { font-size: 0.95rem; font-weight: 800; color: var(--wn-primary); margin-bottom: 6px; }
.wn-spec-desc { font-size: 0.85rem; color: #475569; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.wn-row-action { width: 180px; display: flex; justify-content: flex-end; }
.wn-btn-connect { background: var(--wn-text-main); color: #fff; font-size: 0.85rem; font-weight: 800; padding: 10px 24px; border-radius: 6px; transition: background 0.2s; }
.wn-ledger-row:hover .wn-btn-connect { background: var(--wn-primary); }

/* Document Section */
.wn-doc-section { background: #fff; border: 1px solid var(--wn-border); border-radius: 12px; padding: 40px; margin-bottom: 40px; }
.wn-doc-section h2 { font-size: 1.4rem; font-weight: 900; margin-bottom: 16px; letter-spacing: -0.5px; }
.wn-doc-section h3 { font-size: 1.05rem; font-weight: 800; color: var(--wn-primary); margin: 24px 0 10px 0; }
.wn-doc-section p, .wn-doc-section li { font-size: 0.95rem; color: #475569; line-height: 1.8; margin-bottom: 12px; }
.wn-doc-section ul { padding-left: 20px; margin-bottom: 16px; }

/* Posts Grid */
.wn-posts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 40px; }
.wn-post-card { background: #fff; border: 1px solid var(--wn-border); border-radius: 12px; padding: 24px; transition: border-color 0.2s, box-shadow 0.2s; }
.wn-post-card:hover { border-color: var(--wn-primary); box-shadow: 0 4px 12px rgba(13, 148, 136, 0.1); }
.wn-post-cat { display: inline-block; font-size: 0.7rem; font-weight: 800; color: var(--wn-primary); background: var(--wn-primary-light); padding: 4px 10px; border-radius: 20px; margin-bottom: 12px; }
.wn-post-title { font-size: 1.05rem; font-weight: 800; margin-bottom: 10px; line-height: 1.4; }
.wn-post-summary { font-size: 0.85rem; color: #64748b; line-height: 1.5; margin-bottom: 16px; }
.wn-post-meta { font-size: 0.75rem; color: #94a3b8; font-weight: 600; }

/* Footer */
.wn-footer { border-top: 1px solid var(--wn-border); padding: 30px; margin-top: auto; }
.wn-legal-box { background: #fee2e2; border: 1px solid #fca5a5; padding: 16px; border-radius: 8px; color: #b91c1c; font-size: 0.85rem; line-height: 1.6; margin-bottom: 20px; }
.wn-footer-info { font-size: 0.85rem; color: #64748b; line-height: 1.6; }

/* 📱 Responsive Mobile (Bottom Nav App Style) */
@media (max-width: 1024px) {
    .wn-board-header { display: none; }
    .wn-ledger-row { flex-wrap: wrap; padding: 20px; gap: 15px; }
    .wn-col-platform, .wn-row-platform { padding-left: 0; width: 100%; flex: none; justify-content: flex-start; }
    .wn-row-rank { display: none; } /* 모바일에서 숫자랭크 뱃지로 대체 예정 */
    .wn-row-spec { width: 100%; flex: none; padding-right: 0; }
    .wn-row-action { width: 100%; justify-content: flex-start; margin-top: 10px; }
    .wn-btn-connect { width: 100%; text-align: center; }
    .wn-posts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    /* 사이드바를 모바일 바텀 탭바(Bottom Nav)로 완벽 변환 */
    .wn-app-layout { flex-direction: column; padding-bottom: 60px; }
    .wn-sidebar { position: fixed; bottom: 0; top: auto; left: 0; width: 100%; height: 60px; flex-direction: row; border-right: none; border-top: 1px solid #1e293b; z-index: 1000; padding: 0; overflow: hidden; }
    .wn-brand, .wn-nav-label, .wn-sidebar-footer { display: none; } /* 로고 및 푸터 숨김 */
    .wn-nav-menu { padding: 0; display: flex; width: 100%; justify-content: space-around; align-items: center; }
    .wn-nav-link { padding: 10px 5px; margin: 0; font-size: 0.75rem; text-align: center; border-radius: 0; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
    .wn-nav-link:hover, .wn-nav-link.active { background: transparent; color: #2dd4bf; border-top: 2px solid #2dd4bf; }
    
    .wn-top-header { padding: 0 15px; height: 55px; }
    .wn-search-dummy { width: 180px; }
    
    .wn-content-inner { padding: 20px 15px; }
    
    /* 모바일 접속 시 초압축 여백 (Above the fold) */
    .wn-kpi-grid { display: flex; overflow-x: auto; gap: 12px; padding-bottom: 10px; margin-bottom: 15px; scroll-snap-type: x mandatory; }
    .wn-kpi-card { min-width: 200px; padding: 16px; scroll-snap-align: start; flex-shrink: 0; }
    .wn-kpi-value { font-size: 1.4rem; }
    
    .wn-page-header { margin-bottom: 20px; }
    .wn-page-title { font-size: 1.35rem; margin-bottom: 6px; }
    .wn-page-desc { font-size: 0.85rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    
    /* 랭킹 카드 모바일 최적화 */
    .wn-ledger-row { position: relative; padding: 16px; border: 1px solid var(--wn-border); margin: 0 10px 12px 10px; border-radius: 12px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
    .wn-data-board { background: transparent; border: none; box-shadow: none; margin: 0 -10px 30px -10px; }
    
    /* 숫자 랭크를 카드 좌측 상단 뱃지로 부활 */
    .wn-row-platform::before { content: "TOP 1"; display: block; position: absolute; top: -1px; right: -1px; background: var(--wn-primary); color: #fff; font-size: 0.7rem; font-weight: 800; padding: 4px 10px; border-radius: 0 12px 0 8px; }
    .wn-ledger-row:nth-child(2) .wn-row-platform::before { content: "TOP 2"; background: #64748b; }
    .wn-ledger-row:nth-child(3) .wn-row-platform::before { content: "TOP 3"; background: #b45309; }
    .wn-ledger-row:nth-child(n+4) .wn-row-platform::before { display: none; }
    
    .wn-spec-desc { display: none; } /* 공간 확보를 위해 상세 설명 숨김 */
    .wn-spec-benefit { font-size: 0.9rem; margin-bottom: 0; }
    .wn-row-action { margin-top: 15px; }
    
    .wn-doc-section { padding: 24px 20px; margin-bottom: 30px; }
    .wn-footer { padding: 20px 15px; }
}