/* A private little letterbox; all rules stay inside the message application. */
.ym-host { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden !important; }
.ym-messages { --ym-ink: #71577e; --ym-muted: #a590ac; --ym-line: #eae0ec; position: relative; display: flex; flex: 1; width: 100%; height: 100%; min-width: 0; min-height: 0; overflow: hidden; background: #fcf8f4; color: var(--ym-ink); font-size: 13px; line-height: 1.5; text-shadow: none; }
.ym-messages *, .ym-messages *::before, .ym-messages *::after { box-sizing: border-box; }
.ym-messages [hidden] { display: none !important; }
.ym-messages button, .ym-messages textarea { font: inherit; }
.ym-messages button { border: 0; cursor: pointer; touch-action: manipulation; }
.ym-messages button:disabled { cursor: default; opacity: .46; }
.ym-messages button:focus-visible, .ym-messages a:focus-visible, .ym-messages textarea:focus-visible, .ym-scroll:focus-visible { outline: 3px solid #b497c6; outline-offset: 2px; }
.ym-messages button svg, .ym-messages a svg { width: 18px; height: 18px; flex: none; }
.ym-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.ym-workspace { display: grid; grid-template-columns: 246px minmax(0, 1fr); width: 100%; min-height: 0; }
.ym-messages[data-role="visitor"] .ym-workspace { grid-template-columns: minmax(0, 1fr); }
.ym-sidebar { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 19px 13px 13px; border-right: 1px solid #e8dfe9; background: linear-gradient(145deg, #f4ecf4, #f8f2f5 80%); }
.ym-inbox-header { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 12px; padding: 0 5px; }
.ym-eyebrow { display: block; color: #b19bb6; font-size: 8px; font-weight: 500; line-height: 1.5; letter-spacing: 1.9px; }
.ym-inbox-title h2 { margin: 4px 0 0; color: #81628f; font-size: 23px; line-height: 1.3; font-weight: 550; }
.ym-icon-button { display: grid; flex: none; place-items: center; width: 40px; height: 40px; padding: 9px; border-radius: 13px; background: transparent; color: #af96b9; }
.ym-icon-button:hover { background: #ede0f14d; }
.ym-inbox-note { flex: none; margin: 13px 6px 18px; color: #ac96af; font-size: 10px; line-height: 1.8; }
.ym-inbox-status { margin: 15px 8px; color: #ac93b1; font-size: 12px; line-height: 1.9; }
.ym-thread-list { min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #dac9df transparent; }
.ym-thread-item { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; min-height: 78px; margin: 0 0 5px; padding: 12px 9px; border: 1px solid transparent !important; border-radius: 17px; background: transparent; color: inherit; text-align: left; }
.ym-thread-item:hover { background: #fffaf880; }
.ym-thread-item[aria-current="true"] { border-color: #e2d3e9 !important; background: #fffaf5d9; box-shadow: 0 4px 13px -9px #95749e52; }
.ym-avatar { display: grid; place-items: center; flex: none; width: 40px; height: 40px; overflow: hidden; border: 1px solid #fff9; border-radius: 14px; background: linear-gradient(140deg, #e9dcec, #e8e4d6); color: #a181ae; font: italic 21px/1 Georgia, serif; }
.ym-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ym-list-avatar { width: 38px; height: 38px; border-radius: 13px; font-size: 18px; }
.ym-thread-copy { flex: 1; min-width: 0; }
.ym-thread-line { display: flex; align-items: baseline; justify-content: space-between; gap: 7px; }
.ym-thread-line strong { display: block; overflow: hidden; color: #876493; font-size: 12px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.ym-thread-line time { flex: none; color: #b49db8; font-size: 8px; white-space: nowrap; }
.ym-thread-preview { display: block; margin-top: 6px; overflow: hidden; color: #af99b0; font-size: 10px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.ym-unread { position: absolute; left: 35px; top: 8px; display: grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border: 2px solid #f7f0f5; border-radius: 10px; background: #ae8cbb; color: #fffaf8; font-size: 8px; font-weight: 600; }
.ym-more-threads { flex: none; align-self: center; min-height: 44px; padding: 8px 15px; background: transparent; color: #ac90b4; font-size: 10px !important; }
.ym-conversation { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: radial-gradient(ellipse at 95% 8%, #f4edf57d, transparent 60%), #fcf9f5; }
.ym-thread-header { position: relative; z-index: 2; display: flex; flex: none; align-items: center; gap: 11px; min-height: 72px; padding: 12px 20px; border-bottom: 1px solid #ece3ed; background: #fcf8f6ec; }
.ym-thread-heading { flex: 1; min-width: 0; }
.ym-thread-heading h3 { margin: 0; overflow: hidden; color: #856292; font-size: 14px; font-weight: 550; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.ym-thread-heading p { margin: 3px 0 0; color: #ac96af; font-size: 9px; line-height: 1.5; }
.ym-back-button { display: none; flex: none; align-items: center; justify-content: center; width: 38px; height: 44px; padding: 8px; border-radius: 12px; background: transparent; color: #a385b0; }
.ym-notice { z-index: 2; display: flex; flex: none; align-items: center; gap: 12px; padding: 9px 18px; border-bottom: 1px solid #f0e2e7; background: #faf0e9; color: #ae8798; font-size: 11px; line-height: 1.6; }
.ym-notice > span { flex: 1; min-width: 0; }
.ym-notice-retry { flex: none; min-height: 36px; padding: 5px 8px; border-radius: 9px; background: #f2e2e8; color: #a47e95; font-size: 10px !important; }
.ym-scroll { position: relative; flex: 1 1 0; min-height: 0; overflow: auto; padding: 14px 22px 18px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #d9c9df transparent; scroll-padding: 15px; outline: none; }
.ym-history { display: flex; flex-direction: column; min-height: 0; }
.ym-older { display: block; min-height: 40px; margin: 0 auto 14px; padding: 7px 16px; border: 1px solid #eee4ef !important; border-radius: 20px; background: #fffaf8; color: #ad92b5; font-size: 10px !important; }
.ym-day { align-self: center; margin: 4px 0 19px; color: #b8a4bc; font-size: 9px; line-height: 1.7; letter-spacing: .4px; }
.ym-message { align-self: flex-start; width: fit-content; max-width: 86%; margin: 0 0 16px; }
.ym-message.ym-mine { align-self: flex-end; }
.ym-bubble { position: relative; min-width: 42px; padding: 11px 14px 10px; border: 1px solid #eae1eb; border-radius: 18px 18px 18px 5px; background: #f1e9f2; color: #82698e; box-shadow: 0 2px 5px #987b9b06; }
.ym-mine .ym-bubble { border-color: #b29ac0; border-radius: 18px 18px 5px 18px; background: linear-gradient(130deg, #b49cc2, #a98bb8); color: #fffdf9; }
.ym-message-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; font-size: 13px; line-height: 1.85; }
.ym-read-anchor { display: block; width: 2px; height: 1px; }
.ym-message-meta { display: flex; align-items: center; gap: 7px; min-height: 17px; padding: 5px 3px 0; color: #b7a2bb; font-size: 8px; line-height: 1.5; }
.ym-mine .ym-message-meta { justify-content: flex-end; }
.ym-message-status { display: inline-flex; align-items: center; gap: 5px; }
.ym-failed .ym-bubble { border-color: #c9acbe; background: #c2a7bb; }
.ym-failed .ym-message-status { color: #b3849d; }
.ym-retry-message { display: flex; align-items: center; justify-content: center; min-height: 38px; margin: 5px 0 0 auto; padding: 6px 12px; border: 1px solid #e7d6e6 !important; border-radius: 12px; background: #f6ebf2; color: #a37ba3; font-size: 10px !important; }
.ym-sending .ym-bubble { animation: ym-bubble-arrive .2s ease-out both; }
.ym-typing { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.ym-typing-dots { display: inline-flex; align-items: center; justify-content: center; gap: 4px; width: 49px; height: 32px; border: 1px solid #e9deec; border-radius: 16px 16px 16px 5px; background: #f0e7f3; }
.ym-typing-dots i, .ym-sending-dots i { display: block; width: 4px; height: 4px; border-radius: 50%; background: #b49ac0; animation: ym-dot 1.2s ease-in-out infinite; }
.ym-typing-dots i:nth-child(2), .ym-sending-dots i:nth-child(2) { animation-delay: .16s; }
.ym-typing-dots i:nth-child(3), .ym-sending-dots i:nth-child(3) { animation-delay: .32s; }
.ym-typing-text { color: #b6a0bb; font-size: 9px; }
.ym-sending-dots { display: inline-flex; gap: 3px; padding: 0 2px; }
.ym-sending-dots i { width: 3px; height: 3px; background: #bea8c6; }
.ym-jump { position: absolute; right: 19px; bottom: 111px; z-index: 4; display: flex; align-items: center; gap: 7px; min-height: 38px; padding: 8px 12px; border: 1px solid #e0cfe9 !important; border-radius: 20px; background: #fffaf8f5; box-shadow: 0 4px 18px #83608b1c; color: #a181af; font-size: 10px !important; }
.ym-jump svg { width: 14px !important; height: 14px !important; }
.ym-composer { position: relative; z-index: 3; display: flex; flex: none; flex-direction: column; gap: 7px; margin: 0; padding: 13px 18px max(12px, var(--display-safe-bottom, env(safe-area-inset-bottom, 0px))); border-top: 1px solid #eee4ed; background: #fcf8f5ed; }
.ym-input-wrap { display: flex; align-items: flex-end; gap: 9px; min-height: 46px; padding: 7px 7px 7px 13px; border: 1px solid #e3d6e9; border-radius: 19px; background: #fffdf9; box-shadow: 0 2px 8px #86638a04; }
.ym-input-wrap:focus-within { border-color: #c7add6; box-shadow: 0 0 0 3px #e9ddee5c; }
.ym-input { display: block; flex: 1; width: 100%; min-width: 0; min-height: 28px; max-height: 128px; margin: 0; padding: 3px 0; border: 0; outline: none !important; resize: none; background: transparent; color: #80628f; font-size: 13px !important; line-height: 1.65; }
.ym-input::placeholder { color: #bdabc3; }
.ym-send { display: grid; place-items: center; flex: none; width: 32px; height: 32px; min-height: 32px; padding: 7px; border-radius: 50%; background: #ad91bd; color: #fffdf9; transition: background .15s, transform .15s; }
.ym-send:active:not(:disabled) { transform: scale(.94); }
.ym-send:disabled { background: #dfd0e5; opacity: .8 !important; }
.ym-send svg { width: 18px !important; height: 18px !important; }
.ym-composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 4px; }
.ym-composer-help { margin: 0; color: #bda9c1; font-size: 8px; line-height: 1.6; }
.ym-counter { color: #b696b9; font-size: 8px; font-variant-numeric: tabular-nums; }
.ym-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100%; padding: 28px 12px 40px; color: #b39aba; text-align: center; }
.ym-empty > svg { width: 42px; height: 42px; margin-bottom: 18px; stroke: #c9b3d1; }
.ym-empty h3 { margin: 0 0 9px; color: #a184ae; font-size: 16px; font-weight: 500; }
.ym-empty p { max-width: 275px; margin: 0; font-size: 11px; line-height: 1.95; }
.ym-empty small { display: block; margin-top: 17px; color: #c4b0c6; font-size: 8px; letter-spacing: .4px; }
.ym-access { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; min-width: 0; min-height: 0; overflow: auto; padding: 34px 24px max(25px, var(--display-safe-bottom, env(safe-area-inset-bottom, 0px))); background: radial-gradient(ellipse at 85% 10%, #f0e8f3, transparent 60%), radial-gradient(ellipse at 6% 100%, #f5ecda66, transparent 50%), #fcf8f4; text-align: center; }
.ym-access-art { position: relative; flex: none; width: 92px; height: 85px; margin: 2px 0 24px; }
.ym-access-avatar { display: block; width: 78px; height: 78px; border: 5px solid #fffdf9; border-radius: 26px; background: #ede6f0; box-shadow: 0 9px 25px -11px #8c6a9b4d; transform: rotate(-5deg); }
.ym-access-bubble { position: absolute; right: -6px; bottom: -3px; display: grid; place-items: center; width: 41px; height: 35px; border: 2px solid #fffaf6; border-radius: 14px 14px 5px 14px; background: #b9a2c7; color: #fff9f3; transform: rotate(5deg); }
.ym-access-bubble svg { width: 23px; height: 23px; }
.ym-access h2 { margin: 13px 0 12px; color: #9571a1; font-size: 20px; line-height: 1.6; font-weight: 550; }
.ym-access > p { max-width: 345px; margin: 0; color: #ad96b0; font-size: 12px; line-height: 2; }
.ym-sign-in { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 12px; min-height: 46px; margin: 24px 0 17px; padding: 11px 19px; border: 1px solid #ab8eba !important; border-radius: 15px; background: #ad91bd; color: #fffcf6; font-size: 12px !important; text-decoration: none; }
.ym-sign-in svg { width: 15px !important; height: 15px !important; transform: rotate(45deg); }
.ym-access .ym-access-privacy { display: flex; align-items: center; gap: 6px; color: #bca7c1; font-size: 9px; }
.ym-access-privacy svg { width: 12px; height: 12px; }

.ym-messages.ym-compact[data-role="owner"] .ym-workspace { grid-template-columns: minmax(0, 1fr); }
.ym-messages.ym-compact[data-role="owner"][data-view="list"] .ym-conversation,
.ym-messages.ym-compact[data-role="owner"][data-view="thread"] .ym-sidebar { display: none; }
.ym-messages.ym-compact[data-role="owner"] .ym-back-button { display: flex; }
.ym-messages.ym-compact .ym-thread-header { min-height: 65px; gap: 9px; padding: 10px 13px; }
.ym-messages.ym-compact .ym-thread-header .ym-back-button { margin-left: -8px; margin-right: -4px; }
.ym-messages.ym-compact .ym-scroll { padding: 14px 16px 18px; }
.ym-messages.ym-compact .ym-message { max-width: 88%; }
.ym-messages.ym-compact .ym-sidebar { padding: 20px 15px 15px; border-right: 0; }
.ym-messages.ym-compact .ym-inbox-note { margin-bottom: 19px; }
.ym-messages.ym-compact .ym-thread-item { min-height: 88px; gap: 13px; padding-inline: 12px; }
.ym-messages.ym-compact .ym-list-avatar { width: 44px; height: 44px; border-radius: 15px; }
.ym-messages.ym-compact .ym-thread-line strong { font-size: 14px; }
.ym-messages.ym-compact .ym-thread-preview { font-size: 12px; }
.ym-messages.ym-compact .ym-thread-line time { font-size: 10px; }
.ym-messages.ym-compact .ym-unread { left: 44px; top: 10px; }
html:is([data-device="phone"], [data-device="tablet"]) .ym-icon-button { width: 44px; height: 44px; }
html:is([data-device="phone"], [data-device="tablet"]) .ym-input { font-size: 16px !important; }
html:is([data-device="phone"], [data-device="tablet"]) .ym-input::placeholder { font-size: 13px; }
html:is([data-device="phone"], [data-device="tablet"]) .ym-send { width: 40px; height: 40px; min-height: 40px; padding: 10px; }
html:is([data-device="phone"], [data-device="tablet"]) .ym-input-wrap { min-height: 54px; align-items: center; padding: 6px 6px 6px 13px; border-radius: 22px; }
html[data-device="phone"] .ym-composer { gap: 5px; padding: 10px 12px max(12px, var(--display-safe-bottom, env(safe-area-inset-bottom, 0px))); }
html[data-device="phone"] .ym-composer-help { font-size: 8px; }
html[data-device="phone"] .ym-message-text { font-size: 14px; line-height: 1.8; }
html[data-device="phone"] .ym-message-meta { font-size: 9px; padding-top: 5px; }
html[data-device="phone"] .ym-thread-heading h3 { font-size: 15px; }
html[data-device="phone"] .ym-thread-heading p { font-size: 9px; }
html[data-device="phone"] .ym-retry-message { min-height: 44px; }
html[data-device="tablet"] .ym-workspace { grid-template-columns: 270px minmax(0, 1fr); }
html[data-device="tablet"] .ym-messages[data-role="visitor"] .ym-workspace { grid-template-columns: minmax(0, 1fr); }
html[data-device="tablet"] .ym-messages[data-role="visitor"] .ym-conversation { padding-inline: max(0px, calc((100% - 820px) / 2)); }
html[data-device="tablet"] .ym-message { max-width: 77%; }
@media (max-width: 360px) {
  .ym-messages.ym-compact .ym-scroll { padding-inline: 12px; }
  .ym-messages.ym-compact .ym-thread-header { gap: 7px; padding-inline: 10px; }
  .ym-messages.ym-compact .ym-bubble { padding: 9px 12px 8px; }
  .ym-messages.ym-compact .ym-access { padding-inline: 21px; }
  .ym-messages.ym-compact .ym-access h2 { font-size: 18px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  html[data-device="phone"] .ym-thread-header { min-height: 52px; padding-block: 5px; }
  html[data-device="phone"] .ym-peer-avatar { width: 33px; height: 33px; border-radius: 11px; }
  html[data-device="phone"] .ym-thread-heading p { margin-top: 1px; font-size: 8px; }
  html[data-device="phone"] .ym-composer { padding-block: 6px max(8px, var(--display-safe-bottom, env(safe-area-inset-bottom, 0px))); }
  html[data-device="phone"] .ym-composer-footer { display: none; }
  html[data-device="phone"] .ym-input { max-height: 72px; }
  html[data-device="phone"] .ym-access { justify-content: flex-start; padding-top: 18px; }
  html[data-device="phone"] .ym-access-art { width: 61px; height: 51px; margin-bottom: 12px; }
  html[data-device="phone"] .ym-access-avatar { width: 50px; height: 50px; border-width: 3px; border-radius: 16px; }
  html[data-device="phone"] .ym-access-bubble { width: 30px; height: 27px; border-radius: 10px 10px 3px 10px; }
  html[data-device="phone"] .ym-access-bubble svg { width: 17px; height: 17px; }
  html[data-device="phone"] .ym-access h2 { margin-block: 7px; font-size: 17px; }
  html[data-device="phone"] .ym-access > p { max-width: 510px; font-size: 11px; }
  html[data-device="phone"] .ym-sign-in { margin-block: 13px; }
}
@keyframes ym-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .55; } 30% { transform: translateY(-3px); opacity: 1; } }
@keyframes ym-bubble-arrive { from { opacity: .5; transform: translateY(5px) scale(.98); } to { opacity: 1; transform: none; } }
body.reduce-motion .ym-messages *, body.reduce-motion .ym-messages *::before, body.reduce-motion .ym-messages *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) { .ym-messages *, .ym-messages *::before, .ym-messages *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
