/* 내용 요약 머리: 보기 스위치는 제목 옆, 다시 만들기와 설정은 오른쪽 끝 */
.provider-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

/* ─────────────────────────── 작품 상세 ─────────────────────────── */

/* 오른쪽 작품 화면 위 단계 탭: 왼쪽 메뉴의 단계 버튼(.stepitem)을 같은 검정 띠에 가로로 둔다 */
.steptabs {
  --step-surface: var(--side-bg);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 16px;
  padding: 6px;
  border-radius: var(--radius);
  background: var(--side-bg);
  box-shadow: var(--shadow-raised);
}
.steptabs .stepitem { padding: 9px 12px; border-radius: 8px; }
.steptabs .stepitem.active { background: var(--side-active); }

.detailnav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 14px;
  color: var(--desk-muted);
}
.detailnav .link,
.detailnav .iconbtn { color: var(--desk-text); }
.detailnav .link:hover { color: var(--accent-text); }
.detailnav .iconbtn:hover { background: rgb(16 18 22 / 6%); }
.detailnav .iconbtn:disabled { background: none; color: var(--text-4); }
.detailnav .muted { color: var(--desk-muted); }
.sheet {
  padding: 32px 44px 44px;
}
.detailhead {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--text); /* 머리와 본문을 나누는 검정 줄 */
}
.detail-actions { display: flex; flex: none; gap: 10px; align-items: center; } /* 내보내기 · 다음 할 일 */
.detail-title { flex: 1; }
.crumbsep {
  color: var(--desk-muted);
}
.crumb {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--desk-muted);
  font-size: var(--fs-ui);
}
.detailhead h1 {
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--fs-title);
  line-height: 1.35;
  letter-spacing: -0.025em;
}
.content {
  min-width: 0;
}
/* 단계 제목: 굵은 글꼴 + 아래 구분선 */
.panetitle {
  margin: 0 0 24px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-pane);
}
.content > .panetitle + .panel {
  padding-top: 0;
}
.back {
  margin-bottom: 8px;
}
.job {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: var(--fs-meta);
  font-weight: 600;
}
.job-line { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; }
.job-line b { font-variant-numeric: tabular-nums; }
/* AI 작업 문구: 2.4초마다 아래에서 올라와 바뀌고(work-page.mjs), 끝의 점 세 개가 차례로 찍힌다 */
.job-ticker { flex: none; width: 10em; overflow: hidden; white-space: nowrap; font-weight: 700; } /* 줄바꿈 금지: 점이 늘 때 줄이 바뀌어 상자 높이가 뛰지 않게 */
.job-ticker i { display: inline-block; font-style: normal; animation: ticker-in 0.35s var(--ease-out) both; }
.job-ticker i::after { content: "..."; display: inline-block; width: 0; overflow: hidden; vertical-align: bottom; animation: ticker-dots 1.2s steps(4) infinite; }
.job-ticker + .job-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; opacity: 0.8; }
@keyframes ticker-in { from { opacity: 0; transform: translateY(70%); } }
@keyframes ticker-dots { to { width: 1.2em; } }
@media (prefers-reduced-motion: reduce) { .job-ticker i { animation: none; } .job-ticker i::after { animation: none; width: auto; } }
.job-bar { display: block; height: 6px; margin-top: 8px; overflow: hidden; border-radius: 3px; background: var(--paper); }
.job-bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width 0.5s ease; }
.job:empty {
  display: none;
}
.job.muted {
  background: var(--fill);
  color: var(--text-2);
  font-weight: 500;
}
.job.error {
  background: var(--red-soft);
  color: var(--red-text);
}

/* ─────────────────────────── 탭 안 공통 ─────────────────────────── */

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
/* 카드 안에서는 면을 겹치지 않고 구분선으로 나눈다. */
.panel {
  margin: 0;
  padding: 24px 0 0;
}
.panel + .panel {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.panel + .actions {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.panel h2,
.read-section h2 {
  margin-bottom: 14px;
}
.empty {
  max-width: 440px;
  margin: 40px auto;
  text-align: center;
}
.empty strong {
  font-family: var(--font-heading);
  font-size: var(--fs-section);
  letter-spacing: -0.02em;
  font-weight: 700;
}
.empty p {
  margin: 8px 0 20px;
  color: var(--text-3);
}
.warning {
  margin: 12px 0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: var(--warn-text);
  font-size: var(--fs-ui);
}
details.diag {
  border-top: 1px solid var(--line);
}
details.diag > summary {
  padding: 14px 0;
  cursor: pointer;
  color: var(--text-2);
  font-size: var(--fs-ui);
  font-weight: 600;
}
.diag-body {
  padding: 0 0 14px;
}

/* 근거 칩 */
.ref {
  display: inline-flex;
  align-items: center;
  height: 22px;
  margin-left: 4px;
  padding: 0 7px;
  border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--accent);
  color: var(--accent-text);
  font-size: var(--fs-label);
  font-weight: 700;
  line-height: 22px;
  vertical-align: 1px;
  font-variant-numeric: tabular-nums;
}
.ref {
  transition: background var(--fast), box-shadow var(--fast), transform var(--fast) var(--ease-out);
}
.ref:hover,
.ref[aria-describedby] {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1.5px var(--accent), 1px 2px 5px -2px rgb(184 72 0 / 50%);
  transform: translateY(-1px);
}
.ref.active {
  background: var(--accent-text);
  color: #fff;
}

/* MS Forms 작품 머리: 이메일과 간략 설명 */
.forms-note { display: grid; gap: 4px; max-width: 72ch; margin: 10px 0 0; color: var(--text-2); font-size: var(--fs-ui); }
.forms-note a { justify-self: start; color: var(--accent-text); }
