/* Mobile layout: viewport-safe chat sheet with touch-sized controls. */
@media (max-width: 600px) {
  .rsc { right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom)) }
  .rsc__panel { position:fixed;inset:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) calc(68px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));width:auto;height:auto;max-height:none;border-radius:18px }
  .rsc__head { min-height:62px;flex:0 0 auto;padding:12px 14px }
  .rsc__head strong { font-size:12px }
  .rsc__head small { max-width:calc(100vw - 86px);font-size:10px;line-height:1.35 }
  .rsc__offline-note { max-width:calc(100vw - 96px) }
  .rsc__close { width:40px;height:40px;flex:0 0 40px }
  .rsc__handoff { min-height:30px;padding:6px 14px;font-size:10px;line-height:1.35 }
  .rsc__body { min-height:0;padding:14px 12px 10px;overscroll-behavior:contain;scroll-padding-bottom:12px;-webkit-overflow-scrolling:touch }
  .rsc__message-row,.rsc__reply-row { gap:5px;margin-bottom:12px }
  .rsc__avatar,.rsc__avatar--small { width:30px;height:30px;flex-basis:30px }
  .rsc__bot-message,.rsc__reply-row .rsc__answer { max-width:calc(100% - 58px)!important }
  .rsc__message-row .rsc__message { max-width:78%!important }
  .rsc__message,.rsc__answer,.rsc__welcome .rsc__bot-message p { font-size:12.5px;line-height:1.48 }
  .rsc__outside-time { font-size:8px }
  .rsc__delivery { margin-right:1px;font-size:11px }
  .rsc__reply-row:has(.rsc__answer-options) .rsc__answer { max-width:calc(100% - 37px)!important }
  .rsc__answer-options { width:100%;max-width:100%;gap:7px }
  .rsc__answer-options button,.rsc__quick-wrap .rsc__chips button { width:100%;min-height:40px;justify-content:flex-start;padding:9px 11px;font-size:12px;line-height:1.35 }
  .rsc__quick-wrap { margin:13px 0 0 35px }
  .rsc__quick-wrap .rsc__chips { width:min(100%,280px) }
  .rsc__message-link,.rsc__reply-row .rsc__source { width:100%!important;max-width:100%!important }
  .rsc__source strong { max-width:calc(100% - 58px) }
  .rsc__message-image,.rsc__attachment-thumb { max-width:100% }
  .rsc__visitor-fields label { height:52px;margin-inline:12px }
  .rsc__visitor-fields input,.rsc__form input { font-size:16px }
  .rsc__privacy-note { padding-right:4px;font-size:9px }
  .rsc__footer { flex:0 0 auto;padding-bottom:env(safe-area-inset-bottom) }
  .rsc__footer .rsc__form { gap:8px;padding:9px 10px 7px }
  .rsc__form input { height:42px;padding:9px 10px }
  .rsc__form .rsc__attach-button { width:34px;height:42px;flex-basis:34px }
  .rsc__form>button[type="submit"] { width:42px;height:42px;flex-basis:42px }
  .rsc__credit { padding:0 12px 6px }
  .rsc__attachment-preview { max-width:calc(100% - 20px);margin:7px 10px 0 }
  .rsc__attachment-remove { width:34px;height:34px;right:1px }
  .rsc__notifications { position:fixed;right:max(10px,env(safe-area-inset-right));bottom:calc(68px + env(safe-area-inset-bottom));width:calc(100vw - 20px) }
  .rsc__notification { max-width:min(100%,360px) }
  .rsc__lightbox { padding:48px 12px 18px }
  .rsc__lightbox img { max-width:100%;max-height:calc(100dvh - 72px);border-radius:9px }
  .rsc__lightbox-close { top:max(8px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));width:44px;height:44px }
}
@media (max-width:360px) {
  .rsc__panel { inset:env(safe-area-inset-top) 0 calc(62px + env(safe-area-inset-bottom)) 0;border-right:0;border-left:0;border-radius:0 0 16px 16px }
  .rsc__body { padding-inline:9px }
  .rsc__message-row .rsc__message { max-width:82%!important }
}
@media (max-width:600px) and (max-height:520px) and (orientation:landscape) {
  .rsc__panel { inset:4px 68px 4px 4px }
  .rsc__head { min-height:52px;padding-block:8px }
  .rsc__offline-note,.rsc__credit { display:none }
}
@media (prefers-reduced-motion:reduce) { .rsc__body { scroll-behavior:auto } }
