/* 作品广场 — 对齐 UI works.html */
body.pt-aispu .pt-shell__main--flush { overflow: visible; }

.pt-works .pt-works-body { padding-top: 24px; padding-bottom: 72px; }
.pt-works .work-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; margin-top: 24px; }
.pt-works .works-main { min-width: 0; }
.pt-works .works-pager {
  margin-top: 28px;
  justify-content: center;
}
.pt-works .works-pager a,
.pt-works .works-pager span {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
}
.pt-works .works-pager .is-ellipsis {
  border: none;
  background: transparent;
  min-width: 20px;
  color: var(--text-3);
}
.pt-works .works-pager-meta {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
}
.pt-works .filter-bar {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
}
.pt-works .search-box { display: flex; gap: 8px; flex: 1; max-width: 480px; }
.pt-works .search-box .input { flex: 1; }
.pt-works .filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pt-works .filter-chip-row {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 20px;
}
.pt-works .filter-chip-label {
  font-size: 12px; color: var(--text-3); font-weight: 600; margin: 0 2px 0 8px;
}
.pt-works .filter-chip-label:first-of-type { margin-left: 4px; }
.pt-works a.filter-chip,
.pt-works .filter-chip {
  padding: 6px 14px; border-radius: 20px; font-size: 13px; line-height: 1.2;
  border: 1px solid var(--border); background: #fff; color: var(--text-1);
  text-decoration: none; cursor: pointer; transition: all .2s;
}
.pt-works a.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.pt-works a.filter-chip.active,
.pt-works .filter-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pt-works .filter-chip .chip-n {
  display: inline-block; min-width: 14px; font-size: 11px; opacity: .72; font-weight: 600;
}
.pt-works a.filter-chip.active .chip-n { opacity: .9; }

/* 大屏比首页更宽；小屏跟首页一样：100% 宽 + 24px 边距，绝不贴边、不锁死 1600 */
.pt-works .container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.pt-works .works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: row;
  gap: 16px;
  align-items: start;
}
.pt-works .work-card {
  display: flex; flex-direction: column; margin: 0;
  border-radius: var(--radius); overflow: hidden;
  background: #fff; border: 1px solid var(--border); transition: all .25s; cursor: pointer; position: relative;
}
.pt-works .work-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pt-works a.work-card-link { display: block; color: inherit; text-decoration: none; flex: 1; }
.pt-works .work-thumb {
  height: auto;
  aspect-ratio: 4 / 3;
  position: relative; overflow: hidden;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.pt-works .work-thumb.t1 { background-color: #ffd1c4; background-image: linear-gradient(135deg,#ffd1c4,#ff9b7a); }
.pt-works .work-thumb.t2 { background-color: #a3c9ff; background-image: linear-gradient(135deg,#a3c9ff,#0053c9); }
.pt-works .work-thumb.t3 { background-color: #c4ffc4; background-image: linear-gradient(135deg,#c4ffc4,#7ad17a); }
.pt-works .work-thumb.t4 { background-color: #b3d0ff; background-image: linear-gradient(135deg,#b3d0ff,#0053c9); }
.pt-works .work-thumb.t5 { background-color: #b3e0ff; background-image: linear-gradient(135deg,#b3e0ff,#3FA9FF); }
.pt-works .work-thumb.t6 { background-color: #ffb3d9; background-image: linear-gradient(135deg,#ffb3d9,#FF7A45); }
.pt-works .work-thumb.t7 { background-color: #fff3a0; background-image: linear-gradient(135deg,#fff3a0,#ffd24a); }
.pt-works .work-thumb.t8 { background-color: #b3fff0; background-image: linear-gradient(135deg,#b3fff0,#1ABFA0); }
.pt-works .work-thumb.has-cover { background-size: cover; background-position: center; }
.pt-works .work-thumb .tag {
  position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.92);
  padding: 3px 10px; border-radius: 20px; font-size: 11px; color: var(--text-1); font-weight: 500;
}
.pt-works .work-thumb .hover-info {
  position: absolute; inset: 0; background: rgba(0,0,0,.45); color: #fff;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
  opacity: 0; transition: opacity .2s; z-index: 1; pointer-events: none;
}
.pt-works .work-card:hover .hover-info { opacity: 1; }
.pt-works .hover-info .play { font-size: 28px; }
.pt-works .hover-info .meta { font-size: 12px; }
.pt-works .work-body { padding: 14px 14px 0; }
.pt-works .work-body h4 { font-size: 15px; margin-bottom: 6px; color: var(--text-1); }
.pt-works .work-body p {
  color: var(--text-2); font-size: 13px; line-height: 1.6; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pt-works .work-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 14px 14px; font-size: 12px; color: var(--text-3);
}
.pt-works a.author,
.pt-works .author {
  display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; min-width: 0;
}
.pt-works a.author:hover { color: var(--primary); }
.pt-works .work-meta .avatar {
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  overflow: hidden;
}
.pt-works .work-meta .avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block; background: #fff;
}
.pt-works .work-like-btn {
  border: 0; background: transparent; cursor: pointer; padding: 0;
  color: var(--text-3); font-size: 12px; line-height: 1; white-space: nowrap;
}
.pt-works .work-like-btn:hover,
.pt-works .work-like-btn.is-liked { color: #e11d48; }

.pt-works .works-empty {
  grid-column: 1 / -1; text-align: center; padding: 56px 20px;
  background: var(--bg-2); border-radius: 16px; color: var(--text-2);
}
.pt-works .works-empty h3 { color: var(--text-1); margin-bottom: 8px; }
.pt-works .works-empty p { margin-bottom: 16px; }

.pt-works aside {
  align-self: start;
  position: sticky;
  top: 88px;
  width: 240px;
}
.pt-works .side-card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 14px 12px; margin-bottom: 12px;
}
.pt-works .side-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--text-1); }
.pt-works .side-empty { font-size: 12px; color: var(--text-3); line-height: 1.55; margin: 0; }
.pt-works a.rank-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 0;
  border-bottom: 1px dashed var(--border); color: inherit; text-decoration: none; cursor: pointer;
}
.pt-works a.rank-item:last-child { border: 0; }
.pt-works a.rank-item:hover { opacity: .88; }
.pt-works .rank-num {
  width: 22px; height: 22px; border-radius: 6px; background: var(--bg-3); color: var(--text-2);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.pt-works .rank-list .rank-item:nth-child(1) .rank-num { background: #ff5f57; color: #fff; }
.pt-works .rank-list .rank-item:nth-child(2) .rank-num { background: #febc2e; color: #fff; }
.pt-works .rank-list .rank-item:nth-child(3) .rank-num { background: #28c840; color: #fff; }
.pt-works .rank-avatar {
  width: 26px; height: 26px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  overflow: hidden; padding: 0;
}
.pt-works .rank-avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block; background: #fff;
}
.pt-works .rank-info { flex: 1; min-width: 0; }
.pt-works .rank-info h5 {
  font-size: 13px; font-weight: 600; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pt-works .rank-info p { display: none; }
.pt-works .rank-info .works { font-size: 11px; color: var(--primary); font-weight: 600; }

.pt-works a.topic-item {
  display: block; padding: 8px 10px; background: var(--bg-2); border-radius: 8px;
  margin-bottom: 6px; text-decoration: none; color: inherit; cursor: pointer; transition: background .2s;
}
.pt-works a.topic-item:hover,
.pt-works a.topic-item.is-active { background: var(--primary-light); }
.pt-works .topic-item .hash { color: var(--primary); font-weight: 600; font-size: 13px; }
.pt-works .topic-item .num { font-size: 11px; color: var(--text-3); }

.pt-works .banner-cta { display: flex; align-items: flex-start; gap: 24px; }
.pt-works .page-banner .btn { text-decoration: none; }

body.pt-work-modal-open { overflow: hidden; }

.work-modal-mask {
  position: fixed; inset: 0; z-index: 800;
  display: none; align-items: center; justify-content: center;
  padding: 28px 18px;
  background: rgba(12, 18, 32, .62);
  backdrop-filter: blur(8px);
}
.work-modal-mask.is-open { display: flex; }
.work-modal-mask.is-open:not(:has(.work-modal))::after {
  content: "";
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,.28);
  border-top-color: #fff;
  border-radius: 50%;
  animation: workModalSpin .7s linear infinite;
}
@keyframes workModalSpin { to { transform: rotate(360deg); } }
.work-modal__dismiss {
  position: absolute; top: 16px; right: 18px; z-index: 2;
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.94); color: #1a2233;
  font-size: 26px; line-height: 1; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.16);
}
.work-modal__dismiss:hover { background: #fff; transform: rotate(90deg); }
.work-modal {
  width: min(1120px, 100%);
  height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .9fr);
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(8, 16, 40, .35);
  animation: workModalIn .28s ease;
}
@keyframes workModalIn {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.work-modal__media {
  position: relative;
  background: #121826;
  display: flex; align-items: center; justify-content: center;
  min-width: 0; min-height: 0;
}
.work-modal__media:not(.has-cover) {
  background: linear-gradient(135deg, #1d4ed8, #60a5fa);
}
.work-modal__media img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain; display: block;
}
.work-modal__media .tag {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: rgba(255,255,255,.94);
  padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; color: var(--text-1);
}
.work-modal__media .work-event {
  position: absolute; right: 12px; bottom: 12px; left: auto; top: auto; z-index: 2;
}
.work-modal__side {
  display: flex; flex-direction: column; min-width: 0; min-height: 0;
  background: #fff;
}
.work-modal__head { padding: 22px 22px 12px; flex: 0 0 auto; }
.work-modal__head h1 {
  font-size: 22px; line-height: 1.3; margin: 0 0 10px; color: var(--text-1);
}
.work-modal__meta {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-3);
}
.work-modal__meta .author {
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 48px; width: 48px; height: 48px; line-height: 0;
  text-decoration: none;
}
.work-modal__meta .avatar {
  width: 48px; height: 48px; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 48px; background: #fff;
}
.work-modal__meta .avatar img {
  width: 48px; height: 48px; object-fit: cover; display: block;
}
.work-modal__byline {
  display: flex; flex-direction: column; justify-content: center;
  gap: 4px; min-width: 0; line-height: 1;
}
.work-modal__byline .author-name {
  display: block;
  color: var(--text-1); text-decoration: none;
  font-size: 16px; font-weight: 600; line-height: 1;
}
.work-modal__byline .author-name:hover { color: var(--primary); }
.work-modal__facts {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 13px; line-height: 1; color: var(--text-3);
}
.work-modal__facts > span,
.work-modal__facts .work-like-btn {
  display: inline-flex; align-items: center;
  margin: 0; padding: 0; height: 16px; line-height: 1;
  border: 0; background: transparent;
}
.work-modal__meta .work-like-btn {
  font-size: 13px; color: inherit; cursor: pointer;
}
.work-modal__topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.work-modal__topics a {
  font-size: 12px; color: var(--primary); text-decoration: none;
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; background: #fff;
}
.work-modal__topics a:hover { border-color: var(--primary); }
.work-modal__scroll {
  flex: 1 1 auto; min-height: 0; overflow: auto;
  padding: 0 22px 12px;
}
.work-modal__summary {
  font-size: 14px; line-height: 1.7; color: var(--text-1);
  white-space: pre-wrap; margin: 0 0 16px;
}
.work-modal__empty,
.work-modal__hint { color: var(--text-3); font-size: 13px; margin: 0 0 12px; }
.work-modal__foot {
  flex: 0 0 auto;
  padding: 12px 22px 18px;
  border-top: 1px solid var(--border);
  background: #fff;
}
.work-modal__actions {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px;
}
.work-modal__actions .btn { text-decoration: none; }
.work-modal .work-comments h2 {
  font-size: 15px; margin: 0 0 10px; color: var(--text-1);
}
.work-modal .work-comments h2 span { font-weight: 500; color: var(--text-3); font-size: 13px; }
.work-modal .work-comments__login,
.work-modal .work-comments__empty { color: var(--text-3); font-size: 13px; margin: 0 0 8px; }
.work-modal .work-comments__login a { color: var(--primary); }
.work-modal .work-comments__form textarea {
  width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 10px; font: inherit; margin-bottom: 8px; resize: vertical;
  min-height: 64px;
}
.work-modal .work-comments__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.work-modal .work-comments__hint { font-size: 12px; color: var(--text-3); }
.work-modal .work-comments__pending {
  margin: 8px 0 0; font-size: 13px; color: #047857; background: #ecfdf5;
  border: 1px solid #a7f3d0; border-radius: 8px; padding: 8px 12px;
}
.work-modal .work-comment {
  padding: 12px 0; border-top: 1px solid var(--border);
}
.work-modal .work-comment:first-child { border-top: 0; padding-top: 0; }
.work-modal .work-comment__head {
  display: flex; align-items: center; gap: 10px; font-size: 15px; margin-bottom: 6px; line-height: 1;
}
.work-modal .work-comment__head .avatar {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 40px; background: #fff;
}
.work-modal .work-comment__head .avatar img {
  width: 40px; height: 40px; object-fit: cover; display: block;
}
.work-modal .work-comment__head strong,
.work-modal .work-comment__head time {
  display: inline-flex; align-items: center; line-height: 1;
}
.work-modal .work-comment__head strong { color: var(--text-1); }
.work-modal .work-comment__head time { color: var(--text-3); font-size: 12px; }
.work-modal .work-comment p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--text-1); white-space: pre-wrap; }

@media (max-width: 860px) {
  .work-modal-mask { padding: 0; align-items: stretch; }
  .work-modal {
    width: 100%; height: 100%;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(180px, 38vh) minmax(0, 1fr);
    border-radius: 0;
  }
  .work-modal__dismiss { top: 10px; right: 10px; }
  .work-modal__head { padding: 16px 16px 8px; }
  .work-modal__head h1 { font-size: 18px; }
  .work-modal__scroll, .work-modal__foot { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 1199px) {
  .pt-works .work-layout { grid-template-columns: 1fr; }
  .pt-works aside {
    position: static;
    width: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .pt-works .side-card { margin-bottom: 0; }
  .pt-works .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .pt-works .container { padding-left: 16px; padding-right: 16px; }
  .pt-works .pt-works-body { padding-top: 16px; padding-bottom: 48px; }
  .pt-works .filter-bar { flex-direction: column; align-items: stretch; }
  .pt-works .search-box { max-width: none; }
  .pt-works aside { grid-template-columns: 1fr; }
  .pt-works .works-grid { grid-template-columns: 1fr; }
  .pt-works .page-banner { padding-top: 36px; }
}
