/* ============================================================
   Single prompt + collection reader
   ============================================================ */

.pn-single-prompt {
  padding-top: 24px;
  padding-bottom: 100px;
}

.detail-wrapper {
  display: grid;
  gap: 28px;
  align-items: start;
}
@media (min-width: 900px) {
  .detail-wrapper {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

.image-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border-soft);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
@media (max-width: 899px) {
  .image-card { position: static; }
}

.image-wrapper {
  position: relative;
  cursor: zoom-in;
  background: var(--bg-muted);
}
.image-wrapper img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  margin: 0 auto;
}
.model-badge-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(8px);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-main) !important;
  text-decoration: none !important;
  box-shadow: var(--shadow-sm);
}
.image-overlay-like {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  border-radius: var(--radius-full);
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
}
.image-overlay-like.is-liked,
.image-overlay-like:hover { color: #fb7185; }
.zoom-hint {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  pointer-events: none;
}
.image-stats {
  display: flex;
  justify-content: space-around;
  padding: 12px 16px;
  font-size: 0.8rem;
  color: var(--text-sub);
  font-weight: 600;
  border-top: 1px solid var(--glass-border-soft);
  gap: 12px;
  flex-wrap: wrap;
}

.info-card {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.meta-header {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 10px;
}
.info-card .title {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-heading);
}
.info-card .desc {
  margin: 0;
  color: var(--text-sub);
  font-size: 0.95rem;
  line-height: 1.65;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--glass-border-soft);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-val {
  display: block;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-heading);
  margin-bottom: 2px;
}
.stat-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.pn-like-stat { cursor: pointer; }
.pn-like-stat:hover .stat-val { color: var(--primary); }

.prompt-box {
  background: var(--bg-card);
  border: 1px solid var(--glass-border-soft);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.prompt-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 10px;
}
.prompt-label {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-sub);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-copy-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary-gradient);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  font-family: inherit;
}
.pn-face-tip {
  font-size: 0.8rem;
  color: var(--secondary-dark);
  background: var(--secondary-soft);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin: 0 0 12px;
  line-height: 1.45;
}
[data-theme="dark"] .pn-face-tip { color: var(--secondary); }
.prompt-box .prompt-text {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg-muted);
  padding: 14px;
  border-radius: var(--radius-sm);
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 14px;
  font-weight: 500;
}
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.action-row .btn { flex: 1; min-width: 140px; }

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pn-tags-label { display: block; margin-bottom: 10px; }
.tag-pill {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-muted);
  border: 1px solid var(--glass-border-soft);
  color: var(--text-sub);
  font-size: 0.8rem;
  font-weight: 600;
}
.tag-pill:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
}

/* Sticky copy bar (mobile) */
.pn-sticky-copy {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--bottom-nav-h) + 10px);
  z-index: calc(var(--z-bottom-nav) - 1);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all var(--duration) var(--ease-out);
}
.pn-sticky-copy.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
@media (min-width: 901px) {
  .pn-sticky-copy { display: none; }
}

/* —— Collection reader —— */
.read-container {
  width: min(100% - 32px, var(--container-max));
  margin: 0 auto;
  padding: 28px 0 60px;
}
.read-header { text-align: center; margin-bottom: 36px; }
.read-header .pn-breadcrumb { justify-content: center; }
.read-meta-pill {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  background: var(--bg-card);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border-soft);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 16px;
}
.read-title {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 14px;
  color: var(--text-heading);
  letter-spacing: -0.02em;
}
.pn-cat-chip {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.8rem;
}

.read-grid-layout {
  display: grid;
  gap: 32px;
}
@media (min-width: 1024px) {
  .read-grid-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
  }
}

.screenshot-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--glass-border-soft);
}
.screenshot-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  background: var(--bg-muted);
}

.pn-gallery-heading {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 24px;
  color: var(--text-heading);
}

.pn-collection-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border-soft);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.pn-collection-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.pn-collection-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-gradient);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.pn-collection-card-head h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.35;
  padding-top: 6px;
}
.pn-collection-figure {
  margin: 0 0 16px;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.pn-collection-figure img {
  width: 100%;
  cursor: zoom-in;
  background: var(--bg-muted);
}
.pn-prompt-card-native {
  background: var(--bg-muted);
  border: 1px solid var(--glass-border-soft);
  padding: 16px;
  border-radius: var(--radius-md);
}
.pn-prompt-body {
  margin: 0 0 14px;
  font-size: 0.9rem;
  line-height: 1.65;
  white-space: pre-wrap;
  color: var(--text-main);
  font-weight: 500;
}
.pn-copy-btn { width: 100%; }

.pn-overview {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 2px solid var(--primary);
}
.pn-overview h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 12px;
}
.pn-overview-body {
  color: var(--text-sub);
  line-height: 1.8;
  font-size: 1rem;
}

/* TOC sidebar */
.pn-sticky-panel {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  background: var(--bg-card);
  border: 1px solid var(--glass-border-soft);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.pn-toc h3 {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 800;
}
.pn-toc-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.85rem;
  color: var(--text-sub);
}
.pn-toc-list li { margin-bottom: 8px; }
.pn-toc-list a {
  color: var(--text-sub);
  font-weight: 600;
}
.pn-toc-list a:hover { color: var(--primary); }

@media (max-width: 1023px) {
  .read-sidebar .pn-toc { display: none; }
}
