.mail-row--summary {
  padding: 0;
  transition: background .18s ease;
}
.mail-summary {
  display: block;
  width: 100%;
  padding: 16px 18px;
  border: 0;
  border-radius: 0;
  background: #11141b;
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background .18s ease;
}
.mail-summary:hover,
.mail-summary:focus-visible {
  background: #20232d;
  transform: none;
}
.mail-summary-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.mail-summary-top b {
  font-size: 15px;
  line-height: 1.4;
}
.mail-summary-top time,
.mail-meta-lines time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.mail-summary-sender,
.mail-summary-preview {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}
.mail-summary-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #d5d5da;
}
.mail-detail-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #11141b;
}
.mail-detail {
  padding: clamp(20px, 4vw, 30px);
}
.mail-back {
  margin: 0 0 24px;
  padding: 8px 0;
  background: none;
  color: var(--gold);
  font-size: 13px;
}
.mail-back:hover {
  background: none;
  color: #ead2a5;
  transform: none;
}
.mail-detail-subject {
  margin: 0 0 20px;
  font-size: clamp(21px, 4vw, 28px);
  line-height: 1.3;
}
.mail-detail-meta {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #d5d5da;
  font-size: 13px;
  line-height: 1.8;
}
.mail-meta-lines > div span {
  color: var(--muted);
}
.mail-meta-lines time {
  display: block;
  margin-top: 4px;
}
.mail-sender-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid #c6a66b66;
  border-radius: 50%;
  background: #c6a66b16;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}
.mail-message-body {
  padding-top: 20px;
  color: #e4e3e0;
  font-size: 15px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.mail-message-body p {
  margin: 0 0 16px;
  color: inherit;
}
.mail-message-body p:last-child {
  margin-bottom: 0;
}
.mail-message-body a {
  color: #e8c98f;
}
.mail-image-slot {
  margin-top: 4px;
}
.mail-image-slot img {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0c0e13;
}
.mail-image-placeholder {
  display: grid;
  min-height: 210px;
  padding: 24px;
  place-content: center;
  border: 1px dashed #555968;
  border-radius: 10px;
  background: repeating-linear-gradient(135deg, #20232d, #20232d 10px, #1b1e27 10px, #1b1e27 20px);
  color: #d2c5a9;
  text-align: center;
}
.mail-image-placeholder small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 650px) {
  .mail-summary-top {
    flex-direction: column;
    gap: 4px;
  }
  .mail-summary-preview {
    white-space: normal;
  }
}

.chat-contact {
  display: flex;
  align-items: center;
  gap: 14px;
}
.chat-contact-mark {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border: 1px solid #c6a66b66;
  border-radius: 50%;
  background: #c6a66b16;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}
.chat-contact-copy {
  display: block;
  min-width: 0;
  flex: 1;
}
.chat-contact-copy b,
.chat-contact-copy small {
  display: block;
}
.chat-contact-copy small {
  overflow: hidden;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-thread {
  padding-bottom: 30px;
}
.chat-timeline {
  display: grid;
  gap: 22px;
}
.chat-day {
  display: grid;
  gap: 12px;
}
.chat-date {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.chat-date::before,
.chat-date::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}
.chat-date span {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: #11141b;
}
.chat-message {
  width: fit-content;
  max-width: min(88%, 650px);
  padding: 12px 15px;
  border: 1px solid #343744;
  border-radius: 14px 14px 14px 4px;
  background: #11141b;
  color: #e4e3e0;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.chat-message--mine {
  justify-self: end;
  border-color: #71535a;
  border-radius: 14px 14px 4px 14px;
  background: #2b2027;
}
.chat-message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 5px;
  color: var(--gold);
  font-size: 11px;
}
.chat-message-meta time {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 400;
}
.chat-message-text {
  white-space: normal;
}
@media (max-width: 650px) {
  .chat-message {
    max-width: 96%;
  }
  .chat-contact-copy small {
    white-space: normal;
  }
}
