/* 논문 분석 · 논문 리포트 공용 스타일 (풀색 테마, 2026-10 개편)
   - 페이지 루트 .pp 아래로만 적용한다. 모달(부트스트랩)은 기존 article_detail.css 를 그대로 쓴다.
   - 버튼 클래스 이름(btn-summary-report-action 등)은 article_detail.js 가 행 버튼을 바꿔 끼울 때
     그대로 쓰므로 이름은 유지하고 모양만 여기서 덮어쓴다. */

.pp {
  --pp-band: #3A7553;
  --pp-band-ink: #FFFFFF;
  --pp-band-muted: #DCEFE2;
  --pp-band-chip: rgba(30, 72, 50, .55);
  --pp-band-chip-ink: #F0F8F3;
  --pp-hi: #F4E36B;
  --pp-bg: #FDF8EF;  /* [redesign] 사이트 배경 한 색 (원래 #F2F6F1) */
  --pp-card: #FFFFFF;
  --pp-ink: #1F2227;
  --pp-sub: #5B616B;
  --pp-line: #D3D7DD;
  --pp-row-line: #EDF0EE;
  --pp-off-bg: #EEF0F2;
  --pp-off-ink: #8A919B;
  /* 기능별 색 — 글자는 늘 --pp-ink */
  --pp-c-summary: #6FE3C3;
  --pp-c-figure: #8ED3FF;
  --pp-c-explain: #FFD166;
  --pp-c-setup: #FFA394;
  --pp-c-ref: #D2F27F;
  --pp-pad-x: clamp(16px, 3vw, 48px);

  background: var(--pp-bg);
  color: var(--pp-ink);
  font-family: 'Google Sans', 'DPmind Ko', 'Noto Sans KR', sans-serif;
  font-size: 15px;
  min-height: 70vh;
  padding-bottom: 56px;
}
.pp a { color: inherit; text-decoration: none; }
.pp .pp-mono { font-family: 'Google Sans', 'DPmind Ko', sans-serif; }

/* ── 상단 띠 ── */
.pp-band {
  background:
    linear-gradient(90deg, rgba(47, 98, 70, .94) 0%, rgba(47, 98, 70, .84) 45%, rgba(47, 98, 70, .5) 100%),
    url('../images/paper/band-green.webp') center right / cover no-repeat,
    var(--pp-band);
  color: var(--pp-band-ink);
}
.pp-band-inner {
  padding: 26px var(--pp-pad-x) 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.pp-band-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.pp-title-wrap { display: flex; align-items: center; gap: 16px; min-width: 0; }
.pp-badge {
  width: 68px;
  height: 68px;
  flex: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .22));
}
.pp-kicker {
  display: block;
  font-family: 'Google Sans', 'DPmind Ko', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  color: var(--pp-band-muted);
  margin-bottom: 8px;
}
.pp-title {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #FFFFFF;
  line-height: 1.2;
}
.pp-band-side { display: flex; align-items: center; gap: 14px; }
.pp-count { font-size: 13px; color: var(--pp-band-muted); }
.pp-count b { color: #FFFFFF; font-weight: 600; }

/* 띠 안 밑줄 탭 (분석 페이지) */
.pp-tabs { display: flex; gap: 28px; }
.pp-tabs a {
  padding: 0 2px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--pp-band-muted);
  border-bottom: 3px solid transparent;
}
.pp-tabs a.is-active { font-weight: 600; color: #FFFFFF; border-bottom-color: var(--pp-hi); }

/* 띠 안 알약 토글 (리포트 페이지) */
.pp-seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--pp-band-chip);
}
.pp-seg a {
  height: 36px;
  padding: 0 16px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--pp-band-chip-ink);
}
.pp-seg a.is-active { background: var(--pp-hi); color: var(--pp-ink); }

/* ── 공용 조각 ── */
.pp-dot { width: 8px; height: 8px; border-radius: 4px; display: inline-block; flex: none; }
.pp-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: var(--pp-ink);
  white-space: nowrap;
  background: var(--pp-off-bg);
}
.pp-tag.is-exp { background: #BFE3FF; }
.pp-tag.is-review { background: #D2F27F; }
.pp-tag.is-cat { background: #FFFFFF; box-shadow: inset 0 0 0 1px var(--pp-line); }

.pp-pill,
.pp .paper-entry-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  border-radius: 10px;
  border: none;
  font: 600 13px/1 'Google Sans', 'DPmind Ko', 'Noto Sans KR', sans-serif;
  color: var(--pp-ink);
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition: filter .12s ease, box-shadow .12s ease;
}
.pp-pill:hover,
.pp .paper-entry-actions .btn:hover { filter: brightness(.95); color: var(--pp-ink); }
.pp-pill:focus-visible,
.pp .paper-entry-actions .btn:focus-visible { outline: 2px solid var(--pp-band); outline-offset: 2px; }
.pp-ghost { background: #FFFFFF; box-shadow: inset 0 0 0 1px var(--pp-line); }
.pp-dark { background: var(--pp-band); color: #FFFFFF; }
.pp-dark:hover { color: #FFFFFF; }
.pp-hi { background: var(--pp-hi); color: var(--pp-ink); }
.pp-danger { background: #FFFFFF; color: #B4362A; box-shadow: inset 0 0 0 1px #F1B3AA; }
.pp-danger:hover { color: #B4362A; }

/* 행 버튼: 기존 클래스 이름 그대로, 색만 새로 */
.pp .paper-entry-actions .btn-pdf-download { width: 36px; padding: 0; background: #FFFFFF; box-shadow: inset 0 0 0 1px var(--pp-line); color: var(--pp-ink); }
.pp .paper-entry-actions .btn-pdf-download:hover { color: var(--pp-ink); background: #FFFFFF; }
.pp .paper-entry-actions .btn-summary-report-action { background: var(--pp-c-summary); }
.pp .paper-entry-actions .btn-summary-action { background: #FFFFFF; box-shadow: inset 0 0 0 1px var(--pp-line); }
.pp .paper-entry-actions .btn-summary-action::before { content: ''; width: 8px; height: 8px; border-radius: 4px; background: #2FC79E; }
.pp .paper-entry-actions .btn-ref-done { background: var(--pp-c-ref); }
.pp .paper-entry-actions .btn-ref-action { background: #FFFFFF; box-shadow: inset 0 0 0 1px var(--pp-line); }
.pp .paper-entry-actions .btn-ref-action::before { content: ''; width: 8px; height: 8px; border-radius: 4px; background: #9BCB2E; }
.pp .paper-entry-actions .btn-structure-action { background: var(--pp-c-setup); }
.pp .paper-entry-actions .btn-report-action.is-figure { background: var(--pp-c-figure); }
.pp .paper-entry-actions .btn-report-action.is-explain { background: var(--pp-c-explain); }
.pp .paper-entry-actions .btn-report-action.is-disabled,
.pp .paper-entry-actions .btn-report-action:disabled {
  background: var(--pp-off-bg);
  color: var(--pp-off-ink);
  opacity: 1;
  cursor: default;
  pointer-events: none;
}
.pp .paper-entry-actions .action-sep { width: 1px; height: 22px; background: var(--pp-line); margin: 0 4px; font-size: 0; }

/* ── 본문 배치 ── */
.pp-main {
  padding: 24px var(--pp-pad-x) 0;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}
.pp-aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.pp-list-col { flex: 999 1 720px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.pp-card { background: var(--pp-card); border-radius: 16px; }

/* 올리기 패널 */
.pp-upload { padding: 20px; display: flex; flex-wrap: wrap; gap: 16px; }
.pp-upload h2 { flex: 1 1 100%; margin: 0; font-size: 16px; font-weight: 700; }
.pp .upload-area {
  flex: 1 1 260px;
  width: auto;
  margin: 0;
  min-height: 156px;
  padding: 16px !important;
  border: 1.5px dashed #C3C8CF !important;
  border-radius: 12px;
  background: #F7F8FA;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}
.pp .upload-area:hover { border-color: var(--pp-band) !important; background: #F1F7F3; }
.pp .upload-area.dragover { border-color: var(--pp-band) !important; background: #E7F3EC; box-shadow: 0 0 0 3px rgba(58, 117, 83, .15); }
.pp #dropZone { min-height: 0; gap: 8px; align-items: center; cursor: pointer; }
.pp-up-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--pp-band);
  display: flex; align-items: center; justify-content: center;
}
.pp-up-title { font-size: 14px; font-weight: 600; }
.pp-up-sub { font-size: 12px; color: var(--pp-sub); }
.pp #fileInfo { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 0 !important; }
.pp #fileInfo.d-none { display: none !important; }
.pp #fileName { font-size: 14px; font-weight: 600; word-break: break-all; }
.pp-fields { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.pp-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; margin: 0; }
.pp-field small { font-weight: 500; color: var(--pp-sub); font-size: 12px; }
.pp-select {
  height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--pp-line);
  background-color: #FFFFFF;
  font: 500 14px 'Google Sans', 'DPmind Ko', 'Noto Sans KR', sans-serif;
  color: var(--pp-ink);
}
.pp-progress { flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px; }
.pp-progress p { margin: 0; font-size: 14px; font-weight: 600; color: var(--pp-band); text-align: center; }
.pp-progress .progress { height: 10px; border-radius: 6px; }
.pp-progress .progress-bar { background-color: var(--pp-band); }

.pp-admin { padding: 16px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pp-admin-label { flex: 1 1 100%; font-size: 11px; letter-spacing: .12em; color: var(--pp-sub); }

/* 칩 · 검색 · 페이지 */
.pp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border-radius: 18px;
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px var(--pp-line);
  font-size: 13px;
  font-weight: 600;
  color: var(--pp-ink);
}
.pp-chip .pp-mono { font-size: 12px; font-weight: 500; opacity: .75; }
.pp-chip.is-active { background: var(--pp-band); box-shadow: none; color: #FFFFFF; }
.pp-band .pp-chip { background: var(--pp-band-chip); box-shadow: none; color: var(--pp-band-chip-ink); }
.pp-band .pp-chip.is-active { background: var(--pp-hi); color: var(--pp-ink); }

.pp-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.pp-search {
  flex: 0 1 460px;
  min-width: 240px;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px 0 14px;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--pp-line);
  margin: 0;
}
.pp-search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font: 400 14px 'Google Sans', 'DPmind Ko', 'Noto Sans KR', sans-serif; }
.pp-search .pp-pill { height: 32px; }
.pp-list-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--pp-sub); }
.pp-icon-btn { width: 36px; height: 36px; padding: 0; }

.pp .pager { display: flex; justify-content: flex-start; }
.pp .pager-inner { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.pp .pager-nums { display: inline-flex; align-items: center; gap: 2px; margin: 0 2px; }
.pp .pager-ellipsis { display: inline-flex; align-items: center; padding: 0 4px; font-size: 13px; letter-spacing: .08em; user-select: none; }
.pp .pager-arrow,
.pp .pager-num {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
  width: 36px; min-width: 36px; height: 36px; padding: 0;
  border-radius: 10px;
  font-family: 'Google Sans', 'DPmind Ko', sans-serif;
  font-size: 13px;
  color: var(--pp-ink);
}
.pp .pager-arrow { background: #FFFFFF; border: none; box-shadow: inset 0 0 0 1px var(--pp-line); }
.pp .pager-arrow.is-disabled { color: #B8BEC6; box-shadow: inset 0 0 0 1px #E6E9EC; pointer-events: none; }
.pp .pager-num:hover { background: #E4EDE7; }
.pp .pager-num.is-active { background: var(--pp-band); color: #FFFFFF; font-weight: 600; }
.pp .pager-num-last { color: var(--pp-ink); }
.pp .pager-ellipsis { color: var(--pp-sub); }

/* 논문 목록 */
.pp-list { overflow: visible; }
.pp-row { display: flex; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--pp-row-line); }
.pp-row:last-child { border-bottom: none; }
.pp-row .paper-check { width: 18px; height: 18px; margin: 3px 0 0; flex: none; accent-color: var(--pp-band); }
.pp-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.pp-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pp-date { margin-left: auto; font-size: 12px; color: var(--pp-sub); }
.pp-row-title { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.45; color: var(--pp-ink); word-break: break-word; }
.pp .paper-entry-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pp-empty { padding: 40px 20px; text-align: center; color: var(--pp-sub); }

/* 행 카테고리 지정 (⋯) */
.pp-catpop { position: relative; margin-left: auto; }
.pp-catpop > summary { list-style: none; }
.pp-catpop > summary::-webkit-details-marker { display: none; }
.pp-catpop-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  width: 220px;
  padding: 12px;
  border-radius: 12px;
  background: #FFFFFF;
  box-shadow: 0 10px 30px rgba(20, 30, 25, .16), inset 0 0 0 1px var(--pp-line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pp-catpop-panel .paper-cat-select { max-width: none; width: 100%; min-width: 0; height: 40px; font-size: 14px; border-radius: 9px; padding: 0 28px 0 10px; }
.pp .pp-catpop-panel .btn-cat-inline { width: 100%; height: 38px; border-radius: 9px; border: none; background: var(--pp-band); color: #FFFFFF; font-size: 13px; }
.pp .pp-catpop-panel .btn-cat-inline:hover { color: #FFFFFF; }

/* ── 리포트 카드 ── */
.pp-reports { padding: 22px var(--pp-pad-x) 0; display: flex; flex-direction: column; gap: 22px; }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; }
.pp-rcard { background: #FFFFFF; border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.pp-rcard-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pp-rcard-title {
  margin: 0;
  min-height: 69px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--pp-ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.pp-rbtns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: auto; }
.pp-rb {
  display: flex; align-items: center; justify-content: center;
  height: 44px; border-radius: 11px; border: none;
  font: 600 13px/1 'Google Sans', 'DPmind Ko', 'Noto Sans KR', sans-serif;
  color: var(--pp-ink); white-space: nowrap;
}
.pp-rb:hover { filter: brightness(.95); color: var(--pp-ink); }
.pp-rb.is-summary { background: var(--pp-c-summary); }
.pp-rb.is-figure { background: var(--pp-c-figure); }
.pp-rb.is-explain { background: var(--pp-c-explain); }
.pp-rb.is-off { background: var(--pp-off-bg); color: var(--pp-off-ink); cursor: default; filter: none; }
.pp-reports .pager { justify-content: center; }

/* ── 리포트 보기 ── */
.pp-viewer-band .pp-band-inner { padding-bottom: 18px; gap: 16px; }
.pp-viewer-head { display: flex; align-items: flex-start; gap: 14px; }
.pp-back {
  flex: none; height: 44px; padding: 0 14px; border-radius: 11px; border: none;
  background: var(--pp-band-chip); color: #FFFFFF;
  display: flex; align-items: center; gap: 6px;
  font: 600 14px 'Google Sans', 'DPmind Ko', 'Noto Sans KR', sans-serif;
}
.pp-viewer-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pp-viewer-meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--pp-band-muted); }
.pp-viewer-title { margin: 0; font-size: clamp(17px, 1.6vw, 22px); font-weight: 700; line-height: 1.4; color: #FFFFFF; word-break: break-word; }
.pp-viewer-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.pp-vtabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--pp-band-chip); }
.pp-vtab {
  height: 38px; padding: 0 16px; border: none; border-radius: 9px;
  background: transparent; color: var(--pp-band-chip-ink);
  display: flex; align-items: center; gap: 7px;
  font: 600 14px 'Google Sans', 'DPmind Ko', 'Noto Sans KR', sans-serif; cursor: pointer;
}
.pp-vtab .pp-dot { background: var(--dot); }
.pp-vtab.is-active { background: var(--dot); color: var(--pp-ink); }
.pp-vtab.is-active .pp-dot { background: var(--pp-ink); }
.pp-vtab:disabled { opacity: .45; cursor: default; }
.pp-newwin {
  height: 40px; padding: 0 14px; border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45); color: #FFFFFF;
  display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
}
.pp-newwin:hover { color: #FFFFFF; background: rgba(255, 255, 255, .08); }
.pp-frame-wrap { margin: 20px var(--pp-pad-x) 0; background: #FFFFFF; border-radius: 16px; overflow: hidden; }
.pp-frame-wrap iframe { display: block; width: 100%; border: 0; min-height: 180px; }

@media (max-width: 575.98px) {
  .pp-title { font-size: 25px; }
  .pp-badge { width: 54px; height: 54px; }
  .pp-band-inner { padding-top: 20px; }
  .pp-row { padding: 16px 14px; gap: 10px; }
  .pp-frame-wrap { margin: 12px 8px 0; border-radius: 12px; }
  .pp-search { min-width: 0; flex: 1 1 100%; }
}
