*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1.1rem;
  line-height: 1.7;
  color: #1a1a1a;
  background: #faf9f7;
  max-width: 680px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

h1 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}

a {
  color: inherit;
}

button,
a > button {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: #faf9f7;
  background: #1a1a1a;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s;
}

button:hover,
a > button:hover {
  opacity: 0.75;
}

.editor-toolbar button {
  color: #1a1a1a;
  background: transparent;
  padding: 0;
  border-radius: 2px;
  font-size: 1rem;
}

input[type=text] {
  width: 100%;
  padding: 0.45rem 0.7rem;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
}

label {
  display: block;
  margin: 1rem 0 0.3rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #555;
}

ul {
  padding-left: 1.2rem;
}

li {
  margin: 0.4rem 0;
}

.stories-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}

.tag-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.3rem;
}

.tag-label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 1rem;
  font-weight: normal;
  color: #1a1a1a;
  cursor: pointer;
}

.tag-label input[type=checkbox] {
  cursor: pointer;
}

.tag-chip {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: #fff;
  margin-right: 0.4rem;
}

.character-title {
  color: #888;
  font-size: 0.95rem;
}

.character-title-line {
  color: #888;
  font-size: 1rem;
  margin: -1rem 0 1.2rem;
}

.character-list li,
.stories-list li {
  margin-bottom: 1rem;
}

.pagination {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

select {
  padding: 0.45rem 0.7rem;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
}

.relationship-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.relationship-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.relationship-form input[type=text] {
  width: auto;
  flex: 1;
  min-width: 160px;
}

.EasyMDEContainer {
  overflow: visible;
}

.editor-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
}
