:root { color-scheme: light; }
* { box-sizing: border-box; }
html { min-width: 320px; background: #f1e5ed; }
body { margin: 0; color: #2b1e2a; font-family: Arial, Helvetica, sans-serif; }
.phone { width: min(100%, 800px); min-height: 100svh; margin: 0 auto; background: repeating-linear-gradient(90deg, #f8f0f6 0, #f8f0f6 2px, #f5edf3 3px, #f5edf3 5px); box-shadow: 0 0 0 1px #d8b8ce, 0 0 48px #b3609840; }
.phone.list-view { background: #fff; }
.conversation-preview { display: none; }
.desktop-chat[hidden], .mobile-reader-heading { display: none; }
.top-frame { position: sticky; top: 0; z-index: 2; }
.status-bar { height: 28px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 16px; background: #111; color: #fff; font: 700 15px/1 Arial, Helvetica, sans-serif; letter-spacing: .02em; }
.status-left, .status-right { display: flex; align-items: center; gap: 8px; min-width: 90px; }
.status-right { justify-content: flex-end; }
.signal { display: inline-flex; align-items: end; height: 13px; gap: 2px; }
.signal i { width: 3px; background: currentColor; display: block; border-radius: 1px; }
.signal i:nth-child(1) { height: 4px; }.signal i:nth-child(2) { height: 7px; }.signal i:nth-child(3) { height: 10px; }.signal i:nth-child(4) { height: 13px; }
.battery { display: block; width: 24px; height: 11px; border: 2px solid currentColor; border-radius: 2px; position: relative; }
.battery::before { content: ""; display: block; width: 15px; height: 5px; background: currentColor; margin: 1px; }
.battery::after { content: ""; position: absolute; width: 2px; height: 5px; background: currentColor; right: -5px; top: 1px; border-radius: 0 1px 1px 0; }
.chat-header { position: relative; min-height: 77px; display: flex; align-items: center; justify-content: center; padding: 12px 18px 14px; text-align: center; color: #fff; background: linear-gradient(#ec9ccf 0%, #dc73b4 35%, #c94d98 100%); border-bottom: 2px solid #a6427f; box-shadow: inset 0 1px #ffe1f2, inset 0 -1px #ec95c6, 0 2px 3px #88507155; text-shadow: 0 1px 2px #8f386f88; }
.chat-header h1 { margin: 0; font: 700 clamp(25px, 5vw, 36px)/1.05 Arial, Helvetica, sans-serif; letter-spacing: -.035em; }
.chat-header p { margin: 4px 0 0; color: #fce2f1; font: 600 clamp(12px, 2.3vw, 17px)/1.2 Arial, Helvetica, sans-serif; }
.back-link { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 2px; min-height: 40px; padding: 0 10px 0 5px; color: #fff; text-decoration: none; font: 700 15px/1 Arial, Helvetica, sans-serif; background: linear-gradient(#d57ab2, #ab3a7f); border: 1px solid #a0457f; border-radius: 8px; box-shadow: inset 0 1px #f8bde0, 0 1px 2px #7e3b6890; }
.conversation-header .mobile-back { display: none; }
.back-link::before { content: ""; width: 8px; height: 8px; transform: rotate(45deg); border-left: 2px solid #fff; border-bottom: 2px solid #fff; margin-left: 2px; }
.back-link:focus-visible, .chat-row:focus-visible { outline: 3px solid #57284f; outline-offset: -3px; }
.search-band { padding: 9px 13px; background: #ead8e4; border-bottom: 1px solid #d4b6c9; }
.search-box { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; background: #fff; border: 1px solid #c4abbc; border-radius: 16px; box-shadow: inset 0 1px 3px #4e284222; }
.search-box:focus-within { outline: 2px solid #b95899; outline-offset: 1px; }
.search-icon { position: relative; width: 12px; height: 12px; border: 2px solid #a78f9f; border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; width: 6px; height: 2px; right: -5px; bottom: -2px; transform: rotate(45deg); background: #a78f9f; border-radius: 2px; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; color: #322633; background: transparent; font: 15px Arial, Helvetica, sans-serif; }
.search-box input::placeholder { color: #aa9ba6; }
.chat-list { background: #fff; }
.chat-row { display: flex; align-items: center; gap: 12px; min-height: 82px; padding: 12px 15px 12px 43px; border-bottom: 1px solid #dfd9de; background: #fff; color: #2b242a; text-decoration: none; }
.chat-row[hidden] { display: none; }
.chat-row:hover { background: #fce9f5; }
.row-content { min-width: 0; flex: 1; }
.row-title { display: block; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 17px/1.15 Arial, Helvetica, sans-serif; }
.row-preview { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: #8b818a; font: 14px/1.2 Arial, Helvetica, sans-serif; }
.row-chevron { flex: 0 0 auto; width: 9px; height: 9px; border-top: 2px solid #aa9fa8; border-right: 2px solid #aa9fa8; transform: rotate(45deg); }
.chat-body { padding: 34px clamp(18px, 5vw, 44px) 90px; }
.message { display: flex; justify-content: flex-end; }
.bubble { position: relative; width: min(91%, 690px); padding: clamp(18px, 3.5vw, 30px); border: 2px solid #e686ba; border-radius: 24px; background: #f4b1d7; box-shadow: 0 2px 3px #92648045; font-size: clamp(18px, 2.6vw, 23px); line-height: 1.38; overflow-wrap: anywhere; }
.bubble::before { content: ""; position: absolute; right: -15px; top: 28px; width: 0; height: 0; border-top: 11px solid transparent; border-bottom: 11px solid transparent; border-left: 16px solid #e686ba; }
.bubble::after { content: ""; position: absolute; right: -11px; top: 30px; width: 0; height: 0; border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-left: 13px solid #f4b1d7; }
.bubble p { margin: 0 0 .75em; }
.bubble p:last-child { margin-bottom: 0; }
.paragraph-gap { height: .7em; }
@media (max-width: 899px) {
  .phone.show-chat .sidebar { display: none; }
  .phone.show-chat .conversation-preview { display: block; min-height: calc(100svh - 28px); background: repeating-linear-gradient(90deg, #f8f0f6 0, #f8f0f6 2px, #f5edf3 3px, #f5edf3 5px); }
  .phone.show-chat > .status-bar { position: sticky; top: 0; z-index: 3; }
  .conversation-header { position: sticky; top: 28px; z-index: 2; }
  .conversation-header .mobile-reader-heading { display: block; }
  .conversation-header .mobile-back { display: flex; }
  .conversation-header .desktop-reader-heading { display: none; }
}
@media (min-width: 900px) {
  .phone.list-view { width: 100%; height: 100dvh; min-height: 0; display: flex; flex-direction: column; box-shadow: none; }
  .tablet-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: clamp(330px, 28vw, 400px) minmax(0, 1fr); }
  .sidebar { min-height: 0; overflow-y: auto; border-right: 1px solid #d7b8cc; background: #fff; }
  .sidebar .chat-header { height: 90px; }
  .chat-row { padding-left: 20px; }
  .chat-row.selected { background: #fbe6f3; box-shadow: inset 4px 0 #e78fdb; }
  .conversation-preview { display: block; min-width: 0; min-height: 0; background: repeating-linear-gradient(90deg, #f8f0f6 0, #f8f0f6 2px, #f5edf3 3px, #f5edf3 5px); }
  .desktop-chat { height: 100%; display: flex; flex-direction: column; }
  .conversation-header { flex: 0 0 90px; min-width: 0; padding: 12px 24px; }
  .conversation-header h2 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font: 700 20px/1.2 Arial, Helvetica, sans-serif; }
  .desktop-chat .chat-body { flex: 1; min-height: 0; overflow-y: auto; padding: 36px clamp(24px, 5vw, 80px) 80px; }
  .desktop-chat .bubble { width: min(89%, 720px); font-size: 20px; }
}
@media (max-width: 600px) {
  .status-bar { height: 25px; font-size: 13px; padding: 0 10px; }
  .status-left, .status-right { min-width: 66px; }
  .chat-header { min-height: 74px; padding: 10px 16px 12px; }
  .back-link { left: 5px; min-height: 35px; padding-right: 7px; font-size: 12px; }
  .detail-title { max-width: 49%; }
  .chat-row { padding-left: 43px; }
  .chat-body { padding: 28px 17px 65px; }
  .bubble { width: 94%; padding: 16px 17px; border-radius: 18px; }
  .bubble::before { right: -12px; top: 21px; border-top-width: 9px; border-bottom-width: 9px; border-left-width: 13px; }
  .bubble::after { right: -9px; top: 23px; border-top-width: 7px; border-bottom-width: 7px; border-left-width: 10px; }
  .phone.show-chat .conversation-preview { min-height: calc(100svh - 25px); }
  .conversation-header { top: 25px; }
}
