/* ============================================================
   AI SNS 마케팅 자동화 솔루션 — 명품 디자인 시스템
   "전 세계 최고의 명품 걸작" 다크 럭셔리 + 골드 액센트
   ============================================================ */
:root {
  --bg: #070b1a;
  --bg-2: #0c1228;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1fb;
  --text-dim: #9aa3c4;
  --text-faint: #677290;
  --gold: #e7c068;
  --gold-2: #f3d997;
  --indigo: #6d7cff;
  --indigo-2: #9aa6ff;
  --violet: #b07bff;
  --cyan: #6fe7e0;
  --green: #58d6a0;
  --red: #ff6b7d;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --grad-gold: linear-gradient(135deg, #f3d997, #e7c068 45%, #c89b3c);
  --grad-brand: linear-gradient(135deg, #6d7cff, #b07bff 60%, #e7c068);
  --grad-surface: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  --font: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* 배경 오로라 */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1100px 700px at 12% -8%, rgba(109,124,255,.20), transparent 60%),
    radial-gradient(900px 600px at 92% 4%, rgba(176,123,255,.16), transparent 55%),
    radial-gradient(800px 700px at 70% 100%, rgba(231,192,104,.10), transparent 55%),
    var(--bg);
}
body::after {
  content: '';
  position: fixed; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: .5;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }
::selection { background: rgba(231,192,104,.3); }

/* 스크롤바 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.22); }

/* ---------- 레이아웃 셸 ---------- */
.app { display: grid; grid-template-columns: 260px 1fr 372px; min-height: 100vh; }
.app.no-chat { grid-template-columns: 260px 1fr; }
.app.no-chat .chat { display: none; }
.app.guest { grid-template-columns: 1fr; }

/* ---------- 사이드바 ---------- */
.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, rgba(12,18,40,.9), rgba(7,11,26,.92));
  border-right: 1px solid var(--border);
  padding: 26px 18px; display: flex; flex-direction: column; gap: 6px;
  backdrop-filter: blur(14px);

  /* --- 사이드바 독립 스크롤 (2026-09-02) ---------------------------
     전에는 스크롤 영역이 없어서, 메뉴가 화면보다 길면 사이드바는
     움직이지 못하고 휠이 뒤 페이지로 새어나가 «화면 전체»가 내려갔다.
       overflow-y          : 사이드바가 자기 두루마리를 갖는다
       overscroll-behavior : 끝까지 내려도 본문으로 넘기지 않는다
       scrollbar-gutter    : 스크롤바가 생겨도 메뉴 글자가 안 밀린다  */
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(231,192,104,.32) rgba(255,255,255,.05);
}
/* 자식이 눌리면 넘치질 않아 스크롤이 안 생긴다 -> 압축 금지 */
.sidebar > * { flex-shrink: 0; }
/* 공간이 남을 때만 아래로 밀어낸다 (모자라면 0으로 접힘) */
.sidebar .spacer { flex: 1 0 auto; min-height: 10px; }
/* 사이드바 전용 스크롤바 - 본문(10px)보다 얇고 금색 계열 */
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-track { background: rgba(255,255,255,.05); border-radius: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(231,192,104,.32); border-radius: 6px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(231,192,104,.55); }
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 10px 22px; }
.brand .logo {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: var(--grad-gold); display: grid; place-items: center;
  font-weight: 900; color: #1a1305; font-size: 20px;
  box-shadow: 0 8px 24px rgba(231,192,104,.35);
}
.brand .name { font-size: 14px; font-weight: 800; letter-spacing: -.2px; }
.brand .name small { display: block; font-size: 10.5px; font-weight: 600; color: var(--text-dim); letter-spacing: .4px; }
.nav-label { font-size: 10.5px; font-weight: 700; color: var(--text-faint); letter-spacing: 1px; padding: 16px 12px 6px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  border-radius: 12px; color: var(--text-dim); font-size: 14px; font-weight: 600;
  transition: all .18s; cursor: pointer; border: 1px solid transparent;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active {
  background: var(--grad-surface); color: var(--text);
  border-color: var(--border-strong);
  box-shadow: inset 0 0 0 1px rgba(231,192,104,.12);
}
.nav-item.active .ic { color: var(--gold); }
.nav-item .ic { width: 20px; text-align: center; font-size: 16px; }
/* .sidebar .spacer -> 위 「사이드바 독립 스크롤」 블록으로 이관 (2026-09-02) */
.user-chip {
  display: flex; align-items: center; gap: 11px; padding: 11px;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--border);
}
.user-chip .av { width: 36px; height: 36px; border-radius: 50%; background: var(--grad-brand); display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; }
.user-chip .meta { overflow: hidden; }
.user-chip .meta b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .meta span { font-size: 11px; color: var(--text-dim); }

/* ---------- 메인 ---------- */
.main { padding: 30px 40px 60px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; gap: 16px; }
.page-title { font-size: 26px; font-weight: 800; letter-spacing: -.6px; }
.page-title small { display: block; font-size: 13.5px; font-weight: 500; color: var(--text-dim); margin-top: 3px; letter-spacing: 0; }

/* ---------- 버튼 ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 12px; font-size: 14px; font-weight: 700; transition: all .18s; border: 1px solid var(--border-strong); background: var(--surface); }
.btn:hover { background: var(--surface-2); transform: translateY(-1px); }
.btn-gold { background: var(--grad-gold); color: #1a1305; border: none; box-shadow: 0 10px 28px rgba(231,192,104,.3); }
.btn-gold:hover { box-shadow: 0 14px 36px rgba(231,192,104,.45); }
.btn-brand { background: var(--grad-brand); color: #fff; border: none; box-shadow: 0 10px 28px rgba(109,124,255,.35); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- 카드 ---------- */
.card { background: var(--grad-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; backdrop-filter: blur(8px); }
.card-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.card-hd h3 { font-size: 16px; font-weight: 800; }
.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* 스탯 카드 */
.stat { position: relative; overflow: hidden; }
.stat .label { font-size: 12.5px; color: var(--text-dim); font-weight: 600; }
.stat .value { font-size: 34px; font-weight: 800; letter-spacing: -1px; margin-top: 6px; }
.stat .value.gold { background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat .ic { position: absolute; right: 18px; top: 18px; font-size: 24px; opacity: .25; }
.stat .trend { font-size: 12px; margin-top: 8px; color: var(--green); font-weight: 600; }

/* ---------- 폼 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 7px; }
.input, .textarea, .select {
  width: 100%; padding: 12px 15px; background: rgba(0,0,0,.25);
  border: 1px solid var(--border); border-radius: 12px; color: var(--text);
  font-size: 14px; transition: all .18s;
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: rgba(231,192,104,.5); background: rgba(0,0,0,.35); box-shadow: 0 0 0 3px rgba(231,192,104,.1); }
.textarea { resize: vertical; min-height: 90px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--border-strong); }
.chip.on { background: var(--grad-gold); color: #1a1305; border: none; }

/* 배지 */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 8px; font-size: 11.5px; font-weight: 700; }
.badge.draft { background: rgba(154,163,196,.18); color: var(--text-dim); }
.badge.review { background: rgba(231,192,104,.18); color: var(--gold-2); }
.badge.published { background: rgba(88,214,160,.18); color: var(--green); }
.badge.scheduled { background: rgba(109,124,255,.18); color: var(--indigo-2); }

/* ---------- 우측 OneChat 아바타 (항상 표시, 요구사항 #15) ---------- */
.chat {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(12,18,40,.94), rgba(9,13,30,.97));
  border-left: 1px solid var(--border); backdrop-filter: blur(16px);
}
.chat-hd { padding: 20px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 13px; }
.chat-hd .avatar {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; position: relative;
  background: var(--grad-brand); display: grid; place-items: center; font-size: 22px;
  box-shadow: 0 8px 24px rgba(109,124,255,.4);
}
.chat-hd .avatar::after { content: ''; position: absolute; bottom: 1px; right: 1px; width: 11px; height: 11px; border-radius: 50%; background: var(--green); border: 2px solid #0c1228; }
.chat-hd .who { flex: 1; }
.chat-hd .who b { font-size: 14.5px; font-weight: 800; display: block; }
.chat-hd .who span { font-size: 11.5px; color: var(--text-dim); }
.chat-hide { flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); font-size: 15px; display: grid; place-items: center; cursor: pointer; transition: all .15s; }
.chat-hide:hover { color: var(--text); border-color: var(--gold); }
/* 챗봇 다시 보기: 기본 숨김, .app.no-chat 일 때만 우하단에 표시 */
.chat-reopen { display: none; position: fixed; bottom: 24px; right: 24px; z-index: 80; padding: 12px 18px; border-radius: 26px; background: var(--grad-gold); color: #1a1305; font-weight: 800; font-size: 13.5px; border: 0; cursor: pointer; box-shadow: 0 12px 30px rgba(231,192,104,.45); }
.app.no-chat ~ .chat-reopen { display: block; }
.chat-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 88%; padding: 12px 15px; border-radius: 16px; font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.msg.ai { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.msg.me { align-self: flex-end; background: var(--grad-brand); color: #fff; border-bottom-right-radius: 5px; }
.msg.ai img { max-width: 100%; border-radius: 10px; margin-top: 8px; }
.msg .meta-line { font-size: 11px; color: var(--text-faint); margin-top: 6px; }
.typing { align-self: flex-start; display: flex; gap: 5px; padding: 14px 16px; background: var(--surface-2); border-radius: 16px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--indigo-2); animation: blink 1.3s infinite; }
.typing span:nth-child(2){animation-delay:.2s} .typing span:nth-child(3){animation-delay:.4s}
@keyframes blink { 0%,60%,100%{opacity:.25} 30%{opacity:1} }
.chat-suggest { padding: 0 18px 12px; display: flex; flex-wrap: wrap; gap: 7px; }
.chat-suggest button { padding: 7px 12px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); font-size: 12px; color: var(--text-dim); transition: all .15s; }
.chat-suggest button:hover { color: var(--text); border-color: var(--gold); }
.chat-input { padding: 16px 18px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: flex-end; }
.chat-input textarea { flex: 1; resize: none; max-height: 120px; padding: 12px 14px; border-radius: 14px; background: rgba(0,0,0,.3); border: 1px solid var(--border); color: var(--text); font-size: 13.5px; }
.chat-input textarea:focus { outline: none; border-color: rgba(109,124,255,.5); }
.chat-input .send { width: 44px; height: 44px; border-radius: 13px; background: var(--grad-gold); color: #1a1305; display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }

/* ---------- 랜딩 (게스트) ---------- */
.landing { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.lnav { display: flex; align-items: center; justify-content: space-between; padding: 24px 0; }
.hero { text-align: center; padding: 70px 0 50px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 30px; background: var(--surface); border: 1px solid var(--border-strong); font-size: 13px; font-weight: 600; color: var(--gold-2); margin-bottom: 26px; }
.hero h1 { font-size: 60px; font-weight: 900; line-height: 1.08; letter-spacing: -2px; }
.hero h1 .g { background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 18.5px; color: var(--text-dim); max-width: 620px; margin: 24px auto 38px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; }
.hero .btn { padding: 15px 30px; font-size: 15.5px; }
.feature-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; margin: 70px 0; }
.feat { padding: 26px; text-align: left; }
.feat .ic { width: 50px; height: 50px; border-radius: 14px; background: var(--grad-surface); border: 1px solid var(--border); display: grid; place-items: center; font-size: 24px; margin-bottom: 16px; }
.feat h4 { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.feat p { font-size: 13.5px; color: var(--text-dim); }
.section-title { text-align: center; margin: 60px 0 36px; }
.section-title h2 { font-size: 38px; font-weight: 900; letter-spacing: -1px; }
.section-title p { color: var(--text-dim); margin-top: 10px; font-size: 16px; }

/* 요금제 */
.price-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.price { padding: 30px 26px; position: relative; display: flex; flex-direction: column; }
.price.pop { border-color: rgba(231,192,104,.4); box-shadow: 0 0 0 1px rgba(231,192,104,.2), var(--shadow); }
.price .tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--grad-gold); color: #1a1305; padding: 4px 16px; border-radius: 20px; font-size: 12px; font-weight: 800; }
.price h4 { font-size: 17px; font-weight: 800; }
.price .amt { font-size: 38px; font-weight: 900; margin: 14px 0 4px; letter-spacing: -1.5px; }
.price .amt small { font-size: 15px; font-weight: 600; color: var(--text-dim); }
.price ul { list-style: none; margin: 20px 0 24px; flex: 1; }
.price ul li { font-size: 13.5px; color: var(--text-dim); padding: 8px 0; display: flex; gap: 9px; }
.price ul li::before { content: '✓'; color: var(--green); font-weight: 800; }

/* ---------- 모달 / 토스트 / 로그인 ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(4,7,18,.75); backdrop-filter: blur(8px); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 40px 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal { width: 100%; max-width: 430px; margin: auto; animation: pop .25s ease; }
@keyframes pop { from { opacity: 0; transform: scale(.95) translateY(10px); } }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 22px; background: rgba(0,0,0,.25); padding: 5px; border-radius: 12px; }
.auth-tabs button { flex: 1; padding: 10px; border-radius: 9px; font-size: 14px; font-weight: 700; color: var(--text-dim); transition: all .15s; }
.auth-tabs button.on { background: var(--grad-surface); color: var(--text); border: 1px solid var(--border); }
.toast-wrap { position: fixed; top: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { padding: 14px 20px; border-radius: 13px; background: rgba(12,18,40,.96); border: 1px solid var(--border-strong); box-shadow: var(--shadow); font-size: 14px; font-weight: 600; animation: slidein .3s ease; max-width: 360px; backdrop-filter: blur(10px); }
.toast.ok { border-left: 3px solid var(--green); }
.toast.err { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--indigo); }
@keyframes slidein { from { opacity: 0; transform: translateX(40px); } }

/* 콘텐츠 결과 */
/* 생성 결과: 이미지(위) → 텍스트(아래) 세로 스택. 이미지는 중앙 정렬 + 최대폭 제한. */
.result-card { display: flex; flex-direction: column; gap: 20px; }
.result-card .card-img { width: 100%; max-width: 420px; margin: 0 auto; border-radius: 14px; aspect-ratio: 1; object-fit: cover; background: var(--surface); display: block; }
.result-card .card-text { width: 100%; }
.hashtags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.hashtags span { font-size: 13px; color: var(--indigo-2); font-weight: 600; }
.score-ring { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.score-ring b { font-size: 22px; background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.empty { text-align: center; padding: 60px 20px; color: var(--text-dim); }
.empty .ic { font-size: 48px; opacity: .3; margin-bottom: 14px; }
.loader { width: 22px; height: 22px; border: 2.5px solid rgba(255,255,255,.2); border-top-color: var(--gold); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pipeline { display: flex; flex-direction: column; gap: 8px; }
.pl-step { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 11px; background: var(--surface); font-size: 13.5px; }
.pl-step .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-faint); }
.pl-step.done .dot { background: var(--green); }
.pl-step.active .dot { background: var(--gold); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .4; } }

/* 반응형 */
@media (max-width: 1200px) { .app { grid-template-columns: 240px 1fr; } .chat { display: none; } .chat.mobile-open { display: flex; position: fixed; right: 0; top: 0; width: 372px; z-index: 90; } .grid-4 { grid-template-columns: repeat(2,1fr); } .feature-grid, .price-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 760px) { .app, .app.no-chat { grid-template-columns: 1fr; } .sidebar { display: none; } .main { padding: 20px; } .hero h1 { font-size: 38px; } .feature-grid, .price-grid, .grid-4, .grid-3, .grid-2, .result-card { grid-template-columns: 1fr; } }

/* FAB (모바일 챗 토글) */
.fab { position: fixed; bottom: 24px; right: 24px; width: 58px; height: 58px; border-radius: 50%; background: var(--grad-gold); color: #1a1305; display: none; place-items: center; font-size: 24px; box-shadow: 0 12px 30px rgba(231,192,104,.45); z-index: 80; }
@media (max-width: 1200px) { .fab { display: grid; } .chat-reopen, .app.no-chat ~ .chat-reopen { display: none; } .chat-hide { display: none; } }

/* ================= 시리즈 자동발행 (Series Auto-Publishing) ================= */
/* --- 생성 모달: 2단 레이아웃 --- */
.series-modal { max-width: 1080px; width: 96vw; }
.series-modal.wide3 { max-width: 1360px; }

/* ===== 미리보기를 새 탭에서 열었을 때: 팝업이 아니라 «페이지» 로 =====
   같은 마크업을 그대로 쓰되 껍데기만 벗긴다.
   · position:fixed 와 흐린 배경을 걷어 내 문서 흐름에 놓는다
   · max-width 를 풀어 화면 폭을 그대로 쓴다(3칼럼이 1fr 이라 바로 넓어진다)
   · 열릴 때 튀어오르는 애니메이션도 끈다 — 페이지에서는 어색하다 */
.modal-bg.as-page {
  position: static; inset: auto; background: none; backdrop-filter: none;
  z-index: auto; display: block; padding: 0; overflow: visible;
}
.modal-bg.as-page > .modal.series-modal {
  max-width: none; width: 100%; margin: 0; animation: none;
}
.modal-bg.as-page .rv-left { max-height: calc(100vh - 230px); }
.modal-bg.as-page .rv-cust-frame { min-height: calc(100vh - 320px); }
.series-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; align-items: start; }
.series-left { display: flex; flex-direction: column; gap: 16px; max-height: 74vh; overflow-y: auto; padding-right: 6px; }
.series-right { position: sticky; top: 0; display: flex; flex-direction: column; gap: 14px; }
.s-step { background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.s-step > label, .s-step > .field > label { font-size: 13px; font-weight: 700; color: var(--gold-2); }
.s-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; color: #1a1305; background: var(--grad-gold); border-radius: 20px; padding: 3px 10px; margin-bottom: 10px; }

/* --- 목차 선택 --- */
.s-toc { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; margin-top: 10px; padding: 4px; }
.s-toc-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: all .12s; }
.s-toc-item:hover { border-color: var(--border-strong); }
.s-toc-item.on { border-color: var(--gold); background: rgba(231,192,104,.08); }
.s-toc-item input[type=checkbox] { accent-color: var(--gold); width: 16px; height: 16px; }
.s-toc-title { flex: 1; font-size: 13px; background: transparent; border: none; color: var(--text); outline: none; }
.s-toc-title:focus { border-bottom: 1px dashed var(--gold); }

/* --- 채널 선택 --- */
.s-ch-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 600; }
.s-ch-item.off { opacity: .4; cursor: not-allowed; }
.s-ch-item input { accent-color: var(--gold); }

/* --- 오른쪽: 라이브 색카드 미리보기 --- */
.s-live { display: flex; flex-direction: column; gap: 10px; }
.s-live-card { position: relative; border-radius: 16px; padding: 26px 20px; min-height: 150px; display: flex; flex-direction: column; justify-content: center; gap: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.4); overflow: hidden; }
.s-live-badge { position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 20px; background: rgba(0,0,0,.35); color: #fff; }
.s-live-emoji { font-size: 44px; line-height: 1; }
.s-live-title { font-size: 22px; font-weight: 900; line-height: 1.3; letter-spacing: -.4px; }

/* --- 오른쪽: 설정 요약 / 일정 카드 --- */
.s-card2 { background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; font-size: 13px; }
.s-card2 h4 { margin: 0 0 10px; font-size: 13px; color: var(--gold-2); }
.s-card2 .row { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; color: var(--text-dim); }
.s-card2 .row b { color: var(--text); font-weight: 700; }

/* --- 오른쪽: 캘린더 --- */
.s-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.s-cal-h { text-align: center; font-size: 11px; color: var(--text-faint); font-weight: 700; padding: 2px 0; }
.s-cal-cell { position: relative; aspect-ratio: 1; border-radius: 8px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--text-dim); }
.s-cal-cell.has { border-color: var(--gold); background: rgba(231,192,104,.1); color: var(--text); font-weight: 700; }
.s-cal-dot { position: absolute; bottom: 3px; right: 4px; font-size: 9px; color: var(--gold); font-weight: 800; }

/* --- 오른쪽: 예정 회차 목록 --- */
.s-ep-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--border); }
.s-ep-row:last-child { border-bottom: none; }
.s-ep-seq { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px; background: var(--grad-gold); color: #1a1305; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.s-ep-t { flex: 1; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-ep-d { font-size: 11px; color: var(--text-faint); }

/* ================= 검토함 (Review Inbox) ================= */
.rv-grid { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; min-height: 420px; }
.rv-grid.cols3 { grid-template-columns: 260px minmax(0,1fr) minmax(0,1fr); }
.rv-left { display: flex; flex-direction: column; gap: 6px; max-height: 72vh; overflow-y: auto; }
.rv-right { min-height: 420px; }
.rv-cust { min-height: 420px; display: flex; flex-direction: column; }
.rv-cust-hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.rv-cust-hd b { font-size: 13px; }
.rv-cust-frame { width: 100%; flex: 1; min-height: 60vh; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.rv-cust-empty { color: var(--text-faint); font-size: 13px; padding: 24px; border: 1px dashed var(--border); border-radius: 12px; text-align: center; }
.rv-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: all .12s; }
.rv-item:hover { border-color: var(--border-strong); }
.rv-item.on { border-color: var(--gold); background: rgba(231,192,104,.08); }
.rv-seq { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 7px; background: var(--bg-2); color: var(--gold-2); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.rv-t { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 검토 상세 */
.rv-preview { display: flex; flex-direction: column; gap: 14px; }
.rv-thumb { border-radius: 14px; padding: 22px 18px; min-height: 120px; display: flex; flex-direction: column; justify-content: center; gap: 8px; box-shadow: 0 12px 30px rgba(0,0,0,.4); }
.rv-thumb-t { font-size: 20px; font-weight: 900; line-height: 1.3; }
.rv-body { font-size: 14px; line-height: 1.75; color: var(--text); white-space: pre-wrap; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px; max-height: 300px; overflow-y: auto; }
.rv-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rv-tags .badge { background: var(--bg-2); }
.rv-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* AI 보완 수정 패널 */
.rv-fix { background: var(--bg-2); border: 1px solid var(--gold); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.rv-fix h4 { margin: 0; font-size: 13px; color: var(--gold-2); }
.rv-diff { display: flex; flex-direction: column; gap: 10px; }
.rv-diffcard { border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: var(--surface); }
.rv-diffgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rv-col { border-radius: 10px; padding: 12px; font-size: 13px; line-height: 1.7; max-height: 260px; overflow-y: auto; }
.rv-col.before { background: rgba(255,255,255,.03); border: 1px solid var(--border); color: var(--text-dim); }
.rv-col.after { background: rgba(231,192,104,.07); border: 1px solid var(--gold); color: var(--text); }
.rv-col-h { font-size: 11px; font-weight: 800; margin-bottom: 8px; letter-spacing: .3px; }
.rv-col.before .rv-col-h { color: var(--text-faint); }
.rv-col.after .rv-col-h { color: var(--gold-2); }

/* 오른쪽 2칸(편집/고객화면) 탭 전환 바 — 좁은 화면에서만 노출 */
.rv-tabs { display: none; gap: 8px; margin-bottom: 12px; }
.rv-tabs button { flex: 1; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); font-size: 13px; font-weight: 700; cursor: pointer; }
.rv-tabs button.on { border-color: var(--gold); background: rgba(231,192,104,.1); color: var(--gold-2); }

/* ===== 데스크탑(≥1101px): 3단 그대로 (기본값 .rv-grid.cols3) ===== */

/* ===== 태블릿·좁은 노트북(761~1100px): 2단(목차 + 오른쪽 탭전환) ===== */
@media (max-width: 1100px) {
  .rv-grid.cols3 { grid-template-columns: 240px minmax(0,1fr); }
  /* 편집/고객화면을 같은 셀에 겹쳐두고 탭으로 전환 */
  .rv-grid.cols3 .rv-right,
  .rv-grid.cols3 .rv-cust { grid-column: 2; grid-row: 1; }
  .rv-grid.cols3 .rv-tabs { display: flex; grid-column: 2; grid-row: 1; align-self: start; }
  .rv-grid.cols3.tab-edit .rv-cust { display: none; }
  .rv-grid.cols3.tab-cust .rv-right { display: none; }
  /* 탭바가 위에 오도록 각 패널에 상단 여백 */
  .rv-grid.cols3 .rv-right,
  .rv-grid.cols3 .rv-cust { margin-top: 52px; }
  .rv-cust-frame { min-height: 66vh; }
}

/* ===== 모바일(≤760px): 1단 세로 쌓기 ===== */
@media (max-width: 760px) {
  .series-grid { grid-template-columns: 1fr; }
  .series-right { position: static; }
  .rv-grid { grid-template-columns: 1fr; }
  .rv-grid.cols3 { grid-template-columns: 1fr; }
  .rv-grid.cols3 .rv-right,
  .rv-grid.cols3 .rv-cust { grid-column: 1; grid-row: auto; margin-top: 0; }
  .rv-grid.cols3 .rv-tabs { display: flex; grid-column: 1; grid-row: auto; position: static; }
  .rv-left { max-height: 240px; }
  .rv-cust-frame { min-height: 70vh; }
  .rv-diffgrid { grid-template-columns: 1fr; }
  .series-modal.wide3 { width: 98vw; }
}

/* --- ① 분야→세부주제 추천 카드 --- */
.s-topic-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.s-topic-card { text-align: left; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: all .12s; display: flex; flex-direction: column; gap: 4px; }
.s-topic-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.s-topic-card.on { border-color: var(--gold); background: rgba(231,192,104,.1); }
.s-topic-name { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.35; }
.s-topic-angle { font-size: 11px; font-weight: 700; color: var(--gold-2); }
.s-topic-why { font-size: 11px; color: var(--text-dim); line-height: 1.4; }
@media (max-width: 560px) { .s-topic-cards { grid-template-columns: 1fr; } }
