/* DAYSTY Messages */
body.d-msgmode { background: #0B0B0E; color: #F3F3F6; overflow: hidden; --mtop: calc(52px + env(safe-area-inset-top)); --mtab: calc(58px + env(safe-area-inset-bottom)); }
.d-msgmode .d-gate { z-index: 200; }
.d-mtop { position: fixed; z-index: 40; top: 0; left: 0; right: 0; height: var(--mtop); padding: env(safe-area-inset-top) 14px 0; display: flex; align-items: center; justify-content: space-between; background: #131318; border-bottom: 1px solid rgba(255,255,255,.07); }
.d-mtop__nav { display: none; gap: 4px; }
.d-mtop__nav a { padding: 8px 12px; border-radius: 999px; font: 600 14px var(--d-font-body); color: rgba(255,255,255,.72); text-decoration: none; }
.d-mtop__nav a:hover { background: rgba(255,255,255,.08); color: #fff; }

.d-msgs { position: fixed; top: var(--mtop); left: 0; right: 0; bottom: var(--mtab); display: grid; grid-template-columns: 1fr; min-height: 0; }
.d-msgs__list, .d-msgs__chat { min-height: 0; min-width: 0; display: flex; flex-direction: column; position: relative; }
.d-msgs[data-view="list"] .d-msgs__chat { display: none; }
.d-msgs[data-view="thread"] .d-msgs__list { display: none; }
.d-msgmode:has(.d-msgs[data-view="thread"]) { --mtab: 0px; }
.d-msgmode:has(.d-msgs[data-view="thread"]) .d-mtab { display: none; }

.d-msgs__list > header { padding: 14px 14px 10px; }
.d-msgs__list h1 { margin: 0 0 10px; font: 800 24px var(--d-font-head, var(--d-font-body)); letter-spacing: -.01em; }
.d-msgs__list input[type=search] { width: 100%; box-sizing: border-box; height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); background: #1B1B22; color: #fff; font-size: 16px; }
.d-msgs__list ul { list-style: none; margin: 0; padding: 0 0 12px; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.d-conv a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; color: inherit; text-decoration: none; }
.d-conv a:hover, .d-conv.is-active a { background: rgba(255,255,255,.06); }
.d-conv[hidden] { display: none; }
.d-conv__t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.d-conv__t b { font: 700 15px var(--d-font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-conv__t em { font: 800 9px var(--d-font-body); font-style: normal; letter-spacing: .06em; padding: 2px 6px; margin-left: 4px; border-radius: 4px; background: rgba(139,92,246,.25); color: #C4B5FD; vertical-align: 1px; }
.d-conv__t small { font-size: 13px; color: rgba(255,255,255,.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-conv.is-unread .d-conv__t small { color: #fff; font-weight: 600; }
.d-conv__m { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; font-size: 12px; color: rgba(255,255,255,.5); }
.d-conv__n { font: 800 11px var(--d-font-body); font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; display: grid; place-items: center; border-radius: 999px; background: #E11D48; color: #fff; }
.d-conv__empty { padding: 28px 18px; text-align: center; color: rgba(255,255,255,.6); line-height: 1.5; }

.d-mav { flex: none; position: relative; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #2A2A33 center / cover no-repeat; color: #fff; font: 800 18px var(--d-font-body); }
.d-mav.is-on::after { content: ""; position: absolute; right: 0; bottom: 1px; width: 12px; height: 12px; border-radius: 50%; background: #22C55E; border: 2px solid #0B0B0E; }

.d-mhead { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 4px; background: #131318; border-bottom: 1px solid rgba(255,255,255,.07); }
.d-mhead__back { width: 44px; height: 44px; display: grid; place-items: center; color: #fff; border-radius: 50%; }
.d-mhead__who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.d-mhead__who .d-mav { width: 40px; height: 40px; font-size: 16px; }
.d-mhead__who span:last-child { display: flex; flex-direction: column; min-width: 0; }
.d-mhead__who b { font: 700 15px var(--d-font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-mhead__who small { font-size: 12px; color: #4ADE80; }
.d-mhead__menu { position: relative; }
.d-mhead__menu > button { width: 44px; height: 44px; border: 0; background: none; color: #fff; font-size: 24px; border-radius: 50%; cursor: pointer; }
.d-mmenu { position: absolute; right: 4px; top: 46px; z-index: 5; min-width: 190px; padding: 6px; border-radius: 12px; background: #1F1F27; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.d-mmenu[hidden] { display: none; }
.d-mmenu button { display: block; width: 100%; text-align: left; padding: 11px 12px; border: 0; background: none; color: #fff; font: 600 14px var(--d-font-body); border-radius: 8px; cursor: pointer; }
.d-mmenu button:hover { background: rgba(255,255,255,.07); }
.d-mmenu button[data-act="block"], .d-mmenu button[data-act="delete"] { color: #FB7185; }
.d-mbanner { flex: none; margin: 0; padding: 10px 14px; background: rgba(225,29,72,.14); color: #FDA4AF; font-size: 13px; text-align: center; }
.d-mbanner[hidden] { display: none; }

.d-bubbles { list-style: none; margin: 0; padding: 14px 12px; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 4px; -webkit-overflow-scrolling: touch; }
.d-day { align-self: center; margin: 10px 0 6px; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.07); color: rgba(255,255,255,.6); font: 600 11px var(--d-font-body); list-style: none; }
.d-b { max-width: min(78%, 520px); padding: 8px 12px 6px; border-radius: 18px; font-size: 15px; line-height: 1.38; word-break: break-word; overflow-wrap: anywhere; }
.d-b p { margin: 0; }
.d-b--them { align-self: flex-start; background: #23232C; border-bottom-left-radius: 6px; }
.d-b--me { align-self: flex-end; background: linear-gradient(135deg, #B5122E, #7C3AED); border-bottom-right-radius: 6px; }
.d-b__meta { display: flex; justify-content: flex-end; align-items: center; gap: 5px; margin-top: 2px; font-size: 11px; opacity: .7; }
.d-b--me.is-pending { opacity: .6; }
.d-b--me.is-failed { background: #3A1520; outline: 1px solid #E11D48; cursor: pointer; }
.d-b--me.is-failed .d-b__meta::after { content: "Not sent. Tap to retry"; color: #FDA4AF; }
.d-tick { width: 14px; height: 9px; position: relative; display: inline-block; }
.d-tick::before { content: ""; position: absolute; left: 1px; top: 0; width: 4px; height: 8px; border: solid currentColor; border-width: 0 1.8px 1.8px 0; transform: rotate(40deg); }
.d-tick.is-read { color: #67E8F9; }
.d-tick.is-read::after { content: ""; position: absolute; left: 6px; top: 0; width: 4px; height: 8px; border: solid currentColor; border-width: 0 1.8px 1.8px 0; transform: rotate(40deg); }
.d-newpill { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 3; padding: 8px 16px; border: 0; border-radius: 999px; background: #E11D48; color: #fff; font: 700 13px var(--d-font-body); box-shadow: 0 6px 18px rgba(0,0,0,.5); cursor: pointer; }
.d-newpill[hidden] { display: none; }

.d-composer { flex: none; position: relative; display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: #131318; border-top: 1px solid rgba(255,255,255,.07); flex-wrap: wrap; }
.d-composer[hidden] { display: none; }
.d-composer textarea { flex: 1; min-width: 0; max-height: 120px; resize: none; padding: 11px 16px; box-sizing: border-box; border-radius: 22px; border: 1px solid rgba(255,255,255,.12); background: #1B1B22; color: #fff; font: 16px/1.3 var(--d-font-body); }
.d-composer textarea:focus { outline: 2px solid #8B5CF6; outline-offset: 0; }
.d-composer__send { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; display: grid; place-items: center; background: #E11D48; color: #fff; cursor: pointer; }
.d-composer__send:disabled { opacity: .5; }
.d-composer__n { position: absolute; right: 64px; top: -20px; font-size: 11px; color: #FDA4AF; }
.d-composer__tip { flex-basis: 100%; margin: 0; font-size: 11px; color: rgba(255,255,255,.4); text-align: center; }

.d-mempty { flex: 1; display: grid; place-items: center; padding: 24px; text-align: center; color: rgba(255,255,255,.7); }
.d-mempty--solo { position: fixed; inset: var(--mtop) 0 var(--mtab); }
.d-mempty h1, .d-mempty h2 { margin: 0 0 8px; color: #fff; }
.d-mtoast { position: fixed; z-index: 90; left: 50%; bottom: calc(var(--mtab) + 78px); transform: translateX(-50%); max-width: 90vw; margin: 0; padding: 10px 16px; border-radius: 12px; background: #2A2A33; color: #fff; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.d-mtoast[hidden] { display: none; }

.d-mtab { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; height: var(--mtab); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, 1fr); background: #131318; border-top: 1px solid rgba(255,255,255,.07); }
.d-mtab a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: rgba(255,255,255,.62); text-decoration: none; font: 600 11px var(--d-font-body); }
.d-mtab a[aria-current="page"] { color: #fff; }
.d-mtab svg { width: 22px; height: 22px; }
.d-mtab__n { position: absolute; top: 5px; left: 54%; min-width: 17px; height: 17px; padding: 0 5px; box-sizing: border-box; display: grid; place-items: center; border-radius: 999px; background: #E11D48; color: #fff; font: 800 10px var(--d-font-body); font-style: normal; }
.d-mtab__n[hidden] { display: none; }

@media (min-width: 900px) {
  body.d-msgmode { --mtab: 0px; }
  .d-mtab { display: none; }
  .d-mtop { padding-left: 24px; padding-right: 24px; }
  .d-mtop__nav { display: flex; }
  .d-msgs { grid-template-columns: 360px 1fr; max-width: 1180px; margin: 0 auto; border-left: 1px solid rgba(255,255,255,.07); border-right: 1px solid rgba(255,255,255,.07); }
  .d-msgs[data-view] .d-msgs__list, .d-msgs[data-view] .d-msgs__chat { display: flex; }
  .d-msgs__list { border-right: 1px solid rgba(255,255,255,.07); }
  .d-mhead__back { display: none; }
  .d-mhead { padding-left: 14px; }
  .d-bubbles { padding: 18px 22px; }
  .d-mtoast { bottom: 100px; }
}
@media (prefers-reduced-motion: no-preference) { .d-b { animation: dmIn .16s ease-out; } @keyframes dmIn { from { opacity: 0; transform: translateY(6px); } } }
