/* 분석 영역 접기 · 「분석 실행」 버튼 · 업로드 칸 높이 (2026-10-02 요청, v52)
 * 학생 스타일(css/style.css)은 그대로 두고 맨 마지막에 불러와 덧붙인다(순서가 곧 우선순위).
 */

/* ① CSV 업로드 칸 — 높이를 예전의 절반쯤으로(2560×1440 에서 326px → 약 160px)
 *    아이콘 · 제목 · 도움말을 한 줄로 놓고, 버튼 줄 · 안내 줄을 그 아래에 */
.upload-zone {
  min-height: 0;
  padding: clamp(10px, 0.8vw, 20px) clamp(16px, 1.4vw, 32px);
  flex-direction: row;
  flex-wrap: wrap;
  column-gap: 12px;
  row-gap: 6px;
}
.upload-icon { font-size: clamp(20px, 1.3vw, 30px); margin-bottom: 0; }
.upload-help { margin: 0; }
.upload-zone > div:not([class]) { flex-basis: 100%; }
.privacy-note { margin-top: 0; flex-basis: 100%; }
.csv-upload-card .section-header { margin-bottom: 8px; }

/* ② 세 영역(Order Analysis · Contribution Analysis · Spectrum Map) 접기 · 펼치기 */
.card-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.section-toggle { white-space: nowrap; padding: 6px 12px; font-size: 12px; margin-left: 0; }
.section-toggle::after { content: ' ▲'; font-size: 10px; }
.section-toggle[aria-expanded="false"]::after { content: ' ▼'; }
.section-toggle:focus-visible, .run-button:focus-visible { outline: 3px solid var(--blue, #1769aa); outline-offset: 2px; }
.collapsible-card.is-collapsed > .collapsible-body { display: none !important; }
.collapsible-card.is-collapsed > .toolbar { margin-bottom: 0; }
.card-subtitle { margin-left: 8px; color: var(--gray-500, #667085); font-size: 0.62em; font-weight: 600; }

/* ③ 분석 실행 · 「입력이 바뀌었습니다」 */
.run-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 14px; }
.run-button { min-width: 112px; }
.run-stale {
  margin: 0;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--orange-light, #fff3df);
  color: #7a4900;
  font-size: 12px;
  font-weight: 700;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.run-stale[hidden] { display: none; }
.run-help { margin-top: 6px; word-break: keep-all; overflow-wrap: break-word; }
body.dark-mode .run-stale { background: #3b321f; color: #ffd98a; }
body.dark-mode .card-subtitle { color: #aab6c2; }

/* ④ Contribution Analysis — 좁은 화면에서 차트가 칸 밖으로 나가지 않게(차트는 최소 520px 로 그려짐) */
.contribution-chart-wrap { overflow-x: auto; }

/* 좁은 화면에서 Contribution Analysis 격자 칸이 차트(최소 520px) 폭만큼 늘어나 화면 밖으로 나가던 것 — 칸 최소 폭 0 */
@media (max-width: 900px) {
  .contribution-analysis-layout { grid-template-columns: minmax(0, 1fr); }
}
.contribution-analysis-layout > * { min-width: 0; }
