#story_chapters-panel .panel-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

#story_chapters-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  background: #f5f7fb;
  border-bottom: 1px solid #e4e8ef;
  color: #334155;
  font-size: 12px;
}

#story_chapters-summary span {
  background: #ffffff;
  border: 1px solid #dde5f0;
  border-radius: 12px;
  padding: 4px 8px;
}

#story_chapters-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.story-card {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 10px;
  align-items: center;
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 1px 6px #00000010;
  cursor: pointer;
}

.story-card.selected {
  border-color: #0ea5a3;
  box-shadow: 0 0 0 2px #0ea5a333 inset;
}

.story-card.locked {
  opacity: 0.75;
  cursor: default;
}

.story-card-image {
  width: 84px;
  height: 116px;
  border-radius: 10px;
  background: linear-gradient(180deg, #dbeafe, #e2e8f0);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid #cfd8e3;
}

.story-card-image.no-image::after {
  content: "No image";
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 11px;
  color: #475569;
  background: rgba(255,255,255,0.55);
  border-radius: 10px;
}

.story-card-main {
  min-width: 0;
}

.story-card-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.story-card-title {
  font-weight: 700;
  color: #0f172a;
  min-width: 0;
}

.story-card-complete-icon {
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 1;
}

.story-card-meta {
  font-size: 12px;
  color: #475569;
  margin-bottom: 6px;
}

.story-card-sub {
  font-size: 11px;
  color: #64748b;
}

.story-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
  border: 1px solid transparent;
  white-space: nowrap;
}

.story-status-chip.available { background: #ecfdf5; color: #166534; border-color: #bbf7d0; }
.story-status-chip.active { background: #ecfeff; color: #155e75; border-color: #a5f3fc; }
.story-status-chip.completed { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; }
.story-status-chip.locked { background: #f8fafc; color: #64748b; border-color: #e2e8f0; }

#story_chapters-footer {
  justify-content: center;
  gap: 12px;
}

#story_chapters-open-quests-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
