.sr .card {
  margin-bottom: 22px;
}
.sr-prompt {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 26px;
}
.sr-prompt p {
  margin: 9px 0;
  color: #7a898e;
}
.sr-prompt pre {
  white-space: pre-wrap;
  line-height: 1.8;
  max-height: 330px;
  overflow: auto;
  font: inherit;
}
.sr-link {
  background: none;
  border: 0;
  padding: 0;
  color: #20333b;
  text-align: left;
}
.sr-tools,
.sr-actions,
.sr-tabs,
.sr-pages {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sr-tools input {
  flex: 1;
  min-width: 220px;
}
.sr-tabs {
  margin: 20px 0 14px;
}
.sr-tabs button {
  padding: 10px 15px;
}
.sr-divider {
  border-left: 1px solid #dbe3e1;
  height: 26px;
}
.sr-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0;
}
.sr-item {
  border: 1px solid #dfe8e5;
  border-radius: 16px;
  padding: 22px;
  background: #fcfdfc;
  transition: box-shadow 0.15s;
}
.sr-item:hover {
  box-shadow: 0 5px 20px #192b3410;
}
.sr-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: #7b8b90;
  font-size: 13px;
}
.sr-title {
  border: 0;
  background: none;
  padding: 12px 0;
  text-align: left;
  font-size: 19px;
  font-weight: 700;
  color: #20333b;
}
.sr-star {
  padding: 0;
  background: none;
  border: 0;
  font-size: 25px;
  color: #c8794f;
}
.sr-excerpt {
  color: #798a8c;
  line-height: 1.6;
  min-height: 50px;
  overflow-wrap: anywhere;
}
.sr-pages {
  justify-content: center;
}
.sr-detail,
.sr-editor {
  color: #20333b;
}
.sr-detail h2 {
  line-height: 1.5;
}
.sr-detail section {
  margin: 28px 0;
}
.sr-detail .sr-actions {
  margin: 15px 0;
}
.sr-rich {
  line-height: 1.9;
  overflow-wrap: anywhere;
  user-select: text;
}
.sr-rich p {
  margin: 0.5em 0;
}
.sr-rich a {
  color: #2b7979;
}
.sr-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 16px 0;
}
.sr-media {
  margin: 0;
  border: 1px solid #e2e9e7;
  border-radius: 14px;
  padding: 12px;
  overflow: hidden;
}
.sr-media img {
  width: 100%;
  height: 190px;
  object-fit: contain;
}
.sr-thumb {
  padding: 0;
  width: 100%;
  border: 0;
  background: #f3f6f5;
}
.sr-video-poster {
  height: 180px;
  width: 100%;
  background: #20333b;
  color: white;
  font-size: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.sr-video-poster span {
  font-size: 14px;
  margin-top: 12px;
}
.sr-media video {
  width: 100%;
  max-height: 360px;
  background: #18252c;
}
.sr-media figcaption {
  font-size: 12px;
  overflow-wrap: anywhere;
  margin: 10px 0;
  color: #7b8b90;
}
.sr-media .sr-actions > * {
  font-size: 12px;
  padding: 9px;
}
.sr-related {
  display: inline-block;
  border: 1px solid #e0e7e4;
  border-radius: 8px;
  padding: 9px;
  margin: 5px;
  background: #f5f8f7;
}
.sr-editor label {
  display: block;
  margin: 22px 0 9px;
  font-weight: 600;
}
.sr-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.sr-rich-input {
  min-height: 100px;
  max-height: 450px;
  overflow: auto;
  border: 1px solid #dce5e2;
  border-radius: 0 0 10px 10px;
  padding: 15px;
  line-height: 1.8;
  user-select: text;
}
.sr-rich-input:focus {
  outline: 2px solid #da886a;
}
.sr-format {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 7px;
  background: #f1f5f3;
  border-radius: 10px 10px 0 0;
}
.sr-format button {
  font-size: 12px;
  padding: 6px 10px;
}
.sr-editor #srUploadStatus {
  padding: 12px 0;
  color: #8d6452;
}
.sr-history {
  padding: 18px;
  border-bottom: 1px solid #dce5e2;
}
.sr-history summary {
  cursor: pointer;
}
.sr-category-row {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 10px;
  margin: 14px 0;
}
.sr-conflict {
  border: 1px solid #d59c53;
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0;
}
.sr-redact {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #142029ed;
  display: grid;
  place-items: center;
  padding: 20px;
}
.sr-redact > div {
  max-width: 95vw;
  max-height: 95vh;
  overflow: auto;
  background: white;
  padding: 20px;
  border-radius: 15px;
}
.sr-redact canvas {
  max-width: 85vw;
  max-height: 65vh;
  touch-action: none;
  cursor: crosshair;
}
.sr-redact .sr-actions {
  margin-top: 15px;
}
@media (max-width: 1200px) {
  .sr-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .sr-grid,
  .sr-media-grid,
  .sr-two {
    grid-template-columns: 1fr;
  }
  .sr-prompt {
    flex-direction: column;
  }
  .sr-tools {
    align-items: stretch;
  }
  .sr-category-row {
    grid-template-columns: 1fr;
  }
  .sr-tools input {
    min-width: 100px;
  }
}
.sr-rich img,
.sr-rich-input img {
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
}
.sr-video-poster {
  position: relative;
  overflow: hidden;
}
.sr-video-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.65;
}
.sr-video-poster span {
  position: relative;
  background: #18252cbd;
  padding: 8px;
  border-radius: 7px;
}
.modal:has(.sr-editor),
.modal:has(.sr-detail) {
  width: min(1000px, 95vw);
  max-width: 1000px;
}
.sr-prompt #srPromptSummary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
