/* Global Custom Variables & Reset */
:root {
    /* 팔레트 D (라벤더 크림): 크림 배경 + 짙은 보라 글씨, 포인트는 라벤더 하나 */
    --bg-dark: #f7f4fb; /* 라벤더 크림 배경 */
    --bg-card: rgba(255, 255, 255, 0.96);
    --card-bg: #ffffff;
    --bg-card-hover: #ffffff;
    --border-color: rgba(46, 36, 69, 0.10);
    --border-hover: rgba(107, 79, 160, 0.5);
    --text-main: #2e2445; /* 짙은 보라빛 남색 */
    --text-muted: #5a5270;

    --primary: #6b4fa0;
    --primary-dark: #4e3782;
    --primary-soft: #eee8f7; /* 연한 라벤더 면 */
    --accent-peach: #fbe6c9; /* 삽화·강조용 복숭아색 */
    --accent-peach-deep: #c7803f;
    --primary-gradient: linear-gradient(135deg, #6b4fa0 0%, #7d62b3 100%);
    --accent-purple: #8a6fc0;
    --accent-purple-gradient: linear-gradient(135deg, #6b4fa0 0%, #8a6fc0 100%);
    --accent-green: #3e9a74;
    --accent-yellow: #f59e0b;
    --accent-red: #ef4444;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-premium: 0 10px 30px -10px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 8% 6%, rgba(107, 79, 160, 0.07) 0px, transparent 40%),
        radial-gradient(at 92% 92%, rgba(251, 230, 201, 0.45) 0px, transparent 40%);
    color: var(--text-main);
    font-family: 'Outfit', 'Noto Sans KR', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* App Container */
.app-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Header & Navigation */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0; /* Prevents logo from being squeezed by nav menu */
}

.logo-icon {
    font-size: 2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse 3s infinite alternate;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    white-space: nowrap; /* Prevents text wrapping */
}

.logo h1 span {
    font-weight: 300;
    color: var(--text-muted);
    margin-left: 2px;
}

.nav-menu {
    display: flex;
    gap: 12px;
    background: #ffffff;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    flex-grow: 1; /* Stretch to occupy the remaining width */
}

/* Auth Status Container inside GNB */
.nav-auth-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding-left: 15px;
    border-left: 1px solid rgba(15, 23, 42, 0.08);
    flex-shrink: 0;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600; /* Bolder text */
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center; /* Center the icon and text */
    gap: 8px;
    transition: var(--transition-smooth);
    white-space: nowrap; /* Prevents button text wrapping */
    flex: 1;             /* Make each button fill its share of the menu width */
}

.nav-btn:hover {
    color: var(--primary);
    background: rgba(107, 79, 160, 0.06);
}

/* 현재 페이지는 연한 면으로만 표시한다. 진한 색은 대표 과정(.nav-featured) 몫이다. */
.nav-btn.active {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

/* 대표 과정 메뉴 (동화책 자격증) */
.nav-btn.nav-featured {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(107, 79, 160, 0.28);
}

.nav-btn.nav-featured:hover {
    background: var(--primary-dark);
    color: #ffffff;
}

.nav-btn.nav-featured.active {
    background: var(--primary-dark);
    color: #ffffff;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--primary);
}

.nav-featured-badge {
    font-style: normal;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 999px;
    background: var(--accent-peach);
    color: #7a4a1c;
}

/* Main Content Views */
.main-content {
    flex-grow: 1;
}

.view-section {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.view-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 40px;
}

.hero-section h2 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 15px;
}

.hero-section h2 span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-section p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* 홈 히어로: 왼쪽 글 + 오른쪽 삽화 */
.hero-section.hero-with-art {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    text-align: left;
    margin-bottom: 28px;
    padding: 8px 8px 0;
    word-break: keep-all; /* 한글 단어 중간에서 줄바꿈하지 않게 */
}

.hero-with-art .hero-text p {
    margin: 0;
}

.hero-art {
    width: 260px;
    max-width: 38%;
    flex-shrink: 0;
    height: auto;
}

/* 홈 대표 과정 카드 (동화책 자격증) */
.feature-course {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 22px 28px;
    margin-bottom: 30px;
    border-radius: 20px;
    background: var(--primary);
    color: #ffffff;
    cursor: pointer;
    word-break: keep-all;
    box-shadow: 0 12px 28px -12px rgba(78, 55, 130, 0.55);
    transition: var(--transition-smooth);
}

.feature-course:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.feature-course:focus-visible {
    outline: 3px solid var(--accent-peach);
    outline-offset: 3px;
}

.feature-course-art {
    width: 96px;
    flex-shrink: 0;
}

.feature-course-body {
    flex: 1;
    min-width: 0;
}

.feature-course-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--accent-peach);
    color: #7a4a1c;
}

.feature-course h3 {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 8px 0 4px;
    letter-spacing: -0.3px;
}

.feature-course p {
    font-size: 0.95rem;
    color: #e6ddf3;
    margin: 0;
}

.feature-course-cta {
    flex-shrink: 0;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 12px 18px;
    border-radius: 12px;
    background: #ffffff;
    color: var(--primary-dark);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .hero-section.hero-with-art {
        flex-direction: column-reverse;
        text-align: center;
        gap: 12px;
    }
    .hero-art {
        width: 180px;
        max-width: 60%;
    }
    .hero-section h2 {
        font-size: 1.7rem;
    }
    .feature-course {
        flex-wrap: wrap;
        padding: 20px;
        gap: 14px;
    }
    .feature-course-art {
        width: 64px;
    }
    .feature-course-body {
        flex-basis: calc(100% - 80px);
    }
    .feature-course-cta {
        width: 100%;
        text-align: center;
    }
}

/* Cards & Layout */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-premium);
    margin-bottom: 30px;
    transition: var(--transition-smooth);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

/* Wizard Form */
.wizard-card {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.wizard-progress {
    position: relative;
    margin-bottom: 45px;
    padding: 0 10px;
}

.wizard-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-50%);
    border-radius: 2px;
    z-index: 1;
}

.progress-bar-fill {
    position: absolute;
    top: 50%;
    left: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: translateY(-50%);
    border-radius: 2px;
    z-index: 2;
    width: 25%;
    transition: width 0.4s ease;
}

.steps-indicator {
    position: relative;
    display: flex;
    justify-content: space-between;
    z-index: 3;
}

.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1e293b;
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.step-dot.active {
    background: var(--bg-dark);
    border-color: #8a6fc0;
    color: #8a6fc0;
    box-shadow: 0 0 12px rgba(138, 111, 192, 0.4);
}

.step-dot.completed {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Form Steps */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.step-header {
    margin-bottom: 30px;
}

.step-number {
    font-size: 0.85rem;
    font-weight: 700;
    color: #8a6fc0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.step-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 5px 0 8px 0;
}

.step-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Form Fields */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.form-group label i {
    margin-right: 6px;
    color: var(--text-muted);
}

.required {
    color: var(--accent-red);
    margin-left: 2px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-group input[type="text"]::placeholder,
.form-group textarea::placeholder {
    color: rgba(15, 23, 42, 0.35);
}

.form-group input[type="text"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8a6fc0;
    background: #ffffff;
    box-shadow: 0 0 10px rgba(138, 111, 192, 0.15);
}

.form-group select option {
    background-color: #ffffff;
    color: var(--text-main);
}

/* Familiarity Slider Design */
.familiarity-container {
    padding: 15px 0;
}

.slider-group {
    position: relative;
    margin-bottom: 40px;
}

.form-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    transition: var(--transition-smooth);
}

.form-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #8a6fc0;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(138, 111, 192, 0.6);
    transition: var(--transition-smooth);
    border: 2px solid white;
}

.form-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.familiarity-card {
    background: rgba(138, 111, 192, 0.05);
    border: 1px solid rgba(138, 111, 192, 0.15);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.level-badge {
    position: absolute;
    top: 15px;
    right: 20px;
    background: var(--primary-gradient);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
}

.familiarity-card h4 {
    font-size: 1.1rem;
    color: #8a6fc0;
}

.familiarity-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 90%;
}

/* Checkbox Cards Grid */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 25px;
}

.checkbox-card {
    cursor: pointer;
    position: relative;
}

.hidden-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-card .card-content {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 22px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: var(--transition-smooth);
}

.card-icon {
    font-size: 1.6rem;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.checkbox-card .card-content h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 5px;
}

.checkbox-card .card-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Selected Checkbox Card style */
.hidden-checkbox:checked + .card-content {
    background: rgba(107, 79, 160, 0.06);
    border-color: #6b4fa0;
    box-shadow: 0 0 15px rgba(107, 79, 160, 0.15);
}

.hidden-checkbox:checked + .card-content .card-icon {
    color: #8a6fc0;
    transform: scale(1.1);
}

.hidden-checkbox:checked + .card-content h4 {
    color: #6b4fa0;
}

/* Agreement Box */
.agreement-box {
    margin-top: 25px;
    background: rgba(255, 255, 255, 0.02);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
}

.custom-checkbox {
    width: 20px;
    height: 20px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-label input[type="checkbox"]:checked ~ .custom-checkbox {
    background: var(--primary-gradient);
    border-color: #6b4fa0;
}

.checkbox-label input[type="checkbox"]:checked ~ .custom-checkbox::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: white;
    font-size: 0.75rem;
}

/* Button UI */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(107, 79, 160, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 79, 160, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-success {
    background: linear-gradient(135deg, #3e9a74 0%, #2f7d5c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(62, 154, 116, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(62, 154, 116, 0.4);
}

.btn.disabled, .btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.wizard-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    padding-top: 25px;
}

.hidden {
    display: none !important;
}

/* ------------------------------------------------------------- */
/* Dashboard Specific Styles */
/* ------------------------------------------------------------- */

.dashboard-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.controls-title h2 {
    font-size: 1.8rem;
    font-weight: 800;
}

.controls-title h2 span {
    background: var(--accent-purple-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.controls-title p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.controls-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    transition: var(--transition-smooth);
}

.btn-outline-info {
    color: #8a6fc0;
    border: 1px solid rgba(138, 111, 192, 0.3);
}

.btn-outline-info:hover {
    background: rgba(138, 111, 192, 0.08);
    border-color: #8a6fc0;
}

.btn-outline-success {
    color: #3e9a74;
    border: 1px solid rgba(62, 154, 116, 0.3);
}

.btn-outline-success:hover {
    background: rgba(62, 154, 116, 0.08);
    border-color: #3e9a74;
}

.btn-outline-danger {
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-outline-danger:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: #ef4444;
}

/* Stats Overview Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-premium);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.icon-blue {
    background: rgba(107, 79, 160, 0.15);
    color: #6b4fa0;
    border: 1px solid rgba(107, 79, 160, 0.2);
}

.icon-purple {
    background: rgba(138, 111, 192, 0.15);
    color: #8a6fc0;
    border: 1px solid rgba(138, 111, 192, 0.2);
}

.icon-pink {
    background: rgba(236, 72, 153, 0.15);
    color: #d9956a;
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.icon-yellow {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.stat-value .unit {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Charts Grid Layout */
.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
}

/* Medium Screen Navigation & Header Optimization */
@media (max-width: 1400px) and (min-width: 1151px) {
    .nav-menu {
        gap: 6px;
        padding: 4px;
    }
    .nav-btn {
        padding: 8px 12px;
        font-size: 0.88rem;
        gap: 6px;
    }
    .nav-auth-container {
        gap: 6px;
        padding-left: 10px;
    }
}

/* Mobile Navigation & Header Optimization */
@media (max-width: 1150px) {
    .main-header {
        flex-direction: column;
        gap: 15px;
        align-items: center;
        text-align: center;
        padding: 15px 0;
        margin-bottom: 25px;
    }

    .logo {
        flex-direction: column;
        gap: 6px;
    }

    .logo h1 {
        font-size: 1.35rem;
    }

    .nav-menu {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        display: flex;
        gap: 6px;
        padding: 4px;
        border-radius: 10px;
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
        overscroll-behavior-x: contain;
        touch-action: pan-x;
    }

    .nav-menu::-webkit-scrollbar {
        display: none; /* Chrome, Safari and Opera */
    }

    .nav-auth-container {
        margin-left: 6px;
        padding-left: 10px;
        border-left: 1px solid rgba(15, 23, 42, 0.08);
    }

    .nav-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
        gap: 6px;
        flex: none;
        flex-shrink: 0;
        border-radius: 6px;
    }
    
    .nav-btn i {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 10px 0;
        margin-bottom: 15px;
    }
    .logo-icon {
        font-size: 1.6rem;
    }
    .logo h1 {
        font-size: 1.2rem;
    }
    .nav-btn span {
        font-size: 0.75rem;
    }
}

.chart-card {
    margin-bottom: 0;
}

.card-header {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.card-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h3 i {
    color: #8a6fc0;
}

.card-header .subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    margin-top: 3px;
}

.chart-container {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
}

/* Custom Chart UI Design (Pure CSS/SVG Bars) */
.custom-bar-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bar-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 500;
}

.bar-label {
    color: var(--text-main);
}

.bar-count {
    color: var(--text-muted);
}

.bar-outer {
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.bar-inner {
    height: 100%;
    border-radius: 5px;
    width: 0; /* Dynamic width */
    transition: width 1s cubic-bezier(0.1, 0.8, 0.2, 1);
}

/* Colors for Chart elements */
.bar-color-1 { background: linear-gradient(90deg, #6b4fa0, #8a6fc0); }
.bar-color-2 { background: linear-gradient(90deg, #8a6fc0, #d9956a); }
.bar-color-3 { background: linear-gradient(90deg, #3e9a74, #2f7d5c); }
.bar-color-4 { background: linear-gradient(90deg, #f59e0b, #d97706); }
.bar-color-5 { background: linear-gradient(90deg, #6366f1, #4f46e5); }
.bar-color-6 { background: linear-gradient(90deg, #64748b, #475569); }

/* Demographic Pie Chart representation (using Flex grids/bars stacked) */
.job-pie-fallback {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pie-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pie-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.pie-label-text {
    font-size: 0.85rem;
    width: 80px;
}

.pie-bar-wrap {
    flex-grow: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.pie-bar-inner {
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: width 1s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.pie-percentage {
    font-size: 0.85rem;
    font-weight: 600;
    width: 45px;
    text-align: right;
}

/* Data Table Component */
.data-table-card {
    padding: 0;
    overflow: hidden;
}

.table-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.table-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-header h3 i {
    color: #8a6fc0;
}

.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.search-input-wrapper {
    position: relative;
}

.search-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-input-wrapper input {
    padding: 10px 14px 10px 36px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.85rem;
    width: 200px;
    transition: var(--transition-smooth);
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: #8a6fc0;
    width: 250px;
}

.filter-bar select {
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.85rem;
    cursor: pointer;
    outline: none;
}

.filter-bar select:focus {
    border-color: #8a6fc0;
}

.table-wrapper {
    overflow-x: auto;
    width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(15, 23, 42, 0.02);
}

.data-table tr {
    transition: var(--transition-smooth);
}

.data-table tbody tr:hover {
    background: rgba(107, 79, 160, 0.04);
}

.data-table td .badge-job {
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.data-table td .badge-interest {
    background: rgba(107, 79, 160, 0.1);
    color: #9b85c9;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 4px;
    display: inline-block;
    margin-bottom: 4px;
}

.data-table td .badge-level {
    font-weight: 700;
    color: #8a6fc0;
}

.data-table td .btn-detail {
    background: rgba(138, 111, 192, 0.1);
    color: #c084fc;
    border: 1px solid rgba(138, 111, 192, 0.2);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.data-table td .btn-detail:hover {
    background: rgba(138, 111, 192, 0.25);
    color: white;
}

.data-table td.no-data {
    text-align: center;
    color: var(--text-muted);
    padding: 60px 0;
    font-size: 0.95rem;
}

/* Modal Styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 7, 18, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    border-radius: 24px;
    padding: 30px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.15);
    transform: scale(0.9);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.modal.active .modal-content {
    transform: scale(1);
}

/* Video Player Modal Optimization (Prevents GPU Compositor glitches, tearing, blur, and freezing) */
#video-player-modal.modal {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(3, 7, 18, 0.88) !important;
}

#video-player-modal .modal-content,
#video-player-modal .video-modal-content {
    background: #0f172a !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none !important;
    transition: opacity 0.25s ease !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7) !important;
    max-width: 860px !important;
    width: 92% !important;
    border-radius: 20px !important;
}

#video-player-modal.active .modal-content,
#video-player-modal.active .video-modal-content {
    transform: none !important;
}

#video-player-modal #player-video-title {
    color: #f8fafc !important;
}

#video-player-modal .close-modal {
    color: #94a3b8 !important;
}

#video-player-modal .close-modal:hover {
    color: #ffffff !important;
}

#player-iframe-container,
#player-video-container {
    background: #000000 !important;
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    contain: paint;
}

#player-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #000000;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.close-modal:hover {
    color: var(--text-main);
}

.modal-header {
    margin-bottom: 24px;
}

.modal-header .badge {
    background: rgba(138, 111, 192, 0.1);
    color: #22d3ee;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 8px;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Modal Body Custom Scrollbar */
.modal-body::-webkit-scrollbar {
    width: 6px;
}
.modal-body::-webkit-scrollbar-track {
    background: transparent;
}
.modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}
.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

.info-block h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.level-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.level-display .stars {
    letter-spacing: 2px;
}

.level-display .level-text {
    font-weight: 600;
    font-size: 0.9rem;
    color: #8a6fc0;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tags-container .tag {
    background: rgba(107, 79, 160, 0.1);
    color: #9b85c9;
    border: 1px solid rgba(107, 79, 160, 0.2);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
}

.user-quote {
    background: rgba(138, 111, 192, 0.04);
    border-left: 3px solid #8a6fc0;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-main);
}

/* AI Recommendation prescriptions */
.ai-analysis-card {
    background: linear-gradient(135deg, rgba(138, 111, 192, 0.08) 0%, rgba(236, 72, 153, 0.08) 100%);
    border: 1px solid rgba(138, 111, 192, 0.25);
    border-radius: 16px;
    padding: 18px;
    margin-top: 10px;
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #4e3782;
}

.ai-header h4 {
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 0;
}

.ai-header i {
    animation: bounce-small 2s infinite;
}

.ai-content p {
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.5;
}

/* Footer Section */
.app-footer {
    text-align: center;
    padding: 40px 0 20px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 50px;
}

.app-footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.app-footer .footer-biz {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 14px;
    margin-bottom: 6px;
}

.app-footer .footer-biz a {
    color: inherit;
}

/* Toast Messages */
.toast {
    position: fixed;
    bottom: 25px;
    right: 25px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-color);
    padding: 20px 35px 20px 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    transform: translateX(calc(100% + 30px));
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1100;
    min-width: 320px;
}

.toast.active {
    transform: translateX(0px);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toast-content i {
    font-size: 1.5rem;
    color: #3e9a74;
}

.toast-content .message {
    display: flex;
    flex-direction: column;
}

.message .text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.message .text.text-1 {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.toast-close {
    position: absolute;
    top: 10px;
    right: 15px;
    padding: 5px;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition-smooth);
    font-size: 1.2rem;
}

.toast-close:hover {
    opacity: 1;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: #3e9a74;
}

.toast.active .toast-progress {
    animation: progress-bar 4s linear forwards;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 2px rgba(138, 111, 192, 0.2));
    }
    100% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 8px rgba(138, 111, 192, 0.6));
    }
}

@keyframes bounce-small {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

@keyframes progress-bar {
    100% {
        width: 0%;
    }
}

/* ------------------------------------------------------------- */
/* Seokyeong AI Portal Extension Styles */
/* ------------------------------------------------------------- */

/* Brand Accent Colors */
:root {
    --accent-emerald: #3e9a74;
    --accent-emerald-gradient: linear-gradient(135deg, #3e9a74 0%, #2f7d5c 100%);
    --bg-green-glass: rgba(62, 154, 116, 0.05);
    --border-green-glass: rgba(62, 154, 116, 0.15);
}

/* Home Section Layout */
.home-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 25px;
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .home-grid, .quick-nav-grid {
        grid-template-columns: 1fr !important;
    }
}

.intro-card {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #ffffff;
    border-color: var(--border-color);
}

.intro-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--accent-emerald-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 0 15px rgba(62, 154, 116, 0.3);
}

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

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

.intro-list li {
    font-size: 0.95rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.intro-list li i {
    color: var(--primary);
}

.highlight-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #fdf6ec 100%);
    border-color: rgba(199, 128, 63, 0.22);
}

.highlight-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-gradient);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(138, 111, 192, 0.3);
}

.highlight-card h3 {
    font-size: 1.6rem;
    margin-bottom: 12px;
    color: var(--text-main);
}

.highlight-card .desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Quick Navigation Grid */
.quick-nav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.nav-box {
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-box:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-premium);
}

.box-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.icon-emerald {
    background: rgba(62, 154, 116, 0.15);
    color: #3e9a74;
    border: 1px solid rgba(62, 154, 116, 0.2);
}

/* Dynamic Cards Grids */
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

/* Admin Edit Badge & Buttons */
.card-actions-wrapper {
    position: relative;
}

.card-admin-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: none; /* Controlled dynamically in JS */
    gap: 8px;
    z-index: 10;
}

.btn-edit-card, .btn-delete-card {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
    color: white;
}

.btn-edit-card {
    background: rgba(107, 79, 160, 0.9);
    border: 1px solid rgba(107, 79, 160, 0.4);
}

.btn-edit-card:hover {
    background: #6b4fa0;
    transform: scale(1.1);
}

.btn-delete-card {
    background: rgba(239, 68, 68, 0.9);
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-delete-card:hover {
    background: #ef4444;
    transform: scale(1.1);
}

/* Admin Only Visibility Class */
.admin-only {
    display: none; /* Managed by JS */
}

/* File Upload Styles inside Form */
.file-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-color);
    padding: 10px 15px;
    border-radius: 10px;
    margin-top: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-upload-wrapper:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: #8a6fc0;
}

.file-input-inline {
    display: none;
}

.btn-upload-custom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-main);
    font-weight: 500;
    transition: all 0.2s ease;
}

.file-upload-wrapper:hover .btn-upload-custom {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 10px rgba(138, 111, 192, 0.2);
}

.file-upload-status {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-upload-status.success {
    color: var(--accent-green);
}

.file-upload-status.uploading {
    color: #8a6fc0;
    animation: pulse 1.5s infinite alternate;
}

/* Dynamic Card Details */
.lecture-card-cover {
    height: 160px;
    width: 100%;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

/* Assignment Card Design */
.assignment-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: var(--transition-smooth);
}

.assignment-card:hover {
    transform: translateY(-5px);
    border-color: rgba(62, 154, 116, 0.3);
    box-shadow: 0 10px 20px rgba(62, 154, 116, 0.1);
}

.assign-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.assign-author-badge {
    font-weight: 700;
    color: var(--accent-green);
    background: rgba(62, 154, 116, 0.1);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
}

.assign-tool-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

.assign-preview-image {
    max-height: 180px;
    width: 100%;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.assign-preview-video {
    max-height: 200px;
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    outline: none;
    background: black;
}

.assign-doc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.assign-doc-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--text-muted);
}

/* AI Tool Selector Styling */
.ai-tool-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 12px;
}
.tool-tag-label {
    cursor: pointer;
}
.tool-checkbox {
    display: none;
}
.tool-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: all 0.25s ease;
    user-select: none;
}
.tool-checkbox:checked + .tool-tag {
    background: var(--accent-emerald-gradient);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(62, 154, 116, 0.2);
}
.tool-tag:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-light);
}
.hidden-etc-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition-smooth);
}
.hidden-etc-input:focus {
    border-color: var(--accent-emerald);
}

/* ------------------------------------------------------------- */
/* Assignment Restructuring Styles (List & Accordion & Tabs) */
/* ------------------------------------------------------------- */

/* Category Tabs wrapper */
.assign-category-wrapper {
    margin-bottom: 25px;
    width: 100%;
}

.assign-category-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 6px 4px 10px 4px;
    width: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) rgba(255, 255, 255, 0.03);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
}

.assign-category-tabs::-webkit-scrollbar {
    height: 4px;
    display: block;
}

.assign-category-tabs::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 2px;
}

.assign-category-tabs::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
}

.assign-category-tabs::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Category Tab style */
.category-tab {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-smooth);
    user-select: none;
    flex-shrink: 0;
}

.category-tab:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.category-tab.active {
    background: linear-gradient(135deg, #3e9a74 0%, #2f7d5c 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(62, 154, 116, 0.25);
    font-weight: 600;
}

/* Accordion List container override */
#assignments-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

/* Compact Assignment List Item */
.assignment-list-item {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
    width: 100%;
}

.assignment-list-item:not(.active):hover {
    border-color: rgba(62, 154, 116, 0.3);
    background: rgba(62, 154, 116, 0.04);
}

.assignment-list-item.active {
    border-color: rgba(62, 154, 116, 0.4);
    box-shadow: 0 10px 25px -5px rgba(62, 154, 116, 0.08), var(--shadow-premium);
}

/* List Item Row (Header Clickable Area) */
.assign-list-row {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    cursor: pointer;
    user-select: none;
    gap: 20px;
    width: 100%;
}

.assign-row-num {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 35px;
    flex-shrink: 0;
}

.assign-row-badge {
    background: rgba(62, 154, 116, 0.1);
    color: var(--accent-emerald);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 75px;
    text-align: center;
    border: 1px solid rgba(62, 154, 116, 0.15);
}

.assign-row-author {
    font-weight: 600;
    color: var(--text-main);
    min-width: 90px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assign-row-title {
    flex-grow: 1;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assign-row-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 80px;
    text-align: right;
}

.assign-row-arrow {
    color: var(--text-muted);
    transition: transform 0.3s ease;
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* Arrow rotation when active */
.assignment-list-item.active .assign-row-arrow {
    transform: rotate(180deg);
    color: var(--accent-emerald);
}

/* Accordion Details Panel */
.assign-details-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-top 0.35s ease;
    border-top: 0px solid transparent;
}

.assignment-list-item.active .assign-details-panel {
    border-top: 1px solid var(--border-color);
    max-height: 2000px; /* Big enough to contain full content seamlessly */
    overflow-y: auto;
}

/* Custom scrollbar for assignment details panel */
.assign-details-panel::-webkit-scrollbar {
    width: 6px;
}
.assign-details-panel::-webkit-scrollbar-track {
    background: transparent;
}
.assign-details-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
.assign-details-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Inner padding inside panel */
.assign-details-content {
    padding: 24px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .assign-details-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    .assign-list-row {
        padding: 12px 16px;
        gap: 12px;
        flex-wrap: wrap;
    }
    .assign-row-num {
        min-width: 30px;
        font-size: 0.8rem;
    }
    .assign-row-author {
        min-width: 70px;
    }
    .assign-row-title {
        width: 100%;
        order: 5; /* Pushes title to the next line in flex wrapper */
        font-size: 0.9rem;
    }
}

/* Content details details cards */
.details-section-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.details-section-box h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.mission-prescription-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-main);
    white-space: pre-wrap;
}

/* Troubleshooting Card Layout */
.trouble-prescription-box {
    background: rgba(239, 68, 68, 0.03);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-left: 4px solid var(--accent-red);
    padding: 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #991b1b;
    white-space: pre-wrap;
}

.comments-prescription-box {
    background: rgba(255, 255, 255, 0.01);
    border-left: 3px solid var(--accent-emerald);
    padding: 12px 16px;
    border-radius: 0 10px 10px 0;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Challenge Header Badge styling */
.challenge-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(62, 154, 116, 0.15) 0%, rgba(107, 79, 160, 0.15) 100%);
    border: 1px solid rgba(62, 154, 116, 0.3);
    color: #34d399;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(62, 154, 116, 0.1);
    animation: badgeGlow 4s infinite alternate;
}

@keyframes badgeGlow {
    0% {
        border-color: rgba(62, 154, 116, 0.3);
        box-shadow: 0 0 10px rgba(62, 154, 116, 0.1);
    }
    100% {
        border-color: rgba(107, 79, 160, 0.5);
        box-shadow: 0 0 20px rgba(107, 79, 160, 0.3);
    }
}

/* ------------------------------------------------------------- */
/* Video Course Cards & Text List Layout */
/* ------------------------------------------------------------- */

/* 코스 카드 그리드 */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
}

/* 개별 코스 카드 */
.course-card {
    background: #ffffff; /* Solid white background for high contrast */
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.course-card:hover {
    transform: translateY(-6px);
    border-color: #6b4fa0; /* Vibrant blue accent on hover */
    box-shadow: 0 10px 15px -3px rgba(107, 79, 160, 0.12), 0 4px 6px -2px rgba(107, 79, 160, 0.06);
}

/* 코스 카드가 선택(활성화)되었을 때 글로우 효과 */
.course-card.active {
    border-color: #6b4fa0;
    box-shadow: 0 0 0 2px rgba(107, 79, 160, 0.15), 0 10px 15px -3px rgba(107, 79, 160, 0.1);
    background: #ffffff;
}

.course-card.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #6b4fa0, #8a6fc0);
}

/* 코스 카드 썸네일 커버 */
.course-cover {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.6s ease;
}

.course-card:hover .course-cover {
    transform: scale(1.05);
}

.course-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.85));
}

.course-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%); /* Rich dark slate fallback */
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.course-badge.badge-general {
    background: linear-gradient(135deg, #4e3782 0%, #6b4fa0 100%);
    box-shadow: 0 4px 10px rgba(29, 78, 216, 0.3);
}

.course-badge.badge-picturebook {
    background: linear-gradient(135deg, #7e22ce 0%, #8a6fc0 100%);
    box-shadow: 0 4px 10px rgba(126, 34, 206, 0.3);
}

.course-badge.badge-advanced {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    box-shadow: 0 4px 10px rgba(15, 118, 110, 0.3);
}

/* 코스 카드 바디 */
.course-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.course-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a; /* Highly readable dark slate */
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.course-card:hover .course-info h3 {
    color: #6b4fa0; /* Vibrant professional blue on hover */
}

.course-info .desc {
    font-size: 0.9rem;
    color: #475569; /* Slate 600 for highly readable description */
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.course-meta span i {
    margin-right: 5px;
}

.course-meta .video-count {
    color: #ffffff; /* High contrast white text */
    font-weight: 700;
    background: #0284c7; /* Solid sky blue badge */
    border: 1px solid #0284c7;
    padding: 3px 10px;
    border-radius: 12px;
}

/* 비디오 목록 래퍼 */
.videos-list-wrapper {
    background: #ffffff; /* Solid white background for high contrast */
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 25px;
    margin-top: 30px;
    animation: fadeInUp 0.4s ease-out;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.videos-list-header {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.videos-list-header h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 5px;
}

.videos-list-header p {
    font-size: 0.9rem;
    color: #334155; /* High readability dark slate */
}

/* 비디오 목록 */
.videos-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 개별 비디오 로우 */
.video-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #f8fafc; /* Crisp light background */
    border: 1px solid #e2e8f0; /* Clear container borders */
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    gap: 15px;
}

.video-list-row:hover {
    background: #f1f5f9; /* Slightly darker slate on hover */
    border-color: #cbd5e1;
    transform: translateX(4px);
}

.video-row-main {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-grow: 1;
    min-width: 0;
}

.video-row-icon {
    width: 40px;
    height: 40px;
    background: #e0f2fe; /* Light blue accent background */
    color: #0284c7; /* Sky blue 700 for high readability */
    border: 1px solid #bae6fd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.video-list-row:hover .video-row-icon {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.3);
}

.video-row-badge {
    background: #faf5ff; /* Light purple */
    color: #6b21a8; /* Purple 700 for high contrast */
    border: 1px solid #e9d5ff; /* Purple 200 */
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.video-row-details {
    min-width: 0;
    flex-grow: 1;
}

.video-row-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-row-desc {
    font-size: 0.825rem;
    color: #475569; /* Readable slate 600 for subtext */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-row-play {
    background: #0284c7; /* Premium solid sky blue */
    color: #ffffff;
    border: 1px solid #0284c7;
    font-size: 0.8rem;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.video-list-row:hover .btn-row-play {
    background: #0369a1;
    border-color: #0369a1;
    color: #ffffff;
}

.btn-row-edit, .btn-row-delete, .btn-row-move {
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #475569;
    font-size: 0.8rem;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-row-edit:hover {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
    border-color: rgba(234, 179, 8, 0.3);
}

.btn-row-delete:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-row-move:hover {
    background: rgba(138, 111, 192, 0.15);
    color: #8a6fc0;
    border-color: rgba(138, 111, 192, 0.3);
}

/* 모바일 반응형 처리 */
@media (max-width: 768px) {
    .video-list-row {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
    }
    
    .video-row-main {
        align-items: flex-start;
    }
    
    .video-row-details {
        width: 100%;
    }
    
    .video-row-title, .video-row-desc {
        white-space: normal;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .video-row-title {
        -webkit-line-clamp: 2;
    }
    
    .video-row-desc {
        -webkit-line-clamp: 3;
    }
    
    .video-row-actions {
        margin-top: 10px;
        justify-content: flex-end;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding-top: 10px;
    }
}

/* ------------------------------------------------------------- */
/* Locked Resource Cards & Unlock Modal Styles */
/* ------------------------------------------------------------- */

/* 잠긴 자료 카드 스타일링 */
.card.locked-resource {
    border-color: rgba(245, 158, 11, 0.25);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.05);
    position: relative;
}

.card.locked-resource:hover {
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.18);
}

/* 프리미엄 잠금 뱃지 */
.premium-lock-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    right: auto;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.3);
}

/* 잠긴 자료용 프리미엄 글로우 버튼 */
.btn-lock {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
    transition: all 0.3s ease;
}

.btn-lock:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #ea580c 100%);
    box-shadow: 0 6px 16px rgba(217, 119, 6, 0.4);
    transform: translateY(-2px);
}

/* 잠금 해제 에러 메시지 스타일 */
#unlock-error-msg {
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* 카드 순서 조정(이동) 버튼 스타일 */
.btn-move-card {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(62, 154, 116, 0.4);
    background: rgba(62, 154, 116, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
    color: white;
}

.btn-move-card:hover {
    background: #3e9a74;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(62, 154, 116, 0.5);
}

/* ------------------------------------------------------------- */
/* Reactions & Comments Custom Styles */
/* ------------------------------------------------------------- */

.reactions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-main);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
    user-select: none;
}

.reaction-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.reaction-btn:active {
    transform: translateY(0) scale(0.95);
}

.reaction-btn .emoji {
    font-size: 1rem;
}

.reaction-btn .count {
    font-weight: 600;
    color: var(--text-muted);
}

.reaction-btn.user-reacted {
    background: rgba(107, 79, 160, 0.1);
    border-color: rgba(107, 79, 160, 0.35);
    box-shadow: 0 0 10px rgba(107, 79, 160, 0.15);
}

.reaction-btn.user-reacted .count {
    color: var(--primary);
}

/* Row Summary Badges */
.assign-row-reactions-summary {
    display: flex;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    align-items: center;
    margin-left: 10px;
    flex-wrap: wrap;
}

.summary-emoji-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 3px 8px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

/* Comments Section */
.comments-section {
    grid-column: 1 / -1;
    margin-top: 25px;
    border-top: 1px solid var(--border-color);
    padding-top: 25px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.comment-item {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 18px;
    position: relative;
    transition: var(--transition-smooth);
}

.comment-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.comment-author {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent-green);
}

.comment-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.comment-text {
    font-size: 0.92rem;
    color: var(--text-main);
    line-height: 1.5;
    white-space: pre-wrap;
}

.btn-comment-delete {
    position: absolute;
    top: 14px;
    right: 18px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
    padding: 4px;
}

.btn-comment-delete:hover {
    color: var(--accent-red);
    transform: scale(1.1);
}

/* Comment Form Layout */
.comment-form {
    display: grid;
    grid-template-columns: 180px 1fr auto;
    gap: 12px;
    align-items: start;
}

.comment-input-author,
.comment-input-text {
    width: 100%;
    padding: 12px 16px;
    background: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px !important;
    color: var(--text-main) !important;
    font-family: inherit !important;
    font-size: 0.9rem !important;
    transition: var(--transition-smooth) !important;
}

.comment-input-author::placeholder,
.comment-input-text::placeholder {
    color: rgba(15, 23, 42, 0.35) !important;
}

.comment-input-author:focus,
.comment-input-text:focus {
    outline: none !important;
    border-color: var(--accent-green) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 0 10px rgba(62, 154, 116, 0.15) !important;
}

.comment-input-text {
    resize: vertical;
    min-height: 44px;
    line-height: 1.4;
}

.btn-comment-submit {
    background: linear-gradient(135deg, #3e9a74 0%, #2f7d5c 100%);
    color: white;
    border: none;
    border-radius: 10px;
    height: 44px;
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(62, 154, 116, 0.2);
}

.btn-comment-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(62, 154, 116, 0.35);
}

.btn-comment-submit:active {
    transform: translateY(0);
}

/* Assignment Course Switcher Tabs Styling */
.assign-course-tabs-wrapper {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.assign-course-tabs {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.assign-course-tabs .course-tab {
    transition: var(--transition-smooth);
}
.assign-course-tabs .course-tab:not(.active) {
    background: transparent !important;
    color: var(--text-muted) !important;
}
.assign-course-tabs .course-tab:not(.active):hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-main) !important;
}

.assign-course-tabs .course-tab.tab-pb.active { background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%) !important; color: white !important; }
.assign-course-tabs .course-tab.tab-adv.active { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important; color: white !important; }
.assign-course-tabs .course-tab.tab-webtoon.active { background: linear-gradient(135deg, #8a6fc0 0%, #5b4290 100%) !important; color: white !important; }
.assign-course-tabs .course-tab.tab-assistant.active { background: linear-gradient(135deg, #3e9a74 0%, #047857 100%) !important; color: white !important; }


@media (max-width: 600px) {
    .comment-form {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .btn-comment-submit {
        width: 100%;
        height: 40px;
    }
    
    /* 챌린지 인증방 타이틀 폰트 크기 및 줄바꿈 대응 */
    .section-header-row h2 {
        font-size: 1.35rem !important;
        word-break: keep-all;
        word-wrap: break-word;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .section-header-row p {
        font-size: 0.8rem !important;
        max-width: 100%;
        word-break: keep-all;
    }

    .section-header-row {
        flex-direction: column;
        align-items: stretch !important;
        gap: 10px;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }

    .section-header-row .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
        font-size: 0.85rem !important;
        padding: 10px 16px !important;
    }

    /* 유료 전환 배너 패딩 및 자식 요소 최소 폭 수정 */
    .premium-promo-banner {
        padding: 15px !important;
        flex-direction: column;
        align-items: stretch !important;
        gap: 15px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .premium-promo-banner > div {
        min-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    .premium-promo-banner h3 {
        font-size: 1.05rem !important;
    }

    .premium-promo-banner p {
        font-size: 0.78rem !important;
    }

    .premium-promo-banner button {
        width: 100%;
        padding: 10px 16px !important;
        font-size: 0.85rem !important;
        justify-content: center;
        box-sizing: border-box;
    }

    /* 드래그 도우미 배지 텍스트 간소화 (글자 크기 축소) */
    .scroll-helper-badge {
        font-size: 0.68rem !important;
        padding: 2px 6px !important;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 과제방 코스 탭 반응형 최적화 */
    .assign-course-tabs-wrapper {
        padding: 0 !important;
        box-sizing: border-box;
    }
    
    .assign-course-tabs {
        border-radius: 10px !important;
        padding: 3px !important;
    }
    
    .assign-course-tabs .course-tab {
        padding: 8px 6px !important;
        font-size: 0.8rem !important;
        border-radius: 6px !important;
    }
}

/* ==========================================================================
   Payment System & Master Class Premium Styles
   ========================================================================== */

/* Payment Method Selection Card Style */
.payment-method-selector {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.pay-method-label {
    flex: 1;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border-radius: 8px;
    padding: 12px 10px !important;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary) !important;
    transition: all 0.2s ease-in-out;
}

.pay-method-label:hover {
    border-color: rgba(107, 79, 160, 0.5) !important;
    background: rgba(107, 79, 160, 0.05) !important;
    color: white !important;
}

.pay-method-label.active {
    border: 2px solid #6b4fa0 !important;
    background: rgba(107, 79, 160, 0.15) !important;
    color: white !important;
    box-shadow: 0 0 12px rgba(107, 79, 160, 0.2);
}

/* Premium Promo Banner styling in Assignments Board */
.premium-promo-banner {
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(30, 27, 75, 0.4);
    animation: pulseBorder 3s infinite alternate;
}

@keyframes pulseBorder {
    0% {
        border-color: rgba(107, 79, 160, 0.3);
    }
    100% {
        border-color: rgba(138, 111, 192, 0.7);
        box-shadow: 0 10px 30px rgba(107, 79, 160, 0.2);
    }
}

/* Admin tab UI */
.admin-tab {
    transition: all 0.2s ease-in-out;
}

.admin-tab:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: white !important;
}

.admin-tab.active {
    background: var(--accent-purple-gradient) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(138, 111, 192, 0.3);
}

/* Premium lock badge override */
.premium-lock-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.3);
    z-index: 2;
}

/* Hide checkboxes inside pay selector */
.pay-method-label input[type="radio"] {
    display: none;
}

/* Social Login Buttons */
.btn-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-social:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.btn-social:active {
    transform: translateY(0);
}

.btn-google {
    background: #ffffff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
}

.btn-google:hover {
    background: #f9fafb;
}

.btn-kakao {
    background: #FEE500;
    color: #191919;
}

.btn-kakao:hover {
    background: #fada0a;
}

/* Divider for modals */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 18px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-divider:not(:empty)::before {
    margin-right: .75em;
}

.auth-divider:not(:empty)::after {
    margin-left: .75em;
}

/* Mock Social Login Modal specific */
.mock-modal-desc {
    background: rgba(107, 79, 160, 0.08);
    border: 1px solid rgba(107, 79, 160, 0.2);
    color: #93c5fd;
}

/* Resources List (Table of Contents) Style */
.resources-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.resource-item {
    display: flex;
    align-items: center;
    background: var(--card-bg, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 12px;
    padding: 16px 24px;
    transition: all 0.2s ease-in-out;
    position: relative;
}

.resource-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.resource-item.locked-resource {
    border-left: 4px solid #f59e0b;
}

.resource-item-icon {
    font-size: 1.5rem;
    color: #8a6fc0;
    background: rgba(138, 111, 192, 0.1);
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 18px;
    flex-shrink: 0;
}

.resource-item.locked-resource .resource-item-icon {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.resource-item-content {
    flex-grow: 1;
    min-width: 0;
    margin-right: 20px;
}

.resource-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-color, #f8fafc);
}

.resource-item-desc {
    font-size: 0.9rem;
    color: var(--text-muted, #94a3b8);
    line-height: 1.4;
    white-space: pre-line;
}

.resource-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-right: 20px;
}

.resource-item-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.resource-item-badge.badge-premium {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.resource-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Admin controls panel */
.resource-item-admin {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 15px;
}

.resource-item-admin .btn-move-item,
.resource-item-admin .btn-edit-item,
.resource-item-admin .btn-delete-item {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.9rem;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.resource-item-admin .btn-move-item:hover,
.resource-item-admin .btn-edit-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.resource-item-admin .btn-delete-item:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

@media (max-width: 768px) {
    .resource-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }
    
    .resource-item-icon {
        margin-bottom: 12px;
    }
    
    .resource-item-content {
        margin-right: 0;
        margin-bottom: 12px;
    }
    
    .resource-item-meta {
        margin-bottom: 12px;
        margin-right: 0;
    }
    
    .resource-item-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .resource-item-admin {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding-top: 8px;
    }
}

/* Resource Card Grid View styles */
.resource-card {
    padding: 20px !important;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 380px;
    justify-content: flex-start;
}

.resource-card .resource-card-cover {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.resource-card .resource-card-cover.default-cover {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.resource-card:hover .resource-card-cover {
    transform: scale(1.02);
}

.resource-badge-premium {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    background: rgba(245, 158, 11, 0.95);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 4px;
}

.resource-card.locked-resource {
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.resource-card.locked-resource:hover {
    border-color: rgba(245, 158, 11, 0.8);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.15);
}

/* Card Move Order Admin buttons */
.btn-move-card {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
    color: white;
    background: rgba(138, 111, 192, 0.9);
    border: 1px solid rgba(138, 111, 192, 0.4);
}

.btn-move-card:hover {
    background: #8a6fc0;
    transform: scale(1.1);
}

/* ========================================
   결제 모달 코스 선택 카드
   ======================================== */
.course-card-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.course-sel-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    user-select: none;
}

.course-sel-card:hover {
    border-color: rgba(138, 111, 192, 0.4);
    background: rgba(138, 111, 192, 0.06);
    transform: translateX(2px);
}

.course-sel-card.selected {
    border-color: #8a6fc0;
    background: rgba(138, 111, 192, 0.12);
    box-shadow: 0 0 0 1px rgba(138, 111, 192, 0.3);
}

.course-sel-card.selected::before {
    content: '✓';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #8a6fc0;
    font-size: 1rem;
    font-weight: 900;
}

.course-sel-emoji {
    font-size: 1.6rem;
    flex-shrink: 0;
    line-height: 1;
}

.course-sel-info {
    flex: 1;
    min-width: 0;
}

.course-sel-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.course-sel-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.course-sel-price {
    flex-shrink: 0;
    text-align: right;
}

.course-sel-amount {
    font-size: 1.05rem;
    font-weight: 800;
    color: #8a6fc0;
    white-space: nowrap;
}

/* ========================================
   Resource Table (컴팩트 테이블형 자료게시판)
   ======================================== */
.resource-table-wrap {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 실제 렌더링되는 <table> 구조 (renderResources()에서 생성) */
.resource-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.resource-table thead {
    background: rgba(255, 255, 255, 0.04);
}

.rt-th {
    padding: 12px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.rt-th-no { width: 44px; text-align: center; }
.rt-th-badge { width: 110px; text-align: center; }
.rt-th-admin { width: 150px; text-align: center; }
.rt-th-action { width: 140px; text-align: center; }

.rt-td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.resource-tr {
    background: transparent;
    transition: background 0.15s ease;
}

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

.resource-tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.resource-tr.is-locked {
    box-shadow: inset 3px 0 0 rgba(245, 158, 11, 0.5);
}

.resource-tr.is-locked:hover {
    background: rgba(245, 158, 11, 0.06);
}

.rt-td-no {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.rt-td-badge,
.rt-td-admin,
.rt-td-action {
    text-align: center;
}

.rt-col {
    padding: 10px 10px;
    display: flex;
    align-items: center;
}

.rt-col-no {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    justify-content: center;
}

.rt-col-title {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    overflow: hidden;
}

.rt-title-text {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.rt-desc-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.3;
}

.rt-col-badge {
    justify-content: center;
}

.rt-col-action {
    justify-content: flex-end;
    padding-right: 14px;
}

.rt-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.rt-badge-premium {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.rt-badge-free {
    background: rgba(62, 154, 116, 0.12);
    color: #34d399;
    border: 1px solid rgba(62, 154, 116, 0.25);
}

.rt-btn {
    font-size: 0.88rem;
    padding: 9px 18px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    cursor: pointer;
    font-weight: 700;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    min-width: 100px;
    justify-content: center;
}

.rt-btn-download {
    background: var(--accent-emerald-gradient);
    color: white;
    box-shadow: 0 2px 8px rgba(62, 154, 116, 0.35);
}

.rt-btn-download:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(62, 154, 116, 0.5);
}

.rt-btn-lock {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

.rt-btn-lock:hover {
    background: rgba(245, 158, 11, 0.25);
}

.rt-btn-admin-dl {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    color: white;
}

.rt-btn-disabled {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    cursor: not-allowed;
}

.rt-icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.78rem;
    width: 26px;
    height: 26px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.rt-icon-btn:hover { color: white; background: rgba(255, 255, 255, 0.1); }
.rt-icon-edit:hover { color: #9b85c9; background: rgba(96, 165, 250, 0.1); }
.rt-icon-delete:hover { color: #f87171; background: rgba(239, 68, 68, 0.1); }

@media (max-width: 600px) {
    .resource-table-header,
    .resource-table-row {
        grid-template-columns: 36px 1fr 76px 90px;
    }
    .rt-col { padding: 8px 6px; }
    .rt-th, .rt-td { padding: 8px 6px; }
    .rt-th-badge, .rt-th-admin { width: auto; }
    .rt-btn { font-size: 0.75rem; padding: 6px 10px; min-width: 76px; }
    .rt-title-text { font-size: 0.85rem; }
    .rt-desc-text { display: none; }
}

/* ==========================================================================
   Admin Review Collection Board & Responsive Adjustments
   ========================================================================== */
.admin-review-card:hover {
    transform: translateY(-2px);
    border-color: rgba(138, 111, 192, 0.4) !important;
    box-shadow: 0 8px 25px rgba(138, 111, 192, 0.15) !important;
}

@media (max-width: 768px) {
    #admin-reviews-grid {
        grid-template-columns: 1fr !important;
    }

    #review-all-filter-bar {
        flex-direction: column !alignment;
        align-items: stretch !important;
    }

    #review-all-filter-bar > div {
        width: 100% !important;
    }

    #btn-copy-all-reviews,
    #btn-export-reviews-csv {
        flex: 1;
        justify-content: center;
    }
}


/* Multi-image Gallery styling for assignments (PC & Mobile compatible) */

.assign-images-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    width: 100%;
}

.assign-images-gallery .assign-preview-image {
    max-height: 150px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.assign-images-gallery .assign-preview-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile responsive adjustments */
@media (max-width: 576px) {
    .assign-images-gallery {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .assign-images-gallery .assign-preview-image {
        max-height: 100px;
        width: 100%;
        height: 100px;
        object-fit: cover;
    }
}

/* ------------------------------------------------------------- */
/* Padlet Board View Styles (Sand & Light Pastel Theme) */
/* ------------------------------------------------------------- */
.padlet-board-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 5px 25px 5px;
    scroll-behavior: smooth;
    min-height: 520px;
    width: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(107, 79, 160, 0.3) rgba(241, 245, 249, 0.5);
}

.padlet-board-container::-webkit-scrollbar {
    height: 9px;
}

.padlet-board-container::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #c084fc 0%, #f472b6 100%);
    border-radius: 6px;
}

.padlet-column {
    flex: 0 0 315px;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    max-height: 720px;
    height: auto;
    box-shadow: 0 10px 25px rgba(148, 163, 184, 0.18), 0 2px 6px rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(12px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.padlet-column::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8a6fc0 0%, #f43f5e 50%, #6b4fa0 100%);
}

.padlet-column:hover {
    box-shadow: 0 14px 30px rgba(148, 163, 184, 0.28);
}

.padlet-column-header {
    padding: 16px 18px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
}

.padlet-column-title {
    font-size: 1.02rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.2px;
}

.padlet-column-count {
    font-size: 0.78rem;
    font-weight: 800;
    color: white;
    background: linear-gradient(135deg, #5b4290 0%, #8a6fc0 100%);
    padding: 3px 10px;
    border-radius: 12px;
    box-shadow: 0 3px 8px rgba(124, 58, 237, 0.3);
    letter-spacing: 0.5px;
}

.padlet-card-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 100px;
    max-height: 560px;
    background: #f8fafc;
    scrollbar-width: thin;
    scrollbar-color: rgba(203, 213, 225, 0.6) transparent;
}

.padlet-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(148, 163, 184, 0.1);
    position: relative;
}

.padlet-card:hover {
    transform: translateY(-4px);
    background: #ffffff;
    border-color: #8a6fc0;
    box-shadow: 0 12px 28px rgba(138, 111, 192, 0.2);
}

.padlet-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.padlet-card-author {
    font-weight: 800;
    font-size: 0.88rem;
    color: #4e3782;
    display: flex;
    align-items: center;
    gap: 6px;
}

.padlet-card-date {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 6px;
}

.padlet-card-body {
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.5;
    word-break: break-word;
    font-weight: 600;
}

.padlet-card-attachment {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    max-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}

.padlet-card-attachment img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.padlet-card:hover .padlet-card-attachment img {
    transform: scale(1.05);
}

.padlet-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
    font-size: 0.78rem;
}

.padlet-card-reactions {
    display: flex;
    gap: 8px;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 3px 9px;
    border-radius: 8px;
    font-weight: 600;
}

.padlet-card-comments-count {
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 3px 9px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.padlet-add-btn {
    width: 100%;
    padding: 12px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.padlet-add-btn:hover {
    background: linear-gradient(135deg, #6b4fa0 0%, #5b4290 100%);
    border-style: solid;
    border-color: transparent;
    color: white;
    box-shadow: 0 6px 18px rgba(107, 79, 160, 0.35);
    transform: translateY(-2px);
}

/* View switcher button active state */
.view-toggle-btn.active {
    background: linear-gradient(135deg, #6b4fa0 0%, #4e3782 100%) !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(107, 79, 160, 0.2);
}

.view-toggle-btn {
    transition: all 0.2s ease;
}

/* ------------------------------------------------------------- */
/* Floating Support Chat Widget Styles */
/* ------------------------------------------------------------- */
#floating-chat-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
    font-family: 'Noto Sans KR', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

/* 카카오톡 1:1 실시간 상담 바로가기 플로팅 버튼 */
#btn-kakao-float-direct {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #FEE500;
    color: #381E1F;
    font-size: 1.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(254, 229, 0, 0.45);
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

#btn-kakao-float-direct:hover {
    transform: scale(1.1) rotate(-6deg);
    background: #fada0a;
    box-shadow: 0 10px 30px rgba(254, 229, 0, 0.6);
}

.kakao-float-tooltip {
    position: absolute;
    right: 70px;
    background: #381E1F;
    color: #FEE500;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#btn-kakao-float-direct:hover .kakao-float-tooltip {
    opacity: 1;
    transform: translateX(-5px);
}

#btn-chat-trigger {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6b4fa0 0%, #4e3782 100%);
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(109, 40, 217, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#btn-chat-trigger:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 30px rgba(109, 40, 217, 0.5);
}

#btn-chat-trigger .chat-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0f0a1c;
}

.glassmorphism-chat {
    background: rgba(15, 10, 28, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

#chat-widget-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    height: 480px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

#chat-widget-panel.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.chat-header {
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(107, 79, 160, 0.15);
    color: #c084fc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.8rem;
    line-height: 1.4;
    word-break: break-all;
}

.chat-msg.system {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-msg.user {
    background: linear-gradient(135deg, #6b4fa0 0%, #4e3782 100%);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 10px rgba(107, 79, 160, 0.15);
}

.chat-msg.admin {
    background: rgba(255,255,255,0.08);
    color: white;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border-left: 3px solid #3e9a74;
}

.chat-msg-time {
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
    text-align: right;
}

.chat-footer {
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Direct Contact Banners inside Chat (Kakao & Email) */
.chat-direct-banners {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.btn-kakao-direct {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #FEE500;
    color: #191919;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(254, 229, 0, 0.2);
}

.btn-kakao-direct:hover {
    background: #fada0a;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(254, 229, 0, 0.3);
    color: #000;
}

.btn-kakao-direct i.fa-comment {
    font-size: 1.05rem;
    color: #381E1F;
}

.btn-email-direct {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-email-direct:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    transform: translateY(-1px);
}

.btn-email-direct i.fa-envelope {
    font-size: 1rem;
    color: #ef4444;
}

/* PWA Smart Install Banner */
.pwa-install-banner {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 520px;
    background: rgba(15, 12, 28, 0.95);
    border: 1px solid rgba(107, 79, 160, 0.35);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 14px 18px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(107, 79, 160, 0.2);
    z-index: 10001;
    animation: pwaSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pwaSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 25px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pwa-banner-icon img {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    display: block;
}

.pwa-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pwa-banner-text strong {
    font-size: 0.95rem;
    color: #ffffff;
    font-weight: 700;
}

.pwa-banner-text span {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

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

.btn-pwa-action-install {
    background: linear-gradient(135deg, #6b4fa0 0%, #4e3782 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(107, 79, 160, 0.3);
}

.btn-pwa-action-install:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(107, 79, 160, 0.45);
}

.btn-pwa-action-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: color 0.2s;
}

.btn-pwa-action-close:hover {
    color: #ffffff;
}

/* Support for responsive chat widget */
@media (max-width: 480px) {
    #chat-widget-panel {
        position: fixed;
        bottom: 0;
        right: 0;
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        bottom: 0;
    }

    .pwa-install-banner {
        width: 94%;
        bottom: 15px;
        padding: 12px 14px;
    }

    .pwa-banner-text span {
        display: none;
    }
}

/* ------------------------------------------------------------- */
/* Course Board Unified Styling (과정별 전용 통합 게시판) */
/* ------------------------------------------------------------- */
.course-hero-banner {
    padding: 35px 30px;
    border-radius: 20px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.course-hero-banner.theme-picturebook {
    background: linear-gradient(135deg, #3b0764 0%, #6b21a8 40%, #be185d 100%);
}

.course-hero-banner.theme-advanced {
    background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 50%, #4e3782 100%);
}

.course-hero-banner.theme-webtoon {
    background: linear-gradient(135deg, #2e1065 0%, #581c87 50%, #047857 100%);
}

.course-dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .course-dash-grid {
        grid-template-columns: 1fr;
    }
}

.dash-mini-video-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dash-mini-video-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(107, 79, 160, 0.3);
    transform: translateX(4px);
}

.dash-assignments-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.dash-mini-assign-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.dash-mini-assign-card:hover {
    transform: translateY(-4px);
    border-color: rgba(244, 63, 94, 0.4);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.dash-mini-assign-thumb {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: #0f172a;
}

/* ============================================================= */
/* HUB: 문석영 작가의 책                                           */
/* ============================================================= */

.books-section {
    margin-top: 34px;
}

.books-lead {
    margin-top: 4px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.books-admin-note {
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    padding: 10px 14px;
    border: 1px dashed rgba(180, 83, 9, 0.4);
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.07);
    color: #92400e;
    font-size: 0.85rem;
}

.books-admin-note:empty {
    display: none !important;
}

.books-seed-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 7px;
    background: #b45309;
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
}

.books-shelf {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
}

.book-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.book-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-premium);
}

.book-cover {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 5;
    padding: 22px 26px;
    background: linear-gradient(160deg, #fdf6ec 0%, #f3ede4 100%);
    overflow: hidden;
}

.book-cover img {
    position: relative;
    z-index: 1;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 3px 6px 6px 3px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.22), 0 2px 5px rgba(15, 23, 42, 0.12);
    transition: transform 0.25s ease;
}

.book-card:hover .book-cover img {
    transform: translateY(-4px) rotate(-1deg);
}

/* 표지가 없거나 불러오지 못하면 제목을 넣은 책 모양으로 대신한다 */
.book-cover-fallback {
    display: none;
}

.book-cover-empty .book-cover-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 70%;
    height: 100%;
    padding: 16px;
    border-radius: 3px 6px 6px 3px;
    background: linear-gradient(160deg, #b45309, #78350f);
    color: #fff7ed;
    text-align: center;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.22);
}

.book-cover-fallback i {
    font-size: 1.6rem;
    opacity: 0.8;
}

.book-cover-fallback b {
    font-size: 0.95rem;
    line-height: 1.4;
    word-break: keep-all;
}

.book-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
    padding: 14px 16px 16px;
}

.book-formats {
    display: flex;
    gap: 5px;
}

.book-format {
    font-size: 0.7rem;
    font-weight: 700;
    color: #b45309;
    background: rgba(245, 158, 11, 0.13);
    padding: 2px 8px;
    border-radius: 5px;
}

.book-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.35;
    word-break: keep-all;
}

.book-subtitle {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    line-height: 1.4;
    word-break: keep-all;
}

.book-byline {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.book-desc {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-buys {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
    padding-top: 10px;
}

.book-buy-row {
    padding: 9px 10px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #fcfaf7;
}

.book-buy-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
    font-size: 0.8rem;
    font-weight: 700;
}

.book-buy-format {
    color: var(--text-main);
}

.book-buy-price {
    color: #b45309;
}

.book-buy-stores {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.book-buy {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: #fff;
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.book-buy:hover {
    border-color: #b45309;
    color: #b45309;
    background: #fffbf5;
}

.book-buy i {
    font-size: 0.65rem;
    color: #94a3b8;
}

.book-admin {
    gap: 4px;
    justify-content: flex-end;
    padding-top: 6px;
}

@media (max-width: 768px) {
    .books-shelf {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .book-cover {
        padding: 14px 16px;
    }
    .book-body {
        padding: 12px;
    }
    .book-desc {
        display: none;
    }
    .book-buy-row {
        padding: 8px;
    }
    .book-buy {
        padding: 5px 8px;
        font-size: 0.76rem;
    }
}

/* ============================================================= */
/* HUB: 통합 작업물 갤러리                                         */
/* ============================================================= */

.works-section {
    margin-top: 34px;
}

.works-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.works-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 9px;
}

.works-header h3 i {
    color: var(--primary);
}

.works-count-badge {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(107, 79, 160, 0.1);
    border-radius: 999px;
    padding: 2px 10px;
}

/* 숫자가 채워지기 전(정적 HTML)에는 빈 알약을 보이지 않는다 */
.works-count-badge:empty {
    display: none;
}

.works-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.work-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.work-search-wrap i {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    font-size: 0.85rem;
    pointer-events: none;
}

.work-search-wrap input {
    padding: 9px 14px 9px 34px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-main);
    width: 230px;
    max-width: 100%;
    transition: var(--transition-smooth);
}

.work-search-wrap input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(107, 79, 160, 0.12);
}

.work-add-btn {
    padding: 9px 15px;
    border: none;
    border-radius: 8px;
    background: var(--accent-purple-gradient);
    color: #fff;
    font-weight: 700;
    font-size: 0.87rem;
    cursor: pointer;
    white-space: nowrap;
}

/* 카테고리 칩 바 */
.work-chip-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.work-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #fff;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.work-chip:hover {
    border-color: var(--border-hover);
    color: var(--text-main);
    transform: translateY(-1px);
}

.work-chip.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px rgba(107, 79, 160, 0.25);
}

.work-chip-count {
    font-size: 0.75rem;
    font-weight: 700;
    opacity: 0.7;
}

/* 타입 칩 바 */
.work-kind-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.work-kind-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.work-kind-chip:hover {
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-main);
}

.work-kind-chip.active {
    background: var(--chip-color, var(--primary));
    color: #fff;
}

.work-kind-chip.active .work-chip-count {
    opacity: 0.85;
}

/* 카드 그리드 */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 18px;
}

.work-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.work-card:hover,
.work-card:focus-visible {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-premium);
    outline: none;
}

.work-card.is-featured {
    border-color: rgba(138, 111, 192, 0.35);
}

.work-thumb {
    height: 128px;
    background: #f1f5f9;
    overflow: hidden;
}

.work-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.work-thumb-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--kind-color, #6b4fa0) 14%, #ffffff),
            color-mix(in srgb, var(--kind-color, #6b4fa0) 4%, #ffffff));
}

.work-thumb-icon i {
    font-size: 2.2rem;
    color: var(--kind-color, #6b4fa0);
    opacity: 0.85;
}

.work-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px 16px 16px;
    gap: 8px;
}

.work-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.work-kind {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--kind-color, #6b4fa0);
    background: color-mix(in srgb, var(--kind-color, #6b4fa0) 12%, #ffffff);
    padding: 3px 9px;
    border-radius: 6px;
}

.work-cat {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(15, 23, 42, 0.05);
    padding: 3px 9px;
    border-radius: 6px;
}

.work-lock {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #b45309;
    background: rgba(245, 158, 11, 0.13);
    padding: 3px 8px;
    border-radius: 6px;
}

.work-lock-private {
    color: #be123c;
    background: rgba(244, 63, 94, 0.12);
}

.work-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
}

.work-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.work-foot {
    margin-top: auto;
    padding-top: 10px;
}

.work-go {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
}

.work-card:hover .work-go i {
    transform: translateX(3px);
}

.work-go i {
    transition: transform 0.2s ease;
}

@media (max-width: 768px) {
    .works-header {
        align-items: flex-start;
    }
    .works-tools {
        width: 100%;
    }
    .work-search-wrap {
        flex: 1;
    }
    .work-search-wrap input {
        width: 100%;
    }
    .works-grid {
        grid-template-columns: 1fr;
    }
}

.work-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.work-admin {
    display: inline-flex;
    gap: 4px;
}

.work-icon-btn {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    color: var(--text-muted);
    font-size: 0.72rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.work-icon-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.work-icon-del:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

/* ============================================================= */
/* HUB: 기록(블로그) & 갤러리(보드)                                */
/* ============================================================= */

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.post-row:hover,
.post-row:focus-visible {
    border-color: var(--border-hover);
    transform: translateX(3px);
    box-shadow: var(--shadow-premium);
    outline: none;
}

.post-row-main {
    flex: 1;
    min-width: 0;
}

.post-row-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
}

.post-date {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.post-article .post-date {
    margin-left: 6px;
}

.post-row h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.post-row p {
    font-size: 0.88rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-row-go {
    color: var(--primary);
    flex-shrink: 0;
}

/* 글 상세 */
.post-detail {
    max-width: 780px;
    margin: 0 auto;
}

.post-back {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
}

.post-back:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.post-article {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 32px;
}

.post-article > h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 10px 0 12px;
    line-height: 1.35;
}

.post-lead {
    font-size: 1rem;
    color: var(--text-muted);
    padding-bottom: 18px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--border-color);
}

.post-body {
    color: var(--text-main);
    line-height: 1.85;
    font-size: 0.97rem;
    word-break: break-word;
}

.post-body h2 { font-size: 1.3rem; font-weight: 700; margin: 30px 0 12px; }
.post-body h3 { font-size: 1.12rem; font-weight: 700; margin: 26px 0 10px; }
.post-body h4 { font-size: 1rem; font-weight: 700; margin: 22px 0 8px; }
.post-body p { margin-bottom: 16px; }
.post-body ul { margin: 0 0 16px 22px; }
.post-body li { margin-bottom: 6px; }
.post-body a { color: var(--primary); text-decoration: underline; }
.post-body img { max-width: 100%; border-radius: 10px; margin: 14px 0; display: block; }

.post-body blockquote {
    border-left: 3px solid var(--primary);
    padding: 4px 0 4px 16px;
    margin: 0 0 16px;
    color: var(--text-muted);
}

.post-body code {
    background: rgba(15, 23, 42, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.post-code {
    background: #0f172a;
    color: #e2e8f0;
    padding: 16px 18px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 16px;
}

.post-code code {
    background: none;
    padding: 0;
    color: inherit;
}

/* 갤러리 보드 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}

.gallery-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.gallery-item:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-premium);
}

.gallery-item img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

.gallery-noimg {
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 2rem;
}

.gallery-item figcaption {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.gallery-item figcaption strong {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
}

@media (max-width: 768px) {
    .post-article { padding: 22px 18px; }
    .post-article > h2 { font-size: 1.32rem; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ============================================================= */
/* 과정 전용방 (평택 동화책 자격증반) — course-room-ui.js          */
/* ============================================================= */

.course-hero-banner.theme-pt {
    background: linear-gradient(135deg, #3b2a63 0%, #6b4fa0 60%, #8a6fc0 100%);
}

/* 과정 게시판 카드 안 제목이 흰 글씨로 박혀 있어 밝은 테마에서 안 보이던 문제 */
#course-board-view .dash-card .card-header-row h3,
#course-board-view .video-row-card h4,
#course-board-view .dash-mini-assign-card h5,
#course-board-view .dash-mini-video-item > div > div:first-child {
    color: var(--text-main) !important;
}

/* 탭이 7개까지 늘어나므로 휴대폰에서는 옆으로 밀어서 본다 */
#course-board-subnav > div {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
#course-board-subnav > div::-webkit-scrollbar { display: none; }
#course-board-subnav .c-subtab-btn {
    flex: 1 0 auto !important;
    white-space: nowrap;
}

.room-hero-btn { padding: 10px 20px; font-weight: 700; font-size: 0.95rem; }
.room-hero-ghost {
    background: rgba(255, 255, 255, 0.16) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
}

.room-muted { color: #64748b; font-size: 0.88rem; }
.room-small { font-size: 0.78rem; }
.room-pad { padding: 24px 4px; }
.room-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-weight: 600;
}

.room-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: var(--shadow-premium);
}
.room-card h4 { font-size: 1.02rem; font-weight: 700; color: var(--text-main); margin: 0; }
.room-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.room-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.room-empty {
    text-align: center;
    padding: 40px 16px;
    color: #64748b;
    border: 1px dashed var(--border-color);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.6);
}
.room-empty i { font-size: 1.8rem; margin-bottom: 8px; color: #94a3b8; }

.room-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    background: #e2e8f0;
    color: #334155;
}
.room-pill-ok { background: #eee8f7; color: #4e3782; }
.room-pill-notice { background: #fef3c7; color: #92400e; }

.room-link-btn {
    background: none;
    border: none;
    padding: 2px 4px;
    color: #4e3782;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
}
.room-danger { color: #dc2626 !important; }

/* 입장 화면 */
.room-gate { margin: 25px 0; }
.room-gate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}
.room-gate-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 22px;
    box-shadow: var(--shadow-premium);
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}
.room-gate-card h3 { font-size: 1.12rem; font-weight: 800; color: var(--text-main); margin: 0; }
.room-gate-pending { border-color: rgba(245, 158, 11, 0.45); background: #fffbeb; }
.room-step-badge {
    font-size: 0.75rem;
    font-weight: 800;
    color: #4e3782;
    background: #eee8f7;
    padding: 3px 10px;
    border-radius: 999px;
}
.room-badge-wait { color: #92400e; background: #fde68a; }
.room-gate-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.room-code-row { display: flex; gap: 8px; width: 100%; align-items: center; flex-wrap: wrap; }
.room-code-row input[type="text"] {
    flex: 1;
    min-width: 140px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    background: #fff;
    color: var(--text-main);
}
.room-install-tip {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f7f4fb;
    border: 1px solid #d9cfee;
    color: #2e2445;
}
.room-install-tip > i { font-size: 1.5rem; }
.room-install-tip div { flex: 1; display: flex; flex-direction: column; font-size: 0.88rem; }

/* 한눈에 보기 상단 띠 */
.room-today {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.room-today-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f7f4fb;
    border: 1px solid #d9cfee;
    color: #2e2445;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.92rem;
}
.room-today-item > div { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-clickable { cursor: pointer; }

/* 공지·자료 */
.room-form summary { cursor: pointer; font-weight: 700; color: #4e3782; }
.room-form-grid { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.room-form-grid input[type="text"],
.room-form-grid input[type="url"],
.room-form-grid select,
.room-form-grid textarea,
.room-ask textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
    color: var(--text-main);
}
.room-file-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px dashed #b9a8dc;
    border-radius: 10px;
    cursor: pointer;
    color: #4e3782;
    font-weight: 600;
    font-size: 0.9rem;
    flex-wrap: wrap;
}
.room-file-label input { max-width: 100%; }
.room-file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.room-file-list:empty { display: none; }
.room-file-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #f6f2fc;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #4e3782;
}
.room-file-list li span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.room-check { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; font-weight: 600; cursor: pointer; }

.room-post { display: flex; gap: 14px; align-items: flex-start; }
.room-post-notice { border-left: 4px solid #f59e0b; }
.room-post-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eee8f7;
    color: #4e3782;
    font-size: 1.1rem;
}
.room-post-notice .room-post-icon { background: #fef3c7; color: #b45309; }
.room-post-main { flex: 1; min-width: 0; }
.room-post-main h4 { margin: 4px 0; }
.room-post-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.85rem; }
.room-post-body { white-space: pre-line; word-break: break-word; color: #334155; font-size: 0.93rem; margin: 6px 0; }
.room-post-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.room-post-actions .btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 메모장 (패들렛식 붙임 메모) */
.room-memo-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.room-memo-form input[type="text"],
.room-memo-form textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
    color: var(--text-main);
    resize: vertical;
}
.room-memo-form .room-ask-row { margin-top: 0; }
.room-memo-group { margin-bottom: 22px; }
.room-memo-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 10px;
}
.room-memo-heading i { color: var(--primary); }
/* 카드 높이가 제각각이어도 빈틈 없이 쌓이게 다단(column)으로 흘린다 */
.room-memo-grid { column-width: 290px; column-gap: 14px; }
.room-memo {
    break-inside: avoid;
    display: inline-block;
    width: 100%;
    margin: 0 0 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fffaf2;
    border: 1px solid #f1dfc4;
    box-shadow: 0 6px 16px -10px rgba(46, 36, 69, 0.25);
}
.room-memo-mine { background: #ffffff; border-color: var(--border-color); }
.room-memo-teacher { background: #f3eefb; border-color: #d9cfee; }
.room-memo h4 { font-size: 1rem; font-weight: 800; color: var(--text-main); margin: 6px 0 0; word-break: keep-all; }
.room-memo-body {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    font-size: 0.93rem;
    line-height: 1.6;
    color: var(--text-main);
    margin: 8px 0 4px;
    max-height: 320px;
    overflow: auto;
}
.room-memo-copied { background: var(--accent-emerald) !important; border-color: var(--accent-emerald) !important; }

.room-memo-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(30, 22, 48, 0.62);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.room-memo-big {
    background: #ffffff;
    border-radius: 18px;
    width: min(1100px, 100%);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    padding: 24px 28px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}
.room-memo-big-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.room-memo-big-head h3 { font-size: 1.5rem; font-weight: 800; color: var(--text-main); margin: 4px 0 0; }
.room-memo-close {
    background: var(--primary-soft);
    color: var(--primary-dark);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    flex-shrink: 0;
}
.room-memo-big-body {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    font-size: clamp(1.1rem, 2.2vw, 1.7rem);
    line-height: 1.6;
    color: var(--text-main);
    background: #fbf9fe;
    border: 1px solid #e6ddf3;
    border-radius: 12px;
    padding: 18px 20px;
    margin: 14px 0 6px;
    overflow: auto;
    flex: 1;
}
@media (max-width: 600px) {
    .room-memo-big { padding: 18px; }
    .room-memo-grid { column-width: auto; column-count: 1; }
}

/* 질문방 */
.room-ask-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.room-answers { border-top: 1px solid var(--border-color); margin-top: 10px; padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.room-answer { background: #f8fafc; border-radius: 10px; padding: 8px 12px; }
.room-answer-teacher { background: #f7f4fb; border: 1px solid #d9cfee; }
.room-answers .room-code-row input[type="text"] { font-size: 0.9rem; padding: 8px 10px; }

/* 진도표 */
.room-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}
.room-stat {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.room-stat-pass { background: #f7f4fb; border-color: #d9cfee; }
.room-stat-label { font-size: 0.82rem; color: #64748b; font-weight: 700; }
.room-stat-value { font-size: 1.35rem; font-weight: 800; color: var(--text-main); }
.room-bar { position: relative; height: 8px; border-radius: 999px; background: #e2e8f0; margin: 4px 0; }
.room-bar > div { height: 100%; border-radius: 999px; background: #f59e0b; }
.room-bar > div.ok { background: #6b4fa0; }
.room-bar > i { position: absolute; top: -3px; width: 2px; height: 14px; background: #334155; }
.room-table-wrap { overflow-x: auto; margin-top: 10px; }
.room-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.room-table th, .room-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    white-space: nowrap;
}
.room-table th { font-size: 0.8rem; color: #64748b; font-weight: 700; }
.room-table td:first-child, .room-table th:first-child { text-align: left; }
.room-matrix .room-sticky { position: sticky; left: 0; background: var(--card-bg); z-index: 1; }
.room-mark { color: #94a3b8; font-weight: 700; }
.room-mark-ok { color: #4e3782; background: #eee8f7; padding: 2px 8px; border-radius: 999px; font-size: 0.8rem; }
.room-cell {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: #94a3b8;
    font-weight: 800;
    cursor: pointer;
    font-size: 0.78rem;
}
.room-cell.on { background: #6b4fa0; border-color: #6b4fa0; color: #fff; }
.room-sub-dot {
    display: inline-block;
    margin-left: 3px;
    font-size: 0.68rem;
    font-weight: 800;
    color: #5b4290;
    background: #ede9fe;
    padding: 1px 4px;
    border-radius: 6px;
    vertical-align: middle;
}

/* 수강생 관리 */
.room-manage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}
.room-manage-grid .room-card { display: flex; flex-direction: column; gap: 10px; }
.room-people { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.room-person {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f8fafc;
    cursor: pointer;
}
.room-person > span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.room-person small { color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-select-all { margin-bottom: 2px; }
.room-share { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.room-qr { width: 132px; height: 132px; background: #fff; flex-shrink: 0; }
.room-qr img, .room-qr canvas { width: 132px !important; height: 132px !important; }
.room-share-text { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 6px; }
.room-share-text code {
    font-size: 0.85rem;
    background: #f1f5f9;
    padding: 6px 8px;
    border-radius: 8px;
    word-break: break-all;
}
.room-session-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.room-session-row input {
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-family: inherit;
    background: #fff;
    color: var(--text-main);
    min-width: 0;
}
.room-session-label { flex: 1; }
.room-rule-row { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.9rem; font-weight: 600; margin-top: 6px; }
.room-rule-row input { width: 64px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border-color); margin: 0 4px; }
.room-save-bar {
    position: sticky;
    bottom: 12px;
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}
.room-save-bar .btn { box-shadow: 0 8px 24px rgba(15, 118, 110, 0.35); }

@media (max-width: 600px) {
    .room-card { padding: 14px; }
    .room-manage-grid { grid-template-columns: 1fr; }
    .room-post { gap: 10px; }
    .room-post-icon { width: 36px; height: 36px; }
    .room-hero-btn { padding: 9px 14px; font-size: 0.88rem; }
}
