.result-mini-click {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  border: 0;
  padding: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
  background: transparent;
}

.result-mini-click:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.result-mini:hover {
  background: #f7fbff;
}

.result-mini-actions {
  grid-column: 2 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.result-mini-actions .mini-detail-btn {
  margin-top: 0;
  cursor: pointer;
}

.mini-detail-btn.detail {
  border-color: #d8dee9;
  color: #1d4ed8;
  background: #eef4ff;
}

.mini-detail-btn.knowledge {
  border-color: #b7efd4;
  color: #00875a;
  background: #e8fff3;
}

.item-detail-page {
  min-height: 100vh;
  padding: 16px;
  color: var(--ink);
  background: var(--bg);
}

.item-detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.item-detail-state {
  color: var(--ok);
  font-size: 13px;
  font-weight: 700;
}

.item-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 35fr) minmax(0, 65fr);
  gap: 14px;
  align-items: start;
}

.item-post-pane,
.item-knowledge-pane {
  min-width: 0;
  max-height: calc(100vh - 74px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.pane-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.pane-head span {
  font-size: 15px;
  font-weight: 800;
}

.pane-head b {
  color: var(--muted);
  font-size: 12px;
}

.item-post-pane .src {
  margin: 12px;
}

.item-post-pane .src summary {
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.item-post-pane .srcbody {
  min-width: 0;
}

.item-post-pane .srcbody a {
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.item-post-pane .srcimgs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.item-post-pane .srcimgs img {
  width: 100%;
  max-height: min(42vh, 360px);
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f8fa;
  cursor: zoom-in;
}

.item-post-pane .srcvideo {
  margin-top: 10px;
}

.item-post-pane .srcvideo video {
  display: block;
  width: 100%;
  max-height: min(52vh, 520px);
  object-fit: contain;
  border-radius: 6px;
  background: #000;
}

.item-post-pane .src-original-text {
  margin-top: 12px;
  white-space: pre-wrap;
  color: #1f2937;
  font-size: 13px;
  line-height: 1.7;
}

.item-body-copy {
  margin: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.item-body-copy summary {
  cursor: pointer;
  padding: 10px 12px;
  color: #4e5969;
  font-weight: 700;
}

.item-body-copy div {
  white-space: pre-wrap;
  padding: 0 12px 12px;
  color: #1f2937;
  font-size: 13px;
  line-height: 1.7;
}

.item-read-result {
  background: #f8fafc;
}

.item-read-result summary {
  color: #0f766e;
}

.item-missing-original {
  padding: 12px;
  color: #86909c;
  font-size: 13px;
  font-weight: 700;
}

.item-knowledge-pane {
  padding-bottom: 12px;
}

.item-knowledge-pane .kcard {
  margin: 12px;
}

.item-knowledge-pane.legacy-decode-page {
  height: auto;
  min-height: 0;
  overflow: auto;
  background: var(--card);
  color: #111827;
}

.item-knowledge-pane.legacy-decode-page .pane-head {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.item-knowledge-pane.legacy-decode-page .kcard {
  width: auto;
  margin: 12px;
}

.item-knowledge-pane.legacy-decode-page .twrap {
  margin: 0;
}

.item-payload-modal-scope {
  height: 0;
  min-height: 0;
  overflow: visible;
}

.item-detail-page .item-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  align-items: center;
  justify-content: center;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.85);
  cursor: zoom-out;
}

.item-detail-page .item-lightbox img {
  display: block;
  max-width: 94vw;
  max-height: 94vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

.no-knowledge {
  display: grid;
  min-height: 260px;
  place-items: center;
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
}

@media (max-width: 1020px) {
  .item-detail-layout {
    grid-template-columns: 1fr;
  }

  .item-post-pane,
  .item-knowledge-pane {
    max-height: none;
  }
}
