.mcHpSection{
  position:relative;
  overflow:hidden;
  background:linear-gradient(180deg,#fafbff 0%,#f7f9ff 50%,#fafbff 100%);
  padding:40px 0 60px;
}

.mcHpSectionBadge{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:8px 20px;
  border-radius:8px;
  border:1px solid rgba(200,169,106,.40);
  background:linear-gradient(135deg,rgba(200,169,106,.10) 0%,rgba(15,35,70,.06) 100%);
  color:#15223b;
  font-size:14px;
  font-weight:800;
  letter-spacing:.10em;
  box-shadow:0 2px 12px rgba(200,169,106,.15);
}

.mcHpSectionBadgeDot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#22c55e;
  flex:0 0 8px;
  animation:mcHpBadgePulse 2s ease-in-out infinite;
}

@keyframes mcHpBadgePulse{
  0%,100%{box-shadow:0 0 0 0 rgba(34,197,94,.55);}
  50%{box-shadow:0 0 0 6px rgba(34,197,94,0);}
}

.mcHpSectionHeadline{
  font-size:42px !important;
  font-weight:900;
  color:#15223b;
  line-height:1.15;
  margin-bottom:16px;
  letter-spacing:-.02em;
}

.mcHpSectionSub{
  font-size:16px;
  color:rgba(21,34,59,.65);
  line-height:1.65;
  margin-bottom:22px;
}

.mcHpMainRow{
  border-radius:8px;
  overflow:hidden;
  box-shadow:
    0 30px 80px rgba(15,35,70,.13),
    0 0 0 1px rgba(15,35,70,.08);
}

.mcHpChatbox{
  flex:1;
  display:flex;
  flex-direction:column;
  background:#ffffff;
  position:relative;
  overflow:hidden;
  min-height:560px;
  --mcHpImpulseTop:124px;
  --mcHpImpulseBottom:156px;
  --mcHpImpulseLeft:20px;
  --mcHpImpulseRight:12px;
}

.mcHpChatHeader{
  display:flex;
  align-items:center;
  padding:18px 20px;
  border-bottom:1px solid rgba(15,35,70,.09);
  background:linear-gradient(180deg,#ffffff 0%,#f9fafb 100%);
  flex:0 0 auto;
  position:relative;
  z-index:4;
}

.mcHpChatAvatar{
  width:44px;
  height:44px;
  border-radius:8px;
  object-fit:cover;
  border:1px solid rgba(15,35,70,.10);
  box-shadow:0 4px 14px rgba(10,20,40,.10);
  flex:0 0 44px;
  margin-right:8px;
}

.mcHpChatHeaderMeta{
  display:flex;
  flex-direction:column;
  gap:2px;
  flex:1;
  min-width:0;
}

.mcHpChatName{
  font-size:15px !important;
  font-weight:900;
  color:#15223b;
  line-height:1.2;
}

.mcHpChatRole{
  font-size:11px !important;
  color:rgba(21,34,59,.50);
  font-weight:600;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.mcHpStatusPill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 12px;
  border-radius:8px;
  border:1px solid rgba(15,35,70,.10);
  background:#f4f6fa;
  flex:0 0 auto;
}

.mcHpDot{
  display:inline-block;
  width:8px;
  height:8px;
  border-radius:50%;
  flex:0 0 8px;
  transition:background .3s ease;
}

.mcHpDot--connected{
  background:#22c55e;
  animation:mcHpDotPulse 2s ease-in-out infinite;
}

.mcHpDot--connecting{
  background:#f59e0b;
  animation:mcHpDotBlink 1s ease-in-out infinite;
}

.mcHpDot--disconnected{
  background:#ef4444;
}

.mcHpDot--streaming{
  background:#3b82f6;
  animation:mcHpDotPulse .8s ease-in-out infinite;
}

@keyframes mcHpDotPulse{
  0%{box-shadow:0 0 0 0 rgba(34,197,94,.45);}
  70%{box-shadow:0 0 0 7px rgba(34,197,94,.00);}
  100%{box-shadow:0 0 0 0 rgba(34,197,94,.00);}
}

@keyframes mcHpDotBlink{
  0%,100%{opacity:1;}
  50%{opacity:.35;}
}

.mcHpStatusTxt{
  font-size:11px !important;
  font-weight:700;
  color:rgba(21,34,59,.60);
  white-space:nowrap;
}

.mcHpMessages{
  position:relative;
  z-index:2;
  height:420px;
  flex:0 0 auto;
  overflow-y:auto;
  overflow-x:hidden;
  padding:20px 12px 20px 20px;
  display:flex;
  flex-direction:column;
  gap:16px;
  scroll-behaviour:smooth;
  scrollbar-width:thin;
  scrollbar-color:rgba(200,169,106,.50) rgba(15,35,70,.05);
  isolation:isolate;
  -webkit-overflow-scrolling:touch;
  overscroll-behaviour-y:contain;
  background:transparent;
}

.mcHpMessages > *{
  position:relative;
  z-index:2;
}

.mcHpMessages::-webkit-scrollbar{width:6px;}
.mcHpMessages::-webkit-scrollbar-track{background:rgba(15,35,70,.05);border-radius:6px;}
.mcHpMessages::-webkit-scrollbar-thumb{background:rgba(200,169,106,.50);border-radius:6px;min-height:36px;}
.mcHpMessages::-webkit-scrollbar-thumb:hover{background:rgba(200,169,106,.75);}

.mcHpEmptyImpulse{
  position:absolute;
  top:var(--mcHpImpulseTop);
  bottom:var(--mcHpImpulseBottom);
  left:var(--mcHpImpulseLeft);
  right:var(--mcHpImpulseRight);
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:none;
  z-index:1;
  opacity:1;
  visibility:visible;
  transition:opacity .22s ease, visibility .22s ease;
}

.mcHpEmptyImpulse.is-hidden{
  opacity:0;
  visibility:hidden;
}

.mcHpEmptyImpulseText{
  display:inline-block;
  max-width:100%;
  margin:0;
  text-align:center;
  white-space:nowrap;
  user-select:none;
  font-size:clamp(38px,5.6vw,86px);
  font-weight:900;
  letter-spacing:.14em;
  line-height:1.02;
  background-image:linear-gradient(
    90deg,
    rgba(21,34,59,.10) 0%,
    rgba(21,34,59,.18) 16%,
    rgba(21,34,59,.42) 50%,
    rgba(21,34,59,.18) 84%,
    rgba(21,34,59,.10) 100%
  );
  background-size:240% 100%;
  background-position:0% 50%;
  background-repeat:no-repeat;
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  color:transparent;
  animation:mcHpEmptyImpulseSweep 5.6s linear infinite;
}

@keyframes mcHpEmptyImpulseSweep{
  0%{background-position:0% 50%;}
  49.999%{background-position:100% 50%;}
  50%{background-position:100% 50%;}
  100%{background-position:0% 50%;}
}

.mcHpMsg{
  display:flex;
  flex-direction:column;
  gap:5px;
  animation:mcHpMsgIn .25s ease-out both;
}

@keyframes mcHpMsgIn{
  from{opacity:0;transform:translateY(8px);}
  to{opacity:1;transform:translateY(0);}
}

.mcHpMsg--bot{align-items:flex-start;}
.mcHpMsg--user{align-items:flex-end;}

.mcHpMsgLabel{
  display:flex;
  align-items:center;
  gap:7px;
  padding:0 2px;
}

.mcHpMsgLabel img{
  width:26px;
  height:26px;
  border-radius:6px;
  object-fit:cover;
  border:1px solid rgba(15,35,70,.10);
  flex:0 0 26px;
}

.mcHpMsgLabel span{
  font-size:11px !important;
  font-weight:700;
  color:rgba(21,34,59,.45);
}

.mcHpMsgBody{
  padding:11px 15px;
  border-radius:8px;
  font-size:14px !important;
  line-height:1.6;
  word-break:break-word;
  overflow:hidden;
  scrollbar-width:none;
}

.mcHpMsgBody::-webkit-scrollbar{display:none;}

.mcHpMsg--bot .mcHpMsgBody{
  color:#15223b;
  border-top-left-radius:3px;
}

.mcHpMsg--user .mcHpMsgBody{
  background:linear-gradient(160deg,#1d3a6e 0%,#15223b 100%);
  color:#ffffff;
  border-top-right-radius:3px;
  box-shadow:0 4px 16px rgba(15,34,70,.20);
}

.mcHpTyping{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:4px 2px;
}

.mcHpTyping span{
  width:7px;
  height:7px;
  border-radius:50%;
  background:rgba(21,34,59,.28);
  animation:mcHpBounce 1.2s ease-in-out infinite;
}

.mcHpTyping span:nth-child(1){animation-delay:0ms;}
.mcHpTyping span:nth-child(2){animation-delay:160ms;}
.mcHpTyping span:nth-child(3){animation-delay:320ms;}

@keyframes mcHpBounce{
  0%,80%,100%{transform:translateY(0);opacity:.4;}
  40%{transform:translateY(-6px);opacity:1;}
}

.mcHpChips{
  position:relative;
  z-index:3;
  display:flex;
  flex-wrap:wrap;
  align-content:flex-start;
  gap:8px;
  padding:12px 20px;
  border-top:1px solid rgba(15,35,70,.07);
  background:#f9fafd;
  flex:0 0 auto;
  max-height:116px;
  overflow-y:auto;
  scrollbar-width:none;
}

.mcHpChips::-webkit-scrollbar{display:none;}

.mcHpChip{
  appearance:none;
  border:1px solid rgba(15,35,70,.13);
  background:#ffffff;
  border-radius:8px;
  padding:7px 14px;
  font-size:12px !important;
  font-weight:600;
  color:#15223b;
  cursor:pointer;
  line-height:1;
  white-space:nowrap;
  box-shadow:0 2px 8px rgba(10,20,40,.06);
  transition:border-color .15s, background .15s, box-shadow .15s, transform .10s, color .15s;
}

.mcHpChip:hover:not(:disabled){
  border-color:rgba(200,169,106,.60);
  background:rgba(200,169,106,.07);
  color:#7a5c10;
  box-shadow:0 4px 14px rgba(200,169,106,.18);
  transform:translateY(-1px);
}

.mcHpChip:active{transform:translateY(0);box-shadow:none;}
.mcHpChip:disabled{opacity:.42;pointer-events:none;}

.mcHpConsentBar{
  position:relative;
  z-index:3;
  display:flex;
  align-items:center;
  padding:10px 20px;
  border-top:1px solid rgba(15,35,70,.07);
  background:#f9fafd;
  flex:0 0 auto;
}

.mcHpToggleWrap{
  display:flex;
  align-items:flex-start;
  gap:12px;
  cursor:pointer;
  margin:0;
  user-select:none;
  width:100%;
  min-width:0;
}

.mcHpToggleTrack{
  position:relative;
  flex:0 0 44px;
  width:44px;
  height:24px;
}

.mcHpToggleInput{
  position:absolute;
  opacity:0;
  width:0;
  height:0;
  pointer-events:none;
}

.mcHpToggleThumb{
  position:absolute;
  inset:0;
  border-radius:8px;
  background:rgba(15,35,70,.18);
  cursor:pointer;
  transition:background .22s ease;
}

.mcHpToggleThumb::after{
  content:"";
  position:absolute;
  top:3px;
  left:3px;
  width:18px;
  height:18px;
  border-radius:50%;
  background:#ffffff;
  box-shadow:0 2px 6px rgba(0,0,0,.20);
  transition:transform .22s cubic-bezier(.34,1.56,.64,1);
}

.mcHpToggleInput:checked ~ .mcHpToggleThumb{
  background:#22c55e;
}

.mcHpToggleInput:checked ~ .mcHpToggleThumb::after{
  transform:translateX(20px);
}

.mcHpToggleInput:focus-visible ~ .mcHpToggleThumb{
  box-shadow:0 0 0 3px rgba(34,197,94,.30);
}

@keyframes mcHpConsentNeedBlink{
  0%,100%{
    box-shadow:0 0 0 0 rgba(239,68,68,.00);
    background:rgba(15,35,70,.18);
  }
  15%{
    box-shadow:0 0 0 4px rgba(239,68,68,.22);
    background:rgba(239,68,68,.28);
  }
  30%{
    box-shadow:0 0 0 0 rgba(239,68,68,.00);
    background:rgba(15,35,70,.18);
  }
  45%{
    box-shadow:0 0 0 4px rgba(239,68,68,.22);
    background:rgba(239,68,68,.28);
  }
  60%{
    box-shadow:0 0 0 0 rgba(239,68,68,.00);
    background:rgba(15,35,70,.18);
  }
}

.mcHpToggleThumb.mcHpToggleThumb--needConsent{
  animation:mcHpConsentNeedBlink .7s ease-in-out 1;
}

.mcHpConsentLabel{
  font-size:12px !important;
  color:rgba(21,34,59,.60);
  line-height:1.5;
  flex:1 1 auto;
  min-width:0;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
}

.mcHpConsentLink{
  color:#2563eb;
  text-decoration:underline;
  text-underline-offset:2px;
  overflow-wrap:anywhere;
  word-break:break-word;
}

.mcHpInputArea{
  position:relative;
  z-index:3;
  display:flex;
  align-items:flex-end;
  gap:10px;
  padding:14px 16px;
  border-top:1px solid rgba(15,35,70,.09);
  background:#ffffff;
  flex:0 0 auto;
}

.mcHpInput{
  flex:1 1 auto;
  min-width:0;
  border:1px solid rgba(15,35,70,.14);
  border-radius:8px;
  padding:10px 14px;
  font-size:14px !important;
  line-height:1.5;
  resize:none;
  outline:none;
  background:#f8fafc;
  color:#15223b;
  max-height:120px;
  overflow-y:auto;
  font-family:inherit;
  transition:border-color .15s, box-shadow .15s, background .15s;
}

.mcHpInput::placeholder{color:rgba(21,34,59,.35);}

.mcHpInput:focus{
  border-color:rgba(200,169,106,.65);
  box-shadow:0 0 0 3px rgba(200,169,106,.14);
  background:#ffffff;
}

.mcHpInput:disabled{
  opacity:.50;
  cursor:not-allowed;
  background:#f1f4f8;
}

.mcHpSendBtn{
  appearance:none;
  border:none;
  width:42px;
  height:42px;
  min-width:42px;
  flex:0 0 42px;
  border-radius:8px;
  background:linear-gradient(160deg,#1d3a6e 0%,#15223b 100%);
  color:#ffffff;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 6px 18px rgba(15,34,70,.22);
  transition:transform .12s ease, box-shadow .12s ease, filter .12s ease, opacity .12s ease;
}

.mcHpSendBtn:hover:not(:disabled){
  transform:translateY(-1px) scale(1.04);
  box-shadow:0 10px 26px rgba(15,34,70,.30);
  filter:brightness(1.10);
}

.mcHpSendBtn:active:not(:disabled){
  transform:translateY(0) scale(.98);
  box-shadow:0 3px 10px rgba(15,34,70,.18);
}

.mcHpSendBtn:disabled{
  opacity:.35;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
}

.mcHpConsentLabel .mcHpConsentLink,
.mcHpConsentLabel a{
  display:inline;
  white-space:normal !important;
  overflow-wrap:anywhere;
  word-break:break-word;
  line-break:anywhere;
  text-decoration:underline;
  text-underline-offset:2px;
}

.mcHpConsentLabel .mcHpConsentLink:hover,
.mcHpConsentLabel .mcHpConsentLink:focus,
.mcHpConsentLabel a:hover,
.mcHpConsentLabel a:focus{
  text-decoration:underline;
}

.mcHpFullscreenBtn{
  appearance:none;
  border:1px solid rgba(15,35,70,.12);
  background:#f4f6fa;
  border-radius:8px;
  width:34px;
  height:34px;
  min-width:34px;
  flex:0 0 34px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  color:rgba(21,34,59,.55);
  margin-left:8px;
  transition:background .15s, color .15s, border-color .15s;
}

.mcHpFullscreenBtn:hover{
  background:rgba(200,169,106,.10);
  border-color:rgba(200,169,106,.45);
  color:#7a5c10;
}

.mcHpChatbox--fullscreen{
  position:fixed !important;
  inset:0 !important;
  z-index:99999 !important;
  border-radius:0 !important;
  width:100vw !important;
  height:100vh !important;
  height:100dvh !important;
  max-width:none !important;
  min-height:none !important;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.mcHpChatbox--fullscreen .mcHpMessages{
  flex:1 1 auto !important;
  height:auto !important;
  min-height:0 !important;
}

body.mcHpNoScroll{
  overflow:hidden;
}

@media (max-width:991px){
  .mcHpSection{padding:60px 0 70px;}
  .mcHpSectionHeadline{font-size:30px !important;}
  .mcHpSectionSub{margin-bottom:32px;}
  .mcHpMainRow{border-radius:8px;}
  .mcHpChatbox{min-height:500px;}
  .mcHpSectionBadge{
    display:flex;
    width:fit-content;
    max-width:100%;
    margin-left:auto;
    margin-right:auto;
    text-align:center;
    justify-content:center;
    align-items:center;
  }
}

@media (max-width:768px){
  .mcHpSection{padding:42px 0 48px;}
  .mcHpSectionHeadline{font-size:26px !important;}
  .mcHpSectionSub{
    font-size:14px;
    margin-bottom:24px;
    line-height:1.55;
  }

  .mcHpChatbox{
    min-height:448px;
    --mcHpImpulseLeft:14px;
    --mcHpImpulseRight:10px;
  }

  .mcHpMessages{
    height:286px;
    padding:14px 10px 12px 14px;
    gap:14px;
    scrollbar-width:thin;
    scrollbar-color:rgba(200,169,106,.50) rgba(15,35,70,.05);
  }

  .mcHpMessages::-webkit-scrollbar{width:4px;display:block;}
  .mcHpMessages::-webkit-scrollbar-track{background:rgba(15,35,70,.05);border-radius:4px;}
  .mcHpMessages::-webkit-scrollbar-thumb{background:rgba(200,169,106,.50);border-radius:4px;}

  .mcHpEmptyImpulseText{
    font-size:clamp(22px,7.4vw,34px);
    letter-spacing:.08em;
    line-height:1.04;
    background-image:linear-gradient(
      90deg,
      rgba(21,34,59,.10) 0%,
      rgba(21,34,59,.16) 16%,
      rgba(21,34,59,.34) 50%,
      rgba(21,34,59,.16) 84%,
      rgba(21,34,59,.10) 100%
    );
  }

  .mcHpChips{
    max-height:92px;
    padding:9px 12px 10px;
    scrollbar-width:thin;
    scrollbar-color:rgba(200,169,106,.50) rgba(15,35,70,.05);
  }

  .mcHpChips::-webkit-scrollbar{width:4px;display:block;}
  .mcHpChips::-webkit-scrollbar-track{background:rgba(15,35,70,.05);border-radius:4px;}
  .mcHpChips::-webkit-scrollbar-thumb{background:rgba(200,169,106,.50);border-radius:4px;}

  .mcHpChip{
    font-size:11px !important;
    padding:6px 11px;
  }

  .mcHpChatHeader{
    padding:12px 14px;
    gap:0;
  }

  .mcHpChatRole{display:none;}
  .mcHpConsentBar{padding:8px 12px;}
  .mcHpInputArea{padding:10px 12px;}
  .mcHpStatusPill{padding:4px 9px;}

  .mcHpSendBtn{
    width:38px;
    height:38px;
    min-width:38px;
    flex:0 0 38px;
  }

  .mcHpToggleWrap{gap:10px;}

  .mcHpConsentLabel{
    font-size:11px !important;
    line-height:1.4;
  }
}

@media (max-width:575px){
  .mcHpSection{padding:36px 0 38px;}
  .mcHpSectionHeadline{font-size:22px !important;}
  .mcHpSectionSub{
    font-size:13px;
    margin-bottom:20px;
  }

  .mcHpChatbox{
    --mcHpImpulseLeft:12px;
    --mcHpImpulseRight:8px;
  }

  .mcHpMessages{
    height:248px;
    padding:12px 8px 10px 12px;
    gap:12px;
  }

  .mcHpEmptyImpulseText{
    font-size:clamp(18px,6.6vw,26px);
    letter-spacing:.06em;
    line-height:1.06;
  }

  .mcHpChips{
    padding:9px 10px 10px;
    max-height:84px;
  }
}

@media (prefers-reduced-motion:reduce){
  .mcHpSectionBadgeDot,
  .mcHpDot--connected,
  .mcHpDot--connecting,
  .mcHpDot--streaming,
  .mcHpEmptyImpulseText,
  .mcHpMsg,
  .mcHpTyping span{
    animation:none !important;
    transition:none !important;
  }
}