.jp {
  --jp-accent: #e5577a;
  --jp-surface: #ffffff;
  --jp-ink: #111b21;
  --jp-brand-bubble: #ffffff;
  --jp-user-bubble: #dcf8c6;
  --jp-thread-bg: #ffffff;
  position: relative;
  margin: 40px auto 0;
  max-width: 1040px;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(70% 90% at 0% 0%, rgba(174, 21, 54, 0.38), transparent 60%),
    radial-gradient(
      60% 80% at 100% 100%,
      rgba(229, 138, 106, 0.16),
      transparent 65%
    ),
    #161214;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  padding: 36px 48px;
  text-align: left;
  box-shadow: 0 30px 60px -30px rgba(20, 8, 12, 0.55);
}
.jp::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent);
  mask-image: radial-gradient(closest-side, #000, transparent);
  pointer-events: none;
}
.jp > * {
  position: relative;
}
.jp-wa {
  --jp-thread-bg: #efeae2;
}
.jp-ig {
  --jp-user-bubble: #efe7ff;
  --jp-brand-bubble: #f2f2f2;
}
.jp-voice {
  --jp-surface: #1f1a1c;
  --jp-ink: #f3efef;
  --jp-brand-bubble: #2c2528;
  --jp-user-bubble: #3a2a30;
  --jp-thread-bg: #1f1a1c;
}
.jp-rcs {
  --jp-user-bubble: #d3e3fd;
  --jp-brand-bubble: #f1f3f4;
}
.jp-web {
  --jp-user-bubble: #fbe3e8;
  --jp-brand-bubble: #f4f1f2;
}
.jp-device {
  height: 100%;
  max-height: 440px;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  background: var(--jp-surface);
  color: var(--jp-ink);
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, 0.06),
    0 24px 48px -20px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  font:
    13.5px / 1.4 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
}
.jp-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(127, 127, 127, 0.18);
  flex: none;
}
.jp-wa .jp-head {
  background: #008069;
  color: #fff;
  border: 0;
}
.jp-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ae1536, #e58a6a);
  flex: none;
}
.jp-head b {
  display: block;
  font-size: 13.5px;
}
.jp-head small {
  display: block;
  font-size: 11px;
  opacity: 0.75;
}
.jp-thread {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px;
  overflow: hidden;
  background: var(--jp-thread-bg);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 48px);
  mask-image: linear-gradient(to bottom, transparent, #000 48px);
}
.jp-thread > * {
  flex: none;
}
.jp-msg {
  max-width: 86%;
  padding: 8px 11px;
  border-radius: 12px;
  margin: 0;
}
.jp-msg.brand {
  align-self: flex-start;
  background: var(--jp-brand-bubble);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}
.jp-msg.user {
  align-self: flex-end;
  background: var(--jp-user-bubble);
  border-bottom-right-radius: 4px;
}
.jp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}
.jp-chips span {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid currentColor;
  color: #0b7a62;
  font-weight: 600;
  font-size: 12.5px;
  background: var(--jp-brand-bubble);
}
.jp-rcs .jp-chips span {
  color: #1a5fc8;
}
.jp-ig .jp-chips span,
.jp-web .jp-chips span {
  color: #ae1536;
}
.jp-voice .jp-chips span {
  color: #f08aa0;
}
.jp-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid rgba(127, 127, 127, 0.3);
}
.jp-search svg,
.jp-events svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.jp-card {
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--jp-brand-bubble);
  border: 1px solid rgba(127, 127, 127, 0.18);
  display: grid;
  gap: 2px;
}
.jp-card small {
  opacity: 0.7;
}
.jp-card span {
  margin-top: 8px;
  justify-self: start;
  padding: 6px 12px;
  border-radius: 999px;
  background: #ae1536;
  color: #fff;
  font-weight: 600;
  font-size: 12.5px;
}
.jp-call {
  align-self: center;
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-weight: 600;
}
.jp-wave {
  display: flex;
  gap: 4px;
  align-items: center;
  height: 34px;
}
.jp-wave i {
  width: 4px;
  height: 10px;
  border-radius: 4px;
  background: #e5577a;
}
.jp-lead {
  align-self: center;
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
}
.jp-lead-label {
  font: 500 11px var(--mono, monospace);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.jp-lead-name b {
  display: block;
  font: 600 22px / 1.2 var(--display, sans-serif);
  color: #fff;
}
.jp-lead-name small {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}
.jp-status {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: rgba(229, 87, 122, 0.22);
  border: 1px solid rgba(229, 87, 122, 0.5);
}
.jp-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e5577a;
  box-shadow: 0 0 0 4px rgba(229, 87, 122, 0.25);
}
.jp-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.jp-steps li {
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  transition: background-color 0.4s ease;
}
.jp-steps li.on {
  background: #e5577a;
}
.jp-events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  min-height: 88px;
  align-content: start;
}
.jp-events li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.88);
}
.jp-events svg {
  color: #5fd09a;
}
.jp-toggle {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.jp-toggle svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.jp-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
}
@media (prefers-reduced-motion: no-preference) {
  .jp-thread > *,
  .jp-events li,
  .jp-status {
    animation: jp-in 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }
  .jp-wave i {
    animation: jp-wave 1s ease-in-out infinite;
  }
  .jp-wave i:nth-child(2) {
    animation-delay: 0.12s;
  }
  .jp-wave i:nth-child(3) {
    animation-delay: 0.24s;
  }
  .jp-wave i:nth-child(4) {
    animation-delay: 0.36s;
  }
  .jp-wave i:nth-child(5) {
    animation-delay: 0.48s;
  }
  @keyframes jp-in {
    from {
      opacity: 0;
      transform: translate3d(0, 10px, 0);
    }
  }
  @keyframes jp-wave {
    50% {
      height: 30px;
    }
  }
}
@media (max-width: 860px) {
  .jp {
    aspect-ratio: auto;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px 16px 64px;
  }
  .jp-device {
    height: 380px;
  }
  .jp-lead {
    padding: 16px;
  }
  .jp-events {
    min-height: 0;
  }
}
