:root {
  --text: #333333;
  --text-soft: #4a4f57;
  --muted: #8a8f99;
  --line: #f0e0e8;
  --bg: #ffffff;
  --bg-soft: #fdf7fa;
  --accent: #E8B4D0;            /* 팽팽 primary 연 핑크 */
  --accent-dark: #d488ab;       /* 호버/active용 살짝 진한 핑크 */
  --accent-strong: #FF69B4;     /* 강조용 핫 핑크 */
  --sidebar-bg: #faf5f7;
  --sidebar-w: 230px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Apple SD Gothic Neo","Noto Sans KR","맑은 고딕",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size: 16px; line-height: 1.7; letter-spacing: -0.01em; word-break: keep-all;
  min-height: 100vh;
}
.wrap { max-width: 680px; margin: 0 auto; padding: 0 1.25rem; }

/* ── 사이드바 layout ── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  z-index: 100;
  padding: 1.2rem 0;
  transition: transform .25s;
}
.sidebar-brand { padding: 0 1.2rem 1.2rem; border-bottom: 1px solid var(--line); }
.sidebar-brand a { color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.05rem; line-height: 1.3; display:block; }
.sidebar-brand small { color: var(--muted); font-size: .72rem; font-weight: 500; letter-spacing: .02em; }
.sidebar-nav { padding: .8rem 0; }
.nav-group { margin-bottom: 1rem; }
.nav-group-title {
  padding: .35rem 1.2rem .35rem;
  font-size: .72rem; font-weight: 700; color: var(--muted);
  text-transform: none; letter-spacing: .02em;
}
.sidebar-nav a {
  display: block; padding: .55rem 1.2rem;
  color: var(--text-soft); text-decoration: none;
  font-size: .92rem; transition: all .15s;
  border-left: 3px solid transparent;
}
.sidebar-nav a:hover { background: rgba(232,180,208,.18); color: var(--accent-dark); }
.sidebar-nav a.active {
  background: rgba(232,180,208,.28); color: var(--accent-dark);
  font-weight: 700; border-left-color: var(--accent-strong);
}

.sidebar-toggle {
  display: none; position: fixed; top: .8rem; left: .8rem; z-index: 200;
  background: var(--accent); color: #fff; border: none;
  width: 38px; height: 38px; border-radius: 6px; cursor: pointer;
  font-size: 1.1rem; box-shadow: 0 2px 6px rgba(0,0,0,.1);
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 2px 0 14px rgba(0,0,0,.1); }
  .sidebar-toggle { display: block; }
}

/* ── 메인 영역 ── */
.main-area {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.main-inner { flex: 1; padding: 2rem 2.2rem; max-width: 1200px; }
@media (max-width: 900px) {
  .main-area { margin-left: 0; }
  .main-inner { padding: 3.6rem 1.2rem 1.5rem; }
}
.main-area .wrap { max-width: 880px; margin: 0; padding: 0; }

main { padding: 0; }

.list-head h1 { font-size: 1.4rem; margin: 0 0 .5rem; }
.list-head .meta { color: var(--muted); font-size: .85rem; margin: 0 0 2rem; }
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.post-list li:first-child { border-top: 1px solid var(--line); }
.post-list a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 1.02rem; }
.post-list a:hover { color: var(--accent); }
.post-list .date { display: block; color: var(--muted); font-size: .85rem; margin-top: .25rem; }
.post-list .empty { color: var(--muted); padding: 2rem 0; text-align: center; }

.site-header nav a.active { color: var(--accent); font-weight: 700; }

.callout {
  background: var(--bg-soft); border-left: 3px solid var(--accent);
  padding: .9rem 1.1rem; border-radius: 4px; margin: 0 0 1.5rem;
  color: var(--text-soft); font-size: .95rem;
}
.callout code { background: #fff; padding: 1px 6px; border-radius: 3px; font-family: ui-monospace, monospace; font-size: .9rem; }

.job-form { display: flex; flex-direction: column; gap: 1.1rem; margin: 0 0 2.5rem; }
.job-form label { display: flex; flex-direction: column; gap: .35rem; font-size: .9rem; color: var(--text-soft); }
.job-form .lbl { font-weight: 600; color: var(--text); font-size: .95rem; }
.job-form .hint { color: var(--muted); font-size: .82rem; margin-bottom: .15rem; line-height: 1.5; }
.job-form .req { color: #c0392b; }
.job-form input, .job-form select, .job-form textarea {
  padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 6px;
  font-family: inherit; font-size: 1rem; color: var(--text); background: #fff;
}
.job-form textarea { resize: vertical; }
.job-form input:focus, .job-form select:focus, .job-form textarea:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
.job-form button {
  align-self: flex-start; padding: .7rem 1.5rem;
  background: var(--accent); color: #fff; border: none; border-radius: 6px;
  font-family: inherit; font-size: 1rem; font-weight: 600; cursor: pointer;
}
.job-form button:hover { background: #174d4a; }

.jobs h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
.job-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.job-table th, .job-table td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--line); }
.job-table th { color: var(--muted); font-weight: 600; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: .78rem; font-weight: 600;
}
.badge-queued  { background: #fff3cd; color: #8a6d3b; }
.badge-running { background: #d9edf7; color: #31708f; }
.badge-done    { background: #dff0d8; color: #3c763d; }
.badge-partial { background: #fcf8e3; color: #8a6d3b; }
.badge-failed  { background: #f2dede; color: #a94442; }

.suggest-panel {
  margin: 0 0 1.5rem;
  padding: 1.1rem 1.2rem;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px;
}
.suggest-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.suggest-head h2 { font-size: 1rem; margin: 0; }
.suggest-form { display: flex; gap: .4rem; }
.suggest-form input {
  padding: .4rem .6rem; border: 1px solid var(--line); border-radius: 5px;
  font-family: inherit; font-size: .9rem; background: #fff; color: var(--text);
}
.suggest-form button {
  padding: .4rem 1rem; background: var(--accent); color: #fff;
  border: none; border-radius: 5px; font-family: inherit; font-size: .9rem; cursor: pointer;
}
.suggest-list { display: grid; grid-template-columns: 1fr; gap: .55rem; }
.suggest-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: .8rem; padding: .7rem .9rem;
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  text-align: left; font-family: inherit; cursor: pointer; transition: border-color .12s;
}
.suggest-card:hover { border-color: var(--accent); }
.suggest-source {
  font-size: .73rem; padding: 2px 8px; border-radius: 999px;
  background: var(--bg-soft); color: var(--text-soft); font-weight: 600; white-space: nowrap;
}
.suggest-topic { color: var(--text); font-weight: 500; font-size: .95rem; }
.suggest-stage { font-size: .78rem; color: var(--muted); font-weight: 600; white-space: nowrap; }

article h1 {
  font-size: 1.55rem; line-height: 1.45; font-weight: 800; margin: 0 0 .75rem; letter-spacing: -0.02em;
}
article .meta { color: var(--muted); font-size: .85rem; margin: 0 0 2rem; }

.body { color: var(--text); }
.body h2 { font-size: 1.18rem; font-weight: 700; margin: 2.5rem 0 .75rem; letter-spacing: -0.02em; }
.body h3 { font-size: 1.02rem; font-weight: 700; margin: 1.5rem 0 .5rem; }
.body p { margin: 0 0 1.1rem; }
.body p strong { color: var(--text); }
.body ul, .body ol { padding-left: 1.4rem; margin: 0 0 1.2rem; }
.body li { margin-bottom: .4rem; }
.body figure { margin: 1.75rem 0; }
.body figure img { display: block; width: 100%; height: auto; border-radius: 8px; }
.body figcaption { margin-top: .5rem; color: var(--muted); font-size: .85rem; text-align: center; }
.body figure.placeholder { margin: 1.75rem 0; }
.placeholder-box {
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  padding: 2.5rem 1rem; border-radius: 8px;
  background: var(--bg-soft); border: 2px dashed var(--line);
  color: var(--text-soft);
}
.placeholder-tag {
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  padding: 3px 10px; background: #fff; border-radius: 999px;
  color: var(--accent); border: 1px solid var(--line);
}
.placeholder-desc { font-size: .92rem; text-align: center; line-height: 1.5; }
.placeholder-warn { border-color: #e3b3b3; background: #fdf6f6; color: #8a4a4a; }
.placeholder-warn .placeholder-tag { color: #8a4a4a; }
.placeholder-gpt { border-color: #b9d4ce; background: #f3faf8; }
.placeholder-gpt .placeholder-tag { color: var(--accent); border-color: #cfe5e0; }
.gpt-prompt { width: 100%; margin-top: .6rem; }
.gpt-prompt summary {
  cursor: pointer; font-size: .82rem; color: var(--accent);
  font-weight: 600; padding: .3rem 0;
}
.gpt-prompt textarea {
  width: 100%; min-height: 110px; margin-top: .5rem;
  padding: .65rem .8rem; border-radius: 6px;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  font-family: ui-monospace, "SFMono-Regular", monospace; font-size: .82rem; line-height: 1.55;
  resize: vertical;
}
.copy-btn {
  margin-top: .4rem; padding: .35rem .8rem;
  background: var(--accent); color: #fff;
  border: none; border-radius: 5px; cursor: pointer;
  font-family: inherit; font-size: .8rem;
}
.copy-btn:hover { background: #174d4a; }

/* video editor */
.video-toolbar { display: flex; justify-content: space-between; gap: 1rem; margin: 1rem 0 1.25rem; flex-wrap: wrap; }
.filter-row { display: flex; gap: .75rem; align-items: center; }
.filter-row label { font-size: .9rem; color: var(--text-soft); }
.filter-row button {
  padding: .45rem 1rem; background: var(--accent); color: #fff;
  border: none; border-radius: 5px; font-family: inherit; font-size: .9rem; cursor: pointer;
}
.filter-row button:disabled { background: #aab; cursor: not-allowed; }
.filter-row button:hover:not(:disabled) { background: #174d4a; }
.clip-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: .9rem; margin-bottom: 2rem;
}
.clip {
  border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; background: #fff; display: flex; flex-direction: column;
  position: relative;
}
.clip-pick {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: rgba(255,255,255,.92); padding: 4px 6px; border-radius: 4px;
}
.clip-thumb { position: relative; aspect-ratio: 16/9; background: #000; }
.clip-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip-time {
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(0,0,0,.7); color: #fff;
  padding: 2px 6px; border-radius: 3px; font-size: .75rem; font-weight: 600;
}
.clip-tag {
  position: absolute; top: 6px; right: 6px;
  padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700;
  letter-spacing: .04em;
}
.tag-wow { background: #fff3cd; color: #8a6d3b; }
.tag-aha { background: #d1ecf1; color: #0c5460; }
.clip-meta { padding: .65rem .8rem; }
.clip-idx { font-size: .75rem; color: var(--muted); margin-bottom: .35rem; }
.clip-text { font-size: .85rem; line-height: 1.5; color: var(--text-soft); margin-bottom: .35rem; }
.clip-quote { font-size: .85rem; color: var(--accent); font-style: italic; margin-bottom: .5rem; }
.clip-video { width: 100%; border-radius: 4px; background: #000; }

.groups-panel { margin: 2rem 0; padding: 1.2rem; background: var(--bg-soft); border-radius: 8px; }
.groups-panel h2 { font-size: 1.05rem; margin: 0 0 .35rem; }
.group-box {
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  padding: .8rem 1rem; margin: .75rem 0;
}
.group-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .5rem; flex-wrap: wrap; }
.group-head button {
  padding: .25rem .7rem; font-size: .82rem;
  background: #fff; color: var(--accent); border: 1px solid var(--line); border-radius: 4px;
  cursor: pointer; font-family: inherit;
}
.group-head button:hover { border-color: var(--accent); }
.group-clips { display: flex; flex-wrap: wrap; gap: .35rem; }
.group-chip {
  display: inline-block; padding: 3px 10px;
  background: var(--accent); color: #fff;
  border-radius: 999px; font-size: .82rem; font-weight: 600;
  cursor: grab;
}
.group-chip:active { cursor: grabbing; }
.body blockquote {
  margin: 1.5rem 0;
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.1rem;
  border-radius: 4px;
  color: var(--text-soft);
}

.disclaimer {
  margin-top: 2.5rem; padding: 1.1rem 1.2rem;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg-soft); color: var(--muted);
  font-size: .83rem; line-height: 1.7;
}
.disclaimer p { margin: 0 0 .25rem; }
.disclaimer p:last-child { margin: 0; }

.tags { margin-top: 1.5rem; color: var(--muted); font-size: .85rem; }
.tags span { display: inline-block; margin-right: .5rem; }

.site-footer {
  border-top: 1px solid var(--line); padding: 1.25rem 0;
  color: var(--muted); font-size: .8rem; text-align: center;
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  article h1 { font-size: 1.4rem; }
  .body h2 { font-size: 1.1rem; }
}

/* ── 새 페이지용 컴포넌트 ── */
.page-head { margin-bottom: 1.5rem; }
.page-head h1 { font-size: 1.5rem; margin: 0 0 .3rem; font-weight: 800; }
.page-head .meta { color: var(--muted); font-size: .9rem; margin: 0; }

.card { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem 1.3rem; margin-bottom: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.03); }
.card h2 { font-size: 1.05rem; margin: 0 0 .6rem; color: var(--accent-dark); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.link-card { display: block; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem; text-decoration: none; color: var(--text); transition: all .15s; box-shadow: 0 1px 3px rgba(0,0,0,.03); }
.link-card:hover { border-color: var(--accent); box-shadow: 0 3px 10px rgba(232,180,208,.25); transform: translateY(-1px); }
.link-card.disabled { opacity: .5; pointer-events: none; }
.link-card-title { font-weight: 700; font-size: 1rem; margin-bottom: .3rem; color: var(--accent-dark); }
.link-card-desc { color: var(--muted); font-size: .85rem; line-height: 1.5; }

.bullet-list { margin: 0; padding-left: 1.2rem; color: var(--text-soft); }
.bullet-list li { padding: .25rem 0; }

.site-footer { padding: 1.5rem 2.2rem; color: var(--muted); font-size: .8rem; border-top: 1px solid var(--line); margin-top: 2rem; }
@media (max-width: 900px) { .site-footer { padding: 1.2rem; } }
