/* ============================================================
   MarketingBox - Main Stylesheet (White Theme)
   ============================================================ */

/* CSS Variables */
:root {
    /* Background */
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f5f5f7;
    --bg-elevated: #ffffff;
    --bg-hover: #f0f0f5;
    --bg-dark: #0f172a;

    /* Text */
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --text-inverse: #ffffff;

    /* Brand */
    --brand-primary: #4f46e5;
    --brand-secondary: #7c3aed;
    --brand-light: #eef2ff;
    --brand-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);

    /* Border */
    --border-primary: #ebebef;
    --border-secondary: #dddde3;
    --border-hover: #b8b8c4;

    /* Status */
    --success: #059669;
    --success-light: #ecfdf5;
    --error: #ef4444;
    --error-light: #fef2f2;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --info: #3b82f6;
    --info-light: #eff6ff;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.03);
    --shadow-xl: 0 16px 40px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.04);

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

    /* Spacing */
    --nav-height: 64px;
    --container-max: 1200px;
    --container-padding: 24px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
    color: var(--text-primary);
    background: var(--bg-secondary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover { color: var(--brand-secondary); }

img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   Container
   ============================================================ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ============================================================
   Navigation Bar (Public Pages)
   ============================================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    height: var(--nav-height);
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.navbar-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}
.navbar-brand:hover { color: var(--text-primary); }

.navbar-brand img {
    width: 32px;
    height: 32px;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.mobile-menu-actions { display: none; }

.navbar-menu a {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}
.navbar-menu a:hover,
.navbar-menu a.active {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 알림 벨 */
.noti-bell-wrap {
    position: relative;
}
.noti-bell-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}
.noti-bell-btn:hover {
    color: var(--brand-primary);
    background: var(--bg-hover);
}
.noti-badge {
    position: absolute;
    top: 2px;
    right: 0;
    background: #ef4444;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}
.noti-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    width: 320px;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
    z-index: 1000;
    overflow: hidden;
}
.noti-dropdown.open {
    display: block;
}
.noti-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-primary);
    font-weight: 600;
    font-size: 0.9rem;
}
.noti-read-all {
    background: none;
    border: none;
    color: var(--brand-primary);
    font-size: 0.8rem;
    cursor: pointer;
}
.noti-read-all:hover {
    text-decoration: underline;
}
.noti-dropdown-list {
    max-height: 300px;
    overflow-y: auto;
}
.noti-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background var(--transition-fast);
    border-bottom: 1px solid var(--border-primary);
}
.noti-item:last-child {
    border-bottom: none;
}
.noti-item:hover {
    background: var(--bg-hover);
}
.noti-item.noti-unread {
    background: var(--brand-light, #f0f4ff);
}
.noti-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}
.noti-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.noti-title {
    font-size: 0.85rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.noti-time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}
.noti-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}
.noti-dropdown-footer {
    display: block;
    text-align: center;
    padding: 10px;
    font-size: 0.8rem;
    color: var(--brand-primary);
    border-top: 1px solid var(--border-primary);
    text-decoration: none;
}
.noti-dropdown-footer:hover {
    background: var(--bg-hover);
}
@media (max-width: 768px) {
    .noti-dropdown {
        width: 280px;
        right: -40px;
    }
}

/* Nav Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px 0;
    z-index: 100;
    list-style: none;
}

.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu a {
    display: block;
    padding: 8px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-radius: 0;
}

.nav-dropdown-menu a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Mobile menu button */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .navbar-toggle { display: flex; }
    .navbar-actions { display: none; }
    .navbar-menu {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-primary);
        border-bottom: 1px solid rgba(0,0,0,0.06);
        padding: 8px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
        max-height: calc(100vh - var(--nav-height));
        overflow-y: auto;
    }
    .navbar-menu.open { display: flex; }
    .navbar-menu a {
        padding: 14px 16px;
        width: 100%;
        font-size: 0.95rem;
    }
    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0 0 0 16px;
    }
    .nav-dropdown:hover .nav-dropdown-menu,
    .nav-dropdown .nav-dropdown-menu {
        display: block;
    }
    /* 모바일 메뉴 내 action 링크 */
    .navbar-menu .mobile-menu-actions {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 12px 8px;
        border-top: 1px solid rgba(0,0,0,0.06);
        margin-top: 4px;
    }
    .navbar-menu .mobile-menu-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 0.925rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: var(--text-inverse);
    box-shadow: 0 1px 2px rgba(79, 70, 229, 0.2);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #5b5bd6 100%);
    color: var(--text-inverse);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: rgba(0,0,0,0.12);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}
.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: var(--text-inverse);
    box-shadow: 0 1px 2px rgba(5, 150, 105, 0.2);
}
.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: var(--text-inverse);
    box-shadow: 0 1px 2px rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .btn { min-height: 44px; }
    .btn-sm { min-height: 40px; padding: 10px 16px; }
}
@media (max-width: 480px) {
    .btn { padding: 12px 20px; font-size: 0.9rem; }
    .btn-lg { padding: 14px 24px; }
}

/* ============================================================
   Cards
   ============================================================ */
.card {
    background: var(--bg-primary);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 12px rgba(0,0,0,0.04);
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.06);
    border-color: rgba(0,0,0,0.06);
    transform: translateY(-3px);
}

.card-image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-tertiary);
    position: relative;
}

/* 찜하기 하트 버튼 */
.wishlist-heart {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    background: rgba(255,255,255,.85);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-tertiary);
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.wishlist-heart:hover {
    color: #ef4444;
    background: #fff;
    transform: scale(1.1);
}
.wishlist-heart.active {
    color: #ef4444;
}
.wishlist-heart.active svg {
    fill: #ef4444;
}

/* 카드 이미지 오버레이 뱃지 */
.card-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.card-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.card-badge-featured {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
}
.card-badge-package {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: #fff;
}
.card-badge-private {
    background: rgba(30, 30, 40, 0.8);
    color: #e2e8f0;
}
.card-badge-stopped {
    background: rgba(239, 68, 68, 0.85);
    color: #fff;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card:hover .card-image img {
    transform: scale(1.03);
}

.card-body {
    padding: 22px 24px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.card-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-primary);
}

.card-price.free {
    color: var(--success);
}

.card-price-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.card-price-original {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    text-decoration: line-through;
}

.card-price-dual {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.card-price-monthly {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ============================================================
   Product Grid
   ============================================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

@media (max-width: 640px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    :root {
        --container-padding: 16px;
    }
    .product-grid {
        gap: 14px;
    }
    .card-body {
        padding: 16px 18px;
    }
    .card-footer {
        padding: 14px 18px;
    }
    .card-title {
        font-size: 1rem;
    }
    .card-desc {
        font-size: 0.84rem;
        margin-bottom: 12px;
    }
}

/* ============================================================
   Badges & Tags
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    /* 배지는 절대 줄바꿈되면 안 된다.
       좁은 테이블 열(예: 주문목록 상태 80px)에 들어가면 "결제완료" 가
       한 글자씩 세로로 쪼개진다. */
    white-space: nowrap;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-primary { background: var(--brand-light); color: var(--brand-primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-error { background: var(--error-light); color: var(--error); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-secondary { background: var(--bg-tertiary); color: var(--text-secondary); }

.tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 500;
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid rgba(0,0,0,0.06);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.tag:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: rgba(0,0,0,0.1);
}
.tag.active {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

/* ============================================================
   Forms
   ============================================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 11px 16px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-primary);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1), 0 1px 2px rgba(0,0,0,0.04);
    background: #fff;
}

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

.form-textarea { min-height: 120px; resize: vertical; }

.form-error {
    font-size: 0.8rem;
    color: var(--error);
    margin-top: 4px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* ============================================================
   Tables
   ============================================================ */
.table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-size: 0.875rem;
}

.table th {
    background: transparent;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    border-bottom-width: 2px;
}

.table tr:last-child td { border-bottom: none; }

.table tr:hover td { background: var(--bg-hover); }

@media (max-width: 768px) {
    .table-wrap { border-radius: var(--radius-md); }
    .table th, .table td {
        padding: 12px 14px;
        font-size: 0.82rem;
    }
}

/* Main content area */
.main-content-area {
    padding-top: 32px;
    padding-bottom: 80px;
}
@media (max-width: 768px) {
    .main-content-area { padding-top: 24px; padding-bottom: 56px; }
}
@media (max-width: 480px) {
    .main-content-area { padding-top: 16px; padding-bottom: 40px; }
}

/* ============================================================
   Section Headings
   ============================================================ */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 48px;
}

@media (max-width: 768px) {
    .section { padding: 56px 0; }
    .section-title { font-size: 1.6rem; }
    .section-subtitle { font-size: 0.92rem; margin-bottom: 32px; }
}
@media (max-width: 480px) {
    .section { padding: 40px 0; }
    .section-title { font-size: 1.4rem; }
    .section-subtitle { margin-bottom: 24px; }
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
    background: linear-gradient(135deg, #312e81 0%, #4f46e5 40%, #7c3aed 80%, #6d28d9 100%);
    color: var(--text-inverse);
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(124, 58, 237, 0.3) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 20%, rgba(99, 102, 241, 0.25) 0%, transparent 50%);
    pointer-events: none;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    position: relative;
    letter-spacing: -0.02em;
}

.hero-desc {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 36px;
    line-height: 1.7;
    position: relative;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.hero .btn-primary {
    background: #ffffff;
    color: var(--brand-primary);
    font-weight: 600;
}
.hero .btn-primary:hover {
    background: #f0f0f0;
}

.hero .btn-secondary {
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    border-color: rgba(255,255,255,0.3);
}
.hero .btn-secondary:hover {
    background: rgba(255,255,255,0.25);
}

@media (max-width: 768px) {
    .hero { padding: 56px 0; }
    .hero-title { font-size: 1.75rem; }
    .hero-desc { font-size: 0.95rem; margin-bottom: 28px; }
    .hero-actions { gap: 8px; }
    .hero-actions .btn { padding: 12px 20px; font-size: 0.9rem; }
}
@media (max-width: 480px) {
    .hero { padding: 44px 0; }
    .hero-title { font-size: 1.5rem; }
    .hero-desc { font-size: 0.9rem; margin-bottom: 24px; }
    .hero-actions { flex-direction: column; align-items: center; }
    .hero-actions .btn { width: 100%; max-width: 280px; }
}

/* Hero Compact (메인 페이지용) */
.hero.hero-compact {
    padding: 48px 0;
}
.hero.hero-compact .hero-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
}
.hero.hero-compact .hero-desc {
    margin-bottom: 0;
}
@media (max-width: 768px) {
    .hero.hero-compact { padding: 32px 0; }
    .hero.hero-compact .hero-title { font-size: 1.35rem; }
    .hero.hero-compact .hero-desc { font-size: 0.88rem; }
}
@media (max-width: 480px) {
    .hero.hero-compact { padding: 24px 0; }
    .hero.hero-compact .hero-title { font-size: 1.2rem; }
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
    background: linear-gradient(180deg, var(--bg-dark) 0%, #0c0f1a 100%);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.footer-desc {
    font-size: 0.875rem;
    line-height: 1.7;
}

.footer-heading {
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.6);
}
.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}
.footer-legal { margin-left: 8px; }
.footer-legal a { color: rgba(255,255,255,0.5); text-decoration: none; }
.footer-legal a:hover { color: rgba(255,255,255,0.8); }
.footer-sep { margin: 0 6px; color: rgba(255,255,255,0.3); }

@media (max-width: 768px) {
    .footer {
        padding: 48px 0 24px;
        margin-top: 60px;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }
    .footer-brand { font-size: 1.1rem; }
    .footer-desc { font-size: 0.82rem; }
}

@media (max-width: 480px) {
    .footer {
        padding: 40px 0 20px;
        margin-top: 48px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .footer-bottom {
        font-size: 0.75rem;
        padding-top: 18px;
    }
    .footer-legal { display: block; margin-left: 0; margin-top: 6px; }
}

/* ============================================================
   Auth Pages
   ============================================================ */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - var(--nav-height));
    padding: 40px 24px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-primary);
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: var(--radius-xl);
    padding: 44px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08), 0 8px 32px rgba(0,0,0,0.04);
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 32px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Password toggle */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    padding: 4px;
}

/* ============================================================
   Page Header
   ============================================================ */
.page-header {
    background: var(--bg-primary);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    padding: 36px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.page-header-title {
    font-size: 1.75rem;
    font-weight: 700;
}

.page-header-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

@media (max-width: 768px) {
    .page-header { padding: 28px 0; }
    .page-header-title { font-size: 1.4rem; }
    .page-header-desc { font-size: 0.88rem; }
}
@media (max-width: 480px) {
    .auth-wrapper { padding: 24px 16px; }
    .auth-card { padding: 28px 24px; }
    .auth-title { font-size: 1.3rem; }
    .page-header { padding: 22px 0; }
    .page-header-title { font-size: 1.25rem; }
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.breadcrumb a { color: var(--text-tertiary); }
.breadcrumb a:hover { color: var(--brand-primary); }
.breadcrumb-sep { color: var(--text-tertiary); }

/* ============================================================
   Toast Notifications
   ============================================================ */
.toast-container {
    position: fixed;
    top: calc(var(--nav-height) + 16px);
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-primary);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    transform: translateX(120%);
    transition: transform var(--transition-slow);
    font-size: 0.875rem;
}

.toast-show { transform: translateX(0); }
.toast-hide { transform: translateX(120%); }

.toast-icon { flex-shrink: 0; }
.toast-message { flex: 1; color: var(--text-primary); }

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    padding: 2px;
    flex-shrink: 0;
}

.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--error); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon { color: var(--info); }

/* ============================================================
   Popup Banner
   ============================================================ */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.popup-content {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    max-width: 500px;
    width: 100%;
    position: relative;
    box-shadow: var(--shadow-xl);
}

.popup-content img {
    width: 100%;
    display: block;
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.popup-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid var(--border-primary);
}

.popup-today-close {
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    background: none;
    border: none;
}

/* ============================================================
   Pagination
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.pagination a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.pagination .active {
    background: var(--brand-primary);
    color: var(--text-inverse);
    border-color: var(--brand-primary);
}

/* ============================================================
   Utility Classes
   ============================================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-secondary); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-brand { color: var(--brand-primary); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* ============================================================
   Focus Styles (접근성)
   ============================================================ */
.btn:focus-visible,
a:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

.tag:focus-visible,
.badge:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* ============================================================
   Touch Target (최소 44px 보장)
   ============================================================ */
@media (max-width: 768px) {
    .tag {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    .navbar-menu a {
        min-height: 44px;
    }
}

/* ============================================================
   Loading Spinner (전역)
   ============================================================ */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.6);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms;
}
.loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border-primary);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 버튼 로딩 상태 */
.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}
.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* ============================================================
   Skeleton Loading
   ============================================================ */
@keyframes skeleton-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

.skeleton {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    border-radius: 4px;
}
.skeleton-text.short { width: 60%; }
.skeleton-text.medium { width: 80%; }

.skeleton-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-md);
}

/* 이미지 로딩 페이드인 */
.card-image img {
    opacity: 0;
    transition: opacity 300ms ease, transform var(--transition-slow);
}
.card-image img.loaded {
    opacity: 1;
}

/* ============================================================
   My Page Navigation
   ============================================================ */
.my-nav {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-primary);
    overflow-x: auto;
}
.my-nav-item {
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: all var(--transition-fast);
}
.my-nav-item:hover { color: var(--text-primary); }
.my-nav-item.active {
    color: var(--brand-primary);
    border-bottom-color: var(--brand-primary);
    font-weight: 600;
}

/* ============================================================
   Program Cards (my/programs)
   ============================================================ */
.program-list { display: flex; flex-direction: column; gap: 16px; }
.program-card { padding: 24px; }
.program-card-inner { display: flex; gap: 20px; align-items: flex-start; }

.program-thumb {
    width: 80px; height: 80px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    overflow: hidden;
    flex-shrink: 0;
}
.program-thumb img { width: 100%; height: 100%; object-fit: cover; }
.program-thumb-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
}

.program-info { flex: 1; min-width: 0; }
.program-title-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.program-title { font-size: 1.05rem; font-weight: 600; }
.program-meta {
    display: flex; flex-wrap: wrap; gap: 16px;
    font-size: 0.8rem; color: var(--text-secondary);
    margin-bottom: 12px;
}

.program-license-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.program-license-label { font-size: 0.8rem; color: var(--text-tertiary); }
.program-license-code {
    font-size: 0.8rem; background: var(--bg-secondary);
    padding: 4px 10px; border-radius: var(--radius-sm);
    font-family: monospace; letter-spacing: 0.5px;
}
.program-license-copy {
    font-size: 0.75rem; background: none;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    padding: 2px 8px; cursor: pointer;
    color: var(--text-secondary);
}

.program-download { flex-shrink: 0; text-align: right; }
.program-download .file-size { font-size: 0.7rem; color: var(--text-tertiary); margin-top: 4px; }
.program-download .status-text { font-size: 0.7rem; color: var(--text-tertiary); margin-top: 4px; }

.program-empty { padding: 60px 32px; text-align: center; }
.program-empty svg { margin: 0 auto 16px; display: block; }
.program-empty h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.program-empty p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 24px; }

/* ═══════════ 별 (추천 표시 · 별점) ═══════════
   ★☆ 문자는 글꼴마다 모양이 다르고 빈 별이 앙상해 보인다.
   jangsa 프로젝트에서 쓰는 통통한 SVG 별로 통일. 색은 앰버 고정. */
:root { --star: #f6ab1e; }

.mb-star {
    display: inline-flex;
    line-height: 0;
    vertical-align: -2px;
}
.mb-star svg { width: 16px; height: 16px; }
.mb-star svg path {
    fill: var(--border-secondary);
    transition: fill 150ms;
}
.mb-star.on svg path { fill: var(--star); }

/* 별점 — 소수점은 위에 겹친 레이어의 너비로 표현한다 */
.mb-stars {
    position: relative;
    display: inline-flex;
    line-height: 0;
    vertical-align: -2px;
}
.mb-stars svg { width: 15px; height: 15px; }
.mb-stars.lg svg { width: 22px; height: 22px; }
.mb-stars-base,
.mb-stars-on { display: inline-flex; line-height: 0; }
.mb-stars-base svg path { fill: rgba(0, 0, 0, .13); }
.mb-stars-on {
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    white-space: nowrap;
}
.mb-stars-on svg path { fill: var(--star); }

/* 리뷰 작성 시 고르는 별 */
.star-pick { cursor: pointer; }
.star-pick .mb-star svg { width: 28px; height: 28px; }
.star-pick:hover .mb-star svg path { fill: var(--star); }
