.profile-photo{display:inline-grid;place-items:center;overflow:hidden;background:linear-gradient(145deg,#ef3348,#a8111e);color:#fff;font-weight:800}.profile-photo img{width:100%;height:100%;object-fit:cover}
.profile-photo .premium-avatar-svg,.profile-photo .profile-placeholder-icon{width:62%;height:62%;display:block}
.brand-logo-mark,.premium-mark-svg.brand-logo-mark,.custom-brand-logo,.brand-logo-main{width:100%!important;height:100%!important;object-fit:contain;display:block;background:transparent!important;box-shadow:none!important;filter:none!important}
.admin-symbol .brand-logo-mark,.sj-mf-mark .brand-logo-mark,.sj-auth-mark .brand-logo-mark{width:100%!important;height:100%!important;object-fit:contain;background:transparent!important}
.admin-symbol,.sj-mf-mark,.sj-auth-mark,.brand-mark{background:transparent!important;box-shadow:none!important;border:0!important}
.avatar-tile{display:inline-grid!important;place-items:center;overflow:hidden;background:linear-gradient(145deg,#ef3348,#a8111e);color:#fff;border-radius:12px;flex:0 0 auto}
.avatar-tile .premium-avatar-svg,.avatar-tile .premium-mark-svg{width:68%;height:68%;display:block}
.candidate-person>span.avatar-tile{width:40px;height:40px;border-radius:50%}.avatar .profile-photo,.company-avatar .profile-photo{width:100%;height:100%;border-radius:inherit}.avatar-upload-field{display:flex!important;align-items:center;gap:18px;padding:16px;border:1px dashed #d9cdd0;border-radius:14px;background:#faf8f8}.avatar-upload-field>span:last-child{flex:1}.avatar-preview .profile-photo{width:72px;height:72px;border-radius:20px;font-size:20px}.avatar-upload-field input[type=file],.avatar-upload-simple input[type=file]{display:block;margin-top:8px}.avatar-upload-field small,.avatar-upload-simple small{display:block;color:#897c80;font-weight:400;margin-top:4px}.remove-photo{display:flex!important;align-items:center;gap:6px;margin-top:8px!important;font-size:11px!important;font-weight:600!important}.remove-photo input{width:auto!important;margin:0!important}.profile-card .avatar-upload-simple{text-align:left;margin-top:18px}.messages-page{min-height:calc(100vh - 80px);background:#f5f3f4;padding:46px 0 80px}.messages-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:23px}.messages-heading h1{font:800 34px Manrope;margin:4px 0}.messages-heading p{color:#807478;margin:0}.secure-chip{display:flex;align-items:center;gap:8px;border-radius:999px;background:#e8f8f1;color:#137250;padding:10px 14px;font-size:12px;font-weight:800}.inbox-shell{display:grid;grid-template-columns:420px 1fr;min-height:590px;background:#fff;border:1px solid #e8dfe1;border-radius:20px;overflow:hidden;box-shadow:0 18px 50px rgba(54,27,33,.07)}.inbox-sidebar{border-right:1px solid #e9e1e3;display:flex;flex-direction:column;min-width:0}.inbox-sidebar>label{display:flex;align-items:center;gap:10px;margin:18px;border:1px solid #ded4d7;border-radius:12px;padding:0 13px}.inbox-sidebar>label i{color:#978b8f}.inbox-sidebar>label input{width:100%;border:0;outline:0;padding:12px 0;background:transparent}.inbox-filter{display:flex;align-items:center;justify-content:space-between;padding:0 18px 13px}.inbox-filter button{border:0;background:#fff0f2;color:#bd1624;border-radius:99px;padding:7px 12px;font-weight:800;font-size:11px}.inbox-filter span{color:#8e8185;font-size:10px}.conversation-list{overflow:auto}.conversation-list>a{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:12px;padding:15px 18px;border-top:1px solid #f0eaec;color:#302126}.conversation-list>a:hover{background:#fff7f8}.inbox-avatar{width:48px;height:48px;border-radius:15px}.conversation-list>a>span:nth-child(2){min-width:0}.conversation-list strong,.conversation-list b,.conversation-list small{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.conversation-list strong{font-size:13px}.conversation-list b{font-size:11px;color:#d7192a;margin-top:2px}.conversation-list small{font-size:10px;color:#897d80;margin-top:4px}.conversation-list time{font-size:9px;color:#998d91;align-self:start;margin-top:3px}.inbox-empty{text-align:center;padding:65px 35px;color:#817579}.inbox-empty>i{width:58px;height:58px;border-radius:18px;background:#fff0f2;color:#d7192a;display:grid;place-items:center;margin:0 auto;font-size:22px}.inbox-empty h3{font:800 18px Manrope;margin:15px 0 5px}.inbox-empty p{font-size:12px;line-height:1.55}.inbox-empty a{display:inline-block;background:#d7192a;color:#fff;border-radius:10px;padding:10px 14px;margin-top:8px;font-weight:700;font-size:12px}.inbox-welcome{display:grid;place-items:center;text-align:center;background:radial-gradient(circle at 50% 30%,#fff8f9,#fff 55%)}.inbox-welcome>div{max-width:360px}.inbox-welcome>div>i{width:75px;height:75px;border-radius:23px;background:linear-gradient(145deg,#e82e40,#99121e);box-shadow:0 17px 35px rgba(184,21,34,.2);display:grid;place-items:center;color:#fff;font-size:27px;margin:0 auto}.inbox-welcome h2{font:800 23px Manrope;margin:20px 0 7px}.inbox-welcome p{color:#817579;font-size:13px;line-height:1.55}.inbox-welcome ul{list-style:none;text-align:left;padding:0;margin:24px auto 0;width:max-content}.inbox-welcome li{font-size:11px;color:#6e6165;margin:9px 0}.inbox-welcome li i{color:#137250;margin-right:8px}.chat-messages .message{display:flex;align-items:flex-start;gap:9px}.chat-messages .message>div{min-width:0}.message-avatar{width:32px;height:32px;flex:0 0 32px;border-radius:10px;font-size:9px}.chat-messages .message.mine{flex-direction:row-reverse}.chat-messages .message.mine .message-avatar{background:rgba(255,255,255,.2)}
@media(max-width:850px){.messages-page{padding:25px 0 90px}.messages-heading{align-items:flex-start;gap:15px}.messages-heading h1{font-size:28px}.messages-heading p{font-size:12px}.inbox-shell{grid-template-columns:1fr;min-height:560px}.inbox-sidebar{border:0}.inbox-welcome{display:none}.conversation-list>a{padding:14px}.secure-chip{font-size:10px}.avatar-upload-field{align-items:flex-start}}
@media(max-width:520px){.messages-page .container{padding-left:12px;padding-right:12px}.messages-heading{flex-direction:column}.inbox-shell{border-radius:16px}.conversation-list>a{grid-template-columns:44px minmax(0,1fr) auto}.inbox-avatar{width:44px;height:44px}.avatar-upload-field{flex-direction:column}}

/* Premium professional chat */
.chat-page,
.chat-section {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - 78px);
  padding: 34px 0 72px;
  background:
    radial-gradient(circle at 8% 4%, rgba(215, 25, 42, .09), transparent 28rem),
    radial-gradient(circle at 94% 92%, rgba(137, 18, 31, .06), transparent 30rem),
    linear-gradient(180deg, #fbf8f9 0%, #f4f1f2 100%);
}

.chat-page::before,
.chat-section::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .42;
  pointer-events: none;
  background-image: radial-gradient(rgba(122, 91, 98, .22) .65px, transparent .65px);
  background-size: 19px 19px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 70%);
  mask-image: linear-gradient(to bottom, #000, transparent 70%);
}

.chat-page > .container,
.chat-section > .container,
.chat-shell {
  width: min(100% - 32px, 1040px);
  max-width: 1040px;
  margin-inline: auto;
}

.chat-app,
.chat-shell {
  position: relative;
  overflow: visible;
  padding: 0;
  border: 1px solid rgba(121, 86, 94, .16);
  border-radius: 28px;
  background: rgba(255, 255, 255, .96);
  box-shadow:
    0 28px 75px rgba(70, 30, 39, .13),
    0 4px 14px rgba(70, 30, 39, .06),
    inset 0 1px 0 rgba(255, 255, 255, .85);
}

.chat-app::after,
.chat-shell::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 20px 34px -20px;
  border-radius: 28px;
  background: rgba(116, 16, 28, .16);
  filter: blur(28px);
  opacity: .35;
  pointer-events: none;
}

.chat-app-header {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  min-height: 88px;
  padding: 16px 22px;
  overflow: hidden;
  border-radius: 27px 27px 0 0;
  border-bottom: 1px solid #eee4e6;
  background:
    radial-gradient(circle at 86% 0, rgba(215, 25, 42, .1), transparent 18rem),
    linear-gradient(135deg, #fff 0%, #fff9fa 100%);
}

.chat-app-header::after {
  content: "";
  position: absolute;
  top: -45px;
  right: 14%;
  width: 120px;
  height: 120px;
  border: 24px solid rgba(215, 25, 42, .035);
  border-radius: 50%;
  pointer-events: none;
}

.chat-back {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid #eadfe2;
  border-radius: 14px;
  color: #75202b;
  background: #fff;
  box-shadow: 0 7px 18px rgba(84, 37, 46, .08);
  text-decoration: none;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}

.chat-back:hover {
  color: #fff;
  border-color: #c81728;
  background: #c81728;
  transform: translateX(-2px);
}

.chat-participant {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.chat-participant-avatar {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border: 3px solid #fff;
  border-radius: 17px;
  box-shadow: 0 0 0 1px #eadfe2, 0 8px 20px rgba(80, 35, 44, .12);
  font-size: 13px;
}

.chat-participant > div,
.chat-participant > span:not(.chat-participant-avatar) {
  min-width: 0;
}

.chat-participant h1,
.chat-participant h2,
.chat-participant strong {
  display: block;
  margin: 0;
  overflow: hidden;
  color: #2d1f23;
  font-family: Manrope, sans-serif;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  overflow: hidden;
  color: #776a6e;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-status::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border: 2px solid #dff4ea;
  border-radius: 50%;
  background: #1b9b6c;
  box-shadow: 0 0 0 2px rgba(27, 155, 108, .11);
}

.chat-secure-pill {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #f0d9dc;
  border-radius: 999px;
  color: #a31725;
  background: rgba(255, 245, 247, .9);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .025em;
  white-space: nowrap;
}

.chat-secure-pill i {
  font-size: 12px;
}

.chat-safety,
.chat-app > .safety-banner,
.chat-shell > .safety-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 12px 22px;
  border: 0;
  border-bottom: 1px solid #f0e4e6;
  border-radius: 0;
  color: #65565a;
  background: linear-gradient(90deg, #fff9ed 0%, #fffdf8 100%);
  font-size: 11px;
  line-height: 1.5;
}

.chat-safety > i,
.chat-app > .safety-banner > i,
.chat-shell > .safety-banner > i {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  border-radius: 9px;
  color: #b16e00;
  background: #fff0c9;
  font-size: 13px;
}

.chat-safety strong,
.chat-app > .safety-banner strong,
.chat-shell > .safety-banner strong {
  color: #473a3e;
}

.chat-safety span,
.chat-app > .safety-banner span,
.chat-shell > .safety-banner span {
  display: block;
  margin-top: 1px;
}

.chat-app .chat-messages,
.chat-shell .chat-messages {
  height: clamp(430px, 56vh, 640px);
  min-height: 430px;
  margin: 0;
  padding: 28px 26px 34px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-color: #d3bfc4 transparent;
  scrollbar-width: thin;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 0 0, rgba(215, 25, 42, .042), transparent 22rem),
    linear-gradient(180deg, #f8f6f7 0%, #f4f1f2 100%);
}

.chat-app .chat-messages::-webkit-scrollbar,
.chat-shell .chat-messages::-webkit-scrollbar {
  width: 9px;
}

.chat-app .chat-messages::-webkit-scrollbar-track,
.chat-shell .chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-app .chat-messages::-webkit-scrollbar-thumb,
.chat-shell .chat-messages::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 99px;
  background: #cbb4ba;
  background-clip: padding-box;
}

.chat-empty {
  min-height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  padding: 35px 20px;
  color: #7e6f73;
  text-align: center;
}

.chat-empty i {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 5px;
  border-radius: 20px;
  color: #c61627;
  background: #fff;
  box-shadow: 0 14px 32px rgba(86, 38, 49, .1);
  font-size: 20px;
}

.chat-empty strong {
  color: #3e2e33;
  font: 800 16px/1.25 Manrope, sans-serif;
}

.chat-empty span {
  max-width: 320px;
  font-size: 11px;
  line-height: 1.55;
}

.chat-messages .message {
  width: fit-content;
  max-width: min(78%, 660px);
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: chat-message-in .25s ease both;
}

.chat-messages .message.mine {
  background: transparent;
  color: inherit;
}

.chat-messages .message-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.chat-messages .message.mine .message-content {
  align-items: flex-end;
}

.chat-messages .message-author,
.chat-messages .message > div:not(.message-content) > strong {
  display: block;
  margin: 0 0 5px 3px;
  color: #6f6064;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}

.chat-messages .message.mine .message-author {
  margin-right: 3px;
  color: #89777c;
}

.chat-messages .message-bubble,
.chat-messages .message > div:not(.message-content) {
  position: relative;
  min-width: 84px;
  padding: 11px 14px 9px;
  border: 1px solid #e8dee1;
  border-radius: 5px 17px 17px 17px;
  color: #392b2f;
  background: #fff;
  box-shadow: 0 5px 15px rgba(63, 34, 41, .065);
}

.chat-messages .message.mine .message-bubble,
.chat-messages .message.mine > div:not(.message-content) {
  border-color: #c61627;
  border-radius: 17px 5px 17px 17px;
  color: #fff;
  background: linear-gradient(145deg, #dc2436 0%, #b61120 100%);
  box-shadow: 0 7px 18px rgba(187, 17, 32, .17);
}

.chat-messages .message-bubble p,
.chat-messages .message > div:not(.message-content) > p {
  margin: 0;
  color: inherit;
  font-size: 13px;
  font-weight: 520;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.chat-messages .message-bubble time,
.chat-messages .message-bubble small,
.chat-messages .message > div:not(.message-content) > small {
  display: block;
  margin-top: 5px;
  color: #9a8d91;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  text-align: right;
  opacity: 1;
}

.chat-messages .message.mine .message-bubble time,
.chat-messages .message.mine .message-bubble small,
.chat-messages .message.mine > div:not(.message-content) > small {
  color: rgba(255, 255, 255, .72);
}

.chat-messages .message-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  margin-top: 17px;
  border: 2px solid #fff;
  border-radius: 13px;
  background: linear-gradient(145deg, #df2839, #9e111f);
  box-shadow: 0 0 0 1px #e4d8db, 0 5px 13px rgba(72, 37, 45, .1);
  font-size: 9px;
}

.chat-messages .message.mine .message-avatar {
  background: linear-gradient(145deg, #df2839, #9e111f);
}

.chat-app .chat-compose,
.chat-shell .chat-compose {
  position: sticky;
  z-index: 8;
  bottom: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "quick quick quick"
    "tools field send"
    ". counter ."
    "hint hint hint";
  align-items: end;
  gap: 8px 11px;
  margin: 0;
  padding: 15px 18px 13px;
  border-top: 1px solid #eadfe2;
  border-radius: 0 0 27px 27px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 -13px 30px rgba(69, 36, 43, .055);
}

.chat-compose:not(:has(.chat-tools)) {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "field send";
}

.quick-replies {
  grid-area: quick;
  display: flex;
  gap: 7px;
  min-width: 0;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.quick-replies::-webkit-scrollbar {
  display: none;
}

.quick-replies button {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid #eadde0;
  border-radius: 999px;
  color: #7a3f49;
  background: #fff8f9;
  font: 750 10px/1.25 inherit;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s ease;
}

.quick-replies button:hover {
  border-color: #d82b3c;
  color: #b41221;
  background: #fff0f2;
  transform: translateY(-1px);
}

.chat-tools {
  position: relative;
  grid-area: tools;
  align-self: center;
}

.chat-compose textarea {
  grid-area: field;
  width: 100%;
  min-height: 50px;
  max-height: 150px;
  margin: 0;
  padding: 14px 16px;
  resize: none;
  overflow-y: auto;
  border: 1px solid #ded2d5;
  border-radius: 16px;
  outline: 0;
  color: #392b2f;
  background: #faf8f9;
  box-shadow: inset 0 1px 2px rgba(72, 39, 47, .035);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.chat-compose textarea::placeholder {
  color: #9a8e91;
}

.chat-compose textarea:focus {
  border-color: #d22a3a;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(210, 42, 58, .095);
}

.emoji-toggle {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid #e7dadd;
  border-radius: 15px;
  color: #8a626a;
  background: #fff7f8;
  box-shadow: 0 5px 13px rgba(81, 40, 49, .055);
  font-size: 20px;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}

.emoji-toggle:hover,
.emoji-toggle[aria-expanded="true"] {
  color: #fff;
  border-color: #c91829;
  background: #c91829;
  transform: translateY(-1px);
}

.emoji-picker {
  position: absolute;
  z-index: 30;
  left: 0;
  bottom: calc(100% + 13px);
  display: grid;
  grid-template-columns: repeat(6, 37px);
  gap: 5px;
  width: max-content;
  max-width: min(300px, calc(100vw - 42px));
  padding: 12px;
  border: 1px solid #e6dadd;
  border-radius: 18px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 48px rgba(59, 27, 35, .2);
  transform-origin: left bottom;
  animation: emoji-picker-in .18s ease both;
}

.emoji-picker[hidden] {
  display: none !important;
}

.emoji-picker::after {
  content: "";
  position: absolute;
  left: 17px;
  bottom: -7px;
  width: 13px;
  height: 13px;
  border-right: 1px solid #e6dadd;
  border-bottom: 1px solid #e6dadd;
  background: #fff;
  transform: rotate(45deg);
}

.emoji-picker button {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}

.emoji-picker button:hover {
  background: #fff0f2;
  transform: scale(1.14);
}

.chat-counter {
  grid-area: counter;
  justify-self: end;
  margin: -2px 4px 0 0;
  color: #9b8e92;
  font-size: 9px;
  font-weight: 650;
  line-height: 1;
}

.chat-hint {
  grid-area: hint;
  color: #9a8d91;
  font-size: 9px;
  line-height: 1.35;
  text-align: center;
}

.chat-send,
.chat-compose > button[type="submit"] {
  grid-area: send;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 112px;
  min-height: 50px;
  margin: 0;
  padding: 0 18px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, #df2839 0%, #b30f1e 100%);
  box-shadow: 0 9px 20px rgba(187, 17, 32, .22);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  transition: box-shadow .2s ease, filter .2s ease, transform .2s ease;
}

.chat-send:hover,
.chat-compose > button[type="submit"]:hover {
  filter: saturate(1.08) brightness(.98);
  box-shadow: 0 12px 26px rgba(187, 17, 32, .27);
  transform: translateY(-1px);
}

.chat-send:disabled,
.chat-compose > button[type="submit"]:disabled {
  cursor: not-allowed;
  filter: grayscale(.25);
  opacity: .55;
  box-shadow: none;
  transform: none;
}

.chat-app .notice-closed,
.chat-shell .notice-closed {
  margin: 0;
  padding: 17px 22px;
  border: 0;
  border-top: 1px solid #eadfe2;
  border-radius: 0 0 27px 27px;
  color: #7b4f56;
  background: #fff5f6;
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.chat-app :is(a, button, textarea):focus-visible,
.chat-shell :is(a, button, textarea):focus-visible {
  outline: 3px solid rgba(207, 26, 43, .28);
  outline-offset: 3px;
}

@keyframes chat-message-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes emoji-picker-in {
  from { opacity: 0; transform: translateY(6px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 900px) {
  .chat-page,
  .chat-section {
    min-height: calc(100dvh - 68px);
    padding: 20px 0 92px;
  }

  .chat-page > .container,
  .chat-section > .container,
  .chat-shell {
    width: min(100% - 24px, 780px);
  }

  .chat-app,
  .chat-shell {
    border-radius: 24px;
  }

  .chat-app-header {
    min-height: 78px;
    padding: 13px 16px;
    border-radius: 23px 23px 0 0;
  }

  .chat-app .chat-messages,
  .chat-shell .chat-messages {
    height: clamp(390px, 58dvh, 600px);
    min-height: 390px;
    padding: 22px 18px 28px;
  }

  .chat-app .chat-compose,
  .chat-shell .chat-compose {
    border-radius: 0 0 23px 23px;
  }
}

@media (max-width: 620px) {
  .chat-page,
  .chat-section {
    padding: 10px 0 78px;
  }

  .chat-page > .container,
  .chat-section > .container,
  .chat-shell {
    width: min(100% - 16px, 100%);
  }

  .chat-app,
  .chat-shell {
    border-radius: 21px;
    box-shadow: 0 16px 44px rgba(70, 30, 39, .12);
  }

  .chat-app-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 71px;
    padding: 10px 12px;
    border-radius: 20px 20px 0 0;
  }

  .chat-back {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 12px;
  }

  .chat-participant {
    gap: 9px;
  }

  .chat-participant-avatar {
    width: 43px;
    height: 43px;
    flex-basis: 43px;
    border-radius: 14px;
  }

  .chat-participant h1,
  .chat-participant h2,
  .chat-participant strong {
    font-size: 13px;
  }

  .chat-status {
    margin-top: 2px;
    font-size: 9px;
  }

  .chat-secure-pill {
    width: 36px;
    min-height: 36px;
    justify-content: center;
    padding: 0;
    font-size: 0;
  }

  .chat-secure-pill i {
    font-size: 12px;
  }

  .chat-safety,
  .chat-app > .safety-banner,
  .chat-shell > .safety-banner {
    gap: 9px;
    padding: 9px 13px;
    font-size: 9.5px;
  }

  .chat-safety > i,
  .chat-app > .safety-banner > i,
  .chat-shell > .safety-banner > i {
    width: 25px;
    height: 25px;
    flex-basis: 25px;
    border-radius: 8px;
    font-size: 11px;
  }

  .chat-app .chat-messages,
  .chat-shell .chat-messages {
    height: clamp(350px, 54dvh, 560px);
    min-height: 350px;
    padding: 18px 11px 24px;
    gap: 14px;
  }

  .chat-messages .message {
    max-width: 92%;
    gap: 7px;
  }

  .chat-messages .message-avatar {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
    margin-top: 16px;
    border-radius: 10px;
    font-size: 8px;
  }

  .chat-messages .message-bubble,
  .chat-messages .message > div:not(.message-content) {
    padding: 10px 12px 8px;
    border-radius: 5px 15px 15px 15px;
  }

  .chat-messages .message.mine .message-bubble,
  .chat-messages .message.mine > div:not(.message-content) {
    border-radius: 15px 5px 15px 15px;
  }

  .chat-messages .message-bubble p,
  .chat-messages .message > div:not(.message-content) > p {
    font-size: 12px;
  }

  .chat-app .chat-compose,
  .chat-shell .chat-compose {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px 7px;
    padding: 10px 10px 9px;
    border-radius: 0 0 20px 20px;
  }

  .chat-compose:not(:has(.chat-tools)) {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .chat-compose textarea {
    min-height: 45px;
    padding: 12px;
    border-radius: 14px;
    font-size: 12px;
  }

  .emoji-toggle {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 18px;
  }

  .emoji-picker {
    grid-template-columns: repeat(6, 34px);
    gap: 3px;
    padding: 10px;
  }

  .emoji-picker button {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  .chat-send,
  .chat-compose > button[type="submit"] {
    min-width: 46px;
    min-height: 45px;
    padding: 0 14px;
    border-radius: 14px;
    font-size: 0;
  }

  .chat-send i,
  .chat-compose > button[type="submit"] i {
    font-size: 14px;
  }

  .chat-counter {
    font-size: 8px;
  }
}

@media (max-width: 390px) {
  .chat-secure-pill {
    display: none;
  }

  .chat-app-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .chat-messages .message {
    max-width: 96%;
  }

  .emoji-picker {
    grid-template-columns: repeat(5, 34px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-app *,
  .chat-shell * {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
