/* ── 새 옷 (2026-10-22 사장님 「이거로 만들어줘 UI 맘에 든다」) ──────────
   시안(`시안/ds.css`)의 규칙을 실제 화면에 입힌다. **style.css 는 안 고친다**
   — 이 파일이 맨 뒤에 실려서 이긴다. 옛 모습으로 돌아가려면 index.html 의
   theme.css 한 줄만 빼면 된다.

   규칙 (화면 어디서나 같다)
     · 색은 이름 붙인 것만 — 파랑(할 일) · 초록(됨) · 주황(조심) · 빨강(빠짐) · 회색(안 함)
     · 모서리 셋 — 8(단추·칸) · 14(카드) · 999(딱지·칩)
     · 카드 안에 카드를 또 그리지 않는다 — 안쪽은 선 하나로 나눈다
     · 파란 꽉 찬 단추는 한 묶음에 하나
   어나더롱폼은 아직 옛 옷이다 — 롱폼도 바꿀 때 이 파일을 같이 쓴다. */

:root {
  --bg: #f4f6f9; --panel: #fff; --soft: #f8f9fb;
  --ink: #111827; --muted: #4b5563; --dim: #5b6472; --faint: #8b93a3;
  --line: #e5e7ec; --line2: #e5e7ec;
  --accent: #2f5bea; --accent-ink: #fff; --chip: #edf2ff;
  --ok: #15803d; --ok-bg: #e8f7ee;
  --warn: #b45309; --warn-bg: #fff4e5;
  --bad: #dc2626; --bad-bg: #fdecec;
  --track: #e8ebf1;
  --sh: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .04);
  --r-sm: 8px; --r: 14px;
}

body { font-size: 15px; background: var(--bg);
  font-family: "Pretendard Variable", "Pretendard", -apple-system, "Segoe UI",
    "Malgun Gothic", "맑은 고딕", sans-serif; }

/* ── 바깥 틀: 떠 있는 종이 → 화면 가득 ───────────────────── */
.app { margin: 0; max-width: none; min-height: 100vh; border-radius: 0;
  box-shadow: none; background: var(--bg); }
.content { padding: 24px 28px 56px; max-width: 1480px; }

/* ── 왼쪽 메뉴 ──────────────────────────────────────────── */
.sidebar { width: 236px; flex-basis: 236px; top: 0; max-height: 100vh;
  height: 100vh; border-radius: 0; padding: 20px 12px 16px;
  border-right: 1px solid var(--line); }
.sidebar h1 { display: flex; align-items: center; gap: 10px; padding: 2px 8px;
  margin: 0 0 14px; font-size: 17px; font-weight: 800; }
.sidebar h1 .logo-a { width: 30px; height: 30px; border-radius: 9px;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  font-size: 15px; flex: none; }
.navgroup { border-top: 0; margin: 8px 0 2px; padding: 10px 10px 4px;
  font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--faint); }
.navgroup:first-of-type { margin-top: 2px; }
.navgroup span { display: none; }
.nav { display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  margin: 1px 0; border-radius: var(--r-sm); font-size: 14px; font-weight: 500;
  color: #374151; line-height: 20px; }
.nav:hover { background: #f1f3f6; color: var(--ink); }
.nav.active { background: var(--accent); color: #fff; font-weight: 600; }
.nav.active::before { display: none; }
.nav svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav .work { right: 12px; }
.nav.active .work { background: #fff; }
.subnav { margin: 2px 0 6px 20px; padding-left: 10px; }
.subnav button { font-size: 13px; padding: 6px 10px; border-radius: var(--r-sm); }
.subnav button.on { background: var(--chip); color: var(--accent); }
.sidebar hr { margin: 12px 8px; border: 0; border-top: 1px solid var(--line); }
.sidebar .hint, .sidebar .side-label { padding: 0 10px; }
.sidebar .note { padding: 14px 10px 4px; }
.licchip { margin: 14px 2px 0; border-radius: var(--r-sm); }
.navbusy { margin: 0 2px 12px; border-radius: var(--r-sm); }

/* ── 페이지 머리 ─────────────────────────────────────────── */
header h2, .kindnow b { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
header h2 { margin: 0 0 4px; }
header h2 small { font-size: 13px; font-weight: 500; color: var(--faint); margin-left: 6px; }
header p { font-size: 13.5px; color: var(--muted); margin: 0 0 20px; line-height: 1.6; }
.kindnow { padding: 24px 28px 0; }
.kindnow small { font-size: 13.5px; }
.work { padding: 16px 28px 0; gap: 20px; grid-template-columns: minmax(0, 1fr) 340px; }
.work .side { top: 16px; }

/* ── 카드 하나의 꼴 ──────────────────────────────────────── */
.card, .step, details.more, .keyrow, .statcard {
  border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--sh); background: var(--panel); }
.card { padding: 18px 20px; }
.card h3, .stephead h3 { font-size: 16px; font-weight: 700; }
/* 단계 카드: 머리줄 아래 선 하나로 나눈다(시안 1). */
.step { padding: 0 20px 18px; margin-bottom: 16px; }
.step > .stephead { margin: 0 -20px 16px; padding: 14px 20px;
  border-bottom: 1px solid var(--line); min-height: 58px; }
.step.folded { padding-bottom: 0; }
.step.folded > .stephead { border-bottom: 0; margin-bottom: 0; }
.card > .stephead:first-child { margin: -18px -20px 14px; padding: 14px 20px;
  border-bottom: 1px solid var(--line); }
.prevcard > .stephead:first-child { margin: -14px -16px 14px; padding: 14px 16px; }
.stephead small { font-size: 12.5px; color: var(--faint); }
.num { width: 24px; height: 24px; font-size: 12px; background: var(--accent); }
/* 카드 안의 카드 → 옅은 바탕 칸으로 낮춘다 */
.step .card, .card .card, .card.sub { box-shadow: none; background: var(--soft);
  border-radius: 10px; }
details.more > summary { font-size: 14.5px; }
details.more.inner { box-shadow: none; background: var(--soft); border-radius: 10px; }

/* ── 단추 ───────────────────────────────────────────────── */
button.primary, a.primary { background: var(--accent); border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; }
button.primary:hover { filter: none; background: #2449c7; }
button.ghost, a.ghost { border-radius: var(--r-sm); font-size: 13.5px;
  font-weight: 500; color: #1f2937; }
button.ghost:hover, a.ghost:hover { background: #f5f7ff; }
button.big { font-size: 15px; }
button.grape { background: var(--accent); border-radius: var(--r-sm); }
button.grape:hover { background: #2449c7; }

/* ── 칸 ─────────────────────────────────────────────────── */
textarea, input[type=text], input[type=url], input[type=search], input[type=number],
input[type=password] { border-radius: var(--r-sm); }
textarea:focus, input:focus { outline: 0; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 91, 234, .15); }
select { border-radius: var(--r-sm); }
select:focus-visible { box-shadow: 0 0 0 3px rgba(47, 91, 234, .15); }

/* ── 거르는 줄(칩) ──────────────────────────────────────── */
.tabrow button { border-color: var(--line); font-size: 13.5px; font-weight: 500;
  color: #374151; }
.tabrow button.on, .tabrow button.active { background: #111827; color: #fff;
  border-color: #111827; font-weight: 600; }
.tabrow button:hover { border-color: #9aa3b2; }
.tabrow.sub2 { padding-left: 0; }
.tabrow.sub2 button { background: var(--panel); color: var(--muted); }
.tabrow.sub2 button.on, .tabrow.sub2 button.active { background: var(--chip);
  color: var(--accent); border-color: var(--chip); }
.chipbtn { border-radius: 999px; font-size: 12.5px; padding: 5px 12px;
  border-color: var(--line); }
.chipbtn.on { background: #111827; border-color: #111827; }
.madepick button.on { background: var(--chip); color: var(--accent); }

/* ── 딱지 ───────────────────────────────────────────────── */
.badge { border-radius: 999px; font-size: 12px; padding: 3px 10px;
  background: var(--chip); color: var(--accent); }
.chip { border-radius: 999px; font-size: 12.5px; }

/* ── 숫자 카드 ──────────────────────────────────────────── */
.statrow { gap: 16px; margin: 4px 0 20px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.statcard { padding: 16px 18px; gap: 4px; }
.statcard small { font-size: 13px; font-weight: 600; color: var(--muted);
  display: flex; align-items: center; gap: 8px; }
.statcard b { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.statcard i { font-size: 12px; color: var(--faint); }
.statcard .delta { font-style: normal; font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px; margin-left: 8px; vertical-align: 5px;
  letter-spacing: 0; }
.statcard .delta.up { color: var(--ok); background: var(--ok-bg); }
.statcard .delta.down { color: var(--bad); background: var(--bad-bg); }
.statcard .plat { display: inline-grid; place-items: center; height: 20px;
  padding: 0 6px; border-radius: 5px; font-size: 10.5px; font-weight: 800;
  color: #fff; }
.plat.yt { background: #e62117; } .plat.tt { background: #111; }
.plat.ig { background: linear-gradient(90deg, #f58529, #dd2a7b, #8134af); }

/* ── 표 ─────────────────────────────────────────────────── */
th { font-size: 12.5px; color: var(--faint); font-weight: 600; padding: 10px 8px; }
td { padding: 12px 8px; }
.uphead { font-size: 12.5px; color: var(--faint); padding: 2px 4px 10px; font-weight: 600; }
.uprow { padding: 10px 4px; border-bottom-color: var(--line); }
.uprow:hover { background: var(--soft); }

/* ── 아래 고정 막대: 떠 있는 띠 ──────────────────────────── */
.genbar { background: var(--soft); border-radius: 10px; }
.genbar.sticky { bottom: 16px; padding: 12px 18px; margin: 4px 0 16px;
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 8px 24px rgba(17, 24, 39, .08); }

/* ── 영상 카드 ──────────────────────────────────────────── */
.vcard { border-radius: var(--r); box-shadow: var(--sh); }
.vpic { border-radius: 10px; }
.vfrom { border-radius: 999px; font-weight: 700; padding: 2px 8px; }

/* ── 쿠파스전용 머리 ────────────────────────────────────── */
.headrow { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.headrow > header { flex: 1 1 560px; min-width: 0; }
.headrow > .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin-bottom: 20px; }
.ownertag { font-size: 12px; font-weight: 600; color: var(--faint);
  background: #eef0f4; padding: 3px 10px; border-radius: 999px; }
#cpGrid .vcard { padding: 0; overflow: hidden; gap: 0; }
#cpGrid .vcard .vpic { border-radius: 0; }
#cpGrid .vcard .vmeta { padding: 12px 14px 0; }
#cpGrid .vcard > :last-child { padding: 10px 14px 14px; }
.cpbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 20px; margin: -18px -20px 18px; border-bottom: 1px solid var(--line); }
.cpbar .tabrow { margin: 0; }
.cpbar .sp { flex: 1; }

/* ── 글자꼴 하나로 ──────────────────────────────────────── */
/* 옛 규칙이 글 칸을 고정폭(Consolas)으로 그렸다 — 링크·제목 칸이 코드처럼
   보였다. 로그(`.log`)만 고정폭으로 남긴다. */
input[type=text], input[type=url], input[type=search], input[type=number],
textarea { font-family: inherit; font-size: 14px; }
.field > input, .field > select { font-size: 14px; padding: 9px 12px; }
/* 채널 고르개를 따로 크게 그리던 것을 다른 칸과 맞춘다. */
#shChannel { font-size: 15px; font-weight: 600; padding: 10px 36px 10px 14px;
  max-width: 460px; }

/* ── 본문 폭 (사장님 2026-10-22 「와이드 모니터에서 너무 길다」) ───────
   넓은 화면에서 한 줄이 끝없이 늘어나면 눈이 왼쪽 끝과 오른쪽 끝을 오가느라
   지친다. 본문은 1360px 에서 멈추고 남는 자리는 양옆으로 나눈다.
   노트북(1440 이하)·보통 모니터(1920)에서는 거의 그대로다. */
main > .view { max-width: 1360px; margin-left: auto; margin-right: auto; }

/* ── 쇼츠 만들기 안쪽 (사장님 2026-10-22 「안에 부분도」) ───────────── */
/* 설명글은 한 단 작게 — 칸보다 설명이 먼저 눈에 들어오면 화면이 글밭이 된다. */
#shortsView .step .hint, #shortsView .step p.hint { font-size: 13px; line-height: 1.6; }
#shortsView .step .hint:empty { display: none; }
#shTargetNote { margin: -6px 0 12px; }
/* 대본 머리줄: [길이] [소재 전부 → 한 편] [소재마다 → 각 한 편] [AI 초안] —
   AI 초안이 이 단계의 주된 일이라 끝에 파랗게. */
#shPlan { order: 2; } #shPlanEach { order: 3; }
#shDraft { order: 9; background: var(--accent); color: #fff; border-color: var(--accent);
  font-weight: 600; }
#shDraft:hover { background: #2449c7; color: #fff; }
#shDraft:disabled { background: var(--accent); color: #fff; opacity: .5; }

/* 「고른 것에」 줄 — 작은 단추로 한 줄에. 왼쪽 막대 대신 옅은 칸. */
.pickacts { border-left: 0; padding: 8px 10px; background: var(--soft);
  border-radius: 10px; margin: 0 0 12px; gap: 6px; }
.pickacts.on { background: var(--chip); }
.pickacts > .glab { font-size: 13px; font-weight: 600; color: var(--dim); margin-right: 4px; }
#shortsView .pickacts > button, #shortsView .pickacts select {
  height: 30px; font-size: 12.5px; padding: 0 10px; }
#shortsView .pickacts select { padding-right: 28px; }

/* 그림 타일 — 고른 것은 파란 테 하나. 떠오르는 그림자는 뺀다(다 골라 보이게 됐다). */
.picks { padding: 4px 3px 6px; gap: 8px; }
.pick { width: 72px; border-radius: 10px; padding: 4px 4px 3px; }
.pick .tile { width: 62px; height: 110px; border-radius: 6px; }
.pick.on { border-color: var(--accent); background: var(--chip); transform: none;
  box-shadow: 0 0 0 1px var(--accent); }
.pick small { font-size: 11.5px; height: 28px; }

/* 「띠가 없어 제목을 못 넣는다」 같은 쪽지 — 글자만 주황이면 설명글에 묻힌다. */
#shTitleWhy:not(:empty) { display: block; width: 100%; background: var(--warn-bg);
  color: var(--warn); border-radius: var(--r-sm); padding: 8px 12px; font-size: 13px;
  font-weight: 600; margin: 4px 0 8px; }

/* 단계 안의 묶음(gsec) — 회색 상자를 겹치지 않고 선으로만 나눈다. */
#shortsView .step .gsec { background: transparent; border: 0; border-radius: 0;
  padding: 0; margin: 0; }
#shortsView .step .gsec + .gsec { border-top: 1px solid var(--line); padding-top: 14px;
  margin-top: 14px; }
#shortsView details.more.inner { background: transparent; border: 1px solid var(--line); }

/* 줄 안의 칸 이름 — 칸보다 옅게, 같은 크기로. */
#shortsView label.inline { font-size: 13.5px; color: var(--dim); }
#shortsView label.field { font-size: 13px; }
