:root {
    --orange: #ff6b35;
    --orange-light: #fff3ee;
    --navy: #1a2b4a;
    --blue: #3d5afe;
    --blue-light: #e8ecff;
    --green: #10b981;
    --bg: #f4f5f7;
    --white: #fff;
    --border: #e8ebf0;
    --muted: #8b95a1;
    --text: #2d3a4a;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Pretendard', 'Noto Sans KR', sans-serif;
    background: var(--bg);
    color: var(--text);
    height: 100vh;
}

/* ── EDITOR ROOT ── */
.editor-root { display: flex; flex-direction: column; height: 100vh; }

/* ── HEADER ── */
.editor-header {
    height: 56px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}
.header-left { display: flex; gap: 10px; }
    .header-left-inner {display: flex; flex-direction: column; gap: 1px;}
.back-btn {
    background: none; border: none; cursor: pointer;
    font-size: 15px; font-weight: 700; color: var(--navy);
    display: flex; align-items: center; gap: 6px;
}
.back-btn:hover { color: var(--orange); }
.breadcrumb { font-size: 11px; color: var(--muted); }
.header-center {
    position: absolute; left: 50%; transform: translateX(-50%);
}
.btn-preview {
    background: none; border: 1.5px solid var(--border);
    border-radius: var(--radius); padding: 6px 16px;
    font-size: 13px; cursor: pointer; color: var(--text);
    display: flex; align-items: center; gap: 5px;
    transition: all 0.2s;
}
.btn-preview:hover { border-color: var(--navy); }
.btn-preview.preview-active {
    background: var(--orange); border-color: var(--orange);
    color: white; font-weight: 700;
}
.btn-preview.preview-active:hover { background: #e85c2d; border-color: #e85c2d; }
.header-right { display: flex; align-items: center; gap: 8px; }
.btn-save {
    background: none; border: 1.5px solid var(--border);
    border-radius: var(--radius); padding: 6px 16px;
    font-size: 13px; cursor: pointer; color: var(--text);
}
.btn-save:hover { border-color: var(--navy); }
.btn-publish {
    background: var(--orange); border: none;
    border-radius: var(--radius); padding: 7px 18px;
    font-size: 13px; font-weight: 700; color: white; cursor: pointer;
}
.btn-publish:hover { background: #e85c2d; }

/* ── EDITOR BODY ── */
.editor-body { display: flex; flex: 1;}

/* ── LEFT PANEL ── */
.left-panel {
    width: 380px; flex-shrink: 0;
    background: var(--white); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; overflow: hidden;
}
.left-panel-header {
    padding: 18px 16px 12px;
    border-bottom: 1px solid var(--border);
}
.left-panel-header h2 { font-size: 15px; font-weight: 700; color: var(--navy); }
.left-panel-header p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.block-palette { flex: 1; overflow-y: auto; padding: 6px 0; }

/* Accordion */
.block-category { border-bottom: 1px solid var(--border); }
.category-header {
    display: flex; align-items: center; gap: 6px;
    padding: 11px 16px; cursor: pointer; user-select: none;
}
.category-header:hover { background: #fafafa; }
.category-title { font-size: 13px; font-weight: 600; color: var(--navy); flex: 1; }
.category-badge {
    font-size: 10px; color: var(--muted);
    background: var(--bg); padding: 1px 7px; border-radius: 10px;
}
.category-count { font-size: 11px; color: var(--muted); }
.chevron { font-size: 11px; color: var(--muted); transition: transform 0.2s; }
.category-header.collapsed .chevron { transform: rotate(-90deg); }
.category-body { padding: 4px 12px 12px; }
.category-body.hidden { display: none; }

/* Block grid */
.block-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.block-card {
    border: 1.5px solid var(--border); border-radius: var(--radius);
    padding: 10px 6px; cursor: pointer; text-align: center;
    background: var(--white); transition: all 0.15s;
}
.block-card:hover { border-color: var(--orange); background: var(--orange-light); }
.block-card.active { border-color: var(--blue); background: var(--blue-light); }
.block-card.maxed { opacity: 0.45; cursor: not-allowed; }
.block-icon { font-size: 20px; margin-bottom: 4px; line-height: 1; }
.block-label { font-size: 11px; color: var(--text); line-height: 1.3; }
.block-max-note { font-size: 11px; color: var(--orange); padding: 2px 4px 6px; text-align: center; }

/* Fixed block toggle rows */
.fixed-block-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 4px; border-radius: var(--radius);
}
.fixed-block-row:hover { background: #fafafa; }
.fixed-block-name { font-size: 13px; }
.toggle-wrap { display: flex; align-items: center; gap: 6px; }
.toggle-label { font-size: 11px; color: var(--muted); }
.toggle-switch {
    width: 36px; height: 20px; background: var(--border);
    border: none; border-radius: 10px; cursor: pointer;
    position: relative; transition: background 0.2s;
}
.toggle-switch::after {
    content: ''; position: absolute;
    width: 14px; height: 14px; background: white;
    border-radius: 50%; top: 3px; left: 3px; transition: transform 0.2s;
}
.toggle-switch.on { background: var(--green); }
.toggle-switch.on::after { transform: translateX(16px); }

/* ── CENTER PANEL ── */
.center-panel {
    flex: 1; overflow-y: auto; background: var(--bg);
    padding: 24px; display: flex; flex-direction: column; align-items: center;
}
.profile-preview {
    width: 100%;
    display: flex; flex-direction: column; gap: 12px;
}

/* Preview blocks - 유저 단에서는 커서 포인터 해제 */
.preview-block {
    background: var(--white); border-radius: 12px;
    border: 2px solid transparent;
    position: relative; transition: border-color 0.15s;
}
.preview-block:hover { border-color: #d0d9ff; }
.preview-block.selected {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(61,90,254,0.08);
}

/* Block toolbar (visible on selection) - 유저 단에서는 모두 display none */
.block-toolbar {
    position: absolute; top: 10px; right: 10px;
    display: none; gap: 4px; z-index: 5;
}

.toolbar-btn {
    width: 28px; height: 28px;
    background: var(--white); border: 1px solid var(--border);
    border-radius: 6px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; color: var(--muted);
}
.toolbar-btn:hover { color: var(--text); border-color: var(--navy); }
.toolbar-btn.delete:hover { color: #ef4444; border-color: #ef4444; }

/* ── BLOCK CONTENT STYLES ── */

/* 기본 프로필 */
.basic-profile-block { padding: 32px; }
.profile-top { display: flex; gap: 24px; }
.profile-photo {
    width: 120px; height: 120px; border-radius: 60px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 48px; overflow: hidden; border: 2px solid var(--border);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-info { flex: 1; }
.profile-name { font-size: 32px; font-weight: 800; color: var(--navy); }
.profile-tagline { font-size: 15px; color: var(--muted); margin-top: 6px; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.profile-tag-pill {
    background: var(--orange); border: 1px solid var(--border); color: #fff;
    border-radius: 20px; padding: 3px 12px; font-size: 12px;
}
.profile-meta { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.profile-meta-row { font-size: 13px; color: var(--muted); }
.profile-cta { margin-top: 20px; text-align: right; }
.profile-cta-btn {
    background: none; border: 1.5px solid var(--navy);
    border-radius: var(--radius); padding: 8px 16px;
    font-size: 13px; color: var(--navy); cursor: pointer;
}
.profile-cta-btn:hover { border-color: var(--orange); color: var(--orange); }

/* QnA 강사 프로필 블록 */
.preview-block[data-type="qna-profile"] { border: 1px solid rgba(124,58,237,0.25) !important; box-shadow: 0 4px 16px rgba(124,58,237,0.1); cursor: default; }
.preview-block[data-type="qna-profile"]:hover { border-color: rgba(124,58,237,0.25) !important; box-shadow: 0 4px 16px rgba(124,58,237,0.1); }
.qna-profile-block { padding: 20px; }
.qna-ph { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.qna-ph-left { display: flex; align-items: center; gap: 8px; }
.qna-ph-icon { width: 20px; height: 20px; flex-shrink: 0; }
.qna-ph-title { font-size: 15px; font-weight: 700; color: var(--navy); }
.qna-close-btn { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 16px; padding: 0; line-height: 1; }
.qna-close-btn:hover { color: var(--text); }
.qna-premium-badge { display: inline-flex; align-items: center; padding: 5px 12px; background: #7c3aed; color: #fff; font-size: 12px; font-weight: 700; border-radius: 9999px; box-shadow: 0 0 12px rgba(124,58,237,0.4); margin-bottom: 16px; }
.qna-stats-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.qna-stat-card { background: #f8f9fa; border-radius: 10px; padding: 12px; text-align: center; }
.qna-stat-icon { font-size: 16px; margin-bottom: 8px; display: block; }
.qna-stat-value { font-size: 22px; font-weight: 800; line-height: 1.3; display: block; }
.qna-stat-label { font-size: 12px; color: var(--muted); margin-top: 4px; display: block; }
.qna-divider { border: none; border-top: 1px solid var(--border); margin: 0 0 16px; }
.qna-info-row { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; }
.qna-info-item { display: flex; align-items: center; gap: 6px; }
.qna-info-label { font-size: 12px; color: var(--muted); }
.qna-info-value { font-size: 13px; font-weight: 700; color: var(--navy); }
.qna-cta-btn { width: 100%; height: 38px; background: rgba(124,58,237,0.08); border: none; border-radius: 10px; color: #7c3aed; font-size: 13px; font-weight: 700; cursor: pointer; transition: background 0.15s; }
.qna-cta-btn:hover { background: rgba(124,58,237,0.14); }

/* 강사 소개 */
.intro-block { padding: 32px; }
.intro-block h2 { font-size: 22px; font-weight: 700; color: var(--navy); margin-bottom: 12px; }
.intro-block p { font-size: 14px; line-height: 1.8; color: var(--text); }

/* 등급 배지 */
.grade-badge-block { padding: 24px 32px; }
.badge-inner { display: flex; align-items: center; justify-content: space-between; }
.badge-left { display: flex; align-items: center; gap: 16px; }
.badge-icon {
    width: 60px; height: 60px; background: #fff9e6;
    border-radius: 12px; display: flex; align-items: center;
    justify-content: center; font-size: 28px;
}
.badge-title { font-size: 20px; font-weight: 700; color: var(--navy); }
.badge-desc { font-size: 13px; color: var(--muted); margin-top: 3px; }
.badge-cert {
    background: var(--navy); color: white;
    border-radius: 8px; padding: 8px 16px;
    font-size: 13px; font-weight: 600;
}

/* 강의 통계 */
.stats-block { padding: 28px 32px; }
.stats-block h3 { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 20px; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.stat-item { text-align: center; padding: 8px 0; position: relative; }
.stat-item:not(:last-child)::after {
    content: ''; position: absolute; right: 0; top: 10%;
    height: 80%; width: 1px; background: var(--border);
}
.stat-value { font-size: 32px; font-weight: 800; color: var(--orange); }
.stat-label { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* 강의 카드 carousel */
.course-block { padding: 28px 32px 32px; }
.course-block-header { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.course-block-header h3 { font-size: 16px; font-weight: 700; color: var(--navy); }

/* Carousel slider container */
.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
}
.carousel-btn {
    flex-shrink: 0;
    width: 32px; height: 32px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: var(--navy);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
    z-index: 2;
    box-shadow: var(--shadow);
}
.carousel-btn:hover:not(:disabled) { background: var(--navy); color: white; border-color: var(--navy); }
.carousel-btn:disabled { opacity: 0.3; cursor: default; box-shadow: none; }
.carousel-btn.carousel-prev { margin-right: 8px; }
.carousel-btn.carousel-next { margin-left: 8px; }
.carousel-btn.hidden { visibility: hidden; pointer-events: none; }
.course-carousel-wrap {
    flex: 1;
    overflow: hidden;
}
.course-carousel {
    display: flex;
    gap: 12px;
    padding-bottom: 4px;
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}
.course-card-item {
    width: calc(100% / 3 - 12px); flex-shrink: 0;
    border-radius: 10px; border: 1px solid var(--border);
    overflow: hidden; background: var(--white);
}
.course-card-img {
    width: 100%; padding-bottom: 56.25%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}
.c-g { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.c-o { background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%); }
.c-b { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.c-p { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.c-d { background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%); }
.course-card-badge {
    font-size: 10px; font-weight: 600;
    background: rgba(0,0,0,0.4); color: white;
    padding: 2px 8px; border-radius: 10px;
    position: absolute; top: 8px; left: 8px;
}
.course-card-discount {
    font-size: 11px; font-weight: 700;
    background: var(--orange); color: white;
    padding: 2px 7px; border-radius: 10px;
    position: absolute; top: 8px; right: 8px;
}
.course-card-body { padding: 10px; }
.course-card-title { font-size: 12px; font-weight: 600; color: var(--navy); line-height: 1.4; margin-bottom: 6px; }
.course-card-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* 텍스트 블록 */
.text-block { padding: 28px 32px; }
.text-block h3 { font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.text-block p { font-size: 14px; line-height: 1.8; color: var(--text); }

/* 이미지 블록 */
.image-block { padding: 16px; }
.image-placeholder {
    width: 100%; height: 200px;
    background: var(--bg); border: 2px dashed var(--border);
    border-radius: 8px; display: flex; align-items: center;
    justify-content: center; font-size: 40px; color: var(--border);
}
.image-preview-img { width: 100%; border-radius: 8px; max-height: 380px; object-fit: cover; display: block; }

/* 영상 링크 */
.video-block { padding: 16px; }
.video-placeholder {
    width: 100%; height: 200px; background: var(--navy);
    border-radius: 8px; display: flex; align-items: center;
    justify-content: center; flex-direction: column; gap: 8px;
    font-size: 40px; color: white;
}

/* 대표 강의 */
.featured-block { padding: 24px; }
.fc-header { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.fc-header-icon { font-size: 20px; line-height: 1; }
.fc-header h3 { font-size: 18px; font-weight: 600; color: var(--text); margin: 0; }
.fc-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.fc-card { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.fc-img-wrap { position: relative; height: 182px; overflow: hidden; }
.fc-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fc-rank-badge { position: absolute; top: 16px; left: 16px; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 16px; font-weight: 700; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.fc-img-top-right { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; align-items: center; }
.fc-grade-badge { background: linear-gradient(90deg, #fdc700 0%, #ff6900 100%); color: white; font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 4px; white-space: nowrap; }
.fc-disc-badge { background: #00d563; color: white; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 4px; white-space: nowrap; }
.fc-best-badge { position: absolute; bottom: 8px; left: 8px; background: var(--orange); color: white; font-size: 11px; font-weight: 700; padding: 3px 12px; border-radius: 4px; }
.fc-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.fc-title { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.5; }
.fc-instructor { font-size: 13px; color: var(--muted); }
.fc-rating-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.fc-rating-score { font-size: 14px; font-weight: 700; color: var(--text); }
.fc-rating-count, .fc-students { font-size: 13px; color: var(--muted); }
.fc-rating-sep { color: #e8ebf0; margin: 0 4px; font-size: 16px; line-height: 1; }
.fc-type-row { display: flex; align-items: center; gap: 8px; }
.fc-type-badge { background: #f4f5f7; color: #555; font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.fc-detail { font-size: 13px; color: #555; }
.fc-price-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fc-price-discount { background: var(--orange); color: white; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.fc-price-sale { font-size: 18px; font-weight: 700; color: var(--text); }
.fc-price-original { font-size: 13px; color: var(--muted); text-decoration: line-through; }

/* 디지털 자료 */
.content-product-block { padding: 28px 32px; }
.content-product-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.content-product-header h3 { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 0; }
.content-product-viewall { font-size: 13px; color: var(--orange); cursor: pointer; }
.product-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.product-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; }
.product-card-img-wrap { position: relative; width: 100%; aspect-ratio: 4/3; overflow: hidden; }
.product-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-badge { position: absolute; top: 8px; right: 8px; background: var(--orange); color: white; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 4px; }
.product-card-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.product-card-title { font-size: 14px; font-weight: 600; color: var(--text); }
.product-rating { display: flex; align-items: center; gap: 4px; }
.product-stars { color: #fbbf24; font-size: 11px; }
.product-rating-score { font-size: 11px; font-weight: 600; color: var(--text); }
.product-rating-count { font-size: 11px; color: var(--muted); }
.product-downloads { font-size: 11px; color: var(--muted); }
.product-price-row { display: flex; align-items: center; gap: 6px; }
.product-price-original { font-size: 11px; color: var(--muted); text-decoration: line-through; }
.product-card-price { font-size: 16px; font-weight: 700; color: var(--text); }

/* 수강생 후기 */
.reviews-block { padding: 28px 32px; }
.reviews-block h3 { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 16px; }
.review-card { border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 10px; }
.review-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.reviewer-avatar {
    width: 36px; height: 36px; background: var(--bg);
    border-radius: 18px; display: flex; align-items: center;
    justify-content: center; font-size: 16px; flex-shrink: 0;
}
.reviewer-name { font-size: 13px; font-weight: 600; }
.reviewer-stars { font-size: 12px; color: #fbbf24; }
.review-text { font-size: 13px; color: var(--text); line-height: 1.6; }

/* SNS 링크 */
.sns-block { padding: 28px 32px; }
.sns-block h3 { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 16px; }
.sns-links { display: flex; gap: 10px; flex-wrap: wrap; }
.sns-link-pill {
    display: flex; align-items: center; gap: 6px;
    border: 1px solid var(--border); border-radius: 20px;
    padding: 6px 14px; font-size: 13px; cursor: pointer;
}

/* ── RIGHT PANEL ── */
.right-panel {
    width: 380px; flex-shrink: 0;
    background: var(--white); border-left: 1px solid var(--border);
    display: flex; flex-direction: column; overflow: hidden;
}
.tab-list { display: flex; border-bottom: 1px solid var(--border); }
.tab-list.hidden { display: none; }
.tab-btn {
    flex: 1; padding: 13px 8px; border: none; background: none;
    cursor: pointer; font-size: 12px; color: var(--muted);
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    transition: all 0.15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.tab-content { flex: 1; overflow-y: auto; }
.tab-panel { display: none; padding: 20px 16px; }
.tab-panel.active { display: block; }

/* Props form */
.block-type-header {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; background: var(--bg);
    border-radius: var(--radius); margin-bottom: 18px;
}
.block-type-icon { font-size: 18px; }
.block-type-name { font-size: 13px; font-weight: 600; color: var(--navy); }
.prop-group { margin-bottom: 18px; }
.prop-label { display: block; font-size: 12px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.prop-input, .prop-textarea, .prop-select {
    width: 100%; padding: 8px 12px;
    border: 1.5px solid var(--border); border-radius: 8px;
    font-size: 13px; color: var(--text); background: var(--white);
    transition: border-color 0.15s;
}
.prop-input:focus, .prop-textarea:focus, .prop-select:focus {
    outline: none; border-color: var(--blue);
}
.prop-textarea { resize: vertical; min-height: 80px; font-family: inherit; line-height: 1.6; }
.prop-char-count { text-align: right; font-size: 10px; color: var(--muted); margin-top: 3px; }
.prop-hint { font-size: 11px; color: var(--muted); margin-top: 4px; }
.block-divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* Photo upload */
.photo-upload-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.photo-preview {
    width: 64px; height: 64px; background: var(--bg);
    border-radius: 32px; border: 1px solid var(--border);
    overflow: hidden; display: flex; align-items: center;
    justify-content: center; font-size: 24px; flex-shrink: 0;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-change-btn {
    padding: 6px 14px; border: 1.5px solid var(--border);
    border-radius: var(--radius); background: none;
    font-size: 12px; cursor: pointer;
}
.photo-change-btn:hover { border-color: var(--navy); }

/* Tags */
.tag-input-row { display: flex; gap: 6px; margin-bottom: 8px; }
.tag-input-row .prop-input { flex: 1; }
.tag-add-btn {
    padding: 8px 12px; background: var(--navy);
    color: white; border: none; border-radius: 8px;
    font-size: 12px; cursor: pointer; white-space: nowrap;
}
.tag-add-btn:hover { background: var(--blue); }
.tags-display { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.tag-chip {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 20px; padding: 3px 10px; font-size: 12px;
}
.tag-chip-remove {
    border: none; background: none; cursor: pointer;
    font-size: 14px; color: var(--muted); line-height: 1; padding: 0;
}
.tag-chip-remove:hover { color: #ef4444; }

/* Empty state in right panel */
.no-selection-msg {
    text-align: center; padding: 50px 20px; color: var(--muted);
}
.no-selection-msg .icon { font-size: 36px; margin-bottom: 10px; display: block; }
.no-selection-msg p { font-size: 13px; line-height: 1.7; }

/* Auto info panel */
.auto-info-box {
    text-align: center; padding: 24px 16px;
    background: var(--bg); border-radius: var(--radius); color: var(--muted);
}
.auto-info-box .icon { font-size: 28px; display: block; margin-bottom: 10px; }
.auto-info-box p { font-size: 13px; line-height: 1.7; }

/* 콘텐츠 상품 편집 패널 */
.cp-panel-wrap { display: flex; flex-direction: column; gap: 16px; padding: 16px; }
.cp-panel-header { display: flex; align-items: center; justify-content: space-between; height: 24px; }
.cp-panel-edit-title { font-size: 14px; font-weight: 700; color: var(--navy); }
.cp-panel-close-btn { width: 36px; height: 24px; border: none; background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--muted); font-size: 16px; }
.cp-panel-close-btn:hover { background: var(--border); }
.cp-block-name { font-size: 14px; font-weight: 700; color: var(--navy); }
.cp-info-box { background: #fff8f5; border: 1px solid #ffe5d9; border-radius: 10px; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cp-info-emoji { font-size: 48px; line-height: 1.5; }
.cp-info-heading { font-size: 16px; font-weight: 700; color: var(--navy); text-align: center; line-height: 1.5; margin: 0; }
.cp-info-desc { font-size: 13px; color: var(--muted); text-align: center; line-height: 1.6; margin: 0; }
.cp-info-desc .cp-link { color: var(--orange); font-weight: 700; }
.cp-tip-box { width: 100%; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px; box-sizing: border-box; margin-top: 4px; }
.cp-tip-header { font-size: 12px; font-weight: 700; color: var(--navy); margin: 0 0 10px; }
.cp-tip-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.cp-tip-list li { font-size: 11px; color: var(--muted); }
.cp-delete-btn { width: 100%; height: 48px; background: #fff; border: 2px solid #fb2c36; border-radius: 10px; color: #fb2c36; font-size: 14px; font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background 0.15s; }
.cp-delete-btn:hover { background: #fff5f5; }

/* 대표 강의 편집 패널 */
.fc-panel-wrap { display: flex; flex-direction: column; gap: 16px; padding: 16px; }
.fc-panel-header { display: flex; align-items: center; justify-content: space-between; height: 24px; }
.fc-panel-title { font-size: 14px; font-weight: 700; color: var(--navy); }
.fc-tip-box { background: #fff7e6; border: 1px solid #ffd591; border-radius: 10px; padding: 17px; display: flex; flex-direction: column; gap: 8px; }
.fc-tip-title { font-size: 13px; font-weight: 700; color: var(--text); }
.fc-tip-desc { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 0; }
.fc-count-box { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 17px; display: flex; flex-direction: column; gap: 8px; }
.fc-count-label { font-size: 12px; color: var(--muted); }
.fc-count-value { font-size: 16px; font-weight: 700; color: var(--orange); }
.fc-list-wrap { display: flex; flex-direction: column; gap: 8px; }
.fc-list-header-row { display: flex; align-items: center; justify-content: space-between; }
.fc-list-label { font-size: 13px; font-weight: 700; color: var(--text); }
.fc-list-hint { font-size: 11px; color: var(--muted); }
.fc-list-scroll { display: flex; flex-direction: column; gap: 8px; max-height: 400px; overflow-y: auto; padding-right: 4px; }
.fc-list-item { display: flex; align-items: center; gap: 12px; padding: 2px 14px; height: 76px; border-radius: 10px; border: 1px solid var(--border); background: #fff; cursor: pointer; transition: border-color 0.15s, background 0.15s; box-sizing: border-box; }
.fc-list-item.selected { border: 2px solid var(--orange); background: #fff5f0; }
.fc-list-thumb { width: 48px; height: 48px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.fc-list-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fc-list-name { font-size: 13px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-list-badges { display: flex; align-items: center; gap: 8px; }
.fc-list-online { background: #dbeafe; color: #1447e6; font-size: 10px; font-weight: 500; padding: 2px 6px; border-radius: 4px; }
.fc-list-offline { background: #dcfce7; color: #008236; font-size: 10px; font-weight: 500; padding: 2px 6px; border-radius: 4px; }
.fc-list-rating { font-size: 11px; color: var(--muted); }
.fc-list-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.fc-select-btn { font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--muted); cursor: pointer; white-space: nowrap; }
.fc-select-btn.selected { background: var(--orange); border-color: var(--orange); color: #fff; }
.fc-list-price { font-size: 12px; font-weight: 700; color: var(--text); }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d0d7e0; border-radius: 3px; }

/* ── PANEL TOGGLE BUTTONS (header) ── */
.panel-toggle-btn {
    display: none;
    background: none; border: 1.5px solid var(--border);
    border-radius: var(--radius); width: 36px; height: 36px;
    cursor: pointer; font-size: 16px; color: var(--navy);
    align-items: center; justify-content: center;
    flex-shrink: 0; transition: all 0.15s;
}
.panel-toggle-btn:hover { border-color: var(--orange); color: var(--orange); }
.panel-toggle-btn.active { background: var(--navy); color: white; border-color: var(--navy); }

/* ── PANEL OVERLAY ── */
.panel-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 99;
}
.panel-overlay.show { display: block; }

/* ── PANEL SLIDE DRAWER (mobile) ── */
.panel-drawer-header {
    display: none;
    align-items: center; justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.panel-drawer-title { font-size: 14px; font-weight: 700; color: var(--navy); }
.panel-drawer-close {
    background: none; border: none; cursor: pointer;
    font-size: 20px; color: var(--muted); line-height: 1;
    padding: 2px 6px; border-radius: 4px;
}
.panel-drawer-close:hover { color: var(--text); background: var(--bg); }

/* ── RESPONSIVE ── */
    
    
    @media (max-width: 1520px) {
        .right-panel,
        .left-panel {width: 280px;}
    }
@media (max-width: 1200px) {
    .panel-toggle-btn { display: flex; }

    .left-panel {
    position: fixed; top: 0; left: 0;
    height: 100vh; z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
    }
    .left-panel.open { transform: translateX(0); }

    .right-panel {
    position: fixed; top: 0; right: 0;
    height: 100vh; z-index: 100;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
    box-shadow: -4px 0 24px rgba(0,0,0,0.12);
    }
    .right-panel.open { transform: translateX(0); }

    .panel-drawer-header { display: flex; }

    .course-card-item {width: 100%;}
}

@media (max-width: 600px) {
    .left-panel { width: 100vw; }
    .right-panel { width: 100vw; }
    .editor-header { padding: 0 12px; gap: 6px; }
    .header-center { display: none; }
    .breadcrumb { display: none; }
    .btn-save { display: none; }
}

/* ── PREVIEW MODE ── */
.left-panel, .right-panel {
    transition: width 0.3s cubic-bezier(0.4,0,0.2,1),
                opacity 0.3s ease,
                transform 0.28s cubic-bezier(0.4,0,0.2,1);
}
.editor-root.preview-mode .left-panel,
.editor-root.preview-mode .right-panel {
    width: 0 !important;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    flex-shrink: 0;
}
.editor-root.preview-mode .panel-toggle-btn { display: none !important; }
.editor-root.preview-mode .center-panel { padding: 32px 10%; }

/* ── STYLE TAB ── */
#tab-btn-style.active { color: var(--orange); border-bottom-color: var(--orange); }
#tab-btn-settings.active { color: var(--orange); border-bottom-color: var(--orange); }

/* ── SETTINGS TAB ── */
.settings-section { margin-bottom: 28px; }
.settings-section-label { font-size: 12px; font-weight: 700; color: var(--navy); margin-bottom: 10px; display: block; }
.settings-radio-list { display: flex; flex-direction: column; gap: 10px; }
.settings-radio-item { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.settings-radio-item input[type=radio] { width: 16px; height: 16px; accent-color: var(--orange); cursor: pointer; flex-shrink: 0; }
.settings-radio-label { font-size: 13px; color: var(--text); }
.profile-url-row { display: flex; gap: 8px; align-items: center; }
.profile-url-box {
    flex: 1; min-width: 0;
    background: var(--white); border: 1px solid var(--border);
    border-radius: 10px; padding: 10px 12px;
    display: flex; align-items: center; gap: 0;
    font-size: 13px; height: 42px; overflow: hidden;
}
.profile-url-prefix { color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.profile-url-input {
    border: none; outline: none; background: transparent;
    font-size: 14px; color: var(--text); font-family: inherit;
    min-width: 0; flex: 1;
}
.profile-url-copy-btn {
    width: 40px; height: 36px; flex-shrink: 0;
    background: var(--orange); border: none; border-radius: 8px;
    cursor: pointer; color: white; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.profile-url-copy-btn:hover { background: #e85c2d; }
.copy-toast {
    display:inline-block; font-size:11px; color: var(--green);
    margin-top: 5px; opacity: 0; transition: opacity 0.3s;
}
.copy-toast.show { opacity: 1; }

.style-section { margin-bottom: 24px; }
.style-section-label { font-size: 12px; font-weight: 700; color: var(--navy); margin-bottom: 10px; display: block; }

/* 프리셋 테마 그리드 */
.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.preset-card {
    border: 1.5px solid var(--border); border-radius: 10px;
    padding: 12px; cursor: pointer; transition: all 0.15s;
    background: var(--white); text-align: left;
}
.preset-card:hover { border-color: var(--orange); }
.preset-card.active { border-color: var(--orange); background: var(--orange-light); }
.preset-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.preset-dot { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; }
.preset-name { font-size: 12px; font-weight: 500; color: var(--text); }
.preset-meta { font-size: 10px; color: var(--muted); line-height: 1.7; }

/* 테마 컬러 그리드 */
.color-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.color-swatch-btn {
    display: flex; flex-direction: column; align-items: center; gap: 7px;
    padding: 12px 4px; border: 1px solid var(--border); border-radius: 10px;
    cursor: pointer; background: var(--white); transition: all 0.15s;
}
.color-swatch-btn:hover { border-color: var(--orange); }
.color-swatch-btn.active { border-color: var(--orange); background: var(--orange-light); }
.color-circle {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: white; flex-shrink: 0;
}
.color-name { font-size: 11px; color: var(--text); }

/* 프로필 배경 */
.bg-list { display: flex; flex-direction: column; gap: 8px; }
.bg-option-btn {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 14px; border: 1.5px solid var(--border); border-radius: 10px;
    cursor: pointer; background: var(--white); transition: all 0.15s;
}
.bg-option-btn:hover { border-color: var(--orange); }
.bg-option-btn.active { border-color: var(--orange); background: var(--orange-light); }
.bg-swatches { display: flex; gap: 6px; }
.bg-swatch { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; }
.bg-label { font-size: 14px; color: var(--text); }

/* 카드/텍스트 스타일 라디오 */
.radio-list { display: flex; flex-direction: column; gap: 10px; }
.radio-item { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.radio-item input[type=radio] { width: 16px; height: 16px; accent-color: var(--orange); cursor: pointer; flex-shrink: 0; }
.radio-label { font-size: 13px; color: var(--text); }