/* ===== MAIN ===== */
#main{
  position: relative;
}

.chat-guide-overlay{
  position: fixed;
  inset: 0;
  z-index: 2147483644;
  background: rgba(15, 23, 42, 0.08);
  pointer-events: auto;
  cursor: default;
}

.chat-guide-spotlight{
  position: fixed;
  z-index: 2147483645;
  border: 4px solid #38bdf8;
  border-radius: 14px;
  box-shadow:
    0 0 0 9px rgba(56, 189, 248, 0.28),
    0 0 28px rgba(14, 165, 233, 0.42),
    0 18px 46px rgba(14, 165, 233, 0.2);
  pointer-events: none;
  transition: top .18s ease, left .18s ease, width .18s ease, height .18s ease;
}

.chat-guide-card{
  position: fixed;
  z-index: 2147483647;
  width: min(360px, calc(100vw - 24px));
  padding: 16px;
  border: 1px solid rgba(14, 165, 233, 0.28);
  border-radius: 14px;
  background: #ffffff;
  color: #14213d;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.32);
}

.chat-guide-card__eyebrow{
  margin-bottom: 7px;
  color: #0369a1;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.chat-guide-card h3{
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.2;
}

.chat-guide-card__text{
  margin: 0;
  color: rgba(15, 23, 42, 0.78);
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-line;
}

.chat-guide-card__actions{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.chat-guide-card__spacer{
  flex: 1 1 auto;
}

.chat-guide-card__btn{
  min-height: 34px;
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.chat-guide-card__btn.primary{
  border-color: rgba(14, 165, 233, 0.52);
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #ffffff;
}

.chat-guide-card__btn.secondary{
  background: #f8fafc;
  color: #075985;
}

.chat-guide-card__btn:disabled{
  opacity: 0.45;
  cursor: default;
}

.chat-guide-overlay.hidden,
.chat-guide-spotlight.hidden,
.chat-guide-card.hidden{
  display: none;
}

.chat-guide-active-target{
  z-index: 2147483646 !important;
  filter: saturate(1.18) brightness(1.05);
}

.chat-guide-demo-surface{
  margin: 10px;
}

.chat-guide-demo-shelves{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 0;
}

.chat-guide-demo-shelf{
  min-height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(14, 165, 233, 0.22);
  background: rgba(14, 165, 233, 0.08);
  color: #075985;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.chat-guide-demo-player{
  width: 100%;
  min-height: 180px;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  gap: 8px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #164e63);
  color: #fff;
  text-align: center;
}

.chat-guide-demo-player span{
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  font-size: 28px;
}

.private-watch-panel.chat-guide-demo-watch{
  display: flex;
}

.private-watch-panel.chat-guide-demo-watch:not(.expanded){
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.private-watch-panel.chat-guide-demo-watch:not(.expanded) .private-watch-player{
  min-height: 220px;
  height: auto;
}

.chat-guide-call-buttons-target{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chat-guide-demo-message{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: min(460px, calc(100% - 24px));
  margin: 24px auto 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.32);
  background: rgba(255,255,255,0.96);
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.14);
}

.chat-guide-demo-message-body{
  min-width: 0;
  flex: 1 1 auto;
}

.chat-guide-demo-message .msg-user{
  display: inline-flex;
  margin-bottom: 6px;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.12);
  color: #075985;
  font-weight: 800;
}

.chat-guide-demo-message-text{
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(14, 165, 233, 0.08);
  cursor: pointer;
  color: #1f2937;
  line-height: 1.45;
}

.chat-guide-demo-avatar{
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 3px solid #38bdf8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: url("/pictures/strawberry2.jpg") center / cover, #fff;
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.25);
}

.user-context-menu.chat-guide-active-target{
  z-index: 2147483646 !important;
}

.typing{
  min-height: 18px;
  padding: 6px 10px 0;
  font-size: 12px;
  color: rgba(40,40,40,0.7);
}

.typing.is-active{
  min-height: 42px;
  padding-top: 8px;
  padding-bottom: 4px;
}

.typing-pill{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(255,240,246,0.96));
  border: 1px solid rgba(255,61,141,0.16);
  box-shadow: 0 10px 24px rgba(255,61,141,0.1);
}

.typing-pill__icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 999px;
  background: rgba(255,61,141,0.12);
  font-size: 14px;
}

.typing-pill__text{
  min-width: 0;
  display: grid;
  gap: 1px;
}

.typing-pill__text strong{
  font-size: 12px;
  line-height: 1.1;
  color: rgba(40,40,40,0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.typing-pill__text span{
  font-size: 11px;
  line-height: 1.2;
  color: rgba(40,40,40,0.68);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.typing-pill__dots{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding-left: 2px;
}

.typing-pill__dots span{
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255,61,141,0.72);
  animation: typingPulse 1.1s infinite ease-in-out;
}

.typing-pill__dots span:nth-child(2){
  animation-delay: 0.16s;
}

.typing-pill__dots span:nth-child(3){
  animation-delay: 0.32s;
}

@keyframes typingPulse{
  0%, 80%, 100%{
    transform: translateY(0) scale(0.85);
    opacity: 0.45;
  }
  40%{
    transform: translateY(-2px) scale(1);
    opacity: 1;
  }
}

.private-typing-pill{
  max-width: min(100%, 320px);
}

#privateTypingIndicator.is-active{
  display: block;
}

#privateHeader .hint.private-header-activity{
  color: rgba(255,61,141,0.92);
  font-weight: 700;
}

.private-dialog-activity{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,61,141,0.12);
  color: rgba(255,61,141,0.92);
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
  vertical-align: middle;
}

#chatContainer{
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 10px 10px 6px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

body #chatContainer[data-room-bg="space"]{
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='190' viewBox='0 0 260 190'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M36 30l3 8 8 3-8 3-3 8-3-8-8-3 8-3zM178 24l4 11 11 4-11 4-4 11-4-11-11-4 11-4zM218 112l3 8 8 3-8 3-3 8-3-8-8-3 8-3z' stroke='%23ffffff' stroke-opacity='.88' stroke-width='1.6'/%3E%3Cpath d='M82 82l2 5 5 2-5 2-2 5-2-5-5-2 5-2zM132 36l2 5 5 2-5 2-2 5-2-5-5-2 5-2zM118 144l3 7 7 3-7 3-3 7-3-7-7-3 7-3z' stroke='%237dd3fc' stroke-opacity='.82' stroke-width='1.4'/%3E%3Ccircle cx='28' cy='134' r='1.7' fill='%23fff' fill-opacity='.86'/%3E%3Ccircle cx='64' cy='160' r='1.2' fill='%23fdf2f8' fill-opacity='.9'/%3E%3Ccircle cx='146' cy='102' r='1.5' fill='%23bfdbfe' fill-opacity='.9'/%3E%3Ccircle cx='236' cy='48' r='1.4' fill='%23fff' fill-opacity='.9'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 260px 190px repeat,
    radial-gradient(circle at 18% 28%, rgba(255,255,255,0.62) 0 1px, transparent 2px),
    radial-gradient(circle at 76% 18%, rgba(186, 230, 253, 0.7) 0 1px, transparent 2px),
    radial-gradient(circle at 64% 72%, rgba(125, 211, 252, 0.55) 0 1px, transparent 2px),
    radial-gradient(circle at 22% 78%, rgba(244, 114, 182, 0.28), transparent 24%),
    linear-gradient(145deg, #070a1c 0%, #15113a 48%, #061827 100%);
}

body #chatContainer[data-room-bg="landing"]{
  background:
    linear-gradient(90deg, rgba(255, 253, 251, 0.88) 0%, rgba(255, 248, 244, 0.72) 48%, rgba(255, 253, 250, 0.54) 100%),
    url("/pictures/landing-travel-growth-hero.png") center / cover no-repeat;
}

body #chatContainer[data-room-bg="sport"]{
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='190' viewBox='0 0 300 190'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.28' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M28 58h18M56 58h42M108 58h18M46 45v26M108 45v26' stroke-width='7'/%3E%3Cpath d='M180 132h78c10 0 18 8 18 18s-8 18-18 18h-78c-10 0-18-8-18-18s8-18 18-18z' stroke-width='4'/%3E%3Cpath d='M180 150h78M194 132l-14-20M244 132l14-20' stroke-width='4'/%3E%3Cpath d='M178 42c18-15 42-12 54 6M232 48c-9 16-32 22-52 9M203 29c7 13 8 32 1 45' stroke-width='3'/%3E%3Ccircle cx='205' cy='51' r='27' stroke-width='3'/%3E%3C/g%3E%3C/svg%3E") 10px 8px / 300px 190px repeat,
    linear-gradient(90deg, rgba(255,255,255,0.12) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(0deg, rgba(255,255,255,0.10) 1px, transparent 1px) 0 0 / 42px 42px,
    radial-gradient(circle at 16% 18%, rgba(255,255,255,0.16), transparent 24%),
    linear-gradient(135deg, #0f7a3b, #0b5d2d 52%, #073b1f);
}

body #chatContainer[data-room-bg="romantic"]{
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='210' height='160' viewBox='0 0 210 160'%3E%3Cg fill='none' stroke='%23dc2626' stroke-opacity='.34' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M36 50c-12-16-34 1-16 19 7 7 16 13 16 13s10-7 17-14c17-18-6-34-17-18z' stroke-width='2.2'/%3E%3Cpath d='M142 28c-9-13-27 1-14 15 5 5 14 11 14 11s9-6 14-12c13-14-5-27-14-14z' stroke-width='1.9'/%3E%3Cpath d='M158 112c-12-15-33 2-16 19 7 7 16 13 16 13s10-7 17-14c17-18-6-33-17-18z' stroke-width='2.4'/%3E%3Cpath d='M78 118c-7-10-22 1-11 12 4 4 11 9 11 9s7-5 11-9c11-12-4-22-11-12zM96 42c10-6 20-7 31-2M48 100c17 3 31 0 43-9' stroke-width='1.7'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 210px 160px repeat,
    radial-gradient(circle at 16% 20%, rgba(255,255,255,0.54), transparent 18%),
    radial-gradient(circle at 82% 22%, rgba(255, 182, 193, 0.38), transparent 20%),
    radial-gradient(circle at 32% 82%, rgba(244, 114, 182, 0.34), transparent 22%),
    linear-gradient(145deg, #fff1f6, #ffd7e7 48%, #fbcfe8);
}

body #chatContainer[data-room-bg="business"]{
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='210' viewBox='0 0 320 210'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='34' y='46' width='94' height='58' rx='8' stroke='%230f172a' stroke-opacity='.18' stroke-width='4'/%3E%3Cpath d='M22 116h118l-10 14H32zM54 66h52M54 80h34' stroke='%230f172a' stroke-opacity='.18' stroke-width='4'/%3E%3Cpath d='M178 42h74v62h-74zM190 88l15-18 14 11 22-30M192 92h46M192 78v14' stroke='%231e40af' stroke-opacity='.24' stroke-width='4'/%3E%3Crect x='220' y='124' width='62' height='48' rx='6' stroke='%2392412e' stroke-opacity='.22' stroke-width='4'/%3E%3Cpath d='M234 138h34M234 150h24M234 162h30' stroke='%2392412e' stroke-opacity='.18' stroke-width='3'/%3E%3Ccircle cx='66' cy='158' r='16' stroke='%2316a34a' stroke-opacity='.24' stroke-width='4'/%3E%3Ccircle cx='82' cy='154' r='16' stroke='%2316a34a' stroke-opacity='.20' stroke-width='4'/%3E%3Cpath d='M66 149v18M58 158h16' stroke='%2316a34a' stroke-opacity='.25' stroke-width='3'/%3E%3Cpath d='M142 150h42M150 136h26l8 14h-42zM154 136v-10h18v10' stroke='%230f172a' stroke-opacity='.18' stroke-width='4'/%3E%3C/g%3E%3C/svg%3E") 4px 0 / 320px 210px repeat,
    radial-gradient(circle at 84% 18%, rgba(255,255,255,0.72), transparent 22%),
    linear-gradient(90deg, rgba(71, 85, 105, 0.10) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(0deg, rgba(71, 85, 105, 0.08) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(135deg, #f8fafc 0%, #e8eef5 48%, #d9e2ec 100%);
}

body #chatContainer[data-room-bg="nature"]{
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 245, 157, 0.78) 0 34px, transparent 35px),
    linear-gradient(165deg, transparent 0 46%, rgba(22, 101, 52, 0.20) 46% 48%, transparent 49%),
    linear-gradient(145deg, transparent 0 38%, rgba(21, 128, 61, 0.28) 38% 42%, transparent 43%),
    linear-gradient(135deg, rgba(14, 165, 233, 0.50) 0 24%, rgba(186, 230, 253, 0.62) 24% 44%, transparent 45%),
    linear-gradient(24deg, #14532d 0 18%, #15803d 18% 31%, transparent 32%),
    linear-gradient(155deg, transparent 0 42%, #166534 43% 56%, transparent 57%),
    linear-gradient(180deg, #dff9ff 0%, #bae6fd 38%, #bbf7d0 39%, #4ade80 72%, #15803d 100%);
}

body #chatContainer[data-room-bg="travel"]{
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='210' viewBox='0 0 300 210'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M54 154c10-42 18-76 36-112' stroke='%237c4a20' stroke-opacity='.34' stroke-width='8'/%3E%3Cpath d='M90 42c-26 2-48 11-66 27M91 42c-12-20-30-31-54-33M91 42c24-14 49-17 75-8M91 42c6-22 21-36 45-43M91 42c20 5 35 17 47 36' stroke='%23166534' stroke-opacity='.34' stroke-width='7'/%3E%3Ccircle cx='74' cy='55' r='7' fill='%237c2d12' fill-opacity='.34'/%3E%3Ccircle cx='90' cy='58' r='8' fill='%237c2d12' fill-opacity='.32'/%3E%3Cpath d='M204 146c8-32 14-58 28-84' stroke='%237c4a20' stroke-opacity='.28' stroke-width='6'/%3E%3Cpath d='M232 62c-19 1-35 8-49 20M232 62c-8-15-22-23-39-25M232 62c18-10 38-12 57-5M232 62c5-17 16-27 34-31' stroke='%23166534' stroke-opacity='.28' stroke-width='5'/%3E%3Ccircle cx='220' cy='72' r='5' fill='%237c2d12' fill-opacity='.3'/%3E%3C/g%3E%3C/svg%3E") 10px 10px / 300px 210px repeat,
    radial-gradient(circle at 78% 16%, rgba(255, 241, 118, 0.86) 0 34px, transparent 35px),
    linear-gradient(180deg, rgba(125, 211, 252, 0.78) 0 37%, transparent 38%),
    repeating-linear-gradient(170deg, rgba(255,255,255,0.32) 0 6px, transparent 6px 18px),
    linear-gradient(180deg, #9be8ff 0%, #67d5f4 38%, #21a8d8 39%, #0ea5c6 66%, #facc8b 67%, #f8b86a 100%);
}

body #chatContainer[data-room-bg="minimal"]{
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.035) 25%, transparent 25%) 0 0 / 24px 24px,
    linear-gradient(135deg, transparent 75%, rgba(15, 23, 42, 0.035) 75%) 0 0 / 24px 24px,
    linear-gradient(180deg, #ffffff, #f8fafc);
}

body #chatContainer[data-room-bg="custom"]{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.10)),
    var(--room-custom-bg-image) center / cover no-repeat;
}

#chatContainer[data-room-bg="space"] .msg,
#chatContainer[data-room-bg="landing"] .msg,
#chatContainer[data-room-bg="sport"] .msg,
#chatContainer[data-room-bg="travel"] .msg,
#chatContainer[data-room-bg="custom"] .msg{
  background: rgba(255,255,255,0.90);
}

#chatContainer[data-room-bg="space"] .msg.me,
#chatContainer[data-room-bg="landing"] .msg.me,
#chatContainer[data-room-bg="sport"] .msg.me,
#chatContainer[data-room-bg="travel"] .msg.me,
#chatContainer[data-room-bg="custom"] .msg.me{
  background: rgba(255,255,255,0.82);
}

#chatContainer[data-room-bg="business"] .msg{
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

#roomBackgroundContextMenu .user-context-menu-btn.active{
  background: rgba(255,61,141,0.12);
  color: #b3225f;
  font-weight: 900;
}

#roomBackgroundContextMenu .user-context-menu-btn.active::before{
  content: "✓";
  margin-right: 6px;
}

.custom-background-collection-block{
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,61,141,0.14);
}

.custom-background-collection-title{
  color: rgba(42,42,42,0.68);
  font-size: 12px;
  font-weight: 900;
}

.custom-background-collection{
  display: grid;
  grid-template-columns: repeat(4, 48px);
  gap: 8px;
  max-width: 216px;
  max-height: 160px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-width: thin;
}

.custom-background-collection.is-empty{
  display: block;
  max-width: 220px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.custom-background-collection::-webkit-scrollbar{
  width: 6px;
}

.custom-background-collection::-webkit-scrollbar-thumb{
  border-radius: 999px;
  background: rgba(255,61,141,0.34);
}

.custom-background-collection::-webkit-scrollbar-track{
  background: rgba(255,255,255,0.36);
  border-radius: 999px;
}

.custom-background-collection-empty{
  color: rgba(42,42,42,0.58);
  font-size: 12px;
  line-height: 1.3;
}

.custom-background-thumb-wrap{
  position: relative;
  width: 48px;
  height: 48px;
}

.custom-background-thumb-wrap--add{
  position: sticky;
  top: 0;
  z-index: 2;
}

.custom-background-thumb{
  width: 100%;
  height: 100%;
  border: 2px solid rgba(255,61,141,0.18);
  border-radius: 10px;
  padding: 0;
  background: var(--custom-bg-thumb) center / cover no-repeat, rgba(255,255,255,0.82);
  box-shadow: 0 8px 18px rgba(42,42,42,0.10);
  cursor: pointer;
  overflow: hidden;
}

.custom-background-thumb.active{
  border-color: rgba(255,61,141,0.82);
  box-shadow: 0 0 0 3px rgba(255,61,141,0.16), 0 8px 18px rgba(42,42,42,0.10);
}

.custom-background-thumb.active::before{
  content: "✓";
  position: absolute;
  left: 4px;
  bottom: 4px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,61,141,0.94);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.custom-background-thumb--add{
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.92);
  color: #b3225f;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.custom-background-thumb--add:hover{
  border-color: rgba(255,61,141,0.58);
  background: rgba(255,61,141,0.10);
}

.custom-background-thumb__remove{
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(15,23,42,0.68);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.custom-background-thumb__remove:hover{
  background: rgba(190,18,60,0.92);
}

.birthday-cake-pinned{
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid rgba(234, 88, 12, 0.12);
  border-bottom: 1px solid rgba(234, 88, 12, 0.18);
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,0.92), rgba(255,255,255,0) 40%),
    linear-gradient(90deg, #fff7ed, #ffe4e6);
  box-shadow: 0 8px 18px rgba(159, 18, 57, 0.08);
}

.birthday-cake-pinned.hidden{
  display: none;
}

.birthday-cake-pinned__link{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: #7f1d1d;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.birthday-cake-pinned__link:hover,
.birthday-cake-pinned__link:focus-visible{
  color: #be123c;
  outline: none;
}

.birthday-cake-pinned__icon{
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
}

.birthday-cake-pinned__text{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.birthday-cake-pinned__close{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(190, 18, 60, 0.18);
  border-radius: 8px;
  background: rgba(255,255,255,0.58);
  color: #9f1239;
  cursor: pointer;
}

.birthday-cake-pinned__close:hover,
.birthday-cake-pinned__close:focus-visible{
  background: rgba(255,255,255,0.9);
  outline: none;
}

.birthday-cake-pinned__close svg{
  width: 16px;
  height: 16px;
}

.dating-room-tabs{
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 61, 141, 0.14);
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dating-room-tabs.hidden{
  display: none;
}

.dating-room-tab{
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(6, 56, 74, 0.14);
  border-radius: 12px;
  padding: 8px 13px;
  background: rgba(255,255,255,0.94);
  color: #06384a;
  font: inherit;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.dating-room-tab svg{
  width: 19px;
  height: 19px;
}

.dating-room-tab--video,
.dating-room-tab--favorites,
.dating-room-tab--active{
  border-color: rgba(255, 61, 141, 0.38);
  background: linear-gradient(135deg, #ff3d8d, #ff8a63);
  color: #fff;
}

.travel-room-tabs{
  border-bottom-color: rgba(37, 99, 235, 0.14);
}

.travel-room-tab--airlines{
  border-color: rgba(37, 99, 235, 0.36);
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  color: #fff;
}

.travel-room-tab--buses{
  border-color: rgba(22, 163, 74, 0.36);
  background: linear-gradient(135deg, #16a34a, #f59e0b);
  color: #fff;
}

.travel-room-tab--hotels{
  border-color: rgba(124, 58, 237, 0.34);
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: #fff;
}

.travel-airlines-card{
  width: min(960px, calc(100vw - 24px));
  height: min(86vh, 780px);
  max-height: min(86vh, 780px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

.travel-hotels-card{
  grid-template-rows: auto auto minmax(0, 1fr);
}

.travel-airlines-head{
  align-items: flex-start;
}

.travel-airlines-head > div{
  min-width: 0;
}

.travel-airlines-head p{
  margin: 6px 0 0;
  color: rgba(42,42,42,0.68);
  font-size: 13px;
  line-height: 1.4;
}

.travel-airlines-tools{
  padding: 12px 18px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: rgba(255,255,255,0.76);
}

.travel-airlines-search{
  display: grid;
  gap: 6px;
  color: rgba(42,42,42,0.70);
  font-size: 12px;
  font-weight: 900;
}

.travel-airlines-search input{
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(6, 56, 74, 0.14);
  border-radius: 12px;
  padding: 9px 12px;
  background: #fff;
  color: #1f2937;
  font: inherit;
  font-size: 14px;
  outline: none;
}

.travel-airlines-search input:focus{
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.travel-airlines-list{
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: 14px 18px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(239,246,255,0.72));
}

.travel-airlines-country{
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 14px;
  background: rgba(255,255,255,0.90);
}

.travel-airlines-country h4{
  margin: 0;
  color: #06384a;
  font-size: 15px;
  line-height: 1.25;
}

.travel-airlines-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.travel-airline-link{
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid rgba(6, 56, 74, 0.10);
  border-radius: 11px;
  background: rgba(255,255,255,0.96);
  color: #0f4b63;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
}

.travel-airline-link span{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.travel-airline-link::after{
  content: "↗";
  color: rgba(37, 99, 235, 0.78);
  font-weight: 950;
}

.travel-airline-link:hover,
.travel-airline-link:focus-visible{
  border-color: rgba(37, 99, 235, 0.36);
  background: #fff;
  outline: none;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.10);
}

.travel-airlines-empty{
  padding: 24px;
  border-radius: 14px;
  background: rgba(255,255,255,0.86);
  color: rgba(42,42,42,0.68);
  text-align: center;
  font-weight: 800;
}

.dating-video-modal{
  align-items: stretch;
  justify-content: stretch;
  padding: 8px;
}

#datingVideoModal{
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  box-sizing: border-box;
}

.dating-video-card{
  width: 100%;
  height: 100%;
  max-height: none;
  position: relative;
  display: grid;
  grid-template-areas:
    "head"
    "stage"
    "actions";
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#datingVideoModal .dating-video-card{
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  min-height: 0;
  box-sizing: border-box;
  padding: 4px 8px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.dating-video-top-actions{
  position: absolute;
  z-index: 5;
  top: 9px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dating-video-icon-btn{
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(6, 56, 74, 0.16);
  border-radius: 12px;
  background: rgba(255,255,255,0.94);
  color: #06384a;
  font-size: 16px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

#datingVideoModal .dating-video-icon-btn{
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 10px;
}

.dating-video-icon-btn:hover,
.dating-video-icon-btn:focus-visible{
  background: #fff;
  border-color: rgba(255, 61, 141, 0.32);
  outline: none;
}

.dating-video-settings-card{
  width: min(460px, calc(100vw - 20px));
  max-height: min(92vh, 680px);
  overflow: auto;
  padding: 18px;
}

.dating-video-settings-card .dating-video-head{
  min-height: auto;
  padding: 0 34px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.dating-video-settings-card .dating-video-head h3{
  font-size: 20px;
}

.dating-video-head{
  grid-area: head;
  display: grid;
  min-width: 0;
  gap: 2px;
  min-height: 56px;
  align-content: center;
  box-sizing: border-box;
  padding: 7px 94px 7px 16px;
  border: 1px solid rgba(255, 61, 141, 0.16);
  border-radius: 18px;
  background: rgba(255,255,255,0.84);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dating-video-brand{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ff3d8d;
  font-size: 15px;
  font-weight: 950;
  text-transform: none;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255,255,255,0.72);
}

.dating-video-brand-icon{
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.dating-video-head h3{
  margin: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 20px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dating-video-head p{
  margin: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(42,42,42,0.66);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  white-space: nowrap;
}

.dating-video-head p > span{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dating-video-rules-link{
  flex: 0 0 auto;
  color: #d91f72;
  font-weight: 950;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.dating-video-rules-link:hover,
.dating-video-rules-link:focus-visible{
  color: #a71555;
  outline: none;
}

.dating-call-stage{
  grid-area: stage;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  margin: 0;
}

.dating-call-pane{
  position: relative;
  min-height: 0;
  height: 100%;
  aspect-ratio: auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #090b10;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.dating-call-pane--remote{
  background:
    radial-gradient(circle at 30% 18%, rgba(255,61,141,0.22), transparent 34%),
    linear-gradient(135deg, #111827, #0f172a);
}

.dating-call-badge{
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  max-width: calc(100% - 20px);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(5,10,20,0.58);
  color: rgba(255,255,255,0.96);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.dating-call-badge--local{
  left: auto;
  right: 10px;
}

.dating-call-remote-photo{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #000;
}

.dating-call-local-video,
.dating-call-remote-video{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

@media (min-width: 921px){
  .dating-call-pane.is-portrait-video{
    width: min(100%, 430px);
    aspect-ratio: var(--dating-call-video-aspect, 9 / 16);
    justify-self: center;
  }
}

.dating-call-remote-video.hidden{
  display: none;
}

.dating-call-local-video:not([srcObject]){
  min-height: 100%;
}

.dating-call-placeholder{
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 30px 12px 12px;
  color: rgba(255,255,255,0.92);
  text-align: center;
  pointer-events: none;
}

.dating-call-placeholder.hidden{
  display: none;
}

.dating-call-placeholder > span{
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  font-size: 20px;
  font-weight: 950;
}

.dating-call-placeholder strong{
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dating-call-placeholder small{
  max-width: 240px;
  font-size: 11px;
  color: rgba(255,255,255,0.68);
  line-height: 1.3;
}

.dating-video-settings{
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 14px 0 0;
}

.dating-video-toggle,
.dating-video-field{
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid rgba(6, 56, 74, 0.12);
  border-radius: 10px;
  padding: 8px 9px;
  background: rgba(255,255,255,0.86);
  color: #06384a;
  font-size: 12px;
  font-weight: 900;
}

.dating-video-toggle{
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
}

.dating-video-toggle input{
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
}

.dating-video-field select{
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(6, 56, 74, 0.14);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}

.dating-video-field .country-select{
  width: 100%;
}

.dating-video-field{
  grid-column: span 1;
}

.country-select-native{
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.country-select{
  position: relative;
}

.country-select__button{
  width: 100%;
  min-height: 34px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(6, 56, 74, 0.14);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  color: #2b1d28;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.country-select__selected{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-select__flag-slot,
.country-select__flag{
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
}

.country-select__flag{
  object-fit: contain;
  font-size: 18px;
}

.country-select__list{
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  max-height: 240px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(255, 61, 141, 0.20);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 34px rgba(52, 31, 43, 0.18);
}

.country-select.is-open .country-select__list{
  display: grid;
  gap: 3px;
}

.country-select__option{
  min-height: 34px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 9px;
  padding: 6px 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.country-select__option:hover,
.country-select__option:focus-visible,
.country-select__option.is-selected{
  background: rgba(255, 61, 141, 0.11);
  outline: none;
}

.dating-video-actions{
  grid-area: actions;
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  position: relative;
  z-index: 4;
  margin: 0;
  transform: translateY(-1.5cm);
  box-sizing: border-box;
  padding: 4px 14px;
  border: 1px solid rgba(255, 61, 141, 0.14);
  border-radius: 18px;
  background: rgba(255,255,255,0.84);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dating-video-actions .modal-btn{
  flex: 1 1 0;
  min-width: 0;
  max-width: 170px;
  min-height: 32px;
  padding-inline: 12px;
  border-radius: 999px;
  font-weight: 950;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.dating-video-actions #datingVideoStartBtn{
  border-color: rgba(22, 163, 74, 0.42);
  background:
    radial-gradient(circle at 32% 18%, rgba(255,255,255,0.45), transparent 34%),
    linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
}

.dating-video-actions #datingVideoStartBtn:hover,
.dating-video-actions #datingVideoStartBtn:focus-visible{
  background:
    radial-gradient(circle at 32% 18%, rgba(255,255,255,0.52), transparent 34%),
    linear-gradient(135deg, #15803d, #16a34a);
}

.dating-video-actions #datingVideoStopBtn{
  border-color: rgba(220, 38, 38, 0.42);
  background:
    radial-gradient(circle at 32% 18%, rgba(255,255,255,0.38), transparent 34%),
    linear-gradient(135deg, #dc2626, #f43f5e);
  color: #fff;
}

.dating-video-actions #datingVideoStopBtn:hover,
.dating-video-actions #datingVideoStopBtn:focus-visible{
  background:
    radial-gradient(circle at 32% 18%, rgba(255,255,255,0.46), transparent 34%),
    linear-gradient(135deg, #b91c1c, #dc2626);
}

.dating-video-actions #datingVideoStartBtn:disabled,
.dating-video-actions #datingVideoStopBtn:disabled{
  opacity: 0.58;
  filter: grayscale(0.18);
  cursor: default;
}

.dating-video-actions .dating-video-settings-open{
  flex: 0 0 46px;
  width: 46px;
  max-width: 46px;
  padding-inline: 0;
  border-color: rgba(29, 78, 216, 0.44);
  background:
    radial-gradient(circle at 32% 18%, rgba(255,255,255,0.44), transparent 34%),
    linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.30);
}

.dating-video-actions .dating-video-settings-open:hover,
.dating-video-actions .dating-video-settings-open:focus-visible{
  background:
    radial-gradient(circle at 32% 18%, rgba(255,255,255,0.52), transparent 34%),
    linear-gradient(135deg, #1d4ed8, #1e40af);
}

.dating-video-actions .dating-video-fullscreen-btn{
  border-color: rgba(37, 99, 235, 0.24);
  background: rgba(239, 246, 255, 0.96);
  color: #1d4ed8;
}

.dating-video-status{
  display: none;
}

.dating-video-status.is-visible{
  position: absolute;
  z-index: 4;
  left: 10px;
  right: 10px;
  bottom: calc(1.5cm + 58px);
  display: block;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  background: rgba(255,255,255,0.88);
  color: rgba(15, 23, 42, 0.86);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.dating-video-result{
  position: absolute;
  z-index: 4;
  top: 56px;
  left: 8px;
  right: 8px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(37,99,235,0.12);
  background: rgba(255,255,255,0.84);
}

.dating-video-result.hidden{
  display: none;
}

.dating-video-result-photo{
  width: 64px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(37,99,235,0.10);
  color: #1d4ed8;
  font-weight: 950;
}

.dating-video-result-photo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dating-video-result-copy{
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dating-video-result-copy strong,
.dating-video-result-copy span{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dating-video-result-copy span{
  color: rgba(42,42,42,0.66);
  font-size: 13px;
}

@media (max-width: 640px){
  .dating-room-tabs,
  .travel-room-tabs{
    gap: 6px;
    margin-top: max(0px, calc(var(--mobileHeaderH, 52px) + env(safe-area-inset-top, 0px) - 2.4cm));
    padding: 8px;
  }

  .dating-room-tab,
  .travel-room-tab{
    flex: 1 1 0;
    padding-inline: 8px;
  }

  .travel-airlines-modal{
    padding: 8px;
  }

  .travel-airlines-card{
    width: 100%;
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 18px;
  }

  .travel-airlines-head{
    padding: 14px 14px 10px;
  }

  .travel-airlines-tools{
    padding: 10px 14px;
  }

  .travel-airlines-list{
    padding: 12px 14px 14px;
  }

  .travel-airlines-grid{
    grid-template-columns: 1fr;
  }

  .dating-call-stage,
  .dating-video-settings,
  .dating-video-result{
    grid-template-columns: 1fr;
  }

  .dating-call-pane{
    min-height: 0;
    aspect-ratio: auto;
  }

  .dating-video-actions{
    flex-wrap: wrap;
  }

  .dating-video-actions .modal-btn{
    flex-basis: calc(50% - 4px);
    max-width: none;
  }

  .dating-video-card{
    width: 100%;
    height: 100%;
    max-height: none;
    overflow: hidden;
    grid-template-rows: auto minmax(0, 1fr) auto;
    padding: 8px 8px 8px;
  }

  .dating-video-head{
    padding-right: 88px;
  }

  .dating-video-head h3{
    gap: 8px;
    font-size: 16px;
  }

  .dating-video-head p{
    display: none;
  }

  .dating-video-settings{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) and (orientation: landscape){
  .dating-call-stage{
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .dating-call-pane{
    min-height: 132px;
  }

  .dating-video-settings{
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ===== COMPOSER ===== */
#composer{
  position: relative;
  padding: 8px;
  border-top: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.7);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.composer-left,
.composer-right{
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
}

#composer button,
#privateComposer button{
  border: 1px solid var(--stroke);
  background: var(--tool-btn-bg);
  color: rgba(30,30,30,0.86);
  border-radius: 11px;
  min-width: 36px;
  min-height: 36px;
  padding: 7px 9px;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(0,0,0,0.05);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

#composer button:hover,
#privateComposer button:hover{
  background: var(--tool-btn-hover);
}



#composer button:disabled,
#privateComposer button:disabled{
  opacity: 0.5;
  cursor: default;
}

#birthdayCakeBtn{
  background:
    radial-gradient(circle at 35% 20%, rgba(255,255,255,0.95), rgba(255,255,255,0) 44%),
    linear-gradient(180deg, #fff7ed, #fed7aa);
  border-color: rgba(234, 88, 12, 0.28);
}

#birthdayCakeBtn[hidden]{
  display: none !important;
}

.birthday-cake-modal{
  max-width: 420px;
}

.birthday-cake-field{
  display: grid;
  gap: 7px;
  margin: 14px 0;
  font-weight: 700;
}

.birthday-cake-field input{
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(234, 88, 12, 0.24);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 16px;
}

.birthday-cake-preview{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(30px, 1fr));
  gap: 5px;
  margin: 10px 0 16px;
}

.birthday-cake-preview span{
  display: grid;
  place-items: center;
  min-height: 30px;
  border-radius: 6px;
  background: linear-gradient(135deg, #fff7ed, #fecaca 55%, #fda4af);
  color: #7f1d1d;
  font-size: 12px;
  font-weight: 800;
}

.composer-form{
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  min-width: 0;
}

#privateForm.composer-form{
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
}

.composer-input-shell{
  position: relative;
  display: block;
  min-width: 0;
}

.composer-inline-actions{
  position: absolute;
  bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
}

.composer-inline-actions.left{
  left: 7px;
}

.composer-inline-actions.right{
  right: 7px;
}

.reply-preview{
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 9px;
  border-radius: 12px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,61,141,0.18);
  box-shadow: 0 6px 16px rgba(255,61,141,0.08);
}

.reply-preview.hidden{
  display: none;
}

.reply-preview-body{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reply-preview-body strong{
  font-size: 11px;
  color: var(--accent);
}

.reply-preview-body span{
  font-size: 11px;
  line-height: 1.35;
  color: rgba(40,40,40,0.76);
  word-break: break-word;
}

.reply-preview-close{
  margin-left: auto;
  flex: 0 0 auto;
  min-width: 34px;
}

.scroll-down-btn{
  position: absolute;
  right: 12px;
  bottom: 106px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,61,141,0.68), rgba(255,106,169,0.68));
  color: #fff;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(255,61,141,0.18);
  opacity: 0.76;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  z-index: 8;
}

.scroll-down-btn.hidden{
  display: none;
}

.msg-quote{
  margin-bottom: 6px;
  padding: 7px 9px;
  border-left: 3px solid rgba(255,61,141,0.5);
  border-radius: 10px;
  background: rgba(255,61,141,0.08);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.msg-quote.is-link{
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.msg-quote.is-link:hover,
.msg-quote.is-link:focus-visible{
  background: rgba(255,61,141,0.12);
  box-shadow: 0 0 0 2px rgba(255,61,141,0.12);
  outline: none;
}

.msg-quote-author{
  font-size: 11px;
  color: rgba(255,61,141,0.94);
}

.msg-quote-text{
  font-size: 11px;
  line-height: 1.35;
  color: rgba(40,40,40,0.72);
  word-break: break-word;
}

.quote-jump-target{
  box-shadow:
    0 0 0 2px rgba(255,61,141,0.35),
    0 10px 22px rgba(255,61,141,0.18);
  transition: box-shadow 0.22s ease;
}

.composer-form textarea,
.composer-form input{
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  padding: 10px 50px 10px 11px;
  font-size: 12px;
  font: inherit;
  line-height: 1.35;
  outline: none;
  background: rgba(255,255,255,0.92);
  min-height: 42px;
  max-height: min(42vh, 360px);
  resize: none;
  overflow-y: hidden;
  display: block;
}

.composer-form textarea[data-fit-full-text="1"]{
  max-height: none;
}

#privateInput{
  padding-left: 138px;
  padding-right: 88px;
  min-height: 42px;
  height: 42px;
}

.composer-form textarea:focus,
.composer-form input:focus{
  border-color: rgba(255,61,141,0.55);
  box-shadow: 0 0 0 3px rgba(255,61,141,0.12);
}

#input{
  background:
    linear-gradient(rgba(0,0,0,var(--room-bubble-me-darken, var(--bubble-me-darken, 0))), rgba(0,0,0,var(--room-bubble-me-darken, var(--bubble-me-darken, 0)))),
    var(--room-bubble-me-bg, var(--bubble-me-bg)) !important;
  font-size: var(--room-message-font-size, var(--message-font-size, 16px));
  padding-left: 96px;
}

#privateInput{
  background:
    linear-gradient(rgba(0,0,0,var(--private-bubble-me-darken, var(--bubble-me-darken, 0))), rgba(0,0,0,var(--private-bubble-me-darken, var(--bubble-me-darken, 0)))),
    var(--private-bubble-me-bg, var(--bubble-me-bg)) !important;
  font-size: var(--private-message-font-size, var(--message-font-size, 16px));
}

.send-btn{
  border: none !important;
  color: #fff !important;
  font-weight: 700 !important;
  background: linear-gradient(135deg, var(--accent), var(--accent2)) !important;
  min-width: 36px !important;
  width: 36px;
  height: 36px;
  padding: 0 !important;
  border-radius: 11px !important;
  font-size: 0 !important;
  box-shadow: 0 8px 16px rgba(255,61,141,0.2);
  justify-self: end;
  flex: 0 0 auto;
  --send-offset-x: -4px;
  --send-offset-y: 4px;
}

#roomSendBtn,
#privateSendBtn{
  position: absolute;
  bottom: 6px;
  z-index: 6;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translate(var(--send-offset-x), var(--send-offset-y)) scale(0.88);
  box-shadow: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

#roomSendBtn{
  right: 7px;
}

#privateSendBtn{
  right: 52px;
}

#form.has-text #roomSendBtn,
#privateForm.has-text #privateSendBtn{
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translate(var(--send-offset-x), var(--send-offset-y)) scale(1);
  box-shadow: 0 8px 16px rgba(255,61,141,0.2);
}

#form.has-text #recordBtn,
#privateForm.has-text #privateRecordBtn{
  opacity: 0;
  pointer-events: none;
  transform: scale(0.88);
}

#recordBtn,
#privateRecordBtn{
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.send-icon{
  width: 16px;
  height: 16px;
  display: block;
}

/* ===== FORMAT BAR ===== */
.format-bar{
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  min-width: 170px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(255,61,141,0.22);
  box-shadow: 0 18px 40px rgba(0,0,0,0.14);
  z-index: 32;
}

.format-bar .fmt{
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: rgba(40,40,40,0.75);
}

.format-bar input[type="color"]{
  width: 40px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 9px;
  background: rgba(255,255,255,0.92);
}

.format-bar select{
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 6px 8px;
  background: rgba(255,255,255,0.92);
  font-size: 12px;
}

.composer-inline-actions button{
  min-width: 30px !important;
  min-height: 30px !important;
  width: 30px;
  height: 30px;
  padding: 5px !important;
  border-radius: 10px !important;
  font-size: 15px !important;
  box-shadow: none !important;
}

.theme-text-settings{
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.theme-text-block{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.theme-text-block strong{
  font-size: 12px;
  color: rgba(40,40,40,0.82);
}

.theme-format-bar{
  position: static;
  min-width: 0;
  box-shadow: none;
  background: rgba(255,255,255,0.72);
}

/* ===== EMOJI PANELS ===== */
#emojiPanel,
#privateEmojiPanel{
  position: absolute;
  right: 10px;
  bottom: calc(100% + 8px);
  width: min(520px, 92%);
  max-height: 260px;
  overflow: auto;
  background:
    radial-gradient(circle at top right, rgba(255, 203, 107, 0.34), transparent 34%),
    radial-gradient(circle at top left, rgba(255, 119, 170, 0.24), transparent 30%),
    rgba(255,255,255,0.97);
  border: 1px solid rgba(255,61,141,0.18);
  border-radius: 20px;
  box-shadow: 0 24px 54px rgba(0,0,0,0.18);
  padding: 12px;
  z-index: 30;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#privateEmojiPanel{
  z-index: 2147483646;
}

#emojiPanel.emoji-panel--reaction-picker{
  width: min(840px, calc(100vw - 16px));
  max-width: min(840px, calc(100vw - 16px));
  min-height: min(58vh, 560px);
  max-height: min(88vh, 860px);
  padding: 18px;
  z-index: 2147483646;
}

.composer-history-suggestions{
  position: absolute;
  left: 8px;
  right: 54px;
  bottom: calc(100% + 8px);
  max-height: 184px;
  overflow: auto;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(255,61,141,0.16);
  box-shadow: 0 18px 40px rgba(0,0,0,0.16);
  z-index: 31;
}

#privateInputSuggestions{
  left: 8px;
  right: 54px;
}

#privateComposer > #privateInputSuggestions{
  left: 8px;
  right: 54px;
  bottom: calc(100% + 8px);
}

.composer-history-suggestions.hidden{
  display: none;
}

.composer-history-suggestion{
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 10px;
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(40,40,40,0.84);
}

.composer-history-suggestion:hover,
.composer-history-suggestion:focus-visible{
  background: rgba(255,61,141,0.10);
  outline: none;
}

.emoji-header{
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.emoji-tools{
  margin-bottom: 8px;
}

.emoji-search-input{
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(255,61,141,0.18);
  border-radius: 12px;
  padding: 8px 11px;
  background: rgba(255,255,255,0.92);
  color: rgba(40,40,40,0.88);
  font-size: 13px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.emoji-search-input:focus{
  border-color: rgba(255,61,141,0.42);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 0 0 3px rgba(255,61,141,0.10);
}

.emoji-frequent{
  display: flex;
  gap: 6px;
  margin: 0 0 9px;
  padding: 6px;
  overflow-x: auto;
  border-radius: 14px;
  background: rgba(255, 244, 220, 0.72);
  border: 1px solid rgba(255, 180, 80, 0.22);
  min-height: 52px;
  align-items: center;
}

.emoji-frequent-btn{
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  padding: 0;
  border-radius: 12px;
  aspect-ratio: 1 / 1;
}

.emoji-tab{
  border: 1px solid rgba(255,255,255,0.72);
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,240,247,0.92));
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 17px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(255, 61, 141, 0.08);
  transition:
    transform 0.14s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.emoji-tab.active{
  background: linear-gradient(180deg, rgba(255, 125, 173, 0.32), rgba(255, 214, 126, 0.3));
  border-color: rgba(255,61,141,0.24);
  box-shadow: 0 12px 22px rgba(255, 122, 173, 0.16);
}

.emoji-tab-kolobok{
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}

.emoji-body{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 8px;
}

#emojiPanel.emoji-panel--reaction-picker .emoji-body{
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 12px;
  align-content: start;
}

#emojiPanel.emoji-panel--reaction-picker .emoji-btn{
  min-height: 56px;
  padding: 10px 0;
}

.emoji-btn{
  border: 1px solid rgba(255,255,255,0.72);
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,0.98), rgba(255,255,255,0) 45%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,241,247,0.96));
  border-radius: 14px;
  min-height: 42px;
  padding: 7px 0;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.86),
    0 8px 18px rgba(255, 61, 141, 0.1);
  transition:
    transform 0.14s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.emoji-btn--frequent{
  border-color: rgba(255, 176, 56, 0.48);
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,1), rgba(255,255,255,0) 45%),
    linear-gradient(180deg, rgba(255, 253, 244, 1), rgba(255, 236, 190, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.92),
    0 9px 18px rgba(255, 171, 46, 0.18);
}

.emoji-empty{
  grid-column: 1 / -1;
  padding: 16px 8px;
  color: rgba(70,70,70,0.62);
  font-size: 13px;
  text-align: center;
}

.emoji-tab:hover,
.emoji-btn:hover{
  transform: translateY(-1px) scale(1.03);
}

.emoji-btn:hover{
  border-color: rgba(255, 122, 173, 0.24);
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,1), rgba(255,255,255,0) 45%),
    linear-gradient(180deg, rgba(255, 250, 252, 1), rgba(255, 228, 239, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.92),
    0 12px 22px rgba(255, 61, 141, 0.14);
}

.emoji-btn:active{
  transform: scale(0.96);
}

.twemoji{
  display: inline-block;
  vertical-align: -0.12em;
  user-select: none;
  -webkit-user-drag: none;
}

.twemoji-inline{
  width: 1.16em;
  height: 1.16em;
  font-size: 1.08em;
}

.twemoji-picker,
.twemoji-button{
  width: 28px;
  height: 28px;
  font-size: 28px;
}

#emojiPanel.emoji-panel--reaction-picker .twemoji-picker{
  width: 36px;
  height: 36px;
}

.twemoji-reaction{
  width: 22px;
  height: 22px;
}

.emoji-btn--kolobok{
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kolobok-img{
  display: inline-block;
  max-width: 1.9em;
  max-height: 1.9em;
  vertical-align: -0.42em;
  object-fit: contain;
}

.kolobok-img.kolobok-inline{
  width: auto;
  height: 1.55em;
  max-width: 4.2em;
  max-height: 2.2em;
}

.kolobok-img.kolobok-picker{
  width: 34px;
  height: 34px;
  max-width: 42px;
  max-height: 42px;
}

.emoji-btn--love{
  min-height: 82px;
  padding: 6px 0;
}

.emoji-frequent .emoji-btn--love{
  min-height: 38px;
  width: 38px;
  height: 38px;
  padding: 0;
}

.love-emoji-img{
  filter:
    drop-shadow(0 0 7px rgba(255, 61, 141, 0.42))
    drop-shadow(0 8px 14px rgba(255, 122, 173, 0.24));
}

.love-emoji-img.kolobok-picker{
  width: 68px;
  height: 68px;
  max-width: 74px;
  max-height: 74px;
}

.emoji-frequent .love-emoji-img.kolobok-picker{
  width: 30px;
  height: 30px;
  max-width: 32px;
  max-height: 32px;
}

.love-emoji-img.kolobok-inline{
  height: 3.1em;
  max-width: 8.4em;
  max-height: 4.4em;
  vertical-align: -1.24em;
}

.kolobok{
  --mouth-width: 0.6em;
  --mouth-height: 0.28em;
  --mouth-top: 0.72em;
  --mouth-radius: 0 0 999px 999px;
  --mouth-border-width: 0 0 0.12em 0;
  position: relative;
  display: inline-block;
  width: 1.22em;
  height: 1.22em;
  min-width: 1.22em;
  border-radius: 999px;
  vertical-align: -0.22em;
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,0.9) 0 10%, transparent 21%),
    linear-gradient(135deg, #fff071 0%, #ffd238 42%, #f5a300 78%, #d77a00 100%);
  border: 1px solid #9f6400;
  box-shadow:
    inset -0.14em -0.16em 0 rgba(151, 79, 0, 0.22),
    inset 0.06em 0.07em 0 rgba(255,255,255,0.36);
  image-rendering: pixelated;
}

.kolobok::before{
  content: "";
  position: absolute;
  left: 0.34em;
  top: 0.38em;
  width: 0.13em;
  height: 0.13em;
  border-radius: 999px;
  background: #2b1900;
  box-shadow: 0.38em 0 0 #2b1900;
}

.kolobok::after{
  content: "";
  position: absolute;
  left: 50%;
  top: var(--mouth-top);
  width: var(--mouth-width);
  height: var(--mouth-height);
  border-style: solid;
  border-color: #5d2d00;
  border-width: var(--mouth-border-width);
  border-radius: var(--mouth-radius);
  transform: translateX(-50%);
}

.kolobok-inline{
  font-size: 1.05em;
}

.kolobok-picker{
  font-size: 25px;
}

.kolobok--laugh{
  --mouth-width: 0.58em;
  --mouth-height: 0.38em;
  --mouth-top: 0.68em;
  --mouth-border-width: 0;
  --mouth-radius: 0 0 999px 999px;
}

.kolobok--laugh::after{
  background: #5d2d00;
  box-shadow: inset 0 -0.09em 0 rgba(255,255,255,0.42);
}

.kolobok--wink::before{
  height: 0.06em;
  border-radius: 999px;
  transform: rotate(-8deg);
}

.kolobok--tongue::after{
  --mouth-width: 0.52em;
  --mouth-height: 0.2em;
  --mouth-top: 0.7em;
  --mouth-border-width: 0;
  background: #6b3300;
  box-shadow: 0 0.12em 0 -0.02em #ff6b8f;
}

.kolobok--cool::before{
  left: 0.29em;
  top: 0.39em;
  width: 0.7em;
  height: 0.22em;
  border-radius: 0.08em;
  background: #1f2937;
  box-shadow: none;
}

.kolobok--cool::after{
  --mouth-width: 0.5em;
  --mouth-top: 0.74em;
}

.kolobok--love::before{
  color: #e11d48;
  content: "♥ ♥";
  left: 0.23em;
  top: 0.28em;
  width: auto;
  height: auto;
  background: none;
  box-shadow: none;
  font-size: 0.34em;
  letter-spacing: 0.1em;
}

.kolobok--kiss::before,
.kolobok--kissed::before,
.kolobok--kissing::before{
  left: 0.34em;
  top: 0.38em;
  box-shadow: 0.34em 0 0 #2b1900;
}

.kolobok--kiss::after,
.kolobok--kissed::after,
.kolobok--kissing::after{
  content: "3";
  left: 0.63em;
  top: 0.62em;
  width: auto;
  height: auto;
  border: 0;
  color: #b0182f;
  font-size: 0.45em;
  font-weight: 900;
}

.kolobok--sad{
  --mouth-top: 0.78em;
  --mouth-border-width: 0.12em 0 0 0;
  --mouth-radius: 999px 999px 0 0;
}

.kolobok--cry::before{
  box-shadow: 0.38em 0 0 #402000, 0.42em 0.2em 0 -0.02em #38bdf8;
}

.kolobok--angry::before{
  transform: rotate(12deg);
  box-shadow: 0.38em -0.08em 0 #2b1900;
}

.kolobok--mad{
  --mouth-top: 0.82em;
  --mouth-width: 0.5em;
  --mouth-border-width: 0.11em 0 0 0;
  --mouth-radius: 999px 999px 0 0;
}

.kolobok--mad::before{
  transform: rotate(-10deg);
  box-shadow: 0.38em 0.04em 0 #2b1900;
}

.kolobok--scream,
.kolobok--shock,
.kolobok--yell{
  --mouth-width: 0.36em;
  --mouth-height: 0.4em;
  --mouth-top: 0.66em;
  --mouth-border-width: 0;
}

.kolobok--scream::after,
.kolobok--shock::after,
.kolobok--yell::after{
  background: #5d2d00;
  border-radius: 999px;
}

.kolobok--surprise{
  --mouth-width: 0.34em;
  --mouth-height: 0.34em;
  --mouth-top: 0.68em;
  --mouth-border-width: 0;
}

.kolobok--surprise::after{
  background: #5d2d00;
  border-radius: 999px;
}

.kolobok--hmmm{
  --mouth-width: 0.42em;
  --mouth-top: 0.82em;
  --mouth-border-width: 0.09em 0 0 0;
  --mouth-radius: 999px 999px 0 0;
}

.kolobok--confused::after{
  --mouth-width: 0.48em;
  --mouth-top: 0.76em;
  border-width: 0.09em 0 0 0;
  border-radius: 999px 999px 0 0;
  transform: translateX(-50%) rotate(-8deg);
}

.kolobok--gross{
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,0.82) 0 10%, transparent 21%),
    linear-gradient(135deg, #d9f96c 0%, #a8df39 48%, #65a30d 100%);
}

.kolobok--gross::after{
  --mouth-width: 0.5em;
  --mouth-height: 0.18em;
  --mouth-top: 0.76em;
  --mouth-border-width: 0;
  background: #355e00;
}

.kolobok--sealed::after{
  --mouth-width: 0.58em;
  --mouth-top: 0.78em;
  --mouth-border-width: 0.08em 0 0 0;
  border-style: dashed;
}

.kolobok--angel::before{
  box-shadow: 0.38em 0 0 #2b1900, 0.19em -0.35em 0 0.12em transparent;
}

.kolobok--angel{
  box-shadow:
    0 -0.34em 0 -0.2em #ffe27a,
    0 -0.34em 0 -0.13em #8fc7ff,
    inset -0.14em -0.16em 0 rgba(151, 79, 0, 0.22),
    inset 0.06em 0.07em 0 rgba(255,255,255,0.36);
}

.kolobok--devil{
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,0.82) 0 10%, transparent 21%),
    linear-gradient(135deg, #ff8a4c 0%, #ef4444 52%, #991b1b 100%);
}

.kolobok--devil::before{
  box-shadow: 0.38em 0 0 #2b1900;
}

.kolobok--devil::after{
  --mouth-width: 0.54em;
  --mouth-top: 0.72em;
  border-color: #fff4d0;
}

.kolobok--bomb,
.kolobok--dj,
.kolobok--drink,
.kolobok--joking,
.kolobok--stop,
.kolobok--thumbs-up,
.kolobok--tired,
.kolobok--rose{
  background: none;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}

.kolobok--bomb::before,
.kolobok--dj::before,
.kolobok--drink::before,
.kolobok--joking::before,
.kolobok--stop::before,
.kolobok--thumbs-up::before,
.kolobok--tired::before,
.kolobok--rose::before{
  left: 50%;
  top: 50%;
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  box-shadow: none;
  transform: translate(-50%, -50%);
  font-size: 0.82em;
  line-height: 1;
}

.kolobok--bomb::before{ content: "●"; color: #1f2937; text-shadow: 0.2em -0.22em 0 #f97316; }
.kolobok--dj::before{ content: "♫"; color: #2563eb; font-weight: 900; }
.kolobok--drink::before{ content: "☕"; color: #38bdf8; text-shadow: 0 -0.18em 0 #fef08a; }
.kolobok--joking::before{ content: "☻"; color: #d97706; }
.kolobok--stop::before{ content: "!"; color: #ef4444; font-weight: 900; }
.kolobok--thumbs-up::before{ content: "👍"; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.kolobok--tired::before{ content: "Zz"; color: #475569; font-weight: 900; font-size: 0.58em; }
.kolobok--rose::before{ content: "✿"; color: #e11d48; text-shadow: 0.28em 0.22em 0 #16a34a; }

.kolobok--blush{
  background:
    radial-gradient(circle at 25% 64%, rgba(255,107,143,0.62) 0 10%, transparent 22%),
    radial-gradient(circle at 76% 64%, rgba(255,107,143,0.62) 0 10%, transparent 22%),
    radial-gradient(circle at 32% 24%, rgba(255,255,255,0.96) 0 13%, rgba(255,255,255,0) 28%),
    linear-gradient(145deg, #ffe972 0%, #ffc83d 52%, #f29a12 100%);
}

.kolobok--sleep::before{
  content: "Z";
  left: 0.34em;
  top: 0.3em;
  width: auto;
  height: auto;
  background: none;
  box-shadow: none;
  color: #402000;
  font-size: 0.42em;
  font-weight: 900;
}

.emoji-fallback{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.emoji-fallback--empty{
  display: none;
}

.emoji-btn .emoji-fallback,
.emoji-tab .emoji-fallback{
  width: 1.2em;
  height: 1.2em;
  font-size: inherit;
}

.reaction-emoji-btn .emoji-fallback,
.msg-reaction-chip .emoji-fallback{
  font-size: 1em;
}

@media (max-width: 768px) {
  #emojiPanel,
  #privateEmojiPanel,
  #privateWatchEmojiPanel{
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: calc(100% + 8px);
    width: auto;
    max-width: none;
    min-height: 0;
    max-height: min(42vh, 300px);
    padding: 8px;
    border-radius: 16px;
    overflow: hidden;
    z-index: 2147483646;
  }

  #emojiPanel[hidden],
  #privateEmojiPanel[hidden],
  #privateWatchEmojiPanel[hidden]{
    display: none !important;
  }

  #emojiPanel:not([hidden]),
  #privateEmojiPanel:not([hidden]),
  #privateWatchEmojiPanel:not([hidden]){
    display: flex;
    flex-direction: column;
  }

  #emojiPanel .emoji-header,
  #privateEmojiPanel .emoji-header,
  #privateWatchEmojiPanel .emoji-header{
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 5px;
    margin: -8px -8px 6px;
    padding: 8px 8px 6px;
    overflow-x: auto;
    background: rgba(255,255,255,0.86);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  #emojiPanel .emoji-tools,
  #privateEmojiPanel .emoji-tools,
  #privateWatchEmojiPanel .emoji-tools{
    flex: 0 0 auto;
    margin-bottom: 6px;
  }

  #emojiPanel .emoji-search-input,
  #privateEmojiPanel .emoji-search-input,
  #privateWatchEmojiPanel .emoji-search-input{
    min-height: 34px;
    font-size: 12px;
    border-radius: 11px;
  }

  #emojiPanel .emoji-frequent,
  #privateEmojiPanel .emoji-frequent,
  #privateWatchEmojiPanel .emoji-frequent{
    flex: 0 0 auto;
    margin-bottom: 6px;
    padding: 6px;
  }

  #emojiPanel .emoji-frequent .emoji-btn,
  #privateEmojiPanel .emoji-frequent .emoji-btn,
  #privateWatchEmojiPanel .emoji-frequent .emoji-btn{
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    padding: 0;
    aspect-ratio: 1 / 1;
  }

  #emojiPanel .emoji-tab,
  #privateEmojiPanel .emoji-tab,
  #privateWatchEmojiPanel .emoji-tab{
    flex: 0 0 auto;
    min-width: 38px;
    min-height: 34px;
    padding: 6px 9px;
    font-size: 16px;
  }

  #emojiPanel .emoji-tab-kolobok,
  #privateEmojiPanel .emoji-tab-kolobok,
  #privateWatchEmojiPanel .emoji-tab-kolobok{
    width: 22px;
    height: 22px;
  }

  #emojiPanel .emoji-body,
  #privateEmojiPanel .emoji-body,
  #privateWatchEmojiPanel .emoji-body{
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
    gap: 6px;
    padding-right: 1px;
    -webkit-overflow-scrolling: touch;
  }

  #emojiPanel .emoji-btn,
  #privateEmojiPanel .emoji-btn,
  #privateWatchEmojiPanel .emoji-btn{
    min-height: 42px;
    border-radius: 12px;
    padding: 4px 0;
  }

  #emojiPanel .twemoji-picker,
  #privateEmojiPanel .twemoji-picker,
  #privateWatchEmojiPanel .twemoji-picker{
    width: 24px;
    height: 24px;
  }

  #emojiPanel .kolobok-img.kolobok-picker,
  #privateEmojiPanel .kolobok-img.kolobok-picker,
  #privateWatchEmojiPanel .kolobok-img.kolobok-picker,
  #emojiPanel .kolobok.kolobok-picker,
  #privateEmojiPanel .kolobok.kolobok-picker,
  #privateWatchEmojiPanel .kolobok.kolobok-picker{
    width: 30px;
    height: 30px;
    max-width: 32px;
    max-height: 32px;
    font-size: 22px;
    vertical-align: middle;
  }

  #emojiPanel .emoji-btn--love,
  #privateEmojiPanel .emoji-btn--love,
  #privateWatchEmojiPanel .emoji-btn--love{
    min-height: 64px;
  }

  #emojiPanel .love-emoji-img.kolobok-picker,
  #privateEmojiPanel .love-emoji-img.kolobok-picker,
  #privateWatchEmojiPanel .love-emoji-img.kolobok-picker{
    width: 56px;
    height: 56px;
    max-width: 60px;
    max-height: 60px;
  }

  #emojiPanel .emoji-frequent .love-emoji-img.kolobok-picker,
  #privateEmojiPanel .emoji-frequent .love-emoji-img.kolobok-picker,
  #privateWatchEmojiPanel .emoji-frequent .love-emoji-img.kolobok-picker{
    width: 28px;
    height: 28px;
    max-width: 30px;
    max-height: 30px;
  }
}

@media (pointer: coarse) {
  body,
  button,
  .msg,
  .msg-top,
  .msg-body,
  .msg-meta,
  .emoji-btn,
  .emoji-tab,
  .user-context-menu,
  .user-context-menu *:not(input):not(textarea),
  #sidebar,
  #main,
  #privatePanel,
  #composer,
  #privateComposer,
  #privateHeader,
  #privateDialogs,
  #roomsList,
  #usersList {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
  }

  input,
  textarea,
  [contenteditable="true"] {
    user-select: text;
    -webkit-user-select: text;
    -webkit-touch-callout: default;
  }
}

/* ===== MESSAGES ===== */
.msg{
  position: relative;
  display: block;
  width: fit-content;
  max-width: 94%;
  margin: 3px 0;
  padding: 6px 8px;
  border-radius: 12px;
  /* border: 1px solid rgba(0,0,0,0.06); */
  border: 1px solid var(--msg-border);
  background: rgba(255,255,255,0.92);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  font-size: var(--room-message-font-size, var(--message-font-size, 16px));
  line-height: 1.2;
  word-break: break-word;
}

.msg.me{
  margin-left: auto;
  background:
    linear-gradient(rgba(0,0,0,var(--room-bubble-me-darken, var(--bubble-me-darken, 0))), rgba(0,0,0,var(--room-bubble-me-darken, var(--bubble-me-darken, 0)))),
    var(--room-bubble-me-bg, var(--bubble-me-bg));
  border-color: var(--bubble-me-border);
}

#chatContainer.is-background-hard-to-read .msg{
  border-color: rgba(15,23,42,0.18);
  box-shadow: 0 8px 18px rgba(15,23,42,0.12);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

#chatContainer.is-background-hard-to-read .msg[data-message-bubble="1"],
#privateChatContainer.is-background-hard-to-read .msg[data-message-bubble="1"]{
  background: var(--message-bubble-bg-readable) !important;
}

#chatContainer.is-background-hard-to-read .msg.me{
  background:
    linear-gradient(rgba(0,0,0,var(--room-bubble-me-darken, var(--bubble-me-darken, 0))), rgba(0,0,0,var(--room-bubble-me-darken, var(--bubble-me-darken, 0)))),
    var(--room-bubble-me-bg-readable, var(--room-bubble-me-bg, var(--bubble-me-bg))) !important;
}

#privateChatContainer .msg.me{
  background:
    linear-gradient(rgba(0,0,0,var(--private-bubble-me-darken, var(--bubble-me-darken, 0))), rgba(0,0,0,var(--private-bubble-me-darken, var(--bubble-me-darken, 0)))),
    var(--private-bubble-me-bg, var(--bubble-me-bg));
}

.message-appearance-menu{
  position: relative;
  min-width: 240px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.message-appearance-menu.hidden{
  display: none !important;
}

.message-appearance-menu summary{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  cursor: pointer;
  color: rgba(43,31,40,0.82);
  font-size: 12px;
  font-weight: 900;
  list-style: none;
}

.message-appearance-menu summary::-webkit-details-marker{
  display: none;
}

.message-appearance-menu summary::after{
  content: "▾";
  flex: 0 0 auto;
  transition: transform 0.16s ease;
}

.message-appearance-menu:not([open]) summary::after{
  transform: rotate(-90deg);
}

.message-backdrop-control{
  display: none;
  width: 100%;
  max-height: min(62vh, 460px);
  overflow-y: auto;
  overscroll-behavior: contain;
  gap: 8px;
  padding: 10px;
  margin: 0 8px 8px;
  border: 1px solid rgba(255, 80, 140, 0.16);
  border-radius: 12px;
  background: rgba(255,255,255,0.98);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.message-appearance-menu[open] .message-backdrop-control{
  display: grid;
}

.composer-style-context-menu{
  width: min(320px, calc(100vw - 16px));
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.composer-style-context-menu.context-menu-draggable{
  will-change: left, top;
}

.composer-style-context-menu .user-context-menu-title{
  cursor: grab;
  touch-action: none;
}

.composer-style-context-menu.is-dragging .user-context-menu-title{
  cursor: grabbing;
}

.composer-style-context-menu .message-backdrop-control{
  display: grid;
  width: auto;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.composer-style-context-menu[data-scope="room"] [data-composer-style-scope="private"],
.composer-style-context-menu[data-scope="private"] [data-composer-style-scope="room"]{
  display: none;
}

.message-backdrop-control label{
  font-size: 12px;
  font-weight: 900;
  color: rgba(43,31,40,0.82);
}

.message-backdrop-control__field{
  display: grid;
  gap: 5px;
}

.message-style-section{
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.message-style-section strong{
  color: rgba(43,31,40,0.82);
  font-size: 12px;
  font-weight: 900;
}

.message-backdrop-control input[type="color"]{
  width: 100%;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 8px;
  background: rgba(255,255,255,0.82);
  cursor: pointer;
}

.message-backdrop-control select,
.message-backdrop-control input[type="number"]{
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 8px;
  padding: 7px 9px;
  background: rgba(255,255,255,0.92);
  color: rgba(40,40,40,0.88);
  font-size: 12px;
}

.message-backdrop-control__row{
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: rgba(43,31,40,0.62);
}

.message-backdrop-control input[type="range"]{
  width: 100%;
  accent-color: #ff3d8d;
}

.message-backdrop-control output{
  justify-self: end;
  font-size: 12px;
  font-weight: 900;
  color: #b3225f;
}

.msg.system{
  width: 100%;
  max-width: 100%;
  background: rgba(255,61,141,0.10);
  /*border-color: rgba(255,61,141,0.20);*/
  border-color: var(--msg-system-border);
  font-style: italic;
  color: rgba(40,40,40,0.75);
}

.system-user-link{
  display: inline;
  border: 0;
  padding: 0 2px;
  background: transparent;
  color: #b3225f;
  font: inherit;
  font-weight: 900;
  font-style: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  cursor: pointer;
}

.system-user-link:hover,
.system-user-link:focus-visible{
  color: #ff3d8d;
  outline: none;
}

.msg-top{
  font-size: 11px;
  margin-bottom: 2px;
  color: rgba(40,40,40,0.78);
}

.msg-user{
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.telegram-source-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  vertical-align: -3px;
}

.telegram-source-badge svg{
  display: block;
  width: 16px;
  height: 16px;
}

.public-group-share-card{
  width: min(420px, 100%);
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(37,99,235,0.18);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(239,246,255,0.94));
  box-shadow: 0 10px 24px rgba(37,99,235,0.12);
  color: #111827;
}

.public-group-share-card__avatar{
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: center / cover no-repeat linear-gradient(135deg, #2563eb, #10b981);
  color: #fff;
  font-size: 18px;
  font-weight: 950;
}

.public-group-share-card__copy{
  min-width: 0;
  display: grid;
  gap: 2px;
}

.public-group-share-card__label{
  color: #2563eb;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.public-group-share-card__copy strong{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.public-group-share-card__copy small{
  color: rgba(17,24,39,0.62);
  font-size: 12px;
}

.public-group-share-card__actions{
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.public-group-share-card__preview,
.public-group-share-card__join{
  min-height: 34px;
  border: 1px solid rgba(37,99,235,0.22);
  border-radius: 11px;
  padding: 0 12px;
  background: #fff;
  color: #1d4ed8;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.public-group-share-card__join{
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

@media (max-width: 520px){
  .public-group-share-card{
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .public-group-share-card__actions{
    grid-column: 1 / -1;
    width: 100%;
  }

  .public-group-share-card__preview,
  .public-group-share-card__join{
    flex: 1 1 0;
  }
}

.msg-user-profile-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  margin-left: 6px;
  border: 1px solid rgba(255, 61, 141, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
  box-shadow: 0 2px 8px rgba(255, 61, 141, 0.1);
}

.msg-user-profile-btn:hover{
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(255, 61, 141, 0.42);
}

.msg-meta{
  color: rgba(40,40,40,0.7);
}

.msg-e2e-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25em;
  height: 1.25em;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.13);
  color: #15803d;
  font-size: 0.86em;
  line-height: 1;
  vertical-align: -0.08em;
}

.msg-body{
  font-size: var(--room-message-font-size, var(--message-font-size, 16px));
}

.msg.has-video .msg-body,
.msg.has-attachment .msg-body{
  display: grid;
  gap: 7px;
  min-width: 0;
}

.room-video-bubble{
  width: min(360px, 72vw);
  max-height: 360px;
  border-radius: 12px;
  background: #0f172a;
  object-fit: contain;
}

.room-attachment-card{
  max-width: min(360px, 72vw);
}

#privateChatContainer .msg,
#privateChatContainer .msg-body{
  font-size: var(--private-message-font-size, var(--message-font-size, 16px));
}

#privateChatContainer.is-background-hard-to-read .msg{
  border-color: rgba(15,23,42,0.18);
  box-shadow: 0 8px 18px rgba(15,23,42,0.12);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

#privateChatContainer.is-background-hard-to-read .msg.me{
  background:
    linear-gradient(rgba(0,0,0,var(--private-bubble-me-darken, var(--bubble-me-darken, 0))), rgba(0,0,0,var(--private-bubble-me-darken, var(--bubble-me-darken, 0)))),
    var(--private-bubble-me-bg-readable, var(--private-bubble-me-bg, var(--bubble-me-bg))) !important;
}

.msg.has-room-video-embed{
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

.msg.has-room-video-embed .msg-body{
  min-width: 0;
  width: 100%;
}

.room-video-embed-card{
  display: grid;
  gap: 8px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.room-video-embed-media{
  min-width: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.14);
}

.room-video-embed-frame{
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0f172a;
}

.room-video-embed-description{
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.68);
  color: rgba(35,35,35,0.92);
  line-height: 1.38;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.room-video-embed-link{
  display: block;
  min-width: 0;
  max-width: 100%;
  color: rgba(37, 99, 235, 0.9);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.msg-del{
  position: absolute;
  top: 6px;
  right: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: rgba(40,40,40,0.45);
  font-size: 12px;
}

.msg-del:hover{
  color: rgba(40,40,40,0.8);
}

.msg audio,
.private-watch-msg audio{
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  clip-path: inset(50%);
}

.voice-message-card{
  margin-top: 6px;
  padding: 8px 9px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,247,251,0.98));
  border: 1px solid rgba(255,61,141,0.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.78),
    0 8px 18px rgba(255,61,141,0.08);
  cursor: pointer;
  user-select: none;
}

.voice-message-row{
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-message-icon{
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(255,61,141,0.16);
  flex: 0 0 28px;
  cursor: pointer;
}

.voice-message-content{
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.voice-message-topline{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 10px;
}

.voice-message-current,
.voice-message-duration{
  font-size: 10px;
  font-weight: 700;
  color: rgba(40,40,40,0.74);
  letter-spacing: 0.02em;
}

.voice-message-current{
  color: rgba(40,40,40,0.58);
}

.voice-message-speed{
  margin-left: auto;
  border: 1px solid rgba(255,61,141,0.12);
  background: rgba(255,255,255,0.78);
  color: rgba(40,40,40,0.82);
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.voice-message-wave{
  position: relative;
  height: 18px;
  border-radius: 10px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,255,255,0.42)),
    repeating-linear-gradient(
      90deg,
      rgba(255,61,141,0.10) 0 4px,
      rgba(255,61,141,0.28) 4px 6px,
      rgba(255,106,169,0.10) 6px 9px,
      transparent 9px 12px
    );
  border: 1px solid rgba(255,61,141,0.10);
  cursor: pointer;
}

.voice-message-wave-fill{
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(255,61,141,0.24), rgba(255,106,169,0.52)),
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,0.12) 0 4px,
      rgba(255,255,255,0.42) 4px 7px,
      transparent 7px 10px
    );
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.24),
    0 8px 18px rgba(255,61,141,0.10);
  transition: width 0.22s ease;
}

.voice-message-wave-progress{
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255,61,141,0.42), rgba(255,106,169,0.82));
  box-shadow: 0 0 18px rgba(255,61,141,0.18);
  transition: width 0.12s linear;
}

.voice-message-speed:focus-visible,
.voice-message-icon:focus-visible{
  outline: 2px solid rgba(255,61,141,0.32);
  outline-offset: 2px;
}

.voice-message-card.is-playing .voice-message-wave-fill{
  filter: saturate(1.15) brightness(1.04);
}

.voice-message-card:focus-visible{
  outline: 2px solid rgba(255,61,141,0.32);
  outline-offset: 2px;
}

.msg.voice-only .msg-body{
  display: none;
}

.msg a.msg-link{
  color: rgba(40,40,40,0.88);
  text-decoration: none;
  border-bottom: 1px dotted rgba(40,40,40,0.35);
}

.msg a.msg-link:hover{
  color: var(--accent);
  border-bottom-color: rgba(255,61,141,0.55);
}

/* preview в поле ввода */
.composer-form textarea,
.composer-form input {
  transition:
    color 0.15s ease,
    font-weight 0.15s ease,
    font-style 0.15s ease,
    caret-color 0.15s ease;
}

/* Стиль голосового сообщения волна */
/* ===== VOICE UI ===== */
#recordUI {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 14px 8px 38px;
  margin: 0 10px 8px;
  border: 1px solid rgba(34, 158, 217, 0.18);
  border-radius: 999px;
  background:
    radial-gradient(circle at 14% 20%, rgba(255,255,255,0.98), rgba(255,255,255,0) 28%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(240,248,255,0.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.92),
    0 8px 22px rgba(37, 99, 235, 0.10);
  position: relative;
  overflow: hidden;
}

#recordUI::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow:
    0 0 0 4px rgba(239,68,68,0.12),
    0 0 14px rgba(239,68,68,0.35);
  animation: telegram-record-pulse 1.2s ease-in-out infinite;
}

#recordUI::after {
  content: "← скасувати";
  order: 3;
  flex: 0 0 auto;
  color: rgba(100, 116, 139, 0.72);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

body.recording #recordUI {
  display: flex;
}

#recordTimer {
  order: 1;
  min-width: 40px;
  font-size: 13px;
  font-weight: 800;
  color: #ef4444;
  letter-spacing: 0;
}

#waveCanvas {
  order: 2;
  width: 156px;
  height: 28px;
  display: block;
  flex: 1 1 156px;
  max-width: min(42vw, 220px);
}

/* ===== VOICE RECORD BUTTON ===== */
#recordBtn,
#speechToTextBtn,
#privateSpeechToTextBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #fdfefe 0%, #eef4ff 100%);
  color: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 14px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.92) inset,
    0 10px 22px rgba(15, 23, 42, 0.12);
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease;
}

#speechLanguageSelect{
  width: 42px;
  height: 30px;
  min-height: 30px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 10px;
  padding: 0 4px;
  background: rgba(255,255,255,0.94);
  color: #0f172a;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  outline: none;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,0.92) inset;
}

#privateSpeechLanguageSelect{
  width: 42px;
  height: 30px;
  min-height: 30px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 10px;
  padding: 0 4px;
  background: rgba(255,255,255,0.94);
  color: #0f172a;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  outline: none;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,0.92) inset;
}

#speechLanguageSelect:focus-visible,
#privateSpeechLanguageSelect:focus-visible{
  border-color: rgba(96, 165, 250, 0.42);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.96) inset,
    0 0 0 3px rgba(59, 130, 246, 0.12);
}

#recordBtn:hover,
#recordBtn:focus-visible,
#speechToTextBtn:hover,
#speechToTextBtn:focus-visible,
#privateSpeechToTextBtn:hover,
#privateSpeechToTextBtn:focus-visible{
  background: linear-gradient(180deg, #ffffff 0%, #e7f0ff 100%);
  border-color: rgba(96, 165, 250, 0.34);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.96) inset,
    0 12px 24px rgba(59, 130, 246, 0.16);
}

#privateRecordBtn,
#privateRecordBtn *,
#privateComposer .composer-inline-actions.right{
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

#privateRecordBtn{
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#privateRecordBtn.is-pending-media::after,
#privateRecordBtn.is-live-media::after{
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #59ffb0;
  box-shadow: 0 0 0 4px rgba(89,255,176,0.18);
}

#privateRecordBtn.is-pending-media::after{
  background: #ffd057;
  box-shadow: 0 0 0 4px rgba(255,208,87,0.16);
}

/* ===== ATTACHMENTS GALLERY ===== */
.private-attachments-gallery {
  margin-top: 8px;
}

.attachments-carousel {
  position: relative;
}

.attachments-carousel.is-multi-photo {
  padding: 8px 8px 10px;
}

.attachments-carousel.is-multi-photo::before,
.attachments-carousel.is-multi-photo::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(255,222,236,0.82));
  box-shadow: 0 10px 24px rgba(40, 18, 28, 0.16);
  pointer-events: none;
}

.attachments-carousel.is-multi-photo::before {
  transform: translate(9px, 8px) rotate(2.6deg);
}

.attachments-carousel.is-multi-photo::after {
  transform: translate(4px, 4px) rotate(-1.8deg);
}

.attachments-images {
  position: relative;
  z-index: 1;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0,0,0,0.02);
  box-shadow: 0 14px 30px rgba(25, 19, 32, 0.18);
}

.attachment-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  opacity: 0;
  transform: translateX(18px) scale(0.96);
  transition: opacity 0.24s ease, transform 0.24s ease;
  pointer-events: none;
}

.attachment-image.active {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

.attachments-counter {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  min-width: 48px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(19, 15, 24, 0.76);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(0,0,0,0.22);
}

.attachments-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 3;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(19, 15, 24, 0.56);
}

.attachments-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.52);
  transition: width 0.18s ease, background 0.18s ease;
}

.attachments-dot.active {
  width: 18px;
  background: #fff;
}

.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  color: rgba(40,40,40,0.8);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: all 0.2s ease;
  z-index: 4;
}

.carousel-prev {
  left: 10px;
}

.carousel-next {
  right: 10px;
}

.carousel-prev:hover,
.carousel-next:hover {
  background: rgba(255,255,255,1);
  color: var(--accent);
  transform: translateY(-50%) scale(1.1);
}

.attachments-others {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#privateRecordBtn.is-live-media[data-live-mode="video"]::after{
  background: #ff5e8f;
  box-shadow: 0 0 0 4px rgba(255,94,143,0.16);
  animation: private-media-live-pulse 1s ease-in-out infinite;
}

#privateRecordBtn.is-live-media[data-live-mode="voice"]::after{
  background: #4ed7ff;
  box-shadow: 0 0 0 4px rgba(78,215,255,0.16);
  animation: private-media-live-pulse 1s ease-in-out infinite;
}

@keyframes private-media-live-pulse{
  0%, 100%{
    transform: scale(1);
    opacity: 1;
  }
  50%{
    transform: scale(1.18);
    opacity: 0.72;
  }
}

#privateRecordBtn .composer-media-icon{
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

#privateRecordBtn .composer-media-icon svg{
  width: 20px;
  height: 20px;
  display: block;
}

#privateWatchSendBtn{
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 6;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translate(var(--send-offset-x), var(--send-offset-y)) scale(0.88);
  box-shadow: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

#privateWatchRecordBtn{
  transition: opacity 0.16s ease, transform 0.16s ease;
}

#privateWatchChatForm .composer-inline-actions.right{
  right: 7px;
  bottom: 6px;
}

#privateWatchChatForm .private-watch-manual-btn{
  min-width: 36px;
  min-height: 36px;
}

#privateWatchChatForm.has-text #privateWatchSendBtn{
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translate(var(--send-offset-x), var(--send-offset-y)) scale(1);
  box-shadow: 0 8px 16px rgba(255,61,141,0.2);
}

#privateWatchChatForm.has-text #privateWatchRecordBtn{
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.88);
}

#recordBtn .voice-record-btn-icon,
#speechToTextBtn .composer-dictation-icon,
#privateSpeechToTextBtn .composer-dictation-icon,
#privateWatchRecordBtn .voice-record-btn-icon{
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

#recordBtn .voice-record-btn-icon svg,
#speechToTextBtn .composer-dictation-icon svg,
#privateSpeechToTextBtn .composer-dictation-icon svg,
#privateWatchRecordBtn .voice-record-btn-icon svg{
  width: 20px;
  height: 20px;
  display: block;
}

#speechToTextBtn.is-listening,
#privateSpeechToTextBtn.is-listening{
  background: #2ea6ff !important;
  color: #fff !important;
  border-color: rgba(46,166,255,0.52) !important;
  box-shadow:
    0 0 0 4px rgba(46,166,255,0.12),
    0 10px 22px rgba(46,166,255,0.28);
  animation: dictation-pulse 1.2s ease-in-out infinite;
}

#speechToTextBtn.is-unsupported,
#speechLanguageSelect.is-unsupported,
#privateSpeechToTextBtn.is-unsupported,
#privateSpeechLanguageSelect.is-unsupported{
  display: none;
}

@keyframes dictation-pulse{
  0%, 100%{
    transform: scale(1);
  }
  50%{
    transform: scale(1.06);
  }
}

body.recording #recordBtn .voice-record-btn-icon svg,
body.private-watch-recording #privateWatchRecordBtn .voice-record-btn-icon svg{
  filter: drop-shadow(0 1px 2px rgba(255,255,255,0.18));
}

body.recording #recordBtn .voice-record-btn-icon svg{
  display: none;
}

body.recording #recordBtn .voice-record-btn-icon::before{
  content: "";
  width: 10px;
  height: 10px;
  display: block;
  border-radius: 2px;
  background: currentColor;
}

@keyframes telegram-record-pulse{
  0%, 100%{
    transform: scale(1);
    box-shadow:
      0 0 0 4px rgba(239,68,68,0.12),
      0 0 14px rgba(239,68,68,0.35);
  }
  50%{
    transform: scale(1.08);
    box-shadow:
      0 0 0 7px rgba(239,68,68,0.16),
      0 0 22px rgba(239,68,68,0.42);
  }
}

@media (max-width: 520px) {
  #recordUI::after {
    font-size: 11px;
  }

  #waveCanvas {
    max-width: 34vw;
  }
}

/*body.recording #recordBtn {
  background: linear-gradient(135deg, #ff3d8d, #ff6aa9) !important;
  color: #fff !important;
  border-color: rgba(255,61,141,0.45) !important;
  box-shadow: 0 10px 24px rgba(255,61,141,0.28);
  transform: scale(1.04);
}*/

body.recording #recordBtn {
  background: #2ea6ff !important;
  color: #fff !important;
  border-color: rgba(46,166,255,0.52) !important;
  box-shadow: 0 10px 22px rgba(46,166,255,0.28);
  transform: scale(1.03);
}

body.private-video-recording #privateRecordBtn {
  background: linear-gradient(135deg, var(--accent), var(--accent2)) !important;
  color: #fff !important;
  border-color: var(--tool-btn-active-border) !important;
  box-shadow: 0 10px 24px var(--tool-btn-shadow);
  transform: scale(1.04);
}

.msg.bulk-delete-mode{
  cursor: pointer;
  transition:
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease;
}

.msg.bulk-delete-mode:hover{
  transform: translateY(-1px);
}

.msg.bulk-delete-selected{
  border-color: rgba(255, 61, 141, 0.9) !important;
  box-shadow: 0 0 0 2px rgba(255, 61, 141, 0.2);
}

.bulk-delete-bar{
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom, 0px) + 12px);
  transform: translateX(-50%);
  z-index: 210000;
  width: min(720px, calc(100vw - 24px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 61, 141, 0.2);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 40px rgba(20, 20, 20, 0.18);
  backdrop-filter: blur(14px);
}

.bulk-delete-bar.hidden{
  display: none;
}

.bulk-delete-bar__text{
  font-size: 14px;
  font-weight: 700;
  color: #2d2231;
}

.bulk-delete-bar__actions{
  display: flex;
  align-items: center;
  gap: 10px;
}

.bulk-delete-bar__btn{
  appearance: none;
  border: 1px solid rgba(255, 61, 141, 0.22);
  border-radius: 12px;
  padding: 9px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: #ffffff;
  color: #302330;
}

.bulk-delete-bar__btn.secondary{
  background: rgba(255, 255, 255, 0.9);
}

.bulk-delete-bar__btn.danger{
  background: linear-gradient(135deg, #ff4b8e, #ff7cae);
  color: #ffffff;
  border-color: rgba(255, 61, 141, 0.45);
}

.bulk-delete-bar__btn:disabled{
  opacity: 0.55;
  cursor: default;
}

.chat-day-separator{
  width: 100%;
  margin: 10px 0 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: rgba(40,40,40,0.62);
}

#chatContainer.is-background-hard-to-read .chat-day-separator,
#privateChatContainer.is-background-hard-to-read .chat-day-separator{
  color: rgba(255,255,255,0.94);
  text-shadow: 0 1px 2px rgba(0,0,0,0.45);
}

.msg-translation{
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(0,0,0,0.08);
  font-size: 14px;
  line-height: 1.45;
  color: rgba(40,40,40,0.72);
}

.msg-reactions{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.msg-reaction-chip{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 32px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.msg-reaction-chip.is-own{
  border-color: rgba(255,61,141,0.42);
  box-shadow: 0 8px 18px rgba(255, 61, 141, 0.16);
}

.msg-reaction-count{
  font-size: 12px;
  font-weight: 700;
  color: rgba(40,40,40,0.72);
}

.msg-reaction-emoji{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
}

.kolobok-img.kolobok-reaction,
.kolobok.kolobok-reaction{
  width: 24px;
  height: 24px;
  max-width: 28px;
  max-height: 28px;
  font-size: 21px;
  vertical-align: middle;
}

.love-emoji-img.kolobok-reaction{
  width: 30px;
  height: 30px;
  max-width: 34px;
  max-height: 34px;
  vertical-align: middle;
}

.composer-emoji-preview{
  order: -1;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 34px;
  margin: 0 46px 4px 2px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 61, 141, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(255, 61, 141, 0.07);
}

.composer-input-shell.has-rich-emoji-preview{
  border-radius: 12px;
}

.composer-emoji-preview.hidden{
  display: none;
}

.composer-emoji-preview .kolobok-img.kolobok-inline{
  vertical-align: middle;
}

.composer-emoji-preview .love-emoji-img.kolobok-inline{
  height: 42px;
  max-height: 48px;
  vertical-align: middle;
}

.msg.has-birthday-cake .msg-body,
.msg.has-private-birthday-slice .msg-body{
  width: min(100%, 430px);
}

.birthday-cake-card{
  width: min(100%, 430px);
  padding: 12px;
  border: 1px solid rgba(234, 88, 12, 0.18);
  border-radius: 12px;
  background:
    radial-gradient(circle at 26% 12%, rgba(255,255,255,0.98), rgba(255,255,255,0) 36%),
    linear-gradient(180deg, #fff7ed, #ffe4e6 58%, #fff1f2);
  box-shadow: 0 14px 28px rgba(159, 18, 57, 0.12);
}

.birthday-cake-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.birthday-cake-head strong{
  color: #7f1d1d;
  font-size: 14px;
}

.birthday-cake-head span{
  color: #9f1239;
  font-size: 12px;
  white-space: nowrap;
}

.birthday-cake-svg{
  display: block;
  width: min(100%, 320px);
  height: auto;
  margin: 0 auto;
  overflow: visible;
}

.birthday-cake-base{
  fill: #78350f;
  opacity: 0.18;
}

.birthday-cake-piece{
  outline: none;
}

.birthday-cake-piece:not(.claimed){
  cursor: pointer;
}

.birthday-cake-sector{
  stroke: rgba(255,255,255,0.9);
  stroke-width: 2.2;
  transition: filter 0.16s ease, transform 0.16s ease;
  transform-origin: 120px 120px;
}

.birthday-cake-sector-1{ fill: #fca5a5; }
.birthday-cake-sector-2{ fill: #fdba74; }
.birthday-cake-sector-3{ fill: #f9a8d4; }
.birthday-cake-sector-4{ fill: #fcd34d; }

.birthday-cake-cream{
  fill: rgba(255,255,255,0.62);
  pointer-events: none;
}

.birthday-cake-piece:not(.claimed):hover .birthday-cake-sector,
.birthday-cake-piece:not(.claimed):focus .birthday-cake-sector{
  filter: drop-shadow(0 6px 8px rgba(190, 18, 60, 0.22));
  transform: scale(1.025);
}

.birthday-cake-piece.claimed .birthday-cake-sector{
  fill: #fff7ed;
  stroke: rgba(190, 18, 60, 0.3);
}

.birthday-cake-piece-label{
  fill: #7f1d1d;
  font-size: 15px;
  font-weight: 900;
  pointer-events: none;
}

.birthday-cake-claim-text{
  fill: #7f1d1d;
  font-size: 8.4px;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(255,255,255,0.92);
  stroke-width: 2.4px;
  stroke-linejoin: round;
  pointer-events: none;
}

.birthday-cake-claim-layer{
  pointer-events: none;
}

.birthday-cake-strawberry{
  filter: drop-shadow(0 5px 7px rgba(127, 29, 29, 0.24));
  pointer-events: none;
}

.birthday-cake-strawberry image{
  overflow: visible;
}

.birthday-cake-candle{
  transform-box: fill-box;
  transform-origin: center bottom;
}

.birthday-cake-candle-photo{
  filter:
    drop-shadow(0 4px 6px rgba(127, 29, 29, 0.18));
}

.birthday-cake-candle-body{
  fill: #fff7ed;
  stroke: rgba(255,255,255,0.9);
  stroke-width: 1.5;
  filter: drop-shadow(0 4px 5px rgba(127, 29, 29, 0.14));
}

.birthday-cake-candle-stripe{
  fill: none;
  stroke: #f43f5e;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.birthday-cake-candle-wick{
  fill: none;
  stroke: #3f2313;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.birthday-cake-flame{
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: birthday-cake-flame-dance 0.58s ease-in-out infinite alternate;
  filter:
    drop-shadow(0 0 3px rgba(254, 240, 138, 0.92))
    drop-shadow(0 0 8px rgba(249, 115, 22, 0.58))
    drop-shadow(0 0 13px rgba(220, 38, 38, 0.22));
}

.birthday-cake-flame-overlay{
  pointer-events: none;
}

.birthday-cake-flame-outer{
  fill: #dc2626;
  opacity: 0.88;
}

.birthday-cake-flame-mid{
  fill: #f97316;
  opacity: 0.94;
  animation: birthday-cake-flame-mid-pulse 0.68s ease-in-out infinite alternate;
}

.birthday-cake-flame-inner{
  fill: #fff7ad;
  animation: birthday-cake-flame-inner-pulse 0.42s ease-in-out infinite alternate;
}

@keyframes birthday-cake-flame-dance{
  0%{
    transform: translateX(-0.45px) scaleX(0.86) scaleY(1.08) rotate(-3deg);
  }
  45%{
    transform: translateX(0.25px) scaleX(1.02) scaleY(0.96) rotate(2deg);
  }
  100%{
    transform: translateX(0.55px) scaleX(0.92) scaleY(1.12) rotate(4deg);
  }
}

@keyframes birthday-cake-flame-mid-pulse{
  from{
    transform: translateY(0.4px) scale(0.94);
  }
  to{
    transform: translateY(-0.3px) scale(1.04);
  }
}

@keyframes birthday-cake-flame-inner-pulse{
  from{
    opacity: 0.68;
    transform: translateY(0.6px) scale(0.8);
  }
  to{
    opacity: 1;
    transform: translateY(-0.4px) scale(1.05);
  }
}

.birthday-cake-hint{
  margin: 10px 0 0;
  color: #7f1d1d;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.private-birthday-slice-card{
  display: flex;
  gap: 12px;
  align-items: center;
  width: min(100%, 430px);
  padding: 12px;
  border: 1px solid rgba(236, 72, 153, 0.2);
  border-radius: 12px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,0.95), rgba(255,255,255,0) 34%),
    linear-gradient(135deg, #fff7ed, #ffe4e6 62%, #fce7f3);
  box-shadow: 0 12px 24px rgba(190, 18, 60, 0.1);
}

.private-birthday-slice-art{
  position: relative;
  flex: 0 0 136px;
  align-self: stretch;
  min-height: 104px;
  border-radius: 10px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0)),
    url("/pictures/generated/strawberry-cake-slice-champagne.png") center / cover no-repeat;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.58),
    0 10px 20px rgba(131, 24, 67, 0.14);
}

.private-birthday-slice-copy{
  display: grid;
  gap: 4px;
}

.private-birthday-slice-copy strong{
  color: #831843;
}

.private-birthday-slice-copy span{
  color: #7f1d1d;
}

.private-birthday-slice-copy small{
  color: #9f1239;
  font-weight: 700;
}

.user-device-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin: 0 3px;
  color: currentColor;
  opacity: .72;
  vertical-align: -0.18em;
  flex: 0 0 auto;
}

.user-device-icon svg{
  display: block;
  width: 14px;
  height: 14px;
}

.online-user-name .user-device-icon,
.private-dialog-name .user-device-icon{
  margin-left: 4px;
  margin-right: 3px;
}

/* Keep mobile composer text in sync with the selected message text size. */
#input{
  font-size: var(--room-message-font-size, var(--message-font-size, 16px)) !important;
}

#privateInput,
#privateWatchInput{
  font-size: var(--private-message-font-size, var(--message-font-size, 16px)) !important;
}
