.floating-dm-shell {
  position: fixed;
  right: 18px;
  bottom: calc(44px + 14px + env(safe-area-inset-bottom, 0px));
  z-index: 180;
}

.floating-dm-shell[data-auth="out"] {
  display: none;
}

.floating-dm-shell .floating-neon-notice {
  position: static;
  width: min(378px, calc(100vw - 36px));
  max-width: min(378px, calc(100vw - 36px));
  height: 66px;
  pointer-events: auto;
  transition: width .34s ease, max-width .34s ease, height .34s ease, transform .34s ease;
  transform-origin: bottom right;
}

.floating-dm-shell[data-open="true"] .floating-neon-notice {
  width: min(620px, calc(100vw - 36px));
  max-width: min(620px, calc(100vw - 36px));
  height: min(450px, calc(100vh - 140px));
}

.floating-dm-shell .floating-neon-card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: default;
}

.floating-neon-launcher {
  display: flex;
  align-items: stretch;
  min-height: 66px;
  max-height: 66px;
  opacity: 1;
  cursor: default;
  transition: max-height .3s ease, opacity .2s ease, transform .3s ease;
  transform-origin: top center;
}

.floating-dm-shell[data-open="true"] .floating-neon-launcher {
  min-height: 0;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}

.floating-neon-copy {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.floating-neon-toggle {
  width: 46px;
  border: 0;
  background: transparent;
  color: #dff8ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

.floating-neon-toggle,
.dm-panel-close,
.dm-back-button,
.dm-send-button,
.dm-hit-target,
.dm-profile-menu button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.floating-neon-toggle:hover {
  background: rgba(103, 215, 255, 0.08);
}

.floating-neon-toggle svg {
  width: 17px;
  height: 17px;
  transition: transform .28s ease;
}

.floating-dm-shell .floating-neon-message {
  justify-content: center;
  gap: 0;
  padding: 0 18px;
}

.floating-dm-shell .floating-neon-title {
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floating-dm-shell .floating-neon-text {
  display: none;
}

.floating-dm-shell[data-open="true"] .floating-neon-toggle svg {
  transform: rotate(180deg);
}

.dm-panel-body {
  min-height: 0;
  flex: 1 1 auto;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity .24s ease, transform .32s ease, max-height .32s ease;
  background: linear-gradient(180deg, rgba(12, 23, 42, 0.98), rgba(8, 16, 30, 0.98));
}

.floating-dm-shell[data-open="true"] .dm-panel-body {
  max-height: 700px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  border-top: 1px solid rgba(125, 235, 255, 0.12);
}

.dm-panel-frame {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.dm-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 12px;
  background: linear-gradient(180deg, rgba(17, 30, 54, 0.74), rgba(12, 22, 40, 0.18));
}

.dm-panel-heading {
  min-width: 0;
}

.dm-panel-heading h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.dm-panel-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(140, 170, 222, 0.16);
  background: rgba(11, 20, 36, 0.72);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.dm-panel-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, calc(100% - 190px)) 190px;
  overflow: hidden;
}

.dm-chat-column {
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-right: 1px solid rgba(125, 166, 224, 0.08);
  background: linear-gradient(180deg, rgba(10, 18, 32, 0.84), rgba(8, 15, 28, 0.94));
  overflow: hidden;
}

.dm-chat-column.is-empty .dm-message-list {
  justify-content: stretch;
  padding: 12px 14px 10px;
}

.dm-list-column {
  min-width: 0;
  width: 190px;
  max-width: 190px;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  background: linear-gradient(180deg, rgba(16, 28, 48, 0.78), rgba(10, 18, 33, 0.92));
  overflow: hidden;
}

.dm-friend-requests-section {
  border-bottom: 1px solid rgba(125, 166, 224, 0.08);
}

.dm-friend-requests-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px 11px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.dm-friend-requests-toggle:hover {
  background: rgba(12, 22, 40, 0.45);
}

.dm-friend-requests-toggle-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dm-friend-requests-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dm-friend-requests-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(103, 215, 255, 0.96), rgba(83, 141, 255, 0.94));
  color: #04101f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(20, 46, 84, 0.28);
}

.dm-friend-requests-badge[hidden] {
  display: none !important;
}

.dm-friend-requests-chevron {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin-top: -2px;
  border-right: 2px solid rgba(186, 205, 236, 0.72);
  border-bottom: 2px solid rgba(186, 205, 236, 0.72);
  transform: rotate(45deg);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.dm-friend-requests-section.is-expanded .dm-friend-requests-chevron {
  transform: rotate(-135deg);
}

.dm-friend-requests-panel {
  padding: 0 10px 10px;
  display: grid;
  gap: 8px;
}

.dm-friend-requests-panel[hidden] {
  display: none !important;
}

.dm-friend-requests-empty {
  margin: 0;
  padding: 6px 4px 2px;
  font-size: 11px;
  color: var(--sub);
  line-height: 1.45;
}

.dm-friend-request-row {
  display: grid;
  gap: 8px;
  padding: 9px 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(129, 169, 230, 0.1);
  background: rgba(12, 21, 37, 0.72);
}

.dm-friend-request-name {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dm-friend-request-actions {
  display: flex;
  gap: 6px;
}

.dm-friend-request-accept,
.dm-friend-request-decline {
  flex: 1 1 0;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid rgba(127, 166, 224, 0.16);
  background: rgba(11, 20, 36, 0.65);
  color: var(--text);
}

.dm-friend-request-accept {
  border-color: rgba(103, 215, 255, 0.42);
  background: linear-gradient(135deg, rgba(103, 215, 255, 0.96), rgba(83, 141, 255, 0.94));
  color: #04101f;
  box-shadow: 0 6px 14px rgba(20, 46, 84, 0.22);
}

.dm-friend-request-accept:hover {
  border-color: rgba(103, 215, 255, 0.55);
  background: linear-gradient(135deg, rgba(118, 222, 255, 0.98), rgba(96, 152, 255, 0.96));
}

.dm-friend-request-decline:hover {
  border-color: rgba(103, 215, 255, 0.22);
}

.dm-chat-header,
.dm-list-header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(125, 166, 224, 0.08);
}

.dm-chat-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}

.dm-home-header {
  min-width: 0;
}

.dm-history-header {
  min-width: 0;
}

.dm-history-header strong {
  display: block;
  font-size: 16px;
  letter-spacing: -0.03em;
}

.dm-history-header span {
  display: block;
  margin-top: 3px;
  color: var(--sub);
  font-size: 11px;
}

.dm-home-header strong {
  display: block;
  font-size: 16px;
  letter-spacing: -0.03em;
}

.dm-home-header span {
  display: block;
  margin-top: 3px;
  color: var(--sub);
  font-size: 11px;
}

.dm-back-button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(127, 166, 224, 0.14);
  background: rgba(11, 20, 36, 0.72);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.dm-back-button:hover,
.dm-panel-close:hover {
  border-color: rgba(103, 215, 255, 0.22);
  background: rgba(16, 28, 48, 0.9);
}

.dm-back-button:active,
.dm-panel-close:active,
.dm-send-button:active,
.floating-neon-toggle:active,
.dm-hit-target:active,
.dm-profile-menu button:active {
  transform: translateY(1px);
}

.dm-back-button svg {
  width: 16px;
  height: 16px;
}

.dm-peer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.dm-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  overflow: visible;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.04);
}

.dm-avatar .kw-avatar-media {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  overflow: hidden;
}

.dm-avatar .kw-avatar,
.dm-avatar .kw-avatar-media img,
.dm-avatar .kw-avatar-media svg,
.dm-avatar > img,
.dm-avatar > svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.dm-avatar .kw-avatar-flag {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1.5px solid rgba(8, 16, 28, 0.92);
  background: rgba(8, 16, 28, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.dm-avatar .kw-avatar-flag img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.dm-peer-meta {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.dm-peer-name {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dm-peer-preview {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  color: var(--sub);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dm-presence-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--sub);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.dm-presence-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.dm-presence-badge.is-online,
.dm-presence-label.is-online {
  color: #67e0a4;
}

.dm-presence-badge.is-away,
.dm-presence-label.is-away {
  color: #ffca79;
}

.dm-presence-badge.is-offline,
.dm-presence-label.is-offline {
  color: #97a6bc;
}

.dm-message-list {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  contain: inline-size;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.dm-empty-home {
  min-height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
}

.dm-history-home {
  min-height: 100%;
}

.dm-history-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

.dm-history-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 13px;
  border: 1px solid rgba(125, 166, 224, 0.09);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(14, 25, 44, 0.9), rgba(9, 17, 31, 0.96));
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.dm-history-item:hover {
  transform: translateY(-1px);
  border-color: rgba(103, 215, 255, 0.16);
  box-shadow: 0 12px 22px rgba(4, 10, 20, 0.18);
}

.dm-history-item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(103, 215, 255, 0.14);
}

.dm-history-avatar .dm-avatar {
  width: 48px;
  height: 48px;
}

.dm-history-main {
  min-width: 0;
}

.dm-history-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.dm-history-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.dm-history-name {
  min-width: 0;
  font-size: 13px;
  letter-spacing: -0.02em;
}

.dm-history-unread {
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(103, 215, 255, 0.96), rgba(83, 141, 255, 0.94));
  color: #04101f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(20, 46, 84, 0.28);
}

.dm-history-time {
  color: rgba(156, 176, 209, 0.72);
  font-size: 10px;
}

.dm-history-preview {
  margin: 5px 0 0;
  color: var(--sub);
  font-size: 11.5px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dm-history-empty {
  margin: auto;
  width: min(300px, 100%);
  padding: 20px 18px;
  border-radius: 18px;
  border: 1px solid rgba(125, 166, 224, 0.09);
  background: linear-gradient(180deg, rgba(14, 25, 44, 0.82), rgba(9, 17, 31, 0.94));
  text-align: center;
}

.dm-history-empty strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.dm-history-empty p {
  margin: 7px 0 0;
  color: var(--sub);
  font-size: 11.5px;
  line-height: 1.5;
}

.dm-login-required {
  margin: auto;
  width: min(320px, 100%);
  padding: 24px 20px;
  border-radius: 20px;
  border: 1px solid rgba(103, 215, 255, 0.14);
  background:
    radial-gradient(circle at top, rgba(83, 200, 255, 0.12), transparent 46%),
    linear-gradient(180deg, rgba(14, 25, 44, 0.88), rgba(9, 17, 31, 0.96));
  text-align: center;
  box-shadow: 0 16px 34px rgba(4, 10, 20, 0.2);
}

.dm-login-required-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #88e8ff;
  background: rgba(103, 215, 255, 0.1);
  border: 1px solid rgba(103, 215, 255, 0.16);
}

.dm-login-required-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dm-login-required strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.dm-login-required p {
  margin: 8px 0 16px;
  color: var(--sub);
  font-size: 12px;
  line-height: 1.55;
}

.dm-login-required-button {
  min-width: 112px;
  height: 38px;
  border: 1px solid rgba(103, 215, 255, 0.25);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(83, 200, 255, 0.95), rgba(76, 130, 255, 0.92));
  color: #04101f;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(29, 89, 160, 0.24);
}

.dm-login-required-button:hover {
  filter: brightness(1.04);
}

.dm-empty-feed {
  min-height: 0;
  display: grid;
  gap: 10px;
  align-content: start;
}

.dm-home-banner {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(125, 166, 224, 0.09);
  background:
    radial-gradient(circle at top right, rgba(72, 144, 255, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(16, 28, 49, 0.94), rgba(10, 18, 33, 0.98));
  box-shadow: 0 14px 28px rgba(4, 10, 20, 0.2);
}

.dm-home-banner.is-featured {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
}

.dm-home-banner-copy {
  padding: 15px 16px;
}

.dm-home-banner-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(103, 215, 255, 0.11);
  color: #8edaff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.dm-home-banner strong {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

.dm-home-banner p {
  margin: 8px 0 0;
  color: var(--sub);
  font-size: 11.5px;
  line-height: 1.55;
}

.dm-home-banner-art {
  position: relative;
  min-height: 100%;
}

.dm-home-banner-art span {
  position: absolute;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(107, 222, 255, 0.9), rgba(78, 121, 255, 0.24));
  filter: blur(0.2px);
}

.dm-home-banner-art span:nth-child(1) {
  width: 70px;
  height: 70px;
  right: 24px;
  top: 24px;
  opacity: 0.88;
}

.dm-home-banner-art span:nth-child(2) {
  width: 34px;
  height: 34px;
  right: 66px;
  top: 108px;
  opacity: 0.54;
}

.dm-home-banner-art span:nth-child(3) {
  width: 18px;
  height: 18px;
  right: 20px;
  top: 104px;
  opacity: 0.7;
}

.dm-home-notice-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(125, 166, 224, 0.1);
  background: linear-gradient(180deg, rgba(13, 24, 43, 0.96), rgba(9, 17, 31, 0.98));
}

.dm-home-notice-bar p {
  margin: 0;
  min-width: 0;
  color: rgba(226, 242, 255, 0.92);
  font-size: 11.5px;
  line-height: 1.4;
}

.dm-home-notice-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: #8edaff;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.dm-home-notice-action:hover {
  color: #bcecff;
}

.dm-chat-empty {
  margin: auto;
  width: min(280px, 100%);
  padding: 18px 16px;
  border-radius: 18px;
  border: 1px dashed rgba(124, 166, 230, 0.16);
  background: linear-gradient(180deg, rgba(16, 27, 48, 0.72), rgba(11, 20, 36, 0.88));
  text-align: center;
}

.dm-chat-empty strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.dm-chat-empty p {
  margin: 0;
  color: var(--sub);
  font-size: 12px;
  line-height: 1.55;
}

.dm-message-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex: 0 0 auto;
}

.dm-message-row.is-outgoing {
  align-self: flex-end;
  align-items: flex-end;
}

.dm-message-row.is-incoming {
  align-self: flex-start;
  align-items: flex-start;
}

.dm-message-author {
  grid-area: author;
  color: rgba(156, 176, 209, 0.78);
  font-size: 10px;
  font-weight: 700;
}

.dm-bubble {
  min-width: 0;
  width: auto;
  max-width: min(72%, 340px);
  border-radius: 14px;
  padding: 9px 11px;
  line-height: 1.45;
  font-size: 12.5px;
  text-align: left;
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: break-word;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.dm-message-row.is-incoming .dm-bubble {
  border-top-left-radius: 9px;
  background: rgba(22, 37, 64, 0.88);
  border: 1px solid rgba(129, 169, 230, 0.08);
}

.dm-message-row.is-outgoing .dm-bubble {
  border-top-right-radius: 9px;
  background: rgba(87, 151, 255, 0.86);
  color: #f8fbff;
  text-align: left;
}

.dm-message-time {
  display: block;
  width: 100%;
  color: rgba(156, 176, 209, 0.66);
  font-size: 10px;
  line-height: 1;
}

.dm-message-row.is-outgoing .dm-message-author,
.dm-message-row.is-outgoing .dm-message-time {
  text-align: right;
}

.dm-message-row.is-incoming .dm-message-author,
.dm-message-row.is-incoming .dm-message-time {
  text-align: left;
}

.dm-message-bubble-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  width: 100%;
  max-width: 100%;
}

.dm-message-row.is-outgoing .dm-message-bubble-row {
  flex-direction: row-reverse;
}

.dm-message-action-trigger {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(198, 214, 242, 0.82);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(2px);
  transition: opacity .16s ease, transform .16s ease, background-color .16s ease, color .16s ease;
}

.dm-message-row:hover .dm-message-action-trigger,
.dm-message-row:focus-within .dm-message-action-trigger,
.dm-message-action-trigger.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dm-message-action-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f4f8ff;
}

.dm-message-action-menu {
  position: fixed;
  z-index: 220;
  min-width: 132px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(129, 169, 230, 0.16);
  background: rgba(12, 22, 38, 0.98);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
}

.dm-message-action-menu[hidden] {
  display: none !important;
}

.dm-message-action-item {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #e8f0ff;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.dm-message-action-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.dm-message-action-item.is-danger {
  color: #ff9b9b;
}

.dm-bubble.is-deleted {
  min-width: max-content;
  white-space: nowrap;
  opacity: 0.72;
  font-style: italic;
}

.dm-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(125, 166, 224, 0.08);
  background: rgba(8, 15, 28, 0.78);
}

.dm-chat-column.is-empty .dm-composer {
  opacity: 0.5;
}

.dm-chat-column.is-empty .dm-composer-input,
.dm-chat-column.is-empty .dm-send-button {
  pointer-events: none;
}

.dm-composer-input {
  min-width: 0;
  min-height: 44px;
  max-height: 98px;
  resize: none;
  border-radius: 14px;
  border: 1px solid rgba(127, 166, 224, 0.12);
  background: rgba(10, 18, 31, 0.86);
  color: var(--text);
  padding: 11px 13px;
  font: inherit;
  font-size: 12.5px;
  line-height: 1.45;
  outline: none;
  overflow-x: hidden;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  scrollbar-width: thin;
  scrollbar-color: rgba(72, 104, 148, 0.72) rgba(8, 16, 30, 0.55);
}

.dm-composer-input:focus {
  border-color: rgba(103, 215, 255, 0.26);
  box-shadow: 0 0 0 4px rgba(103, 215, 255, 0.08);
}

.dm-composer-input::-webkit-scrollbar {
  width: 7px;
  height: 0;
}

.dm-composer-input::-webkit-scrollbar-track {
  background: rgba(8, 16, 30, 0.55);
  border-radius: 999px;
}

.dm-composer-input::-webkit-scrollbar-thumb {
  background: rgba(72, 104, 148, 0.72);
  border-radius: 999px;
}

.dm-composer-input::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.dm-send-button {
  min-width: 68px;
  height: 44px;
  align-self: center;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(103, 215, 255, 0.94), rgba(98, 149, 255, 0.9));
  color: #051120;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(8, 20, 44, 0.24);
}

.dm-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dm-list-header strong {
  font-size: 14px;
  letter-spacing: -0.02em;
}

.dm-list-count {
  color: var(--sub);
  font-size: 11px;
}

.dm-friend-list {
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.dm-message-list::-webkit-scrollbar,
.dm-friend-list::-webkit-scrollbar {
  width: 6px;
}

.dm-message-list::-webkit-scrollbar-track,
.dm-friend-list::-webkit-scrollbar-track {
  background: transparent;
}

.dm-message-list::-webkit-scrollbar-thumb,
.dm-friend-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(103, 215, 255, 0);
  transition: background-color .2s ease;
}

.dm-message-list:hover::-webkit-scrollbar-thumb,
.dm-friend-list:hover::-webkit-scrollbar-thumb {
  background: rgba(103, 215, 255, 0.28);
}

.dm-message-list:hover,
.dm-friend-list:hover {
  scrollbar-color: rgba(103, 215, 255, 0.28) transparent;
}

.dm-friend-card {
  position: relative;
  width: 100%;
  min-height: 72px;
  height: auto;
  align-self: start;
  padding: 9px 10px;
  border-radius: 16px;
  border: 1px solid rgba(129, 169, 230, 0.08);
  background: rgba(12, 21, 37, 0.68);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.dm-friend-card.is-menu-open {
  z-index: 18;
}

.dm-friend-card:hover {
  transform: translateY(-1px);
  border-color: rgba(103, 215, 255, 0.14);
}

.dm-friend-card.is-active {
  background: linear-gradient(180deg, rgba(17, 31, 56, 0.92), rgba(11, 23, 42, 0.98));
  border-color: rgba(103, 215, 255, 0.18);
  box-shadow: 0 10px 18px rgba(6, 14, 28, 0.18);
}

.dm-friend-avatar-wrap {
  position: relative;
}

.dm-friend-avatar-button {
  width: 52px;
  min-width: 52px;
  height: 52px;
  padding: 5px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.dm-friend-avatar-button:hover {
  background: rgba(103, 215, 255, 0.06);
}

.dm-friend-main-button {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 7px 8px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.dm-friend-main-button:hover {
  background: rgba(103, 215, 255, 0.04);
}

.dm-friend-main-button:focus-visible,
.dm-friend-avatar-button:focus-visible,
.dm-back-button:focus-visible,
.dm-panel-close:focus-visible,
.dm-send-button:focus-visible,
.floating-neon-toggle:focus-visible,
.dm-profile-menu button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(103, 215, 255, 0.14);
}

.dm-friend-avatar {
  position: relative;
  width: 42px;
  height: 42px;
}

.dm-friend-avatar .dm-avatar {
  width: 100%;
  height: 100%;
}

.dm-friend-flag {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(223, 248, 255, 0.28);
  background: rgba(10, 18, 31, 0.86);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.18);
}

.dm-friend-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dm-friend-main {
  min-width: 0;
}

.dm-friend-name {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dm-friend-status {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
}

.dm-overlay-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 40;
}

#globalProfileOverlayRoot {
  position: fixed;
  inset: 0;
  pointer-events: none;
  /* 전역 프로필 카드는 항상 최상위 모달이어야 한다.
     AI 스튜디오 라이트박스(z=1200), 버그 신고 모달(z=2200) 등 다른
     오버레이보다 위에 떠야 하므로 충분히 높은 값을 사용한다. */
  z-index: 100000;
}

#globalProfileOverlayRoot:empty {
  display: none;
}

body.global-profile-modal-open {
  overflow: hidden;
}

.global-profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  pointer-events: auto;
  background:
    radial-gradient(circle at 50% 16%, rgba(124, 214, 255, 0.08), transparent 28%),
    rgba(3, 8, 19, 0.48);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: global-profile-overlay-in .18s ease-out both;
}

.global-profile-overlay.is-closing {
  animation: global-profile-overlay-out .18s ease-in forwards;
}

.global-profile-modal {
  width: 100%;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 32px;
}

.global-profile-card {
  position: relative;
  width: min(470px, calc(100vw - 54px));
  aspect-ratio: 1 / 1.03;
  min-height: 420px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-radius: 28px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.022)),
    linear-gradient(180deg, rgba(8, 17, 31, 0.34), rgba(5, 12, 24, 0.28));
  border: 1px solid rgba(196, 244, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 18px 44px rgba(0, 7, 20, 0.34),
    0 0 4px rgba(168, 239, 255, 0.2);
  backdrop-filter: blur(24px) saturate(122%);
  -webkit-backdrop-filter: blur(24px) saturate(122%);
  isolation: isolate;
  animation: global-profile-card-in .2s cubic-bezier(.18, .84, .32, 1) both;
}

.global-profile-overlay.is-closing .global-profile-card {
  animation: global-profile-card-out .18s ease-in forwards;
}

.global-profile-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.8px;
  border-radius: inherit;
  background:
    conic-gradient(
      from 180deg at 50% 50%,
      rgba(141, 233, 255, 0.1) 0deg,
      rgba(255, 255, 255, 0.02) 32deg,
      rgba(255, 187, 224, 0.92) 68deg,
      rgba(255, 255, 255, 0.2) 90deg,
      rgba(255, 255, 255, 0.04) 122deg,
      rgba(194, 244, 255, 0.08) 176deg,
      rgba(165, 241, 255, 0.92) 226deg,
      rgba(255, 255, 255, 0.14) 270deg,
      rgba(140, 231, 255, 0.92) 320deg,
      rgba(141, 233, 255, 0.1) 360deg
    );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 1;
  pointer-events: none;
  filter:
    drop-shadow(-10px -8px 18px rgba(255, 164, 213, 0.54))
    drop-shadow(11px -8px 20px rgba(176, 243, 255, 0.44))
    drop-shadow(-8px 10px 20px rgba(143, 235, 255, 0.38))
    drop-shadow(8px 10px 20px rgba(126, 229, 255, 0.34))
    drop-shadow(0 0 6px rgba(232, 248, 255, 0.26));
}

.global-profile-card::after {
  content: "";
  position: absolute;
  inset: -12%;
  border-radius: inherit;
  background:
    radial-gradient(circle at 9% 9%, rgba(255, 170, 218, 0.62), transparent 13%),
    radial-gradient(circle at 91% 9%, rgba(213, 247, 255, 0.72), transparent 14%),
    radial-gradient(circle at 9% 91%, rgba(183, 243, 255, 0.7), transparent 14%),
    radial-gradient(circle at 91% 91%, rgba(150, 236, 255, 0.62), transparent 13%),
    linear-gradient(90deg, rgba(255, 255, 255, 0) 8%, rgba(172, 239, 255, 0.12) 10%, rgba(255, 255, 255, 0) 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0) 8%, rgba(173, 239, 255, 0.11) 10%, rgba(255, 255, 255, 0) 18%);
  opacity: 1;
  pointer-events: none;
  filter: blur(14px);
}

.global-profile-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(190, 243, 255, 0.16);
  background: rgba(7, 15, 28, 0.3);
  color: rgba(240, 251, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 0 16px rgba(99, 228, 255, 0.1);
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.global-profile-close:hover {
  border-color: rgba(205, 248, 255, 0.34);
  background: rgba(9, 19, 35, 0.46);
  box-shadow: 0 0 18px rgba(110, 231, 255, 0.2);
}

.global-profile-close:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(109, 224, 255, 0.12),
    0 0 18px rgba(93, 226, 255, 0.2);
}

.global-profile-close:active {
  transform: translateY(1px) scale(0.98);
}

.global-profile-close span {
  display: block;
  line-height: 1;
  font-size: 15px;
  transform: translateY(-1px);
}

.global-profile-card-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 32px 64px 0 28px;
}

.global-profile-header-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.global-profile-avatar-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  flex-shrink: 0;
}

.global-profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(232, 248, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 16px rgba(141, 233, 255, 0.14);
}

.global-profile-avatar .kw-avatar-media,
.global-profile-avatar .kw-avatar,
.global-profile-avatar img,
.global-profile-avatar svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.global-profile-country-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  overflow: hidden;
  border: 1.5px solid rgba(10, 18, 30, 0.9);
  background: rgba(10, 18, 30, 0.92);
  box-shadow: 0 0 12px rgba(110, 231, 255, 0.18);
}

.global-profile-country-badge img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.global-profile-name {
  min-width: 0;
  color: rgba(244, 250, 255, 0.96);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.03em;
  text-shadow: 0 0 12px rgba(181, 236, 255, 0.12);
  word-break: break-word;
}

.global-profile-follow-button {
  min-width: 102px;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(210, 247, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(245, 251, 255, 0.94);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 14px rgba(126, 229, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.global-profile-follow-button:hover {
  border-color: rgba(220, 249, 255, 0.34);
  background: rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 16px rgba(126, 229, 255, 0.12);
}

.global-profile-follow-button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(110, 231, 255, 0.12),
    0 0 16px rgba(126, 229, 255, 0.12);
}

.user-block-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.user-block-confirm-card {
  width: min(390px, 100%);
  border: 1px solid rgba(210, 247, 255, 0.16);
  border-radius: 18px;
  padding: 22px 20px 18px;
  background: rgba(18, 24, 34, 0.96);
  color: rgba(245, 251, 255, 0.96);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.user-block-confirm-title {
  display: block;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.user-block-confirm-message {
  margin: 12px 0 0;
  color: rgba(202, 216, 232, 0.74);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.62;
}

.user-block-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.user-block-confirm-actions button {
  min-width: 88px;
  min-height: 40px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
}

.user-block-confirm-cancel {
  border: 1px solid rgba(210, 247, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(245, 251, 255, 0.9);
}

.user-block-confirm-submit {
  border: 0;
  background: #e5484d;
  color: #fff;
}

.global-profile-card-body {
  position: relative;
  min-height: 100%;
  padding: 18px 28px 18px;
}

.global-profile-card-body::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 24%),
    radial-gradient(ellipse at 24% 16%, rgba(255, 255, 255, 0.14), transparent 20%),
    radial-gradient(ellipse at 78% 20%, rgba(144, 231, 255, 0.14), transparent 18%),
    radial-gradient(ellipse at 18% 84%, rgba(118, 220, 255, 0.09), transparent 19%),
    radial-gradient(ellipse at 74% 68%, rgba(146, 214, 255, 0.06), transparent 22%);
  opacity: 0.54;
  pointer-events: none;
}

.global-profile-card-body::after {
  content: none;
}

.global-profile-meta-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
}

.global-profile-meta-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: start;
  column-gap: 8px;
  row-gap: 8px;
}

.global-profile-meta-row.is-tags,
.global-profile-meta-row.is-message {
  align-items: start;
}

.global-profile-meta-label,
.global-profile-meta-separator {
  color: rgba(222, 236, 248, 0.66);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

.global-profile-meta-value,
.global-profile-message {
  margin: 0;
  color: rgba(245, 250, 255, 0.94);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: -0.02em;
}

.global-profile-personality-tags,
.global-profile-interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.global-profile-personality-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(209, 245, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(246, 250, 255, 0.95);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.global-profile-interest-tag {
  color: rgba(228, 242, 255, 0.86);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.global-profile-meta-empty {
  display: inline-block;
  min-height: 1px;
}

.global-profile-card-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0 22px 22px;
}

.global-profile-action-button,
.global-profile-action-empty {
  min-height: 68px;
  border-radius: 18px;
}

.global-profile-action-button {
  border: 1px solid rgba(209, 245, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(244, 250, 255, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.global-profile-action-button:hover {
  transform: translateY(-1px);
  border-color: rgba(216, 248, 255, 0.24);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 0 18px rgba(128, 231, 255, 0.08);
}

.global-profile-action-button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(110, 231, 255, 0.12),
    0 0 18px rgba(128, 231, 255, 0.08);
}

.global-profile-action-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(244, 250, 255, 0.96);
}

.global-profile-action-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.global-profile-action-label {
  color: rgba(244, 250, 255, 0.96);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.global-profile-action-empty {
  border: 1px solid rgba(209, 245, 255, 0.04);
  background: rgba(255, 255, 255, 0.015);
}

@keyframes global-profile-overlay-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes global-profile-overlay-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes global-profile-card-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.972);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes global-profile-card-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.978);
  }
}

.dm-profile-menu {
  position: absolute;
  pointer-events: auto;
  min-width: 124px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(127, 166, 224, 0.14);
  background: linear-gradient(180deg, rgba(13, 22, 40, 0.96), rgba(9, 16, 31, 0.98));
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.34);
  z-index: 30;
}

.dm-profile-menu[data-direction="above"] {
  transform-origin: bottom left;
}

.dm-profile-menu[data-direction="below"] {
  transform-origin: top left;
}

.dm-profile-menu button {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.dm-profile-menu button:hover {
  background: rgba(103, 215, 255, 0.1);
}

@media (max-width: 980px) {
  .floating-dm-shell {
    right: 12px;
    bottom: calc(40px + 12px + env(safe-area-inset-bottom, 0px));
  }

  .floating-dm-shell .floating-neon-notice {
    width: min(344px, calc(100vw - 24px));
    max-width: min(344px, calc(100vw - 24px));
  }

  .floating-dm-shell[data-open="true"] .floating-neon-notice {
    width: min(560px, calc(100vw - 24px));
    max-width: min(560px, calc(100vw - 24px));
    height: min(420px, calc(100vh - 120px));
  }

  .dm-panel-layout {
    grid-template-columns: minmax(0, calc(100% - 182px)) 182px;
  }

  .dm-list-column {
    width: 182px;
    max-width: 182px;
  }
}

@media (max-width: 780px) {
  .floating-dm-shell {
    right: 10px;
    bottom: calc(34px + 10px + env(safe-area-inset-bottom, 0px));
  }

  .floating-dm-shell .floating-neon-notice {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }

  .floating-dm-shell[data-open="true"] .floating-neon-notice {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    height: calc(100vh - 92px);
  }

  .floating-neon-toggle {
    width: 54px;
  }

  .dm-panel-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1.08fr) minmax(180px, 0.92fr);
  }

  .dm-list-column {
    width: auto;
    max-width: none;
  }

  .global-profile-modal {
    padding: 18px;
  }

  .global-profile-card {
    width: min(408px, calc(100vw - 36px));
    min-height: 0;
  }

  .global-profile-card-header {
    padding: 28px 54px 0 22px;
    gap: 12px;
  }

  .global-profile-header-main {
    gap: 12px;
  }

  .global-profile-avatar-wrap {
    width: 72px;
    height: 72px;
  }

  .global-profile-name {
    font-size: 20px;
  }

  .global-profile-follow-button {
    min-width: 92px;
    height: 34px;
    padding: 0 13px;
    font-size: 12px;
  }

  .global-profile-card-body {
    min-height: 100%;
    padding: 14px 22px 16px;
  }

  .global-profile-meta-list {
    gap: 11px;
  }

  .global-profile-meta-label,
  .global-profile-meta-separator {
    font-size: 12px;
  }

  .global-profile-meta-value,
  .global-profile-message {
    font-size: 14px;
  }

  .global-profile-personality-tag {
    min-height: 28px;
    padding: 0 10px;
    font-size: 11px;
  }

  .global-profile-interest-tag {
    font-size: 13px;
  }

  .global-profile-card-actions {
    gap: 6px;
    padding: 0 18px 18px;
  }

  .global-profile-action-button,
  .global-profile-action-empty {
    min-height: 62px;
    border-radius: 16px;
  }

  .dm-chat-column {
    border-right: 0;
    border-bottom: 1px solid rgba(125, 166, 224, 0.08);
  }

  .dm-chat-header,
  .dm-list-header,
  .dm-message-list,
  .dm-composer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .dm-bubble {
    max-width: 88%;
  }
}
