.ql-editor {
  min-height: 200px;
  font-size: 15px;
  line-height: 1.6;
}

.ql-toolbar.ql-snow,
.ql-container.ql-snow {
  border-color: #d8cbbb;
}

.ql-toolbar.ql-snow {
  border-radius: 12px 12px 0 0;
  background: #f2ebe2;
}

.ql-container.ql-snow {
  border-radius: 0 0 12px 12px;
  background: #fdf9f4;
  color: #2d2723;
}

:root[data-theme='dark'] .ql-toolbar.ql-snow,
:root[data-theme='dark'] .ql-container.ql-snow {
  border-color: #3a3352;
}

:root[data-theme='dark'] .ql-toolbar.ql-snow {
  background: #26203a;
}

:root[data-theme='dark'] .ql-container.ql-snow {
  background: #1f1a31;
  color: #ece5ff;
}

:root[data-theme='dark'] .post-card,
:root[data-theme='dark'] .post-main {
  background: #1f1a31;
  border-color: #3a3352;
}

:root[data-theme='dark'] .post-side {
  background: #241e38;
  border-right-color: #3a3352;
}

:root[data-theme='dark'] .post-author {
  color: #f0e9ff;
}

:root[data-theme='dark'] .post-date {
  color: #b8afd4;
}

:root[data-theme='dark'] .post-role,
:root[data-theme='dark'] .post-kind-tag {
  background: #2a2340;
  border-color: #4a4067;
  color: #dad0f8;
}

:root[data-theme='dark'] .kebab-menu > summary {
  border-color: #473d63;
  background: #2b2340;
  color: #e7deff;
}

:root[data-theme='dark'] .kebab-menu[open] > summary {
  border-color: #5b4f79;
  background: #342a4b;
}

:root[data-theme='dark'] .kebab-dropdown {
  background: #211b33;
  border-color: #473d63;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

:root[data-theme='dark'] .kebab-link {
  background: #2a2340;
  border-color: #473d63;
  color: #ece5ff;
}

:root[data-theme='dark'] .kebab-link:hover,
:root[data-theme='dark'] .kebab-link:focus-visible {
  background: #332a4b;
}

:root[data-theme='dark'] .kebab-link.danger {
  color: #ffb3b3;
  border-color: #714747;
  background: #412424;
}

:root[data-theme='dark'] .kebab-link.danger:hover,
:root[data-theme='dark'] .kebab-link.danger:focus-visible {
  background: #512c2c;
}

:root[data-theme='dark'] .post-body {
  color: #f0e9ff;
}

:root[data-theme='dark'] .post-body pre {
  background: #2a233f;
  border-color: #4a4067;
  color: #e9e1ff;
}

:root[data-theme='dark'] .post-body blockquote {
  border-left-color: #df6464;
  background: #342435;
  color: #f0d8e8;
}

:root[data-theme='dark'] .embed-image,
:root[data-theme='dark'] .embed-youtube {
  border-color: #4a4067;
  background: #241f37;
}

:root[data-theme='dark'] .complaint-item,
:root[data-theme='dark'] .appeal-verdict-card,
:root[data-theme='dark'] .appeal-mod-note,
:root[data-theme='dark'] .appeal-secret,
:root[data-theme='dark'] .appeal-secret-note-row,
:root[data-theme='dark'] .profile-stat,
:root[data-theme='dark'] .profile-list li,
:root[data-theme='dark'] .mod-output {
  background: #241e38;
  border-color: #4a4067;
  color: #ece5ff;
}

:root[data-theme='dark'] .complaint-key,
:root[data-theme='dark'] .payload-pre,
:root[data-theme='dark'] .appeal-secret-note-row summary,
:root[data-theme='dark'] .profile-stat-value {
  color: #ece5ff;
}

:root[data-theme='dark'] .form-inline input,
:root[data-theme='dark'] .form-inline select,
:root[data-theme='dark'] .form-inline textarea,
:root[data-theme='dark'] .form-grid input,
:root[data-theme='dark'] .form-grid select,
:root[data-theme='dark'] .form-grid textarea {
  border-color: #4a4067;
  background: #1f1a31;
  color: #ece5ff;
}

.post-card {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 0;
  margin-bottom: 14px;
  border: 1px solid #dacfc1;
  border-radius: 16px;
  overflow: visible;
  background: #fbf7f2;
  position: relative;
  z-index: 0;
}

.post-side {
  border-right: 1px solid #e1d5c7;
  background: #f1eae2;
  padding: 14px 12px;
  text-align: center;
}

.post-avatar {
  width: 88px;
  height: 88px;
  border-radius: 14px;
  border: 1px solid #d4c6e3;
  object-fit: cover;
  margin-bottom: 10px;
}

.post-author {
  font-weight: 700;
  font-size: 15px;
  word-break: break-word;
  color: #3a312a;
}

.post-role {
  color: #7a6f64;
  font-size: 12px;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid #d7cabd;
  border-radius: 999px;
  padding: 2px 8px;
  background: #f8f1e8;
}

.post-main {
  padding: 14px;
  background: #fbf7f2;
}

.post-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.post-meta-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.post-date {
  color: #827568;
  font-size: 12px;
}

.post-kind-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid #deceb9;
  border-radius: 999px;
  background: #f3e8dc;
  color: #6f5848;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
}

.post-card-starter {
  border-left: 3px solid #c98952;
}

.topic-stream-block {
  margin-bottom: 14px;
}

.topic-stream-block .bd {
  padding: 12px;
}

.topic-replies-list {
  display: grid;
  gap: 10px;
}

.topic-stream-block .post-card,
.topic-replies-list .post-card {
  margin-bottom: 0;
}

.page-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.topic-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kebab-menu {
  position: relative;
  display: inline-block;
}

.kebab-menu > summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid #d8cabd;
  background: #f8f1e8;
  border-radius: 10px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  color: #6c5a4c;
}

.kebab-menu > summary::-webkit-details-marker {
  display: none;
}

.kebab-menu[open] > summary {
  border-color: #c8b59d;
  background: #f2e7db;
}

.kebab-menu[open] {
  z-index: 60;
}

.kebab-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  border: 1px solid #d8cabd;
  border-radius: 12px;
  background: #fdf8f2;
  box-shadow: 0 10px 24px rgba(39, 27, 18, 0.15);
  padding: 8px;
  z-index: 25;
  display: grid;
  gap: 6px;
}

.kebab-dropdown form {
  margin: 0;
}

.kebab-dropdown select {
  min-height: 34px;
}

.kebab-link {
  width: 100%;
  text-align: left;
  border: 1px solid #ddd0c3;
  background: #f8f1e8;
  border-radius: 10px;
  color: #463a31;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
}

.kebab-link:hover,
.kebab-link:focus-visible {
  background: #f1e6da;
}

.kebab-link.danger {
  color: #8a2f2f;
  border-color: #e7c7c7;
  background: #f9ecec;
}

.kebab-link.danger:hover,
.kebab-link.danger:focus-visible {
  background: #f4dede;
}

.post-body {
  line-height: 1.65;
  color: #2f2822;
  overflow-wrap: anywhere;
}

.post-body p {
  margin: 0 0 10px;
}

.post-body pre {
  margin: 10px 0;
  background: #efe6dc;
  border: 1px solid #d8c9b8;
  border-radius: 10px;
  padding: 10px;
  overflow: auto;
}

.post-body blockquote {
  margin: 10px 0;
  border-left: 3px solid #d24b4b;
  background: #f5e9e6;
  padding: 10px 12px;
  color: #5d4a4a;
}

.post-embeds {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.embed-image {
  max-width: min(100%, 700px);
  border: 1px solid #d9cbbe;
  border-radius: 12px;
}

.embed-youtube {
  width: 100%;
  max-width: 760px;
  min-height: 380px;
  border: 1px solid #d3c6b9;
  border-radius: 12px;
  background: #f6f0e8;
}

.complaint-payload-card {
  margin-bottom: 14px;
}

.complaint-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.complaint-item {
  border: 1px solid #ddd1c3;
  border-radius: 10px;
  background: #f8f1e8;
  padding: 9px 10px;
}

.complaint-key {
  color: #846f5b;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}

.payload-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #3a3028;
  font-size: 12px;
}

.appeal-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.appeal-verdict-card {
  margin-top: 12px;
  border: 1px solid #dbc9c1;
  border-radius: 10px;
  background: #f7ebe7;
  padding: 10px 12px;
}

.appeal-mod-note {
  border: 1px solid #ddd0c4;
  border-radius: 10px;
  background: #f8f2ea;
  padding: 8px 10px;
}

.appeal-secret {
  margin-top: 12px;
  border: 1px dashed #d6bcb2;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff8f5;
}

.appeal-secret summary {
  cursor: pointer;
  font-weight: 600;
}

.mod-grid {
  display: grid;
  gap: 10px;
}

.form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.form-inline input,
.form-inline select,
.form-inline textarea,
.form-grid input,
.form-grid select,
.form-grid textarea {
  min-height: 38px;
  border: 1px solid #d4c5b5;
  border-radius: 12px;
  background: #fcf8f3;
  color: #2e2823;
  padding: 8px 10px;
}

.form-inline textarea,
.form-grid textarea {
  min-height: 120px;
  width: 100%;
}

.form-grid {
  display: grid;
  gap: 10px;
}

.appeal-secret-note-row {
  border: 1px dashed #d7c8ba;
  border-radius: 10px;
  background: #fbf6f1;
  padding: 8px 10px;
}

.appeal-secret-note-row summary {
  cursor: pointer;
  color: #665548;
  font-size: 13px;
  font-weight: 600;
}

.appeal-secret-note-row textarea {
  margin-top: 10px;
}

.appeal-mod-output {
  margin-top: 8px;
}

.form-inline.compact input,
.form-inline.compact select,
.form-inline.compact textarea {
  width: auto;
  min-width: 130px;
}

.form-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.topic-tags-inline {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 8px;
}

.topic-tags-top {
  margin-left: 0;
  margin-bottom: 6px;
}

:root[data-theme='dark'] .topic-tags-inline .topic-tag-pill {
  background: #2a233f !important;
  border-color: #5b4f7a !important;
  color: #ece4ff !important;
}

:root[data-theme='dark'] .topic-tags-inline .topic-tag-pill:hover,
:root[data-theme='dark'] .topic-tags-inline .topic-tag-pill:focus-visible {
  background: #352b4f !important;
  border-color: #72619a !important;
  color: #ffffff !important;
}

.appeal-test-row {
  display: grid;
  gap: 6px;
}

.mod-output {
  margin-top: 10px;
  background: #f8f1e8;
  color: #2f2823;
  border: 1px solid #d5c8b8;
  border-radius: 10px;
  padding: 10px;
  max-height: 300px;
  overflow: auto;
}

.template-group {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #ded2c4;
}

.template-group h4 {
  margin: 4px 0 10px;
}

.profile-overview {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  align-items: center;
}

.profile-main-avatar {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  border: 1px solid #d8cabd;
  object-fit: cover;
  background: #f4ece2;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-stat {
  border: 1px solid #ddd2c4;
  border-radius: 12px;
  background: #f8f2ea;
  padding: 10px 12px;
}

.profile-stat-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  color: #3c3128;
}

.profile-lists-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-avatar-settings {
  margin-top: 14px;
}

.profile-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.profile-list li {
  border: 1px solid #e0d4c7;
  border-radius: 10px;
  background: #fcf8f3;
  padding: 9px 10px;
}

@media (max-width: 900px) {
  .post-card {
    grid-template-columns: 1fr;
  }

  .post-side {
    display: flex;
    align-items: center;
    text-align: left;
    gap: 10px;
    border-right: 0;
    border-bottom: 1px solid #ddd1c3;
  }

  .post-avatar {
    width: 46px;
    height: 46px;
    margin: 0;
  }

  .embed-youtube {
    min-height: 220px;
  }

  .profile-overview {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-main-avatar {
    margin: 0 auto;
  }

  .profile-stats-grid {
    grid-template-columns: 1fr;
  }

  .profile-lists-grid {
    grid-template-columns: 1fr;
  }

  .kebab-dropdown {
    min-width: 190px;
  }
}
