body {
  background: #0e1118;
  color: #f4f1e8;
  overflow-x: hidden;
}

.dm-app {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 300px;
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
}

.dm-rail,
.dm-main,
.dm-chat {
  min-width: 0;
}

.dm-rail {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100vh;
  padding: 12px 8px;
  background: #10131c;
  border-right: 1px solid #2a3142;
}

.dm-rail a {
  display: grid;
  place-items: center;
  min-height: 52px;
  padding: 6px 2px;
  border-radius: 12px;
  color: #c8c4b4;
  text-align: center;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
}

.dm-rail a:hover {
  background: #222633;
  color: #f0d48a;
}

.dm-main {
  background: #12151e;
}

.dm-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 68px;
  padding: 0 18px;
  background: #12151e;
  border-bottom: 1px solid #2a3142;
  position: sticky;
  top: 0;
  z-index: 4;
}

.dm-brand {
  min-width: 0;
}

.dm-top h1 {
  margin: 0;
  overflow: hidden;
  font-size: 1.05rem;
  line-height: 1.1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dm-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.dm-reg,
.dm-in,
.dm-cash {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.dm-reg,
.dm-cash {
  background: #e0a030;
  color: #24180a;
}

.dm-in {
  color: #f0d48a;
  box-shadow: inset 0 0 0 1px #e0a030;
}

.dm-lead,
.dm-hero,
.dm-row,
.dm-note,
.dm-foot,
.dm-main .slot-shelf-wrap,
.dm-banner {
  width: auto;
  margin-right: 18px;
  margin-left: 18px;
}

.dm-lead {
  color: #d5d2c4;
}

.dm-banner {
  display: block;
  max-height: 180px;
  margin-top: 8px;
  object-fit: cover;
  border-radius: 14px;
}

.dm-hero,
.dm-row {
  display: grid;
  gap: 12px;
}

.dm-hero {
  grid-template-columns: 1fr 1fr;
}

.dm-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0;
  margin-top: 16px;
  list-style: none;
}

.dm-main .slot-shelf {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dm-hero article,
.dm-card,
.dm-note {
  min-width: 0;
  padding: 16px;
  background: #1c2130;
  border: 1px solid #34384a;
  border-radius: 14px;
}

.dm-hero h2,
.dm-note h2,
.dm-card h3,
.dm-chat h2 {
  margin: 0 0 8px;
}

.dm-card h3 {
  color: #f0d48a;
}

.dm-hero p,
.dm-card p,
.dm-note p {
  margin: 0;
  color: #ddd8c8;
}

.dm-note {
  margin-top: 14px;
}

.dm-go {
  display: inline-flex;
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #e0a030;
  color: #24180a;
  font-weight: 700;
  text-decoration: none;
}

.dm-chat {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 16px 14px 28px;
  background: #10131c;
  border-left: 1px solid #2a3142;
}

.dm-chat-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.dm-chat-top p {
  color: #8f8a78;
  font-size: 12px;
}

.dm-promo {
  margin: 8px 0 4px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #2a2112;
  color: #f0d48a;
  font-size: 13px;
}

.dm-feed {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dm-msg {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #242838;
}

.dm-ava {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.dm-mod .dm-ava {
  box-shadow: inset 0 0 0 2px #e0a030;
}

.dm-who {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: 0 0 4px;
  font-size: 13px;
}

.dm-who span {
  color: #e0a030;
  font-size: 11px;
}

.dm-msg p:last-child {
  margin: 0;
  color: #e6e1d4;
  font-size: 13px;
  line-height: 1.35;
}

.dm-chat h2 {
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #e0a030;
}

.dm-foot {
  padding: 28px 0 40px;
}

.dm-foot a,
.dm-chat a {
  color: #f0d48a;
}

@media (max-width: 860px) {
  .dm-app,
  .dm-hero,
  .dm-row,
  .dm-main .slot-shelf {
    grid-template-columns: 1fr;
  }

  .dm-main .slot-shelf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dm-rail {
    position: static;
    flex-direction: row;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid #2a3142;
  }

  .dm-rail a {
    flex: 1;
  }

  .dm-top {
    height: auto;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .dm-brand {
    flex: 1 1 180px;
  }

  .dm-brand > div {
    min-width: 0;
  }

  .dm-chat {
    position: static;
    height: auto;
    border-top: 1px solid #2a3142;
    border-left: 0;
  }
}
