.kennel-view {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
  background: #050505;
}

.kennel-view.hidden {
  display: none !important;
}

.is-kennel-room .layout-toolbar,
.is-kennel-room .mobile-nav,
.is-kennel-room .conversation-stack,
.is-kennel-room #smile-panel,
.is-kennel-room #tools-panel,
.is-kennel-room #mod-tools,
.is-kennel-room .chat-footer {
  display: none !important;
}

.kennel-topics-pane,
.kennel-thread-pane {
  min-width: 0;
  min-height: 0;
}

.kennel-topics-pane {
  display: flex;
  width: min(42%, 520px);
  flex: 0 0 min(42%, 520px);
  flex-direction: column;
  border-right: 1px solid #222;
  background:
    linear-gradient(180deg, rgba(89, 54, 18, 0.08), transparent 180px),
    #080808;
}

.kennel-thread-pane {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
  background: #030303;
}

.kennel-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 15px;
  flex: 0 0 auto;
  border-bottom: 1px solid #242424;
  background: rgba(16, 13, 9, 0.96);
}

.kennel-pane-header h2 {
  margin: 0;
  color: #f3d8a0;
  font-size: 18px;
}

.kennel-pane-header p {
  margin: 4px 0 0;
  color: #8b8173;
  font-size: 12px;
  line-height: 1.4;
}

.kennel-topic-list {
  min-height: 0;
  padding: 10px;
  flex: 1 1 auto;
  overflow-y: auto;
}

.kennel-topic-card {
  width: 100%;
  margin: 0 0 9px;
  padding: 12px 13px;
  border: 1px solid #26231f;
  border-radius: 11px;
  background: #10100f;
  color: #ddd;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 120ms ease,
    background 120ms ease,
    transform 120ms ease;
}

.kennel-topic-card:hover,
.kennel-topic-card:focus-visible {
  border-color: #765b2d;
  background: #16130f;
  outline: none;
}

.kennel-topic-card.is-active {
  border-color: #c9953f;
  background: #1a140c;
  box-shadow: inset 3px 0 0 #c9953f;
}

.kennel-topic-card__meta,
.kennel-reply__meta,
.kennel-thread-topic__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #7f7b73;
  font-size: 11px;
}

.kennel-topic-card__author,
.kennel-reply__author,
.kennel-thread-topic__author {
  font-weight: 800;
}

.kennel-topic-card__text {
  display: -webkit-box;
  margin-top: 8px;
  overflow: hidden;
  color: #e7e2d9;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.kennel-topic-card__footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  color: #9c8c70;
  font-size: 11px;
}

.kennel-empty,
.kennel-thread-empty {
  color: #777066;
}

.kennel-empty {
  margin: 24px 10px;
  text-align: center;
}

.kennel-thread-empty {
  display: grid;
  min-height: 100%;
  place-content: center;
  text-align: center;
}

.kennel-thread-empty > span {
  font-size: 54px;
}

.kennel-thread-empty strong {
  margin-top: 8px;
  color: #b8aa91;
  font-size: 17px;
}

.kennel-thread-empty p {
  margin: 5px 0 0;
}

.kennel-thread-content {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

.kennel-thread-content.hidden {
  display: none !important;
}

.kennel-thread-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 43px;
  padding: 7px 14px;
  flex: 0 0 auto;
  border-bottom: 1px solid #222;
  background: #0a0a0a;
}

.kennel-back {
  border: 0;
  background: transparent;
  color: #b99a66;
  cursor: pointer;
  font: inherit;
}

.kennel-thread-count {
  color: #777;
  font-size: 12px;
}

.kennel-thread-topic {
  padding: 17px 18px;
  flex: 0 0 auto;
  border-bottom: 1px solid #29241d;
  background:
    linear-gradient(90deg, rgba(173, 117, 38, 0.08), transparent 58%),
    #0d0c0a;
}

.kennel-thread-topic__text {
  margin: 9px 0 0;
  color: #f0ece4;
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.kennel-replies {
  min-height: 0;
  padding: 8px 14px 14px;
  flex: 1 1 auto;
  overflow-y: auto;
}

.kennel-reply {
  padding: 11px 4px 12px;
  border-bottom: 1px solid #1d1d1d;
}

.kennel-reply__text {
  margin: 6px 0 0;
  color: #ddd;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.kennel-reply-form {
  padding: 10px 14px 12px;
  flex: 0 0 auto;
  border-top: 1px solid #262626;
  background: #090909;
}

.kennel-reply-form label {
  display: block;
  margin-bottom: 5px;
  color: #8d867d;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

#kennel-reply-text,
#kennel-topic-text {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  border: 1px solid #34302a;
  border-radius: 9px;
  background: #080808;
  color: #eee;
  font: inherit;
  line-height: 1.45;
}

#kennel-reply-text {
  min-height: 72px;
  max-height: 180px;
  padding: 9px 10px;
}

#kennel-topic-text {
  min-height: 140px;
  padding: 11px 12px;
}

#kennel-reply-text:focus,
#kennel-topic-text:focus {
  border-color: #9a6f2e;
  outline: 2px solid rgba(201, 149, 63, 0.12);
}

.kennel-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
}

#kennel-reply-counter,
#kennel-topic-counter {
  color: #6f6b65;
  font-size: 11px;
}

.kennel-feedback {
  min-height: 17px;
  margin: 5px 0 0;
  color: #d3a867;
  font-size: 12px;
}

:root[data-theme="light"] .kennel-view,
:root[data-theme="light"] .kennel-thread-pane {
  background: #f5f1e9;
}

:root[data-theme="light"] .kennel-topics-pane {
  border-right-color: #d7cdbf;
  background: #eee7db;
}

:root[data-theme="light"] .kennel-pane-header,
:root[data-theme="light"] .kennel-thread-header,
:root[data-theme="light"] .kennel-reply-form {
  border-color: #d8cec0;
  background: #f2ece3;
}

:root[data-theme="light"] .kennel-topic-card {
  border-color: #d3c4b0;
  background: #fffdf9;
  color: #333;
}

:root[data-theme="light"] .kennel-topic-card__text,
:root[data-theme="light"] .kennel-thread-topic__text,
:root[data-theme="light"] .kennel-reply__text {
  color: #29231d;
}

:root[data-theme="light"] .kennel-thread-topic {
  border-color: #ddcfbd;
  background: #fffaf2;
}

:root[data-theme="light"] #kennel-reply-text,
:root[data-theme="light"] #kennel-topic-text {
  border-color: #cdbda8;
  background: #fff;
  color: #222;
}

@media (max-width: 768px) {
  .is-kennel-room .chat-main {
    height: 100dvh;
  }

  .kennel-view {
    position: relative;
  }

  .kennel-topics-pane,
  .kennel-thread-pane {
    width: 100%;
    flex-basis: 100%;
  }

  .kennel-thread-pane {
    display: none;
  }

  .kennel-view.is-thread-open .kennel-topics-pane {
    display: none;
  }

  .kennel-view.is-thread-open .kennel-thread-pane {
    display: flex;
  }

  .kennel-pane-header {
    padding: 10px;
  }

  .kennel-pane-header h2 {
    font-size: 16px;
  }

  .kennel-pane-header p {
    max-width: 210px;
    font-size: 11px;
  }

  .kennel-topic-list {
    padding: 8px;
  }

  .kennel-thread-topic {
    padding: 14px 12px;
  }

  .kennel-replies {
    padding: 6px 10px 10px;
  }

  .kennel-reply-form {
    padding: 8px 10px 10px;
  }
}

@media (min-width: 769px) {
  .kennel-back {
    visibility: hidden;
  }
}


.kennel-thread-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kennel-share-button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #5a4729;
  border-radius: 8px;
  background: #17120b;
  color: #d9b77b;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.kennel-share-button:hover,
.kennel-share-button:focus-visible {
  border-color: #b8863b;
  background: #21170b;
  color: #ffe0a8;
  outline: none;
}

.kennel-share-notice {
  color: #9f8f77 !important;
  font-size: 12px !important;
}

.kennel-share-dialog {
  max-width: calc(100vw - 28px);
  overflow-x: hidden;
}

.kennel-share-dialog__window {
  width: min(100%, 620px);
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.kennel-share-preview-wrap {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 220px;
  padding: 16px 18px;
  overflow-x: hidden;
  place-items: center;
  background: #070707;
}

.kennel-share-status {
  margin: 0;
  color: #8f887f;
  text-align: center;
}

.kennel-share-preview {
  display: block;
  width: min(100%, 430px);
  max-width: 100%;
  min-width: 0;
  max-height: 62vh;
  border: 1px solid #30271b;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.42);
}

.kennel-share-actions {
  flex-wrap: wrap;
}

:root[data-theme="light"] .kennel-share-button {
  border-color: #c8ac7f;
  background: #fff8eb;
  color: #76501f;
}

:root[data-theme="light"] .kennel-share-preview-wrap {
  background: #ece4d8;
}

@media (max-width: 768px) {
  .kennel-thread-header {
    gap: 8px;
  }

  .kennel-thread-actions {
    gap: 7px;
  }

  .kennel-thread-count {
    display: none;
  }

  .kennel-share-button {
    min-height: 34px;
    padding: 0 9px;
  }

  .kennel-share-dialog {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
  }

  .kennel-share-dialog__window {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .kennel-share-preview-wrap {
    padding: 10px;
  }

  .kennel-share-preview {
    width: min(100%, 390px);
    max-height: 58vh;
  }

  .kennel-share-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .kennel-share-actions .btn {
    width: 100%;
  }
}
