/* 院校库与 DDL */
.pg-subnav { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px; margin-bottom: 16px; width: fit-content; }
.pg-subnav a { padding: 5px 16px; border-radius: 8px; color: var(--muted); }
.pg-subnav a.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.pg-subnav a:hover { text-decoration: none; }

.pg-filter { padding: 12px; }
.pg-search { display: flex; gap: 8px; }
.pg-search input { flex: 1; }
.pg-selects { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.pg-selects select { width: auto; flex: 1 1 130px; padding: 6px 10px; font-size: 14px; }

.pg-item { display: grid; grid-template-columns: 1fr 260px auto; gap: 12px 16px; align-items: center; }
.pg-item h3 { margin: 0 0 2px; }
.pg-tags { margin-top: 6px; }
.pg-tags .tag { margin-bottom: 4px; }
.pg-ddl { line-height: 1.5; }
.pg-ddl .badge { margin-bottom: 2px; }
.pg-warn { background: var(--amber-soft); color: var(--amber); }
.pg-add { margin: 0; }
.pg-added { color: var(--primary); border-color: var(--primary-soft); background: var(--primary-soft); white-space: nowrap; }
.pg-act .btn { white-space: nowrap; }

.pg-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.pg-sub { font-size: 16px; }
.pg-unverified { background: var(--red-soft); color: var(--red); border: 1px solid #F0C4BE; font-weight: 600; padding: 12px 14px; border-radius: 10px; margin-bottom: 8px; }
.pg-dl .pg-times { display: flex; gap: 6px 24px; flex-wrap: wrap; margin: 6px 0 4px; }
.pg-dl .small a { word-break: break-all; }
.pg-req { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; margin: 0 0 8px; }
.pg-req dt { color: var(--muted); font-size: 14px; }
.pg-req dd { margin: 0; word-break: break-all; }


/* 可折叠筛选区 */
.pg-more { margin-top: 10px; }
.pg-more > summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 4px 0; list-style: none; user-select: none; }
.pg-more > summary::-webkit-details-marker { display: none; }
.pg-more > summary::before { content: "▸"; display: inline-block; width: 1em; transition: transform .15s; }
.pg-more[open] > summary::before { transform: rotate(90deg); }
.pg-count { display: inline-block; font-size: 12px; padding: 0 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); margin-left: 4px; }
.pg-filter-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pg-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; margin: 0; }
.pg-check input { width: auto; margin: 0; }
.pg-filter-btns { display: inline-flex; align-items: center; gap: 12px; margin-left: auto; }
.pg-summary { margin: 4px 0 10px; }
.pg-school-link { margin-left: 6px; white-space: nowrap; }

/* 分页 */
.pg-pager { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 18px 0 8px; }
.pg-pager-nums { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.pg-pager-nums a, .pg-pager-on, .pg-pager-gap { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 14px; }
.pg-pager-nums a { border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.pg-pager-nums a:hover { text-decoration: none; border-color: var(--primary); color: var(--primary); }
.pg-pager-on { background: var(--primary); color: #fff; font-weight: 600; }
.pg-pager-gap { color: var(--muted); min-width: 20px; }
.pg-pager-off { opacity: .45; cursor: default; }
.pg-pager-count { display: none; }

/* 学校页 */
.pg-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 4px; }
.pg-stats .card { display: flex; flex-direction: column; align-items: center; padding: 12px 8px; }
.pg-stats b { font-size: 22px; color: var(--primary); line-height: 1.2; }
.pg-head a.tag:hover { text-decoration: none; filter: brightness(.96); }

/* 详情页：紧凑项目行 / 帖子 */
.pg-minis { padding: 4px 0; }
.pg-mini { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 10px 16px; color: var(--text); border-top: 1px solid var(--line); flex-wrap: wrap; }
.pg-mini:first-child { border-top: 0; }
.pg-mini:hover { text-decoration: none; background: var(--primary-soft); }
.pg-mini-name { flex: 1 1 240px; min-width: 0; }
.pg-mini-ddl { white-space: nowrap; }
.pg-post h3 { margin: 0 0 4px; }
.pg-reply { white-space: nowrap; }
.pg-empty-posts p { margin: 0 0 8px; }

@media (max-width: 720px) {
  .pg-item { grid-template-columns: 1fr; }
  .pg-subnav { width: 100%; }
  .pg-subnav a { flex: 1; text-align: center; }
  .pg-req { grid-template-columns: 90px 1fr; }
  .pg-search .btn { padding: 8px 12px; }
  .pg-selects select { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .pg-pager-nums { display: none; }
  .pg-pager-count { display: inline; }
  .pg-pager { justify-content: space-between; }
  .pg-stats b { font-size: 18px; }
  .pg-mini { padding: 10px 12px; }
  .pg-mini-ddl { white-space: normal; }
}
.pg-tip { flex-basis: 100%; }

.pg-source { margin: 4px 0 6px; overflow-wrap: anywhere; }
