:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --line: #e4e7ec;
  --text: #1d2433;
  --muted: #6b7280;
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --ok: #16a34a;
  --warn: #d97706;
  --err: #dc2626;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  height: 58px; display: flex; align-items: center; gap: 20px;
}
.brandmark { font-weight: 800; font-size: 18px; color: var(--text); letter-spacing: -.3px; }
.topbar nav { display: flex; gap: 18px; flex: 1; }
.topbar nav a { color: var(--muted); font-weight: 600; font-size: 14px; }
.topbar .spacer { flex: 1; }
.topbar .user { color: var(--muted); font-size: 13px; }
.nav-badge { display:inline-block; background:#ef4444; color:#fff; font-size:10px; font-weight:800; line-height:1; border-radius:999px; padding:3px 6px; vertical-align:middle; }
.worker-banner { font-size:13.5px; padding:9px 24px; text-align:center; border-bottom:1px solid; }
.worker-banner.offline { background:#fef6e0; color:#8a5a00; border-color:#f3dca0; }
.worker-banner.online { background:#e9f7ef; color:#136b3a; border-color:#b7e4c7; }

.container { max-width: 1180px; margin: 0 auto; padding: 28px 24px 80px; }

.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; margin: 0; letter-spacing: -.5px; }
.page-head .sub { color: var(--muted); font-size: 14px; }
.page-head .spacer { flex: 1; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  background: var(--brand); color: #fff; border: 1px solid transparent;
  padding: 9px 16px; border-radius: 9px; font-weight: 700; font-size: 14px;
  cursor: pointer; transition: background .15s;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn.secondary { background: #fff; color: var(--text); border-color: var(--line); }
.btn.secondary:hover { background: #f3f4f6; }
.btn.danger { background: var(--err); }
.btn.small { padding: 6px 11px; font-size: 13px; border-radius: 7px; }
.btn.ghost { background: transparent; color: var(--muted); border-color: var(--line); }

.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px;
}
.panel + .panel { margin-top: 18px; }
.panel h2 { font-size: 17px; margin: 0 0 14px; }

label { display: block; font-weight: 600; font-size: 13px; margin: 14px 0 6px; }
input[type=text], input[type=password], input[type=email], input[type=number],
textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff; color: var(--text);
}
textarea { resize: vertical; min-height: 90px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }
.hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }

.flash { padding: 11px 14px; border-radius: 9px; margin-bottom: 14px; font-size: 14px; }
.flash.success { background: #ecfdf3; color: #066f3e; border: 1px solid #aee9c5; }
.flash.error { background: #fef3f2; color: #b42318; border: 1px solid #fbccc6; }

/* 인증 화면 */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card .brandmark { font-size: 26px; text-align: center; display: block; margin-bottom: 6px; }
.auth-card .tagline { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 22px; }

/* 브랜드 카드 그리드 */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.brand-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; transition: transform .12s, box-shadow .12s; display: block;
}
.brand-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(16,24,40,.1); }
.brand-card.dragging { opacity: .45; }
.brand-card-top { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.brand-card-body { display: block; color: inherit; }
.brand-card-body:hover { text-decoration: none; }
.brand-card h3 { margin: 0 0 8px; font-size: 17px; color: var(--text); }
.brand-card .desc { color: var(--muted); font-size: 13px; min-height: 36px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: #eef2ff; color: var(--brand-dark); }
.chip.gray { background: #f1f3f5; color: var(--muted); }

.empty { text-align: center; color: var(--muted); padding: 50px 20px; }

/* 균일한 카드(소스파일 수집 선정자 폴더 등) — 모두 동일 크기 */
/* 그리드 안의 .panel 카드는 .panel + .panel 의 상단 여백(18px)을 제거해 세로 정렬을 맞춘다 */
.card-grid .panel { margin-top: 0; }
.member-card { display: flex; flex-direction: column; min-height: 150px; }
.member-card .member-name {
  margin: 0 0 8px; font-size: 16px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.member-card .member-card-foot { margin-top: auto; }

/* 5단계 파이프라인 (좌→우 가로 스크롤) */
.pipeline { display: flex; gap: 0; overflow-x: auto; padding: 6px 2px 18px; align-items: stretch; }
.pipe-step {
  flex: 0 0 230px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column;
}
.pipe-step:hover { border-color: var(--brand); }
.pipe-no { width: 26px; height: 26px; border-radius: 999px; background: var(--brand); color: #fff;
  font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.pipe-step h4 { margin: 10px 0 6px; font-size: 15px; }
.pipe-step .pdesc { color: var(--muted); font-size: 12.5px; flex: 1; }
.pipe-step .pcount { font-size: 12px; color: var(--brand-dark); font-weight: 700; margin-top: 10px; }
.pipe-arrow { flex: 0 0 30px; display: flex; align-items: center; justify-content: center; color: var(--line); font-size: 22px; }

/* 테이블 */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
tr.skipped td { color: var(--muted); background: #fafafa; }

.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.badge.pending { background: #f1f3f5; color: var(--muted); }
.badge.running { background: #fff7ed; color: var(--warn); }
.badge.done { background: #ecfdf3; color: var(--ok); }
.badge.failed { background: #fef3f2; color: var(--err); }

.score { font-weight: 800; font-size: 16px; }
.score.high { color: var(--ok); }
.score.mid { color: var(--warn); }
.score.low { color: var(--err); }

.q-card { border: 1px solid var(--line); border-radius: 9px; padding: 13px 15px; margin-bottom: 10px; }
.q-card .q-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.q-card .q-type { font-size: 11px; font-weight: 700; color: var(--brand-dark); background: #eef2ff; padding: 2px 7px; border-radius: 6px; }
.q-card .opts { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.add-question { margin-top: 14px; padding: 16px; border: 1px dashed var(--line); border-radius: 10px; background: #fafbfc; }
.add-question-head { font-weight: 800; font-size: 13px; color: var(--brand-dark); margin-bottom: 8px; }
.add-question label { margin-top: 0; }

/* ===== 설문 빌더 재설계 ===== */
.url-bar { background: #eef2ff; border: 1px solid #d9e0ff; border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; }
.url-bar-label { font-size: 13px; color: var(--brand-dark); font-weight: 600; margin-bottom: 10px; }
.url-bar-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.url-bar-row input[type=text] { flex: 1; min-width: 260px; background: #fff; }

.section-card { margin-bottom: 18px; }
.section-h { font-size: 17px; font-weight: 800; color: var(--brand-dark); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }

/* 응답 기간 */
.schedule-grid { display: flex; align-items: stretch; gap: 14px; }
.schedule-grid .sched-col { flex: 1; background: #fafbfc; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.sched-col-label { font-weight: 700; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.sched-sep { display: flex; align-items: center; color: var(--line); font-size: 22px; }
.sched-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sched-quick button { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.sched-quick button:hover { border-color: var(--brand); color: var(--brand); }
@media (max-width: 680px) { .schedule-grid { flex-direction: column; } .sched-sep { transform: rotate(90deg); justify-content: center; } }

/* 토글 스위치 */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; cursor: pointer; background: #c7ccd6; border-radius: 999px; transition: .2s; }
.switch .slider::before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* 문항 편집 블록 */
.q-edit { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; background: #fcfcfd; }
.q-edit-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.q-num { font-weight: 800; color: var(--brand-dark); font-size: 14px; flex: 0 0 auto; }
.q-edit-top .q-type { flex: 1; }
.req-toggle { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; margin: 0; white-space: nowrap; }
.req-toggle input { width: auto; }
.q-del { background: none; border: none; color: var(--err); font-weight: 700; font-size: 13px; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.q-del:hover { background: #fef3f2; }
.q-edit .q-label-in { font-weight: 600; }
.q-edit .q-desc-in { margin-top: 8px; background: #fff; color: var(--muted); }
.q-edit .opts-editor { margin-top: 10px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.opt-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.opt-row .opt-in { flex: 1; }
.opt-del { background: none; border: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 8px; border-radius: 6px; }
.opt-del:hover { background: #fef3f2; color: var(--err); }
.add-q-btn { width: 100%; padding: 14px; border: 1px dashed var(--line); border-radius: 10px; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; }
.add-q-btn:hover { border-color: var(--brand); color: var(--brand); }

/* 하단 고정 저장 바 */
/* 파이프라인 단계 내비게이션 */
.pipe-nav {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.pipe-nav .pipe-nav-jump { flex: 1; max-width: 320px; margin: 0 auto; }
.pipe-nav .btn { white-space: nowrap; }

.sticky-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(255,255,255,.95); backdrop-filter: blur(6px);
  border-top: 1px solid var(--line); padding: 12px 24px;
  display: flex; justify-content: flex-end; gap: 10px;
}

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; white-space: pre-wrap;
  background: #f8f9fb; border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.inline-form { display: inline; }
.muted { color: var(--muted); }
.split { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }
.copy-btn { margin-left: 8px; }
.list-links { list-style: none; padding: 0; margin: 0; }
.list-links li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }

/* 기획안 섹션 카드 (보기 모드) */
.plan-card {
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--brand);
  border-radius: 10px; box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 12px;
}
.plan-card.dragging { opacity: .45; }
.plan-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.plan-card-head .sec-label { font-weight: 800; font-size: 13px; color: var(--brand-dark); }
.drag-handle { cursor: grab; color: #b6bcc6; font-size: 16px; user-select: none; }
.drag-handle:active { cursor: grabbing; }
.sec-copy { background: transparent; border: none; color: var(--brand); font-weight: 700; font-size: 13px; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.sec-copy:hover { background: #eef2ff; }
.plan-card-body { font-size: 14px; }
.plan-card-body p { margin: 6px 0; }
.plan-card-body ul, .plan-card-body ol { margin: 6px 0; padding-left: 18px; }
.cover-ko { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.cover-en { color: var(--muted); font-size: 14px; margin-top: 2px; }

/* 기획안 목록(접이식 카드) */
.list-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden;
}
.list-card[open] { border-color: var(--brand); }
.list-card-head {
  display: flex; align-items: center; gap: 10px; padding: 15px 18px;
  cursor: pointer; font-weight: 700; list-style: none; user-select: none;
}
.list-card-head::-webkit-details-marker { display: none; }
.list-card-title { font-size: 16px; }
.list-card-head .toggle-mark { font-size: 12px; font-weight: 600; color: var(--muted); }
.list-card-head .toggle-mark::after { content: "펼치기 ▾"; }
.list-card[open] .list-card-head .toggle-mark { color: var(--brand); }
.list-card[open] .list-card-head .toggle-mark::after { content: "접기 ▴"; }
.list-card-body { padding: 4px 18px 18px; border-top: 1px solid var(--line); }
.sec-block { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.sec-block:last-of-type { border-bottom: none; }
.sec-block .sec-label { font-weight: 800; font-size: 12px; color: var(--brand-dark); margin-bottom: 6px; }
.list-card-actions { display: flex; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }

/* 팝업(모달) */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .45);
  display: none; align-items: flex-start; justify-content: center;
  z-index: 100; padding: 48px 16px; overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--panel); border-radius: 14px; width: 100%; max-width: 620px;
  box-shadow: 0 24px 60px rgba(16, 24, 40, .28); animation: modal-in .15s ease-out;
}
@keyframes modal-in { from { transform: translateY(-12px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-close { margin-left: auto; background: none; border: none; font-size: 24px; line-height: 1; cursor: pointer; color: var(--muted); }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px 22px 24px; }

/* 본문 읽기 전용 뷰 */
.body-view { white-space: pre-wrap; word-break: break-word; font-size: 14.5px; line-height: 1.7; }

/* 모집게시물 본문 — 유형 선택 카드 */
.type-cards { display: flex; flex-wrap: wrap; gap: 12px; }
.type-card {
  flex: 1 1 200px; display: flex; align-items: flex-start; gap: 10px;
  margin: 0; padding: 14px; cursor: pointer; font-weight: 400;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.type-card:hover { border-color: var(--brand); }
.type-card input[type="radio"] { width: auto; margin: 2px 0 0; accent-color: var(--brand); }
.type-card:has(input:checked) {
  border-color: var(--brand); background: #f5f4ff;
  box-shadow: 0 0 0 1px var(--brand) inset;
}
.type-card-body { display: flex; flex-direction: column; gap: 3px; }
.type-card-body strong { font-size: 14px; color: var(--text); }
.type-card-body .muted { font-size: 12px; color: var(--muted); line-height: 1.45; }
.type-card.disabled { opacity: .5; cursor: not-allowed; }
.type-card.disabled:hover { border-color: var(--line); }

/* 모집게시물 본문 — 보기(카드) 모드 (스크린샷 스타일) */
.post-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 30px;
}
.post-card-head {
  display: flex; align-items: flex-start; gap: 14px;
  padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--line);
}
.post-card-title { font-size: 18px; font-weight: 700; color: var(--text); }
.post-card-meta { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.post-card-actions { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; }
.post-card-actions form { margin: 0; }
.post-card-actions .btn-delete { color: var(--err); border-color: var(--line); }
.post-card-actions .btn-delete:hover { background: #fef2f2; border-color: var(--err); }
.post-card-body {
  font-size: 15px; line-height: 1.85; color: var(--text);
  word-break: break-word; white-space: normal;
}

/* 모집게시물 기획 — 구조화 카드 뷰 (스크린샷 스타일) */
.variant-badge {
  display: inline-block; margin-left: 8px; padding: 2px 9px;
  font-size: 11.5px; font-weight: 600; color: var(--muted);
  background: #f1f2f5; border-radius: 999px; vertical-align: middle;
}
.doc-sec {
  position: relative; border-left: 3px solid var(--brand);
  background: #fbfbfe; border: 1px solid var(--line); border-left: 3px solid var(--brand);
  border-radius: 10px; padding: 16px 20px; margin-top: 16px;
}
.doc-sec-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.doc-sec-handle { color: #c4c7d0; font-size: 13px; cursor: grab; user-select: none; }
.doc-sec-num {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 700;
}
.doc-sec-title { font-weight: 700; font-size: 14px; color: var(--brand); }
.doc-copy {
  margin-left: auto; background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 12.5px; padding: 2px 6px; border-radius: 6px;
}
.doc-copy:hover { color: var(--brand); background: #eef0ff; }
.doc-sec-body { color: var(--text); line-height: 1.7; }

.cover-main { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.cover-en { color: var(--muted); font-size: 14px; margin-top: 2px; }
.cover-desc { margin: 12px 0 8px; font-weight: 600; }
.cover-tag { margin: 2px 0; font-style: italic; color: #555; }

.def-headline { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.def-lead { margin: 6px 0 10px; }
.def-bullets { margin: 0; padding-left: 20px; }
.def-bullets li { margin: 6px 0; }
.part-line { margin: 0 0 10px; }
.part-line:last-child { margin-bottom: 0; }
.benefit-block { margin-bottom: 12px; }
.benefit-block:last-child { margin-bottom: 0; }
.benefit-label { font-weight: 700; font-size: 13px; color: var(--brand); margin-bottom: 4px; }

.sched-row {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 12px 2px; border-bottom: 1px dotted #d2d5dd;
}
.doc-sec-body .sched-row:last-child { border-bottom: none; }
.sched-label { font-weight: 600; }
.sched-val { color: var(--muted); text-align: right; }

.act-row { padding: 7px 0; }
.act-title { font-weight: 600; }
.act-details { margin: 6px 0 2px; padding-left: 20px; color: var(--muted); }
.act-details li { margin: 3px 0; }

.apply-steps { margin: 0; padding-left: 20px; }
.apply-steps li { margin: 6px 0; }

/* 모집 설문 — 문항 표시 */
.survey-q { padding: 13px 0; border-bottom: 1px solid #eef0f3; }
.doc-sec-body .survey-q:last-child { border-bottom: none; }
.survey-q-text { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; overflow-wrap: break-word; word-break: break-word; }
.survey-q-desc { color: var(--muted); font-size: 13px; margin-top: 5px; line-height: 1.6; overflow-wrap: break-word; word-break: break-word; white-space: pre-wrap; }
.survey-q-text a, .survey-q-desc a, .survey-opts a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.survey-req { font-size: 11px; font-weight: 700; color: var(--err); background: #fdecec; padding: 1px 7px; border-radius: 999px; }
.survey-type { font-size: 11px; font-weight: 600; color: var(--muted); background: #f1f2f5; padding: 1px 8px; border-radius: 999px; }
.survey-opts { margin: 8px 0 2px; padding-left: 20px; color: var(--text); }
.survey-opts li { margin: 3px 0; }

/* 모집 설문 — 공개 링크/응답 공유 박스 */
.survey-share { background:#f7f8fb; border:1px solid var(--line); border-radius:10px; padding:14px 16px; margin-bottom:6px; }
.share-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:5px 0; }
.share-row + .share-row { border-top:1px dashed #e2e5ea; }
.share-label { font-weight:700; font-size:13px; white-space:nowrap; }
.share-row input#pub-url { flex:1; min-width:200px; font-size:13px; background:#fff; }
.share-row form { margin:0; }

/* 모집 설문 — 문항 편집 (레거시, 하위 호환) */
.q-edit { border:1px solid var(--line); border-radius:10px; padding:14px; margin-top:12px; background:#fcfcfe; }
.q-edit-top { display:flex; gap:8px; align-items:center; }
.q-edit-top .q-text { flex:1; }
.q-edit-top select { width:auto; }
.q-edit .q-desc { margin-top:8px; }
.q-edit .q-options { margin-top:8px; width:100%; }

/* 모집 설문 — 편집 화면(카드 구획 + 문항 카드 + 드래그) */
.survey-edit-sec { border:1px solid var(--line); border-radius:12px; padding:16px 18px; margin-bottom:14px; background:#fff; }
.survey-edit-sec .sec-title { font-weight:800; font-size:14.5px; color:var(--text); margin:0 0 4px; display:flex; align-items:center; gap:7px; }
.survey-edit-sec .sec-hint { color:var(--muted); font-size:12.5px; margin:0 0 12px; line-height:1.5; }
.survey-edit-sec > label:first-of-type { margin-top:0; }
.survey-edit-sec .inline-check { display:flex; align-items:center; gap:8px; font-weight:600; margin:0 0 4px; }
.survey-edit-sec .inline-check input { width:auto; }

.qc { border:1px solid var(--line); border-radius:10px; background:#fcfcfe; padding:12px 14px; margin-bottom:10px; }
.qc.dragging { opacity:.45; border-style:dashed; border-color:var(--brand); }
.qc-head { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.qc-handle { cursor:grab; color:#b3b8c2; font-size:15px; line-height:1; user-select:none; padding:2px 4px; }
.qc-handle:active { cursor:grabbing; color:var(--brand); }
.qc-num { font-weight:800; font-size:12px; color:#fff; background:var(--brand); border-radius:6px; padding:3px 9px; flex:none; }
.qc-type { width:auto !important; padding:7px 10px !important; font-size:13px !important; }
.qc-req { display:flex; align-items:center; gap:5px; font-weight:600; font-size:13px; white-space:nowrap; margin:0; }
.qc-req input { width:auto !important; }
.qc-spacer { flex:1; }
.qc-del { background:none; border:1px solid transparent; border-radius:7px; cursor:pointer; font-size:15px; line-height:1; padding:5px 8px; color:#b3b8c2; }
.qc-del:hover { background:#fdecec; color:#e03131; }
.qc-field { margin-top:9px; }
.qc-field > label { display:block; font-weight:600; font-size:12.5px; color:#5b616e; margin:0 0 4px; }
.qc-field .qc-opt { color:var(--muted); font-weight:500; }
.qc-field input, .qc-field textarea { width:100%; }
.qc-field textarea.qc-options { min-height:64px; }
/* 질문·설명은 자동 높이(줄바꿈) — JS가 scrollHeight로 높이 조절 */
.qc-text, .qc-desc { min-height:0 !important; resize:none; overflow:hidden; line-height:1.5; }

/* 객관식 선택 방식(단일/복수 + 최대 개수) */
.qc-choice-cfg { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:10px;
  padding-top:10px; border-top:1px dashed var(--line); }
.qc-cfg-label { font-weight:600; font-size:12.5px; color:#5b616e; margin:0; }
.qc-choice-cfg .qc-multi { width:auto !important; padding:7px 10px !important; font-size:13px !important; }
.qc-maxsel-wrap { display:inline-flex; align-items:center; gap:6px; }
.qc-maxsel { width:82px !important; padding:7px 10px !important; font-size:13px !important; }

.survey-save-bar { position:sticky; bottom:0; z-index:10; display:flex; gap:10px; align-items:center;
  padding:14px 2px 10px; margin-top:4px;
  background:linear-gradient(to top, var(--bg) 65%, rgba(245,246,248,0)); }

/* 모집 설문 — 응답 행 */
.resp-row { display:flex; gap:14px; padding:8px 0; border-bottom:1px solid #f0f1f4; }
.resp-row:last-child { border-bottom:none; }
.resp-q { flex:0 0 38%; font-weight:600; color:var(--text); }
.resp-a { flex:1; white-space:pre-wrap; color:#333; }

/* 신청자 분석 — 순위 표 */
.rank-table { width:100%; border-collapse:collapse; font-size:14px; }
.rank-table thead th { background:#f6f6f8; text-align:left; padding:11px 14px; font-size:12.5px; color:var(--muted); border-bottom:1px solid var(--line); }
.rank-table tbody td { padding:11px 14px; border-bottom:1px solid #f0f1f4; vertical-align:top; }
.rank-table tbody tr:last-child td { border-bottom:none; }
.rank-table .rank { font-weight:700; color:var(--muted); width:48px; }
.rank-table .score { font-weight:800; font-size:16px; color:var(--brand); }
.rank-table .reason { color:#444; max-width:340px; }
.rank-table tr.row-error td { color:var(--muted); background:#fcfafa; }
.badge-run { font-weight:600; color:var(--warn); background:#fff7e6; border:1px solid #f0d59a; padding:8px 14px; border-radius:9px; }

/* 신청자 분석 — 수정 표 */
.edit-table th, .edit-table td { padding:7px 8px; }
.edit-table input, .edit-table select { margin:0; padding:6px 8px; font-size:13px; width:100%; }
.edit-table .in-rank { width:60px; }
.edit-table .in-num { width:74px; }
.edit-table input[type="checkbox"] { width:auto; }

/* 기수 홈 — 운영 단계 가로 탭(선정 및 모집 / 데일리 운영 / 콘텐츠 운영 / 운영 마무리) */
.phase-tabs { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; margin: 4px 0 18px; }
.phase-tab {
  border: none; background: none; cursor: pointer; font-family: inherit;
  font-size: 15px; font-weight: 700; color: var(--muted);
  padding: 7px 15px; border-radius: 999px; letter-spacing: -.2px; transition: background .12s, color .12s;
}
.phase-tab:hover { color: var(--text); }
.phase-tab.active { background: #eceafe; color: var(--brand); }
.phase-tabs .dot { color: #c4c7d0; padding: 0 2px; }
.phase-body { border-left: 3px solid #e7e8f5; padding-left: 16px; margin-left: 11px; }
.phase-empty { color: var(--muted); font-size: 13px; line-height: 1.7; background: #fafbfe; }

/* 데일리 운영 — 선정자 카드 */
.daily-head { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.daily-head form { margin:0; }
.selectee-card {
  background:var(--panel); border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow); padding:18px 18px 16px;
}
.selectee-card h3 { margin:0; font-size:16px; }
.selectee-card .sc-ig { color:var(--muted); font-weight:600; font-size:13px; }
.selectee-card .sc-date { font-size:12.5px; margin-top:3px; }
.sc-label { display:block; font-size:12px; color:var(--muted); font-weight:600; margin:14px 0 5px; }
.sc-link { display:flex; gap:6px; align-items:center; }
.sc-link input { flex:1; min-width:0; font-size:12px; background:#fff; }
.sc-actions { display:flex; gap:8px; margin-top:14px; }
.sc-actions .btn { flex:1; justify-content:center; }
.file-list { margin:0; padding-left:20px; }
.file-list li { margin:5px 0; }

/* 선정자 활동 관리 — 일자별 업로드 그룹 */
.day-group { border-top:1px solid #eef0f3; padding:11px 0; }
.day-group:first-child { border-top:none; }
.day-group-head { font-weight:700; font-size:14px; }

/* 데일리 운영 — 선정자 명단 표 */
.selectee-table { width:100%; border-collapse:collapse; font-size:14px; margin-top:6px; }
.selectee-table th { text-align:left; padding:9px 10px; font-size:12px; color:var(--muted); border-bottom:1px solid var(--line); text-transform:none; letter-spacing:0; }
.selectee-table td { padding:10px; border-bottom:1px solid #f0f1f4; }
.selectee-table tr:last-child td { border-bottom:none; }

/* 데일리 제출 현황 — 매트릭스 표 */
.uploads-matrix { width:100%; border-collapse:collapse; font-size:14px; }
.uploads-matrix th, .uploads-matrix td { padding:10px 12px; border-bottom:1px solid #f0f1f4; text-align:center; white-space:nowrap; }
.uploads-matrix thead th { background:#f6f6f8; color:var(--muted); font-size:12px; border-bottom:1px solid var(--line); }
.uploads-matrix .sticky-col { position:sticky; left:0; background:#fff; text-align:left; z-index:1; }
.uploads-matrix thead .sticky-col { background:#f6f6f8; }
.uploads-matrix .cell-on { display:inline-block; font-weight:700; color:#066f3e; background:#ecfdf3; border:1px solid #aee9c5; border-radius:7px; padding:2px 9px; }
.uploads-matrix .cell-off { color:#cfd2da; }

/* 출석체크 */
.chip-x { display:inline-flex; align-items:center; gap:4px; background:#eef0ff; color:var(--brand-dark);
  font-size:13px; font-weight:600; padding:4px 6px 4px 10px; border-radius:999px; }
.chip-x form { margin:0; }
.chip-x button { border:none; background:none; cursor:pointer; color:var(--brand-dark); font-size:14px; line-height:1; padding:0 2px; }
.chip-x button:hover { color:var(--err); }
.addcol-form.open { display:flex !important; }

.att-table { width:100%; border-collapse:collapse; font-size:14px; }
.att-table th, .att-table td { padding:9px 12px; border-bottom:1px solid #f0f1f4; text-align:center; white-space:nowrap; }
.att-table thead th { background:#f6f6f8; color:var(--muted); font-size:12.5px; border-bottom:1px solid var(--line); }
.att-table .sticky-col { position:sticky; left:0; background:#fff; text-align:left; font-weight:600; z-index:1; }
.att-table thead .sticky-col { background:#f6f6f8; }
.att-cell { cursor:pointer; font-weight:800; user-select:none; }
.att-cell.on { color:#066f3e; background:#ecfdf3; }
.att-cell.off { color:#b42318; background:#fef3f2; }
.att-total { font-weight:700; color:var(--muted); }
.col-del, .att-table .col-del { border:none; background:none; cursor:pointer; color:#c4c7d0; font-size:12px; padding:0 2px; }
.col-del:hover { color:var(--err); }

.story-strip { display:flex; gap:10px; overflow-x:auto; padding:12px 0 4px; }
.story-thumb { flex:0 0 110px; }
.story-thumb img { width:110px; height:180px; object-fit:cover; border-radius:8px; border:1px solid var(--line); display:block; }
.story-thumb .noimg { width:110px; height:180px; border-radius:8px; border:1px dashed var(--line); display:flex; align-items:center; justify-content:center; color:var(--muted); font-size:11px; }
.story-thumb .story-ig { font-size:12px; text-align:center; margin-top:4px; font-weight:600; }

/* 출석체크 컴포넌트(두 패널) */
.att-component { display: flex; gap: 18px; margin-top: 8px; align-items: stretch; }
.att-component > .panel { flex: 1 1 0; min-width: 0; min-height: 620px; }
@media (max-width: 820px) { .att-component { flex-direction: column; } .att-component > .panel { min-height: 0; } }
/* 버튼 글자 줄바꿈 방지("추가" 등) */
.btn { white-space: nowrap; }
.add-member-form { flex-wrap: nowrap; }
.add-member-form button { flex-shrink: 0; }
.att-head { display: flex; align-items: center; gap: 8px; }
.cap-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cap-table th { text-align: left; padding: 8px 10px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); text-transform: none; letter-spacing: 0; }
.cap-table td { padding: 9px 10px; border-bottom: 1px solid #f0f1f4; }
.cap-detail { display: none; }
.cap-detail.show { display: table-row; }
.cap-table form { margin: 0; display: inline; }
.grp-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid #f0f1f4; }
.grp-row:last-child { border-bottom: none; }
.grp-row form { margin: 0; }
.fill-form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.fill-form form, .fill-form { margin: 0; }

/* 스토리 캡처 펼치기 — 인스타 스토리 카드 그리드 */
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.story-card { border: 2px solid #c7c9f0; border-radius: 12px; overflow: hidden; background: #fff; }
.story-card .sc-bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; }
.story-card .sc-check { width: 18px; height: 18px; border-radius: 5px; background: var(--brand); color: #fff;
  font-size: 12px; line-height: 18px; text-align: center; font-weight: 800; }
.story-card .sc-num { background: #2b2b3b; color: #fff; border-radius: 6px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
.story-card img { width: 100%; display: block; }
.story-card .sc-noimg { aspect-ratio: 9/16; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 12px; background: #fafbfe; }
.story-card .sc-cap { text-align: center; padding: 8px 6px; color: var(--brand); font-weight: 700;
  font-size: 13px; border-top: 1px solid var(--line); }
.story-card .sc-cap .sc-ig { color: var(--muted); font-weight: 600; font-size: 12px; }

/* 사진 팝업(라이트박스) */
.img-lightbox { display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(16,18,30,.82); align-items: center; justify-content: center; padding: 30px; }
.img-lightbox.open { display: flex; }
.img-lb-inner { display: flex; flex-direction: column; max-width: 96vw; max-height: 94vh; }
.img-lb-bar { display: flex; align-items: center; justify-content: space-between; color: #fff;
  font-size: 14px; font-weight: 600; padding: 0 2px 8px; }
.img-lb-close { background: none; border: none; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.img-lb-inner img { max-width: 96vw; max-height: 86vh; object-fit: contain; border-radius: 10px;
  background: #000; box-shadow: 0 10px 40px rgba(0,0,0,.5); }

/* 출석표 단일 카드 (스크린샷 스타일) */
.att-card-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.att-card-head h3 { font-size: 17px; }
.count-badge { display: inline-block; font-size: 12px; font-weight: 700; color: var(--muted); background: #eef0f3; border-radius: 999px; padding: 2px 9px; margin-left: 4px; vertical-align: middle; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.att-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.add-member-form { display: flex; gap: 6px; margin: 0; }
.add-member-form input { max-width: 280px; }
.att-table-wrap { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
.att-table-wrap .att-table th, .att-table-wrap .att-table td { border-bottom: 1px solid #eef0f3; }
/* 출석 칩을 스크린샷처럼 중립 회색 톤으로 */
.chip-x { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; }
.chip-x button { color: #9aa1ac; }
/* O/X 셀 — 초록/빨강 채움 */
.att-cell.on { color: #16a34a; background: #e9f9ef; font-weight: 800; }
.att-cell.off { color: #dc2626; background: #fdeced; font-weight: 800; }

/* 출석체크 — 데일리 운영 패널 내 인라인 그룹 카드 */
.att-grp-card { border: 1px solid var(--line); border-radius: 11px; padding: 14px 16px; background: #fff; }
.att-grp-body.hide { display: none; }

/* 운영보고서 렌더(마크다운 → HTML) 보기 */
.doc-render { line-height: 1.75; color: var(--text); font-size: 14.5px; }
.doc-render h1 { font-size: 22px; margin: 4px 0 14px; letter-spacing: -.4px; }
.doc-render h2 { font-size: 18px; margin: 24px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.doc-render h3 { font-size: 15.5px; margin: 18px 0 8px; }
.doc-render p { margin: 8px 0; }
.doc-render ul, .doc-render ol { margin: 8px 0; padding-left: 22px; }
.doc-render li { margin: 4px 0; }
.doc-render blockquote { margin: 12px 0; padding: 8px 14px; border-left: 3px solid var(--brand); background: #f7f8ff; color: #444; }
.doc-render hr { border: none; border-top: 1px solid var(--line); margin: 20px 0; }
.doc-render table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.doc-render th, .doc-render td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.doc-render th { background: #f6f6f8; }
.doc-render code { background: #f1f3f5; padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.doc-render pre { background: #f6f8fa; padding: 12px 14px; border-radius: 8px; overflow-x: auto; }
.doc-render img { max-width: 100%; border-radius: 8px; }

/* 설문 공개 진행중 표시 */
.live-badge { display: inline-block; font-size: 11.5px; font-weight: 700; vertical-align: middle;
  color: #066f3e; background: #e9f9ef; border: 1px solid #aee9c5; border-radius: 999px;
  padding: 2px 9px; margin-left: 6px; letter-spacing: -.2px; }
