/* ============================================================
   layout.css — top-bar, bottom-tab-bar, page-wrap/hero/section, theme-toggle, mobile header/overlay
   Split from static/style.css (move-only refactor 2026-07).
   ============================================================ */

.hero-title  {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.hero-desc  {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    /* Mobile sidebar overlay */
        .mobile-overlay  {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            z-index: 999;
        }
    .mobile-overlay.active  {
            display: block;
        }
    /* === Mobile Header === */
        .mobile-header  {
            display: flex !important;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: var(--header-height);
            background: var(--bg-secondary);
            border-bottom: 1px solid var(--border-light);
            align-items: center;
            padding: 0 var(--spacing-md);
            z-index: 998;
        }
    .mobile-menu-btn  {
            display: flex !important;
            width: 44px;
            height: 44px;
            align-items: center;
            justify-content: center;
            background: transparent;
            border: none;
            color: var(--text-primary);
            font-size: 1.5rem;
            cursor: pointer;
        }
    .mobile-title  {
            flex: 1;
            text-align: center;
            font-size: 1.1rem;
            font-weight: 600;
        }
}

/* === Mobile Header (hidden on desktop) === */
.mobile-header  {
    display: none;
}

.mobile-menu-btn  {
    display: none;
}

.binding-panel-header  {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* mobile-header 다크 → 라이트 */
.mobile-header  {
    background: var(--surface-base);
    border-bottom-color: var(--border-subtle);
}

/* =========================================================
   Global Top Bar (PC) + Bottom Tab Bar (Mobile)
   ========================================================= */
.top-bar  {
    display: flex;
    align-items: center;
    gap: 24px;
    height: var(--header-h);
    padding: 0 24px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--surface-base);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar-brand  {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-strong);
    font-weight: 600;
    font-size: var(--fs-15);
    text-decoration: none;
}

.brand-mark  {
    width: 28px;
    height: 28px;
    border-radius: var(--r-sm);
    background: var(--accent);
    color: var(--accent-fg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.brand-name  { letter-spacing: -0.01em; }

.top-bar-nav  {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.top-bar-item  {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--r-sm);
    color: var(--text-secondary);
    font-size: var(--fs-14);
    font-weight: 500;
    text-decoration: none;
    transition: background var(--t-fast), color var(--t-fast);
    cursor: pointer;
    border: none;
    background: transparent;
    font-family: inherit;
}

.top-bar-item:hover  {
    background: var(--surface-sunken);
    color: var(--text-primary);
}

.top-bar-item.is-current  {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.top-bar-right  {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.user-chip  {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border-radius: var(--r-pill);
    background: var(--surface-sunken);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: var(--fs-13);
    font-weight: 500;
}

.user-chip:empty  { display: none; }

.user-avatar  {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--camel);
    color: var(--text-inverse);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
}

.top-bar-right .theme-toggle,
.top-bar-right .ds-btn--icon  {
    background: transparent;
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: var(--r-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
}

.top-bar-right .theme-toggle:hover  {
    background: var(--surface-sunken);
    color: var(--text-primary);
}

.bottom-tab-bar  {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--tabbar-h);
    background: var(--surface-base);
    border-top: 1px solid var(--border-subtle);
    z-index: 100;
    padding: 4px 0 calc(4px + env(safe-area-inset-bottom));
}

.bottom-tab  {
    flex: 1;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    padding: 6px 0;
    font-family: inherit;
    line-height: 1.2;
}

.bottom-tab .tab-icon  {
    font-size: 18px;
    line-height: 1;
}

.bottom-tab.is-current  {
    color: var(--accent);
    font-weight: 600;
}

/* 페이지 공통 wrapper */
.page-wrap  {
    flex: 1;
    overflow-y: auto;
    padding: 32px 40px 64px;
    height: calc(100vh - var(--header-h));
    background: var(--surface-canvas);
}

@media (max-width: 768px) {
    .top-bar  { display: none; }
    .bottom-tab-bar  { display: flex; }
    .page-wrap  {
            padding: 16px 16px calc(16px + var(--tabbar-h) + env(safe-area-inset-bottom));
            height: 100vh;
        }
}

@media (min-width: 769px) {
    .bottom-tab-bar  { display: none; }
}

/* =========================================================
   Page Hero / Section — 공통 페이지 헤더 스타일
   ========================================================= */
.page-hero  {
    padding: 12px 0 32px;
    max-width: 720px;
}

.hero-eyebrow  {
    display: inline-block;
    margin-bottom: 12px;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: var(--fs-12);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.page-wrap .hero-title  {
    font-family: var(--font-serif);
    font-size: 44px;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.015em;
    color: var(--text-strong);
    margin: 0;
}

.hero-desc  {
    margin-top: 12px;
    font-size: var(--fs-15);
    color: var(--text-secondary);
    line-height: 1.55;
}

.page-section  { margin-bottom: 36px; }

.section-head  {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 8px;
}

.section-head h2,
.page-section-title-only  {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text-strong);
    margin: 0 0 14px;
}

.section-head h2  { margin-bottom: 0; }

.section-head-actions  {
    display: flex;
    gap: 8px;
    align-items: center;
}

.playlists-loading  {
    text-align: center;
    padding: 48px 16px;
    margin: 24px 0;
}

@media (max-width: 768px) {
    /* 페이지 헤더/타이틀 모바일 사이즈 */
        .page-wrap .hero-title  {
            font-size: 32px;
        }
    .page-wrap .lb-header-top h1,
        .page-wrap .curate-header h1,
        .page-wrap .curate-title,
        .page-wrap .playlists-header h1,
        .page-wrap .playlists-title  {
            font-size: 26px;
        }
    .section-head h2,
        .page-section-title-only  {
            font-size: 22px;
        }
    /* 모바일 mobile-header 라이트 */
        .mobile-header  {
            background: var(--surface-base);
            border-bottom: 1px solid var(--border-subtle);
            height: var(--header-h);
        }
    .mobile-menu-btn  {
            color: var(--text-strong);
        }
    .mobile-title  {
            color: var(--text-strong);
            font-family: var(--font-serif);
        }
    .mobile-overlay  {
            background: var(--surface-overlay);
        }
    /* hero 헤더 패딩 */
        .page-hero  { padding: 8px 0 20px; }
}

@media (max-width: 480px) {
    /* 하단 여백에 탭바 높이를 반드시 포함 — 12px 단축형이 768px 룰의 탭바 여백을
       덮어써서 마지막 카드·푸터가 탭바에 잘리던 버그(리뷰 BUG-6/V7) */
    .page-wrap  {
            padding: 12px 12px calc(12px + var(--tabbar-h) + env(safe-area-inset-bottom));
        }
    .page-wrap .hero-title  {
            font-size: 26px;
        }
}

/* =========================================================
   Mobile floating theme toggle (모바일에서 top-bar 숨겨질 때 노출)
   ========================================================= */
.theme-toggle-mobile  {
    display: none;
    position: fixed;
    top: calc(12px + env(safe-area-inset-top));
    right: 12px;
    z-index: 200;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-raised);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    transition: background var(--t-fast), color var(--t-fast);
}

.theme-toggle-mobile:hover,
.theme-toggle-mobile:active  {
    background: var(--surface-sunken);
    color: var(--accent);
}

@media (max-width: 768px) {
    .theme-toggle-mobile  { display: inline-flex; }
}
