.npc-notes-panel {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.npc-notes-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.npc-notes-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;

  color: #3a2720;
  background: rgba(255, 250, 242, 0.76);
  border: 1px solid #c4ae91;
  border-radius: 999px;

  font-size: 0.86rem;
  font-weight: 850;
}

.npc-notes-toggle:hover {
  background: #f4dfbd;
}

.npc-notes-count,
.npc-note-helper {
  color: #776657;
  font-size: 0.8rem;
  font-weight: 750;
}

.vampire-sheet-app .npc-notes-toggle {
  color: #f0d7b0;
  background: rgba(20, 14, 16, 0.74);
  border-color: rgba(179, 144, 96, 0.44);
}

.vampire-sheet-app .npc-notes-toggle:hover {
  background: rgba(65, 31, 33, 0.84);
}

.vampire-sheet-app .npc-notes-count,
.vampire-sheet-app .npc-note-helper {
  color: #c9b9aa;
}

.npc-note-form,
.sheet-chat-form {
  display: grid;
  gap: 8px;
}

.npc-note-form {
  padding: 12px;

  background: rgba(255, 250, 242, 0.72);
  border: 1px solid #d2c5b4;
  border-radius: 8px;
}

.vampire-sheet-app .npc-note-form {
  background: rgba(10, 8, 10, 0.48);
  border-color: rgba(179, 144, 96, 0.34);
}

.npc-note-form textarea,
.sheet-chat-form textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;

  color: #1d1713;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #b7ab9b;
  border-radius: 6px;

  line-height: 1.45;
  resize: vertical;
}

.npc-note-form textarea {
  min-height: 84px;
}

.sheet-chat-form textarea {
  min-height: 58px;
  max-height: 120px;
}

.npc-note-form button,
.sheet-chat-form button {
  justify-self: start;
}

.npc-note-list {
  display: grid;
  gap: 8px;
}

.npc-note-card {
  display: grid;
  gap: 7px;
  padding: 11px;

  background: rgba(255, 255, 255, 0.56);
  border: 1px solid #d8ccbb;
  border-radius: 7px;
}

.vampire-sheet-app .npc-note-card {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(179, 144, 96, 0.24);
}

.npc-note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}

.npc-note-meta strong {
  color: #241716;
}

.vampire-sheet-app .npc-note-meta strong {
  color: #f0d7b0;
}

.npc-note-meta span {
  color: #756553;
  font-size: 0.8rem;
}

.vampire-sheet-app .npc-note-meta span {
  color: #bfaea3;
}

.npc-note-meta button {
  min-height: 28px;
  margin-left: auto;
  padding: 0 8px;

  color: #842222;
  background: transparent;
  border-color: rgba(132, 34, 34, 0.34);

  font-size: 0.78rem;
}

.npc-note-meta button + button {
  margin-left: 0;
}

.npc-note-edit-form {
  display: grid;
  gap: 8px;
}

.npc-note-edit-form textarea {
  width: 100%;
  min-height: 108px;
  padding: 10px 12px;
  box-sizing: border-box;

  color: #1d1713;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #b7ab9b;
  border-radius: 6px;

  font: inherit;
  line-height: 1.45;
  resize: vertical;
}

.vampire-sheet-app .npc-note-edit-form textarea {
  color: #f3e0c5;
  background: rgba(10, 8, 10, 0.82);
  border-color: rgba(179, 144, 96, 0.42);
}

.npc-note-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.npc-note-card p,
.npc-note-empty {
  margin: 0;

  color: #3f3329;
  line-height: 1.5;
  white-space: pre-wrap;
}

.vampire-sheet-app .npc-note-card p,
.vampire-sheet-app .npc-note-empty {
  color: #dfc8b8;
}

.npc-note-error,
.sheet-chat-error {
  padding: 9px 10px;

  color: #842222;
  background: #fff1ed;
  border: 1px solid #d29a8e;
  border-radius: 6px;

  font-size: 0.86rem;
}

.sheet-chat {
  position: fixed;
  right: 0;
  bottom: 24px;
  z-index: 60;

  width: auto;

  pointer-events: none;
}

.sheet-chat.open {
  right: 14px;
  bottom: 14px;

  width: min(390px, calc(100vw - 28px));
}

.sheet-chat-toggle,
.sheet-chat-window {
  pointer-events: auto;
}

.sheet-chat-toggle {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-left: auto;
  padding: 0 15px;

  color: #f7e8c2;
  background: #241716;
  border-color: #8a6b32;
  border-radius: 999px 0 0 999px;

  font-weight: 850;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.sheet-chat.open .sheet-chat-toggle {
  border-radius: 999px;
}

.sheet-chat-toggle.has-unread {
  border-color: #ba3932;
}

.sheet-chat-toggle:hover {
  color: #241716;
  background: #e0b369;
}

.sheet-chat-toggle-text {
  display: inline-flex;
  align-items: center;
}

.sheet-chat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  min-height: 21px;
  padding: 0 6px;

  color: #fff7ef;
  background: #9b2725;
  border: 1px solid rgba(255, 239, 210, 0.44);
  border-radius: 999px;

  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.sheet-chat-window {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  height: min(620px, calc(100vh - 92px));
  margin-top: 8px;
  padding: 14px;

  color: #241716;
  background: rgba(255, 250, 242, 0.97);
  border: 1px solid #bda47e;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(28, 24, 20, 0.28);
}

.sheet-chat.theme-vampire .sheet-chat-window {
  color: #ede6df;
  background: rgba(18, 14, 16, 0.98);
  border-color: rgba(179, 144, 96, 0.46);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.48);
}

.sheet-chat-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.sheet-chat-head h3 {
  margin: 0;

  color: #3a2720;
  font-size: 1rem;
}

.sheet-chat.theme-vampire .sheet-chat-head h3 {
  color: #f0d7b0;
}

.sheet-chat-head span {
  display: block;
  margin-top: 4px;

  color: #6e6256;
  font-size: 0.84rem;
}

.sheet-chat.theme-vampire .sheet-chat-head span {
  color: #bfaea3;
}

.sheet-chat-photo-toggle {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 10px;

  font-size: 0.82rem;
  font-weight: 850;
}

.sheet-chat-photo-toggle.active {
  color: #f7e8c2;
  background: #241716;
  border-color: #8a6b32;
}

.sheet-chat-body {
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
}

.sheet-chat-photo-editor {
  display: grid;
  gap: 10px;
  max-height: min(420px, 48vh);
  overflow-y: auto;
  padding: 10px;

  background: rgba(255, 250, 242, 0.78);
  border: 1px solid rgba(130, 112, 89, 0.24);
  border-radius: 8px;
}

.sheet-chat.theme-vampire .sheet-chat-photo-editor {
  background: rgba(10, 8, 10, 0.54);
  border-color: rgba(179, 144, 96, 0.26);
}

.sheet-chat-photo-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 9px;

  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(185, 169, 148, 0.54);
  border-radius: 7px;
}

.sheet-chat.theme-vampire .sheet-chat-photo-card {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(179, 144, 96, 0.22);
}

.sheet-chat-photo-preview {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;

  color: #fff7ef;
  background: #6e4a2f;
  border: 1px solid rgba(255, 239, 210, 0.42);
  border-radius: 50%;

  font-size: 0.74rem;
  font-weight: 900;
}

.sheet-chat-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.sheet-chat-photo-fields {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.sheet-chat-photo-fields strong {
  color: #241716;
  font-size: 0.86rem;
}

.sheet-chat.theme-vampire .sheet-chat-photo-fields strong {
  color: #f0d7b0;
}

.sheet-chat-photo-fields label,
.sheet-chat-photo-slider {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.sheet-chat-photo-fields label span,
.sheet-chat-photo-slider span {
  color: #756553;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sheet-chat.theme-vampire .sheet-chat-photo-fields label span,
.sheet-chat.theme-vampire .sheet-chat-photo-slider span {
  color: #bfaea3;
}

.sheet-chat-photo-fields input[type="text"],
.sheet-chat-photo-fields label > input:not([type]),
.sheet-chat-photo-fields label > input[type="range"],
.sheet-chat-photo-fields label > input[type="file"] {
  min-width: 0;
}

.sheet-chat-photo-fields label > input[type="text"],
.sheet-chat-photo-fields label > input:not([type]) {
  width: 100%;
  min-height: 34px;
  padding: 0 9px;

  color: #1d1713;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #b7ab9b;
  border-radius: 6px;
}

.sheet-chat.theme-vampire .sheet-chat-photo-fields label > input[type="text"],
.sheet-chat.theme-vampire .sheet-chat-photo-fields label > input:not([type]) {
  color: #f3e0c5;
  background: rgba(10, 8, 10, 0.82);
  border-color: rgba(179, 144, 96, 0.42);
}

.sheet-chat-photo-slider {
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
}

.sheet-chat-photo-slider input {
  width: 100%;
  accent-color: #7a1f1f;
}

.sheet-chat.theme-vampire .sheet-chat-photo-slider input {
  accent-color: #c19a62;
}

.sheet-chat-photo-actions,
.sheet-chat-photo-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.sheet-chat-photo-upload {
  position: relative;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;

  color: #f7e8c2;
  background: #7a1f1f;
  border: 1px solid #561515;
  border-radius: 6px;

  font-size: 0.82rem;
  font-weight: 850;
  overflow: hidden;
  cursor: pointer;
}

.sheet-chat-photo-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.sheet-chat-photo-footer {
  justify-content: flex-end;
}

.sheet-chat-conversations {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.sheet-chat-admin-inbox,
.sheet-chat-contact-view,
.sheet-chat-compose-view,
.sheet-chat-conversation-shell {
  display: grid;
  gap: 8px;
  min-height: 0;
}

.sheet-chat-conversation-shell {
  align-content: start;
  padding: 2px;
}

.sheet-chat-compose-view {
  overflow: visible;
  padding: 2px;
}

.sheet-chat-conversation-shell.empty {
  align-content: start;
  justify-items: center;
  gap: 5px;
  padding: 6px 2px;
}

.sheet-chat-conversation-shell.empty .sheet-chat-conversations {
  display: grid;
  justify-items: center;
  min-height: 0;
}

.sheet-chat-conversation-shell.empty .sheet-chat-empty {
  font-size: 0.76rem;
  opacity: 0.68;
}

.sheet-chat-admin-inbox,
.sheet-chat-contact-view {
  align-content: start;
  overflow-y: auto;
  padding-right: 2px;
}

.sheet-chat-admin-inbox .sheet-chat-conversations,
.sheet-chat-contact-view .sheet-chat-conversations {
  overflow: visible;
  padding-right: 0;
}

.sheet-chat-compose-button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  justify-self: center;
  gap: 6px;
  width: auto;
  height: 26px;
  max-height: 26px;
  min-height: 26px;
  padding: 0 8px;

  color: #6a5849;
  background: transparent;
  border-color: rgba(138, 107, 50, 0.18);
  border-radius: 999px;

  font-size: 0.74rem;
  font-weight: 800;
  opacity: 0.84;
}

.sheet-chat-compose-button span:first-child {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;

  color: #7a1f1f;
  background: rgba(122, 31, 31, 0.08);
  border-radius: 50%;

  font-size: 0.76rem;
  line-height: 1;
}

.sheet-chat-compose-button:hover {
  color: #3a2720;
  background: rgba(122, 87, 48, 0.045);
  border-color: rgba(138, 107, 50, 0.28);
}

.sheet-chat-compose-button:focus-visible {
  outline-offset: 1px;
}

.sheet-chat.theme-vampire .sheet-chat-compose-button {
  color: #bfaea3;
  background: transparent;
  border-color: rgba(179, 144, 96, 0.2);
}

.sheet-chat.theme-vampire .sheet-chat-compose-button:hover {
  color: #f0d7b0;
  background: rgba(193, 154, 98, 0.055);
  border-color: rgba(179, 144, 96, 0.32);
}

.sheet-chat.theme-vampire .sheet-chat-compose-button span:first-child {
  color: #c19a62;
  background: rgba(193, 154, 98, 0.08);
}

.sheet-chat-compose-form {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: visible;
  padding: 3px;
}

.sheet-chat-compose-target,
.sheet-chat-compose-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.sheet-chat-compose-target > span,
.sheet-chat-compose-form label > span {
  color: #756553;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sheet-chat.theme-vampire .sheet-chat-compose-target > span,
.sheet-chat.theme-vampire .sheet-chat-compose-form label > span {
  color: #bfaea3;
}

.sheet-chat-compose-target select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 9px;

  color: #1d1713;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #b7ab9b;
  border-radius: 6px;
}

.sheet-chat-compose-target select:focus-visible,
.sheet-chat-compose-form textarea:focus-visible {
  outline-offset: 2px;
}

.sheet-chat.theme-vampire .sheet-chat-compose-target select {
  color: #f3e0c5;
  background: rgba(10, 8, 10, 0.82);
  border-color: rgba(179, 144, 96, 0.42);
}

.sheet-chat-compose-preview {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px;

  background: rgba(122, 87, 48, 0.045);
  border: 1px solid rgba(130, 112, 89, 0.14);
  border-radius: 8px;
}

.sheet-chat.theme-vampire .sheet-chat-compose-preview {
  background: rgba(193, 154, 98, 0.055);
  border-color: rgba(179, 144, 96, 0.16);
}

.sheet-chat-compose-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 92px;
  padding: 10px 12px;

  color: #1d1713;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #b7ab9b;
  border-radius: 6px;

  line-height: 1.45;
  resize: vertical;
}

.sheet-chat.theme-vampire .sheet-chat-compose-form textarea {
  color: #f3e0c5;
  background: rgba(10, 8, 10, 0.82);
  border-color: rgba(179, 144, 96, 0.42);
}

.sheet-chat-compose-form > button {
  justify-self: start;
  min-height: 36px;
}

.sheet-chat-admin-section {
  display: grid;
  gap: 4px;
  min-height: 0;
}

.sheet-chat-section-label {
  display: block;
  padding: 0 6px;

  color: #756553;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sheet-chat.theme-vampire .sheet-chat-section-label {
  color: #bfaea3;
}

.sheet-chat-contact-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding-bottom: 8px;

  border-bottom: 1px solid rgba(130, 112, 89, 0.2);
}

.sheet-chat.theme-vampire .sheet-chat-contact-head {
  border-bottom-color: rgba(179, 144, 96, 0.2);
}

.sheet-chat-conversation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  width: 100%;

  border-bottom: 1px solid rgba(130, 112, 89, 0.2);
}

.sheet-chat-conversation {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 62px;
  padding: 9px 6px;

  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;

  text-align: left;
}

.sheet-chat-conversation-row:hover,
.sheet-chat-conversation-row.has-unread {
  background: rgba(122, 87, 48, 0.035);
}

.sheet-chat.theme-vampire .sheet-chat-conversation-row {
  border-bottom-color: rgba(179, 144, 96, 0.2);
}

.sheet-chat.theme-vampire .sheet-chat-conversation-row:hover,
.sheet-chat.theme-vampire .sheet-chat-conversation-row.has-unread {
  background: rgba(193, 154, 98, 0.05);
}

.sheet-chat-conversation-delete,
.sheet-chat-thread-delete {
  display: inline-grid;
  place-items: center;
  justify-self: center;
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;

  color: #806f60;
  background: transparent;
  border-color: transparent;
  border-radius: 50%;

  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
}

.sheet-chat-thread-delete {
  opacity: 0.64;
}

.sheet-chat-conversation-row:hover .sheet-chat-conversation-delete,
.sheet-chat-conversation-delete:focus-visible,
.sheet-chat-thread-delete:hover,
.sheet-chat-thread-delete:focus-visible {
  opacity: 1;
}

.sheet-chat-conversation-delete:hover,
.sheet-chat-thread-delete:hover {
  color: #842222;
  background: rgba(132, 34, 34, 0.08);
  border-color: rgba(132, 34, 34, 0.18);
}

.sheet-chat.theme-vampire .sheet-chat-conversation-delete,
.sheet-chat.theme-vampire .sheet-chat-thread-delete {
  color: #bfaea3;
}

.sheet-chat.theme-vampire .sheet-chat-conversation-delete:hover,
.sheet-chat.theme-vampire .sheet-chat-thread-delete:hover {
  color: #f0d7b0;
  background: rgba(193, 154, 98, 0.055);
  border-color: rgba(193, 154, 98, 0.18);
}

.sheet-chat-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;

  color: #fff7ef;
  background: #6e4a2f;
  border: 1px solid rgba(255, 239, 210, 0.4);
  border-radius: 50%;

  font-size: 0.76rem;
  font-weight: 900;
}

.sheet-chat-avatar img,
.sheet-chat-thread-avatar img,
.sheet-chat-message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.sheet-chat.theme-vampire .sheet-chat-avatar {
  background: #651c25;
  border-color: rgba(221, 185, 119, 0.44);
}

.sheet-chat-conversation-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sheet-chat-conversation-copy strong {
  overflow: hidden;

  color: #241716;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-chat.theme-vampire .sheet-chat-conversation-copy strong {
  color: #f0d7b0;
}

.sheet-chat-conversation-copy small {
  overflow: hidden;

  color: #756553;
  font-size: 0.8rem;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-chat.theme-vampire .sheet-chat-conversation-copy small {
  color: #bfaea3;
}

.sheet-chat-conversation-side {
  display: grid;
  justify-items: end;
  gap: 5px;

  color: #756553;
  font-size: 0.72rem;
}

.sheet-chat.theme-vampire .sheet-chat-conversation-side {
  color: #bfaea3;
}

.sheet-chat-thread-count {
  font-size: 0.7rem;
  font-weight: 900;
}

.sheet-chat-thread {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  min-height: 0;
}

.sheet-chat-thread-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding-bottom: 10px;

  border-bottom: 1px solid rgba(130, 112, 89, 0.2);
}

.sheet-chat.theme-vampire .sheet-chat-thread-head {
  border-bottom-color: rgba(179, 144, 96, 0.2);
}

.sheet-chat-back {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;

  color: #3a2720;
  background: rgba(255, 250, 242, 0.72);
  border-color: #c4ae91;
  border-radius: 50%;

  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1;
}

.sheet-chat.theme-vampire .sheet-chat-back {
  color: #f0d7b0;
  background: rgba(20, 14, 16, 0.74);
  border-color: rgba(179, 144, 96, 0.44);
}

.sheet-chat-thread-profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 0;

  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 8px;

  text-align: left;
}

.sheet-chat-thread-profile.clickable {
  margin: -4px 0;
  padding: 4px;

  cursor: pointer;
}

.sheet-chat-thread-profile.clickable:hover {
  background: rgba(122, 87, 48, 0.035);
}

.sheet-chat.theme-vampire .sheet-chat-thread-profile.clickable:hover {
  background: rgba(193, 154, 98, 0.05);
}

.sheet-chat-thread-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;

  color: #fff7ef;
  background: #6e4a2f;
  border: 1px solid rgba(255, 239, 210, 0.4);
  border-radius: 50%;

  font-size: 0.72rem;
  font-weight: 900;
}

.sheet-chat.theme-vampire .sheet-chat-thread-avatar {
  background: #651c25;
  border-color: rgba(221, 185, 119, 0.44);
}

.sheet-chat-thread-copy {
  min-width: 0;
}

.sheet-chat-thread-head h4 {
  margin: 0;

  color: #241716;
  font-size: 0.98rem;
}

.sheet-chat.theme-vampire .sheet-chat-thread-head h4 {
  color: #f0d7b0;
}

.sheet-chat-thread-copy > span {
  display: block;
  margin-top: 2px;

  color: #756553;
  font-size: 0.78rem;
}

.sheet-chat.theme-vampire .sheet-chat-thread-copy > span {
  color: #bfaea3;
}

.sheet-chat-messages {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 2px 12px 0;
}

.sheet-chat-thread .sheet-chat-messages {
  scrollbar-width: none;
}

.sheet-chat-thread .sheet-chat-messages::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.sheet-chat-message {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  justify-content: flex-start;
}

.sheet-chat-message.own {
  justify-content: flex-end;
}

.sheet-chat-message-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  overflow: hidden;

  color: #fff7ef;
  background: #6e4a2f;
  border: 1px solid rgba(255, 239, 210, 0.36);
  border-radius: 50%;

  font-size: 0.68rem;
  font-weight: 900;
}

.sheet-chat.theme-vampire .sheet-chat-message-avatar {
  background: #651c25;
  border-color: rgba(221, 185, 119, 0.38);
}

.sheet-chat-bubble {
  display: grid;
  gap: 4px;
  max-width: min(82%, 280px);
  padding: 9px 11px;

  color: #2c211c;
  background: #ece1d3;
  border: 1px solid #d8ccbb;
  border-radius: 16px 16px 16px 5px;
}

.sheet-chat-message.own .sheet-chat-bubble {
  color: #fff7ef;
  background: #8f5832;
  border-color: #7a4829;
  border-radius: 16px 16px 5px 16px;
}

.sheet-chat.theme-vampire .sheet-chat-bubble {
  color: #dfc8b8;
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(179, 144, 96, 0.24);
}

.sheet-chat.theme-vampire .sheet-chat-message.own .sheet-chat-bubble {
  color: #fff3e0;
  background: #7d161d;
  border-color: rgba(221, 185, 119, 0.34);
}

.sheet-chat-bubble strong {
  color: inherit;
  font-size: 0.74rem;
}

.sheet-chat-bubble p,
.sheet-chat-empty {
  margin: 0;

  line-height: 1.45;
  white-space: pre-wrap;
}

.sheet-chat-bubble time {
  justify-self: end;

  color: rgba(44, 33, 28, 0.68);
  font-size: 0.68rem;
}

.sheet-chat-message.own .sheet-chat-bubble time {
  color: rgba(255, 247, 239, 0.72);
}

.sheet-chat.theme-vampire .sheet-chat-bubble time {
  color: rgba(223, 200, 184, 0.68);
}

.sheet-chat-empty {
  color: #756553;
}

.sheet-chat.theme-vampire .sheet-chat-empty {
  color: #bfaea3;
}

.sheet-chat-form {
  padding-top: 10px;

  border-top: 1px solid rgba(130, 112, 89, 0.2);
}

.sheet-chat.theme-vampire .sheet-chat-form {
  border-top-color: rgba(179, 144, 96, 0.2);
}

.sheet-chat-sender-picker {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.sheet-chat-sender-picker span {
  color: #756553;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sheet-chat.theme-vampire .sheet-chat-sender-picker span {
  color: #bfaea3;
}

.sheet-chat-sender-picker select {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 0 9px;

  color: #1d1713;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #b7ab9b;
  border-radius: 6px;
}

.sheet-chat.theme-vampire .sheet-chat-sender-picker select {
  color: #f3e0c5;
  background: rgba(10, 8, 10, 0.82);
  border-color: rgba(179, 144, 96, 0.42);
}

.sheet-chat-form button {
  min-height: 36px;
}

@media (max-width: 760px) {
  .sheet-chat {
    right: 0;
    bottom: 10px;
    left: auto;
    width: auto;
  }

  .sheet-chat.open {
    right: 10px;
    left: 10px;
    width: auto;
  }

  .sheet-chat-window {
    height: min(72vh, 620px);
  }

  .sheet-chat-photo-card {
    grid-template-columns: 1fr;
  }

  .sheet-chat-photo-slider {
    grid-template-columns: 1fr;
  }

  .sheet-chat-sender-picker {
    grid-template-columns: 1fr;
  }

  .sheet-chat-bubble {
    max-width: 86%;
  }

  .sheet-chat-conversation-delete {
    opacity: 0.72;
  }
}
